Mercurial > mm7
changeset 839:ae8f83e1b0cf
coordinates for the town portal
author | x1diablo |
---|---|
date | Thu, 28 Mar 2013 20:14:14 +0200 |
parents | d061180f2b42 |
children | 1b88950ff369 |
files | MM7.h Spells.cpp Spells.h mm7_5.cpp mm7_data.cpp |
diffstat | 5 files changed, 36 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/MM7.h Thu Mar 28 00:37:58 2013 +0400 +++ b/MM7.h Thu Mar 28 20:14:14 2013 +0200 @@ -66,33 +66,6 @@ - - - - -/* 154 */ -#pragma pack(push, 1) -struct stru161 -{ - Vec3_int_ pos; - __int16 rot_y; - __int16 rot_x; - unsigned __int16 uMapInfoID; - __int16 field_12; -}; -#pragma pack(pop) -extern stru161 stru_4ECBB8[6]; // weak - - - - - - - - - - - /* 285 */ #pragma pack(push, 1) struct stru289
--- a/Spells.cpp Thu Mar 28 00:37:58 2013 +0400 +++ b/Spells.cpp Thu Mar 28 20:14:14 2013 +0200 @@ -12,6 +12,15 @@ +TownPortalData TownPortalList[6] = //4ECBB8 +{ + {Vec3_int_(-5121, 2107, 1), 1536, 0, 21, 0}, + {Vec3_int_(-15148, -10240, 1473), 0, 0, 4, 0}, + {Vec3_int_(-10519, 5375, 753), 512, 0, 3, 0}, + {Vec3_int_(3114, -11055, 513), 0, 0, 10, 0}, + {Vec3_int_(-158, 7624, 1), 512, 0, 7, 0}, + {Vec3_int_(-1837, -4247, 65), 65, 0, 8, 0} +} ; struct SpellStats *pSpellStats;
--- a/Spells.h Thu Mar 28 00:37:58 2013 +0400 +++ b/Spells.h Thu Mar 28 20:14:14 2013 +0200 @@ -1,6 +1,6 @@ #pragma once - +#include "VectorTypes.h" /* 360 */ enum SPELL_TYPE @@ -256,6 +256,19 @@ #pragma pack(pop) +/* 154 */ +#pragma pack(push, 1) +struct TownPortalData +{ + Vec3_int_ pos; + __int16 rot_y; + __int16 rot_x; + unsigned __int16 uMapInfoID; + __int16 field_12; +}; +#pragma pack(pop) +extern TownPortalData TownPortalList[6]; //4ECBB8 + extern struct SpellStats *pSpellStats;
--- a/mm7_5.cpp Thu Mar 28 00:37:58 2013 +0400 +++ b/mm7_5.cpp Thu Mar 28 20:14:14 2013 +0200 @@ -2087,14 +2087,14 @@ SaveGame(v0, 0); v64 = pMapStats->GetMapInfo(pCurrentMapName); v65 = uMessageParam; - if ( v64 == stru_4ECBB8[uMessageParam].uMapInfoID ) + if ( v64 == TownPortalList[uMessageParam].uMapInfoID ) { - pParty->vPosition.x = stru_4ECBB8[v65].pos.x; - pParty->vPosition.y = stru_4ECBB8[v65].pos.y; - pParty->vPosition.z = stru_4ECBB8[v65].pos.z; + pParty->vPosition.x = TownPortalList[v65].pos.x; + pParty->vPosition.y = TownPortalList[v65].pos.y; + pParty->vPosition.z = TownPortalList[v65].pos.z; pParty->uFallStartY = pParty->vPosition.z; - pParty->sRotationY = stru_4ECBB8[v65].rot_y; - pParty->sRotationX = stru_4ECBB8[v65].rot_x; + pParty->sRotationY = TownPortalList[v65].rot_y; + pParty->sRotationX = TownPortalList[v65].rot_x; } else { @@ -2102,13 +2102,13 @@ OnMapLeave(); dword_6BE364_game_settings_1 |= v0; uGameState = 2; - strcpy(pCurrentMapName, pMapStats->pInfos[stru_4ECBB8[uMessageParam].uMapInfoID].pFilename); + strcpy(pCurrentMapName, pMapStats->pInfos[TownPortalList[uMessageParam].uMapInfoID].pFilename); dword_5B65C0 = v0; - _5B65A8_npcdata_uflags_or_other = stru_4ECBB8[uMessageParam].pos.x; - _5B65AC_npcdata_fame_or_other = stru_4ECBB8[uMessageParam].pos.y; - _5B65B0_npcdata_rep_or_other = stru_4ECBB8[uMessageParam].pos.z; - v66 = stru_4ECBB8[uMessageParam].rot_x; - _5B65B4_npcdata_loword_house_or_other = stru_4ECBB8[uMessageParam].rot_y; + _5B65A8_npcdata_uflags_or_other = TownPortalList[uMessageParam].pos.x; + _5B65AC_npcdata_fame_or_other = TownPortalList[uMessageParam].pos.y; + _5B65B0_npcdata_rep_or_other = TownPortalList[uMessageParam].pos.z; + v66 = TownPortalList[uMessageParam].rot_x; + _5B65B4_npcdata_loword_house_or_other = TownPortalList[uMessageParam].rot_y; _5B65B8_npcdata_hiword_house_or_other = v66; InitializeActors(); }
--- a/mm7_data.cpp Thu Mar 28 00:37:58 2013 +0400 +++ b/mm7_data.cpp Thu Mar 28 20:14:14 2013 +0200 @@ -279,7 +279,7 @@ struct PlayerFrameTable *pPlayerFrameTable; // idb #include "MM7.h" -stru161 stru_4ECBB8[6]; + stru289 stru_6BE158; int paperdoll_Weapon[4][16][2] = {//4E4C30 0x80, 0xCD, 0x1E, 0x90, 0x58, 0x55, 0, 0, 0, 0, 0, 0, 0x11, 0x68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,