Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/CPZ/EggmanChemicalDropper.txt
1482 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Chemical Dropper 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.value0 : object.originPos.x
13
private alias object.value1 : object.originPos.y
14
private alias object.value2 : object.oscillationAngle
15
private alias object.value3 : object.timer
16
private alias object.value4 : object.boundsL
17
private alias object.value5 : object.boundsR
18
private alias object.value6 : object.machineAnim
19
private alias object.value7 : object.tubeAnimTimer
20
private alias object.value8 : object.dropperLength
21
private alias object.value9 : object.tubeFrame
22
private alias object.value10 : object.dropletNodeID
23
private alias object.value11 : object.dropperOffset
24
private alias object.value12 : object.dropperAnim
25
private alias object.value13 : object.dropperFrame
26
private alias object.value14 : object.dropletAnimTimer
27
private alias object.value15 : object.chemicalFrame
28
private alias object.value16 : object.dropletFrame
29
private alias object.value17 : object.hatchFrame
30
private alias object.value18 : object.nextDir
31
32
// States
33
private alias 0 : CHEMICALDROPPER_MOVERIGHT
34
private alias 1 : CHEMICALDROPPER_GETCHEMICALS
35
private alias 2 : CHEMICALDROPPER_DROPCHEMICALS
36
private alias 3 : CHEMICALDROPPER_MOVELEFT
37
private alias 4 : CHEMICALDROPPER_DESTROYED
38
private alias 5 : CHEMICALDROPPER_DEBRISEXPLODE
39
private alias 6 : CHEMICALDROPPER_DEBRISDELAY
40
private alias 7 : CHEMICALDROPPER_DEBRIS
41
42
// Machine Animations
43
private alias 0 : CHEMICALDROPPER_MANI_IDLE
44
private alias 1 : CHEMICALDROPPER_MANI_EXTEND
45
private alias 2 : CHEMICALDROPPER_MANI_FILLING
46
private alias 3 : CHEMICALDROPPER_MANI_RETRACT
47
48
// Dropper Animations
49
private alias 0 : CHEMICALDROPPER_DANI_CLOSED
50
private alias 1 : CHEMICALDROPPER_DANI_FILLING
51
private alias 2 : CHEMICALDROPPER_DANI_WAIT
52
private alias 3 : CHEMICALDROPPER_DANI_EXTEND
53
private alias 4 : CHEMICALDROPPER_DANI_OPENHATCH
54
private alias 5 : CHEMICALDROPPER_DANI_RETRACT
55
56
// Player Aliases
57
private alias object.xpos : player.xpos
58
59
60
// ========================
61
// Function Declarations
62
// ========================
63
64
reserve function ChemicalDropper_SpawnDebris
65
reserve function ChemicalDropper_Oscillate
66
67
68
// ========================
69
// Tables
70
// ========================
71
72
private table ChemicalDropper_tubeFrames
73
2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2
74
end table
75
76
private table ChemicalDropper_dropletFrames
77
18, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 10
78
end table
79
80
private table ChemicalDropper_dropperFrames
81
12, 31, 33
82
end table
83
84
// Unused table
85
private table ChemicalDropper_hatchFrames
86
13, 18, 14, 16, 15, 17
87
end table
88
89
90
// ========================
91
// Function Definitions
92
// ========================
93
94
private function ChemicalDropper_SpawnDebris
95
CreateTempObject(TypeName[Chemical Dropper], 0, temp0, temp1)
96
object[tempObjectPos].state = CHEMICALDROPPER_DEBRISEXPLODE
97
object[tempObjectPos].direction = object.direction
98
99
Rand(object[tempObjectPos].xvel, 8)
100
object[tempObjectPos].xvel -= 4
101
object[tempObjectPos].xvel <<= 16
102
object[tempObjectPos].yvel = -0x38000
103
104
Rand(object[tempObjectPos].timer, 255)
105
object[tempObjectPos].timer += 30
106
object[tempObjectPos].timer &= 0x7F
107
end function
108
109
110
private function ChemicalDropper_Oscillate
111
object.ypos = object.originPos.y
112
Sin256(temp0, object.oscillationAngle)
113
temp0 <<= 10
114
object.ypos += temp0
115
object.oscillationAngle += 2
116
object.oscillationAngle &= 0xFF
117
118
object[-1].xpos = object.xpos
119
object[-1].ypos = object.ypos
120
CheckGreater(player[0].xpos, object.xpos)
121
object.direction = checkResult
122
object[-1].direction = object.direction
123
end function
124
125
126
// ========================
127
// Events
128
// ========================
129
130
event ObjectUpdate
131
switch object.state
132
case CHEMICALDROPPER_MOVERIGHT
133
if object.xpos == object.boundsR
134
if object.dropperAnim == CHEMICALDROPPER_DANI_CLOSED
135
object.machineAnim = CHEMICALDROPPER_MANI_EXTEND
136
object.tubeAnimTimer = 0
137
object.state++
138
end if
139
else
140
if object.xpos > object.boundsR
141
object.xpos -= 0x30000
142
if object.xpos <= object.boundsR
143
object.xpos = object.boundsR
144
end if
145
else
146
object.xpos += 0x30000
147
if object.xpos >= object.boundsR
148
object.xpos = object.boundsR
149
end if
150
end if
151
end if
152
CallFunction(ChemicalDropper_Oscillate)
153
break
154
155
case CHEMICALDROPPER_GETCHEMICALS
156
CallFunction(ChemicalDropper_Oscillate)
157
break
158
159
case CHEMICALDROPPER_DROPCHEMICALS
160
temp0 = object.xpos
161
if player[0].xpos <= object.xpos
162
temp0 -= 0x480000
163
else
164
temp0 += 0x480000
165
end if
166
temp0 &= 0xFFFF0000
167
168
temp1 = player[0].xpos
169
temp1 &= 0xFFFF0000
170
171
if temp1 == temp0
172
if object.dropperOffset == 0x580000
173
object.dropperAnim = CHEMICALDROPPER_DANI_OPENHATCH
174
end if
175
else
176
if player[0].xpos < temp0
177
temp0 = stage.newXBoundary1
178
temp0 -= 16
179
temp0 <<= 16
180
if object.xpos > temp0
181
object.xpos -= 0x10000
182
end if
183
else
184
temp0 = stage.newXBoundary2
185
temp0 += 16
186
temp0 <<= 16
187
if object.xpos < temp0
188
object.xpos += 0x10000
189
end if
190
end if
191
end if
192
193
CallFunction(ChemicalDropper_Oscillate)
194
break
195
196
case CHEMICALDROPPER_MOVELEFT
197
if object.xpos == object.boundsL
198
if object.dropperAnim == CHEMICALDROPPER_DANI_CLOSED
199
object.machineAnim = CHEMICALDROPPER_MANI_EXTEND
200
object.tubeAnimTimer = 0
201
object.state = CHEMICALDROPPER_GETCHEMICALS
202
end if
203
else
204
if object.xpos > object.boundsL
205
object.xpos -= 0x30000
206
if object.xpos <= object.boundsL
207
object.xpos = object.boundsL
208
end if
209
else
210
object.xpos += 0x30000
211
if object.xpos >= object.boundsL
212
object.xpos = object.boundsL
213
end if
214
end if
215
end if
216
CallFunction(ChemicalDropper_Oscillate)
217
break
218
219
case CHEMICALDROPPER_DESTROYED
220
object.machineAnim = CHEMICALDROPPER_MANI_IDLE
221
object.dropperAnim = CHEMICALDROPPER_DANI_CLOSED
222
temp0 = object.xpos
223
if object.direction == FLIP_NONE
224
temp0 -= object.dropperOffset
225
else
226
temp0 += object.dropperOffset
227
end if
228
temp1 = object.ypos
229
temp1 -= 0x380000
230
CallFunction(ChemicalDropper_SpawnDebris)
231
object[tempObjectPos].frame = 35
232
temp1 += 0x80000
233
temp2 = object.dropperOffset
234
temp2 >>= 16
235
temp2 -= 16
236
temp2 /= 24
237
while temp2 >= 0
238
if object.direction == FLIP_NONE
239
temp0 += 0x180000
240
else
241
temp0 -= 0x180000
242
end if
243
CallFunction(ChemicalDropper_SpawnDebris)
244
object[tempObjectPos].frame = 36
245
temp2--
246
loop
247
temp0 = object.xpos
248
temp1 = object.ypos
249
250
CallFunction(ChemicalDropper_SpawnDebris)
251
object[tempObjectPos].frame = 37
252
253
CallFunction(ChemicalDropper_SpawnDebris)
254
object[tempObjectPos].frame = 38
255
256
CallFunction(ChemicalDropper_SpawnDebris)
257
object[tempObjectPos].frame = 39
258
259
if object.direction == FLIP_NONE
260
temp0 += 0x40000
261
else
262
temp0 -= 0x40000
263
end if
264
temp1 += 0x190000
265
temp2 = 0
266
while temp2 < object.dropperLength
267
CallFunction(ChemicalDropper_SpawnDebris)
268
object[tempObjectPos].frame = 1
269
temp1 += 0x80000
270
temp2++
271
loop
272
object.type = TypeName[Blank Object]
273
break
274
275
case CHEMICALDROPPER_DEBRISEXPLODE
276
object.timer--
277
if object.timer <= 0
278
object.timer = 30
279
CreateTempObject(TypeName[Explosion], 0, object.xpos, object.ypos)
280
object[tempObjectPos].drawOrder = 5
281
PlaySfx(SfxName[Explosion 2], false)
282
object.state++
283
end if
284
break
285
286
case CHEMICALDROPPER_DEBRISDELAY
287
object.timer--
288
if object.timer <= 0
289
object.state++
290
end if
291
break
292
293
case CHEMICALDROPPER_DEBRIS
294
object.xpos += object.xvel
295
object.ypos += object.yvel
296
object.yvel += 0x3800
297
temp1 = object.ypos
298
temp1 >>= 16
299
temp1 -= camera[0].ypos
300
Abs(temp1)
301
temp1 -= 128
302
if temp1 >= screen.ycenter
303
object.type = TypeName[Blank Object]
304
end if
305
break
306
307
end switch
308
309
switch object.machineAnim
310
default
311
case CHEMICALDROPPER_MANI_IDLE
312
break
313
314
case CHEMICALDROPPER_MANI_EXTEND
315
object.tubeFrame = 1
316
object.dropperLength++
317
if object.dropperLength == 8
318
object.machineAnim = CHEMICALDROPPER_MANI_FILLING
319
object.dropletNodeID = 8
320
object.tubeAnimTimer = 0
321
object.dropperAnim = CHEMICALDROPPER_DANI_FILLING
322
object.chemicalFrame = 18
323
object.dropletFrame = 4
324
end if
325
break
326
327
case CHEMICALDROPPER_MANI_FILLING
328
object.tubeAnimTimer++
329
if object.tubeAnimTimer == 18
330
object.tubeAnimTimer = 0
331
object.dropletNodeID--
332
if object.dropletNodeID < 0
333
object.dropletNodeID = 9
334
end if
335
end if
336
GetTableValue(object.tubeFrame, object.tubeAnimTimer, ChemicalDropper_tubeFrames)
337
break
338
339
case CHEMICALDROPPER_MANI_RETRACT
340
object.tubeFrame = 1
341
object.dropperLength--
342
if object.dropperLength == 0
343
object.machineAnim = CHEMICALDROPPER_MANI_IDLE
344
object.dropletNodeID = 8
345
object.tubeAnimTimer = 0
346
object.dropperAnim = CHEMICALDROPPER_DANI_EXTEND
347
object.state = CHEMICALDROPPER_DROPCHEMICALS
348
end if
349
break
350
351
end switch
352
353
switch object.dropperAnim
354
case CHEMICALDROPPER_DANI_CLOSED
355
object.dropperOffset = 0x100000
356
object.dropperFrame = 12
357
break
358
359
case CHEMICALDROPPER_DANI_FILLING
360
object.dropletAnimTimer++
361
if object.dropletAnimTimer == 19
362
object.dropletAnimTimer = 0
363
object.chemicalFrame++
364
if object.chemicalFrame >= 30
365
object.chemicalFrame = 30
366
object.machineAnim = CHEMICALDROPPER_MANI_RETRACT
367
object.dropperAnim = CHEMICALDROPPER_DANI_WAIT
368
end if
369
end if
370
371
GetTableValue(object.dropletFrame, object.dropletAnimTimer, ChemicalDropper_dropletFrames)
372
break
373
374
case CHEMICALDROPPER_DANI_WAIT
375
break
376
377
case CHEMICALDROPPER_DANI_EXTEND
378
object.dropperOffset += 0x10000
379
if object.dropperOffset >= 0x580000
380
object.dropperOffset = 0x580000
381
end if
382
temp0 = object.dropperOffset
383
temp0 >>= 16
384
temp0 -= 16
385
temp0 /= 24
386
GetTableValue(object.dropperFrame, temp0, ChemicalDropper_dropperFrames)
387
break
388
389
case CHEMICALDROPPER_DANI_OPENHATCH
390
object.dropletAnimTimer++
391
switch object.dropletAnimTimer
392
case 8
393
object.hatchFrame = 1
394
break
395
396
case 20
397
object.hatchFrame = 2
398
break
399
400
case 32
401
temp0 = object.xpos
402
if object.direction == FLIP_NONE
403
temp0 -= object.dropperOffset
404
temp0 += 0xC0000
405
else
406
temp0 += object.dropperOffset
407
temp0 -= 0xC0000
408
end if
409
temp1 = object.ypos
410
temp1 -= 0x260000
411
CreateTempObject(TypeName[Chemical Drop], 0, temp0, temp1)
412
object[tempObjectPos].drawOrder = 2
413
break
414
415
case 40
416
object.hatchFrame = 1
417
break
418
419
case 48
420
object.hatchFrame = 0
421
object.dropperAnim = CHEMICALDROPPER_DANI_RETRACT
422
object.dropletAnimTimer = 0
423
if object.nextDir == 0
424
object.state = CHEMICALDROPPER_MOVELEFT
425
else
426
object.state = CHEMICALDROPPER_MOVERIGHT
427
end if
428
object.nextDir ^= 1
429
break
430
431
end switch
432
break
433
434
case CHEMICALDROPPER_DANI_RETRACT
435
object.dropperOffset -= 0x10000
436
if object.dropperOffset <= 0x100000
437
object.dropperOffset = 0x100000
438
object.dropperAnim = CHEMICALDROPPER_DANI_CLOSED
439
end if
440
441
temp0 = object.dropperOffset
442
temp0 >>= 16
443
temp0 -= 16
444
temp0 /= 24
445
GetTableValue(object.dropperFrame, temp0, ChemicalDropper_dropperFrames)
446
break
447
448
end switch
449
end event
450
451
452
event ObjectDraw
453
if object.state < CHEMICALDROPPER_DESTROYED
454
temp0 = object.xpos
455
if object.direction == FLIP_NONE
456
temp0 -= object.dropperOffset
457
else
458
temp0 += object.dropperOffset
459
end if
460
461
temp1 = object.ypos
462
temp1 -= 0x380000
463
if object.dropperAnim == CHEMICALDROPPER_DANI_FILLING
464
DrawSpriteFX(object.dropletFrame, FX_FLIP, object.xpos, object.ypos)
465
DrawSpriteFX(object.chemicalFrame, FX_FLIP, temp0, temp1)
466
end if
467
468
if object.dropperAnim == CHEMICALDROPPER_DANI_WAIT
469
DrawSpriteFX(object.chemicalFrame, FX_FLIP, temp0, temp1)
470
end if
471
472
if object.dropperAnim == CHEMICALDROPPER_DANI_EXTEND
473
DrawSpriteFX(object.chemicalFrame, FX_FLIP, temp0, temp1)
474
end if
475
476
if object.dropperAnim == CHEMICALDROPPER_DANI_OPENHATCH
477
if object.dropletAnimTimer < 32
478
DrawSpriteFX(object.chemicalFrame, FX_FLIP, temp0, temp1)
479
end if
480
end if
481
482
temp0 = object.xpos
483
if object.direction == FLIP_NONE
484
temp0 -= object.dropperOffset
485
else
486
temp0 += object.dropperOffset
487
end if
488
temp1 = object.ypos
489
temp1 -= 0x380000
490
DrawSpriteFX(object.dropperFrame, FX_FLIP, temp0, temp1)
491
492
switch object.hatchFrame
493
case 0
494
DrawSpriteFX(18, FX_FLIP, temp0, temp1)
495
DrawSpriteFX(13, FX_FLIP, temp0, temp1)
496
break
497
498
case 1
499
DrawSpriteFX(16, FX_FLIP, temp0, temp1)
500
DrawSpriteFX(14, FX_FLIP, temp0, temp1)
501
break
502
503
case 2
504
DrawSpriteFX(17, FX_FLIP, temp0, temp1)
505
DrawSpriteFX(15, FX_FLIP, temp0, temp1)
506
break
507
508
end switch
509
510
temp0 = object.xpos
511
if object.direction == FLIP_NONE
512
temp0 += 0x40000
513
else
514
temp0 -= 0x40000
515
end if
516
517
temp1 = object.ypos
518
temp1 += 0x190000
519
temp2 = 0
520
while temp2 < object.dropperLength
521
if temp2 == object.dropletNodeID
522
DrawSpriteFX(object.tubeFrame, FX_FLIP, temp0, temp1)
523
else
524
DrawSpriteFX(1, FX_FLIP, temp0, temp1)
525
end if
526
temp1 += 0x80000
527
temp2++
528
loop
529
DrawSpriteFX(0, FX_FLIP, object.xpos, object.ypos)
530
else
531
DrawSpriteFX(object.frame, FX_FLIP, object.xpos, object.ypos)
532
end if
533
end event
534
535
536
event ObjectStartup
537
CheckCurrentStageFolder("Zone02")
538
539
if checkResult == true
540
LoadSpriteSheet("CPZ/Objects.gif")
541
542
// Dropper Sprite Frames
543
SpriteFrame(-5, -68, 37, 52, 55, 74) // Chemical Machine - #0
544
SpriteFrame(-4, -4, 8, 8, 61, 147) // Chemical Tube (Normal) - #1
545
SpriteFrame(-5, -4, 10, 8, 59, 138) // Chemical Tube (Wide) - #2
546
SpriteFrame(-6, -4, 12, 8, 57, 129) // Chemical Tube (Widest) - #3
547
SpriteFrame(-5, -60, 8, 3, 93, 74) // Chemical Droplet 1 - #4
548
SpriteFrame(-5, -60, 8, 5, 93, 78) // Chemical Droplet 2 - #5
549
SpriteFrame(-4, -60, 6, 8, 93, 84) // Chemical Droplet 3 - #6
550
SpriteFrame(-4, -60, 6, 13, 93, 93) // Chemical Droplet 4 - #7
551
SpriteFrame(-5, -60, 8, 14, 93, 107) // Chemical Droplet 5 - #8
552
SpriteFrame(-4, -50, 8, 8, 93, 122) // Chemical Droplet 6 - #9
553
SpriteFrame(-4, -46, 8, 8, 93, 122) // Chemical Droplet 7 - #10
554
SpriteFrame(-4, -4, 8, 8, 93, 122) // Chemical Droplet 8 - #11
555
SpriteFrame(0, 0, 48, 24, 93, 131) // Chemical Dropper - #12
556
SpriteFrame(1, 24, 22, 2, 74, 189) // Dropper Hatch (Closed) - #13
557
SpriteFrame(6, 24, 16, 6, 74, 192) // Dropper Hatch (Opening 1) - #14
558
SpriteFrame(11, 24, 16, 8, 74, 199) // Dropper Hatch (Opening 2) - #15
559
SpriteFrame(-2, 24, 14, 6, 74, 208) // Dropper Hatch (Opening 3) - #16
560
SpriteFrame(-4, 24, 15, 8, 74, 215) // Dropper Hatch (Opened) - #17
561
SpriteFrame(0, 0, 0, 0, 0, 0) // Empty - #18
562
SpriteFrame(1, 22, 22, 2, 70, 131) // Chemicals (Empty) - #19
563
SpriteFrame(1, 20, 22, 4, 70, 131) // Chemicals (Filling 1) - #20
564
SpriteFrame(1, 18, 22, 6, 70, 131) // Chemicals (Filling 2) - #21
565
SpriteFrame(1, 16, 22, 8, 70, 131) // Chemicals (Filling 3) - #22
566
SpriteFrame(1, 14, 22, 10, 70, 131) // Chemicals (Filling 4) - #23
567
SpriteFrame(1, 12, 22, 12, 70, 131) // Chemicals (Filling 5) - #24
568
SpriteFrame(1, 10, 22, 14, 70, 131) // Chemicals (Filling 6) - #25
569
SpriteFrame(1, 8, 22, 16, 70, 131) // Chemicals (Filling 7) - #26
570
SpriteFrame(1, 6, 22, 18, 70, 131) // Chemicals (Filling 8) - #27
571
SpriteFrame(1, 4, 22, 20, 70, 131) // Chemicals (Filling 9) - #28
572
SpriteFrame(1, 2, 22, 22, 70, 131) // Chemicals (Filling 10) - #29
573
SpriteFrame(1, 0, 22, 24, 70, 131) // Chemicals (Filled) - #30
574
SpriteFrame(0, 0, 72, 24, 93, 131) // Chemical Dropper (Shorter) - #31
575
SpriteFrame(3, 3, 18, 29, 97, 189) // Chemical Drop 1 - #32
576
SpriteFrame(0, 0, 96, 24, 93, 131) // Chemical Dropper (Full) - #33
577
SpriteFrame(3, 3, 18, 29, 117, 189) // Chemical Drop 2 - #34
578
SpriteFrame(0, 0, 28, 24, 93, 131) // Chemical Dropper (Standalone) - #35
579
SpriteFrame(0, 2, 24, 4, 121, 141) // Dropper Debris - #36
580
SpriteFrame(-5, -68, 29, 12, 55, 74) // Dropper Machine Debris 1 - #37
581
SpriteFrame(8, -56, 24, 24, 68, 86) // Dropper Machine Debris 2 - #38
582
SpriteFrame(17, -32, 14, 16, 77, 110) // Dropper Machine Debris 3 - #39
583
584
// Below three are unused, but their mappings exist anyway
585
SpriteFrame(-15, -32, 22, 24, 81, 156) // Chemical Drops on eggman - #40
586
SpriteFrame(-15, -24, 30, 16, 104, 156) // Chemical Splashes on eggman - #41
587
SpriteFrame(-15, -23, 31, 15, 104, 173) // Chemical on eggman - #42
588
else
589
LoadSpriteSheet("MBZ/Objects.gif")
590
591
SpriteFrame(-5, -68, 37, 52, 34, 138) // Chemical Machine - #0
592
SpriteFrame(-4, -4, 8, 8, 38, 130) // Chemical Tube (Normal) - #1
593
SpriteFrame(-5, -4, 10, 8, 36, 121) // Chemical Tube (Wide) - #2
594
SpriteFrame(-6, -4, 12, 8, 34, 112) // Chemical Tube (Widest) - #3
595
SpriteFrame(-5, -60, 8, 3, 72, 138) // Chemical Droplet 1 - #4
596
SpriteFrame(-5, -60, 8, 5, 72, 142) // Chemical Droplet 2 - #5
597
SpriteFrame(-4, -60, 6, 8, 72, 148) // Chemical Droplet 3 - #6
598
SpriteFrame(-4, -60, 6, 13, 72, 157) // Chemical Droplet 4 - #7
599
SpriteFrame(-5, -60, 8, 14, 72, 171) // Chemical Droplet 5 - #8
600
SpriteFrame(-4, -50, 8, 8, 104, 155) // Chemical Droplet 6 - #9
601
SpriteFrame(-4, -46, 8, 8, 104, 155) // Chemical Droplet 7 - #10
602
SpriteFrame(-4, -4, 8, 8, 104, 155) // Chemical Droplet 8 - #11
603
SpriteFrame(0, 0, 48, 24, 70, 113) // Chemical Dropper - #12
604
SpriteFrame(1, 24, 22, 2, 81, 163) // Dropper Hatch (Closed) - #13
605
SpriteFrame(6, 24, 16, 6, 81, 166) // Dropper Hatch (Opening 1) - #14
606
SpriteFrame(11, 24, 16, 8, 81, 173) // Dropper Hatch (Opening 2) - #15
607
SpriteFrame(-2, 24, 14, 6, 81, 182) // Dropper Hatch (Opening 3) - #16
608
SpriteFrame(-4, 24, 15, 8, 113, 156) // Dropper Hatch (Opened) - #17
609
SpriteFrame(0, 0, 0, 0, 0, 0) // Dropper Hatch (Gone) - #18
610
SpriteFrame(1, 22, 22, 2, 47, 113) // Chemicals (Empty) - #19
611
SpriteFrame(1, 20, 22, 4, 47, 113) // Chemicals (Filling 1) - #20
612
SpriteFrame(1, 18, 22, 6, 47, 113) // Chemicals (Filling 2) - #21
613
SpriteFrame(1, 16, 22, 8, 47, 113) // Chemicals (Filling 3) - #22
614
SpriteFrame(1, 14, 22, 10, 47, 113) // Chemicals (Filling 4) - #23
615
SpriteFrame(1, 12, 22, 12, 47, 113) // Chemicals (Filling 5) - #24
616
SpriteFrame(1, 10, 22, 14, 47, 113) // Chemicals (Filling 6) - #25
617
SpriteFrame(1, 8, 22, 16, 47, 113) // Chemicals (Filling 7) - #26
618
SpriteFrame(1, 6, 22, 18, 47, 113) // Chemicals (Filling 8) - #27
619
SpriteFrame(1, 4, 22, 20, 47, 113) // Chemicals (Filling 9) - #28
620
SpriteFrame(1, 2, 22, 22, 47, 113) // Chemicals (Filling 10) - #29
621
SpriteFrame(1, 0, 22, 24, 47, 113) // Chemicals (Filled) - #30
622
SpriteFrame(0, 0, 72, 24, 70, 113) // Chemical Dropper (Shorter) - #31
623
SpriteFrame(3, 3, 18, 29, 1, 64) // Chemical Drop 1 - #32
624
SpriteFrame(0, 0, 96, 24, 70, 113) // Chemical Dropper (Full) - #33
625
SpriteFrame(3, 3, 18, 29, 21, 64) // Chemical Drop 2 - #34
626
SpriteFrame(0, 0, 28, 24, 70, 113) // Chemical Dropper (Standalone) - #35
627
SpriteFrame(0, 2, 24, 4, 98, 123) // Dropper Debris - #36
628
SpriteFrame(-5, -68, 29, 12, 34, 138) // Dropper Machine Debris 1 - #37
629
SpriteFrame(8, -56, 24, 24, 47, 150) // Dropper Machine Debris 2 - #38
630
SpriteFrame(17, -32, 14, 16, 56, 174) // Dropper Machine Debris 3 - #39
631
632
// Below three are unused, but their mappings exist anyway
633
SpriteFrame(-15, -32, 22, 24, 81, 138) // Chemical Drops on eggman - #40
634
SpriteFrame(-15, -24, 30, 16, 104, 138) // Chemical Splashes on eggman - #41
635
SpriteFrame(-15, -23, 31, 15, 135, 138) // Chemical on eggman - #42
636
end if
637
end event
638
639
640
// ========================
641
// Editor Events
642
// ========================
643
644
event RSDKDraw
645
DrawSprite(0)
646
end event
647
648
649
event RSDKLoad
650
CheckCurrentStageFolder("Zone02")
651
if checkResult == true
652
653
// I went ahead and labelled all these frames in accordance with the leftover S2 3.0 files thinking they haven't been labelled yet,
654
// but after scrolling up a bit i see that names already exist
655
// that means my own labelling isn't needed
656
// but i worked so hard on these :(
657
// TODO: solve dilemma
658
659
LoadSpriteSheet("CPZ/Objects.gif")
660
661
// 0 - Main Dropper Frame
662
SpriteFrame(-5, -68, 37, 52, 55, 74)
663
664
// 1-3 - Intake Tube Frames
665
SpriteFrame(-4, -4, 8, 8, 61, 147)
666
SpriteFrame(-5, -4, 10, 8, 59, 138)
667
SpriteFrame(-6, -4, 12, 8, 57, 129)
668
669
// 4-11 - Small Chemical Drop Frames
670
SpriteFrame(-5, -60, 8, 3, 93, 74)
671
SpriteFrame(-5, -60, 8, 5, 93, 78)
672
SpriteFrame(-4, -60, 6, 8, 93, 84)
673
SpriteFrame(-4, -60, 6, 13, 93, 93)
674
SpriteFrame(-5, -60, 8, 14, 93, 107)
675
SpriteFrame(-4, -50, 8, 8, 93, 122)
676
SpriteFrame(-4, -46, 8, 8, 93, 122)
677
SpriteFrame(-4, -4, 8, 8, 93, 122)
678
679
// 12 - Chemical Cup With Short Extending Arm Frame
680
SpriteFrame(0, 0, 48, 24, 93, 131)
681
682
// 13-17 - Chemical Cup Drop Door Frames
683
SpriteFrame(1, 24, 22, 2, 74, 189)
684
SpriteFrame(6, 24, 16, 6, 74, 192)
685
SpriteFrame(11, 24, 16, 8, 74, 199)
686
SpriteFrame(-2, 24, 14, 6, 74, 208)
687
SpriteFrame(-4, 24, 15, 8, 74, 215)
688
689
// 18 - Blank Frame
690
SpriteFrame(0, 0, 0, 0, 0, 0)
691
692
// 19-30 - Chemical Fill Inside Cup Frames
693
SpriteFrame(1, 22, 22, 2, 70, 131)
694
SpriteFrame(1, 20, 22, 4, 70, 131)
695
SpriteFrame(1, 18, 22, 6, 70, 131)
696
SpriteFrame(1, 16, 22, 8, 70, 131)
697
SpriteFrame(1, 14, 22, 10, 70, 131)
698
SpriteFrame(1, 12, 22, 12, 70, 131)
699
SpriteFrame(1, 10, 22, 14, 70, 131)
700
SpriteFrame(1, 8, 22, 16, 70, 131)
701
SpriteFrame(1, 6, 22, 18, 70, 131)
702
SpriteFrame(1, 4, 22, 20, 70, 131)
703
SpriteFrame(1, 2, 22, 22, 70, 131)
704
SpriteFrame(1, 0, 22, 24, 70, 131)
705
706
// 31 - Chemical Cup With Medium Extending Arm Frame
707
SpriteFrame(0, 0, 72, 24, 93, 131)
708
709
// 32 - Large Chemical Drop 1 Frame
710
SpriteFrame(3, 3, 18, 29, 97, 189)
711
712
// 33 - Chemical Cup With Large Extending Arm Frame
713
SpriteFrame(0, 0, 96, 24, 93, 131)
714
715
// 34 - Large Chemical Drop 2 Frame
716
SpriteFrame(3, 3, 18, 29, 117, 189)
717
718
// 35 - Separated Chemical Cup Frame
719
SpriteFrame(0, 0, 28, 24, 93, 131)
720
721
// 36 - Separated Extending Arm Frame
722
SpriteFrame(0, 2, 24, 4, 121, 141)
723
724
// 37 - Separated Chemical Dropper Nozzle Frame
725
SpriteFrame(-5, -68, 29, 12, 55, 74)
726
727
// 38 - Separated Chemical Pump Frame
728
SpriteFrame(8, -56, 24, 24, 68, 86)
729
730
// 39 - Separated Chemical Pump Base Frame
731
SpriteFrame(17, -32, 14, 16, 77, 110)
732
733
// 40-42 - Unused Eggman Splashed With Chemicals Frames
734
SpriteFrame(-15, -32, 22, 24, 81, 156)
735
SpriteFrame(-15, -24, 30, 16, 104, 156)
736
SpriteFrame(-15, -23, 31, 15, 104, 173)
737
else
738
LoadSpriteSheet("MBZ/Objects.gif")
739
740
SpriteFrame(-5, -68, 37, 52, 34, 138)
741
SpriteFrame(-4, -4, 8, 8, 38, 130)
742
SpriteFrame(-5, -4, 10, 8, 36, 121)
743
SpriteFrame(-6, -4, 12, 8, 34, 112)
744
SpriteFrame(-5, -60, 8, 3, 72, 138)
745
SpriteFrame(-5, -60, 8, 5, 72, 142)
746
SpriteFrame(-4, -60, 6, 8, 72, 148)
747
SpriteFrame(-4, -60, 6, 13, 72, 157)
748
SpriteFrame(-5, -60, 8, 14, 72, 171)
749
SpriteFrame(-4, -50, 8, 8, 104, 155)
750
SpriteFrame(-4, -46, 8, 8, 104, 155)
751
SpriteFrame(-4, -4, 8, 8, 104, 155)
752
SpriteFrame(0, 0, 48, 24, 70, 113)
753
SpriteFrame(1, 24, 22, 2, 81, 163)
754
SpriteFrame(6, 24, 16, 6, 81, 166)
755
SpriteFrame(11, 24, 16, 8, 81, 173)
756
SpriteFrame(-2, 24, 14, 6, 81, 182)
757
SpriteFrame(-4, 24, 15, 8, 113, 156)
758
SpriteFrame(0, 0, 0, 0, 0, 0)
759
SpriteFrame(1, 22, 22, 2, 47, 113)
760
SpriteFrame(1, 20, 22, 4, 47, 113)
761
SpriteFrame(1, 18, 22, 6, 47, 113)
762
SpriteFrame(1, 16, 22, 8, 47, 113)
763
SpriteFrame(1, 14, 22, 10, 47, 113)
764
SpriteFrame(1, 12, 22, 12, 47, 113)
765
SpriteFrame(1, 10, 22, 14, 47, 113)
766
SpriteFrame(1, 8, 22, 16, 47, 113)
767
SpriteFrame(1, 6, 22, 18, 47, 113)
768
SpriteFrame(1, 4, 22, 20, 47, 113)
769
SpriteFrame(1, 2, 22, 22, 47, 113)
770
SpriteFrame(1, 0, 22, 24, 47, 113)
771
SpriteFrame(0, 0, 72, 24, 70, 113)
772
SpriteFrame(3, 3, 18, 29, 1, 64)
773
SpriteFrame(0, 0, 96, 24, 70, 113)
774
SpriteFrame(3, 3, 18, 29, 21, 64)
775
SpriteFrame(0, 0, 28, 24, 70, 113)
776
SpriteFrame(0, 2, 24, 4, 98, 123)
777
SpriteFrame(-5, -68, 29, 12, 34, 138)
778
SpriteFrame(8, -56, 24, 24, 47, 150)
779
SpriteFrame(17, -32, 14, 16, 56, 174)
780
781
SpriteFrame(-15, -32, 22, 24, 81, 138)
782
SpriteFrame(-15, -24, 30, 16, 104, 138)
783
SpriteFrame(-15, -23, 31, 15, 135, 138)
784
end if
785
end event
786
787