Commit Graph

  • 3330d7103f Revert "[saco] Match CGame::SetCheckpointInformation at 0x100A1DE0; DisableMarker is written out inline" main RD42 2026-10-06 21:31:28 +02:00
  • 6bf22b7af1 Revert "[saco] Match CGame::SetRaceCheckpointInformation at 0x100A2100; DisableMarker is written out inline" RD42 2026-10-06 21:30:47 +02:00
  • 54c342a340 Revert "[saco] Match CGame::UpdateCheckpoints at 0x100A1F20; DisableMarker/DisableRaceCheckpoint are written out inline" RD42 2026-10-06 21:28:41 +02:00
  • 280d650e9d Revert "[saco] Match CPlayerPed::GetVehicleSeatID; retail reads dwAction instead of calling GetActionTrigger" RD42 2026-10-04 19:23:05 +02:00
  • a4fd8926df Revert "[saco] Match GetColorFromEmbedCode(char*); retail spells the first hex test out longhand" RD42 2026-10-04 19:20:38 +02:00
  • dc594accd1 Revert "[saco] Match CGame::UpdateFarClippingPlane; retail inlines the get_active_interior call" RD42 2026-10-04 19:17:57 +02:00
  • 8aeebe8a14 Revert "[saco] Match CGame::EnableClock; retail writes ToggleThePassingOfTime out inline" RD42 2026-10-04 19:13:06 +02:00
  • 6dd1516d79 Revert "[saco] Match RelocatePedsListHack and ApplyNewColStoreSizePatch; both call VirtualProtect inline, the UnFuck helper in their place was wrong" RD42 2026-10-04 18:49:40 +02:00
  • 4f1142695e Revert "[saco] Correct SetIPLs to spell out the last two patches; retail inlines the protect/memcpy/restore there instead of calling _patch, only the two spare frame slots and one materialised address differ now" RD42 2026-10-04 18:44:02 +02:00
  • efee24a57d Merge pull request #20 from ricardoofnl/main RD42 2026-10-04 18:38:39 +02:00
  • 79abb3494b [saco] Add FUNC_100120B0; the data buffer is exactly the 4096-byte read cap, and 4097 overshoots the frame by 8 ricardoofnl 2026-09-05 10:57:17 +07:00
  • 265d31aa7a [saco] Add FUNC_10011EB0; the new pins the download list at 0x206D and the wire record at 94 bytes ricardoofnl 2026-09-05 10:52:57 +07:00
  • ee25a8d276 Unify FUNC_100B46D0 on the DWORD * return two lanes declared differently ricardoofnl 2026-09-05 10:58:55 +07:00
  • ed0c20163a [saco] Match GetSpecialAction; the branchless tail needs a BYTE destination or the sbb comes out 32-bit ricardoofnl 2026-09-05 10:41:18 +07:00
  • d7ac8188fa [saco] Match FUNC_1001B070; the count is read into an int before the guard and copied to the loop variable inside it, which is what sinks the store past the branch ricardoofnl 2026-09-05 10:46:01 +07:00
  • e29832070a [saco] Implement/match FUNC_100B5620; the quaternion to euler conversion doubles with x * 2.0f and reaches asin through the __CIasin intrinsic ricardoofnl 2026-09-05 10:45:43 +07:00
  • 0c65e210a2 [saco] Implement/match FUNC_100B58A0, FUNC_100B5830 and FUNC_100B5480; the D3DX slerp staging quaternions are declared output-first so the later ones land lower on the frame ricardoofnl 2026-09-05 10:43:56 +07:00
  • f9d55b7a24 [saco] Implement/match FUNC_100B52B0, FUNC_100B5210 and FUNC_100B5500; the quaternion staging struct has to be filled in w,x,y,z field order and 0x100B52B0 is a verbatim second copy of FUNC_100B5260 ricardoofnl 2026-09-05 10:41:30 +07:00
  • d45d006d71 [saco] Implement/match FUNC_100B5260, FUNC_100B5420, FUNC_100B57E0, FUNC_100B5790 and FUNC_100B5740; the 12-byte stride on 0x10117400 makes it a three-element VECTOR array ricardoofnl 2026-09-05 10:37:15 +07:00
  • c525ec2bc3 [saco] Implement/match seven more game/util.cpp functions; 0x100B56F0 patches a real function-pointer global instead of picking with a ternary, and the tail jmp needs the callee convention to match ricardoofnl 2026-09-05 10:34:46 +07:00
  • ea57e6af81 [saco] Implement/match FUNC_100B44E0, FUNC_100B6470, VectorScale, FUNC_100B51E0 and FUNC_100B5180; the quaternion norm needs its tail sum parenthesised or MSVC folds the first square to the top of the x87 stack ricardoofnl 2026-09-05 10:31:13 +07:00
  • 78cf6daf38 [saco] Implement/match the 0x100B45xx-0x100B47xx GetModelInfo wrapper band; the store-then-reload of the returned pointer is the _asm mov <local>, reg fingerprint ricardoofnl 2026-09-05 10:24:54 +07:00
  • 0ffc91b7fd [saco] Declare the ten new game/util.cpp helpers in util.h ricardoofnl 2026-09-05 10:19:51 +07:00
  • 40688d058b [saco] Implement/match ten small game/util.cpp functions; the 0x100B45xx band is one-load accessors, 0x100B56D0 another three-pop GTA thunk, and 0x100B5720 an indirect call through a stored function pointer ricardoofnl 2026-09-05 10:16:07 +07:00
  • b4379722db [saco] Implement/match CChatWindow::FUNC_10067470; the outline is 8 draws above 1280 wide and 4 below, and field_8 must be read before field_0 or the spill lands after the pushes ricardoofnl 2026-09-05 10:13:39 +07:00
  • 33689c659d [saco] Implement/match ClientCheck; independent if/return arms give the two tail-merged epilogues that an else-if chain cannot ricardoofnl 2026-09-05 10:31:12 +07:00
  • ba47566596 [saco] Correct SetIPLs to spell out the last two patches; retail inlines the protect/memcpy/restore there instead of calling _patch, only the two spare frame slots and one materialised address differ now ricardoofnl 2026-09-05 10:28:46 +07:00
  • 35e99d286f [saco] Match RelocatePedsListHack and ApplyNewColStoreSizePatch; both call VirtualProtect inline, the UnFuck helper in their place was wrong ricardoofnl 2026-09-05 10:22:33 +07:00
  • 5d6cc3b7e7 [saco] Implement/match CPlayerPed::FUNC_100ADB70; the dance names are three 16 by 16 char tables, and the model test is negated so the G table is the fallthrough ricardoofnl 2026-09-05 10:31:36 +07:00
  • 8df42ea4b3 [saco] Implement/match CPlayerPed::FUNC_100AE6A0; the table lookup returns a signed short, which is what sign-extends the low half of the packed result ricardoofnl 2026-09-05 10:31:33 +07:00
  • f6708ef126 [saco] Match CUnkClass10::GetField80, the third accessor COMDAT; its inlined call site is inside FUNC_10002FA0 ricardoofnl 2026-09-05 10:32:26 +07:00
  • 4750c5994f [saco] Match FUNC_10006100 and the two accessor COMDATs it keeps alive; 0x1026EC2C is a CDXUTDialog and +0x13 is m_bVisible ricardoofnl 2026-09-05 10:29:31 +07:00
  • 237716a11e [saco] Implement/match ScrUnk53; the three UI dispatch objects take a local placeholder class, the way net/netrpc.cpp already does it ricardoofnl 2026-09-05 10:09:03 +07:00
  • 3f93cdf486 [saco] Implement/match ScrUnkAD; it is CActorPed::ApplyAnimation and reuses the ScrUnk56 bool read order of 1, 2, 4, 3 ricardoofnl 2026-09-05 10:07:09 +07:00
  • 70b76e9806 [saco] Match ScrUnk21; memset over the aggregate initializer, and the empty-name branch is the fall-through so the test is negated ricardoofnl 2026-09-05 10:04:46 +07:00
  • 0d9a1c9f3c [saco] Implement/match ScrUnk5A; FUNC_100ABDD0 and FUNC_100ABDF0 take ecx, so both are CPlayerPed methods and the xor feeds the setter ricardoofnl 2026-09-05 10:02:14 +07:00
  • f39b2c3da9 [saco] Call CChatWindow::AddChatMessage from FUNC_10017610 and drop the duplicate FUNC_10068020 declaration ricardoofnl 2026-09-05 10:07:28 +07:00
  • 662270a17a [saco] Drop my duplicate CPlayerPed::FUNC_100AD440 declaration; another lane landed the same one ricardoofnl 2026-09-05 09:42:14 +07:00
  • bc516c9fc8 [saco] Implement/match FUNC_100158D0, the unoccupied vehicle sync; the 0.05 lerp gate is a double literal here, unlike the trailer path ricardoofnl 2026-09-05 09:37:49 +07:00
  • 558f817285 [saco] Implement/match FUNC_10015140, the vehicle position resync; boats, helis and planes get a 2.0 Z snap limit through a local ricardoofnl 2026-09-05 09:33:53 +07:00
  • b145cc82f5 [saco] Implement/match FUNC_10015C90, the trailer sync handler; the 0.5 gate is a <= chain and the 6.0/3.0 snap gate a > chain ricardoofnl 2026-09-05 09:31:26 +07:00
  • 67c7c34fc0 [saco] Implement/match FUNC_10014950, the special-action driver; every pair is two sequential ifs with &&, not an if/else ricardoofnl 2026-09-05 09:27:59 +07:00
  • 10dddab97e [saco] Implement/match FUNC_10016370, the bullet sync handler; per-component float assignments keep the direct displacements a VECTOR copy would hide behind a lea ricardoofnl 2026-09-05 09:24:38 +07:00
  • 8d8b9e33d4 [saco] Implement/match FUNC_10014C40, the 3D position resync; the lerp factor is a mutable global so it lands in st(1) instead of an fmul operand ricardoofnl 2026-09-05 09:12:10 +07:00
  • ef8d3e3354 [saco] Implement/match FUNC_10014E60; writing the snap tail at both exits lets the merge hoist the field_17C load above the IsAdded branch ricardoofnl 2026-09-05 09:08:42 +07:00
  • 8b78747e06 [saco] Match FUNC_10014380 and FUNC_10014390; both are class-body getters whose COMDATs need an in-TU caller ricardoofnl 2026-09-05 09:05:27 +07:00
  • 99dda3ded5 [saco] Implement/match CChatWindow::FUNC_10067940; the entry walk needs its own index bumped ahead of the rect advance, and the strlen guards are bare temps rather than a named length ricardoofnl 2026-09-05 09:54:07 +07:00
  • c735f2f750 [saco] Implement/match ScrUnkAE, ScrUnkAF, ScrUnkB2, ScrUnkA0, ScrUnk39, ScrUnk7E and ScrUnk7F; the actor lookup lands in ecx because it is the this of a thiscall, not an allocator choice ricardoofnl 2026-09-05 09:50:08 +07:00
  • 1d0b3fac63 [saco] Implement/match ScrUnkA1; it forwards the two bytes straight to CVehiclePool::FUNC_1001EB30 ricardoofnl 2026-09-05 09:38:42 +07:00
  • 39edc13d51 [saco] Match ScrUnk30 and CDownloadList::FUNC_10017D10; the guarded three-field update is an inline member, so the handler and its out-of-line COMDAT fall together ricardoofnl 2026-09-05 09:31:32 +07:00
  • 1df2731742 [saco] Match SendDeath and SetInteriorId; the killer id is a WORD out-param whose copy widens to a dword ricardoofnl 2026-09-05 09:37:51 +07:00
  • 3a04674340 [saco] Match FUNC_10004120; the counter is a free function whose loop index and bound are both locals declared ahead of the early return ricardoofnl 2026-09-05 09:36:20 +07:00
  • 8163d2e5ee [saco] Match FUNC_10003FC0, the in-vehicle boundary check; the id is tested against INVALID_VEHICLE_ID before the range ricardoofnl 2026-09-05 09:33:28 +07:00
  • 5baa271d74 [saco] Match FUNC_10004280; GetAt is called twice and the pool bound check folds into GetSlotState ricardoofnl 2026-09-05 09:31:29 +07:00
  • 2cf8455402 [saco] Correct the SCRIPT_COMMAND ids in FUNC_100AD3E0 and FUNC_100AE1E0; the id is a masked relocation, so the byte diff cannot see a wrong command ricardoofnl 2026-09-05 09:19:27 +07:00
  • 558298089e [saco] Match RequestSpawn, FUNC_10003F50 and FUNC_100041C0; the spectate reset is an else if, and a plain second if costs the jmp to the tail ricardoofnl 2026-09-05 09:15:09 +07:00
  • 3c8eb15683 [saco] Match five more CLocalPlayer members; SPAWN_INFO sits at +0x14F and the resend test duplicates its update arm rather than merging the conditions ricardoofnl 2026-09-05 09:11:01 +07:00
  • e18f766850 [saco] Match five more CLocalPlayer members; the sync interval globals at 0x100FE0A8/0x100FE0AC default to 30 ricardoofnl 2026-09-05 09:03:44 +07:00
  • 375a1b3aa3 [saco] Match four small CLocalPlayer members; the 1000 fallback has to be the trailing else, and the three key words are read through field_0 ricardoofnl 2026-09-05 09:00:12 +07:00
  • f4d31db33e [saco] Correct CGame::CreateWeaponPickup to inline the model wait; calling IsModelLoaded and friends out of line was wrong, the only delta left is MSVC rotating the wait loop where retail leaves it top tested ricardoofnl 2026-09-05 09:18:19 +07:00
  • 2f9da6d14b [saco] Implement/match ScrUnk7C, ScrUnk58, ScrUnk41, ScrUnkA9 and ScrUnk7A; CLocalPlayer::sub_100030F0 takes a byte, so the caller pushes the slot dword with no movzx ricardoofnl 2026-09-05 09:07:45 +07:00
  • be7d816e20 [saco] Implement/match ScrUnk62, ScrUnk11, ScrUnk93 and ScrUnk10; caching m_pGameAudio in a local is what loads this before the argument pushes ricardoofnl 2026-09-05 09:04:58 +07:00
  • 85d533a5af [saco] Match CRemotePlayer::FUNC_10017C80; the dead out-of-line COMDAT comes back once ScrUnk50 calls the inline setter instead of assigning field_4 directly ricardoofnl 2026-09-05 08:59:30 +07:00
  • efad9a4425 [saco] Implement/match ScrUnk52; the wire bool picks between InterpolatePosition and InterpolateLookAt, and both endpoints are VECTORs passed by pointer ricardoofnl 2026-09-05 08:56:09 +07:00
  • 4ea69b96c0 [saco] Implement/match CPlayerPed::FUNC_100AD440; the armed-weapon compare stays byte wide, and this one really does use destroy_object_with_fade ricardoofnl 2026-09-05 09:09:30 +07:00
  • 457fb47ee6 [saco] Implement/match CPlayerPed::FUNC_100AEEE0; the bone constant owns the lowest slot, so it is the last of the three locals declared ricardoofnl 2026-09-05 09:05:30 +07:00
  • 066b30a8b2 [saco] Implement/match CPlayerPed::FUNC_100AF220; the three contiguous ascending float slots are one VECTOR, not three locals ricardoofnl 2026-09-05 09:05:26 +07:00
  • 7f80a565e2 [saco] Implement/match CPlayerPed::FUNC_100AE790; the no-task branch tails into FUNC_100AE6A0 with this still in ecx ricardoofnl 2026-09-05 09:05:20 +07:00
  • 69cf2dfb20 [saco] Implement/match CPlayerPed::FUNC_100AF1F0; the ped local is stored before its own test, then the tail call reloads this ricardoofnl 2026-09-05 08:57:40 +07:00
  • b61d2ca7cc [saco] Implement/match CPlayerPed::FUNC_100AE530; the inherited renderware getter needs no ecx reload, this is still live ricardoofnl 2026-09-05 08:57:35 +07:00
  • 48dfa28b5d [saco] Implement/match CPlayerPed::FUNC_100AD9E0; the same lookup as FUNC_100AD9C0 against the ped-type field ricardoofnl 2026-09-05 08:57:31 +07:00
  • 984369a2a6 [saco] Implement/match CPlayerPed::FUNC_100AD9C0; the model index widens through movzx for the __cdecl stat lookup ricardoofnl 2026-09-05 08:57:28 +07:00
  • 4aea04637b Define dword_1026EB98 in main.cpp; net/netrpc.cpp declares it extern and nothing provided it ricardoofnl 2026-09-05 09:10:01 +07:00
  • a1748ca81f [saco] Implement/match UnkAB; the trailing GetAt only survives DCE when its result gates a return ricardoofnl 2026-09-05 09:04:40 +07:00
  • 4279b751fb Drop the duplicate CPlayerPed::FUNC_100ACEF0 declaration two lanes each added ricardoofnl 2026-09-05 08:49:41 +07:00
  • 313c7ee291 [saco] Implement/match ScrUnk29; it is PlayAudioStream on the object at 0x1026EB8C, and the position is a VECTOR with the radius slotted below it ricardoofnl 2026-09-05 08:35:35 +07:00
  • 03b2f5b5a5 [saco] Implement/match FUNC_10015460; the turn-speed clamp is gated by an initialised global and _gap16C is the synced quaternion ricardoofnl 2026-09-05 08:35:06 +07:00
  • 5f492d0791 [saco] Implement/match FUNC_10015760, the aim sync handler; repeating the sync load per destination keeps the copies in GPRs instead of fld/fst ricardoofnl 2026-09-05 08:32:11 +07:00
  • 8be02a792c [saco] Implement/match FUNC_10017130; the failure path sits after the nested success block and the widened callee params force both movzx ricardoofnl 2026-09-05 08:24:24 +07:00
  • b87030da7a [saco] Implement/match FUNC_10015650; writing the abs difference as >= keeps the subtract order and the test ah, 1 form ricardoofnl 2026-09-05 08:18:58 +07:00
  • 809df262a3 [saco] Implement/match FUNC_10017340, the driver sync store; the state change is written out longhand, not through FUNC_100165B0 ricardoofnl 2026-09-05 08:15:42 +07:00
  • 998f68c583 [saco] Implement/match FUNC_10017440, the passenger sync store; the vehicle cache is an inlined CVehiclePool::GetAt ricardoofnl 2026-09-05 08:14:40 +07:00
  • e10d48a9e9 [saco] Implement/match FUNC_10017260, the on-foot sync store; the sign-bit mask on the anim field is what emits jns ricardoofnl 2026-09-05 08:11:43 +07:00
  • 486b730168 [saco] Implement/match FUNC_10014FF0; it slerps the ped 75% onto the synced quaternion and reheads it ricardoofnl 2026-09-05 08:00:47 +07:00
  • 0d9aedf631 [saco] Implement/match FUNC_100148F0; it drops the ped where it stands and clears the cached vehicle ricardoofnl 2026-09-05 07:55:32 +07:00
  • 4c4329f013 [saco] Match CPlayerPool::GetPlayerName; folding the range guard into the pointer initializer coalesces it onto this ricardoofnl 2026-09-05 07:54:05 +07:00
  • 88f696841e [saco] Implement/match Unk3D; the dialog id widens with movsx, so the local is a signed short ricardoofnl 2026-09-05 08:38:00 +07:00
  • ac18ccbe0a [saco] Implement/match Unk24; it builds a 3D text label and the flag init lands between rep stosd and stosb ricardoofnl 2026-09-05 08:37:08 +07:00
  • 1ba74d3c0e [saco] Implement/match Unk3B; it sets a chat bubble and caps the text at 0x90 bytes ricardoofnl 2026-09-05 08:31:16 +07:00
  • 479436d28c [saco] Implement/match UpdateScoresPingsIPs; the row count is an unsigned divide and the loop index is a WORD ricardoofnl 2026-09-05 08:13:56 +07:00
  • 791edd231d [saco] Implement/match Unk22; MSVC parks the 2-byte locals below the 4-byte ones under the BitStream ricardoofnl 2026-09-05 08:12:27 +07:00
  • dcf5887c29 [saco] Implement/match EditObject; the WORD init widens to a dword store over the dead padding ricardoofnl 2026-09-05 08:07:29 +07:00
  • 8bac5c0eb0 [saco] Add FUNC_10011990; the inlined Write copies each by-value parameter into a temp slot first ricardoofnl 2026-09-05 07:55:03 +07:00
  • 77f69b96f2 [saco] Implement/match EditAttachedObject; the zero-init of the read target sits after the BitStream ctor ricardoofnl 2026-09-05 07:52:31 +07:00
  • ab2512f919 [saco] Implement/match SelectObject; it cancels all three editor globals, the last one without a state check ricardoofnl 2026-09-05 07:51:09 +07:00
  • 2eedb90411 [saco] Implement/match Unk1C; the +0x80 guard needs mov/test while the +0 one folds into a cmp ricardoofnl 2026-09-05 07:50:11 +07:00
  • 4fca89b828 [saco] Add FUNC_1000EBA0; the second member call reloads the global because the first one can move it ricardoofnl 2026-09-05 07:49:17 +07:00
  • 37db7dc3b2 [saco] Add FUNC_1000EC30; caching the global inside the guard keeps it in eax and copies to ecx ricardoofnl 2026-09-05 07:47:48 +07:00
  • df4b6ce913 [saco] Implement/match FUNC_100A47B0; every statement after the first reloads the aim pointer because the store through it may alias the global ricardoofnl 2026-09-05 08:36:00 +07:00
  • 2f1bbe95af [saco] Implement/match FUNC_100A4F60; the two byte nop is a memset, a plain WORD store would fold the immediate ricardoofnl 2026-09-05 08:33:07 +07:00