diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-16 10:38:08 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-16 10:38:08 +0200 |
commit | 6a0d150539897ec65ccc161305db48de10ea35ba (patch) | |
tree | 7064e569459bd8d704edd28552f48bf2978d61a0 /src/common/restext.cpp | |
parent | af9af56bb007050c969af310c4e816d260b9ce7f (diff) | |
download | colobot-6a0d150539897ec65ccc161305db48de10ea35ba.tar.gz colobot-6a0d150539897ec65ccc161305db48de10ea35ba.tar.bz2 colobot-6a0d150539897ec65ccc161305db48de10ea35ba.zip |
Interface works
- removed mock of CInterface and fixed event passing to CRobotMain
- changed texture names from tga and bmp to png
- UI now works but interaction is still broken
Diffstat (limited to 'src/common/restext.cpp')
-rw-r--r-- | src/common/restext.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/restext.cpp b/src/common/restext.cpp index e66c70e..5a8e6ba 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -18,6 +18,7 @@ #include "common/global.h" #include "common/event.h" +#include "common/logger.h" #include "CBot/resource.h" #include "object/object.h" @@ -140,7 +141,12 @@ static const char* GetResourceBase(ResType type, int num) str = strings_text[num]; break; case RES_EVENT: - assert(num < strings_event_len); + // assert(num < strings_event_len); + if (num >= strings_event_len) + { + GetLogger()->Error("GetResource invalid event num: %d\n", num); + return ""; + } str = strings_event[num]; break; case RES_OBJECT: |