diff --git a/docs/progress.svg b/docs/progress.svg index 7b90d84e..4f6dda44 100644 --- a/docs/progress.svg +++ b/docs/progress.svg @@ -69,10 +69,10 @@ Tomb2.exe progress according to the physical function order: -28.82% (351) · 68.72% (837) · 0.66% (8) · 1.81% (22) +28.90% (352) · 68.64% (836) · 0.66% (8) · 1.81% (22) - - + + @@ -1077,7 +1077,7 @@ int32_t __cdecl Random_GetControl(void); void __cdecl Random_SeedControl(int32_t seed); int32_t __cdecl Random_GetDraw(void); -void __cdecl Random_SeedDraw(int32_t seed); +void __cdecl Random_SeedDraw(int32_t seed); void __cdecl GetValidLevelsList(REQUEST_INFO *req); void __cdecl GetSavedGamesList(REQUEST_INFO *req); void __cdecl DisplayCredits(void); @@ -1301,8 +1301,8 @@ Tomb2.exe progress according to the function sizes: 27.75% · 71.92% · 0.02% · 0.31% - - + + @@ -2494,7 +2494,7 @@ void __cdecl lara_hands_free(struct ITEM_INFO *item); void __cdecl Lara_State_Splat(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Random_SeedControl(int32_t seed); -void __cdecl Random_SeedDraw(int32_t seed); +void __cdecl Random_SeedDraw(int32_t seed); void __cdecl SE_SoundAdapterSet(HWND hwndDlg, SOUND_ADAPTER_NODE *adapter); void __cdecl SE_ControlsJoystickSet(HWND hwndDlg, JOYSTICK_NODE *joystick); void __cdecl Sound_SetMasterVolume(int32_t volume); diff --git a/docs/progress.txt b/docs/progress.txt index 61dc9a22..ce43acce 100644 --- a/docs/progress.txt +++ b/docs/progress.txt @@ -2711,7 +2711,7 @@ typedef enum GAME_OBJECT_ID { 0044C970 0000001E * int32_t __cdecl Random_GetControl(void); 0044C990 0000000A + void __cdecl Random_SeedControl(int32_t seed); 0044C9A0 0000001E - int32_t __cdecl Random_GetDraw(void); -0044C9C0 0000000A - void __cdecl Random_SeedDraw(int32_t seed); +0044C9C0 0000000A + void __cdecl Random_SeedDraw(int32_t seed); 0044C9D0 00000044 -R void __cdecl GetValidLevelsList(REQUEST_INFO *req); 0044CA20 0000004C -R void __cdecl GetSavedGamesList(REQUEST_INFO *req); 0044CA70 00000233 -R void __cdecl DisplayCredits(void); diff --git a/src/game/random.c b/src/game/random.c index 98be3dd7..baf44643 100644 --- a/src/game/random.c +++ b/src/game/random.c @@ -10,6 +10,11 @@ void __cdecl Random_SeedControl(const int32_t seed) g_RandControl = seed; } +void __cdecl Random_SeedDraw(const int32_t seed) +{ + g_RandDraw = seed; +} + void __cdecl Random_Seed(void) { time_t lt = time(0); diff --git a/src/game/random.h b/src/game/random.h index ebcdb747..26e313b2 100644 --- a/src/game/random.h +++ b/src/game/random.h @@ -3,4 +3,5 @@ #include void __cdecl Random_SeedControl(int32_t seed); +void __cdecl Random_SeedDraw(int32_t seed); void __cdecl Random_Seed(void); diff --git a/src/global/funcs.h b/src/global/funcs.h index 75235c4a..1326dcd2 100644 --- a/src/global/funcs.h +++ b/src/global/funcs.h @@ -664,7 +664,6 @@ #define GameStats ((int32_t __cdecl (*)(int32_t levelID))0x0044C850) #define Random_GetControl ((int32_t __cdecl (*)(void))0x0044C970) #define Random_GetDraw ((int32_t __cdecl (*)(void))0x0044C9A0) -#define Random_SeedDraw ((void __cdecl (*)(int32_t seed))0x0044C9C0) #define GetValidLevelsList ((void __cdecl (*)(REQUEST_INFO *req))0x0044C9D0) #define GetSavedGamesList ((void __cdecl (*)(REQUEST_INFO *req))0x0044CA20) #define DisplayCredits ((void __cdecl (*)(void))0x0044CA70) diff --git a/src/inject_exec.c b/src/inject_exec.c index d12674a7..d26758c9 100644 --- a/src/inject_exec.c +++ b/src/inject_exec.c @@ -232,6 +232,7 @@ static void Inject_Sound(void) static void Inject_Random(void) { INJECT(1, 0x0044C990, Random_SeedControl); + INJECT(1, 0x0044C9C0, Random_SeedDraw); INJECT(1, 0x0044D870, Random_Seed); }