diff options
Diffstat (limited to 'sword1/sword1.cpp')
-rw-r--r-- | sword1/sword1.cpp | 780 |
1 files changed, 393 insertions, 387 deletions
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index c547291270..1d16a746ad 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -41,6 +41,8 @@ #include "music.h" #include "control.h" +using namespace Sword1; + /* Broken Sword 1 */ static const GameSettings sword1_setting = {"sword1", "Broken Sword I", GF_DEFAULT_TO_1X_SCALER}; @@ -76,6 +78,8 @@ Engine *Engine_SWORD1_create(GameDetector *detector, OSystem *syst) { REGISTER_PLUGIN("Broken Sword", Engine_SWORD1_gameList, Engine_SWORD1_create, Engine_SWORD1_detectGames) +namespace Sword1 { + SystemVars SwordEngine::_systemVars; void SwordEngine::errorString(const char *buf1, char *buf2) { @@ -101,12 +105,12 @@ void SwordEngine::initialize(void) { debug(5, "Starting object manager"); _objectMan = new ObjectMan(_resMan); _mixer->setVolume(255); - _mouse = new SwordMouse(_system, _resMan, _objectMan); - _screen = new SwordScreen(_system, _resMan, _objectMan); - _music = new SwordMusic(_system, _mixer); - _sound = new SwordSound("", _mixer, _resMan); - _menu = new SwordMenu(_screen, _mouse); - _logic = new SwordLogic(_objectMan, _resMan, _screen, _mouse, _sound, _music, _menu); + _mouse = new Mouse(_system, _resMan, _objectMan); + _screen = new Screen(_system, _resMan, _objectMan); + _music = new Music(_system, _mixer); + _sound = new Sound("", _mixer, _resMan); + _menu = new Menu(_screen, _mouse); + _logic = new Logic(_objectMan, _resMan, _screen, _mouse, _sound, _music, _menu); _mouse->useLogicAndMenu(_logic, _menu); uint8 musicVol = (uint8)ConfMan.getInt("music_volume"); @@ -155,7 +159,7 @@ void SwordEngine::initialize(void) { _logic->initialize(); _objectMan->initialize(); _mouse->initialize(); - _control = new SwordControl(_resMan, _objectMan, _system, _mouse, _sound, _music, getSavePath()); + _control = new Control(_resMan, _objectMan, _system, _mouse, _sound, _music, getSavePath()); } void SwordEngine::reinitialize(void) { @@ -171,10 +175,10 @@ void SwordEngine::reinitialize(void) { void SwordEngine::startPositions(int32 startNumber) { // int32 sect; - BsObject *compact; + Object *compact; - SwordLogic::_scriptVars[CHANGE_STANCE] = STAND; - SwordLogic::_scriptVars[GEORGE_CDT_FLAG] = GEO_TLK_TABLE; + Logic::_scriptVars[CHANGE_STANCE] = STAND; + Logic::_scriptVars[GEORGE_CDT_FLAG] = GEO_TLK_TABLE; //------------------------------------------------------------------------------------------------------- // START 0==intro; 1==without @@ -192,137 +196,137 @@ void SwordEngine::startPositions(int32 startNumber) { } - SwordLogic::_scriptVars[CHANGE_X] = 481; - SwordLogic::_scriptVars[CHANGE_Y] = 413; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_1; + Logic::_scriptVars[CHANGE_X] = 481; + Logic::_scriptVars[CHANGE_Y] = 413; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_1; } //------------------------------------------------------------------------------------------------------- else if (startNumber==2) // blind_alley { - SwordLogic::_scriptVars[CHANGE_X] = 480; - SwordLogic::_scriptVars[CHANGE_Y] = 388; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_2; + Logic::_scriptVars[CHANGE_X] = 480; + Logic::_scriptVars[CHANGE_Y] = 388; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_2; _logic->fnAddObject(0,0,LIFTING_KEYS,0,0,0,0,0); _logic->fnAddObject(0,0,ROSSO_CARD,0,0,0,0,0); - SwordLogic::_scriptVars[POCKET_1] = 1; - SwordLogic::_scriptVars[POCKET_2] = 1; - SwordLogic::_scriptVars[POCKET_3] = 1; - SwordLogic::_scriptVars[POCKET_4] = 1; - SwordLogic::_scriptVars[POCKET_5] = 1; - SwordLogic::_scriptVars[POCKET_6] = 1; - SwordLogic::_scriptVars[POCKET_7] = 1; - SwordLogic::_scriptVars[POCKET_8] = 1; - SwordLogic::_scriptVars[POCKET_9] = 1; - - SwordLogic::_scriptVars[POCKET_10] = 1; - SwordLogic::_scriptVars[POCKET_11] = 1; - SwordLogic::_scriptVars[POCKET_12] = 1; - SwordLogic::_scriptVars[POCKET_13] = 1; - SwordLogic::_scriptVars[POCKET_14] = 1; - SwordLogic::_scriptVars[POCKET_15] = 1; - SwordLogic::_scriptVars[POCKET_16] = 1; - SwordLogic::_scriptVars[POCKET_17] = 1; - SwordLogic::_scriptVars[POCKET_18] = 1; - SwordLogic::_scriptVars[POCKET_19] = 1; - - SwordLogic::_scriptVars[POCKET_20] = 1; - SwordLogic::_scriptVars[POCKET_21] = 1; - SwordLogic::_scriptVars[POCKET_22] = 1; - SwordLogic::_scriptVars[POCKET_23] = 1; - SwordLogic::_scriptVars[POCKET_24] = 1; - SwordLogic::_scriptVars[POCKET_25] = 1; - SwordLogic::_scriptVars[POCKET_26] = 1; - SwordLogic::_scriptVars[POCKET_27] = 1; - SwordLogic::_scriptVars[POCKET_28] = 1; - SwordLogic::_scriptVars[POCKET_29] = 1; + Logic::_scriptVars[POCKET_1] = 1; + Logic::_scriptVars[POCKET_2] = 1; + Logic::_scriptVars[POCKET_3] = 1; + Logic::_scriptVars[POCKET_4] = 1; + Logic::_scriptVars[POCKET_5] = 1; + Logic::_scriptVars[POCKET_6] = 1; + Logic::_scriptVars[POCKET_7] = 1; + Logic::_scriptVars[POCKET_8] = 1; + Logic::_scriptVars[POCKET_9] = 1; + + Logic::_scriptVars[POCKET_10] = 1; + Logic::_scriptVars[POCKET_11] = 1; + Logic::_scriptVars[POCKET_12] = 1; + Logic::_scriptVars[POCKET_13] = 1; + Logic::_scriptVars[POCKET_14] = 1; + Logic::_scriptVars[POCKET_15] = 1; + Logic::_scriptVars[POCKET_16] = 1; + Logic::_scriptVars[POCKET_17] = 1; + Logic::_scriptVars[POCKET_18] = 1; + Logic::_scriptVars[POCKET_19] = 1; + + Logic::_scriptVars[POCKET_20] = 1; + Logic::_scriptVars[POCKET_21] = 1; + Logic::_scriptVars[POCKET_22] = 1; + Logic::_scriptVars[POCKET_23] = 1; + Logic::_scriptVars[POCKET_24] = 1; + Logic::_scriptVars[POCKET_25] = 1; + Logic::_scriptVars[POCKET_26] = 1; + Logic::_scriptVars[POCKET_27] = 1; + Logic::_scriptVars[POCKET_28] = 1; + Logic::_scriptVars[POCKET_29] = 1; } //------------------------------------------------------------------------------------------------------- else if (startNumber==3) // cafe { - SwordLogic::_scriptVars[CHANGE_X] = 660; - SwordLogic::_scriptVars[CHANGE_Y] = 368; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_3; + Logic::_scriptVars[CHANGE_X] = 660; + Logic::_scriptVars[CHANGE_Y] = 368; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_3; } //------------------------------------------------------------------------------------------------------- else if (startNumber==4) // ready to use phone { - SwordLogic::_scriptVars[CHANGE_X] = 463; - SwordLogic::_scriptVars[CHANGE_Y] = 391; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_4; + Logic::_scriptVars[CHANGE_X] = 463; + Logic::_scriptVars[CHANGE_Y] = 391; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_4; - SwordLogic::_scriptVars[MOUE_TEXT] = 1; // stop moue from entering ("Freeze...") - SwordLogic::_scriptVars[MOUE_NICO_FLAG] = 1; // Moue gave George her number + Logic::_scriptVars[MOUE_TEXT] = 1; // stop moue from entering ("Freeze...") + Logic::_scriptVars[MOUE_NICO_FLAG] = 1; // Moue gave George her number // paris_flag=2; // for Nico's phone script - SwordLogic::_scriptVars[PARIS_FLAG] = 5; // to access room8 (cafe_repaired) - SwordLogic::_scriptVars[NICO_PHONE_FLAG] = 1; // Nico's number is on envelope - SwordLogic::_scriptVars[TAILOR_PHONE_FLAG] = 1; // Todryk's number is on envelope - SwordLogic::_scriptVars[WORKMAN_GONE_FLAG] = 1; // Workman not here - SwordLogic::_scriptVars[ALBERT_INFO_FLAG] = 1; // Albert has told us the tailor's number (for Nico's phone script) - SwordLogic::_scriptVars[SEEN_SEWERS_FLAG] = 1; - - SwordLogic::_scriptVars[POCKET_30] = 1; - SwordLogic::_scriptVars[POCKET_31] = 1; - SwordLogic::_scriptVars[POCKET_32] = 1; - SwordLogic::_scriptVars[POCKET_33] = 1; - SwordLogic::_scriptVars[POCKET_34] = 1; - SwordLogic::_scriptVars[POCKET_35] = 1; - SwordLogic::_scriptVars[POCKET_36] = 1; - SwordLogic::_scriptVars[POCKET_37] = 1; - SwordLogic::_scriptVars[POCKET_38] = 1; - SwordLogic::_scriptVars[POCKET_39] = 1; - - SwordLogic::_scriptVars[POCKET_40] = 1; - SwordLogic::_scriptVars[POCKET_41] = 1; - SwordLogic::_scriptVars[POCKET_42] = 1; - SwordLogic::_scriptVars[POCKET_43] = 1; - SwordLogic::_scriptVars[POCKET_44] = 1; - SwordLogic::_scriptVars[POCKET_45] = 1; - SwordLogic::_scriptVars[POCKET_46] = 1; - SwordLogic::_scriptVars[POCKET_47] = 1; - SwordLogic::_scriptVars[POCKET_48] = 1; - SwordLogic::_scriptVars[POCKET_49] = 1; - - SwordLogic::_scriptVars[POCKET_50] = 1; - SwordLogic::_scriptVars[POCKET_51] = 1; - SwordLogic::_scriptVars[POCKET_52] = 1; + Logic::_scriptVars[PARIS_FLAG] = 5; // to access room8 (cafe_repaired) + Logic::_scriptVars[NICO_PHONE_FLAG] = 1; // Nico's number is on envelope + Logic::_scriptVars[TAILOR_PHONE_FLAG] = 1; // Todryk's number is on envelope + Logic::_scriptVars[WORKMAN_GONE_FLAG] = 1; // Workman not here + Logic::_scriptVars[ALBERT_INFO_FLAG] = 1; // Albert has told us the tailor's number (for Nico's phone script) + Logic::_scriptVars[SEEN_SEWERS_FLAG] = 1; + + Logic::_scriptVars[POCKET_30] = 1; + Logic::_scriptVars[POCKET_31] = 1; + Logic::_scriptVars[POCKET_32] = 1; + Logic::_scriptVars[POCKET_33] = 1; + Logic::_scriptVars[POCKET_34] = 1; + Logic::_scriptVars[POCKET_35] = 1; + Logic::_scriptVars[POCKET_36] = 1; + Logic::_scriptVars[POCKET_37] = 1; + Logic::_scriptVars[POCKET_38] = 1; + Logic::_scriptVars[POCKET_39] = 1; + + Logic::_scriptVars[POCKET_40] = 1; + Logic::_scriptVars[POCKET_41] = 1; + Logic::_scriptVars[POCKET_42] = 1; + Logic::_scriptVars[POCKET_43] = 1; + Logic::_scriptVars[POCKET_44] = 1; + Logic::_scriptVars[POCKET_45] = 1; + Logic::_scriptVars[POCKET_46] = 1; + Logic::_scriptVars[POCKET_47] = 1; + Logic::_scriptVars[POCKET_48] = 1; + Logic::_scriptVars[POCKET_49] = 1; + + Logic::_scriptVars[POCKET_50] = 1; + Logic::_scriptVars[POCKET_51] = 1; + Logic::_scriptVars[POCKET_52] = 1; } //------------------------------------------------------------------------------------------------------- else if (startNumber==5) // court_yard { - SwordLogic::_scriptVars[CHANGE_X] = 400; - SwordLogic::_scriptVars[CHANGE_Y] = 400; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_5; + Logic::_scriptVars[CHANGE_X] = 400; + Logic::_scriptVars[CHANGE_Y] = 400; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_5; } //------------------------------------------------------------------------------------------------------- else if (startNumber==7) // sewer_two { - SwordLogic::_scriptVars[CHANGE_X] = 520; - SwordLogic::_scriptVars[CHANGE_Y] = 310; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_7; + Logic::_scriptVars[CHANGE_X] = 520; + Logic::_scriptVars[CHANGE_Y] = 310; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_7; } //------------------------------------------------------------------------------------------------------- else if (startNumber==8) // cafe_repaired { - SwordLogic::_scriptVars[CHANGE_X] = 481; - SwordLogic::_scriptVars[CHANGE_Y] = 413; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_8; + Logic::_scriptVars[CHANGE_X] = 481; + Logic::_scriptVars[CHANGE_Y] = 413; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_8; } //------------------------------------------------------------------------------------------------------- else if (startNumber==11) // costumier { - SwordLogic::_scriptVars[CHANGE_X] = 264; - SwordLogic::_scriptVars[CHANGE_Y] = 436; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_11; + Logic::_scriptVars[CHANGE_X] = 264; + Logic::_scriptVars[CHANGE_Y] = 436; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_11; _logic->fnAddObject(0,0,TISSUE,0,0,0,0,0); _logic->fnAddObject(0,0,PHOTOGRAPH,0,0,0,0,0); @@ -331,29 +335,29 @@ void SwordEngine::startPositions(int32 startNumber) { // HOTEL SECTION else if (startNumber==12) // hotel_street { - SwordLogic::_scriptVars[CHANGE_X] = 730; - SwordLogic::_scriptVars[CHANGE_Y] = 460; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_12; + Logic::_scriptVars[CHANGE_X] = 730; + Logic::_scriptVars[CHANGE_Y] = 460; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_12; - SwordLogic::_scriptVars[PARIS_FLAG] = 6; + Logic::_scriptVars[PARIS_FLAG] = 6; _logic->fnAddObject(0,0,PHOTOGRAPH,0,0,0,0,0); - SwordLogic::_scriptVars[NICO_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[NICO_PHONE_FLAG] = 1; - SwordLogic::_scriptVars[COSTUMES_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[HOTEL_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[AEROPORT_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[TAILOR_PHONE_FLAG] = 1; + Logic::_scriptVars[NICO_ADDRESS_FLAG] = 1; + Logic::_scriptVars[NICO_PHONE_FLAG] = 1; + Logic::_scriptVars[COSTUMES_ADDRESS_FLAG] = 1; + Logic::_scriptVars[HOTEL_ADDRESS_FLAG] = 1; + Logic::_scriptVars[AEROPORT_ADDRESS_FLAG] = 1; + Logic::_scriptVars[TAILOR_PHONE_FLAG] = 1; } //------------------------------------------------------------------------------------------------------- else if (startNumber==14) // hotel_corridor { - SwordLogic::_scriptVars[CHANGE_X] = 528; - SwordLogic::_scriptVars[CHANGE_Y] = 484; - SwordLogic::_scriptVars[CHANGE_DIR] = UP; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_14; + Logic::_scriptVars[CHANGE_X] = 528; + Logic::_scriptVars[CHANGE_Y] = 484; + Logic::_scriptVars[CHANGE_DIR] = UP; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_14; _logic->fnAddObject(0,0,HOTEL_KEY,0,0,0,0,0); _logic->fnAddObject(0,0,MANUSCRIPT,0,0,0,0,0); @@ -361,43 +365,43 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==17) // hotel_assassin { - SwordLogic::_scriptVars[CHANGE_X] = 714; - SwordLogic::_scriptVars[CHANGE_Y] = 484; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_17; + Logic::_scriptVars[CHANGE_X] = 714; + Logic::_scriptVars[CHANGE_Y] = 484; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_17; } //------------------------------------------------------------------------------------------------------- else if (startNumber==18) // gendarmerie { - SwordLogic::_scriptVars[CHANGE_X] = 446; - SwordLogic::_scriptVars[CHANGE_Y] = 408; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_18; + Logic::_scriptVars[CHANGE_X] = 446; + Logic::_scriptVars[CHANGE_Y] = 408; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_18; - SwordLogic::_scriptVars[PARIS_FLAG] = 5; // for Moue & Rosso + Logic::_scriptVars[PARIS_FLAG] = 5; // for Moue & Rosso } //------------------------------------------------------------------------------------------------------- // MUSEUM RAID else if (startNumber==27) // museum_street { - SwordLogic::_scriptVars[CHANGE_X] = 300; - SwordLogic::_scriptVars[CHANGE_Y] = 510; - SwordLogic::_scriptVars[CHANGE_DIR] = UP_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_27; + Logic::_scriptVars[CHANGE_X] = 300; + Logic::_scriptVars[CHANGE_Y] = 510; + Logic::_scriptVars[CHANGE_DIR] = UP_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_27; - SwordLogic::_scriptVars[PARIS_FLAG] = 12; // for Lobineau in Museum - SwordLogic::_scriptVars[MANUSCRIPT_ON_TABLE_10_FLAG] = 1; + Logic::_scriptVars[PARIS_FLAG] = 12; // for Lobineau in Museum + Logic::_scriptVars[MANUSCRIPT_ON_TABLE_10_FLAG] = 1; } //------------------------------------------------------------------------------------------------------- // HOSPITAL SECTION else if (startNumber==31) // hospital_street { - SwordLogic::_scriptVars[CHANGE_X] = 400; - SwordLogic::_scriptVars[CHANGE_Y] = 500; - SwordLogic::_scriptVars[CHANGE_DIR] = UP_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_31; + Logic::_scriptVars[CHANGE_X] = 400; + Logic::_scriptVars[CHANGE_Y] = 500; + Logic::_scriptVars[CHANGE_DIR] = UP_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_31; - SwordLogic::_scriptVars[PARIS_FLAG] = 11; + Logic::_scriptVars[PARIS_FLAG] = 11; _logic->fnAddObject(0,0,PHOTOGRAPH,0,0,0,0,0); _logic->fnAddObject(0,0,LAB_PASS,0,0,0,0,0); @@ -405,28 +409,28 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==32) // hospital_desk (after we've found out where Marquet is) { - SwordLogic::_scriptVars[CHANGE_X] = 405; - SwordLogic::_scriptVars[CHANGE_Y] = 446; - SwordLogic::_scriptVars[CHANGE_DIR] = UP_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_32; + Logic::_scriptVars[CHANGE_X] = 405; + Logic::_scriptVars[CHANGE_Y] = 446; + Logic::_scriptVars[CHANGE_DIR] = UP_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_32; - SwordLogic::_scriptVars[PARIS_FLAG] = 11; + Logic::_scriptVars[PARIS_FLAG] = 11; - SwordLogic::_scriptVars[EVA_TEXT] = 1; // talked to eva - SwordLogic::_scriptVars[EVA_MARQUET_FLAG] = 2; - SwordLogic::_scriptVars[EVA_NURSE_FLAG] = 4; - SwordLogic::_scriptVars[FOUND_WARD_FLAG] = 1; - SwordLogic::_scriptVars[CONSULTANT_HERE] = 1; + Logic::_scriptVars[EVA_TEXT] = 1; // talked to eva + Logic::_scriptVars[EVA_MARQUET_FLAG] = 2; + Logic::_scriptVars[EVA_NURSE_FLAG] = 4; + Logic::_scriptVars[FOUND_WARD_FLAG] = 1; + Logic::_scriptVars[CONSULTANT_HERE] = 1; - compact = (BsObject*)_objectMan->fetchObject(PLAYER); + compact = (Object*)_objectMan->fetchObject(PLAYER); _logic->fnMegaSet(compact,PLAYER,GEORGE_WLK,MEGA_WHITE,0,0,0,0); - SwordLogic::_scriptVars[GEORGE_CDT_FLAG] = WHT_TLK_TABLE; - SwordLogic::_scriptVars[GEORGE_TALK_FLAG] = 0; - SwordLogic::_scriptVars[WHITE_COAT_FLAG] = 1; - SwordLogic::_scriptVars[GEORGE_ALLOWED_REST_ANIMS] = 0; // because wearing white coat now + Logic::_scriptVars[GEORGE_CDT_FLAG] = WHT_TLK_TABLE; + Logic::_scriptVars[GEORGE_TALK_FLAG] = 0; + Logic::_scriptVars[WHITE_COAT_FLAG] = 1; + Logic::_scriptVars[GEORGE_ALLOWED_REST_ANIMS] = 0; // because wearing white coat now - SwordLogic::_scriptVars[GOT_BENOIR_FLAG] = 1; + Logic::_scriptVars[GOT_BENOIR_FLAG] = 1; _logic->fnAddObject(0,0,PHOTOGRAPH,0,0,0,0,0); _logic->fnAddObject(0,0,LAB_PASS,0,0,0,0,0); @@ -434,53 +438,53 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==35) // hospital_jacques { - SwordLogic::_scriptVars[CHANGE_X] = 640; - SwordLogic::_scriptVars[CHANGE_Y] = 500; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_35; + Logic::_scriptVars[CHANGE_X] = 640; + Logic::_scriptVars[CHANGE_Y] = 500; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_35; - SwordLogic::_scriptVars[PARIS_FLAG] = 11; + Logic::_scriptVars[PARIS_FLAG] = 11; - SwordLogic::_scriptVars[EVA_TEXT] = 1; // talked to eva - SwordLogic::_scriptVars[EVA_MARQUET_FLAG] = 2; - SwordLogic::_scriptVars[EVA_NURSE_FLAG] = 4; - SwordLogic::_scriptVars[FOUND_WARD_FLAG] = 1; - SwordLogic::_scriptVars[CONSULTANT_HERE] = 1; + Logic::_scriptVars[EVA_TEXT] = 1; // talked to eva + Logic::_scriptVars[EVA_MARQUET_FLAG] = 2; + Logic::_scriptVars[EVA_NURSE_FLAG] = 4; + Logic::_scriptVars[FOUND_WARD_FLAG] = 1; + Logic::_scriptVars[CONSULTANT_HERE] = 1; - compact = (BsObject*)_objectMan->fetchObject(PLAYER); + compact = (Object*)_objectMan->fetchObject(PLAYER); _logic->fnMegaSet(compact,PLAYER,GEORGE_WLK,MEGA_WHITE,0,0,0,0); - SwordLogic::_scriptVars[GEORGE_CDT_FLAG] = WHT_TLK_TABLE; - SwordLogic::_scriptVars[GEORGE_TALK_FLAG] = 0; - SwordLogic::_scriptVars[WHITE_COAT_FLAG] = 1; - SwordLogic::_scriptVars[GEORGE_ALLOWED_REST_ANIMS] = 0; // because wearing white coat now - SwordLogic::_scriptVars[DOOR_34_OPEN] = 1; + Logic::_scriptVars[GEORGE_CDT_FLAG] = WHT_TLK_TABLE; + Logic::_scriptVars[GEORGE_TALK_FLAG] = 0; + Logic::_scriptVars[WHITE_COAT_FLAG] = 1; + Logic::_scriptVars[GEORGE_ALLOWED_REST_ANIMS] = 0; // because wearing white coat now + Logic::_scriptVars[DOOR_34_OPEN] = 1; - SwordLogic::_scriptVars[GOT_BENOIR_FLAG] = 2; - SwordLogic::_scriptVars[HOS_POS_FLAG] = 26; - SwordLogic::_scriptVars[BENOIR_FLAG] = 24; // for 'george_enters_ward' script + Logic::_scriptVars[GOT_BENOIR_FLAG] = 2; + Logic::_scriptVars[HOS_POS_FLAG] = 26; + Logic::_scriptVars[BENOIR_FLAG] = 24; // for 'george_enters_ward' script } //------------------------------------------------------------------------------------------------------- else if (startNumber==36) // montfaucon { - SwordLogic::_scriptVars[CHANGE_X] = 300; - SwordLogic::_scriptVars[CHANGE_Y] = 480; - SwordLogic::_scriptVars[CHANGE_DIR] = RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_36; + Logic::_scriptVars[CHANGE_X] = 300; + Logic::_scriptVars[CHANGE_Y] = 480; + Logic::_scriptVars[CHANGE_DIR] = RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_36; _logic->fnAddObject(0,0,LENS,0,0,0,0,0); _logic->fnAddObject(0,0,RED_NOSE,0,0,0,0,0); _logic->fnAddObject(0,0,LIFTING_KEYS,0,0,0,0,0); - SwordLogic::_scriptVars[MONTFAUCON_CONTROL_FLAG] = 1; + Logic::_scriptVars[MONTFAUCON_CONTROL_FLAG] = 1; } //------------------------------------------------------------------------------------------------------- else if (startNumber==37) // catacomb_sewer { - SwordLogic::_scriptVars[CHANGE_X] = 592; - SwordLogic::_scriptVars[CHANGE_Y] = 386; - SwordLogic::_scriptVars[CHANGE_DIR] = RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_37; + Logic::_scriptVars[CHANGE_X] = 592; + Logic::_scriptVars[CHANGE_Y] = 386; + Logic::_scriptVars[CHANGE_DIR] = RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_37; _logic->fnAddObject(0,0,LIFTING_KEYS,0,0,0,0,0); _logic->fnAddObject(0,0,TRIPOD,0,0,0,0,0); @@ -489,10 +493,10 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==38) // catacomb_room { - SwordLogic::_scriptVars[CHANGE_X] = 200; - SwordLogic::_scriptVars[CHANGE_Y] = 390; - SwordLogic::_scriptVars[CHANGE_DIR] = RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_38; + Logic::_scriptVars[CHANGE_X] = 200; + Logic::_scriptVars[CHANGE_Y] = 390; + Logic::_scriptVars[CHANGE_DIR] = RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_38; _logic->fnAddObject(0,0,TRIPOD,0,0,0,0,0); _logic->fnAddObject(0,0,GEM,0,0,0,0,0); @@ -500,12 +504,12 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==39) // catacomb_meeting { - SwordLogic::_scriptVars[CHANGE_X] = 636; - SwordLogic::_scriptVars[CHANGE_Y] = 413; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_39; + Logic::_scriptVars[CHANGE_X] = 636; + Logic::_scriptVars[CHANGE_Y] = 413; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_39; - SwordLogic::_scriptVars[MEETING_FLAG] = 3; // meeting finished + Logic::_scriptVars[MEETING_FLAG] = 3; // meeting finished _logic->fnAddObject(0,0,TRIPOD,0,0,0,0,0); _logic->fnAddObject(0,0,GEM,0,0,0,0,0); @@ -513,13 +517,13 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==40) // excavation_exterior { - SwordLogic::_scriptVars[CHANGE_X] = 648; - SwordLogic::_scriptVars[CHANGE_Y] = 492; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_40; + Logic::_scriptVars[CHANGE_X] = 648; + Logic::_scriptVars[CHANGE_Y] = 492; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_40; - SwordLogic::_scriptVars[NICO_PHONE_FLAG] = 1; - SwordLogic::_scriptVars[PARIS_FLAG] = 16; + Logic::_scriptVars[NICO_PHONE_FLAG] = 1; + Logic::_scriptVars[PARIS_FLAG] = 16; _logic->fnAddObject(0,0,PLASTER,0,0,0,0,0); _logic->fnAddObject(0,0,POLISHED_CHALICE,0,0,0,0,0); @@ -527,70 +531,70 @@ void SwordEngine::startPositions(int32 startNumber) { //------------------------------------------------------------------------------------------------------- else if (startNumber==48) // templar_church { - SwordLogic::_scriptVars[CHANGE_X] = 315; - SwordLogic::_scriptVars[CHANGE_Y] = 392; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_48; + Logic::_scriptVars[CHANGE_X] = 315; + Logic::_scriptVars[CHANGE_Y] = 392; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_48; _logic->fnAddObject(0,0,CHALICE,0,0,0,0,0); _logic->fnAddObject(0,0,LENS,0,0,0,0,0); - SwordLogic::_scriptVars[CHALICE_FLAG] = 2; // from end of Spain1, when George gets chalice - SwordLogic::_scriptVars[NEJO_TEXT] = 1; // so priest is there + Logic::_scriptVars[CHALICE_FLAG] = 2; // from end of Spain1, when George gets chalice + Logic::_scriptVars[NEJO_TEXT] = 1; // so priest is there } //------------------------------------------------------------------------------------------------------- else if (startNumber==99) // test text+speech on blank screen (sc99) { - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_99; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_99; // if (testingText) if (1) { // lastLineNo = testTextSection*65536 + LastTextNumber(testTextSection); - SwordLogic::_scriptVars[LASTLINENO] = 146*65536 + _objectMan->lastTextNumber(146); // don't finished until at last line in last section + Logic::_scriptVars[LASTLINENO] = 146*65536 + _objectMan->lastTextNumber(146); // don't finished until at last line in last section } } //------------------------------------------------------------------------------------------------------- else if (startNumber==80) // Paris Map { - SwordLogic::_scriptVars[CHANGE_X] = 645; - SwordLogic::_scriptVars[CHANGE_Y] = 160; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_80; + Logic::_scriptVars[CHANGE_X] = 645; + Logic::_scriptVars[CHANGE_Y] = 160; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_80; - SwordLogic::_scriptVars[PARIS_FLAG] = 3; // for Nico's appartment - SwordLogic::_scriptVars[NICO_CLOWN_FLAG] = 3; + Logic::_scriptVars[PARIS_FLAG] = 3; // for Nico's appartment + Logic::_scriptVars[NICO_CLOWN_FLAG] = 3; - SwordLogic::_scriptVars[NICO_DOOR_FLAG] = 2; // for instant access to Nico's appartment + Logic::_scriptVars[NICO_DOOR_FLAG] = 2; // for instant access to Nico's appartment _logic->fnAddObject(0,0,RED_NOSE,0,0,0,0,0); _logic->fnAddObject(0,0,PHOTOGRAPH,0,0,0,0,0); _logic->fnAddObject(0,0,PLASTER,0,0,0,0,0); _logic->fnAddObject(0,0,LAB_PASS,0,0,0,0,0); // for hospital - SwordLogic::_scriptVars[MANUSCRIPT_FLAG] = 1; + Logic::_scriptVars[MANUSCRIPT_FLAG] = 1; - SwordLogic::_scriptVars[NICO_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[NICO_PHONE_FLAG] = 1; - SwordLogic::_scriptVars[COSTUMES_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[HOTEL_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[MUSEUM_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[HOSPITAL_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[MONTFACN_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[AEROPORT_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[NERVAL_ADDRESS_FLAG] = 1; + Logic::_scriptVars[NICO_ADDRESS_FLAG] = 1; + Logic::_scriptVars[NICO_PHONE_FLAG] = 1; + Logic::_scriptVars[COSTUMES_ADDRESS_FLAG] = 1; + Logic::_scriptVars[HOTEL_ADDRESS_FLAG] = 1; + Logic::_scriptVars[MUSEUM_ADDRESS_FLAG] = 1; + Logic::_scriptVars[HOSPITAL_ADDRESS_FLAG] = 1; + Logic::_scriptVars[MONTFACN_ADDRESS_FLAG] = 1; + Logic::_scriptVars[AEROPORT_ADDRESS_FLAG] = 1; + Logic::_scriptVars[NERVAL_ADDRESS_FLAG] = 1; - SwordLogic::_scriptVars[IRELAND_MAP_FLAG] = 1; - SwordLogic::_scriptVars[SPAIN_MAP_FLAG] = 1; - SwordLogic::_scriptVars[SYRIA_FLAG] = 2; + Logic::_scriptVars[IRELAND_MAP_FLAG] = 1; + Logic::_scriptVars[SPAIN_MAP_FLAG] = 1; + Logic::_scriptVars[SYRIA_FLAG] = 2; - SwordLogic::_scriptVars[TAILOR_PHONE_FLAG] = 1; + Logic::_scriptVars[TAILOR_PHONE_FLAG] = 1; } //------------------------------------------------------------------------------------------------------- // IRELAND else if ((startNumber>=19)&&(startNumber<=26)) { - SwordLogic::_scriptVars[PARIS_FLAG] = 9; + Logic::_scriptVars[PARIS_FLAG] = 9; // already carrying these objects by the time we reach Ireland... _logic->fnAddObject(0,0,RED_NOSE,0,0,0,0,0); @@ -606,93 +610,93 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 19: // ireland_street { - SwordLogic::_scriptVars[CHANGE_X] = 256; - SwordLogic::_scriptVars[CHANGE_Y] = 966; - SwordLogic::_scriptVars[CHANGE_DIR] = UP_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_19; + Logic::_scriptVars[CHANGE_X] = 256; + Logic::_scriptVars[CHANGE_Y] = 966; + Logic::_scriptVars[CHANGE_DIR] = UP_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_19; } break; //--------------------------- case 20: // macdevitts { - SwordLogic::_scriptVars[CHANGE_X] = 194; - SwordLogic::_scriptVars[CHANGE_Y] = 417; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_20; + Logic::_scriptVars[CHANGE_X] = 194; + Logic::_scriptVars[CHANGE_Y] = 417; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_20; - SwordLogic::_scriptVars[FARMER_MOVED_FLAG] = 1; - SwordLogic::_scriptVars[FARMER_SEAN_FLAG] = 5; + Logic::_scriptVars[FARMER_MOVED_FLAG] = 1; + Logic::_scriptVars[FARMER_SEAN_FLAG] = 5; - SwordLogic::_scriptVars[PUB_FLAP_FLAG] = 1; - SwordLogic::_scriptVars[PUB_TRAP_DOOR] = 2; - SwordLogic::_scriptVars[KNOWS_PEAGRAM_FLAG] = 1; + Logic::_scriptVars[PUB_FLAP_FLAG] = 1; + Logic::_scriptVars[PUB_TRAP_DOOR] = 2; + Logic::_scriptVars[KNOWS_PEAGRAM_FLAG] = 1; } break; //--------------------------- case 21: // pub_cellar { - SwordLogic::_scriptVars[CHANGE_X] = 291; - SwordLogic::_scriptVars[CHANGE_Y] = 444; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_21; + Logic::_scriptVars[CHANGE_X] = 291; + Logic::_scriptVars[CHANGE_Y] = 444; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_21; _logic->fnAddObject(0,0,BEER_TOWEL,0,0,0,0,0); - SwordLogic::_scriptVars[FARMER_MOVED_FLAG] = 1; - SwordLogic::_scriptVars[FLEECY_STUCK] = 1; - SwordLogic::_scriptVars[LIFTING_KEYS_IN_HOLE_23] = 1; + Logic::_scriptVars[FARMER_MOVED_FLAG] = 1; + Logic::_scriptVars[FLEECY_STUCK] = 1; + Logic::_scriptVars[LIFTING_KEYS_IN_HOLE_23] = 1; } break; //--------------------------- case 22: // castle_gate { - SwordLogic::_scriptVars[CHANGE_X] = 547; - SwordLogic::_scriptVars[CHANGE_Y] = 500; - SwordLogic::_scriptVars[CHANGE_DIR] = UP_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_22; + Logic::_scriptVars[CHANGE_X] = 547; + Logic::_scriptVars[CHANGE_Y] = 500; + Logic::_scriptVars[CHANGE_DIR] = UP_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_22; - SwordLogic::_scriptVars[IRELAND_FLAG] = 4; // so we can get rid of farmer + Logic::_scriptVars[IRELAND_FLAG] = 4; // so we can get rid of farmer } break; //--------------------------- case 23: // castle_hay_top { - SwordLogic::_scriptVars[CHANGE_X] = 535; - SwordLogic::_scriptVars[CHANGE_Y] = 510; - SwordLogic::_scriptVars[CHANGE_DIR] = UP; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_23; + Logic::_scriptVars[CHANGE_X] = 535; + Logic::_scriptVars[CHANGE_Y] = 510; + Logic::_scriptVars[CHANGE_DIR] = UP; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_23; } break; //--------------------------- case 24: // castle_yard { - SwordLogic::_scriptVars[CHANGE_X] = 815; - SwordLogic::_scriptVars[CHANGE_Y] = 446; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_24; + Logic::_scriptVars[CHANGE_X] = 815; + Logic::_scriptVars[CHANGE_Y] = 446; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_24; } break; //--------------------------- case 25: // castle_dig { - SwordLogic::_scriptVars[CHANGE_X] = 369; - SwordLogic::_scriptVars[CHANGE_Y] = 492; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_25; + Logic::_scriptVars[CHANGE_X] = 369; + Logic::_scriptVars[CHANGE_Y] = 492; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_25; _logic->fnAddObject(0,0,BEER_TOWEL,0,0,0,0,0); - SwordLogic::_scriptVars[BEER_TOWEL_BEEN_WET] = 1; - SwordLogic::_scriptVars[WET_BEER_TOWEL_TIMER] = 1000; + Logic::_scriptVars[BEER_TOWEL_BEEN_WET] = 1; + Logic::_scriptVars[WET_BEER_TOWEL_TIMER] = 1000; } break; //--------------------------- case 26: // cellar_dark { - SwordLogic::_scriptVars[CHANGE_X] = 291; - SwordLogic::_scriptVars[CHANGE_Y] = 444; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_26; + Logic::_scriptVars[CHANGE_X] = 291; + Logic::_scriptVars[CHANGE_Y] = 444; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_26; } break; //--------------------------- @@ -703,7 +707,7 @@ void SwordEngine::startPositions(int32 startNumber) { else if ((startNumber >= 45) && (startNumber <= 55)) { - SwordLogic::_scriptVars[PARIS_FLAG] = 1; + Logic::_scriptVars[PARIS_FLAG] = 1; // already carrying these objects by the time we reach Syria... _logic->fnAddObject(0,0,BALL,0,0,0,0,0); @@ -714,35 +718,35 @@ void SwordEngine::startPositions(int32 startNumber) { _logic->fnAddObject(0,0,BUZZER,0,0,0,0,0); _logic->fnAddObject(0,0,TISSUE,0,0,0,0,0); - SwordLogic::_scriptVars[CHANGE_STANCE] = STAND; // use STAND for all starts + Logic::_scriptVars[CHANGE_STANCE] = STAND; // use STAND for all starts switch (startNumber) { //--------------------------- case 45: // syria_stall { - SwordLogic::_scriptVars[CHANGE_X] = 410; - SwordLogic::_scriptVars[CHANGE_Y] = 490; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_45; + Logic::_scriptVars[CHANGE_X] = 410; + Logic::_scriptVars[CHANGE_Y] = 490; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_45; } break; //--------------------------- case 47: // syria_carpet { - SwordLogic::_scriptVars[CHANGE_X] = 225; - SwordLogic::_scriptVars[CHANGE_Y] = 775; - SwordLogic::_scriptVars[CHANGE_DIR] = RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_47; + Logic::_scriptVars[CHANGE_X] = 225; + Logic::_scriptVars[CHANGE_Y] = 775; + Logic::_scriptVars[CHANGE_DIR] = RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_47; } break; //--------------------------- case 49: // syria_club { - SwordLogic::_scriptVars[CHANGE_X] = 438; - SwordLogic::_scriptVars[CHANGE_Y] = 400; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_49; + Logic::_scriptVars[CHANGE_X] = 438; + Logic::_scriptVars[CHANGE_Y] = 400; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_49; _logic->fnAddObject(0,0,TOILET_BRUSH,0,0,0,0,0); } @@ -750,10 +754,10 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 50: // syria_toilet { - SwordLogic::_scriptVars[CHANGE_X] = 313; - SwordLogic::_scriptVars[CHANGE_Y] = 440; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_50; + Logic::_scriptVars[CHANGE_X] = 313; + Logic::_scriptVars[CHANGE_Y] = 440; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_50; _logic->fnAddObject(0,0,TOILET_KEY,0,0,0,0,0); } @@ -761,7 +765,7 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 53: // bull_head pan { - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_53; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_53; _logic->fnAddObject(0,0,TOWEL_CUT,0,0,0,0,0); } @@ -769,10 +773,10 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 54: // bull_head { - SwordLogic::_scriptVars[CHANGE_X] = 680; - SwordLogic::_scriptVars[CHANGE_Y] = 425; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_54; + Logic::_scriptVars[CHANGE_X] = 680; + Logic::_scriptVars[CHANGE_Y] = 425; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_54; _logic->fnAddObject(0,0,TOWEL_CUT,0,0,0,0,0); } @@ -780,10 +784,10 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 55: // bull_secret { - SwordLogic::_scriptVars[CHANGE_X] = 825; - SwordLogic::_scriptVars[CHANGE_Y] = 373; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_55; + Logic::_scriptVars[CHANGE_X] = 825; + Logic::_scriptVars[CHANGE_Y] = 373; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_55; } break; //--------------------------- @@ -801,15 +805,15 @@ void SwordEngine::startPositions(int32 startNumber) { else if ( ((startNumber >= 56) && (startNumber <= 62)) || ((startNumber >=956) && (startNumber <= 962)) ) { - SwordLogic::_scriptVars[PARIS_FLAG] = 1; + Logic::_scriptVars[PARIS_FLAG] = 1; if (startNumber > 900) // SPAIN 2 { startNumber -= 900; // set to correct start location - SwordLogic::_scriptVars[SPAIN_VISIT] = 2; // set my own script flag to indicate 2nd visit + Logic::_scriptVars[SPAIN_VISIT] = 2; // set my own script flag to indicate 2nd visit } else - SwordLogic::_scriptVars[SPAIN_VISIT] = 1; // set my own script flag to indicate 1st visit + Logic::_scriptVars[SPAIN_VISIT] = 1; // set my own script flag to indicate 1st visit // already carrying these objects by the time we reach Spain... _logic->fnAddObject(0,0,RED_NOSE,0,0,0,0,0); @@ -821,7 +825,7 @@ void SwordEngine::startPositions(int32 startNumber) { _logic->fnAddObject(0,0,BALL,0,0,0,0,0); _logic->fnAddObject(0,0,MATCHBOOK,0,0,0,0,0); - if (SwordLogic::_scriptVars[SPAIN_VISIT] == 1) // 1st visit + if (Logic::_scriptVars[SPAIN_VISIT] == 1) // 1st visit _logic->fnAddObject(0,0,PRESSURE_GAUGE,0,0,0,0,0); else // 2nd visit _logic->fnAddObject(0,0,POLISHED_CHALICE,0,0,0,0,0); @@ -831,55 +835,55 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 56: // Countess' room { - SwordLogic::_scriptVars[CHANGE_X] = 572; - SwordLogic::_scriptVars[CHANGE_Y] = 443; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_56; + Logic::_scriptVars[CHANGE_X] = 572; + Logic::_scriptVars[CHANGE_Y] = 443; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_56; } break; //--------------------------- case 57: // Spain Drive { - SwordLogic::_scriptVars[CHANGE_X] = 1630; - SwordLogic::_scriptVars[CHANGE_Y] = 460; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_57; + Logic::_scriptVars[CHANGE_X] = 1630; + Logic::_scriptVars[CHANGE_Y] = 460; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_57; } break; //--------------------------- case 58: // Mausoleum Exterior { - SwordLogic::_scriptVars[CHANGE_X] = SC58_PATH_X; - SwordLogic::_scriptVars[CHANGE_Y] = SC58_PATH_Y; - SwordLogic::_scriptVars[CHANGE_DIR] = UP_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_58; + Logic::_scriptVars[CHANGE_X] = SC58_PATH_X; + Logic::_scriptVars[CHANGE_Y] = SC58_PATH_Y; + Logic::_scriptVars[CHANGE_DIR] = UP_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_58; } break; //--------------------------- case 59: // Mausoleum Interior { - SwordLogic::_scriptVars[CHANGE_X] = 750; - SwordLogic::_scriptVars[CHANGE_Y] = 455; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_59; + Logic::_scriptVars[CHANGE_X] = 750; + Logic::_scriptVars[CHANGE_Y] = 455; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_59; } break; //--------------------------- case 60: // Spain Reception { - SwordLogic::_scriptVars[CHANGE_X] = 750; - SwordLogic::_scriptVars[CHANGE_Y] = 475; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_60; + Logic::_scriptVars[CHANGE_X] = 750; + Logic::_scriptVars[CHANGE_Y] = 475; + Logic::_scriptVars[CHANGE_DIR] = DOWN_LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_60; } break; //--------------------------- case 61: // Spain Well { - SwordLogic::_scriptVars[CHANGE_X] = 400; - SwordLogic::_scriptVars[CHANGE_Y] = 345; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = LEFT_FLOOR_61; + Logic::_scriptVars[CHANGE_X] = 400; + Logic::_scriptVars[CHANGE_Y] = 345; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = LEFT_FLOOR_61; _logic->fnAddObject(0,0,STONE_KEY,0,0,0,0,0); _logic->fnAddObject(0,0,MIRROR,0,0,0,0,0); @@ -888,12 +892,12 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 62: // CHESS PUZZLE { - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_62; // so it doesn't crash!! + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_62; // so it doesn't crash!! _logic->_scriptVars[TOP_MENU_DISABLED] = 1; // because it's irrelevant to the chess puzzle _logic->_scriptVars[GEORGE_ALLOWED_REST_ANIMS] = 0; // because it's irrelevant to the chess puzzle - compact = (BsObject*)_objectMan->fetchObject(PLAYER); + compact = (Object*)_objectMan->fetchObject(PLAYER); _logic->fnNoSprite(compact, PLAYER, 0, 0, 0, 0, 0, 0); } break; @@ -905,58 +909,58 @@ void SwordEngine::startPositions(int32 startNumber) { else if ((startNumber >= 63) && (startNumber <= 70)) { - SwordLogic::_scriptVars[PARIS_FLAG] = 18; + Logic::_scriptVars[PARIS_FLAG] = 18; switch (startNumber) { //--------------------------- case 63: // train_one { - SwordLogic::_scriptVars[CHANGE_X] = 710; - SwordLogic::_scriptVars[CHANGE_Y] = 450; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_63; - SwordLogic::_scriptVars[DOOR_SC65_FLAG] = 2; - SwordLogic::_scriptVars[DOOR_ONE_63_OPEN] = 0; - SwordLogic::_scriptVars[DOOR_65_OPEN] = 1; - SwordLogic::_scriptVars[VAIL_TEXT] = 1; + Logic::_scriptVars[CHANGE_X] = 710; + Logic::_scriptVars[CHANGE_Y] = 450; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_63; + Logic::_scriptVars[DOOR_SC65_FLAG] = 2; + Logic::_scriptVars[DOOR_ONE_63_OPEN] = 0; + Logic::_scriptVars[DOOR_65_OPEN] = 1; + Logic::_scriptVars[VAIL_TEXT] = 1; } break; //--------------------------- case 65: // compt_one { - SwordLogic::_scriptVars[CHANGE_X] = 460; - SwordLogic::_scriptVars[CHANGE_Y] = 430; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_65; + Logic::_scriptVars[CHANGE_X] = 460; + Logic::_scriptVars[CHANGE_Y] = 430; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_65; } //--------------------------- case 66: // compt_two { - SwordLogic::_scriptVars[CHANGE_X] = 460; - SwordLogic::_scriptVars[CHANGE_Y] = 430; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_66; + Logic::_scriptVars[CHANGE_X] = 460; + Logic::_scriptVars[CHANGE_Y] = 430; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_66; - SwordLogic::_scriptVars[WINDOW_66_OPEN] = 1; + Logic::_scriptVars[WINDOW_66_OPEN] = 1; } break; //--------------------------- case 67: // compt_three { - SwordLogic::_scriptVars[CHANGE_X] = 460; - SwordLogic::_scriptVars[CHANGE_Y] = 430; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_67; + Logic::_scriptVars[CHANGE_X] = 460; + Logic::_scriptVars[CHANGE_Y] = 430; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_67; } break; //--------------------------- case 69: // train_guard { - SwordLogic::_scriptVars[CHANGE_X] = 310; - SwordLogic::_scriptVars[CHANGE_Y] = 430; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_69; + Logic::_scriptVars[CHANGE_X] = 310; + Logic::_scriptVars[CHANGE_Y] = 430; + Logic::_scriptVars[CHANGE_DIR] = DOWN; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_69; } break; //--------------------------- @@ -973,7 +977,7 @@ void SwordEngine::startPositions(int32 startNumber) { else if ((startNumber >= 71) && (startNumber <= 73)) { - SwordLogic::_scriptVars[PARIS_FLAG] = 1; + Logic::_scriptVars[PARIS_FLAG] = 1; // already carrying these objects by the time we reach Scotland... _logic->fnAddObject(0,0,RED_NOSE,0,0,0,0,0); @@ -987,36 +991,36 @@ void SwordEngine::startPositions(int32 startNumber) { //--------------------------- case 71: // churchyard { - SwordLogic::_scriptVars[CHANGE_X] = 1538; - SwordLogic::_scriptVars[CHANGE_Y] = 444; - SwordLogic::_scriptVars[CHANGE_DIR] = LEFT; - SwordLogic::_scriptVars[CHANGE_PLACE] = RIGHT_FLOOR_71; + Logic::_scriptVars[CHANGE_X] = 1538; + Logic::_scriptVars[CHANGE_Y] = 444; + Logic::_scriptVars[CHANGE_DIR] = LEFT; + Logic::_scriptVars[CHANGE_PLACE] = RIGHT_FLOOR_71; - SwordLogic::_scriptVars[NICO_SCOT_SCREEN] = 71; - SwordLogic::_scriptVars[NICO_POSITION_71] = 1; + Logic::_scriptVars[NICO_SCOT_SCREEN] = 71; + Logic::_scriptVars[NICO_POSITION_71] = 1; } break; //--------------------------- case 72: // church_tower { - SwordLogic::_scriptVars[CHANGE_X] = 150; - SwordLogic::_scriptVars[CHANGE_Y] = 503; - SwordLogic::_scriptVars[CHANGE_DIR] = RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_72; + Logic::_scriptVars[CHANGE_X] = 150; + Logic::_scriptVars[CHANGE_Y] = 503; + Logic::_scriptVars[CHANGE_DIR] = RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_72; - SwordLogic::_scriptVars[NICO_SCOT_SCREEN] = 72; + Logic::_scriptVars[NICO_SCOT_SCREEN] = 72; } break; //--------------------------- case 73: // crypt { - SwordLogic::_scriptVars[CHANGE_X] = 250; - SwordLogic::_scriptVars[CHANGE_Y] = 390; - SwordLogic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; - SwordLogic::_scriptVars[CHANGE_PLACE] = FLOOR_73; + Logic::_scriptVars[CHANGE_X] = 250; + Logic::_scriptVars[CHANGE_Y] = 390; + Logic::_scriptVars[CHANGE_DIR] = DOWN_RIGHT; + Logic::_scriptVars[CHANGE_PLACE] = FLOOR_73; - SwordLogic::_scriptVars[NICO_SCOT_SCREEN] = 73; - SwordLogic::_scriptVars[NICO_POSITION_73] = 1; + Logic::_scriptVars[NICO_SCOT_SCREEN] = 73; + Logic::_scriptVars[NICO_POSITION_73] = 1; } break; //--------------------------- @@ -1027,7 +1031,7 @@ void SwordEngine::startPositions(int32 startNumber) { error("Can't start in location %d", startNumber); } - compact = (BsObject*)_objectMan->fetchObject(PLAYER); + compact = (Object*)_objectMan->fetchObject(PLAYER); _logic->fnEnterSection(compact, PLAYER, startNumber, 0, 0, 0, 0, 0); // (automatically opens the compact resource for that section) _systemVars.deathScreenFlag = 0; _systemVars.wantFade = true; @@ -1096,7 +1100,7 @@ void SwordEngine::go(void) { } void SwordEngine::checkCd(void) { - uint8 needCd = _cdList[SwordLogic::_scriptVars[NEW_SCREEN]]; + uint8 needCd = _cdList[Logic::_scriptVars[NEW_SCREEN]]; if (_systemVars.runningFromCd) { // are we running from cd? if (needCd == 0) { // needCd == 0 means we can use either CD1 or CD2. if (_systemVars.currentCD == 0) { @@ -1109,8 +1113,8 @@ void SwordEngine::checkCd(void) { _systemVars.currentCD = needCd; // askForCd will ask the player to insert _systemVars.currentCd, _control->askForCd(); // so it has to be updated before calling it. } - } else { // we're running from HDD, we don't have to care about music files and SwordSound will take care of - if (needCd) // switching sound.clu files on SwordSound::newScreen by itself, so there's nothing to be done. + } else { // we're running from HDD, we don't have to care about music files and Sound will take care of + if (needCd) // switching sound.clu files on Sound::newScreen by itself, so there's nothing to be done. _systemVars.currentCD = needCd; else if (_systemVars.currentCD == 0) _systemVars.currentCD = 1; @@ -1125,10 +1129,10 @@ uint8 SwordEngine::mainLoop(void) { // do we need the section45-hack from sword.c here? checkCd(); - _screen->newScreen(SwordLogic::_scriptVars[NEW_SCREEN]); - _logic->newScreen(SwordLogic::_scriptVars[NEW_SCREEN]); - _sound->newScreen(SwordLogic::_scriptVars[NEW_SCREEN]); - SwordLogic::_scriptVars[SCREEN] = SwordLogic::_scriptVars[NEW_SCREEN]; + _screen->newScreen(Logic::_scriptVars[NEW_SCREEN]); + _logic->newScreen(Logic::_scriptVars[NEW_SCREEN]); + _sound->newScreen(Logic::_scriptVars[NEW_SCREEN]); + Logic::_scriptVars[SCREEN] = Logic::_scriptVars[NEW_SCREEN]; do { uint32 newTime; @@ -1168,7 +1172,7 @@ uint8 SwordEngine::mainLoop(void) { if (_systemVars.forceRestart) retCode = CONTROL_RESTART_GAME; - else if (((_keyPressed == 63) && (SwordLogic::_scriptVars[MOUSE_STATUS] & 1)) || (_systemVars.deathScreenFlag)) { + else if (((_keyPressed == 63) && (Logic::_scriptVars[MOUSE_STATUS] & 1)) || (_systemVars.deathScreenFlag)) { retCode = _control->runPanel(); if (!retCode) _screen->fullRefresh(); @@ -1176,9 +1180,9 @@ uint8 SwordEngine::mainLoop(void) { _keyPressed = 0; // do something smart here to implement pausing the game. If we even want that, that is. - } while ((SwordLogic::_scriptVars[SCREEN] == SwordLogic::_scriptVars[NEW_SCREEN]) && (retCode == 0)); + } while ((Logic::_scriptVars[SCREEN] == Logic::_scriptVars[NEW_SCREEN]) && (retCode == 0)); - if ((retCode == 0) && (SwordLogic::_scriptVars[SCREEN] != 53) && _systemVars.wantFade) { + if ((retCode == 0) && (Logic::_scriptVars[SCREEN] != 53) && _systemVars.wantFade) { _screen->fadeDownPalette(); while (_screen->stillFading()) { _screen->updateScreen(); @@ -1188,7 +1192,7 @@ uint8 SwordEngine::mainLoop(void) { _sound->quitScreen(); _screen->quitScreen(); // close graphic resources - _objectMan->closeSection(SwordLogic::_scriptVars[SCREEN]); // close the section that PLAYER has just left, if it's empty now + _objectMan->closeSection(Logic::_scriptVars[SCREEN]); // close the section that PLAYER has just left, if it's empty now } return retCode; } @@ -1258,3 +1262,5 @@ void SwordEngine::delay(uint amount) { //copied and mutilated from sky.cpp cur = _system->get_msecs(); } while (cur < start + amount); } + +} // End of namespace Sword1 |