# HG changeset patch
# User Ritor1
# Date 1383794350 -21600
# Node ID 7a2fc95f3b9923fe11cd4822fc83778502e35f77
# Parent bb1e7b0780d818b0d165c31a53e5b6ccbb194f10# Parent 30c2b575d25ca3accf3281c25680d2bee7f6303b
Слияние
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Actor.cpp
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 AudioPlayer.cpp
--- a/AudioPlayer.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/AudioPlayer.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -84,7 +84,7 @@
sprintf(pSoundName, "%s", pSounds[i].pSoundName);
pSoundDesc = &pSoundList->pSounds[i];
if ( pSoundList->pSounds[i].eType != SOUND_DESC_SYSTEM || (sprintf(pSoundName, "%s", pSounds[i].pSoundName),
- pSoundList->pSounds[i].pSoundData[0] = ::LoadSound(pSoundName, (SoundData *)0xFFFFFFFF, pSounds[i].uSoundID),
+ pSoundList->pSounds[i].pSoundData[0] = ::LoadSound(pSoundName, (SoundData *)-1, pSounds[i].uSoundID),
!pAudioPlayer->b3DSoundInitialized)
|| (pSoundDesc = &pSoundList->pSounds[i], !(pSoundDesc->uFlags & SOUND_DESC_SWAP))
|| !pSoundDesc->pSoundData[0] )
@@ -150,7 +150,7 @@
return uSoundIdx;
if (!pSound->pSoundData[0])
- pSound->pSoundData[0] = ::LoadSound(pSound->pSoundName, (SoundData *)0xFFFFFFFF, pSound->uSoundID);
+ pSound->pSoundData[0] = ::LoadSound(pSound->pSoundName, (SoundData *)-1, pSound->uSoundID);
if (!pSound->pSoundData[0])
return 0;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Build/Visual Studio 2010/World of Might and Magic.vcxproj
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj Thu Nov 07 09:18:58 2013 +0600
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj Thu Nov 07 09:19:10 2013 +0600
@@ -165,6 +165,7 @@
+
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 GUIWindow.cpp
--- a/GUIWindow.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/GUIWindow.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -341,6 +341,7 @@
pIcons_LOD->SyncLoadedFilesCount();
pCurrentScreen = pMainScreenNum;
+ break;
}
case WINDOW_null:
return;
@@ -1159,7 +1160,7 @@
//----- (0044CE08) --------------------------------------------------------
-void GUIWindow::DrawText( GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor )
+void GUIWindow::DrawText( GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, signed int uFontShadowColor )
{
GUIWindow *v9; // edi@1
GUIFont *v10; // ebx@1
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 GUIWindow.h
--- a/GUIWindow.h Thu Nov 07 09:18:58 2013 +0600
+++ b/GUIWindow.h Thu Nov 07 09:19:10 2013 +0600
@@ -327,7 +327,7 @@
UIMessageType msg, unsigned int msg_param, unsigned __int8 uHotkey, const char *pName, struct Texture *pTextures, ...);
void DrawFlashingInputCursor(signed int uX, int uY, struct GUIFont *a2);
int DrawTextInRect(GUIFont *pFont, unsigned int uX, unsigned int uY, unsigned int uColor, const char *text, int rect_width, int reverse_text);
- void DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor);
+ void DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, signed int uFontShadowColor);
void DrawTitleText(GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing);
void DrawShops_next_generation_time_string(__int64 next_generation_time);
void HouseDialogManager();
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Game.cpp
--- a/Game.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Game.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -234,10 +234,10 @@
{
int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
sprintf(pTmpBuf.data(), "Party Sector ID: %u/%u\n", sector_id, pIndoor->uNumSectors);
- pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
+ pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, -1);
}
sprintf(pTmpBuf.data(), "Party Position: % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
- pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
+ pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, -1);
if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
{
@@ -252,7 +252,7 @@
int floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false);
sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6);
}
- pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
+ pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, -1);
}
GUI_UpdateWindows();
@@ -299,7 +299,7 @@
MSG Msg; // [sp+28h] [bp-3Ch]@20
char Source[64]; // [sp+44h] [bp-20h]@76
- bLoading = uCurrentMenuID == MENU_LoadingProcInMainMenu;
+ bLoading = sCurrentMenuID == MENU_LoadingProcInMainMenu;
SetCurrentMenuID((MENU_STATE)-1);
if (bLoading)
{
@@ -719,7 +719,7 @@
//----- (0044EDE4) --------------------------------------------------------
-bool Game::AlterGamma_BLV(BLVFace *pFace, unsigned int *pColor)
+bool Game::AlterGamma_BLV(BLVFace *pFace, signed int *pColor)
{
if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS &&
pFace->uAttributes & FACE_CAN_SATURATE_COLOR)
@@ -732,7 +732,7 @@
}
//----- (0044EE30) --------------------------------------------------------
-bool Game::AlterGamma_ODM(ODMFace *pFace, unsigned int *pColor)
+bool Game::AlterGamma_ODM(ODMFace *pFace, signed int *pColor)
{
if (uFlags2 & GAME_FLAGS_2_SATURATE_LIGHTMAPS &&
pFace->uAttributes & FACE_CAN_SATURATE_COLOR)
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Game.h
--- a/Game.h Thu Nov 07 09:18:58 2013 +0600
+++ b/Game.h Thu Nov 07 09:19:10 2013 +0600
@@ -98,8 +98,8 @@
void OutlineSelection();
signed int _44EC23(struct Polygon *a2, int *a3, signed int a4);
signed int _44ED0A(struct BLVFace *a2, int *a3, signed int a4);
- bool AlterGamma_BLV(struct BLVFace *pFace, unsigned int *pColor);
- bool AlterGamma_ODM(struct ODMFace *pFace, unsigned int *pColor);
+ bool AlterGamma_BLV(struct BLVFace *pFace, signed int *pColor);
+ bool AlterGamma_ODM(struct ODMFace *pFace, signed int *pColor);
bool draw_debug_outlines();
bool _44EEA7();
bool _44F07B();
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Indoor.cpp
--- a/Indoor.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Indoor.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -4631,7 +4631,7 @@
v30 = HIDWORD(p->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime) < 0;
v0->field_1E = v41;
v0->pSpriteFrame = v10;
- v0->uTintColor = pMonsterList->pMonsters[p->pMonsterInfo.uID - 1].uTintColor;
+ v0->sTintColor = pMonsterList->pMonsters[p->pMonsterInfo.uID - 1].sTintColor;
if ( !v30 && (!(v30 | v29) || LODWORD(p->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime)) )
{
HIBYTE(v26) = HIBYTE(v41) | 1;
@@ -4785,7 +4785,7 @@
v3->world_z = a3;
v3->uScreenSpaceX = v36;
v22 = v35;
- v3->uTintColor = 0;
+ v3->sTintColor = 0;
v3->uScreenSpaceY = v22;
//v23 = 8 * i;
//LOBYTE(v23) = PID(OBJECT_Item,i);
@@ -5047,7 +5047,7 @@
v15->actual_z = HIWORD(x);
v15->object_pid = PID(OBJECT_Decoration,uDecorationID);
- v15->uTintColor = 0;
+ v15->sTintColor = 0;
v15->pSpriteFrame = v12;
}
}
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 IndoorCameraD3D.cpp
--- a/IndoorCameraD3D.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/IndoorCameraD3D.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -549,7 +549,7 @@
}
//----- (00437C96) --------------------------------------------------------
-void IndoorCameraD3D::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, unsigned int uDiffuseBegin, const RenderVertexD3D3 *pLineEnd, unsigned int uDiffuseEnd, float z_stuff)
+void IndoorCameraD3D::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff)
{
double v6; // st7@2
IDirect3DDevice3 *v7; // eax@2
@@ -568,8 +568,8 @@
v13[0].pos.z = v6;
v13[1].pos.z = v6;
v12 = 0;
- v13[0].diffuse = uDiffuseBegin;
- v13[1].diffuse = uDiffuseEnd;
+ v13[0].diffuse = sDiffuseBegin;
+ v13[1].diffuse = sDiffuseEnd;
v7 = pRenderer->pRenderD3D->pDevice;
v11 = 0;
//v10 = (const char *)v7;
@@ -588,7 +588,7 @@
}
//----- (00437AB5) --------------------------------------------------------
-void IndoorCameraD3D::do_draw_debug_line_sw(RenderVertexSoft *pLineBegin, unsigned int uStartDiffuse, RenderVertexSoft *pLineEnd, unsigned int uEndDiffuse, unsigned int uOutNumVertices, float z_stuff)
+void IndoorCameraD3D::do_draw_debug_line_sw(RenderVertexSoft *pLineBegin, signed int sStartDiffuse, RenderVertexSoft *pLineEnd, signed int sEndDiffuse, unsigned int uOutNumVertices, float z_stuff)
{
char *v7; // eax@2
signed int v8; // edx@2
@@ -636,13 +636,13 @@
v24[0].pos.x = pVertices[0].vWorldViewProjX;
v24[0].pos.y = pVertices[0].vWorldViewProjY;
v24[0].pos.z = v16;
- v24[0].diffuse = uStartDiffuse;
+ v24[0].diffuse = sStartDiffuse;
v24[0].rhw = 0.001;
v24[1].pos.x = pVertices[1].vWorldViewProjX;
v24[0].texcoord.x = 0.0;
v24[1].pos.y = pVertices[1].vWorldViewProjY;
v24[0].texcoord.y = 0.0;
- v24[1].diffuse = uEndDiffuse;
+ v24[1].diffuse = sEndDiffuse;
v24[1].pos.z = v16;
v24[1].specular = 0;
v21 = 0;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 IndoorCameraD3D.h
--- a/IndoorCameraD3D.h Thu Nov 07 09:18:58 2013 +0600
+++ b/IndoorCameraD3D.h Thu Nov 07 09:19:10 2013 +0600
@@ -152,8 +152,8 @@
void PrepareAndDrawDebugOutline(struct BLVFace *pFace, unsigned int uDiffuse);
void debug_outline_sw(struct RenderVertexSoft *a2, unsigned int uNumVertices, unsigned int uDiffuse, float a5);
void debug_outline_d3d(const struct RenderVertexD3D3 *pLineVertices, unsigned int uNumLines, int uDiffuse, float z_stuff);
- void do_draw_debug_line_sw(struct RenderVertexSoft *pLineBegin, unsigned int uStartDiffuse, struct RenderVertexSoft *pLineEnd, unsigned int uEndDiffuse, unsigned int uOutNumVertices, float z_stuff);
- void do_draw_debug_line_d3d(const struct RenderVertexD3D3 *pLineBegin, unsigned int uDiffuseBegin, const RenderVertexD3D3 *pLineEnd, unsigned int uDiffuseEnd, float z_stuff);
+ void do_draw_debug_line_sw(struct RenderVertexSoft *pLineBegin, signed int sStartDiffuse, struct RenderVertexSoft *pLineEnd, signed int sEndDiffuse, unsigned int uOutNumVertices, float z_stuff);
+ void do_draw_debug_line_d3d(const struct RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff);
//void sr_437D4A_draw_some_vertices(float x, float y, float z, unsigned int a5, char a6, float a7);
//void sr_438141_draw_list_0037C();
//void sr_438240_draw_lits();
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Monsters.cpp
--- a/Monsters.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Monsters.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -440,7 +440,7 @@
Argsb = atoi(v25.pProperties[13]) & 0xFF;
v26 = atoi(v25.pProperties[14]) & 0xFF;
v18 = atoi(v25.pProperties[15]);
- v2->pMonsters[v2->uNumMonsters].uTintColor = v18 | ((v26 | ((Argsb | (v17 << 8)) << 8)) << 8);
+ v2->pMonsters[v2->uNumMonsters].sTintColor = v18 | ((v26 | ((Argsb | (v17 << 8)) << 8)) << 8);
v19 = 0;
do
{
@@ -478,7 +478,7 @@
dst->uMonsterRadius = src->uMonsterRadius;
dst->uMovementSpeed = src->uMovementSpeed;
dst->uToHitRadius = src->uToHitRadius;
- dst->uTintColor = 0xFFFFFFFF;
+ dst->sTintColor = -1;
memcpy(dst->pSoundSampleIDs, src->pSoundSampleIDs, sizeof(src->pSoundSampleIDs));
memcpy(dst->pMonsterName, src->pMonsterName, sizeof(src->pMonsterName));
memcpy(dst->pSpriteNames, src->pSpriteNames, sizeof(src->pSpriteNames));
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Monsters.h
--- a/Monsters.h Thu Nov 07 09:18:58 2013 +0600
+++ b/Monsters.h Thu Nov 07 09:19:10 2013 +0600
@@ -232,7 +232,7 @@
unsigned __int16 uMonsterRadius;
unsigned __int16 uMovementSpeed;
__int16 uToHitRadius;
- unsigned int uTintColor;
+ signed int sTintColor;
unsigned __int16 pSoundSampleIDs[4];
char pMonsterName[32];
char pSpriteNames[10][10];
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Mouse.cpp
--- a/Mouse.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Mouse.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -479,7 +479,7 @@
int *pXY_; // esi@1
signed int y; // eax@7
signed int x; // ecx@7
- unsigned int v4; // eax@11
+ signed int v4; // eax@11
signed int v5; // eax@17
signed int v6; // esi@19
int v7; // esi@30
@@ -518,7 +518,7 @@
goto LABEL_30;
v4 = GetCurrentMenuID();
x = pX;
- if ( v4 != 0xFFFFFFFF
+ if ( v4 != -1
|| (signed int)pX < (signed int)pViewport->uViewportTL_X
|| (signed int)pX > (signed int)pViewport->uViewportBR_X )
{
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Outdoor.cpp
--- a/Outdoor.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Outdoor.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -239,11 +239,11 @@
// 47F458: using guessed type int __stdcall WorldPosToGridCellZ(int);
//----- (00488EEF) --------------------------------------------------------
-unsigned int OutdoorLocation::GetTileTexture(int sX, int sY)
+unsigned int OutdoorLocation::GetTileTexture(signed int sX, signed int sY)
{
//OutdoorLocation *v3; // esi@1
- unsigned int v4; // edi@1
- unsigned int v5; // eax@1
+ signed int v4; // edi@1
+ signed int v5; // eax@1
// unsigned int result; // eax@5
/*v3 = this;
@@ -1170,15 +1170,15 @@
v1->pFaceIDLIST = (unsigned __int16 *)v6;
*(short *)v6 = 0;
strcpy(v1->pSkyTextureName, pDefaultSkyTexture.data());
- v1->uSky_TextureID = pBitmaps_LOD->LoadTexture(v1->pSkyTextureName);
+ v1->sSky_TextureID = pBitmaps_LOD->LoadTexture(v1->pSkyTextureName);
strcpy(v1->pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture.data());
v7 = pBitmaps_LOD->LoadTexture(v1->pGroundTileset);
- v1->uMainTile_BitmapID = v7;
+ v1->sMainTile_BitmapID = v7;
- if ( v1->uSky_TextureID == -1 )
+ if ( v1->sSky_TextureID == -1 )
Error("Invalid Sky Tex Handle");
- if ( v1->uMainTile_BitmapID == -1 )
+ if ( v1->sMainTile_BitmapID == -1 )
Error("Invalid Ground Tex Handle");
}
@@ -1667,16 +1667,16 @@
v108 = 0;
v107 = (int)pDefaultSkyTexture;
}
- uSky_TextureID = pBitmaps_LOD->LoadTexture((const char *)v107, (enum TEXTURE_TYPE)v108);
+ sSky_TextureID = pBitmaps_LOD->LoadTexture((const char *)v107, (enum TEXTURE_TYPE)v108);
strcpy(pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture);
v34 = pTileTable->GetTileById(pTileTypes[0].uTileID);
v35 = pBitmaps_LOD->LoadTexture(v34->pTileName);
- v36 = uSky_TextureID;
- uMainTile_BitmapID = v35;
+ v36 = sSky_TextureID;
+ sMainTile_BitmapID = v35;
if ( v36 != -1 )
pBitmaps_LOD->pTextures[v36].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[v36].palette_id1);
- v37 = uMainTile_BitmapID;
+ v37 = sMainTile_BitmapID;
if ( v37 != -1 )
pBitmaps_LOD->pTextures[v37].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[v37].palette_id1);
@@ -2323,9 +2323,9 @@
//v108 = 0;
TileDesc* v98 = pTileTable->GetTileById(pTileTypes[0].uTileID);
//v99 = pBitmaps_LOD->LoadTexture(v98->pTileName, TEXTURE_DEFAULT);
- uMainTile_BitmapID = pBitmaps_LOD->LoadTexture(v98->pTileName, TEXTURE_DEFAULT);
- if (uMainTile_BitmapID != -1)
- pBitmaps_LOD->pTextures[uMainTile_BitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[uMainTile_BitmapID].palette_id1);
+ sMainTile_BitmapID = pBitmaps_LOD->LoadTexture(v98->pTileName, TEXTURE_DEFAULT);
+ if (sMainTile_BitmapID != -1)
+ pBitmaps_LOD->pTextures[sMainTile_BitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[sMainTile_BitmapID].palette_id1);
_47F0E2();
@@ -2349,9 +2349,9 @@
strcpy(loc_time.sky_texture_name, "plansky3");
}
//v101 = pBitmaps_LOD->LoadTexture(field_4F8);
- uSky_TextureID = pBitmaps_LOD->LoadTexture(loc_time.sky_texture_name);
- if (uSky_TextureID != -1)
- pBitmaps_LOD->pTextures[uSky_TextureID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[uSky_TextureID].palette_id1);
+ sSky_TextureID = pBitmaps_LOD->LoadTexture(loc_time.sky_texture_name);
+ if (sSky_TextureID != -1)
+ pBitmaps_LOD->pTextures[sSky_TextureID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[sSky_TextureID].palette_id1);
pPaletteManager->RecalculateAll();
pSoundList->LoadSound(53, 0);
@@ -2427,14 +2427,14 @@
}
//----- (0047ED08) --------------------------------------------------------
-unsigned int OutdoorLocation::DoGetTileTexture(unsigned int uX, unsigned int uY)
+unsigned int OutdoorLocation::DoGetTileTexture(signed int sX, signed int sY)
{
int v3; // esi@5
unsigned int result; // eax@9
- assert(uX < 128 && uY < 128);
+ assert(sX < 128 && sY < 128);
- v3 = this->pTerrain.pTilemap[uY * 128 + uX];
+ v3 = this->pTerrain.pTilemap[sY * 128 + sX];
if (v3 < 198) // < Tileset_3
{
if (v3 >= 90)
@@ -2490,23 +2490,23 @@
}
//----- (0047EDB3) --------------------------------------------------------
-int OutdoorLocation::ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY)
+int OutdoorLocation::ActuallyGetSomeOtherTileInfo(signed int sX, signed int sY)
{
- assert(uX < 128 && uY < 128);
+ assert(sX < 128 && sY < 128);
int v3; // esi@5
- v3 = this->pTerrain.pTilemap[uY * 128 + uX];
+ v3 = this->pTerrain.pTilemap[sY * 128 + sX];
if ( v3 >= 90 )
v3 = v3 + this->pTileTypes[(v3 - 90) / 36].uTileID - 36 * ((v3 - 90) / 36) - 90;
return pTileTable->pTiles[v3].uAttributes;
}
//----- (0047EE16) --------------------------------------------------------
-int OutdoorLocation::DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ)
+int OutdoorLocation::DoGetHeightOnTerrain(signed int sX, signed int sZ)
{
- assert(uX < 128 && uZ < 128);
+ assert(sX < 128 && sZ < 128);
- return 32 * pTerrain.pHeightmap[uZ * 128 + uX];
+ return 32 * pTerrain.pHeightmap[sZ * 128 + sX];
}
//----- (0047EE49) --------------------------------------------------------
@@ -3101,7 +3101,7 @@
v36 = actor->pMonsterInfo.uID;
v28->field_1E = v62 | 0x200;
v28->pSpriteFrame = v15;
- v28->uTintColor = pMonsterList->pMonsters[actor->pMonsterInfo.uID-1].uTintColor;//*((int *)&v35[v36] - 36);
+ v28->sTintColor = pMonsterList->pMonsters[actor->pMonsterInfo.uID-1].sTintColor;//*((int *)&v35[v36] - 36);
if (actor->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime)
v28->field_1E = v62 | 0x200;
}
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Outdoor.h
--- a/Outdoor.h Thu Nov 07 09:18:58 2013 +0600
+++ b/Outdoor.h Thu Nov 07 09:19:10 2013 +0600
@@ -137,10 +137,10 @@
void Release();
bool Load(const char *pFilename, ODMFace *File, size_t a4, int thisa);
int GetTileIdByTileMapId(signed int a2);
- unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ);
+ unsigned int DoGetTileTexture(signed int uX, signed int uZ);
int _47ED83(signed int a2, signed int a3);
- int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY);
- int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ);
+ int ActuallyGetSomeOtherTileInfo(signed int uX, signed int uY);
+ int DoGetHeightOnTerrain(signed int sX, signed int sZ);
int GetSoundIdByPosition(signed int X_pos, signed int Y_pos, int a4);
int UpdateDiscoveredArea(int a2, int a3, int a4);
bool _47F04C(signed int a2, signed int a3);
@@ -179,8 +179,8 @@
unsigned int numFaceIDListElems;
unsigned __int16 *pFaceIDLIST;
unsigned int *pOMAP;
- unsigned int uSky_TextureID;
- unsigned int uMainTile_BitmapID;
+ signed int sSky_TextureID;
+ signed int sMainTile_BitmapID;
__int16 field_F0;
__int16 field_F2;
int field_F4;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 ParticleEngine.cpp
--- a/ParticleEngine.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/ParticleEngine.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -632,7 +632,7 @@
//Particle *v14; // eax@28
RenderBillboardTransform_local0 v15; // [sp+Ch] [bp-58h]@1
- v15.uParentBillboardID = -1;
+ v15.sParentBillboardID = -1;
for (uint i = uStartParticle; i < uEndParticle; ++i)
{
@@ -746,7 +746,7 @@
//int v15; // [sp+5Ch] [bp-8h]@9
int v16; // [sp+60h] [bp-4h]@1
- pBillboard.uParentBillboardID = -1;
+ pBillboard.sParentBillboardID = -1;
pParticleEngine = this;
//v2 = this->uStartParticle;
//v5 = v2 > this->uEndParticle;// v5 = __OFSUB__(v2, this->uEndParticle);
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Player.cpp
--- a/Player.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Player.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -7253,7 +7253,7 @@
//----- (00439FCB) --------------------------------------------------------
-void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int dmgSource, Vec3_int_ *pPos, unsigned int a4)
+void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int dmgSource, Vec3_int_ *pPos, signed int a4)
{
Player *playerPtr; // ebx@3
Actor *actorPtr; // esi@3
@@ -7413,7 +7413,7 @@
}
if ( activePlayerCounter )
{
- playerPtr = &pParty->pPlayers[v72[rand() % activePlayerCounter]];//&stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
+ playerPtr = &pParty->pPlayers[v72[rand() % activePlayerCounter] - 1];//&stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
}
}
int v68;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Render.cpp
--- a/Render.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Render.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -128,6 +128,35 @@
return v0;
}
+void Render::sub_4A19B0()
+{
+ char *result; // eax@1
+ signed int v1; // ecx@1
+ /*
+ result = (char *)&this->pBillboardRenderListD3D[0].uOpacity;
+ v1 = 1000;
+ do
+ {
+ *(_DWORD *)result = 0;
+ *((_DWORD *)result + 1) = -1;
+ *((_DWORD *)result + 3) = -1;
+ *((_DWORD *)result - 34) = 4;
+ result += 156;
+ --v1;
+ }
+ while ( v1 );
+ */
+ for( int i = 0; i < 1000; i++ )
+ {
+ this->pBillboardRenderListD3D[i].uOpacity = (RenderBillboardD3D::OpacityType)0;
+ this->pBillboardRenderListD3D[i].field_90 = -1;
+ this->pBillboardRenderListD3D[i].sParentBillboardID = -1;
+ this->pBillboardRenderListD3D[i].uNumVertices = 4;
+ }
+
+ return;
+}
+
//----- (00440CB8) --------------------------------------------------------
void Render::DrawBillboardList_BLV()
{
@@ -135,7 +164,7 @@
int v5; // eax@11
RenderBillboardTransform_local0 soft_billboard; // [sp+4h] [bp-50h]@1
- soft_billboard.uParentBillboardID = -1;
+ soft_billboard.sParentBillboardID = -1;
soft_billboard.pTarget = pBLVRenderParams->pRenderTarget;
soft_billboard.pTargetZ = pBLVRenderParams->pTargetZBuffer;
soft_billboard.uTargetPitch = pRenderer->uTargetSurfacePitch;
@@ -150,13 +179,13 @@
RenderBillboard* p = &pBillboardRenderList[i];
soft_billboard.uScreenSpaceX = p->uScreenSpaceX;
- soft_billboard.uParentBillboardID = i;
+ soft_billboard.sParentBillboardID = i;
soft_billboard.uScreenSpaceY = p->uScreenSpaceY;
soft_billboard._screenspace_x_scaler_packedfloat = p->_screenspace_x_scaler_packedfloat;
soft_billboard._screenspace_y_scaler_packedfloat = p->_screenspace_y_scaler_packedfloat;
soft_billboard.sZValue = p->sZValue;
soft_billboard.uFlags = p->field_1E;
- soft_billboard.uTintColor = p->uTintColor;
+ soft_billboard.sTintColor = p->sTintColor;
v2 = p->uHwSpriteID;
if ( v2 != -1 )
{
@@ -378,7 +407,7 @@
//int v17; // [sp+5Ch] [bp-8h]@2
int v18; // [sp+60h] [bp-4h]@13
- billboard.uParentBillboardID = -1;
+ billboard.sParentBillboardID = -1;
billboard.pTarget = pRenderer->pTargetSurface;
billboard.pTargetZ = pRenderer->pActiveZBuffer;
billboard.uTargetPitch = pRenderer->uTargetSurfacePitch;
@@ -394,9 +423,9 @@
billboard.uScreenSpaceX = pBillboard->uScreenSpaceX;
billboard.uScreenSpaceY = pBillboard->uScreenSpaceY;
- billboard.uParentBillboardID = i;
+ billboard.sParentBillboardID = i;
billboard._screenspace_x_scaler_packedfloat = pBillboard->_screenspace_x_scaler_packedfloat;
- billboard.uTintColor = pBillboard->uTintColor;
+ billboard.sTintColor = pBillboard->sTintColor;
billboard._screenspace_y_scaler_packedfloat = pBillboard->_screenspace_y_scaler_packedfloat;
billboard.sZValue = pBillboard->sZValue;
billboard.uFlags = pBillboard->field_1E;
@@ -618,7 +647,7 @@
v27 = (object->uAttributes & 0x20) == 0;
v3->sZValue = v26 + (PID(OBJECT_Item,i));
v3->dimming_level = 0;
- v3->uTintColor = 0;
+ v3->sTintColor = 0;
if ( !v27 )
{
if ( !pRenderer->pRenderD3D )
@@ -1120,7 +1149,7 @@
v27->sZValue = v30 + v31;
v27->dimming_level = 0;
v27->pSpriteFrame = v8;
- v27->uTintColor = 0;
+ v27->sTintColor = 0;
}
}
goto LABEL_38;
@@ -1849,7 +1878,7 @@
unsigned int v55; // [sp+5Ch] [bp-Ch]@34
unsigned int v56; // [sp+60h] [bp-8h]@12
int v57; // [sp+60h] [bp-8h]@34
- unsigned int a2; // [sp+64h] [bp-4h]@4
+ signed int a2; // [sp+64h] [bp-4h]@4
v5 = this;
v6 = 0;
@@ -1859,7 +1888,7 @@
v53 = v7;
v54 = v7->std__vector_000004_size;
if ( v7->std__vector_000004_size)
- a2 = 0xFFFFFFFF;
+ a2 = -1;
pGame->AlterGamma_ODM(a4, &a2);
if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_01)
{
@@ -2095,6 +2124,7 @@
hd_water_tile_id = -1;
hd_water_current_frame = 0;
+ sub_4A19B0();
}
bool Render::Initialize(bool bWindowed, OSWindow *window, bool bColoredLights, uint32_t uDetailLevel, bool bTinting)
@@ -4508,7 +4538,7 @@
//----- (004A1EA3) --------------------------------------------------------
unsigned int Render::GetParentBillboardID(unsigned int uBillboardID)
{
- return pRenderer->pBillboardRenderListD3D[uBillboardID].uParentBillboardID;
+ return pRenderer->pBillboardRenderListD3D[uBillboardID].sParentBillboardID;
}
//----- (004A1EB6) --------------------------------------------------------
@@ -5367,18 +5397,18 @@
//v59 = pGame->pLightmapBuilder;
//v9 = v59->std__vector_000004_size;
- uint uCorrectedColor = uColor;
+ int sCorrectedColor = uColor;
if (pGame->pLightmapBuilder->std__vector_000004_size)
- uCorrectedColor = 0xFFFFFFFF;
- pGame->AlterGamma_BLV(pFace, &uCorrectedColor);
+ sCorrectedColor = -1;
+ pGame->AlterGamma_BLV(pFace, &sCorrectedColor);
if (pFace->uAttributes & FACE_OUTLINED)
{
int color;
if (GetTickCount() % 300 >= 150)
- uColor = uCorrectedColor = 0xFF20FF20;
- else uColor = uCorrectedColor = 0xFF109010;
+ uColor = sCorrectedColor = 0xFF20FF20;
+ else uColor = sCorrectedColor = 0xFF109010;
}
if (byte_4D864C && pGame->uFlags & GAME_FLAGS_1_01)
@@ -5392,7 +5422,7 @@
d3d_vertex_buffer[i].pos.y = array_507D30[i].vWorldViewProjY;
d3d_vertex_buffer[i].pos.z = 1.0 - 1.0 / (array_507D30[i].vWorldViewPosition.x * 0.061758894);
d3d_vertex_buffer[i].rhw = 1.0 / array_507D30[i].vWorldViewPosition.x;
- d3d_vertex_buffer[i].diffuse = uCorrectedColor;
+ d3d_vertex_buffer[i].diffuse = sCorrectedColor;
d3d_vertex_buffer[i].specular = 0;
d3d_vertex_buffer[i].texcoord.x = array_507D30[i].u / (double)pTex->uTextureWidth;
d3d_vertex_buffer[i].texcoord.y = array_507D30[i].v / (double)pTex->uTextureHeight;
@@ -5419,7 +5449,7 @@
d3d_vertex_buffer[i].pos.y = array_507D30[i].vWorldViewProjY;
d3d_vertex_buffer[i].pos.z = 1.0 - 1.0 / (array_507D30[i].vWorldViewPosition.x * 0.061758894);
d3d_vertex_buffer[i].rhw = 1.0 / array_507D30[i].vWorldViewPosition.x;
- d3d_vertex_buffer[i].diffuse = uCorrectedColor;
+ d3d_vertex_buffer[i].diffuse = sCorrectedColor;
d3d_vertex_buffer[i].specular = 0;
d3d_vertex_buffer[i].texcoord.x = array_507D30[i].u / (double)pTex->uTextureWidth;
d3d_vertex_buffer[i].texcoord.y = array_507D30[i].v / (double)pTex->uTextureHeight;
@@ -5489,7 +5519,7 @@
pGame->pLightmapBuilder->DrawLightmaps(/*-1, 0*/);
for (uint i = 0; i < uNumVertices; ++i)
- d3d_vertex_buffer[i].diffuse = uCorrectedColor;
+ d3d_vertex_buffer[i].diffuse = sCorrectedColor;
/*v33 = uNumVertices;
if ( (signed int)uNumVertices > 0 )
{
@@ -5573,7 +5603,7 @@
//v10 = a3;
pBillboardRenderListD3D[v7].field_90 = pSoftBillboard->field_44;
pBillboardRenderListD3D[v7].sZValue = pSoftBillboard->sZValue;
- pBillboardRenderListD3D[v7].uParentBillboardID = pSoftBillboard->uParentBillboardID;
+ pBillboardRenderListD3D[v7].sParentBillboardID = pSoftBillboard->sParentBillboardID;
//v25 = pSoftBillboard->uScreenSpaceX;
//v24 = pSoftBillboard->uScreenSpaceY;
a1 = (pSoftBillboard->_screenspace_x_scaler_packedfloat & 0xFFFF) * 0.000015260186 + HIWORD(pSoftBillboard->_screenspace_x_scaler_packedfloat);
@@ -5582,10 +5612,10 @@
v27 = (double)(pSprite->uBufferHeight - pSprite->uAreaY);
if ( pSoftBillboard->uFlags & 4 )
v31 = v31 * -1.0;
- if ( pSoftBillboard->uTintColor && this->bTinting )
+ if ( pSoftBillboard->sTintColor && this->bTinting )
{
v11 = ::GetActorTintColor(dimming_level, 0, pSoftBillboard->zbuffer_depth, 0, 0);
- v12 = BlendColors(pSoftBillboard->uTintColor, v11);
+ v12 = BlendColors(pSoftBillboard->sTintColor, v11);
if ( v28 )
v12 = (unsigned int)((char *)&array_77EC08[1852].pEdgeList1[17] + 3) & ((unsigned int)v12 >> 1);
}
@@ -5706,7 +5736,7 @@
pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_1;
pBillboardRenderListD3D[v8].field_90 = a2->field_44;
pBillboardRenderListD3D[v8].sZValue = a2->sZValue;
- pBillboardRenderListD3D[v8].uParentBillboardID = a2->uParentBillboardID;
+ pBillboardRenderListD3D[v8].sParentBillboardID = a2->sParentBillboardID;
//v9 = a2->uScreenSpaceX;
//v10 = a2->uScreenSpaceY;
v11 = (a2->_screenspace_x_scaler_packedfloat & 0xFFFF) * 0.000015260186 + HIWORD(a2->_screenspace_x_scaler_packedfloat);
@@ -5879,7 +5909,7 @@
pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_1;
pBillboardRenderListD3D[v8].field_90 = a2->field_44;
pBillboardRenderListD3D[v8].sZValue = a2->sZValue;
- pBillboardRenderListD3D[v8].uParentBillboardID = a2->uParentBillboardID;
+ pBillboardRenderListD3D[v8].sParentBillboardID = a2->sParentBillboardID;
v9 = a2->uScreenSpaceX;
v10 = a2->uScreenSpaceY;
v11 = (a2->_screenspace_x_scaler_packedfloat & 0xFFFF) * 0.000015260186 + HIWORD(a2->_screenspace_x_scaler_packedfloat);
@@ -6025,10 +6055,10 @@
v29 = (a2->_screenspace_y_scaler_packedfloat & 0xFFFF) / 65530.0 + HIWORD(a2->_screenspace_y_scaler_packedfloat);
unsigned int diffuse = ::GetActorTintColor(dimming_level, 0, a2->zbuffer_depth, 0, pBillboard);
- if (a2->uTintColor & 0x00FFFFFF && bTinting)
- {
- diffuse = BlendColors(a2->uTintColor, diffuse);
- if (a2->uTintColor & 0xFF000000)
+ if (a2->sTintColor & 0x00FFFFFF && bTinting)
+ {
+ diffuse = BlendColors(a2->sTintColor, diffuse);
+ if (a2->sTintColor & 0xFF000000)
diffuse = 0x007F7F7F & ((unsigned int)diffuse >> 1);
}
@@ -6093,9 +6123,9 @@
pBillboardRenderListD3D[v8].z_order = a2->zbuffer_depth;
pBillboardRenderListD3D[v8].field_90 = a2->field_44;
pBillboardRenderListD3D[v8].sZValue = a2->sZValue;
- pBillboardRenderListD3D[v8].uParentBillboardID = a2->uParentBillboardID;
-
- if (a2->uTintColor & 0xFF000000)
+ pBillboardRenderListD3D[v8].sParentBillboardID = a2->sParentBillboardID;
+
+ if (a2->sTintColor & 0xFF000000)
pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_3;
else
pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent;
@@ -6282,7 +6312,7 @@
v5 = Billboard_ProbablyAddToListAndSortByZOrder(depth);
pBillboardRenderListD3D[v5].field_90 = 0;
- pBillboardRenderListD3D[v5].uParentBillboardID = -1;
+ pBillboardRenderListD3D[v5].sParentBillboardID = -1;
pBillboardRenderListD3D[v5].uOpacity = RenderBillboardD3D::Opaque_2;
pBillboardRenderListD3D[v5].pTexture = 0;
pBillboardRenderListD3D[v5].uNumVertices = a1->uNumVertices;
@@ -8280,14 +8310,14 @@
SetUserInterface(pParty->alignment, true);
if ( pVideoPlayer->pVideoFrame.pPixels )
pVideoPlayer->pVideoFrame.Load(pVideoPlayer->pVideoFrameTextureFilename, 1);
- if ( uCurrentMenuID != MENU_CREATEPARTY )
- {
- if ( uCurrentMenuID == MENU_CREDITSPROC )
+ if ( sCurrentMenuID != MENU_CREATEPARTY )
+ {
+ if ( sCurrentMenuID == MENU_CREDITSPROC )
dword_A74C88 = 1;
}
else
{
- if ( uCurrentMenuID )
+ if ( sCurrentMenuID )
{
v6 = &pTexture_PCX;
pTexture_PCX.Release();
@@ -8298,7 +8328,7 @@
v6 = &pTexture_PCX;
pTexture_PCX.Release();
v8 = "title.pcx";
- if ( uCurrentMenuID )
+ if ( sCurrentMenuID )
v8 = "lsave640.pcx";
}
v6->Load(v8, 0);
@@ -8578,6 +8608,7 @@
if (p->uOpacity != RenderBillboardD3D::NoBlend)
SetBillboardBlendOptions(p->uOpacity);
+ //if((int)p->pTexture!=0xcdcdcdcd)
pRenderer->pRenderD3D->pDevice->SetTexture(0, p->pTexture);
ErrD3D(pRenderer->pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN,
D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1,
@@ -9000,8 +9031,8 @@
- (double)pGame->pIndoorCameraD3D->vPartyPos.z));
pSkyPolygon.Create_48607B(&stru_8019C8);// ptr_38
pSkyPolygon.ptr_38->_48694B_frustum_sky();
- pSkyPolygon.uTileBitmapID = pOutdoor->uSky_TextureID;//179(original 166)
- pSkyPolygon.pTexture = (Texture *)(SLOWORD(pOutdoor->uSky_TextureID) != -1 ? (int)&pBitmaps_LOD->pTextures[SLOWORD(pOutdoor->uSky_TextureID)] : 0);
+ pSkyPolygon.uTileBitmapID = pOutdoor->sSky_TextureID;//179(original 166)
+ pSkyPolygon.pTexture = (Texture *)(SLOWORD(pOutdoor->sSky_TextureID) != -1 ? (int)&pBitmaps_LOD->pTextures[SLOWORD(pOutdoor->sSky_TextureID)] : 0);
if ( pSkyPolygon.pTexture )
{
pSkyPolygon.dimming_level = 0;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Render.h
--- a/Render.h Thu Nov 07 09:18:58 2013 +0600
+++ b/Render.h Thu Nov 07 09:19:10 2013 +0600
@@ -42,7 +42,7 @@
{
Vec3_float_ pos;
float rhw;
- unsigned int diffuse;
+ signed int diffuse;
unsigned int specular;
Vec2_float_ texcoord;
};
@@ -79,7 +79,7 @@
__int16 uScreenSpaceX;
__int16 uScreenSpaceY;
unsigned __int16 dimming_level;
- unsigned int uTintColor;
+ signed int sTintColor;
SpriteFrame *pSpriteFrame;
inline float GetFloatZ() const
@@ -187,13 +187,13 @@
#pragma pack(push, 1)
struct RenderBillboardD3D
{
- enum OpacityType: unsigned __int32
+ enum OpacityType: signed __int32
{
Transparent = 0,
Opaque_1 = 1,
Opaque_2 = 2,
Opaque_3 = 3,
- NoBlend = 0xFFFFFFFF
+ NoBlend = -1
};
IDirect3DTexture2 *pTexture;
@@ -203,7 +203,7 @@
OpacityType uOpacity;
int field_90;
int sZValue;
- unsigned int uParentBillboardID;
+ signed int sParentBillboardID;
};
#pragma pack(pop)
@@ -369,7 +369,7 @@
//void ExecOutdoorDrawSW();
void ChangeBetweenWinFullscreenModes();
void DrawBillboardList_BLV();
-
+ void __cdecl sub_4A19B0();
//unsigned int bUserDirect3D;
unsigned int bStartInWindow;
@@ -498,8 +498,8 @@
unsigned int uViewportZ;
unsigned int uViewportW;
int field_44;
- int uParentBillboardID;
- int uTintColor;
+ int sParentBillboardID;
+ int sTintColor;
};
#pragma pack(pop)
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 UI/UIPopup.cpp
--- a/UI/UIPopup.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/UI/UIPopup.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -473,7 +473,7 @@
Actor::Actor(&pMonsterInfoUI_Doll);
atexit(nullsub_3);
}*/
- v106.uParentBillboardID = -1;
+ v106.sParentBillboardID = -1;
v115 = monster_popup_y_offsets[((signed __int16)pActors[uActorID].pMonsterInfo.uID - 1) / 3] - 40;
if ( pActors[uActorID].pMonsterInfo.uID == pMonsterInfoUI_Doll.pMonsterInfo.uID )
v9 = pMonsterInfoUI_Doll.uCurrentActionLength;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 UI/UiGame.cpp
--- a/UI/UiGame.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/UI/UiGame.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -615,9 +615,9 @@
pButton->uHeight = pTextHeight;
v42 = pButton->uY + pTextHeight - 1;
pButton->uW = v42;
- pTextColor = ui_game_dialogue_option_highlight_color;
- if ( pDialogueWindow->pCurrentPosActiveItem != i )
- pTextColor = ui_game_dialogue_option_normal_color;
+ pTextColor = ui_game_dialogue_option_normal_color;
+ if ( pDialogueWindow->pCurrentPosActiveItem == i )
+ pTextColor = ui_game_dialogue_option_highlight_color;
window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pButton->pButtonName, 3);
}
}
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Vis.cpp
--- a/Vis.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/Vis.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -132,8 +132,8 @@
{
if (v13 == -1)
v13 = i;
- else if ((unsigned int)pBillboardRenderList[billboard->uParentBillboardID].sZValue <
- pBillboardRenderList[pRenderer->pBillboardRenderListD3D[v13].uParentBillboardID].sZValue)
+ else if ((unsigned int)pBillboardRenderList[billboard->sParentBillboardID].sZValue <
+ pBillboardRenderList[pRenderer->pBillboardRenderListD3D[v13].sParentBillboardID].sZValue)
v13 = i;
}
}
@@ -221,9 +221,9 @@
{
if (DoesRayIntersectBillboard(fPickDepth, i))
{
- RenderBillboard* billboard = &pBillboardRenderList[d3d_billboard->uParentBillboardID];
+ RenderBillboard* billboard = &pBillboardRenderList[d3d_billboard->sParentBillboardID];
- list->AddObject((void *)d3d_billboard->uParentBillboardID, VisObjectType_Sprite, billboard->sZValue);
+ list->AddObject((void *)d3d_billboard->sParentBillboardID, VisObjectType_Sprite, billboard->sZValue);
}
}
}
@@ -260,7 +260,7 @@
float v29; // [sp+8h] [bp-4h]@2
float a1a; // [sp+14h] [bp+8h]@2
- if ( a1->uParentBillboardID == -1 )
+ if ( a1->sParentBillboardID == -1 )
return false;
//result = a1;
@@ -552,7 +552,7 @@
}
//----- (004C1C0C) --------------------------------------------------------
-bool Vis::Intersect_Ray_Face(RenderVertexSoft *pRayStart, RenderVertexSoft *pRayEnd, float *pDepth, RenderVertexSoft *Intersection, BLVFace *pFace, unsigned int pBModelID)
+bool Vis::Intersect_Ray_Face(RenderVertexSoft *pRayStart, RenderVertexSoft *pRayEnd, float *pDepth, RenderVertexSoft *Intersection, BLVFace *pFace, signed int pBModelID)
{
float c1; // st5@6
float c2; // st7@11
@@ -603,7 +603,7 @@
}
//----- (004C1D2B) --------------------------------------------------------
-bool Vis::CheckIntersectBModel(BLVFace *pFace, Vec3_short_ IntersectPoint, unsigned int uModelID)
+bool Vis::CheckIntersectBModel(BLVFace *pFace, Vec3_short_ IntersectPoint, signed int sModelID)
{
int v5; // esi@10
bool v6; // edi@10
@@ -618,9 +618,9 @@
IntersectPoint.z < pFace->pBounding.z1 || IntersectPoint.z > pFace->pBounding.z2 )
return false;
- if (uModelID != -1)
+ if (sModelID != -1)
ODM_CreateIntersectFacesVertexCoordList(&a, &b, intersect_face_vertex_coords_list_a.data(), intersect_face_vertex_coords_list_b.data(),
- &IntersectPoint, pFace, uModelID);
+ &IntersectPoint, pFace, sModelID);
else
BLV_CreateIntersectFacesVertexCoordList(&a, &b, intersect_face_vertex_coords_list_a.data(), intersect_face_vertex_coords_list_b.data(),
&IntersectPoint, pFace);
@@ -1379,9 +1379,9 @@
{
if (DoesRayIntersectBillboard(pick_depth, i))
{
- RenderBillboard* billboard = &pBillboardRenderList[d3d_billboard->uParentBillboardID];
+ RenderBillboard* billboard = &pBillboardRenderList[d3d_billboard->sParentBillboardID];
- list->AddObject((void *)d3d_billboard->uParentBillboardID, VisObjectType_Sprite, billboard->sZValue);
+ list->AddObject((void *)d3d_billboard->sParentBillboardID, VisObjectType_Sprite, billboard->sZValue);
}
}
}
@@ -1414,8 +1414,8 @@
case VisObjectType_Sprite:
{
v5 = filter->select_flags;
- int object_idx = PID_ID(pBillboardRenderList[pRenderer->pBillboardRenderListD3D[(int)uD3DBillboardIdx_or_pBLVFace_or_pODMFace].uParentBillboardID].object_pid);
- int object_type = PID_TYPE(pBillboardRenderList[pRenderer->pBillboardRenderListD3D[(int)uD3DBillboardIdx_or_pBLVFace_or_pODMFace].uParentBillboardID].object_pid);
+ int object_idx = PID_ID(pBillboardRenderList[pRenderer->pBillboardRenderListD3D[(int)uD3DBillboardIdx_or_pBLVFace_or_pODMFace].sParentBillboardID].object_pid);
+ int object_type = PID_TYPE(pBillboardRenderList[pRenderer->pBillboardRenderListD3D[(int)uD3DBillboardIdx_or_pBLVFace_or_pODMFace].sParentBillboardID].object_pid);
if ( v5 & 2 )
{
if (object_type == filter->object_id)
@@ -1541,7 +1541,7 @@
static Vis_SelectionList Vis_static_stru_F91E10;
Vis_static_stru_F91E10.uNumPointers = 0;
- v3 = pRenderer->pBillboardRenderListD3D[uD3DBillboardIdx].uParentBillboardID;
+ v3 = pRenderer->pBillboardRenderListD3D[uD3DBillboardIdx].sParentBillboardID;
if (v3 == -1)
return false;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 Vis.h
--- a/Vis.h Thu Nov 07 09:18:58 2013 +0600
+++ b/Vis.h Thu Nov 07 09:19:10 2013 +0600
@@ -111,8 +111,8 @@
bool SortVectors_x(RenderVertexSoft *a2, int a3, int a4);
int get_object_zbuf_val(Vis_ObjectInfo *info);
int get_picked_object_zbuf_val();
- bool Intersect_Ray_Face(struct RenderVertexSoft *pRayStart, struct RenderVertexSoft *pRayEnd, float *pDepth, RenderVertexSoft *Intersection, BLVFace *pFace, unsigned int pBModelID);
- bool CheckIntersectBModel(BLVFace *pFace, Vec3_short_ IntersectPoint, unsigned int uModelID);
+ bool Intersect_Ray_Face(struct RenderVertexSoft *pRayStart, struct RenderVertexSoft *pRayEnd, float *pDepth, RenderVertexSoft *Intersection, BLVFace *pFace, signed int pBModelID);
+ bool CheckIntersectBModel(BLVFace *pFace, Vec3_short_ IntersectPoint, signed int sModelID);
void BLV_CreateIntersectFacesVertexCoordList(int *a, int *b, __int16 *intersect_face_vertex_coords_list_a, __int16 *intersect_face_vertex_coords_list_b, Vec3_short_ *IntersectPoint, BLVFace *pFace);
void ODM_CreateIntersectFacesVertexCoordList(int *a, int *b, __int16 *intersect_face_vertex_coords_list_a, __int16 *intersect_face_vertex_coords_list_b, Vec3_short_ *IntersectPoint, BLVFace *pFace, unsigned int uModelID);
void CastPickRay(RenderVertexSoft *pRay, float fMouseX, float fMouseY, float fPickDepth);
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 _deleted.cpp
--- a/_deleted.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/_deleted.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -2122,13 +2122,13 @@
array_77EC08[1999].Create_48607B(&stru_8019C8);
array_77EC08[1999].ptr_38->_48694B_frustum_sky();
- if (pOutdoor->uMainTile_BitmapID == -1)
+ if (pOutdoor->sMainTile_BitmapID == -1)
{
array_77EC08[1999].pTexture = nullptr;
return;
}
else
- array_77EC08[1999].pTexture = pBitmaps_LOD->GetTexture(pOutdoor->uMainTile_BitmapID);
+ array_77EC08[1999].pTexture = pBitmaps_LOD->GetTexture(pOutdoor->sMainTile_BitmapID);
array_77EC08[1999].dimming_level = 23 - (-20 * pOutdoor->vSunlight.z >> 16);
if ( array_77EC08[1999].dimming_level > 20 )
array_77EC08[1999].dimming_level = 20;
@@ -2145,13 +2145,13 @@
array_77EC08[1999].Create_48607B(&stru_8019C8);
array_77EC08[1999].ptr_38->_48694B_frustum_sky();
- if (pOutdoor->uSky_TextureID == -1)
+ if (pOutdoor->sSky_TextureID == -1)
{
array_77EC08[1999].pTexture = nullptr;
return;
}
else
- array_77EC08[1999].pTexture = pBitmaps_LOD->GetTexture(pOutdoor->uSky_TextureID);
+ array_77EC08[1999].pTexture = pBitmaps_LOD->GetTexture(pOutdoor->sSky_TextureID);
array_77EC08[1999].dimming_level = 0;
v11 = stru_5C6E00->Sin(pIndoorCamera->sRotationX + 16);
array_77EC08[1999].v_18.y = 0;
@@ -9381,22 +9381,6 @@
return result;
}
-//----- (00423B4A) --------------------------------------------------------
-void sub_423B4A()
-{
- float *v0; // eax@1
- signed int v1; // ecx@1
-
- v0 = &array_507D30[0].flt_2C;
- v1 = 50;
- do
- {
- *v0 = 0.0;
- v0 += 12;
- --v1;
- }
- while ( v1 );
-}
//----- (004AD504) --------------------------------------------------------
int __fastcall sr_4AD504(signed int sFaceID)
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_2.cpp
--- a/mm7_2.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/mm7_2.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -4350,6 +4350,7 @@
uCPUSpeed = Rect.bottom;*/
uCPUSpeed = 2048; // about 2GHz
+ constructors();
if (!MM7_Initialize(640, 480))
{
@@ -4716,7 +4717,7 @@
};
void SetCurrentMenuID(MENU_STATE uMenu)
{
- uCurrentMenuID = uMenu;
+ sCurrentMenuID = uMenu;
Log::Warning(L"CurrentMenu = %s", MENU_STATE_to_string(uMenu));
}
@@ -4724,7 +4725,7 @@
//----- (00466CA0) --------------------------------------------------------
MENU_STATE GetCurrentMenuID()
{
- return uCurrentMenuID;
+ return sCurrentMenuID;
}
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_3.cpp
--- a/mm7_3.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/mm7_3.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -4674,7 +4674,7 @@
v[0].pos.y = pViewport->uScreen_TL_Y;
v[0].pos.z = 0.99989998;
v[0].rhw = 1;
- v[0].diffuse = 0xFFFFFFFF;
+ v[0].diffuse = -1;
v[0].specular = 0;
v[0].texcoord.x = 0;
v[0].texcoord.y = 0;
@@ -4683,7 +4683,7 @@
v[1].pos.y = pViewport->uScreen_TL_Y + pViewport->uScreenHeight;
v[1].pos.z = 0.99989998;
v[1].rhw = 1;
- v[1].diffuse = 0xFFFFFFFF;
+ v[1].diffuse = -1;
v[1].specular = 0;
v[1].texcoord.x = (float)pViewport->uScreenWidth / skybox_width;
v[1].texcoord.y = (float)pViewport->uScreenHeight / skybox_height;
@@ -4692,7 +4692,7 @@
v[2].pos.y = pViewport->uScreen_TL_Y;
v[2].pos.z = 0.99989998;
v[2].rhw = 1;
- v[2].diffuse = 0xFFFFFFFF;
+ v[2].diffuse = -1;
v[2].specular = 0;
v[2].texcoord.x = (float)pViewport->uScreenWidth / skybox_width;
v[2].texcoord.y = 0;
@@ -4703,7 +4703,7 @@
v[4].pos.y = pViewport->uScreen_TL_Y + pViewport->uScreenHeight;
v[4].pos.z = 0.99989998;
v[4].rhw = 1;
- v[4].diffuse = 0xFFFFFFFF;
+ v[4].diffuse = -1;
v[4].specular = 0;
v[4].texcoord.x = 0;
v[4].texcoord.y = (float)pViewport->uScreenHeight / skybox_height;
@@ -5655,7 +5655,7 @@
int v12; // [sp+60h] [bp-8h]@1
int v13; // [sp+64h] [bp-4h]@6
- v10.uParentBillboardID = -1;
+ v10.sParentBillboardID = -1;
v10.pTarget = pRenderer->pTargetSurface;
v10.pTargetZ = pRenderer->pActiveZBuffer;
v10.uTargetPitch = pRenderer->field_10;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_4.cpp
--- a/mm7_4.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/mm7_4.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -401,7 +401,7 @@
}
//----- (0048A959) --------------------------------------------------------
-unsigned int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace)
+signed int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace)
{
float r = ((uColor & 0x00FF0000) >> 16) / 255.0f,
g = ((uColor & 0x0000FF00) >> 8) / 255.0f,
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_5.cpp
--- a/mm7_5.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/mm7_5.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -290,7 +290,7 @@
layingitem_vel_50FDFC.z = pSpriteObjects[uLayingItemID].vVelocity.z;
Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
- DamagePlayerFromMonster(PID(OBJECT_Item, uLayingItemID), pSpriteObjects[uLayingItemID].field_61, &layingitem_vel_50FDFC, 0xFFFFFFFFu);
+ DamagePlayerFromMonster(PID(OBJECT_Item, uLayingItemID), pSpriteObjects[uLayingItemID].field_61, &layingitem_vel_50FDFC, -1);
}
else if (PID_TYPE(a2) == OBJECT_Actor)
{
@@ -1034,6 +1034,9 @@
signed int a3a; // [sp+24h] [bp+8h]@14
int a4a; // [sp+28h] [bp+Ch]@2
+ std::array dword_4F5CC8_ys; // idb
+ std::array dword_4F5D98_xs; // idb
+
//__debugbreak();
v5 = a4->uAttributes;
@@ -1128,6 +1131,9 @@
int a4a; // [sp+28h] [bp+Ch]@2
signed int a5a; // [sp+2Ch] [bp+10h]@14
+ std::array dword_4F5B24_ys; // idb
+ std::array dword_4F5BF4_xs; // idb
+
__debugbreak();
v5 = a4->uAttributes;
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_7.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mm7_7.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -0,0 +1,560 @@
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include "mm7_data.h"
+#include "Render.h"
+#include "texts.h"
+#include "Party.h"
+#include "Viewport.h"
+
+int __cdecl sub_401022()
+{
+ int result; // eax@1
+ signed int v1; // ecx@1
+ int *v2; // edx@1
+/*
+ result = (int)dword_4F8580;
+ v1 = 60;
+ v2 = &dword_4F8580[1];
+ do
+ {
+ v2[2] = 0;
+ v2[1] = 0;
+ *v2 = 0;
+ v2 += 3;
+ --v1;
+ }
+ while ( v1 );
+ dword_4F8580[0] = 1;
+ return result;
+ */
+
+ for( int i = 0; i < 62; i++ )
+ {
+ dword_4F8580[i] = 0;
+ }
+ dword_4F8580[0] = 1;
+ return 0;
+}
+
+//----- (00423B4A) --------------------------------------------------------
+void sub_423B4A()
+{
+ float *v0; // eax@1
+ signed int v1; // ecx@1
+
+ v0 = &array_507D30[0].flt_2C;
+ v1 = 50;
+ do
+ {
+ *v0 = 0.0;
+ v0 += 12;
+ --v1;
+ }
+ while ( v1 );
+}
+
+/*
+GUIProgressBar *__cdecl crt_construct_576E30()
+{
+ RGBTexture::RGBTexture(&pGameLoadingUI_ProgressBar.pLoadingBg);
+ RGBTexture::RGBTexture(&pGameLoadingUI_ProgressBar.field_40);
+ RGBTexture::RGBTexture(&pGameLoadingUI_ProgressBar.field_68);
+ RGBTexture::RGBTexture(&pGameLoadingUI_ProgressBar.field_90);
+ RGBTexture::RGBTexture(&pGameLoadingUI_ProgressBar.field_B8);
+ Texture::Texture(&pGameLoadingUI_ProgressBar.field_E0);
+ Texture::Texture(&pGameLoadingUI_ProgressBar.pBardata);
+ Texture::Texture(&pGameLoadingUI_ProgressBar.pLoadingProgress);
+ pGameLoadingUI_ProgressBar.uProgressCurrent = 0;
+ pGameLoadingUI_ProgressBar.uProgressMax = 0;
+ pGameLoadingUI_ProgressBar.field_9 = 0;
+ pGameLoadingUI_ProgressBar.field_8 = 0;
+ pGameLoadingUI_ProgressBar.uHeight = 0;
+ pGameLoadingUI_ProgressBar.uWidth = 0;
+ pGameLoadingUI_ProgressBar.uY = 0;
+ pGameLoadingUI_ProgressBar.uX = 0;
+ pGameLoadingUI_ProgressBar.field_17 = 0;
+ pGameLoadingUI_ProgressBar.field_16 = 0;
+ pGameLoadingUI_ProgressBar.field_15 = 0;
+ pGameLoadingUI_ProgressBar.field_14 = 0;
+ pGameLoadingUI_ProgressBar.field_13 = 0;
+ pGameLoadingUI_ProgressBar.field_12 = 0;
+ pGameLoadingUI_ProgressBar.field_11 = 0;
+ pGameLoadingUI_ProgressBar.field_10 = 0;
+ return &pGameLoadingUI_ProgressBar;
+}
+*/
+
+void __cdecl crt_init_globals_46BD9F()
+{
+ pPartyActionQueue->uNumActions = 0;
+}
+
+void __cdecl sub_4C023F()
+{
+ pViewport->field_30 = 32768;
+ pViewport->SetScreen(0, 0, 639u, 479u);
+}
+
+void constructors()
+{
+ sub_401022();
+ sub_423B4A();
+ crt_init_globals_46BD9F();
+ sub_4C023F();
+
+ //no call to these anywhere
+ uGameUIFontMain_initialize();
+ uGameUIFontShadow_initialize();
+ SetSomeItemsNames();
+}
+
+/*
+
+X = called already in our code
+byte = constructor byte setter
+
+.data:004DF004 dd offset sub_4C9A95
+IOStream
+
+.data:004DF008 dd offset sub_4C9B06
+IOStream
+
+.data:004DF00C dd offset sub_401022
+added
+
+.data:004DF010 dd offset sub_408B98
+.data:004DF014 dd offset sub_409BCC
+.data:004DF018 dd offset crt_sub_40D6EB
+byte
+
+.data:004DF01C dd offset crt_construct_40D707_ptr_pArcomageGame
+X
+
+.data:004DF020 dd offset crt_sub_40E4A6
+.data:004DF024 dd offset crt_deconstruct_40E503
+.data:004DF028 dd offset crt_sub_40F760
+.data:004DF02C dd offset crt_sub_40F7EA
+.data:004DF030 dd offset crt_sub_40F9A9
+.data:004DF034 dd offset crt_sub_410AD9
+byte
+
+.data:004DF038 dd offset SetMoonPhaseNames
+X
+
+.data:004DF03C dd offset crt_sub_413FD0
+byte
+
+.data:004DF040 dd offset j_SetMonthNames
+.data:004DF044 dd offset j_SetDayNames
+.data:004DF048 dd offset j_SetSpellSchoolNames
+.data:004DF04C dd offset j_SetAttributeNames
+X InitializeGameText
+
+.data:004DF050 dd offset uGameUIFontMain_initialize
+.data:004DF054 dd offset uGameUIFontShadow_initialize
+added
+
+.data:004DF058 dd offset crt_construct_507ABC
+.data:004DF05C dd offset crt_construct_507A94
+.data:004DF060 dd offset crt_construct_507A6C
+.data:004DF064 dd offset crt_construct_507A44
+.data:004DF068 dd offset crt_construct_507A1C
+.data:004DF06C dd offset crt_construct_506F20
+.data:004DF070 dd offset crt_construct_414D90_ptr_506E40
+X (RGBTexture constructor)
+
+.data:004DF074 dd offset crt_sub_423903
+byte
+
+.data:004DF078 dd offset IndoorCamera__IndoorCamera
+X
+
+.data:004DF07C dd offset crt_sub_423ACD
+byte
+
+.data:004DF080 dd offset j_reset_some_strus_flt_2Cs
+deleted
+
+.data:004DF084 dd offset j_sub_423B4A
+added
+
+.data:004DF088 dd offset crt_sub_4262DD
+byte
+
+.data:004DF08C dd offset crt_construct_pEventTimer
+.data:004DF090 dd offset crt_construct_pMiscTimer
+X
+
+.data:004DF094 dd offset crt_sub_42640D
+.data:004DF098 dd offset crt_sub_4268C7
+.data:004DF09C dd offset crt_sub_42692B
+byte
+
+.data:004DF0A0 dd offset sub_426947
+X initialized
+
+.data:004DF0A4 dd offset crt_construct_50C0C8
+X CastSpellInfo
+
+.data:004DF0A8 dd offset crt_sub_42FBB7
+byte
+
+.data:004DF0AC dd offset crt_construct_50CDB4
+seems unused CastSpellInfo variable
+
+.data:004DF0B0 dd offset sub_4361D3
+.data:004DF0B4 dd offset sub_4382A0
+.data:004DF0B8 dd offset sub_43850A
+.data:004DF0BC dd offset crt_438AEF
+.data:004DF0C0 dd offset crt_438B7F
+.data:004DF0C4 dd offset ctr_deconstruct_43B4E0
+byte
+
+.data:004DF0C8 dd offset crt_43B4FC
+deleted, constructor for stru_51076C
+
+.data:004DF0CC dd offset crt_deconstruct_43B51C
+.data:004DF0D0 dd offset crt_deconstruct_43B5F0
+.data:004DF0D4 dd offset crt_deconstruct_43B64C
+byte
+
+.data:004DF0D8 dd offset _crt_construct_stru165
+X BloodsplatContainer
+
+.data:004DF0DC dd offset crt_deconstruct_43B751
+.data:004DF0E0 dd offset crt_deconstruct_43B9E3
+.data:004DF0E4 dd offset crt_deconstruct_43BC8B
+.data:004DF0E8 dd offset crt_deconstruct_43F22A
+byte
+
+.data:004DF0EC dd offset crt_construct_51B778
+X BspRenderer
+
+.data:004DF0F0 dd offset crt_construct_519AB8
+X LightsStack_MobileLight
+
+.data:004DF0F4 dd offset crt_construct_5187F0
+X LightsStack_StationaryLight
+
+
+.data:004DF0F8 dd offset crt_deconstruct_440B28
+.data:004DF0FC dd offset crt_deconstruct_440F5C
+byte
+
+.data:004DF100 dd offset crt_construct_576E30
+added but have to RECHECK
+
+.data:004DF104 dd offset crt_deconstruct_4437E5
+byte
+
+.data:004DF108 dd offset sub_446219
+X InitializeGameText
+
+.data:004DF10C dd offset crt_construct_5773C4
+unused RGBTexture
+
+.data:004DF110 dd offset sub_44C346
+.data:004DF114 dd offset crt_deconstruct_44C42C
+.data:004DF118 dd offset crt_deconstruct_44D49E
+byte
+
+.data:004DF11C dd offset _inline_SpriteFrameTable__SpriteFrameTable_global
+.data:004DF120 dd offset _inline_TextureFrameTable__TextureFrameTable_global
+X
+
+.data:004DF124 dd offset sub_44E49B
+.data:004DF128 dd offset sub_44F1F9
+.data:004DF12C dd offset sub_44F560
+.data:004DF130 dd offset sub_450DC2
+.data:004DF134 dd offset crt_deconstruct_45232B
+byte
+
+.data:004DF138 dd offset crt_construct_stru193_math@5C6E00
+X
+
+.data:004DF13C dd offset crt_452B74
+byte
+
+.data:004DF140 dd offset j_SetSomeItemsNames
+added
+
+.data:004DF144 dd offset crt_deconstruct_458364
+byte
+
+.data:004DF148 dd offset _intline_DecorationList__DecorationList_global
+X
+
+.data:004DF14C dd offset j_crt_construct_6836D0
+X LevelDecorations
+
+.data:004DF150 dd offset _inline_ObjectList__ObjectList_global
+X
+
+.data:004DF154 dd offset j_crt_construct_665230
+X SpriteObjects
+
+.data:004DF158 dd offset j_crt_construct_5FF158
+X Actors
+
+.data:004DF15C dd offset _inline_MonsterList__MonsterList_global
+X
+
+.data:004DF160 dd offset _inline_ChestList__ChestList_global
+X
+
+.data:004DF164 dd offset j_crt_construct_5E5150
+X Chests
+
+.data:004DF168 dd offset _inline_OverlayList__OverlayList_global
+X
+
+.data:004DF16C dd offset crt_construct_5E4D58
+X OverlayList
+
+.data:004DF170 dd offset sub_459C05
+byte
+
+.data:004DF174 dd offset sub_459C21
+X KeyboardActionMapping
+
+.data:004DF178 dd offset crt_deconstruct_45AFBD
+.data:004DF17C dd offset crt_deconstruct_45B0EE
+.data:004DF180 dd offset sub_45BA89
+byte
+
+.data:004DF184 dd offset crt_call_global_ctor_45BAA5
+stru_69BD44 = "effpar03" , need RECHECK
+
+.data:004DF188 dd offset crt_deconstruct_45DEF7
+.data:004DF18C dd offset crt_deconstruct_45DF53
+.data:004DF190 dd offset crt_deconstruct_45DF6F
+.data:004DF194 dd offset crt_deconstruct_45DF8B
+byte
+
+.data:004DF198 dd offset crt_construct_ptr_6A0A60
+X LODFile
+
+.data:004DF19C dd offset crt_construct_ptr_6A0820
+X LODFile
+
+.data:004DF1A0 dd offset j_crt_construct_ptr_6A0118
+X RGBTexture
+
+.data:004DF1A4 dd offset sub_461415
+.data:004DF1A8 dd offset crt_deconstruct_4621BE
+.data:004DF1AC dd offset crt_deconstruct_46220E
+byte
+
+.data:004DF1B0 dd offset crt_construct_ptr_702B28
+X Allocator
+
+.data:004DF1B4 dd offset sub_46224A
+X unused
+
+.data:004DF1B8 dd offset crt_construct_ptr_06F0E80
+X LODFile_IconsBitmaps
+
+.data:004DF1BC dd offset sub_4623CF
+X LODFile_Sprites
+
+.data:004DF1C0 dd offset crt_call_ctors__pIcons_LOD
+.data:004DF1C4 dd offset crt_call_ctors__pEvents_LOD
+.data:004DF1C8 dd offset _inline_IndoorLocation__IndoorLocation_global
+X
+
+.data:004DF1CC dd offset crt_init_globals_462620
+X initialized
+
+.data:004DF1D0 dd offset crt_construct_ptr_6BE158
+unused stru289
+
+.data:004DF1D4 dd offset j_crt_init_globals_462659
+X initialized
+
+.data:004DF1D8 dd offset crt_construct_ptr_06BE070
+X ODMRenderParams
+
+.data:004DF1DC dd offset crt_init_globals_46269B
+unused SW variable
+
+.data:004DF1E0 dd offset crt_construct_ptr_6BE048
+X TileTable
+
+.data:004DF1E4 dd offset crt_construct_ptr_6A0DF0
+X OutdoorLocation
+
+.data:004DF1E8 dd offset sub_466CA6
+.data:004DF1EC dd offset crt_deconstruct_467D29
+.data:004DF1F0 dd offset sub_467E32
+.data:004DF1F4 dd offset crt_deconstruct_46AC2C
+byte
+
+.data:004DF1F8 dd offset crt_construct_46AC48_ptr_720990
+X std__string_720990 = "micon1" , need RECHECK
+
+.data:004DF1FC dd offset crt_deconstruct_46BD83
+byte
+
+.data:004DF200 dd offset crt_init_globals_46BD9F
+added
+
+.data:004DF204 dd offset nullsub_26
+X
+
+.data:004DF208 dd offset sub_476102
+byte
+
+.data:004DF20C dd offset sub_47611E
+X Texture
+
+.data:004DF210 dd offset sub_476128
+dword_7241C8 = 1 RECHECK
+
+.data:004DF214 dd offset sub_476133
+X InitializeGameText
+
+.data:004DF218 dd offset sub_477595
+.data:004DF21C dd offset sub_47836D
+.data:004DF220 dd offset crt_sub_4783D9
+byte
+
+.data:004DF224 dd offset j__sub_4783FA_construct_global_73D150
+
+
+.data:004DF228 dd offset sub_47A368
+.data:004DF22C dd offset sub_47C778
+.data:004DF230 dd offset sub_47CDBE
+byte
+
+.data:004DF234 dd offset sub_47CDDA
+
+
+.data:004DF238 dd offset sub_47F483
+byte
+
+.data:004DF23C dd offset sub_47F49F
+
+
+.data:004DF240 dd offset sub_47F4B9
+
+
+.data:004DF244 dd offset sub_482A74
+.data:004DF248 dd offset sub_485F37
+.data:004DF24C dd offset sub_486A0C
+.data:004DF250 dd offset crt_deconstruct_487DF7
+.data:004DF254 dd offset sub_488E07
+.data:004DF258 dd offset sub_489572
+.data:004DF25C dd offset crt_deconstruct_489B44
+.data:004DF260 dd offset crt_deconstruct_489BBA
+byte
+
+.data:004DF264 dd offset crt_construct_489BD6_ptr_080D198
+X PaletteManager
+
+.data:004DF268 dd offset sub_48AAA9
+.data:004DF26C dd offset sub_48C20E
+byte
+
+.data:004DF270 dd offset sub_48C22A
+.data:004DF274 dd offset loc_48C234
+.data:004DF278 dd offset loc_48C243
+.data:004DF27C dd offset loc_48C252
+.data:004DF280 dd offset loc_48C3C0
+.data:004DF284 dd offset loc_48C474
+Party constructor
+
+.data:004DF288 dd offset sub_49801C
+.data:004DF28C dd offset sub_498077
+.data:004DF290 dd offset sub_498A25
+.data:004DF294 dd offset sub_49AFE5
+.data:004DF298 dd offset crt_deconstruct_49B36B
+byte
+
+.data:004DF29C dd offset crt_construct_stru187@AE5BA8
+X DecalBuilder
+
+.data:004DF2A0 dd offset crt_construct_ptr_AE5B94
+std__string_AE5B94 = "hwsplat04", need RECHECK
+
+.data:004DF2A4 dd offset sub_49C594
+.data:004DF2A8 dd offset sub_49D6C8
+.data:004DF2AC dd offset sub_49D6E4
+.data:004DF2B0 dd offset sub_49E71A
+byte
+
+.data:004DF2B4 dd offset sub_49E736
+X Render
+
+.data:004DF2B8 dd offset sub_4A198F
+byte
+
+.data:004DF2BC dd offset sub_4A19AB
+added
+
+.data:004DF2C0 dd offset sub_4A51AF
+.data:004DF2C4 dd offset sub_4A7047
+.data:004DF2C8 dd offset sub_4A94EB
+.data:004DF2CC dd offset sub_4A963E
+byte
+
+.data:004DF2D0 dd offset sub_4A965A
+X pSoundList
+
+.data:004DF2D4 dd offset AudioPlayer__AudioPlayer
+X
+
+.data:004DF2D8 dd offset sub_4AC1AD
+.data:004DF2DC dd offset sub_4AC662
+.data:004DF2E0 dd offset sub_4ACC1C
+.data:004DF2E4 dd offset sub_4AD369
+.data:004DF2E8 dd offset crt_deconstruct_4AD44B
+byte
+
+.data:004DF2EC dd offset crt_construct_4AD467_ptr_F79D68
+X OSVersion
+
+.data:004DF2F0 dd offset crt_deconstruct_4AD4DE
+byte
+
+.data:004DF2F4 dd offset crt_construct_ptr_F7CE30
+X Texture
+
+.data:004DF2F8 dd offset sub_4B142B
+.data:004DF2FC dd offset crt_sub_4BE344
+byte
+
+.data:004DF300 dd offset j_Random__ctor
+X
+
+.data:004DF304 dd offset crt_sub_4BE6B5
+.data:004DF308 dd offset crt_sub_4BE6D4
+byte
+
+.data:004DF30C dd offset crt_j_VideoPlayer__ctor
+RECHECK
+
+.data:004DF310 dd offset sub_4C021E
+byte
+
+.data:004DF314 dd offset sub_4C023A
+added
+
+.data:004DF318 dd offset sub_4C035A
+.data:004DF31C dd offset sub_4C03A3
+byte
+
+.data:004DF320 dd offset sub_4C03BF
+.data:004DF324 dd offset sub_4C03F1
+.data:004DF328 dd offset sub_4C0423
+.data:004DF32C dd offset sub_4C044B
+.data:004DF330 dd offset sub_4C047D
+X vis filters
+
+.data:004DF334 dd offset sub_4C2A6E
+.data:004DF338 dd offset sub_4C2A8A
+.data:004DF33C dd offset sub_4C2F7C
+byte
+
+*/
\ No newline at end of file
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_data.cpp
--- a/mm7_data.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/mm7_data.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -857,10 +857,6 @@
int dword_4F5428[777]; // weak
int dword_4F542C[777]; // weak
_UNKNOWN crtunk_4F54B8; // weak
-std::array dword_4F5B24_ys; // idb
-std::array dword_4F5BF4_xs; // idb
-std::array dword_4F5CC8_ys; // idb
-std::array dword_4F5D98_xs; // idb
std::array ai_array_4F5E68;
std::array ai_array_4F6638_actor_ids;
std::array ai_near_actors_targets_pid;
@@ -1152,7 +1148,7 @@
void *ptr_6A0D08;
int _6A0D0C_txt_lod_loading; // weak
int _6A0D10_txt_lod_loading__unused; // weak
-MENU_STATE uCurrentMenuID;
+MENU_STATE sCurrentMenuID;
unsigned int uGameState;
int uDefaultTravelTime_ByFoot; // weak
int day_attrib; // weak
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 mm7_data.h
--- a/mm7_data.h Thu Nov 07 09:18:58 2013 +0600
+++ b/mm7_data.h Thu Nov 07 09:19:10 2013 +0600
@@ -502,10 +502,6 @@
extern int dword_4F5428[]; // weak
extern int dword_4F542C[]; // weak
extern _UNKNOWN crtunk_4F54B8; // weak
-extern std::array dword_4F5B24_ys; // idb
-extern std::array dword_4F5BF4_xs; // idb
-extern std::array dword_4F5CC8_ys; // idb
-extern std::array dword_4F5D98_xs; // idb
extern std::array ai_array_4F5E68;
extern std::array ai_array_4F6638_actor_ids;
extern std::array ai_near_actors_targets_pid;
@@ -798,7 +794,7 @@
extern void *ptr_6A0D08;
extern int _6A0D0C_txt_lod_loading; // weak
extern int _6A0D10_txt_lod_loading__unused; // weak
-extern enum MENU_STATE uCurrentMenuID;
+extern enum MENU_STATE sCurrentMenuID;
extern unsigned int uGameState;
extern int uDefaultTravelTime_ByFoot; // weak
extern int day_attrib; // weak
@@ -1029,7 +1025,7 @@
//-------------------------------------------------------------------------
// Function declarations
-
+void constructors();
void init_event_triggers();
void check_event_triggers();
@@ -1111,7 +1107,7 @@
double get_shading_dist_mist();
void Vec3_short__to_RenderVertexSoft(struct RenderVertexSoft *_this, struct Vec3_short_ *a2);
void area_of_effect__damage_evaluate();
-void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, struct Vec3_int_ *pPos, unsigned int a4);
+void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, struct Vec3_int_ *pPos, signed int a4);
void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb
double __fastcall sub_43AE12(signed int a1);
int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4);
@@ -1225,7 +1221,7 @@
double GetFogDensityByTime(struct OutdoorLocation *_this);
bool __fastcall HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6);
void __fastcall RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6);
-unsigned int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4);
+signed int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4);
bool PlayerCreation_Choose4Skills();
int PlayerCreation_GetUnspentAttributePointCount();
void LoadPlayerPortraintsAndVoices();
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 stru10.cpp
--- a/stru10.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/stru10.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -730,7 +730,7 @@
extern bool draw_debug_line;
if ( draw_debug_line )
- pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, 0xFFFFFFFFu, &v26, 0xFFFF00u, 0, 0);
+ pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, -1, &v26, 0xFFFF00u, 0, 0);
}
//}
diff -r bb1e7b0780d8 -r 7a2fc95f3b99 stru6.cpp
--- a/stru6.cpp Thu Nov 07 09:18:58 2013 +0600
+++ b/stru6.cpp Thu Nov 07 09:19:10 2013 +0600
@@ -1549,7 +1549,7 @@
else
{
vsr.pTarget = pRenderer->pTargetSurface;
- vsr.uParentBillboardID = -1;
+ vsr.sParentBillboardID = -1;
vsr.pTargetZ = pRenderer->pActiveZBuffer;
vsr.uScreenSpaceX = (signed int)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2;
vsr.uScreenSpaceY = pViewport->uViewportBR_Y;
@@ -1563,7 +1563,7 @@
vsr._screenspace_y_scaler_packedfloat = v18 / 0x1000000;
vsr.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v70->uPaletteIndex, 0, 1);
vsr.uTargetPitch = pRenderer->uTargetSurfacePitch;
- vsr.uParentBillboardID = -1;
+ vsr.sParentBillboardID = -1;
vsr.uViewportX = pViewport->uViewportTL_X;
vsr.uViewportZ = pViewport->uViewportBR_X;
vsr.uViewportY = pViewport->uViewportTL_Y;