Mercurial > mm7
comparison mm7_5.cpp @ 1018:9ac94d00012e
Merge
author | Grumpy7 |
---|---|
date | Tue, 21 May 2013 02:24:31 +0200 |
parents | c45d51b3f4f4 a704435d3285 |
children | 3413ad40cc88 |
comparison
equal
deleted
inserted
replaced
1017:af20650a052f | 1018:9ac94d00012e |
---|---|
381 _4B4224_UpdateNPCTopics(uMessageParam); | 381 _4B4224_UpdateNPCTopics(uMessageParam); |
382 continue; | 382 continue; |
383 case UIMSG_StartNewGame: | 383 case UIMSG_StartNewGame: |
384 if ( dword_6BE138 == 124 || uMessageParam ) | 384 if ( dword_6BE138 == 124 || uMessageParam ) |
385 { | 385 { |
386 pIcons_LOD->_40F9C5(); | 386 pIcons_LOD->SyncLoadedFilesCount(); |
387 pIcons_LOD->_4114F2(); | 387 pIcons_LOD->_4114F2(); |
388 if ( pMessageQueue_50CBD0->uNumMessages ) | 388 if ( pMessageQueue_50CBD0->uNumMessages ) |
389 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 389 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
390 pGUIWindow_CurrentMenu->Release(); | 390 pGUIWindow_CurrentMenu->Release(); |
391 uGameState = GAME_STATE_NEWGAME_OUT_GAMEMENU; | 391 uGameState = GAME_STATE_NEWGAME_OUT_GAMEMENU; |
399 dword_6BE138 = 124; | 399 dword_6BE138 = 124; |
400 } | 400 } |
401 stru_506E40.Release(); | 401 stru_506E40.Release(); |
402 continue; | 402 continue; |
403 case UIMSG_Game_OpenLoadGameDialog: | 403 case UIMSG_Game_OpenLoadGameDialog: |
404 pIcons_LOD->_40F9C5(); | 404 pIcons_LOD->SyncLoadedFilesCount(); |
405 pIcons_LOD->_4114F2(); | 405 pIcons_LOD->_4114F2(); |
406 if ( pMessageQueue_50CBD0->uNumMessages ) | 406 if ( pMessageQueue_50CBD0->uNumMessages ) |
407 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 407 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
408 pGUIWindow_CurrentMenu->Release(); | 408 pGUIWindow_CurrentMenu->Release(); |
409 pCurrentScreen = SCREEN_LOADGAME; | 409 pCurrentScreen = SCREEN_LOADGAME; |
410 GameUI_DrawLoadMenu(1); | 410 GameUI_DrawLoadMenu(1); |
411 continue; | 411 continue; |
412 case UIMSG_Quit: | 412 case UIMSG_Quit: |
413 if ( dword_6BE138 == 132 || uMessageParam ) | 413 if ( dword_6BE138 == 132 || uMessageParam ) |
414 { | 414 { |
415 pIcons_LOD->_40F9C5(); | 415 pIcons_LOD->SyncLoadedFilesCount(); |
416 pIcons_LOD->_4114F2(); | 416 pIcons_LOD->_4114F2(); |
417 if ( pMessageQueue_50CBD0->uNumMessages ) | 417 if ( pMessageQueue_50CBD0->uNumMessages ) |
418 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 418 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
419 pGUIWindow_CurrentMenu->Release(); | 419 pGUIWindow_CurrentMenu->Release(); |
420 pCurrentScreen = SCREEN_GAME; | 420 pCurrentScreen = SCREEN_GAME; |
431 } | 431 } |
432 stru_506E40.Release(); | 432 stru_506E40.Release(); |
433 continue; | 433 continue; |
434 case UIMSG_80: | 434 case UIMSG_80: |
435 __debugbreak(); | 435 __debugbreak(); |
436 pIcons_LOD->_40F9C5(); | 436 pIcons_LOD->SyncLoadedFilesCount(); |
437 pIcons_LOD->_4114F2(); | 437 pIcons_LOD->_4114F2(); |
438 pGUIWindow_CurrentMenu->Release(); | 438 pGUIWindow_CurrentMenu->Release(); |
439 pCurrentScreen = SCREEN_OPTIONS; | 439 pCurrentScreen = SCREEN_OPTIONS; |
440 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_8, 0, 0); | 440 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_8, 0, 0); |
441 continue; | 441 continue; |
1145 viewparams->bRedrawGameUI = 1; | 1145 viewparams->bRedrawGameUI = 1; |
1146 pEventTimer->Resume(); | 1146 pEventTimer->Resume(); |
1147 continue; | 1147 continue; |
1148 case SCREEN_OPTIONS://Close | 1148 case SCREEN_OPTIONS://Close |
1149 options_menu_skin.Relaease(); | 1149 options_menu_skin.Relaease(); |
1150 pIcons_LOD->_40F9C5(); | 1150 pIcons_LOD->SyncLoadedFilesCount(); |
1151 WriteWindowsRegistryInt("soundflag", (char)uSoundVolumeMultiplier); | 1151 WriteWindowsRegistryInt("soundflag", (char)uSoundVolumeMultiplier); |
1152 WriteWindowsRegistryInt("musicflag", (char)uMusicVolimeMultiplier); | 1152 WriteWindowsRegistryInt("musicflag", (char)uMusicVolimeMultiplier); |
1153 WriteWindowsRegistryInt("CharVoices", (char)uVoicesVolumeMultiplier); | 1153 WriteWindowsRegistryInt("CharVoices", (char)uVoicesVolumeMultiplier); |
1154 WriteWindowsRegistryInt("WalkSound", bWalkSound); | 1154 WriteWindowsRegistryInt("WalkSound", bWalkSound); |
1155 WriteWindowsRegistryInt("ShowDamage", bShowDamage); | 1155 WriteWindowsRegistryInt("ShowDamage", bShowDamage); |
1175 } | 1175 } |
1176 WriteWindowsRegistryInt("TurnDelta", 1); | 1176 WriteWindowsRegistryInt("TurnDelta", 1); |
1177 stru_506E40.Release(); | 1177 stru_506E40.Release(); |
1178 break; | 1178 break; |
1179 case SCREEN_MENU: | 1179 case SCREEN_MENU: |
1180 pIcons_LOD->_40F9C5(); | 1180 pIcons_LOD->SyncLoadedFilesCount(); |
1181 pIcons_LOD->_4114F2(); | 1181 pIcons_LOD->_4114F2(); |
1182 pIcons_LOD->_40F9C5(); | 1182 pIcons_LOD->SyncLoadedFilesCount(); |
1183 pIcons_LOD->_4114F2(); | 1183 pIcons_LOD->_4114F2(); |
1184 stru_506E40.Release(); | 1184 stru_506E40.Release(); |
1185 break; | 1185 break; |
1186 case SCREEN_VIDEO_OPTIONS: | 1186 case SCREEN_VIDEO_OPTIONS: |
1187 if ( pRenderer->pRenderD3D ) | 1187 if ( pRenderer->pRenderD3D ) |
1215 pIcons_LOD->pTextures[*(int *)thisb].Release(); | 1215 pIcons_LOD->pTextures[*(int *)thisb].Release(); |
1216 thisb += 4; | 1216 thisb += 4; |
1217 } | 1217 } |
1218 while ( thisb < (signed int)&dword_507C08 ); | 1218 while ( thisb < (signed int)&dword_507C08 ); |
1219 memset(&uTextureID_Optkb, 0, 0x14u); | 1219 memset(&uTextureID_Optkb, 0, 0x14u); |
1220 pIcons_LOD->_40F9C5(); | 1220 pIcons_LOD->SyncLoadedFilesCount(); |
1221 uAction = 0; | 1221 uAction = 0; |
1222 do | 1222 do |
1223 { | 1223 { |
1224 v33 = pKeyActionMap->GetActionVKey((enum InputAction)uAction); | 1224 v33 = pKeyActionMap->GetActionVKey((enum InputAction)uAction); |
1225 if ( v33 != pPrevVirtualCidesMapping[uAction] ) | 1225 if ( v33 != pPrevVirtualCidesMapping[uAction] ) |
1261 } | 1261 } |
1262 pTexture_RestUI_CurrentSkyFrame->Release(); | 1262 pTexture_RestUI_CurrentSkyFrame->Release(); |
1263 pTexture_RestUI_CurrentHourglassFrame->Release(); | 1263 pTexture_RestUI_CurrentHourglassFrame->Release(); |
1264 pTexture_RestUI_CurrentHourglassFrame = 0; | 1264 pTexture_RestUI_CurrentHourglassFrame = 0; |
1265 pTexture_RestUI_CurrentSkyFrame = 0; | 1265 pTexture_RestUI_CurrentSkyFrame = 0; |
1266 pIcons_LOD->_40F9C5(); | 1266 pIcons_LOD->SyncLoadedFilesCount(); |
1267 pIcons_LOD->_4114F2(); | 1267 pIcons_LOD->_4114F2(); |
1268 _506F18_num_hours_to_sleep = 0; | 1268 _506F18_num_hours_to_sleep = 0; |
1269 dword_506F14 = 0; | 1269 dword_506F14 = 0; |
1270 dword_507B94 = 1; | 1270 dword_507B94 = 1; |
1271 if ( pGUIWindow_Settings ) | 1271 if ( pGUIWindow_Settings ) |
2801 dword_50C9EC[3 * dword_50C9E8] = UIMSG_CastSpellFromBook; | 2801 dword_50C9EC[3 * dword_50C9E8] = UIMSG_CastSpellFromBook; |
2802 dword_50C9EC[3 * dword_50C9E8 + 1] = v103; | 2802 dword_50C9EC[3 * dword_50C9E8 + 1] = v103; |
2803 dword_50C9EC[3 * dword_50C9E8 + 2] = uActiveCharacter - 1; | 2803 dword_50C9EC[3 * dword_50C9E8 + 2] = uActiveCharacter - 1; |
2804 ++dword_50C9E8; | 2804 ++dword_50C9E8; |
2805 }*/ | 2805 }*/ |
2806 pMessageQueue_50CBD0->AddMessage(UIMSG_CastSpellFromBook, v103, uActiveCharacter - 1); | 2806 pMessageQueue_50C9E8->AddMessage(UIMSG_CastSpellFromBook, v103, uActiveCharacter - 1); |
2807 // pMessageQueue_50CBD0->AddMessage(UIMSG_CastSpellFromBook, v103, uActiveCharacter - 1); | |
2807 } | 2808 } |
2808 else | 2809 else |
2809 { | 2810 { |
2810 byte_506550 = 1; | 2811 byte_506550 = 1; |
2811 quick_spell_at_page = uMessageParam + 1; | 2812 quick_spell_at_page = uMessageParam + 1; |
3259 default: | 3260 default: |
3260 continue; | 3261 continue; |
3261 } | 3262 } |
3262 } | 3263 } |
3263 } | 3264 } |
3264 pMessageQueue_50CBD0->uNumMessages = dword_50C9E8; | 3265 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50C9E8->uNumMessages;//dword_50C9E8; |
3265 memcpy(pMessageQueue_50CBD0->pMessages, dword_50C9EC, 12 * dword_50C9E8); | 3266 memcpy(pMessageQueue_50CBD0->pMessages, pMessageQueue_50C9E8->pMessages, sizeof(GUIMessage) * pMessageQueue_50C9E8->uNumMessages); |
3266 dword_50C9E8 = 0; | 3267 //memcpy(pMessageQueue_50CBD0->pMessages, dword_50C9EC, 12 * dword_50C9E8); |
3268 //dword_50C9E8 = 0; | |
3269 | |
3270 | |
3271 pMessageQueue_50C9E8->uNumMessages=0; | |
3267 if ( dword_50C9DC ) | 3272 if ( dword_50C9DC ) |
3268 { | 3273 { |
3269 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 3274 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
3270 { | 3275 { |
3271 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)dword_50C9DC; | 3276 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)dword_50C9DC; |
3393 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); | 3398 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); |
3394 player->PlaySound(SPEECH_PickMe, 0); | 3399 player->PlaySound(SPEECH_PickMe, 0); |
3395 break; | 3400 break; |
3396 case UIMSG_PlayerCreation_FacePrev: | 3401 case UIMSG_PlayerCreation_FacePrev: |
3397 pPlayer = &pParty->pPlayers[pParam]; | 3402 pPlayer = &pParty->pPlayers[pParam]; |
3398 if (!pPlayer->uFace) | 3403 if (!pPlayer->uCurrentFace) |
3399 pPlayer->uFace = 19; | 3404 pPlayer->uCurrentFace = 19; |
3400 else | 3405 else |
3401 pPlayer->uFace -= 1; | 3406 pPlayer->uCurrentFace -= 1; |
3402 pPlayer->uVoiceID = pPlayer->uFace; | 3407 pPlayer->uVoiceID = pPlayer->uCurrentFace; |
3403 pPlayer->SetInitialStats(); | 3408 pPlayer->SetInitialStats(); |
3404 pPlayer->SetSexByVoice(); | 3409 pPlayer->SetSexByVoice(); |
3405 pPlayer->RandomizeName(); | 3410 pPlayer->RandomizeName(); |
3406 v25 = pParam; | 3411 v25 = pParam; |
3407 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) | 3412 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3411 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); | 3416 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); |
3412 pPlayer->PlaySound(SPEECH_PickMe, 0); | 3417 pPlayer->PlaySound(SPEECH_PickMe, 0); |
3413 break; | 3418 break; |
3414 case UIMSG_PlayerCreation_FaceNext: | 3419 case UIMSG_PlayerCreation_FaceNext: |
3415 pPlayer = &pParty->pPlayers[pParam]; | 3420 pPlayer = &pParty->pPlayers[pParam]; |
3416 v20 = (char)((int)pPlayer->uFace + 1) % 20; | 3421 v20 = (char)((int)pPlayer->uCurrentFace + 1) % 20; |
3417 pPlayer->uFace = v20; | 3422 pPlayer->uCurrentFace = v20; |
3418 pPlayer->uVoiceID = v20; | 3423 pPlayer->uVoiceID = v20; |
3419 pPlayer->SetInitialStats(); | 3424 pPlayer->SetInitialStats(); |
3420 pPlayer->SetSexByVoice(); | 3425 pPlayer->SetSexByVoice(); |
3421 pPlayer->RandomizeName(); | 3426 pPlayer->RandomizeName(); |
3422 v21 = pParam; | 3427 v21 = pParam; |
6053 papredoll_drhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6058 papredoll_drhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6054 wsprintfA(pContainer, "pc23v%dlh", v9); | 6059 wsprintfA(pContainer, "pc23v%dlh", v9); |
6055 papredoll_dlhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6060 papredoll_dlhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6056 wsprintfA(pContainer, "pc23v%dlhu", v9); | 6061 wsprintfA(pContainer, "pc23v%dlhu", v9); |
6057 papredoll_dlhus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6062 papredoll_dlhus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6058 v6 = pPlayers[v1 + 1]->uFace; | 6063 v6 = pPlayers[v1 + 1]->uCurrentFace; |
6059 if ( v6 == 12 || v6 == 13 ) | 6064 if ( v6 == 12 || v6 == 13 ) |
6060 papredoll_dbrds[pPlayers[v8]->uFace] = 0; | 6065 papredoll_dbrds[pPlayers[v8]->uCurrentFace] = 0; |
6061 papredoll_flying_feet[pPlayers[v8]->uFace] = 0; | 6066 papredoll_flying_feet[pPlayers[v8]->uCurrentFace] = 0; |
6062 IsPlayerWearingWatersuit[v8] = 1; | 6067 IsPlayerWearingWatersuit[v8] = 1; |
6063 } | 6068 } |
6064 } | 6069 } |
6065 | 6070 |
6066 //----- (0043F0BD) -------------------------------------------------------- | 6071 //----- (0043F0BD) -------------------------------------------------------- |
6078 v7 = uPlayerID; | 6083 v7 = uPlayerID; |
6079 if ( ((uPlayerID - 1) & 0x80000000u) == 0 ) | 6084 if ( ((uPlayerID - 1) & 0x80000000u) == 0 ) |
6080 { | 6085 { |
6081 v2 = &pPlayers[uPlayerID]; | 6086 v2 = &pPlayers[uPlayerID]; |
6082 v3 = uPlayerID - 1; | 6087 v3 = uPlayerID - 1; |
6083 papredoll_dbods[v3] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE); | 6088 papredoll_dbods[v3] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[(*v2)->uCurrentFace], TEXTURE_16BIT_PALETTE); |
6084 papredoll_dlads[v3] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE); | 6089 papredoll_dlads[v3] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[(*v2)->uCurrentFace], TEXTURE_16BIT_PALETTE); |
6085 papredoll_dlaus[v3] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE); | 6090 papredoll_dlaus[v3] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[(*v2)->uCurrentFace], TEXTURE_16BIT_PALETTE); |
6086 papredoll_drhs[v3] = pIcons_LOD->LoadTexture(drh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE); | 6091 papredoll_drhs[v3] = pIcons_LOD->LoadTexture(drh_texnames_by_face[(*v2)->uCurrentFace], TEXTURE_16BIT_PALETTE); |
6087 papredoll_dlhs[v3] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE); | 6092 papredoll_dlhs[v3] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[(*v2)->uCurrentFace], TEXTURE_16BIT_PALETTE); |
6088 papredoll_dlhus[v3] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE); | 6093 papredoll_dlhus[v3] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[(*v2)->uCurrentFace], TEXTURE_16BIT_PALETTE); |
6089 v4 = (int)&(*v2)->uFace; | 6094 v4 = (int)&(*v2)->uCurrentFace; |
6090 v5 = *(char *)v4; | 6095 v5 = *(char *)v4; |
6091 if ( *(char *)v4 == 12 || v5 == 13 ) | 6096 if ( *(char *)v4 == 12 || v5 == 13 ) |
6092 { | 6097 { |
6093 wsprintfA(pContainer, "pc%02dbrd", v5 + 1); | 6098 wsprintfA(pContainer, "pc%02dbrd", v5 + 1); |
6094 v4 = (int)&(*v2)->uFace; | 6099 v4 = (int)&(*v2)->uCurrentFace; |
6095 papredoll_dbrds[*(char *)v4] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6100 papredoll_dbrds[*(char *)v4] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6096 } | 6101 } |
6097 wsprintfA(pContainer, "item281pc%02d", *(char *)v4 + 1); | 6102 wsprintfA(pContainer, "item281pc%02d", *(char *)v4 + 1); |
6098 papredoll_flying_feet[(*v2)->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6103 papredoll_flying_feet[(*v2)->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6099 result = v7; | 6104 result = v7; |
6100 IsPlayerWearingWatersuit[v7] = 0; | 6105 IsPlayerWearingWatersuit[v7] = 0; |
6101 } | 6106 } |
6102 return result; | 6107 return result; |
6103 } | 6108 } |
9163 return v5; | 9168 return v5; |
9164 } | 9169 } |
9165 | 9170 |
9166 | 9171 |
9167 //----- (0040D75D) -------------------------------------------------------- | 9172 //----- (0040D75D) -------------------------------------------------------- |
9168 char __fastcall pPrimaryWindow_draws_text(int a1, const char *pText, int *pXY) | 9173 void pPrimaryWindow_draws_text( int a1, const char *pText, int *pXY ) |
9169 { | 9174 { |
9170 const char *v3; // ST0C_4@1 | 9175 const char *v3; // ST0C_4@1 |
9171 __int64 v4; // qax@1 | 9176 __int64 v4; // qax@1 |
9172 | 9177 |
9173 v3 = pText; | 9178 v3 = pText; |
9174 v4 = LOBYTE(pFontComic->uFontHeight) - 3; | 9179 v4 = LOBYTE(pFontComic->uFontHeight) - 3; |
9175 return pPrimaryWindow->DrawText( | 9180 pPrimaryWindow->DrawText( |
9176 pFontComic, | 9181 pFontComic, |
9177 *pXY, | 9182 *pXY, |
9178 pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3, | 9183 pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3, |
9179 0, | 9184 0, |
9180 v3, | 9185 v3, |
9954 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/ | 9959 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/ |
9955 } | 9960 } |
9956 // 4E1D3A: using guessed type __int16 word_4E1D3A[]; | 9961 // 4E1D3A: using guessed type __int16 word_4E1D3A[]; |
9957 | 9962 |
9958 | 9963 |
9959 //----- (00413D3C) -------------------------------------------------------- | |
9960 char *__cdecl GetDayPart() | |
9961 { | |
9962 if ( pParty->uCurrentHour > 4 ) | |
9963 { | |
9964 if ( pParty->uCurrentHour == 5 ) | |
9965 return pGlobalTXT_LocalizationStrings[55]; | |
9966 if ( pParty->uCurrentHour == 20 ) | |
9967 return pGlobalTXT_LocalizationStrings[566]; | |
9968 if ( pParty->uCurrentHour <= 0x14 || pParty->uCurrentHour > 0x17 ) | |
9969 return pGlobalTXT_LocalizationStrings[56]; | |
9970 } | |
9971 return pGlobalTXT_LocalizationStrings[567]; | |
9972 } | |
9973 | |
9974 //----- (00413FF1) -------------------------------------------------------- | 9964 //----- (00413FF1) -------------------------------------------------------- |
9975 void SetMonthNames() | 9965 void SetMonthNames() |
9976 { | 9966 { |
9977 aMonthNames[0] = pGlobalTXT_LocalizationStrings[415]; | 9967 aMonthNames[0] = pGlobalTXT_LocalizationStrings[415]; |
9978 aMonthNames[1] = pGlobalTXT_LocalizationStrings[416]; | 9968 aMonthNames[1] = pGlobalTXT_LocalizationStrings[416]; |
10111 + 2 * LOBYTE(pFontSmallnum->uFontHeight) | 10101 + 2 * LOBYTE(pFontSmallnum->uFontHeight) |
10112 + 24; | 10102 + 24; |
10113 Dst.uFrameY = 470 - Dst.uFrameHeight; | 10103 Dst.uFrameY = 470 - Dst.uFrameHeight; |
10114 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 10104 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
10115 Dst.uFrameW = 469; | 10105 Dst.uFrameW = 469; |
10106 //Dst.Hint = "abcagfdsgsg ljsrengvlkjesnfkjwnef"; | |
10116 Dst.DrawMessageBox(0); | 10107 Dst.DrawMessageBox(0); |
10108 | |
10117 Dst.uFrameWidth -= 24; | 10109 Dst.uFrameWidth -= 24; |
10118 Dst.uFrameX += 12; | 10110 Dst.uFrameX += 12; |
10119 Dst.uFrameY += 12; | 10111 Dst.uFrameY += 12; |
10120 Dst.uFrameHeight -= 12; | 10112 Dst.uFrameHeight -= 12; |
10121 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 10113 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
10122 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; | 10114 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; |
10123 Dst.DrawTitleText(pFontSmallnum, 0, 0xCu, 0, pGlobalTXT_LocalizationStrings[157], 3u); | 10115 Dst.DrawTitleText(pFontSmallnum, 0, 0xCu, ui_mainmenu_copyright_color, pGlobalTXT_LocalizationStrings[157], 3); |
10124 } | 10116 } |
10125 | 10117 |
10126 | 10118 |
10127 | 10119 |
10128 //----- (004156F0) -------------------------------------------------------- | 10120 //----- (004156F0) -------------------------------------------------------- |
10202 TravelUI_Draw(); | 10194 TravelUI_Draw(); |
10203 continue; | 10195 continue; |
10204 } | 10196 } |
10205 case WINDOW_SpellBook: | 10197 case WINDOW_SpellBook: |
10206 { | 10198 { |
10207 DrawSpellBookContent(); | 10199 DrawSpellBookContent(pPlayers[uActiveCharacter]); |
10208 continue; | 10200 continue; |
10209 } | 10201 } |
10210 case WINDOW_GreetingNPC: | 10202 case WINDOW_GreetingNPC: |
10211 { | 10203 { |
10212 DrawBranchlessDialogueUI(); | 10204 DrawBranchlessDialogueUI(); |
10866 { | 10858 { |
10867 if ( v51 != 4 ) | 10859 if ( v51 != 4 ) |
10868 { | 10860 { |
10869 if ( v51 != 5 ) | 10861 if ( v51 != 5 ) |
10870 { | 10862 { |
10871 v19 = v0->AddItem(0xFFFFFFFFu, 0xDCu); | 10863 v19 = v0->AddItem(-1, 0xDCu); |
10872 if ( v19 ) | 10864 if ( v19 ) |
10873 *(int *)&v0->field_1F5[36 * v19 + 15] = 1; | 10865 *(int *)&v0->field_1F5[36 * v19 + 15] = 1; |
10874 v20 = v47 + 50 * v15; | 10866 v20 = v47 + 50 * v15; |
10875 v0->pInventoryItems[pOut.z].uItemID = v51; | 10867 v0->pInventoryItems[pOut.z].uItemID = v51; |
10876 v0->pInventoryItems[pOut.z].uEnchantmentType = (pParty->pPickedItem.uEnchantmentType | 10868 v0->pInventoryItems[pOut.z].uEnchantmentType = (pParty->pPickedItem.uEnchantmentType |
10890 { | 10882 { |
10891 if ( *(int *)(a2.y + 532) == 221 ) | 10883 if ( *(int *)(a2.y + 532) == 221 ) |
10892 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID; | 10884 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID; |
10893 else | 10885 else |
10894 *(int *)(a2.y + 536) = pParty->pPickedItem.uEnchantmentType; | 10886 *(int *)(a2.y + 536) = pParty->pPickedItem.uEnchantmentType; |
10895 v21 = v0->AddItem(0xFFFFFFFFu, 0xDCu); | 10887 v21 = v0->AddItem(-1, 0xDCu); |
10896 if ( v21 ) | 10888 if ( v21 ) |
10897 *(int *)&v0->field_1F5[36 * v21 + 15] = 1; | 10889 *(int *)&v0->field_1F5[36 * v21 + 15] = 1; |
10898 goto LABEL_74; | 10890 goto LABEL_74; |
10899 } | 10891 } |
10900 goto LABEL_115; | 10892 goto LABEL_115; |
10902 v0->RemoveItemAtInventoryIndex(v18); | 10894 v0->RemoveItemAtInventoryIndex(v18); |
10903 v0->SetCondition(0x10u, 0); | 10895 v0->SetCondition(0x10u, 0); |
10904 v23 = 0; | 10896 v23 = 0; |
10905 } | 10897 } |
10906 } | 10898 } |
10907 v0->_4160CA(v23); | 10899 v0->ItemsEnchant(v23); |
10908 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); | 10900 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); |
10909 | 10901 |
10910 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 10902 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
10911 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 10903 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
10912 { | 10904 { |
11365 } | 11357 } |
11366 return v2; | 11358 return v2; |
11367 } | 11359 } |
11368 | 11360 |
11369 //----- (004179BC) -------------------------------------------------------- | 11361 //----- (004179BC) -------------------------------------------------------- |
11370 char __fastcall sub_4179BC_draw_tooltip(const char *a1, const char *a2) | 11362 void __fastcall sub_4179BC_draw_tooltip( const char *a1, const char *a2 ) |
11371 { | 11363 { |
11372 const char *v2; // ebx@1 | 11364 const char *v2; // ebx@1 |
11373 const char *v3; // edi@1 | 11365 const char *v3; // edi@1 |
11374 unsigned int v4; // eax@1 | 11366 unsigned int v4; // eax@1 |
11375 GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1 | 11367 GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1 |
11376 POINT v6; // [sp+60h] [bp-8h]@1 | 11368 POINT v6; // [sp+60h] [bp-8h]@1 |
11393 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 11385 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
11394 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; | 11386 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; |
11395 v4 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 11387 v4 = TargetColor(0xFFu, 0xFFu, 0x9Bu); |
11396 sprintf(pTmpBuf, format_4E2D80, v4, v3); | 11388 sprintf(pTmpBuf, format_4E2D80, v4, v3); |
11397 Dst.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3u); | 11389 Dst.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3u); |
11398 return Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0); | 11390 Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0); |
11399 } | 11391 } |
11400 | 11392 |
11401 //----- (00417AD4) -------------------------------------------------------- | 11393 //----- (00417AD4) -------------------------------------------------------- |
11402 unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level) | 11394 unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level) |
11403 { | 11395 { |