diff UI/UITransition.cpp @ 1545:c4ab816fcc5e

assert, Abortf, AbortWithError -> Assert, Error refactors here and there
author Nomad
date Sat, 07 Sep 2013 20:05:20 +0200
parents 7ef4b64f6329
children 79621dd04649 bae4ffd25a03
line wrap: on
line diff
--- a/UI/UITransition.cpp	Sat Sep 07 15:20:57 2013 +0200
+++ b/UI/UITransition.cpp	Sat Sep 07 20:05:20 2013 +0200
@@ -2,7 +2,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#include <assert.h>
 #include <io.h>
 
 #include "..\mm7_data.h"
@@ -63,7 +62,7 @@
     case PartyAlignment_Good:    sprintfex(pContainer, "evt%02d-b", const_2()); break;
     case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2());   break;
     case PartyAlignment_Evil:    sprintfex(pContainer, "evt%02d-c", const_2()); break;
-    default: assert(false);
+    default: Error("Invalid alignment: %u", pParty->alignment);
   }
 
   v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
@@ -129,7 +128,7 @@
     case PartyAlignment_Good:    sprintfex(pContainer, "evt%02d-b", const_2()); break;
     case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2());   break;
     case PartyAlignment_Evil:    sprintfex(pContainer, "evt%02d-c", const_2()); break;
-    default: assert(false);
+    default: Error("Invalid alignment: %u", pParty->alignment);
   }
 
   pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
@@ -248,7 +247,7 @@
     v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &v8, 0, 0)) / 2 + 101;
     v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3);
   }
-  else assert(false);
+  else Error("Troubles in da house");
 
   _unused_5B5924_is_travel_ui_drawn = true;
 }