comparison mm7_4.cpp @ 784:b3e08a496778

Merge
author Nomad
date Sun, 24 Mar 2013 21:15:01 +0200
parents b27dd658ea77 c47efaf23642
children f004c7ceb7bd
comparison
equal deleted inserted replaced
783:b27dd658ea77 784:b3e08a496778
1 #include <io.h> 1 #include <io.h>
2 #include <direct.h> 2 #include <direct.h>
3 #include <assert.h> 3 #include <assert.h>
4 4
5 #include "MM7.h" 5 #include "MM7.h"
6
7 #include "MapInfo.h" 6 #include "MapInfo.h"
8 #include "Game.h" 7 #include "Game.h"
9 #include "GUIWindow.h" 8 #include "GUIWindow.h"
10 #include "GUIButton.h" 9 #include "GUIButton.h"
11 #include "GUIFont.h" 10 #include "GUIFont.h"
52 #include "Events2D.h" 51 #include "Events2D.h"
53 #include "stru159.h" 52 #include "stru159.h"
54 #include "texts.h" 53 #include "texts.h"
55 #include "Log.h" 54 #include "Log.h"
56 #include "UIHouses.h" 55 #include "UIHouses.h"
57
58 #include "mm7_data.h" 56 #include "mm7_data.h"
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73 57
74 //----- (0046CC4B) -------------------------------------------------------- 58 //----- (0046CC4B) --------------------------------------------------------
75 void __cdecl check_event_triggers() 59 void __cdecl check_event_triggers()
76 { 60 {
77 int v0; // eax@1 61 int v0; // eax@1
840 LABEL_54: 824 LABEL_54:
841 *(int *)a4 = 0; 825 *(int *)a4 = 0;
842 return dword_720F20[v22]; 826 return dword_720F20[v22];
843 } 827 }
844 828
845
846 //not sure if right- or left-handed coordinate space assumed, so this could be normal of inverse normal 829 //not sure if right- or left-handed coordinate space assumed, so this could be normal of inverse normal
847 // for a right-handed system, that would be an inverse normal 830 // for a right-handed system, that would be an inverse normal
848 //----- (0046DCC8) -------------------------------------------------------- 831 //----- (0046DCC8) --------------------------------------------------------
849 void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out) 832 void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out)
850 { 833 {
913 out->x = invmag * nx * 65536.0; 896 out->x = invmag * nx * 65536.0;
914 out->y = invmag * ny * 65536.0; 897 out->y = invmag * ny * 65536.0;
915 out->z = invmag * nz * 65536.0; 898 out->z = invmag * nz * 65536.0;
916 } 899 }
917 } 900 }
918
919 901
920 //----- (0046DEF2) -------------------------------------------------------- 902 //----- (0046DEF2) --------------------------------------------------------
921 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID) 903 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID)
922 { 904 {
923 unsigned int result; // eax@1 905 unsigned int result; // eax@1
1450 } 1432 }
1451 } 1433 }
1452 } 1434 }
1453 // 4EC3EC: using guessed type Edge defaultEdge; 1435 // 4EC3EC: using guessed type Edge defaultEdge;
1454 1436
1455
1456
1457 //----- (00487355) -------------------------------------------------------- 1437 //----- (00487355) --------------------------------------------------------
1458 bool OutdoorCamera::_487355() 1438 bool OutdoorCamera::_487355()
1459 { 1439 {
1460 int v0; // esi@1 1440 int v0; // esi@1
1461 stru148 *v1; // edi@2 1441 stru148 *v1; // edi@2
1474 while ( v0 < pOutdoorCamera->numStru148s ); 1454 while ( v0 < pOutdoorCamera->numStru148s );
1475 } 1455 }
1476 return result; 1456 return result;
1477 } 1457 }
1478 1458
1479
1480
1481 //----- (00487DA9) -------------------------------------------------------- 1459 //----- (00487DA9) --------------------------------------------------------
1482 void __cdecl sub_487DA9() 1460 void __cdecl sub_487DA9()
1483 { 1461 {
1484 char *v0; // eax@1 1462 char *v0; // eax@1
1485 1463
1516 --v2; 1494 --v2;
1517 } 1495 }
1518 while ( v2 ); 1496 while ( v2 );
1519 } 1497 }
1520 // 4EC3EC: using guessed type Edge defaultEdge; 1498 // 4EC3EC: using guessed type Edge defaultEdge;
1521
1522
1523
1524
1525 1499
1526 //----- (0048958E) -------------------------------------------------------- 1500 //----- (0048958E) --------------------------------------------------------
1527 stru12_MemoryBlock::stru12_MemoryBlock(int a2) 1501 stru12_MemoryBlock::stru12_MemoryBlock(int a2)
1528 { 1502 {
1529 stru12_MemoryBlock *v2; // esi@1 1503 stru12_MemoryBlock *v2; // esi@1
1793 while ( v22 < this->field_8C ); 1767 while ( v22 < this->field_8C );
1794 } 1768 }
1795 this->field_8C = 0; 1769 this->field_8C = 0;
1796 } 1770 }
1797 1771
1798
1799
1800
1801
1802 //----- (0048A959) -------------------------------------------------------- 1772 //----- (0048A959) --------------------------------------------------------
1803 unsigned int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace) 1773 unsigned int ReplaceHSV(unsigned int uColor, float h_replace, float s_replace, float v_replace)
1804 { 1774 {
1805 float r = ((uColor & 0x00FF0000) >> 16) / 255.0f, 1775 float r = ((uColor & 0x00FF0000) >> 16) / 255.0f,
1806 g = ((uColor & 0x0000FF00) >> 8) / 255.0f, 1776 g = ((uColor & 0x0000FF00) >> 8) / 255.0f,
1819 1789
1820 return (((uint)floorf(r * 255.0f + 0.5f) & 0xFF) << 16) | 1790 return (((uint)floorf(r * 255.0f + 0.5f) & 0xFF) << 16) |
1821 (((uint)floorf(g * 255.0f + 0.5f) & 0xFF) << 8) | 1791 (((uint)floorf(g * 255.0f + 0.5f) & 0xFF) << 8) |
1822 ((uint)floorf(b * 255.0f + 0.5f) & 0xFF); 1792 ((uint)floorf(b * 255.0f + 0.5f) & 0xFF);
1823 } 1793 }
1824
1825 1794
1826 //----- (0048B561) -------------------------------------------------------- 1795 //----- (0048B561) --------------------------------------------------------
1827 int _48B561_mess_with_scaling_along_z(/*int a1, */float a2) 1796 int _48B561_mess_with_scaling_along_z(/*int a1, */float a2)
1828 { 1797 {
1829 //v2 = a2 - 0.5; 1798 //v2 = a2 - 0.5;
1833 //v5 = v7 + 6.7553994e15; 1802 //v5 = v7 + 6.7553994e15;
1834 //return LODWORD(v5) | (v4 << 16); 1803 //return LODWORD(v5) | (v4 << 16);
1835 int v5 = floorf((a2 - v4) * 65536.0f + 0.5f); 1804 int v5 = floorf((a2 - v4) * 65536.0f + 0.5f);
1836 return v5 | (v4 << 16); 1805 return v5 | (v4 << 16);
1837 } 1806 }
1838
1839
1840
1841
1842
1843 1807
1844 //----- (00491E3A) -------------------------------------------------------- 1808 //----- (00491E3A) --------------------------------------------------------
1845 void __cdecl sub_491E3A() 1809 void __cdecl sub_491E3A()
1846 { 1810 {
1847 Player *v0; // ebx@1 1811 Player *v0; // ebx@1
1939 v12 = pIcons_LOD->pFacesLock; 1903 v12 = pIcons_LOD->pFacesLock;
1940 pIcons_LOD->pFacesLock = 0; 1904 pIcons_LOD->pFacesLock = 0;
1941 pIcons_LOD->uNumLoadedFiles = v12; 1905 pIcons_LOD->uNumLoadedFiles = v12;
1942 } 1906 }
1943 // 4ED498: using guessed type char byte_4ED498; 1907 // 4ED498: using guessed type char byte_4ED498;
1944
1945
1946
1947 1908
1948 //----- (0049387A) -------------------------------------------------------- 1909 //----- (0049387A) --------------------------------------------------------
1949 int CycleCharacter(unsigned int _this) 1910 int CycleCharacter(unsigned int _this)
1950 { 1911 {
1951 signed int result; // eax@1 1912 signed int result; // eax@1
2378 } 2339 }
2379 } 2340 }
2380 return result; 2341 return result;
2381 } 2342 }
2382 2343
2383
2384
2385 //----- (00493F79) -------------------------------------------------------- 2344 //----- (00493F79) --------------------------------------------------------
2386 void sub_493F79(stru351_summoned_item *_this, __int64 a2) 2345 void sub_493F79(stru351_summoned_item *_this, __int64 a2)
2387 { 2346 {
2388 signed __int64 v2; // ST2C_8@1 2347 signed __int64 v2; // ST2C_8@1
2389 signed __int64 v3; // qax@1 2348 signed __int64 v3; // qax@1
2402 _this->field_10_expire_week = v5 / 7 & 3; 2361 _this->field_10_expire_week = v5 / 7 & 3;
2403 _this->field_C_expire_day = (unsigned int)v5 % 0x1C; 2362 _this->field_C_expire_day = (unsigned int)v5 % 0x1C;
2404 _this->field_14_exprie_month = v6 % 0xC; 2363 _this->field_14_exprie_month = v6 % 0xC;
2405 _this->field_18_expire_year = v6 / 0xC + game_starting_year; 2364 _this->field_18_expire_year = v6 / 0xC + game_starting_year;
2406 } 2365 }
2407
2408
2409
2410
2411 2366
2412 //----- (00494035) -------------------------------------------------------- 2367 //----- (00494035) --------------------------------------------------------
2413 void __cdecl _494035_timed_effects__water_walking_damage__etc() 2368 void __cdecl _494035_timed_effects__water_walking_damage__etc()
2414 { 2369 {
2415 signed __int64 v0; // qax@1 2370 signed __int64 v0; // qax@1
2906 } 2861 }
2907 return result; 2862 return result;
2908 } 2863 }
2909 // 4EE088: using guessed type __int16 word_4EE088_sound_ids[]; 2864 // 4EE088: using guessed type __int16 word_4EE088_sound_ids[];
2910 2865
2911
2912
2913 //----- (00494AED) -------------------------------------------------------- 2866 //----- (00494AED) --------------------------------------------------------
2914 unsigned int PlayerFrameTable::GetFrameIdByExpression(CHARACTER_EXPRESSION_ID expression) 2867 unsigned int PlayerFrameTable::GetFrameIdByExpression(CHARACTER_EXPRESSION_ID expression)
2915 { 2868 {
2916 unsigned int _uNumFrames; // edx@1 2869 unsigned int _uNumFrames; // edx@1
2917 unsigned int result; // eax@1 2870 unsigned int result; // eax@1
3382 fclose(File); 3335 fclose(File);
3383 result = 0; 3336 result = 0;
3384 } 3337 }
3385 return result; 3338 return result;
3386 } 3339 }
3387
3388
3389 3340
3390 //----- (00495366) -------------------------------------------------------- 3341 //----- (00495366) --------------------------------------------------------
3391 char *__fastcall sub_495366(unsigned __int8 a1, unsigned __int8 a2) 3342 char *__fastcall sub_495366(unsigned __int8 a1, unsigned __int8 a2)
3392 { 3343 {
3393 int v2; // edi@1 3344 int v2; // edi@1
3893 } 3844 }
3894 } 3845 }
3895 return pTmpBuf2; 3846 return pTmpBuf2;
3896 } 3847 }
3897 3848
3898
3899
3900
3901 //----- (0049B04D) -------------------------------------------------------- 3849 //----- (0049B04D) --------------------------------------------------------
3902 void stru154::GetFacePlaneAndClassify(ODMFace *a2, BSPVertexBuffer *a3) 3850 void stru154::GetFacePlaneAndClassify(ODMFace *a2, BSPVertexBuffer *a3)
3903 { 3851 {
3904 //stru154 *v3; // edi@1 3852 //stru154 *v3; // edi@1
3905 //signed int v4; // eax@1 3853 //signed int v4; // eax@1
4027 pOutNormal->y = (double)(v5->pFacePlane.vNormal.y & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.vNormal.y >> 16); 3975 pOutNormal->y = (double)(v5->pFacePlane.vNormal.y & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.vNormal.y >> 16);
4028 pOutNormal->z = (double)(v5->pFacePlane.vNormal.z & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.vNormal.z >> 16); 3976 pOutNormal->z = (double)(v5->pFacePlane.vNormal.z & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.vNormal.z >> 16);
4029 *pOutDist = (double)(v5->pFacePlane.dist & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.dist >> 16); 3977 *pOutDist = (double)(v5->pFacePlane.dist & 0xFFFF) / 65535.0f + (double)(v5->pFacePlane.dist >> 16);
4030 } 3978 }
4031 3979
4032
4033
4034
4035
4036 //----- (0049D700) -------------------------------------------------------- 3980 //----- (0049D700) --------------------------------------------------------
4037 unsigned int __fastcall GetMaxMipLevels(unsigned int uDim) 3981 unsigned int __fastcall GetMaxMipLevels(unsigned int uDim)
4038 { 3982 {
4039 unsigned int v1; // eax@1 3983 unsigned int v1; // eax@1
4040 int v2; // ecx@1 3984 int v2; // ecx@1
4048 v3 >>= 1; 3992 v3 >>= 1;
4049 ++v2; 3993 ++v2;
4050 } 3994 }
4051 return v3 == 0 ? v2 : 0; 3995 return v3 == 0 ? v2 : 0;
4052 } 3996 }
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062 3997
4063 //----- (004A19D8) -------------------------------------------------------- 3998 //----- (004A19D8) --------------------------------------------------------
4064 unsigned int BlendColors(unsigned int a1, unsigned int a2) 3999 unsigned int BlendColors(unsigned int a1, unsigned int a2)
4065 { 4000 {
4066 /*signed __int64 v2; // ST10_8@1 4001 /*signed __int64 v2; // ST10_8@1
4100 v12 = (double)(a1 & 0xFFi64) / 255.0f * (double)(unsigned __int8)a2 / 255.0f * 255.0; 4035 v12 = (double)(a1 & 0xFFi64) / 255.0f * (double)(unsigned __int8)a2 / 255.0f * 255.0;
4101 v13 = v12 + 6.7553994e15; 4036 v13 = v12 + 6.7553994e15;
4102 return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8);*/ 4037 return LOBYTE(v13) | ((LOBYTE(v11) | (((v6 << 8) | v9) << 8)) << 8);*/
4103 } 4038 }
4104 4039
4105
4106
4107 //----- (004A46E6) -------------------------------------------------------- 4040 //----- (004A46E6) --------------------------------------------------------
4108 int __fastcall sr_4A46E6_draw_particle_segment(unsigned int x, signed int y, signed int _z, int a4, unsigned int lightColor) 4041 int __fastcall sr_4A46E6_draw_particle_segment(unsigned int x, signed int y, signed int _z, int a4, unsigned int lightColor)
4109 { 4042 {
4110 int v5; // eax@1 4043 int v5; // eax@1
4111 int z; // eax@1 4044 int z; // eax@1
4240 } 4173 }
4241 } 4174 }
4242 } 4175 }
4243 return z; 4176 return z;
4244 } 4177 }
4245
4246 4178
4247 //----- (004A57E9) -------------------------------------------------------- 4179 //----- (004A57E9) --------------------------------------------------------
4248 void __cdecl Present_ColorKey() 4180 void __cdecl Present_ColorKey()
4249 { 4181 {
4250 HRESULT v0; // eax@3 4182 HRESULT v0; // eax@3
4470 } 4402 }
4471 } 4403 }
4472 } 4404 }
4473 } 4405 }
4474 4406
4475
4476
4477 //----- (004A7063) -------------------------------------------------------- 4407 //----- (004A7063) --------------------------------------------------------
4478 int __thiscall sub_4A7063(unsigned int uDiffuse, float a2) 4408 int __thiscall sub_4A7063(unsigned int uDiffuse, float a2)
4479 { 4409 {
4480 float v2; // ST1C_4@1 4410 float v2; // ST1C_4@1
4481 double v3; // ST14_8@1 4411 double v3; // ST14_8@1
4518 v10 = 255; 4448 v10 = 255;
4519 if ( v10 < 0 ) 4449 if ( v10 < 0 )
4520 v10 = 0; 4450 v10 = 0;
4521 return v10 | ((v9 | ((v7 | (v4 << 8)) << 8)) << 8); 4451 return v10 | ((v9 | ((v7 | (v4 << 8)) << 8)) << 8);
4522 } 4452 }
4523
4524
4525
4526
4527
4528
4529
4530 4453
4531 //----- (004AD504) -------------------------------------------------------- 4454 //----- (004AD504) --------------------------------------------------------
4532 int __fastcall sub_4AD504(signed int sFaceID) 4455 int __fastcall sub_4AD504(signed int sFaceID)
4533 { 4456 {
4534 int result; // eax@1 4457 int result; // eax@1
5504 ++pBLVRenderParams->field_8C; 5427 ++pBLVRenderParams->field_8C;
5505 return v17; 5428 return v17;
5506 } 5429 }
5507 // 4AE491: using guessed type int __fastcall sub_4AE491(int, int); 5430 // 4AE491: using guessed type int __fastcall sub_4AE491(int, int);
5508 5431
5509
5510
5511
5512 //----- (004AE5F1) -------------------------------------------------------- 5432 //----- (004AE5F1) --------------------------------------------------------
5513 void __fastcall sub_4AE5F1(unsigned int uFaceID) 5433 void __fastcall sub_4AE5F1(unsigned int uFaceID)
5514 { 5434 {
5515 BLVFace *v1; // esi@1 5435 BLVFace *v1; // esi@1
5516 BLVFaceExtra *v2; // ebx@1 5436 BLVFaceExtra *v2; // ebx@1
6160 stru_F8AD28.uNumLightsApplied = 0; 6080 stru_F8AD28.uNumLightsApplied = 0;
6161 stru_F8AD28.field_34 = 0; 6081 stru_F8AD28.field_34 = 0;
6162 return result; 6082 return result;
6163 } 6083 }
6164 6084
6165
6166
6167
6168
6169
6170 //----- (004B1447) -------------------------------------------------------- 6085 //----- (004B1447) --------------------------------------------------------
6171 Player *__fastcall sub_4B1447_party_fine(int a1, int a2, int a3) 6086 Player *__fastcall sub_4B1447_party_fine(int a1, int a2, int a3)
6172 { 6087 {
6173 signed int v3; // esi@1 6088 signed int v3; // esi@1
6174 char v4; // sf@8 6089 char v4; // sf@8
6307 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u); 6222 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u);
6308 sprintf(pTmpBuf, "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * v1)); 6223 sprintf(pTmpBuf, "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * v1));
6309 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3); 6224 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3);
6310 } 6225 }
6311 6226
6312
6313 //----- (004B1784) -------------------------------------------------------- 6227 //----- (004B1784) --------------------------------------------------------
6314 bool __cdecl sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() 6228 bool __cdecl sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()
6315 { 6229 {
6316 Player *pPlayer; // ebx@1 6230 Player *pPlayer; // ebx@1
6317 bool result; // eax@2 6231 bool result; // eax@2
6341 result = 0; 6255 result = 0;
6342 } 6256 }
6343 return result; 6257 return result;
6344 } 6258 }
6345 // F8B1E0: using guessed type int dword_F8B1E0; 6259 // F8B1E0: using guessed type int dword_F8B1E0;
6346
6347 6260
6348 //view item details in shop? 6261 //view item details in shop?
6349 //----- (004B1A2D) -------------------------------------------------------- 6262 //----- (004B1A2D) --------------------------------------------------------
6350 void __cdecl sub_4B1A2D() 6263 void __cdecl sub_4B1A2D()
6351 { 6264 {
6545 } 6458 }
6546 } 6459 }
6547 } 6460 }
6548 } 6461 }
6549 } 6462 }
6550
6551
6552 6463
6553 //----- (004B1ECE) -------------------------------------------------------- 6464 //----- (004B1ECE) --------------------------------------------------------
6554 void __cdecl sub_4B1ECE() 6465 void __cdecl sub_4B1ECE()
6555 { 6466 {
6556 __int16 *v0; // edi@1 6467 __int16 *v0; // edi@1
6643 } 6554 }
6644 if ( v9 ) 6555 if ( v9 )
6645 v9->uHolderPlayer = v5; 6556 v9->uHolderPlayer = v5;
6646 } 6557 }
6647 } 6558 }
6648
6649 // 4F08EC: using guessed type int dword_4F08EC[]; 6559 // 4F08EC: using guessed type int dword_4F08EC[];
6650 // 722B3C: using guessed type int dword_722B3C; 6560 // 722B3C: using guessed type int dword_722B3C;
6651 // 722B44: using guessed type int dword_722B44; 6561 // 722B44: using guessed type int dword_722B44;
6652 // F8B1A8: using guessed type int dword_F8B1A8; 6562 // F8B1A8: using guessed type int dword_F8B1A8;
6653 6563
6928 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)61, 0); 6838 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)61, 0);
6929 _return: 6839 _return:
6930 pVideoPlayer->_4BF5B2();//HouseVideo 6840 pVideoPlayer->_4BF5B2();//HouseVideo
6931 } 6841 }
6932 6842
6933
6934 //----- (004B254D) -------------------------------------------------------- 6843 //----- (004B254D) --------------------------------------------------------
6935 char *__thiscall _4B254D_SkillMasteryTeacher(int _this) 6844 char *__thiscall _4B254D_SkillMasteryTeacher(int _this)
6936 { 6845 {
6937 Player *v1; // esi@1 6846 Player *v1; // esi@1
6938 int v2; // edx@1 6847 int v2; // edx@1
7257 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], v21, v24, v27); 7166 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], v21, v24, v27);
7258 } 7167 }
7259 return pTmpBuf2; 7168 return pTmpBuf2;
7260 } 7169 }
7261 7170
7262
7263
7264 //----- (004B29F2) -------------------------------------------------------- 7171 //----- (004B29F2) --------------------------------------------------------
7265 const char * ContractSelectText( int pEventCode ) 7172 const char * ContractSelectText( int pEventCode )
7266 { 7173 {
7267 static const int dialogue_base=110; 7174 static const int dialogue_base=110;
7268 contract_approved = 0; 7175 contract_approved = 0;
7290 else 7197 else
7291 { 7198 {
7292 return pNPCTopics[dialogue_base+12].pText; 7199 return pNPCTopics[dialogue_base+12].pText;
7293 } 7200 }
7294 } 7201 }
7295
7296 7202
7297 //----- (004B2A74) -------------------------------------------------------- 7203 //----- (004B2A74) --------------------------------------------------------
7298 void SimpleHouseAndBoatsDialog() 7204 void SimpleHouseAndBoatsDialog()
7299 { 7205 {
7300 char *v0; // esi@3 7206 char *v0; // esi@3
7618 v49 = FitTextInAWindow(ptr_F8B1E8, v47, &w, 0xDu, 0); 7524 v49 = FitTextInAWindow(ptr_F8B1E8, v47, &w, 0xDu, 0);
7619 a1.DrawText(v47, 13, 354 - v48, 0, v49, 0, 0, 0); 7525 a1.DrawText(v47, 13, 354 - v48, 0, v49, 0, 0, 0);
7620 } 7526 }
7621 } 7527 }
7622 7528
7623
7624
7625
7626
7627 //----- (004B36CC) -------------------------------------------------------- 7529 //----- (004B36CC) --------------------------------------------------------
7628 void CreateButtonInColumn( int column_pos, unsigned int control_id ) 7530 void CreateButtonInColumn( int column_pos, unsigned int control_id )
7629 { 7531 {
7630 pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, 0x195u, control_id, 0, "", 0); 7532 pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, 0x195u, control_id, 0, "", 0);
7631 } 7533 }
7632
7633
7634 7534
7635 //----- (004B3A72) -------------------------------------------------------- 7535 //----- (004B3A72) --------------------------------------------------------
7636 void sub_4B3A72( int a1 ) 7536 void sub_4B3A72( int a1 )
7637 { 7537 {
7638 int num_buttons; // esi@1 7538 int num_buttons; // esi@1
7966 pGlobalTXT_LocalizationStrings[406], 0); //"Hire" 7866 pGlobalTXT_LocalizationStrings[406], 0); //"Hire"
7967 pDialogueWindow->_41D08F(v0 + 1, 1, 0, 2); 7867 pDialogueWindow->_41D08F(v0 + 1, 1, 0, 2);
7968 dialog_menu_id = HOUSE_DIALOGUE_OTHER; 7868 dialog_menu_id = HOUSE_DIALOGUE_OTHER;
7969 } 7869 }
7970 7870
7971
7972 //----- (004B4224) -------------------------------------------------------- 7871 //----- (004B4224) --------------------------------------------------------
7973 void _4B4224_UpdateNPCTopics( int _this ) 7872 void _4B4224_UpdateNPCTopics( int _this )
7974 { 7873 {
7975 int num_menu_buttons; // ebx@1 7874 int num_menu_buttons; // ebx@1
7976 int i; // ebp@5 7875 int i; // ebp@5
8088 dialog_menu_id = HOUSE_DIALOGUE_MAIN; 7987 dialog_menu_id = HOUSE_DIALOGUE_MAIN;
8089 } 7988 }
8090 7989
8091 } 7990 }
8092 7991
8093
8094
8095 //----- (004B46A5) -------------------------------------------------------- 7992 //----- (004B46A5) --------------------------------------------------------
8096 char __fastcall DrawTextAtStatusBar(const char *sText, int font_color) 7993 char __fastcall DrawTextAtStatusBar(const char *sText, int font_color)
8097 { 7994 {
8098 int v4; // eax@1 7995 int v4; // eax@1
8099 pRenderer->DrawTextureRGB(0, 352, pTexture_StatusBar); 7996 pRenderer->DrawTextureRGB(0, 352, pTexture_StatusBar);
8110 v1 = 0; 8007 v1 = 0;
8111 for ( i = 0; i < a1; ++i ) 8008 for ( i = 0; i < a1; ++i )
8112 v1 += i + 1; 8009 v1 += i + 1;
8113 return 1000 * v1; 8010 return 1000 * v1;
8114 } 8011 }
8115
8116 8012
8117 //----- (004BC49B) -------------------------------------------------------- 8013 //----- (004BC49B) --------------------------------------------------------
8118 void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType) 8014 void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType)
8119 { 8015 {
8120 //unsigned int v1; // esi@1 8016 //unsigned int v1; // esi@1
8337 if ( !dword_7241C8 ) 8233 if ( !dword_7241C8 )
8338 pGame->Draw(); 8234 pGame->Draw();
8339 dword_7241C8 = 0; 8235 dword_7241C8 = 0;
8340 } 8236 }
8341 8237
8342
8343
8344 //----- (004BDAAF) -------------------------------------------------------- 8238 //----- (004BDAAF) --------------------------------------------------------
8345 bool __fastcall sub_4BDAAF(ItemGen *a1, int _2da_idx) 8239 bool __fastcall sub_4BDAAF(ItemGen *a1, int _2da_idx)
8346 { 8240 {
8347 int v2; // edx@1 8241 int v2; // edx@1
8348 unsigned int v3; // esi@1 8242 unsigned int v3; // esi@1
8442 } 8336 }
8443 } 8337 }
8444 return 0; 8338 return 0;
8445 */ 8339 */
8446 } 8340 }
8447
8448
8449
8450 8341
8451 //----- (004B6478) -------------------------------------------------------- 8342 //----- (004B6478) --------------------------------------------------------
8452 void sub_4B6478() 8343 void sub_4B6478()
8453 { 8344 {
8454 GUIWindow *v0; // ebx@1 8345 GUIWindow *v0; // ebx@1
8653 } 8544 }
8654 while ( v35 <v29->pNumPresenceButton + v29->pStartingPosActiveItem ); 8545 while ( v35 <v29->pNumPresenceButton + v29->pStartingPosActiveItem );
8655 } 8546 }
8656 return; 8547 return;
8657 } 8548 }
8658
8659
8660
8661
8662 8549
8663 //----- (00405CFF) -------------------------------------------------------- 8550 //----- (00405CFF) --------------------------------------------------------
8664 void stru262_TurnBased::End(bool bPlaySound) 8551 void stru262_TurnBased::End(bool bPlaySound)
8665 { 8552 {
8666 stru262_TurnBased *v2; // edi@1 8553 stru262_TurnBased *v2; // edi@1
8905 { 8792 {
8906 v1->_406FA8(); 8793 v1->_406FA8();
8907 } 8794 }
8908 } 8795 }
8909 } 8796 }
8910
8911
8912
8913 8797
8914 //----- (0043FDED) -------------------------------------------------------- 8798 //----- (0043FDED) --------------------------------------------------------
8915 void PrepareActorRenderList_BLV() 8799 void PrepareActorRenderList_BLV()
8916 { 8800 {
8917 RenderBillboard *v0; // esi@0 8801 RenderBillboard *v0; // esi@0
9123 _continue: 9007 _continue:
9124 ; 9008 ;
9125 } 9009 }
9126 } 9010 }
9127 9011
9128
9129
9130
9131 //----- (00444732) -------------------------------------------------------- 9012 //----- (00444732) --------------------------------------------------------
9132 char *GetEventHintString(unsigned int uEventID) 9013 char *GetEventHintString(unsigned int uEventID)
9133 { 9014 {
9134 signed int event_index; // edx@1 9015 signed int event_index; // edx@1
9135 int event_pos; // esi@4 9016 int event_pos; // esi@4
9180 result = &pLevelStr[pLevelStrOffsets[EVT_BYTE(last_evt->v5)]]; 9061 result = &pLevelStr[pLevelStrOffsets[EVT_BYTE(last_evt->v5)]];
9181 } 9062 }
9182 9063
9183 return result; 9064 return result;
9184 } 9065 }
9185
9186
9187
9188 9066
9189 //----- (00444839) -------------------------------------------------------- 9067 //----- (00444839) --------------------------------------------------------
9190 unsigned int __fastcall sub_444839_move_map(unsigned int a1, int a2, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName) 9068 unsigned int __fastcall sub_444839_move_map(unsigned int a1, int a2, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName)
9191 { 9069 {
9192 unsigned int v9; // ebx@1 9070 unsigned int v9; // ebx@1
9287 result = v23; 9165 result = v23;
9288 if ( v23 ) 9166 if ( v23 )
9289 uCurrentHouse_Animation = v23; 9167 uCurrentHouse_Animation = v23;
9290 return result; 9168 return result;
9291 } 9169 }
9292