Skip to content

Instantly share code, notes, and snippets.

Avatar
👀

Paul paulsapps

👀
View GitHub Profile
View gist:7da56a695267599e4046370482194f4c
int (__cdecl *gAbeState_Table_4C5F08[165])() =
{
&Abe::State_0_Idle_423520,
&Abe::State_1_WalkLoop_423F90,
&Abe::State_2_StandingTurn_426040,
&Abe::State_3_Fall_42E7F0,
&Abe::State_4_WalkToIdle_4243C0,
&Abe::State_5_MidWalkToIdle_424490,
&Abe::State_6_WalkBegin_424300,
&Abe::State_7_Speak_42F950,
View gist:8350ed201f5db885fd33c80e7e0b6c6b
_WORD *__cdecl LibGV_40466A(Prim_unknown_0x54 *pObj, _WORD *pPrims, int count)
{
_DWORD *primOffPtr; // [esp+8h] [ebp-18h]
int vF3; // [esp+Ch] [ebp-14h]
BYTE *pScratch; // [esp+10h] [ebp-10h]
int vertCount; // [esp+14h] [ebp-Ch]
int vF4; // [esp+18h] [ebp-8h]
int sizeBytes; // [esp+1Ch] [ebp-4h]
sizeBytes = pObj->field_30_primF1_size;
View gist:7d7ca9253d5a438e9b9a6df309421736
MGS_ARY(1, 0x650194, PrimUnknownData, 25, byte_650194,
{
{ 16, 2, 8, 4 }, // LINE_F2
{ 24, 3, 8, 4 }, // LINE_F3
{ 28, 4, 8, 4 }, // LINE_F4
{ 20, 2, 8, 8 }, // LINE_G2
{ 32, 3, 8, 8 }, // LINE_G3
{ 40, 4, 8, 8 }, // LINE_G4
{ 20, 1, 8, 0 }, // SPRT
{ 16, 1, 8, 0 }, // SPRT_16 ?
@paulsapps
paulsapps / gist:44fc6ff82a91f3641d93f49c8860fc51
Last active Jan 7, 2018
Remaining MGS1 functions for rank screen boot
View gist:44fc6ff82a91f3641d93f49c8860fc51
0x4448F0 BindsSetPointerAndCount_4448F0
0x40FD20 BitBltToDxSurface
0x40CED0 BltToPixelBuffer
0x51D120 CheckForMmf_51D120
0x43C850 CheckJoyStickError_43C850
0x44ABE0 ClearImage
0x40D420 Convert_unknown_40D420
0x5530A8 DirectSoundCreate
0x5200D2 ElapsedTime_Related_5200D2
0x44CF10 EnableEvent
View gist:2ea441a5f1a667a51658a7c89a8e48ab
WbGameApp Construct
WbGameApp Construct end
App init()
[app] WbGameApp init()
[app] Load Main Settings
[app] Wonder Boy: The Dragon's Trap
[app] Version: 1.02a / build Jun 9 2017, 18:54:00
[app] Exe: Win 64-bits Final DX11 Audio Steam Mouse Public Edit
[app] Windows 6.1 (7601)
[app] Steam BuildId 1880374 (Branch 'beta')
View gist:709547a8bc4ea125fec61008ab7bae53
unsigned int __stdcall MallocExtra_4059F0(int requestSize, _DWORD *pAllocated)
{
void *pAllocatedWithExtra; // eax@1
pAllocatedWithExtra = malloc(requestSize + 65536);
*pAllocated = pAllocatedWithExtra;
if ( !pAllocatedWithExtra )
TraceLog_450530(1029, "Memory.cpp", 76);
return (*pAllocated + 65535) & 0xFFFF0000;
}
View gist:444a5c98a6e6064790a68f9b5e6176d5
bool raycast_map(const std::vector<Oddlib::Path::CollisionItem>& lines, const glm::vec2& line1p1, const glm::vec2& line1p2, int collisionType, Physics::raycast_collision* const collision)
{
const Oddlib::Path::CollisionItem* nearestLine = nullptr;
float nearestCollisionX = 0;
float nearestCollisionY = 0;
float nearestDistance = 0.f;
bool hasCollided = false;
bool firstCollision = true;
for (const Oddlib::Path::CollisionItem& line : lines)
View gist:4728d2521ae0b916418375e135c05da9
ANIM: id: 10 idx: 34 resource name: AbeRunning
AbeSnap_sub_449930_hook [I] SNAP: 880 to 887
Player X Delta 12.500000 Y Delta 0.000000 frame 0
Player X Delta 6.250000 Y Delta 0.000000 frame 1
Player X Delta 6.250000 Y Delta 0.000000 frame 2
Player X Delta 6.250000 Y Delta 0.000000 frame 3
AbeSnap_sub_449930_hook [I] SNAP: 912 to 912
Player X Delta 6.250000 Y Delta 0.000000 frame 4
Player X Delta 6.250000 Y Delta 0.000000 frame 5
Player X Delta 6.250000 Y Delta 0.000000 frame 6
View abe.lua
function init(self)
-- BEGIN STATE DATA
local states = {}
states.AbeStandToWalk = {
NextAnimation ='AbeWalking',
NextAnimationFrameIndex = 0,
View abe.lua
function init(self)
-- BEGIN STATE DATA
local states = {}
states.AbeStandToWalk = {
NextAnimation ='AbeWalking',
NextAnimationFrameIndex = 0,