Mercurial > mm7
changeset 1869:bc7a6ee34316
IntegrityTest size tests changed to static_asserts
author | Grumpy7 |
---|---|
date | Wed, 16 Oct 2013 04:36:30 +0200 |
parents | 351b4ff10ac1 |
children | 7a193504f18e |
files | mm7_2.cpp |
diffstat | 1 files changed, 130 insertions(+), 130 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_2.cpp Wed Oct 16 03:23:03 2013 +0200 +++ b/mm7_2.cpp Wed Oct 16 04:36:30 2013 +0200 @@ -4128,136 +4128,136 @@ void IntegrityTest() { - assert(sizeof(MovieHeader) == 44); - assert(sizeof(SoundDesc_mm6) == 112); - assert(sizeof(SoundDesc) == 120); - assert(sizeof(OverlayDesc) == 8); - assert(sizeof(ChestDesc) == 36); - assert(sizeof(ObjectDesc_mm6) == 52); - assert(sizeof(ObjectDesc) == 56); - assert(sizeof(DecorationDesc) == 84); - assert(sizeof(IconFrame) == 32); - assert(sizeof(PlayerFrame) == 10); - assert(sizeof(TextureFrame) == 20); - assert(sizeof(SpriteFrame) == 60); - 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_mm6) == 148); - assert(sizeof(MonsterDesc) == 152); - 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(ODMRenderParams) == 0x74); - assert(sizeof(Mouse) == 0x114); - assert(sizeof(Particle_sw) == 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_actor_collision_object) == 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(TrailParticle) == 0x18); - assert(sizeof(EventIndex) == 0xC); - assert(sizeof(_2devent) == 0x34); - assert(sizeof(stru176) == 0x20); - assert(sizeof(SavegameHeader) == 0x64); - assert(sizeof(SavegameList) == 0x3138); - assert(sizeof(StorylineText) == 0x160); - 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(PartyTimeStruct) == 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) == 0xFB); - assert(sizeof(CastSpellInfo) == 0x14); - assert(sizeof(ArcomageCard) == 0x6C); - assert(sizeof(stru320) == 0x3FC); - assert(sizeof(TravelInfo) == 0x20); - assert(sizeof(stru336) == 0x798); - assert(sizeof(Vec3_short_) == 6); - assert(sizeof(BLVFace) == 96); - assert(sizeof(BLVFaceExtra) == 36); - assert(sizeof(BLVSector) == 116); - assert(sizeof(LevelDecoration) == 32); - assert(sizeof(BLVLightMM7) == 16); - assert(sizeof(BSPNode) == 8); - assert(sizeof(SpawnPointMM7) == 24); - assert(sizeof(DDM_DLV_Header) == 40); - assert(sizeof(Actor) == 836); - assert(sizeof(SpriteObject) == 112); - assert(sizeof(Chest) == 5324); - assert(sizeof(stru123) == 0xC8); - assert(sizeof(BLVMapOutline) == 12); - assert(sizeof(LODSprite) == 0x28); + static_assert(sizeof(MovieHeader) == 44, "Wrong type size"); + static_assert(sizeof(SoundDesc_mm6) == 112, "Wrong type size"); + static_assert(sizeof(SoundDesc) == 120, "Wrong type size"); + static_assert(sizeof(OverlayDesc) == 8, "Wrong type size"); + static_assert(sizeof(ChestDesc) == 36, "Wrong type size"); + static_assert(sizeof(ObjectDesc_mm6) == 52, "Wrong type size"); + static_assert(sizeof(ObjectDesc) == 56, "Wrong type size"); + static_assert(sizeof(DecorationDesc) == 84, "Wrong type size"); + static_assert(sizeof(IconFrame) == 32, "Wrong type size"); + static_assert(sizeof(PlayerFrame) == 10, "Wrong type size"); + static_assert(sizeof(TextureFrame) == 20, "Wrong type size"); + static_assert(sizeof(SpriteFrame) == 60, "Wrong type size"); + static_assert(sizeof(RenderVertexSoft) == 0x30, "Wrong type size"); + static_assert(sizeof(RenderBillboard) == 0x34, "Wrong type size"); + static_assert(sizeof(Texture) == 0x48, "Wrong type size"); + static_assert(sizeof(RGBTexture) == 0x28, "Wrong type size"); + static_assert(sizeof(LODFile_IconsBitmaps) == 0x11BB8 + 4, "Wrong type size"); // + virtual dtor ptr + static_assert(sizeof(AudioPlayer) == 0xC84, "Wrong type size"); + static_assert(sizeof(SoundDesc) == 0x78, "Wrong type size"); + static_assert(sizeof(stru339_spell_sound) == 0xAFD8, "Wrong type size"); + static_assert(sizeof(VideoPlayer) == 0x108 + 4, "Wrong type size"); + static_assert(sizeof(MovieHeader) == 0x2C, "Wrong type size"); + static_assert(sizeof(DecorationDesc) == 0x54, "Wrong type size"); + static_assert(sizeof(ObjectDesc) == 0x38, "Wrong type size"); + static_assert(sizeof(OverlayDesc) == 0x8, "Wrong type size"); + static_assert(sizeof(ChestDesc) == 0x24, "Wrong type size"); + static_assert(sizeof(TileDesc) == 0x1A, "Wrong type size"); + static_assert(sizeof(MonsterDesc_mm6) == 148, "Wrong type size"); + static_assert(sizeof(MonsterDesc) == 152, "Wrong type size"); + static_assert(sizeof(Timer) == 0x28, "Wrong type size"); + static_assert(sizeof(OtherOverlay) == 0x14, "Wrong type size"); + static_assert(sizeof(ItemGen) == 0x24, "Wrong type size"); + static_assert(sizeof(SpriteObject) == 0x70, "Wrong type size"); + static_assert(sizeof(ItemDesc) == 0x30, "Wrong type size"); + static_assert(sizeof(ItemsTable) == 0x117A0, "Wrong type size"); + static_assert(sizeof(Chest) == 0x14CC, "Wrong type size"); + static_assert(sizeof(MapInfo) == 0x44, "Wrong type size"); + static_assert(sizeof(SpellInfo) == 0x24, "Wrong type size"); + static_assert(sizeof(SpellData) == 0x14, "Wrong type size"); + static_assert(sizeof(SpellBuff) == 0x10, "Wrong type size"); + static_assert(sizeof(AIDirection) == 0x1C, "Wrong type size"); + static_assert(sizeof(ActorJob) == 0xC, "Wrong type size"); + static_assert(sizeof(Actor) == 0x344, "Wrong type size"); + static_assert(sizeof(LevelDecoration) == 0x20, "Wrong type size"); + static_assert(sizeof(KeyboardActionMapping) == 0x20C, "Wrong type size"); + static_assert(sizeof(UIAnimation) == 0xD, "Wrong type size"); + static_assert(sizeof(SpawnPointMM7) == 0x18, "Wrong type size"); + static_assert(sizeof(ODMFace) == 0x134, "Wrong type size"); + static_assert(sizeof(BSPNode) == 0x8, "Wrong type size"); + static_assert(sizeof(BSPModel) == 0xBC, "Wrong type size"); + static_assert(sizeof(OutdoorLocation) == 0x1C28C, "Wrong type size"); + static_assert(sizeof(BLVFace) == 0x60, "Wrong type size"); + static_assert(sizeof(BLVFaceExtra) == 0x24, "Wrong type size"); + static_assert(sizeof(BLVSector) == 0x74, "Wrong type size"); + static_assert(sizeof(BLVLightMM7) == 0x10, "Wrong type size"); + static_assert(sizeof(BLVDoor) == 0x50, "Wrong type size"); + static_assert(sizeof(IndoorLocation) == 0x690, "Wrong type size"); + //static_assert(sizeof(ODMRenderParams) == 0x74, "Wrong type size"); + static_assert(sizeof(Mouse) == 0x114, "Wrong type size"); + static_assert(sizeof(Particle_sw) == 0x68, "Wrong type size"); + static_assert(sizeof(Particle) == 0x68, "Wrong type size"); + static_assert(sizeof(ParticleEngine) == 0xE430, "Wrong type size"); + static_assert(sizeof(Lightmap) == 0xC1C, "Wrong type size"); + static_assert(sizeof(LightmapBuilder) == 0x3CBC38, "Wrong type size"); + static_assert(sizeof(Vis_SelectionList) == 0x2008, "Wrong type size"); + static_assert(sizeof(Vis) == 0x20D0, "Wrong type size"); + static_assert(sizeof(PlayerBuffAnim) == 0x10, "Wrong type size"); + static_assert(sizeof(ProjectileAnim) == 0x1C, "Wrong type size"); + static_assert(sizeof(stru6) == 0x5F8, "Wrong type size"); + static_assert(sizeof(IndoorCameraD3D_Vec3) == 0x10, "Wrong type size"); + static_assert(sizeof(IndoorCameraD3D_Vec4) == 0x18, "Wrong type size"); //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 + //static_assert(sizeof(IndoorCameraD3D) == 0x1A1384, "Wrong type size"); + static_assert(sizeof(StationaryLight) == 0xC, "Wrong type size"); + static_assert(sizeof(LightsStack_StationaryLight_) == 0x12C8, "Wrong type size"); + static_assert(sizeof(MobileLight) == 0x12, "Wrong type size"); + static_assert(sizeof(LightsStack_MobileLight_) == 0x1C28, "Wrong type size"); + static_assert(sizeof(Game) == 0xE78, "Wrong type size"); + static_assert(sizeof(stru141_actor_collision_object) == 0xA8, "Wrong type size"); + static_assert(sizeof(ActionQueue) == 0x7C, "Wrong type size"); + static_assert(sizeof(NPCData) == 0x4C, "Wrong type size"); + static_assert(sizeof(NPCStats) == 0x17FFC, "Wrong type size"); + static_assert(sizeof(BspRenderer) == 0x53740, "Wrong type size"); + static_assert(sizeof(PaletteManager) == 0x267AF0, "Wrong type size"); + static_assert(sizeof(ViewingParams) == 0x26C, "Wrong type size"); + //static_assert(sizeof(IndoorCamera) == 0x50, "Wrong type size"); + static_assert(sizeof(Bloodsplat) == 0x28, "Wrong type size"); + static_assert(sizeof(BloodsplatContainer) == 0xA0C, "Wrong type size"); + static_assert(sizeof(TrailParticle) == 0x18, "Wrong type size"); + static_assert(sizeof(EventIndex) == 0xC, "Wrong type size"); + static_assert(sizeof(_2devent) == 0x34, "Wrong type size"); + static_assert(sizeof(stru176) == 0x20, "Wrong type size"); + static_assert(sizeof(SavegameHeader) == 0x64, "Wrong type size"); + static_assert(sizeof(SavegameList) == 0x3138, "Wrong type size"); + static_assert(sizeof(StorylineText) == 0x160, "Wrong type size"); + static_assert(sizeof(FactionTable) == 0x1EF1, "Wrong type size"); + static_assert(sizeof(Decal) == 0xC20, "Wrong type size"); + static_assert(sizeof(DecalBuilder) == 0x30C038, "Wrong type size"); + static_assert(sizeof(MonsterInfo) == 0x58, "Wrong type size"); + static_assert(sizeof(MonsterStats) == 0x5BA0, "Wrong type size"); + static_assert(sizeof(RenderD3D) == 0x148, "Wrong type size"); + // static_assert(sizeof(Render) == 0x129844, "Wrong type size"); + static_assert(sizeof(Player) == 0x1B3C, "Wrong type size"); + static_assert(sizeof(PartyTimeStruct) == 0x678, "Wrong type size"); + static_assert(sizeof(Party) == 0x16238, "Wrong type size"); + static_assert(sizeof(GUIButton) == 0xBC, "Wrong type size"); + static_assert(sizeof(GUIWindow) == 0x54, "Wrong type size"); + static_assert(sizeof(GUIProgressBar) == 0x1B8, "Wrong type size"); + static_assert(sizeof(GUIFont) == 0x1020, "Wrong type size"); + // static_assert(sizeof(stru262_TurnBased) == 0x40, "Wrong type size"); + static_assert(sizeof(ArcomageGame) == 0xFB, "Wrong type size"); + static_assert(sizeof(CastSpellInfo) == 0x14, "Wrong type size"); + static_assert(sizeof(ArcomageCard) == 0x6C, "Wrong type size"); + static_assert(sizeof(stru320) == 0x3FC, "Wrong type size"); + static_assert(sizeof(TravelInfo) == 0x20, "Wrong type size"); + static_assert(sizeof(stru336) == 0x798, "Wrong type size"); + static_assert(sizeof(Vec3_short_) == 6, "Wrong type size"); + static_assert(sizeof(BLVFace) == 96, "Wrong type size"); + static_assert(sizeof(BLVFaceExtra) == 36, "Wrong type size"); + static_assert(sizeof(BLVSector) == 116, "Wrong type size"); + static_assert(sizeof(LevelDecoration) == 32, "Wrong type size"); + static_assert(sizeof(BLVLightMM7) == 16, "Wrong type size"); + static_assert(sizeof(BSPNode) == 8, "Wrong type size"); + static_assert(sizeof(SpawnPointMM7) == 24, "Wrong type size"); + static_assert(sizeof(DDM_DLV_Header) == 40, "Wrong type size"); + static_assert(sizeof(Actor) == 836, "Wrong type size"); + static_assert(sizeof(SpriteObject) == 112, "Wrong type size"); + static_assert(sizeof(Chest) == 5324, "Wrong type size"); + static_assert(sizeof(stru123) == 0xC8, "Wrong type size"); + static_assert(sizeof(BLVMapOutline) == 12, "Wrong type size"); + static_assert(sizeof(LODSprite) == 0x28, "Wrong type size"); } bool new_sky = false;