Mercurial > mm7
comparison UI/UIPartyCreation.cpp @ 1545:c4ab816fcc5e
assert, Abortf, AbortWithError -> Assert, Error
refactors here and there
author | Nomad |
---|---|
date | Sat, 07 Sep 2013 20:05:20 +0200 |
parents | 2ca62c9e7b3c |
children | 75fafd8ced59 |
comparison
equal
deleted
inserted
replaced
1544:499761153844 | 1545:c4ab816fcc5e |
---|---|
1 #ifdef _MSC_VER | 1 #ifdef _MSC_VER |
2 #define _CRT_SECURE_NO_WARNINGS | 2 #define _CRT_SECURE_NO_WARNINGS |
3 #endif | 3 #endif |
4 | |
5 #include <assert.h> | |
6 | |
7 | 4 |
8 #include "..\Mouse.h" | 5 #include "..\Mouse.h" |
9 #include "..\Keyboard.h" | 6 #include "..\Keyboard.h" |
10 | 7 |
11 #include "..\Game.h" | 8 #include "..\Game.h" |
171 case 0: pX = 12; break; | 168 case 0: pX = 12; break; |
172 case 1: pX = 171; break; | 169 case 1: pX = 171; break; |
173 case 2: pX = 329; break; | 170 case 2: pX = 329; break; |
174 case 3: pX = 488; break; | 171 case 3: pX = 488; break; |
175 default: | 172 default: |
176 assert(false && "Invalid selected character"); | 173 Error("Invalid selected character"); |
177 } | 174 } |
178 | 175 |
179 pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); | 176 pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); |
180 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); | 177 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); |
181 pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uCurrentFace]); | 178 pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uCurrentFace]); |
809 case PLAYER_SKILL_DAGGER: player->AddItem(-1, 15); break; | 806 case PLAYER_SKILL_DAGGER: player->AddItem(-1, 15); break; |
810 case PLAYER_SKILL_AXE: player->AddItem(-1, 23); break; | 807 case PLAYER_SKILL_AXE: player->AddItem(-1, 23); break; |
811 case PLAYER_SKILL_SPEAR: player->AddItem(-1, 31); break; | 808 case PLAYER_SKILL_SPEAR: player->AddItem(-1, 31); break; |
812 case PLAYER_SKILL_BOW: player->AddItem(-1, 47); break; | 809 case PLAYER_SKILL_BOW: player->AddItem(-1, 47); break; |
813 case PLAYER_SKILL_MACE: player->AddItem(-1, 50); break; | 810 case PLAYER_SKILL_MACE: player->AddItem(-1, 50); break; |
814 case PLAYER_SKILL_BLASTER: assert(false); break; | 811 case PLAYER_SKILL_BLASTER: Error("No blasters at startup :p"); |
815 case PLAYER_SKILL_SHIELD: player->AddItem(-1, 84); break; | 812 case PLAYER_SKILL_SHIELD: player->AddItem(-1, 84); break; |
816 case PLAYER_SKILL_LEATHER: player->AddItem(-1, 66); break; | 813 case PLAYER_SKILL_LEATHER: player->AddItem(-1, 66); break; |
817 case PLAYER_SKILL_CHAIN: player->AddItem(-1, 71); break; | 814 case PLAYER_SKILL_CHAIN: player->AddItem(-1, 71); break; |
818 case PLAYER_SKILL_PLATE: player->AddItem(-1, 76); break; | 815 case PLAYER_SKILL_PLATE: player->AddItem(-1, 76); break; |
819 case PLAYER_SKILL_FIRE: | 816 case PLAYER_SKILL_FIRE: |
845 player->spellbook.pBodySpellbook.bIsSpellAvailable[0] = true; | 842 player->spellbook.pBodySpellbook.bIsSpellAvailable[0] = true; |
846 break; | 843 break; |
847 case PLAYER_SKILL_LIGHT: | 844 case PLAYER_SKILL_LIGHT: |
848 case PLAYER_SKILL_DARK: | 845 case PLAYER_SKILL_DARK: |
849 case PLAYER_SKILL_DIPLOMACY: | 846 case PLAYER_SKILL_DIPLOMACY: |
850 assert(false); | 847 Error("No dimoplacy in mm7 (yet)"); |
851 break; | 848 break; |
852 case PLAYER_SKILL_ITEM_ID: | 849 case PLAYER_SKILL_ITEM_ID: |
853 case PLAYER_SKILL_REPAIR: | 850 case PLAYER_SKILL_REPAIR: |
854 case PLAYER_SKILL_MEDITATION: | 851 case PLAYER_SKILL_MEDITATION: |
855 case PLAYER_SKILL_PERCEPTION: | 852 case PLAYER_SKILL_PERCEPTION: |