[Scripts]: Fixed 'Scr_GetFloat' function

This commit is contained in:
JerryALT 2024-03-18 01:45:13 +03:00
parent 4f32fe70a0
commit 22d7821e17
2 changed files with 4 additions and 2 deletions

View File

@ -64,13 +64,15 @@ namespace Game
float Scr_GetFloat/*st0*/(unsigned int index /*eax*/) float Scr_GetFloat/*st0*/(unsigned int index /*eax*/)
{ {
float result;
const static uint32_t Scr_GetFloat_func = 0x5583A0; const static uint32_t Scr_GetFloat_func = 0x5583A0;
__asm __asm
{ {
mov eax, index; mov eax, index;
xor eax, eax;
call Scr_GetFloat_func; call Scr_GetFloat_func;
fstp dword ptr[result]; //FIXED!!!
} }
return result;
} }
void Scr_Error(const char* error/*eax*/) void Scr_Error(const char* error/*eax*/)

View File

@ -13,7 +13,7 @@ namespace Game
typedef void(*Scr_AddInt_t)(int value); typedef void(*Scr_AddInt_t)(int value);
extern Scr_AddInt_t Scr_AddInt; extern Scr_AddInt_t Scr_AddInt;
typedef void(*Scr_AddFloat_t)(float value); typedef void(__cdecl* Scr_AddFloat_t)(float value);
extern Scr_AddFloat_t Scr_AddFloat; extern Scr_AddFloat_t Scr_AddFloat;
typedef void(__cdecl* Scr_ParamError_t)(const char* error, ...); typedef void(__cdecl* Scr_ParamError_t)(const char* error, ...);