Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 1/Scripts/Global/Goggles.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 1
3
// Script Description: Goggles Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
private alias object.state : object.setupDone
13
14
private alias object.value0 : object.targetPlayer
15
private alias object.value1 : object.frameTable
16
17
// Player Aliases
18
private alias object.type : player.type
19
private alias object.animation : player.animation
20
private alias object.direction : player.direction
21
private alias object.rotation : player.rotation
22
private alias object.xpos : player.xpos
23
private alias object.ypos : player.ypos
24
private alias object.frame : player.frame
25
26
private alias -1 : DRAWORDER_PLAYER
27
28
29
// ========================
30
// Tables
31
// ========================
32
33
private table Goggles_frameTableSonic
34
1 // ANI_STOPPED
35
2 // ANI_WAITING
36
0 // ANI_BORED (blank)
37
8 // ANI_LOOKINGUP
38
11 // ANI_LOOKINGDOWN
39
14 // ANI_WALKING
40
20 // ANI_RUNNING
41
24 // ANI_SKIDDING
42
0 // ANI_PEELOUT - even if there's logic for it in other places, it's blank here
43
0 // ANI_SPINDASH
44
26 // ANI_JUMPING
45
31 // ANI_BOUNCING
46
32 // ANI_HURT, can't be seen if the Goggles were given Debug Mode but can be seen if the Goggles are in visual-only mode (see Startup)
47
0 // ANI_DYING
48
0 // ANI_DROWNING
49
34 // ANI_FANROTATE
50
39 // ANI_BREATHING
51
40 // ANI_PUSHING
52
44 // ANI_FLAILING1
53
44 // ANI_FLAILING2
54
0 // "Sliding" - blank and unused
55
46 // ANI_HANGING
56
0 // ANI_DROPPING
57
48 // ANI_CLINGING
58
0 // ANI_FLYING
59
0 // ANI_FLYINGTIRED
60
0 // ANI_SWIMMING
61
0 // ANI_SWIMMINGTIRED
62
0 // ANI_GLIDING
63
0 // ANI_GLIDING_DROP
64
0 // ANI_GLIDING_STOP
65
0 // ANI_CLIMBING
66
0 // ANI_LEDGEPULLUP
67
0 // "Corkscrew H" - blank and unused
68
0 // "Corkscrew V" - blank and unused
69
32 // ANI_WATERSLIDE
70
0 // ANI_CONTINUE
71
0 // ANI_CONTINUE_UP
72
0 // ANI_SUPER_TRANSFORM
73
0 // ANI_FLY_LIFT_DOWN
74
0 // ANI_FLY_LIFT_UP
75
0 // ANI_FLY_LIFT_TIRED
76
0 // ANI_SWIM_LIFT
77
end table
78
79
80
private table Goggles_frameTableTails
81
50 // ANI_STOPPED
82
51 // ANI_WAITING
83
0 // ANI_BORED (blank)
84
54 // ANI_LOOKINGUP
85
55 // ANI_LOOKINGDOWN
86
56 // ANI_WALKING
87
64 // ANI_RUNNING
88
68 // ANI_SKIDDING
89
64 // ANI_PEELOUT - used it's not really Tails's "Peel Out", actually his fastest run anim
90
0 // ANI_SPINDASH
91
0 // ANI_JUMPING
92
70 // ANI_BOUNCING
93
72 // ANI_HURT, not seen if Goggles are from Debug Mode but can be seen if Goggles are only visual (see Startup)
94
0 // ANI_DYING
95
0 // ANI_DROWNING
96
74 // ANI_FANROTATE
97
79 // ANI_BREATHING
98
80 // ANI_PUSHING
99
84 // ANI_FLAILING1
100
84 // ANI_FLAILING2
101
0 // "Sliding" - blank and unused
102
0 // ANI_HANGING
103
0 // ANI_DROPPING
104
86 // ANI_CLINGING
105
88 // ANI_FLYING - unused because Tails is always swimming underwater. This data for it still fits fine though
106
90 // ANI_FLYINGTIRED - unused for the same reason as above, this one also works fine
107
92 // ANI_SWIMMING
108
97 // ANI_SWIMMINGTIRED
109
0 // ANI_GLIDING
110
0 // ANI_GLIDING_DROP
111
0 // ANI_GLIDING_STOP
112
0 // ANI_CLIMBING
113
0 // ANI_LEDGEPULLUP
114
0 // "Corkscrew H" - blank and unused
115
0 // "Corkscrew V" - blank and unused
116
72 // ANI_WATERSLIDE
117
0 // ANI_CONTINUE
118
0 // ANI_CONTINUE_UP
119
0 // ANI_SUPER_TRANSFORM
120
0 // ANI_FLY_LIFT_DOWN
121
0 // ANI_FLY_LIFT_UP
122
0 // ANI_FLY_LIFT_TIRED
123
0 // ANI_SWIM_LIFT
124
end table
125
126
127
private table Goggles_frameTableKnuckles
128
100 // ANI_STOPPED
129
101 // ANI_WAITING
130
0 // ANI_BORED (blank)
131
114 // ANI_LOOKINGUP
132
117 // ANI_LOOKINGDOWN
133
120 // ANI_WALKING
134
128 // ANI_RUNNING
135
132 // ANI_SKIDDING
136
0 // ANI_PEELOUT
137
0 // ANI_SPINDASH
138
134 // ANI_JUMPING
139
142 // ANI_BOUNCING
140
143 // ANI_HURT, as with the other characters this frame can't be seen if the Goggles were spawned via Debug Mode,
141
// but they can be seen if the Goggles were placed in the scene (once again, see Startup)
142
0 // ANI_DYING
143
0 // ANI_DROWNING
144
145 // ANI_FANROTATE
145
155 // ANI_BREATHING
146
156 // ANI_PUSHING
147
160 // ANI_FLAILING1
148
160 // ANI_FLAILING2
149
0 // "Sliding" - blank and unused
150
0 // ANI_HANGING
151
0 // ANI_DROPPING
152
172 // ANI_CLINGING
153
0 // ANI_FLYING
154
0 // ANI_FLYINGTIRED
155
0 // ANI_SWIMMING
156
0 // ANI_SWIMMINGTIRED
157
174 // ANI_GLIDING
158
177 // ANI_GLIDING_DROP
159
179 // ANI_GLIDING_STOP
160
181 // ANI_CLIMBING
161
187 // ANI_LEDGEPULLUP
162
0 // "Corkscrew H" - blank and unused
163
0 // "Corkscrew V" - blank and unused
164
144 // ANI_WATERSLIDE
165
0 // ANI_CONTINUE
166
0 // ANI_CONTINUE_UP
167
0 // ANI_SUPER_TRANSFORM
168
0 // ANI_FLY_LIFT_DOWN
169
0 // ANI_FLY_LIFT_UP
170
0 // ANI_FLY_LIFT_TIRED
171
0 // ANI_SWIM_LIFT
172
end table
173
174
175
// ========================
176
// Events
177
// ========================
178
179
event ObjectUpdate
180
// This object can't setup in Startup due to how it works, so setup is done on the first frame of its Update instead
181
if object.setupDone == false
182
switch stage.playerListPos
183
case PLAYER_SONIC_A
184
case PLAYER_SONIC_TAILS_A
185
object.frameTable = Goggles_frameTableSonic
186
break
187
188
case PLAYER_TAILS_A
189
object.frameTable = Goggles_frameTableTails
190
break
191
192
case PLAYER_KNUCKLES_A
193
object.frameTable = Goggles_frameTableKnuckles
194
break
195
196
end switch
197
198
object.setupDone++
199
end if
200
end event
201
202
203
event ObjectDraw
204
// Focus on the assigned player
205
currentPlayer = object.targetPlayer
206
207
temp0 = player[currentPlayer].ypos
208
temp0 >>= 16
209
210
// Only draw when the player is underwater
211
if temp0 >= stage.waterLevel
212
// Face the same way the player is facing
213
object.direction = player[currentPlayer].direction
214
215
// Check if the player is in an animation that rotates
216
CheckEqual(player[currentPlayer].animation, ANI_WALKING)
217
temp0 = checkResult
218
CheckEqual(player[currentPlayer].animation, ANI_RUNNING)
219
temp0 |= checkResult
220
CheckEqual(player[currentPlayer].animation, ANI_PEELOUT) // For Tails, the "Peelout" anim is his fastest run anim
221
temp0 |= checkResult
222
if temp0 == true
223
// Player is in a rotatable animation, make the goggles match the player's quarter rotation
224
object.rotation = player[currentPlayer].rotation
225
226
if object.rotation >= 256
227
object.rotation += 40
228
else
229
object.rotation += 16
230
end if
231
232
object.rotation &= 448
233
else
234
// Player is an a normal, upright animation so keep the goggles unrotated
235
object.rotation = 0
236
end if
237
238
// Get the starting frame the goggles should use
239
object.frame = player[currentPlayer].frame
240
GetTableValue(temp0, player[currentPlayer].animation, object.frameTable)
241
242
if temp0 == 0
243
// Blank, that means this animation is one that shouldn't have goggles shown
244
object.frame = 0
245
else
246
object.frame += temp0
247
248
// Special exceptions for some of the special sticklers
249
250
if object.frameTable == Goggles_frameTableTails
251
if player[currentPlayer].animation == ANI_WAITING
252
if player[currentPlayer].frame <= 20
253
// Looking ahead
254
object.frame = 50
255
else
256
if player[currentPlayer].frame <= 36
257
// Looking at the camera
258
object.frame = 51
259
else
260
if player[currentPlayer].frame == 37
261
// First frame of yawning
262
object.frame = 52
263
else
264
if player[currentPlayer].frame == 48
265
// Last frame of yawning
266
object.frame = 52
267
else
268
// Mid-yawn
269
object.frame = 53
270
end if
271
end if
272
end if
273
end if
274
else
275
// Tails should never be flying underwater - he's swimming instead - so this following stuff somewhat goes unused
276
if player[currentPlayer].animation == ANI_FLYINGTIRED
277
// The player's animation has 12 frames while there are only two frames of goggle data for it, crunch them up a little
278
279
object.frame = player[currentPlayer].frame
280
object.frame /= 6
281
object.frame += 90
282
end if
283
end if
284
else
285
if object.frameTable == Goggles_frameTableKnuckles
286
if player[currentPlayer].animation == ANI_WAITING
287
if player[currentPlayer].frame <= 53
288
// Tapping his foot
289
object.frame = 100
290
else
291
if player[currentPlayer].frame <= 58
292
// Looking at the camera
293
object.frame = 101
294
else
295
if player[currentPlayer].frame == 59
296
// First frame of the air boxing sequence
297
object.frame = 102
298
else
299
if player[currentPlayer].frame <= 91
300
// Boxing up, ready to go
301
// In this part of the animation, he's moving in groups of 3 repeated frames
302
object.frame = player[currentPlayer].frame
303
object.frame -= 60
304
object.frame &= 3
305
object.frame += 103
306
else
307
// Punching
308
object.frame = player[currentPlayer].frame
309
object.frame -= 92
310
object.frame += 107
311
end if
312
end if
313
end if
314
end if
315
else
316
CheckEqual(player[currentPlayer].animation, ANI_FLAILING1)
317
temp0 = checkResult
318
CheckEqual(player[currentPlayer].animation, ANI_FLAILING2)
319
temp0 |= checkResult
320
if temp0 == true
321
if player[currentPlayer].frame < 12
322
// In this part of the animation, all his frames are in groups of 2
323
object.frame = player[currentPlayer].frame
324
object.frame >>= 1
325
object.frame += 160
326
else
327
if player[currentPlayer].frame < 27
328
// The same frame is repeated 14 times
329
object.frame = 166
330
else
331
if player[currentPlayer].frame < 30
332
// Similarly, the next three frames are all the same sprite too
333
object.frame = 167
334
else
335
if player[currentPlayer].frame < 33
336
// And one more, another group of 3 dupes
337
object.frame = 168
338
else
339
// From here, all sprites are in groups of two once again
340
object.frame = player[currentPlayer].frame
341
object.frame -= 33
342
object.frame >>= 1
343
object.frame %= 3
344
object.frame += 169
345
end if
346
end if
347
end if
348
end if
349
end if
350
end if
351
end if
352
end if
353
end if
354
355
if player[currentPlayer].type != TypeName[Debug Mode]
356
DrawSpriteFX(object.frame, FX_ROTATE, player[currentPlayer].xpos, player[currentPlayer].ypos)
357
end if
358
end if
359
end event
360
361
362
event ObjectStartup
363
LoadSpriteSheet("Global/Items.gif")
364
365
// Goggle frames
366
// There are only a couple of actual goggle sprites, these are all pretty much the same thing but with different offsets
367
// All frames are labelled with the character and animation they correspond to
368
369
// #0 - Empty frame
370
SpriteFrame(0, 0, 1, 1, 1, 1)
371
372
// #1 - Sonic's ANI_STOPPED
373
SpriteFrame(-4, -12, 12, 9, 118, 71)
374
375
// #2 - #7 - Sonic's ANI_WAITING
376
SpriteFrame(-7, -11, 15, 9, 118, 81)
377
SpriteFrame(-7, -11, 15, 9, 118, 81)
378
SpriteFrame(-7, -11, 15, 9, 118, 81)
379
SpriteFrame(-7, -11, 15, 9, 118, 81)
380
SpriteFrame(-7, -11, 15, 9, 118, 81)
381
SpriteFrame(-7, -11, 15, 9, 118, 81)
382
383
// ANI_BORED has no goggle data
384
385
// #8 - #10 - Sonic's ANI_LOOKINGUP
386
SpriteFrame(-4, -12, 12, 9, 118, 71)
387
SpriteFrame(-5, -12, 12, 10, 127, 102)
388
SpriteFrame(-6, -13, 12, 10, 127, 102)
389
390
// #11 - #13 - Sonic's ANI_LOOKINGDOWN
391
SpriteFrame(-4, -12, 12, 9, 118, 71)
392
SpriteFrame(-1, -4, 14, 11, 150, 118)
393
SpriteFrame(-1, 10, 9, 8, 140, 102)
394
395
// #14 - #19 - Sonic's ANI_WALKING
396
SpriteFrame(0, -11, 12, 9, 118, 71)
397
SpriteFrame(0, -12, 12, 9, 118, 71)
398
SpriteFrame(0, -11, 12, 9, 118, 71)
399
SpriteFrame(3, -11, 8, 9, 118, 102)
400
SpriteFrame(3, -12, 8, 9, 118, 102)
401
SpriteFrame(3, -11, 8, 9, 118, 102)
402
403
// #20 - #23 - Sonic's ANI_RUNNING
404
SpriteFrame(3, -9, 12, 9, 118, 71)
405
SpriteFrame(3, -9, 12, 9, 118, 71)
406
SpriteFrame(3, -9, 12, 9, 118, 71)
407
SpriteFrame(3, -9, 12, 9, 118, 71)
408
409
// #24 - #25 - Sonic's ANI_SKIDDING
410
SpriteFrame(-9, -9, 15, 9, 118, 81)
411
SpriteFrame(-9, -9, 15, 9, 118, 81)
412
413
// Sonic's ANI_PEELOUT has no goggle data
414
// There is still some code for it, see ObjectDraw
415
416
// Sonic's ANI_SPINDASH is blank as well
417
418
// #26 - #30 - Sonic's ANI_JUMPING
419
SpriteFrame(0, 0, 1, 1, 1, 1)
420
SpriteFrame(3, -7, 8, 9, 118, 102)
421
SpriteFrame(-1, 3, 9, 8, 140, 102)
422
SpriteFrame(-11, -2, 8, 9, 142, 92)
423
SpriteFrame(-8, -11, 9, 8, 118, 123)
424
425
// #31 - Sonic's ANI_BOUNCING
426
SpriteFrame(-4, -17, 12, 10, 127, 102)
427
428
// #32 - #33 - Sonic's ANI_HURT and ANI_WATERSLIDE
429
SpriteFrame(-8, -10, 15, 9, 118, 81)
430
SpriteFrame(-8, -10, 15, 9, 118, 81)
431
432
// Sonic's ANI_DYING and ANI_DROWNING are blank too
433
434
// #34 - #38 - Sonic's ANI_FANROTATE
435
SpriteFrame(9, -5, 12, 9, 118, 71)
436
SpriteFrame(-8, -5, 16, 8, 118, 113)
437
SpriteFrame(-21, -5, 12, 9, 130, 92)
438
SpriteFrame(0, 0, 1, 1, 1, 1)
439
SpriteFrame(0, 0, 1, 1, 1, 1)
440
441
// #39 - Sonic's ANI_BREATHING
442
SpriteFrame(-4, -18, 12, 10, 127, 102)
443
444
// #40 - #43 - Sonic's ANI_PUSHING
445
SpriteFrame(-5, -7, 15, 9, 118, 81)
446
SpriteFrame(-5, -8, 15, 9, 118, 81)
447
SpriteFrame(-5, -7, 15, 9, 118, 81)
448
SpriteFrame(-5, -8, 15, 9, 118, 81)
449
450
// #44 - #45 - Sonic's ANI_FLAILING1 and ANI_FLAILING2
451
SpriteFrame(-10, -13, 15, 9, 118, 81)
452
SpriteFrame(-8, -12, 15, 9, 118, 81)
453
454
// "Sliding" anim doesn't have any data
455
456
// #46 - #47 - Sonic's ANI_HANGING
457
SpriteFrame(-3, -9, 12, 9, 118, 71)
458
SpriteFrame(-3, -9, 12, 9, 118, 71)
459
460
// Sonic's ANI_DROPPING doesn't have any goggle data either
461
462
// #48 - #49 - Sonic's ANI_CLINGING
463
SpriteFrame(-13, -10, 14, 13, 135, 113)
464
SpriteFrame(-12, -10, 14, 13, 135, 113)
465
466
// Now, Tails's frames
467
468
// #50 - Tails's ANI_STOPPED
469
SpriteFrame(-6, -10, 12, 9, 118, 71)
470
471
// #51 - #53 - Tails's ANI_WAITING
472
// Note that there's a special exception for this,
473
// go see ObjectDraw for more info
474
SpriteFrame(-9, -10, 16, 9, 118, 113)
475
SpriteFrame(-9, -10, 16, 9, 118, 113)
476
SpriteFrame(-8, -11, 16, 9, 118, 113)
477
478
// Tails's ANI_BORED is empty
479
480
// #54 - Tails's ANI_LOOKINGUP
481
SpriteFrame(-5, -12, 12, 9, 118, 71)
482
483
// #55 - Tails's ANI_LOOKINGDOWN
484
SpriteFrame(-2, 1, 12, 9, 118, 71)
485
486
// #56 - #63 - Tails's ANI_WALKING
487
SpriteFrame(1, -11, 8, 9, 118, 102)
488
SpriteFrame(-1, -13, 8, 9, 118, 102)
489
SpriteFrame(-1, -13, 8, 9, 118, 102)
490
SpriteFrame(-1, -12, 8, 9, 118, 102)
491
SpriteFrame(1, -11, 8, 9, 118, 102)
492
SpriteFrame(0, -13, 8, 9, 118, 102)
493
SpriteFrame(-1, -13, 8, 9, 118, 102)
494
SpriteFrame(-1, -11, 8, 9, 118, 102)
495
496
// #64 - #67 - Tails's ANI_RUNNING and ANI_PEELOUT
497
// Note that Tails's ANI_PEELOUT is his fastest run anim
498
SpriteFrame(3, -11, 8, 9, 118, 102)
499
SpriteFrame(3, -11, 8, 9, 118, 102)
500
SpriteFrame(3, -11, 8, 9, 118, 102)
501
SpriteFrame(3, -11, 8, 9, 118, 102)
502
503
// #68 - #69 - Tails's ANI_SKIDDING
504
SpriteFrame(-5, -11, 12, 9, 118, 71)
505
SpriteFrame(-5, -11, 12, 9, 118, 71)
506
507
// #70 - #71 - Tails's ANI_BOUNCING
508
SpriteFrame(-2, -15, 9, 8, 118, 123)
509
SpriteFrame(-2, -15, 9, 8, 118, 123)
510
511
// #72 - Tails's ANI_HURT and ANI_WATERSLIDE
512
SpriteFrame(-5, -10, 12, 9, 118, 71)
513
514
// #73 - Appears to be unused..?
515
// This is around the spot where ANI_DYING and ANI_DROWNING are, if that's any indicator of a likely guess
516
SpriteFrame(-5, -10, 12, 9, 118, 71)
517
518
// #74 - #78 - Tails's ANI_FANROTATE
519
SpriteFrame(4, -5, 12, 9, 118, 71)
520
SpriteFrame(-8, -5, 16, 8, 118, 113)
521
SpriteFrame(-15, -5, 12, 9, 130, 92)
522
SpriteFrame(0, 0, 1, 1, 1, 1)
523
SpriteFrame(0, 0, 1, 1, 1, 1)
524
525
// #79 - Tails's ANI_BREATHING
526
SpriteFrame(-2, -15, 12, 10, 127, 102)
527
528
// #80 - #83 - Tails's ANI_PUSHING
529
SpriteFrame(-5, -8, 15, 9, 118, 81)
530
SpriteFrame(-5, -8, 15, 9, 118, 81)
531
SpriteFrame(-5, -8, 15, 9, 118, 81)
532
SpriteFrame(-5, -8, 15, 9, 118, 81)
533
534
// #84 - #85 - Tails's ANI_FLAILING1 and ANI_FLAILING2
535
SpriteFrame(-9, -10, 16, 9, 118, 113)
536
SpriteFrame(-9, -10, 16, 9, 118, 113)
537
538
// #86 - #87 - Tails's ANI_CLINGING
539
SpriteFrame(-14, -9, 14, 13, 135, 113)
540
SpriteFrame(-13, -9, 14, 13, 135, 113)
541
542
// #88 - #89 - Tails's ANI_FLYING
543
// Unused, since Tails doesn't fly underwater
544
SpriteFrame(-1, -4, 12, 9, 118, 71)
545
SpriteFrame(-1, -4, 12, 9, 118, 71)
546
547
// #90 - #91 - Tails's ANI_FLYINGTIRED
548
// This animation has a special exceptions as well,
549
// go see ObjectDraw for more info
550
// In spite of that though, this one is unused too
551
SpriteFrame(-1, -4, 12, 9, 118, 71)
552
SpriteFrame(-1, -5, 12, 9, 118, 71)
553
554
// #92 - #96 - Tails's ANI_SWIMMING
555
SpriteFrame(-1, -7, 12, 9, 118, 71)
556
SpriteFrame(-1, -7, 12, 9, 118, 71)
557
SpriteFrame(-1, -7, 12, 9, 118, 71)
558
SpriteFrame(-1, -7, 12, 9, 118, 71)
559
SpriteFrame(-1, -7, 12, 9, 118, 71)
560
561
// #97 - #99 - Tails's ANI_SWIMMINGTIRED
562
SpriteFrame(1, -5, 12, 9, 118, 71)
563
SpriteFrame(1, -5, 12, 9, 118, 71)
564
SpriteFrame(1, -5, 12, 9, 118, 71)
565
566
// #100 - Knuckles's ANI_STOPPED
567
SpriteFrame(-5, -17, 15, 9, 118, 81)
568
569
// #101 - #113 - Knuckles's ANI_WAITING
570
// Note that there's also a special exception for this,
571
// go see ObjectDraw for more info
572
SpriteFrame(-6, -16, 15, 9, 118, 81)
573
SpriteFrame(-4, -17, 15, 9, 118, 81)
574
SpriteFrame(-5, -16, 15, 9, 118, 81)
575
SpriteFrame(-4, -16, 15, 9, 118, 81)
576
SpriteFrame(-3, -15, 15, 9, 118, 81)
577
SpriteFrame(-4, -15, 15, 9, 118, 81)
578
SpriteFrame(-5, -15, 15, 9, 118, 81)
579
SpriteFrame(-4, -15, 15, 9, 118, 81)
580
SpriteFrame(-5, -15, 15, 9, 118, 81)
581
SpriteFrame(-4, -15, 15, 9, 118, 81)
582
SpriteFrame(7, -15, 8, 9, 118, 102)
583
SpriteFrame(-5, -16, 15, 9, 118, 81)
584
SpriteFrame(-4, -17, 15, 9, 118, 81)
585
586
// #114 - #116 - Knuckles's ANI_LOOKINGUP
587
SpriteFrame(-5, -17, 15, 9, 118, 81)
588
SpriteFrame(-5, -19, 12, 10, 127, 102)
589
SpriteFrame(-7, -20, 12, 10, 127, 102)
590
591
// #117 - #119 - Knuckles's ANI_LOOKINGDOWN
592
SpriteFrame(-5, -17, 15, 9, 118, 81)
593
SpriteFrame(-3, -9, 12, 9, 118, 71)
594
SpriteFrame(-2, -1, 12, 9, 118, 71)
595
596
// #120 - #127 - Knuckles's ANI_WALKING
597
SpriteFrame(-1, -11, 12, 9, 118, 71)
598
SpriteFrame(3, -12, 8, 9, 118, 102)
599
SpriteFrame(3, -14, 8, 9, 118, 102)
600
SpriteFrame(0, -12, 12, 9, 118, 71)
601
SpriteFrame(-3, -12, 12, 9, 118, 71)
602
SpriteFrame(-3, -13, 15, 9, 118, 81)
603
SpriteFrame(-4, -14, 15, 9, 118, 81)
604
SpriteFrame(-2, -13, 12, 9, 118, 71)
605
606
// #128 - #131 - Knuckles's ANI_RUNNING
607
SpriteFrame(-3, -12, 12, 9, 118, 71)
608
SpriteFrame(-3, -12, 12, 9, 118, 71)
609
SpriteFrame(-3, -12, 12, 9, 118, 71)
610
SpriteFrame(-3, -12, 12, 9, 118, 71)
611
612
// #132 - #133 - Knuckles's ANI_SKIDDING
613
// This one's a weird case - in the initial release of S1, Knuckles's skidding anim was two frames
614
// However, it later got changed to hold four, but this object was never updated to account for that
615
SpriteFrame(-5, -13, 15, 9, 118, 81)
616
SpriteFrame(-10, -12, 15, 9, 118, 81)
617
618
// #134 - #141 - Knuckles's ANI_JUMPING
619
SpriteFrame(0, 0, 1, 1, 1, 1)
620
SpriteFrame(2, -11, 8, 9, 118, 102)
621
SpriteFrame(0, 0, 1, 1, 1, 1)
622
SpriteFrame(2, 1, 9, 8, 140, 102)
623
SpriteFrame(0, 0, 1, 1, 1, 1)
624
SpriteFrame(-10, 2, 8, 9, 142, 92)
625
SpriteFrame(0, 0, 1, 1, 1, 1)
626
SpriteFrame(-11, -10, 9, 8, 118, 123)
627
SpriteFrame(-6, -17, 9, 8, 118, 123)
628
SpriteFrame(-8, -16, 15, 9, 118, 81)
629
630
// #142 - Knuckles's ANI_BOUNCING
631
SpriteFrame(-10, -13, 15, 9, 118, 81)
632
633
// #143 - Knuckles's ANI_HURT and ANI_WATERSLIDE
634
SpriteFrame(2, -8, 12, 9, 118, 71)
635
636
// #144 - Unused?
637
SpriteFrame(-2, -7, 15, 9, 118, 81)
638
639
// #145 - #154 - Knuckles's ANI_FANROTATE
640
SpriteFrame(-7, -5, 16, 9, 118, 113)
641
SpriteFrame(-13, -7, 15, 9, 69, 106)
642
SpriteFrame(-14, -8, 12, 9, 130, 92)
643
SpriteFrame(-14, -9, 8, 9, 60, 106)
644
SpriteFrame(0, 0, 1, 1, 1, 1)
645
SpriteFrame(0, 0, 1, 1, 1, 1)
646
SpriteFrame(0, 0, 1, 1, 1, 1)
647
SpriteFrame(6, -9, 8, 9, 118, 102)
648
SpriteFrame(-3, -17, 15, 9, 118, 81)
649
SpriteFrame(1, -13, 12, 9, 118, 71)
650
651
// #155 - Knuckles's ANI_BREATHING
652
SpriteFrame(-4, -14, 15, 9, 118, 81)
653
654
// #156 - #159 - Knuckles's ANI_PUSHING
655
SpriteFrame(1, -13, 12, 9, 118, 71)
656
SpriteFrame(4, -14, 8, 9, 118, 102)
657
SpriteFrame(1, -10, 12, 9, 118, 71)
658
SpriteFrame(2, -15, 15, 9, 118, 81)
659
660
// #160 - #171 - Knuckles's ANI_FLAILING1 and ANI_FLAILING2
661
// This animation is also one with special exceptions,
662
// go see ObjectDraw for more info
663
SpriteFrame(5, -12, 16, 9, 118, 113)
664
SpriteFrame(3, -26, 14, 13, 135, 113)
665
SpriteFrame(7, -16, 6, 7, 128, 123)
666
SpriteFrame(3, -16, 11, 10, 118, 91)
667
SpriteFrame(-1, -22, 14, 13, 135, 113)
668
SpriteFrame(4, -20, 14, 13, 135, 113)
669
SpriteFrame(6, -18, 14, 13, 135, 113)
670
SpriteFrame(5, -20, 14, 13, 135, 113)
671
SpriteFrame(3, -21, 14, 13, 135, 113)
672
SpriteFrame(3, -20, 14, 13, 135, 113)
673
SpriteFrame(-13, -11, 11, 10, 118, 91)
674
SpriteFrame(-12, -11, 11, 10, 118, 91)
675
676
// #172 - #173 - Knuckles's ANI_CLINGING
677
SpriteFrame(-7, -5, 16, 9, 118, 113)
678
SpriteFrame(-2, -7, 15, 9, 118, 81)
679
680
// #174 - #176 - Knuckles's ANI_GLIDING
681
SpriteFrame(2, -8, 12, 9, 118, 71)
682
SpriteFrame(2, -13, 12, 9, 118, 71)
683
SpriteFrame(0, -17, 12, 9, 118, 71)
684
685
// #177 - #178 - Knuckles's ANI_GLIDING_DROP
686
SpriteFrame(3, -3, 12, 9, 118, 71)
687
SpriteFrame(-4, -6, 15, 9, 118, 81)
688
689
// #179 - #180 - Knuckles's ANI_GLIDING_STOP
690
SpriteFrame(-12, -15, 12, 9, 118, 71)
691
SpriteFrame(-13, -15, 12, 9, 118, 71)
692
693
// #181 - #186 - Knuckles's ANI_CLIMBING
694
SpriteFrame(-12, -16, 12, 9, 118, 71)
695
SpriteFrame(-12, -15, 12, 9, 118, 71)
696
SpriteFrame(-13, -15, 12, 9, 118, 71)
697
SpriteFrame(-12, -16, 12, 9, 118, 71)
698
SpriteFrame(-4, -20, 8, 9, 118, 102)
699
SpriteFrame(-3, -21, 8, 9, 118, 102)
700
701
// #187 - Knuckles's ANI_LEDGEPULLUP
702
// This one seems to be incomplete, with only one frame
703
SpriteFrame(-8, -23, 15, 9, 118, 81)
704
705
// Amy doesn't have any Goggles frames in Origins Plus, honestly I don't blame them for not bothering
706
707
// Look for goggle objects placed in the current scene
708
foreach (TypeName[Goggles], arrayPos0, ALL_ENTITIES)
709
// Short explanation - placing goggles in a scene will allow Sonic to have goggles on start,
710
// but they won't function like normal goggles
711
// Instead, they'll be purely cosmetic, which means that Sonic can still get hit and stuff
712
// However, even if he does get hit, he'll still keep the goggles on
713
// This feature is another unused part of this already unused object,
714
// to utilise it just place a Goggles object anywhere in a scene
715
716
// Move to the P1 shield object slot
717
arrayPos1 = playerCount
718
719
// Move currentPlayer to P1 slot (? - nothing gets done with this, but currentPlayer *would* need to be set up if using Player_ApplyShield, maybe that's how it was in earlier versions?)
720
currentPlayer = 0
721
722
// Place some goggles in the shield slot and init its values
723
ResetObjectEntity(arrayPos1, TypeName[Goggles], 0, 0, 0)
724
object[arrayPos1].priority = PRIORITY_ACTIVE
725
object[arrayPos1].targetPlayer = 0
726
object[arrayPos1].drawOrder = DRAWORDER_PLAYER
727
728
// Remove the goggle object from the scene, as now it's been moved to the dedicated shield slot
729
ResetObjectEntity(arrayPos0, TypeName[Blank Object], 0, 0, 0)
730
next
731
732
// Store the Goggle Type ID to the corresponding global variable
733
// (Even if the script is in the Global folder, it's not actually a global object - it's an LZ stage-specific object instead
734
// so because of that the Goggles don't even have a Type ID by default, since they don't really exist normally)
735
goggleType = TypeName[Goggles]
736
end event
737
738
739
// ========================
740
// Editor Events
741
// ========================
742
743
event RSDKDraw
744
DrawSprite(0)
745
end event
746
747
748
event RSDKLoad
749
LoadSpriteSheet("Global/Items.gif")
750
SpriteFrame(-4, -12, 12, 9, 118, 71)
751
752
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
753
end event
754
755