If anyone else cares to try it...search for a 'push 01b02h' in your disassembled xbe and use one of the three enums below.
D3DFILL_POINT = 0x1b00,
D3DFILL_WIREFRAME = 0x1b01,
D3DFILL_SOLID = 0x1b02,
This code will only toggle between solid and wireframe modes.
Code: Select all
pushad
GetBase ebp
lea ebx, dword ptr ds:[ebp+renderstate] ;loads current renderstate
xor byte ptr [ebx], 1 ;toggles renderstate (0=wireframe, 1=solid)
mov cl, byte ptr [ebx] ;duplicates renderstate
inc cl ;adjusts for real enum value
;-----realtime patch routine-----
mov eax, cr0
push eax
and eax, 0FFFEFFFFh
mov cr0, eax
mov byte ptr ds:[0133F6h], cl ;moves data into read-only address
pop eax
mov cr0, eax
popad
renderstate:
db 1 ;default solidfill