comparison Party.cpp @ 1545:c4ab816fcc5e

assert, Abortf, AbortWithError -> Assert, Error refactors here and there
author Nomad
date Sat, 07 Sep 2013 20:05:20 +0200
parents f3802824f576
children 9a6567c6c76c
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 4
7 #include "Party.h" 5 #include "Party.h"
8 #include "MapInfo.h" 6 #include "MapInfo.h"
9 #include "Time.h" 7 #include "Time.h"
10 #include "AudioPlayer.h" 8 #include "AudioPlayer.h"
1020 case Condition_Disease2: 1018 case Condition_Disease2:
1021 case Condition_Disease3: player->expression = CHARACTER_EXPRESSION_DISEASED; break; 1019 case Condition_Disease3: player->expression = CHARACTER_EXPRESSION_DISEASED; break;
1022 case Condition_Paralyzed: player->expression = CHARACTER_EXPRESSION_PARALYZED; break; 1020 case Condition_Paralyzed: player->expression = CHARACTER_EXPRESSION_PARALYZED; break;
1023 case Condition_Unconcious: player->expression = CHARACTER_EXPRESSION_UNCONCIOUS; break; 1021 case Condition_Unconcious: player->expression = CHARACTER_EXPRESSION_UNCONCIOUS; break;
1024 default: 1022 default:
1025 assert(false); 1023 Error("Invalid condition: %u", condition);
1026 } 1024 }
1027 } 1025 }
1028 } 1026 }
1029 1027
1030 1028
1039 { 1037 {
1040 hireling->evt_A = 0; 1038 hireling->evt_A = 0;
1041 hireling->evt_B = 0; 1039 hireling->evt_B = 0;
1042 hireling->evt_C = 0; 1040 hireling->evt_C = 0;
1043 1041
1044 assert(sizeof(NPCData) == 0x4C); 1042 Assert(sizeof(NPCData) == 0x4C);
1045 memset(hireling, 0, sizeof(*hireling)); 1043 memset(hireling, 0, sizeof(*hireling));
1046 1044
1047 pParty->field_709 = 0; 1045 pParty->field_709 = 0;
1048 pParty->CountHirelings(); 1046 pParty->CountHirelings();
1049 viewparams->bRedrawGameUI = true; 1047 viewparams->bRedrawGameUI = true;