Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/Menu/MenuButton.txt
1319 views
1
//----------------Sonic CD Menu Button Script-----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.Timer
7
#alias Object.Value1 : Object.ButtonXOffSet
8
#alias Object.Value2 : Object.ButtonYOffSet
9
#alias Object.Value3 : Object.ButtonLeaveXPos
10
#alias Object.Value4 : Object.ButtonLeaveYPos
11
#alias Object.Value5 : Object.ButtonYPos
12
13
// Object[1] is a blank object just to share values
14
#alias Object[1].Value1 : Object.RecenterValue
15
#alias Object[1].Value2 : Object.ButtonCount
16
#alias Object[1].Value3 : Object.DragLimit
17
18
// MenuHeading Aliases
19
#alias Object[33].State : MenuHeading.State
20
#alias Object[33].PropertyValue : MenuHeading.Header
21
22
// Object[-1] and [+1] are MenuButton's
23
#alias Object[-1].State : PrevMenuButton.State
24
#alias Object[+1].State : NextMenuButton.State
25
26
// MenuControl Aliases
27
#alias Object[0].State : MenuControl.State
28
#alias Object[0].Value0 : MenuControl.Fade
29
#alias Object[0].Value1 : MenuControl.ButtonYOffset
30
#alias Object[0].Value2 : MenuControl.CurrentDrag
31
#alias Object[0].Value3 : MenuControl.CurrentSelection
32
#alias Object[0].Value7 : MenuControl.SmoothDrag
33
34
// MenuWindow Aliases
35
#alias Object[61].State : MenuWindow.State
36
#alias Object[61].XPos : MenuWindow.XPos
37
#alias Object[61].YPos : MenuWindow.YPos
38
#alias Object[61].Value1 : MenuWindow.BaseWidth
39
#alias Object[61].Value2 : MenuWindow.BaseHeight
40
#alias Object[61].Value3 : MenuWindow.BaseXOffset
41
#alias Object[61].Value4 : MenuWindow.BaseYOffset
42
#alias Object[61].Value5 : MenuWindow.EntityPos
43
44
// Object[62] is whatever next menu is this object going to be set into
45
#alias Object[62].InkEffect : Object.NextMenuInkEffect
46
#alias Object[62].Alpha : Object.NextMenuAlpha
47
48
// States
49
#alias 0 : MENUBUTTON_DELAY
50
#alias 1 : MENUBUTTON_BUTTONS_IN
51
#alias 2 : MENUBUTTON_CONFIRM_SELECTION
52
#alias 3 : MENUBUTTON_MENU_SELECTED
53
#alias 4 : MENUBUTTON_BUTTONS_OUT
54
#alias 5 : MENUBUTTON_BLANK
55
#alias 6 : MENUBUTTON_BLANK2
56
#alias 7 : MENUBUTTON_RESET
57
58
// Menu Control States
59
#alias 2 : MENUCONTROL_CONTROLS
60
#alias 3 : MENUCONTROL_BLANK
61
#alias 4 : MENUCONTROL_ENTER_TIMEATTACK
62
#alias 5 : MENUCONTROL_ENTER_DEMO
63
#alias 7 : MENUCONTROL_ENTER_TROPHIES
64
#alias 8 : MENUCONTROL_ENTER_LEADERBOARDS
65
66
// Menu Window States
67
#alias 5 : MENUWINDOW_SOUNDTRACK_EXPAND
68
69
// Menu Heading States
70
#alias 0 : MENUHEADING_IDLE
71
#alias 1 : MENUHEADING_LEAVE_SCREEN
72
#alias 2 : MENUHEADING_ENTER_SCREEN
73
74
// Menu Heading Property Values
75
#alias 5 : MAINMENU_HEADER
76
#alias 6 : SAVESELECT_HEADER
77
#alias 7 : HELP&OPTIONS_HEADER
78
#alias 8 : EXTRAS_HEADER
79
#alias 9 : SOUNDTRACK_HEADER
80
#alias 10 : STAGESELECT_HEADER
81
82
// Menus
83
#alias 1 : Menu_LoadSaveMenu
84
#alias 2 : Menu_TimeAttack
85
#alias 3 : Menu_Achievements
86
#alias 4 : Menu_LeaderBoards
87
#alias 5 : Menu_Help&Options
88
#alias 6 : Menu_Extras
89
#alias 7 : Menu_UnlockFullGame
90
#alias 8 : Menu_Store
91
#alias 9 : Menu_Exit
92
#alias 10 : Menu_Soundtrack
93
#alias 11 : Menu_MoreGames
94
95
// Ink Effects
96
#alias 2 : INK_ALPHA
97
98
// Priority
99
#alias 1 : PRIORITY_ACTIVE
100
101
// Game Mode Aliases
102
#alias 0 : MODE_NOSAVE
103
104
// Languages
105
#alias 0 : LANG_ENGLISH
106
#alias 1 : LANG_FRENCH
107
#alias 2 : LANG_ITALIAN
108
#alias 3 : LANG_DEUTSCH
109
#alias 4 : LANG_SPANISH
110
#alias 5 : LANG_JAPANESE
111
112
// Global SFX
113
#alias 27 : SFX_G_SELECT
114
115
// Engine & Callbacks
116
#alias 3 : ENGINE_EXITGAME
117
#alias 5 : CALLBACK_RETURNSTORE_SELECTED
118
#alias 7 : CALLBACK_EXIT_SELECTED
119
#alias 8 : CALLBACK_BUY_FULL_GAME_SELECTED
120
#alias 14 : CALLBACK_FULL_VERSION_ONLY
121
#alias 16 : CALLBACK_MOREGAMES
122
123
// Online Menus
124
#alias 0 : ONLINEMENU_ACHIEVEMENTS
125
#alias 1 : ONLINEMENU_LEADERBOARDS
126
127
// game.mainMenuMode Aliases
128
#alias 0 : MAINMENUMODE_NONE // Starts with this, but gets swapped on MenuButton
129
130
131
// Function declarations
132
#function MenuButton_SetupMenuWindow
133
134
function MenuButton_SetupMenuWindow
135
ResetObjectEntity(61, TypeName[Menu Window], 0, Object.XPos, Object.YPos)
136
MenuWindow.XPos += 0x480000
137
MenuWindow.BaseWidth = 144
138
MenuWindow.BaseHeight = 21
139
MenuWindow.BaseXOffset = MenuWindow.XPos
140
MenuWindow.BaseYOffset = MenuWindow.YPos
141
MenuWindow.EntityPos = Object.EntityNo
142
end function
143
144
145
sub ObjectMain
146
Object.ButtonYOffSet = Object.ButtonYPos
147
Object.ButtonYOffSet--
148
Object.ButtonYOffSet *= 60
149
Object.ButtonYOffSet += MenuControl.ButtonYOffset
150
151
TempValue0 = Screen.CenterX
152
TempValue0 -= 160
153
154
Object.ButtonXOffSet = Object.ButtonYOffSet
155
Object.ButtonXOffSet *= 54
156
Object.ButtonXOffSet /= 60
157
Object.ButtonXOffSet -= 16
158
Object.ButtonXOffSet += TempValue0
159
160
switch Object.State
161
case MENUBUTTON_DELAY
162
if Object.Timer < 60
163
Object.Timer++
164
else
165
Object.Timer = 0
166
Object.State++
167
end if
168
break
169
170
case MENUBUTTON_BUTTONS_IN
171
TempValue0 = Object.ButtonXOffSet
172
TempValue0 <<= 16
173
TempValue0 -= Object.XPos
174
TempValue0 >>= 4
175
Object.XPos += TempValue0
176
177
TempValue0 = Object.ButtonYOffSet
178
TempValue0 <<= 16
179
TempValue0 -= Object.YPos
180
TempValue0 >>= 4
181
Object.YPos += TempValue0
182
183
if Object.Timer < 80
184
Object.Timer++
185
else
186
Object.Timer = 0
187
Object.State++
188
end if
189
break
190
191
case MENUBUTTON_CONFIRM_SELECTION
192
Object.XPos = Object.ButtonXOffSet
193
Object.XPos <<= 16
194
195
Object.YPos = Object.ButtonYOffSet
196
Object.YPos <<= 16
197
198
// Originally if Options.PhysicalControls == false
199
// Adapted the code to ensure compatibility with Blit Data files
200
#platform: Standard
201
CheckResult = false
202
#endplatform
203
204
#platform: Mobile
205
CheckEqual(Options.PhysicalControls, false)
206
#endplatform
207
208
#platform: Use_Origins
209
CheckEqual(Options.PhysicalControls, false)
210
#endplatform
211
212
if CheckResult == true
213
TempValue0 = Object.ButtonXOffSet
214
TempValue0 -= 16
215
TempValue1 = Object.ButtonXOffSet
216
TempValue1 += 176
217
TempValue2 = Object.ButtonYOffSet
218
TempValue2 -= 20
219
TempValue3 = Object.ButtonYOffSet
220
TempValue3 += 20
221
CheckTouchRect(TempValue0, TempValue2, TempValue1, TempValue3)
222
if CheckResult > -1
223
TempValue0 = MenuControl.SmoothDrag
224
TempValue0 >>= 2
225
if TempValue0 == 0
226
if Object.RecenterValue == 0
227
MenuControl.CurrentDrag = Object.ButtonYPos
228
end if
229
end if
230
else
231
CheckTouchRect(0, 0, Screen.XSize, Screen.YSize)
232
if CheckResult < 0
233
if MenuControl.CurrentDrag == Object.ButtonYPos
234
if Object.RecenterValue == 0
235
PlaySfx(SFX_G_SELECT, false)
236
MenuControl.State = MENUCONTROL_BLANK
237
switch Object.PropertyValue
238
case Menu_LoadSaveMenu
239
case Menu_Help&Options
240
case Menu_Extras
241
case Menu_Soundtrack //All of this is MenuButton
242
Object[34].State = MENUBUTTON_BUTTONS_OUT
243
Object[34].Timer = 0
244
Object[35].State = MENUBUTTON_BUTTONS_OUT
245
Object[35].Timer = 0
246
Object[36].State = MENUBUTTON_BUTTONS_OUT
247
Object[36].Timer = 0
248
Object[37].State = MENUBUTTON_BUTTONS_OUT
249
Object[37].Timer = 0
250
Object[38].State = MENUBUTTON_BUTTONS_OUT
251
Object[38].Timer = 0
252
Object[39].State = MENUBUTTON_BUTTONS_OUT
253
Object[39].Timer = 0
254
Object[40].State = MENUBUTTON_BUTTONS_OUT
255
Object[40].Timer = 0
256
Object[41].State = MENUBUTTON_BUTTONS_OUT
257
Object[41].Timer = 0
258
Object[42].State = MENUBUTTON_BUTTONS_OUT
259
Object[42].Timer = 0
260
Object[43].State = MENUBUTTON_BUTTONS_OUT
261
Object[43].Timer = 0
262
break
263
264
case Menu_TimeAttack
265
if Engine.TrialMode == false
266
StopMusic()
267
Object[34].State = MENUBUTTON_BUTTONS_OUT
268
Object[34].Timer = 0
269
Object[35].State = MENUBUTTON_BUTTONS_OUT
270
Object[35].Timer = 0
271
Object[36].State = MENUBUTTON_BUTTONS_OUT
272
Object[36].Timer = 0
273
Object[37].State = MENUBUTTON_BUTTONS_OUT
274
Object[37].Timer = 0
275
Object[38].State = MENUBUTTON_BUTTONS_OUT
276
Object[38].Timer = 0
277
Object[39].State = MENUBUTTON_BUTTONS_OUT
278
Object[39].Timer = 0
279
Object[40].State = MENUBUTTON_BUTTONS_OUT
280
Object[40].Timer = 0
281
Object[41].State = MENUBUTTON_BUTTONS_OUT
282
Object[41].Timer = 0
283
Object[42].State = MENUBUTTON_BUTTONS_OUT
284
Object[42].Timer = 0
285
Object[43].State = MENUBUTTON_BUTTONS_OUT
286
Object[43].Timer = 0
287
end if
288
break
289
290
end switch
291
Object.State = MENUBUTTON_MENU_SELECTED
292
end if
293
end if
294
else
295
if MenuControl.CurrentDrag == Object.ButtonYPos
296
MenuControl.CurrentDrag = 0
297
end if
298
end if
299
end if
300
else
301
if Object.ButtonYPos == MenuControl.CurrentSelection
302
CheckResult = false
303
if KeyPress[0].Start == true
304
CheckResult = true
305
end if
306
307
if KeyPress[0].ButtonA == true
308
CheckResult = true
309
end if
310
311
if Object.PropertyValue == Menu_Achievements
312
if Engine.OnlineActive == false
313
CheckResult = false
314
end if
315
end if
316
317
if CheckResult == true
318
PlaySfx(SFX_G_SELECT, false)
319
if Engine.TrialMode == true
320
if Engine.PlatformID != RETRO_ANDROID
321
if Object.PropertyValue == Menu_LoadSaveMenu
322
StopMusic()
323
end if
324
end if
325
else
326
if Object.PropertyValue == Menu_TimeAttack
327
StopMusic()
328
end if
329
end if
330
331
MenuControl.State = MENUCONTROL_BLANK
332
switch Object.PropertyValue
333
case Menu_LoadSaveMenu
334
case Menu_Help&Options
335
case Menu_Extras
336
case Menu_Soundtrack
337
Object[34].State = MENUBUTTON_BUTTONS_OUT
338
Object[34].Timer = 0
339
Object[35].State = MENUBUTTON_BUTTONS_OUT
340
Object[35].Timer = 0
341
Object[36].State = MENUBUTTON_BUTTONS_OUT
342
Object[36].Timer = 0
343
Object[37].State = MENUBUTTON_BUTTONS_OUT
344
Object[37].Timer = 0
345
Object[38].State = MENUBUTTON_BUTTONS_OUT
346
Object[38].Timer = 0
347
Object[39].State = MENUBUTTON_BUTTONS_OUT
348
Object[39].Timer = 0
349
Object[40].State = MENUBUTTON_BUTTONS_OUT
350
Object[40].Timer = 0
351
Object[41].State = MENUBUTTON_BUTTONS_OUT
352
Object[41].Timer = 0
353
Object[42].State = MENUBUTTON_BUTTONS_OUT
354
Object[42].Timer = 0
355
Object[43].State = MENUBUTTON_BUTTONS_OUT
356
Object[43].Timer = 0
357
break
358
359
case Menu_TimeAttack
360
if Engine.TrialMode == false
361
Object[34].State = MENUBUTTON_BUTTONS_OUT
362
Object[34].Timer = 0
363
Object[35].State = MENUBUTTON_BUTTONS_OUT
364
Object[35].Timer = 0
365
Object[36].State = MENUBUTTON_BUTTONS_OUT
366
Object[36].Timer = 0
367
Object[37].State = MENUBUTTON_BUTTONS_OUT
368
Object[37].Timer = 0
369
Object[38].State = MENUBUTTON_BUTTONS_OUT
370
Object[38].Timer = 0
371
Object[39].State = MENUBUTTON_BUTTONS_OUT
372
Object[39].Timer = 0
373
Object[40].State = MENUBUTTON_BUTTONS_OUT
374
Object[40].Timer = 0
375
Object[41].State = MENUBUTTON_BUTTONS_OUT
376
Object[41].Timer = 0
377
Object[42].State = MENUBUTTON_BUTTONS_OUT
378
Object[42].Timer = 0
379
Object[43].State = MENUBUTTON_BUTTONS_OUT
380
Object[43].Timer = 0
381
end if
382
break
383
384
end switch
385
Object.State = MENUBUTTON_MENU_SELECTED
386
end if
387
end if
388
end if
389
390
if Engine.PlatformID == RETRO_WP7
391
if KeyPress[0].ButtonB == true
392
EngineCallback(CALLBACK_EXIT_SELECTED)
393
Object.State = MENUBUTTON_CONFIRM_SELECTION
394
395
MenuControl.State = MENUCONTROL_CONTROLS
396
MenuControl.CurrentDrag = 0
397
end if
398
end if
399
break
400
401
case MENUBUTTON_MENU_SELECTED
402
if Object.Timer < 30
403
Object.Timer++
404
else
405
Object.Timer = 0
406
switch Object.PropertyValue
407
case Menu_LoadSaveMenu
408
if Engine.TrialMode == false
409
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
410
MenuHeading.Header = SAVESELECT_HEADER
411
412
CallFunction(MenuButton_SetupMenuWindow)
413
ResetObjectEntity(62, TypeName[Load Save Menu], 0, 0, 0)
414
415
Object.NextMenuInkEffect = INK_ALPHA
416
Object.NextMenuAlpha = 0
417
418
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
419
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
420
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
421
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
422
Object.Type = TypeName[Blank Object]
423
ReadSaveRAM()
424
else
425
#platform: Standard
426
Object.State = MENUBUTTON_BLANK
427
MenuControl.State = MENUCONTROL_ENTER_DEMO
428
MenuControl.Fade = 0
429
430
Options.GameMode = MODE_NOSAVE
431
Player.Score = 0
432
Player.Lives = 3
433
Player.ScoreBonus = 50000
434
Transporter_Destroyed = false
435
MetalSonic_Destroyed = false
436
Good_Future = false
437
#endplatform
438
439
#platform: Mobile
440
441
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
442
MenuHeading.Header = STAGESELECT_HEADER
443
444
CallFunction(MenuButton_SetupMenuWindow)
445
MenuWindow.State = MENUWINDOW_SOUNDTRACK_EXPAND
446
ResetObjectEntity(62, TypeName[Demo Menu], 0, 0, 0)
447
448
Object.NextMenuInkEffect = INK_ALPHA
449
Object.NextMenuAlpha = 0
450
451
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
452
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
453
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
454
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
455
Object.Type = TypeName[Blank Object]
456
ReadSaveRAM()
457
#endplatform
458
end if
459
break
460
461
case Menu_TimeAttack
462
if Engine.TrialMode == false
463
Object.State = MENUBUTTON_BLANK
464
465
MenuControl.State = MENUCONTROL_ENTER_TIMEATTACK
466
MenuControl.Fade = 0
467
else
468
Object.State = MENUBUTTON_CONFIRM_SELECTION
469
470
MenuControl.State = MENUCONTROL_CONTROLS
471
EngineCallback(CALLBACK_FULL_VERSION_ONLY)
472
#platform: Mobile
473
MenuControl.CurrentDrag = 0
474
#endplatform
475
end if
476
break
477
478
case Menu_Achievements
479
if Engine.PlatformID != RETRO_WP7
480
LoadOnlineMenu(ONLINEMENU_ACHIEVEMENTS)
481
Object.State = MENUBUTTON_CONFIRM_SELECTION
482
483
MenuControl.State = MENUCONTROL_CONTROLS
484
#platform: Mobile
485
MenuControl.CurrentDrag = 0
486
#endplatform
487
else
488
Object.State = MENUBUTTON_BLANK
489
490
MenuControl.State = MENUCONTROL_ENTER_TROPHIES
491
MenuControl.Fade = 0
492
end if
493
break
494
495
case Menu_LeaderBoards
496
if Engine.PlatformID!=RETRO_WP7
497
LoadOnlineMenu(ONLINEMENU_LEADERBOARDS)
498
Object.State = MENUBUTTON_CONFIRM_SELECTION
499
500
MenuControl.State = MENUCONTROL_CONTROLS
501
#platform: Mobile
502
MenuControl.CurrentDrag = 0
503
#endplatform
504
else
505
if Engine.TrialMode == false
506
Object.State = MENUBUTTON_BLANK
507
508
MenuControl.State = MENUCONTROL_ENTER_LEADERBOARDS
509
MenuControl.Fade = 0
510
else
511
Object.State = MENUBUTTON_CONFIRM_SELECTION
512
513
MenuControl.State = MENUCONTROL_CONTROLS
514
EngineCallback(CALLBACK_FULL_VERSION_ONLY)
515
end if
516
end if
517
break
518
519
case Menu_Help&Options
520
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
521
MenuHeading.Header = HELP&OPTIONS_HEADER
522
523
CallFunction(MenuButton_SetupMenuWindow)
524
#platform: Use_Standalone
525
#platform: Standard
526
ResetObjectEntity(62, TypeName[Options Menu C], 0, 0, 0)
527
#endplatform
528
529
#platform: Mobile
530
if Options.HapticsMenu == true
531
ResetObjectEntity(62, TypeName[Options Menu H], 0, 0, 0)
532
else
533
ResetObjectEntity(62, TypeName[Options Menu], 0, 0, 0)
534
end if
535
#endplatform
536
#endplatform
537
538
#platform: Use_Origins
539
if Options.DevMenuFlag == true
540
ResetObjectEntity(62, TypeName[Options Menu H], 0, 0, 0)
541
else
542
ResetObjectEntity(62, TypeName[Options Menu], 0, 0, 0)
543
end if
544
#endplatform
545
546
Object.NextMenuInkEffect = INK_ALPHA
547
Object.NextMenuAlpha = 0
548
549
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
550
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
551
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
552
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
553
Object.Type = TypeName[Blank Object]
554
break
555
556
case Menu_Extras
557
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
558
MenuHeading.Header = EXTRAS_HEADER
559
560
CallFunction(MenuButton_SetupMenuWindow)
561
ResetObjectEntity(62, TypeName[Extras Menu], 0, 0, 0)
562
563
Object.NextMenuInkEffect = INK_ALPHA
564
Object.NextMenuAlpha = 0
565
566
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
567
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
568
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
569
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
570
Object.Type = TypeName[Blank Object]
571
break
572
573
case Menu_UnlockFullGame
574
EngineCallback(CALLBACK_BUY_FULL_GAME_SELECTED)
575
Object.State = MENUBUTTON_CONFIRM_SELECTION
576
577
MenuControl.State = MENUCONTROL_CONTROLS
578
#platform: Mobile
579
MenuControl.CurrentDrag = 0
580
#endplatform
581
break
582
583
case Menu_Store
584
EngineCallback(CALLBACK_RETURNSTORE_SELECTED)
585
Object.State = MENUBUTTON_CONFIRM_SELECTION
586
587
MenuControl.State = MENUCONTROL_CONTROLS
588
#platform: Mobile
589
MenuControl.CurrentDrag = 0
590
#endplatform
591
break
592
593
case Menu_Exit
594
EngineCallback(CALLBACK_EXIT_SELECTED)
595
#platform: Use_Decomp
596
Engine.State = ENGINE_EXITGAME
597
#endplatform
598
Object.State = MENUBUTTON_CONFIRM_SELECTION
599
600
MenuControl.State = MENUCONTROL_CONTROLS
601
#platform: Mobile
602
MenuControl.CurrentDrag = 0
603
#endplatform
604
break
605
606
case Menu_Soundtrack
607
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
608
MenuHeading.Header = SOUNDTRACK_HEADER
609
610
CallFunction(MenuButton_SetupMenuWindow)
611
MenuWindow.State = MENUWINDOW_SOUNDTRACK_EXPAND
612
ResetObjectEntity(62, TypeName[Soundtrack Menu], 0, 0, 0)
613
614
Object.NextMenuInkEffect = INK_ALPHA
615
Object.NextMenuAlpha = 0
616
617
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
618
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
619
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
620
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
621
Object.Type = TypeName[Blank Object]
622
break
623
624
#platform: Mobile
625
case Menu_MoreGames
626
EngineCallback(CALLBACK_MOREGAMES)
627
Object.State = MENUBUTTON_CONFIRM_SELECTION
628
629
MenuControl.State = MENUCONTROL_CONTROLS
630
MenuControl.CurrentDrag = 0
631
break
632
#endplatform
633
end switch
634
end if
635
break
636
637
case MENUBUTTON_BUTTONS_OUT
638
TempValue0 = Object.ButtonLeaveXPos
639
TempValue0 -= Object.XPos
640
TempValue0 >>= 4
641
Object.XPos += TempValue0
642
643
TempValue0 = Object.ButtonLeaveYPos
644
TempValue0 -= Object.YPos
645
TempValue0 >>= 4
646
Object.YPos += TempValue0
647
648
if Object.Timer < 80
649
Object.Timer++
650
else
651
Object.Timer = 0
652
Object.State = MENUBUTTON_BLANK2
653
end if
654
break
655
656
case MENUBUTTON_BLANK
657
case MENUBUTTON_BLANK2
658
//Nothing happens here
659
break
660
661
case MENUBUTTON_RESET //Used by MenuWindow
662
if Object.PropertyValue == Menu_Extras
663
if PrevMenuButton.State == MENUBUTTON_CONFIRM_SELECTION
664
Object.State = MENUBUTTON_CONFIRM_SELECTION
665
666
MenuControl.State = MENUCONTROL_CONTROLS
667
#platform: Mobile
668
MenuControl.CurrentDrag = 0
669
#endplatform
670
end if
671
else
672
if NextMenuButton.State == MENUBUTTON_CONFIRM_SELECTION
673
Object.State = MENUBUTTON_CONFIRM_SELECTION
674
675
MenuControl.State = MENUCONTROL_CONTROLS
676
#platform: Mobile
677
MenuControl.CurrentDrag = 0
678
#endplatform
679
end if
680
end if
681
break
682
683
end switch
684
end sub
685
686
687
688
sub ObjectDraw
689
DrawSprite(0)
690
switch Object.State
691
case MENUBUTTON_DELAY
692
case MENUBUTTON_BUTTONS_IN
693
case MENUBUTTON_CONFIRM_SELECTION
694
case MENUBUTTON_BUTTONS_OUT
695
case MENUBUTTON_BLANK
696
case MENUBUTTON_RESET
697
if Object.ButtonYPos == MenuControl.CurrentSelection
698
TempValue0 = Object.PropertyValue
699
TempValue0 += 11
700
DrawSprite(TempValue0)
701
else
702
DrawSprite(Object.PropertyValue)
703
end if
704
break
705
706
case MENUBUTTON_MENU_SELECTED
707
TempValue0 = Object.Timer
708
TempValue0 &= 3
709
TempValue0 >>= 1
710
if TempValue0 == 0
711
TempValue0 = Object.PropertyValue
712
TempValue0 += 11
713
714
DrawSprite(TempValue0)
715
end if
716
break
717
718
end switch
719
end sub
720
721
722
sub ObjectStartup
723
switch Engine.Language
724
case LANG_ENGLISH
725
LoadSpriteSheet("Menu/MenuGfx2_EN.gif")
726
break
727
case LANG_FRENCH
728
LoadSpriteSheet("Menu/MenuGfx2_FR.gif")
729
break
730
case LANG_ITALIAN
731
LoadSpriteSheet("Menu/MenuGfx2_IT.gif")
732
break
733
case LANG_DEUTSCH
734
LoadSpriteSheet("Menu/MenuGfx2_DE.gif")
735
break
736
case LANG_SPANISH
737
LoadSpriteSheet("Menu/MenuGfx2_ES.gif")
738
break
739
case LANG_JAPANESE
740
LoadSpriteSheet("Menu/MenuGfx2_JP.gif")
741
break
742
end switch
743
744
Object.ButtonCount = 1
745
ArrayPos0 = 32
746
while ArrayPos0 < 1056
747
if Object[ArrayPos0].Type == TypeName[Menu Button]
748
Object[ArrayPos0].Priority = PRIORITY_ACTIVE
749
Object[ArrayPos0].ButtonLeaveXPos = Object[ArrayPos0].XPos
750
Object[ArrayPos0].ButtonLeaveYPos = Object[ArrayPos0].ButtonLeaveYPos
751
end if
752
ArrayPos0++
753
loop
754
755
switch Engine.PlatformID
756
case RETRO_WIN
757
case RETRO_OSX
758
if Options.DevMenuFlag == true
759
Object[34].PropertyValue = Menu_LoadSaveMenu
760
Object[35].PropertyValue = Menu_TimeAttack
761
Object[36].PropertyValue = Menu_Help&Options
762
Object[37].PropertyValue = Menu_Soundtrack
763
Object[38].PropertyValue = Menu_Extras
764
Object[39].PropertyValue = Menu_Exit
765
Object.ButtonCount = 6
766
else
767
if Engine.TrialMode == true
768
Object[34].PropertyValue = Menu_LoadSaveMenu
769
Object[35].PropertyValue = Menu_TimeAttack
770
Object[36].PropertyValue = Menu_Achievements
771
Object[37].PropertyValue = Menu_LeaderBoards
772
Object[38].PropertyValue = Menu_Help&Options
773
Object[39].PropertyValue = Menu_Soundtrack
774
Object[40].PropertyValue = Menu_UnlockFullGame
775
Object[41].PropertyValue = Menu_Exit
776
Object.ButtonCount = 8
777
else
778
Object[34].PropertyValue = Menu_LoadSaveMenu
779
Object[35].PropertyValue = Menu_TimeAttack
780
Object[36].PropertyValue = Menu_Achievements
781
Object[37].PropertyValue = Menu_LeaderBoards
782
Object[38].PropertyValue = Menu_Help&Options
783
Object[39].PropertyValue = Menu_Soundtrack
784
Object[40].PropertyValue = Menu_Extras
785
Object[41].PropertyValue = Menu_Exit
786
Object.ButtonCount = 8
787
end if
788
end if
789
break
790
791
case RETRO_XBOX_360
792
if Engine.TrialMode == true
793
Object[34].PropertyValue = Menu_LoadSaveMenu
794
Object[35].PropertyValue = Menu_TimeAttack
795
Object[36].PropertyValue = Menu_Achievements
796
Object[37].PropertyValue = Menu_LeaderBoards
797
Object[38].PropertyValue = Menu_Help&Options
798
Object[39].PropertyValue = Menu_Soundtrack
799
Object[40].PropertyValue = Menu_UnlockFullGame
800
Object[41].PropertyValue = Menu_Exit
801
Object.ButtonCount = 8
802
else
803
Object[34].PropertyValue = Menu_LoadSaveMenu
804
Object[35].PropertyValue = Menu_TimeAttack
805
Object[36].PropertyValue = Menu_Achievements
806
Object[37].PropertyValue = Menu_LeaderBoards
807
Object[38].PropertyValue = Menu_Help&Options
808
Object[39].PropertyValue = Menu_Soundtrack
809
Object[40].PropertyValue = Menu_Extras
810
Object[41].PropertyValue = Menu_Exit
811
Object.ButtonCount = 8
812
end if
813
break
814
815
case RETRO_PS3
816
if Engine.TrialMode == true
817
Object[34].PropertyValue = Menu_LoadSaveMenu
818
Object[35].PropertyValue = Menu_TimeAttack
819
Object[36].PropertyValue = Menu_Achievements
820
Object[37].PropertyValue = Menu_LeaderBoards
821
Object[38].PropertyValue = Menu_Help&Options
822
Object[39].PropertyValue = Menu_Soundtrack
823
Object[40].PropertyValue = Menu_UnlockFullGame
824
Object.ButtonCount = 7
825
else
826
Object[34].PropertyValue = Menu_LoadSaveMenu
827
Object[35].PropertyValue = Menu_TimeAttack
828
Object[36].PropertyValue = Menu_Achievements
829
Object[37].PropertyValue = Menu_LeaderBoards
830
Object[38].PropertyValue = Menu_Help&Options
831
Object[39].PropertyValue = Menu_Soundtrack
832
Object[40].PropertyValue = Menu_Extras
833
Object.ButtonCount = 7
834
end if
835
break
836
837
case RETRO_ANDROID
838
if Engine.TrialMode == true
839
Object[34].PropertyValue = Menu_LoadSaveMenu
840
Object[35].PropertyValue = Menu_Help&Options
841
Object[36].PropertyValue = Menu_Soundtrack
842
Object[37].PropertyValue = Menu_UnlockFullGame
843
Object[38].PropertyValue = Menu_Exit
844
Object.ButtonCount = 5
845
else
846
if Engine.OnlineActive == true
847
Object[34].PropertyValue = Menu_LoadSaveMenu
848
Object[35].PropertyValue = Menu_TimeAttack
849
Object[36].PropertyValue = Menu_LeaderBoards
850
Object[37].PropertyValue = Menu_Achievements
851
Object[38].PropertyValue = Menu_Help&Options
852
Object[39].PropertyValue = Menu_Soundtrack
853
Object[40].PropertyValue = Menu_Extras
854
Object[41].PropertyValue = Menu_Exit
855
Object.ButtonCount = 8
856
else
857
Object[34].PropertyValue = Menu_LoadSaveMenu
858
Object[35].PropertyValue = Menu_TimeAttack
859
Object[36].PropertyValue = Menu_Help&Options
860
Object[37].PropertyValue = Menu_MoreGames
861
Object[38].PropertyValue = Menu_Soundtrack
862
Object[39].PropertyValue = Menu_Extras
863
Object[40].PropertyValue = Menu_Exit
864
Object.ButtonCount = 7
865
Object[37].PropertyValue = Menu_Soundtrack
866
Object[38].PropertyValue = Menu_Extras
867
Object[39].PropertyValue = Menu_Exit
868
Object.ButtonCount = 6
869
end if
870
end if
871
break
872
873
case RETRO_iOS
874
if Engine.OnlineActive == true
875
Object[34].PropertyValue = Menu_LoadSaveMenu
876
Object[35].PropertyValue = Menu_TimeAttack
877
Object[36].PropertyValue = Menu_LeaderBoards
878
Object[37].PropertyValue = Menu_Help&Options
879
Object[38].PropertyValue = Menu_Soundtrack
880
Object[39].PropertyValue = Menu_Extras
881
Object.ButtonCount = 6
882
else
883
Object[34].PropertyValue = Menu_LoadSaveMenu
884
Object[35].PropertyValue = Menu_TimeAttack
885
Object[36].PropertyValue = Menu_Help&Options
886
Object[37].PropertyValue = Menu_Soundtrack
887
Object[38].PropertyValue = Menu_Extras
888
Object.ButtonCount = 5
889
end if
890
break
891
892
case RETRO_WP7
893
if Engine.TrialMode == true
894
Object[34].PropertyValue = Menu_LoadSaveMenu
895
Object[35].PropertyValue = Menu_Help&Options
896
Object[36].PropertyValue = Menu_Soundtrack
897
Object[37].PropertyValue = Menu_MoreGames
898
Object[38].PropertyValue = Menu_Exit
899
Object.ButtonCount = 5
900
else
901
if Engine.OnlineActive == true
902
Object[34].PropertyValue = Menu_LoadSaveMenu
903
Object[35].PropertyValue = Menu_TimeAttack
904
Object[36].PropertyValue = Menu_LeaderBoards
905
Object[37].PropertyValue = Menu_Achievements
906
Object[38].PropertyValue = Menu_Help&Options
907
Object[39].PropertyValue = Menu_Soundtrack
908
Object[40].PropertyValue = Menu_Extras
909
Object[41].PropertyValue = Menu_Exit
910
Object.ButtonCount = 8
911
else
912
Object[34].PropertyValue = Menu_LoadSaveMenu
913
Object[35].PropertyValue = Menu_TimeAttack
914
Object[36].PropertyValue = Menu_Help&Options
915
Object[37].PropertyValue = Menu_MoreGames
916
Object[38].PropertyValue = Menu_Soundtrack
917
Object[39].PropertyValue = Menu_Extras
918
Object[40].PropertyValue = Menu_Exit
919
Object.ButtonCount = 7
920
end if
921
end if
922
break
923
924
end switch
925
926
ArrayPos0 = 34
927
TempValue0 = 0
928
while TempValue0 < Object.ButtonCount
929
Object[ArrayPos0].ButtonYPos = TempValue0
930
Object[ArrayPos0].ButtonYPos++
931
ArrayPos0++
932
TempValue0++
933
loop
934
935
while TempValue0 < 9
936
Object[ArrayPos0].Type = TypeName[Blank Object]
937
ArrayPos0++
938
TempValue0++
939
loop
940
941
Object.DragLimit = Object.ButtonCount
942
Object.DragLimit *= -30
943
Object.DragLimit <<= 8
944
SpriteFrame(0, -10, 144, 21, 259, 71) // #0 - Button
945
TempValue0 = 0
946
TempValue1 = 18
947
// (#1 - #2) - Start Game, Time Attack
948
while TempValue0 < 2
949
SpriteFrame(19, -7, 128, 16, 1, TempValue1)
950
TempValue1 += 17
951
TempValue0++
952
loop
953
954
// #3 - Achievements/Trophies/Game Center
955
if Engine.PlatformID == RETRO_PS3
956
SpriteFrame(19, -7, 128, 16, 1, 513)
957
else
958
#platform: Use_Standalone
959
SpriteFrame(19, -7, 128, 16, 1, TempValue1)
960
#endplatform
961
#platform: Use_Origins
962
if Engine.PlatformID != RETRO_IOS
963
SpriteFrame(19, -7, 128, 16, 1, TempValue1)
964
else
965
SpriteFrame(19, -7, 128, 16, 291, 615)
966
end if
967
#endplatform
968
end if
969
970
TempValue1 += 17
971
TempValue0++
972
// #4 - Leaderboards
973
if Engine.OnlineActive == false
974
SpriteFrame(19, -7, 128, 16, 130, 460)
975
else
976
SpriteFrame(19, -7, 128, 16, 1, TempValue1)
977
end if
978
TempValue1 += 17
979
TempValue0++
980
// (#5 - #6) - Help & Options, Extras
981
while TempValue0 < 6
982
SpriteFrame(19, -7, 128, 16, 1, TempValue1)
983
TempValue1 += 17
984
TempValue0++
985
loop
986
TempValue0 = 0
987
TempValue1 = 547
988
// (#7 - #10) - Remove Ads(Mobile)/Unlock Full Game(Console), Unlock Full Game(Mobile)/Return to Arcade(Xbox), Exit Game, Soundtrack
989
while TempValue0 < 4
990
SpriteFrame(19, -7, 128, 16, 1, TempValue1)
991
TempValue1 += 17
992
TempValue0++
993
loop
994
995
SpriteFrame(19, -7, 128, 16, 162, 649) // #11 - More Games
996
// Highlight Text
997
TempValue0 = 0
998
TempValue1 = 18
999
// (#11 - #12 Standard, #12 - #13 Mobile) - Start Game, Time Attack
1000
while TempValue0 < 2
1001
SpriteFrame(19, -7, 128, 16, 130, TempValue1)
1002
TempValue1 += 17
1003
TempValue0++
1004
loop
1005
1006
// (#13 Standard, #14 Mobile) - Achievements/Trophies/Game Center
1007
if Engine.PlatformID == RETRO_PS3
1008
SpriteFrame(19, -7, 128, 16, 130, 513)
1009
else
1010
#platform: Use_Standalone
1011
SpriteFrame(19, -7, 128, 16, 130, TempValue1)
1012
#endplatform
1013
#platform: Use_Origins
1014
if Engine.PlatformID != RETRO_IOS
1015
SpriteFrame(19, -7, 128, 16, 130, TempValue1)
1016
else
1017
SpriteFrame(19, -7, 128, 16, 291, 632)
1018
end if
1019
#endplatform
1020
end if
1021
1022
TempValue1 += 17
1023
TempValue0++
1024
// (#14 - #16 Standard, #15 - #17 Mobile) - Leaderboards, Help & Options, Extras
1025
while TempValue0 < 6
1026
SpriteFrame(19, -7, 128, 16, 130, TempValue1)
1027
TempValue1 += 17
1028
TempValue0++
1029
loop
1030
TempValue0 = 0
1031
TempValue1 = 547
1032
// (#17 - #20 Standard, #18 - #21 Mobile) - Remove Ads(Mobile)/Unlock Full Game(Console), Unlock Full Game(Mobile)/Return to Arcade(Xbox), Exit Game, Soundtrack
1033
while TempValue0 < 4
1034
SpriteFrame(19, -7, 128, 16, 130, TempValue1)
1035
TempValue1 += 17
1036
TempValue0++
1037
loop
1038
1039
SpriteFrame(19, -7, 128, 16, 162, 666) // #22 - More Games
1040
1041
#platform: Use_Origins
1042
if game.mainMenuMode != MAINMENUMODE_NONE
1043
Object[34].State = MENUBUTTON_BUTTONS_OUT
1044
Object[34].Timer = 0
1045
Object[35].State = MENUBUTTON_BUTTONS_OUT
1046
Object[35].Timer = 0
1047
Object[36].State = MENUBUTTON_BUTTONS_OUT
1048
Object[36].Timer = 0
1049
Object[37].State = MENUBUTTON_BUTTONS_OUT
1050
Object[37].Timer = 0
1051
Object[38].State = MENUBUTTON_BUTTONS_OUT
1052
Object[38].Timer = 0
1053
Object[39].State = MENUBUTTON_BUTTONS_OUT
1054
Object[39].Timer = 0
1055
Object[40].State = MENUBUTTON_BUTTONS_OUT
1056
Object[40].Timer = 0
1057
Object[41].State = MENUBUTTON_BUTTONS_OUT
1058
Object[41].Timer = 0
1059
Object[42].State = MENUBUTTON_BUTTONS_OUT
1060
Object[42].Timer = 0
1061
Object[43].State = MENUBUTTON_BUTTONS_OUT
1062
Object[43].Timer = 0
1063
1064
if game.mainMenuMode == MAINMENUMODE_VISUALMODE
1065
MenuHeading.State = MENUHEADING_IDLE
1066
MenuHeading.Header = EXTRAS_HEADER
1067
1068
CallFunction(MenuButton_SetupMenuWindow)
1069
ResetObjectEntity(62, TypeName[ExtrasMenu], 0, 0, 0)
1070
Object.NextMenuInkEffect = INK_ALPHA
1071
Object.NextMenuAlpha = 0
1072
1073
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
1074
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
1075
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
1076
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
1077
Object.Type = TypeName[Blank Object]
1078
else
1079
if game.mainMenuMode == MAINMENUMODE_SOUNDTRACK
1080
MenuHeading.State = MENUHEADING_IDLE
1081
MenuHeading.Header = SOUNDTRACK_HEADER
1082
1083
CallFunction(MenuButton_SetupMenuWindow)
1084
MenuWindow.State = MENUWINDOW_SOUNDTRACK_EXPAND
1085
ResetObjectEntity(62,TypeName[Soundtrack Menu], 0, 0, 0)
1086
1087
Object.NextMenuInkEffect = INK_ALPHA
1088
Object.NextMenuAlpha = 0
1089
1090
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
1091
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
1092
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
1093
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
1094
Object.Type = TypeName[Blank Object]
1095
else
1096
if game.mainMenuMode == MAINMENUMODE_CHARASELECT
1097
MenuHeading.State = MENUHEADING_IDLE
1098
MenuHeading.Header = SAVESELECT_HEADER
1099
1100
CallFunction(MenuButton_SetupMenuWindow)
1101
ResetObjectEntity(62,TypeName[Load Save Menu], 0, 0, 0)
1102
1103
Object.NextMenuInkEffect = INK_ALPHA
1104
Object.NextMenuAlpha = 0
1105
1106
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
1107
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
1108
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
1109
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
1110
Object.Type = TypeName[Blank Object]
1111
else
1112
if game.mainMenuMode == MAINMENUMODE_HELPOPTION
1113
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
1114
MenuHeading.Header = HELP&OPTIONS_HEADER
1115
1116
CallFunction(MenuButton_SetupMenuWindow)
1117
if Options.DevMenuFlag == true
1118
ResetObjectEntity(62,TypeName[Options Menu H], 0, 0, 0)
1119
else
1120
ResetObjectEntity(62,TypeName[Options Menu], 0, 0, 0)
1121
end if
1122
1123
Object.NextMenuInkEffect = INK_ALPHA
1124
Object.NextMenuAlpha = 0
1125
1126
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
1127
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
1128
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
1129
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
1130
Object.Type = TypeName[Blank Object]
1131
else
1132
if game.mainMenuMode == MAINMENUMODE_EXTRAS
1133
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
1134
MenuHeading.Header = EXTRAS_HEADER
1135
1136
CallFunction(MenuButton_SetupMenuWindow)
1137
ResetObjectEntity(62,TypeName[Extras Menu], 0, 0, 0)
1138
1139
Object.NextMenuInkEffect = INK_ALPHA
1140
Object.NextMenuAlpha = 0
1141
1142
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
1143
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
1144
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
1145
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
1146
Object.Type = TypeName[Blank Object]
1147
else
1148
if game.mainMenuMode == MAINMENUMODE_SETTINGS
1149
MenuHeading.State = MENUHEADING_LEAVE_SCREEN
1150
MenuHeading.Header = HELP&OPTIONS_HEADER
1151
1152
CallFunction(MenuButton_SetupMenuWindow)
1153
ResetObjectEntity(62,TypeName[Options Menu], 0, 0, 0)
1154
1155
Object.NextMenuInkEffect = INK_ALPHA
1156
Object.NextMenuAlpha = 0
1157
1158
ResetObjectEntity(63, TypeName[Blank Object], 0, 0, 0)
1159
ResetObjectEntity(64, TypeName[Blank Object], 0, 0, 0)
1160
ResetObjectEntity(65, TypeName[Blank Object], 0, 0, 0)
1161
ResetObjectEntity(66, TypeName[Blank Object], 0, 0, 0)
1162
Object.Type = TypeName[Blank Object]
1163
end if
1164
end if
1165
end if
1166
end if
1167
end if
1168
end if
1169
end if
1170
#endplatform
1171
end sub
1172
1173
1174
// ========================
1175
// Editor Subs
1176
// ========================
1177
1178
sub RSDKEdit
1179
if Editor.ReturnVariable == true
1180
switch Editor.VariableID
1181
case EDIT_VAR_PROPVAL // Property Value
1182
CheckResult = Object.PropertyValue
1183
break
1184
case 0 // Type
1185
CheckResult = Object.PropertyValue
1186
break
1187
end switch
1188
else
1189
switch Editor.VariableID
1190
case EDIT_VAR_PROPVAL // Property Value
1191
Object.PropertyValue = Editor.VariableValue
1192
break
1193
case 0 // Type
1194
Object.PropertyValue = Editor.VariableValue
1195
break
1196
end switch
1197
end if
1198
end sub
1199
1200
1201
sub RSDKDraw
1202
DrawSprite(0)
1203
end sub
1204
1205
1206
sub RSDKLoad
1207
LoadSpriteSheet("Menu/MenuGfx2_EN.gif")
1208
SpriteFrame(0, -10, 144, 21, 259, 71) // #0 - Button
1209
1210
// These are overwritten in ObjectStartup but its cool to see anyway
1211
AddEditorVariable("Type")
1212
SetActiveVariable("Type")
1213
AddEnumVariable("None", 0)
1214
AddEnumVariable("Play", 1)
1215
AddEnumVariable("Time Attack", 2)
1216
AddEnumVariable("Leaderboards", 3)
1217
AddEnumVariable("Achievements", 4)
1218
AddEnumVariable("Help & Options", 5)
1219
AddEnumVariable("Extras", 6)
1220
AddEnumVariable("Unlock Full Game", 7)
1221
AddEnumVariable("Store", 8)
1222
AddEnumVariable("Exit", 9)
1223
AddEnumVariable("Soundtrack", 10)
1224
AddEnumVariable("MoreGames", 11)
1225
end sub
1226
1227