Dink's Dopppelganger Intro Source Files
/////(START-1.C) -- Script for the START button from title screen
void main( void )
{
int &crap;
}
void buttonon( void )
{
sp_pframe(¤t_sprite, 2);
Playsound(20,22050,0,0,0);
}
void buttonoff( void )
{
sp_pframe(¤t_sprite, 1);
Playsound(21,22050,0,0,0);
}
void click ( void )
{
//lets start a new game
stopmidi("stress.mid");
Say_xy("`%<<< Creating new game >>>", 10, 378);
wait(1);
//Room #114 is Mallaki's House where the intro starts
//Be sure to set the same room # for &player_map in main.c
&player_map = 114;
sp_x(1, 2);
sp_y(1, 3);
sp_brain(1, 13);
set_mode(2); //turn game on
&update_status = 1;
draw_status();
set_keep_mouse(1);
kill_this_task();
return;
}
/////(WIZARD1.C) -- Attached to the Wizard in the opening scene
//Used to store this sprite # as &wizsprite
void main(void)
{
&wizsprite = ¤t_sprite;
}
/////(MOVWALL1.C) -- Attached to the sliding wall in Mallaki's House
//Its talk() function allows dink to "open" the wall to a secret room.
void main(void)
{
&wizwall = ¤t_sprite;
}
void talk(void)
{
int &tempy = busy(1);
if (&tempy != 0)
{
return;
}
freeze(1);
sp_speed(¤t_sprite, 6);
move_stop(¤t_sprite, 6, 130, 1);
sp_hard(¤t_sprite, 1);
draw_hard_map();
unfreeze(1);
}
/////(INTRO1.C) -- Evil Wizard pacing in Mallaki's House
//This script is attached to an inanimate object in the room.
//There are also scripts attached to the wizard and to the moving wall
//Which set &wizsprite and &wizwall to be ¤t_sprite for use here.
void main(void)
{
playmidi("advent1.mid");
if(&story1 == 0)
{
//first time entry into game
say_stop_xy("`!THREE MONTHS AGO", 130, 100);
say_stop_xy("`!In a hidden house, a bitter wizard paces with determination.", 10, 100);
say_stop("`#Blast it!", &wizsprite);
say_stop("`#I could own this land!", &wizsprite);
say_stop("`#Kingdoms could fall at my command!", &wizsprite);
say_stop("`#Peasants and Kings alike would bow before me as their ruler!", &wizsprite);
say_stop("`#Except... except for....", &wizsprite);
say_stop("`#DINK SMALLWOOD!", &wizsprite);
say_stop("`#That no-good do-gooder would find a way to stop me.", &wizsprite);
say_stop("`#Unless....", &wizsprite);
say_stop_xy("`!The wizard's twisted face turns to a look of evil delight.", 10, 100);
say_stop("`#Dink Smallwood... when I'm through with you, your hero days will be OVER.... FOREVER!!!", &wizsprite);
say_stop("`#Mwaaah ha ha ha!!!", &wizsprite);
freeze(&wizsprite);
sp_speed(&wizsprite, 4);
move_stop(&wizsprite, 4, 70, 1);
move_stop(&wizsprite, 8, 132, 1);
sp_speed(&wizwall, 6);
move_stop(&wizwall, 6, 130, 1);
move_stop(&wizsprite, 8, 90, 1);
move_stop(&wizwall, 4, 42, 1);
int &hold1 = sp_editor_num(&wizsprite);
if (&hold1 != 0)
{
sp_kill(&wizsprite,10);
editor_type(&hold1, 1);
}
int &hold2 = sp_editor_num(&BtnSkip);
if (&hold2 != 0)
{
sp_kill(&BtnSkip,10);
editor_type(&hold2, 1);
}
say_stop_xy("`@Loading...", 130, 100);
wait(200);
&player_map = 599;
load_screen();
draw_screen();
draw_status();
stopmidi("advent1.mid");
kill_this_task();
return;
}
//Otherwise, Dink actually walked in here.
if (&BeenHere1 == 0)
{
&BeenHere1 = 1;
say_stop("Wow... I think I saw this place before, in a dream...", 1);
return;
}
}
void talk(void)
{
// blah
}
/////(INTRO2.C) -- The Pub Scene
void main(void)
{
playmidi("dance.mid");
if(&story1 == 0)
{
//first time entry into game
say_stop_xy("`!LAST NIGHT", 130, 100);
say_stop_xy("`!Dink's Pub", 130, 100);
say("`9(Jawn)", &keepjawn);
say("`0(Marna)", &keepmarna);
say("`#(Ash)", &keepash);
say("`@(Annie)", &keepannie);
wait(4000);
say_stop("`0I feel a little tipsy!", &keepmarna);
wait(200);
say_stop("`@Girl, you've been drinking like a fish all night!", &keepannie);
wait(200);
say_stop("`9Yeah, Marna. Are you drunk yet? Wanna go back to my place?", &keepjawn);
wait(200);
say_stop("`0I'm not THAT drunk, Jawn!", &keepmarna);
wait(200);
say("`0", &keepmarna);
say("`#Ha Ha Ha Ha", &keepash);
say("`@Hehehehe", &keepannie);
wait(2000);
say_stop("`0Besides, I'm going home with Ash tonight!", &keepmarna);
wait(200);
say_stop("`#????", &keepash);
say_stop("`#Wooohoooo!!!", &keepash);
wait(200);
say_stop("`@Has anybody seen that handsome hunk of a man, Dink Smallwood?", &keepannie);
wait(200);
say_stop("`9Well, it IS his pub. He doesn't have to work if he doesn't want to.", &keepjawn);
wait(200);
say_stop("`@Well yeah, but I was hoping to see him. I'm feeling fiesty!", &keepannie);
wait(200);
say_stop("`0Fiesty? Then come home with Ash and I.... ", &keepmarna);
wait(200);
//Create a sprite of Dink walking in the door!
int &temp = create_sprite(495, 450, 16, 78, 1);
freeze(&temp);
sp_base_walk(&temp, 70);
sp_base_idle(&temp, 10);
sp_speed(&temp, 1);
move_stop(&temp, 8, 390, 1);
freeze(&keepmarna);
freeze(&keepjawn);
freeze(&keepannie);
freeze(&keepash);
say("`9DINK!", &keepjawn);
say("`0DINK!", &keepmarna);
say("`#DINK!", &keepash);
say("`@DINK!", &keepannie);
move_stop(&temp, 8, 280, 1);
move_stop(&temp, 4, 470, 1);
wait(1000);
unfreeze(&keepmarna);
unfreeze(&keepjawn);
unfreeze(&keepannie);
unfreeze(&keepash);
say_stop("`$Yes... 'tis I. The noble, honorable Dink Smallwood!", &temp);
wait(200);
say_stop("`#Yeah right. .", &keepash);
wait(200);
say_stop("`$Okay okay... 'tis I, Dink Smallwood the PARTY ANIMAL!", &temp);
say("`9Damn right!", &keepjawn);
say("`0Yes! Dink!!", &keepmarna);
say("`#Wooo hoooo!", &keepash);
say("`@", &keepannie);
wait(2000);
int &hold2 = sp_editor_num(&BtnSkip);
if (&hold2 != 0)
{
sp_kill(&BtnSkip,10);
editor_type(&hold2, 1);
}
say_stop_xy("`@Loading...", 130, 100);
&player_map = 631;
load_screen();
draw_screen();
draw_status();
stopmidi("dance.mid");
kill_this_task();
}
}
/////(INTRO3.C) -- Dink staggering home drunk
void main(void)
{
playmidi("fusak1.mid");
if(&story1 == 0)
{
//first time entry into game
say_stop_xy("`!LATER THAT NIGHT", 110, 100);
say_stop_xy("`!A drunken, staggering Dink tries to find his way home.", 50, 100);
int &temp = create_sprite(10, 300, 16, 78, 1);
freeze(&temp);
sp_base_walk(&temp, 70);
sp_base_idle(&temp, 10);
sp_speed(&temp, 1);
move_stop(&temp, 6, 65, 1);
move_stop(&temp, 2, 328, 1);
move_stop(&temp, 6, 105, 1);
say("`$I think I'm going to be sick...", &temp);
move_stop(&temp, 8, 240, 1);
move_stop(&temp, 6, 190, 1);
move_stop(&temp, 8, 162, 1);
move_stop(&temp, 2, 196, 1);
move_stop(&temp, 6, 315, 1);
move_stop(&temp, 8, 148, 1);
move_stop(&temp, 4, 290, 1);
move_stop(&temp, 6, 315, 1);
int &temp2 = create_sprite(464, 6, 10, 261, 1);
freeze(&temp2);
sp_base_walk(&temp2, 260);
sp_speed(&temp2, 1);
move_stop(&temp2, 2, 25, 1);
move_stop(&temp2, 4, 436, 1);
move_stop(&temp2, 2, 54, 1);
move_stop(&temp2, 4, 384, 1);
move_stop(&temp2, 2, 80, 1);
move_stop(&temp2, 4, 350, 1);
move_stop(&temp2, 2, 105, 1);
sp_brain(&temp2, 6);
sp_seq(&temp2, 261);
say_stop("`$Oh look... a little fairy...", &temp);
stopmidi("fusak1.mid");
playmidi("chase2.mid");
say_stop("`#Say bye bye, Dink.", &temp2);
sp_seq(&temp, 455);
sp_frame_delay(&temp, 20);
say("`$AAARRGH!!!", &temp);
say_stop("`#Mwhaa ha ha ha!", &temp2);
sp_kill(&temp,1200);
say("`#Good Riddance, Dink Smallwood!", &temp2);
wait(1000);
sp_seq(&temp2, 0);
sp_brain(&temp2,10);
sp_pseq(&temp2, 581);
sp_pframe(&temp2, 1);
wait(3000);
say_stop("`#At last, I have my revenge!", &temp2);
sp_speed(&temp2, 3);
sp_base_walk(&temp2, 580);
move_stop(&temp2, 6, 450, 1);
move_stop(&temp2, 8, 1, 1);
sp_kill(&temp2, 10);
wait(200);
int &hold2 = sp_editor_num(&BtnSkip);
if (&hold2 != 0)
{
sp_kill(&BtnSkip,10);
editor_type(&hold2, 1);
}
say_xy("`@Starting...", 130, 100);
sp_x(1, 300);
sp_y(1, 75);
&player_map = 163;
sp_base_walk(1, 70);
sp_base_attack(1, 100);
//turn game on
set_mode(2);
set_keep_mouse(0);
sp_brain(1, 1);
set_keep_mouse(0);
reset_timer();
sp_dir(1, 4);
sp_que(1, 0);
sp_noclip(1, 0);
//lets give him fists to start out with, and arm him
add_item("item-fst",197, 11);
&cur_weapon = 1;
arm_weapon();
&update_status = 1;
draw_status();
stopmidi("chase2.mid");
kill_this_task();
}
}
/////(SKIPNTRO.C) -- This script is attached to the "skip intro" button.
void main( void )
{
&BtnSkip = ¤t_sprite;
sp_noclip(¤t_sprite, 1);
sp_brain(¤t_sprite, 14);
sp_touch_damage(¤t_sprite, -1);
}
void click(void)
{
script_attach(1000);
if (&player_map == 114)
{
int &hold1 = sp_editor_num(&wizsprite);
if (&hold1 != 0)
{
sp_kill(&wizsprite,10);
editor_type(&hold1, 1);
}
}
int &hold2 = sp_editor_num(&BtnSkip);
if (&hold2 != 0)
{
sp_kill(&BtnSkip,10);
editor_type(&hold2, 1);
}
say_xy("`#Starting...", 130, 140);
wait(200);
sp_base_walk(1, 70);
sp_base_attack(1, 100);
//turn game on
set_mode(2);
set_keep_mouse(0);
sp_brain(1, 1);
set_keep_mouse(0);
reset_timer();
sp_dir(1, 4);
sp_que(1, 0);
sp_noclip(1, 0);
//lets give him fists to start out with, and arm him
add_item("item-fst",197, 11);
&cur_weapon = 1;
arm_weapon();
sp_x(1, 300);
sp_y(1, 75);
&player_map = 163;
&update_status = 1;
draw_status();
kill_this_task();
}