Skip to content

Commit e003472

Browse files
committed
d3d8: update D3DDevice_SetTextureState_ColorKeyColor signatures
Updated: - 3911 - 4034
1 parent caf8924 commit e003472

2 files changed

Lines changed: 33 additions & 16 deletions

File tree

src/OOVPADatabase/D3D8/3911.inl

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4239,15 +4239,23 @@ OOVPA_SIG_MATCH(
42394239
OOVPA_SIG_HEADER_NO_XREF(D3DDevice_SetTextureState_ColorKeyColor,
42404240
3911)
42414241
OOVPA_SIG_MATCH(
4242+
// push esi
4243+
OV_MATCH(0x00, 0x56),
42424244

4243-
{ 0x00, 0x56 },
4244-
{ 0x07, 0x56 },
4245-
{ 0x0D, 0x8B },
4246-
{ 0x13, 0x8D },
4247-
{ 0x1A, 0x8B },
4248-
{ 0x21, 0x83 },
4249-
{ 0x28, 0x07 },
4250-
{ 0x2F, 0x5E },
4245+
// mov e??, [esp + param_1]
4246+
OV_MATCH(0x0D, 0x8B),
4247+
OV_MATCH(0x0F, 0x24, 0x08),
4248+
// lea e??, [e?? * 0x04 + 0x40AE0] // 0x40AE0 is a reliable hardcoded value across all builds.
4249+
OV_MATCH(0x11, 0x8D),
4250+
OV_MATCH(0x14, 0xE0, 0x0A, 0x04, 0x00),
4251+
4252+
// mov e??, [esp + param_2]
4253+
OV_MATCH(0x1A, 0x8B),
4254+
OV_MATCH(0x1C, 0x24, 0x0C),
4255+
4256+
// This is an optional OV pair to tell the difference from the (symbol)_(LTCG variant) signature.
4257+
// retn 0x08
4258+
OV_MATCH(0x30, 0xC2, 0x08),
42514259
//
42524260
);
42534261

src/OOVPADatabase/D3D8/4034.inl

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -369,18 +369,27 @@ OOVPA_SIG_MATCH(
369369
// ******************************************************************
370370
// * D3DDevice_SetTextureState_ColorKeyColor
371371
// ******************************************************************
372+
// Generic OOVPA as of 4034 and newer.
372373
OOVPA_SIG_HEADER_NO_XREF(D3DDevice_SetTextureState_ColorKeyColor,
373374
4034)
374375
OOVPA_SIG_MATCH(
376+
// push esi
377+
OV_MATCH(0x00, 0x56),
375378

376-
{ 0x00, 0x56 },
377-
{ 0x07, 0x8B },
378-
{ 0x0E, 0xE8 },
379-
{ 0x16, 0x08 },
380-
{ 0x1E, 0x89 },
381-
{ 0x26, 0x04 },
382-
{ 0x2E, 0x07 },
383-
{ 0x36, 0xC2 },
379+
// mov e??, [esp + param_1]
380+
OV_MATCH(0x13, 0x8B),
381+
OV_MATCH(0x15, 0x24, 0x08),
382+
// lea e??, [e?? * 0x04 + 0x40AE0] // 0x40AE0 is a reliable hardcoded value across all builds.
383+
OV_MATCH(0x17, 0x8D),
384+
OV_MATCH(0x1A, 0xE0, 0x0A, 0x04, 0x00),
385+
386+
// mov e??, [esp + param_2]
387+
OV_MATCH(0x20, 0x8B),
388+
OV_MATCH(0x22, 0x24, 0x0C),
389+
390+
// This is an optional OV pair to tell the difference from the (symbol)_(LTCG variant) signature.
391+
// retn 0x08
392+
OV_MATCH(0x36, 0xC2, 0x08),
384393
//
385394
);
386395

0 commit comments

Comments
 (0)