Better asm func for R_GetCharacterGlyph

This commit is contained in:
Diavolo 2022-07-02 11:52:52 +02:00
parent 69bbdc0e9d
commit 4f321a986f
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -1520,24 +1520,25 @@ namespace Game
} }
} }
__declspec(naked) Glyph* R_GetCharacterGlyph(Font_s* /*font*/, unsigned int /*letter*/) Glyph* R_GetCharacterGlyph(Font_s* font, unsigned int letter)
{ {
static auto R_GetCharacterGlyph_Func = 0x5055C0;
Glyph* returnValue;
__asm __asm
{ {
push eax
pushad pushad
mov edi, [esp + 0x8 + 0x24] // letter mov edi, letter
push [esp + 0x4 + 0x24] // font push font
mov eax, 0x5055C0 call R_GetCharacterGlyph_Func
call eax
add esp, 4 add esp, 4
mov [esp + 0x20], eax mov returnValue, eax
popad popad
pop eax
ret
} }
return returnValue;
} }
__declspec(naked) bool SetupPulseFXVars(const char* /*text*/, int /*maxLength*/, int /*fxBirthTime*/, int /*fxLetterTime*/, int /*fxDecayStartTime*/, int /*fxDecayDuration*/, bool* /*resultDrawRandChar*/, int* /*resultRandSeed*/, int* /*resultMaxLength*/, bool* /*resultDecaying*/, int* /*resultDecayTimeElapsed*/) __declspec(naked) bool SetupPulseFXVars(const char* /*text*/, int /*maxLength*/, int /*fxBirthTime*/, int /*fxLetterTime*/, int /*fxDecayStartTime*/, int /*fxDecayDuration*/, bool* /*resultDrawRandChar*/, int* /*resultRandSeed*/, int* /*resultMaxLength*/, bool* /*resultDecaying*/, int* /*resultDecayTimeElapsed*/)