diff options
Diffstat (limited to 'engines/avalanche/timeout2.h')
-rw-r--r-- | engines/avalanche/timeout2.h | 157 |
1 files changed, 84 insertions, 73 deletions
diff --git a/engines/avalanche/timeout2.h b/engines/avalanche/timeout2.h index 5130c92bbc..f7e984e42f 100644 --- a/engines/avalanche/timeout2.h +++ b/engines/avalanche/timeout2.h @@ -36,123 +36,124 @@ #include "avalanche/celer2.h" namespace Avalanche { +class AvalancheEngine; - namespace Timeout { - +class Timeout { +public: /* reason_ now runs between 1 and 28. */ - const int16 reason_drawbridgefalls = 2; - const int16 reason_avariciustalks = 3; - const int16 reason_gototoilet = 4; - const int16 reason_explosion = 5; - const int16 reason_brummiestairs = 6; - const int16 reason_cardiffsurvey = 7; - const int16 reason_cwytalot_in_herts = 8; - const int16 reason_getting_tied_up = 9; - const int16 reason_hanging_around = 10; /* Tied to the tree in Nottingham. */ - const int16 reason_jacques_waking_up = 11; - const int16 reason_naughty_duke = 12; - const int16 reason_jumping = 13; - const int16 reason_sequencer = 14; - const int16 reason_crapulus_says_spludwick_out = 15; - const int16 reason_dawndelay = 16; - const int16 reason_drinks = 17; - const int16 reason_du_lustie_talks = 18; - const int16 reason_falling_down_oubliette = 19; - const int16 reason_meeting_avaroid = 20; - const int16 reason_rising_up_oubliette = 21; - const int16 reason_robin_hood_and_geida = 22; - const int16 reason_sitting_down = 23; - const int16 reason_ghost_room_phew = 1; - const int16 reason_arkata_shouts = 24; - const int16 reason_winning = 25; - const int16 reason_falling_over = 26; - const int16 reason_spludwalk = 27; - const int16 reason_geida_sings = 28; + static const int16 reason_drawbridgefalls = 2; + static const int16 reason_avariciustalks = 3; + static const int16 reason_gototoilet = 4; + static const int16 reason_explosion = 5; + static const int16 reason_brummiestairs = 6; + static const int16 reason_cardiffsurvey = 7; + static const int16 reason_cwytalot_in_herts = 8; + static const int16 reason_getting_tied_up = 9; + static const int16 reason_hanging_around = 10; /* Tied to the tree in Nottingham. */ + static const int16 reason_jacques_waking_up = 11; + static const int16 reason_naughty_duke = 12; + static const int16 reason_jumping = 13; + static const int16 reason_sequencer = 14; + static const int16 reason_crapulus_says_spludwick_out = 15; + static const int16 reason_dawndelay = 16; + static const int16 reason_drinks = 17; + static const int16 reason_du_lustie_talks = 18; + static const int16 reason_falling_down_oubliette = 19; + static const int16 reason_meeting_avaroid = 20; + static const int16 reason_rising_up_oubliette = 21; + static const int16 reason_robin_hood_and_geida = 22; + static const int16 reason_sitting_down = 23; + static const int16 reason_ghost_room_phew = 1; + static const int16 reason_arkata_shouts = 24; + static const int16 reason_winning = 25; + static const int16 reason_falling_over = 26; + static const int16 reason_spludwalk = 27; + static const int16 reason_geida_sings = 28; /* procx now runs between 1 and 41. */ - const int16 procopen_drawbridge = 3; + static const int16 procopen_drawbridge = 3; - const int16 procavaricius_talks = 4; + static const int16 procavaricius_talks = 4; - const int16 procurinate = 5; + static const int16 procurinate = 5; - const int16 proctoilet2 = 6; + static const int16 proctoilet2 = 6; - const int16 procbang = 7; + static const int16 procbang = 7; - const int16 procbang2 = 8; + static const int16 procbang2 = 8; - const int16 procstairs = 9; + static const int16 procstairs = 9; - const int16 proccardiffsurvey = 10; + static const int16 proccardiffsurvey = 10; - const int16 proccardiff_return = 11; + static const int16 proccardiff_return = 11; - const int16 proc_cwytalot_in_herts = 12; + static const int16 proc_cwytalot_in_herts = 12; - const int16 procget_tied_up = 13; + static const int16 procget_tied_up = 13; - const int16 procget_tied_up2 = 1; + static const int16 procget_tied_up2 = 1; - const int16 prochang_around = 14; + static const int16 prochang_around = 14; - const int16 prochang_around2 = 15; + static const int16 prochang_around2 = 15; - const int16 procafter_the_shootemup = 32; + static const int16 procafter_the_shootemup = 32; - const int16 procjacques_wakes_up = 16; + static const int16 procjacques_wakes_up = 16; - const int16 procnaughty_duke = 17; + static const int16 procnaughty_duke = 17; - const int16 procnaughty_duke2 = 18; + static const int16 procnaughty_duke2 = 18; - const int16 procnaughty_duke3 = 38; + static const int16 procnaughty_duke3 = 38; - const int16 procjump = 19; + static const int16 procjump = 19; - const int16 procsequence = 20; + static const int16 procsequence = 20; - const int16 proccrapulus_splud_out = 21; + static const int16 proccrapulus_splud_out = 21; - const int16 procdawn_delay = 22; + static const int16 procdawn_delay = 22; - const int16 procbuydrinks = 23; + static const int16 procbuydrinks = 23; - const int16 procbuywine = 24; + static const int16 procbuywine = 24; - const int16 proccallsguards = 25; + static const int16 proccallsguards = 25; - const int16 procgreetsmonk = 26; + static const int16 procgreetsmonk = 26; - const int16 procfall_down_oubliette = 27; + static const int16 procfall_down_oubliette = 27; - const int16 procmeet_avaroid = 28; + static const int16 procmeet_avaroid = 28; - const int16 procrise_up_oubliette = 29; + static const int16 procrise_up_oubliette = 29; - const int16 procrobin_hood_and_geida = 2; + static const int16 procrobin_hood_and_geida = 2; - const int16 procrobin_hood_and_geida_talk = 30; + static const int16 procrobin_hood_and_geida_talk = 30; - const int16 procavalot_returns = 31; + static const int16 procavalot_returns = 31; - const int16 procavvy_sit_down = 33; /* In Nottingham. */ + static const int16 procavvy_sit_down = 33; /* In Nottingham. */ - const int16 procghost_room_phew = 34; + static const int16 procghost_room_phew = 34; - const int16 procarkata_shouts = 35; + static const int16 procarkata_shouts = 35; - const int16 procwinning = 36; + static const int16 procwinning = 36; - const int16 procavalot_falls = 37; + static const int16 procavalot_falls = 37; - const int16 procspludwick_goes_to_cauldron = 39; + static const int16 procspludwick_goes_to_cauldron = 39; - const int16 procspludwick_leaves_cauldron = 40; + static const int16 procspludwick_leaves_cauldron = 40; - const int16 procgive_lute_to_geida = 41; + static const int16 procgive_lute_to_geida = 41; struct timetype { int32 time_left; @@ -160,9 +161,15 @@ namespace Avalanche { byte what_for; }; - timetype times[7] = {{0,0,0}}; + timetype times[7]; + + + + Timeout(); + + void setParent(AvalancheEngine *vm); void set_up_timer(int32 howlong, byte whither, byte why); @@ -252,7 +259,11 @@ namespace Avalanche { void give_lute_to_geida(); - } // End of namespace Timeout. +private: + AvalancheEngine *_vm; + + byte fv; +}; } // End of namespace Avalanche. |