3 #include "../ai/stdai.h"
7 #define EXIT_DELAY 20 // delay between intro and title screen
9 bool intro_init(int param
)
12 fade
.set_full(FADE_OUT
);
14 game
.switchstage
.mapno
= STAGE_KINGS
;
15 game
.switchstage
.playerx
= 0;
16 game
.switchstage
.playery
= 0;
17 game
.switchstage
.eventonentry
= 100;
29 if (--blanktimer
== 0)
30 game
.setmode(GM_TITLE
);
37 // when script ends with WAI9999, detect it and move on to title screen
38 ScriptInstance
*script
= GetCurrentScriptInstance();
39 if ((script
&& script
->delaytimer
== 9999) || buttonjustpushed())
42 blanktimer
= EXIT_DELAY
;
45 // lower time for startup
46 if (script
&& script
->delaytimer
&& script
->ip
== 5)
48 game
.showmapnametime
= 0;
49 if (script
->delaytimer
> 20)
50 script
->delaytimer
= 20;
55 void c------------------------------() {}
60 ONTICK(OBJ_INTRO_KINGS
, ai_intro_kings
);
61 ONTICK(OBJ_INTRO_CROWN
, ai_intro_crown
);
62 ONTICK(OBJ_INTRO_DOCTOR
, ai_intro_doctor
);
66 void c------------------------------() {}
69 // misery/balrog in bubble
70 void ai_intro_kings(Object
*o
)
105 // demon crown on throne
106 void ai_intro_crown(Object
*o
)
118 if ((++o
->timer
% 8) == 1)
120 effect(o
->x
+ random(-8<<CSF
, 8<<CSF
),
122 EFFECT_GHOST_SPARKLE
);
130 void ai_intro_doctor(Object
*o
)
146 case 10: // chuckle; facing screen
178 case 30: // face away
185 case 40: // chuckle; facing away