diff --git a/artifacts/config_files/elevators.ini b/artifacts/config_files/elevators.ini index b33863e9..984cf18e 100644 --- a/artifacts/config_files/elevators.ini +++ b/artifacts/config_files/elevators.ini @@ -40,7 +40,7 @@ Image=24 ButtonCount=3 ;Set the appearance of the elevator -MainFrm=148 -ButtonsFrm=151 +MainFrm=148 ; EL_VAULT.FRM +ButtonsFrm=151 ; EL_MIL3.FRM ;Set up the exit points for all three buttons (see examples above) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 546e8769..ad53c3c4 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -1,5 +1,5 @@ ;sfall configuration settings -;v3.8.26 +;v3.8.27 [Main] ;Change to 1 if you want to use command line args to tell sfall to use another ini file. diff --git a/sfall/Elevators.cpp b/sfall/Elevators.cpp index 9f84e19e..98a675c1 100644 --- a/sfall/Elevators.cpp +++ b/sfall/Elevators.cpp @@ -23,7 +23,7 @@ static const int exitsPerElevator = 4; static const int vanillaElevatorCount = 24; -static const int elevatorCount = 50; +static const int elevatorCount = 50; // The maximum allowed for Elevator stub in the BIS mapper static DWORD elevatorType[elevatorCount] = {0}; static sElevator elevators[elevatorCount] = {0}; // _retvals diff --git a/sfall/FalloutEngine.cpp b/sfall/FalloutEngine.cpp index 461cd1d6..6ac6f7c6 100644 --- a/sfall/FalloutEngine.cpp +++ b/sfall/FalloutEngine.cpp @@ -129,6 +129,7 @@ DWORD* ptr_master_volume = reinterpret_cast(_master_volume) DWORD* ptr_max = reinterpret_cast(_max); long* ptr_maxScriptNum = reinterpret_cast(_maxScriptNum); DWORD* ptr_Meet_Frank_Horrigan = reinterpret_cast(_Meet_Frank_Horrigan); +const char** ptr_movie_list = reinterpret_cast(_movie_list); // array of 17 char* DWORD* ptr_mouse_hotx = reinterpret_cast(_mouse_hotx); DWORD* ptr_mouse_hoty = reinterpret_cast(_mouse_hoty); DWORD* ptr_mouse_is_hidden = reinterpret_cast(_mouse_is_hidden); diff --git a/sfall/FalloutEngine.h b/sfall/FalloutEngine.h index 2421a218..852fee97 100644 --- a/sfall/FalloutEngine.h +++ b/sfall/FalloutEngine.h @@ -167,6 +167,7 @@ #define _maxScriptNum 0x51C7CC #define _Meet_Frank_Horrigan 0x672E04 #define _Move_on_Car 0x672E64 +#define _movie_list 0x518DA0 #define _mouse_hotx 0x6AC7D0 #define _mouse_hoty 0x6AC7CC #define _mouse_is_hidden 0x6AC790 @@ -410,6 +411,7 @@ extern DWORD* ptr_master_volume; extern DWORD* ptr_max; extern long* ptr_maxScriptNum; extern DWORD* ptr_Meet_Frank_Horrigan; +extern const char** ptr_movie_list; // array of 17 char* extern DWORD* ptr_mouse_hotx; extern DWORD* ptr_mouse_hoty; extern DWORD* ptr_mouse_is_hidden; @@ -1084,10 +1086,12 @@ long __stdcall PartyMemberGetCurrentLevel(TGameObj* obj); void __declspec() DebugPrintf(const char* fmt, ...); // Displays message in main UI console window -void __stdcall DisplayConsoleMessage(const char* msg); +void __stdcall DisplayPrint(const char* msg); long __stdcall GetInputBtn(); +const char* __stdcall Getmsg(const MSGList* fileAddr, MSGNode* result, long messageId); + // plays SFX sound with given name void __stdcall GsoundPlaySfxFile(const char* name); @@ -1330,6 +1334,8 @@ long __fastcall ObjNewSidInst(TGameObj* object, long sType, long scriptIndex); long __fastcall ObjectUnderMouse(long crSwitch, long inclDude, long elevation); +long __stdcall MessageSearch(const MSGList* file, MSGNode* msg); + // loads MSG file into given MessageList long __stdcall MessageLoad(MSGList *msgList, const char *msgFilePath); @@ -1435,7 +1441,7 @@ const char* MsgSearch(const MSGList* fileAddr, long messageId); char* GetProtoPtr(long pid); // returns weapon animation code -char AnimCodeByWeapon(TGameObj* weapon); +long AnimCodeByWeapon(TGameObj* weapon); // wrapper for skill_get_tags with bounds checking void SkillGetTags(long* result, long num); @@ -1505,3 +1511,5 @@ DWORD __stdcall GetMaxCharWidth(); // Redraw the given object on screen (does not always redraws the whole object) void __stdcall RedrawObject(TGameObj* obj); + +UNLSTDfrm *LoadUnlistedFrm(char *frmName, unsigned int folderRef); diff --git a/sfall/LoadGameHook.cpp b/sfall/LoadGameHook.cpp index d2cb3720..6cc781de 100644 --- a/sfall/LoadGameHook.cpp +++ b/sfall/LoadGameHook.cpp @@ -314,13 +314,13 @@ static void __declspec(naked) main_init_system_hook() { static void NewGame2() { ResetState(0); - dlogr("Starting new game", DL_MAIN); - - SetNewCharAppearanceGlobals(); - CritLoad(); - LoadGlobalScripts(); + SetNewCharAppearanceGlobals(); LoadHeroAppearance(); + LoadGlobalScripts(); + + dlogr("New Game started.", DL_MAIN); + gameLoaded = true; } diff --git a/sfall/Movies.cpp b/sfall/Movies.cpp index 2ce32c56..85880086 100644 --- a/sfall/Movies.cpp +++ b/sfall/Movies.cpp @@ -479,16 +479,14 @@ void MoviesInit() { strcpy_s(ininame, "Movie"); _itoa_s(i + 1, &ininame[5], 3, 10); if (i < 17) { - GetConfigString("Misc", ininame, (char*)(0x518DA0 + i * 4), &MoviePaths[i * 65], 65); + GetConfigString("Misc", ininame, ptr_movie_list[i], &MoviePaths[i * 65], 65); } else { GetConfigString("Misc", ininame, "", &MoviePaths[i * 65], 65); } } dlog(".", DL_INIT); - SafeWrite32(0x44E6AE, (DWORD)MoviePtrs); - SafeWrite32(0x44E721, (DWORD)MoviePtrs); - SafeWrite32(0x44E75E, (DWORD)MoviePtrs); - SafeWrite32(0x44E78A, (DWORD)MoviePtrs); + const DWORD movieListAddr[] = {0x44E6AE, 0x44E721, 0x44E75E, 0x44E78A}; + SafeWriteBatch((DWORD)MoviePtrs, movieListAddr); dlog(".", DL_INIT); /* diff --git a/sfall/version.h b/sfall/version.h index 56fd28b6..1e2ce3c9 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -24,11 +24,11 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 -#define VERSION_BUILD 26 +#define VERSION_BUILD 27 #define VERSION_REV 0 #ifdef WIN2K -#define VERSION_STRING "3.8.26 win2k" +#define VERSION_STRING "3.8.27 win2k" #else -#define VERSION_STRING "3.8.26" +#define VERSION_STRING "3.8.27" #endif