Mercurial > mm7
diff mm7_4.cpp @ 1603:c58916c53d8e
Merge
author | Grumpy7 |
---|---|
date | Thu, 12 Sep 2013 09:58:07 +0200 |
parents | a52a01aaf439 e42073046f92 |
children | 61ea994a1812 |
line wrap: on
line diff
--- a/mm7_4.cpp Thu Sep 12 09:55:20 2013 +0200 +++ b/mm7_4.cpp Thu Sep 12 09:58:07 2013 +0200 @@ -24,7 +24,6 @@ #include "IndoorCamera.h" #include "LOD.h" #include "Actor.h" -#include "Allocator.h" #include "Events.h" #include "Viewport.h" #include "FrameTableInc.h" @@ -397,38 +396,12 @@ } //----- (00487DA9) -------------------------------------------------------- -void sub_487DA9() +void sub_487DA9() { for (int i = 0; i < 20000; ++i) array_77EC08[i].field_108 = 0; } -//----- (00487DBE) -------------------------------------------------------- -void Software_ResetNewEdges() -{ - int v0; // ecx@1 - Edge **v1; // eax@1 - signed int v2; // eax@3 - - v0 = 0; - v1 = ptr_80CA10.data(); - do - { - ++v0; - *((int *)&pNewEdges[v0] - 9) = (int)&defaultEdge; - *v1 = 0; - ++v1; - } - while ( (signed int)v1 < (signed int)&unk_80D190 ); - v2 = 2000; - do - { - pSurfs->field_22 = 0; - --v2; - } - while ( v2 ); -} - //----- (0048A959) -------------------------------------------------------- unsigned int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace) { @@ -1571,7 +1544,7 @@ assert(uNumFrames); assert(!num_mm8_frames); - pFrames = (PlayerFrame *)pAllocator->AllocNamedChunk(pFrames, uNumFrames * sizeof(PlayerFrame), "P Frames"); + pFrames = (PlayerFrame *)malloc(uNumFrames * sizeof(PlayerFrame)); memcpy(pFrames, (char *)data_mm7 + 4, num_mm7_frames * sizeof(PlayerFrame)); memcpy(pFrames + num_mm7_frames, (char *)data_mm6 + 4, num_mm6_frames * sizeof(PlayerFrame)); memcpy(pFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 4, num_mm8_frames * sizeof(PlayerFrame)); @@ -1634,7 +1607,7 @@ v4 = v25; } v2->uNumFrames = v4; - v5 = pAllocator->AllocNamedChunk(v2->pFrames, 10 * v4, "P Frames"); + v5 = malloc(10 * v4); v2->pFrames = (PlayerFrame *)v5; if ( !v5 ) Error("PlayerFrameTable::load - Out of Memory!"); @@ -3376,7 +3349,7 @@ //----- (004B3FE5) -------------------------------------------------------- -void __fastcall sub_4B3FE5(int a4) +void __fastcall _4B3FE5_training_dialogue(int a4) { int v1; // edi@1 char *v2; // edi@1 @@ -3612,7 +3585,7 @@ case DIALOGUE_24: npc_event_id = speakingNPC->evt_F; break; } if ( (npc_event_id >= 200) && (npc_event_id <= 310) ) - sub_4B3FE5(npc_event_id); //200-310 + _4B3FE5_training_dialogue(npc_event_id); //200-310 else if (( npc_event_id >= 400) && (npc_event_id <= 410) ) { //400-410 dword_F8B1D8 = newDialogueType;