Mercurial > mm7
diff mm7_2.cpp @ 522:61343380715b
Origianl structures integrity test added
author | Nomad |
---|---|
date | Sat, 02 Mar 2013 01:30:24 +0200 |
parents | 35f28d4c0ff9 |
children | 214d9d47cf1f |
line wrap: on
line diff
--- a/mm7_2.cpp Fri Mar 01 23:43:21 2013 +0400 +++ b/mm7_2.cpp Sat Mar 02 01:30:24 2013 +0200 @@ -29,6 +29,7 @@ #include "SaveLoad.h" #include "stru123.h" #include "stru287.h" +#include "stru176.h" #include "Time.h" #include "IconFrameTable.h" #include "GUIProgressBar.h" @@ -53,6 +54,7 @@ #include "texts.h" #include "mm7_data.h" +#include "MM7.h" //----- (004B4F4F) -------------------------------------------------------- @@ -13128,6 +13130,112 @@ +void IntegrityTest() +{ + assert(sizeof(RenderVertexSoft) == 0x30); + assert(sizeof(RenderBillboard) == 0x34); + assert(sizeof(Texture) == 0x48); + assert(sizeof(RGBTexture) == 0x28); + assert(sizeof(LODFile_IconsBitmaps) == 0x11BB8 + 4); // + virtual dtor ptr + assert(sizeof(AudioPlayer) == 0xC84); + assert(sizeof(SoundDesc) == 0x78); + assert(sizeof(stru339_spell_sound) == 0xAFD8); + assert(sizeof(VideoPlayer) == 0x108 + 4); + assert(sizeof(MovieHeader) == 0x2C); + assert(sizeof(DecorationDesc) == 0x54); + assert(sizeof(ObjectDesc) == 0x38); + assert(sizeof(OverlayDesc) == 0x8); + assert(sizeof(ChestDesc) == 0x24); + assert(sizeof(TileDesc) == 0x1A); + assert(sizeof(MonsterDesc) == 0x98); + assert(sizeof(Timer) == 0x28); + assert(sizeof(OtherOverlay) == 0x14); + assert(sizeof(ItemGen) == 0x24); + assert(sizeof(SpriteObject) == 0x70); + assert(sizeof(ItemDesc) == 0x30); + assert(sizeof(ItemsTable) == 0x117A0); + assert(sizeof(Chest) == 0x14CC); + assert(sizeof(MapInfo) == 0x44); + assert(sizeof(SpellInfo) == 0x24); + assert(sizeof(SpellData) == 0x14); + assert(sizeof(SpellBuff) == 0x10); + assert(sizeof(AIDirection) == 0x1C); + assert(sizeof(ActorJob) == 0xC); + assert(sizeof(Actor) == 0x344); + assert(sizeof(LevelDecoration) == 0x20); + assert(sizeof(KeyboardActionMapping) == 0x20C); + assert(sizeof(UIAnimation) == 0xD); + assert(sizeof(SpawnPointMM7) == 0x18); + assert(sizeof(ODMFace) == 0x134); + assert(sizeof(BSPNode) == 0x8); + assert(sizeof(BSPModel) == 0xBC); + assert(sizeof(OutdoorLocation) == 0x1C28C); + assert(sizeof(BLVFace) == 0x60); + assert(sizeof(BLVFaceExtra) == 0x24); + assert(sizeof(BLVSector) == 0x74); + assert(sizeof(BLVLightMM7) == 0x10); + assert(sizeof(BLVDoor) == 0x50); + assert(sizeof(IndoorLocation) == 0x690); + assert(sizeof(OutdoorCamera) == 0x74); + assert(sizeof(Mouse) == 0x114); + assert(sizeof(Particle_) == 0x68); + assert(sizeof(Particle) == 0x68); + assert(sizeof(ParticleEngine) == 0xE430); + assert(sizeof(Lightmap) == 0xC1C); + assert(sizeof(LightmapBuilder) == 0x3CBC38); + assert(sizeof(Vis_SelectionList) == 0x2008); + assert(sizeof(Vis) == 0x20D0); + assert(sizeof(PlayerBuffAnim) == 0x10); + assert(sizeof(ProjectileAnim) == 0x1C); + assert(sizeof(stru6) == 0x5F8); + assert(sizeof(IndoorCameraD3D_Vec3) == 0x10); + assert(sizeof(IndoorCameraD3D_Vec4) == 0x18); //should be 14 (10 vec3 + 4 vdtor) but 18 coz of his +4 from own vdtor, but it is odd since vdtor already present from vec3 + assert(sizeof(IndoorCameraD3D) == 0x1A1384); + assert(sizeof(StationaryLight) == 0xC); + assert(sizeof(LightsStack_StationaryLight_) == 0x12C8); + assert(sizeof(MobileLight) == 0x12); + assert(sizeof(LightsStack_MobileLight_) == 0x1C28); + assert(sizeof(Game) == 0xE78); + assert(sizeof(stru141) == 0xA8); + assert(sizeof(ActionQueue) == 0x7C); + assert(sizeof(NPCData) == 0x4C); + assert(sizeof(NPCStats) == 0x17FFC); + assert(sizeof(BspRenderer) == 0x53740); + assert(sizeof(PaletteManager) == 0x267AF0); + assert(sizeof(ViewingParams) == 0x26C); + assert(sizeof(IndoorCamera) == 0x50); + assert(sizeof(Bloodsplat) == 0x28); + assert(sizeof(BloodsplatContainer) == 0xA0C); + assert(sizeof(stru167) == 0x18); + assert(sizeof(EventIndex) == 0xC); + assert(sizeof(_2devent) == 0x34); + assert(sizeof(stru176) == 0x20); + assert(sizeof(SavegameHeader) == 0x64); + assert(sizeof(SavegameList) == 0x3138); + assert(sizeof(StorylineText) == 0x168); + assert(sizeof(FactionTable) == 0x1EF1); + assert(sizeof(Decal) == 0xC20); + assert(sizeof(DecalBuilder) == 0x30C038); + assert(sizeof(MonsterInfo) == 0x58); + assert(sizeof(MonsterStats) == 0x5BA0); + assert(sizeof(RenderD3D) == 0x148); + assert(sizeof(Render) == 0x129844); + assert(sizeof(Player) == 0x1B3C); + assert(sizeof(Party_stru0) == 0x678); + assert(sizeof(Party) == 0x16238); + assert(sizeof(GUIButton) == 0xBC); + assert(sizeof(GUIWindow) == 0x54); + assert(sizeof(GUIProgressBar) == 0x1B8); + assert(sizeof(GUIFont) == 0x1020); + assert(sizeof(stru262_TurnBased) == 0x40); + assert(sizeof(ArcomageGame) == 0xFA); + assert(sizeof(stru277) == 0x14); + assert(sizeof(ArcomageCard) == 0x6C); + assert(sizeof(stru320) == 0x3FC); + assert(sizeof(TravelInfo) == 0x20); + assert(sizeof(stru336) == 0x798); +} + bool new_sky = false; //----- (00462C94) -------------------------------------------------------- @@ -13145,9 +13253,11 @@ unsigned int startms; // [sp+8h] [bp-24h]@55 RECT Rect; // [sp+Ch] [bp-20h]@15 int a2[4]; // [sp+1Ch] [bp-10h]@15 - + + IntegrityTest(); char test[1024]; - //sprintfex(test, "^Pi[%s]: знахар^R[ь;ка;]", "Золтан"); + sprintfex(test, "^Pi[%s]: знахар^R[ь;ка;]", "Золтан"); + if (pCmdLine && *pCmdLine) {