From 10b2c562fb7635f9850f1441f08ba8b1a71e31e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Wed, 15 Aug 2012 01:48:49 +0200 Subject: First approach to port 2D UI Interface - changes in src/ui ; be CAREFUL, not every file is changed in a proper way -> bugs - necessary changes in object/robotmain.h and common/misc.h/.cpp in order to compile --- src/common/misc.cpp | 274 ++--- src/common/misc.h | 8 +- src/common/restext.cpp | 2583 ++++++++++++++++++++++++------------------------ src/common/restext.h | 10 +- src/object/robotmain.h | 42 +- src/ui/button.cpp | 50 +- src/ui/button.h | 8 +- src/ui/check.cpp | 34 +- src/ui/check.h | 2 +- src/ui/color.cpp | 92 +- src/ui/color.h | 18 +- src/ui/compass.cpp | 55 +- src/ui/compass.h | 4 +- src/ui/control.cpp | 249 ++--- src/ui/control.h | 127 +-- src/ui/gauge.cpp | 24 +- src/ui/gauge.h | 6 +- src/ui/group.cpp | 93 +- src/ui/group.h | 2 +- 19 files changed, 1856 insertions(+), 1825 deletions(-) diff --git a/src/common/misc.cpp b/src/common/misc.cpp index 2427356..d4805e6 100644 --- a/src/common/misc.cpp +++ b/src/common/misc.cpp @@ -21,14 +21,16 @@ #include #include #include -#include +//#include #include -#include +//#include #include "common/struct.h" -#include "old/d3dengine.h" -#include "old/d3dmath.h" -#include "old/d3dutil.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +//#include "old/d3dmath.h" +//#include "math/math.h" +//#include "old/d3dutil.h" #include "common/language.h" #include "common/event.h" #include "common/misc.h" @@ -37,7 +39,7 @@ CMetaFile g_metafile; -static EventMsg g_uniqueEventMsg = EVENT_USER; +static EventType g_uniqueEventType = EVENT_USER; static bool g_bUserDir = false; static char g_userDir[100] = ""; @@ -45,84 +47,84 @@ static char g_userDir[100] = ""; // Gives a single user event. -EventMsg GetUniqueEventMsg() +EventType GetUniqueEventType() { int i; - i = (int)g_uniqueEventMsg+1; - g_uniqueEventMsg = (EventMsg)i; - return g_uniqueEventMsg; + i = static_cast (g_uniqueEventType+1); + g_uniqueEventType = static_cast(i); + return g_uniqueEventType; } // Returns a non-accented letter. -char RetNoAccent(char letter) +char GetNoAccent(char letter) { if ( letter < 0 ) { - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'a'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'e'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'i'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'o'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'u'; - - if ( letter == '' ) return 'c'; - - if ( letter == '' ) return 'n'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'A'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'E'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'I'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'O'; - - if ( letter == '' || - letter == '' || - letter == '' || - letter == '' ) return 'U'; - - if ( letter == '' ) return 'C'; - - if ( letter == '' ) return 'N'; + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'a'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'e'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'i'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'o'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'u'; + + if ( letter == '�' ) return 'c'; + + if ( letter == '�' ) return 'n'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'A'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'E'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'I'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'O'; + + if ( letter == '�' || + letter == '�' || + letter == '�' || + letter == '�' ) return 'U'; + + if ( letter == '�' ) return 'C'; + + if ( letter == '�' ) return 'N'; } return letter; @@ -130,40 +132,40 @@ char RetNoAccent(char letter) // Returns an uppercase letter. -char RetToUpper(char letter) +char GetToUpper(char letter) { if ( letter < 0 ) { - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; } return toupper(letter); @@ -171,40 +173,40 @@ char RetToUpper(char letter) // Returns a lowercase letter. -char RetToLower(char letter) +char GetToLower(char letter) { if ( letter < 0 ) { - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; - - if ( letter == '' ) return ''; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; + + if ( letter == '�' ) return '�'; } return tolower(letter); @@ -213,7 +215,7 @@ char RetToLower(char letter) // Converting time to string. -void TimeToAscii(time_t time, char *buffer) +void GimeToAscii(time_t time, char *buffer) { struct tm when; int year; @@ -311,7 +313,7 @@ bool CopyFileToTemp(char* filename) UserDir(dst, filename, "textures"); strcpy(g_userDir, save); - _mkdir("temp"); +// _mkdir("temp"); TODO if ( !Xfer(src, dst) ) return false; strcpy(filename, dst); diff --git a/src/common/misc.h b/src/common/misc.h index 4853856..bb4bf1f 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -221,9 +221,9 @@ const int KS_NUMMINUS = (1<<15); extern EventType GetUniqueEventType(); -extern char RetNoAccent(char letter); -extern char RetToUpper(char letter); -extern char RetToLower(char letter); +extern char GetNoAccent(char letter); +extern char GetToUpper(char letter); +extern char GetToLower(char letter); extern void TimeToAscii(time_t time, char *buffer); @@ -233,6 +233,6 @@ extern void AddExt(char* filename, char* ext); extern void UserDir(bool bUser, char* dir); extern void UserDir(char* buffer, char* dir, char* def); -extern char RetLanguageLetter(); +extern char GetLanguageLetter(); diff --git a/src/common/restext.cpp b/src/common/restext.cpp index bbec090..c67a49c 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -15,8 +15,9 @@ // * along with this program. If not, see http://www.gnu.org/licenses/.// restext.cpp #include -#include "common/struct.h" -#include "old/d3dengine.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" #include "common/language.h" #include "common/misc.h" #include "common/event.h" @@ -32,7 +33,7 @@ // Gives the pointer to the engine. -void SetEngine(CD3DEngine *engine) +void SetEngine(Gfx::CEngine *engine) { g_engine = engine; } @@ -114,7 +115,7 @@ void PutKeyName(char* dst, char* src) { if ( SearchKey(src+s+5, key) ) { - res = g_engine->RetKey(key, 0); +// res = g_engine->GetKey(key, 0); TODO if ( res != 0 ) { if ( GetResource(RES_KEY, res, name) ) @@ -863,7 +864,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == TX_NOTERM ) strcpy(text, "Instructions after the final closing brace"); if ( num == TX_CLOSEBLK ) strcpy(text, "End of block missing"); if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" without corresponding ""if"" "); - if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//dbut d'un bloc attendu? + if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//d�but d'un bloc attendu? if ( num == TX_BADTYPE ) strcpy(text, "Wrong type for the assignment"); if ( num == TX_REDEFVAR ) strcpy(text, "A variable can not be declared twice"); if ( num == TX_BAD2TYPE ) strcpy(text, "The types of the two operands are incompatible "); @@ -872,7 +873,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == TX_WHILE ) strcpy(text, "Keyword ""while"" missing"); if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" outside a loop"); if ( num == TX_LABEL ) strcpy(text, "A label must be followed by ""for"", ""while"", ""do"" or ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette tiquette n'existe pas + if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette �tiquette n'existe pas if ( num == TX_NOCASE ) strcpy(text, "Instruction ""case"" missing"); if ( num == TX_BADNUM ) strcpy(text, "Number missing"); if ( num == TX_VOID ) strcpy(text, "Void parameter"); @@ -898,7 +899,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == TX_NOPUBLIC ) strcpy(text, "Public required"); if ( num == TX_DIVZERO ) strcpy(text, "Dividing by zero"); if ( num == TX_NOTINIT ) strcpy(text, "Variable not initialized"); - if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, a? + if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, �a? if ( num == TX_NORETVAL ) strcpy(text, "The function returned no value "); if ( num == TX_NORUN ) strcpy(text, "No function running"); if ( num == TX_NOCALL ) strcpy(text, "Calling an unknown function"); @@ -913,119 +914,119 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == TX_ERRREAD ) strcpy(text, "Read error"); if ( num == TX_ERRWRITE ) strcpy(text, "Write error"); } - +// \TODO if ( type == RES_KEY ) { if ( num == 0 ) strcpy(text, "< none >"); - if ( num == VK_LEFT ) strcpy(text, "Arrow left"); - if ( num == VK_RIGHT ) strcpy(text, "Arrow right"); - if ( num == VK_UP ) strcpy(text, "Arrow up"); - if ( num == VK_DOWN ) strcpy(text, "Arrow down"); - if ( num == VK_CANCEL ) strcpy(text, "Control-break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_RETURN ) strcpy(text, "Enter"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Space"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Select"); - if ( num == VK_EXECUTE ) strcpy(text, "Execute"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Help"); - if ( num == VK_LWIN ) strcpy(text, "Left Windows"); - if ( num == VK_RWIN ) strcpy(text, "Right Windows"); - if ( num == VK_APPS ) strcpy(text, "Application key"); - if ( num == VK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == VK_ADD ) strcpy(text, "NumPad +"); - if ( num == VK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == VK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == VK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == VK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Play"); - if ( num == VK_ZOOM ) strcpy(text, "Zoom"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_BUTTON1 ) strcpy(text, "Button 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Button 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Button 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Button 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Button 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Button 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Button 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Button 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Button 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Button 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Button 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Button 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Button 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Button 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Button 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Button 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Button 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Button 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Button 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Button 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Button 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Button 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Button 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Button 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Button 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Button 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Button 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Button 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Button 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Button 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Button 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Button 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Wheel up"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Wheel down"); + if ( num == SDLK_LEFT ) strcpy(text, "Arrow left"); + if ( num == SDLK_RIGHT ) strcpy(text, "Arrow right"); + if ( num == SDLK_UP ) strcpy(text, "Arrow up"); + if ( num == SDLK_DOWN ) strcpy(text, "Arrow down"); +// if ( num == SDLK_CANCEL ) strcpy(text, "Control-break"); +// if ( num == SDLK_BACK ) strcpy(text, "<--"); + if ( num == SDLK_TAB ) strcpy(text, "Tab"); + if ( num == SDLK_CLEAR ) strcpy(text, "Clear"); + if ( num == SDLK_RETURN ) strcpy(text, "Enter"); +// if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); +// if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); + if ( num == SDLK_MENU ) strcpy(text, "Alt"); + if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); +// if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); + if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); + if ( num == SDLK_SPACE ) strcpy(text, "Space"); +// if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); +// if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); + if ( num == SDLK_END ) strcpy(text, "End"); + if ( num == SDLK_HOME ) strcpy(text, "Home"); +// if ( num == SDLK_SELECT ) strcpy(text, "Select"); +// if ( num == SDLK_EXECUTE ) strcpy(text, "Execute"); +// if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); + if ( num == SDLK_INSERT ) strcpy(text, "Insert"); + if ( num == SDLK_DELETE ) strcpy(text, "Delete"); + if ( num == SDLK_HELP ) strcpy(text, "Help"); +// if ( num == SDLK_LWIN ) strcpy(text, "Left Windows"); +// if ( num == SDLK_RWIN ) strcpy(text, "Right Windows"); +// if ( num == SDLK_APPS ) strcpy(text, "Application key"); +// if ( num == SDLK_NUMPAD0 ) strcpy(text, "NumPad 0"); +// if ( num == SDLK_NUMPAD1 ) strcpy(text, "NumPad 1"); +// if ( num == SDLK_NUMPAD2 ) strcpy(text, "NumPad 2"); +// if ( num == SDLK_NUMPAD3 ) strcpy(text, "NumPad 3"); +// if ( num == SDLK_NUMPAD4 ) strcpy(text, "NumPad 4"); +// if ( num == SDLK_NUMPAD5 ) strcpy(text, "NumPad 5"); +// if ( num == SDLK_NUMPAD6 ) strcpy(text, "NumPad 6"); +// if ( num == SDLK_NUMPAD7 ) strcpy(text, "NumPad 7"); +// if ( num == SDLK_NUMPAD8 ) strcpy(text, "NumPad 8"); +// if ( num == SDLK_NUMPAD9 ) strcpy(text, "NumPad 9"); +// if ( num == SDLK_MULTIPLY ) strcpy(text, "NumPad *"); +// if ( num == SDLK_ADD ) strcpy(text, "NumPad +"); +// if ( num == SDLK_SEPARATOR ) strcpy(text, "NumPad sep"); +// if ( num == SDLK_SUBTRACT ) strcpy(text, "NumPad -"); +// if ( num == SDLK_DECIMAL ) strcpy(text, "NumPad ."); +// if ( num == SDLK_DIVIDE ) strcpy(text, "NumPad /"); + if ( num == SDLK_F1 ) strcpy(text, "F1"); + if ( num == SDLK_F2 ) strcpy(text, "F2"); + if ( num == SDLK_F3 ) strcpy(text, "F3"); + if ( num == SDLK_F4 ) strcpy(text, "F4"); + if ( num == SDLK_F5 ) strcpy(text, "F5"); + if ( num == SDLK_F6 ) strcpy(text, "F6"); + if ( num == SDLK_F7 ) strcpy(text, "F7"); + if ( num == SDLK_F8 ) strcpy(text, "F8"); + if ( num == SDLK_F9 ) strcpy(text, "F9"); + if ( num == SDLK_F10 ) strcpy(text, "F10"); + if ( num == SDLK_F11 ) strcpy(text, "F11"); + if ( num == SDLK_F12 ) strcpy(text, "F12"); + if ( num == SDLK_F13 ) strcpy(text, "F13"); + if ( num == SDLK_F14 ) strcpy(text, "F14"); + if ( num == SDLK_F15 ) strcpy(text, "F15"); +// if ( num == SDLK_F16 ) strcpy(text, "F16"); +// if ( num == SDLK_F17 ) strcpy(text, "F17"); +// if ( num == SDLK_F18 ) strcpy(text, "F18"); +// if ( num == SDLK_F19 ) strcpy(text, "F19"); +// if ( num == SDLK_F20 ) strcpy(text, "F20"); + if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); +// if ( num == SDLK_SCROLL ) strcpy(text, "Scroll"); +// if ( num == SDLK_ATTN ) strcpy(text, "Attn"); +// if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); +// if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); +// if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); +// if ( num == SDLK_PLAY ) strcpy(text, "Play"); +// if ( num == SDLK_ZOOM ) strcpy(text, "Zoom"); +// if ( num == SDLK_PA1 ) strcpy(text, "PA1"); +// if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Clear"); +// if ( num == SDLK_BUTTON1 ) strcpy(text, "Button 1"); +// if ( num == SDLK_BUTTON2 ) strcpy(text, "Button 2"); +// if ( num == SDLK_BUTTON3 ) strcpy(text, "Button 3"); +// if ( num == SDLK_BUTTON4 ) strcpy(text, "Button 4"); +// if ( num == SDLK_BUTTON5 ) strcpy(text, "Button 5"); +// if ( num == SDLK_BUTTON6 ) strcpy(text, "Button 6"); +// if ( num == SDLK_BUTTON7 ) strcpy(text, "Button 7"); +// if ( num == SDLK_BUTTON8 ) strcpy(text, "Button 8"); +// if ( num == SDLK_BUTTON9 ) strcpy(text, "Button 9"); +// if ( num == SDLK_BUTTON10 ) strcpy(text, "Button 10"); +// if ( num == SDLK_BUTTON11 ) strcpy(text, "Button 11"); +// if ( num == SDLK_BUTTON12 ) strcpy(text, "Button 12"); +// if ( num == SDLK_BUTTON13 ) strcpy(text, "Button 13"); +// if ( num == SDLK_BUTTON14 ) strcpy(text, "Button 14"); +// if ( num == SDLK_BUTTON15 ) strcpy(text, "Button 15"); +// if ( num == SDLK_BUTTON16 ) strcpy(text, "Button 16"); +// if ( num == SDLK_BUTTON17 ) strcpy(text, "Button 17"); +// if ( num == SDLK_BUTTON18 ) strcpy(text, "Button 18"); +// if ( num == SDLK_BUTTON19 ) strcpy(text, "Button 19"); +// if ( num == SDLK_BUTTON20 ) strcpy(text, "Button 20"); +// if ( num == SDLK_BUTTON21 ) strcpy(text, "Button 21"); +// if ( num == SDLK_BUTTON22 ) strcpy(text, "Button 22"); +// if ( num == SDLK_BUTTON23 ) strcpy(text, "Button 23"); +// if ( num == SDLK_BUTTON24 ) strcpy(text, "Button 24"); +// if ( num == SDLK_BUTTON25 ) strcpy(text, "Button 25"); +// if ( num == SDLK_BUTTON26 ) strcpy(text, "Button 26"); +// if ( num == SDLK_BUTTON27 ) strcpy(text, "Button 27"); +// if ( num == SDLK_BUTTON28 ) strcpy(text, "Button 28"); +// if ( num == SDLK_BUTTON29 ) strcpy(text, "Button 29"); +// if ( num == SDLK_BUTTON30 ) strcpy(text, "Button 30"); +// if ( num == SDLK_BUTTON31 ) strcpy(text, "Button 31"); +// if ( num == SDLK_BUTTON32 ) strcpy(text, "Button 32"); +// if ( num == SDLK_WHEELUP ) strcpy(text, "Wheel up"); +// if ( num == SDLK_WHEELDOWN ) strcpy(text, "Wheel down"); } #endif @@ -1064,7 +1065,7 @@ bool GetResourceBase(ResType type, int num, char* text) #endif if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Taille maximale"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille rduite"); + if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille r�duite"); if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Taille normale"); if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Fermer"); @@ -1082,38 +1083,38 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); #endif if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmation"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "Dfis"); + if ( num == RT_TITLE_DEFI ) strcpy(text, "D�fis"); if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions"); if ( num == RT_TITLE_FREE ) strcpy(text, "Jeu libre"); if ( num == RT_TITLE_TEEN ) strcpy(text, "Jeu libre"); - if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux supplmentaires"); + if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux suppl�mentaires"); if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes"); if ( num == RT_TITLE_SETUP ) strcpy(text, "Options"); if ( num == RT_TITLE_NAME ) strcpy(text, "Nom du joueur"); if ( num == RT_TITLE_PERSO ) strcpy(text, "Personnalisation de votre apparence"); if ( num == RT_TITLE_WRITE ) strcpy(text, "Enregistrement de la mission en cours"); - if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistre"); + if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistr�e"); if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste des chapitres :"); if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des plantes :"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des plantes :"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux supplmentaires :"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des plantes :"); + if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des plan�tes :"); + if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des plan�tes :"); + if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux suppl�mentaires :"); + if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des plan�tes :"); if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste des chapitres :"); if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste des exercices du chapitre :"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des dfis du chapitre :"); + if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des d�fis du chapitre :"); if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste des missions du chapitre :"); if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste des jeux libres du chapitre :"); if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions du niveau :"); if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste des prototypes du chapitre :"); if ( num == RT_PLAY_LISTk ) strcpy(text, " Liste des jeux libres du chapitre :"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Rsum :"); + if ( num == RT_PLAY_RESUME ) strcpy(text, " R�sum� :"); if ( num == RT_SETUP_DEVICE ) strcpy(text, " Pilotes :"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Rsolutions :"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche redfinir."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhaite."); + if ( num == RT_SETUP_MODE ) strcpy(text, " R�solutions :"); + if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche � red�finir."); + if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhait�e."); if ( num == RT_PERSO_FACE ) strcpy(text, "Type de visage :"); if ( num == RT_PERSO_GLASSES ) strcpy(text, "Lunettes :"); @@ -1134,19 +1135,19 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_DIALOG_YES ) strcpy(text, "Abandonner\\Abandonner la mission en cours"); if ( num == RT_DIALOG_NO ) strcpy(text, "Continuer\\Continuer la mission en cours"); if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continuer\\Continuer de jouer"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment dtruire le btiment slectionn ?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous dtruire les sauvegardes de %s ?"); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Dtruire"); + if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment d�truire le b�timent s�lectionn� ?"); + if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous d�truire les sauvegardes de %s ?"); + if ( num == RT_DIALOG_YESDEL ) strcpy(text, "D�truire"); if ( num == RT_DIALOG_NODEL ) strcpy(text, "Annuler"); if ( num == RT_DIALOG_LOADING ) strcpy(text, "CHARGEMENT"); - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-cl (\\key cbot;)"); + if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-cl� (\\key cbot;)"); if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 erreur)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme termin"); + if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme termin�"); if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Listes des objets\n"); if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Listes des robots\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des btiments\n"); + if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des b�timents\n"); if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes des objets transportables\n"); if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes des ennemis\n"); if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (aucun)\\n;\n"); @@ -1158,16 +1159,16 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_IO_LIST ) strcpy(text, "Dossier: %s"); if ( num == RT_IO_NAME ) strcpy(text, "Nom:"); if ( num == RT_IO_DIR ) strcpy(text, "Dans:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Priv\\Dossier priv"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun tous les joueurs"); + if ( num == RT_IO_PRIVATE ) strcpy(text, "Priv�\\Dossier priv�"); + if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun � tous les joueurs"); - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Dvelopp par :"); + if ( num == RT_GENERIC_DEV1 ) strcpy(text, "D�velopp� par :"); if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); #if _SCHOOL if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); #else - //?if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version franaise dite par :"); + //?if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version fran�aise �dit�e par :"); //?if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.alsyd.com"); if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); @@ -1181,24 +1182,24 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_BUTTON_OK ) strcpy(text, "D'accord"); if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Annuler"); if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Suivant"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Prcdent"); + if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Pr�c�dent"); if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); if ( num == EVENT_DIALOG_OK ) strcpy(text, "D'accord"); if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Annuler"); if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmation\\Exercices de programmation"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Dfis\\Dfis de programmation"); + if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "D�fis\\D�fis de programmation"); if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\La grande aventure"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but prcis"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Jeu libre\\Jeu libre sans but prcis"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux supplmentaires"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'laboration"); + if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis"); + if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis"); + if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux suppl�mentaires"); + if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'�laboration"); if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Autre joueur\\Choix du nom du joueur"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\Rglages"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au dbut"); + if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\R�glages"); + if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au d�but"); if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Enregistrer\\Enregistrer la mission en cours"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistre"); + if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistr�e"); #if _NEWLOOK if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans CeeBot"); if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter CeeBot"); @@ -1206,65 +1207,65 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans COLOBOT"); if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter COLOBOT"); #endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau prcdent"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\Dmarrer l'action"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et rsolution d'affichage"); + if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau pr�c�dent"); + if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\D�marrer l'action"); + if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et r�solution d'affichage"); if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphique\\Options graphiques"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilit"); + if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilit�"); if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Commandes\\Touches du clavier"); if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Son\\Volumes bruitages & musiques"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rsolution"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein cran\\Plein cran ou fentr"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectus"); + if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit�"); + if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "R�solution"); + if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein �cran\\Plein �cran ou fen�tr�"); + if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectu�s"); if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Votre assistant"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projetes au sol"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessines sur le sol"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et btiments"); + if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projet�es au sol"); + if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessin�es sur le sol"); + if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et b�timents"); if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Brouillard\\Nappes de brouillard"); if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Rayons du soleil\\Rayons selon l'orientation"); if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Ciel\\Ciel et nuages"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Plantes et toiles\\Motifs mobiles dans le ciel"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumires dynamiques\\Eclairages mobiles"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantit de particules\\Explosions, poussires, reflets, etc."); + if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Plan�tes et �toiles\\Motifs mobiles dans le ciel"); + if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumi�res dynamiques\\Eclairages mobiles"); + if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantit� de particules\\Explosions, poussi�res, reflets, etc."); if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Profondeur de champ\\Distance de vue maximale"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Dtails des objets\\Qualit des objets en 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit des textures\\Qualit des images"); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nb d'objets dcoratifs\\Qualit d'objets non indispensables"); + if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "D�tails des objets\\Qualit� des objets en 3D"); + if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit� des textures\\Qualit� des images"); + if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nb d'objets d�coratifs\\Qualit� d'objets non indispensables"); if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particules dans l'interface\\Pluie de particules"); if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflets sur les boutons\\Boutons brillants"); if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Bulles d'aide\\Bulles explicatives"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Squences cinmatiques\\Films avant ou aprs une mission"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour anim\\Retour anim dans les exercices"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Dgts soi-mme\\Vos tirs infligent des dommages vos units"); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Dfilement dans les bords\\Dfilement lorsque la souris touches les bords gauche ou droite"); + if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "S�quences cin�matiques\\Films avant ou apr�s une mission"); + if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour anim�\\Retour anim� dans les exercices"); + if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "D�g�ts � soi-m�me\\Vos tirs infligent des dommages � vos unit�s"); + if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "D�filement dans les bords\\D�filement lorsque la souris touches les bords gauche ou droite"); if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord"); if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'cran vibre lors d'une explosion"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombre\\Jolie souris avec une ombre"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'dition d'un programme"); + if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'�cran vibre lors d'une explosion"); + if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombr�e\\Jolie souris avec une ombre"); + if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'�dition d'un programme"); if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Grande indentation\\Indente avec 2 ou 4 espaces"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Accs aux solutions\\Programme \"4: Solution\" dans les exercices"); + if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Acc�s aux solutions\\Programme \"4: Solution\" dans les exercices"); - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout rinitialiser\\Remet toutes les touches standards"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner gauche\\Moteur gauche"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner droite\\Moteur droite"); + if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout r�initialiser\\Remet toutes les touches standards"); + if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner � gauche\\Moteur � gauche"); + if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner � droite\\Moteur � droite"); if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Avancer\\Moteur en avant"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arrire"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du racteur"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du racteur"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de camra\\Autre de point de vue"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Slection prcdente\\Slectionne l'objet prcdent"); + if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arri�re"); + if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du r�acteur"); + if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du r�acteur"); + if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de cam�ra\\Autre de point de vue"); + if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "S�lection pr�c�dente\\S�lectionne l'objet pr�c�dent"); if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Action standard\\Action du bouton avec le cadre rouge"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Camra plus proche\\Avance la camra"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Camra plus loin\\Recule la camra"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Slectionner l'objet suivant\\Slectionner l'objet suivant"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Slectionner le cosmonaute\\Slectionner le cosmonaute"); + if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Cam�ra plus proche\\Avance la cam�ra"); + if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Cam�ra plus loin\\Recule la cam�ra"); + if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "S�lectionner l'objet suivant\\S�lectionner l'objet suivant"); + if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "S�lectionner le cosmonaute\\S�lectionner le cosmonaute"); if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quitter la mission en cours\\Terminer un exercice ou une mssion"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche suivre"); + if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche � suivre"); if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Instructions programmation\\Explication sur la programmation"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-cl\\Explication sur le mot-cl"); + if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-cl�\\Explication sur le mot-cl�"); if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Montrer le lieu d'un message\\Montrer le lieu du dernier message"); if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Vitesse 1.0x\\Vitesse normale"); if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Vitesse 1.5x\\Une fois et demi plus rapide"); @@ -1275,38 +1276,38 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Fond sonore :\\Volume des pistes audio du CD"); if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Bruitages 3D\\Positionnement sonore dans l'espace"); - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualit minimale (+ rapide)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualit standard"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualit (+ lent)"); + if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualit� minimale (+ rapide)"); + if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualit� standard"); + if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualit� (+ lent)"); if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Silencieux\\Totalement silencieux"); if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Niveaux normaux"); if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Utilise un joystick\\Joystick ou clavier"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Accs la solution\\Donne la solution"); + if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Acc�s � la solution\\Donne la solution"); - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur crer"); + if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur � cr�er"); if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "D'accord\\Choisir le joueur"); if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Annuler\\Conserver le joueur actuel"); if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Supprimer le joueur\\Supprimer le joueur de la liste"); if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Nom du joueur"); if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Enregistrer\\Enregistrer la mission en cours"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission slectionne"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistres"); + if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission s�lectionn�e"); + if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistr�es"); if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nom du fichier :"); if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nom de la mission"); if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Vue de la mission"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement slectionn"); + if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement s�lectionn�"); if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aspect\\Choisir votre aspect"); if ( num == EVENT_INTERFACE_POK ) strcpy(text, "D'accord"); if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Annuler"); if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Remet les couleurs standards"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Tte\\Visage et cheveux"); + if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "T�te\\Visage et cheveux"); if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Corps\\Combinaison"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation gauche"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation droite"); + if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation � gauche"); + if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation � droite"); if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rouge"); if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Vert"); if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Bleu"); @@ -1324,57 +1325,57 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Lunettes 4"); if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Lunettes 5"); - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Slection prcdente (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne gauche (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne droite (\\key right;)"); + if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "S�lection pr�c�dente (\\key desel;)"); + if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne � gauche (\\key left;)"); + if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne � droite (\\key right;)"); if ( num == EVENT_OBJECT_UP ) strcpy(text, "Avance (\\key up;)"); if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Recule (\\key down;)"); if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Monte (\\key gup;)"); if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Descend (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou dpose (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou dpose (\\key action;)"); + if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)"); + if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)"); if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..devant"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derrire"); + if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derri�re"); if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..pile"); if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions sur la mission (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Dcolle pour terminer la mission"); + if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "D�colle pour terminer la mission"); if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Construit un derrick"); if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Construit une station"); if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Construit une fabrique de robots"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de rparation"); + if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de r�paration"); if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Construit un convertisseur"); if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Construit une tour"); if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Construit un centre de recherches"); if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Construit un radar"); if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Construit une fabrique de piles"); if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Construit un laboratoire"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nuclaire"); + if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nucl�aire"); if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Construit un paratonnerre"); if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Construit une borne d'information"); if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Montre si le sol est plat"); if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Pose un drapeau de couleur"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enlve un drapeau"); + if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enl�ve un drapeau"); if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Drapeaux bleus"); if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Drapeaux rouges"); if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Drapeaux verts"); if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Drapeaux jaunes"); if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Drapeaux violets"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un dmnageur volant"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un dmnageur chenilles"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un dmnageur roues"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un dmnageur pattes"); + if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un d�m�nageur volant"); + if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un d�m�nageur � chenilles"); + if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un d�m�nageur � roues"); + if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un d�m�nageur � pattes"); if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Fabrique un shooter volant"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter chenilles"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter roues"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter pattes"); + if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter � chenilles"); + if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter � roues"); + if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter � pattes"); if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Fabrique un orgaShooter volant"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter chenilles"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter roues"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter pattes"); + if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter � chenilles"); + if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter � roues"); + if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter � pattes"); if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Fabrique un renifleur volant"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur chenilles"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur roues"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur pattes"); + if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur � chenilles"); + if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur � roues"); + if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur � pattes"); if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Fabrique un robot secoueur"); if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Fabrique un robot phazer"); if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Fabrique un robot recycleur"); @@ -1384,43 +1385,43 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Recherche les robots volants"); if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Recherche le secoueur"); if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Recherche le canon shooter"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de dfense"); + if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de d�fense"); if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Recherche le canon phazer"); if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Recherche le bouclier"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nuclaire"); + if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nucl�aire"); if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Recherche les pattes"); if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Recherche le canon orgaShooter"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au dpart"); + if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au d�part"); if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Cherche (\\key action;)"); if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Secoue (\\key action;)"); if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Tir (\\key action;)"); if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Dploie le bouclier (\\key action;)"); + if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "D�ploie le bouclier (\\key action;)"); if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Stoppe le bouclier (\\key action;)"); if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Rayon du bouclier"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Excute le programme slectionn"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme slectionn"); + if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Ex�cute le programme s�lectionn�"); + if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme s�lectionn�"); if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Mettre le SatCom en veille"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Dmolit le btiment"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'nergie"); + if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "D�molit le b�timent"); + if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'�nergie"); if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Niveau du bouclier"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temprature du racteur"); + if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temp�rature du r�acteur"); if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Travail en cours ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes dtects"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffuses"); + if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes d�tect�s"); + if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffus�es"); if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Boussole"); //? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-carte"); if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-carte"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Camra (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camra gauche"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camra droite"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camra plus proche"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camra plus loin"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la slection"); + if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Cam�ra (\\key camera;)"); + if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Cam�ra � gauche"); + if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Cam�ra � droite"); + if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Cam�ra plus proche"); + if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Cam�ra plus loin"); + if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la s�lection"); if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Donne la solution"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> btiments"); + if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> b�timents"); if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Montre le rayon d'action"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Relve le crayon"); + if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Rel�ve le crayon"); if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir"); if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune"); if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange"); @@ -1429,7 +1430,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu"); if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert"); if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Dmarre l'enregistrement"); + if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\D�marre l'enregistrement"); if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement"); if ( num == EVENT_DT_VISIT0 || num == EVENT_DT_VISIT1 || @@ -1440,7 +1441,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_CMD ) strcpy(text, "Console de commande"); if ( num == EVENT_SPEED ) strcpy(text, "Vitesse du jeu"); - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page prcdente"); + if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page pr�c�dente"); if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Page suivante"); if ( num == EVENT_HYPER_HOME ) strcpy(text, "Page initiale"); if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copier"); @@ -1451,13 +1452,13 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Taille 5"); if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions de Houston"); #if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnaire anglais-franais"); + if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnaire anglais-fran�ais"); #else if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Rapport du satellite"); #endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoys par Houston"); + if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoy�s par Houston"); if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste des objets"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide la programmation"); + if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide � la programmation"); if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution"); if ( num == EVENT_STUDIO_OK ) strcpy(text, "D'accord\\Compiler le programme"); @@ -1469,11 +1470,11 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Couper (Ctrl+x)"); if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copier (Ctrl+c)"); if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Coller (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caractres"); + if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caract�res"); if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide la programmation (\\key prog;)"); + if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide � la programmation (\\key prog;)"); if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compiler"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Dmarrer/stopper"); + if ( num == EVENT_STUDIO_RUN ) strcpy(text, "D�marrer/stopper"); if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continuer"); if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Un pas"); } @@ -1484,40 +1485,40 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_BASE ) strcpy(text, "Vaisseau spatial"); if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick"); if ( num == OBJECT_FACTORY ) strcpy(text, "Fabrique de robots"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de rparation"); + if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de r�paration"); if ( num == OBJECT_DESTROYER ) strcpy(text, "Destructeur"); if ( num == OBJECT_STATION ) strcpy(text, "Station de recharge"); if ( num == OBJECT_CONVERT ) strcpy(text, "Conversion minerai en titanium"); - if ( num == OBJECT_TOWER ) strcpy(text, "Tour de dfense"); + if ( num == OBJECT_TOWER ) strcpy(text, "Tour de d�fense"); if ( num == OBJECT_NEST ) strcpy(text, "Nid"); if ( num == OBJECT_RESEARCH ) strcpy(text, "Centre de recherches"); if ( num == OBJECT_RADAR ) strcpy(text, "Radar"); if ( num == OBJECT_INFO ) strcpy(text, "Borne d'information"); #if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Dsintgrateur"); + if ( num == OBJECT_ENERGY ) strcpy(text, "D�sint�grateur"); #else if ( num == OBJECT_ENERGY ) strcpy(text, "Fabrique de piles"); #endif - if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de matires organiques"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nuclaire"); + if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de mati�res organiques"); + if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nucl�aire"); if ( num == OBJECT_PARA ) strcpy(text, "Paratonnerre"); if ( num == OBJECT_SAFE ) strcpy(text, "Coffre-fort"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contrle"); + if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contr�le"); if ( num == OBJECT_TARGET1 ) strcpy(text, "Cible"); if ( num == OBJECT_TARGET2 ) strcpy(text, "Cible"); - if ( num == OBJECT_START ) strcpy(text, "Dpart"); + if ( num == OBJECT_START ) strcpy(text, "D�part"); if ( num == OBJECT_END ) strcpy(text, "But"); if ( num == OBJECT_STONE ) strcpy(text, "Minerai de titanium"); if ( num == OBJECT_URANIUM ) strcpy(text, "Minerai d'uranium"); - if ( num == OBJECT_BULLET ) strcpy(text, "Matire organique"); + if ( num == OBJECT_BULLET ) strcpy(text, "Mati�re organique"); if ( num == OBJECT_METAL ) strcpy(text, "Titanium"); if ( num == OBJECT_POWER ) strcpy(text, "Pile normale"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nuclaire"); - if ( num == OBJECT_BBOX ) strcpy(text, "Bote noire"); - if ( num == OBJECT_KEYa ) strcpy(text, "Cl A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Cl B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Cl C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Cl D"); + if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nucl�aire"); + if ( num == OBJECT_BBOX ) strcpy(text, "Bo�te noire"); + if ( num == OBJECT_KEYa ) strcpy(text, "Cl� A"); + if ( num == OBJECT_KEYb ) strcpy(text, "Cl� B"); + if ( num == OBJECT_KEYc ) strcpy(text, "Cl� C"); + if ( num == OBJECT_KEYd ) strcpy(text, "Cl� D"); if ( num == OBJECT_TNT ) strcpy(text, "Explosif"); if ( num == OBJECT_BOMB ) strcpy(text, "Mine fixe"); if ( num == OBJECT_BAG ) strcpy(text, "Sac de survie"); @@ -1529,19 +1530,19 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_FLAGv ) strcpy(text, "Drapeau violet"); if ( num == OBJECT_MARKPOWER ) strcpy(text, "Emplacement pour station"); if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Emplacement pour derrick (uranium)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (cl A)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (cl B)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (cl C)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (cl D)"); + if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (cl� A)"); + if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (cl� B)"); + if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (cl� C)"); + if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (cl� D)"); if ( num == OBJECT_MARKSTONE ) strcpy(text, "Emplacement pour derrick (titanium)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot dmnageur"); + if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entra�nement"); + if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entra�nement"); + if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entra�nement"); + if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entra�nement"); + if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot d�m�nageur"); + if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot d�m�nageur"); + if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot d�m�nageur"); + if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot d�m�nageur"); if ( num == OBJECT_MOBILEfc ) strcpy(text, "Robot shooter"); if ( num == OBJECT_MOBILEtc ) strcpy(text, "Robot shooter"); if ( num == OBJECT_MOBILEwc ) strcpy(text, "Robot shooter"); @@ -1559,15 +1560,15 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_MOBILErr ) strcpy(text, "Robot recycleur"); if ( num == OBJECT_MOBILErs ) strcpy(text, "Robot bouclier"); if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot sous-marin"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entranement"); + if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entra�nement"); if ( num == OBJECT_MOBILEdr ) strcpy(text, "Robot dessinateur"); if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); if ( num == OBJECT_TECH ) strcpy(text, "Technicien"); if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); if ( num == OBJECT_MOTHER ) strcpy(text, "Pondeuse"); if ( num == OBJECT_ANT ) strcpy(text, "Fourmi"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Araigne"); - if ( num == OBJECT_BEE ) strcpy(text, "Gupe"); + if ( num == OBJECT_SPIDER ) strcpy(text, "Araign�e"); + if ( num == OBJECT_BEE ) strcpy(text, "Gu�pe"); if ( num == OBJECT_WORM ) strcpy(text, "Ver"); if ( num == OBJECT_EGG ) strcpy(text, "Oeuf"); if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Epave de robot"); @@ -1576,11 +1577,11 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Epave de robot"); if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Epave de robot"); if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Dchet"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Btiment en ruine"); + if ( num == OBJECT_RUINfactory ) strcpy(text, "B�timent en ruine"); + if ( num == OBJECT_RUINdoor ) strcpy(text, "B�timent en ruine"); + if ( num == OBJECT_RUINsupport ) strcpy(text, "D�chet"); + if ( num == OBJECT_RUINradar ) strcpy(text, "B�timent en ruine"); + if ( num == OBJECT_RUINconvert ) strcpy(text, "B�timent en ruine"); if ( num == OBJECT_RUINbase ) strcpy(text, "Epave de vaisseau spatial"); if ( num == OBJECT_RUINhead ) strcpy(text, "Epave de vaisseau spatial"); if ( num == OBJECT_APOLLO1 || @@ -1595,311 +1596,311 @@ bool GetResourceBase(ResType type, int num, char* text) strcpy(text, "Erreur"); if ( num == ERR_CMD ) strcpy(text, "Commande inconnue"); #if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot n'est pas install."); + if ( num == ERR_INSTALL ) strcpy(text, "CeeBot n'est pas install�."); if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de CeeBot\net relancer le jeu."); #else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas install."); + if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas install�."); if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de COLOBOT\net relancer le jeu."); #endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapt"); + if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapt�"); if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte dj quelque chose"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien prendre"); + if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte d�j� quelque chose"); + if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien � prendre"); if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occup"); + if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occup�"); if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Pas d'autre robot"); if ( num == ERR_MANIP_RADIO ) strcpy(text, "Vous ne pouvez pas transporter un objet radioactif"); if ( num == ERR_MANIP_WATER ) strcpy(text, "Vous ne pouvez pas transporter un objet sous l'eau"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien dposer"); + if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien � d�poser"); if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible en vol"); if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible sous l'eau"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'nergie"); + if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'�nergie"); if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium trop loin"); if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium trop proche"); if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Titanium inexistant"); if ( num == ERR_BUILD_FLAT ) strcpy(text, "Sol pas assez plat"); if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Sol plat pas assez grand"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occup"); + if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occup�"); if ( num == ERR_BUILD_BASE ) strcpy(text, "Trop proche du vaisseau spatial"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un btiment"); + if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un b�timent"); if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible en mouvement"); if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapt"); + if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapt�"); if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'nergie"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapt"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Btiment trop proche"); + if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapt�"); + if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'�nergie"); + if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapt�"); + if ( num == ERR_TERRA_BUILDING ) strcpy(text, "B�timent trop proche"); if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Objet trop proche"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'nergie"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien recycler"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'nergie"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Dplacement impossible"); + if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapt�"); + if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'�nergie"); + if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien � recycler"); + if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapt�"); + if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'�nergie"); + if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "D�placement impossible"); if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Objet n'existe pas"); if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Chemin introuvable"); if ( num == ERR_GOTO_ITER ) strcpy(text, "Position inaccessible"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occupe"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'nergie"); + if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occup�e"); + if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapt�"); + if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'�nergie"); if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium convertir"); + if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium � convertir"); if ( num == ERR_DERRICK_NULL ) strcpy(text, "Pas de minerai en sous-sol"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'nergie en sous-sol"); + if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'�nergie en sous-sol"); if ( num == ERR_TOWER_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'nergie"); + if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'�nergie"); if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'nergie"); + if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'�nergie"); if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Pas le bon type de pile"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche dj effectue"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'nergie en sous-sol"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'nergie"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium transformer"); + if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche d�j� effectu�e"); + if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'�nergie en sous-sol"); + if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'�nergie"); + if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium � transformer"); if ( num == ERR_ENERGY_BAD ) strcpy(text, "Ne transforme que le titanium"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloques par un robot ou un objet"); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir dcoller"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Rien analyser"); - if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la matire organique"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse dj effectue"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'nergie en sous-sol"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'nergie"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium transformer"); + if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloqu�es par un robot ou un objet"); + if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir d�coller"); + if ( num == ERR_LABO_NULL ) strcpy(text, "Rien � analyser"); + if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la mati�re organique"); + if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse d�j� effectu�e"); + if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'�nergie en sous-sol"); + if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'�nergie"); + if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium � transformer"); if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Ne transforme que l'uranium"); if ( num == ERR_FACTORY_NULL ) strcpy(text, "Pas de titanium"); if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Quelque chose est trop proche"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occup"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouv de borne d'information"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infect par un virus"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infect par un virus, ne fonctionne plus temporairement"); + if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occup�"); + if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouv� de borne d'information"); + if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infect� par un virus"); + if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infect� par un virus, ne fonctionne plus temporairement"); if ( num == ERR_VEH_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'nergie"); + if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'�nergie"); if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible en vol"); if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible en nageant"); if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible en mouvement"); if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible en portant un objet"); if ( num == ERR_FLAG_CREATE ) strcpy(text, "Trop de drapeaux de cette couleur (maximum 5)"); if ( num == ERR_FLAG_PROXY ) strcpy(text, "Trop proche d'un drapeau existant"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau proximit"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas termine (appuyez sur \\key help; pour plus de dtails)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot dtruit"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Btiment dtruit"); - if ( num == ERR_TOOMANY ) strcpy(text, "Cration impossible, il y a trop d'objets"); + if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau � proximit�"); + if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas termin�e (appuyez sur \\key help; pour plus de d�tails)"); + if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot d�truit"); + if ( num == ERR_DELETEBUILDING ) strcpy(text, "B�timent d�truit"); + if ( num == ERR_TOOMANY ) strcpy(text, "Cr�ation impossible, il y a trop d'objets"); if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Il manque \"%s\" dans le programme"); if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Interdit dans cet exercice"); - if ( num == INFO_BUILD ) strcpy(text, "Btiment termin"); + if ( num == INFO_BUILD ) strcpy(text, "B�timent termin�"); if ( num == INFO_CONVERT ) strcpy(text, "Titanium disponible"); - if ( num == INFO_RESEARCH ) strcpy(text, "Recherche termine"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot chenilles possible"); + if ( num == INFO_RESEARCH ) strcpy(text, "Recherche termin�e"); + if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot � chenilles possible"); if ( num == INFO_RESEARCHFLY ) strcpy(text, "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)"); if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Fabrication d'un robot secoueur possible"); if ( num == INFO_RESEARCHCANON ) strcpy(text, "Fabrication de robots shooter possible"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de dfense possible"); + if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de d�fense possible"); if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Fabrication d'un robot phazer possible"); if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Fabrication d'un robot bouclier possible"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nuclaire possible"); + if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nucl�aire possible"); if ( num == INFO_FACTORY ) strcpy(text, "Nouveau robot disponible"); - if ( num == INFO_LABO ) strcpy(text, "Analyse termine"); + if ( num == INFO_LABO ) strcpy(text, "Analyse termin�e"); if ( num == INFO_ENERGY ) strcpy(text, "Pile disponible"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nuclaire disponible"); - if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouv un objet utilisable"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouv"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission termine >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Dsol, mission choue >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Dsol, mission choue >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectu"); + if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nucl�aire disponible"); + if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouv� un objet utilisable"); + if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouv�"); + if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouv�"); + if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouv�"); + if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouv�"); + if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouv�"); + if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouv�"); + if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouv�"); + if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission termin�e >>>"); + if ( num == INFO_LOST ) strcpy(text, "<<< D�sol�, mission �chou�e >>>"); + if ( num == INFO_LOSTq ) strcpy(text, "<<< D�sol�, mission �chou�e >>>"); + if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectu�"); if ( num == INFO_DELETEPATH ) strcpy(text, "Indicateur atteint"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touche"); - if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touche"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Gupe mortellement touche"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touch"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Araigne mortellement touche"); + if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touch�e"); + if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touch�e"); + if ( num == INFO_DELETEBEE ) strcpy(text, "Gu�pe mortellement touch�e"); + if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touch�"); + if ( num == INFO_DELETESPIDER ) strcpy(text, "Araign�e mortellement touch�e"); if ( num == INFO_BEGINSATCOM ) strcpy(text, "Consultez votre SatCom en appuyant sur \\key help;"); } if ( type == RES_CBOT ) { strcpy(text, "Erreur"); - if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenthse ouvrante"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenthse fermante"); - if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit tre un boolean"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non dclare"); + if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenth�se ouvrante"); + if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenth�se fermante"); + if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit �tre un boolean"); + if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non d�clar�e"); if ( num == TX_BADLEFT ) strcpy(text, "Assignation impossible"); - if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouv"); + if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouv�"); if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" hors d'un bloc ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Instructions aprs la fin"); + if ( num == TX_NOTERM ) strcpy(text, "Instructions apr�s la fin"); if ( num == TX_CLOSEBLK ) strcpy(text, "Il manque la fin du bloc"); if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" sans ""if"" correspondant"); - if ( num == TX_OPENBLK ) strcpy(text, "Dbut d'un bloc attendu"); - if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de rsultat pour l'assignation"); - if ( num == TX_REDEFVAR ) strcpy(text, "Redfinition d'une variable"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux oprandes ne sont pas de types compatibles"); + if ( num == TX_OPENBLK ) strcpy(text, "D�but d'un bloc attendu"); + if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de r�sultat pour l'assignation"); + if ( num == TX_REDEFVAR ) strcpy(text, "Red�finition d'une variable"); + if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux op�randes ne sont pas de types compatibles"); if ( num == TX_UNDEFCALL ) strcpy(text, "Routine inconnue"); - if ( num == TX_MISDOTS ) strcpy(text, "Sparateur "" : "" attendu"); + if ( num == TX_MISDOTS ) strcpy(text, "S�parateur "" : "" attendu"); if ( num == TX_WHILE ) strcpy(text, "Manque le mot ""while"""); if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" en dehors d'une boucle"); if ( num == TX_LABEL ) strcpy(text, "Un label ne peut se placer que devant un ""for"", un ""while"", un ""do"" ou un ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "Cette tiquette n'existe pas"); + if ( num == TX_NOLABEL ) strcpy(text, "Cette �tiquette n'existe pas"); if ( num == TX_NOCASE ) strcpy(text, "Manque une instruction ""case"""); if ( num == TX_BADNUM ) strcpy(text, "Un nombre est attendu"); - if ( num == TX_VOID ) strcpy(text, "Paramtre void"); - if ( num == TX_NOTYP ) strcpy(text, "Dclaration de type attendu"); + if ( num == TX_VOID ) strcpy(text, "Param�tre void"); + if ( num == TX_NOTYP ) strcpy(text, "D�claration de type attendu"); if ( num == TX_NOVAR ) strcpy(text, "Nom d'une variable attendu"); if ( num == TX_NOFONC ) strcpy(text, "Nom de la fonction attendu"); - if ( num == TX_OVERPARAM ) strcpy(text, "Trop de paramtres"); - if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe dj"); - if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de paramtres"); - if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramtre(s)"); - if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de paramtres"); - if ( num == TX_NOITEM ) strcpy(text, "Cet lment n'existe pas dans cette classe"); + if ( num == TX_OVERPARAM ) strcpy(text, "Trop de param�tres"); + if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe d�j�"); + if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de param�tres"); + if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de param�tre(s)"); + if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de param�tres"); + if ( num == TX_NOITEM ) strcpy(text, "Cet �l�ment n'existe pas dans cette classe"); if ( num == TX_DOT ) strcpy(text, "L'objet n'est pas une instance d'une classe"); - if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur appropri"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe dj"); + if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur appropri�"); + if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe d�j�"); if ( num == TX_CLBRK ) strcpy(text, """ ] "" attendu"); - if ( num == TX_RESERVED ) strcpy(text, "Ce mot est rserv"); + if ( num == TX_RESERVED ) strcpy(text, "Ce mot est r�serv�"); if ( num == TX_BADNEW ) strcpy(text, "Mauvais argument pour ""new"""); if ( num == TX_OPBRK ) strcpy(text, """ [ "" attendu"); - if ( num == TX_BADSTRING ) strcpy(text, "Une chane de caractre est attendue"); + if ( num == TX_BADSTRING ) strcpy(text, "Une cha�ne de caract�re est attendue"); if ( num == TX_BADINDEX ) strcpy(text, "Mauvais type d'index"); - if ( num == TX_PRIVATE ) strcpy(text, "Elment protg"); + if ( num == TX_PRIVATE ) strcpy(text, "El�ment prot�g�"); if ( num == TX_NOPUBLIC ) strcpy(text, "Public requis"); - if ( num == TX_DIVZERO ) strcpy(text, "Division par zro"); - if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialise"); - if ( num == TX_BADTHROW ) strcpy(text, "Valeur ngative refuse pour ""throw"""); - if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourn de rsultat"); - if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en excution"); + if ( num == TX_DIVZERO ) strcpy(text, "Division par z�ro"); + if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialis�e"); + if ( num == TX_BADTHROW ) strcpy(text, "Valeur n�gative refus�e pour ""throw"""); + if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourn� de r�sultat"); + if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en ex�cution"); if ( num == TX_NOCALL ) strcpy(text, "Appel d'une fonction inexistante"); if ( num == TX_NOCLASS ) strcpy(text, "Cette classe n'existe pas"); if ( num == TX_NULLPT ) strcpy(text, "Objet n'existe pas"); - if ( num == TX_OPNAN ) strcpy(text, "Opration sur un ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Accs hors du tableau"); - if ( num == TX_STACKOVER ) strcpy(text, "Dbordement de la pile"); + if ( num == TX_OPNAN ) strcpy(text, "Op�ration sur un ""nan"""); + if ( num == TX_OUTARRAY ) strcpy(text, "Acc�s hors du tableau"); + if ( num == TX_STACKOVER ) strcpy(text, "D�bordement de la pile"); if ( num == TX_DELETEDPT ) strcpy(text, "Objet inaccessible"); if ( num == TX_FILEOPEN ) strcpy(text, "Ouverture du fichier impossible"); if ( num == TX_NOTOPEN ) strcpy(text, "Le fichier n'est pas ouvert"); - if ( num == TX_ERRREAD ) strcpy(text, "Erreur la lecture"); - if ( num == TX_ERRWRITE ) strcpy(text, "Erreur l'criture"); + if ( num == TX_ERRREAD ) strcpy(text, "Erreur � la lecture"); + if ( num == TX_ERRWRITE ) strcpy(text, "Erreur � l'�criture"); } if ( type == RES_KEY ) { if ( num == 0 ) strcpy(text, "< aucune >"); - if ( num == VK_LEFT ) strcpy(text, "Flche Gauche"); - if ( num == VK_RIGHT ) strcpy(text, "Flche Droite"); - if ( num == VK_UP ) strcpy(text, "Flche Haut"); - if ( num == VK_DOWN ) strcpy(text, "Flche Bas"); - if ( num == VK_CANCEL ) strcpy(text, "Control-break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_RETURN ) strcpy(text, "Entre"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Espace"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Select"); - if ( num == VK_EXECUTE ) strcpy(text, "Execute"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Help"); - if ( num == VK_LWIN ) strcpy(text, "Left Windows"); - if ( num == VK_RWIN ) strcpy(text, "Right Windows"); - if ( num == VK_APPS ) strcpy(text, "Application key"); - if ( num == VK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == VK_ADD ) strcpy(text, "NumPad +"); - if ( num == VK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == VK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == VK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == VK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Play"); - if ( num == VK_ZOOM ) strcpy(text, "Zoom"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_BUTTON1 ) strcpy(text, "Bouton 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Bouton 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Bouton 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Bouton 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Bouton 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Bouton 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Bouton 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Bouton 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Bouton 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Bouton 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Bouton 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Bouton 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Bouton 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Bouton 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Bouton 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Bouton 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Bouton 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Bouton 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Bouton 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Bouton 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Bouton 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Bouton 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Bouton 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Bouton 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Bouton 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Bouton 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Bouton 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Bouton 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Bouton 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Bouton 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Bouton 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Bouton 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Molette haut"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Molette bas"); + if ( num == SDLK_LEFT ) strcpy(text, "Fl�che Gauche"); + if ( num == SDLK_RIGHT ) strcpy(text, "Fl�che Droite"); + if ( num == SDLK_UP ) strcpy(text, "Fl�che Haut"); + if ( num == SDLK_DOWN ) strcpy(text, "Fl�che Bas"); + if ( num == SDLK_CANCEL ) strcpy(text, "Control-break"); + if ( num == SDLK_BACK ) strcpy(text, "<--"); + if ( num == SDLK_TAB ) strcpy(text, "Tab"); + if ( num == SDLK_CLEAR ) strcpy(text, "Clear"); + if ( num == SDLK_RETURN ) strcpy(text, "Entr�e"); + if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); + if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); + if ( num == SDLK_MENU ) strcpy(text, "Alt"); + if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); + if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); + if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); + if ( num == SDLK_SPACE ) strcpy(text, "Espace"); + if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); + if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); + if ( num == SDLK_END ) strcpy(text, "End"); + if ( num == SDLK_HOME ) strcpy(text, "Home"); + if ( num == SDLK_SELECT ) strcpy(text, "Select"); + if ( num == SDLK_EXECUTE ) strcpy(text, "Execute"); + if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); + if ( num == SDLK_INSERT ) strcpy(text, "Insert"); + if ( num == SDLK_DELETE ) strcpy(text, "Delete"); + if ( num == SDLK_HELP ) strcpy(text, "Help"); + if ( num == SDLK_LWIN ) strcpy(text, "Left Windows"); + if ( num == SDLK_RWIN ) strcpy(text, "Right Windows"); + if ( num == SDLK_APPS ) strcpy(text, "Application key"); + if ( num == SDLK_NUMPAD0 ) strcpy(text, "NumPad 0"); + if ( num == SDLK_NUMPAD1 ) strcpy(text, "NumPad 1"); + if ( num == SDLK_NUMPAD2 ) strcpy(text, "NumPad 2"); + if ( num == SDLK_NUMPAD3 ) strcpy(text, "NumPad 3"); + if ( num == SDLK_NUMPAD4 ) strcpy(text, "NumPad 4"); + if ( num == SDLK_NUMPAD5 ) strcpy(text, "NumPad 5"); + if ( num == SDLK_NUMPAD6 ) strcpy(text, "NumPad 6"); + if ( num == SDLK_NUMPAD7 ) strcpy(text, "NumPad 7"); + if ( num == SDLK_NUMPAD8 ) strcpy(text, "NumPad 8"); + if ( num == SDLK_NUMPAD9 ) strcpy(text, "NumPad 9"); + if ( num == SDLK_MULTIPLY ) strcpy(text, "NumPad *"); + if ( num == SDLK_ADD ) strcpy(text, "NumPad +"); + if ( num == SDLK_SEPARATOR ) strcpy(text, "NumPad sep"); + if ( num == SDLK_SUBTRACT ) strcpy(text, "NumPad -"); + if ( num == SDLK_DECIMAL ) strcpy(text, "NumPad ."); + if ( num == SDLK_DIVIDE ) strcpy(text, "NumPad /"); + if ( num == SDLK_F1 ) strcpy(text, "F1"); + if ( num == SDLK_F2 ) strcpy(text, "F2"); + if ( num == SDLK_F3 ) strcpy(text, "F3"); + if ( num == SDLK_F4 ) strcpy(text, "F4"); + if ( num == SDLK_F5 ) strcpy(text, "F5"); + if ( num == SDLK_F6 ) strcpy(text, "F6"); + if ( num == SDLK_F7 ) strcpy(text, "F7"); + if ( num == SDLK_F8 ) strcpy(text, "F8"); + if ( num == SDLK_F9 ) strcpy(text, "F9"); + if ( num == SDLK_F10 ) strcpy(text, "F10"); + if ( num == SDLK_F11 ) strcpy(text, "F11"); + if ( num == SDLK_F12 ) strcpy(text, "F12"); + if ( num == SDLK_F13 ) strcpy(text, "F13"); + if ( num == SDLK_F14 ) strcpy(text, "F14"); + if ( num == SDLK_F15 ) strcpy(text, "F15"); + if ( num == SDLK_F16 ) strcpy(text, "F16"); + if ( num == SDLK_F17 ) strcpy(text, "F17"); + if ( num == SDLK_F18 ) strcpy(text, "F18"); + if ( num == SDLK_F19 ) strcpy(text, "F19"); + if ( num == SDLK_F20 ) strcpy(text, "F20"); + if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); + if ( num == SDLK_SCROLL ) strcpy(text, "Scroll"); + if ( num == SDLK_ATTN ) strcpy(text, "Attn"); + if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); + if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); + if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); + if ( num == SDLK_PLAY ) strcpy(text, "Play"); + if ( num == SDLK_ZOOM ) strcpy(text, "Zoom"); + if ( num == SDLK_PA1 ) strcpy(text, "PA1"); + if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Clear"); + if ( num == SDLK_BUTTON1 ) strcpy(text, "Bouton 1"); + if ( num == SDLK_BUTTON2 ) strcpy(text, "Bouton 2"); + if ( num == SDLK_BUTTON3 ) strcpy(text, "Bouton 3"); + if ( num == SDLK_BUTTON4 ) strcpy(text, "Bouton 4"); + if ( num == SDLK_BUTTON5 ) strcpy(text, "Bouton 5"); + if ( num == SDLK_BUTTON6 ) strcpy(text, "Bouton 6"); + if ( num == SDLK_BUTTON7 ) strcpy(text, "Bouton 7"); + if ( num == SDLK_BUTTON8 ) strcpy(text, "Bouton 8"); + if ( num == SDLK_BUTTON9 ) strcpy(text, "Bouton 9"); + if ( num == SDLK_BUTTON10 ) strcpy(text, "Bouton 10"); + if ( num == SDLK_BUTTON11 ) strcpy(text, "Bouton 11"); + if ( num == SDLK_BUTTON12 ) strcpy(text, "Bouton 12"); + if ( num == SDLK_BUTTON13 ) strcpy(text, "Bouton 13"); + if ( num == SDLK_BUTTON14 ) strcpy(text, "Bouton 14"); + if ( num == SDLK_BUTTON15 ) strcpy(text, "Bouton 15"); + if ( num == SDLK_BUTTON16 ) strcpy(text, "Bouton 16"); + if ( num == SDLK_BUTTON17 ) strcpy(text, "Bouton 17"); + if ( num == SDLK_BUTTON18 ) strcpy(text, "Bouton 18"); + if ( num == SDLK_BUTTON19 ) strcpy(text, "Bouton 19"); + if ( num == SDLK_BUTTON20 ) strcpy(text, "Bouton 20"); + if ( num == SDLK_BUTTON21 ) strcpy(text, "Bouton 21"); + if ( num == SDLK_BUTTON22 ) strcpy(text, "Bouton 22"); + if ( num == SDLK_BUTTON23 ) strcpy(text, "Bouton 23"); + if ( num == SDLK_BUTTON24 ) strcpy(text, "Bouton 24"); + if ( num == SDLK_BUTTON25 ) strcpy(text, "Bouton 25"); + if ( num == SDLK_BUTTON26 ) strcpy(text, "Bouton 26"); + if ( num == SDLK_BUTTON27 ) strcpy(text, "Bouton 27"); + if ( num == SDLK_BUTTON28 ) strcpy(text, "Bouton 28"); + if ( num == SDLK_BUTTON29 ) strcpy(text, "Bouton 29"); + if ( num == SDLK_BUTTON30 ) strcpy(text, "Bouton 30"); + if ( num == SDLK_BUTTON31 ) strcpy(text, "Bouton 31"); + if ( num == SDLK_BUTTON32 ) strcpy(text, "Bouton 32"); + if ( num == SDLK_WHEELUP ) strcpy(text, "Molette haut"); + if ( num == SDLK_WHEELDOWN ) strcpy(text, "Molette bas"); } #endif @@ -1937,10 +1938,10 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /d"); #endif if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Groes Fenster"); + if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Gro�es Fenster"); if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Reduzieren"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normale Gre"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Schlieen"); + if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normale Gr��e"); + if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Schlie�en"); if ( num == RT_STUDIO_TITLE ) strcpy(text, "Programmeditor"); if ( num == RT_SCRIPT_NEW ) strcpy(text, "Neu"); @@ -1956,7 +1957,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); #endif #if _SCHOOL - if ( num == RT_TITLE_TRAINER ) strcpy(text, "bungen"); + if ( num == RT_TITLE_TRAINER ) strcpy(text, "�bungen"); #else if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmieren"); #endif @@ -1979,7 +1980,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_PLAY_CHAPu ) strcpy(text, " Userlevels:"); if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste der Planeten:"); if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste der bungen des Kapitels:"); + if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste der �bungen des Kapitels:"); if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste der Challenges des Kapitels:"); if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste der Missionen des Planeten:"); if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste der freien Levels des Planeten:"); @@ -1989,9 +1990,9 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_PLAY_RESUME ) strcpy(text, " Zusammenfassung:"); if ( num == RT_SETUP_DEVICE ) strcpy(text, " Driver:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Auflsung:"); + if ( num == RT_SETUP_MODE ) strcpy(text, " Aufl�sung:"); if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Klicken Sie auf die neu zu definierende Taste."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Drcken Sie auf die neue Taste."); + if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Dr�cken Sie auf die neue Taste."); if ( num == RT_PERSO_FACE ) strcpy(text, "Kopf:"); if ( num == RT_PERSO_GLASSES ) strcpy(text, "Brille:"); @@ -2001,43 +2002,43 @@ bool GetResourceBase(ResType type, int num, char* text) #if _NEWLOOK if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie CeeBot schlieen ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlieen\\CeeBot schlieen"); + if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie CeeBot schlie�en ?"); + if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlie�en\\CeeBot schlie�en"); #else if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie COLOBOT schlieen ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlieen\\COLOBOT schlieen"); + if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie COLOBOT schlie�en ?"); + if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlie�en\\COLOBOT schlie�en"); #endif if ( num == RT_DIALOG_ABORT ) strcpy(text, "Mission abbrechen ?"); if ( num == RT_DIALOG_YES ) strcpy(text, "Abbrechen\\Mission abbrechen"); if ( num == RT_DIALOG_NO ) strcpy(text, "Weitermachen\\Mission weitermachen"); if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Weitermachen\\Weitermachen"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Wollen Sie das angewhlte Gebude wirklich zerstren ?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Wollen Sie die gespeicherten Missionen von %s lschen ?"); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Zerstren"); + if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Wollen Sie das angew�hlte Geb�ude wirklich zerst�ren ?"); + if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Wollen Sie die gespeicherten Missionen von %s l�schen ?"); + if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Zerst�ren"); if ( num == RT_DIALOG_NODEL ) strcpy(text, "Abbrechen"); if ( num == RT_DIALOG_LOADING ) strcpy(text, "Laden"); - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Hilfe ber den Begriff (\\key cbot;)"); + if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Hilfe �ber den Begriff (\\key cbot;)"); if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Kompilieren OK (0 Fehler)"); if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programm beendet"); if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Liste der Objekte\n"); if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Liste der Roboter\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes der Gebude\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes der tragbaren Gegenstnde\n"); + if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes der Geb�ude\n"); + if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes der tragbaren Gegenst�nde\n"); if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes der Feinde\n"); if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (keine)\\n;\n"); if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Fehler\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verfgbar !\n"); + if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verf�gbar !\n"); - if ( num == RT_IO_OPEN ) strcpy(text, "ffnen"); + if ( num == RT_IO_OPEN ) strcpy(text, "�ffnen"); if ( num == RT_IO_SAVE ) strcpy(text, "Speichern"); if ( num == RT_IO_LIST ) strcpy(text, "Ordner: %s"); if ( num == RT_IO_NAME ) strcpy(text, "Name:"); if ( num == RT_IO_DIR ) strcpy(text, "In:"); if ( num == RT_IO_PRIVATE ) strcpy(text, "Privat\\Privater Ordner"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "ffentlich\\Gemeinsamer Ordner fr alle Spieler"); + if ( num == RT_IO_PUBLIC ) strcpy(text, "�ffentlich\\Gemeinsamer Ordner f�r alle Spieler"); if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Entwickelt von:"); if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); @@ -2056,17 +2057,17 @@ bool GetResourceBase(ResType type, int num, char* text) { if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Abbrechen"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nchster"); + if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "N�chster"); if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Vorherg."); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Men (\\key quit;)"); + if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Men� (\\key quit;)"); if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Abbrechen"); #if _SCHOOL - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "bungen\\Programmierbungen"); + if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�bungen\\Programmier�bungen"); #else - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmieren\\Programmierbungen"); + if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmieren\\Programmier�bungen"); #endif if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Challenges\\Herausforderungen"); if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missionen\\Aufbruch ins Weltall"); @@ -2074,29 +2075,29 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Freestyle\\Freies Spielen ohne vorgegebenes Ziel"); if ( num == EVENT_INTERFACE_USER ) strcpy(text, "User\\Userlevels"); if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\In Entwicklung befindliche Prototypen"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Anderer Spieler\\Spielername ndern"); + if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Anderer Spieler\\Spielername �ndern"); if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Einstellungen\\Einstellungen"); if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Neu anfangen\\Die Mission von vorne anfangen"); if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Speichern\\Aktuelle Mission speichern"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Laden\\Eine gespeicherte Mission ffnen"); + if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Laden\\Eine gespeicherte Mission �ffnen"); #if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zurck zu CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlieen\\CeeBot schlieen"); + if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zur�ck zu CeeBot"); + if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlie�en\\CeeBot schlie�en"); #else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zurck zu COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlieen\\COLOBOT schlieen"); + if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zur�ck zu COLOBOT"); + if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlie�en\\COLOBOT schlie�en"); #endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Zurck \\Zurck zum Hauptmen"); + if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Zur�ck \\Zur�ck zum Hauptmen�"); if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Spielen ...\\Los geht's"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Bildschirm\\Driver und Bildschirmauflsung"); + if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Bildschirm\\Driver und Bildschirmaufl�sung"); if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafik\\Grafische Einstellungen"); if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Spiel\\Gameplay Einstellungen"); if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Steuerung\\Auswahl der Tasten"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Gerusche\\Lautstrke Gerusche und Musik"); + if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Ger�usche\\Lautst�rke Ger�usche und Musik"); if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Einheit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Auflsung"); + if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Aufl�sung"); if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Vollbildschirm\\Vollbildschirm oder Fenster"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "nderungen ausfhren\\Gettigte Einstellungen ausfhren"); + if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "�nderungen ausf�hren\\Get�tigte Einstellungen ausf�hren"); if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robby\\Ihr Assistent"); if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Schatten\\Schlagschatten auf dem Boden"); @@ -2110,74 +2111,74 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Anzahl Partikel\\Explosionen, Staub, usw."); if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Sichtweite\\Maximale Sichtweite"); if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Details\\Detailliertheit der Objekte in 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualitt der Texturen\\Qualitt der Anzeige"); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Anzahl Ziergegenstnde\\Anzahl Gegenstnde ohne Funktion"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Partikel in den Mens\\Funken und Sterne in den Mens"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Glnzende Tasten\\Glnzende Tasten in den Mens"); + if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit�t der Texturen\\Qualit�t der Anzeige"); + if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Anzahl Ziergegenst�nde\\Anzahl Gegenst�nde ohne Funktion"); + if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Partikel in den Men�s\\Funken und Sterne in den Men�s"); + if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Gl�nzende Tasten\\Gl�nzende Tasten in den Men�s"); if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Hilfsblasen\\Hilfsblasen"); if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Filme\\Filme vor und nach den Missionen"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Zurcksetzen \\Kleine Show beim Zurcksetzen in den bungen"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen beschdigt."); + if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Zur�cksetzen \\Kleine Show beim Zur�cksetzen in den �bungen"); + if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen besch�digt."); if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht"); if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Umkehr X\\Umkehr der Kameradrehung X-Achse"); if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Umkehr Y\\Umkehr der Kameradrehung Y-Achse"); if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Beben bei Explosionen\\Die Kamera bebt bei Explosionen"); if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Schatten unter der Maus\\Ein Schatten erscheint unter der Maus"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatisches Einrcken\\Beim Bearbeiten der Programme"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Einrcken mit 4 Leerstellen\\Einrcken mit 2 oder 4 Leerstellen"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Lsung zugnglich\\Die Lsung ist im Programmslot \"4: Lsung\" zugnglich"); + if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatisches Einr�cken\\Beim Bearbeiten der Programme"); + if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Einr�cken mit 4 Leerstellen\\Einr�cken mit 2 oder 4 Leerstellen"); + if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "L�sung zug�nglich\\Die L�sung ist im Programmslot \"4: L�sung\" zug�nglich"); - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Alles zurcksetzen\\Standarddefinition aller Tasten"); + if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Alles zur�cksetzen\\Standarddefinition aller Tasten"); if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Drehung nach links\\Steuer links"); if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Drehung nach rechts\\Steuer rechts"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Vorwrts\\Bewegung nach vorne"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Rckwrts\\Bewegung nach hinten"); + if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Vorw�rts\\Bewegung nach vorne"); + if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "R�ckw�rts\\Bewegung nach hinten"); if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Steigen\\Leistung des Triebwerks steigern"); if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Sinken\\Leistung des Triebwerks drosseln"); if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Andere Kamera\\Sichtpunkt einstellen"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Vorherg. Auswahl\\Das vorhergehende Objekt auswhlen"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardhandlung\\Fhrt die Standardhandlung des Roboters aus."); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera nher\\Bewegung der Kamera vorwrts"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera weiter\\Bewegung der Kamera rckwrts"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nchstes auswhlen\\Nchstes Objekt auswhlen"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Astronauten auswhlen\\Astronauten auswhlen"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Mission verlassen\\Eine Mission oder bung verlassen"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Anweisungen\\Anweisungen fr die Mission oder bung"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Hilfe CBOT-Sprache\\Hilfe ber die Programmiersprache CBOT"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Hilfe ber Begriff\\Hilfe ber einen Begriff"); + if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Vorherg. Auswahl\\Das vorhergehende Objekt ausw�hlen"); + if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardhandlung\\F�hrt die Standardhandlung des Roboters aus."); + if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera n�her\\Bewegung der Kamera vorw�rts"); + if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera weiter\\Bewegung der Kamera r�ckw�rts"); + if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "N�chstes ausw�hlen\\N�chstes Objekt ausw�hlen"); + if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Astronauten ausw�hlen\\Astronauten ausw�hlen"); + if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Mission verlassen\\Eine Mission oder �bung verlassen"); + if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Anweisungen\\Anweisungen f�r die Mission oder �bung"); + if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Hilfe CBOT-Sprache\\Hilfe �ber die Programmiersprache CBOT"); + if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Hilfe �ber Begriff\\Hilfe �ber einen Begriff"); if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Ort der Meldung\\Zeigt den Ort, von dem die letzte Meldung stammt"); if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Geschwindigkeit 1.0x\\Normale Spielgeschwindigkeit"); if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Geschwindigkeit 1.5x\\Spielgeschwindigkeit anderthalb Mal schneller"); if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Geschwindigkeit 2.0x\\Spielgeschwindigkeit doppelt so schnell"); if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Geschwindigkeit 3.0x\\Spielgeschwindigkeit drei Mal schneller"); - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Gerusche:\\Lautstrke Motoren, Stimmen, usw."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Geruschkulisse:\\Lautstrke der Soundtracks der CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D-Gerusche\\Orten der Gerusche im Raum"); + if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Ger�usche:\\Lautst�rke Motoren, Stimmen, usw."); + if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Ger�uschkulisse:\\Lautst�rke der Soundtracks der CD"); + if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D-Ger�usche\\Orten der Ger�usche im Raum"); - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Min.\\Minimale Qualitt (groes Framerate)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Standardqualitt"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Max.\\Beste Qualitt (niedriges Framerate)"); + if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Min.\\Minimale Qualit�t (gro�es Framerate)"); + if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Standardqualit�t"); + if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Max.\\Beste Qualit�t (niedriges Framerate)"); - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Kein Ton\\Keine Gerusche und Geruschkulisse"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normale Lautstrke"); + if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Kein Ton\\Keine Ger�usche und Ger�uschkulisse"); + if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normale Lautst�rke"); if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Joystick\\Joystick oder Tastatur"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Zeigt die Lsung\\Zeigt nach 3mal Scheitern die Lsung"); + if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Zeigt die L�sung\\Zeigt nach 3mal Scheitern die L�sung"); if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Name des Spielers"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Spieler auswhlen"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Abbrechen\\Behlt den bisherigen Spieler bei"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Spieler lschen\\Lscht den Spieler aus der Liste"); + if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Spieler ausw�hlen"); + if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Abbrechen\\Beh�lt den bisherigen Spieler bei"); + if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Spieler l�schen\\L�scht den Spieler aus der Liste"); if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Name "); if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Speichern\\Speichert die Mission"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Laden\\ffnet eine gespeicherte Mission"); + if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Laden\\�ffnet eine gespeicherte Mission"); if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste der gespeicherten Missionen"); if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Dateiname:"); if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Name der Mission"); if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Ansicht der Mission"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Lschen\\Lscht die gespeicherte Mission"); + if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "L�schen\\L�scht die gespeicherte Mission"); if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aussehen\\Erscheinungsbild des Astronauten einstellen"); if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); @@ -2188,10 +2189,10 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Drehung links"); if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Drehung rechts"); if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rot"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Grn"); + if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Gr�n"); if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Blau"); if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Rot"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Grn"); + if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Gr�n"); if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Blau"); if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Kopf 1"); if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Kopf 4"); @@ -2207,8 +2208,8 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Vorherg. Auwahl (\\key desel;)"); if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Drehung links (\\key left;)"); if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Drehung rechts (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Vorwrts (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Rckwrts (\\key down;)"); + if ( num == EVENT_OBJECT_UP ) strcpy(text, "Vorw�rts (\\key up;)"); + if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "R�ckw�rts (\\key down;)"); if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Steigt (\\key gup;)"); if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Sinkt (\\key gdown;)"); if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Nehmen oder hinlegen (\\key action;)"); @@ -2216,14 +2217,14 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..vorne"); if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..hinten"); if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..Batterie"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Anweisungen ber die Mission(\\key help;)"); + if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Anweisungen �ber die Mission(\\key help;)"); if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Abheben nach vollbrachter Mission"); if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Baut einen Bohrturm"); if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Baut ein Kraftwerk"); if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Baut eine Roboterfabrik"); if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Baut ein Reparaturzentrum"); if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Baut einen Konverter"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Baut einen Geschtzturm"); + if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Baut einen Gesch�tzturm"); if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Baut ein Forschungszentrum"); if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Baut ein Radar"); if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Baut eine Batteriefabrik"); @@ -2236,7 +2237,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Sammelt die Fahne ein"); if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Blaue Fahne"); if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Rote Fahne"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Grne Fahne"); + if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Gr�ne Fahne"); if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Gelbe Fahne"); if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Violette Fahne"); if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Baut einen Jettransporter"); @@ -2251,10 +2252,10 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Baut einen Kettenorgashooter"); if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Baut einen Radorgashooter"); if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Baut einen Krabbelorgashooter"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Baut einen Jetschnffler"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Baut einen Kettenschnffler"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Baut einen Radschnffler"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Baut einen Krabbelschnffler"); + if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Baut einen Jetschn�ffler"); + if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Baut einen Kettenschn�ffler"); + if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Baut einen Radschn�ffler"); + if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Baut einen Krabbelschn�ffler"); if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Baut einen Stampfer"); if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Baut einen Phazershooter"); if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Baut einen Recycler"); @@ -2264,26 +2265,26 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Forschungsprogramm Jetantrieb"); if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Forschungsprogramm Stampfer"); if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Forschungsprogramm Shooterkanone"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Forschungsprogramm Geschtzturm"); + if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Forschungsprogramm Gesch�tzturm"); if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Forschungsprogramm Phazerkanone"); if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Forschungsprogramm Schutzschild"); if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Forschungsprogramm Brennstoffzelle"); if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Forschungsprogramm Krabbelantrieb"); if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Forschungsprogramm Orgashooterkanone"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Alles zurcksetzen"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Schnffeln (\\key action;)"); + if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Alles zur�cksetzen"); + if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Schn�ffeln (\\key action;)"); if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Stampfen (\\key action;)"); if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Feuer (\\key action;)"); if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recyceln (\\key action;)"); if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Schutzschild ausfahren (\\key action;)"); if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Schutzschild einholen (\\key action;)"); if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Reichweite Schutzschild"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Gewhltes Programm ausfhren"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Gewhltes Programm bearbeiten"); + if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Gew�hltes Programm ausf�hren"); + if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Gew�hltes Programm bearbeiten"); if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\SatCom in Standby"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Gebude sprengen"); + if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Geb�ude sprengen"); if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energievorrat"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Schden"); + if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Sch�den"); if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Triebwerktemperatur"); if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Prozess im Gang ..."); if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Anzahl erfasster Insekten"); @@ -2294,10 +2295,10 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)"); if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Kamera links"); if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Kamera rechts"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Kamera nher"); + if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Kamera n�her"); if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Kamera weiter weg"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Anweisungen ber das ausgewhlte Objekt"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Zeigt die Lsung"); + if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Anweisungen �ber das ausgew�hlte Objekt"); + if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Zeigt die L�sung"); if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Anzeige Roboter <-> Bauten"); if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Zeigt die Reichweite"); if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Bleistift abheben"); @@ -2307,7 +2308,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Roten Bleistift hinunterlassen"); if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Violetten Bleistift hinunterlassen"); if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Blauen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Grnen Bleistift hinunterlassen"); + if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Gr�nen Bleistift hinunterlassen"); if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Braunen Bleistift hinunterlassen"); if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Aufnahme starten"); if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Aufnahme stoppen"); @@ -2321,37 +2322,37 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_SPEED ) strcpy(text, "Spielgeschwindigkeit"); if ( num == EVENT_HYPER_PREV ) strcpy(text, "Vorherg. Seite"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Nchste Seite"); + if ( num == EVENT_HYPER_NEXT ) strcpy(text, "N�chste Seite"); if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home"); if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopieren"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Gre 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Gre 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Gre 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Gre 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Gre 5"); + if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Gr��e 1"); + if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Gr��e 2"); + if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Gr��e 3"); + if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Gr��e 4"); + if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Gr��e 5"); if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Anweisungen von Houston"); #if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Wrterbuch Englisch-Deutsch"); + if ( num == EVENT_SATCOM_SAT ) strcpy(text, "W�rterbuch Englisch-Deutsch"); #else if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Satellitenbericht"); #endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Von Houston bermittelte Programme"); + if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Von Houston �bermittelte Programme"); if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste der Objekte"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Hilfe ber Programmieren"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Lsung"); + if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Hilfe �ber Programmieren"); + if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "L�sung"); if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Programm kompilieren"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Abbrechen\\Editor schlieen"); + if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Abbrechen\\Editor schlie�en"); if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Neu"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "ffnen (Ctrl+o)"); + if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "�ffnen (Ctrl+o)"); if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Speichern (Ctrl+s)"); if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Widerrufen (Ctrl+z)"); if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Ausschneiden (Ctrl+x)"); if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopieren (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Einfgen (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Zeichengre"); + if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Einf�gen (Ctrl+v)"); + if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Zeichengr��e"); if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Anweisungen (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Hilfe ber Programmieren (\\key prog;)"); + if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Hilfe �ber Programmieren (\\key prog;)"); if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompilieren"); if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Start/Stop"); if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/Weitermachen"); @@ -2360,7 +2361,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( type == RES_OBJECT ) { - if ( num == OBJECT_PORTICO ) strcpy(text, "Trger"); + if ( num == OBJECT_PORTICO ) strcpy(text, "Tr�ger"); if ( num == OBJECT_BASE ) strcpy(text, "Raumschiff"); if ( num == OBJECT_DERRICK ) strcpy(text, "Bohrturm"); if ( num == OBJECT_FACTORY ) strcpy(text, "Roboterfabrik"); @@ -2368,13 +2369,13 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_DESTROYER ) strcpy(text, "Einstampfer"); if ( num == OBJECT_STATION ) strcpy(text, "Kraftwerk"); if ( num == OBJECT_CONVERT ) strcpy(text, "Konverter Erz-Titan"); - if ( num == OBJECT_TOWER ) strcpy(text, "Geschtzturm"); + if ( num == OBJECT_TOWER ) strcpy(text, "Gesch�tzturm"); if ( num == OBJECT_NEST ) strcpy(text, "Orgastoffquelle"); if ( num == OBJECT_RESEARCH ) strcpy(text, "Forschungszentrum"); if ( num == OBJECT_RADAR ) strcpy(text, "Radar"); if ( num == OBJECT_INFO ) strcpy(text, "Infoserver"); #if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Auflser"); + if ( num == OBJECT_ENERGY ) strcpy(text, "Aufl�ser"); #else if ( num == OBJECT_ENERGY ) strcpy(text, "Batteriefabrik"); #endif @@ -2385,8 +2386,8 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_HUSTON ) strcpy(text, "Kontrollzentrum"); if ( num == OBJECT_TARGET1 ) strcpy(text, "Zielscheibe"); if ( num == OBJECT_TARGET2 ) strcpy(text, "Zielscheibe"); - if ( num == OBJECT_START ) strcpy(text, "Startflche"); - if ( num == OBJECT_END ) strcpy(text, "Zielflche"); + if ( num == OBJECT_START ) strcpy(text, "Startfl�che"); + if ( num == OBJECT_END ) strcpy(text, "Zielfl�che"); if ( num == OBJECT_STONE ) strcpy(text, "Titanerz"); if ( num == OBJECT_URANIUM ) strcpy(text, "Platinerz"); if ( num == OBJECT_BULLET ) strcpy(text, "Orgastoff"); @@ -2394,30 +2395,30 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_POWER ) strcpy(text, "Elektrolytische Batterie"); if ( num == OBJECT_ATOMIC ) strcpy(text, "Brennstoffzelle"); if ( num == OBJECT_BBOX ) strcpy(text, "Flugschreiber"); - if ( num == OBJECT_KEYa ) strcpy(text, "Schlssel A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Schlssel B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Schlssel C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Schlssel D"); + if ( num == OBJECT_KEYa ) strcpy(text, "Schl�ssel A"); + if ( num == OBJECT_KEYb ) strcpy(text, "Schl�ssel B"); + if ( num == OBJECT_KEYc ) strcpy(text, "Schl�ssel C"); + if ( num == OBJECT_KEYd ) strcpy(text, "Schl�ssel D"); if ( num == OBJECT_TNT ) strcpy(text, "Sprengstoff"); if ( num == OBJECT_BOMB ) strcpy(text, "Landmine"); - if ( num == OBJECT_BAG ) strcpy(text, "berlebenskit"); + if ( num == OBJECT_BAG ) strcpy(text, "�berlebenskit"); if ( num == OBJECT_WAYPOINT ) strcpy(text, "Checkpoint"); if ( num == OBJECT_FLAGb ) strcpy(text, "Blaue Fahne"); if ( num == OBJECT_FLAGr ) strcpy(text, "Rote Fahne"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Grne Fahne"); + if ( num == OBJECT_FLAGg ) strcpy(text, "Gr�ne Fahne"); if ( num == OBJECT_FLAGy ) strcpy(text, "Gelbe Fahne"); if ( num == OBJECT_FLAGv ) strcpy(text, "Violette Fahne"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Markierung fr unterirdische Energiequelle"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Markierung fr unterirdisches Platinvorkommen"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Markierung fr vergrabenen Schlssel A"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Markierung fr vergrabenen Schlssel B"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Markierung fr vergrabenen Schlssel C"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Markierung fr vergrabenen Schlssel D"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Markierung fr unterirdisches Titanvorkommen"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "bungsroboter"); + if ( num == OBJECT_MARKPOWER ) strcpy(text, "Markierung f�r unterirdische Energiequelle"); + if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Markierung f�r unterirdisches Platinvorkommen"); + if ( num == OBJECT_MARKKEYa ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel A"); + if ( num == OBJECT_MARKKEYb ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel B"); + if ( num == OBJECT_MARKKEYc ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel C"); + if ( num == OBJECT_MARKKEYd ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel D"); + if ( num == OBJECT_MARKSTONE ) strcpy(text, "Markierung f�r unterirdisches Titanvorkommen"); + if ( num == OBJECT_MOBILEft ) strcpy(text, "�bungsroboter"); + if ( num == OBJECT_MOBILEtt ) strcpy(text, "�bungsroboter"); + if ( num == OBJECT_MOBILEwt ) strcpy(text, "�bungsroboter"); + if ( num == OBJECT_MOBILEit ) strcpy(text, "�bungsroboter"); if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter"); if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter"); if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter"); @@ -2430,10 +2431,10 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_MOBILEti ) strcpy(text, "OrgaShooter"); if ( num == OBJECT_MOBILEwi ) strcpy(text, "OrgaShooter"); if ( num == OBJECT_MOBILEii ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Schnffler"); + if ( num == OBJECT_MOBILEfs ) strcpy(text, "Schn�ffler"); + if ( num == OBJECT_MOBILEts ) strcpy(text, "Schn�ffler"); + if ( num == OBJECT_MOBILEws ) strcpy(text, "Schn�ffler"); + if ( num == OBJECT_MOBILEis ) strcpy(text, "Schn�ffler"); if ( num == OBJECT_MOBILErt ) strcpy(text, "Stampfer"); if ( num == OBJECT_MOBILErc ) strcpy(text, "Phazershooter"); if ( num == OBJECT_MOBILErr ) strcpy(text, "Recycler"); @@ -2444,7 +2445,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); if ( num == OBJECT_TECH ) strcpy(text, "Techniker"); if ( num == OBJECT_TOTO ) strcpy(text, "Robby"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Insektenknigin"); + if ( num == OBJECT_MOTHER ) strcpy(text, "Insektenk�nigin"); if ( num == OBJECT_ANT ) strcpy(text, "Ameise"); if ( num == OBJECT_SPIDER ) strcpy(text, "Spinne"); if ( num == OBJECT_BEE ) strcpy(text, "Wespe"); @@ -2456,17 +2457,17 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Roboterwrack"); if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Roboterwrack"); if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Gebuderuine"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Gebuderuine"); + if ( num == OBJECT_RUINfactory ) strcpy(text, "Geb�uderuine"); + if ( num == OBJECT_RUINdoor ) strcpy(text, "Geb�uderuine"); if ( num == OBJECT_RUINsupport ) strcpy(text, "Abfall"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Gebuderuine"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Gebuderuine"); + if ( num == OBJECT_RUINradar ) strcpy(text, "Geb�uderuine"); + if ( num == OBJECT_RUINconvert ) strcpy(text, "Geb�uderuine"); if ( num == OBJECT_RUINbase ) strcpy(text, "Raumschiffruine"); if ( num == OBJECT_RUINhead ) strcpy(text, "Raumschiffruine"); if ( num == OBJECT_APOLLO1 || num == OBJECT_APOLLO3 || num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "berreste einer Apollo-Mission"); + num == OBJECT_APOLLO5 ) strcpy(text, "�berreste einer Apollo-Mission"); if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); } @@ -2482,34 +2483,34 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == ERR_NOCD ) strcpy(text, "Legen Sie die COLOBOT-CD ein\nund starten Sie das Spiel neu."); #endif if ( num == ERR_MANIP_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Trgt schon etwas"); + if ( num == ERR_MANIP_FLY ) strcpy(text, "Im Flug unm�glich"); + if ( num == ERR_MANIP_BUSY ) strcpy(text, "Tr�gt schon etwas"); if ( num == ERR_MANIP_NIL ) strcpy(text, "Nichts zu ergreifen"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "In Fahrt unmglich"); + if ( num == ERR_MANIP_MOTOR ) strcpy(text, "In Fahrt unm�glich"); if ( num == ERR_MANIP_OCC ) strcpy(text, "Stelle schon besetzt"); if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Kein anderer Roboter"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Sie knnen keinen radioaktiven Gegenstand tragen"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Sie knnen unter Wasser nichts tragen"); + if ( num == ERR_MANIP_RADIO ) strcpy(text, "Sie k�nnen keinen radioaktiven Gegenstand tragen"); + if ( num == ERR_MANIP_WATER ) strcpy(text, "Sie k�nnen unter Wasser nichts tragen"); if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nichts abzulegen"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Unter Wasser unmglich"); + if ( num == ERR_BUILD_FLY ) strcpy(text, "Im Flug unm�glich"); + if ( num == ERR_BUILD_WATER ) strcpy(text, "Unter Wasser unm�glich"); if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Nicht genug Energie"); if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titan zu weit weg"); if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titan zu nahe"); if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Kein Titan vorhanden"); if ( num == ERR_BUILD_FLAT ) strcpy(text, "Boden nicht eben genug"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Ebener Boden nicht gro genug"); + if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Ebener Boden nicht gro� genug"); if ( num == ERR_BUILD_BUSY ) strcpy(text, "Stelle schon besetzt"); if ( num == ERR_BUILD_BASE ) strcpy(text, "Zu nahe am Raumschiff"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Zu nahe an einem Gebude"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "In Fahrt unmglich"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Im Flug unmglich"); + if ( num == ERR_BUILD_NARROW ) strcpy(text, "Zu nahe an einem Geb�ude"); + if ( num == ERR_BUILD_MOTOR ) strcpy(text, "In Fahrt unm�glich"); + if ( num == ERR_SEARCH_FLY ) strcpy(text, "Im Flug unm�glich"); if ( num == ERR_SEARCH_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "In Fahrt unmglich"); + if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "In Fahrt unm�glich"); if ( num == ERR_TERRA_VEH ) strcpy(text, "Roboter ungeeignet"); if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Nicht genug Energie"); if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Boden ungeeignet"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Gebude zu nahe"); + if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Geb�ude zu nahe"); if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Gegenstand zu nahe"); if ( num == ERR_RECOVER_VEH ) strcpy(text, "Roboter ungeeignet"); if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Nicht genug Energie"); @@ -2524,25 +2525,25 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == ERR_GOTO_BUSY ) strcpy(text, "Ziel ist schon besetzt"); if ( num == ERR_FIRE_VEH ) strcpy(text, "Roboter ungeeignet"); if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Im Flug unmglich"); + if ( num == ERR_FIRE_FLY ) strcpy(text, "Im Flug unm�glich"); if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "Keine unterirdische Erzlagersttte"); + if ( num == ERR_DERRICK_NULL ) strcpy(text, "Keine unterirdische Erzlagerst�tte"); if ( num == ERR_STATION_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); if ( num == ERR_TOWER_POWER ) strcpy(text, "Keine Batterie"); if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Keine Energie mehr"); if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Keine Batterie"); if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Nicht mehr genug Energie"); if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Falscher Batterietyp"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Forschungsprogramm schon ausgefhrt"); + if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Forschungsprogramm schon ausgef�hrt"); if ( num == ERR_ENERGY_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); if ( num == ERR_ENERGY_LOW ) strcpy(text, "Noch nicht genug Energie"); if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden"); if ( num == ERR_ENERGY_BAD ) strcpy(text, "Wandelt nur Titanerz um"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Die Tren werden von einem Gegenstand blockiert"); + if ( num == ERR_BASE_DLOCK ) strcpy(text, "Die T�ren werden von einem Gegenstand blockiert"); if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Gehen Sie an Bord, bevor Sie abheben"); if ( num == ERR_LABO_NULL ) strcpy(text, "Nichts zu analysieren"); if ( num == ERR_LABO_BAD ) strcpy(text, "Analysiert nur Orgastoff"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse schon durchgefhrt"); + if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse schon durchgef�hrt"); if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Noch nicht genug Energie"); if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Kein konvertierbares Platin"); @@ -2552,57 +2553,57 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == ERR_RESET_NEAR ) strcpy(text, "Stelle schon besetzt"); if ( num == ERR_INFO_NULL ) strcpy(text, "Kein Infoserver in Reichweite"); if ( num == ERR_VEH_VIRUS ) strcpy(text, "Ein Programm wurde von einem Virus infiziert"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Von Virus infiziert, zeitweise auer Betrieb"); + if ( num == ERR_BAT_VIRUS ) strcpy(text, "Von Virus infiziert, zeitweise au�er Betrieb"); if ( num == ERR_VEH_POWER ) strcpy(text, "Keine Batterie"); if ( num == ERR_VEH_ENERGY ) strcpy(text, "Keine Energie mehr"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Im Wasser unmglich"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Beim Gehen unmglich"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Unmglich wenn Sie etwas tragen"); + if ( num == ERR_FLAG_FLY ) strcpy(text, "Im Flug unm�glich"); + if ( num == ERR_FLAG_WATER ) strcpy(text, "Im Wasser unm�glich"); + if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Beim Gehen unm�glich"); + if ( num == ERR_FLAG_BUSY ) strcpy(text, "Unm�glich wenn Sie etwas tragen"); if ( num == ERR_FLAG_CREATE ) strcpy(text, "Zu viele Fahnen dieser Farbe (Maximum 5)"); if ( num == ERR_FLAG_PROXY ) strcpy(text, "Zu nahe an einer anderen Fahne"); if ( num == ERR_FLAG_DELETE ) strcpy(text, "Keine Fahne in Reichweite"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Mission noch nicht beendet (Drcken Sie auf \\key help; fr weitere Informationen)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Roboter zerstrt"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Gebude zerstrt"); + if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Mission noch nicht beendet (Dr�cken Sie auf \\key help; f�r weitere Informationen)"); + if ( num == ERR_DELETEMOBILE ) strcpy(text, "Roboter zerst�rt"); + if ( num == ERR_DELETEBUILDING ) strcpy(text, "Geb�ude zerst�rt"); if ( num == ERR_TOOMANY ) strcpy(text, "Kein neues Objekt kann erstellt werden (zu viele vorhanden)"); if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Es fehlt \"%s\" in Ihrem Programm"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "In dieser bung verboten"); + if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "In dieser �bung verboten"); - if ( num == INFO_BUILD ) strcpy(text, "Gebude fertiggestellt"); - if ( num == INFO_CONVERT ) strcpy(text, "Titan verfgbar"); + if ( num == INFO_BUILD ) strcpy(text, "Geb�ude fertiggestellt"); + if ( num == INFO_CONVERT ) strcpy(text, "Titan verf�gbar"); if ( num == INFO_RESEARCH ) strcpy(text, "Forschungsprogramm abgeschlossen"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Herstellung eines Roboters mit Kettenantrieb mglich"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Sie knnen jetzt mit den Tasten \\key gup; und \\key gdown; fliegen"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Herstellung eines Stampfers mglich"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Herstellung eines Shooters mglich"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Errichtung eines Geschtzturms mglich"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Herstellung eines Phazershooters mglich"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Herstellung eines Schutzschildes mglich"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Errichtung einer Brennstoffzellenfabrik mglich"); - if ( num == INFO_FACTORY ) strcpy(text, "Neuer Roboter verfgbar"); + if ( num == INFO_RESEARCHTANK ) strcpy(text, "Herstellung eines Roboters mit Kettenantrieb m�glich"); + if ( num == INFO_RESEARCHFLY ) strcpy(text, "Sie k�nnen jetzt mit den Tasten \\key gup; und \\key gdown; fliegen"); + if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Herstellung eines Stampfers m�glich"); + if ( num == INFO_RESEARCHCANON ) strcpy(text, "Herstellung eines Shooters m�glich"); + if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Errichtung eines Gesch�tzturms m�glich"); + if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Herstellung eines Phazershooters m�glich"); + if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Herstellung eines Schutzschildes m�glich"); + if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Errichtung einer Brennstoffzellenfabrik m�glich"); + if ( num == INFO_FACTORY ) strcpy(text, "Neuer Roboter verf�gbar"); if ( num == INFO_LABO ) strcpy(text, "Analyse vollendet"); - if ( num == INFO_ENERGY ) strcpy(text, "Batterie verfgbar"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Brennstoffzelle verfgbar"); + if ( num == INFO_ENERGY ) strcpy(text, "Batterie verf�gbar"); + if ( num == INFO_NUCLEAR ) strcpy(text, "Brennstoffzelle verf�gbar"); if ( num == INFO_FINDING ) strcpy(text, "Sie haben ein brauchbares Objekt gefunden"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Geeignete Stelle fr Kraftwerk gefunden"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); + if ( num == INFO_MARKPOWER ) strcpy(text, "Geeignete Stelle f�r Kraftwerk gefunden"); + if ( num == INFO_MARKURANIUM ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); + if ( num == INFO_MARKSTONE ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); + if ( num == INFO_MARKKEYa ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); + if ( num == INFO_MARKKEYb ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); + if ( num == INFO_MARKKEYc ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); + if ( num == INFO_MARKKEYd ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, Mission vollendet >>>"); if ( num == INFO_LOST ) strcpy(text, "<<< Mission gescheitert >>>"); if ( num == INFO_LOSTq ) strcpy(text, "<<< Mission gescheitert >>>"); if ( num == INFO_WRITEOK ) strcpy(text, "Mission gespeichert"); if ( num == INFO_DELETEPATH ) strcpy(text, "Checkpoint erreicht"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Insektenknigin tdlich verwundet"); - if ( num == INFO_DELETEANT ) strcpy(text, "Ameise tdlich verwundet"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Wespe tdlich verwundet"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Wurm tdlich verwundet"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Spinne tdlich verwundet"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; drcken"); + if ( num == INFO_DELETEMOTHER ) strcpy(text, "Insektenk�nigin t�dlich verwundet"); + if ( num == INFO_DELETEANT ) strcpy(text, "Ameise t�dlich verwundet"); + if ( num == INFO_DELETEBEE ) strcpy(text, "Wespe t�dlich verwundet"); + if ( num == INFO_DELETEWORM ) strcpy(text, "Wurm t�dlich verwundet"); + if ( num == INFO_DELETESPIDER ) strcpy(text, "Spinne t�dlich verwundet"); + if ( num == INFO_BEGINSATCOM ) strcpy(text, "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; dr�cken"); } if ( type == RES_CBOT ) @@ -2612,20 +2613,20 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == TX_CLOSEPAR ) strcpy(text, "Es fehlt eine geschlossene Klammer "")"""); if ( num == TX_NOTBOOL ) strcpy(text, "Der Ausdruck muss einen boolschen Wert ergeben"); if ( num == TX_UNDEFVAR ) strcpy(text, "Variable nicht deklariert"); - if ( num == TX_BADLEFT ) strcpy(text, "Zuweisung unmglich"); + if ( num == TX_BADLEFT ) strcpy(text, "Zuweisung unm�glich"); if ( num == TX_ENDOF ) strcpy(text, "Es fehlt ein Strichpunkt "";"" am Ende der Anweisung"); if ( num == TX_OUTCASE ) strcpy(text, "Anweisung ""case"" ohne vorhergehende Anweisung ""switch"""); if ( num == TX_NOTERM ) strcpy(text, "Hier ist eine Anweisung nach dem Ende des Programms"); if ( num == TX_CLOSEBLK ) strcpy(text, "Es fehlt eine geschlossene geschweifte Klammer ""}"" (Ende des Blocks)"); if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Anweisung ""else"" ohne vorhergehende Anweisung ""if"""); if ( num == TX_OPENBLK ) strcpy(text, "Es fehlt eine offene geschweifte Klammer""{"""); - if ( num == TX_BADTYPE ) strcpy(text, "Der Ausdruck ergibt einen falschen Typ fr die Zuweisung"); + if ( num == TX_BADTYPE ) strcpy(text, "Der Ausdruck ergibt einen falschen Typ f�r die Zuweisung"); if ( num == TX_REDEFVAR ) strcpy(text, "Eine Variable wird zum zweiten Mal deklariert"); if ( num == TX_BAD2TYPE ) strcpy(text, "Die zwei Operanden sind nicht kompatibel"); if ( num == TX_UNDEFCALL ) strcpy(text, "Unbekannte Funktion"); if ( num == TX_MISDOTS ) strcpy(text, "Es fehlt ein Doppelpunkt "" : """); if ( num == TX_WHILE ) strcpy(text, "Es fehlt das Wort ""while"""); - if ( num == TX_BREAK ) strcpy(text, "Anweisung ""break"" auerhalb einer Schleife"); + if ( num == TX_BREAK ) strcpy(text, "Anweisung ""break"" au�erhalb einer Schleife"); if ( num == TX_LABEL ) strcpy(text, "Ein Label kann nur vor den Anweisungen ""for"", ""while"", ""do"" oder ""switch"" vorkommen"); if ( num == TX_NOLABEL ) strcpy(text, "Dieses Label existiert nicht"); if ( num == TX_NOCASE ) strcpy(text, "Es fehlt eine Anweisung ""case"""); @@ -2637,34 +2638,34 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == TX_OVERPARAM ) strcpy(text, "Zu viele Parameter"); if ( num == TX_REDEF ) strcpy(text, "Diese Funktion gibt es schon"); if ( num == TX_LOWPARAM ) strcpy(text, "Nicht genug Parameter"); - if ( num == TX_BADPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertrgt Parameter diesen Typs"); - if ( num == TX_NUMPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertrgt diese Anzahl Parameter"); + if ( num == TX_BADPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertr�gt Parameter diesen Typs"); + if ( num == TX_NUMPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertr�gt diese Anzahl Parameter"); if ( num == TX_NOITEM ) strcpy(text, "Dieses Element gibt es nicht in dieser Klasse"); if ( num == TX_DOT ) strcpy(text, "Das Objekt ist nicht eine Instanz einer Klasse"); if ( num == TX_NOCONST ) strcpy(text, "Es gibt keinen geeigneten Konstruktor"); if ( num == TX_REDEFCLASS ) strcpy(text, "Diese Klasse gibt es schon"); if ( num == TX_CLBRK ) strcpy(text, "Es fehlt eine geschlossene eckige Klammer "" ] """); if ( num == TX_RESERVED ) strcpy(text, "Dieses Wort ist reserviert"); - if ( num == TX_BADNEW ) strcpy(text, "Falsche Argumente fr ""new"""); + if ( num == TX_BADNEW ) strcpy(text, "Falsche Argumente f�r ""new"""); if ( num == TX_OPBRK ) strcpy(text, "Es fehlt eine offene eckige Klammer "" [ """); if ( num == TX_BADSTRING ) strcpy(text, "Hier wird eine Zeichenkette erwartet"); - if ( num == TX_BADINDEX ) strcpy(text, "Falscher Typ fr einen Index"); - if ( num == TX_PRIVATE ) strcpy(text, "Geschtztes Element (private)"); + if ( num == TX_BADINDEX ) strcpy(text, "Falscher Typ f�r einen Index"); + if ( num == TX_PRIVATE ) strcpy(text, "Gesch�tztes Element (private)"); if ( num == TX_NOPUBLIC ) strcpy(text, "Hier muss das Wort ""public"" stehen"); if ( num == TX_DIVZERO ) strcpy(text, "Teilung durch Null"); if ( num == TX_NOTINIT ) strcpy(text, "Der Wert dieser Variable wurde nicht definiert"); - if ( num == TX_BADTHROW ) strcpy(text, "Negativer Wert ungeeignet fr Anweisung ""throw"""); - if ( num == TX_NORETVAL ) strcpy(text, "Die Funktion hat kein Ergebnis zurckgegeben"); - if ( num == TX_NORUN ) strcpy(text, "Keine Funktion wird ausgefhrt"); + if ( num == TX_BADTHROW ) strcpy(text, "Negativer Wert ungeeignet f�r Anweisung ""throw"""); + if ( num == TX_NORETVAL ) strcpy(text, "Die Funktion hat kein Ergebnis zur�ckgegeben"); + if ( num == TX_NORUN ) strcpy(text, "Keine Funktion wird ausgef�hrt"); if ( num == TX_NOCALL ) strcpy(text, "Die aufgerufene Funktion existiert nicht"); if ( num == TX_NOCLASS ) strcpy(text, "Diese Klasse existiert nicht"); if ( num == TX_NULLPT ) strcpy(text, "Das Objekt existiert nicht"); if ( num == TX_OPNAN ) strcpy(text, "Operation mit dem Wert ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Zugriff im Array auerhalb der Grenzen"); + if ( num == TX_OUTARRAY ) strcpy(text, "Zugriff im Array au�erhalb der Grenzen"); if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow"); - if ( num == TX_DELETEDPT ) strcpy(text, "Objekt nicht verfgbar"); - if ( num == TX_FILEOPEN ) strcpy(text, "Die Datei kann nicht geffnet werden"); - if ( num == TX_NOTOPEN ) strcpy(text, "Die Datei wurde nicht geffnet"); + if ( num == TX_DELETEDPT ) strcpy(text, "Objekt nicht verf�gbar"); + if ( num == TX_FILEOPEN ) strcpy(text, "Die Datei kann nicht ge�ffnet werden"); + if ( num == TX_NOTOPEN ) strcpy(text, "Die Datei wurde nicht ge�ffnet"); if ( num == TX_ERRREAD ) strcpy(text, "Fehler beim Lesezugriff"); if ( num == TX_ERRWRITE ) strcpy(text, "Fehler beim Schreibzugriff"); } @@ -2672,115 +2673,115 @@ bool GetResourceBase(ResType type, int num, char* text) if ( type == RES_KEY ) { if ( num == 0 ) strcpy(text, "< keine >"); - if ( num == VK_LEFT ) strcpy(text, "Pfeiltaste links"); - if ( num == VK_RIGHT ) strcpy(text, "Pfeiltaste rechts"); - if ( num == VK_UP ) strcpy(text, "Pfeil nach oben"); - if ( num == VK_DOWN ) strcpy(text, "Pfeil nach unten"); - if ( num == VK_CANCEL ) strcpy(text, "Ctrl-Break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_RETURN ) strcpy(text, "Eingabe"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Leertaste"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Select"); - if ( num == VK_EXECUTE ) strcpy(text, "Execute"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Help"); - if ( num == VK_LWIN ) strcpy(text, "Left Windows"); - if ( num == VK_RWIN ) strcpy(text, "Right Windows"); - if ( num == VK_APPS ) strcpy(text, "Application key"); - if ( num == VK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == VK_ADD ) strcpy(text, "NumPad +"); - if ( num == VK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == VK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == VK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == VK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Play"); - if ( num == VK_ZOOM ) strcpy(text, "Zoom"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_BUTTON1 ) strcpy(text, "Knopf 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Knopf 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Knopf 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Knopf 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Knopf 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Knopf 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Knopf 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Knopf 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Knopf 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Knopf 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Knopf 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Knopf 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Knopf 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Knopf 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Knopf 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Knopf 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Knopf 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Knopf 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Knopf 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Knopf 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Knopf 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Knopf 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Knopf 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Knopf 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Knopf 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Knopf 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Knopf 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Knopf 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Knopf 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Knopf 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Knopf 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Knopf 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Mausrad nach vorne"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Mausrad zurck"); + if ( num == SDLK_LEFT ) strcpy(text, "Pfeiltaste links"); + if ( num == SDLK_RIGHT ) strcpy(text, "Pfeiltaste rechts"); + if ( num == SDLK_UP ) strcpy(text, "Pfeil nach oben"); + if ( num == SDLK_DOWN ) strcpy(text, "Pfeil nach unten"); + if ( num == SDLK_CANCEL ) strcpy(text, "Ctrl-Break"); + if ( num == SDLK_BACK ) strcpy(text, "<--"); + if ( num == SDLK_TAB ) strcpy(text, "Tab"); + if ( num == SDLK_CLEAR ) strcpy(text, "Clear"); + if ( num == SDLK_RETURN ) strcpy(text, "Eingabe"); + if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); + if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); + if ( num == SDLK_MENU ) strcpy(text, "Alt"); + if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); + if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); + if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); + if ( num == SDLK_SPACE ) strcpy(text, "Leertaste"); + if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); + if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); + if ( num == SDLK_END ) strcpy(text, "End"); + if ( num == SDLK_HOME ) strcpy(text, "Home"); + if ( num == SDLK_SELECT ) strcpy(text, "Select"); + if ( num == SDLK_EXECUTE ) strcpy(text, "Execute"); + if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); + if ( num == SDLK_INSERT ) strcpy(text, "Insert"); + if ( num == SDLK_DELETE ) strcpy(text, "Delete"); + if ( num == SDLK_HELP ) strcpy(text, "Help"); + if ( num == SDLK_LWIN ) strcpy(text, "Left Windows"); + if ( num == SDLK_RWIN ) strcpy(text, "Right Windows"); + if ( num == SDLK_APPS ) strcpy(text, "Application key"); + if ( num == SDLK_NUMPAD0 ) strcpy(text, "NumPad 0"); + if ( num == SDLK_NUMPAD1 ) strcpy(text, "NumPad 1"); + if ( num == SDLK_NUMPAD2 ) strcpy(text, "NumPad 2"); + if ( num == SDLK_NUMPAD3 ) strcpy(text, "NumPad 3"); + if ( num == SDLK_NUMPAD4 ) strcpy(text, "NumPad 4"); + if ( num == SDLK_NUMPAD5 ) strcpy(text, "NumPad 5"); + if ( num == SDLK_NUMPAD6 ) strcpy(text, "NumPad 6"); + if ( num == SDLK_NUMPAD7 ) strcpy(text, "NumPad 7"); + if ( num == SDLK_NUMPAD8 ) strcpy(text, "NumPad 8"); + if ( num == SDLK_NUMPAD9 ) strcpy(text, "NumPad 9"); + if ( num == SDLK_MULTIPLY ) strcpy(text, "NumPad *"); + if ( num == SDLK_ADD ) strcpy(text, "NumPad +"); + if ( num == SDLK_SEPARATOR ) strcpy(text, "NumPad sep"); + if ( num == SDLK_SUBTRACT ) strcpy(text, "NumPad -"); + if ( num == SDLK_DECIMAL ) strcpy(text, "NumPad ."); + if ( num == SDLK_DIVIDE ) strcpy(text, "NumPad /"); + if ( num == SDLK_F1 ) strcpy(text, "F1"); + if ( num == SDLK_F2 ) strcpy(text, "F2"); + if ( num == SDLK_F3 ) strcpy(text, "F3"); + if ( num == SDLK_F4 ) strcpy(text, "F4"); + if ( num == SDLK_F5 ) strcpy(text, "F5"); + if ( num == SDLK_F6 ) strcpy(text, "F6"); + if ( num == SDLK_F7 ) strcpy(text, "F7"); + if ( num == SDLK_F8 ) strcpy(text, "F8"); + if ( num == SDLK_F9 ) strcpy(text, "F9"); + if ( num == SDLK_F10 ) strcpy(text, "F10"); + if ( num == SDLK_F11 ) strcpy(text, "F11"); + if ( num == SDLK_F12 ) strcpy(text, "F12"); + if ( num == SDLK_F13 ) strcpy(text, "F13"); + if ( num == SDLK_F14 ) strcpy(text, "F14"); + if ( num == SDLK_F15 ) strcpy(text, "F15"); + if ( num == SDLK_F16 ) strcpy(text, "F16"); + if ( num == SDLK_F17 ) strcpy(text, "F17"); + if ( num == SDLK_F18 ) strcpy(text, "F18"); + if ( num == SDLK_F19 ) strcpy(text, "F19"); + if ( num == SDLK_F20 ) strcpy(text, "F20"); + if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); + if ( num == SDLK_SCROLL ) strcpy(text, "Scroll"); + if ( num == SDLK_ATTN ) strcpy(text, "Attn"); + if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); + if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); + if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); + if ( num == SDLK_PLAY ) strcpy(text, "Play"); + if ( num == SDLK_ZOOM ) strcpy(text, "Zoom"); + if ( num == SDLK_PA1 ) strcpy(text, "PA1"); + if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Clear"); + if ( num == SDLK_BUTTON1 ) strcpy(text, "Knopf 1"); + if ( num == SDLK_BUTTON2 ) strcpy(text, "Knopf 2"); + if ( num == SDLK_BUTTON3 ) strcpy(text, "Knopf 3"); + if ( num == SDLK_BUTTON4 ) strcpy(text, "Knopf 4"); + if ( num == SDLK_BUTTON5 ) strcpy(text, "Knopf 5"); + if ( num == SDLK_BUTTON6 ) strcpy(text, "Knopf 6"); + if ( num == SDLK_BUTTON7 ) strcpy(text, "Knopf 7"); + if ( num == SDLK_BUTTON8 ) strcpy(text, "Knopf 8"); + if ( num == SDLK_BUTTON9 ) strcpy(text, "Knopf 9"); + if ( num == SDLK_BUTTON10 ) strcpy(text, "Knopf 10"); + if ( num == SDLK_BUTTON11 ) strcpy(text, "Knopf 11"); + if ( num == SDLK_BUTTON12 ) strcpy(text, "Knopf 12"); + if ( num == SDLK_BUTTON13 ) strcpy(text, "Knopf 13"); + if ( num == SDLK_BUTTON14 ) strcpy(text, "Knopf 14"); + if ( num == SDLK_BUTTON15 ) strcpy(text, "Knopf 15"); + if ( num == SDLK_BUTTON16 ) strcpy(text, "Knopf 16"); + if ( num == SDLK_BUTTON17 ) strcpy(text, "Knopf 17"); + if ( num == SDLK_BUTTON18 ) strcpy(text, "Knopf 18"); + if ( num == SDLK_BUTTON19 ) strcpy(text, "Knopf 19"); + if ( num == SDLK_BUTTON20 ) strcpy(text, "Knopf 20"); + if ( num == SDLK_BUTTON21 ) strcpy(text, "Knopf 21"); + if ( num == SDLK_BUTTON22 ) strcpy(text, "Knopf 22"); + if ( num == SDLK_BUTTON23 ) strcpy(text, "Knopf 23"); + if ( num == SDLK_BUTTON24 ) strcpy(text, "Knopf 24"); + if ( num == SDLK_BUTTON25 ) strcpy(text, "Knopf 25"); + if ( num == SDLK_BUTTON26 ) strcpy(text, "Knopf 26"); + if ( num == SDLK_BUTTON27 ) strcpy(text, "Knopf 27"); + if ( num == SDLK_BUTTON28 ) strcpy(text, "Knopf 28"); + if ( num == SDLK_BUTTON29 ) strcpy(text, "Knopf 29"); + if ( num == SDLK_BUTTON30 ) strcpy(text, "Knopf 30"); + if ( num == SDLK_BUTTON31 ) strcpy(text, "Knopf 31"); + if ( num == SDLK_BUTTON32 ) strcpy(text, "Knopf 32"); + if ( num == SDLK_WHEELUP ) strcpy(text, "Mausrad nach vorne"); + if ( num == SDLK_WHEELDOWN ) strcpy(text, "Mausrad zur�ck"); } #endif @@ -2818,9 +2819,9 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /pl"); #endif if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powiksz"); + if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powi�ksz"); if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Pomniejsz"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielko"); + if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielko��"); if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Zamknij"); if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edytor programu"); @@ -2836,27 +2837,27 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); #endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "wiczenia programistyczne"); + if ( num == RT_TITLE_TRAINER ) strcpy(text, "�wiczenia programistyczne"); if ( num == RT_TITLE_DEFI ) strcpy(text, "Wyzwania"); if ( num == RT_TITLE_MISSION ) strcpy(text, "Misje"); if ( num == RT_TITLE_FREE ) strcpy(text, "Swobodna gra"); if ( num == RT_TITLE_TEEN ) strcpy(text, "Swobodna gra"); - if ( num == RT_TITLE_USER ) strcpy(text, "Poziomy uytkownika"); + if ( num == RT_TITLE_USER ) strcpy(text, "Poziomy u�ytkownika"); if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypy"); if ( num == RT_TITLE_SETUP ) strcpy(text, "Opcje"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Imi gracza"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygld"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz biec misj"); - if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan misj"); + if ( num == RT_TITLE_NAME ) strcpy(text, "Imi� gracza"); + if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygl�d"); + if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz bie��c� misj�"); + if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan� misj�"); - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdziay:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdziay:"); + if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdzia�y:"); + if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdzia�y:"); if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planety:"); if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziomy uytkownika:"); + if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziomy u�ytkownika:"); if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planety:"); if ( num == RT_PLAY_CHAPte ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " wiczenia w tym rozdziale:"); + if ( num == RT_PLAY_LISTt ) strcpy(text, " �wiczenia w tym rozdziale:"); if ( num == RT_PLAY_LISTd ) strcpy(text, " Wyzwania w tym rozdziale:"); if ( num == RT_PLAY_LISTm ) strcpy(text, " Misje na tej planecie:"); if ( num == RT_PLAY_LISTf ) strcpy(text, " Swobodna gra na tej planecie:"); @@ -2866,57 +2867,57 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == RT_PLAY_RESUME ) strcpy(text, " Streszczenie:"); if ( num == RT_SETUP_DEVICE ) strcpy(text, " Sterowniki:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Rozdzielczo:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, ktry chcesz przedefiniowa."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nastpnie nacinij klawisz, ktrego chcesz uywa."); + if ( num == RT_SETUP_MODE ) strcpy(text, " Rozdzielczo��:"); + if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, kt�ry chcesz przedefiniowa�."); + if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nast�pnie naci�nij klawisz, kt�rego chcesz u�ywa�."); if ( num == RT_PERSO_FACE ) strcpy(text, "Rodzaj twarzy:"); if ( num == RT_PERSO_GLASSES ) strcpy(text, "Okulary:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor wosw:"); + if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor w�os�w:"); if ( num == RT_PERSO_COMBI ) strcpy(text, "Kolor skafandra:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor paskw:"); + if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor pask�w:"); #if _NEWLOOK if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuci gr CeeBot?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakocz\\Koczy gr CeeBot"); + if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� CeeBot?"); + if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� CeeBot"); #else if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuci gr COLOBOT?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakocz\\Koczy gr COLOBOT"); + if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� COLOBOT?"); + if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOBOT"); #endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opuci misj?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa biec misj"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje biec misj"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje gr"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczy zaznaczony budynek?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowa zapisane gry gracza %s? "); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usu"); + if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opu�ci� misj�?"); + if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa bie��c� misj�"); + if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje bie��c� misj�"); + if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje gr�"); + if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczy� zaznaczony budynek?"); + if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowa� zapisane gry gracza %s? "); + if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usu�"); if ( num == RT_DIALOG_NODEL ) strcpy(text, "Anuluj"); if ( num == RT_DIALOG_LOADING ) strcpy(text, "WCZYTYWANIE"); - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skrty klawiszowe (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 bdw)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zakoczony"); + if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skr�ty klawiszowe (\\key cbot;)"); + if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 b��d�w)"); + if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zako�czony"); - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiektw\n"); + if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiekt�w\n"); if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Roboty\n"); if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Budynki\n"); if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Obiekty ruchome\n"); if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Obcy\n"); if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (brak)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Bd\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dostpna jedynie gdy dziaa \\l;stacja radarowa\\u object\\radar;.\n"); + if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;B��d\n"); + if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dost�pna jedynie gdy dzia�a \\l;stacja radarowa\\u object\\radar;.\n"); - if ( num == RT_IO_OPEN ) strcpy(text, "Otwrz"); + if ( num == RT_IO_OPEN ) strcpy(text, "Otw�rz"); if ( num == RT_IO_SAVE ) strcpy(text, "Zapisz"); if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s"); if ( num == RT_IO_NAME ) strcpy(text, "Nazwa:"); if ( num == RT_IO_DIR ) strcpy(text, "Folder:"); if ( num == RT_IO_PRIVATE ) strcpy(text, "Prywatny\\Folder prywatny"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder oglnodostpny"); + if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder og�lnodost�pny"); - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Twrcy:"); + if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Tw�rcy:"); if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Wersja polska wydana przez:"); if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.manta.com.pl"); @@ -2930,133 +2931,133 @@ bool GetResourceBase(ResType type, int num, char* text) { if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Anuluj"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nastpny"); + if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nast�pny"); if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Poprzedni"); if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Anuluj"); - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "wiczenia\\wiczenia programistyczne"); + if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�wiczenia\\�wiczenia programistyczne"); if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Wyzwania\\Wyzwania programistyczne"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misj"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celw"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celw"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziomy\\Poziomy uytkownika"); + if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misj�"); + if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w"); + if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w"); + if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziomy\\Poziomy u�ytkownika"); if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Prototypy\\Prototypy w trakcie rozwijania"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imi gracza"); + if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imi� gracza"); if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Opcje\\Preferencje"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misj od pocztku"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje biec misj"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan misj"); + if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misj� od pocz�tku"); + if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�"); + if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan� misj�"); #if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr do gry CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakocz\\Koczy gr CeeBot"); + if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry CeeBot"); + if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� CeeBot"); #else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr do gry COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakocz\\Koczy gr COLOBOT"); + if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry COLOBOT"); + if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOBOT"); #endif if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Wstecz \\Wraca do poprzedniego ekranu"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misj!"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urzdzenie\\Ustawienia sterownika i rozdzielczoci"); + if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misj�!"); + if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urz�dzenie\\Ustawienia sterownika i rozdzielczo�ci"); if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafika\\Ustawienia grafiki"); if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Gra\\Ustawienia gry"); if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Sterowanie\\Ustawienia klawiatury, joysticka i myszy"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Dwik\\Gono muzyki i dwikw gry"); + if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "D�wi�k\\G�o�no�� muzyki i d�wi�k�w gry"); if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Jednostka"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rozdzielczo"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Peny ekran\\Peny ekran lub tryb okna"); + if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rozdzielczo��"); + if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Pe�ny ekran\\Pe�ny ekran lub tryb okna"); if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Zastosuj zmiany\\Aktywuje zmienione ustawienia"); - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Twj asystent"); + if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Tw�j asystent"); if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Cienie\\Cienie na ziemi"); if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Znaki na ziemi\\Znaki na ziemi"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i brd na robotach i budynkach"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mga\\Mga"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie soneczne\\Promienie soneczne na niebie"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mgawice"); + if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i br�d na robotach i budynkach"); + if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mg�a\\Mg�a"); + if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie s�oneczne\\Promienie s�oneczne na niebie"); + if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mg�awice"); if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planety i gwiazdy\\Obiekty astronomiczne na niebie"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne owietlenie\\Ruchome rda wiata"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba czstek\\Wybuchy, kurz, odbicia, itp."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Gboko pola\\Maksymalna widoczno"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczegy\\Jako wizualna obiektw 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\Jako tekstur "); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Ilo elementw dekoracyjnych \\Ilo elementw czysto dekoracyjnych"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Czstki w interfejsie\\Para i iskry z silnikw w interfejsie"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\wiecce przyciski"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyjania funkcje przyciskw"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpoczciem i na zakoczenie misji"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Kocowy film\\Film na zakoczenie wicze"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogie\\Wasne strzay uszkadzaj Twoje obiekty"); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego krawdzi"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwrcenie myszy X\\Odwrcenie kierunkw przewijania w poziomie"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwrcenie myszy Y\\Odwrcenie kierunkw przewijania w pionie"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrzsy przy wybuchach\\Ekran trzsie si podczas wybuchw"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cie kursora myszy\\Dodaje cie kursorowi myszy"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wcicia\\Automatyczne wcicia podczas edycji programu"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Due wcicie\\2 lub 4 spacje wcicia na kady poziom zdefiniowany przez klamry"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Accs aux solutions\\Programme \"4: Solution\" dans les exercices"); + if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne o�wietlenie\\Ruchome �r�d�a �wiat�a"); + if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba cz�stek\\Wybuchy, kurz, odbicia, itp."); + if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "G��boko�� pola\\Maksymalna widoczno��"); + if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczeg�y\\Jako�� wizualna obiekt�w 3D"); + if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\Jako�� tekstur "); + if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Ilo�� element�w dekoracyjnych \\Ilo�� element�w czysto dekoracyjnych"); + if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Cz�stki w interfejsie\\Para i iskry z silnik�w w interfejsie"); + if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\�wiec�ce przyciski"); + if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyja�nia funkcje przycisk�w"); + if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpocz�ciem i na zako�czenie misji"); + if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Ko�cowy film\\Film na zako�czenie �wicze�"); + if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogie�\\W�asne strza�y uszkadzaj� Twoje obiekty"); + if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego kraw�dzi"); + if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwr�cenie myszy X\\Odwr�cenie kierunk�w przewijania w poziomie"); + if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwr�cenie myszy Y\\Odwr�cenie kierunk�w przewijania w pionie"); + if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrz�sy przy wybuchach\\Ekran trz�sie si� podczas wybuch�w"); + if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cie� kursora myszy\\Dodaje cie� kursorowi myszy"); + if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wci�cia\\Automatyczne wci�cia podczas edycji programu"); + if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Du�e wci�cie\\2 lub 4 spacje wci�cia na ka�dy poziom zdefiniowany przez klamry"); + if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Acc�s aux solutions\\Programme \"4: Solution\" dans les exercices"); if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standardowa kontrola\\Standardowe klawisze funkcyjne"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skr w lewo\\Obraca robota w lewo"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obr w prawo\\Obraca robota w prawo"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprzd\\Porusza do przodu"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do tyu"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W gr\\Zwiksza moc silnika"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W d\\Zmniejsza moc silnika"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmie kamer\\Przecza pomidzy kamer pokadow i ledzc"); + if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skr�� w lewo\\Obraca robota w lewo"); + if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obr�� w prawo\\Obraca robota w prawo"); + if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprz�d\\Porusza do przodu"); + if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do ty�u"); + if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W g�r�\\Zwi�ksza moc silnika"); + if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W d�\\Zmniejsza moc silnika"); + if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmie� kamer�\\Prze��cza pomi�dzy kamer� pok�adow� i �ledz�c�"); if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Poprzedni obiekt\\Zaznacz poprzedni obiekt"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnie/upu, strzelaj, szukaj, itp.)"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bliej\\Przyblia kamer"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamer"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nastpny obiekt\\Zaznacza nastpny obiekt"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronaut\\Zaznacza astronaut"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zakocz\\Koczy biec misj lub wiczenie"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotyczce biecej misji"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podrcznik programowania\\Dostarcza szczegow pomoc w programowaniu"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. sw kluczowych\\Dokadniejsza pomoc na temat sw kluczowych"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomoci\\Pokazuje skd zostaa wysana ostatnia wiadomo"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Prdko 1,0x\\Prdko normalna"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Prdko 1,5x\\1,5 raza szybciej"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Prdko 2,0x\\Dwa razy szybciej"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Prdko 3,0x\\Trzy razy szybciej"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty dwikowe:\\Gono silnikw, gosw, strzaw, itp."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\Gono cieek dwikowych z pyty CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Dwik 3D\\Przestrzenne pozycjonowanie dwikw"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najnisza\\Minimalna jako grafiki (najwysza czstotliwo odwieania)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jako grafiki"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwysza\\Maksymalna jako grafiki (najnisza czstotliwo odwieania)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Brak dwikw"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna gono dwikw"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Uywaj joysticka\\Joystick lub klawiatura"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dostp do rozwizania\\Pokazuje rozwizanie (szczegowe instrukcje dotyczce misji)"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imi gracza"); + if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnie�/upu��, strzelaj, szukaj, itp.)"); + if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bli�ej\\Przybli�a kamer�"); + if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamer�"); + if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nast�pny obiekt\\Zaznacza nast�pny obiekt"); + if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronaut�\\Zaznacza astronaut�"); + if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zako�cz\\Ko�czy bie��c� misj� lub �wiczenie"); + if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotycz�ce bie��cej misji"); + if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podr�cznik programowania\\Dostarcza szczeg�ow� pomoc w programowaniu"); + if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. s��w kluczowych\\Dok�adniejsza pomoc na temat s��w kluczowych"); + if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomo�ci\\Pokazuje sk�d zosta�a wys�ana ostatnia wiadomo��"); + if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Pr�dko�� 1,0x\\Pr�dko�� normalna"); + if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Pr�dko�� 1,5x\\1,5 raza szybciej"); + if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Pr�dko�� 2,0x\\Dwa razy szybciej"); + if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Pr�dko�� 3,0x\\Trzy razy szybciej"); + + if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty d�wi�kowe:\\G�o�no�� silnik�w, g�os�w, strza��w, itp."); + if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\G�o�no�� �cie�ek d�wi�kowych z p�yty CD"); + if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "D�wi�k 3D\\Przestrzenne pozycjonowanie d�wi�k�w"); + + if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najni�sza\\Minimalna jako�� grafiki (najwy�sza cz�stotliwo�� od�wie�ania)"); + if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jako�� grafiki"); + if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwy�sza\\Maksymalna jako�� grafiki (najni�sza cz�stotliwo�� od�wie�ania)"); + + if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Brak d�wi�k�w"); + if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna g�o�no�� d�wi�k�w"); + + if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "U�ywaj joysticka\\Joystick lub klawiatura"); + if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dost�p do rozwi�zania\\Pokazuje rozwi�zanie (szczeg�owe instrukcje dotycz�ce misji)"); + + if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imi� gracza"); if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Wybiera zaznaczonego gracza"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje biece imi gracza"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usu gracza\\Usuwa gracza z listy"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imi gracza"); + if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje bie��ce imi� gracza"); + if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usu� gracza\\Usuwa gracza z listy"); + if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imi� gracza"); - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje biec misj"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon misj"); + if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�"); + if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon� misj�"); if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Lista zapisanych misji"); if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nazwa pliku:"); if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nazwa misji"); if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Fotografia"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usu\\Usuwa zaznaczony plik"); + if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usu�\\Usuwa zaznaczony plik"); - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygld\\Wybierz swoj posta"); + if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygl�d\\Wybierz swoj� posta�"); if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Anuluj"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygldu"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Gowa\\Twarz i wosy"); + if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygl�du"); + if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "G�owa\\Twarz i w�osy"); if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Skafander\\Skafander astronauty"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obr w lewo"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obr w prawo"); + if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obr�� w lewo"); + if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obr�� w prawo"); if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Czerwony"); if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Zielony"); if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Niebieski"); @@ -3067,7 +3068,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Twarz 4"); if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Twarz 3"); if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Twarz 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okularw"); + if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okular�w"); if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Okulary 1"); if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Okulary 2"); if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Okulary 3"); @@ -3075,102 +3076,102 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Okulary 5"); if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Poprzednie zaznaczenie (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skr w lewo (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skr w prawo (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprzd (\\key up;)"); + if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skr�� w lewo (\\key left;)"); + if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skr�� w prawo (\\key right;)"); + if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprz�d (\\key up;)"); if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Cofnij (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Gra (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "D (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnie lub upu (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnie lub upu (\\key action;)"); + if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "G�ra (\\key gup;)"); + if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "D� (\\key gdown;)"); + if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)"); + if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)"); if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..przed"); if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..za"); if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..ogniwo elektryczne"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotyczce misji (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odle, aby zakoczy misj"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalni"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowni"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabryk robotw"); + if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotycz�ce misji (\\key help;)"); + if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odle�, aby zako�czy� misj�"); + if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalni�"); + if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowni�"); + if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabryk� robot�w"); if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Zbuduj warsztat"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hut"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie obronn"); + if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hut�"); + if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie�� obronn�"); if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Zbuduj centrum badawcze"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacj radarow"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabryk ogniw elektrycznych"); + if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacj� radarow�"); + if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabryk� ogniw elektrycznych"); if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Zbuduj laboratorium"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowni atomow"); + if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowni� atomow�"); if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Zbuduj odgromnik"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacj przekanikow"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka czy teren jest paski"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flag"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usu flag"); + if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacj� przeka�nikow�"); + if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka� czy teren jest p�aski"); + if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flag�"); + if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usu� flag�"); if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Niebieskie flagi"); if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Czerwone flagi"); if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Zielone flagi"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\te flagi"); + if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\��te flagi"); if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Fioletowe flagi"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter latajcy"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na koach"); + if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter lataj�cy"); + if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na g�sienicach"); + if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na ko�ach"); if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Zbuduj transporter na nogach"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dziao latajce"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dziao na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dziao na koach"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dziao na nogach"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj latajce dziao organiczne"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dziao organiczne na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dziao organiczne na koach"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dziao organiczne na nogach"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz latajcy"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na koach"); + if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dzia�o lataj�ce"); + if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dzia�o na g�sienicach"); + if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dzia�o na ko�ach"); + if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dzia�o na nogach"); + if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj lataj�ce dzia�o organiczne"); + if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dzia�o organiczne na g�sienicach"); + if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dzia�o organiczne na ko�ach"); + if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dzia�o organiczne na nogach"); + if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz lataj�cy"); + if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na g�sienicach"); + if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na ko�ach"); if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Zbuduj szperacz na nogach"); if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Zbuduj robota uderzacza"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dziao fazowe"); + if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dzia�o fazowe"); if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Zbuduj robota recyklera"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota osaniajacza"); + if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota os�aniajacza"); if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Zbuduj robota nurka"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na gsienicach"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze nad transporterem latajcym"); + if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na g�sienicach"); + if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze nad transporterem lataj�cym"); if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Rozpocznij prace badawcze nad robotem uderzaczem"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze nad dziaem"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze nad wie obronn"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze nad dziaem fazowym"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze nad robotem osaniaczem"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze nad energi atomow"); + if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em"); + if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze nad wie�� obronn�"); + if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em fazowym"); + if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze nad robotem os�aniaczem"); + if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze nad energi� atomow�"); if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na nogach"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze nad dziaem organicznym"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powrt do pocztku"); + if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em organicznym"); + if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powr�t do pocz�tku"); if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Szukaj (\\key action;)"); if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Uderz (\\key action;)"); if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Strzelaj (\\key action;)"); if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Odzyskaj (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz oson (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wycz oson (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasig osony"); + if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz os�on� (\\key action;)"); + if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wy��cz os�on� (\\key action;)"); + if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasi�g os�ony"); if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Wykonaj zaznaczony program"); if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edytuj zaznaczony program"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Przecz przekanik SatCom w stan gotowoci"); + if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Prze��cz przeka�nik SatCom w stan gotowo�ci"); if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Zniszcz budynek"); if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Poziom energii"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom osony"); + if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom os�ony"); if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temperatura silnika"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci pracuje..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insektw"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przesane informacje"); + if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci�� pracuje..."); + if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insekt�w"); + if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przes�ane informacje"); if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompas"); //? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mapka"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powikszenie mapki"); + if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powi�kszenie mapki"); if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)"); if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camera to left"); if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camera to right"); if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camera nearest"); if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camera awayest"); if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Pomoc na temat zaznaczonego obiektu"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka rozwizanie"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Przecz roboty <-> budynki"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka zasig"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Relve le crayon"); + if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka� rozwi�zanie"); + if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Prze��cz roboty <-> budynki"); + if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka� zasi�g"); + if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Rel�ve le crayon"); if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir"); if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune"); if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange"); @@ -3179,26 +3180,26 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu"); if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert"); if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Dmarre l'enregistrement"); + if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\D�marre l'enregistrement"); if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement"); if ( num == EVENT_DT_VISIT0 || num == EVENT_DT_VISIT1 || num == EVENT_DT_VISIT2 || num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Poka miejsce"); + num == EVENT_DT_VISIT4 ) strcpy(text, "Poka� miejsce"); if ( num == EVENT_DT_END ) strcpy(text, "Kontynuuj"); if ( num == EVENT_CMD ) strcpy(text, "Linia polecenia"); - if ( num == EVENT_SPEED ) strcpy(text, "Prdko gry"); + if ( num == EVENT_SPEED ) strcpy(text, "Pr�dko�� gry"); if ( num == EVENT_HYPER_PREV ) strcpy(text, "Wstecz"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprzd"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Pocztek"); + if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprz�d"); + if ( num == EVENT_HYPER_HOME ) strcpy(text, "Pocz�tek"); if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopiuj"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Wielko 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Wielko 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Wielko 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Wielko 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Wielko 5"); + if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Wielko�� 1"); + if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Wielko�� 2"); + if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Wielko�� 3"); + if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Wielko�� 4"); + if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Wielko�� 5"); if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Rozkazy z Houston"); #if _TEEN if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity"); @@ -3206,22 +3207,22 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity"); #endif if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Program dostarczony z Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiektw"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podrcznik programowania"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwizanie"); + if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiekt�w"); + if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podr�cznik programowania"); + if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwi�zanie"); if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Zamyka edytor programu i powraca do gry"); if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Anuluj\\Pomija wszystkie zmiany"); if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nowy"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otwrz (Ctrl+O)"); + if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otw�rz (Ctrl+O)"); if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Zapisz (Ctrl+S)"); if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Cofnij (Ctrl+Z)"); if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Wytnij (Ctrl+X)"); if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopiuj (Ctrl+C)"); if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Wklej (Ctrl+V)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Wielko czcionki"); + if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Wielko�� czcionki"); if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Rozkazy (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podrcznik programowania (\\key prog;)"); + if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podr�cznik programowania (\\key prog;)"); if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompiluj"); if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Wykonaj/Zatrzymaj"); if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pauza/Kontynuuj"); @@ -3230,19 +3231,19 @@ bool GetResourceBase(ResType type, int num, char* text) if ( type == RES_OBJECT ) { - if ( num == OBJECT_PORTICO ) strcpy(text, "uraw przesuwalny"); + if ( num == OBJECT_PORTICO ) strcpy(text, "�uraw przesuwalny"); if ( num == OBJECT_BASE ) strcpy(text, "Statek kosmiczny"); if ( num == OBJECT_DERRICK ) strcpy(text, "Kopalnia"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robotw"); + if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robot�w"); if ( num == OBJECT_REPAIR ) strcpy(text, "Warsztat"); if ( num == OBJECT_DESTROYER ) strcpy(text, "Destroyer"); if ( num == OBJECT_STATION ) strcpy(text, "Stacja energetyczna"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rud na tytan"); - if ( num == OBJECT_TOWER ) strcpy(text, "Wiea obronna"); + if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rud� na tytan"); + if ( num == OBJECT_TOWER ) strcpy(text, "Wie�a obronna"); if ( num == OBJECT_NEST ) strcpy(text, "Gniazdo"); if ( num == OBJECT_RESEARCH ) strcpy(text, "Centrum badawcze"); if ( num == OBJECT_RADAR ) strcpy(text, "Stacja radarowa"); - if ( num == OBJECT_INFO ) strcpy(text, "Stacja przekanikowa informacji"); + if ( num == OBJECT_INFO ) strcpy(text, "Stacja przeka�nikowa informacji"); #if _TEEN if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych"); #else @@ -3255,7 +3256,7 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_HUSTON ) strcpy(text, "Centrum Kontroli Misji w Houston"); if ( num == OBJECT_TARGET1 ) strcpy(text, "Cel"); if ( num == OBJECT_TARGET2 ) strcpy(text, "Cel"); - if ( num == OBJECT_START ) strcpy(text, "Pocztek"); + if ( num == OBJECT_START ) strcpy(text, "Pocz�tek"); if ( num == OBJECT_END ) strcpy(text, "Koniec"); if ( num == OBJECT_STONE ) strcpy(text, "Ruda tytanu"); if ( num == OBJECT_URANIUM ) strcpy(text, "Ruda uranu"); @@ -3268,55 +3269,55 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_KEYb ) strcpy(text, "Klucz B"); if ( num == OBJECT_KEYc ) strcpy(text, "Klucz C"); if ( num == OBJECT_KEYd ) strcpy(text, "Klucz D"); - if ( num == OBJECT_TNT ) strcpy(text, "Materiay wybuchowe"); + if ( num == OBJECT_TNT ) strcpy(text, "Materia�y wybuchowe"); if ( num == OBJECT_BOMB ) strcpy(text, "Mina"); if ( num == OBJECT_BAG ) strcpy(text, "Zestaw przetrwania"); if ( num == OBJECT_WAYPOINT ) strcpy(text, "Punkt kontrolny"); if ( num == OBJECT_FLAGb ) strcpy(text, "Niebieska flaga"); if ( num == OBJECT_FLAGr ) strcpy(text, "Czerwona flaga"); if ( num == OBJECT_FLAGg ) strcpy(text, "Zielona flaga"); - if ( num == OBJECT_FLAGy ) strcpy(text, "ta flaga"); + if ( num == OBJECT_FLAGy ) strcpy(text, "��ta flaga"); if ( num == OBJECT_FLAGv ) strcpy(text, "Fioletowa flaga"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "rdo energii (miejsce na elektrowni)"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Zoe uranu (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalni)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Zoe tytanu (miejsce na kopalni)"); + if ( num == OBJECT_MARKPOWER ) strcpy(text, "�r�d�o energii (miejsce na elektrowni�)"); + if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Z�o�e uranu (miejsce na kopalni�)"); + if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalni�)"); + if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalni�)"); + if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalni�)"); + if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalni�)"); + if ( num == OBJECT_MARKSTONE ) strcpy(text, "Z�o�e tytanu (miejsce na kopalni�)"); if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot treningowy"); if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot treningowy"); if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot treningowy"); if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter latajcy"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na gsienicach"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na koach"); + if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter lataj�cy"); + if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na g�sienicach"); + if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na ko�ach"); if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter na nogach"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dziao latajce"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dziao na gsienicach"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dziao na koach"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Dziao na nogach"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Latajce dziao organiczne"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Dziao organiczne na gsienicach"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dziao organiczne na koach"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Dziao organiczne na nogach"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz latajcy"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na gsienicach"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na koach"); + if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dzia�o lataj�ce"); + if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dzia�o na g�sienicach"); + if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dzia�o na ko�ach"); + if ( num == OBJECT_MOBILEic ) strcpy(text, "Dzia�o na nogach"); + if ( num == OBJECT_MOBILEfi ) strcpy(text, "Lataj�ce dzia�o organiczne"); + if ( num == OBJECT_MOBILEti ) strcpy(text, "Dzia�o organiczne na g�sienicach"); + if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dzia�o organiczne na ko�ach"); + if ( num == OBJECT_MOBILEii ) strcpy(text, "Dzia�o organiczne na nogach"); + if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz lataj�cy"); + if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na g�sienicach"); + if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na ko�ach"); if ( num == OBJECT_MOBILEis ) strcpy(text, "Szperacz na nogach"); if ( num == OBJECT_MOBILErt ) strcpy(text, "Uderzacz"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Dziao fazowe"); + if ( num == OBJECT_MOBILErc ) strcpy(text, "Dzia�o fazowe"); if ( num == OBJECT_MOBILErr ) strcpy(text, "Recykler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Osaniacz"); + if ( num == OBJECT_MOBILErs ) strcpy(text, "Os�aniacz"); if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot nurek"); if ( num == OBJECT_MOBILEtg ) strcpy(text, "Robot cel"); if ( num == OBJECT_MOBILEdr ) strcpy(text, "Drawer bot"); if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Inynier"); + if ( num == OBJECT_TECH ) strcpy(text, "In�ynier"); if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Krlowa Obcych"); - if ( num == OBJECT_ANT ) strcpy(text, "Mrwka"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Pajk"); + if ( num == OBJECT_MOTHER ) strcpy(text, "Kr�lowa Obcych"); + if ( num == OBJECT_ANT ) strcpy(text, "Mr�wka"); + if ( num == OBJECT_SPIDER ) strcpy(text, "Paj�k"); if ( num == OBJECT_BEE ) strcpy(text, "Osa"); if ( num == OBJECT_WORM ) strcpy(text, "Robal"); if ( num == OBJECT_EGG ) strcpy(text, "Jajo"); @@ -3336,320 +3337,320 @@ bool GetResourceBase(ResType type, int num, char* text) if ( num == OBJECT_APOLLO1 || num == OBJECT_APOLLO3 || num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Pozostaoci z misji Apollo"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksiycowy"); + num == OBJECT_APOLLO5 ) strcpy(text, "Pozosta�o�ci z misji Apollo"); + if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksi�ycowy"); } if ( type == RES_ERR ) { - strcpy(text, "Bd"); + strcpy(text, "B��d"); if ( num == ERR_CMD ) strcpy(text, "Nieznane polecenie"); #if _NEWLOOK if ( num == ERR_INSTALL ) strcpy(text, "Gra CeeBot nie jest zainstalowana."); - if ( num == ERR_NOCD ) strcpy(text, "W dysk CD z gr CeeBot\ni uruchom gr jeszcze raz."); + if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� CeeBot\ni uruchom gr� jeszcze raz."); #else if ( num == ERR_INSTALL ) strcpy(text, "Gra COLOBOT nie jest zainstalowana."); - if ( num == ERR_NOCD ) strcpy(text, "W dysk CD z gr COLOBOT\ni uruchom gr jeszcze raz."); + if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� COLOBOT\ni uruchom gr� jeszcze raz."); #endif if ( num == ERR_MANIP_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mona nie wicej przedmiotw"); + if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); + if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mo�na nie�� wi�cej przedmiot�w"); if ( num == ERR_MANIP_NIL ) strcpy(text, "Nie ma nic do podniesienia"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zajte"); + if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); + if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zaj�te"); if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Brak innego robota"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie moesz przenosi przedmiotw radioaktywnych"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie moesz przenosi przedmiotw pod wod"); + if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w radioaktywnych"); + if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w pod wod�"); if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nie ma nic do upuszczenia"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemoliwe pod wod"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za mao energii"); + if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); + if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemo�liwe pod wod�"); + if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za ma�o energii"); if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Tytan za daleko"); if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Tytan za blisko"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobliu"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczajco paska"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za mao paskiego terenu"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zajte"); + if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobli�u"); + if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczaj�co p�aska"); + if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za ma�o p�askiego terenu"); + if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zaj�te"); if ( num == ERR_BUILD_BASE ) strcpy(text, "Za blisko statku kosmicznego"); if ( num == ERR_BUILD_NARROW ) strcpy(text, "Za blisko budynku"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemoliwe podczas lotu"); + if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); + if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); if ( num == ERR_SEARCH_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); + if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); if ( num == ERR_TERRA_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za mao energii"); + if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za ma�o energii"); if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Nieodpowiedni teren"); if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Budynek za blisko"); if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Obiekt za blisko"); if ( num == ERR_RECOVER_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za mao energii"); + if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za ma�o energii"); if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nie ma niczego do odzysku"); if ( num == ERR_SHIELD_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wicej energii"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Bd w poleceniu ruchu"); + if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wi�cej energii"); + if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "B��d w poleceniu ruchu"); if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Obiekt nieznany"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedostpne"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedostpne"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zajte"); + if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedost�pne"); + if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedost�pne"); + if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zaj�te"); if ( num == ERR_FIRE_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za mao energii"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemoliwe podczas lotu"); + if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za ma�o energii"); + if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Brak rudy tytanu do przetopienia"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma adnej rudy"); + if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma �adnej rudy"); if ( num == ERR_STATION_NULL ) strcpy(text, "Brak energii w ziemi"); if ( num == ERR_TOWER_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wicej energii"); + if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wi�cej energii"); if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za mao energii"); + if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za ma�o energii"); if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Nieodpowiedni rodzaj ogniw"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta ju wykonany"); + if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta� ju� wykonany"); if ( num == ERR_ENERGY_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci za mao energii"); + if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci�� za ma�o energii"); if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Brak tytanu do przetworzenia"); if ( num == ERR_ENERGY_BAD ) strcpy(text, "Przetwarza jedynie tytan"); if ( num == ERR_BASE_DLOCK ) strcpy(text, "Drzwi zablokowane przez robota lub inny obiekt "); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz by na statku kosmicznym aby nim odlecie"); + if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz by� na statku kosmicznym aby nim odlecie�"); if ( num == ERR_LABO_NULL ) strcpy(text, "Nie ma niczego do zanalizowania"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materi organiczn"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zostaa ju wykonana"); + if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materi� organiczn�"); + if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zosta�a ju� wykonana"); if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci za mao energii"); + if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci�� za ma�o energii"); if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Brak uranu do przetworzenia"); if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Przetwarza jedynie uran"); if ( num == ERR_FACTORY_NULL ) strcpy(text, "Brak tytanu"); if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Obiekt za blisko"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zajte"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma adnej stacji przekanikowej w zasigu"); + if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zaj�te"); + if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma �adnej stacji przeka�nikowej w zasi�gu"); if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program zawirusowany"); if ( num == ERR_BAT_VIRUS ) strcpy(text, "Zainfekowane wirusem, chwilowo niesprawne"); if ( num == ERR_VEH_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wicej energii"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemoliwe podczas pywania"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemoliwe podczas przenoszenia przedmiotu"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za duo flag w tym kolorze (maksymalnie 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniejcej flagi"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobliu"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wypeniona (nacinij \\key help; aby uzyska szczegy)"); + if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wi�cej energii"); + if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); + if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemo�liwe podczas p�ywania"); + if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); + if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemo�liwe podczas przenoszenia przedmiotu"); + if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za du�o flag w tym kolorze (maksymalnie 5)"); + if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniej�cej flagi"); + if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobli�u"); + if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wype�niona (naci�nij \\key help; aby uzyska� szczeg�y)"); if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot zniszczony"); if ( num == ERR_DELETEBUILDING ) strcpy(text, "Budynek zniszczony"); - if ( num == ERR_TOOMANY ) strcpy(text, "Nie mona tego utworzy, za duo obiektw"); + if ( num == ERR_TOOMANY ) strcpy(text, "Nie mo�na tego utworzy�, za du�o obiekt�w"); if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "It misses \"%s\" in this exercise"); if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Do not use in this exercise"); - if ( num == INFO_BUILD ) strcpy(text, "Budowa zakoczona"); - if ( num == INFO_CONVERT ) strcpy(text, "Tytan dostpny"); - if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zakoczony"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dostpne plany tranporterw na gsienicach"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Moesz lata uywajc klawiszy (\\key gup;) oraz (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dostpne plany robota uderzacza"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dostpne plany dziaa"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dostpne plany wiey obronnej"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dostpne plany dziaa fazowego"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dostpne plany robota osaniacza"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dostpne plany elektrowni atomowej"); - if ( num == INFO_FACTORY ) strcpy(text, "Dostpny nowy robot"); + if ( num == INFO_BUILD ) strcpy(text, "Budowa zako�czona"); + if ( num == INFO_CONVERT ) strcpy(text, "Tytan dost�pny"); + if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zako�czony"); + if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dost�pne plany tranporter�w na g�sienicach"); + if ( num == INFO_RESEARCHFLY ) strcpy(text, "Mo�esz lata� u�ywaj�c klawiszy (\\key gup;) oraz (\\key gdown;)"); + if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dost�pne plany robota uderzacza"); + if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dost�pne plany dzia�a"); + if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dost�pne plany wie�y obronnej"); + if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dost�pne plany dzia�a fazowego"); + if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dost�pne plany robota os�aniacza"); + if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dost�pne plany elektrowni atomowej"); + if ( num == INFO_FACTORY ) strcpy(text, "Dost�pny nowy robot"); if ( num == INFO_LABO ) strcpy(text, "Analiza wykonana"); if ( num == INFO_ENERGY ) strcpy(text, "Wytworzono ogniwo elektryczne"); if ( num == INFO_NUCLEAR ) strcpy(text, "Wytworzono atomowe ogniwo elektryczne"); - if ( num == INFO_FINDING ) strcpy(text, "Znaleziono uyteczny przedmiot"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowni"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wypeniona >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powioda si >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powioda si >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Bieca misja zapisana"); + if ( num == INFO_FINDING ) strcpy(text, "Znaleziono u�yteczny przedmiot"); + if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowni�"); + if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalni�"); + if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalni�"); + if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalni�"); + if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalni�"); + if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalni�"); + if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalni�"); + if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wype�niona >>>"); + if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>"); + if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>"); + if ( num == INFO_WRITEOK ) strcpy(text, "Bie��ca misja zapisana"); if ( num == INFO_DELETEPATH ) strcpy(text, "Przekroczono punkt kontrolny"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Krlowa Obcych zostaa zabita"); - if ( num == INFO_DELETEANT ) strcpy(text, "Mrwka miertelnie raniona"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Osa miertelnie raniona"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Robal miertelnie raniony"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Pajk miertelnie raniony"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Nacinij klawisz \\key help; aby wywietli rozkazy na przekaniku SatCom"); + if ( num == INFO_DELETEMOTHER ) strcpy(text, "Kr�lowa Obcych zosta�a zabita"); + if ( num == INFO_DELETEANT ) strcpy(text, "Mr�wka �miertelnie raniona"); + if ( num == INFO_DELETEBEE ) strcpy(text, "Osa �miertelnie raniona"); + if ( num == INFO_DELETEWORM ) strcpy(text, "Robal �miertelnie raniony"); + if ( num == INFO_DELETESPIDER ) strcpy(text, "Paj�k �miertelnie raniony"); + if ( num == INFO_BEGINSATCOM ) strcpy(text, "Naci�nij klawisz \\key help; aby wy�wietli� rozkazy na przeka�niku SatCom"); } if ( type == RES_CBOT ) { - strcpy(text, "Bd"); - if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwierajcego"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykajcego"); - if ( num == TX_NOTBOOL ) strcpy(text, "Wyraenie musi zwrci warto logiczn"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zostaa zadeklarowana"); - if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemoliwe"); - if ( num == TX_ENDOF ) strcpy(text, "Brak rednika na kocu wiersza"); - if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" na zewntrz bloku ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Polecenie po kocowej klamrze zamykajcej"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Brak koca bloku"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" bez wystpienia ""if"" "); - if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwierajcej");//dbut d'un bloc attendu? - if ( num == TX_BADTYPE ) strcpy(text, "Zy typ dla przypisania"); - if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie moe by zadeklarowana dwukrotnie"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operatorw"); + strcpy(text, "B��d"); + if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwieraj�cego"); + if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykaj�cego"); + if ( num == TX_NOTBOOL ) strcpy(text, "Wyra�enie musi zwr�ci� warto�� logiczn�"); + if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zosta�a zadeklarowana"); + if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemo�liwe"); + if ( num == TX_ENDOF ) strcpy(text, "Brak �rednika na ko�cu wiersza"); + if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" na zewn�trz bloku ""switch"""); + if ( num == TX_NOTERM ) strcpy(text, "Polecenie po ko�cowej klamrze zamykaj�cej"); + if ( num == TX_CLOSEBLK ) strcpy(text, "Brak ko�ca bloku"); + if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" bez wyst�pienia ""if"" "); + if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwieraj�cej");//d�but d'un bloc attendu? + if ( num == TX_BADTYPE ) strcpy(text, "Z�y typ dla przypisania"); + if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie mo�e by� zadeklarowana dwukrotnie"); + if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operator�w"); if ( num == TX_UNDEFCALL ) strcpy(text, "Funkcja nieznana"); if ( num == TX_MISDOTS ) strcpy(text, "Brak znaku "" : "); - if ( num == TX_WHILE ) strcpy(text, "Brak kluczowego sowa ""while"); - if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" na zewntrz ptli"); - if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wystpi ""for"", ""while"", ""do"" lub ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette tiquette n'existe pas + if ( num == TX_WHILE ) strcpy(text, "Brak kluczowego s�owa ""while"); + if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" na zewn�trz p�tli"); + if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wyst�pi� ""for"", ""while"", ""do"" lub ""switch"""); + if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette �tiquette n'existe pas if ( num == TX_NOCASE ) strcpy(text, "Brak polecenia ""case"); if ( num == TX_BADNUM ) strcpy(text, "Brak liczby"); if ( num == TX_VOID ) strcpy(text, "Pusty parametr"); if ( num == TX_NOTYP ) strcpy(text, "Brak deklaracji typu"); if ( num == TX_NOVAR ) strcpy(text, "Brak nazwy zmiennej"); - if ( num == TX_NOFONC ) strcpy(text, "Brakujca nazwa funkcji"); - if ( num == TX_OVERPARAM ) strcpy(text, "Za duo parametrw"); - if ( num == TX_REDEF ) strcpy(text, "Funkcja ju istnieje"); + if ( num == TX_NOFONC ) strcpy(text, "Brakuj�ca nazwa funkcji"); + if ( num == TX_OVERPARAM ) strcpy(text, "Za du�o parametr�w"); + if ( num == TX_REDEF ) strcpy(text, "Funkcja ju� istnieje"); if ( num == TX_LOWPARAM ) strcpy(text, "Brak wymaganego parametru"); - if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametrw tego typu"); - if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametrw"); + if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametr�w tego typu"); + if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametr�w"); if ( num == TX_NOITEM ) strcpy(text, "To nie jest obiekt tej klasy"); - if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest czonkiem klasy"); + if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest cz�onkiem klasy"); if ( num == TX_NOCONST ) strcpy(text, "Brak odpowiedniego konstruktora"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju istnieje"); + if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju� istnieje"); if ( num == TX_CLBRK ) strcpy(text, "Brak "" ] """); - if ( num == TX_RESERVED ) strcpy(text, "Sowo zarezerwowane jzyka CBOT"); - if ( num == TX_BADNEW ) strcpy(text, "Zy argument dla funkcji ""new"""); + if ( num == TX_RESERVED ) strcpy(text, "S�owo zarezerwowane j�zyka CBOT"); + if ( num == TX_BADNEW ) strcpy(text, "Z�y argument dla funkcji ""new"""); if ( num == TX_OPBRK ) strcpy(text, "Oczekiwane "" [ """); - if ( num == TX_BADSTRING ) strcpy(text, "Brak acucha"); - if ( num == TX_BADINDEX ) strcpy(text, "Nieprawidowy typ indeksu"); + if ( num == TX_BADSTRING ) strcpy(text, "Brak �a�cucha"); + if ( num == TX_BADINDEX ) strcpy(text, "Nieprawid�owy typ indeksu"); if ( num == TX_PRIVATE ) strcpy(text, "Element prywatny"); if ( num == TX_NOPUBLIC ) strcpy(text, "Wymagany publiczny"); if ( num == TX_DIVZERO ) strcpy(text, "Dzielenie przez zero"); - if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zostaa zainicjalizowana"); - if ( num == TX_BADTHROW ) strcpy(text, "Warto ujemna odrzucona przez ""throw""");//C'est quoi, a? - if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwrcia adnej wartoci "); - if ( num == TX_NORUN ) strcpy(text, "adna funkcja nie dziaa"); - if ( num == TX_NOCALL ) strcpy(text, "Odwoanie do nieznanej funkcji"); + if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zosta�a zainicjalizowana"); + if ( num == TX_BADTHROW ) strcpy(text, "Warto�� ujemna odrzucona przez ""throw""");//C'est quoi, �a? + if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwr�ci�a �adnej warto�ci "); + if ( num == TX_NORUN ) strcpy(text, "�adna funkcja nie dzia�a"); + if ( num == TX_NOCALL ) strcpy(text, "Odwo�anie do nieznanej funkcji"); if ( num == TX_NOCLASS ) strcpy(text, "Taka klasa nie istnieje"); if ( num == TX_NULLPT ) strcpy(text, "Obiekt nieznany"); - if ( num == TX_OPNAN ) strcpy(text, "Dziaanie niemoliwe z wartoci ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Dostp poza tablic"); - if ( num == TX_STACKOVER ) strcpy(text, "Przepenienie stosu"); - if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawidowy obiekt"); - if ( num == TX_FILEOPEN ) strcpy(text, "Nie mona otworzy pliku"); + if ( num == TX_OPNAN ) strcpy(text, "Dzia�anie niemo�liwe z warto�ci� ""nan"""); + if ( num == TX_OUTARRAY ) strcpy(text, "Dost�p poza tablic�"); + if ( num == TX_STACKOVER ) strcpy(text, "Przepe�nienie stosu"); + if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawid�owy obiekt"); + if ( num == TX_FILEOPEN ) strcpy(text, "Nie mo�na otworzy� pliku"); if ( num == TX_NOTOPEN ) strcpy(text, "Plik nie jest otwarty"); - if ( num == TX_ERRREAD ) strcpy(text, "Bd odczytu"); - if ( num == TX_ERRWRITE ) strcpy(text, "Bd zapisu"); + if ( num == TX_ERRREAD ) strcpy(text, "B��d odczytu"); + if ( num == TX_ERRWRITE ) strcpy(text, "B��d zapisu"); } if ( type == RES_KEY ) { if ( num == 0 ) strcpy(text, "< brak >"); - if ( num == VK_LEFT ) strcpy(text, "Strzaka w lewo"); - if ( num == VK_RIGHT ) strcpy(text, "Strzaka w prawo"); - if ( num == VK_UP ) strcpy(text, "Strzaka w gr"); - if ( num == VK_DOWN ) strcpy(text, "Strzaka w d"); - if ( num == VK_CANCEL ) strcpy(text, "Ctrl-break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Delete"); - if ( num == VK_RETURN ) strcpy(text, "Enter"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Spacja"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Zaznacz"); - if ( num == VK_EXECUTE ) strcpy(text, "Wykonaj"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Pomoc"); - if ( num == VK_LWIN ) strcpy(text, "Lewy klawisz Windows"); - if ( num == VK_RWIN ) strcpy(text, "Prawy klawisz Windows"); - if ( num == VK_APPS ) strcpy(text, "Klawisz menu kontekstowego"); - if ( num == VK_NUMPAD0 ) strcpy(text, "Klaw. Num. 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "Klaw. Num. 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "Klaw. Num. 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "Klaw. Num. 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "Klaw. Num. 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "Klaw. Num. 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "Klaw. Num. 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "Klaw. Num. 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "Klaw. Num. 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "Klaw. Num. 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "Klaw. Num. *"); - if ( num == VK_ADD ) strcpy(text, "Klaw. Num. +"); - if ( num == VK_SEPARATOR ) strcpy(text, "Klaw. Num. separator"); - if ( num == VK_SUBTRACT ) strcpy(text, "Klaw. Num. -"); - if ( num == VK_DECIMAL ) strcpy(text, "Klaw. Num. ."); - if ( num == VK_DIVIDE ) strcpy(text, "Klaw. Num. /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll Lock"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Graj"); - if ( num == VK_ZOOM ) strcpy(text, "Powikszenie"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Wyczy"); - if ( num == VK_BUTTON1 ) strcpy(text, "Przycisk 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Przycisk 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Przycisk 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Przycisk 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Przycisk 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Przycisk 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Przycisk 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Przycisk 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Przycisk 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Przycisk 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Przycisk 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Przycisk 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Przycisk 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Przycisk 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Przycisk 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Przycisk 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Przycisk 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Przycisk 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Przycisk 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Przycisk 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Przycisk 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Przycisk 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Przycisk 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Przycisk 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Przycisk 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Przycisk 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Przycisk 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Przycisk 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Przycisk 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Przycisk 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Przycisk 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Przycisk 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Kko w gr"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Kko w d"); + if ( num == SDLK_LEFT ) strcpy(text, "Strza�ka w lewo"); + if ( num == SDLK_RIGHT ) strcpy(text, "Strza�ka w prawo"); + if ( num == SDLK_UP ) strcpy(text, "Strza�ka w g�r�"); + if ( num == SDLK_DOWN ) strcpy(text, "Strza�ka w d�"); + if ( num == SDLK_CANCEL ) strcpy(text, "Ctrl-break"); + if ( num == SDLK_BACK ) strcpy(text, "<--"); + if ( num == SDLK_TAB ) strcpy(text, "Tab"); + if ( num == SDLK_CLEAR ) strcpy(text, "Delete"); + if ( num == SDLK_RETURN ) strcpy(text, "Enter"); + if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); + if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); + if ( num == SDLK_MENU ) strcpy(text, "Alt"); + if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); + if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); + if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); + if ( num == SDLK_SPACE ) strcpy(text, "Spacja"); + if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); + if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); + if ( num == SDLK_END ) strcpy(text, "End"); + if ( num == SDLK_HOME ) strcpy(text, "Home"); + if ( num == SDLK_SELECT ) strcpy(text, "Zaznacz"); + if ( num == SDLK_EXECUTE ) strcpy(text, "Wykonaj"); + if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); + if ( num == SDLK_INSERT ) strcpy(text, "Insert"); + if ( num == SDLK_DELETE ) strcpy(text, "Delete"); + if ( num == SDLK_HELP ) strcpy(text, "Pomoc"); + if ( num == SDLK_LWIN ) strcpy(text, "Lewy klawisz Windows"); + if ( num == SDLK_RWIN ) strcpy(text, "Prawy klawisz Windows"); + if ( num == SDLK_APPS ) strcpy(text, "Klawisz menu kontekstowego"); + if ( num == SDLK_NUMPAD0 ) strcpy(text, "Klaw. Num. 0"); + if ( num == SDLK_NUMPAD1 ) strcpy(text, "Klaw. Num. 1"); + if ( num == SDLK_NUMPAD2 ) strcpy(text, "Klaw. Num. 2"); + if ( num == SDLK_NUMPAD3 ) strcpy(text, "Klaw. Num. 3"); + if ( num == SDLK_NUMPAD4 ) strcpy(text, "Klaw. Num. 4"); + if ( num == SDLK_NUMPAD5 ) strcpy(text, "Klaw. Num. 5"); + if ( num == SDLK_NUMPAD6 ) strcpy(text, "Klaw. Num. 6"); + if ( num == SDLK_NUMPAD7 ) strcpy(text, "Klaw. Num. 7"); + if ( num == SDLK_NUMPAD8 ) strcpy(text, "Klaw. Num. 8"); + if ( num == SDLK_NUMPAD9 ) strcpy(text, "Klaw. Num. 9"); + if ( num == SDLK_MULTIPLY ) strcpy(text, "Klaw. Num. *"); + if ( num == SDLK_ADD ) strcpy(text, "Klaw. Num. +"); + if ( num == SDLK_SEPARATOR ) strcpy(text, "Klaw. Num. separator"); + if ( num == SDLK_SUBTRACT ) strcpy(text, "Klaw. Num. -"); + if ( num == SDLK_DECIMAL ) strcpy(text, "Klaw. Num. ."); + if ( num == SDLK_DIVIDE ) strcpy(text, "Klaw. Num. /"); + if ( num == SDLK_F1 ) strcpy(text, "F1"); + if ( num == SDLK_F2 ) strcpy(text, "F2"); + if ( num == SDLK_F3 ) strcpy(text, "F3"); + if ( num == SDLK_F4 ) strcpy(text, "F4"); + if ( num == SDLK_F5 ) strcpy(text, "F5"); + if ( num == SDLK_F6 ) strcpy(text, "F6"); + if ( num == SDLK_F7 ) strcpy(text, "F7"); + if ( num == SDLK_F8 ) strcpy(text, "F8"); + if ( num == SDLK_F9 ) strcpy(text, "F9"); + if ( num == SDLK_F10 ) strcpy(text, "F10"); + if ( num == SDLK_F11 ) strcpy(text, "F11"); + if ( num == SDLK_F12 ) strcpy(text, "F12"); + if ( num == SDLK_F13 ) strcpy(text, "F13"); + if ( num == SDLK_F14 ) strcpy(text, "F14"); + if ( num == SDLK_F15 ) strcpy(text, "F15"); + if ( num == SDLK_F16 ) strcpy(text, "F16"); + if ( num == SDLK_F17 ) strcpy(text, "F17"); + if ( num == SDLK_F18 ) strcpy(text, "F18"); + if ( num == SDLK_F19 ) strcpy(text, "F19"); + if ( num == SDLK_F20 ) strcpy(text, "F20"); + if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); + if ( num == SDLK_SCROLL ) strcpy(text, "Scroll Lock"); + if ( num == SDLK_ATTN ) strcpy(text, "Attn"); + if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); + if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); + if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); + if ( num == SDLK_PLAY ) strcpy(text, "Graj"); + if ( num == SDLK_ZOOM ) strcpy(text, "Powi�kszenie"); + if ( num == SDLK_PA1 ) strcpy(text, "PA1"); + if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Wyczy��"); + if ( num == SDLK_BUTTON1 ) strcpy(text, "Przycisk 1"); + if ( num == SDLK_BUTTON2 ) strcpy(text, "Przycisk 2"); + if ( num == SDLK_BUTTON3 ) strcpy(text, "Przycisk 3"); + if ( num == SDLK_BUTTON4 ) strcpy(text, "Przycisk 4"); + if ( num == SDLK_BUTTON5 ) strcpy(text, "Przycisk 5"); + if ( num == SDLK_BUTTON6 ) strcpy(text, "Przycisk 6"); + if ( num == SDLK_BUTTON7 ) strcpy(text, "Przycisk 7"); + if ( num == SDLK_BUTTON8 ) strcpy(text, "Przycisk 8"); + if ( num == SDLK_BUTTON9 ) strcpy(text, "Przycisk 9"); + if ( num == SDLK_BUTTON10 ) strcpy(text, "Przycisk 10"); + if ( num == SDLK_BUTTON11 ) strcpy(text, "Przycisk 11"); + if ( num == SDLK_BUTTON12 ) strcpy(text, "Przycisk 12"); + if ( num == SDLK_BUTTON13 ) strcpy(text, "Przycisk 13"); + if ( num == SDLK_BUTTON14 ) strcpy(text, "Przycisk 14"); + if ( num == SDLK_BUTTON15 ) strcpy(text, "Przycisk 15"); + if ( num == SDLK_BUTTON16 ) strcpy(text, "Przycisk 16"); + if ( num == SDLK_BUTTON17 ) strcpy(text, "Przycisk 17"); + if ( num == SDLK_BUTTON18 ) strcpy(text, "Przycisk 18"); + if ( num == SDLK_BUTTON19 ) strcpy(text, "Przycisk 19"); + if ( num == SDLK_BUTTON20 ) strcpy(text, "Przycisk 20"); + if ( num == SDLK_BUTTON21 ) strcpy(text, "Przycisk 21"); + if ( num == SDLK_BUTTON22 ) strcpy(text, "Przycisk 22"); + if ( num == SDLK_BUTTON23 ) strcpy(text, "Przycisk 23"); + if ( num == SDLK_BUTTON24 ) strcpy(text, "Przycisk 24"); + if ( num == SDLK_BUTTON25 ) strcpy(text, "Przycisk 25"); + if ( num == SDLK_BUTTON26 ) strcpy(text, "Przycisk 26"); + if ( num == SDLK_BUTTON27 ) strcpy(text, "Przycisk 27"); + if ( num == SDLK_BUTTON28 ) strcpy(text, "Przycisk 28"); + if ( num == SDLK_BUTTON29 ) strcpy(text, "Przycisk 29"); + if ( num == SDLK_BUTTON30 ) strcpy(text, "Przycisk 30"); + if ( num == SDLK_BUTTON31 ) strcpy(text, "Przycisk 31"); + if ( num == SDLK_BUTTON32 ) strcpy(text, "Przycisk 32"); + if ( num == SDLK_WHEELUP ) strcpy(text, "K�ko w g�r�"); + if ( num == SDLK_WHEELDOWN ) strcpy(text, "K�ko w d�"); } #endif diff --git a/src/common/restext.h b/src/common/restext.h index d5f22de..abd8fd9 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -18,11 +18,11 @@ #pragma once - +//#include "graphics/engine/engine.h" #include "common/event.h" -class CD3DEngine; +class Gfx::CEngine; @@ -32,7 +32,7 @@ class CD3DEngine; enum ResType { RES_TEXT = 0, // RT_* - RES_EVENT = 1, // EVENT_* (EventMsg) + RES_EVENT = 1, // EVENT_* (EventType) RES_OBJECT = 2, // OBJECT_* (ObjectType) RES_ERR = 3, // ERR_* (Error) RES_KEY = 4, // VK_* (keys) @@ -145,10 +145,10 @@ enum ResTextType }; -static CD3DEngine* g_engine = 0; +static Gfx::CEngine* g_engine = 0; static char g_gamerName[100]; -extern void SetEngine(CD3DEngine *engine); +extern void SetEngine(Gfx::CEngine *engine); extern void SetGlobalGamerName(char *name); extern bool SearchKey(char *cmd, KeyRank &key); extern void PutKeyName(char* dst, char* src); diff --git a/src/object/robotmain.h b/src/object/robotmain.h index 559453b..d3b2e4d 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -22,12 +22,14 @@ #include #include "common/misc.h" -#include "old/d3dengine.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" #include "object/object.h" #include "object/mainmovie.h" -#include "old/camera.h" -#include "old/particule.h" - +//#include "old/camera.h" +#include "graphics/engine/camera.h" +//#include "old/particule.h" +#include "graphics/engine/particle.h" enum Phase { @@ -260,7 +262,7 @@ public: void HideDropZone(CObject* metal); void ShowDropZone(CObject* metal, CObject* truck); void FlushShowLimit(int i); - void SetShowLimit(int i, ParticuleType parti, CObject *pObj, Math::Vector pos, float radius, float duration=SHOWLIMITTIME); + void SetShowLimit(int i, Gfx::ParticleType parti, CObject *pObj, Math::Vector pos, float radius, float duration=SHOWLIMITTIME); void AdjustShowLimit(int i, Math::Vector pos); void StartShowLimit(); void FrameShowLimit(float rTime); @@ -287,7 +289,7 @@ public: void IOWriteObject(FILE *file, CObject* pObj, char *cmd); CObject* IOReadObject(char *line, char* filename, int objRank); - int CreateSpot(Math::Vector pos, D3DCOLORVALUE color); + int CreateSpot(Math::Vector pos, Gfx::Color color); protected: bool EventFrame(const Event &event); @@ -300,7 +302,7 @@ protected: void CreateModel(); Math::Vector LookatPoint( Math::Vector eye, float angleH, float angleV, float length ); CObject* CreateObject(Math::Vector pos, float angle, float zoom, float height, ObjectType type, float power=1.0f, bool bTrainer=false, bool bToy=false, int option=0); - int CreateLight(Math::Vector direction, D3DCOLORVALUE color); + int CreateLight(Math::Vector direction, Gfx::Color color); void HiliteClear(); void HiliteObject(Math::Point pos); void HiliteFrame(float rTime); @@ -309,7 +311,7 @@ protected: CObject* DetectObject(Math::Point pos); void ChangeCamera(); void RemoteCamera(float pan, float zoom, float rTime); - void KeyCamera(EventMsg event, long param); + void KeyCamera(EventType event, long param); void AbortMovie(); bool IsSelectable(CObject* pObj); void SelectOneObject(CObject* pObj, bool bDisplayError=true); @@ -319,7 +321,7 @@ protected: void UpdateInfoText(); CObject* SearchObject(ObjectType type); CObject* RetSelect(); - void StartDisplayVisit(EventMsg event); + void StartDisplayVisit(EventType event); void FrameVisit(float rTime); void StopDisplayVisit(); void ExecuteCmd(char *cmd); @@ -333,7 +335,7 @@ protected: CMainMap* m_map; CEvent* m_event; CD3DEngine* m_engine; - CParticule* m_particule; + Gfx::CParticle* m_particule; CWater* m_water; CCloud* m_cloud; CBlitz* m_blitz; @@ -359,7 +361,7 @@ protected: Phase m_phase; int m_cameraRank; - D3DCOLORVALUE m_color; + Gfx::Color m_color; bool m_bFreePhoto; bool m_bCmdEdit; bool m_bShowPos; @@ -420,7 +422,7 @@ protected: float m_cameraPan; float m_cameraZoom; - EventMsg m_visitLast; + EventType m_visitLast; CObject* m_visitObject; CObject* m_visitArrow; float m_visitTime; @@ -446,14 +448,14 @@ protected: ShowLimit m_showLimit[MAXSHOWLIMIT]; - D3DCOLORVALUE m_colorRefBot; - D3DCOLORVALUE m_colorNewBot; - D3DCOLORVALUE m_colorRefAlien; - D3DCOLORVALUE m_colorNewAlien; - D3DCOLORVALUE m_colorRefGreen; - D3DCOLORVALUE m_colorNewGreen; - D3DCOLORVALUE m_colorRefWater; - D3DCOLORVALUE m_colorNewWater; + Gfx::Color m_colorRefBot; + Gfx::Color m_colorNewBot; + Gfx::Color m_colorRefAlien; + Gfx::Color m_colorNewAlien; + Gfx::Color m_colorRefGreen; + Gfx::Color m_colorNewGreen; + Gfx::Color m_colorRefWater; + Gfx::Color m_colorNewWater; float m_colorShiftWater; }; diff --git a/src/ui/button.cpp b/src/ui/button.cpp index 0147f63..ab2c644 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -15,15 +15,16 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "common/language.h" -#include "old/math3d.h" -#include "common/event.h" +//#include +//#include +//#include + +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +//#include "common/language.h" +//#include "old/math3d.h" +//#include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" @@ -55,18 +56,18 @@ CButton::~CButton() // Creates a new button. -bool CButton::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CButton::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); if ( icon == -1 ) { char name[100]; char* p; - GetResource(RES_EVENT, eventMsg, name); + GetResource(RES_EVENT, eventType, name); p = strchr(name, '\\'); if ( p != 0 ) *p = 0; SetName(name); @@ -85,7 +86,7 @@ bool CButton::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { if ( m_bRepeat && m_repeat != 0.0f ) { @@ -95,14 +96,15 @@ bool CButton::EventProcess(const Event &event) m_repeat = DELAY2; Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } } } - if ( event.event == EVENT_LBUTTONDOWN && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1 && (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { @@ -114,25 +116,27 @@ bool CButton::EventProcess(const Event &event) if ( m_bImmediat || m_bRepeat ) { Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } return false; } } - if ( event.event == EVENT_MOUSEMOVE && m_bCapture ) + if ( event.type == EVENT_MOUSE_MOVE && m_bCapture ) { } - if ( event.event == EVENT_LBUTTONUP && m_bCapture ) + if ( event.type == EVENT_MOUSE_BUTTON_UP && //left + event.mouseButton.button == 1 && + m_bCapture ) { if ( CControl::Detect(event.pos) ) { if ( !m_bImmediat && !m_bRepeat ) { Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } } @@ -182,7 +186,7 @@ void CButton::Draw() (m_state & STATE_SIMPLY) == 0 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); dp = 0.5f/256.0f; @@ -225,7 +229,7 @@ void CButton::SetImmediat(bool bImmediat) m_bImmediat = bImmediat; } -bool CButton::RetImmediat() +bool CButton::GetImmediat() { return m_bImmediat; } @@ -239,7 +243,7 @@ void CButton::SetRepeat(bool bRepeat) m_bRepeat = bRepeat; } -bool CButton::RetRepeat() +bool CButton::GetRepeat() { return m_bRepeat; } diff --git a/src/ui/button.h b/src/ui/button.h index 0a05b11..38b2dab 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -22,7 +22,7 @@ #include "ui/control.h" -class CD3DEngine; +//class CD3DEngine; @@ -32,17 +32,17 @@ public: CButton(CInstanceManager* iMan); virtual ~CButton(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); void Draw(); void SetImmediat(bool bRepeat); - bool RetImmediat(); + bool GetImmediat(); void SetRepeat(bool bRepeat); - bool RetRepeat(); + bool GetRepeat(); protected: diff --git a/src/ui/check.cpp b/src/ui/check.cpp index 18c7633..424e4fc 100644 --- a/src/ui/check.cpp +++ b/src/ui/check.cpp @@ -15,18 +15,19 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include +//#include #include -#include +//#include #include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" -#include "old/text.h" +//#include "old/text.h" #include "ui/check.h" @@ -47,16 +48,16 @@ CCheck::~CCheck() // Creates a new button. -bool CCheck::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CCheck::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { char name[100]; char* p; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); - GetResource(RES_EVENT, eventMsg, name); + GetResource(RES_EVENT, eventType, name); p = strchr(name, '\\'); if ( p != 0 ) *p = 0; SetName(name); @@ -73,14 +74,15 @@ bool CCheck::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_LBUTTONDOWN && - (m_state & STATE_VISIBLE) && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1 && + (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { if ( CControl::Detect(event.pos) ) { Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } @@ -109,7 +111,7 @@ void CCheck::Draw() } m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); zoomExt = 1.00f; zoomInt = 0.95f; @@ -143,7 +145,7 @@ void CCheck::Draw() if ( (m_state & STATE_DEAD) == 0 ) { - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); if ( m_state & STATE_CHECK ) { @@ -159,8 +161,8 @@ void CCheck::Draw() // Draw the name. pos.x = m_pos.x+m_dim.y/0.9f; pos.y = m_pos.y+m_dim.y*0.50f; - pos.y -= m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2.0f; - m_engine->RetText()->DrawText(m_name, pos, m_dim.x, 1, m_fontSize, m_fontStretch, m_fontType, 0); + pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f; + m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } diff --git a/src/ui/check.h b/src/ui/check.h index 24c58f3..3af6849 100644 --- a/src/ui/check.h +++ b/src/ui/check.h @@ -32,7 +32,7 @@ public: CCheck(CInstanceManager* iMan); virtual ~CCheck(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); diff --git a/src/ui/color.cpp b/src/ui/color.cpp index 1038343..3ba68b3 100644 --- a/src/ui/color.cpp +++ b/src/ui/color.cpp @@ -15,14 +15,16 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include +//#include #include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "common/language.h" -#include "old/math3d.h" +//#include + +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +#include "graphics/core/device.h" +//#include "common/language.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -58,18 +60,18 @@ CColor::~CColor() // Creates a new button. -bool CColor::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CColor::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); if ( icon == -1 ) { char name[100]; char* p; - GetResource(RES_EVENT, eventMsg, name); + GetResource(RES_EVENT, eventType, name); p = strchr(name, '\\'); if ( p != 0 ) *p = 0; SetName(name); @@ -87,7 +89,7 @@ bool CColor::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_FRAME && m_bRepeat ) + if ( event.type == EVENT_FRAME && m_bRepeat ) { if ( m_repeat != 0.0f ) { @@ -97,14 +99,15 @@ bool CColor::EventProcess(const Event &event) m_repeat = DELAY2; Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } } } - if ( event.event == EVENT_LBUTTONDOWN && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1 && (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { @@ -113,13 +116,13 @@ bool CColor::EventProcess(const Event &event) m_repeat = DELAY1; Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } } - if ( event.event == EVENT_LBUTTONUP ) + if ( event.type == EVENT_MOUSE_BUTTON_UP && event.mouseButton.button == 1) { m_repeat = 0.0f; } @@ -132,9 +135,9 @@ bool CColor::EventProcess(const Event &event) void CColor::Draw() { - LPDIRECT3DDEVICE7 device; - D3DLVERTEX vertex[4]; // 2 triangles - D3DCOLOR color; + Gfx::CDevice* device; + Gfx::VertexCol vertex[4]; // 2 triangles + Gfx::Color color; Math::Point p1, p2; if ( (m_state & STATE_VISIBLE) == 0 ) return; @@ -145,36 +148,37 @@ void CColor::Draw() } m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); CControl::Draw(); #if _TEEN - color = ::RetColor(m_color); +// color = GetColor(m_color); + color = GetColor(); m_engine->SetTexture("xxx.tga"); // no texture - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); p1.x = m_pos.x+(4.0f/640.0f); p1.y = m_pos.y+(4.0f/480.0f); p2.x = m_pos.x+m_dim.x-(4.0f/640.0f); p2.y = m_pos.y+m_dim.y-(4.0f/480.0f); - vertex[0] = D3DLVERTEX(D3DVECTOR(p1.x, p1.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - vertex[1] = D3DLVERTEX(D3DVECTOR(p1.x, p2.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - vertex[2] = D3DLVERTEX(D3DVECTOR(p2.x, p1.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - vertex[3] = D3DLVERTEX(D3DVECTOR(p2.x, p2.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, vertex, 4, NULL); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); p1.x = m_pos.x+(5.0f/640.0f); p1.y = m_pos.y+(5.0f/480.0f); p2.x = m_pos.x+m_dim.x-(5.0f/640.0f); p2.y = m_pos.y+m_dim.y-(5.0f/480.0f); - vertex[0] = D3DLVERTEX(D3DVECTOR(p1.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[1] = D3DLVERTEX(D3DVECTOR(p1.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[2] = D3DLVERTEX(D3DVECTOR(p2.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[3] = D3DLVERTEX(D3DVECTOR(p2.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, vertex, 4, NULL); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(4); #else @@ -183,18 +187,18 @@ void CColor::Draw() p2.x = m_pos.x+m_dim.x-(3.0f/640.0f); p2.y = m_pos.y+m_dim.y-(3.0f/480.0f); - color = ::RetColor(m_color); + color = GetColor(); m_engine->SetTexture("xxx.tga"); // no texture - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - vertex[0] = D3DLVERTEX(D3DVECTOR(p1.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[1] = D3DLVERTEX(D3DVECTOR(p1.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[2] = D3DLVERTEX(D3DVECTOR(p2.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[3] = D3DLVERTEX(D3DVECTOR(p2.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); + vertex[0] = Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, Math::Point( 0.0f,0.0f)); + vertex[1] = Gfx::VertexCol(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f,0.0f)); + vertex[2] = Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, Math::Point(0.0f,0.0f)); + vertex[3] = Gfx::VertexCol(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f,0.0f)); - device = m_engine->RetD3DDevice(); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, vertex, 4, NULL); + device = m_engine->GetDevice(); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(2); #endif } @@ -205,18 +209,18 @@ void CColor::SetRepeat(bool bRepeat) m_bRepeat = bRepeat; } -bool CColor::RetRepeat() +bool CColor::GetRepeat() { return m_bRepeat; } -void CColor::SetColor(D3DCOLORVALUE color) +void CColor::SetColor(Gfx::Color color) { m_color = color; } -D3DCOLORVALUE CColor::RetColor() +Gfx::Color CColor::GetColor() { return m_color; } diff --git a/src/ui/color.h b/src/ui/color.h index 41052a7..151a4df 100644 --- a/src/ui/color.h +++ b/src/ui/color.h @@ -20,10 +20,10 @@ #include "ui/control.h" -#include "old/d3dengine.h" +//#include "graphics/engine/engine.h" -class CD3DEngine; +//class CEngine; @@ -33,24 +33,24 @@ public: CColor(CInstanceManager* iMan); virtual ~CColor(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); void Draw(); void SetRepeat(bool bRepeat); - bool RetRepeat(); + bool GetRepeat(); - void SetColor(D3DCOLORVALUE color); - D3DCOLORVALUE RetColor(); + void SetColor(Gfx::Color color); + Gfx::Color GetColor(); protected: protected: - bool m_bRepeat; - float m_repeat; - D3DCOLORVALUE m_color; + bool m_bRepeat; + float m_repeat; + Gfx::Color m_color; }; diff --git a/src/ui/compass.cpp b/src/ui/compass.cpp index 7ea6e9d..d4a15a8 100644 --- a/src/ui/compass.cpp +++ b/src/ui/compass.cpp @@ -15,14 +15,16 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include +//#include #include -#include +//#include -#include "common/struct.h" +//#include "common/struct.h" #include "math/geometry.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +#include "graphics/core/device.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -47,11 +49,11 @@ CCompass::~CCompass() // Creates a new button. -bool CCompass::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CCompass::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); return true; } @@ -62,12 +64,13 @@ bool CCompass::EventProcess(const Event &event) { CControl::EventProcess(event); - if ( event.event == EVENT_LBUTTONDOWN ) + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1) { if ( CControl::Detect(event.pos) ) { Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } @@ -81,18 +84,18 @@ bool CCompass::EventProcess(const Event &event) void CCompass::Draw() { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[4]; // 2 triangles - Math::Point p1, p2, p3, c, uv1, uv2; - Math::Vector n; - float dp; + Gfx::CDevice* device; + Gfx::Vertex vertex[4]; // 2 triangles + Math::Point p1, p2, p3, c, uv1, uv2; + Math::Vector n; + float dp; if ( (m_state & STATE_VISIBLE) == 0 ) return; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); p1.x = m_pos.x; p1.y = m_pos.y; @@ -115,12 +118,12 @@ void CCompass::Draw() n = Math::Vector(0.0f, 0.0f, -1.0f); // normal - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv2.y); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, uv1.x,uv1.y); - vertex[2] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, uv2.x,uv2.y); - vertex[3] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv2.x,uv1.y); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point( uv1.x,uv2.y)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point( uv1.x,uv1.y)); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point( uv2.x,uv2.y)); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point( uv2.x,uv1.y)); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 4, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(2); if ( m_state & STATE_ENABLE ) @@ -150,11 +153,11 @@ void CCompass::Draw() uv2.x -= dp; uv2.y -= dp; - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv1.y); - vertex[1] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv1.x,uv2.y); - vertex[2] = D3DVERTEX2(Math::Vector(p3.x, p3.y, 0.0f), n, uv2.x,uv2.y); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point( uv1.x,uv1.y)); + vertex[1] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point( uv1.x,uv2.y)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point( uv2.x,uv2.y)); - device->DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_VERTEX2, vertex, 3, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLES, vertex, 3); m_engine->AddStatisticTriangle(1); } } diff --git a/src/ui/compass.h b/src/ui/compass.h index 0014f3d..ac5f608 100644 --- a/src/ui/compass.h +++ b/src/ui/compass.h @@ -22,7 +22,7 @@ #include "ui/control.h" -class CD3DEngine; +//class CEngine; @@ -32,7 +32,7 @@ public: CCompass(CInstanceManager* iMan); virtual ~CCompass(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 6ff7c2f..867958c 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -1,6 +1,7 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch -// * +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) +// // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by // * the Free Software Foundation, either version 3 of the License, or @@ -15,23 +16,26 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include +//#include #include -#include +//#include +#include "graphics/core/device.h" #include "common/struct.h" -#include "old/d3dengine.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" #include "common/language.h" #include "common/restext.h" -#include "old/math3d.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "object/robotmain.h" -#include "old/particule.h" -#include "common/misc.h" +//#include "old/particule.h" +#include "graphics/engine/particle.h" #include "common/iman.h" -#include "old/text.h" -#include "old/sound.h" +//#include "old/text.h" +#include "graphics/engine/text.h" +//#include "old/sound.h" #include "ui/control.h" @@ -43,17 +47,18 @@ CControl::CControl(CInstanceManager* iMan) { m_iMan = iMan; - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); - m_event = (CEvent*)m_iMan->SearchInstance(CLASS_EVENT); - m_main = (CRobotMain*)m_iMan->SearchInstance(CLASS_MAIN); - m_particule = (CParticule*)m_iMan->SearchInstance(CLASS_PARTICULE); - m_sound = (CSound*)m_iMan->SearchInstance(CLASS_SOUND); - m_eventMsg = EVENT_NULL; + m_engine = static_cast< Gfx::CEngine* > ( m_iMan->SearchInstance(CLASS_ENGINE) ); + m_event = static_cast< CEventQueue* > ( m_iMan->SearchInstance(CLASS_EVENT) ); + m_main = static_cast< CRobotMain* > ( m_iMan->SearchInstance(CLASS_MAIN) ); + m_particle = static_cast< Gfx::CParticle* > (m_iMan->SearchInstance(CLASS_PARTICULE)); + m_sound = static_cast< CSound* > (m_iMan->SearchInstance(CLASS_SOUND)); + m_eventType = EVENT_NULL; m_state = STATE_ENABLE|STATE_VISIBLE|STATE_GLINT; - m_fontSize = SMALLFONT; - m_fontStretch = NORMSTRETCH; - m_fontType = FONT_COLOBOT; - m_justif = 0; + m_fontSize = Gfx::FONT_SIZE_SMALL; +// m_fontStretch = Gfx::FONT_NORM_STRETCH; //there is font stretching no more master + m_fontType = Gfx::FONT_COLOBOT; + m_textAlign = Gfx::TEXT_ALIGN_CENTER; //instead m_justify +// m_justif = 0; m_name[0] = 0; m_tooltip[0] = 0; m_bFocus = false; @@ -76,23 +81,23 @@ CControl::~CControl() // Creates a new button. // pos: [0..1] -bool CControl::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CControl::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { char text[100]; char* p; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); m_pos = pos; m_dim = dim; m_icon = icon; - m_eventMsg = eventMsg; + m_eventType = eventType; pos.x = m_pos.x; pos.y = m_pos.y+m_dim.y; GlintCreate(pos); - GetResource(RES_EVENT, m_eventMsg, text); + GetResource(RES_EVENT, m_eventType, text); p = strchr(text, '\\'); if ( p == 0 ) { @@ -119,7 +124,7 @@ void CControl::SetPos(Math::Point pos) GlintCreate(pos); } -Math::Point CControl::RetPos() +Math::Point CControl::GetPos() { return m_pos; } @@ -135,7 +140,7 @@ void CControl::SetDim(Math::Point dim) GlintCreate(pos); } -Math::Point CControl::RetDim() +Math::Point CControl::GetDim() { return m_dim; } @@ -175,7 +180,7 @@ bool CControl::TestState(int state) // Returns all attributes of state. -int CControl::RetState() +int CControl::GetState() { return m_state; } @@ -188,7 +193,7 @@ void CControl::SetIcon(int icon) m_icon = icon; } -int CControl::RetIcon() +int CControl::GetIcon() { return m_icon; } @@ -230,7 +235,7 @@ void CControl::SetName(char* name, bool bTooltip) } } -char* CControl::RetName() +char* CControl::GetName() { return m_name; } @@ -238,14 +243,16 @@ char* CControl::RetName() // Management of the mode of justification (-1,0,1). -void CControl::SetJustif(int mode) +void CControl::SetTextAlign(Gfx::TextAlign mode) { - m_justif = mode; + m_textAlign = mode; +// m_justif = mode; } -int CControl::RetJustif() +int CControl::GetTextAlign() { - return m_justif; + return m_textAlign; +// return m_justif; } @@ -256,7 +263,7 @@ void CControl::SetFontSize(float size) m_fontSize = size; } -float CControl::RetFontSize() +float CControl::GetFontSize() { return m_fontSize; } @@ -269,7 +276,7 @@ void CControl::SetFontStretch(float stretch) m_fontStretch = stretch; } -float CControl::RetFontStretch() +float CControl::GetFontStretch() { return m_fontStretch; } @@ -277,12 +284,12 @@ float CControl::RetFontStretch() // Choice of the font. -void CControl::SetFontType(FontType font) +void CControl::SetFontType(Gfx::FontType font) { m_fontType = font; } -FontType CControl::RetFontType() +Gfx::FontType CControl::GetFontType() { return m_fontType; } @@ -316,7 +323,7 @@ void CControl::SetFocus(bool bFocus) m_bFocus = bFocus; } -bool CControl::RetFocus() +bool CControl::GetFocus() { return m_bFocus; } @@ -324,9 +331,9 @@ bool CControl::RetFocus() // Returns the event associated with the control. -EventMsg CControl::RetEventMsg() +EventType CControl::GetEventType() { - return m_eventMsg; + return m_eventType; } @@ -336,21 +343,21 @@ bool CControl::EventProcess(const Event &event) { if ( m_state & STATE_DEAD ) return true; - if ( event.event == EVENT_FRAME && m_bGlint ) + if ( event.type == EVENT_FRAME && m_bGlint ) { GlintFrame(event); } - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { - m_glintMouse = event.pos; + m_glintMouse = event.mouseMove.pos; - if ( Detect(event.pos) ) + if ( Detect(event.mouseMove.pos) ) { if ( (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE ) ) { - m_engine->SetMouseType(D3DMOUSEHAND); + m_engine->SetMouseType(Gfx::ENG_MOUSE_HAND); } SetState(STATE_HILIGHT); } @@ -360,7 +367,7 @@ bool CControl::EventProcess(const Event &event) } } - if ( event.event == EVENT_LBUTTONDOWN ) + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && event.mouseButton.button == 1) { if ( Detect(event.pos) ) { @@ -369,7 +376,7 @@ bool CControl::EventProcess(const Event &event) } } - if ( event.event == EVENT_MOUSEMOVE && m_bCapture ) + if ( event.type == EVENT_MOUSE_MOVE && m_bCapture ) { if ( Detect(event.pos) ) { @@ -381,7 +388,7 @@ bool CControl::EventProcess(const Event &event) } } - if ( event.event == EVENT_LBUTTONUP && m_bCapture ) + if ( event.type == EVENT_MOUSE_BUTTON_UP && m_bCapture && event.mouseButton.button == 1) { m_bCapture = false; ClearState(STATE_PRESS); @@ -458,8 +465,8 @@ void CControl::GlintFrame(const Event &event) speed = Math::Vector(0.0f, 0.0f, 0.0f); dim.x = ((15.0f+Math::Rand()*15.0f)/640.0f); dim.y = dim.x/0.75f; - m_particule->CreateParticule(pos, speed, dim, PARTICONTROL, - 1.0f, 0.0f, 0.0f, SH_INTERFACE); + m_particle->CreateParticle(pos, speed, dim, Gfx::PARTICONTROL, + 1.0f, 0.0f, 0.0f, Gfx::SH_INTERFACE ); m_glintProgress = 0.0f; } @@ -477,7 +484,7 @@ void CControl::Draw() if ( (m_state & STATE_VISIBLE) == 0 ) return; m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); zoomExt = 1.00f; zoomInt = 0.95f; @@ -550,23 +557,23 @@ void CControl::Draw() #else m_engine->SetTexture("text.tga"); #endif - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else if ( icon >= 128 ) { icon -= 128; m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else if ( icon >= 64 ) { icon -= 64; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else { - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } if ( icon != -1 ) { @@ -579,26 +586,28 @@ void CControl::Draw() if ( m_state & STATE_DEAD ) return; - if ( m_justif < 0 ) +// if ( m_justif < 0 ) + if ( m_textAlign == Gfx::TEXT_ALIGN_LEFT ) { pos.x = m_pos.x+m_dim.x-m_dim.y*0.5f; pos.y = m_pos.y+m_dim.y*0.5f; - pos.y -= m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2; - m_engine->RetText()->DrawText(m_name, pos, m_dim.x, m_justif, m_fontSize, m_fontStretch, m_fontType, 0); + pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f; + m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } - else if ( m_justif > 0 ) + else if ( m_textAlign == Gfx::TEXT_ALIGN_RIGHT ) +// else if ( m_justif > 0 ) { pos.x = m_pos.x+m_dim.y*0.5f; pos.y = m_pos.y+m_dim.y*0.5f; - pos.y -= m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2.0f; - m_engine->RetText()->DrawText(m_name, pos, m_dim.x, m_justif, m_fontSize, m_fontStretch, m_fontType, 0); + pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f; + m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } else { pos.x = m_pos.x+m_dim.x*0.5f; pos.y = m_pos.y+m_dim.y*0.5f; - pos.y -= m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2.0f; - m_engine->RetText()->DrawText(m_name, pos, m_dim.x, m_justif, m_fontSize, m_fontStretch, m_fontType, 0); + pos.y -= m_engine->GetText()->GetHeight( m_fontType, m_fontSize)/2.0f; + m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } } } @@ -652,12 +661,12 @@ void CControl::DrawPart(int icon, float zoom, float ex) void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math::Point uv2, float ex) { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[8]; // 6 triangles + Gfx::CDevice* device; + Gfx::Vertex vertex[8]; // 6 triangles Math::Point p1, p2, p3, p4; Math::Vector n; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); p1.x = pos.x; p1.y = pos.y; @@ -668,12 +677,12 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: if ( ex == 0.0f ) // one piece? { - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv2.y); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, uv1.x,uv1.y); - vertex[2] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, uv2.x,uv2.y); - vertex[3] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv2.x,uv1.y); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x,uv2.y)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv1.y)); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x,uv1.y)); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 4, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(2); } else // 3 pieces? @@ -683,16 +692,16 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: p3.x = p1.x + ex*dim.y/(uv2.y-uv1.y); p4.x = p2.x - ex*dim.y/(uv2.y-uv1.y); - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x, uv2.y); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, uv1.x, uv1.y); - vertex[2] = D3DVERTEX2(Math::Vector(p3.x, p1.y, 0.0f), n, uv1.x+ex,uv2.y); - vertex[3] = D3DVERTEX2(Math::Vector(p3.x, p2.y, 0.0f), n, uv1.x+ex,uv1.y); - vertex[4] = D3DVERTEX2(Math::Vector(p4.x, p1.y, 0.0f), n, uv2.x-ex,uv2.y); - vertex[5] = D3DVERTEX2(Math::Vector(p4.x, p2.y, 0.0f), n, uv2.x-ex,uv1.y); - vertex[6] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, uv2.x, uv2.y); - vertex[7] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv2.x, uv1.y); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p1.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y)); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p2.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y)); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p1.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y)); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p2.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv2.y)); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x, uv1.y)); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); } else @@ -700,16 +709,16 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: p3.y = p1.y + ex*dim.x/(uv2.x-uv1.x); p4.y = p2.y - ex*dim.x/(uv2.x-uv1.x); - vertex[0] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, uv2.x,uv2.y ); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv2.y ); - vertex[2] = D3DVERTEX2(Math::Vector(p2.x, p3.y, 0.0f), n, uv2.x,uv2.y-ex); - vertex[3] = D3DVERTEX2(Math::Vector(p1.x, p3.y, 0.0f), n, uv1.x,uv2.y-ex); - vertex[4] = D3DVERTEX2(Math::Vector(p2.x, p4.y, 0.0f), n, uv2.x,uv1.y+ex); - vertex[5] = D3DVERTEX2(Math::Vector(p1.x, p4.y, 0.0f), n, uv1.x,uv1.y+ex); - vertex[6] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv2.x,uv1.y ); - vertex[7] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, uv1.x,uv1.y ); + vertex[0] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x,uv2.y )); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x,uv2.y )); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x,uv2.y-ex)); + vertex[3] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x,uv2.y-ex)); + vertex[4] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x,uv1.y+ex)); + vertex[5] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x,uv1.y+ex)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x,uv1.y )); + vertex[7] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv1.y )); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); } } @@ -720,12 +729,12 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math::Point uv2, Math::Point corner, float ex) { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[8]; // 6 triangles + Gfx::CDevice* device; + Gfx::Vertex vertex[8]; // 6 triangles Math::Point p1, p2, p3, p4; Math::Vector n; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); p1.x = pos.x; p1.y = pos.y; @@ -747,39 +756,39 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: p4.y = p2.y - corner.y; // Bottom horizontal band. - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x, uv2.y ); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p3.y, 0.0f), n, uv1.x, uv2.y-ex); - vertex[2] = D3DVERTEX2(Math::Vector(p3.x, p1.y, 0.0f), n, uv1.x+ex,uv2.y ); - vertex[3] = D3DVERTEX2(Math::Vector(p3.x, p3.y, 0.0f), n, uv1.x+ex,uv2.y-ex); - vertex[4] = D3DVERTEX2(Math::Vector(p4.x, p1.y, 0.0f), n, uv2.x-ex,uv2.y ); - vertex[5] = D3DVERTEX2(Math::Vector(p4.x, p3.y, 0.0f), n, uv2.x-ex,uv2.y-ex); - vertex[6] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, uv2.x, uv2.y ); - vertex[7] = D3DVERTEX2(Math::Vector(p2.x, p3.y, 0.0f), n, uv2.x, uv2.y-ex); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y )); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y-ex)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p1.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y )); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y-ex)); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p1.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y )); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p3.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y-ex)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv2.y )); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y-ex)); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); // Central horizontal band. - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p3.y, 0.0f), n, uv1.x, uv2.y-ex); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p4.y, 0.0f), n, uv1.x, uv1.y+ex); - vertex[2] = D3DVERTEX2(Math::Vector(p3.x, p3.y, 0.0f), n, uv1.x+ex,uv2.y-ex); - vertex[3] = D3DVERTEX2(Math::Vector(p3.x, p4.y, 0.0f), n, uv1.x+ex,uv1.y+ex); - vertex[4] = D3DVERTEX2(Math::Vector(p4.x, p3.y, 0.0f), n, uv2.x-ex,uv2.y-ex); - vertex[5] = D3DVERTEX2(Math::Vector(p4.x, p4.y, 0.0f), n, uv2.x-ex,uv1.y+ex); - vertex[6] = D3DVERTEX2(Math::Vector(p2.x, p3.y, 0.0f), n, uv2.x, uv2.y-ex); - vertex[7] = D3DVERTEX2(Math::Vector(p2.x, p4.y, 0.0f), n, uv2.x, uv1.y+ex); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y-ex)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y+ex)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y-ex)); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p4.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y+ex)); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p3.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y-ex)); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y+ex)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y-ex)); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y+ex)); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); // Top horizontal band. - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p4.y, 0.0f), n, uv1.x, uv1.y+ex); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, uv1.x, uv1.y ); - vertex[2] = D3DVERTEX2(Math::Vector(p3.x, p4.y, 0.0f), n, uv1.x+ex,uv1.y+ex); - vertex[3] = D3DVERTEX2(Math::Vector(p3.x, p2.y, 0.0f), n, uv1.x+ex,uv1.y ); - vertex[4] = D3DVERTEX2(Math::Vector(p4.x, p4.y, 0.0f), n, uv2.x-ex,uv1.y+ex); - vertex[5] = D3DVERTEX2(Math::Vector(p4.x, p2.y, 0.0f), n, uv2.x-ex,uv1.y ); - vertex[6] = D3DVERTEX2(Math::Vector(p2.x, p4.y, 0.0f), n, uv2.x, uv1.y+ex); - vertex[7] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv2.x, uv1.y ); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 8, NULL); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y+ex)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y )); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p4.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y+ex)); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p2.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y )); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y+ex)); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p2.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y )); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y+ex)); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x, uv1.y )); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); } @@ -793,7 +802,7 @@ void CControl::DrawWarning(Math::Point pos, Math::Point dim) dp = 0.5f/256.0f; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; uv1.y = 208.0f/256.0f; @@ -837,7 +846,7 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep) dp = 0.5f/256.0f; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState( Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x += deep*0.010f*0.75f; pos.y -= deep*0.015f; diff --git a/src/ui/control.h b/src/ui/control.h index 0a12ff1..b211ff6 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -19,16 +19,18 @@ #pragma once -#include "old/text.h" +//#include "old/text.h" #include "common/struct.h" #include "common/event.h" - +#include "graphics/engine/engine.h" +#include "graphics/engine/text.h" +#include "graphics/engine/particle.h" class CInstanceManager; class CEvent; -class CD3DEngine; +//class Gfx::CEngine; class CRobotMain; -class CParticule; +//class Gfx::CParticle; class CSound; @@ -61,39 +63,39 @@ public: CControl(CInstanceManager* iMan); virtual ~CControl(); - virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - - virtual bool EventProcess(const Event &event); - - virtual void SetPos(Math::Point pos); - virtual Math::Point RetPos(); - virtual void SetDim(Math::Point dim); - virtual Math::Point RetDim(); - virtual bool SetState(int state, bool bState); - virtual bool SetState(int state); - virtual bool ClearState(int state); - virtual bool TestState(int state); - virtual int RetState(); - virtual void SetIcon(int icon); - virtual int RetIcon(); - virtual void SetName(char* name, bool bTooltip=true); - virtual char* RetName(); - virtual void SetJustif(int mode); - virtual int RetJustif(); - virtual void SetFontSize(float size); - virtual float RetFontSize(); - virtual void SetFontStretch(float stretch); - virtual float RetFontStretch(); - virtual void SetFontType(FontType font); - virtual FontType RetFontType(); - virtual bool SetTooltip(char* name); - virtual bool GetTooltip(Math::Point pos, char* name); - virtual void SetFocus(bool bFocus); - virtual bool RetFocus(); - - virtual EventMsg RetEventMsg(); - - virtual void Draw(); + virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); + + virtual bool EventProcess(const Event &event); + + virtual void SetPos(Math::Point pos); + virtual Math::Point GetPos(); + virtual void SetDim(Math::Point dim); + virtual Math::Point GetDim(); + virtual bool SetState(int state, bool bState); + virtual bool SetState(int state); + virtual bool ClearState(int state); + virtual bool TestState(int state); + virtual int GetState(); + virtual void SetIcon(int icon); + virtual int GetIcon(); + virtual void SetName(char* name, bool bTooltip=true); + virtual char* GetName(); + virtual void SetTextAlign(Gfx::TextAlign mode); + virtual int GetTextAlign(); + virtual void SetFontSize(float size); + virtual float GetFontSize(); + virtual void SetFontStretch(float stretch); + virtual float GetFontStretch(); + virtual void SetFontType(Gfx::FontType font); + virtual Gfx::FontType GetFontType(); + virtual bool SetTooltip(char* name); + virtual bool GetTooltip(Math::Point pos, char* name); + virtual void SetFocus(bool bFocus); + virtual bool GetFocus(); + + virtual EventType GetEventType(); + + virtual void Draw(); protected: void GlintDelete(); @@ -108,31 +110,32 @@ protected: protected: CInstanceManager* m_iMan; - CD3DEngine* m_engine; - CEvent* m_event; - CRobotMain* m_main; - CParticule* m_particule; - CSound* m_sound; - - Math::Point m_pos; // corner upper / left - Math::Point m_dim; // dimensions - int m_icon; - EventMsg m_eventMsg; // message to send when clicking - int m_state; // states (STATE_ *) - float m_fontSize; // size of the button name - float m_fontStretch; // stretch of the font - FontType m_fontType; // type of font - int m_justif; // type of justification (-1,0,1) - char m_name[100]; // name of the button - char m_tooltip[100]; // name of tooltip - bool m_bFocus; - bool m_bCapture; - - bool m_bGlint; - Math::Point m_glintCorner1; - Math::Point m_glintCorner2; - float m_glintProgress; - Math::Point m_glintMouse; + Gfx::CEngine* m_engine; + CEventQueue* m_event; + CRobotMain* m_main; + Gfx::CParticle* m_particle; + CSound* m_sound; + + Math::Point m_pos; // corner upper / left + Math::Point m_dim; // dimensions + int m_icon; + EventType m_eventType; // message to send when clicking + int m_state; // states (STATE_ *) + float m_fontSize; // size of the button name + float m_fontStretch; // stretch of the font + Gfx::FontType m_fontType; // type of font + Gfx::TextAlign m_textAlign; //type of alignment //comes in the place of m_justif +// int m_justif; // type of justification (-1,0,1) + char m_name[100]; // name of the button + char m_tooltip[100]; // name of tooltip + bool m_bFocus; + bool m_bCapture; + + bool m_bGlint; + Math::Point m_glintCorner1; + Math::Point m_glintCorner2; + float m_glintProgress; + Math::Point m_glintMouse; }; diff --git a/src/ui/gauge.cpp b/src/ui/gauge.cpp index 13cd4f7..a4571da 100644 --- a/src/ui/gauge.cpp +++ b/src/ui/gauge.cpp @@ -17,13 +17,13 @@ // gauge.cpp -#include +//#include #include -#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -48,11 +48,11 @@ CGauge::~CGauge() // Creates a new button. -bool CGauge::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CGauge::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); return true; } @@ -63,12 +63,12 @@ bool CGauge::EventProcess(const Event &event) { CControl::EventProcess(event); - if ( event.event == EVENT_LBUTTONDOWN ) + if ( event.type == EVENT_MOUSE_BUTTON_DOWN ) { if ( CControl::Detect(event.pos) ) { Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } @@ -88,7 +88,7 @@ void CGauge::Draw() if ( (m_state & STATE_VISIBLE) == 0 ) return; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); dp = 0.5f/256.0f; @@ -149,7 +149,7 @@ void CGauge::SetLevel(float level) m_level = level; } -float CGauge::RetLevel() +float CGauge::GetLevel() { return m_level; } diff --git a/src/ui/gauge.h b/src/ui/gauge.h index bdc85ff..1686c56 100644 --- a/src/ui/gauge.h +++ b/src/ui/gauge.h @@ -22,7 +22,7 @@ #include "ui/control.h" -class CD3DEngine; +//class CD3DEngine; @@ -32,14 +32,14 @@ public: CGauge(CInstanceManager* iMan); virtual ~CGauge(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); void Draw(); void SetLevel(float level); - float RetLevel(); + float GetLevel(); protected: diff --git a/src/ui/group.cpp b/src/ui/group.cpp index 06290e4..d2cd192 100644 --- a/src/ui/group.cpp +++ b/src/ui/group.cpp @@ -17,13 +17,14 @@ // group.cpp -#include +//#include #include -#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -48,18 +49,18 @@ CGroup::~CGroup() // Creates a new button. -bool CGroup::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CGroup::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); if ( icon == -1 ) { char name[100]; char* p; - GetResource(RES_EVENT, eventMsg, name); + GetResource(RES_EVENT, eventType, name); p = strchr(name, '\\'); if ( p != 0 ) *p = 0; SetName(name); @@ -97,7 +98,7 @@ void CGroup::Draw() if ( m_icon == 0 ) // hollow frame? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 160.0f/256.0f; uv1.y = 192.0f/256.0f; // u-v texture uv2.x = 192.0f/256.0f; @@ -113,7 +114,7 @@ void CGroup::Draw() if ( m_icon == 1 ) // orange solid opaque? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 104.0f/256.0f; uv1.y = 48.0f/256.0f; uv2.x = 112.0f/256.0f; @@ -127,7 +128,7 @@ void CGroup::Draw() if ( m_icon == 2 ) // orange degrade -> transparent? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 112.0f/256.0f; uv1.y = 48.0f/256.0f; uv2.x = 120.0f/256.0f; @@ -141,7 +142,7 @@ void CGroup::Draw() if ( m_icon == 3 ) // transparent gradient -> gray? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 120.0f/256.0f; uv1.y = 48.0f/256.0f; uv2.x = 128.0f/256.0f; @@ -155,7 +156,7 @@ void CGroup::Draw() if ( m_icon == 4 ) // degrade blue corner? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 192.0f/256.0f; uv1.y = 128.0f/256.0f; uv2.x = 224.0f/256.0f; @@ -169,7 +170,7 @@ void CGroup::Draw() if ( m_icon == 5 ) // degrade orange corner? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 224.0f/256.0f; uv1.y = 128.0f/256.0f; uv2.x = 256.0f/256.0f; @@ -183,7 +184,7 @@ void CGroup::Draw() if ( m_icon == 6 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 0.0f/256.0f; // brown transparent uv1.y = 75.0f/256.0f; uv2.x = 64.0f/256.0f; @@ -199,7 +200,7 @@ void CGroup::Draw() if ( m_icon == 7 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; uv1.y = 0.0f/256.0f; uv2.x = 96.0f/256.0f; @@ -213,7 +214,7 @@ void CGroup::Draw() if ( m_icon == 8 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // green transparent uv1.y = 160.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -227,7 +228,7 @@ void CGroup::Draw() if ( m_icon == 9 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // red transparent uv1.y = 176.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -241,7 +242,7 @@ void CGroup::Draw() if ( m_icon == 10 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // blue transparent uv1.y = 192.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -255,7 +256,7 @@ void CGroup::Draw() if ( m_icon == 11 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // yellow transparent uv1.y = 224.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -272,7 +273,7 @@ void CGroup::Draw() dim.y = m_dim.y/2.0f; m_engine->SetTexture("mouse.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/300.0f; pos.y = m_pos.y+m_dim.y/300.0f+dim.y; uv1.x = 0.5f/256.0f; @@ -290,7 +291,7 @@ void CGroup::Draw() Math::Swap(uv1.x, uv2.x); DrawIcon(pos, dim, uv1, uv2); // dl - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/300.0f; pos.y = m_pos.y-m_dim.y/300.0f+dim.y; uv1.x = 64.5f/256.0f; @@ -311,7 +312,7 @@ void CGroup::Draw() if ( m_icon == 13 ) // corner upper / left? { m_engine->SetTexture("mouse.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; uv1.x = 128.5f/256.0f; @@ -320,7 +321,7 @@ void CGroup::Draw() uv2.y = 255.5f/256.0f; DrawIcon(pos, m_dim, uv1, uv2); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; uv1.x = 192.5f/256.0f; @@ -332,7 +333,7 @@ void CGroup::Draw() if ( m_icon == 14 ) // corner upper / right? { m_engine->SetTexture("mouse.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; uv2.x = 128.5f/256.0f; @@ -341,7 +342,7 @@ void CGroup::Draw() uv2.y = 255.5f/256.0f; DrawIcon(pos, m_dim, uv1, uv2); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; uv2.x = 192.5f/256.0f; @@ -353,7 +354,7 @@ void CGroup::Draw() if ( m_icon == 15 ) // corner lower / left? { m_engine->SetTexture("mouse.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; uv1.x = 128.5f/256.0f; @@ -362,7 +363,7 @@ void CGroup::Draw() uv1.y = 255.5f/256.0f; DrawIcon(pos, m_dim, uv1, uv2); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; uv1.x = 192.5f/256.0f; @@ -374,7 +375,7 @@ void CGroup::Draw() if ( m_icon == 16 ) // corner lower / left? { m_engine->SetTexture("mouse.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; uv2.x = 128.5f/256.0f; @@ -383,7 +384,7 @@ void CGroup::Draw() uv1.y = 255.5f/256.0f; DrawIcon(pos, m_dim, uv1, uv2); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; uv2.x = 192.5f/256.0f; @@ -395,7 +396,7 @@ void CGroup::Draw() if ( m_icon == 17 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f/256.0f; // blue frame uv1.y = 75.0f/256.0f; uv2.x = 64.0f/256.0f; @@ -411,7 +412,7 @@ void CGroup::Draw() if ( m_icon == 18 ) // arrow> for SatCom? { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 0.0f/256.0f; // > uv1.y = 192.0f/256.0f; uv2.x = 32.0f/256.0f; @@ -425,7 +426,7 @@ void CGroup::Draw() if ( m_icon == 19 ) // SatCom symbol? { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 224.0f/256.0f; // SatCom symbol uv1.y = 224.0f/256.0f; uv2.x = 256.0f/256.0f; @@ -439,7 +440,7 @@ void CGroup::Draw() if ( m_icon == 20 ) // solid blue background? { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 224.0f/256.0f; uv1.y = 32.0f/256.0f; uv2.x = 256.0f/256.0f; @@ -453,7 +454,7 @@ void CGroup::Draw() if ( m_icon == 21 ) // stand-by symbol? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 160.0f/256.0f; uv1.y = 32.0f/256.0f; uv2.x = 192.0f/256.0f; @@ -467,7 +468,7 @@ void CGroup::Draw() if ( m_icon == 22 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; // opaque yellow uv1.y = 224.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -484,7 +485,7 @@ void CGroup::Draw() if ( m_icon == 23 ) { m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; // yellow uv1.y = 192.0f/256.0f; uv2.x = 80.0f/256.0f; @@ -500,7 +501,7 @@ void CGroup::Draw() if ( m_icon == 24 ) { m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 80.0f/256.0f; // orange uv1.y = 192.0f/256.0f; uv2.x = 96.0f/256.0f; @@ -516,7 +517,7 @@ void CGroup::Draw() if ( m_icon == 25 ) { m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; // orange uv1.y = 208.0f/256.0f; uv2.x = 80.0f/256.0f; @@ -532,7 +533,7 @@ void CGroup::Draw() if ( m_icon == 26 ) { m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 80.0f/256.0f; // red uv1.y = 208.0f/256.0f; uv2.x = 96.0f/256.0f; @@ -548,7 +549,7 @@ void CGroup::Draw() if ( m_icon == 27 ) { m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 32.0f/256.0f; uv1.y = 0.0f/256.0f; uv2.x = 64.0f/256.0f; @@ -566,7 +567,7 @@ void CGroup::Draw() dim = m_dim; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 32.0f/256.0f; uv1.y = 32.0f/256.0f; uv2.x = uv1.x+32.0f/256.0f; @@ -578,7 +579,7 @@ void CGroup::Draw() DrawIcon(pos, dim, uv1, uv2); m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); pos.x += 8.0f/640.0f; pos.y += 8.0f/480.0f; dim.x -= 16.0f/640.0f; @@ -593,7 +594,7 @@ void CGroup::Draw() uv2.y -= dp; DrawIcon(pos, dim, uv1, uv2); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); pos.x += 2.0f/640.0f; pos.y += 2.0f/480.0f; dim.x -= 4.0f/640.0f; @@ -608,7 +609,7 @@ void CGroup::Draw() uv2.y -= dp; DrawIcon(pos, dim, uv1, uv2); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x += 8.0f/640.0f; pos.y += 8.0f/480.0f; dim.x -= 16.0f/640.0f; diff --git a/src/ui/group.h b/src/ui/group.h index baf609f..b54829d 100644 --- a/src/ui/group.h +++ b/src/ui/group.h @@ -32,7 +32,7 @@ public: CGroup(CInstanceManager* iMan); virtual ~CGroup(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); -- cgit v1.2.3-1-g7c22 From c2464d4c71bbc0154287f0b0441aef05e27cf084 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 22:43:07 +0200 Subject: * changes to ui classes --- src/sound/plugins/oalsound/alsound.h | 2 +- src/sound/sound.h | 10 +- src/ui/button.h | 2 +- src/ui/check.h | 2 +- src/ui/color.h | 2 +- src/ui/compass.h | 2 +- src/ui/control.h | 14 +- src/ui/displayinfo.h | 2 +- src/ui/displaytext.h | 2 +- src/ui/edit.h | 19 +- src/ui/editvalue.h | 5 +- src/ui/gauge.h | 2 +- src/ui/group.h | 2 +- src/ui/image.h | 7 +- src/ui/interface.cpp | 550 +++++++++-------------------------- src/ui/interface.h | 135 +++++---- src/ui/key.cpp | 179 +++++------- src/ui/key.h | 37 ++- src/ui/label.cpp | 51 ++-- src/ui/label.h | 24 +- src/ui/list.h | 118 ++++---- src/ui/map.h | 14 +- src/ui/scroll.h | 71 +++-- src/ui/shortcut.h | 27 +- src/ui/slider.h | 75 +++-- src/ui/target.h | 27 +- src/ui/window.h | 73 ++--- 27 files changed, 547 insertions(+), 907 deletions(-) diff --git a/src/sound/plugins/oalsound/alsound.h b/src/sound/plugins/oalsound/alsound.h index c1cdb81..ec23c86 100644 --- a/src/sound/plugins/oalsound/alsound.h +++ b/src/sound/plugins/oalsound/alsound.h @@ -33,7 +33,7 @@ #include "check.h" -class ALSound : public CSoundInterface +class ALSound : public CSound { public: ALSound(); diff --git a/src/sound/sound.h b/src/sound/sound.h index 45ec7e1..c2943f2 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -143,19 +143,19 @@ enum SoundNext /** -* @class CSoundInterface +* @class CSound * * @brief Sound plugin interface * */ -class CSoundInterface : public CPluginInterface +class CSound : public CPluginInterface { public: - CSoundInterface() { + CSound() { //CInstanceManager::getInstance().AddInstance(CLASS_SOUND, this); //m_iMan->AddInstance(CLASS_SOUND, this); }; - virtual ~CSoundInterface() = 0; + virtual ~CSound() = 0; /** Function to initialize sound device * @param bool b3D - enable support for 3D sound @@ -163,7 +163,7 @@ class CSoundInterface : public CPluginInterface virtual bool Create(bool b3D) = 0; /** Function called to cache all sound effect files. - * Function calls \link CSoundInterface::Cache() \endlink for each file + * Function calls \link CSound::Cache() \endlink for each file */ virtual void CacheAll() = 0; diff --git a/src/ui/button.h b/src/ui/button.h index 38b2dab..4f1740d 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -29,7 +29,7 @@ class CButton : public CControl { public: - CButton(CInstanceManager* iMan); + CButton(); virtual ~CButton(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); diff --git a/src/ui/check.h b/src/ui/check.h index 3af6849..66375c0 100644 --- a/src/ui/check.h +++ b/src/ui/check.h @@ -29,7 +29,7 @@ class CD3DEngine; class CCheck : public CControl { public: - CCheck(CInstanceManager* iMan); + CCheck(); virtual ~CCheck(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); diff --git a/src/ui/color.h b/src/ui/color.h index 151a4df..740b7e9 100644 --- a/src/ui/color.h +++ b/src/ui/color.h @@ -30,7 +30,7 @@ class CColor : public CControl { public: - CColor(CInstanceManager* iMan); + CColor(); virtual ~CColor(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); diff --git a/src/ui/compass.h b/src/ui/compass.h index ac5f608..fcbf860 100644 --- a/src/ui/compass.h +++ b/src/ui/compass.h @@ -29,7 +29,7 @@ class CCompass : public CControl { public: - CCompass(CInstanceManager* iMan); + CCompass(); virtual ~CCompass(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); diff --git a/src/ui/control.h b/src/ui/control.h index b211ff6..ef49b65 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -26,12 +26,14 @@ #include "graphics/engine/text.h" #include "graphics/engine/particle.h" +#include "sound/sound.h" + class CInstanceManager; class CEvent; //class Gfx::CEngine; class CRobotMain; //class Gfx::CParticle; -class CSound; +//class CSound; enum ControlState @@ -60,7 +62,7 @@ enum ControlState class CControl { public: - CControl(CInstanceManager* iMan); + CControl(); virtual ~CControl(); virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -78,8 +80,8 @@ public: virtual int GetState(); virtual void SetIcon(int icon); virtual int GetIcon(); - virtual void SetName(char* name, bool bTooltip=true); - virtual char* GetName(); + virtual void SetName(const char* name, bool bTooltip=true); + virtual const char* GetName(); virtual void SetTextAlign(Gfx::TextAlign mode); virtual int GetTextAlign(); virtual void SetFontSize(float size); @@ -88,8 +90,8 @@ public: virtual float GetFontStretch(); virtual void SetFontType(Gfx::FontType font); virtual Gfx::FontType GetFontType(); - virtual bool SetTooltip(char* name); - virtual bool GetTooltip(Math::Point pos, char* name); + virtual bool SetTooltip(const char* name); + virtual bool GetTooltip(Math::Point pos, const char* name); virtual void SetFocus(bool bFocus); virtual bool GetFocus(); diff --git a/src/ui/displayinfo.h b/src/ui/displayinfo.h index 29677d4..dbc9bed 100644 --- a/src/ui/displayinfo.h +++ b/src/ui/displayinfo.h @@ -37,7 +37,7 @@ class CLight; class CDisplayInfo { public: - CDisplayInfo(CInstanceManager* iMan); + CDisplayInfo(); ~CDisplayInfo(); bool EventProcess(const Event &event); diff --git a/src/ui/displaytext.h b/src/ui/displaytext.h index c2eea98..93a3c8b 100644 --- a/src/ui/displaytext.h +++ b/src/ui/displaytext.h @@ -45,7 +45,7 @@ const int MAXDTLINE = 4; class CDisplayText { public: - CDisplayText(CInstanceManager* iMan); + CDisplayText(); ~CDisplayText(); void DeleteObject(); diff --git a/src/ui/edit.h b/src/ui/edit.h index dbd94d1..73bd062 100644 --- a/src/ui/edit.h +++ b/src/ui/edit.h @@ -19,14 +19,11 @@ #pragma once -#include "common/struct.h" -#include "ui/control.h" - - -class CD3DEngine; -class CScroll; - +#include +#include +#include +#include const int EDITSTUDIOMAX = 20000; // maximum number of characters in CBOT edit const int EDITLINEMAX = 1000; // maximum total number of lines @@ -85,10 +82,10 @@ struct HyperHistory class CEdit : public CControl { public: - CEdit(CInstanceManager* iMan); + CEdit(); virtual ~CEdit(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); void SetPos(Math::Point pos); void SetDim(Math::Point dim); @@ -145,8 +142,8 @@ public: void HyperFlush(); void HyperHome(char *filename); - bool HyperTest(EventMsg event); - bool HyperGo(EventMsg event); + bool HyperTest(EventType event); + bool HyperGo(EventType event); void SetFontSize(float size); diff --git a/src/ui/editvalue.h b/src/ui/editvalue.h index dbb7812..758450a 100644 --- a/src/ui/editvalue.h +++ b/src/ui/editvalue.h @@ -21,6 +21,7 @@ #include "ui/control.h" +#include "common/event.h" enum EditValueType { @@ -39,10 +40,10 @@ class CButton; class CEditValue : public CControl { public: - CEditValue(CInstanceManager* iMan); + CEditValue(); virtual ~CEditValue(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); void SetPos(Math::Point pos); void SetDim(Math::Point dim); diff --git a/src/ui/gauge.h b/src/ui/gauge.h index 1686c56..26ce8e9 100644 --- a/src/ui/gauge.h +++ b/src/ui/gauge.h @@ -29,7 +29,7 @@ class CGauge : public CControl { public: - CGauge(CInstanceManager* iMan); + CGauge(); virtual ~CGauge(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); diff --git a/src/ui/group.h b/src/ui/group.h index b54829d..12c4003 100644 --- a/src/ui/group.h +++ b/src/ui/group.h @@ -29,7 +29,7 @@ class CD3DEngine; class CGroup : public CControl { public: - CGroup(CInstanceManager* iMan); + CGroup(); virtual ~CGroup(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); diff --git a/src/ui/image.h b/src/ui/image.h index 85c5962..b6b88c3 100644 --- a/src/ui/image.h +++ b/src/ui/image.h @@ -19,8 +19,9 @@ #pragma once -#include "ui/control.h" +#include +#include class CD3DEngine; @@ -29,10 +30,10 @@ class CD3DEngine; class CImage : public CControl { public: - CImage(CInstanceManager* iMan); + CImage(); virtual ~CImage(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); bool EventProcess(const Event &event); diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 50d2352..afedfc9 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,55 +18,19 @@ // interface.cpp -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "ui/control.h" -#include "ui/button.h" -#include "ui/color.h" -#include "ui/check.h" -#include "ui/key.h" -#include "ui/group.h" -#include "ui/image.h" -#include "ui/label.h" -#include "ui/edit.h" -#include "ui/editvalue.h" -#include "ui/scroll.h" -#include "ui/slider.h" -#include "ui/list.h" -#include "ui/shortcut.h" -#include "ui/compass.h" -#include "ui/target.h" -#include "ui/map.h" -#include "ui/window.h" -#include "old/camera.h" -#include "ui/interface.h" - - - - -// Object's constructor. - -CInterface::CInterface(CInstanceManager* iMan) -{ - int i; +#include - m_iMan = iMan; - m_iMan->AddInstance(CLASS_INTERFACE, this); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); - m_camera = 0; +CInterface::CInterface() +{ + m_iMan = CInstanceManager::GetInstancePointer(); + m_iMan->AddInstance(CLASS_INTERFACE, this); + m_event = static_cast( m_iMan->SearchInstance(CLASS_EVENT) ); + m_engine = static_cast( m_iMan->SearchInstance(CLASS_ENGINE) ); - for ( i=0 ; iDeleteInstance(CLASS_INTERFACE, this); } @@ -81,424 +47,222 @@ CInterface::~CInterface() void CInterface::Flush() { - int i; - - for ( i=0 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } + for (int i = 10; i < MAXCONTROL-1; i++) { + if (m_table[i] == nullptr) + return i; } - return 0; + return -1; } -// Creates a new button. -CButton* CInterface::CreateButton(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +template inline T* CInterface::CreateControl(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CButton* pc; - int i; + T* pc; + int index; + Event event; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } + if (eventMsg == EVENT_NULL) { + m_event->GetEvent(event); + eventMsg = event.type; } - return 0; + + if ((index = GetNextFreeControl()) < 0) + return nullptr; + + m_table[index] = new T(); + pc = static_cast(m_table[index]); + pc->Create(pos, dim, icon, eventMsg); + return pc; } + // Creates a new button. -CColor* CInterface::CreateColor(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CWindow* CInterface::CreateWindows(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CColor* pc; - int i; + CWindow* pc; + int index; + Event event; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if (eventMsg == EVENT_NULL) { + m_event->GetEvent(event); + eventMsg = event.type; + } - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } + switch (eventMsg) { + case EVENT_WINDOW0: index = 0; break; + case EVENT_WINDOW1: index = 1; break; + case EVENT_WINDOW2: index = 2; break; + case EVENT_WINDOW3: index = 3; break; + case EVENT_WINDOW4: index = 4; break; + case EVENT_WINDOW5: index = 5; break; + case EVENT_WINDOW6: index = 6; break; + case EVENT_WINDOW7: index = 7; break; + case EVENT_WINDOW8: index = 8; break; + case EVENT_WINDOW9: index = 9; break; + case EVENT_TOOLTIP: index = MAXCONTROL-1; break; + default: index = GetNextFreeControl(); break; } - return 0; + + if (index < 0) + return nullptr; + + m_table[index] = new CWindow(); + pc = static_cast(m_table[index]); + pc->Create(pos, dim, icon, eventMsg); + return pc; } // Creates a new button. -CCheck* CInterface::CreateCheck(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CButton* CInterface::CreateButton(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CCheck* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new button. -CKey* CInterface::CreateKey(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CColor* CInterface::CreateColor(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CKey* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new button. -CGroup* CInterface::CreateGroup(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CCheck* CInterface::CreateCheck(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CGroup* pc; - int i; + return CreateControl(pos, dim, icon, eventMsg); +} - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); +// Creates a new button. - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; +CKey* CInterface::CreateKey(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) +{ + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new button. -CImage* CInterface::CreateImage(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CGroup* CInterface::CreateGroup(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CImage* pc; - int i; + return CreateControl(pos, dim, icon, eventMsg); +} - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); +// Creates a new button. - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; +CImage* CInterface::CreateImage(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) +{ + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new label. -CLabel* CInterface::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, - char *name) +CLabel* CInterface::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, const char *name) { - CLabel* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - pc->SetName(name); - return pc; - } - } - return 0; + CLabel* pc = CreateControl(pos, dim, icon, eventMsg); + if (pc != nullptr) + pc->SetName(name); + return pc; } // Creates a new pave editable. -CEdit* CInterface::CreateEdit(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CEdit* CInterface::CreateEdit(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CEdit* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new pave editable. -CEditValue* CInterface::CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CEditValue* CInterface::CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CEditValue* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new lift. -CScroll* CInterface::CreateScroll(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CScroll* CInterface::CreateScroll(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CScroll* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new cursor. -CSlider* CInterface::CreateSlider(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CSlider* CInterface::CreateSlider(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CSlider* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new list. -CList* CInterface::CreateList(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, - float expand) +CList* CInterface::CreateList(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand) { - CList* pc; - int i; + CList* pc; + int index; + Event event; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg, expand); - return pc; - } + if (eventMsg == EVENT_NULL) { + m_event->GetEvent(event); + eventMsg = event.type; } - return 0; + + if ((index = GetNextFreeControl()) < 0) + return nullptr; + + m_table[index] = new CList(); + pc = static_cast(m_table[index]); + pc->Create(pos, dim, icon, eventMsg, expand); + return pc; } // Creates a new shortcut. -CShortcut* CInterface::CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CShortcut* CInterface::CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CShortcut* ps; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return ps; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new compass. -CCompass* CInterface::CreateCompass(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CCompass* CInterface::CreateCompass(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CCompass* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new target. -CTarget* CInterface::CreateTarget(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CTarget* CInterface::CreateTarget(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CTarget* pc; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pc; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Creates a new map. -CMap* CInterface::CreateMap(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CMap* CInterface::CreateMap(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - CMap* pm; - int i; - - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - - for ( i=10 ; iCreate(pos, dim, icon, eventMsg); - return pm; - } - } - return 0; + return CreateControl(pos, dim, icon, eventMsg); } // Removes a control. -bool CInterface::DeleteControl(EventMsg eventMsg) +bool CInterface::DeleteControl(EventType eventMsg) { - int i; - - for ( i=0 ; iRetEventMsg() ) - { + for (int i = 0; i < MAXCONTROL; i++) { + if ( m_table[i] != nullptr ) { + if (eventMsg == m_table[i]->GetEventType()) { delete m_table[i]; - m_table[i] = 0; + m_table[i] = nullptr; return true; } } @@ -508,47 +272,32 @@ bool CInterface::DeleteControl(EventMsg eventMsg) // Gives a control. -CControl* CInterface::SearchControl(EventMsg eventMsg) +CControl* CInterface::SearchControl(EventType eventMsg) { - int i; - - for ( i=0 ; iRetEventMsg() ) - { + for (int i = 0; i < MAXCONTROL; i++) { + if (m_table[i] != nullptr) { + if (eventMsg == m_table[i]->GetEventType()) return m_table[i]; - } } } - return 0; + return nullptr; } // Management of an event. bool CInterface::EventProcess(const Event &event) { - int i; - - if ( event.event == EVENT_MOUSEMOVE ) - { - if ( m_camera == 0 ) - { - m_camera = (CCamera*)m_iMan->SearchInstance(CLASS_CAMERA); + if (event.type == EVENT_MOUSE_MOVE) { + if (m_camera == nullptr) { + m_camera = static_cast(m_iMan->SearchInstance(CLASS_CAMERA)); } - m_engine->SetMouseType(m_camera->RetMouseDef(event.pos)); + m_engine->SetMouseType(m_camera->GetMouseDef(event.pos)); } - for ( i=MAXCONTROL-1 ; i>=0 ; i-- ) - { - if ( m_table[i] != 0 && - m_table[i]->TestState(STATE_ENABLE) ) - { + for (int i = MAXCONTROL-1; i >= 0; i--) { + if (m_table[i] != nullptr && m_table[i]->TestState(STATE_ENABLE)) { if ( !m_table[i]->EventProcess(event) ) - { return false; - } } } @@ -558,18 +307,12 @@ bool CInterface::EventProcess(const Event &event) // Gives the tooltip binding to the window. -bool CInterface::GetTooltip(Math::Point pos, char* name) +bool CInterface::GetTooltip(Math::Point pos, const char* name) { - int i; - - for ( i=MAXCONTROL-1 ; i>=0 ; i-- ) - { - if ( m_table[i] != 0 ) - { - if ( m_table[i]->GetTooltip(pos, name) ) - { + for (int i = MAXCONTROL-1; i >= 0; i--) { + if (m_table[i] != nullptr) { + if (m_table[i]->GetTooltip(pos, name)) return true; - } } } return false; @@ -580,26 +323,17 @@ bool CInterface::GetTooltip(Math::Point pos, char* name) void CInterface::Draw() { - D3DMATERIAL7 material; - int i; - - ZeroMemory( &material, sizeof(D3DMATERIAL7) ); + /*ZeroMemory( &material, sizeof(D3DMATERIAL7) ); material.diffuse.r = 1.0f; material.diffuse.g = 1.0f; material.diffuse.b = 1.0f; material.ambient.r = 0.5f; material.ambient.g = 0.5f; material.ambient.b = 0.5f; - m_engine->SetMaterial(material); + m_engine->SetMaterial(material);*/ - for ( i=0 ; i=0 ; i-- ) - { - if ( m_table[i] != 0 ) - { + for (int i = 0; i < MAXCONTROL; i++) { + if ( m_table[i] != nullptr ) m_table[i]->Draw(); - } } } - - diff --git a/src/ui/interface.h b/src/ui/interface.h index 8aa7f44..d8f4d62 100644 --- a/src/ui/interface.h +++ b/src/ui/interface.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -19,32 +20,34 @@ #pragma once -#include "common/event.h" -#include "math/point.h" - - -class CInstanceManager; -class CD3DEngine; -class CControl; -class CWindow; -class CButton; -class CColor; -class CCheck; -class CKey; -class CGroup; -class CImage; -class CLabel; -class CEdit; -class CEditValue; -class CScroll; -class CSlider; -class CList; -class CShortcut; -class CMap; -class CGauge; -class CCompass; -class CTarget; -class CCamera; +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include const int MAXCONTROL = 100; @@ -52,44 +55,48 @@ const int MAXCONTROL = 100; class CInterface { -public: - CInterface(CInstanceManager* iMan); - ~CInterface(); - - bool EventProcess(const Event &event); - bool GetTooltip(Math::Point pos, char* name); - - void Flush(); - CWindow* CreateWindows(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CButton* CreateButton(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CColor* CreateColor(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CCheck* CreateCheck(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CKey* CreateKey(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CGroup* CreateGroup(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CImage* CreateImage(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CLabel* CreateLabel(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, char *name); - CEdit* CreateEdit(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CEditValue* CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CScroll* CreateScroll(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CSlider* CreateSlider(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CList* CreateList(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, float expand=1.2f); - CShortcut* CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CCompass* CreateCompass(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CTarget* CreateTarget(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CMap* CreateMap(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - bool DeleteControl(EventMsg eventMsg); - CControl* SearchControl(EventMsg eventMsg); - - void Draw(); - -protected: - -protected: - CInstanceManager* m_iMan; - CD3DEngine* m_engine; - CCamera* m_camera; - - CControl* m_table[MAXCONTROL]; + public: + CInterface(); + ~CInterface(); + + bool EventProcess(const Event &event); + bool GetTooltip(Math::Point pos, const char* name); + + void Flush(); + CButton* CreateButton(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CColor* CreateColor(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CCheck* CreateCheck(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CKey* CreateKey(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CGroup* CreateGroup(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CImage* CreateImage(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CEdit* CreateEdit(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CEditValue* CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CScroll* CreateScroll(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CSlider* CreateSlider(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CShortcut* CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CCompass* CreateCompass(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CTarget* CreateTarget(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CMap* CreateMap(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + + CWindow* CreateWindows(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CList* CreateList(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand=1.2f); + CLabel* CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, const char *name); + + bool DeleteControl(EventType eventMsg); + CControl* SearchControl(EventType eventMsg); + + void Draw(); + + protected: + int GetNextFreeControl(); + template inline T* CreateControl(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + + CInstanceManager* m_iMan; + CEventQueue* m_event; + Gfx::CEngine* m_engine; + Gfx::CCamera* m_camera; + + CControl* m_table[MAXCONTROL]; }; diff --git a/src/ui/key.cpp b/src/ui/key.cpp index a1eebb3..0d73ed0 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,54 +18,32 @@ // key.cpp -#include -#include -#include +#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "common/restext.h" -#include "old/sound.h" -#include "old/text.h" -#include "ui/key.h" - - - - -// Constructs the name of a button. void GetKeyName(char *name, int key) { - if ( !GetResource(RES_KEY, key, name) ) - { - if ( (key >= '0' && key <= '9') || - (key >= 'A' && key <= 'Z') || - (key >= 'a' && key <= 'z') ) - { + if ( !GetResource(RES_KEY, key, name) ) { + if (isalnum(key)) { name[0] = key; name[1] = 0; } - else - { + else { sprintf(name, "Code %d", key); } } } - - // Object's constructor. -CKey::CKey(CInstanceManager* iMan) : CControl(iMan) +CKey::CKey() : CControl() { m_key[0] = 0; m_key[1] = 0; m_bCatch = false; + + m_app = CApplication::GetInstancePointer(); } // Object's destructor. @@ -76,18 +55,18 @@ CKey::~CKey() // Creates a new button. -bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - char name[100]; - char* p; + char name[100]; + Event event; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if (eventMsg == EVENT_NULL) { + m_event->GetEvent(event); + eventMsg = event.type; + } CControl::Create(pos, dim, icon, eventMsg); - GetResource(RES_EVENT, eventMsg, name); - p = strchr(name, '\\'); - if ( p != 0 ) *p = 0; SetName(name); return true; @@ -98,24 +77,17 @@ bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) bool CKey::EventProcess(const Event &event) { - if ( m_state & STATE_DEAD ) return true; + if (m_state & STATE_DEAD) + return true; CControl::EventProcess(event); - if ( event.event == EVENT_LBUTTONDOWN ) - { - if ( Detect(event.pos) ) - { - m_bCatch = true; - } - else - { - m_bCatch = false; - } + if (event.type == EVENT_MOUSE_BUTTON_DOWN) { + if (event.mouseButton.button == 1) // left + m_bCatch = Detect(event.pos); } - if ( event.event == EVENT_KEYDOWN && m_bCatch ) - { + if (event.type == EVENT_MOUSE_BUTTON_DOWN && m_bCatch) { m_bCatch = false; if ( TestKey(event.param) ) // impossible ? @@ -124,21 +96,17 @@ bool CKey::EventProcess(const Event &event) } else { - if ( event.param == m_key[0] || - event.param == m_key[1] ) - { + if ( event.param == m_key[0] || event.param == m_key[1] ) { m_key[0] = event.param; m_key[1] = 0; - } - else - { + } else { m_key[1] = m_key[0]; m_key[0] = event.param; } m_sound->Play(SOUND_CLICK); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } return false; @@ -152,25 +120,17 @@ bool CKey::EventProcess(const Event &event) bool CKey::TestKey(int key) { - int i, j; + if ( key == VK_PAUSE || key == VK_SNAPSHOT ) return true; // blocked key - if ( key == VK_PAUSE || - key == VK_SNAPSHOT ) return true; // blocked key - - for ( i=0 ; i<20 ; i++ ) - { - for ( j=0 ; j<2 ; j++ ) - { - if ( key == m_engine->RetKey(i, j) ) // key used? - { - m_engine->SetKey(i, j, 0); // nothing! - } + for (int i = 0; i < 20; i++) { + for (int j = 0; j < 2; j++) { + if (key == m_app->GetKey(i, j) ) // key used? + m_app->SetKey(i, j, 0); // nothing! } - if ( m_engine->RetKey(i, 0) == 0 ) // first free option? - { - m_engine->SetKey(i, 0, m_engine->RetKey(i, 1)); // shift - m_engine->SetKey(i, 1, 0); + if ( m_app->GetKey(i, 0) == 0 ) { // first free option? + m_app->SetKey(i, 0, m_app->GetKey(i, 1)); // shift + m_app->SetKey(i, 1, 0); } } @@ -182,106 +142,97 @@ bool CKey::TestKey(int key) void CKey::Draw() { - Math::Point iDim, pos; - float zoomExt, zoomInt, h; - int icon; - char text[100]; + Math::Point iDim, pos; + float zoomExt, zoomInt, h; + int icon; + char text[100]; - if ( (m_state & STATE_VISIBLE) == 0 ) return; + if ( (m_state & STATE_VISIBLE) == 0 ) + return; iDim = m_dim; m_dim.x = 200.0f/640.0f; if ( m_state & STATE_SHADOW ) - { DrawShadow(m_pos, m_dim); - } + m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); // was D3DSTATENORMAL zoomExt = 1.00f; zoomInt = 0.95f; icon = 2; - if ( m_key[0] == 0 && - m_key[1] == 0 ) // no shortcut? - { + if ( m_key[0] == 0 && m_key[1] == 0 ) // no shortcut? icon = 3; - } - if ( m_state & STATE_DEFAULT ) - { + + if ( m_state & STATE_DEFAULT ) { DrawPart(23, 1.3f, 0.0f); zoomExt *= 1.15f; zoomInt *= 1.15f; } + if ( m_state & STATE_HILIGHT ) - { icon = 1; - } + if ( m_state & STATE_CHECK ) - { icon = 0; - } - if ( m_state & STATE_PRESS ) - { + + if ( m_state & STATE_PRESS ) { icon = 3; zoomInt *= 0.9f; } + if ( (m_state & STATE_ENABLE) == 0 ) - { icon = 7; - } + if ( m_state & STATE_DEAD ) - { icon = 17; - } + if ( m_bCatch ) - { icon = 23; - } - DrawPart(icon, zoomExt, 8.0f/256.0f); // draws the button - h = m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2.0f; + DrawPart(icon, zoomExt, 8.0f / 256.0f); // draws the button + + h = m_engine->GetText()->GetHeight(m_fontType, m_fontSize) / 2.0f; GetKeyName(text, m_key[0]); - if ( m_key[1] != 0 ) - { + if ( m_key[1] != 0 ) { GetResource(RES_TEXT, RT_KEY_OR, text+strlen(text)); GetKeyName(text+strlen(text), m_key[1]); } - pos.x = m_pos.x+m_dim.x*0.5f; - pos.y = m_pos.y+m_dim.y*0.5f; + pos.x = m_pos.x + m_dim.x * 0.5f; + pos.y = m_pos.y + m_dim.y * 0.5f; pos.y -= h; - m_engine->RetText()->DrawText(text, pos, m_dim.x, 0, m_fontSize, m_fontStretch, m_fontType, 0); + m_engine->GetText()->DrawText(std::string(text), m_fontType, m_fontSize, pos, m_dim.x, Gfx::TEXT_ALIGN_CENTER, 0); m_dim = iDim; - if ( m_state & STATE_DEAD ) return; + if ( m_state & STATE_DEAD ) + return; // Draws the name. - pos.x = m_pos.x+(214.0f/640.0f); - pos.y = m_pos.y+m_dim.y*0.5f; + pos.x = m_pos.x + (214.0f / 640.0f); + pos.y = m_pos.y + m_dim.y * 0.5f; pos.y -= h; - m_engine->RetText()->DrawText(m_name, pos, m_dim.x, 1, m_fontSize, m_fontStretch, m_fontType, 0); + m_engine->GetText()->DrawText(std::string(m_name), m_fontType, m_fontSize, pos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, 0); } void CKey::SetKey(int option, int key) { - if ( option < 0 || - option > 1 ) return; + if ( option < 0 || option > 1 ) return; m_key[option] = key; } -int CKey::RetKey(int option) +int CKey::GetKey(int option) { - if ( option < 0 || - option > 1 ) return 0; + if ( option < 0 || option > 1 ) return 0; return m_key[option]; } diff --git a/src/ui/key.h b/src/ui/key.h index 314f39b..db7d856 100644 --- a/src/ui/key.h +++ b/src/ui/key.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -18,35 +19,39 @@ #pragma once +#include +#include -#include "ui/control.h" +#include +#include +#include +#include -class CD3DEngine; - +#include class CKey : public CControl { -public: - CKey(CInstanceManager* iMan); - virtual ~CKey(); + public: + CKey(); + virtual ~CKey(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + bool EventProcess(const Event &event); - bool EventProcess(const Event &event); + void Draw(); - void Draw(); + void SetKey(int option, int key); + int GetKey(int option); - void SetKey(int option, int key); - int RetKey(int option); + protected: + bool TestKey(int key); -protected: - bool TestKey(int key); + int m_key[2]; + bool m_bCatch; -protected: - int m_key[2]; - bool m_bCatch; + CApplication *m_app; }; diff --git a/src/ui/label.cpp b/src/ui/label.cpp index cd96493..261f3fc 100644 --- a/src/ui/label.cpp +++ b/src/ui/label.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,25 +18,12 @@ // label.cpp -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "old/text.h" -#include "ui/label.h" - - +#include // Object's constructor. -CLabel::CLabel(CInstanceManager* iMan) : CControl(iMan) +CLabel::CLabel() : CControl() { } @@ -48,9 +36,14 @@ CLabel::~CLabel() // Creates a new button. -bool CLabel::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CLabel::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + Event event; + + if (eventMsg == EVENT_NULL) { + m_event->GetEvent(event); + eventMsg = event.type; + } CControl::Create(pos, dim, icon, eventMsg); return true; @@ -72,22 +65,16 @@ void CLabel::Draw() { Math::Point pos; - if ( (m_state & STATE_VISIBLE) == 0 ) return; + if ( (m_state & STATE_VISIBLE) == 0 ) + return; - pos.y = m_pos.y+m_dim.y/2.0f; + pos.y = m_pos.y + m_dim.y / 2.0f; - if ( m_justif > 0 ) - { - pos.x = m_pos.x; + switch (m_justif) { + case Gfx::TEXT_ALIGN_LEFT: pos.x = m_pos.x; break; + case Gfx::TEXT_ALIGN_CENTER: pos.x = m_pos.x + m_dim.x / 2.0f; break; + case Gfx::TEXT_ALIGN_RIGHT: pos.x = m_pos.x + m_dim.x; break; } - if ( m_justif == 0 ) - { - pos.x = m_pos.x+m_dim.x/2.0f; - } - if ( m_justif < 0 ) - { - pos.x = m_pos.x+m_dim.x; - } - m_engine->RetText()->DrawText(m_name, pos, m_dim.x, m_justif, m_fontSize, m_fontStretch, m_fontType, 0); -} + m_engine->GetText()->DrawText(std::string(m_name), m_fontType, m_fontSize, pos, m_dim.x, m_justif, 0); +} diff --git a/src/ui/label.h b/src/ui/label.h index d3cb915..f65e1dd 100644 --- a/src/ui/label.h +++ b/src/ui/label.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -19,28 +20,21 @@ #pragma once -#include "ui/control.h" - - -class CD3DEngine; +#include +#include class CLabel : public CControl { -public: - CLabel(CInstanceManager* iMan); - virtual ~CLabel(); - - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - - bool EventProcess(const Event &event); - - void Draw(); + public: + CLabel(); + virtual ~CLabel(); -protected: + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + bool EventProcess(const Event &event); -protected: + void Draw(); }; diff --git a/src/ui/list.h b/src/ui/list.h index cc9e646..c7c278d 100644 --- a/src/ui/list.h +++ b/src/ui/list.h @@ -19,13 +19,9 @@ #pragma once -#include "ui/control.h" -#include "common/event.h" +#include - -class CD3DEngine; -class CButton; -class CScroll; +#include const int LISTMAXDISPLAY = 20; // maximum number of visible lines @@ -35,81 +31,81 @@ const int LISTMAXTOTAL = 100; // maximum total number of lines class CList : public CControl { -public: - CList(CInstanceManager* iMan); - ~CList(); + public: + CList(); + ~CList(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, float expand); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand); - void SetPos(Math::Point pos); - void SetDim(Math::Point dim); + void SetPos(Math::Point pos); + void SetDim(Math::Point dim); - bool SetState(int state, bool bState); - bool SetState(int state); - bool ClearState(int state); + bool SetState(int state, bool bState); + bool SetState(int state); + bool ClearState(int state); - bool EventProcess(const Event &event); - void Draw(); + bool EventProcess(const Event &event); + void Draw(); - void Flush(); + void Flush(); - void SetTotal(int i); - int RetTotal(); + void SetTotal(int i); + int RetTotal(); - void SetSelect(int i); - int RetSelect(); + void SetSelect(int i); + int RetSelect(); - void SetSelectCap(bool bEnable); - bool RetSelectCap(); + void SetSelectCap(bool bEnable); + bool RetSelectCap(); - void SetBlink(bool bEnable); - bool RetBlink(); + void SetBlink(bool bEnable); + bool RetBlink(); - void SetName(int i, char* name); - char* RetName(int i); + void SetName(int i, char* name); + char* RetName(int i); - void SetCheck(int i, bool bMode); - bool RetCheck(int i); + void SetCheck(int i, bool bMode); + bool RetCheck(int i); - void SetEnable(int i, bool bEnable); - bool RetEnable(int i); + void SetEnable(int i, bool bEnable); + bool RetEnable(int i); - void SetTabs(int i, float pos, int justif=1); - float RetTabs(int i); + void SetTabs(int i, float pos, int justif=1); + float RetTabs(int i); - void ShowSelect(bool bFixed); + void ShowSelect(bool bFixed); - EventMsg RetEventMsgButton(int i); - EventMsg RetEventMsgScroll(); + EventType RetEventMsgButton(int i); + EventType RetEventMsgScroll(); -protected: - bool MoveAdjust(); - void UpdateButton(); - void UpdateScroll(); - void MoveScroll(); - void DrawCase(char *text, Math::Point pos, float width, int justif); + protected: + bool MoveAdjust(); + void UpdateButton(); + void UpdateScroll(); + void MoveScroll(); + void DrawCase(char *text, Math::Point pos, float width, int justif); -protected: - CButton* m_button[LISTMAXDISPLAY]; - CScroll* m_scroll; + protected: + CButton* m_button[LISTMAXDISPLAY]; + CScroll* m_scroll; - EventMsg m_eventButton[LISTMAXDISPLAY]; - EventMsg m_eventScroll; + EventType m_eventButton[LISTMAXDISPLAY]; + EventType m_eventScroll; - float m_expand; - int m_totalLine; // total number of lines - int m_displayLine; // number of visible lines - int m_selectLine; // selected line - int m_firstLine; // first visible line - bool m_bBlink; - bool m_bSelectCap; - float m_blinkTime; - float m_tabs[10]; - int m_justifs[10]; + float m_expand; + int m_totalLine; // total number of lines + int m_displayLine; // number of visible lines + int m_selectLine; // selected line + int m_firstLine; // first visible line + bool m_bBlink; + bool m_bSelectCap; + float m_blinkTime; + float m_tabs[10]; + int m_justifs[10]; - char m_text[LISTMAXTOTAL][100]; - char m_check[LISTMAXTOTAL]; - char m_enable[LISTMAXTOTAL]; + char m_text[LISTMAXTOTAL][100]; + char m_check[LISTMAXTOTAL]; + char m_enable[LISTMAXTOTAL]; }; diff --git a/src/ui/map.h b/src/ui/map.h index efdf54b..693398c 100644 --- a/src/ui/map.h +++ b/src/ui/map.h @@ -19,16 +19,14 @@ #pragma once -#include "ui/control.h" -#include "object/object.h" +#include +#include + +#include -class CD3DEngine; class CTerrain; class CWater; -class CRobotMain; - - const int MAPMAXOBJECT = 100; @@ -62,10 +60,10 @@ struct MapObject class CMap : public CControl { public: - CMap(CInstanceManager* iMan); + CMap(); ~CMap(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); bool EventProcess(const Event &event); void Draw(); diff --git a/src/ui/scroll.h b/src/ui/scroll.h index 6854e61..a82fea0 100644 --- a/src/ui/scroll.h +++ b/src/ui/scroll.h @@ -19,12 +19,9 @@ #pragma once -#include "ui/control.h" - - -class CD3DEngine; -class CButton; +#include +#include const float SCROLL_WIDTH = (15.0f/640.0f); @@ -32,50 +29,50 @@ const float SCROLL_WIDTH = (15.0f/640.0f); class CScroll : public CControl { -public: - CScroll(CInstanceManager* iMan); - ~CScroll(); + public: + CScroll(); + ~CScroll(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); - void SetPos(Math::Point pos); - void SetDim(Math::Point dim); + void SetPos(Math::Point pos); + void SetDim(Math::Point dim); - bool SetState(int state, bool bState); - bool SetState(int state); - bool ClearState(int state); + bool SetState(int state, bool bState); + bool SetState(int state); + bool ClearState(int state); - bool EventProcess(const Event &event); - void Draw(); + bool EventProcess(const Event &event); + void Draw(); - void SetVisibleValue(float value); - float RetVisibleValue(); + void SetVisibleValue(float value); + float RetVisibleValue(); - void SetVisibleRatio(float value); - float RetVisibleRatio(); + void SetVisibleRatio(float value); + float RetVisibleRatio(); - void SetArrowStep(float step); - float RetArrowStep(); + void SetArrowStep(float step); + float RetArrowStep(); -protected: - void MoveAdjust(); - void AdjustGlint(); - void DrawVertex(Math::Point pos, Math::Point dim, int icon); + protected: + void MoveAdjust(); + void AdjustGlint(); + void DrawVertex(Math::Point pos, Math::Point dim, int icon); -protected: - CButton* m_buttonUp; - CButton* m_buttonDown; + protected: + CButton* m_buttonUp; + CButton* m_buttonDown; - float m_visibleValue; - float m_visibleRatio; - float m_step; + float m_visibleValue; + float m_visibleRatio; + float m_step; - bool m_bCapture; - Math::Point m_pressPos; - float m_pressValue; + bool m_bCapture; + Math::Point m_pressPos; + float m_pressValue; - EventMsg m_eventUp; - EventMsg m_eventDown; + EventType m_eventUp; + EventType m_eventDown; }; diff --git a/src/ui/shortcut.h b/src/ui/shortcut.h index b918ccc..d819bf2 100644 --- a/src/ui/shortcut.h +++ b/src/ui/shortcut.h @@ -18,31 +18,28 @@ #pragma once +#include -#include "ui/control.h" - - -class CD3DEngine; - +#include class CShortcut : public CControl { -public: - CShortcut(CInstanceManager* iMan); - ~CShortcut(); + public: + CShortcut(); + ~CShortcut(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); - bool EventProcess(const Event &event); + bool EventProcess(const Event &event); - void Draw(); + void Draw(); -protected: - void DrawVertex(int icon, float zoom); + protected: + void DrawVertex(int icon, float zoom); -protected: - float m_time; + protected: + float m_time; }; diff --git a/src/ui/slider.h b/src/ui/slider.h index 1ec9ea5..e79b348 100644 --- a/src/ui/slider.h +++ b/src/ui/slider.h @@ -19,63 +19,60 @@ #pragma once -#include "ui/control.h" - - -class CD3DEngine; -class CButton; +#include +#include class CSlider : public CControl { -public: - CSlider(CInstanceManager* iMan); - ~CSlider(); + public: + CSlider(); + ~CSlider(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); - void SetPos(Math::Point pos); - void SetDim(Math::Point dim); + void SetPos(Math::Point pos); + void SetDim(Math::Point dim); - bool SetState(int state, bool bState); - bool SetState(int state); - bool ClearState(int state); + bool SetState(int state, bool bState); + bool SetState(int state); + bool ClearState(int state); - bool EventProcess(const Event &event); - void Draw(); + bool EventProcess(const Event &event); + void Draw(); - void SetLimit(float min, float max); + void SetLimit(float min, float max); - void SetVisibleValue(float value); - float RetVisibleValue(); + void SetVisibleValue(float value); + float RetVisibleValue(); - void SetArrowStep(float step); - float RetArrowStep(); + void SetArrowStep(float step); + float RetArrowStep(); -protected: - void MoveAdjust(); - void AdjustGlint(); - void DrawVertex(Math::Point pos, Math::Point dim, int icon); + protected: + void MoveAdjust(); + void AdjustGlint(); + void DrawVertex(Math::Point pos, Math::Point dim, int icon); -protected: - CButton* m_buttonLeft; - CButton* m_buttonRight; + protected: + CButton* m_buttonLeft; + CButton* m_buttonRight; - float m_min; - float m_max; - float m_visibleValue; - float m_step; + float m_min; + float m_max; + float m_visibleValue; + float m_step; - bool m_bHoriz; - float m_marginButton; + bool m_bHoriz; + float m_marginButton; - bool m_bCapture; - Math::Point m_pressPos; - float m_pressValue; + bool m_bCapture; + Math::Point m_pressPos; + float m_pressValue; - EventMsg m_eventUp; - EventMsg m_eventDown; + EventType m_eventUp; + EventType m_eventDown; }; diff --git a/src/ui/target.h b/src/ui/target.h index ae0c7af..a2615b4 100644 --- a/src/ui/target.h +++ b/src/ui/target.h @@ -19,30 +19,25 @@ #pragma once -#include "ui/control.h" - - -class CD3DEngine; -class CObject; +#include +#include class CTarget : public CControl { -public: - CTarget(CInstanceManager* iMan); - ~CTarget(); - - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + public: + CTarget(); + ~CTarget(); - bool EventProcess(const Event &event); - void Draw(); - bool GetTooltip(Math::Point pos, char* name); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); -protected: - CObject* DetectFriendObject(Math::Point pos); + bool EventProcess(const Event &event); + void Draw(); + bool GetTooltip(Math::Point pos, char* name); -protected: + protected: + CObject* DetectFriendObject(Math::Point pos); }; diff --git a/src/ui/window.h b/src/ui/window.h index 3acf3b4..8884c6f 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -19,27 +19,8 @@ #pragma once -#include "ui/control.h" - - -class CD3DEngine; -class CButton; -class CColor; -class CCheck; -class CKey; -class CGroup; -class CImage; -class CLabel; -class CEdit; -class CEditValue; -class CScroll; -class CSlider; -class CList; -class CShortcut; -class CMap; -class CGauge; -class CCompass; -class CTarget; +#include +#include const int MAXWINDOW = 100; @@ -48,34 +29,34 @@ const int MAXWINDOW = 100; class CWindow : public CControl { public: - CWindow(CInstanceManager* iMan); + CWindow(); ~CWindow(); void Flush(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CButton* CreateButton(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CColor* CreateColor(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CCheck* CreateCheck(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CKey* CreateKey(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CGroup* CreateGroup(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CImage* CreateImage(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CLabel* CreateLabel(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, char *name); - CEdit* CreateEdit(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CEditValue* CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CScroll* CreateScroll(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CSlider* CreateSlider(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CList* CreateList(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, float expand=1.2f); - CShortcut* CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CMap* CreateMap(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CGauge* CreateGauge(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CCompass* CreateCompass(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - CTarget* CreateTarget(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); - bool DeleteControl(EventMsg eventMsg); - CControl* SearchControl(EventMsg eventMsg); - - EventMsg RetEventMsgReduce(); - EventMsg RetEventMsgFull(); - EventMsg RetEventMsgClose(); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CButton* CreateButton(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CColor* CreateColor(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CCheck* CreateCheck(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CKey* CreateKey(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CGroup* CreateGroup(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CImage* CreateImage(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CLabel* CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, char *name); + CEdit* CreateEdit(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CEditValue* CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CScroll* CreateScroll(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CSlider* CreateSlider(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CList* CreateList(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand=1.2f); + CShortcut* CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CMap* CreateMap(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CGauge* CreateGauge(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CCompass* CreateCompass(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + CTarget* CreateTarget(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + bool DeleteControl(EventType eventMsg); + CControl* SearchControl(EventType eventMsg); + + EventType RetEventTypeReduce(); + EventType RetEventTypeFull(); + EventType RetEventTypeClose(); void SetName(char* name); -- cgit v1.2.3-1-g7c22 From 6ff8706d041d0b204734eabcfc4f6acf39cfbbf2 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 22:49:16 +0200 Subject: * last commit should not include sound changes --- src/sound/plugins/oalsound/alsound.h | 2 +- src/sound/sound.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sound/plugins/oalsound/alsound.h b/src/sound/plugins/oalsound/alsound.h index ec23c86..c1cdb81 100644 --- a/src/sound/plugins/oalsound/alsound.h +++ b/src/sound/plugins/oalsound/alsound.h @@ -33,7 +33,7 @@ #include "check.h" -class ALSound : public CSound +class ALSound : public CSoundInterface { public: ALSound(); diff --git a/src/sound/sound.h b/src/sound/sound.h index c2943f2..45ec7e1 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -143,19 +143,19 @@ enum SoundNext /** -* @class CSound +* @class CSoundInterface * * @brief Sound plugin interface * */ -class CSound : public CPluginInterface +class CSoundInterface : public CPluginInterface { public: - CSound() { + CSoundInterface() { //CInstanceManager::getInstance().AddInstance(CLASS_SOUND, this); //m_iMan->AddInstance(CLASS_SOUND, this); }; - virtual ~CSound() = 0; + virtual ~CSoundInterface() = 0; /** Function to initialize sound device * @param bool b3D - enable support for 3D sound @@ -163,7 +163,7 @@ class CSound : public CPluginInterface virtual bool Create(bool b3D) = 0; /** Function called to cache all sound effect files. - * Function calls \link CSound::Cache() \endlink for each file + * Function calls \link CSoundInterface::Cache() \endlink for each file */ virtual void CacheAll() = 0; -- cgit v1.2.3-1-g7c22 From ea6269c4110282a3e7c05bec9c7f17ffd1bd5191 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 23:03:52 +0200 Subject: * ui/key.cpp compiles * csoundinterface to ccontrol --- src/common/key.h | 1 + src/ui/control.cpp | 2 +- src/ui/control.h | 2 +- src/ui/interface.cpp | 4 ++++ src/ui/interface.h | 2 ++ src/ui/key.cpp | 11 +++++------ src/ui/key.h | 4 ++++ 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/common/key.h b/src/common/key.h index de31c09..1d03a47 100644 --- a/src/common/key.h +++ b/src/common/key.h @@ -29,6 +29,7 @@ // If need arises, it can be changed to custom function or anything else #define KEY(x) SDLK_ ## x + // Key modifier defined as concatenation to KMOD_... // If need arises, it can be changed to custom function or anything else #define KEY_MOD(x) KMOD_ ## x diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 867958c..61fd6dd 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -51,7 +51,7 @@ CControl::CControl(CInstanceManager* iMan) m_event = static_cast< CEventQueue* > ( m_iMan->SearchInstance(CLASS_EVENT) ); m_main = static_cast< CRobotMain* > ( m_iMan->SearchInstance(CLASS_MAIN) ); m_particle = static_cast< Gfx::CParticle* > (m_iMan->SearchInstance(CLASS_PARTICULE)); - m_sound = static_cast< CSound* > (m_iMan->SearchInstance(CLASS_SOUND)); + m_sound = static_cast< CSoundInterface* > (m_iMan->SearchInstance(CLASS_SOUND)); m_eventType = EVENT_NULL; m_state = STATE_ENABLE|STATE_VISIBLE|STATE_GLINT; m_fontSize = Gfx::FONT_SIZE_SMALL; diff --git a/src/ui/control.h b/src/ui/control.h index ef49b65..d336ede 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -116,7 +116,7 @@ protected: CEventQueue* m_event; CRobotMain* m_main; Gfx::CParticle* m_particle; - CSound* m_sound; + CSoundInterface* m_sound; Math::Point m_pos; // corner upper / left Math::Point m_dim; // dimensions diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index afedfc9..0398e7f 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -20,6 +20,8 @@ #include +namespace Ui { + CInterface::CInterface() { @@ -337,3 +339,5 @@ void CInterface::Draw() m_table[i]->Draw(); } } + +} diff --git a/src/ui/interface.h b/src/ui/interface.h index d8f4d62..43f2698 100644 --- a/src/ui/interface.h +++ b/src/ui/interface.h @@ -49,6 +49,7 @@ #include #include +namespace Ui { const int MAXCONTROL = 100; @@ -100,3 +101,4 @@ class CInterface }; +} diff --git a/src/ui/key.cpp b/src/ui/key.cpp index 0d73ed0..de668bc 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -20,6 +20,7 @@ #include +namespace Ui { void GetKeyName(char *name, int key) { @@ -90,12 +91,9 @@ bool CKey::EventProcess(const Event &event) if (event.type == EVENT_MOUSE_BUTTON_DOWN && m_bCatch) { m_bCatch = false; - if ( TestKey(event.param) ) // impossible ? - { + if ( TestKey(event.param) ) { // impossible ? m_sound->Play(SOUND_TZOING); - } - else - { + } else { if ( event.param == m_key[0] || event.param == m_key[1] ) { m_key[0] = event.param; m_key[1] = 0; @@ -120,7 +118,7 @@ bool CKey::EventProcess(const Event &event) bool CKey::TestKey(int key) { - if ( key == VK_PAUSE || key == VK_SNAPSHOT ) return true; // blocked key + if ( key == KEY(PAUSE) || key == KEY(PRINT) ) return true; // blocked key for (int i = 0; i < 20; i++) { for (int j = 0; j < 2; j++) { @@ -237,3 +235,4 @@ int CKey::GetKey(int option) return m_key[option]; } +} diff --git a/src/ui/key.h b/src/ui/key.h index db7d856..5ca71b0 100644 --- a/src/ui/key.h +++ b/src/ui/key.h @@ -27,9 +27,11 @@ #include #include #include +#include #include +namespace Ui { class CKey : public CControl { @@ -55,3 +57,5 @@ class CKey : public CControl }; +} + -- cgit v1.2.3-1-g7c22 From a00032d07565b39b8cd1a485b0dd02df87cc18e7 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 23:05:59 +0200 Subject: * ui/label.cpp compiles --- src/ui/label.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/label.cpp b/src/ui/label.cpp index 261f3fc..ec7b2cb 100644 --- a/src/ui/label.cpp +++ b/src/ui/label.cpp @@ -70,11 +70,11 @@ void CLabel::Draw() pos.y = m_pos.y + m_dim.y / 2.0f; - switch (m_justif) { + switch (m_textAlign) { case Gfx::TEXT_ALIGN_LEFT: pos.x = m_pos.x; break; case Gfx::TEXT_ALIGN_CENTER: pos.x = m_pos.x + m_dim.x / 2.0f; break; case Gfx::TEXT_ALIGN_RIGHT: pos.x = m_pos.x + m_dim.x; break; } - m_engine->GetText()->DrawText(std::string(m_name), m_fontType, m_fontSize, pos, m_dim.x, m_justif, 0); + m_engine->GetText()->DrawText(std::string(m_name), m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } -- cgit v1.2.3-1-g7c22 From c02ac93379287fd83b134c34aa925c85fcda8e26 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 23:56:29 +0200 Subject: * list.cpp compiles --- src/ui/label.cpp | 4 + src/ui/label.h | 2 + src/ui/list.cpp | 649 ++++++++++++++++++++++++------------------------------ src/ui/list.h | 35 +-- src/ui/scroll.cpp | 16 +- src/ui/scroll.h | 6 +- 6 files changed, 332 insertions(+), 380 deletions(-) diff --git a/src/ui/label.cpp b/src/ui/label.cpp index ec7b2cb..fb5f1d8 100644 --- a/src/ui/label.cpp +++ b/src/ui/label.cpp @@ -20,6 +20,8 @@ #include +namespace Ui { + // Object's constructor. @@ -78,3 +80,5 @@ void CLabel::Draw() m_engine->GetText()->DrawText(std::string(m_name), m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } + +} diff --git a/src/ui/label.h b/src/ui/label.h index f65e1dd..303b698 100644 --- a/src/ui/label.h +++ b/src/ui/label.h @@ -24,6 +24,7 @@ #include +namespace Ui { class CLabel : public CControl { @@ -38,3 +39,4 @@ class CLabel : public CControl }; +} diff --git a/src/ui/list.cpp b/src/ui/list.cpp index 9fbc5d9..9f1d579 100644 --- a/src/ui/list.cpp +++ b/src/ui/list.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,50 +18,31 @@ // list.cpp -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "ui/button.h" -#include "ui/scroll.h" -#include "old/text.h" -#include "ui/list.h" +#include +namespace Ui { const float MARGING = 4.0f; - // Object's constructor. -CList::CList(CInstanceManager* iMan) : CControl(iMan) +CList::CList() : CControl() { - int i; - - for ( i=0 ; iGetEvent(event); + eventMsg = event.type; + } + + CControl::Create(pos, dim, icon, eventMsg); - m_scroll = new CScroll(m_iMan); + m_scroll = new CScroll(); m_scroll->Create(pos, dim, 0, EVENT_NULL); - m_eventScroll = m_scroll->RetEventMsg(); + m_eventScroll = m_scroll->GetEventType(); return MoveAdjust(); } @@ -107,52 +94,54 @@ bool CList::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg bool CList::MoveAdjust() { - Math::Point ipos, idim, ppos, ddim; - float marging, h; - int i; + Math::Point ipos, idim, ppos, ddim; + float marging, h; - for ( i=0 ; iRetText()->RetHeight(m_fontSize, m_fontType)*m_expand; + h = m_engine->GetText()->GetHeight(m_fontType, m_fontSize) * m_expand; - m_displayLine = (int)(idim.y/h); - if ( m_displayLine == 0 ) return false; - if ( m_displayLine > LISTMAXDISPLAY ) m_displayLine = LISTMAXDISPLAY; - idim.y = h*m_displayLine; - m_dim.y = idim.y+marging*2.0f/480.f; + m_displayLine = static_cast(idim.y / h); + if (m_displayLine == 0) + return false; + if (m_displayLine > LISTMAXDISPLAY) + m_displayLine = LISTMAXDISPLAY; + idim.y = h * m_displayLine; + m_dim.y = idim.y + marging * 2.0f / 480.f; ppos.x = ipos.x; - ppos.y = ipos.y+idim.y-h; - ddim.x = idim.x-SCROLL_WIDTH; + ppos.y = ipos.y + idim.y - h; + ddim.x = idim.x - SCROLL_WIDTH; ddim.y = h; - for ( i=0 ; iCreate(ppos, ddim, -1, EVENT_NULL); - m_button[i]->SetJustif(1); + m_button[i]->SetTextAlign(Gfx::TEXT_ALIGN_CENTER); m_button[i]->SetState(STATE_SIMPLY); m_button[i]->SetFontType(m_fontType); m_button[i]->SetFontSize(m_fontSize); ppos.y -= h; - m_eventButton[i] = m_button[i]->RetEventMsg(); + m_eventButton[i] = m_button[i]->GetEventType(); } - if ( m_scroll != 0 ) - { - ppos.x = ipos.x+idim.x-SCROLL_WIDTH; + if ( m_scroll != nullptr ) { + ppos.x = ipos.x + idim.x - SCROLL_WIDTH; ppos.y = ipos.y; ddim.x = SCROLL_WIDTH; ddim.y = idim.y; @@ -168,19 +157,22 @@ bool CList::MoveAdjust() // Returns the message of a button. -EventMsg CList::RetEventMsgButton(int i) +EventType CList::GetEventMsgButton(int i) { - if ( i < 0 || i >= m_displayLine ) return EVENT_NULL; - if ( m_button[i] == 0 ) return EVENT_NULL; - return m_button[i]->RetEventMsg(); + if (i < 0 || i >= m_displayLine) + return EVENT_NULL; + if (m_button[i] == nullptr) + return EVENT_NULL; + return m_button[i]->GetEventType(); } // Returns the message from the elevator. -EventMsg CList::RetEventMsgScroll() +EventType CList::GetEventMsgScroll() { - if ( m_scroll == 0 ) return EVENT_NULL; - return m_scroll->RetEventMsg(); + if (m_scroll == nullptr) + return EVENT_NULL; + return m_scroll->GetEventType(); } @@ -189,6 +181,7 @@ void CList::SetPos(Math::Point pos) CControl::SetPos(pos); } + void CList::SetDim(Math::Point dim) { m_dim = dim; @@ -199,47 +192,43 @@ void CList::SetDim(Math::Point dim) bool CList::SetState(int state, bool bState) { - int i; - - if ( state & STATE_ENABLE ) - { - for ( i=0 ; iSetState(state, bState); + if (state & STATE_ENABLE) { + for (int i = 0; i < m_displayLine; i++) { + if (m_button[i] != nullptr) + m_button[i]->SetState(state, bState); } - if ( m_scroll != 0 ) m_scroll->SetState(state, bState); + if (m_scroll != nullptr) + m_scroll->SetState(state, bState); } return CControl::SetState(state, bState); } + bool CList::SetState(int state) { - int i; - - if ( state & STATE_ENABLE ) - { - for ( i=0 ; iSetState(state); + if (state & STATE_ENABLE) { + for (int i = 0; i < m_displayLine; i++) { + if (m_button[i] != nullptr) + m_button[i]->SetState(state); } - if ( m_scroll != 0 ) m_scroll->SetState(state); + if (m_scroll != nullptr) + m_scroll->SetState(state); } return CControl::SetState(state); } + bool CList::ClearState(int state) { - int i; - - if ( state & STATE_ENABLE ) - { - for ( i=0 ; iClearState(state); + if (state & STATE_ENABLE) { + for (int i = 0; i < m_displayLine; i++) { + if (m_button[i] != nullptr) + m_button[i]->ClearState(state); } - if ( m_scroll != 0 ) m_scroll->ClearState(state); + if (m_scroll != nullptr) + m_scroll->ClearState(state); } return CControl::ClearState(state); @@ -250,47 +239,38 @@ bool CList::ClearState(int state) bool CList::EventProcess(const Event &event) { - int i; - - if ( m_bBlink && // blinks? - event.event == EVENT_FRAME ) - { + int i; + if (m_bBlink && event.type == EVENT_FRAME) { i = m_selectLine-m_firstLine; - if ( i >= 0 && i < 4 && - m_button[i] != 0 ) - { + if (i >= 0 && i < 4 && m_button[i] != nullptr) { m_blinkTime += event.rTime; - if ( Math::Mod(m_blinkTime, 0.7f) < 0.3f ) - { + if (Math::Mod(m_blinkTime, 0.7f) < 0.3f) { m_button[i]->ClearState(STATE_ENABLE); m_button[i]->ClearState(STATE_CHECK); - } - else - { + } else { m_button[i]->SetState(STATE_ENABLE); m_button[i]->SetState(STATE_CHECK); } } } - if ( (m_state & STATE_VISIBLE) == 0 ) return true; - if ( (m_state & STATE_ENABLE) == 0 ) return true; + if ((m_state & STATE_VISIBLE) == 0) + return true; + if ((m_state & STATE_ENABLE) == 0) + return true; - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELUP && - Detect(event.pos) ) - { - if ( m_firstLine > 0 ) m_firstLine --; + if (event.type == EVENT_KEY_DOWN && event.mouseButton.button == 5 && Detect(event.pos)) { + if (m_firstLine > 0) + m_firstLine--; UpdateScroll(); UpdateButton(); return true; } - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELDOWN && - Detect(event.pos) ) - { - if ( m_firstLine < m_totalLine-m_displayLine ) m_firstLine ++; + + if (event.type == EVENT_KEY_DOWN && event.mouseButton.button == 4 && Detect(event.pos)) { + if (m_firstLine < m_totalLine - m_displayLine) + m_firstLine++; UpdateScroll(); UpdateButton(); return true; @@ -298,46 +278,41 @@ bool CList::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_MOUSEMOVE && Detect(event.pos) ) - { - m_engine->SetMouseType(D3DMOUSENORM); - for ( i=0 ; i= m_totalLine ) break; - if ( m_button[i] != 0 ) - { + if (event.type == EVENT_MOUSE_MOVE && Detect(event.pos)) { + m_engine->SetMouseType(Gfx::ENG_MOUSE_NORM); + for (i = 0; i < m_displayLine; i++) { + if (i + m_firstLine >= m_totalLine) + break; + if (m_button[i] != nullptr) m_button[i]->EventProcess(event); - } } } - if ( m_bSelectCap ) - { - for ( i=0 ; i= m_totalLine ) break; - if ( m_button[i] != 0 ) - { - if ( !m_button[i]->EventProcess(event) ) return false; - - if ( event.event == m_eventButton[i] ) - { - SetSelect(m_firstLine+i); + if (m_bSelectCap) { + for (i = 0; i < m_displayLine; i++) { + if (i + m_firstLine >= m_totalLine) + break; + + if (m_button[i] != nullptr) { + if (!m_button[i]->EventProcess(event)) + return false; + + if (event.type == m_eventButton[i]) { + SetSelect(m_firstLine + i); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); // selected line changes } } } } - if ( m_scroll != 0 ) - { - if ( !m_scroll->EventProcess(event) ) return false; + if (m_scroll != nullptr) { + if (!m_scroll->EventProcess(event)) + return false; - if ( event.event == m_eventScroll ) - { + if (event.type == m_eventScroll) { MoveScroll(); UpdateButton(); } @@ -353,46 +328,40 @@ void CList::Draw() { Math::Point uv1, uv2, corner, pos, dim, ppos, ddim; float dp; - int i, j; + int i; char text[100]; char *pb, *pe; - if ( (m_state & STATE_VISIBLE) == 0 ) return; + if ((m_state & STATE_VISIBLE) == 0) + return; - if ( m_state & STATE_SHADOW ) - { + if (m_state & STATE_SHADOW) DrawShadow(m_pos, m_dim); - } - dp = 0.5f/256.0f; + dp = 0.5f / 256.0f; - if ( m_icon != -1 ) - { + if (m_icon != -1) { dim = m_dim; - if ( m_icon == 0 ) - { + if (m_icon == 0) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 128.0f/256.0f; - uv1.y = 64.0f/256.0f; // u-v texture - uv2.x = 160.0f/256.0f; - uv2.y = 96.0f/256.0f; - } - else - { + uv1.x = 128.0f / 256.0f; + uv1.y = 64.0f / 256.0f; // u-v texture + uv2.x = 160.0f / 256.0f; + uv2.y = 96.0f / 256.0f; + } else { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 132.0f/256.0f; - uv1.y = 68.0f/256.0f; // u-v texture - uv2.x = 156.0f/256.0f; - uv2.y = 92.0f/256.0f; + uv1.x = 132.0f / 256.0f; + uv1.y = 68.0f / 256.0f; // u-v texture + uv2.x = 156.0f / 256.0f; + uv2.y = 92.0f / 256.0f; - if ( m_button[0] != 0 ) - { - dim = m_button[0]->RetDim(); + if (m_button[0] != nullptr) { + dim = m_button[0]->GetDim(); dim.y *= m_displayLine; // background sounds spot behind } } @@ -402,28 +371,26 @@ void CList::Draw() uv2.x -= dp; uv2.y -= dp; - corner.x = 10.0f/640.0f; - corner.y = 10.0f/480.0f; - DrawIcon(m_pos, dim, uv1, uv2, corner, 8.0f/256.0f); + corner.x = 10.0f / 640.0f; + corner.y = 10.0f / 480.0f; + DrawIcon(m_pos, dim, uv1, uv2, corner, 8.0f / 256.0f); } - if ( m_totalLine < m_displayLine ) // no buttons to the bottom? - { + if ( m_totalLine < m_displayLine ) { // no buttons to the bottom? i = m_totalLine; - if ( m_button[i] != 0 ) - { - pos = m_button[i]->RetPos(); - dim = m_button[i]->RetDim(); - pos.y += dim.y*1.1f; + if ( m_button[i] != 0 ) { + pos = m_button[i]->GetPos(); + dim = m_button[i]->GetDim(); + pos.y += dim.y * 1.1f; dim.y *= 0.4f; pos.y -= dim.y; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); - uv1.x = 120.0f/256.0f; - uv1.y = 64.0f/256.0f; - uv2.x = 128.0f/256.0f; - uv2.y = 48.0f/256.0f; + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw + uv1.x = 120.0f / 256.0f; + uv1.y = 64.0f / 256.0f; + uv2.x = 128.0f / 256.0f; + uv2.y = 48.0f / 256.0f; uv1.x += dp; uv1.y -= dp; uv2.x -= dp; @@ -432,108 +399,93 @@ void CList::Draw() } } - for ( i=0 ; i= m_totalLine ) break; + for (i = 0; i < m_displayLine; i++) { + if ( i + m_firstLine >= m_totalLine ) + break; - if ( m_button[i] != 0 ) - { - if ( !m_bBlink && i+m_firstLine < m_totalLine ) - { + if ( m_button[i] != nullptr ) { + if ( !m_bBlink && i + m_firstLine < m_totalLine ) m_button[i]->SetState(STATE_ENABLE, m_enable[i+m_firstLine] && (m_state & STATE_ENABLE) ); - } + m_button[i]->Draw(); // draws a box without text // draws text in the box - pos = m_button[i]->RetPos(); - dim = m_button[i]->RetDim(); - if ( m_tabs[0] == 0.0f ) - { - ppos.x = pos.x+dim.y*0.5f; - ppos.y = pos.y+dim.y*0.5f; - ppos.y -= m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2.0f; + pos = m_button[i]->GetPos(); + dim = m_button[i]->GetDim(); + if ( m_tabs[0] == 0.0f ) { + ppos.x = pos.x + dim.y * 0.5f; + ppos.y = pos.y + dim.y * 0.5f; + ppos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize) / 2.0f; ddim.x = dim.x-dim.y; - DrawCase(m_text[i+m_firstLine], ppos, ddim.x, 1); - } - else - { - ppos.x = pos.x+dim.y*0.5f; - ppos.y = pos.y+dim.y*0.5f; - ppos.y -= m_engine->RetText()->RetHeight(m_fontSize, m_fontType)/2.0f; - pb = m_text[i+m_firstLine]; - for ( j=0 ; j<10 ; j++ ) - { + DrawCase(m_text[i + m_firstLine], ppos, ddim.x, Gfx::TEXT_ALIGN_CENTER); + } else { + ppos.x = pos.x + dim.y * 0.5f; + ppos.y = pos.y + dim.y * 0.5f; + ppos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize) / 2.0f; + pb = m_text[i + m_firstLine]; + for (int j = 0; j < 10; j++) { pe = strchr(pb, '\t'); if ( pe == 0 ) - { strcpy(text, pb); - } - else - { - strncpy(text, pb, pe-pb); - text[pe-pb] = 0; + else { + strncpy(text, pb, pe - pb); + text[pe - pb] = 0; } DrawCase(text, ppos, m_tabs[j], m_justifs[j]); - if ( pe == 0 ) break; + if ( pe == 0 ) + break; ppos.x += m_tabs[j]; - pb = pe+1; + pb = pe + 1; } } - if ( (m_state & STATE_EXTEND) && i < m_totalLine ) - { - pos = m_button[i]->RetPos(); - dim = m_button[i]->RetDim(); - pos.x += dim.x-dim.y*0.75f; - dim.x = dim.y*0.75f; - pos.x += 2.0f/640.0f; - pos.y += 2.0f/480.0f; - dim.x -= 4.0f/640.0f; - dim.y -= 4.0f/480.0f; - - if ( m_check[i+m_firstLine] ) - { + if ( (m_state & STATE_EXTEND) && i < m_totalLine) { + pos = m_button[i]->GetPos(); + dim = m_button[i]->GetDim(); + pos.x += dim.x - dim.y * 0.75f; + dim.x = dim.y * 0.75f; + pos.x += 2.0f / 640.0f; + pos.y += 2.0f / 480.0f; + dim.x -= 4.0f / 640.0f; + dim.y -= 4.0f / 480.0f; + + if ( m_check[i + m_firstLine] ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); - uv1.x = 64.0f/256.0f; - uv1.y = 0.0f/256.0f; - uv2.x = 96.0f/256.0f; - uv2.y = 32.0f/256.0f; + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); + uv1.x = 64.0f / 256.0f; + uv1.y = 0.0f / 256.0f; + uv2.x = 96.0f / 256.0f; + uv2.y = 32.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; DrawIcon(pos, dim, uv1, uv2); // square shape - m_engine->SetState(D3DSTATETTw); - uv1.x = 0.0f/256.0f; // v - uv1.y = 64.0f/256.0f; - uv2.x = 32.0f/256.0f; - uv2.y = 96.0f/256.0f; + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw + uv1.x = 0.0f / 256.0f; // v + uv1.y = 64.0f / 256.0f; + uv2.x = 32.0f / 256.0f; + uv2.y = 96.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; DrawIcon(pos, dim, uv1, uv2); // draws v - } - else - { + } else { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATETTw); - if ( i+m_firstLine == m_selectLine ) - { - uv1.x =224.0f/256.0f; // < - uv1.y =192.0f/256.0f; - uv2.x =256.0f/256.0f; - uv2.y =224.0f/256.0f; - } - else - { - uv1.x = 96.0f/256.0f; // x - uv1.y = 32.0f/256.0f; - uv2.x =128.0f/256.0f; - uv2.y = 64.0f/256.0f; + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw + if ( i + m_firstLine == m_selectLine ) { + uv1.x =224.0f / 256.0f; // < + uv1.y =192.0f / 256.0f; + uv2.x =256.0f / 256.0f; + uv2.y =224.0f / 256.0f; + } else { + uv1.x = 96.0f / 256.0f; // x + uv1.y = 32.0f / 256.0f; + uv2.x =128.0f / 256.0f; + uv2.y = 64.0f / 256.0f; } uv1.x += dp; uv1.y += dp; @@ -546,29 +498,18 @@ void CList::Draw() } if ( m_scroll != 0 ) - { m_scroll->Draw(); // draws the lift - } } // Displays text in a box. -void CList::DrawCase(char *text, Math::Point pos, float width, int justif) +void CList::DrawCase(char *text, Math::Point pos, float width, Gfx::TextAlign justif) { - if ( justif == 1 ) - { - m_engine->RetText()->DrawText(text, pos, width, 1, m_fontSize, m_fontStretch, m_fontType, 0); - } - else if ( justif == 0 ) - { - pos.x += width/2.0f; - m_engine->RetText()->DrawText(text, pos, width, 0, m_fontSize, m_fontStretch, m_fontType, 0); - } + if (justif == Gfx::TEXT_ALIGN_LEFT) + pos.x += width / 2.0f; else - { pos.x += width; - m_engine->RetText()->DrawText(text, pos, width, -1, m_fontSize, m_fontStretch, m_fontType, 0); - } + m_engine->GetText()->DrawText(std::string(text), m_fontType, m_fontSize, pos, width, justif, 0); } @@ -593,7 +534,7 @@ void CList::SetTotal(int i) // Returns the total number of lines. -int CList::RetTotal() +int CList::GetTotal() { return m_totalLine; } @@ -604,11 +545,8 @@ int CList::RetTotal() void CList::SetSelect(int i) { if ( m_bSelectCap ) - { m_selectLine = i; - } - else - { + else { m_firstLine = i; UpdateScroll(); } @@ -618,16 +556,12 @@ void CList::SetSelect(int i) // Returns the selected line. -int CList::RetSelect() +int CList::GetSelect() { if ( m_bSelectCap ) - { return m_selectLine; - } else - { return m_firstLine; - } } @@ -638,7 +572,7 @@ void CList::SetSelectCap(bool bEnable) m_bSelectCap = bEnable; } -bool CList::RetSelectCap() +bool CList::GetSelectCap() { return m_bSelectCap; } @@ -648,25 +582,22 @@ bool CList::RetSelectCap() void CList::SetBlink(bool bEnable) { - int i; + int i; m_bBlink = bEnable; m_blinkTime = 0.0f; i = m_selectLine-m_firstLine; - if ( i >= 0 && i < 4 && - m_button[i] != 0 ) - { - if ( !bEnable ) - { + if (i >= 0 && i < 4 && m_button[i] != nullptr) { + if ( !bEnable ) { m_button[i]->SetState(STATE_CHECK); m_button[i]->ClearState(STATE_ENABLE); } } } -bool CList::RetBlink() +bool CList::GetBlink() { return m_bBlink; } @@ -676,30 +607,27 @@ bool CList::RetBlink() void CList::SetName(int i, char* name) { - if ( i < 0 || i >= LISTMAXTOTAL ) return; + if ( i < 0 || i >= LISTMAXTOTAL ) + return; if ( i >= m_totalLine ) - { m_totalLine = i+1; // expands the list - } if ( name[0] == 0 ) - { strcpy(m_text[i], " "); - } else - { strcpy(m_text[i], name); - } + UpdateButton(); UpdateScroll(); } // Returns the text of a line. -char* CList::RetName(int i) +char* CList::GetName(int i) { - if ( i < 0 || i >= m_totalLine ) return 0; + if ( i < 0 || i >= m_totalLine ) + return 0; return m_text[i]; } @@ -709,16 +637,18 @@ char* CList::RetName(int i) void CList::SetCheck(int i, bool bMode) { - if ( i < 0 || i >= m_totalLine ) return; + if ( i < 0 || i >= m_totalLine ) + return; m_check[i] = bMode; } // Returns the bit "check" for a box. -bool CList::RetCheck(int i) +bool CList::GetCheck(int i) { - if ( i < 0 || i >= m_totalLine ) return false; + if ( i < 0 || i >= m_totalLine ) + return false; return m_check[i]; } @@ -728,16 +658,18 @@ bool CList::RetCheck(int i) void CList::SetEnable(int i, bool bMode) { - if ( i < 0 || i >= m_totalLine ) return; + if ( i < 0 || i >= m_totalLine ) + return; m_enable[i] = bMode; } // Returns the bit "enable" for a box. -bool CList::RetEnable(int i) +bool CList::GetEnable(int i) { - if ( i < 0 || i >= m_totalLine ) return false; + if ( i < 0 || i >= m_totalLine ) + return false; return m_enable[i]; } @@ -745,16 +677,18 @@ bool CList::RetEnable(int i) // Management of the position of the tabs. -void CList::SetTabs(int i, float pos, int justif) +void CList::SetTabs(int i, float pos, Gfx::TextAlign justif) { - if ( i < 0 || i >= 10 ) return; + if ( i < 0 || i >= 10 ) + return; m_tabs[i] = pos; m_justifs[i] = justif; } -float CList::RetTabs(int i) +float CList::GetTabs(int i) { - if ( i < 0 || i >= 10 ) return 0.0f; + if ( i < 0 || i >= 10 ) + return 0.0f; return m_tabs[i]; } @@ -765,19 +699,20 @@ void CList::ShowSelect(bool bFixed) { int sel; - if ( bFixed && - m_selectLine >= m_firstLine && - m_selectLine < m_firstLine+m_displayLine ) return; // all good + if ( bFixed && m_selectLine >= m_firstLine && m_selectLine < m_firstLine+m_displayLine ) + return; // all good sel = m_selectLine; // Down from 1/2 * h. - sel += m_displayLine/2; - if ( sel > m_totalLine-1 ) sel = m_totalLine-1; + sel += m_displayLine / 2; + if ( sel > m_totalLine - 1 ) + sel = m_totalLine - 1; // Back to h-1. - sel -= m_displayLine-1; - if ( sel < 0 ) sel = 0; + sel -= m_displayLine - 1; + if ( sel < 0 ) + sel = 0; m_firstLine = sel; @@ -790,25 +725,22 @@ void CList::ShowSelect(bool bFixed) void CList::UpdateButton() { - int state, i, j; + int state, i, j; - state = CControl::RetState(); + state = CControl::GetState(); j = m_firstLine; - for ( i=0 ; iSetState(STATE_CHECK, (j == m_selectLine)); - if ( j < m_totalLine ) - { + if ( j < m_totalLine ) { //? m_button[i]->SetName(m_text[j]); m_button[i]->SetName(" "); // blank button m_button[i]->SetState(STATE_ENABLE, (state & STATE_ENABLE)); - } - else - { + } else { m_button[i]->SetName(" "); // blank button m_button[i]->ClearState(STATE_ENABLE); } @@ -820,27 +752,28 @@ void CList::UpdateButton() void CList::UpdateScroll() { - float ratio, value, step; + float ratio, value, step; - if ( m_scroll == 0 ) return; + if (m_scroll == nullptr) + return; - if ( m_totalLine <= m_displayLine ) - { + if (m_totalLine <= m_displayLine) { ratio = 1.0f; value = 0.0f; step = 0.0f; - } - else - { - ratio = (float)m_displayLine/m_totalLine; + } else { + ratio = (float)m_displayLine / m_totalLine; if ( ratio > 1.0f ) ratio = 1.0f; - value = (float)m_firstLine/(m_totalLine-m_displayLine); - if ( value < 0.0f ) value = 0.0f; - if ( value > 1.0f ) value = 1.0f; + value = (float)m_firstLine / (m_totalLine - m_displayLine); + if ( value < 0.0f ) + value = 0.0f; + if ( value > 1.0f ) + value = 1.0f; - step = (float)1.0f/(m_totalLine-m_displayLine); - if ( step < 0.0f ) step = 0.0f; + step = (float)1.0f/ (m_totalLine - m_displayLine); + if ( step < 0.0f ) + step = 0.0f; } m_scroll->SetVisibleRatio(ratio); @@ -852,17 +785,21 @@ void CList::UpdateScroll() void CList::MoveScroll() { - float pos; - int n; + float pos; + int n; - if ( m_scroll == 0 ) return; + if ( m_scroll == 0 ) + return; - n = m_totalLine-m_displayLine; - pos = m_scroll->RetVisibleValue(); - pos += m_scroll->RetArrowStep()/2.0f; // it's magic! - m_firstLine = (int)(pos*n); - if ( m_firstLine < 0 ) m_firstLine = 0; - if ( m_firstLine > n ) m_firstLine = n; + n = m_totalLine - m_displayLine; + pos = m_scroll->GetVisibleValue(); + pos += m_scroll->GetArrowStep() / 2.0f; // it's magic! + m_firstLine = (int)(pos * n); + if ( m_firstLine < 0 ) + m_firstLine = 0; + if ( m_firstLine > n ) + m_firstLine = n; } +} diff --git a/src/ui/list.h b/src/ui/list.h index c7c278d..c963203 100644 --- a/src/ui/list.h +++ b/src/ui/list.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -20,9 +21,15 @@ #include +#include +#include #include +#include + + +namespace Ui { const int LISTMAXDISPLAY = 20; // maximum number of visible lines const int LISTMAXTOTAL = 100; // maximum total number of lines @@ -50,40 +57,40 @@ class CList : public CControl void Flush(); void SetTotal(int i); - int RetTotal(); + int GetTotal(); void SetSelect(int i); - int RetSelect(); + int GetSelect(); void SetSelectCap(bool bEnable); - bool RetSelectCap(); + bool GetSelectCap(); void SetBlink(bool bEnable); - bool RetBlink(); + bool GetBlink(); void SetName(int i, char* name); - char* RetName(int i); + char* GetName(int i); void SetCheck(int i, bool bMode); - bool RetCheck(int i); + bool GetCheck(int i); void SetEnable(int i, bool bEnable); - bool RetEnable(int i); + bool GetEnable(int i); - void SetTabs(int i, float pos, int justif=1); - float RetTabs(int i); + void SetTabs(int i, float pos, Gfx::TextAlign justif=Gfx::TEXT_ALIGN_CENTER); + float GetTabs(int i); void ShowSelect(bool bFixed); - EventType RetEventMsgButton(int i); - EventType RetEventMsgScroll(); + EventType GetEventMsgButton(int i); + EventType GetEventMsgScroll(); protected: bool MoveAdjust(); void UpdateButton(); void UpdateScroll(); void MoveScroll(); - void DrawCase(char *text, Math::Point pos, float width, int justif); + void DrawCase(char *text, Math::Point pos, float width, Gfx::TextAlign justif); protected: CButton* m_button[LISTMAXDISPLAY]; @@ -101,7 +108,7 @@ class CList : public CControl bool m_bSelectCap; float m_blinkTime; float m_tabs[10]; - int m_justifs[10]; + Gfx::TextAlign m_justifs[10]; char m_text[LISTMAXTOTAL][100]; char m_check[LISTMAXTOTAL]; @@ -109,3 +116,5 @@ class CList : public CControl }; +} + diff --git a/src/ui/scroll.cpp b/src/ui/scroll.cpp index 051de8d..5526c80 100644 --- a/src/ui/scroll.cpp +++ b/src/ui/scroll.cpp @@ -35,7 +35,7 @@ // Object's constructor. -CScroll::CScroll(CInstanceManager* iMan) : CControl(iMan) +CScroll::CScroll() : CControl() { m_buttonUp = 0; m_buttonDown = 0; @@ -106,7 +106,7 @@ void CScroll::MoveAdjust() pc = (CButton*)m_buttonUp; pc->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), 49, EVENT_NULL); pc->SetRepeat(true); - m_eventUp = pc->RetEventMsg(); + m_eventUp = pc->GetEventMsg(); } if ( m_buttonDown == 0 ) @@ -115,7 +115,7 @@ void CScroll::MoveAdjust() pc = (CButton*)m_buttonDown; pc->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), 50, EVENT_NULL); pc->SetRepeat(true); - m_eventDown = pc->RetEventMsg(); + m_eventDown = pc->GetEventMsg(); } } @@ -299,7 +299,7 @@ bool CScroll::EventProcess(const Event &event) m_buttonUp != 0 ) { Event newEvent = event; - newEvent.event = m_buttonUp->RetEventMsg(); + newEvent.event = m_buttonUp->GetEventMsg(); m_event->AddEvent(newEvent); } if ( event.event == EVENT_KEYDOWN && @@ -308,7 +308,7 @@ bool CScroll::EventProcess(const Event &event) m_buttonDown != 0 ) { Event newEvent = event; - newEvent.event = m_buttonDown->RetEventMsg(); + newEvent.event = m_buttonDown->GetEventMsg(); m_event->AddEvent(newEvent); } @@ -437,7 +437,7 @@ void CScroll::SetVisibleValue(float value) AdjustGlint(); } -float CScroll::RetVisibleValue() +float CScroll::GetVisibleValue() { return m_visibleValue; } @@ -451,7 +451,7 @@ void CScroll::SetVisibleRatio(float value) AdjustGlint(); } -float CScroll::RetVisibleRatio() +float CScroll::GetVisibleRatio() { return m_visibleRatio; } @@ -462,7 +462,7 @@ void CScroll::SetArrowStep(float step) m_step = step; } -float CScroll::RetArrowStep() +float CScroll::GetArrowStep() { return m_step; } diff --git a/src/ui/scroll.h b/src/ui/scroll.h index a82fea0..289d309 100644 --- a/src/ui/scroll.h +++ b/src/ui/scroll.h @@ -46,13 +46,13 @@ class CScroll : public CControl void Draw(); void SetVisibleValue(float value); - float RetVisibleValue(); + float GetVisibleValue(); void SetVisibleRatio(float value); - float RetVisibleRatio(); + float GetVisibleRatio(); void SetArrowStep(float step); - float RetArrowStep(); + float GetArrowStep(); protected: void MoveAdjust(); -- cgit v1.2.3-1-g7c22 From 48ad79a03c12b923dfdb3795a2138445859cf779 Mon Sep 17 00:00:00 2001 From: erihel Date: Sat, 18 Aug 2012 11:30:29 +0200 Subject: * minor changes to control.cpp to compile it without errors --- src/CMakeLists.txt | 11 ++++++----- src/ui/control.cpp | 4 ++-- src/ui/control.h | 26 +++++++++++++------------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b998d19..8870f21 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ # CBot shared library is built separately -add_subdirectory(CBot) +add_subdirectory(CBot) # Configure options @@ -61,9 +61,9 @@ common/image.cpp common/logger.cpp common/iman.cpp # common/metafile.cpp -# common/misc.cpp +common/misc.cpp # common/modfile.cpp -# common/profile.cpp +common/profile.cpp # common/restext.cpp common/stringutils.cpp graphics/core/color.cpp @@ -149,7 +149,7 @@ graphics/opengl/gldevice.cpp # ui/check.cpp # ui/color.cpp # ui/compass.cpp -# ui/control.cpp +ui/control.cpp # ui/displayinfo.cpp # ui/displaytext.cpp # ui/edit.cpp @@ -159,7 +159,7 @@ graphics/opengl/gldevice.cpp # ui/image.cpp # ui/interface.cpp # ui/key.cpp -# ui/label.cpp +ui/label.cpp # ui/list.cpp # ui/maindialog.cpp # ui/mainmap.cpp @@ -190,6 +190,7 @@ ${SDL_IMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} ${OPTIONAL_INCLUDE_DIRS} +.. ) link_directories(${CMAKE_CURRENT_SOURCE_DIR}/CBot) diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 61fd6dd..9893fc8 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -43,9 +43,9 @@ // Object's constructor. -CControl::CControl(CInstanceManager* iMan) +CControl::CControl() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_engine = static_cast< Gfx::CEngine* > ( m_iMan->SearchInstance(CLASS_ENGINE) ); m_event = static_cast< CEventQueue* > ( m_iMan->SearchInstance(CLASS_EVENT) ); diff --git a/src/ui/control.h b/src/ui/control.h index d336ede..dcae4f2 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -20,18 +20,18 @@ //#include "old/text.h" -#include "common/struct.h" -#include "common/event.h" -#include "graphics/engine/engine.h" -#include "graphics/engine/text.h" -#include "graphics/engine/particle.h" +#include +#include -#include "sound/sound.h" +#include +#include +#include -class CInstanceManager; -class CEvent; +#include + +// class CEvent; //class Gfx::CEngine; -class CRobotMain; +// class CRobotMain; //class Gfx::CParticle; //class CSound; @@ -80,8 +80,8 @@ public: virtual int GetState(); virtual void SetIcon(int icon); virtual int GetIcon(); - virtual void SetName(const char* name, bool bTooltip=true); - virtual const char* GetName(); + virtual void SetName(char* name, bool bTooltip=true); + virtual char* GetName(); virtual void SetTextAlign(Gfx::TextAlign mode); virtual int GetTextAlign(); virtual void SetFontSize(float size); @@ -90,8 +90,8 @@ public: virtual float GetFontStretch(); virtual void SetFontType(Gfx::FontType font); virtual Gfx::FontType GetFontType(); - virtual bool SetTooltip(const char* name); - virtual bool GetTooltip(Math::Point pos, const char* name); + virtual bool SetTooltip(char* name); + virtual bool GetTooltip(Math::Point pos, char* name); virtual void SetFocus(bool bFocus); virtual bool GetFocus(); -- cgit v1.2.3-1-g7c22 From 8d4a3ed57915af2acf8b3dcd9a8aec5a75806ca6 Mon Sep 17 00:00:00 2001 From: erihel Date: Sat, 18 Aug 2012 21:04:51 +0200 Subject: * wrong enum used for text alignment * wrong event function used --- src/CMakeLists.txt | 8 ++++---- src/ui/interface.cpp | 24 ++++++------------------ src/ui/key.cpp | 8 ++------ src/ui/label.cpp | 12 ++++-------- src/ui/label.h | 1 + src/ui/list.cpp | 18 +++++++----------- src/ui/list.h | 1 + 7 files changed, 25 insertions(+), 47 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8870f21..a49d371 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -61,9 +61,9 @@ common/image.cpp common/logger.cpp common/iman.cpp # common/metafile.cpp -common/misc.cpp +# common/misc.cpp # common/modfile.cpp -common/profile.cpp +# common/profile.cpp # common/restext.cpp common/stringutils.cpp graphics/core/color.cpp @@ -149,7 +149,7 @@ graphics/opengl/gldevice.cpp # ui/check.cpp # ui/color.cpp # ui/compass.cpp -ui/control.cpp +# ui/control.cpp # ui/displayinfo.cpp # ui/displaytext.cpp # ui/edit.cpp @@ -159,7 +159,7 @@ ui/control.cpp # ui/image.cpp # ui/interface.cpp # ui/key.cpp -ui/label.cpp +# ui/label.cpp # ui/list.cpp # ui/maindialog.cpp # ui/mainmap.cpp diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 0398e7f..6c96501 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -72,12 +72,8 @@ template inline T* CInterface::CreateControl(Math::Point pos, Math: { T* pc; int index; - Event event; - - if (eventMsg == EVENT_NULL) { - m_event->GetEvent(event); - eventMsg = event.type; - } + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); if ((index = GetNextFreeControl()) < 0) return nullptr; @@ -95,12 +91,8 @@ CWindow* CInterface::CreateWindows(Math::Point pos, Math::Point dim, int icon, E { CWindow* pc; int index; - Event event; - - if (eventMsg == EVENT_NULL) { - m_event->GetEvent(event); - eventMsg = event.type; - } + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); switch (eventMsg) { case EVENT_WINDOW0: index = 0; break; @@ -212,12 +204,8 @@ CList* CInterface::CreateList(Math::Point pos, Math::Point dim, int icon, EventT { CList* pc; int index; - Event event; - - if (eventMsg == EVENT_NULL) { - m_event->GetEvent(event); - eventMsg = event.type; - } + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); if ((index = GetNextFreeControl()) < 0) return nullptr; diff --git a/src/ui/key.cpp b/src/ui/key.cpp index de668bc..0cf74bc 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -59,12 +59,8 @@ CKey::~CKey() bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { char name[100]; - Event event; - - if (eventMsg == EVENT_NULL) { - m_event->GetEvent(event); - eventMsg = event.type; - } + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); GetResource(RES_EVENT, eventMsg, name); diff --git a/src/ui/label.cpp b/src/ui/label.cpp index fb5f1d8..c5da211 100644 --- a/src/ui/label.cpp +++ b/src/ui/label.cpp @@ -40,12 +40,8 @@ CLabel::~CLabel() bool CLabel::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - Event event; - - if (eventMsg == EVENT_NULL) { - m_event->GetEvent(event); - eventMsg = event.type; - } + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); return true; @@ -73,9 +69,9 @@ void CLabel::Draw() pos.y = m_pos.y + m_dim.y / 2.0f; switch (m_textAlign) { - case Gfx::TEXT_ALIGN_LEFT: pos.x = m_pos.x; break; + case Gfx::TEXT_ALIGN_RIGHT: pos.x = m_pos.x; break; case Gfx::TEXT_ALIGN_CENTER: pos.x = m_pos.x + m_dim.x / 2.0f; break; - case Gfx::TEXT_ALIGN_RIGHT: pos.x = m_pos.x + m_dim.x; break; + case Gfx::TEXT_ALIGN_LEFT: pos.x = m_pos.x + m_dim.x; break; } m_engine->GetText()->DrawText(std::string(m_name), m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); diff --git a/src/ui/label.h b/src/ui/label.h index 303b698..6fe2e31 100644 --- a/src/ui/label.h +++ b/src/ui/label.h @@ -23,6 +23,7 @@ #include #include +#include namespace Ui { diff --git a/src/ui/list.cpp b/src/ui/list.cpp index 9f1d579..73a48e3 100644 --- a/src/ui/list.cpp +++ b/src/ui/list.cpp @@ -42,7 +42,7 @@ CList::CList() : CControl() for (int i = 0; i < 10; i++) { m_tabs[i] = 0.0f; - m_justifs[i] = Gfx::TEXT_ALIGN_CENTER; + m_justifs[i] = Gfx::TEXT_ALIGN_RIGHT; } m_totalLine = 0; @@ -72,14 +72,10 @@ CList::~CList() bool CList::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand) { - Event event; m_expand = expand; - if (eventMsg == EVENT_NULL) { - m_event->GetEvent(event); - eventMsg = event.type; - } - + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); @@ -131,7 +127,7 @@ bool CList::MoveAdjust() for (int i = 0; i < m_displayLine; i++) { m_button[i] = new CButton(); m_button[i]->Create(ppos, ddim, -1, EVENT_NULL); - m_button[i]->SetTextAlign(Gfx::TEXT_ALIGN_CENTER); + m_button[i]->SetTextAlign(Gfx::TEXT_ALIGN_RIGHT); m_button[i]->SetState(STATE_SIMPLY); m_button[i]->SetFontType(m_fontType); m_button[i]->SetFontSize(m_fontSize); @@ -417,7 +413,7 @@ void CList::Draw() ppos.y = pos.y + dim.y * 0.5f; ppos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize) / 2.0f; ddim.x = dim.x-dim.y; - DrawCase(m_text[i + m_firstLine], ppos, ddim.x, Gfx::TEXT_ALIGN_CENTER); + DrawCase(m_text[i + m_firstLine], ppos, ddim.x, Gfx::TEXT_ALIGN_RIGHT); } else { ppos.x = pos.x + dim.y * 0.5f; ppos.y = pos.y + dim.y * 0.5f; @@ -505,9 +501,9 @@ void CList::Draw() void CList::DrawCase(char *text, Math::Point pos, float width, Gfx::TextAlign justif) { - if (justif == Gfx::TEXT_ALIGN_LEFT) + if (justif == Gfx::TEXT_ALIGN_CENTER) pos.x += width / 2.0f; - else + else if (justif == Gfx::TEXT_ALIGN_LEFT) pos.x += width; m_engine->GetText()->DrawText(std::string(text), m_fontType, m_fontSize, pos, width, justif, 0); } diff --git a/src/ui/list.h b/src/ui/list.h index c963203..2fc5e4d 100644 --- a/src/ui/list.h +++ b/src/ui/list.h @@ -25,6 +25,7 @@ #include #include +#include #include -- cgit v1.2.3-1-g7c22 From 574c07e388dfd902b6565bc4a5ac9b915c73074e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Sat, 18 Aug 2012 22:56:42 +0200 Subject: Further improvements in UI porting --- src/ui/button.cpp | 44 +++--- src/ui/button.h | 15 +- src/ui/check.cpp | 18 ++- src/ui/check.h | 12 +- src/ui/color.cpp | 57 +++---- src/ui/color.h | 28 ++-- src/ui/compass.cpp | 63 ++++---- src/ui/compass.h | 15 +- src/ui/control.cpp | 193 +++++++++++------------ src/ui/control.h | 21 ++- src/ui/displayinfo.cpp | 413 +++++++++++++++++++++++++------------------------ src/ui/displayinfo.h | 42 +++-- src/ui/displaytext.cpp | 174 +++++++++++---------- src/ui/displaytext.h | 34 ++-- src/ui/gauge.cpp | 46 +++--- src/ui/gauge.h | 12 +- src/ui/group.cpp | 334 +++++++++++++++++++-------------------- src/ui/group.h | 11 +- src/ui/image.cpp | 56 +++---- src/ui/image.h | 15 +- src/ui/slider.cpp | 75 +++++---- src/ui/slider.h | 16 +- 22 files changed, 891 insertions(+), 803 deletions(-) diff --git a/src/ui/button.cpp b/src/ui/button.cpp index ab2c644..1f11a0c 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -24,22 +25,22 @@ #include "graphics/engine/engine.h" //#include "common/language.h" //#include "old/math3d.h" -//#include "common/event.h" +#include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" #include "ui/button.h" +namespace Ui { const float DELAY1 = 0.4f; const float DELAY2 = 0.1f; - // Object's constructor. -CButton::CButton(CInstanceManager* iMan) : CControl(iMan) +CButton::CButton() : CControl() { m_bCapture = false; m_bImmediat = false; @@ -162,10 +163,10 @@ void CButton::Draw() if ( m_state & STATE_WARNING ) // shading yellow-black? { - pos.x = m_pos.x-( 8.0f/640.0f); - pos.y = m_pos.y-( 4.0f/480.0f); - dim.x = m_dim.x+(16.0f/640.0f); - dim.y = m_dim.y+( 8.0f/480.0f); + pos.x = m_pos.x - ( 8.0f / 640.0f); + pos.y = m_pos.y - ( 4.0f / 480.0f); + dim.x = m_dim.x + (16.0f / 640.0f); + dim.y = m_dim.y + ( 8.0f / 480.0f); if ( m_state & STATE_SHADOW ) { DrawShadow(pos, dim); @@ -188,17 +189,17 @@ void CButton::Draw() m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - dp = 0.5f/256.0f; + dp = 0.5f / 256.0f; - uv1.x = 128.0f/256.0f; - uv1.y = 96.0f/256.0f; - uv2.x = 136.0f/256.0f; - uv2.y = 128.0f/256.0f; + uv1.x = 128.0f / 256.0f; + uv1.y = 96.0f / 256.0f; + uv2.x = 136.0f / 256.0f; + uv2.y = 128.0f / 256.0f; if ( (m_state & STATE_ENABLE) == 0 ) { - uv1.x += 16.0f/256.0f; - uv2.x += 16.0f/256.0f; + uv1.x += 16.0f / 256.0f; + uv2.x += 16.0f / 256.0f; } uv1.x += dp; @@ -206,15 +207,15 @@ void CButton::Draw() uv2.x -= dp; uv2.y -= dp; - pos.y = m_pos.y+5.0f/480.0f; - dim.y = m_dim.y-10.0f/480.0f; - pos.x = m_pos.x+5.0f/640.0f; - dim.x = 3.0f/640.0f; + pos.y = m_pos.y + 5.0f / 480.0f; + dim.y = m_dim.y - 10.0f / 480.0f; + pos.x = m_pos.x + 5.0f / 640.0f; + dim.x = 3.0f / 640.0f; DrawIcon(pos, dim, uv1, uv2, 0.0f); - uv1.x += 8.0f/256.0f; - uv2.x += 8.0f/256.0f; - pos.x = m_pos.x+m_dim.x-5.0f/640.0f-3.0f/640.0f; + uv1.x += 8.0f / 256.0f; + uv2.x += 8.0f / 256.0f; + pos.x = m_pos.x + m_dim.x - 5.0f / 640.0f - 3.0f / 640.0f; DrawIcon(pos, dim, uv1, uv2, 0.0f); } #endif @@ -248,3 +249,4 @@ bool CButton::GetRepeat() return m_bRepeat; } +} diff --git a/src/ui/button.h b/src/ui/button.h index 38b2dab..d70b3d6 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,16 +22,16 @@ #include "ui/control.h" +namespace Gfx{ +class CEngine; +} -//class CD3DEngine; - - - +namespace Ui { class CButton : public CControl { public: - CButton(CInstanceManager* iMan); - virtual ~CButton(); + CButton (); + virtual ~CButton (); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -53,4 +54,4 @@ protected: float m_repeat; }; - +} diff --git a/src/ui/check.cpp b/src/ui/check.cpp index 424e4fc..b4ddf4a 100644 --- a/src/ui/check.cpp +++ b/src/ui/check.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -16,10 +17,10 @@ //#include -#include +//#include //#include -#include "common/struct.h" +//#include "common/struct.h" //#include "old/d3dengine.h" #include "graphics/engine/engine.h" //#include "old/math3d.h" @@ -28,14 +29,15 @@ #include "common/iman.h" #include "common/restext.h" //#include "old/text.h" +#include "graphics/engine/text.h" #include "ui/check.h" - +namespace Ui { // Object's constructor. -CCheck::CCheck(CInstanceManager* iMan) : CControl(iMan) +CCheck::CCheck() : CControl() { } @@ -103,7 +105,7 @@ void CCheck::Draw() if ( (m_state & STATE_VISIBLE) == 0 ) return; iDim = m_dim; - m_dim.x = m_dim.y*0.75f; // square + m_dim.x = m_dim.y * 0.75f; // square if ( m_state & STATE_SHADOW ) { @@ -159,10 +161,10 @@ void CCheck::Draw() if ( m_state & STATE_DEAD ) return; // Draw the name. - pos.x = m_pos.x+m_dim.y/0.9f; - pos.y = m_pos.y+m_dim.y*0.50f; + pos.x = m_pos.x + m_dim.y / 0.9f; + pos.y = m_pos.y + m_dim.y * 0.50f; pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f; m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } - +} diff --git a/src/ui/check.h b/src/ui/check.h index 3af6849..0b6a1f2 100644 --- a/src/ui/check.h +++ b/src/ui/check.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,15 +22,15 @@ #include "ui/control.h" +namespace Gfx{ +class CEngine; +} -class CD3DEngine; - - - +namespace Ui { class CCheck : public CControl { public: - CCheck(CInstanceManager* iMan); + CCheck(); virtual ~CCheck(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -43,4 +44,5 @@ protected: protected: }; +} diff --git a/src/ui/color.cpp b/src/ui/color.cpp index 3ba68b3..2d463b5 100644 --- a/src/ui/color.cpp +++ b/src/ui/color.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -16,7 +17,7 @@ //#include -#include +//#include //#include //#include "common/struct.h" @@ -32,7 +33,7 @@ #include "ui/color.h" - +namespace Ui { const float DELAY1 = 0.4f; const float DELAY2 = 0.1f; @@ -40,7 +41,8 @@ const float DELAY2 = 0.1f; // Object's constructor. -CColor::CColor(CInstanceManager* iMan) : CControl(iMan) +//CColor::CColor(CInstanceManager* iMan) : CControl(iMan) +CColor::CColor() : CControl() { m_bRepeat = false; m_repeat = 0.0f; @@ -160,42 +162,42 @@ void CColor::Draw() device = m_engine->GetDevice(); - p1.x = m_pos.x+(4.0f/640.0f); - p1.y = m_pos.y+(4.0f/480.0f); - p2.x = m_pos.x+m_dim.x-(4.0f/640.0f); - p2.y = m_pos.y+m_dim.y-(4.0f/480.0f); - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); - vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), 0x00000000,0x00000000, 0.0f,0.0f); + p1.x = m_pos.x + (4.0f / 640.0f); + p1.y = m_pos.y + (4.0f / 480.0f); + p2.x = m_pos.x + m_dim.x - (4.0f / 640.0f); + p2.y = m_pos.y + m_dim.y - (4.0f / 480.0f); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), 0x00000000,0x00000000, Math::Point( 0.0f, 0.0f)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), 0x00000000,0x00000000, Math::Point( 0.0f, 0.0f)); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), 0x00000000,0x00000000, Math::Point( 0.0f, 0.0f)); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), 0x00000000,0x00000000, Math::Point( 0.0f, 0.0f)); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); - p1.x = m_pos.x+(5.0f/640.0f); - p1.y = m_pos.y+(5.0f/480.0f); - p2.x = m_pos.x+m_dim.x-(5.0f/640.0f); - p2.y = m_pos.y+m_dim.y-(5.0f/480.0f); - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, 0.0f,0.0f); - vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, 0.0f,0.0f); + p1.x = m_pos.x + (5.0f / 640.0f); + p1.y = m_pos.y + (5.0f / 480.0f); + p2.x = m_pos.x + m_dim.x - (5.0f / 640.0f); + p2.y = m_pos.y + m_dim.y - (5.0f / 480.0f); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, Math::Point( 0.0f, 0.0f)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, Math::Point( 0.0f, 0.0f)); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, Math::Point( 0.0f, 0.0f)); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, Math::Point( 0.0f, 0.0f)); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(4); #else - p1.x = m_pos.x+(3.0f/640.0f); - p1.y = m_pos.y+(3.0f/480.0f); - p2.x = m_pos.x+m_dim.x-(3.0f/640.0f); - p2.y = m_pos.y+m_dim.y-(3.0f/480.0f); + p1.x = m_pos.x + (3.0f / 640.0f); + p1.y = m_pos.y + (3.0f / 480.0f); + p2.x = m_pos.x + m_dim.x - (3.0f / 640.0f); + p2.y = m_pos.y + m_dim.y - (3.0f / 480.0f); color = GetColor(); m_engine->SetTexture("xxx.tga"); // no texture m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - vertex[0] = Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, Math::Point( 0.0f,0.0f)); - vertex[1] = Gfx::VertexCol(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f,0.0f)); - vertex[2] = Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, Math::Point(0.0f,0.0f)); - vertex[3] = Gfx::VertexCol(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f,0.0f)); + vertex[0] = Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); + vertex[1] = Gfx::VertexCol(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); + vertex[2] = Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); + vertex[3] = Gfx::VertexCol(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); device = m_engine->GetDevice(); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); @@ -226,3 +228,4 @@ Gfx::Color CColor::GetColor() } +} diff --git a/src/ui/color.h b/src/ui/color.h index 151a4df..2666f94 100644 --- a/src/ui/color.h +++ b/src/ui/color.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -22,27 +23,29 @@ #include "ui/control.h" //#include "graphics/engine/engine.h" +namespace Gfx{ +class CEngine; +struct Color; +} -//class CEngine; - - - +namespace Ui { class CColor : public CControl { public: - CColor(CInstanceManager* iMan); - virtual ~CColor(); +// CColor(CInstanceManager* iMan); + CColor(); + virtual ~CColor(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); - bool EventProcess(const Event &event); + bool EventProcess(const Event &event); - void Draw(); + void Draw(); - void SetRepeat(bool bRepeat); - bool GetRepeat(); + void SetRepeat(bool bRepeat); + bool GetRepeat(); - void SetColor(Gfx::Color color); + void SetColor(Gfx::Color color); Gfx::Color GetColor(); protected: @@ -54,3 +57,4 @@ protected: }; +} diff --git a/src/ui/compass.cpp b/src/ui/compass.cpp index d4a15a8..95e75b3 100644 --- a/src/ui/compass.cpp +++ b/src/ui/compass.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -16,7 +17,7 @@ //#include -#include +//#include //#include //#include "common/struct.h" @@ -32,10 +33,11 @@ - +namespace Ui { // Object's constructor. -CCompass::CCompass(CInstanceManager* iMan) : CControl(iMan) +//CCompass::CCompass(CInstanceManager* iMan) : CControl(iMan) +CCompass::CCompass() : CControl() { m_dir = 0.0f; } @@ -102,15 +104,15 @@ void CCompass::Draw() p2.x = m_pos.x + m_dim.x; p2.y = m_pos.y + m_dim.y; - c.x = (p1.x+p2.x)/2.0f; - c.y = (p1.y+p2.y)/2.0f; // center + c.x = (p1.x + p2.x) / 2.0f; + c.y = (p1.y + p2.y) / 2.0f; // center - uv1.x = 64.0f/256.0f; - uv1.y = 32.0f/256.0f; - uv2.x = 96.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 64.0f / 256.0f; + uv1.y = 32.0f / 256.0f; + uv2.x = 96.0f / 256.0f; + uv2.y = 64.0f / 256.0f; - dp = 0.5f/256.0f; + dp = 0.5f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -118,10 +120,10 @@ void CCompass::Draw() n = Math::Vector(0.0f, 0.0f, -1.0f); // normal - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point( uv1.x,uv2.y)); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point( uv1.x,uv1.y)); - vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point( uv2.x,uv2.y)); - vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point( uv2.x,uv1.y)); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y)); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv2.y)); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x, uv1.y)); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(2); @@ -129,33 +131,33 @@ void CCompass::Draw() if ( m_state & STATE_ENABLE ) { p1.x = c.x; - p1.y = c.y+m_dim.x*0.40f; + p1.y = c.y + m_dim.x * 0.40f; p1 = Math::RotatePoint(c, m_dir, p1); - p1.x = c.x+(p1.x-c.x)*(m_dim.x/m_dim.y); + p1.x = c.x + (p1.x - c.x) * (m_dim.x / m_dim.y); - p2.x = c.x+m_dim.x*0.20f; - p2.y = c.y-m_dim.x*0.40f; + p2.x = c.x + m_dim.x * 0.20f; + p2.y = c.y - m_dim.x * 0.40f; p2 = Math::RotatePoint(c, m_dir, p2); - p2.x = c.x+(p2.x-c.x)*(m_dim.x/m_dim.y); + p2.x = c.x + (p2.x - c.x) * (m_dim.x / m_dim.y); - p3.x = c.x-m_dim.x*0.20f; - p3.y = c.y-m_dim.x*0.40f; + p3.x = c.x - m_dim.x * 0.20f; + p3.y = c.y - m_dim.x * 0.40f; p3 = Math::RotatePoint(c, m_dir, p3); - p3.x = c.x+(p3.x-c.x)*(m_dim.x/m_dim.y); + p3.x = c.x + (p3.x - c.x) * (m_dim.x / m_dim.y); - uv1.x = 96.0f/256.0f; - uv1.y = 32.0f/256.0f; - uv2.x = 104.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 96.0f / 256.0f; + uv1.y = 32.0f / 256.0f; + uv2.x = 104.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point( uv1.x,uv1.y)); - vertex[1] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point( uv1.x,uv2.y)); - vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point( uv2.x,uv2.y)); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv1.y)); + vertex[1] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv2.y)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y)); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLES, vertex, 3); m_engine->AddStatisticTriangle(1); @@ -170,9 +172,10 @@ void CCompass::SetDirection(float dir) m_dir = dir; } -float CCompass::RetDirection() +float CCompass::GetDirection() { return m_dir; } +} diff --git a/src/ui/compass.h b/src/ui/compass.h index ac5f608..1d48907 100644 --- a/src/ui/compass.h +++ b/src/ui/compass.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,15 +22,16 @@ #include "ui/control.h" +namespace Gfx { +class CEngine; +} -//class CEngine; - - - +namespace Ui { class CCompass : public CControl { public: - CCompass(CInstanceManager* iMan); +// CCompass(CInstanceManager* iMan); + CCompass(); virtual ~CCompass(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -39,7 +41,7 @@ public: void Draw(); void SetDirection(float dir); - float RetDirection(); + float GetDirection(); protected: @@ -48,3 +50,4 @@ protected: }; +} diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 867958c..37392d7 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -21,7 +21,7 @@ //#include #include "graphics/core/device.h" -#include "common/struct.h" +//#include "common/struct.h" //#include "old/d3dengine.h" #include "graphics/engine/engine.h" #include "common/language.h" @@ -36,22 +36,23 @@ //#include "old/text.h" #include "graphics/engine/text.h" //#include "old/sound.h" +#include "sound/sound.h" #include "ui/control.h" - +namespace Ui { // Object's constructor. -CControl::CControl(CInstanceManager* iMan) +CControl::CControl() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_engine = static_cast< Gfx::CEngine* > ( m_iMan->SearchInstance(CLASS_ENGINE) ); m_event = static_cast< CEventQueue* > ( m_iMan->SearchInstance(CLASS_EVENT) ); m_main = static_cast< CRobotMain* > ( m_iMan->SearchInstance(CLASS_MAIN) ); m_particle = static_cast< Gfx::CParticle* > (m_iMan->SearchInstance(CLASS_PARTICULE)); - m_sound = static_cast< CSound* > (m_iMan->SearchInstance(CLASS_SOUND)); + m_sound = static_cast< CSoundInterface* > (m_iMan->SearchInstance(CLASS_SOUND)); m_eventType = EVENT_NULL; m_state = STATE_ENABLE|STATE_VISIBLE|STATE_GLINT; m_fontSize = Gfx::FONT_SIZE_SMALL; @@ -94,7 +95,7 @@ bool CControl::Create(Math::Point pos, Math::Point dim, int icon, EventType even m_eventType = eventType; pos.x = m_pos.x; - pos.y = m_pos.y+m_dim.y; + pos.y = m_pos.y + m_dim.y; GlintCreate(pos); GetResource(RES_EVENT, m_eventType, text); @@ -120,7 +121,7 @@ void CControl::SetPos(Math::Point pos) m_pos = pos; pos.x = m_pos.x; - pos.y = m_pos.y+m_dim.y; + pos.y = m_pos.y + m_dim.y; GlintCreate(pos); } @@ -136,7 +137,7 @@ void CControl::SetDim(Math::Point dim) m_dim = dim; pos.x = m_pos.x; - pos.y = m_pos.y+m_dim.y; + pos.y = m_pos.y + m_dim.y; GlintCreate(pos); } @@ -411,8 +412,8 @@ void CControl::GlintCreate(Math::Point ref, bool bLeft, bool bUp) { float offset; - offset = 8.0f/640.0f; - if ( offset > m_dim.x/4.0f) offset = m_dim.x/4.0f; + offset = 8.0f / 640.0f; + if ( offset > m_dim.x / 4.0f) offset = m_dim.x / 4.0f; if ( bLeft ) { @@ -426,17 +427,17 @@ void CControl::GlintCreate(Math::Point ref, bool bLeft, bool bUp) } offset = 8.0f/480.0f; - if ( offset > m_dim.y/4.0f) offset = m_dim.y/4.0f; + if ( offset > m_dim.y / 4.0f) offset = m_dim.y / 4.0f; if ( bUp ) { - m_glintCorner1.y = ref.y-offset; + m_glintCorner1.y = ref.y - offset; m_glintCorner2.y = ref.y; } else { m_glintCorner1.y = ref.y; - m_glintCorner2.y = ref.y+offset; + m_glintCorner2.y = ref.y + offset; } m_bGlint = true; @@ -459,12 +460,12 @@ void CControl::GlintFrame(const Event &event) if ( m_glintProgress >= 2.0f && Detect(m_glintMouse) ) { - pos.x = m_glintCorner1.x + (m_glintCorner2.x-m_glintCorner1.x)*Math::Rand(); - pos.y = m_glintCorner1.y + (m_glintCorner2.y-m_glintCorner1.y)*Math::Rand(); + pos.x = m_glintCorner1.x + (m_glintCorner2.x - m_glintCorner1.x) * Math::Rand(); + pos.y = m_glintCorner1.y + (m_glintCorner2.y - m_glintCorner1.y) * Math::Rand(); pos.z = 0.0f; speed = Math::Vector(0.0f, 0.0f, 0.0f); - dim.x = ((15.0f+Math::Rand()*15.0f)/640.0f); - dim.y = dim.x/0.75f; + dim.x = ((15.0f + Math::Rand() * 15.0f) / 640.0f); + dim.y = dim.x / 0.75f; m_particle->CreateParticle(pos, speed, dim, Gfx::PARTICONTROL, 1.0f, 0.0f, 0.0f, Gfx::SH_INTERFACE ); @@ -544,7 +545,7 @@ void CControl::Draw() if ( m_name[0] == 0 ) // button without name? { //? DrawPart(icon, zoomExt, 0.0f); - DrawPart(icon, zoomExt, 8.0f/256.0f); + DrawPart(icon, zoomExt, 8.0f / 256.0f); if ( m_state & STATE_DEAD ) return; @@ -589,23 +590,23 @@ void CControl::Draw() // if ( m_justif < 0 ) if ( m_textAlign == Gfx::TEXT_ALIGN_LEFT ) { - pos.x = m_pos.x+m_dim.x-m_dim.y*0.5f; - pos.y = m_pos.y+m_dim.y*0.5f; + pos.x = m_pos.x + m_dim.x - m_dim.y * 0.5f; + pos.y = m_pos.y + m_dim.y * 0.5f; pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f; m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } else if ( m_textAlign == Gfx::TEXT_ALIGN_RIGHT ) // else if ( m_justif > 0 ) { - pos.x = m_pos.x+m_dim.y*0.5f; - pos.y = m_pos.y+m_dim.y*0.5f; + pos.x = m_pos.x + m_dim.y * 0.5f; + pos.y = m_pos.y + m_dim.y * 0.5f; pos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize)/2.0f; m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } else { - pos.x = m_pos.x+m_dim.x*0.5f; - pos.y = m_pos.y+m_dim.y*0.5f; + pos.x = m_pos.x + m_dim.x * 0.5f; + pos.y = m_pos.y + m_dim.y * 0.5f; pos.y -= m_engine->GetText()->GetHeight( m_fontType, m_fontSize)/2.0f; m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, m_dim.x, m_textAlign, 0); } @@ -627,26 +628,26 @@ void CControl::DrawPart(int icon, float zoom, float ex) if ( (m_state & STATE_CARD ) && (m_state & STATE_CHECK) ) { - p2.y += (2.0f/480.0f); // a bit above + p2.y += (2.0f / 480.0f); // a bit above } - c.x = (p1.x+p2.x)/2.0f; - c.y = (p1.y+p2.y)/2.0f; // center + c.x = (p1.x + p2.x)/2.0f; + c.y = (p1.y + p2.y)/2.0f; // center - p1.x = (p1.x-c.x)*zoom + c.x; - p1.y = (p1.y-c.y)*zoom + c.y; - p2.x = (p2.x-c.x)*zoom + c.x; - p2.y = (p2.y-c.y)*zoom + c.y; + p1.x = (p1.x - c.x) * zoom + c.x; + p1.y = (p1.y - c.y) * zoom + c.y; + p2.x = (p2.x - c.x) * zoom + c.x; + p2.y = (p2.y - c.y) * zoom + c.y; p2.x -= p1.x; p2.y -= p1.y; - uv1.x = (32.0f/256.0f)*(icon%8); - uv1.y = (32.0f/256.0f)*(icon/8); // uv texture - uv2.x = (32.0f/256.0f)+uv1.x; - uv2.y = (32.0f/256.0f)+uv1.y; + uv1.x = (32.0f / 256.0f) * (icon%8); + uv1.y = (32.0f / 256.0f) * (icon/8); // uv texture + uv2.x = (32.0f / 256.0f) + uv1.x; + uv2.y = (32.0f / 256.0f) + uv1.y; - dp = 0.5f/256.0f; + dp = 0.5f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -689,8 +690,8 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: { if ( dim.x >= dim.y ) { - p3.x = p1.x + ex*dim.y/(uv2.y-uv1.y); - p4.x = p2.x - ex*dim.y/(uv2.y-uv1.y); + p3.x = p1.x + ex*dim.y / (uv2.y - uv1.y); + p4.x = p2.x - ex*dim.y / (uv2.y - uv1.y); vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y)); vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y)); @@ -706,17 +707,17 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: } else { - p3.y = p1.y + ex*dim.x/(uv2.x-uv1.x); - p4.y = p2.y - ex*dim.x/(uv2.x-uv1.x); - - vertex[0] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x,uv2.y )); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x,uv2.y )); - vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x,uv2.y-ex)); - vertex[3] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x,uv2.y-ex)); - vertex[4] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x,uv1.y+ex)); - vertex[5] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x,uv1.y+ex)); - vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x,uv1.y )); - vertex[7] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv1.y )); + p3.y = p1.y + ex*dim.x / (uv2.x - uv1.x); + p4.y = p2.y - ex*dim.x / (uv2.x - uv1.x); + + vertex[0] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv2.y )); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y )); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y - ex)); + vertex[3] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y - ex)); + vertex[4] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y + ex)); + vertex[5] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y + ex)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x, uv1.y )); + vertex[7] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y )); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); @@ -743,8 +744,8 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: n = Math::Vector(0.0f, 0.0f, -1.0f); // normal - if ( corner.x > dim.x/2.0f ) corner.x = dim.x/2.0f; - if ( corner.y > dim.y/2.0f ) corner.y = dim.y/2.0f; + if ( corner.x > dim.x / 2.0f ) corner.x = dim.x / 2.0f; + if ( corner.y > dim.y / 2.0f ) corner.y = dim.y / 2.0f; p1.x = pos.x; p1.y = pos.y; @@ -756,38 +757,38 @@ void CControl::DrawIcon(Math::Point pos, Math::Point dim, Math::Point uv1, Math: p4.y = p2.y - corner.y; // Bottom horizontal band. - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y )); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y-ex)); - vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p1.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y )); - vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y-ex)); - vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p1.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y )); - vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p3.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y-ex)); - vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv2.y )); - vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y-ex)); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x, uv2.y )); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y - ex)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p1.y, 0.0f), n, Math::Point(uv1.x + ex, uv2.y )); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x + ex, uv2.y - ex)); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p1.y, 0.0f), n, Math::Point(uv2.x - ex, uv2.y )); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p3.y, 0.0f), n, Math::Point(uv2.x - ex, uv2.y - ex)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv2.y )); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y - ex)); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); // Central horizontal band. - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y-ex)); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y+ex)); - vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x+ex,uv2.y-ex)); - vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p4.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y+ex)); - vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p3.y, 0.0f), n, Math::Point(uv2.x-ex,uv2.y-ex)); - vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y+ex)); - vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y-ex)); - vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y+ex)); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p3.y, 0.0f), n, Math::Point(uv1.x, uv2.y - ex)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y + ex)); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x + ex, uv2.y - ex)); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p4.y, 0.0f), n, Math::Point(uv1.x + ex, uv1.y + ex)); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p3.y, 0.0f), n, Math::Point(uv2.x - ex, uv2.y - ex)); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x - ex, uv1.y + ex)); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p3.y, 0.0f), n, Math::Point(uv2.x, uv2.y - ex)); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y + ex)); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); // Top horizontal band. - vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y+ex)); - vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y )); - vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p4.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y+ex)); - vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p2.y, 0.0f), n, Math::Point(uv1.x+ex,uv1.y )); - vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y+ex)); - vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p2.y, 0.0f), n, Math::Point(uv2.x-ex,uv1.y )); - vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y+ex)); - vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x, uv1.y )); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p4.y, 0.0f), n, Math::Point(uv1.x, uv1.y + ex)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x, uv1.y )); + vertex[2] = Gfx::Vertex(Math::Vector(p3.x, p4.y, 0.0f), n, Math::Point(uv1.x + ex, uv1.y + ex)); + vertex[3] = Gfx::Vertex(Math::Vector(p3.x, p2.y, 0.0f), n, Math::Point(uv1.x + ex, uv1.y )); + vertex[4] = Gfx::Vertex(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x - ex, uv1.y + ex)); + vertex[5] = Gfx::Vertex(Math::Vector(p4.x, p2.y, 0.0f), n, Math::Point(uv2.x - ex, uv1.y )); + vertex[6] = Gfx::Vertex(Math::Vector(p2.x, p4.y, 0.0f), n, Math::Point(uv2.x, uv1.y + ex)); + vertex[7] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x, uv1.y )); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 8); m_engine->AddStatisticTriangle(6); } @@ -799,15 +800,15 @@ void CControl::DrawWarning(Math::Point pos, Math::Point dim) Math::Point uv1, uv2; float dp; - dp = 0.5f/256.0f; + dp = 0.5f / 256.0f; m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 64.0f/256.0f; - uv1.y = 208.0f/256.0f; - uv2.x = 160.0f/256.0f; - uv2.y = 224.0f/256.0f; + uv1.x = 64.0f / 256.0f; + uv1.y = 208.0f / 256.0f; + uv2.x = 160.0f / 256.0f; + uv2.y = 224.0f / 256.0f; uv1.x += dp; uv1.y += dp; @@ -848,25 +849,25 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep) m_engine->SetTexture("button2.tga"); m_engine->SetState( Gfx::ENG_RSTATE_TTEXTURE_WHITE); - pos.x += deep*0.010f*0.75f; - pos.y -= deep*0.015f; - dim.x += deep*0.005f*0.75f; - dim.y += deep*0.005f; + pos.x += deep * 0.010f * 0.75f; + pos.y -= deep * 0.015f; + dim.x += deep * 0.005f * 0.75f; + dim.y += deep * 0.005f; - uv1.x = 192.0f/256.0f; - uv1.y = 32.0f/256.0f; - uv2.x = 224.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 192.0f / 256.0f; + uv1.y = 32.0f / 256.0f; + uv2.x = 224.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 10.0f/640.0f; - corner.y = 10.0f/480.0f; + corner.x = 10.0f / 640.0f; + corner.y = 10.0f / 480.0f; - DrawIcon(pos, dim, uv1, uv2, corner, 6.0f/256.0f); + DrawIcon(pos, dim, uv1, uv2, corner, 6.0f / 256.0f); } @@ -874,10 +875,10 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep) bool CControl::Detect(Math::Point pos) { - return ( pos.x >= m_pos.x && - pos.x <= m_pos.x+m_dim.x && - pos.y >= m_pos.y && - pos.y <= m_pos.y+m_dim.y ); + return ( pos.x >= m_pos.x && + pos.x <= m_pos.x + m_dim.x && + pos.y >= m_pos.y && + pos.y <= m_pos.y + m_dim.y ); } - +} diff --git a/src/ui/control.h b/src/ui/control.h index b211ff6..95d01f6 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -20,20 +20,23 @@ //#include "old/text.h" -#include "common/struct.h" -#include "common/event.h" -#include "graphics/engine/engine.h" #include "graphics/engine/text.h" -#include "graphics/engine/particle.h" +//#include "common/struct.h" +#include "common/event.h" + +namespace Gfx { +class CEngine; +class CParticle; +}; class CInstanceManager; class CEvent; //class Gfx::CEngine; class CRobotMain; //class Gfx::CParticle; -class CSound; - +class CSoundInterface; +namespace Ui { enum ControlState { STATE_ENABLE = (1<<0), // active @@ -60,7 +63,8 @@ enum ControlState class CControl { public: - CControl(CInstanceManager* iMan); +// CControl(CInstanceManager* iMan); + CControl (); virtual ~CControl(); virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -114,7 +118,7 @@ protected: CEventQueue* m_event; CRobotMain* m_main; Gfx::CParticle* m_particle; - CSound* m_sound; + CSoundInterface* m_sound; Math::Point m_pos; // corner upper / left Math::Point m_dim; // dimensions @@ -139,3 +143,4 @@ protected: }; +} diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index 39a4a14..bbd3740 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,21 +18,22 @@ // displayinfo.cpp -#include -#include -#include +//#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/d3dmath.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/d3dmath.h" +#include "graphics/engine/engine.h" #include "common/language.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" -#include "old/math3d.h" +//#include "old/math3d.h" #include "object/robotmain.h" -#include "old/camera.h" +//#include "old/camera.h" #include "object/object.h" #include "object/motion/motion.h" #include "object/motion/motiontoto.h" @@ -41,29 +43,31 @@ #include "ui/edit.h" #include "ui/group.h" #include "ui/window.h" -#include "old/particule.h" -#include "old/light.h" -#include "old/text.h" +//#include "old/particule.h" +#include "graphics/engine/particle.h" +//#include "old/light.h" +//#include "old/text.h" #include "script/cbottoken.h" #include "ui/displayinfo.h" - +namespace Ui { // Object's constructor. -CDisplayInfo::CDisplayInfo(CInstanceManager* iMan) +//CDisplayInfo::CDisplayInfo(CInstanceManager* iMan) +CDisplayInfo::CDisplayInfo() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_iMan->AddInstance(CLASS_STUDIO, this); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); - m_event = (CEvent*)m_iMan->SearchInstance(CLASS_EVENT); - m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); - m_main = (CRobotMain*)m_iMan->SearchInstance(CLASS_MAIN); - m_camera = (CCamera*)m_iMan->SearchInstance(CLASS_CAMERA); - m_particule = (CParticule*)m_iMan->SearchInstance(CLASS_PARTICULE); - m_light = (CLight*)m_iMan->SearchInstance(CLASS_LIGHT); + m_engine = static_cast (m_iMan->SearchInstance(CLASS_ENGINE)); + m_event = static_cast (m_iMan->SearchInstance(CLASS_EVENT)); + m_interface = static_cast (m_iMan->SearchInstance(CLASS_INTERFACE)); + m_main = static_cast (m_iMan->SearchInstance(CLASS_MAIN)); + m_camera = static_cast (m_iMan->SearchInstance(CLASS_CAMERA)); + m_particle = static_cast (m_iMan->SearchInstance(CLASS_PARTICULE)); + m_light = static_cast (m_iMan->SearchInstance(CLASS_LIGHT)); m_bInfoMaximized = true; m_bInfoMinimized = false; @@ -87,22 +91,22 @@ CDisplayInfo::~CDisplayInfo() bool CDisplayInfo::EventProcess(const Event &event) { - CWindow* pw; - CEdit* edit; - CSlider* slider; + Ui::CWindow* pw; + Ui::CEdit* edit; + Ui::CSlider* slider; CMotionToto* toto; - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { EventFrame(event); HyperUpdate(); } - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { if ( m_toto != 0 ) { - toto = (CMotionToto*)m_toto->RetMotion(); + toto = static_cast(m_toto->GetMotion()); if ( toto != 0 ) { toto->SetMousePos(event.pos); @@ -110,21 +114,21 @@ bool CDisplayInfo::EventProcess(const Event &event) } } - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { - if ( event.event == pw->RetEventMsgClose() ) + if ( event.type == pw->GetEventTypeClose() ) { Event newEvent = event; - newEvent.event = EVENT_OBJECT_INFOOK; + newEvent.type = EVENT_OBJECT_INFOOK; m_event->AddEvent(newEvent); } - if ( event.event == EVENT_SATCOM_HUSTON ) + if ( event.type == EVENT_SATCOM_HUSTON ) { ChangeIndexButton(SATCOM_HUSTON); } - if ( event.event == EVENT_SATCOM_SAT ) + if ( event.type == EVENT_SATCOM_SAT ) { ChangeIndexButton(SATCOM_SAT); } @@ -132,90 +136,90 @@ bool CDisplayInfo::EventProcess(const Event &event) //? { //? ChangeIndexButton(SATCOM_OBJECT); //? } - if ( event.event == EVENT_SATCOM_LOADING ) + if ( event.type == EVENT_SATCOM_LOADING ) { ChangeIndexButton(SATCOM_LOADING); } - if ( event.event == EVENT_SATCOM_PROG ) + if ( event.type == EVENT_SATCOM_PROG ) { ChangeIndexButton(SATCOM_PROG); } - if ( event.event == EVENT_SATCOM_SOLUCE ) + if ( event.type == EVENT_SATCOM_SOLUCE ) { ChangeIndexButton(SATCOM_SOLUCE); } - if ( event.event == EVENT_HYPER_HOME || - event.event == EVENT_HYPER_PREV || - event.event == EVENT_HYPER_NEXT ) + if ( event.type == EVENT_HYPER_HOME || + event.type == EVENT_HYPER_PREV || + event.type == EVENT_HYPER_NEXT ) { - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { - edit->HyperGo(event.event); + edit->HyperGo(event.type); HyperUpdate(); } } - if ( event.event == EVENT_HYPER_SIZE1 ) // size 1? + if ( event.type == EVENT_HYPER_SIZE1 ) // size 1? { m_main->SetFontSize(9.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_SIZE2 ) // size 2? + if ( event.type == EVENT_HYPER_SIZE2 ) // size 2? { m_main->SetFontSize(10.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_SIZE3 ) // size 3? + if ( event.type == EVENT_HYPER_SIZE3 ) // size 3? { m_main->SetFontSize(12.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_SIZE4 ) // size 4? + if ( event.type == EVENT_HYPER_SIZE4 ) // size 4? { m_main->SetFontSize(15.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_STUDIO_SIZE ) // size? + if ( event.type == EVENT_STUDIO_SIZE ) // size? { - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider == 0 ) return false; - m_main->SetFontSize(9.0f+slider->RetVisibleValue()*6.0f); + m_main->SetFontSize(9.0f+slider->GetVisibleValue()*6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_COPY ) // copy ? + if ( event.type == EVENT_HYPER_COPY ) // copy ? { - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { edit->Copy(); } } - if ( event.event == EVENT_LBUTTONDOWN || - event.event == EVENT_LBUTTONUP ) + if ( ( event.type == EVENT_MOUSE_BUTTON_DOWN && event.mouseButton.button == 1 )|| + ( event.type == EVENT_MOUSE_BUTTON_UP && event.mouseButton.button == 1 )) { UpdateCopyButton(); } - if ( event.event == EVENT_WINDOW4 ) // window moved? + if ( event.type == EVENT_WINDOW4 ) // window moved? { - m_infoNormalPos = m_infoActualPos = m_infoFinalPos = pw->RetPos(); - m_infoNormalDim = m_infoActualDim = m_infoFinalDim = pw->RetDim(); + m_infoNormalPos = m_infoActualPos = m_infoFinalPos = pw->GetPos(); + m_infoNormalDim = m_infoActualDim = m_infoFinalDim = pw->GetDim(); AdjustDisplayInfo(m_infoActualPos, m_infoActualDim); } - if ( event.event == pw->RetEventMsgReduce() ) + if ( event.type == pw->GetEventTypeReduce() ) { if ( m_bInfoMinimized ) { @@ -241,7 +245,7 @@ bool CDisplayInfo::EventProcess(const Event &event) pw->SetMinimized(m_bInfoMinimized); } } - if ( event.event == pw->RetEventMsgFull() ) + if ( event.type == pw->GetEventTypeFull() ) { if ( m_bInfoMaximized ) { @@ -260,7 +264,7 @@ bool CDisplayInfo::EventProcess(const Event &event) m_bInfoMaximized = true; } //? m_main->SetEditFull(m_bInfoMaximized); - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetMaximized(m_bInfoMaximized); @@ -299,31 +303,31 @@ bool CDisplayInfo::EventFrame(const Event &event) void CDisplayInfo::HyperUpdate() { - CWindow* pw; - CEdit* edit; - CButton* button; - bool bEnable; + Ui::CWindow* pw; + Ui::CEdit* edit; + Ui::CButton* button; + bool bEnable; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; - button = (CButton*)pw->SearchControl(EVENT_HYPER_HOME); + button = static_cast(pw->SearchControl(EVENT_HYPER_HOME)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_HOME); button->SetState(STATE_ENABLE, bEnable); } - button = (CButton*)pw->SearchControl(EVENT_HYPER_PREV); + button = static_cast(pw->SearchControl(EVENT_HYPER_PREV)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_PREV); button->SetState(STATE_ENABLE, bEnable); } - button = (CButton*)pw->SearchControl(EVENT_HYPER_NEXT); + button = static_cast(pw->SearchControl(EVENT_HYPER_NEXT)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_NEXT); @@ -336,12 +340,12 @@ void CDisplayInfo::HyperUpdate() void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) { - D3DLIGHT7 light; + Gfx::CLight light; Math::Point pos, dim; - CWindow* pw; - CEdit* edit; - CButton* button; - CSlider* slider; + Ui::CWindow* pw; + Ui::CEdit* edit; + Ui::CButton* button; + Ui::CSlider* slider; CMotionToto* toto; m_index = index; @@ -349,10 +353,10 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) //? CreateObjectsFile(); - m_bEditLock = m_main->RetEditLock(); + m_bEditLock = m_main->GetEditLock(); if ( m_bEditLock ) // edition running program? { - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW3); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW3)); if ( pw != 0 ) { pw->ClearState(STATE_ENABLE); // CStudio inactive @@ -361,10 +365,10 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) m_main->SetEditLock(true, false); m_main->SetEditFull(false); - m_bInitPause = m_engine->RetPause(); + m_bInitPause = m_engine->GetPause(); m_engine->SetPause(true); - m_infoCamera = m_camera->RetType(); - m_camera->SetType(CAMERA_INFO); + m_infoCamera = m_camera->GetType(); + m_camera->SetType(Gfx::CAM_TYPE_INFO); pos = m_infoActualPos = m_infoFinalPos; dim = m_infoActualDim = m_infoFinalDim; @@ -383,7 +387,7 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) edit->SetState(STATE_SHADOW); edit->SetMultiFont(true); edit->SetMaxChar(10000); - edit->SetFontType(FONT_COLOBOT); + edit->SetFontType(Gfx::FONT_COLOBOT); edit->SetSoluceMode(bSoluce); edit->ReadText(filename); edit->HyperHome(filename); @@ -447,20 +451,20 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) m_engine->SetDrawWorld(false); // doesn't draw anything in the interface m_engine->SetDrawFront(true); // toto draws on the interface - m_particule->SetFrameUpdate(SH_WORLD, false); // particles break into world + m_particle->SetFrameUpdate(Gfx::SH_WORLD, false); // particles break into world m_toto = SearchToto(); if ( m_toto != 0 ) { m_toto->SetDrawFront(true); - toto = (CMotionToto*)m_toto->RetMotion(); + toto = static_cast(m_toto->GetMotion()); if ( toto != 0 ) { toto->StartDisplayInfo(); } } - +// TODO ZeroMemory(&light, sizeof(light)); light.dltType = D3DLIGHT_DIRECTIONAL; light.dcvDiffuse.r = 1.0f; @@ -483,31 +487,31 @@ void CDisplayInfo::AdjustDisplayInfo(Math::Point wpos, Math::Point wdim) CGroup* group; Math::Point pos, dim; - wpos.x = 50.0f/640.0f; - wpos.y = 30.0f/480.0f; - wdim.x = 540.0f/640.0f; - wdim.y = 420.0f/480.0f; + wpos.x = 50.0f / 640.0f; + wpos.y = 30.0f / 480.0f; + wdim.x = 540.0f / 640.0f; + wdim.y = 420.0f / 480.0f; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetPos(wpos); pw->SetDim(wdim); - wdim = pw->RetDim(); + wdim = pw->GetDim(); } - pos.x = (50.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f+24.0f+10.0f+324.0f-48.0f)/480.0f; - dim.x = 48.0f/640.0f; - dim.y = 48.0f/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_HUSTON); + pos.x = (50.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 24.0f + 10.0f + 324.0f - 48.0f) / 480.0f; + dim.x = 48.0f / 640.0f; + dim.y = 48.0f / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_HUSTON)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SAT); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_SAT)); if ( button != 0 ) { button->SetPos(pos); @@ -520,136 +524,136 @@ void CDisplayInfo::AdjustDisplayInfo(Math::Point wpos, Math::Point wdim) //? button->SetPos(pos); //? button->SetDim(dim); //? } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_LOADING); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_LOADING)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_PROG); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_PROG)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SOLUCE); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_SOLUCE)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x = (50.0f+10.0f+5.0f)/640.0f; - pos.y = (30.0f+10.0f+4.0f)/480.0f; - dim.x = (48.0f-10.0f)/640.0f; - dim.y = 24.0f/480.0f; - button = (CButton*)pw->SearchControl(EVENT_OBJECT_INFOOK); + pos.x = (50.0f + 10.0f + 5.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 4.0f) / 480.0f; + dim.x = (48.0f - 10.0f) / 640.0f; + dim.y = 24.0f / 480.0f; + button = static_cast(pw->SearchControl(EVENT_OBJECT_INFOOK)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x = (50.0f+10.0f+48.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f)/480.0f; - dim.x = 462.0f/640.0f; - dim.y = 358.0f/480.0f; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + pos.x = (50.0f + 10.0f + 48.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f) / 480.0f; + dim.x = 462.0f / 640.0f; + dim.y = 358.0f / 480.0f; + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { edit->SetPos(pos); edit->SetDim(dim); } - pos.x = (50.0f+10.0f+48.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f+358.0f+10.0f)/480.0f; - dim.x = 32.0f/640.0f; - dim.y = 32.0f/480.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_PREV); + pos.x = (50.0f + 10.0f + 48.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 358.0f + 10.0f) / 480.0f; + dim.x = 32.0f / 640.0f; + dim.y = 32.0f / 480.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_PREV)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_NEXT); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_NEXT)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_HOME); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_HOME)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 50.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE1); + pos.x += 50.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE1)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE2); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE2)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE3); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE3)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE4); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE4)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - dim.x = 18.0f/640.0f; - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); + pos.x += 35.0f / 640.0f; + dim.x = 18.0f / 640.0f; + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider != 0 ) { slider->SetPos(pos); slider->SetDim(dim); } - pos.x += 50.0f/640.0f; - dim.x = 32.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_COPY); + pos.x += 50.0f / 640.0f; + dim.x = 32.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_COPY)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x = (50.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f+24.0f+10.0f+324.0f+6.0f)/480.0f; - dim.x = 48.0f/640.0f; - dim.y = 40.0f/480.0f; - group = (CGroup*)pw->SearchControl(EVENT_LABEL2); // symbol SatCom + pos.x = (50.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 24.0f + 10.0f + 324.0f + 6.0f) / 480.0f; + dim.x = 48.0f / 640.0f; + dim.y = 40.0f / 480.0f; + group = static_cast(pw->SearchControl(EVENT_LABEL2)); // symbol SatCom if ( group != 0 ) { group->SetPos(pos); group->SetDim(dim); } - pos.x = (50.0f+10.0f+14.0f)/640.0f; - pos.y = (30.0f+10.0f+6.0f)/480.0f; - dim.x = 20.0f/640.0f; - dim.y = 20.0f/480.0f; - group = (CGroup*)pw->SearchControl(EVENT_LABEL3); // symbol stand-by + pos.x = (50.0f + 10.0f + 14.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 6.0f) / 480.0f; + dim.x = 20.0f / 640.0f; + dim.y = 20.0f / 480.0f; + group = static_cast(pw->SearchControl(EVENT_LABEL3)); // symbol stand-by if ( group != 0 ) { group->SetPos(pos); @@ -661,26 +665,26 @@ void CDisplayInfo::AdjustDisplayInfo(Math::Point wpos, Math::Point wdim) void CDisplayInfo::ChangeIndexButton(int index) { - CWindow* pw; - CEdit* edit; + Ui::CWindow* pw; + Ui::CEdit* edit; char* filename; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; if ( m_index != -1 ) { - m_main->SetDisplayInfoPosition(m_index, RetPosition()); + m_main->SetDisplayInfoPosition(m_index, GetPosition()); } m_index = index; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { - filename = m_main->RetDisplayInfoName(m_index); + filename = m_main->GetDisplayInfoName(m_index); edit->ReadText(filename); edit->HyperHome(filename); - SetPosition(m_main->RetDisplayInfoPosition(m_index)); + SetPosition(m_main->GetDisplayInfoPosition(m_index)); } UpdateIndexButton(); @@ -690,10 +694,10 @@ void CDisplayInfo::ChangeIndexButton(int index) void CDisplayInfo::UpdateIndexButton() { - CWindow* pw; - CButton* button; - CGroup* group; - CEdit* edit; + Ui::CWindow* pw; + Ui::CButton* button; + Ui::CGroup* group; + Ui::CEdit* edit; Math::Point pos, dim; char* filename; char* loading; @@ -708,10 +712,10 @@ void CDisplayInfo::UpdateIndexButton() 4, // SATCOM_SOLUCE }; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_HUSTON); + button = static_cast(pw->SearchControl(EVENT_SATCOM_HUSTON)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_HUSTON); @@ -719,7 +723,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, filename[0]!=0); } - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SAT); + button = static_cast(pw->SearchControl(EVENT_SATCOM_SAT)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SAT); @@ -736,7 +740,7 @@ void CDisplayInfo::UpdateIndexButton() //? } loading = 0; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_LOADING); + button = static_cast(pw->SearchControl(EVENT_SATCOM_LOADING)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_LOADING); @@ -744,7 +748,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, loading[0]!=0); } - button = (CButton*)pw->SearchControl(EVENT_SATCOM_PROG); + button = static_cast(pw->SearchControl(EVENT_SATCOM_PROG)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_PROG); @@ -752,7 +756,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, filename[0]!=0 && (m_index==SATCOM_LOADING||m_index==SATCOM_PROG||(loading!=0&&loading[0]==0))); } - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SOLUCE); + button = static_cast(pw->SearchControl(EVENT_SATCOM_SOLUCE)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SOLUCE); @@ -760,7 +764,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, filename[0]!=0 && m_bSoluce); } - group = (CGroup*)pw->SearchControl(EVENT_LABEL1); + group = static_cast(pw->SearchControl(EVENT_LABEL1)); if ( group != 0 ) { if ( m_index == -1 ) @@ -789,7 +793,7 @@ void CDisplayInfo::UpdateIndexButton() } #endif - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { //? edit->SetHiliteCap(m_index==SATCOM_LOADING); @@ -803,20 +807,20 @@ void CDisplayInfo::UpdateIndexButton() void CDisplayInfo::UpdateCopyButton() { - CWindow* pw; - CButton* button; - CEdit* edit; + Ui::CWindow* pw; + Ui::CButton* button; + Ui::CEdit* edit; int c1, c2; //? if ( m_index != SATCOM_LOADING ) return; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - button = (CButton*)pw->SearchControl(EVENT_HYPER_COPY); + button = static_cast(pw->SearchControl(EVENT_HYPER_COPY)); if ( button == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; edit->GetCursor(c1, c2); @@ -828,10 +832,10 @@ void CDisplayInfo::UpdateCopyButton() void CDisplayInfo::StopDisplayInfo() { - CWindow* pw; + Ui::CWindow* pw; CMotionToto* toto; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; m_interface->DeleteControl(EVENT_WINDOW4); @@ -853,13 +857,13 @@ void CDisplayInfo::StopDisplayInfo() m_engine->SetDrawWorld(true); // draws all on the interface m_engine->SetDrawFront(false); // draws nothing on the interface - m_particule->SetFrameUpdate(SH_WORLD, true); - m_particule->FlushParticule(SH_FRONT); - m_particule->FlushParticule(SH_INTERFACE); + m_particle->SetFrameUpdate(Gfx::SH_WORLD, true); + m_particle->FlushParticule(Gfx::SH_FRONT); + m_particle->FlushParticule(Gfx::SH_INTERFACE); if ( m_toto != 0 ) { - toto = (CMotionToto*)m_toto->RetMotion(); + toto = (CMotionToto*)m_toto->GetMotion(); if ( toto != 0 ) { toto->StopDisplayInfo(); @@ -875,13 +879,13 @@ void CDisplayInfo::StopDisplayInfo() void CDisplayInfo::SetPosition(int pos) { - CWindow* pw; - CEdit* edit; + Ui::CWindow* pw; + Ui::CEdit* edit; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; edit->SetFirstLine(pos); @@ -889,18 +893,18 @@ void CDisplayInfo::SetPosition(int pos) // Returns the position. -int CDisplayInfo::RetPosition() +int CDisplayInfo::GetPosition() { - CWindow* pw; - CEdit* edit; + Ui::CWindow* pw; + Ui::CEdit* edit; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return 0; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return 0; - return edit->RetFirstLine(); + return edit->GetFirstLine(); } @@ -909,18 +913,18 @@ int CDisplayInfo::RetPosition() void CDisplayInfo::ViewDisplayInfo() { - CWindow* pw; - CEdit* edit; - POINT dim; + Ui::CWindow* pw; + Ui::CEdit* edit; + Math::Point dim; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; - dim = m_engine->RetDim(); - edit->SetFontSize(m_main->RetFontSize()/(dim.x/640.0f)); + dim = m_engine->GetDim(); + edit->SetFontSize(m_main->GetFontSize()/(dim.x / 640.0f)); } // Returns the object human. @@ -936,7 +940,7 @@ CObject* CDisplayInfo::SearchToto() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_TOTO ) { return pObj; @@ -995,7 +999,7 @@ void ObjectWrite(FILE* file, ObjectList list[], int i) strcat(line, res); strcat(line, "\\u "); - p = RetHelpFilename(list[i].type); + p = GetHelpFilename(list[i].type); if ( p[0] == 0 ) return; strcat(line, p+5); // skip "help\" p = strstr(line, ".txt"); @@ -1026,11 +1030,11 @@ void CDisplayInfo::CreateObjectsFile() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( !pObj->RetActif() ) continue; - if ( !pObj->RetSelectable() ) continue; - if ( pObj->RetProxyActivate() ) continue; + if ( !pObj->GetActif() ) continue; + if ( !pObj->GetSelectable() ) continue; + if ( pObj->GetProxyActivate() ) continue; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_NULL ) continue; if ( type == OBJECT_FIX ) continue; @@ -1217,3 +1221,4 @@ void CDisplayInfo::CreateObjectsFile() } +} diff --git a/src/ui/displayinfo.h b/src/ui/displayinfo.h index 29677d4..a405363 100644 --- a/src/ui/displayinfo.h +++ b/src/ui/displayinfo.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -19,25 +20,37 @@ #pragma once -#include "common/struct.h" -#include "old/camera.h" +//#include "common/struct.h" +//#include "graphics/engine/engine.h" +//#include "graphics/engine/camera.h" +//#include "graphics/engine/particle.h" +//#include "old/camera.h" class CInstanceManager; -class CD3DEngine; +//class CD3DEngine; class CEvent; class CRobotMain; -class CCamera; -class CInterface; +//class CCamera; + class CObject; -class CParticule; +//class CLight; + +namespace Gfx { +class CEngine; +class Camera; +class Particle; class CLight; +} +namespace Ui { +class CInterface; class CDisplayInfo { public: - CDisplayInfo(CInstanceManager* iMan); +// CDisplayInfo(CInstanceManager* iMan); + CDisplayInfo(); ~CDisplayInfo(); bool EventProcess(const Event &event); @@ -46,7 +59,7 @@ public: void StopDisplayInfo(); void SetPosition(int pos); - int RetPosition(); + int GetPosition(); protected: bool EventFrame(const Event &event); @@ -61,19 +74,19 @@ protected: protected: CInstanceManager* m_iMan; - CD3DEngine* m_engine; - CEvent* m_event; + Gfx::CEngine* m_engine; + CEventQueue* m_event; CRobotMain* m_main; - CCamera* m_camera; + Gfx::CCamera* m_camera; CInterface* m_interface; - CParticule* m_particule; - CLight* m_light; + Gfx::CParticle* m_particle; + Gfx::CLight* m_light; bool m_bInfoMaximized; bool m_bInfoMinimized; int m_index; - CameraType m_infoCamera; + Gfx::CameraType m_infoCamera; Math::Point m_infoNormalPos; Math::Point m_infoNormalDim; Math::Point m_infoActualPos; @@ -88,3 +101,4 @@ protected: }; +} diff --git a/src/ui/displaytext.cpp b/src/ui/displaytext.cpp index 9be81f4..1e26f7f 100644 --- a/src/ui/displaytext.cpp +++ b/src/ui/displaytext.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,12 +18,13 @@ // displaytext.cpp -#include -#include -#include +//#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" #include "common/event.h" #include "common/misc.h" #include "common/restext.h" @@ -35,28 +37,31 @@ #include "ui/label.h" #include "ui/window.h" #include "ui/group.h" -#include "old/text.h" -#include "old/sound.h" +//#include "old/text.h" +//#include "old/sound.h" +//#include "sound/sound.h" #include "ui/displaytext.h" - +namespace Ui { const float FONTSIZE = 12.0f; // Object's constructor. -CDisplayText::CDisplayText(CInstanceManager* iMan) +//CDisplayText::CDisplayText(CInstanceManager* iMan) +CDisplayText::CDisplayText() { int i; - m_iMan = iMan; +// m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_iMan->AddInstance(CLASS_DISPLAYTEXT, this); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); + m_engine = (Gfx::CEngine*)m_iMan->SearchInstance(CLASS_ENGINE); m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); - m_sound = (CSound*)m_iMan->SearchInstance(CLASS_SOUND); + m_sound = (CSoundInterface*)m_iMan->SearchInstance(CLASS_SOUND); for ( i=0 ; iRetPause() ) return true; + if ( m_engine->GetPause() ) return true; - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { for ( i=0 ; iRetPosition(0); - h = RetIdealHeight(pObj); - d = RetIdealDist(pObj); + pos = pObj->GetPosition(0); + h = GetIdealHeight(pObj); + d = GetIdealDist(pObj); DisplayError(err, pos, h, d, time); } @@ -186,9 +191,9 @@ void CDisplayText::DisplayText(char *text, CObject* pObj, if ( pObj == 0 ) return; - pos = pObj->RetPosition(0); - h = RetIdealHeight(pObj); - d = RetIdealDist(pObj); + pos = pObj->GetPosition(0); + h = GetIdealHeight(pObj); + d = GetIdealDist(pObj); DisplayText(text, pos, h, d, time, type); } @@ -199,10 +204,10 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, { CObject* toto; CMotion* motion; - CWindow* pw; - CButton* button; - CGroup* group; - CLabel* label; + Ui::CWindow* pw; + Ui::CButton* button; + Ui::CGroup* group; + Ui::CLabel* label; Math::Point pos, ppos, dim; Sound sound; float hLine, hBox; @@ -210,7 +215,7 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, if ( !m_bEnable ) return; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) { pos.x = 0.0f; @@ -221,12 +226,12 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, } hBox = 0.045f; - hLine = m_engine->RetText()->RetHeight(FONTSIZE, FONT_COLOBOT); + hLine = m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, FONTSIZE); nLine = 0; for ( i=0 ; iSearchControl(EventMsg(EVENT_DT_GROUP0+i)); + group = static_cast(pw->SearchControl(EventType(EVENT_DT_GROUP0+i))); if ( group == 0 ) break; nLine ++; } @@ -247,13 +252,13 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, if ( type == TT_WARNING ) icon = 10; // blue if ( type == TT_INFO ) icon = 8; // green if ( type == TT_MESSAGE ) icon = 11; // yellow - pw->CreateGroup(pos, dim, icon, EventMsg(EVENT_DT_GROUP0+nLine)); + pw->CreateGroup(pos, dim, icon, EventType(EVENT_DT_GROUP0+nLine)); pw->SetTrashEvent(false); ppos = pos; ppos.y -= hLine/2.0f; - label = pw->CreateLabel(ppos, dim, -1, EventMsg(EVENT_DT_LABEL0+nLine), text); + label = pw->CreateLabel(ppos, dim, -1, EventType(EVENT_DT_LABEL0+nLine), text); if ( label != 0 ) { label->SetFontSize(FONTSIZE); @@ -261,7 +266,7 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, dim.x = dim.y*0.75f; pos.x -= dim.x; - button = pw->CreateButton(pos, dim, 14, EventMsg(EVENT_DT_VISIT0+nLine)); + button = pw->CreateButton(pos, dim, 14, EventType(EVENT_DT_VISIT0+nLine)); if ( goal.x == 0.0f && goal.y == 0.0f && @@ -279,7 +284,7 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, toto = SearchToto(); if ( toto != 0 ) { - motion = toto->RetMotion(); + motion = toto->GetMotion(); if ( motion != 0 ) { if ( type == TT_ERROR ) @@ -324,18 +329,18 @@ void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, void CDisplayText::ClearText() { - CWindow* pw; + Ui::CWindow* pw; int i; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); for ( i=0 ; iDeleteControl(EventMsg(EVENT_DT_GROUP0+i)); - pw->DeleteControl(EventMsg(EVENT_DT_LABEL0+i)); - pw->DeleteControl(EventMsg(EVENT_DT_VISIT0+i)); + pw->DeleteControl(EventType(EVENT_DT_GROUP0+i)); + pw->DeleteControl(EventType(EVENT_DT_LABEL0+i)); + pw->DeleteControl(EventType(EVENT_DT_VISIT0+i)); } m_bExist[i] = false; m_visitGoal[i] = Math::Vector(0.0f, 0.0f, 0.0f); @@ -349,32 +354,32 @@ void CDisplayText::ClearText() void CDisplayText::HideText(bool bHide) { - CWindow* pw; - CGroup* pg; - CLabel* pl; - CButton* pb; + Ui::CWindow* pw; + Ui::CGroup* pg; + Ui::CLabel* pl; + Ui::CButton* pb; int i; m_bHide = bHide; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return; for ( i=0 ; iSearchControl(EventMsg(EVENT_DT_GROUP0+i)); + pg = static_cast(pw->SearchControl(EventType(EVENT_DT_GROUP0+i))); if ( pg != 0 ) { pg->SetState(STATE_VISIBLE, !bHide); } - pl = (CLabel* )pw->SearchControl(EventMsg(EVENT_DT_LABEL0+i)); + pl = static_cast(pw->SearchControl(EventType(EVENT_DT_LABEL0+i))); if ( pl != 0 ) { pl->SetState(STATE_VISIBLE, !bHide); } - pb = (CButton*)pw->SearchControl(EventMsg(EVENT_DT_VISIT0+i)); + pb = static_cast(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb != 0 ) { pb->SetState(STATE_VISIBLE, !bHide); @@ -386,20 +391,20 @@ void CDisplayText::HideText(bool bHide) bool CDisplayText::ClearLastText() { - CWindow *pw; - CButton *pb1, *pb2; - CGroup *pg1, *pg2; - CLabel *pl1, *pl2; + Ui::CWindow *pw; + Ui::CButton *pb1, *pb2; + Ui::CGroup *pg1, *pg2; + Ui::CLabel *pl1, *pl2; int i; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return false; - pb2 = (CButton*)pw->SearchControl(EVENT_DT_VISIT0); + pb2 = static_cast(pw->SearchControl(EVENT_DT_VISIT0)); if ( pb2 == 0 ) return false; // same not of first-line - pg2 = (CGroup*)pw->SearchControl(EVENT_DT_GROUP0); + pg2 = static_cast(pw->SearchControl(EVENT_DT_GROUP0)); if ( pg2 == 0 ) return false; - pl2 = (CLabel*)pw->SearchControl(EVENT_DT_LABEL0); + pl2 = static_cast(pw->SearchControl(EVENT_DT_LABEL0)); if ( pl2 == 0 ) return false; for ( i=0 ; iSearchControl(EventMsg(EVENT_DT_VISIT0+i+1)); + pb2 = static_cast(pw->SearchControl(EventType(EVENT_DT_VISIT0+i+1))); if ( pb2 == 0 ) break; - pg2 = (CGroup*)pw->SearchControl(EventMsg(EVENT_DT_GROUP0+i+1)); + pg2 = static_cast(pw->SearchControl(EventType(EVENT_DT_GROUP0+i+1))); if ( pg2 == 0 ) break; - pl2 = (CLabel*)pw->SearchControl(EventMsg(EVENT_DT_LABEL0+i+1)); + pl2 = static_cast(pw->SearchControl(EventType(EVENT_DT_LABEL0+i+1))); if ( pl2 == 0 ) break; pb1->SetState(STATE_ENABLE, pb2->TestState(STATE_ENABLE)); - pg1->SetIcon(pg2->RetIcon()); - pl1->SetName(pl2->RetName()); + pg1->SetIcon(pg2->GetIcon()); + pl1->SetName(pl2->GetName()); m_time[i] = m_time[i+1]; m_visitGoal[i] = m_visitGoal[i+1]; @@ -427,9 +432,9 @@ bool CDisplayText::ClearLastText() m_visitHeight[i] = m_visitHeight[i+1]; // shift } - pw->DeleteControl(EventMsg(EVENT_DT_VISIT0+i)); - pw->DeleteControl(EventMsg(EVENT_DT_GROUP0+i)); - pw->DeleteControl(EventMsg(EVENT_DT_LABEL0+i)); + pw->DeleteControl(EventType(EVENT_DT_VISIT0+i)); + pw->DeleteControl(EventType(EVENT_DT_GROUP0+i)); + pw->DeleteControl(EventType(EVENT_DT_LABEL0+i)); m_bExist[i] = false; return true; } @@ -453,7 +458,7 @@ void CDisplayText::SetEnable(bool bEnable) // Returns the goal during a visit. -Math::Vector CDisplayText::RetVisitGoal(EventMsg event) +Math::Vector CDisplayText::GetVisitGoal(EventType event) { int i; @@ -464,7 +469,7 @@ Math::Vector CDisplayText::RetVisitGoal(EventMsg event) // Returns the distance during a visit. -float CDisplayText::RetVisitDist(EventMsg event) +float CDisplayText::GetVisitDist(EventType event) { int i; @@ -475,7 +480,7 @@ float CDisplayText::RetVisitDist(EventMsg event) // Returns the height on a visit. -float CDisplayText::RetVisitHeight(EventMsg event) +float CDisplayText::GetVisitHeight(EventType event) { int i; @@ -487,13 +492,13 @@ float CDisplayText::RetVisitHeight(EventMsg event) // Ranges from ideal visit for a given object. -float CDisplayText::RetIdealDist(CObject* pObj) +float CDisplayText::GetIdealDist(CObject* pObj) { ObjectType type; if ( pObj == 0 ) return 40.0f; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_PORTICO ) return 200.0f; if ( type == OBJECT_BASE ) return 200.0f; if ( type == OBJECT_NUCLEAR ) return 100.0f; @@ -506,13 +511,13 @@ float CDisplayText::RetIdealDist(CObject* pObj) // Returns the height of ideal visit for a given object. -float CDisplayText::RetIdealHeight(CObject* pObj) +float CDisplayText::GetIdealHeight(CObject* pObj) { ObjectType type; if ( pObj == 0 ) return 5.0f; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_DERRICK ) return 35.0f; if ( type == OBJECT_FACTORY ) return 22.0f; if ( type == OBJECT_REPAIR ) return 30.0f; @@ -537,16 +542,16 @@ float CDisplayText::RetIdealHeight(CObject* pObj) void CDisplayText::ClearVisit() { - CWindow* pw; - CButton* pb; + Ui::CWindow* pw; + Ui::CButton* pb; int i; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return; for ( i=0 ; iSearchControl(EventMsg(EVENT_DT_VISIT0+i)); + pb = static_cast(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb == 0 ) break; pb->SetIcon(14); // eyes } @@ -554,38 +559,38 @@ void CDisplayText::ClearVisit() // Puts a button in "visit". -void CDisplayText::SetVisit(EventMsg event) +void CDisplayText::SetVisit(EventType event) { - CWindow* pw; - CButton* pb; + Ui::CWindow* pw; + Ui::CButton* pb; int i; i = event-EVENT_DT_VISIT0; if ( i < 0 || i >= MAXDTLINE ) return; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return; - pb = (CButton*)pw->SearchControl(EventMsg(EVENT_DT_VISIT0+i)); + pb = static_cast(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb == 0 ) return; pb->SetIcon(48); // > } // Indicates whether a button is set to "visit". -bool CDisplayText::IsVisit(EventMsg event) +bool CDisplayText::IsVisit(EventType event) { - CWindow* pw; - CButton* pb; + Ui::CWindow* pw; + Ui::CButton* pb; int i; i = event-EVENT_DT_VISIT0; if ( i < 0 || i >= MAXDTLINE ) return false; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW2); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return false; - pb = (CButton*)pw->SearchControl(EventMsg(EVENT_DT_VISIT0+i)); + pb = static_cast(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb == 0 ) return false; - return (pb->RetIcon() == 48); // > ? + return (pb->GetIcon() == 48); // > ? } @@ -599,10 +604,10 @@ CObject* CDisplayText::SearchToto() for ( i=0 ; i<1000000 ; i++ ) { - pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); + pObj = static_cast(m_iMan->SearchInstance(CLASS_OBJECT, i)); if ( pObj == 0 ) break; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_TOTO ) { return pObj; @@ -611,3 +616,4 @@ CObject* CDisplayText::SearchToto() return 0; } +} diff --git a/src/ui/displaytext.h b/src/ui/displaytext.h index c2eea98..d560433 100644 --- a/src/ui/displaytext.h +++ b/src/ui/displaytext.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,15 +22,18 @@ #include "common/event.h" #include "common/misc.h" -#include "old/d3dengine.h" +#include "sound/sound.h" +//#include "old/d3dengine.h" class CInstanceManager; -class CD3DEngine; -class CInterface; +//class CD3DEngine class CObject; class CSound; +namespace Ui {; + +class CInterface; enum TextType { @@ -45,7 +49,8 @@ const int MAXDTLINE = 4; class CDisplayText { public: - CDisplayText(CInstanceManager* iMan); +// CDisplayText(CInstanceManager* iMan); + CDisplayText(); ~CDisplayText(); void DeleteObject(); @@ -62,25 +67,25 @@ public: void SetDelay(float factor); void SetEnable(bool bEnable); - Math::Vector RetVisitGoal(EventMsg event); - float RetVisitDist(EventMsg event); - float RetVisitHeight(EventMsg event); + Math::Vector GetVisitGoal(EventType event); + float GetVisitDist(EventType event); + float GetVisitHeight(EventType event); - float RetIdealDist(CObject* pObj); - float RetIdealHeight(CObject* pObj); + float GetIdealDist(CObject* pObj); + float GetIdealHeight(CObject* pObj); void ClearVisit(); - void SetVisit(EventMsg event); - bool IsVisit(EventMsg event); + void SetVisit(EventType event); + bool IsVisit(EventType event); protected: CObject* SearchToto(); protected: CInstanceManager* m_iMan; - CD3DEngine* m_engine; - CInterface* m_interface; - CSound* m_sound; + Gfx::CEngine* m_engine; + Ui::CInterface* m_interface; + CSoundInterface* m_sound; bool m_bExist[MAXDTLINE]; float m_time[MAXDTLINE]; @@ -94,3 +99,4 @@ protected: }; +} diff --git a/src/ui/gauge.cpp b/src/ui/gauge.cpp index a4571da..cc4eca0 100644 --- a/src/ui/gauge.cpp +++ b/src/ui/gauge.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -18,11 +19,12 @@ //#include -#include +//#include //#include //#include "common/struct.h" //#include "old/d3dengine.h" +#include "graphics/engine/engine.h" //#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" @@ -31,10 +33,11 @@ - +namespace Ui { // Object's constructor. -CGauge::CGauge(CInstanceManager* iMan) : CControl(iMan) +//CGauge::CGauge(CInstanceManager* iMan) : CControl(iMan) +CGauge::CGauge() : CControl() { m_level = 0.0f; } @@ -95,40 +98,40 @@ void CGauge::Draw() pos = m_pos; dim = m_dim; - uv1.x = 32.0f/256.0f; - uv1.y = 32.0f/256.0f; - uv2.x = 64.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 32.0f / 256.0f; + uv1.y = 32.0f / 256.0f; + uv2.x = 64.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 10.0f/640.0f; - corner.y = 10.0f/480.0f; + corner.x = 10.0f / 640.0f; + corner.y = 10.0f / 480.0f; DrawIcon(pos, dim, uv1, uv2, corner, 8.0f/256.0f); - pos.x += 3.0f/640.0f; - pos.y += 3.0f/480.0f; - dim.x -= 6.0f/640.0f; - dim.y -= 6.0f/480.0f; + pos.x += 3.0f / 640.0f; + pos.y += 3.0f / 480.0f; + dim.x -= 6.0f / 640.0f; + dim.y -= 6.0f / 480.0f; if ( m_dim.x < m_dim.y ) // vertical gauge? { - uv1.x = (0.0f+m_icon*16.0f)/256.0f; - uv2.x = uv1.x+16.0f/256.0f; - uv1.y = 128.0f/256.0f+m_level*(64.0f/256.0f); - uv2.y = uv1.y+64.0f/256.0f; + uv1.x = (0.0f + m_icon * 16.0f) / 256.0f; + uv2.x = uv1.x + 16.0f / 256.0f; + uv1.y = 128.0f/256.0f + m_level * (64.0f/256.0f); + uv2.y = uv1.y + 64.0f/256.0f; } else // horizontal gauge? { - uv1.x = 64.0f/256.0f+(1.0f-m_level)*(64.0f/256.0f); - uv2.x = uv1.x+64.0f/256.0f; - uv1.y = (128.0f+m_icon*16.0f)/256.0f; - uv2.y = uv1.y+16.0f/256.0f; + uv1.x = 64.0f/256.0f + (1.0f - m_level) * (64.0f/256.0f); + uv2.x = uv1.x + 64.0f/256.0f; + uv1.y = (128.0f + m_icon*16.0f) / 256.0f; + uv2.y = uv1.y + 16.0f/256.0f; } uv1.x += dp; @@ -155,3 +158,4 @@ float CGauge::GetLevel() } +} diff --git a/src/ui/gauge.h b/src/ui/gauge.h index 1686c56..b745834 100644 --- a/src/ui/gauge.h +++ b/src/ui/gauge.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,15 +22,17 @@ #include "ui/control.h" +namespace Gfx{ +class CEngine; +}; -//class CD3DEngine; - - +namespace Ui { class CGauge : public CControl { public: - CGauge(CInstanceManager* iMan); +// CGauge(CInstanceManager* iMan); + CGauge(); virtual ~CGauge(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -48,3 +51,4 @@ protected: }; +} diff --git a/src/ui/group.cpp b/src/ui/group.cpp index d2cd192..da0aa37 100644 --- a/src/ui/group.cpp +++ b/src/ui/group.cpp @@ -33,10 +33,11 @@ - +namespace Ui { // Object's constructor. -CGroup::CGroup(CInstanceManager* iMan) : CControl(iMan) +//CGroup::CGroup(CInstanceManager* iMan) : CControl(iMan) +CGroup::CGroup() : CControl() { } @@ -93,16 +94,16 @@ void CGroup::Draw() DrawShadow(m_pos, m_dim); } - dp = 0.5f/256.0f; + dp = 0.5f / 256.0f; if ( m_icon == 0 ) // hollow frame? { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 160.0f/256.0f; - uv1.y = 192.0f/256.0f; // u-v texture - uv2.x = 192.0f/256.0f; - uv2.y = 224.0f/256.0f; + uv1.x = 160.0f / 256.0f; + uv1.y = 192.0f / 256.0f; // u-v texture + uv2.x = 192.0f / 256.0f; + uv2.y = 224.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -115,10 +116,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 104.0f/256.0f; - uv1.y = 48.0f/256.0f; - uv2.x = 112.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 104.0f / 256.0f; + uv1.y = 48.0f / 256.0f; + uv2.x = 112.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -129,10 +130,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 112.0f/256.0f; - uv1.y = 48.0f/256.0f; - uv2.x = 120.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 112.0f / 256.0f; + uv1.y = 48.0f / 256.0f; + uv2.x = 120.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -143,10 +144,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 120.0f/256.0f; - uv1.y = 48.0f/256.0f; - uv2.x = 128.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 120.0f / 256.0f; + uv1.y = 48.0f / 256.0f; + uv2.x = 128.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -157,10 +158,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 192.0f/256.0f; - uv1.y = 128.0f/256.0f; - uv2.x = 224.0f/256.0f; - uv2.y = 160.0f/256.0f; + uv1.x = 192.0f / 256.0f; + uv1.y = 128.0f / 256.0f; + uv2.x = 224.0f / 256.0f; + uv2.y = 160.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -171,10 +172,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 224.0f/256.0f; - uv1.y = 128.0f/256.0f; - uv2.x = 256.0f/256.0f; - uv2.y = 160.0f/256.0f; + uv1.x = 224.0f / 256.0f; + uv1.y = 128.0f / 256.0f; + uv2.x = 256.0f / 256.0f; + uv2.y = 160.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -185,26 +186,26 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); - uv1.x = 0.0f/256.0f; // brown transparent - uv1.y = 75.0f/256.0f; - uv2.x = 64.0f/256.0f; - uv2.y = 128.0f/256.0f; + uv1.x = 0.0f / 256.0f; // brown transparent + uv1.y = 75.0f / 256.0f; + uv2.x = 64.0f / 256.0f; + uv2.y = 128.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 4.0f/640.0f; - corner.y = 4.0f/480.0f; + corner.x = 4.0f / 640.0f; + corner.y = 4.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 8.0f/256.0f); } if ( m_icon == 7 ) { m_engine->SetTexture("button1.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 64.0f/256.0f; - uv1.y = 0.0f/256.0f; - uv2.x = 96.0f/256.0f; - uv2.y = 32.0f/256.0f; + uv1.x = 64.0f / 256.0f; + uv1.y = 0.0f / 256.0f; + uv2.x = 96.0f / 256.0f; + uv2.y = 32.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -215,10 +216,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); - uv1.x = 64.0f/256.0f; // green transparent - uv1.y = 160.0f/256.0f; - uv2.x = 160.0f/256.0f; - uv2.y = 176.0f/256.0f; + uv1.x = 64.0f / 256.0f; // green transparent + uv1.y = 160.0f / 256.0f; + uv2.x = 160.0f / 256.0f; + uv2.y = 176.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -229,7 +230,7 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); - uv1.x = 64.0f/256.0f; // red transparent + uv1.x = 64.0f / 256.0f; // red transparent uv1.y = 176.0f/256.0f; uv2.x = 160.0f/256.0f; uv2.y = 192.0f/256.0f; @@ -243,10 +244,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); - uv1.x = 64.0f/256.0f; // blue transparent - uv1.y = 192.0f/256.0f; - uv2.x = 160.0f/256.0f; - uv2.y = 208.0f/256.0f; + uv1.x = 64.0f / 256.0f; // blue transparent + uv1.y = 192.0f / 256.0f; + uv2.x = 160.0f / 256.0f; + uv2.y = 208.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -257,10 +258,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); - uv1.x = 64.0f/256.0f; // yellow transparent - uv1.y = 224.0f/256.0f; - uv2.x = 160.0f/256.0f; - uv2.y = 240.0f/256.0f; + uv1.x = 64.0f / 256.0f; // yellow transparent + uv1.y = 224.0f / 256.0f; + uv2.x = 160.0f / 256.0f; + uv2.y = 240.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -269,17 +270,17 @@ void CGroup::Draw() } if ( m_icon == 12 ) // viewfinder cross? { - dim.x = m_dim.x/2.0f; - dim.y = m_dim.y/2.0f; + dim.x = m_dim.x / 2.0f; + dim.y = m_dim.y / 2.0f; m_engine->SetTexture("mouse.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/300.0f; pos.y = m_pos.y+m_dim.y/300.0f+dim.y; - uv1.x = 0.5f/256.0f; - uv1.y = 192.5f/256.0f; - uv2.x = 63.5f/256.0f; - uv2.y = 255.5f/256.0f; + uv1.x = 0.5f / 256.0f; + uv1.y = 192.5f / 256.0f; + uv2.x = 63.5f / 256.0f; + uv2.y = 255.5f / 256.0f; DrawIcon(pos, dim, uv1, uv2); // ul pos.x += dim.x; Math::Swap(uv1.x, uv2.x); @@ -294,10 +295,10 @@ void CGroup::Draw() m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/300.0f; pos.y = m_pos.y-m_dim.y/300.0f+dim.y; - uv1.x = 64.5f/256.0f; - uv1.y = 192.5f/256.0f; - uv2.x = 127.5f/256.0f; - uv2.y = 255.5f/256.0f; + uv1.x = 64.5f / 256.0f; + uv1.y = 192.5f / 256.0f; + uv2.x = 127.5f / 256.0f; + uv2.y = 255.5f / 256.0f; DrawIcon(pos, dim, uv1, uv2); // ul pos.x += dim.x; Math::Swap(uv1.x, uv2.x); @@ -315,19 +316,19 @@ void CGroup::Draw() m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; - uv1.x = 128.5f/256.0f; - uv1.y = 192.5f/256.0f; - uv2.x = 191.5f/256.0f; - uv2.y = 255.5f/256.0f; + uv1.x = 128.5f / 256.0f; + uv1.y = 192.5f / 256.0f; + uv2.x = 191.5f / 256.0f; + uv2.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; - uv1.x = 192.5f/256.0f; - uv1.y = 192.5f/256.0f; - uv2.x = 255.5f/256.0f; - uv2.y = 255.5f/256.0f; + uv1.x = 192.5f / 256.0f; + uv1.y = 192.5f / 256.0f; + uv2.x = 255.5f / 256.0f; + uv2.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); } if ( m_icon == 14 ) // corner upper / right? @@ -336,19 +337,19 @@ void CGroup::Draw() m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; - uv2.x = 128.5f/256.0f; - uv1.y = 192.5f/256.0f; - uv1.x = 191.5f/256.0f; - uv2.y = 255.5f/256.0f; + uv2.x = 128.5f / 256.0f; + uv1.y = 192.5f / 256.0f; + uv1.x = 191.5f / 256.0f; + uv2.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; - uv2.x = 192.5f/256.0f; - uv1.y = 192.5f/256.0f; - uv1.x = 255.5f/256.0f; - uv2.y = 255.5f/256.0f; + uv2.x = 192.5f / 256.0f; + uv1.y = 192.5f / 256.0f; + uv1.x = 255.5f / 256.0f; + uv2.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); } if ( m_icon == 15 ) // corner lower / left? @@ -357,19 +358,19 @@ void CGroup::Draw() m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; - uv1.x = 128.5f/256.0f; - uv2.y = 192.5f/256.0f; - uv2.x = 191.5f/256.0f; - uv1.y = 255.5f/256.0f; + uv1.x = 128.5f / 256.0f; + uv2.y = 192.5f / 256.0f; + uv2.x = 191.5f / 256.0f; + uv1.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; - uv1.x = 192.5f/256.0f; - uv2.y = 192.5f/256.0f; - uv2.x = 255.5f/256.0f; - uv1.y = 255.5f/256.0f; + uv1.x = 192.5f / 256.0f; + uv2.y = 192.5f / 256.0f; + uv2.x = 255.5f / 256.0f; + uv1.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); } if ( m_icon == 16 ) // corner lower / left? @@ -378,45 +379,45 @@ void CGroup::Draw() m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; - uv2.x = 128.5f/256.0f; - uv2.y = 192.5f/256.0f; - uv1.x = 191.5f/256.0f; - uv1.y = 255.5f/256.0f; + uv2.x = 128.5f / 256.0f; + uv2.y = 192.5f / 256.0f; + uv1.x = 191.5f / 256.0f; + uv1.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x = m_pos.x+m_dim.x/150.0f; pos.y = m_pos.y-m_dim.y/150.0f; - uv2.x = 192.5f/256.0f; - uv2.y = 192.5f/256.0f; - uv1.x = 255.5f/256.0f; - uv1.y = 255.5f/256.0f; + uv2.x = 192.5f / 256.0f; + uv2.y = 192.5f / 256.0f; + uv1.x = 255.5f / 256.0f; + uv1.y = 255.5f / 256.0f; DrawIcon(pos, m_dim, uv1, uv2); } if ( m_icon == 17 ) { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 0.0f/256.0f; // blue frame - uv1.y = 75.0f/256.0f; - uv2.x = 64.0f/256.0f; - uv2.y = 128.0f/256.0f; + uv1.x = 0.0f / 256.0f; // blue frame + uv1.y = 75.0f / 256.0f; + uv2.x = 64.0f / 256.0f; + uv2.y = 128.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 6.0f/640.0f; - corner.y = 6.0f/480.0f; + corner.x = 6.0f / 640.0f; + corner.y = 6.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 2.0f/256.0f); } if ( m_icon == 18 ) // arrow> for SatCom? { m_engine->SetTexture("button1.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 0.0f/256.0f; // > - uv1.y = 192.0f/256.0f; - uv2.x = 32.0f/256.0f; - uv2.y = 224.0f/256.0f; + uv1.x = 0.0f / 256.0f; // > + uv1.y = 192.0f / 256.0f; + uv2.x = 32.0f / 256.0f; + uv2.y = 224.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -427,10 +428,10 @@ void CGroup::Draw() { m_engine->SetTexture("button1.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 224.0f/256.0f; // SatCom symbol - uv1.y = 224.0f/256.0f; - uv2.x = 256.0f/256.0f; - uv2.y = 256.0f/256.0f; + uv1.x = 224.0f / 256.0f; // SatCom symbol + uv1.y = 224.0f / 256.0f; + uv2.x = 256.0f / 256.0f; + uv2.y = 256.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -441,10 +442,10 @@ void CGroup::Draw() { m_engine->SetTexture("button1.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 224.0f/256.0f; - uv1.y = 32.0f/256.0f; - uv2.x = 256.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 224.0f / 256.0f; + uv1.y = 32.0f / 256.0f; + uv2.x = 256.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -455,10 +456,10 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - uv1.x = 160.0f/256.0f; - uv1.y = 32.0f/256.0f; - uv2.x = 192.0f/256.0f; - uv2.y = 64.0f/256.0f; + uv1.x = 160.0f / 256.0f; + uv1.y = 32.0f / 256.0f; + uv2.x = 192.0f / 256.0f; + uv2.y = 64.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -469,16 +470,16 @@ void CGroup::Draw() { m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 64.0f/256.0f; // opaque yellow - uv1.y = 224.0f/256.0f; - uv2.x = 160.0f/256.0f; - uv2.y = 240.0f/256.0f; + uv1.x = 64.0f / 256.0f; // opaque yellow + uv1.y = 224.0f / 256.0f; + uv2.x = 160.0f / 256.0f; + uv2.y = 240.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 5.0f/640.0f; - corner.y = 5.0f/480.0f; + corner.x = 5.0f / 640.0f; + corner.y = 5.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 3.0f/256.0f); } @@ -486,74 +487,74 @@ void CGroup::Draw() { m_engine->SetTexture("button3.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 64.0f/256.0f; // yellow - uv1.y = 192.0f/256.0f; - uv2.x = 80.0f/256.0f; - uv2.y = 208.0f/256.0f; + uv1.x = 64.0f / 256.0f; // yellow + uv1.y = 192.0f / 256.0f; + uv2.x = 80.0f / 256.0f; + uv2.y = 208.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 4.0f/640.0f; - corner.y = 4.0f/480.0f; + corner.x = 4.0f / 640.0f; + corner.y = 4.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 2.0f/256.0f); } if ( m_icon == 24 ) { m_engine->SetTexture("button3.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 80.0f/256.0f; // orange - uv1.y = 192.0f/256.0f; - uv2.x = 96.0f/256.0f; - uv2.y = 208.0f/256.0f; + uv1.x = 80.0f / 256.0f; // orange + uv1.y = 192.0f / 256.0f; + uv2.x = 96.0f / 256.0f; + uv2.y = 208.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 4.0f/640.0f; - corner.y = 4.0f/480.0f; + corner.x = 4.0f / 640.0f; + corner.y = 4.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 2.0f/256.0f); } if ( m_icon == 25 ) { m_engine->SetTexture("button3.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 64.0f/256.0f; // orange - uv1.y = 208.0f/256.0f; - uv2.x = 80.0f/256.0f; - uv2.y = 224.0f/256.0f; + uv1.x = 64.0f / 256.0f; // orange + uv1.y = 208.0f / 256.0f; + uv2.x = 80.0f / 256.0f; + uv2.y = 224.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 4.0f/640.0f; - corner.y = 4.0f/480.0f; + corner.x = 4.0f / 640.0f; + corner.y = 4.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 2.0f/256.0f); } if ( m_icon == 26 ) { m_engine->SetTexture("button3.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 80.0f/256.0f; // red - uv1.y = 208.0f/256.0f; - uv2.x = 96.0f/256.0f; - uv2.y = 224.0f/256.0f; + uv1.x = 80.0f / 256.0f; // red + uv1.y = 208.0f / 256.0f; + uv2.x = 96.0f / 256.0f; + uv2.y = 224.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 4.0f/640.0f; - corner.y = 4.0f/480.0f; + corner.x = 4.0f / 640.0f; + corner.y = 4.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 2.0f/256.0f); } if ( m_icon == 27 ) { m_engine->SetTexture("button3.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 32.0f/256.0f; - uv1.y = 0.0f/256.0f; - uv2.x = 64.0f/256.0f; - uv2.y = 32.0f/256.0f; + uv1.x = 32.0f / 256.0f; + uv1.y = 0.0f / 256.0f; + uv2.x = 64.0f / 256.0f; + uv2.y = 32.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; @@ -568,8 +569,8 @@ void CGroup::Draw() m_engine->SetTexture("button2.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - uv1.x = 32.0f/256.0f; - uv1.y = 32.0f/256.0f; + uv1.x = 32.0f / 256.0f; + uv1.y = 32.0f / 256.0f; uv2.x = uv1.x+32.0f/256.0f; uv2.y = uv1.y+32.0f/256.0f; uv1.x += dp; @@ -580,12 +581,12 @@ void CGroup::Draw() m_engine->SetTexture("button3.tga"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - pos.x += 8.0f/640.0f; - pos.y += 8.0f/480.0f; - dim.x -= 16.0f/640.0f; - dim.y -= 16.0f/480.0f; - uv1.x = 32.0f/256.0f; - uv1.y = 0.0f/256.0f; + pos.x += 8.0f / 640.0f; + pos.y += 8.0f / 480.0f; + dim.x -= 16.0f / 640.0f; + dim.y -= 16.0f / 480.0f; + uv1.x = 32.0f / 256.0f; + uv1.y = 0.0f / 256.0f; uv2.x = uv1.x+32.0f/256.0f; uv2.y = uv1.y+32.0f/256.0f; uv1.x += dp; @@ -595,12 +596,12 @@ void CGroup::Draw() DrawIcon(pos, dim, uv1, uv2); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - pos.x += 2.0f/640.0f; - pos.y += 2.0f/480.0f; - dim.x -= 4.0f/640.0f; - dim.y -= 4.0f/480.0f; - uv1.x = 0.0f/256.0f; - uv1.y = 0.0f/256.0f; + pos.x += 2.0f / 640.0f; + pos.y += 2.0f / 480.0f; + dim.x -= 4.0f / 640.0f; + dim.y -= 4.0f / 480.0f; + uv1.x = 0.0f / 256.0f; + uv1.y = 0.0f / 256.0f; uv2.x = uv1.x+32.0f/256.0f; uv2.y = uv1.y+32.0f/256.0f; uv1.x += dp; @@ -610,10 +611,10 @@ void CGroup::Draw() DrawIcon(pos, dim, uv1, uv2); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); - pos.x += 8.0f/640.0f; - pos.y += 8.0f/480.0f; - dim.x -= 16.0f/640.0f; - dim.y -= 16.0f/480.0f; + pos.x += 8.0f / 640.0f; + pos.y += 8.0f / 480.0f; + dim.x -= 16.0f / 640.0f; + dim.y -= 16.0f / 480.0f; if ( m_icon == 100 ) icon = 43; // base ? if ( m_icon == 101 ) icon = 32; // factory ? if ( m_icon == 102 ) icon = 35; // research ? @@ -643,3 +644,4 @@ void CGroup::Draw() } +} diff --git a/src/ui/group.h b/src/ui/group.h index b54829d..bfeef74 100644 --- a/src/ui/group.h +++ b/src/ui/group.h @@ -21,15 +21,17 @@ #include "ui/control.h" +namespace Gfx{ +class CEngine; +}; -class CD3DEngine; - - +namespace Ui { class CGroup : public CControl { public: - CGroup(CInstanceManager* iMan); +// CGroup(CInstanceManager* iMan); + CGroup(); virtual ~CGroup(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -44,3 +46,4 @@ protected: }; +} diff --git a/src/ui/image.cpp b/src/ui/image.cpp index 8bf46fb..5bf6e45 100644 --- a/src/ui/image.cpp +++ b/src/ui/image.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,13 +18,14 @@ // image.cpp -#include +//#include #include -#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -32,10 +34,11 @@ - +namespace Ui { // Object's constructor. -CImage::CImage(CInstanceManager* iMan) : CControl(iMan) +//CImage::CImage(CInstanceManager* iMan) : CControl(iMan) +CImage::CImage() : CControl() { m_filename[0] = 0; } @@ -46,25 +49,25 @@ CImage::~CImage() { if ( m_filename[0] != 0 ) { - m_engine->FreeTexture(m_filename); + m_engine->DeleteTexture(m_filename); } } // Creates a new button. -bool CImage::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CImage::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); if ( icon == -1 ) { char name[100]; char* p; - GetResource(RES_EVENT, eventMsg, name); + GetResource(RES_EVENT, eventType, name); p = strchr(name, '\\'); if ( p != 0 ) *p = 0; SetName(name); @@ -80,13 +83,13 @@ void CImage::SetFilenameImage(char *name) { if ( m_filename[0] != 0 ) { - m_engine->FreeTexture(m_filename); + m_engine->DeleteTexture(m_filename); } strcpy(m_filename, name); } -char* CImage::RetFilenameImage() +char* CImage::GetFilenameImage() { return m_filename; } @@ -119,17 +122,17 @@ void CImage::Draw() if ( m_icon == 0 ) // hollow frame? { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); - uv1.x = 160.0f/256.0f; - uv1.y = 192.0f/256.0f; // u-v texture - uv2.x = 192.0f/256.0f; - uv2.y = 224.0f/256.0f; + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); + uv1.x = 160.0f / 256.0f; + uv1.y = 192.0f / 256.0f; // u-v texture + uv2.x = 192.0f / 256.0f; + uv2.y = 224.0f / 256.0f; uv1.x += dp; uv1.y += dp; uv2.x -= dp; uv2.y -= dp; - corner.x = 10.0f/640.0f; - corner.y = 10.0f/480.0f; + corner.x = 10.0f / 640.0f; + corner.y = 10.0f / 480.0f; DrawIcon(m_pos, m_dim, uv1, uv2, corner, 8.0f/256.0f); } @@ -137,13 +140,13 @@ void CImage::Draw() { m_engine->LoadTexture(m_filename); m_engine->SetTexture(m_filename); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); pos = m_pos; dim = m_dim; - pos.x += 5.0f/640.0f; - pos.y += 5.0f/480.0f; - dim.x -= 10.0f/640.0f; - dim.y -= 10.0f/480.0f; + pos.x += 5.0f / 640.0f; + pos.y += 5.0f / 480.0f; + dim.x -= 10.0f / 640.0f; + dim.y -= 10.0f / 480.0f; uv1.x = 0.0f; uv1.y = 0.0f; uv2.x = 1.0f; @@ -153,3 +156,4 @@ void CImage::Draw() } +} diff --git a/src/ui/image.h b/src/ui/image.h index 85c5962..f24684a 100644 --- a/src/ui/image.h +++ b/src/ui/image.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,25 +22,28 @@ #include "ui/control.h" - -class CD3DEngine; +namespace Gfx{ +class CEngine; +}; +namespace Ui { class CImage : public CControl { public: - CImage(CInstanceManager* iMan); +// CImage(CInstanceManager* iMan); + CImage (); virtual ~CImage(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); void Draw(); void SetFilenameImage(char *name); - char* RetFilenameImage(); + char* GetFilenameImage(); protected: @@ -48,3 +52,4 @@ protected: }; +} diff --git a/src/ui/slider.cpp b/src/ui/slider.cpp index be8af18..3c5b1ba 100644 --- a/src/ui/slider.cpp +++ b/src/ui/slider.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,17 +18,19 @@ // slider.cpp -#include +//#include #include -#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/math3d.h" +#include "graphics/engine/engine.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" -#include "old/text.h" +//#include "old/text.h" +#include "graphics/engine.text.h" #include "ui/button.h" #include "ui/slider.h" @@ -71,10 +74,10 @@ CSlider::~CSlider() // Creates a new button. -bool CSlider::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CSlider::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - CControl::Create(pos, dim, icon, eventMsg); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); + CControl::Create(pos, dim, icon, eventType); MoveAdjust(); return true; @@ -119,7 +122,7 @@ void CSlider::MoveAdjust() m_buttonLeft->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), m_bHoriz?55:49, EVENT_NULL); // SetRepeat(true); if ( m_state & STATE_SHADOW ) m_buttonLeft->SetState(STATE_SHADOW); - m_eventUp = m_buttonLeft->RetEventMsg(); + m_eventUp = m_buttonLeft->GetEventType(); } if ( m_buttonRight == 0 ) @@ -128,7 +131,7 @@ void CSlider::MoveAdjust() m_buttonRight->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), m_bHoriz?48:50, EVENT_NULL); // >/v m_buttonRight->SetRepeat(true); if ( m_state & STATE_SHADOW ) m_buttonRight->SetState(STATE_SHADOW); - m_eventDown = m_buttonRight->RetEventMsg(); + m_eventDown = m_buttonRight->GetEventType(); } m_marginButton = m_bHoriz?(m_dim.y*0.75f):(m_dim.x/0.75f); @@ -261,7 +264,7 @@ bool CSlider::EventProcess(const Event &event) if ( !m_buttonRight->EventProcess(event) ) return false; } - if ( event.event == m_eventUp && m_step > 0.0f ) + if ( event.type == m_eventUp && m_step > 0.0f ) { m_visibleValue -= m_bHoriz?m_step:-m_step; if ( m_visibleValue < 0.0f ) m_visibleValue = 0.0f; @@ -269,11 +272,11 @@ bool CSlider::EventProcess(const Event &event) AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } - if ( event.event == m_eventDown && m_step > 0.0f ) + if ( event.type == m_eventDown && m_step > 0.0f ) { m_visibleValue += m_bHoriz?m_step:-m_step; if ( m_visibleValue < 0.0f ) m_visibleValue = 0.0f; @@ -281,12 +284,13 @@ bool CSlider::EventProcess(const Event &event) AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } - if ( event.event == EVENT_LBUTTONDOWN && - (m_state & STATE_VISIBLE) && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + (event.mouseButton.button == 1 ) && + (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { if ( CControl::Detect(event.pos) ) @@ -311,7 +315,7 @@ bool CSlider::EventProcess(const Event &event) AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); m_bCapture = true; @@ -320,7 +324,7 @@ bool CSlider::EventProcess(const Event &event) } } - if ( event.event == EVENT_MOUSEMOVE && m_bCapture ) + if ( event.type == EVENT_MOUSE_MOVE && m_bCapture ) { if ( m_bHoriz ) { @@ -345,32 +349,35 @@ bool CSlider::EventProcess(const Event &event) AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } } - if ( event.event == EVENT_LBUTTONUP && m_bCapture ) + if ( ( event.type == EVENT_MOUSE_BUTTON_UP ) && + ( event.mouseButton.button == 1 ) && + m_bCapture ) { m_bCapture = false; } - - if ( event.event == EVENT_KEYDOWN && +/*/TODO */ + if ( event.type == EVENT_KEY_DOWN && event.param == VK_WHEELUP && Detect(event.pos) && m_buttonLeft != 0 ) { Event newEvent = event; - newEvent.event = m_buttonLeft->RetEventMsg(); + newEvent.type = m_buttonLeft->GetEventType(); m_event->AddEvent(newEvent); } - if ( event.event == EVENT_KEYDOWN && +/*/TODO */ + if ( event.type == EVENT_KEY_DOWN && event.param == VK_WHEELDOWN && Detect(event.pos) && m_buttonRight != 0 ) { Event newEvent = event; - newEvent.event = m_buttonRight->RetEventMsg(); + newEvent.type = m_buttonRight->GetEventType(); m_event->AddEvent(newEvent); } @@ -466,10 +473,10 @@ void CSlider::Draw() if ( m_bHoriz ) { sprintf(text, "%d", (int)(m_min+m_visibleValue*(m_max-m_min))); - h = m_engine->RetText()->RetHeight(m_fontSize, m_fontType); + h = m_engine->GetText()->GetHeight(m_fontType, m_fontSize); pos.x = m_pos.x+m_dim.x+(10.0f/640.0f); pos.y = m_pos.y+(m_dim.y-h)/2.0f; - m_engine->RetText()->DrawText(text, pos, m_dim.x, 1, m_fontSize, m_fontStretch, m_fontType, 0); + m_engine->GetText()->DrawText(text, m_fontType, m_fontSize, pos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, 0); } else { @@ -482,7 +489,7 @@ void CSlider::Draw() dim.x = 50.0f/640.0f; dim.y = 16.0f/480.0f; sprintf(text, "%d", (int)(m_min+(m_visibleValue*(m_max-m_min)))); - m_engine->RetText()->DrawText(text, pos, dim.x, 1, m_fontSize, m_fontStretch, m_fontType, 0); + m_engine->GetText()->DrawText(text, m_fontType, m_fontSize, pos, dim.x, Gfx::TEXT_ALIGN_RIGHT, 0); } } } @@ -497,7 +504,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon) if ( icon == 0 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f/256.0f; // yellow rectangle uv1.y = 32.0f/256.0f; uv2.x = 32.0f/256.0f; @@ -509,7 +516,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 1 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 128.0f/256.0f; // gray rectangle uv1.y = 32.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -521,7 +528,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon) else { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 224.0f/256.0f; // cursor uv1.y = 32.0f/256.0f; uv2.x = 256.0f/256.0f; @@ -561,7 +568,7 @@ void CSlider::SetVisibleValue(float value) AdjustGlint(); } -float CSlider::RetVisibleValue() +float CSlider::GetVisibleValue() { return m_min+m_visibleValue*(m_max-m_min); } @@ -572,7 +579,7 @@ void CSlider::SetArrowStep(float step) m_step = step/(m_max-m_min); } -float CSlider::RetArrowStep() +float CSlider::GetArrowStep() { return m_step*(m_max-m_min); } diff --git a/src/ui/slider.h b/src/ui/slider.h index 1ec9ea5..b8f22d4 100644 --- a/src/ui/slider.h +++ b/src/ui/slider.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -21,8 +22,9 @@ #include "ui/control.h" - -class CD3DEngine; +namespace Gfx{ +class CEngine; +}; class CButton; @@ -33,7 +35,7 @@ public: CSlider(CInstanceManager* iMan); ~CSlider(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); void SetPos(Math::Point pos); void SetDim(Math::Point dim); @@ -48,10 +50,10 @@ public: void SetLimit(float min, float max); void SetVisibleValue(float value); - float RetVisibleValue(); + float GetVisibleValue(); void SetArrowStep(float step); - float RetArrowStep(); + float GetArrowStep(); protected: void MoveAdjust(); @@ -74,8 +76,8 @@ protected: Math::Point m_pressPos; float m_pressValue; - EventMsg m_eventUp; - EventMsg m_eventDown; + EventType m_eventUp; + EventType m_eventDown; }; -- cgit v1.2.3-1-g7c22 From 8666d35f7c3129c101029eae1cd0a5124f35b7de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 14:05:36 +0200 Subject: UI porting --- src/ui/edit.cpp | 470 ++++++++++++++++++++++++++------------------------- src/ui/edit.h | 123 +++++++++----- src/ui/editvalue.cpp | 94 ++++++----- src/ui/editvalue.h | 31 ++-- 4 files changed, 383 insertions(+), 335 deletions(-) diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index 58a8b7d..86f0011 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -20,34 +21,41 @@ #include #include #include -#include -#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +#include "graphics/engine/engine.h" #include "common/language.h" -#include "old/math3d.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" #include "ui/scroll.h" -#include "old/text.h" +//#include "old/text.h" +#include "graphics/engine/text.h" +//#include "graphics/engine/color.h" #include "ui/edit.h" +namespace Ui { const float MARGX = (5.0f/640.0f); const float MARGY = (5.0f/480.0f); const float MARGYS = (4.0f/480.0f); const float MARGY1 = (1.0f/480.0f); -const float DELAY_DBCLICK = 0.3f; // time limit for double-click -const float DELAY_SCROLL = 0.1f; // time limit for scroll -const float BIG_FONT = 1.6f; // expansion for \b; +//! time limit for double-click +const float DELAY_DBCLICK = 0.3f; +//! time limit for scroll +const float DELAY_SCROLL = 0.1f; +//! expansion for \b; +const float BIG_FONT = 1.6f; -// Indicates whether a character is a space. +//! Indicates whether a character is a space. bool IsSpace(int character) { @@ -56,20 +64,20 @@ bool IsSpace(int character) character == '\n' ); } -// Indicates whether a character is part of a word. +//! Indicates whether a character is part of a word. bool IsWord(int character) { char c; - c = tolower(RetNoAccent(character)); + c = tolower(GetNoAccent(character)); return ( (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_' ); } -// Indicates whether a character is a word separator. +//! Indicates whether a character is a word separator. bool IsSep(int character) { @@ -79,19 +87,20 @@ bool IsSep(int character) -// Object's constructor. +//! Object's constructor. -CEdit::CEdit(CInstanceManager* iMan) : CControl(iMan) +//CEdit::CEdit(CInstanceManager* iMan) : CControl(iMan) +CEdit::CEdit () : CControl () { Math::Point pos; int i; m_maxChar = 100; - m_text = (char*)malloc(sizeof(char)*(m_maxChar+1)); + m_text = new char* [sizeof(char)*(m_maxChar+1)]; // TODO m_format = 0; m_len = 0; - m_fontType = FONT_COURIER; + m_fontType = Gfx::FONT_COURIER; m_scroll = 0; m_bEdit = true; m_bHilite = true; @@ -137,13 +146,13 @@ CEdit::~CEdit() // Creates a new editable line. -bool CEdit::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CEdit::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { CScroll* pc; Math::Point start, end; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - CControl::Create(pos, dim, icon, eventMsg); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); + CControl::Create(pos, dim, icon, eventType); m_len = 0; m_lineFirst = 0; @@ -162,8 +171,8 @@ bool CEdit::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg { m_bMulti = true; MoveAdjust(); // readjusts multi-line mode - m_scroll = new CScroll(m_iMan); - pc = (CScroll*)m_scroll; + m_scroll = new Ui::CScroll(); + pc = static_cast(m_scroll); pc->Create(pos, dim, -1, EVENT_NULL); MoveAdjust(); } @@ -189,25 +198,25 @@ void CEdit::MoveAdjust() Math::Point pos, dim; float height; - m_lineDescent = m_engine->RetText()->RetDescent(m_fontSize, m_fontType); - m_lineAscent = m_engine->RetText()->RetAscent(m_fontSize, m_fontType); - m_lineHeight = m_engine->RetText()->RetHeight(m_fontSize, m_fontType); + m_lineDescent = m_engine->GetText()->GetDescent(m_fontType, m_fontSize); + m_lineAscent = m_engine->GetText()->GetAscent(m_fontType, m_fontSize); + m_lineHeight = m_engine->GetText()->GetHeight(m_fontType, m_fontSize); height = m_dim.y-(m_bMulti?MARGY*2.0f:MARGY1); - m_lineVisible = (int)(height/m_lineHeight); + m_lineVisible = static_cast((height/m_lineHeight)); if ( m_scroll != 0 ) { if ( m_bInsideScroll ) { - pos.x = m_pos.x+m_dim.x-MARGX-SCROLL_WIDTH; - pos.y = m_pos.y+MARGYS; + pos.x = m_pos.x + m_dim.x - MARGX-SCROLL_WIDTH; + pos.y = m_pos.y + MARGYS; dim.x = SCROLL_WIDTH; - dim.y = m_dim.y-MARGYS*2.0f; + dim.y = m_dim.y - MARGYS*2.0f; } else { - pos.x = m_pos.x+m_dim.x-SCROLL_WIDTH; + pos.x = m_pos.x + m_dim.x - SCROLL_WIDTH; pos.y = m_pos.y; dim.x = SCROLL_WIDTH; dim.y = m_dim.y; @@ -238,15 +247,15 @@ bool CEdit::EventProcess(const Event &event) if ( (m_state & STATE_VISIBLE) == 0 ) return true; - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELUP && + if ( event.type == EVENT_KEY_DOWN && + event.mouseButton.button == 5 && Detect(event.pos) ) { Scroll(m_lineFirst-3, true); return true; } - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELDOWN && + if ( event.type == EVENT_KEY_DOWN && + event.mouseButton.button == 4 && // TODO Detect(event.pos) ) { Scroll(m_lineFirst+3, true); @@ -255,30 +264,30 @@ bool CEdit::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { m_time += event.rTime; m_timeBlink += event.rTime; } - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { if ( Detect(event.pos) && event.pos.x < m_pos.x+m_dim.x-(m_bMulti?MARGX+SCROLL_WIDTH:0.0f) ) { if ( m_bEdit ) { - m_engine->SetMouseType(D3DMOUSEEDIT); + m_engine->SetMouseType(Gfx::ENG_MOUSE_EDIT); } else { if ( IsLinkPos(event.pos) ) { - m_engine->SetMouseType(D3DMOUSEHAND); + m_engine->SetMouseType(Gfx::ENG_MOUSE_HAND); } else { - m_engine->SetMouseType(D3DMOUSENORM); + m_engine->SetMouseType(Gfx::ENG_MOUSE_NORM); } } } @@ -288,32 +297,32 @@ bool CEdit::EventProcess(const Event &event) { m_scroll->EventProcess(event); - if ( event.event == m_scroll->RetEventMsg() ) + if ( event.type == m_scroll->GetEventType() ) { Scroll(); return true; } } - if ( event.event == EVENT_KEYDOWN && m_bFocus ) + if ( event.type == EVENT_KEY_DOWN && m_bFocus ) { bShift = (event.keyState&KS_SHIFT); bControl = (event.keyState&KS_CONTROL); if ( (event.param == 'X' && !bShift && bControl) || - (event.param == VK_DELETE && bShift && !bControl) ) + (event.param == KEY(DELETE) && bShift && !bControl) ) { Cut(); return true; } if ( (event.param == 'C' && !bShift && bControl) || - (event.param == VK_INSERT && !bShift && bControl) ) + (event.param == KEY(INSERT) && !bShift && bControl) ) { Copy(); return true; } if ( (event.param == 'V' && !bShift && bControl) || - (event.param == VK_INSERT && bShift && !bControl) ) + (event.param == KEY(INSERT) && bShift && !bControl) ) { Paste(); return true; @@ -327,14 +336,14 @@ bool CEdit::EventProcess(const Event &event) if ( event.param == 'O' && !bShift && bControl ) { - Event newEvent; - m_event->MakeEvent(newEvent, EVENT_STUDIO_OPEN); + Event newEvent(EVENT_STUDIO_OPEN); +// m_event->NewEvent(newEvent, EVENT_STUDIO_OPEN); m_event->AddEvent(newEvent); } if ( event.param == 'S' && !bShift && bControl ) { - Event newEvent; - m_event->MakeEvent(newEvent, EVENT_STUDIO_SAVE); + Event newEvent( EVENT_STUDIO_SAVE ); +// m_event->MakeEvent(newEvent, EVENT_STUDIO_SAVE); m_event->AddEvent(newEvent); } @@ -353,44 +362,44 @@ bool CEdit::EventProcess(const Event &event) if ( MinMaj(true) ) return true; } - if ( event.param == VK_TAB && !bShift && !bControl && !m_bAutoIndent ) + if ( event.param == KEY(TAB) && !bShift && !bControl && !m_bAutoIndent ) { if ( Shift(false) ) return true; } - if ( event.param == VK_TAB && bShift && !bControl && !m_bAutoIndent ) + if ( event.param == KEY(TAB) && bShift && !bControl && !m_bAutoIndent ) { if ( Shift(true) ) return true; } if ( m_bEdit ) { - if ( event.param == VK_LEFT ) + if ( event.param == KEY(LEFT) ) { MoveChar(-1, bControl, bShift); return true; } - if ( event.param == VK_RIGHT ) + if ( event.param == KEY(RIGHT) ) { MoveChar(1, bControl, bShift); return true; } - if ( event.param == VK_UP ) + if ( event.param == KEY(UP) ) { MoveLine(-1, bControl, bShift); return true; } - if ( event.param == VK_DOWN ) + if ( event.param == KEY(DOWN) ) { MoveLine(1, bControl, bShift); return true; } - if ( event.param == VK_PRIOR ) // PageUp ? + if ( event.param == KEY(PAGEUP) ) // PageUp ? { MoveLine(-(m_lineVisible-1), bControl, bShift); return true; } - if ( event.param == VK_NEXT ) // PageDown ? + if ( event.param == KEY(PAGEDOWN) ) // PageDown ? { MoveLine(m_lineVisible-1, bControl, bShift); return true; @@ -398,62 +407,62 @@ bool CEdit::EventProcess(const Event &event) } else { - if ( event.param == VK_LEFT || - event.param == VK_UP ) + if ( event.param == KEY(LEFT) || + event.param == KEY(UP) ) { Scroll(m_lineFirst-1, true); return true; } - if ( event.param == VK_RIGHT || - event.param == VK_DOWN ) + if ( event.param == KEY(RIGHT) || + event.param == KEY(DOWN) ) { Scroll(m_lineFirst+1, true); return true; } - if ( event.param == VK_PRIOR ) // PageUp ? + if ( event.param == KEY(PAGEUP) ) // PageUp ? { Scroll(m_lineFirst-(m_lineVisible-1), true); return true; } - if ( event.param == VK_NEXT ) // PageDown ? + if ( event.param == KEY(PAGEDOWN) ) // PageDown ? { Scroll(m_lineFirst+(m_lineVisible-1), true); return true; } } - if ( event.param == VK_HOME ) + if ( event.param == KEY(HOME) ) { MoveHome(bControl, bShift); return true; } - if ( event.param == VK_END ) + if ( event.param == KEY(END) ) { MoveEnd(bControl, bShift); return true; } - if ( event.param == VK_BACK ) // backspace ( <- ) ? + if ( event.param == KEY(BACKSPACE) ) // backspace ( <- ) ? { Delete(-1); SendModifEvent(); return true; } - if ( event.param == VK_DELETE ) + if ( event.param == KEY(DELETE) ) { Delete(1); SendModifEvent(); return true; } - if ( event.param == VK_RETURN ) + if ( event.param == KEY(RETURN) ) { Insert('\n'); SendModifEvent(); return true; } - if ( event.param == VK_TAB ) + if ( event.param == KEY(TAB) ) { Insert('\t'); SendModifEvent(); @@ -461,7 +470,7 @@ bool CEdit::EventProcess(const Event &event) } } - if ( event.event == EVENT_CHAR && m_bFocus ) + if ( event.type == EVENT_ACTIVE && m_bFocus ) { if ( event.param >= ' ' && event.param <= 255 ) { @@ -471,9 +480,9 @@ bool CEdit::EventProcess(const Event &event) } } - if ( event.event == EVENT_FOCUS ) + if ( event.type == EVENT_ACTIVE ) { - if ( event.param == m_eventMsg ) + if ( event.param == m_eventType ) { m_bFocus = true; } @@ -483,7 +492,8 @@ bool CEdit::EventProcess(const Event &event) } } - if ( event.event == EVENT_LBUTTONDOWN ) + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1) { m_mouseFirstPos = event.pos; m_mouseLastPos = event.pos; @@ -502,18 +512,19 @@ bool CEdit::EventProcess(const Event &event) } } - if ( event.event == EVENT_MOUSEMOVE && m_bCapture ) + if ( event.type == EVENT_MOUSE_MOVE && m_bCapture ) { m_mouseLastPos = event.pos; MouseMove(event.pos); } - if ( event.event == EVENT_FRAME && m_bCapture ) + if ( event.type == EVENT_FRAME && m_bCapture ) { MouseMove(m_mouseLastPos); } - if ( event.event == EVENT_LBUTTONUP ) + if ( event.type == EVENT_MOUSE_BUTTON_UP && + event.mouseButton.button == 1) { if ( Detect(event.pos) ) { @@ -541,9 +552,9 @@ bool CEdit::EventProcess(const Event &event) void CEdit::SendModifEvent() { - Event newEvent; + Event newEvent (m_eventType); - m_event->MakeEvent(newEvent, m_eventMsg); +// m_event->MakeEvent(newEvent, m_eventType); m_event->AddEvent(newEvent); } @@ -560,7 +571,7 @@ bool CEdit::IsLinkPos(Math::Point pos) if ( i == -1 ) return false; if ( i >= m_len ) return false; - if ( (m_format[i]&COLOR_MASK) == COLOR_LINK ) return true; + if ( (m_format[i]& Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_LINK) return true; // TODO return false; } @@ -635,13 +646,13 @@ void CEdit::MouseRelease(Math::Point mouse) if ( !m_bEdit ) { if ( m_format != 0 && i < m_len && m_cursor1 == m_cursor2 && - (m_format[i]&COLOR_MASK) == COLOR_LINK ) + (m_format[i]&Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_LINK) //TODO { rank = -1; for ( j=0 ; j<=i ; j++ ) { - if ( (j == 0 || (m_format[j-1]&COLOR_MASK) != COLOR_LINK) && - (m_format[j+0]&COLOR_MASK) == COLOR_LINK ) + if ( (j == 0 || (m_format[j-1]&Gfx::FONT_MASK_HIGHLIGHT) != Gfx::FONT_HIGHLIGHT_LINK) && // TODO check if good + (m_format[j+0]&Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_LINK) // TODO { rank ++; } @@ -694,14 +705,14 @@ int CEdit::MouseDetect(Math::Point mouse) if ( m_bAutoIndent ) { - indentLength = m_engine->RetText()->RetCharWidth(' ', 0.0f, m_fontSize, m_fontStretch, m_fontType) - * m_engine->RetEditIndentValue(); + indentLength = m_engine->GetText()->GetCharWidth(static_cast(' '), m_fontType, m_fontSize, 0.0f) + * m_engine->GetEditIndentValue(); } pos.y = m_pos.y+m_dim.y-m_lineHeight-(m_bMulti?MARGY:MARGY1); for ( i=m_lineFirst ; i= m_lineFirst+m_lineVisible ) break; @@ -720,19 +731,21 @@ int CEdit::MouseDetect(Math::Point mouse) if ( m_format == 0 ) { - c = m_engine->RetText()->Detect(m_text+m_lineOffset[i], - len, offset, m_fontSize, - m_fontStretch, m_fontType); +// c = m_engine->GetText()->Detect(m_text+m_lineOffset[i], +// len, offset, m_fontSize, +// m_fontStretch, m_fontType); + c = m_engine->GetText()->Detect(m_text+m_lineOffset[i], m_fontType, m_fontSize, offset); // TODO check if good } else { size = m_fontSize; - if ( bTitle ) size *= BIG_FONT; + if ( bTitle ) size *= Gfx::FONT_SIZE_BIG; - c = m_engine->RetText()->Detect(m_text+m_lineOffset[i], - m_format+m_lineOffset[i], - len, offset, size, - m_fontStretch); +// c = m_engine->GetText()->Detect(m_text+m_lineOffset[i], +// m_format+m_lineOffset[i], +// len, offset, size, +// m_fontStretch); + c = m_engine->GetText()->Detect(m_text+m_lineOffset[i],m_format+m_lineOffset[i], size, offset); // TODO check if good } return m_lineOffset[i]+c; } @@ -827,7 +840,7 @@ bool CEdit::HyperAdd(char *filename, int firstLine) // Indicates whether a button EVENT_HYPER_ * is active or not. -bool CEdit::HyperTest(EventMsg event) +bool CEdit::HyperTest(EventType event) { if ( event == EVENT_HYPER_HOME ) { @@ -849,7 +862,7 @@ bool CEdit::HyperTest(EventMsg event) // Performs the action corresponding to a button EVENT_HYPER_ *. -bool CEdit::HyperGo(EventMsg event) +bool CEdit::HyperGo(EventType event) { if ( !HyperTest(event) ) return false; @@ -911,8 +924,8 @@ void CEdit::Draw() if ( m_bAutoIndent ) { - indentLength = m_engine->RetText()->RetCharWidth(' ', 0.0f, m_fontSize, m_fontStretch, m_fontType) - * m_engine->RetEditIndentValue(); + indentLength = m_engine->GetText()->GetCharWidth(static_cast(' '), m_fontType, m_fontSize, 0.0f) + * m_engine->GetEditIndentValue(); } pos.y = m_pos.y+m_dim.y-m_lineHeight-(m_bMulti?MARGY:MARGY1); @@ -933,7 +946,7 @@ void CEdit::Draw() for ( j=0 ; jRetText()->DrawText(&s, 1, pos, 1.0f, 1, m_fontSize, m_fontStretch, m_fontType, 0); + m_engine->GetText()->DrawText(&s, m_fontType, m_fontSize, pos, 1.0f, Gfx::TEXT_ALIGN_RIGHT, 0); pos.x += indentLength; } } @@ -946,7 +959,7 @@ void CEdit::Draw() // Headline \b;? if ( beg+len < m_len && m_format != 0 && - (m_format[beg]&TITLE_MASK) == TITLE_BIG ) + (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG ) { start.x = ppos.x-MARGX; end.x = dim.x-MARGX*2.0f; @@ -960,7 +973,7 @@ void CEdit::Draw() // As \t;? if ( beg+len < m_len && m_format != 0 && - (m_format[beg]&TITLE_MASK) == TITLE_NORM ) + (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_NORM ) { start.x = ppos.x-MARGX; end.x = dim.x-MARGX*2.0f; @@ -971,7 +984,7 @@ void CEdit::Draw() // Subtitle \s;? if ( beg+len < m_len && m_format != 0 && - (m_format[beg]&TITLE_MASK) == TITLE_LITTLE ) + (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_LITTLE ) { start.x = ppos.x-MARGX; end.x = dim.x-MARGX*2.0f; @@ -982,7 +995,7 @@ void CEdit::Draw() // Table \tab;? if ( beg+len < m_len && m_format != 0 && - (m_format[beg]&COLOR_MASK) == COLOR_TABLE ) + (m_format[beg]&Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_TABLE ) { start.x = ppos.x-MARGX; end.x = dim.x-MARGX*2.0f; @@ -993,21 +1006,21 @@ void CEdit::Draw() // Image \image; ? if ( beg+len < m_len && m_format != 0 && - (m_format[beg]&IMAGE_MASK) != 0 ) + (m_format[beg]&Gfx::FONT_MASK_IMAGE) != 0 ) { line = 1; while ( true ) // includes the image slices { if ( i+line >= m_lineTotal || i+line >= m_lineFirst+m_lineVisible || - (m_format[beg+line]&IMAGE_MASK) == 0 ) break; + (m_format[beg+line]&Gfx::FONT_MASK_IMAGE) == 0 ) break; line ++; } iIndex = m_text[beg]; // character = index in m_image pos.y -= m_lineHeight*(line-1); DrawImage(pos, m_image[iIndex].name, - m_image[iIndex].width*(m_fontSize/SMALLFONT), + m_image[iIndex].width*(m_fontSize/Gfx::FONT_SIZE_SMALL), m_image[iIndex].offset, m_image[iIndex].height*line, line); pos.y -= m_lineHeight; i += line-1; @@ -1023,18 +1036,18 @@ void CEdit::Draw() if ( m_format == 0 ) { - start.x = ppos.x+m_engine->RetText()->RetStringWidth(m_text+beg, o1-beg, size, m_fontStretch, m_fontType); - end.x = m_engine->RetText()->RetStringWidth(m_text+o1, o2-o1, size, m_fontStretch, m_fontType); + start.x = ppos.x+m_engine->GetText()->GetStringWidth(m_text+beg, m_fontType, size); + end.x = m_engine->GetText()->GetStringWidth(m_text+o1, m_fontType, size); } else { - start.x = ppos.x+m_engine->RetText()->RetStringWidth(m_text+beg, m_format+beg, o1-beg, size, m_fontStretch); - end.x = m_engine->RetText()->RetStringWidth(m_text+o1, m_format+o1, o2-o1, size, m_fontStretch); + start.x = ppos.x+m_engine->GetText()->GetStringWidth(m_text+beg, m_format+beg, size); + end.x = m_engine->GetText()->GetStringWidth(m_text+o1, m_format+o1, size); } start.y = ppos.y-(m_bMulti?0.0f:MARGY1); end.y = m_lineHeight; - if ( m_format != 0 && (m_format[beg]&TITLE_MASK) == TITLE_BIG ) end.y *= BIG_FONT; + if ( m_format != 0 && (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG) end.y *= BIG_FONT; DrawPart(start, end, 1); // plain yellow background } @@ -1051,11 +1064,11 @@ void CEdit::Draw() if ( !m_bMulti || !m_bDisplaySpec ) eol = 0; if ( m_format == 0 ) { - m_engine->RetText()->DrawText(m_text+beg, len, ppos, m_dim.x, 1, size, m_fontStretch, m_fontType, eol); + m_engine->GetText()->DrawText(m_text+beg, m_fontType, size, ppos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, eol); } else { - m_engine->RetText()->DrawText(m_text+beg, m_format+beg, len, ppos, m_dim.x, 1, size, m_fontStretch, eol); + m_engine->GetText()->DrawText(m_text+beg, m_format+beg, size, ppos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, eol); } pos.y -= m_lineHeight; @@ -1085,17 +1098,15 @@ void CEdit::Draw() if ( m_format == 0 ) { - m_engine->RetText()->DimText(m_text+m_lineOffset[i], len, - pos, 1, size, - m_fontStretch, m_fontType, + m_engine->GetText()->SizeText(m_text+m_lineOffset[i], m_fontType, + size, pos, Gfx::TEXT_ALIGN_RIGHT, start, end); } else { - m_engine->RetText()->DimText(m_text+m_lineOffset[i], + m_engine->GetText()->SizeText(m_text+m_lineOffset[i], m_format+m_lineOffset[i], - len, pos, 1, size, - m_fontStretch, + size, pos, Gfx::TEXT_ALIGN_RIGHT, start, end); } @@ -1104,8 +1115,8 @@ void CEdit::Draw() } pos.y -= m_lineHeight; } - pos.x -= 1.0f/640.0f; - dim.x = 2.0f/640.0f; + pos.x -= 1.0f / 640.0f; + dim.x = 2.0f / 640.0f; dim.y = m_lineHeight; DrawPart(pos, dim, 0); // red } @@ -1130,7 +1141,7 @@ void CEdit::DrawImage(Math::Point pos, char *name, float width, strcat(filename, ".bmp"); m_engine->SetTexture(filename); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f; uv2.x = 1.0f; @@ -1158,7 +1169,7 @@ void CEdit::DrawBack(Math::Point pos, Math::Point dim) if ( m_bGeneric ) return; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); if ( m_bMulti ) { @@ -1212,7 +1223,7 @@ void CEdit::DrawPart(Math::Point pos, Math::Point dim, int icon) #else m_engine->SetTexture("text.tga"); #endif - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = (16.0f/256.0f)*(icon%16); uv1.y = (240.0f/256.0f); @@ -1291,32 +1302,32 @@ void CEdit::SetText(char *text, bool bNew) { if ( text[i+1] == 'n' ) // normal ? { - font &= ~FONT_MASK; - font |= FONT_COLOBOT; + font &= ~Gfx::FONT_MASK_FONT; + font |= Gfx::FONT_COLOBOT; i += 2; } else if ( text[i+1] == 'c' ) // cbot ? { - font &= ~FONT_MASK; - font |= FONT_COURIER; + font &= ~Gfx::FONT_MASK_FONT; + font |= Gfx::FONT_COURIER; i += 2; } else if ( text[i+1] == 'b' ) // big title ? { - font &= ~TITLE_MASK; - font |= TITLE_BIG; + font &= ~Gfx::FONT_MASK_TITLE; + font |= Gfx::FONT_TITLE_BIG; i += 2; } else if ( text[i+1] == 't' ) // title ? { - font &= ~TITLE_MASK; - font |= TITLE_NORM; + font &= ~Gfx::FONT_MASK_TITLE; + font |= Gfx::FONT_TITLE_NORM; i += 2; } else if ( text[i+1] == 's' ) // subtitle ? { - font &= ~TITLE_MASK; - font |= TITLE_LITTLE; + font &= ~Gfx::FONT_MASK_TITLE; + font |= Gfx::FONT_TITLE_LITTLE; i += 2; } } @@ -1326,7 +1337,7 @@ void CEdit::SetText(char *text, bool bNew) m_format[j] = font; j ++; - font &= ~TITLE_MASK; // reset title + font &= ~Gfx::FONT_MASK_TITLE; // reset title } } m_len = j; @@ -1342,7 +1353,7 @@ void CEdit::SetText(char *text, bool bNew) // Returns a pointer to the edited text. -char* CEdit::RetText() +char* CEdit::GetText() { m_text[m_len] = 0; return m_text; @@ -1361,7 +1372,7 @@ void CEdit::GetText(char *buffer, int max) // Returns the length of the text. -int CEdit::RetTextLength() +int CEdit::GetTextLength() { return m_len; } @@ -1394,7 +1405,7 @@ void GetNameParam(char *cmd, int rank, char *buffer) // Returns a number of a command. // \x nom n1 n2; -int RetValueParam(char *cmd, int rank) +int GetValueParam(char *cmd, int rank) { int n, i; @@ -1423,7 +1434,7 @@ void CEdit::FreeImage() //? sprintf(filename, "diagram\\%s.bmp", m_image[i].name); UserDir(filename, m_image[i].name, "diagram"); strcat(filename, ".bmp"); - m_engine->FreeTexture(filename); + m_engine->DeleteTexture(filename); } } @@ -1467,14 +1478,14 @@ bool CEdit::ReadText(char *filename, int addSize) FreeImage(); delete m_text; - m_text = (char*)malloc(sizeof(char)*(m_maxChar+1)); - buffer = (char*)malloc(sizeof(char)*(m_maxChar+1)); + m_text = new char[sizeof(char)*(m_maxChar+1)]; + buffer = new char[sizeof(char)*(m_maxChar+1)]; fread(buffer, 1, len, file); if ( m_format != 0 ) { delete m_format; - m_format = (char*)malloc(sizeof(char)*m_maxChar); + m_format = new char[sizeof(char)*m_maxChar]; } fclose(file); @@ -1515,8 +1526,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~FONT_MASK; - font |= FONT_COLOBOT; + font &= ~Gfx::FONT_MASK_FONT; + font |= Gfx::FONT_COLOBOT; } i += 3; } @@ -1524,8 +1535,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~FONT_MASK; - font |= FONT_COURIER; + font &= ~Gfx::FONT_MASK_FONT; + font |= Gfx::FONT_COURIER; } i += 3; } @@ -1533,8 +1544,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~TITLE_MASK; - font |= TITLE_BIG; + font &= ~Gfx::FONT_MASK_TITLE; + font |= Gfx::FONT_TITLE_BIG; } i += 3; } @@ -1542,8 +1553,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~TITLE_MASK; - font |= TITLE_NORM; + font &= ~Gfx::FONT_MASK_TITLE; + font |= Gfx::FONT_TITLE_NORM; } i += 3; } @@ -1551,8 +1562,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~TITLE_MASK; - font |= TITLE_LITTLE; + font &= ~Gfx::FONT_MASK_TITLE; + font |= Gfx::FONT_TITLE_LITTLE; } i += 3; } @@ -1560,8 +1571,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~COLOR_MASK; - font |= COLOR_LINK; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; + font |= Gfx::FONT_HIGHLIGHT_LINK; } i += 3; } @@ -1583,7 +1594,7 @@ bool CEdit::ReadText(char *filename, int addSize) GetNameParam(buffer+i+3, 1, m_link[iLink].marker); iLink ++; } - font &= ~COLOR_MASK; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; } i += strchr(buffer+i, ';')-(buffer+i)+1; } @@ -1620,9 +1631,9 @@ bool CEdit::ReadText(char *filename, int addSize) GetNameParam(buffer+i+7, 0, iName); #endif //? iWidth = m_lineHeight*RetValueParam(buffer+i+7, 1); - iWidth = (float)RetValueParam(buffer+i+7, 1); - iWidth *= m_engine->RetText()->RetHeight(SMALLFONT, FONT_COLOBOT); - iLines = RetValueParam(buffer+i+7, 2); + iWidth = static_cast(GetValueParam(buffer+i+7, 1)); + iWidth *= m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL); + iLines = GetValueParam(buffer+i+7, 2); LoadImage(iName); // A part of image per line of text. @@ -1634,7 +1645,7 @@ bool CEdit::ReadText(char *filename, int addSize) m_image[iIndex].width = iWidth*0.75f; m_text[j] = (char)(iIndex++); // as an index into m_image - m_format[j] = (unsigned char)IMAGE_MASK; + m_format[j] = (unsigned char)Gfx::FONT_MASK_IMAGE; j ++; } } @@ -1652,8 +1663,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - m_text[j] = RetValueParam(buffer+i+8, 0); - m_format[j] = font|FONT_BUTTON; + m_text[j] = GetValueParam(buffer+i+8, 0); + m_format[j] = font|Gfx::FONT_BUTTON; j ++; } i += strchr(buffer+i, ';')-(buffer+i)+1; @@ -1669,8 +1680,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~COLOR_MASK; - font |= COLOR_TOKEN; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; + font |= Gfx::FONT_HIGHLIGHT_TOKEN; } i += 7; } @@ -1684,8 +1695,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~COLOR_MASK; - font |= COLOR_TYPE; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; + font |= Gfx::FONT_HIGHLIGHT_TYPE; } i += 6; } @@ -1700,8 +1711,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~COLOR_MASK; - font |= COLOR_CONST; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; + font |= Gfx::FONT_HIGHLIGHT_CONST; } i += 7; } @@ -1714,8 +1725,8 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~COLOR_MASK; - font |= COLOR_KEY; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; + font |= Gfx::FONT_HIGHLIGHT_KEY; } i += 5; } @@ -1728,7 +1739,7 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font |= COLOR_TABLE; + font |= Gfx::FONT_HIGHLIGHT_TABLE; } i += 5; } @@ -1742,7 +1753,7 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( m_bSoluce || !bInSoluce ) { - font &= ~COLOR_MASK; + font &= ~Gfx::FONT_MASK_HIGHLIGHT; } i += 6; } @@ -1775,7 +1786,7 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( SearchKey(buffer+i+5, key) ) { - res = m_engine->RetKey(key, 0); + res = m_engine->GetKey(key, 0); // TODO if ( res != 0 ) { if ( GetResource(RES_KEY, res, iName) ) @@ -1794,7 +1805,7 @@ bool CEdit::ReadText(char *filename, int addSize) m_format[j] = font; j ++; - res = m_engine->RetKey(key, 1); + res = m_engine->GetKey(key, 1); // TODO if ( res != 0 ) { if ( GetResource(RES_KEY, res, iName) ) @@ -1804,7 +1815,7 @@ bool CEdit::ReadText(char *filename, int addSize) while ( text[n] != 0 ) { m_text[j] = text[n++]; - m_format[j] = font&~COLOR_MASK; + m_format[j] = font&~Gfx::FONT_MASK_HIGHLIGHT; j ++; } n = 0; @@ -1840,11 +1851,11 @@ bool CEdit::ReadText(char *filename, int addSize) } i ++; - font &= ~TITLE_MASK; // reset title + font &= ~Gfx::FONT_MASK_TITLE; // reset title - if ( (font&COLOR_MASK) == COLOR_TABLE ) + if ( (font&Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_TABLE ) { - font &= ~COLOR_TABLE; + font &= ~Gfx::FONT_HIGHLIGHT_TABLE; } } } @@ -1945,7 +1956,7 @@ void CEdit::SetMaxChar(int max) UndoFlush(); } -int CEdit::RetMaxChar() +int CEdit::GetMaxChar() { return m_maxChar; } @@ -1958,7 +1969,7 @@ void CEdit::SetEditCap(bool bMode) m_bEdit = bMode; } -bool CEdit::RetEditCap() +bool CEdit::GetEditCap() { return m_bEdit; } @@ -1970,7 +1981,7 @@ void CEdit::SetHiliteCap(bool bEnable) m_bHilite = bEnable; } -bool CEdit::RetHiliteCap() +bool CEdit::GetHiliteCap() { return m_bHilite; } @@ -1982,7 +1993,7 @@ void CEdit::SetInsideScroll(bool bInside) m_bInsideScroll = bInside; } -bool CEdit::RetInsideScroll() +bool CEdit::GetInsideScroll() { return m_bInsideScroll; } @@ -1994,7 +2005,7 @@ void CEdit::SetSoluceMode(bool bSoluce) m_bSoluce = bSoluce; } -bool CEdit::RetSoluceMode() +bool CEdit::GetSoluceMode() { return m_bSoluce; } @@ -2006,7 +2017,7 @@ void CEdit::SetGenericMode(bool bGeneric) m_bGeneric = bGeneric; } -bool CEdit::RetGenericMode() +bool CEdit::GetGenericMode() { return m_bGeneric; } @@ -2019,7 +2030,7 @@ void CEdit::SetAutoIndent(bool bMode) m_bAutoIndent = bMode; } -bool CEdit::RetAutoIndent() +bool CEdit::GetAutoIndent() { return m_bAutoIndent; } @@ -2057,7 +2068,7 @@ void CEdit::SetFirstLine(int rank) // Returns the first displayed line. -int CEdit::RetFirstLine() +int CEdit::GetFirstLine() { if ( m_historyTotal > 0 ) { @@ -2091,7 +2102,7 @@ void CEdit::ShowSelect() cursor2 = m_cursor1; } - line = RetCursorLine(cursor2); + line = GetCursorLine(cursor2); if ( line >= m_lineFirst+m_lineVisible ) { line -= m_lineVisible-1; @@ -2099,7 +2110,7 @@ void CEdit::ShowSelect() Scroll(line, false); } - line = RetCursorLine(cursor1); + line = GetCursorLine(cursor1); if ( line < m_lineFirst ) { Scroll(line, false); @@ -2114,7 +2125,7 @@ void CEdit::SetDisplaySpec(bool bDisplay) m_bDisplaySpec = bDisplay; } -bool CEdit::RetDisplaySpec() +bool CEdit::GetDisplaySpec() { return m_bDisplaySpec; } @@ -2137,7 +2148,7 @@ void CEdit::SetMultiFont(bool bMulti) } } -bool CEdit::RetMultiFont() +bool CEdit::GetMultiFont() { return ( m_format != 0 ); } @@ -2161,7 +2172,7 @@ void CEdit::Scroll() if ( m_scroll != 0 ) { - value = m_scroll->RetVisibleValue(); + value = m_scroll->GetVisibleValue(); value *= m_lineTotal-m_lineVisible; Scroll((int)(value+0.5f), true); } @@ -2181,7 +2192,7 @@ void CEdit::Scroll(int pos, bool bAdjustCursor) if ( max < 0 ) max = 0; if ( m_lineFirst > max ) m_lineFirst = max; - line = RetCursorLine(m_cursor1); + line = GetCursorLine(m_cursor1); if ( bAdjustCursor && m_bEdit ) { @@ -2418,29 +2429,28 @@ void CEdit::MoveLine(int move, bool bWord, bool bSelect) } } - line = RetCursorLine(m_cursor1); + line = GetCursorLine(m_cursor1); column = m_column; if ( m_bAutoIndent ) { - indentLength = m_engine->RetText()->RetCharWidth(' ', 0.0f, m_fontSize, m_fontStretch, m_fontType) - * m_engine->RetEditIndentValue(); + indentLength = m_engine->GetText()->GetCharWidth(static_cast(' '), m_fontType, m_fontSize, 0.0f) + * m_engine->GetEditIndentValue(); column -= indentLength*m_lineIndent[line]; } if ( m_format == 0 ) { - c = m_engine->RetText()->Detect(m_text+m_lineOffset[line], - m_lineOffset[line+1]-m_lineOffset[line], - column, m_fontSize, - m_fontStretch, m_fontType); + c = m_engine->GetText()->Detect(m_text+m_lineOffset[line], + m_fontType, m_fontSize, + m_lineOffset[line+1]-m_lineOffset[line]); } else { - c = m_engine->RetText()->Detect(m_text+m_lineOffset[line], + c = m_engine->GetText()->Detect(m_text+m_lineOffset[line], m_format+m_lineOffset[line], - m_lineOffset[line+1]-m_lineOffset[line], - column, m_fontSize, m_fontStretch); + m_fontSize, + m_lineOffset[line+1]-m_lineOffset[line]); } m_cursor1 = m_lineOffset[line]+c; @@ -2457,32 +2467,27 @@ void CEdit::ColumnFix() float indentLength; int line; - line = RetCursorLine(m_cursor1); + line = GetCursorLine(m_cursor1); if ( m_format == 0 ) { - m_column = m_engine->RetText()->RetStringWidth - ( + m_column = m_engine->GetText()->GetStringWidth( m_text+m_lineOffset[line], - m_cursor1-m_lineOffset[line], - m_fontSize, m_fontStretch, m_fontType - ); + m_fontType, m_fontSize); } else { - m_column = m_engine->RetText()->RetStringWidth - ( + m_column = m_engine->GetText()->GetStringWidth( m_text+m_lineOffset[line], m_format+m_lineOffset[line], - m_cursor1-m_lineOffset[line], - m_fontSize, m_fontStretch + m_fontSize ); } if ( m_bAutoIndent ) { - indentLength = m_engine->RetText()->RetCharWidth(' ', 0.0f, m_fontSize, m_fontStretch, m_fontType) - * m_engine->RetEditIndentValue(); + indentLength = m_engine->GetText()->GetCharWidth(static_cast(' '), m_fontType, m_fontSize, 0.0f) + * m_engine->GetEditIndentValue(); m_column += indentLength*m_lineIndent[line]; } } @@ -2490,7 +2495,7 @@ void CEdit::ColumnFix() // Cut the selected characters or entire line. -bool CEdit::Cut() +bool CEdit::Cut() // TODO MS Windows allocations { HGLOBAL hg; char* text; @@ -2571,7 +2576,7 @@ bool CEdit::Cut() // Copy the selected characters or entire line. -bool CEdit::Copy() +bool CEdit::Copy() // TODO { HGLOBAL hg; char* text; @@ -2643,7 +2648,7 @@ bool CEdit::Copy() // Paste the contents of the notebook. -bool CEdit::Paste() +bool CEdit::Paste() // TODO { HANDLE h; char c; @@ -2777,7 +2782,7 @@ void CEdit::Insert(char character) #endif else if ( character == '\t' ) { - for ( i=0 ; iRetEditIndentValue() ; i++ ) + for ( i=0 ; iGetEditIndentValue() ; i++ ) { InsertOne(' '); } @@ -3025,8 +3030,8 @@ bool CEdit::MinMaj(bool bMaj) for ( i=c1 ; iRetText()->RetCharWidth(' ', 0.0f, m_fontSize, m_fontStretch, m_fontType) - * m_engine->RetEditIndentValue(); + indentLength = m_engine->GetText()->GetCharWidth(static_cast(' '), m_fontType, m_fontSize, 0.0f) + * m_engine->GetEditIndentValue(); } bString = bRem = false; @@ -3071,29 +3076,29 @@ void CEdit::Justif() if ( m_format == 0 ) { - i += m_engine->RetText()->Justif(m_text+i, m_len-i, width, - m_fontSize, m_fontStretch, - m_fontType); + // TODO check if good + i += m_engine->GetText()->Justify(m_text+i, m_fontType, + m_fontSize, width); } else { size = m_fontSize; - if ( (m_format[i]&TITLE_MASK) == TITLE_BIG ) // headline? + if ( (m_format[i]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG ) // headline? { size *= BIG_FONT; bDual = true; } - if ( (m_format[i]&IMAGE_MASK) != 0 ) // image part? + if ( (m_format[i]&Gfx::FONT_MASK_IMAGE) != 0 ) // image part? { i ++; // jumps just a character (index in m_image) } else { - i += m_engine->RetText()->Justif(m_text+i, m_format+i, - m_len-i, width, - size, m_fontStretch); + // TODO check if good + i += m_engine->GetText()->Justify(m_text+i, m_format+i, + size, width); } } @@ -3149,7 +3154,7 @@ void CEdit::Justif() { if ( m_bEdit ) { - line = RetCursorLine(m_cursor1); + line = GetCursorLine(m_cursor1); if ( line < m_lineFirst ) { m_lineFirst = line; @@ -3175,13 +3180,13 @@ void CEdit::Justif() } else { - value = (float)m_lineVisible/m_lineTotal; + value = static_cast(m_lineVisible/m_lineTotal); m_scroll->SetVisibleRatio(value); - value = (float)m_lineFirst/(m_lineTotal-m_lineVisible); + value = static_cast(m_lineFirst/(m_lineTotal-m_lineVisible)); m_scroll->SetVisibleValue(value); - value = (float)1.0f/(m_lineTotal-m_lineVisible); + value = static_cast(1.0f/(m_lineTotal-m_lineVisible)); m_scroll->SetArrowStep(value); } } @@ -3191,7 +3196,7 @@ void CEdit::Justif() // Returns the rank of the line where the cursor is located. -int CEdit::RetCursorLine(int cursor) +int CEdit::GetCursorLine(int cursor) { int line, i; @@ -3314,3 +3319,4 @@ bool CEdit::SetFormat(int cursor1, int cursor2, int format) } +} diff --git a/src/ui/edit.h b/src/ui/edit.h index dbd94d1..99ec693 100644 --- a/src/ui/edit.h +++ b/src/ui/edit.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -14,69 +15,99 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// edit.h + +/** + * \file ui/edit.h + * \brief CEdit class + */ #pragma once -#include "common/struct.h" +//#include "common/struct.h" #include "ui/control.h" +namespace Gfx{ +class CEngine; +}; -class CD3DEngine; +namespace Ui { class CScroll; +//! maximum number of characters in CBOT edit +const int EDITSTUDIOMAX = 20000; +//! maximum total number of lines +const int EDITLINEMAX = 1000; +//! maximum total number of lines with images +const int EDITIMAGEMAX = 50; +//! maximum number of links +const int EDITLINKMAX = 100; +//! max number of levels preserves +const int EDITHISTORYMAX = 50; -const int EDITSTUDIOMAX = 20000; // maximum number of characters in CBOT edit -const int EDITLINEMAX = 1000; // maximum total number of lines -const int EDITIMAGEMAX = 50; // maximum total number of lines with images -const int EDITLINKMAX = 100; // maximum number of links -const int EDITHISTORYMAX = 50; // max number of levels preserves - -const int EDITUNDOMAX = 20; // max number of successive undo +//! max number of successive undo +const int EDITUNDOMAX = 20; struct EditUndo { - char* text; // original text - int len; // length of the text - int cursor1; // offset cursor - int cursor2; // offset cursor - int lineFirst; // the first line displayed. + //! original text + char* text; + //! length of the text + int len; + //! offset cursor + int cursor1; + //! offset cursor + int cursor2; + //! the first line displayed. + int lineFirst; }; enum OperUndo { - OPERUNDO_SPEC = 0, // special operation - OPERUNDO_INSERT = 1, // inserting characters - OPERUNDO_DELETE = 2, // deleting characters + //! special operation + OPERUNDO_SPEC = 0, + //! inserting characters + OPERUNDO_INSERT = 1, + //! deleting characters + OPERUNDO_DELETE = 2, }; struct ImageLine { - char name[40]; // name of the image (without diagram \) - float offset; // vertical offset (v texture) - float height; // height of the part (dv texture) - float width; // width + //! name of the image (without diagram \) + char name[40]; + //! vertical offset (v texture) + float offset; + //! height of the part (dv texture) + float height; + //! width + float width; }; struct HyperLink { - char name[40]; // text file name (without help \) - char marker[20]; // name of the marker + //! text file name (without help \) + char name[40]; + //! name of the marker + char marker[20]; }; struct HyperMarker { - char name[20]; // name of the marker - int pos; // position in the text + //! name of the marker + char name[20]; + //! position in the text + int pos; }; struct HyperHistory { - char filename[50]; // full file name text - int firstLine; // rank of the first displayed line + //! full file name text + char filename[50]; + //! rank of the first displayed line + int firstLine; }; @@ -85,10 +116,11 @@ struct HyperHistory class CEdit : public CControl { public: - CEdit(CInstanceManager* iMan); +// CEdit(CInstanceManager* iMan); + CEdit (); virtual ~CEdit(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); void SetPos(Math::Point pos); void SetDim(Math::Point dim); @@ -98,45 +130,45 @@ public: void SetText(char *text, bool bNew=true); void GetText(char *buffer, int max); - char* RetText(); - int RetTextLength(); + char* GetText(); + int GetTextLength(); bool ReadText(char *filename, int addSize=0); bool WriteText(char *filename); void SetMaxChar(int max); - int RetMaxChar(); + int GetMaxChar(); void SetEditCap(bool bMode); - bool RetEditCap(); + bool GetEditCap(); void SetHiliteCap(bool bEnable); - bool RetHiliteCap(); + bool GetHiliteCap(); void SetInsideScroll(bool bInside); - bool RetInsideScroll(); + bool GetInsideScroll(); void SetSoluceMode(bool bSoluce); - bool RetSoluceMode(); + bool GetSoluceMode(); void SetGenericMode(bool bGeneric); - bool RetGenericMode(); + bool GetGenericMode(); void SetAutoIndent(bool bMode); - bool RetAutoIndent(); + bool GetAutoIndent(); void SetCursor(int cursor1, int cursor2); void GetCursor(int &cursor1, int &cursor2); void SetFirstLine(int rank); - int RetFirstLine(); + int GetFirstLine(); void ShowSelect(); void SetDisplaySpec(bool bDisplay); - bool RetDisplaySpec(); + bool GetDisplaySpec(); void SetMultiFont(bool bMulti); - bool RetMultiFont(); + bool GetMultiFont(); bool Cut(); bool Copy(); @@ -145,8 +177,8 @@ public: void HyperFlush(); void HyperHome(char *filename); - bool HyperTest(EventMsg event); - bool HyperGo(EventMsg event); + bool HyperTest(EventType event); + bool HyperGo(EventType event); void SetFontSize(float size); @@ -189,7 +221,7 @@ protected: bool Shift(bool bLeft); bool MinMaj(bool bMaj); void Justif(); - int RetCursorLine(int cursor); + int GetCursorLine(int cursor); void UndoFlush(); void UndoMemorize(OperUndo oper); @@ -246,3 +278,4 @@ protected: }; +} diff --git a/src/ui/editvalue.cpp b/src/ui/editvalue.cpp index 71e06f2..f747c94 100644 --- a/src/ui/editvalue.cpp +++ b/src/ui/editvalue.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,13 +18,13 @@ // editvalue.cpp -#include -#include -#include +//#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -33,10 +34,11 @@ - +namespace Ui { // Object's constructor. -CEditValue::CEditValue(CInstanceManager* iMan) : CControl(iMan) +//CEditValue::CEditValue(CInstanceManager* iMan) : CControl(iMan) +CEditValue::CEditValue() : CControl () { m_edit = 0; m_buttonUp = 0; @@ -60,28 +62,28 @@ CEditValue::~CEditValue() // Creates a new button. -bool CEditValue::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CEditValue::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - CEdit* pe; - CButton* pc; + Ui::CEdit* pe; + Ui::CButton* pc; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); - CControl::Create(pos, dim, icon, eventMsg); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); + CControl::Create(pos, dim, icon, eventType); GlintDelete(); - m_edit = new CEdit(m_iMan); - pe = (CEdit*)m_edit; + m_edit = new Ui::CEdit(); + pe = static_cast(m_edit); pe->Create(pos, dim, 0, EVENT_NULL); pe->SetMaxChar(4); - m_buttonUp = new CButton(m_iMan); - pc = (CButton*)m_buttonUp; + m_buttonUp = new Ui::CButton(); + pc = static_cast(m_buttonUp); pc->Create(pos, dim, 49, EVENT_NULL); // ^ pc->SetRepeat(true); - m_buttonDown = new CButton(m_iMan); - pc = (CButton*)m_buttonDown; + m_buttonDown = new Ui::CButton(); + pc = static_cast(m_buttonDown); pc->Create(pos, dim, 50, EVENT_NULL); // v pc->SetRepeat(true); @@ -151,11 +153,11 @@ bool CEditValue::EventProcess(const Event &event) if ( m_edit != 0 ) { - if ( m_edit->RetFocus() && - event.event == EVENT_KEYDOWN && - event.param == VK_RETURN ) + if ( m_edit->GetFocus() && + event.type == EVENT_KEY_DOWN && + event.param == KEY(RETURN) ) { - value = RetValue(); + value = GetValue(); if ( value > m_maxValue ) value = m_maxValue; if ( value < m_minValue ) value = m_minValue; SetValue(value, true); @@ -163,19 +165,18 @@ bool CEditValue::EventProcess(const Event &event) } if ( !m_edit->EventProcess(event) ) return false; - if ( event.event == m_edit->RetEventMsg() ) + if ( event.type == m_edit->GetEventType() ) { - Event newEvent; - m_event->MakeEvent(newEvent, m_eventMsg); + Event newEvent(m_eventType); m_event->AddEvent(newEvent); } } if ( m_buttonUp != 0 ) { - if ( event.event == m_buttonUp->RetEventMsg() ) + if ( event.type == m_buttonUp->GetEventType() ) { - value = RetValue()+m_stepValue; + value = GetValue()+m_stepValue; if ( value > m_maxValue ) value = m_maxValue; SetValue(value, true); HiliteValue(event); @@ -185,9 +186,9 @@ bool CEditValue::EventProcess(const Event &event) if ( m_buttonDown != 0 ) { - if ( event.event == m_buttonDown->RetEventMsg() ) + if ( event.type == m_buttonDown->GetEventType() ) { - value = RetValue()-m_stepValue; + value = GetValue()-m_stepValue; if ( value < m_minValue ) value = m_minValue; SetValue(value, true); HiliteValue(event); @@ -195,20 +196,20 @@ bool CEditValue::EventProcess(const Event &event) if ( !m_buttonDown->EventProcess(event) ) return false; } - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELUP && + if ( event.type == EVENT_KEY_DOWN && + event.mouseButton.button == 4 && Detect(event.pos) ) { - value = RetValue()+m_stepValue; + value = GetValue()+m_stepValue; if ( value > m_maxValue ) value = m_maxValue; SetValue(value, true); HiliteValue(event); } - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELDOWN && + if ( event.type == EVENT_KEY_DOWN && + event.mouseButton.button == 5 && Detect(event.pos) ) { - value = RetValue()-m_stepValue; + value = GetValue()-m_stepValue; if ( value < m_minValue ) value = m_minValue; SetValue(value, true); HiliteValue(event); @@ -226,7 +227,7 @@ void CEditValue::HiliteValue(const Event &event) if ( m_edit == 0 ) return; - pos = m_edit->RetTextLength(); + pos = m_edit->GetTextLength(); if ( m_type == EVT_100 && pos > 0 ) { pos --; // not only selects the "%" @@ -236,8 +237,9 @@ void CEditValue::HiliteValue(const Event &event) m_edit->SetFocus(true); Event newEvent = event; - newEvent.event = EVENT_FOCUS; - newEvent.param = m_edit->RetEventMsg(); + newEvent.type = EVENT_ACTIVE; + newEvent.active.gain = true; // TODO not much pretty sure about it + newEvent.param = m_edit->GetEventType(); m_event->AddEvent(newEvent); // defocus the other objects } @@ -275,7 +277,7 @@ void CEditValue::SetType(EditValueType type) m_type = type; } -EditValueType CEditValue::RetType() +EditValueType CEditValue::GetType() { return m_type; } @@ -310,15 +312,14 @@ void CEditValue::SetValue(float value, bool bSendMessage) if ( bSendMessage ) { - Event newEvent; - m_event->MakeEvent(newEvent, m_eventMsg); + Event newEvent(m_eventType); m_event->AddEvent(newEvent); } } // Return the edited value. -float CEditValue::RetValue() +float CEditValue::GetValue() { char text[100]; float value; @@ -345,7 +346,7 @@ void CEditValue::SetStepValue(float value) m_stepValue = value; } -float CEditValue::RetStepValue() +float CEditValue::GetStepValue() { return m_stepValue; } @@ -358,7 +359,7 @@ void CEditValue::SetMinValue(float value) m_minValue = value; } -float CEditValue::RetMinValue() +float CEditValue::GetMinValue() { return m_minValue; } @@ -371,8 +372,9 @@ void CEditValue::SetMaxValue(float value) m_maxValue = value; } -float CEditValue::RetMaxValue() +float CEditValue::GetMaxValue() { return m_maxValue; } +} diff --git a/src/ui/editvalue.h b/src/ui/editvalue.h index dbb7812..c5c857c 100644 --- a/src/ui/editvalue.h +++ b/src/ui/editvalue.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -22,6 +23,12 @@ #include "ui/control.h" +namespace Gfx{ +class CEngine; +} + +namespace Ui { + enum EditValueType { EVT_INT = 1, // integer @@ -29,8 +36,6 @@ enum EditValueType EVT_100 = 3, // percent (0 .. 1) }; - -class CD3DEngine; class CEdit; class CButton; @@ -39,10 +44,11 @@ class CButton; class CEditValue : public CControl { public: - CEditValue(CInstanceManager* iMan); +// CEditValue(CInstanceManager* iMan); + CEditValue(); virtual ~CEditValue(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); void SetPos(Math::Point pos); void SetDim(Math::Point dim); @@ -51,28 +57,28 @@ public: void Draw(); void SetType(EditValueType type); - EditValueType RetType(); + EditValueType GetType(); void SetValue(float value, bool bSendMessage=false); - float RetValue(); + float GetValue(); void SetStepValue(float value); - float RetStepValue(); + float GetStepValue(); void SetMinValue(float value); - float RetMinValue(); + float GetMinValue(); void SetMaxValue(float value); - float RetMaxValue(); + float GetMaxValue(); protected: void MoveAdjust(); void HiliteValue(const Event &event); protected: - CEdit* m_edit; - CButton* m_buttonUp; - CButton* m_buttonDown; + Ui::CEdit* m_edit; + Ui::CButton* m_buttonUp; + Ui::CButton* m_buttonDown; EditValueType m_type; float m_stepValue; @@ -81,3 +87,4 @@ protected: }; +} -- cgit v1.2.3-1-g7c22 From bd9c581cedc3833fd9af4f5caee744090b31c8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 21:22:24 +0200 Subject: added ui/window.* -- not fully ported --- src/ui/window.cpp | 257 +++++++++++++++++++++++++++++------------------------- src/ui/window.h | 31 ++++--- 2 files changed, 155 insertions(+), 133 deletions(-) diff --git a/src/ui/window.cpp b/src/ui/window.cpp index 8866643..fabd9c4 100644 --- a/src/ui/window.cpp +++ b/src/ui/window.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,14 +18,14 @@ // window.cpp -#include -#include -#include +//#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" #include "common/language.h" -#include "old/math3d.h" +//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/restext.h" @@ -46,15 +47,17 @@ #include "ui/gauge.h" #include "ui/compass.h" #include "ui/target.h" -#include "old/text.h" +//#include "old/text.h" +#include "graphics/engine/text.h" #include "ui/window.h" - +namespace Ui { // Object's constructor. -CWindow::CWindow(CInstanceManager* iMan) : CControl(iMan) +//CWindow::CWindow(CInstanceManager* iMan) : CControl(iMan) +CWindow::CWindow() : CControl() { int i; @@ -80,7 +83,7 @@ CWindow::CWindow(CInstanceManager* iMan) : CControl(iMan) m_bClosable = false; m_bCapture = false; - m_fontStretch = NORMSTRETCH*1.2f; +// m_fontStretch = NORMSTRETCH*1.2f; } // Object's destructor. @@ -128,9 +131,9 @@ void CWindow::Flush() // Creates a new window. -bool CWindow::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CWindow::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); return true; @@ -139,18 +142,19 @@ bool CWindow::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventM // Creates a new button. -CButton* CWindow::CreateButton(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CButton* CWindow::CreateButton(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CButton* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -161,18 +165,19 @@ CButton* CWindow::CreateButton(Math::Point pos, Math::Point dim, int icon, Event // Creates a new button. -CColor* CWindow::CreateColor(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CColor* CWindow::CreateColor(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CColor* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -183,18 +188,19 @@ CColor* CWindow::CreateColor(Math::Point pos, Math::Point dim, int icon, EventMs // Creates a new button. -CCheck* CWindow::CreateCheck(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CCheck* CWindow::CreateCheck(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CCheck* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -205,18 +211,19 @@ CCheck* CWindow::CreateCheck(Math::Point pos, Math::Point dim, int icon, EventMs // Creates a new button. -CKey* CWindow::CreateKey(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CKey* CWindow::CreateKey(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CKey* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -227,18 +234,19 @@ CKey* CWindow::CreateKey(Math::Point pos, Math::Point dim, int icon, EventMsg ev // Creates a new button. -CGroup* CWindow::CreateGroup(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CGroup* CWindow::CreateGroup(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CGroup* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -249,18 +257,19 @@ CGroup* CWindow::CreateGroup(Math::Point pos, Math::Point dim, int icon, EventMs // Creates a new button. -CImage* CWindow::CreateImage(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CImage* CWindow::CreateImage(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CImage* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -271,20 +280,21 @@ CImage* CWindow::CreateImage(Math::Point pos, Math::Point dim, int icon, EventMs // Creates a new label. -CLabel* CWindow::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, +CLabel* CWindow::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, char *name) { CLabel* pc; char* p; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); @@ -312,18 +322,19 @@ CLabel* CWindow::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventMs // Creates a new editable pave. -CEdit* CWindow::CreateEdit(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CEdit* CWindow::CreateEdit(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CEdit* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -334,18 +345,19 @@ CEdit* CWindow::CreateEdit(Math::Point pos, Math::Point dim, int icon, EventMsg // Creates a new editable pave. -CEditValue* CWindow::CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CEditValue* CWindow::CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CEditValue* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -356,18 +368,19 @@ CEditValue* CWindow::CreateEditValue(Math::Point pos, Math::Point dim, int icon, // Creates a new elevator. -CScroll* CWindow::CreateScroll(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CScroll* CWindow::CreateScroll(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CScroll* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -378,18 +391,19 @@ CScroll* CWindow::CreateScroll(Math::Point pos, Math::Point dim, int icon, Event // Creates a new cursor. -CSlider* CWindow::CreateSlider(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CSlider* CWindow::CreateSlider(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CSlider* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -400,19 +414,20 @@ CSlider* CWindow::CreateSlider(Math::Point pos, Math::Point dim, int icon, Event // Creates a new list. -CList* CWindow::CreateList(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg, +CList* CWindow::CreateList(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand) { CList* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg, expand); return pc; @@ -423,18 +438,18 @@ CList* CWindow::CreateList(Math::Point pos, Math::Point dim, int icon, EventMsg // Creates a new shortcut. -CShortcut* CWindow::CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CShortcut* CWindow::CreateShortcut(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CShortcut* ps; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return ps; @@ -445,18 +460,18 @@ CShortcut* CWindow::CreateShortcut(Math::Point pos, Math::Point dim, int icon, E // Creates a new card. -CMap* CWindow::CreateMap(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CMap* CWindow::CreateMap(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CMap* pm; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pm; @@ -467,18 +482,18 @@ CMap* CWindow::CreateMap(Math::Point pos, Math::Point dim, int icon, EventMsg ev // Creates a new gauge. -CGauge* CWindow::CreateGauge(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CGauge* CWindow::CreateGauge(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CGauge* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -489,18 +504,18 @@ CGauge* CWindow::CreateGauge(Math::Point pos, Math::Point dim, int icon, EventMs // Creates a new compass. -CCompass* CWindow::CreateCompass(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CCompass* CWindow::CreateCompass(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CCompass* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -511,18 +526,18 @@ CCompass* CWindow::CreateCompass(Math::Point pos, Math::Point dim, int icon, Eve // Creates a new target. -CTarget* CWindow::CreateTarget(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +CTarget* CWindow::CreateTarget(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CTarget* pc; int i; - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); for ( i=0 ; iCreate(pos, dim, icon, eventMsg); return pc; @@ -533,7 +548,7 @@ CTarget* CWindow::CreateTarget(Math::Point pos, Math::Point dim, int icon, Event // Removes a control. -bool CWindow::DeleteControl(EventMsg eventMsg) +bool CWindow::DeleteControl(EventType eventMsg) { int i; @@ -541,7 +556,7 @@ bool CWindow::DeleteControl(EventMsg eventMsg) { if ( m_table[i] != 0 ) { - if ( eventMsg == m_table[i]->RetEventMsg() ) + if ( eventMsg == m_table[i]->GetEventType() ) { delete m_table[i]; m_table[i] = 0; @@ -554,7 +569,7 @@ bool CWindow::DeleteControl(EventMsg eventMsg) // Gives a control. -CControl* CWindow::SearchControl(EventMsg eventMsg) +CControl* CWindow::SearchControl(EventType eventMsg) { int i; @@ -562,7 +577,7 @@ CControl* CWindow::SearchControl(EventMsg eventMsg) { if ( m_table[i] != 0 ) { - if ( eventMsg == m_table[i]->RetEventMsg() ) + if ( eventMsg == m_table[i]->GetEventType() ) { return m_table[i]; } @@ -646,11 +661,11 @@ void CWindow::SetName(char* name) if ( m_name[0] != 0 && m_bRedim ) // title bar exists? { - m_buttonReduce = new CButton(m_iMan); + m_buttonReduce = new CButton(); pc = (CButton*)m_buttonReduce; pc->Create(m_pos, m_dim, 0, EVENT_NULL); - m_buttonFull = new CButton(m_iMan); + m_buttonFull = new CButton(); pc = (CButton*)m_buttonFull; pc->Create(m_pos, m_dim, 0, EVENT_NULL); @@ -659,7 +674,7 @@ void CWindow::SetName(char* name) if ( m_name[0] != 0 && m_bClosable ) // title bar exists? { - m_buttonClose = new CButton(m_iMan); + m_buttonClose = new CButton(); pc = (CButton*)m_buttonClose; pc->Create(m_pos, m_dim, 0, EVENT_NULL); @@ -697,7 +712,7 @@ void CWindow::MoveAdjust() Math::Point pos, dim; float h, offset; - h = m_engine->RetText()->RetHeight(m_fontSize, m_fontType); + h = m_engine->GetText()->GetHeight(m_fontType, m_fontSize); dim.y = h*1.2f; dim.x = dim.y*0.75f; @@ -742,12 +757,12 @@ void CWindow::SetMaxDim(Math::Point dim) m_maxDim = dim; } -Math::Point CWindow::RetMinDim() +Math::Point CWindow::GetMinDim() { return m_minDim; } -Math::Point CWindow::RetMaxDim() +Math::Point CWindow::GetMaxDim() { return m_maxDim; } @@ -760,7 +775,7 @@ void CWindow::SetMovable(bool bMode) m_bMovable = bMode; } -bool CWindow::RetMovable() +bool CWindow::GetMovable() { return m_bMovable; } @@ -773,7 +788,7 @@ void CWindow::SetRedim(bool bMode) m_bRedim = bMode; } -bool CWindow::RetRedim() +bool CWindow::GetRedim() { return m_bRedim; } @@ -786,7 +801,7 @@ void CWindow::SetClosable(bool bMode) m_bClosable = bMode; } -bool CWindow::RetClosable() +bool CWindow::GetClosable() { return m_bClosable; } @@ -798,7 +813,7 @@ void CWindow::SetMaximized(bool bMaxi) AdjustButtons(); } -bool CWindow::RetMaximized() +bool CWindow::GetMaximized() { return m_bMaximized; } @@ -809,7 +824,7 @@ void CWindow::SetMinimized(bool bMini) AdjustButtons(); } -bool CWindow::RetMinimized() +bool CWindow::GetMinimized() { return m_bMinimized; } @@ -819,7 +834,7 @@ void CWindow::SetFixed(bool bFix) m_bFixed = bFix; } -bool CWindow::RetFixed() +bool CWindow::GetFixed() { return m_bFixed; } @@ -877,7 +892,7 @@ void CWindow::SetTrashEvent(bool bTrash) m_bTrashEvent = bTrash; } -bool CWindow::RetTrashEvent() +bool CWindow::GetTrashEvent() { return m_bTrashEvent; } @@ -885,26 +900,26 @@ bool CWindow::RetTrashEvent() // Returns the message from the button "reduce". -EventMsg CWindow::RetEventMsgReduce() +EventType CWindow::GetEventTypeReduce() { if ( m_buttonReduce == 0 ) return EVENT_NULL; - return m_buttonReduce->RetEventMsg(); + return m_buttonReduce->GetEventType(); } // Returns the message from the button "full". -EventMsg CWindow::RetEventMsgFull() +EventType CWindow::GetEventTypeFull() { if ( m_buttonFull == 0 ) return EVENT_NULL; - return m_buttonFull->RetEventMsg(); + return m_buttonFull->GetEventType(); } // Returns the message from the button "close". -EventMsg CWindow::RetEventMsgClose() +EventType CWindow::GetEventTypeClose() { if ( m_buttonClose == 0 ) return EVENT_NULL; - return m_buttonClose->RetEventMsg(); + return m_buttonClose->GetEventType(); } @@ -947,7 +962,7 @@ int CWindow::BorderDetect(Math::Point pos) if ( flags == 0 ) { - h = m_engine->RetText()->RetHeight(m_fontSize, m_fontType); + h = m_engine->GetText()->GetHeight(m_fontType, m_fontSize); dim.y = h*1.2f; dim.x = dim.y*0.75f; if ( pos.x < m_pos.x+m_dim.x-0.01f-dim.x*3.0f && @@ -967,7 +982,7 @@ bool CWindow::EventProcess(const Event &event) Math::Point pos; int i, flags; - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { if ( m_bCapture ) { @@ -975,7 +990,7 @@ bool CWindow::EventProcess(const Event &event) } else { - m_pressMouse = D3DMOUSENORM; + m_pressMouse = Gfx::ENG_MOUSE_NORM; if ( m_name[0] != 0 && m_bMovable && // title bar? Detect(event.pos) ) @@ -983,29 +998,29 @@ bool CWindow::EventProcess(const Event &event) flags = BorderDetect(event.pos); if ( flags == -1 ) { - m_pressMouse = D3DMOUSEMOVE; // + + m_pressMouse = Gfx::ENG_MOUSE_MOVE; // + } else if ( ((flags & (1<<0)) && (flags & (1<<3))) || ((flags & (1<<1)) && (flags & (1<<2))) ) { - m_pressMouse = D3DMOUSEMOVEI; // \ // + m_pressMouse = Gfx::ENG_MOUSE_MOVEI; // \ // } else if ( ((flags & (1<<0)) && (flags & (1<<1))) || ((flags & (1<<2)) && (flags & (1<<3))) ) { - m_pressMouse = D3DMOUSEMOVED; // / + m_pressMouse = Gfx::ENG_MOUSE_MOVED; // / } else if ( (flags & (1<<0)) || (flags & (1<<2)) ) { - m_pressMouse = D3DMOUSEMOVEH; // - + m_pressMouse = Gfx::ENG_MOUSE_MOVEH; // - } else if ( (flags & (1<<1)) || (flags & (1<<3)) ) { - m_pressMouse = D3DMOUSEMOVEV; // | + m_pressMouse = Gfx::ENG_MOUSE_MOVEV; // | } } - if ( m_pressMouse != D3DMOUSENORM ) + if ( m_pressMouse != Gfx::ENG_MOUSE_NORM ) { m_engine->SetMouseType(m_pressMouse); } @@ -1039,7 +1054,8 @@ bool CWindow::EventProcess(const Event &event) } } - if ( m_bTrashEvent && event.event == EVENT_LBUTTONDOWN ) + if ( m_bTrashEvent && event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1) { if ( Detect(event.pos) ) { @@ -1056,7 +1072,7 @@ bool CWindow::EventProcess(const Event &event) } } - if ( event.event == EVENT_MOUSEMOVE && m_bCapture ) + if ( event.type == EVENT_MOUSE_MOVE && m_bCapture ) { pos = event.pos; if ( m_pressFlags == -1 ) // all moves? @@ -1105,11 +1121,13 @@ bool CWindow::EventProcess(const Event &event) AdjustButtons(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } - if ( event.event == EVENT_LBUTTONUP && m_bCapture ) + if ( event.type == EVENT_MOUSE_BUTTON_UP && + event.mouseButton == 1 && + m_bCapture ) { m_bCapture = false; } @@ -1137,7 +1155,7 @@ void CWindow::Draw() if ( m_name[0] != 0 ) // title bar? { - h = m_engine->RetText()->RetHeight(m_fontSize, m_fontType); + h = m_engine->GetText()->GetHeight(m_fontType, m_fontSize); // Draws the shadow under the title bar. { @@ -1160,7 +1178,7 @@ void CWindow::Draw() dim.y = h*1.2f; DrawVertex(pos, dim, (m_state&STATE_ENABLE)?2:9); - sw = m_engine->RetText()->RetStringWidth(m_name, strlen(m_name), m_fontSize, m_fontStretch, m_fontType); + sw = m_engine->GetText()->GetStringWidth(m_name, m_fontType, m_fontSize); if ( m_state&STATE_ENABLE ) { @@ -1175,7 +1193,7 @@ void CWindow::Draw() pos.x = m_pos.x+width/2.0f; pos.y = m_pos.y+m_dim.y-0.01f-h*1.10f; - m_engine->RetText()->DrawText(m_name, pos, width, 0, m_fontSize, m_fontStretch, m_fontType, 0); + m_engine->GetText()->DrawText(m_name, m_fontType, m_fontSize, pos, width, Gfx::TEXT_ALIGN_CENTER, 0); if ( m_buttonReduce != 0 ) { @@ -1215,7 +1233,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) if ( icon == 0 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 64.0f/256.0f; // dark blue transparent uv1.y = 64.0f/256.0f; uv2.x = 128.0f/256.0f; @@ -1231,7 +1249,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 1 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 128.0f/256.0f; // yellow tooltip uv1.y = 0.0f/256.0f; uv2.x = 224.0f/256.0f; @@ -1245,7 +1263,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 2 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 128.0f/256.0f; // yellow uv1.y = 16.0f/256.0f; uv2.x = 224.0f/256.0f; @@ -1259,7 +1277,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 3 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 0.0f/256.0f; // transparent blue bar with yellow upper uv1.y = 64.0f/256.0f; uv2.x = 64.0f/256.0f; @@ -1278,7 +1296,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) dim.y += 60.0f/480.0f; m_engine->SetTexture("human.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 140.0f/256.0f; uv1.y = 32.0f/256.0f; uv2.x = 182.0f/256.0f; @@ -1295,7 +1313,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) dim.y += 0.0f/480.0f; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 192.0f/256.0f; uv1.y = 32.0f/256.0f; uv2.x = 224.0f/256.0f; @@ -1314,7 +1332,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) dim.y -= 20.0f/480.0f; m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; uv1.y = 0.0f/256.0f; uv2.x = 96.0f/256.0f; @@ -1433,7 +1451,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 5 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // transparent green uv1.y = 160.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -1447,7 +1465,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 6 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // transparent red uv1.y = 176.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -1461,7 +1479,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 7 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // transparent blue uv1.y = 192.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -1475,7 +1493,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 8 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f/256.0f; // opaque orange uv1.y = 0.0f/256.0f; uv2.x = 32.0f/256.0f; @@ -1491,7 +1509,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 9 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 32.0f/256.0f; // opaque gray uv1.y = 32.0f/256.0f; uv2.x = 64.0f/256.0f; @@ -1511,7 +1529,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 11 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f/256.0f; // transparent yellow uv1.y = 224.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -1525,7 +1543,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 12 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 128.0f/256.0f; // dirty opaque gray uv1.y = 128.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -1541,7 +1559,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 13 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 192.0f/256.0f; // dirty opaque blue uv1.y = 128.0f/256.0f; uv2.x = 224.0f/256.0f; @@ -1557,7 +1575,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 14 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 160.0f/256.0f; // dirty opaque red uv1.y = 128.0f/256.0f; uv2.x = 192.0f/256.0f; @@ -1585,7 +1603,7 @@ void CWindow::DrawHach(Math::Point pos, Math::Point dim) dp = 0.5f/256.0f; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; // hatching uv1.y = 208.0f/256.0f; uv2.x = 145.0f/256.0f; @@ -1618,3 +1636,4 @@ void CWindow::DrawHach(Math::Point pos, Math::Point dim) #endif } +} diff --git a/src/ui/window.h b/src/ui/window.h index 8884c6f..b122b67 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -20,8 +21,9 @@ #include -#include +//#include +namespace Ui { const int MAXWINDOW = 100; @@ -54,38 +56,38 @@ public: bool DeleteControl(EventType eventMsg); CControl* SearchControl(EventType eventMsg); - EventType RetEventTypeReduce(); - EventType RetEventTypeFull(); - EventType RetEventTypeClose(); + EventType GetEventTypeReduce(); + EventType GetEventTypeFull(); + EventType GetEventTypeClose(); void SetName(char* name); void SetTrashEvent(bool bTrash); - bool RetTrashEvent(); + bool GetTrashEvent(); void SetPos(Math::Point pos); void SetDim(Math::Point dim); void SetMinDim(Math::Point dim); void SetMaxDim(Math::Point dim); - Math::Point RetMinDim(); - Math::Point RetMaxDim(); + Math::Point GetMinDim(); + Math::Point GetMaxDim(); void SetMovable(bool bMode); - bool RetMovable(); + bool GetMovable(); void SetRedim(bool bMode); - bool RetRedim(); + bool GetRedim(); void SetClosable(bool bMode); - bool RetClosable(); + bool GetClosable(); void SetMaximized(bool bMaxi); - bool RetMaximized(); + bool GetMaximized(); void SetMinimized(bool bMini); - bool RetMinimized(); + bool GetMinimized(); void SetFixed(bool bFix); - bool RetFixed(); + bool GetFixed(); bool GetTooltip(Math::Point pos, char* name); @@ -121,7 +123,8 @@ protected: bool m_bCapture; Math::Point m_pressPos; int m_pressFlags; - D3DMouse m_pressMouse; + Gfx::EngineMouseType m_pressMouse; }; +} -- cgit v1.2.3-1-g7c22 From 02dc368a385fb493a87486aa929d9460ce40c31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 21:31:16 +0200 Subject: added ui/target.* --- src/ui/target.cpp | 68 +++++++++++++++++++++++++++++-------------------------- src/ui/target.h | 2 ++ 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/src/ui/target.cpp b/src/ui/target.cpp index f94ae02..db478fe 100644 --- a/src/ui/target.cpp +++ b/src/ui/target.cpp @@ -17,13 +17,14 @@ // target.cpp -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include +//#include +//#include + +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/math3d.h" +#include "graphics/engine/engine.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -34,10 +35,10 @@ - +namespace Ui { // Object's constructor. -CTarget::CTarget(CInstanceManager* iMan) : CControl(iMan) +CTarget::CTarget() : CControl() { } @@ -50,11 +51,11 @@ CTarget::~CTarget() // Creates a new button. -bool CTarget::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CTarget::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); return true; } @@ -70,26 +71,27 @@ bool CTarget::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { if ( CControl::Detect(event.pos) ) { - m_engine->SetMouseType(D3DMOUSETARGET); + m_engine->SetMouseType(Gfx::ENG_MOUSE_TARGET); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } } - if ( event.event == EVENT_LBUTTONDOWN && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1 && (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { if ( CControl::Detect(event.pos) ) { Event newEvent = event; - newEvent.event = EVENT_OBJECT_FIRE; + newEvent.type = EVENT_OBJECT_FIRE; m_event->AddEvent(newEvent); return false; } @@ -104,7 +106,7 @@ bool CTarget::EventProcess(const Event &event) CControl::EventProcess(event); - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { m_main->SetFriendAim(false); @@ -113,22 +115,23 @@ bool CTarget::EventProcess(const Event &event) pObj = DetectFriendObject(event.pos); if ( pObj == 0 ) { - m_engine->SetMouseType(D3DMOUSETARGET); + m_engine->SetMouseType(Gfx::ENG_MOUSE_TARGET); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } else { m_main->SetFriendAim(true); - m_engine->SetMouseType(D3DMOUSENORM); + m_engine->SetMouseType(Gfx::ENG_MOUSE_NORM); } } } - if ( event.event == EVENT_LBUTTONDOWN && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1 && (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { @@ -137,7 +140,7 @@ bool CTarget::EventProcess(const Event &event) if ( !m_main->RetFriendAim() ) { Event newEvent = event; - newEvent.event = EVENT_OBJECT_FIRE; + newEvent.type = EVENT_OBJECT_FIRE; m_event->AddEvent(newEvent); return false; } @@ -202,15 +205,15 @@ CObject* CTarget::DetectFriendObject(Math::Point pos) for ( i=0 ; i<1000000 ; i++ ) { - pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); + pObj = static_cast(m_iMan->SearchInstance(CLASS_OBJECT, i)); if ( pObj == 0 ) break; - if ( !pObj->RetActif() ) continue; - if ( pObj->RetProxyActivate() ) continue; - if ( pObj->RetSelect() ) continue; + if ( !pObj->GetActif() ) continue; + if ( pObj->GetProxyActivate() ) continue; + if ( pObj->GetSelect() ) continue; pTarget = 0; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_DERRICK || type == OBJECT_FACTORY || type == OBJECT_REPAIR || @@ -261,10 +264,10 @@ CObject* CTarget::DetectFriendObject(Math::Point pos) } else if ( (type == OBJECT_POWER || type == OBJECT_ATOMIC ) && - pObj->RetTruck() != 0 ) // battery used? + pObj->GetTruck() != 0 ) // battery used? { - pTarget = pObj->RetTruck(); - if ( pTarget->RetType() == OBJECT_MOBILEtg ) + pTarget = pObj->GetTruck(); + if ( pTarget->GetType() == OBJECT_MOBILEtg ) { pTarget = 0; } @@ -272,7 +275,7 @@ CObject* CTarget::DetectFriendObject(Math::Point pos) for ( j=0 ; jRetObjectRank(j); + rank = pObj->GetObjectRank(j); if ( rank == -1 ) continue; if ( rank != objRank ) continue; return pTarget; @@ -281,3 +284,4 @@ CObject* CTarget::DetectFriendObject(Math::Point pos) return 0; } +} diff --git a/src/ui/target.h b/src/ui/target.h index a2615b4..0b5b67d 100644 --- a/src/ui/target.h +++ b/src/ui/target.h @@ -23,6 +23,7 @@ #include +namespace Ui { class CTarget : public CControl { @@ -41,3 +42,4 @@ class CTarget : public CControl }; +} -- cgit v1.2.3-1-g7c22 From 59ec83c409952337d5c5d14c8a7be16b4d37957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 21:35:11 +0200 Subject: added ui/slider.* --- src/ui/slider.cpp | 16 +++++++++------- src/ui/slider.h | 7 +++++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/ui/slider.cpp b/src/ui/slider.cpp index 3c5b1ba..c90a047 100644 --- a/src/ui/slider.cpp +++ b/src/ui/slider.cpp @@ -35,6 +35,7 @@ #include "ui/slider.h" +namespace Ui { const float CURSOR_WIDTH = (10.0f/640.0f); const float HOLE_WIDTH = (5.0f/480.0f); @@ -44,7 +45,7 @@ const float HOLE_WIDTH = (5.0f/480.0f); // Object's constructor. -CSlider::CSlider(CInstanceManager* iMan) : CControl(iMan) +CSlider::CSlider() : CControl() { m_buttonLeft = 0; m_buttonRight = 0; @@ -118,7 +119,7 @@ void CSlider::MoveAdjust() #if 1 if ( m_buttonLeft == 0 ) { - m_buttonLeft = new CButton(m_iMan); + m_buttonLeft = new CButton(); m_buttonLeft->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), m_bHoriz?55:49, EVENT_NULL); // SetRepeat(true); if ( m_state & STATE_SHADOW ) m_buttonLeft->SetState(STATE_SHADOW); @@ -127,7 +128,7 @@ void CSlider::MoveAdjust() if ( m_buttonRight == 0 ) { - m_buttonRight = new CButton(m_iMan); + m_buttonRight = new CButton(); m_buttonRight->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), m_bHoriz?48:50, EVENT_NULL); // >/v m_buttonRight->SetRepeat(true); if ( m_state & STATE_SHADOW ) m_buttonRight->SetState(STATE_SHADOW); @@ -360,9 +361,9 @@ bool CSlider::EventProcess(const Event &event) { m_bCapture = false; } -/*/TODO */ + if ( event.type == EVENT_KEY_DOWN && - event.param == VK_WHEELUP && + event.mouseButton.button == 4 && Detect(event.pos) && m_buttonLeft != 0 ) { @@ -370,9 +371,9 @@ bool CSlider::EventProcess(const Event &event) newEvent.type = m_buttonLeft->GetEventType(); m_event->AddEvent(newEvent); } -/*/TODO */ + if ( event.type == EVENT_KEY_DOWN && - event.param == VK_WHEELDOWN && + event.mouseButton.button == 5 && Detect(event.pos) && m_buttonRight != 0 ) { @@ -585,3 +586,4 @@ float CSlider::GetArrowStep() } +} diff --git a/src/ui/slider.h b/src/ui/slider.h index e79b348..0de9b3c 100644 --- a/src/ui/slider.h +++ b/src/ui/slider.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -23,6 +24,7 @@ #include +namespace Ui { class CSlider : public CControl { @@ -45,10 +47,10 @@ class CSlider : public CControl void SetLimit(float min, float max); void SetVisibleValue(float value); - float RetVisibleValue(); + float GetVisibleValue(); void SetArrowStep(float step); - float RetArrowStep(); + float GetArrowStep(); protected: void MoveAdjust(); @@ -76,3 +78,4 @@ class CSlider : public CControl }; +} -- cgit v1.2.3-1-g7c22 From af45bc399f899f83313b14281b108a8abcc29444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 21:42:07 +0200 Subject: added ui/scroll.* --- src/ui/scroll.cpp | 74 ++++++++++++++++++++++++++++++------------------------- src/ui/scroll.h | 6 +++++ 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/ui/scroll.cpp b/src/ui/scroll.cpp index 5526c80..b54c868 100644 --- a/src/ui/scroll.cpp +++ b/src/ui/scroll.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,13 +18,14 @@ // scroll.cpp -#include -#include -#include +//#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/math3d.h" +#include "graphics/engine/engine.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" @@ -31,7 +33,7 @@ #include "ui/scroll.h" - +namespace Ui { // Object's constructor. @@ -61,9 +63,9 @@ CScroll::~CScroll() // Creates a new button. -bool CScroll::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CScroll::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); MoveAdjust(); @@ -102,20 +104,20 @@ void CScroll::MoveAdjust() { if ( m_buttonUp == 0 ) { - m_buttonUp = new CButton(m_iMan); + m_buttonUp = new CButton(); pc = (CButton*)m_buttonUp; pc->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), 49, EVENT_NULL); pc->SetRepeat(true); - m_eventUp = pc->GetEventMsg(); + m_eventUp = pc->GetEventType(); } if ( m_buttonDown == 0 ) { - m_buttonDown = new CButton(m_iMan); + m_buttonDown = new CButton(); pc = (CButton*)m_buttonDown; pc->Create(Math::Point(0.0f, 0.0f), Math::Point(0.0f, 0.0f), 50, EVENT_NULL); pc->SetRepeat(true); - m_eventDown = pc->GetEventMsg(); + m_eventDown = pc->GetEventType(); } } @@ -213,31 +215,32 @@ bool CScroll::EventProcess(const Event &event) if ( !m_buttonDown->EventProcess(event) ) return false; } - if ( event.event == m_eventUp && m_step > 0.0f ) + if ( event.type == m_eventUp && m_step > 0.0f ) { m_visibleValue -= m_step; if ( m_visibleValue < 0.0f ) m_visibleValue = 0.0f; AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } - if ( event.event == m_eventDown && m_step > 0.0f ) + if ( event.type == m_eventDown && m_step > 0.0f ) { m_visibleValue += m_step; if ( m_visibleValue > 1.0f ) m_visibleValue = 1.0f; AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } hButton = m_buttonUp?m_dim.x/0.75f:0.0f; - if ( event.event == EVENT_LBUTTONDOWN && + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1 && (m_state & STATE_VISIBLE) && (m_state & STATE_ENABLE) ) { @@ -258,7 +261,7 @@ bool CScroll::EventProcess(const Event &event) AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } m_bCapture = true; @@ -267,7 +270,7 @@ bool CScroll::EventProcess(const Event &event) } } - if ( event.event == EVENT_MOUSEMOVE && m_bCapture ) + if ( event.type == EVENT_MOUSE_MOVE && m_bCapture ) { h = (m_dim.y-hButton*2.0f)*(1.0f-m_visibleRatio); if ( h != 0 ) @@ -282,33 +285,35 @@ bool CScroll::EventProcess(const Event &event) AdjustGlint(); Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); } } } - if ( event.event == EVENT_LBUTTONUP && m_bCapture ) + if ( event.type == EVENT_MOUSE_BUTTON_UP && + event.mouseButton.button == 1 && + m_bCapture ) { m_bCapture = false; } - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELUP && - Detect(event.pos) && + if ( event.type == EVENT_KEY_DOWN && + event.mouseButton.button == 4 && + Detect(event.pos) && m_buttonUp != 0 ) { Event newEvent = event; - newEvent.event = m_buttonUp->GetEventMsg(); + newEvent.type = m_buttonUp->GetEventType(); m_event->AddEvent(newEvent); } - if ( event.event == EVENT_KEYDOWN && - event.param == VK_WHEELDOWN && - Detect(event.pos) && + if ( event.type == EVENT_KEY_DOWN && + event.mouseButton.button == 5 && + Detect(event.pos) && m_buttonDown != 0 ) { Event newEvent = event; - newEvent.event = m_buttonDown->GetEventMsg(); + newEvent.type = m_buttonDown->GetEventType(); m_event->AddEvent(newEvent); } @@ -381,7 +386,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon) if ( icon == 0 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f/256.0f; // yellow rectangle uv1.y = 32.0f/256.0f; uv2.x = 32.0f/256.0f; @@ -391,7 +396,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 1 ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 128.0f/256.0f; // gray rectangle uv1.y = 32.0f/256.0f; uv2.x = 160.0f/256.0f; @@ -401,7 +406,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon) else if ( icon == 2 ) { m_engine->SetTexture("button1.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f/256.0f; // blue rectangle uv1.y = 0.0f/256.0f; uv2.x = 96.0f/256.0f; @@ -411,7 +416,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon) else { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 104.0f/256.0f; // blue line - uv1.y = 32.0f/256.0f; uv2.x = 128.0f/256.0f; @@ -467,3 +472,4 @@ float CScroll::GetArrowStep() return m_step; } +} diff --git a/src/ui/scroll.h b/src/ui/scroll.h index 289d309..9dbd8a4 100644 --- a/src/ui/scroll.h +++ b/src/ui/scroll.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -23,6 +24,10 @@ #include +namespace Ui { + +class CButton; + const float SCROLL_WIDTH = (15.0f/640.0f); @@ -76,3 +81,4 @@ class CScroll : public CControl }; +} -- cgit v1.2.3-1-g7c22 From 60950ce66bdb6f37d7272b97d5230d0a43303c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 21:45:17 +0200 Subject: Typo fix --- src/ui/slider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/slider.cpp b/src/ui/slider.cpp index c90a047..27bcfbb 100644 --- a/src/ui/slider.cpp +++ b/src/ui/slider.cpp @@ -30,7 +30,7 @@ #include "common/misc.h" #include "common/iman.h" //#include "old/text.h" -#include "graphics/engine.text.h" +#include "graphics/engine/text.h" #include "ui/button.h" #include "ui/slider.h" -- cgit v1.2.3-1-g7c22 From 199768280816d56a3356a6c3d137df0a73dba62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Tue, 21 Aug 2012 15:23:59 +0200 Subject: added ui/shortcut.* --- src/ui/shortcut.cpp | 66 +++++++++++++++++++++++++++++------------------------ src/ui/shortcut.h | 5 +++- 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/src/ui/shortcut.cpp b/src/ui/shortcut.cpp index fe9ca9b..05e5d2d 100644 --- a/src/ui/shortcut.cpp +++ b/src/ui/shortcut.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,24 +18,27 @@ // shortcut.cpp -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/math3d.h" +//#include +//#include +//#include +#include +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/math3d.h" +#include "graphics/engine/engine.h" +#include "graphics/core/device.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "ui/shortcut.h" - +namespace Ui { // Object's constructor. -CShortcut::CShortcut(CInstanceManager* iMan) : CControl(iMan) +//CShortcut::CShortcut(CInstanceManager* iMan) : CControl(iMan) +CShortcut::CShortcut() : CControl() { m_time = 0.0f; } @@ -48,11 +52,11 @@ CShortcut::~CShortcut() // Creates a new button. -bool CShortcut::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CShortcut::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); - CControl::Create(pos, dim, icon, eventMsg); + CControl::Create(pos, dim, icon, eventType); return true; } @@ -63,17 +67,18 @@ bool CShortcut::EventProcess(const Event &event) { CControl::EventProcess(event); - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { m_time += event.rTime; } - if ( event.event == EVENT_LBUTTONDOWN ) + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && + event.mouseButton.button == 1) { if ( CControl::Detect(event.pos) ) { Event newEvent = event; - newEvent.event = m_eventMsg; + newEvent.type = m_eventType; m_event->AddEvent(newEvent); return false; } @@ -92,24 +97,24 @@ void CShortcut::Draw() icon = 0; zoom = 0.8f; - mode = D3DSTATETTw; + mode = Gfx::ENG_RSTATE_TTEXTURE_WHITE; if ( m_state & STATE_HILIGHT ) { icon = 4; zoom = 0.9f; - mode = D3DSTATENORMAL; + mode = Gfx::ENG_RSTATE_NORMAL; } if ( m_state & STATE_CHECK ) { icon = 1; zoom = 0.8f; - mode = D3DSTATENORMAL; + mode = Gfx::ENG_RSTATE_NORMAL; } if ( m_state & STATE_PRESS ) { icon = 1; zoom = 1.0f; - mode = D3DSTATENORMAL; + mode = Gfx::ENG_RSTATE_NORMAL; } if ( m_icon == 6 || m_icon == 7 ) // pause or film? { @@ -125,7 +130,7 @@ void CShortcut::Draw() DrawVertex(icon, 0.95f); } - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); DrawVertex(m_icon, zoom); if ( m_state & STATE_FRAME ) @@ -134,7 +139,7 @@ void CShortcut::Draw() float zoom, dp; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); zoom = 0.9f+sinf(m_time*8.0f)*0.1f; @@ -174,7 +179,7 @@ void CShortcut::Draw() float dp; m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 160.0f/256.0f; uv1.y = 0.0f/256.0f; @@ -195,13 +200,13 @@ void CShortcut::Draw() void CShortcut::DrawVertex(int icon, float zoom) { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[4]; // 2 triangles + Gfx::CDevice* device; + Gfx::Vertex vertex[4]; // 2 triangles Math::Point p1, p2, c; Math::Vector n; float u1, u2, v1, v2, dp; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); p1.x = m_pos.x; p1.y = m_pos.y; @@ -230,12 +235,13 @@ void CShortcut::DrawVertex(int icon, float zoom) n = Math::Vector(0.0f, 0.0f, -1.0f); // normal - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, u1,v2); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, u1,v1); - vertex[2] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, u2,v2); - vertex[3] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, u2,v1); + vertex[0] = Gfx::Vertex(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(u1, v2)); + vertex[1] = Gfx::Vertex(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(u1, v1)); + vertex[2] = Gfx::Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(u2, v2)); + vertex[3] = Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(u2, v1)); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 4, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(2); } +} diff --git a/src/ui/shortcut.h b/src/ui/shortcut.h index d819bf2..9ee97e0 100644 --- a/src/ui/shortcut.h +++ b/src/ui/shortcut.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -22,6 +23,7 @@ #include +namespace Ui { class CShortcut : public CControl { @@ -29,7 +31,7 @@ class CShortcut : public CControl CShortcut(); ~CShortcut(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); @@ -43,3 +45,4 @@ class CShortcut : public CControl }; +} -- cgit v1.2.3-1-g7c22 From 75a76e82529f9726772bff066748e764f88c6d85 Mon Sep 17 00:00:00 2001 From: erihel Date: Tue, 21 Aug 2012 20:53:39 +0200 Subject: latest changes --- src/ui/control.h | 2 +- src/ui/mainmap.cpp | 182 +++++++++++++-------------- src/ui/mainmap.h | 72 +++++------ src/ui/map.cpp | 363 ++++++++++++++++++++++++----------------------------- src/ui/map.h | 158 ++++++++++++----------- 5 files changed, 378 insertions(+), 399 deletions(-) diff --git a/src/ui/control.h b/src/ui/control.h index dcae4f2..ca57207 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -80,7 +80,7 @@ public: virtual int GetState(); virtual void SetIcon(int icon); virtual int GetIcon(); - virtual void SetName(char* name, bool bTooltip=true); + virtual void SetName(const char* name, bool bTooltip=true); virtual char* GetName(); virtual void SetTextAlign(Gfx::TextAlign mode); virtual int GetTextAlign(); diff --git a/src/ui/mainmap.cpp b/src/ui/mainmap.cpp index 76e3627..02453a4 100644 --- a/src/ui/mainmap.cpp +++ b/src/ui/mainmap.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,37 +18,21 @@ // mainmap.cpp -#include -#include -#include +#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/d3dmath.h" -#include "common/global.h" -#include "common/event.h" -#include "common/iman.h" -#include "ui/interface.h" -#include "ui/map.h" -#include "ui/image.h" -#include "ui/group.h" -#include "ui/slider.h" -#include "ui/scroll.h" -#include "ui/window.h" -#include "ui/mainmap.h" +namespace Ui { const float ZOOM_MIN = 1.0f; const float ZOOM_MAX = 16.0f; - // Constructor of the application card. -CMainMap::CMainMap(CInstanceManager* iMan) +CMainMap::CMainMap() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_iMan->AddInstance(CLASS_MAP, this); m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); @@ -73,8 +58,7 @@ void CMainMap::CreateMap() Math::Point pos, dim; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) - { + if (pw == nullptr) { pos.x = 0.0f; pos.y = 0.0f; dim.x = 0.0f; @@ -82,10 +66,10 @@ void CMainMap::CreateMap() pw = m_interface->CreateWindows(pos, dim, 10, EVENT_WINDOW1); } - dim.x = 10.0f/640.0f; - dim.y = 10.0f/480.0f; - pos.x = 10.0f/640.0f; - pos.y = 10.0f/480.0f; + dim.x = 10.0f / 640.0f; + dim.y = 10.0f / 480.0f; + pos.x = 10.0f / 640.0f; + pos.y = 10.0f / 480.0f; pw->CreateMap (pos, dim, 2, EVENT_OBJECT_MAP); pw->CreateSlider(pos, dim, 0, EVENT_OBJECT_MAPZOOM); @@ -94,16 +78,18 @@ void CMainMap::CreateMap() // Indicates whether the mini-map should display a still image. -void CMainMap::SetFixImage(char *filename) +void CMainMap::SetFixImage(const char *filename) { CWindow* pw; CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return; + if (pm == nullptr) + return; pw->DeleteControl(EVENT_OBJECT_MAPZOOM); m_bFixImage = true; @@ -113,17 +99,17 @@ void CMainMap::SetFixImage(char *filename) // Choosing colors of soil and water for the mini-map. -void CMainMap::FloorColorMap(D3DCOLORVALUE floor, D3DCOLORVALUE water) +void CMainMap::FloorColorMap(Gfx::Color floor, Gfx::Color water) { CWindow* pw; CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm != 0 ) - { + if (pm != nullptr) { pm->SetFloorColor(floor); pm->SetWaterColor(water); } @@ -138,25 +124,19 @@ void CMainMap::ShowMap(bool bShow) CSlider* ps; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; - if ( bShow ) - { + if (bShow) { DimMap(); - } - else - { + } else { pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm != 0 ) - { + if (pm != nullptr) pm->ClearState(STATE_VISIBLE); - } ps = (CSlider*)pw->SearchControl(EVENT_OBJECT_MAPZOOM); - if ( ps != 0 ) - { + if (ps != nullptr) ps->ClearState(STATE_VISIBLE); - } } } @@ -171,9 +151,11 @@ void CMainMap::DimMap() float value; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return; + if (pm == nullptr) + return; pm->SetState(STATE_VISIBLE, (m_mapMode != 0)); @@ -185,19 +167,18 @@ void CMainMap::DimMap() pm->SetDim(dim); ps = (CSlider*)pw->SearchControl(EVENT_OBJECT_MAPZOOM); - if ( ps != 0 ) - { + if (ps != nullptr) { ps->SetState(STATE_VISIBLE, (m_mapMode != 0)); dim.x = SCROLL_WIDTH; - dim.y = 66.0f/480.0f; - pos.x = 523.0f/640.0f; - pos.y = 3.0f/480.0f; + dim.y = 66.0f / 480.0f; + pos.x = 523.0f / 640.0f; + pos.y = 3.0f / 480.0f; ps->SetPos(pos); ps->SetDim(dim); value = pm->RetZoom(); - value = (value-ZOOM_MIN)/(ZOOM_MAX-ZOOM_MIN); + value = (value-ZOOM_MIN) / (ZOOM_MAX-ZOOM_MIN); value = powf(value, 0.5f); ps->SetVisibleValue(value); ps->SetArrowStep(0.2f); @@ -206,22 +187,25 @@ void CMainMap::DimMap() // Returns the current zoom of the minimap. -float CMainMap::RetZoomMap() +float CMainMap::GetZoomMap() { CWindow* pw; CMap* pm; CSlider* ps; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return ZOOM_MIN; + if (pw == nullptr) + return ZOOM_MIN; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return ZOOM_MIN; + if (pm == nullptr) + return ZOOM_MIN; ps = (CSlider*)pw->SearchControl(EVENT_OBJECT_MAPZOOM); - if ( ps == 0 ) return ZOOM_MIN; + if (ps == nullptr) + return ZOOM_MIN; - return pm->RetZoom(); + return pm->GetZoom(); } // Zoom the mini-map of any factor. @@ -233,15 +217,20 @@ void CMainMap::ZoomMap(float zoom) CSlider* ps; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return; + if (pm == nullptr) + return; ps = (CSlider*)pw->SearchControl(EVENT_OBJECT_MAPZOOM); - if ( ps == 0 ) return; + if (ps == nullptr) + return; - if ( zoom < ZOOM_MIN ) zoom = ZOOM_MIN; - if ( zoom > ZOOM_MAX ) zoom = ZOOM_MAX; + if (zoom < ZOOM_MIN) + zoom = ZOOM_MIN; + if (zoom > ZOOM_MAX) + zoom = ZOOM_MAX; pm->SetZoom(zoom); DimMap(); @@ -257,16 +246,19 @@ void CMainMap::ZoomMap() float zoom; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return; + if (pm == nullptr) + return; ps = (CSlider*)pw->SearchControl(EVENT_OBJECT_MAPZOOM); - if ( ps == 0 ) return; + if (ps == nullptr) + return; - zoom = ps->RetVisibleValue(); + zoom = ps->SetVisibleValue(); zoom = powf(zoom, 2.0f); - zoom = ZOOM_MIN+zoom*(ZOOM_MAX-ZOOM_MIN); + zoom = ZOOM_MIN+zoom*(ZOOM_MAX - ZOOM_MIN); pm->SetZoom(zoom); DimMap(); @@ -281,19 +273,16 @@ void CMainMap::MapEnable(bool bEnable) CSlider* ps; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm != 0 ) - { + if (pm != nullptr) pm->SetEnable(bEnable); - } ps = (CSlider*)pw->SearchControl(EVENT_OBJECT_MAPZOOM); - if ( ps != 0 ) - { + if (ps != nullptr) ps->SetState(STATE_ENABLE, bEnable); - } } // Specifies the type of icon for the selected object. @@ -304,10 +293,12 @@ void CMainMap::SetToy(bool bToy) CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return; + if (pm == nullptr) + return; pm->SetToy(bToy); } @@ -321,10 +312,12 @@ void CMainMap::SetFixParam(float zoom, float ox, float oy, float angle, CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return; + if (pm == nullptr) + return; pm->SetZoom(zoom); pm->SetOffset(ox, oy); @@ -341,25 +334,24 @@ void CMainMap::UpdateMap() CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm != 0 ) - { + if (pm != nullptr) pm->UpdateTerrain(); - } } // Indicates if the mini-map is visible. -bool CMainMap::RetShowMap() +bool CMainMap::GetShowMap() { return ( m_mapMode != 0 ); } // Indicates whether the mini-map displays a still image. -bool CMainMap::RetFixImage() +bool CMainMap::GetFixImage() { return m_bFixImage; } @@ -373,30 +365,32 @@ CObject* CMainMap::DetectMap(Math::Point pos, bool &bInMap) CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return 0; + if (pw == nullptr) + return 0; bInMap = false; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm == 0 ) return 0; + if (pm == nullptr) + return 0; return pm->DetectObject(pos, bInMap); } // Indicates the object with the mouse hovers over. -void CMainMap::SetHilite(CObject* pObj) +void CMainMap::SetHighlight(CObject* pObj) { - CWindow* pw; + CWindow* pw; CMap* pm; pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW1); - if ( pw == 0 ) return; + if (pw == nullptr) + return; pm = (CMap*)pw->SearchControl(EVENT_OBJECT_MAP); - if ( pm != 0 ) - { - pm->SetHilite(pObj); - } + if (pm != nullptr) + pm->SetHighlight(pObj); } +} diff --git a/src/ui/mainmap.h b/src/ui/mainmap.h index dba87fc..91e93c9 100644 --- a/src/ui/mainmap.h +++ b/src/ui/mainmap.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -18,53 +19,54 @@ #pragma once +#include -#include "common/struct.h" -#include "math/point.h" +#include +#include +#include -class CInstanceManager; -class CEvent; -class CD3DEngine; -class CInterface; -class CObject; +#include +#include +namespace Ui { class CMainMap { -public: - CMainMap(CInstanceManager* iMan); - ~CMainMap(); + public: + CMainMap(); + ~CMainMap(); - void UpdateMap(); - void CreateMap(); - void SetFixImage(char *filename); - void FloorColorMap(D3DCOLORVALUE floor, D3DCOLORVALUE water); - void ShowMap(bool bShow); - void DimMap(); - float RetZoomMap(); - void ZoomMap(float zoom); - void ZoomMap(); - void MapEnable(bool bEnable); - bool RetShowMap(); - bool RetFixImage(); - CObject* DetectMap(Math::Point pos, bool &bInMap); - void SetHilite(CObject* pObj); - void SetToy(bool bToy); - void SetFixParam(float zoom, float ox, float oy, float angle, int mode, bool bDebug); + void UpdateMap(); + void CreateMap(); + void SetFixImage(const char *filename); + void FloorColorMap(Gfx::Color floor, Gfx::Color water); + void ShowMap(bool bShow); + void DimMap(); + float GetZoomMap(); + void ZoomMap(float zoom); + void ZoomMap(); + void MapEnable(bool bEnable); + bool GetShowMap(); + bool GetFixImage(); + CObject* DetectMap(Math::Point pos, bool &bInMap); + void SetHighlight(CObject* pObj); + void SetToy(bool bToy); + void SetFixParam(float zoom, float ox, float oy, float angle, int mode, bool bDebug); -protected: - void CenterMap(); + protected: + void CenterMap(); -protected: - CInstanceManager* m_iMan; - CEvent* m_event; - CD3DEngine* m_engine; - CInterface* m_interface; + protected: + CInstanceManager* m_iMan; + CEvent* m_event; + CD3DEngine* m_engine; + CInterface* m_interface; - int m_mapMode; - bool m_bFixImage; + int m_mapMode; + bool m_bFixImage; }; +} diff --git a/src/ui/map.cpp b/src/ui/map.cpp index a74e557..2714c04 100644 --- a/src/ui/map.cpp +++ b/src/ui/map.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,34 +18,18 @@ // map.cpp -#include -#include -#include - -#include "common/struct.h" -#include "math/geometry.h" -#include "old/d3dengine.h" -#include "common/event.h" -#include "old/math3d.h" -#include "old/terrain.h" -#include "old/water.h" -#include "object/object.h" -#include "common/event.h" -#include "common/misc.h" -#include "object/robotmain.h" -#include "common/iman.h" -#include "ui/map.h" - +#include +namespace Ui { // Object's constructor. -CMap::CMap(CInstanceManager* iMan) : CControl(iMan) +CMap::CMap() : CControl() { - m_main = (CRobotMain*)m_iMan->SearchInstance(CLASS_MAIN); - m_terrain = (CTerrain*)m_iMan->SearchInstance(CLASS_TERRAIN); - m_water = (CWater*)m_iMan->SearchInstance(CLASS_WATER); + m_main = static_cast(m_iMan->SearchInstance(CLASS_MAIN)); + m_terrain = static_cast(m_iMan->SearchInstance(CLASS_TERRAIN)); + m_water = static_cast(m_iMan->SearchInstance(CLASS_WATER)); m_bEnable = true; m_time = 0.0f; @@ -61,9 +46,9 @@ CMap::CMap(CInstanceManager* iMan) : CControl(iMan) m_waterColor.g = 0.80f; m_waterColor.b = 1.00f; // blue - m_half = m_terrain->RetMosaic()*m_terrain->RetBrick()*m_terrain->RetSize()/2.0f; + m_half = m_terrain->GetMosaic() * m_terrain->GetBrick() * m_terrain->GetSize() / 2.0f; - m_hiliteRank = -1; + m_highlightRank = -1; FlushObject(); m_fixImage[0] = 0; @@ -81,9 +66,10 @@ CMap::~CMap() // Creates a new button. -bool CMap::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg) +bool CMap::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { - if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg(); + if (eventMsg == EVENT_NULL) + eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); return true; @@ -96,7 +82,7 @@ void CMap::SetOffset(float ox, float oy) { m_offset.x = ox; m_offset.y = oy; - m_half = m_terrain->RetMosaic()*m_terrain->RetBrick()*m_terrain->RetSize()/2.0f; + m_half = m_terrain->GetMosaic() * m_terrain->GetBrick() * m_terrain->GetSize() / 2.0f; } // Choice of the global angle of rotation. @@ -131,10 +117,10 @@ void CMap::SetDebug(bool bDebug) void CMap::SetZoom(float value) { m_zoom = value; - m_half = m_terrain->RetMosaic()*m_terrain->RetBrick()*m_terrain->RetSize()/2.0f; + m_half = m_terrain->GetMosaic() * m_terrain->GetBrick() * m_terrain->GetSize() / 2.0f; } -float CMap::RetZoom() +float CMap::GetZoom() { return m_zoom; } @@ -149,7 +135,7 @@ void CMap::SetEnable(bool bEnable) SetState(STATE_DEAD, !bEnable); } -bool CMap::RetEnable() +bool CMap::GetEnable() { return m_bEnable; } @@ -157,14 +143,14 @@ bool CMap::RetEnable() // Choosing the color of the soil. -void CMap::SetFloorColor(D3DCOLORVALUE color) +void CMap::SetFloorColor(Gfx::Color color) { m_floorColor = color; } // Choosing the color of the water. -void CMap::SetWaterColor(D3DCOLORVALUE color) +void CMap::SetWaterColor(Gfx::Color color) { m_waterColor = color; } @@ -172,14 +158,14 @@ void CMap::SetWaterColor(D3DCOLORVALUE color) // Specifies a fixed image in place of the drawing of the relief. -void CMap::SetFixImage(char *filename) +void CMap::SetFixImage(const char *filename) { strcpy(m_fixImage, filename); } // Whether to use a still image. -bool CMap::RetFixImage() +bool CMap::GetFixImage() { return (m_fixImage[0] != 0); } @@ -189,30 +175,24 @@ bool CMap::RetFixImage() bool CMap::EventProcess(const Event &event) { - bool bInMap; + bool bInMap; - if ( (m_state & STATE_VISIBLE) == 0 ) return true; + if ( (m_state & STATE_VISIBLE) == 0 ) + return true; CControl::EventProcess(event); - if ( event.event == EVENT_FRAME ) - { + if ( event.type == EVENT_FRAME ) m_time += event.rTime; - } - if ( event.event == EVENT_MOUSEMOVE && Detect(event.pos) ) - { - m_engine->SetMouseType(D3DMOUSENORM); + if ( event.type == EVENT_MOUSE_MOVE && Detect(event.pos) ) { + m_engine->SetMouseType(Gfx::ENG_MOUSE_NORM); if ( DetectObject(event.pos, bInMap) != 0 ) - { - m_engine->SetMouseType(D3DMOUSEHAND); - } + m_engine->SetMouseType(Gfx::ENG_MOUSE_HAND); } - if ( event.event == EVENT_LBUTTONDOWN ) - { - if ( CControl::Detect(event.pos) ) - { + if ( event.type == EVENT_MOUSE_BUTTON_DOWN && event.mouseButton.button == 1 ) { + if ( CControl::Detect(event.pos) ) { SelectObject(event.pos); return false; } @@ -227,7 +207,7 @@ Math::Point CMap::AdjustOffset(Math::Point offset) { float limit; - limit = m_half - m_half/m_zoom; + limit = m_half - m_half / m_zoom; if ( offset.x < -limit ) offset.x = -limit; if ( offset.x > limit ) offset.x = limit; if ( offset.y < -limit ) offset.y = -limit; @@ -238,21 +218,20 @@ Math::Point CMap::AdjustOffset(Math::Point offset) // Indicates the object with the mouse hovers over. -void CMap::SetHilite(CObject* pObj) +void CMap::SetHighlight(CObject* pObj) { - int i; - - m_hiliteRank = -1; - if ( m_bToy || m_fixImage[0] != 0 ) return; // card with still image? - if ( pObj == 0 ) return; + m_highlightRank = -1; + if ( m_bToy || m_fixImage[0] != 0 ) + return; // card with still image? + if ( pObj == 0 ) + return; - for ( i=0 ; i m_pos.x+m_dim.x || - pos.y > m_pos.y+m_dim.y ) return 0; + if ( pos.x < m_pos.x || + pos.y < m_pos.y || + pos.x > m_pos.x + m_dim.x || + pos.y > m_pos.y + m_dim.y ) + return 0; bInMap = true; - pos.x = (pos.x-m_pos.x)/m_dim.x*256.0f; - pos.y = (pos.y-m_pos.y)/m_dim.y*256.0f; // 0..256 - pos.x = (pos.x-128.0f)*m_half/(m_zoom*128.0f)+m_offset.x; - pos.y = (pos.y-128.0f)*m_half/(m_zoom*128.0f)+m_offset.y; + pos.x = (pos.x - m_pos.x) / m_dim.x * 256.0f; + pos.y = (pos.y - m_pos.y) / m_dim.y * 256.0f; // 0..256 + pos.x = (pos.x - 128.0f) * m_half / (m_zoom * 128.0f) + m_offset.x; + pos.y = (pos.y - 128.0f) * m_half / (m_zoom * 128.0f) + m_offset.y; min = 10000.0f; best = -1; - for ( i=MAPMAXOBJECT-1 ; i>=0 ; i-- ) - { - if ( !m_map[i].bUsed ) continue; - if ( m_map[i].color == MAPCOLOR_BBOX && !m_bRadar ) continue; - if ( m_map[i].color == MAPCOLOR_ALIEN && !m_bRadar ) continue; - - dist = Math::Point(m_map[i].pos.x-pos.x, m_map[i].pos.y-pos.y).Length(); - if ( dist > m_half/m_zoom*8.0f/100.0f ) continue; // too far? - if ( dist < min ) - { + for (int i = MAPMAXOBJECT - 1; i >= 0; i--) { + if ( !m_map[i].bUsed ) + continue; + if ( m_map[i].color == MAPCOLOR_BBOX && !m_bRadar ) + continue; + if ( m_map[i].color == MAPCOLOR_ALIEN && !m_bRadar ) + continue; + + dist = Math::Point(m_map[i].pos.x - pos.x, m_map[i].pos.y - pos.y).Length(); + if ( dist > m_half / m_zoom * 8.0f / 100.0f ) + continue; // too far? + if ( dist < min ) { min = dist; best = i; } } - if ( best == -1 ) return 0; + if ( best == -1 ) + return 0; return m_map[best].object; } @@ -302,14 +285,12 @@ CObject* CMap::DetectObject(Math::Point pos, bool &bInMap) void CMap::SelectObject(Math::Point pos) { - CObject *pObj; - bool bInMap; + CObject *pObj; + bool bInMap; pObj = DetectObject(pos, bInMap); if ( pObj != 0 ) - { m_main->SelectObject(pObj); - } } @@ -318,34 +299,31 @@ void CMap::SelectObject(Math::Point pos) void CMap::Draw() { Math::Point uv1, uv2; - int i; + int i; - if ( (m_state & STATE_VISIBLE) == 0 ) return; + if ( (m_state & STATE_VISIBLE) == 0 ) + return; CControl::Draw(); // draws the bottom (button) - if ( !m_bEnable ) return; + if ( !m_bEnable ) + return; - if ( m_fixImage[0] == 0 && m_map[MAPMAXOBJECT-1].bUsed ) - { - m_offset = AdjustOffset(m_map[MAPMAXOBJECT-1].pos); - } + if ( m_fixImage[0] == 0 && m_map[MAPMAXOBJECT - 1].bUsed ) + m_offset = AdjustOffset(m_map[MAPMAXOBJECT - 1].pos); - if ( m_fixImage[0] == 0 ) // drawing of the relief? - { + if ( m_fixImage[0] == 0 ) { // drawing of the relief? m_engine->SetTexture("map.tga"); - m_engine->SetState(D3DSTATENORMAL); - uv1.x = 0.5f+(m_offset.x-(m_half/m_zoom))/(m_half*2.0f); - uv1.y = 0.5f-(m_offset.y+(m_half/m_zoom))/(m_half*2.0f); - uv2.x = 0.5f+(m_offset.x+(m_half/m_zoom))/(m_half*2.0f); - uv2.y = 0.5f-(m_offset.y-(m_half/m_zoom))/(m_half*2.0f); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); + uv1.x = 0.5f + (m_offset.x - (m_half / m_zoom)) / (m_half * 2.0f); + uv1.y = 0.5f - (m_offset.y + (m_half / m_zoom)) / (m_half * 2.0f); + uv2.x = 0.5f + (m_offset.x + (m_half / m_zoom)) / (m_half * 2.0f); + uv2.y = 0.5f - (m_offset.y - (m_half / m_zoom)) / (m_half * 2.0f); DrawVertex(uv1, uv2, 0.97f); // drawing the map - } - else // still image? - { + } else { // still image? m_engine->LoadTexture(m_fixImage); m_engine->SetTexture(m_fixImage); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f; uv1.y = 0.0f; uv2.x = 1.0f; @@ -355,33 +333,28 @@ void CMap::Draw() i = MAPMAXOBJECT-1; if ( m_map[i].bUsed ) // selection: - { DrawFocus(m_map[i].pos, m_map[i].dir, m_map[i].type, m_map[i].color); - } - for ( i=0 ; im_totalMove ; i-- ) // moving objects: - { - if ( i == m_hiliteRank ) continue; + for ( i=MAPMAXOBJECT-2 ; i>m_totalMove ; i-- ) { // moving objects: + if ( i == m_highlightRank ) + continue; DrawObject(m_map[i].pos, m_map[i].dir, m_map[i].type, m_map[i].color, false, false); } i = MAPMAXOBJECT-1; - if ( m_map[i].bUsed && i != m_hiliteRank ) // selection: - { + if ( m_map[i].bUsed && i != m_highlightRank ) // selection: DrawObject(m_map[i].pos, m_map[i].dir, m_map[i].type, m_map[i].color, true, false); - } - if ( m_hiliteRank != -1 && m_map[m_hiliteRank].bUsed ) - { - i = m_hiliteRank; + if ( m_highlightRank != -1 && m_map[m_highlightRank].bUsed ) { + i = m_highlightRank; DrawObject(m_map[i].pos, m_map[i].dir, m_map[i].type, m_map[i].color, false, true); - DrawHilite(m_map[i].pos); + DrawHighlight(m_map[i].pos); } } @@ -392,35 +365,32 @@ Math::Point CMap::MapInter(Math::Point pos, float dir) Math::Point p1; float limit; - p1.x = pos.x+1.0f; + p1.x = pos.x + 1.0f; p1.y = pos.y; p1 = Math::RotatePoint(pos, dir, p1); p1.x -= pos.x; p1.y -= pos.y; - limit = m_mapPos.x+m_mapDim.x-pos.x; - if ( p1.x > limit ) // exceeds the right? - { + limit = m_mapPos.x + m_mapDim.x - pos.x; + if ( p1.x > limit ) { // exceeds the right? p1.y = limit*p1.y/p1.x; p1.x = limit; } - limit = m_mapPos.y*0.75f+m_mapDim.y*0.75f-pos.y; - if ( p1.y > limit ) // exceeds the top? - { - p1.x = limit*p1.x/p1.y; + limit = m_mapPos.y * 0.75f + m_mapDim.y * 0.75f - pos.y; + if ( p1.y > limit ) { // exceeds the top? + p1.x = limit * p1.x / p1.y; p1.y = limit; } - limit = m_mapPos.x-pos.x; - if ( p1.x < limit ) // exceeds the left? - { - p1.y = limit*p1.y/p1.x; + limit = m_mapPos.x - pos.x; + if ( p1.x < limit ) { // exceeds the left? + p1.y = limit * p1.y / p1.x; p1.x = limit; } - limit = m_mapPos.y*0.75f-pos.y; - if ( p1.y < limit ) // exceeds the bottom? - { - p1.x = limit*p1.x/p1.y; + + limit = m_mapPos.y * 0.75f - pos.y; + if ( p1.y < limit ) { // exceeds the bottom? + p1.x = limit * p1.x / p1.y; p1.y = limit; } @@ -454,7 +424,7 @@ void CMap::DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color pos.x = m_mapPos.x+m_mapDim.x*pos.x; pos.y = m_mapPos.y*0.75f+m_mapDim.y*pos.y*0.75f; - focus = m_engine->RetFocus(); + focus = m_engine->GetFocus(); dir += Math::PI/2.0f; aMin = Math::NormAngle(dir-Math::PI/4.0f*focus); aMax = Math::NormAngle(dir+Math::PI/4.0f*focus); @@ -484,7 +454,7 @@ void CMap::DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color uv2.y = 255.0f/256.0f; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); bEnding = false; do @@ -492,7 +462,7 @@ void CMap::DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color quart ++; aOct = limit[quart%4]; if ( quart >= 4 ) aOct += Math::PI*2.0f; - if ( aOct >= aMax-Math::VERY_SMALL ) + if ( aOct >= aMax - Math::VERY_SMALL_NUM ) { aOct = aMax; bEnding = true; @@ -544,7 +514,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo } m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); if ( bUp ) { uv1.x = 160.5f/256.0f; // yellow triangle ^ @@ -687,7 +657,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( bSelect ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); if ( m_bToy ) { uv1.x = 164.5f/256.0f; // black pentagon @@ -713,7 +683,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( m_bRadar ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 64.5f/256.0f; // blue triangle uv1.y = 240.5f/256.0f; uv2.x = 79.0f/256.0f; @@ -733,7 +703,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( color == MAPCOLOR_WAYPOINTb ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 192.5f/256.0f; // blue cross uv1.y = 240.5f/256.0f; uv2.x = 207.0f/256.0f; @@ -743,7 +713,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( color == MAPCOLOR_WAYPOINTr ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 208.5f/256.0f; // red cross uv1.y = 240.5f/256.0f; uv2.x = 223.0f/256.0f; @@ -753,7 +723,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( color == MAPCOLOR_WAYPOINTg ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 224.5f/256.0f; // green cross uv1.y = 240.5f/256.0f; uv2.x = 239.0f/256.0f; @@ -763,7 +733,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( color == MAPCOLOR_WAYPOINTy ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 240.5f/256.0f; // yellow cross uv1.y = 240.5f/256.0f; uv2.x = 255.0f/256.0f; @@ -773,7 +743,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo if ( color == MAPCOLOR_WAYPOINTv ) { m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 192.5f/256.0f; // violet cross uv1.y = 224.5f/256.0f; uv2.x = 207.0f/256.0f; @@ -794,7 +764,7 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, dp = 0.5f/256.0f; m_engine->SetTexture("button3.tga"); - m_engine->SetState(D3DSTATENORMAL); + m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); if ( color == MAPCOLOR_MOVE ) { uv1.x = 160.0f/256.0f; // blue @@ -877,7 +847,7 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, if ( type == OBJECT_TEEN34 ) icon = 48; // stone if ( icon == -1 ) return; - m_engine->SetState(D3DSTATETTw); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = (32.0f/256.0f)*(icon%8); uv1.y = (32.0f/256.0f)*(icon/8); uv2.x = uv1.x+32.0f/256.0f; @@ -892,7 +862,7 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, // Draw the object with the mouse hovers over. -void CMap::DrawHilite(Math::Point pos) +void CMap::DrawHighlight(Math::Point pos) { Math::Point dim, uv1, uv2; bool bOut, bUp, bDown, bLeft, bRight; @@ -916,7 +886,7 @@ void CMap::DrawHilite(Math::Point pos) dim.y *= 2.0f+cosf(m_time*8.0f)*0.5f; m_engine->SetTexture("button2.tga"); - m_engine->SetState(D3DSTATETTb); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 160.5f/256.0f; // hilite uv1.y = 224.5f/256.0f; uv2.x = 175.0f/256.0f; @@ -930,19 +900,19 @@ void CMap::DrawHilite(Math::Point pos) void CMap::DrawTriangle(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point uv1, Math::Point uv2) { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[3]; // 1 triangle + Gfx::CDevice* device; + Gfx::VertexTex2 vertex[3]; // 1 triangle Math::Vector n; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); n = Math::Vector(0.0f, 0.0f, -1.0f); // normal - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv1.y); - vertex[1] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv1.x,uv2.y); - vertex[2] = D3DVERTEX2(Math::Vector(p3.x, p3.y, 0.0f), n, uv2.x,uv2.y); + vertex[0] = Gfx::VertexTex2(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x,uv1.y)); + vertex[1] = Gfx::VertexTex2(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv2.y)); + vertex[2] = Gfx::VertexTex2(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); - device->DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_VERTEX2, vertex, 3, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLES, vertex, 3); m_engine->AddStatisticTriangle(1); } @@ -950,28 +920,28 @@ void CMap::DrawTriangle(Math::Point p1, Math::Point p2, Math::Point p3, Math::Po void CMap::DrawPenta(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point p4, Math::Point p5, Math::Point uv1, Math::Point uv2) { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[5]; // 1 pentagon + Gfx::CDevice* device; + Gfx::VertexTex2 vertex[5]; // 1 pentagon Math::Vector n; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); n = Math::Vector(0.0f, 0.0f, -1.0f); // normal #if 1 - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv1.y); - vertex[1] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv1.x,uv2.y); - vertex[2] = D3DVERTEX2(Math::Vector(p5.x, p5.y, 0.0f), n, uv2.x,uv2.y); - vertex[3] = D3DVERTEX2(Math::Vector(p3.x, p3.y, 0.0f), n, uv2.x,uv2.y); - vertex[4] = D3DVERTEX2(Math::Vector(p4.x, p4.y, 0.0f), n, uv2.x,uv2.y); + vertex[0] = Gfx::VertexTex2(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x,uv1.y)); + vertex[1] = Gfx::VertexTex2(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv2.y)); + vertex[2] = Gfx::VertexTex2(Math::Vector(p5.x, p5.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); + vertex[3] = Gfx::VertexTex2(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); + vertex[4] = Gfx::VertexTex2(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 5, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 5); #else - vertex[0] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv1.x,uv1.y); - vertex[1] = D3DVERTEX2(Math::Vector(p3.x, p3.y, 0.0f), n, uv1.x,uv2.y); - vertex[2] = D3DVERTEX2(Math::Vector(p4.x, p4.y, 0.0f), n, uv2.x,uv2.y); + vertex[0] = Gfx::VertexTex2(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv1.y)); + vertex[1] = Gfx::VertexTex2(Math::Vector(p3.x, p3.y, 0.0f), n, Math::Point(uv1.x,uv2.y)); + vertex[2] = Gfx::VertexTex2(Math::Vector(p4.x, p4.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); - device->DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_VERTEX2, vertex, 3, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLES, vertex, 3); #endif m_engine->AddStatisticTriangle(3); } @@ -980,12 +950,12 @@ void CMap::DrawPenta(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point void CMap::DrawVertex(Math::Point uv1, Math::Point uv2, float zoom) { - LPDIRECT3DDEVICE7 device; - D3DVERTEX2 vertex[4]; // 2 triangles + Gfx::CDevice* device; + Gfx::VertexTex2 vertex[4]; // 2 triangles Math::Point p1, p2, c; Math::Vector n; - device = m_engine->RetD3DDevice(); + device = m_engine->GetDevice(); p1.x = m_pos.x; p1.y = m_pos.y; @@ -1007,12 +977,12 @@ void CMap::DrawVertex(Math::Point uv1, Math::Point uv2, float zoom) n = Math::Vector(0.0f, 0.0f, -1.0f); // normal - vertex[0] = D3DVERTEX2(Math::Vector(p1.x, p1.y, 0.0f), n, uv1.x,uv2.y); - vertex[1] = D3DVERTEX2(Math::Vector(p1.x, p2.y, 0.0f), n, uv1.x,uv1.y); - vertex[2] = D3DVERTEX2(Math::Vector(p2.x, p1.y, 0.0f), n, uv2.x,uv2.y); - vertex[3] = D3DVERTEX2(Math::Vector(p2.x, p2.y, 0.0f), n, uv2.x,uv1.y); + vertex[0] = Gfx::VertexTex2(Math::Vector(p1.x, p1.y, 0.0f), n, Math::Point(uv1.x,uv2.y)); + vertex[1] = Gfx::VertexTex2(Math::Vector(p1.x, p2.y, 0.0f), n, Math::Point(uv1.x,uv1.y)); + vertex[2] = Gfx::VertexTex2(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x,uv2.y)); + vertex[3] = Gfx::VertexTex2(Math::Vector(p2.x, p2.y, 0.0f), n, Math::Point(uv2.x,uv1.y)); - device->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, 4, NULL); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); m_engine->AddStatisticTriangle(2); } @@ -1021,7 +991,7 @@ void CMap::DrawVertex(Math::Point uv1, Math::Point uv2, float zoom) void CMap::UpdateTerrain() { - D3DCOLORVALUE color; + Gfx::Color color; Math::Vector pos; float scale, water, level, intensity; int x, y; @@ -1029,8 +999,8 @@ void CMap::UpdateTerrain() if ( m_fixImage[0] != 0 ) return; // still image? if ( !m_engine->OpenImage("map.tga") ) return; - scale = m_terrain->RetScaleRelief(); - water = m_water->RetLevel(); + scale = m_terrain->GetScaleRelief(); + water = m_water->GetLevel(); color.a = 0.0f; for ( y=0 ; y<256 ; y++ ) @@ -1044,7 +1014,7 @@ void CMap::UpdateTerrain() if ( pos.x >= -m_half && pos.x <= m_half && pos.z >= -m_half && pos.z <= m_half ) { - level = m_terrain->RetFloorLevel(pos, true)/scale; + level = m_terrain->GetFloorLevel(pos, true)/scale; } else { @@ -1080,7 +1050,7 @@ void CMap::UpdateTerrain() void CMap::UpdateTerrain(int bx, int by, int ex, int ey) { - D3DCOLORVALUE color; + Gfx::Color color; Math::Vector pos; float scale, water, level, intensity; int x, y; @@ -1089,8 +1059,8 @@ void CMap::UpdateTerrain(int bx, int by, int ex, int ey) if ( !m_engine->OpenImage("map.tga") ) return; m_engine->LoadImage(); - scale = m_terrain->RetScaleRelief(); - water = m_water->RetLevel(); + scale = m_terrain->GetScaleRelief(); + water = m_water->GetLevel(); color.a = 0.0f; for ( y=by ; y= -m_half && pos.x <= m_half && pos.z >= -m_half && pos.z <= m_half ) { - level = m_terrain->RetFloorLevel(pos, true)/scale; + level = m_terrain->GetFloorLevel(pos, true)/scale; } else { @@ -1145,7 +1115,7 @@ void CMap::FlushObject() m_totalFix = 0; // object index fixed m_totalMove = MAPMAXOBJECT-2; // moving vehicles index - m_bRadar = m_main->RetCheatRadar(); // no radar + //m_bRadar = m_main->GetCheatRadar(); // no radar for ( i=0 ; i= m_totalMove ) return; // full table? - if ( !pObj->RetActif() ) return; - if ( !pObj->RetSelectable() ) return; - if ( pObj->RetProxyActivate() ) return; - if ( pObj->RetTruck() != 0 ) return; + if ( !pObj->GetActif() ) return; + if ( !pObj->GetSelectable() ) return; + if ( pObj->GetProxyActivate() ) return; + if ( pObj->GetTruck() != 0 ) return; - type = pObj->RetType(); - pos = pObj->RetPosition(0); - dir = -(pObj->RetAngleY(0)+Math::PI/2.0f); + type = pObj->GetType(); + pos = pObj->GetPosition(0); + dir = -(pObj->GetAngleY(0)+Math::PI/2.0f); if ( m_angle != 0.0f ) { @@ -1299,7 +1269,7 @@ void CMap::UpdateObject(CObject* pObj) color != MAPCOLOR_MOVE ) return; } - if ( pObj->RetSelect() ) + if ( pObj->GetSelect() ) { m_map[MAPMAXOBJECT-1].type = type; m_map[MAPMAXOBJECT-1].object = pObj; @@ -1337,3 +1307,4 @@ void CMap::UpdateObject(CObject* pObj) } } +} diff --git a/src/ui/map.h b/src/ui/map.h index 693398c..18020af 100644 --- a/src/ui/map.h +++ b/src/ui/map.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -22,11 +23,21 @@ #include #include +#include #include +#include -class CTerrain; -class CWater; +#include +#include +#include +#include +#include + +#include + + +namespace Ui { const int MAPMAXOBJECT = 100; @@ -59,77 +70,78 @@ struct MapObject class CMap : public CControl { -public: - CMap(); - ~CMap(); - - bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); - bool EventProcess(const Event &event); - void Draw(); - - void UpdateTerrain(); - void UpdateTerrain(int bx, int by, int ex, int ey); - - void SetFixImage(char *filename); - bool RetFixImage(); - - void SetOffset(float ox, float oy); - void SetAngle(float angle); - void SetMode(int mode); - void SetToy(bool bToy); - void SetDebug(bool bDebug); - - void SetZoom(float value); - float RetZoom(); - - void SetEnable(bool bEnable); - bool RetEnable(); - - void SetFloorColor(D3DCOLORVALUE color); - void SetWaterColor(D3DCOLORVALUE color); - - void FlushObject(); - void UpdateObject(CObject* pObj); - - CObject* DetectObject(Math::Point pos, bool &bInMap); - void SetHilite(CObject* pObj); - -protected: - Math::Point AdjustOffset(Math::Point offset); - void SelectObject(Math::Point pos); - Math::Point MapInter(Math::Point pos, float dir); - void DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color); - void DrawObject(Math::Point pos, float dir, ObjectType type, MapColor color, bool bSelect, bool bHilite); - void DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, ObjectType type, bool bHilite); - void DrawHilite(Math::Point pos); - void DrawTriangle(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point uv1, Math::Point uv2); - void DrawPenta(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point p4, Math::Point p5, Math::Point uv1, Math::Point uv2); - void DrawVertex(Math::Point uv1, Math::Point uv2, float zoom); - -protected: - CTerrain* m_terrain; - CWater* m_water; - CRobotMain* m_main; - - bool m_bEnable; - float m_time; - float m_half; - float m_zoom; - Math::Point m_offset; - float m_angle; - D3DCOLORVALUE m_floorColor; - D3DCOLORVALUE m_waterColor; - MapObject m_map[MAPMAXOBJECT]; - int m_totalFix; - int m_totalMove; - int m_hiliteRank; - Math::Point m_mapPos; - Math::Point m_mapDim; - bool m_bRadar; - char m_fixImage[100]; - int m_mode; - bool m_bToy; - bool m_bDebug; + public: + CMap(); + ~CMap(); + + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + bool EventProcess(const Event &event); + void Draw(); + + void UpdateTerrain(); + void UpdateTerrain(int bx, int by, int ex, int ey); + + void SetFixImage(const char *filename); + bool GetFixImage(); + + void SetOffset(float ox, float oy); + void SetAngle(float angle); + void SetMode(int mode); + void SetToy(bool bToy); + void SetDebug(bool bDebug); + + void SetZoom(float value); + float GetZoom(); + + void SetEnable(bool bEnable); + bool GetEnable(); + + void SetFloorColor(Gfx::Color color); + void SetWaterColor(Gfx::Color color); + + void FlushObject(); + void UpdateObject(CObject* pObj); + + CObject* DetectObject(Math::Point pos, bool &bInMap); + void SetHighlight(CObject* pObj); + + protected: + Math::Point AdjustOffset(Math::Point offset); + void SelectObject(Math::Point pos); + Math::Point MapInter(Math::Point pos, float dir); + void DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color); + void DrawObject(Math::Point pos, float dir, ObjectType type, MapColor color, bool bSelect, bool bHilite); + void DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, ObjectType type, bool bHilite); + void DrawHighlight(Math::Point pos); + void DrawTriangle(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point uv1, Math::Point uv2); + void DrawPenta(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point p4, Math::Point p5, Math::Point uv1, Math::Point uv2); + void DrawVertex(Math::Point uv1, Math::Point uv2, float zoom); + + protected: + Gfx::CTerrain* m_terrain; + Gfx::CWater* m_water; + CRobotMain* m_main; + + bool m_bEnable; + float m_time; + float m_half; + float m_zoom; + Math::Point m_offset; + float m_angle; + Gfx::Color m_floorColor; + Gfx::Color m_waterColor; + MapObject m_map[MAPMAXOBJECT]; + int m_totalFix; + int m_totalMove; + int m_highlightRank; + Math::Point m_mapPos; + Math::Point m_mapDim; + bool m_bRadar; + char m_fixImage[100]; + int m_mode; + bool m_bToy; + bool m_bDebug; }; +} -- cgit v1.2.3-1-g7c22 From 5408fe92527a4df01e4d66a2cdfdbbbea5738afc Mon Sep 17 00:00:00 2001 From: erihel Date: Tue, 21 Aug 2012 21:38:13 +0200 Subject: * added nullptr * changed Ret to Get function names * minor changes --- src/object/robotmain.cpp | 744 +++++++++++++++++++++++------------------------ src/object/robotmain.h | 108 +++---- src/ui/mainmap.cpp | 5 +- src/ui/mainshort.cpp | 92 +++--- src/ui/mainshort.h | 65 +++-- src/ui/map.cpp | 2 +- 6 files changed, 503 insertions(+), 513 deletions(-) diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 83eca52..0213401 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -634,7 +634,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan) m_displayInfo = 0; m_engine->SetTerrain(m_terrain); - m_filesDir = m_dialog->RetFilesDir(); + m_filesDir = m_dialog->GetFilesDir(); m_time = 0.0f; m_gameTime = 0.0f; @@ -657,7 +657,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan) m_bEditLock = false; m_bEditFull = false; m_bPause = false; - m_bHilite = false; + m_bHighlight = false; m_bFreePhoto = false; m_bShowPos = false; m_bSelectInsect = false; @@ -869,8 +869,8 @@ void CRobotMain::ChangePhase(Phase phase) if ( m_gameTime > 10.0f ) // did you play at least 10 seconds? #endif { - rank = m_dialog->RetSceneRank(); - numTry = m_dialog->RetGamerInfoTry(rank); + rank = m_dialog->GetSceneRank(); + numTry = m_dialog->GetGamerInfoTry(rank); m_dialog->SetGamerInfoTry(rank, numTry+1); m_dialog->WriteGamerInfo(); } @@ -878,7 +878,7 @@ void CRobotMain::ChangePhase(Phase phase) if ( phase == PHASE_WIN ) // wins a simulation? { - rank = m_dialog->RetSceneRank(); + rank = m_dialog->GetSceneRank(); m_dialog->SetGamerInfoPassed(rank, true); m_dialog->NextMission(); // passes to the next mission m_dialog->WriteGamerInfo(); @@ -1060,11 +1060,11 @@ void CRobotMain::ChangePhase(Phase phase) m_engine->FreeTexture("inter01c.tga"); m_engine->FreeTexture("inter01d.tga"); - read = m_dialog->RetSceneRead(); + read = m_dialog->GetSceneRead(); bLoading = (read[0] != 0); m_map->CreateMap(); - CreateScene(m_dialog->RetSceneSoluce(), false, false); // interactive scene + CreateScene(m_dialog->GetSceneSoluce(), false, false); // interactive scene if ( m_bMapImage ) { m_map->SetFixImage(m_mapFilename); @@ -1116,7 +1116,7 @@ void CRobotMain::ChangePhase(Phase phase) pe = m_interface->CreateEdit(pos, ddim, 0, EVENT_EDIT0); pe->SetFontType(FONT_COLOBOT); pe->SetEditCap(false); - pe->SetHiliteCap(false); + pe->SetHighlightCap(false); pe->ReadText("help\\teenw.txt"); #else pos.x = ox+sx*3; pos.y = oy+sy*0.2f; @@ -1125,7 +1125,7 @@ void CRobotMain::ChangePhase(Phase phase) pe->SetGenericMode(true); pe->SetFontType(FONT_COLOBOT); pe->SetEditCap(false); - pe->SetHiliteCap(false); + pe->SetHighlightCap(false); pe->ReadText("help\\win.txt"); #endif } @@ -1195,7 +1195,7 @@ bool CRobotMain::EventProcess(const Event &event) { if ( !m_movie->EventProcess(event) ) // end of the movie? { - type = m_movie->RetStopType(); + type = m_movie->GetStopType(); if ( type == MM_SATCOMopen ) { ChangePause(false); @@ -1268,7 +1268,7 @@ bool CRobotMain::EventProcess(const Event &event) if ( event.event == EVENT_MOUSEMOVE ) { m_lastMousePos = event.pos; - HiliteObject(event.pos); + HighlightObject(event.pos); } return false; } @@ -1281,7 +1281,7 @@ bool CRobotMain::EventProcess(const Event &event) if ( event.event == EVENT_MOUSEMOVE ) { m_lastMousePos = event.pos; - HiliteObject(event.pos); + HighlightObject(event.pos); } if ( m_displayInfo != 0 ) // current info? @@ -1290,10 +1290,10 @@ bool CRobotMain::EventProcess(const Event &event) if ( event.event == EVENT_KEYDOWN ) { - if ( event.param == m_engine->RetKey(KEYRANK_HELP, 0) || - event.param == m_engine->RetKey(KEYRANK_HELP, 1) || - event.param == m_engine->RetKey(KEYRANK_PROG, 0) || - event.param == m_engine->RetKey(KEYRANK_PROG, 1) || + if ( event.param == m_engine->GetKey(KEYRANK_HELP, 0) || + event.param == m_engine->GetKey(KEYRANK_HELP, 1) || + event.param == m_engine->GetKey(KEYRANK_PROG, 0) || + event.param == m_engine->GetKey(KEYRANK_PROG, 1) || event.param == VK_ESCAPE ) { StopDisplayInfo(); @@ -1320,7 +1320,7 @@ bool CRobotMain::EventProcess(const Event &event) { case EVENT_KEYDOWN: KeyCamera(event.event, event.param); - HiliteClear(); + HighlightClear(); if ( event.param == VK_F11 ) { m_particule->WriteWheelTrace("Savegame\\t.bmp", 256, 256, Math::Vector(16.0f, 0.0f, -368.0f), Math::Vector(140.0f, 0.0f, -248.0f)); @@ -1328,14 +1328,14 @@ bool CRobotMain::EventProcess(const Event &event) } if ( m_bEditLock ) // current edition? { - if ( event.param == m_engine->RetKey(KEYRANK_HELP, 0) || - event.param == m_engine->RetKey(KEYRANK_HELP, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_HELP, 0) || + event.param == m_engine->GetKey(KEYRANK_HELP, 1) ) { StartDisplayInfo(SATCOM_HUSTON, false); return false; } - if ( event.param == m_engine->RetKey(KEYRANK_PROG, 0) || - event.param == m_engine->RetKey(KEYRANK_PROG, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_PROG, 0) || + event.param == m_engine->GetKey(KEYRANK_PROG, 1) ) { StartDisplayInfo(SATCOM_PROG, false); return false; @@ -1344,31 +1344,31 @@ bool CRobotMain::EventProcess(const Event &event) } if ( m_bMovieLock ) // current movie? { - if ( event.param == m_engine->RetKey(KEYRANK_QUIT, 0) || - event.param == m_engine->RetKey(KEYRANK_QUIT, 1) || + if ( event.param == m_engine->GetKey(KEYRANK_QUIT, 0) || + event.param == m_engine->GetKey(KEYRANK_QUIT, 1) || event.param == VK_ESCAPE ) { AbortMovie(); } return false; } - if ( m_camera->RetType() == CAMERA_VISIT ) + if ( m_camera->GetType() == CAMERA_VISIT ) { - if ( event.param == m_engine->RetKey(KEYRANK_VISIT, 0) || - event.param == m_engine->RetKey(KEYRANK_VISIT, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_VISIT, 0) || + event.param == m_engine->GetKey(KEYRANK_VISIT, 1) ) { StartDisplayVisit(EVENT_NULL); } - if ( event.param == m_engine->RetKey(KEYRANK_QUIT, 0) || - event.param == m_engine->RetKey(KEYRANK_QUIT, 1) || + if ( event.param == m_engine->GetKey(KEYRANK_QUIT, 0) || + event.param == m_engine->GetKey(KEYRANK_QUIT, 1) || event.param == VK_ESCAPE ) { StopDisplayVisit(); } return false; } - if ( event.param == m_engine->RetKey(KEYRANK_QUIT, 0) || - event.param == m_engine->RetKey(KEYRANK_QUIT, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_QUIT, 0) || + event.param == m_engine->GetKey(KEYRANK_QUIT, 1) ) { if ( m_movie->IsExist() ) { @@ -1390,70 +1390,70 @@ bool CRobotMain::EventProcess(const Event &event) if ( event.param == VK_PAUSE ) { if ( !m_bMovieLock && !m_bEditLock && !m_bCmdEdit && - m_camera->RetType() != CAMERA_VISIT && + m_camera->GetType() != CAMERA_VISIT && !m_movie->IsExist() ) { - ChangePause(!m_engine->RetPause()); + ChangePause(!m_engine->GetPause()); } } - if ( event.param == m_engine->RetKey(KEYRANK_CAMERA, 0) || - event.param == m_engine->RetKey(KEYRANK_CAMERA, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_CAMERA, 0) || + event.param == m_engine->GetKey(KEYRANK_CAMERA, 1) ) { ChangeCamera(); } - if ( event.param == m_engine->RetKey(KEYRANK_DESEL, 0) || - event.param == m_engine->RetKey(KEYRANK_DESEL, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_DESEL, 0) || + event.param == m_engine->GetKey(KEYRANK_DESEL, 1) ) { if ( m_bShortCut ) { DeselectObject(); } } - if ( event.param == m_engine->RetKey(KEYRANK_HUMAN, 0) || - event.param == m_engine->RetKey(KEYRANK_HUMAN, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_HUMAN, 0) || + event.param == m_engine->GetKey(KEYRANK_HUMAN, 1) ) { SelectHuman(); } - if ( event.param == m_engine->RetKey(KEYRANK_NEXT, 0) || - event.param == m_engine->RetKey(KEYRANK_NEXT, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_NEXT, 0) || + event.param == m_engine->GetKey(KEYRANK_NEXT, 1) ) { if ( m_bShortCut ) { m_short->SelectNext(); } } - if ( event.param == m_engine->RetKey(KEYRANK_HELP, 0) || - event.param == m_engine->RetKey(KEYRANK_HELP, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_HELP, 0) || + event.param == m_engine->GetKey(KEYRANK_HELP, 1) ) { StartDisplayInfo(SATCOM_HUSTON, true); } - if ( event.param == m_engine->RetKey(KEYRANK_PROG, 0) || - event.param == m_engine->RetKey(KEYRANK_PROG, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_PROG, 0) || + event.param == m_engine->GetKey(KEYRANK_PROG, 1) ) { StartDisplayInfo(SATCOM_PROG, true); } - if ( event.param == m_engine->RetKey(KEYRANK_VISIT, 0) || - event.param == m_engine->RetKey(KEYRANK_VISIT, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_VISIT, 0) || + event.param == m_engine->GetKey(KEYRANK_VISIT, 1) ) { StartDisplayVisit(EVENT_NULL); } - if ( event.param == m_engine->RetKey(KEYRANK_SPEED10, 0) || - event.param == m_engine->RetKey(KEYRANK_SPEED10, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_SPEED10, 0) || + event.param == m_engine->GetKey(KEYRANK_SPEED10, 1) ) { SetSpeed(1.0f); } - if ( event.param == m_engine->RetKey(KEYRANK_SPEED15, 0) || - event.param == m_engine->RetKey(KEYRANK_SPEED15, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_SPEED15, 0) || + event.param == m_engine->GetKey(KEYRANK_SPEED15, 1) ) { SetSpeed(1.5f); } - if ( event.param == m_engine->RetKey(KEYRANK_SPEED20, 0) || - event.param == m_engine->RetKey(KEYRANK_SPEED20, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_SPEED20, 0) || + event.param == m_engine->GetKey(KEYRANK_SPEED20, 1) ) { SetSpeed(2.0f); } - if ( event.param == m_engine->RetKey(KEYRANK_SPEED30, 0) || - event.param == m_engine->RetKey(KEYRANK_SPEED30, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_SPEED30, 0) || + event.param == m_engine->GetKey(KEYRANK_SPEED30, 1) ) { SetSpeed(3.0f); } @@ -1466,7 +1466,7 @@ bool CRobotMain::EventProcess(const Event &event) case EVENT_LBUTTONDOWN: pObj = DetectObject(event.pos); if ( !m_bShortCut ) pObj = 0; - if ( pObj != 0 && pObj->RetType() == OBJECT_TOTO ) + if ( pObj != 0 && pObj->GetType() == OBJECT_TOTO ) { if ( m_displayInfo != 0 ) // current info? { @@ -1803,7 +1803,7 @@ void CRobotMain::ExecuteCmd(char *cmd) object = RetSelect(); if ( object != 0 ) { - object->SetMagnifyDamage(object->RetMagnifyDamage()*0.1f); + object->SetMagnifyDamage(object->GetMagnifyDamage()*0.1f); } return; } @@ -1815,7 +1815,7 @@ void CRobotMain::ExecuteCmd(char *cmd) object = RetSelect(); if ( object != 0 ) { - object->SetRange(object->RetRange()*10.0f); + object->SetRange(object->GetRange()*10.0f); } return; } @@ -1829,13 +1829,13 @@ void CRobotMain::ExecuteCmd(char *cmd) object = RetSelect(); if ( object != 0 ) { - power = object->RetPower(); + power = object->GetPower(); if ( power != 0 ) { power->SetEnergy(1.0f); } object->SetShield(1.0f); - physics = object->RetPhysics(); + physics = object->GetPhysics(); if ( physics != 0 ) { physics->SetReactorRange(1.0f); @@ -1852,7 +1852,7 @@ void CRobotMain::ExecuteCmd(char *cmd) object = RetSelect(); if ( object != 0 ) { - power = object->RetPower(); + power = object->GetPower(); if ( power != 0 ) { power->SetEnergy(1.0f); @@ -1881,7 +1881,7 @@ void CRobotMain::ExecuteCmd(char *cmd) object = RetSelect(); if ( object != 0 ) { - physics = object->RetPhysics(); + physics = object->GetPhysics(); if ( physics != 0 ) { physics->SetReactorRange(1.0f); @@ -1893,55 +1893,55 @@ void CRobotMain::ExecuteCmd(char *cmd) if ( strcmp(cmd, "debugmode") == 0 ) { - m_engine->SetDebugMode(!m_engine->RetDebugMode()); + m_engine->SetDebugMode(!m_engine->GetDebugMode()); return; } if ( strcmp(cmd, "showstat") == 0 ) { - m_engine->SetShowStat(!m_engine->RetShowStat()); + m_engine->SetShowStat(!m_engine->GetShowStat()); return; } if ( strcmp(cmd, "invshadow") == 0 ) { - m_engine->SetShadow(!m_engine->RetShadow()); + m_engine->SetShadow(!m_engine->GetShadow()); return; } if ( strcmp(cmd, "invdirty") == 0 ) { - m_engine->SetDirty(!m_engine->RetDirty()); + m_engine->SetDirty(!m_engine->GetDirty()); return; } if ( strcmp(cmd, "invfog") == 0 ) { - m_engine->SetFog(!m_engine->RetFog()); + m_engine->SetFog(!m_engine->GetFog()); return; } if ( strcmp(cmd, "invlens") == 0 ) { - m_engine->SetLensMode(!m_engine->RetLensMode()); + m_engine->SetLensMode(!m_engine->GetLensMode()); return; } if ( strcmp(cmd, "invwater") == 0 ) { - m_engine->SetWaterMode(!m_engine->RetWaterMode()); + m_engine->SetWaterMode(!m_engine->GetWaterMode()); return; } if ( strcmp(cmd, "invsky") == 0 ) { - m_engine->SetSkyMode(!m_engine->RetSkyMode()); + m_engine->SetSkyMode(!m_engine->GetSkyMode()); return; } if ( strcmp(cmd, "invplanet") == 0 ) { - m_engine->SetPlanetMode(!m_engine->RetPlanetMode()); + m_engine->SetPlanetMode(!m_engine->GetPlanetMode()); return; } @@ -1991,9 +1991,9 @@ void CRobotMain::ExecuteCmd(char *cmd) // Returns the type of current movie. -MainMovieType CRobotMain::RetMainMovie() +MainMovieType CRobotMain::GetMainMovie() { - return m_movie->RetType(); + return m_movie->GetType(); } @@ -2024,12 +2024,12 @@ void CRobotMain::StartDisplayInfo(int index, bool bMovie) if ( m_bCmdEdit || m_bSatComLock ) return; pObj = RetSelect(); - bHuman = ( pObj != 0 && pObj->RetType() == OBJECT_HUMAN ); + bHuman = ( pObj != 0 && pObj->GetType() == OBJECT_HUMAN ); if ( !m_bEditLock && bMovie && !m_movie->IsExist() && bHuman ) { - motion = pObj->RetMotion(); - if ( motion != 0 && motion->RetAction() == -1 ) + motion = pObj->GetMotion(); + if ( motion != 0 && motion->GetAction() == -1 ) { m_movieInfoIndex = index; m_movie->Start(MM_SATCOMopen, 2.5f); @@ -2079,7 +2079,7 @@ void CRobotMain::StartDisplayInfo(char *filename, int index) pb->ClearState(STATE_VISIBLE); } - bSoluce = m_dialog->RetSceneSoluce(); + bSoluce = m_dialog->GetSceneSoluce(); m_displayInfo = new CDisplayInfo(m_iMan); m_displayInfo->StartDisplayInfo(filename, index, bSoluce); @@ -2104,7 +2104,7 @@ void CRobotMain::StopDisplayInfo() if ( m_infoIndex != -1 ) { - m_infoPos[m_infoIndex] = m_displayInfo->RetPosition(); + m_infoPos[m_infoIndex] = m_displayInfo->GetPosition(); } m_displayInfo->StopDisplayInfo(); @@ -2135,14 +2135,14 @@ void CRobotMain::StopDisplayInfo() // Returns the name of the text display. -char* CRobotMain::RetDisplayInfoName(int index) +char* CRobotMain::GetDisplayInfoName(int index) { return m_infoFilename[index]; } // Returns the name of the text display. -int CRobotMain::RetDisplayInfoPosition(int index) +int CRobotMain::GetDisplayInfoPosition(int index) { return m_infoPos[index]; } @@ -2196,7 +2196,7 @@ void CRobotMain::StopSuspend() // Returns the absolute time of the game -float CRobotMain::RetGameTime() +float CRobotMain::GetGameTime() { return m_gameTime; } @@ -2211,7 +2211,7 @@ void CRobotMain::SetFontSize(float size) SetLocalProfileFloat("Edit", "FontSize", m_fontSize); } -float CRobotMain::RetFontSize() +float CRobotMain::GetFontSize() { return m_fontSize; } @@ -2225,7 +2225,7 @@ void CRobotMain::SetWindowPos(Math::Point pos) SetLocalProfileFloat("Edit", "WindowPos.y", m_windowPos.y); } -Math::Point CRobotMain::RetWindowPos() +Math::Point CRobotMain::GetWindowPos() { return m_windowPos; } @@ -2237,7 +2237,7 @@ void CRobotMain::SetWindowDim(Math::Point dim) SetLocalProfileFloat("Edit", "WindowDim.y", m_windowDim.y); } -Math::Point CRobotMain::RetWindowDim() +Math::Point CRobotMain::GetWindowDim() { return m_windowDim; } @@ -2251,7 +2251,7 @@ void CRobotMain::SetIOPublic(bool bMode) SetLocalProfileInt("Edit", "IOPublic", m_IOPublic); } -bool CRobotMain::RetIOPublic() +bool CRobotMain::GetIOPublic() { return m_IOPublic; } @@ -2263,7 +2263,7 @@ void CRobotMain::SetIOPos(Math::Point pos) SetLocalProfileFloat("Edit", "IOPos.y", m_IOPos.y); } -Math::Point CRobotMain::RetIOPos() +Math::Point CRobotMain::GetIOPos() { return m_IOPos; } @@ -2275,7 +2275,7 @@ void CRobotMain::SetIODim(Math::Point dim) SetLocalProfileFloat("Edit", "IODim.y", m_IODim.y); } -Math::Point CRobotMain::RetIODim() +Math::Point CRobotMain::GetIODim() { return m_IODim; } @@ -2336,7 +2336,7 @@ void CRobotMain::StartDisplayVisit(EventMsg event) ClearInterface(); // removes setting evidence and tooltip - if ( m_camera->RetType() == CAMERA_VISIT ) // already a current visit? + if ( m_camera->GetType() == CAMERA_VISIT ) // already a current visit? { m_camera->StopVisit(); m_displayText->ClearVisit(); @@ -2363,12 +2363,12 @@ void CRobotMain::StartDisplayVisit(EventMsg event) delete m_visitArrow; m_visitArrow = 0; } - goal = m_displayText->RetVisitGoal(event); + goal = m_displayText->GetVisitGoal(event); m_visitArrow = CreateObject(goal, 0.0f, 1.0f, 10.0f, OBJECT_SHOW, false, false, 0); - m_visitPos = m_visitArrow->RetPosition(0); + m_visitPos = m_visitArrow->GetPosition(0); m_visitPosArrow = m_visitPos; - m_visitPosArrow.y += m_displayText->RetVisitHeight(event); + m_visitPosArrow.y += m_displayText->GetVisitHeight(event); m_visitArrow->SetPosition(0, m_visitPosArrow); m_visitTime = 0.0; @@ -2376,8 +2376,8 @@ void CRobotMain::StartDisplayVisit(EventMsg event) m_particule->DeleteParticule(PARTISHOW); - m_camera->StartVisit(m_displayText->RetVisitGoal(event), - m_displayText->RetVisitDist(event)); + m_camera->StartVisit(m_displayText->GetVisitGoal(event), + m_displayText->GetVisitDist(event)); m_displayText->SetVisit(event); ChangePause(true); } @@ -2407,7 +2407,7 @@ void CRobotMain::FrameVisit(float rTime) m_visitParticule = 1.5f; pos = m_visitPos; - level = m_terrain->RetFloorLevel(pos)+2.0f; + level = m_terrain->GetFloorLevel(pos)+2.0f; if ( pos.y < level ) pos.y = level; // not below the ground speed = Math::Vector(0.0f, 0.0f, 0.0f); dim.x = 30.0f; @@ -2457,7 +2457,7 @@ void CRobotMain::UpdateShortcuts() // Returns the object that default was select after the creation of a scene. -CObject* CRobotMain::RetSelectObject() +CObject* CRobotMain::GetSelectObject() { if ( m_selectObject != 0 ) return m_selectObject; return SearchHuman(); @@ -2477,7 +2477,7 @@ CObject* CRobotMain::DeselectAll() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetSelect() ) pPrev = pObj; + if ( pObj->GetSelect() ) pPrev = pObj; pObj->SetSelect(false); } return pPrev; @@ -2494,7 +2494,7 @@ void CRobotMain::SelectOneObject(CObject* pObj, bool bDisplayError) pObj->SetSelect(true, bDisplayError); m_camera->SetObject(pObj); - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN || type == OBJECT_MOBILEfa || type == OBJECT_MOBILEta || @@ -2524,8 +2524,8 @@ void CRobotMain::SelectOneObject(CObject* pObj, bool bDisplayError) type == OBJECT_MOBILEdr || type == OBJECT_APOLLO2 ) { - m_camera->SetType(pObj->RetCameraType()); - m_camera->SetDist(pObj->RetCameraDist()); + m_camera->SetType(pObj->GetCameraType()); + m_camera->SetDist(pObj->GetCameraDist()); } else { @@ -2535,7 +2535,7 @@ void CRobotMain::SelectOneObject(CObject* pObj, bool bDisplayError) toto = SearchToto(); if ( toto != 0 ) { - mt = (CMotionToto*)toto->RetMotion(); + mt = (CMotionToto*)toto->GetMotion(); if ( mt != 0 ) { mt->SetLinkType(type); @@ -2549,7 +2549,7 @@ bool CRobotMain::SelectObject(CObject* pObj, bool bDisplayError) { CObject* pPrev; - if ( m_camera->RetType() == CAMERA_VISIT ) + if ( m_camera->GetType() == CAMERA_VISIT ) { StopDisplayVisit(); } @@ -2666,7 +2666,7 @@ CObject* CRobotMain::SearchHuman() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) { return pObj; @@ -2688,7 +2688,7 @@ CObject* CRobotMain::SearchToto() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_TOTO ) { return pObj; @@ -2717,10 +2717,10 @@ CObject* CRobotMain::SearchNearest(Math::Vector pos, CObject* pExclu) if ( pObj == pExclu ) continue; if ( !IsSelectable(pObj) ) continue; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_TOTO ) continue; - oPos = pObj->RetPosition(0); + oPos = pObj->GetPosition(0); dist = Math::DistanceProjected(oPos, pos); if ( dist < min ) { @@ -2733,7 +2733,7 @@ CObject* CRobotMain::SearchNearest(Math::Vector pos, CObject* pExclu) // Returns the selected object. -CObject* CRobotMain::RetSelect() +CObject* CRobotMain::GetSelect() { CObject* pObj; int i; @@ -2743,7 +2743,7 @@ CObject* CRobotMain::RetSelect() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetSelect() ) + if ( pObj->GetSelect() ) { return pObj; } @@ -2761,7 +2761,7 @@ CObject* CRobotMain::SearchObject(ObjectType type) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetType() == type ) + if ( pObj->GetType() == type ) { return pObj; } @@ -2784,11 +2784,11 @@ CObject* CRobotMain::DetectObject(Math::Point pos) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( !pObj->RetActif() ) continue; - if ( pObj->RetProxyActivate() ) continue; + if ( !pObj->GetActif() ) continue; + if ( pObj->GetProxyActivate() ) continue; pTarget = 0; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_PORTICO || type == OBJECT_BASE || type == OBJECT_DERRICK || @@ -2900,9 +2900,9 @@ CObject* CRobotMain::DetectObject(Math::Point pos) } else if ( (type == OBJECT_POWER || type == OBJECT_ATOMIC ) && - pObj->RetTruck() != 0 ) // battery used? + pObj->GetTruck() != 0 ) // battery used? { - pTarget = pObj->RetTruck(); + pTarget = pObj->GetTruck(); } else if ( type == OBJECT_POWER || type == OBJECT_ATOMIC ) @@ -2912,7 +2912,7 @@ CObject* CRobotMain::DetectObject(Math::Point pos) for ( j=0 ; jRetObjectRank(j); + rank = pObj->GetObjectRank(j); if ( rank == -1 ) continue; if ( rank != objRank ) continue; return pTarget; @@ -2927,9 +2927,9 @@ bool CRobotMain::IsSelectable(CObject* pObj) { ObjectType type; - if ( !pObj->RetSelectable() ) return false; + if ( !pObj->GetSelectable() ) return false; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN || type == OBJECT_TOTO || type == OBJECT_MOBILEfa || @@ -3021,7 +3021,7 @@ bool CRobotMain::DeleteObject() // Removes setting evidence of the object with the mouse hovers over. -void CRobotMain::HiliteClear() +void CRobotMain::HighlightClear() { CObject* pObj; int i; @@ -3029,27 +3029,27 @@ void CRobotMain::HiliteClear() ClearTooltip(); m_tooltipName[0] = 0; // really removes the tooltip - if ( !m_bHilite ) return; + if ( !m_bHighlight ) return; i = -1; - m_engine->SetHiliteRank(&i); // nothing more selected + m_engine->SetHighlightRank(&i); // nothing more selected for ( i=0 ; i<1000000 ; i++ ) { pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - pObj->SetHilite(false); - m_map->SetHilite(0); - m_short->SetHilite(0); + pObj->SetHighlight(false); + m_map->SetHighlight(0); + m_short->SetHighlight(0); } - m_bHilite = false; + m_bHighlight = false; } // Highlights the object with the mouse hovers over. -void CRobotMain::HiliteObject(Math::Point pos) +void CRobotMain::HighlightObject(Math::Point pos) { CObject* pObj; char name[100]; @@ -3058,13 +3058,13 @@ void CRobotMain::HiliteObject(Math::Point pos) if ( m_bFixScene && m_phase != PHASE_PERSO ) return; if ( m_bMovieLock ) return; if ( m_movie->IsExist() ) return; - if ( m_engine->RetMouseHide() ) return; + if ( m_engine->GetMouseHide() ) return; ClearInterface(); // removes setting evidence and tooltip pObj = m_short->DetectShort(pos); - if ( m_dialog->RetTooltip() && m_interface->GetTooltip(pos, name) ) + if ( m_dialog->GetTooltip() && m_interface->GetTooltip(pos, name) ) { m_tooltipPos = pos; strcpy(m_tooltipName, name); @@ -3083,8 +3083,8 @@ void CRobotMain::HiliteObject(Math::Point pos) pObj = DetectObject(pos); - if ( m_camera->RetType() == CAMERA_ONBOARD && - m_camera->RetObject() == pObj ) + if ( m_camera->GetType() == CAMERA_ONBOARD && + m_camera->GetObject() == pObj ) { return; } @@ -3093,7 +3093,7 @@ void CRobotMain::HiliteObject(Math::Point pos) if ( pObj != 0 ) { - if ( m_dialog->RetTooltip() && pObj->GetTooltipName(name) ) + if ( m_dialog->GetTooltip() && pObj->GetTooltipName(name) ) { m_tooltipPos = pos; strcpy(m_tooltipName, name); @@ -3102,17 +3102,17 @@ void CRobotMain::HiliteObject(Math::Point pos) if ( IsSelectable(pObj) ) { - pObj->SetHilite(true); - m_map->SetHilite(pObj); - m_short->SetHilite(pObj); - m_bHilite = true; + pObj->SetHighlight(true); + m_map->SetHighlight(pObj); + m_short->SetHighlight(pObj); + m_bHighlight = true; } } } // Highlights the object with the mouse hovers over. -void CRobotMain::HiliteFrame(float rTime) +void CRobotMain::HighlightFrame(float rTime) { if ( m_bFixScene && m_phase != PHASE_PERSO ) return; if ( m_bMovieLock ) return; @@ -3139,7 +3139,7 @@ void CRobotMain::CreateTooltip(Math::Point pos, char* text) corner.x = pos.x+0.022f; corner.y = pos.y-0.052f; - m_engine->RetText()->DimText(text, corner, 1, + m_engine->GetText()->DimText(text, corner, 1, SMALLFONT, NORMSTRETCH, FONT_COLOBOT, start, end); start.x -= 0.010f; @@ -3170,7 +3170,7 @@ void CRobotMain::CreateTooltip(Math::Point pos, char* text) pw->SetState(STATE_SHADOW); pw->SetTrashEvent(false); - pos.y -= m_engine->RetText()->RetHeight(SMALLFONT, FONT_COLOBOT)/2.0f; + pos.y -= m_engine->GetText()->GetHeight(SMALLFONT, FONT_COLOBOT)/2.0f; pw->CreateLabel(pos, dim, -1, EVENT_LABEL2, text); } } @@ -3193,7 +3193,7 @@ void CRobotMain::HelpObject() pObj = RetSelect(); if ( pObj == 0 ) return; - filename = RetHelpFilename(pObj->RetType()); + filename = RetHelpFilename(pObj->GetType()); if ( filename[0] == 0 ) return; StartDisplayInfo(filename, -1); @@ -3214,12 +3214,12 @@ void CRobotMain::ChangeCamera() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetSelect() ) + if ( pObj->GetSelect() ) { - if ( pObj->RetCameraLock() ) return; + if ( pObj->GetCameraLock() ) return; - oType = pObj->RetType(); - type = pObj->RetCameraType(); + oType = pObj->GetType(); + type = pObj->GetCameraType(); if ( oType != OBJECT_MOBILEfa && oType != OBJECT_MOBILEta && @@ -3255,7 +3255,7 @@ void CRobotMain::ChangeCamera() if ( type == CAMERA_PLANE ) type = CAMERA_BACK; else if ( type == CAMERA_BACK ) type = CAMERA_PLANE; } - else if ( pObj->RetTrainer() ) // trainer? + else if ( pObj->GetTrainer() ) // trainer? { if ( type == CAMERA_ONBOARD ) type = CAMERA_FIX; else if ( type == CAMERA_FIX ) type = CAMERA_PLANE; @@ -3282,26 +3282,26 @@ void CRobotMain::KeyCamera(EventMsg event, long param) if ( event == EVENT_KEYUP ) { - if ( param == m_engine->RetKey(KEYRANK_LEFT, 0) || - param == m_engine->RetKey(KEYRANK_LEFT, 1) ) + if ( param == m_engine->GetKey(KEYRANK_LEFT, 0) || + param == m_engine->GetKey(KEYRANK_LEFT, 1) ) { m_cameraPan = 0.0f; } - if ( param == m_engine->RetKey(KEYRANK_RIGHT, 0) || - param == m_engine->RetKey(KEYRANK_RIGHT, 1) ) + if ( param == m_engine->GetKey(KEYRANK_RIGHT, 0) || + param == m_engine->GetKey(KEYRANK_RIGHT, 1) ) { m_cameraPan = 0.0f; } - if ( param == m_engine->RetKey(KEYRANK_UP, 0) || - param == m_engine->RetKey(KEYRANK_UP, 1) ) + if ( param == m_engine->GetKey(KEYRANK_UP, 0) || + param == m_engine->GetKey(KEYRANK_UP, 1) ) { m_cameraZoom = 0.0f; } - if ( param == m_engine->RetKey(KEYRANK_DOWN, 0) || - param == m_engine->RetKey(KEYRANK_DOWN, 1) ) + if ( param == m_engine->GetKey(KEYRANK_DOWN, 0) || + param == m_engine->GetKey(KEYRANK_DOWN, 1) ) { m_cameraZoom = 0.0f; } @@ -3313,30 +3313,30 @@ void CRobotMain::KeyCamera(EventMsg event, long param) pObj = RetSelect(); if ( pObj == 0 ) return; - if ( !pObj->RetTrainer() ) return; + if ( !pObj->GetTrainer() ) return; if ( event == EVENT_KEYDOWN ) { - if ( param == m_engine->RetKey(KEYRANK_LEFT, 0) || - param == m_engine->RetKey(KEYRANK_LEFT, 1) ) + if ( param == m_engine->GetKey(KEYRANK_LEFT, 0) || + param == m_engine->GetKey(KEYRANK_LEFT, 1) ) { m_cameraPan = -1.0f; } - if ( param == m_engine->RetKey(KEYRANK_RIGHT, 0) || - param == m_engine->RetKey(KEYRANK_RIGHT, 1) ) + if ( param == m_engine->GetKey(KEYRANK_RIGHT, 0) || + param == m_engine->GetKey(KEYRANK_RIGHT, 1) ) { m_cameraPan = 1.0f; } - if ( param == m_engine->RetKey(KEYRANK_UP, 0) || - param == m_engine->RetKey(KEYRANK_UP, 1) ) + if ( param == m_engine->GetKey(KEYRANK_UP, 0) || + param == m_engine->GetKey(KEYRANK_UP, 1) ) { m_cameraZoom = -1.0f; } - if ( param == m_engine->RetKey(KEYRANK_DOWN, 0) || - param == m_engine->RetKey(KEYRANK_DOWN, 1) ) + if ( param == m_engine->GetKey(KEYRANK_DOWN, 0) || + param == m_engine->GetKey(KEYRANK_DOWN, 1) ) { m_cameraZoom = 1.0f; } @@ -3351,14 +3351,14 @@ void CRobotMain::RemoteCamera(float pan, float zoom, float rTime) if ( pan != 0.0f ) { - value = m_camera->RetRemotePan(); + value = m_camera->GetRemotePan(); value += pan*rTime*1.5f; m_camera->SetRemotePan(value); } if ( zoom != 0.0f ) { - value = m_camera->RetRemoteZoom(); + value = m_camera->GetRemoteZoom(); value += zoom*rTime*0.3f; m_camera->SetRemoteZoom(value); } @@ -3379,7 +3379,7 @@ void CRobotMain::AbortMovie() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - automat = pObj->RetAuto(); + automat = pObj->GetAuto(); if ( automat != 0 ) { automat->Abort(); @@ -3404,7 +3404,7 @@ void CRobotMain::UpdateInfoText() pObj = RetSelect(); if ( pObj != 0 ) { - pos = pObj->RetPosition(0); + pos = pObj->GetPosition(0); sprintf(info, "Pos = %.2f ; %.2f", pos.x/g_unit, pos.z/g_unit); m_engine->SetInfoText(4, info); } @@ -3474,8 +3474,8 @@ bool CRobotMain::EventFrame(const Event &event) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; if ( pm != 0 ) pm->UpdateObject(pObj); - if ( pObj->RetTruck() != 0 ) continue; - type = pObj->RetType(); + if ( pObj->GetTruck() != 0 ) continue; + type = pObj->GetType(); if ( type == OBJECT_TOTO ) { toto = pObj; @@ -3490,7 +3490,7 @@ bool CRobotMain::EventFrame(const Event &event) { pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetTruck() == 0 ) continue; + if ( pObj->GetTruck() == 0 ) continue; pObj->EventProcess(event); } @@ -3515,9 +3515,9 @@ bool CRobotMain::EventFrame(const Event &event) { m_camera->EventProcess(event); - if ( m_engine->RetFog() ) + if ( m_engine->GetFog() ) { - m_camera->SetOverBaseColor(m_particule->RetFogColor(m_engine->RetEyePt())); + m_camera->SetOverBaseColor(m_particule->GetFogColor(m_engine->GetEyePt())); } } if ( m_phase == PHASE_PERSO || @@ -3541,7 +3541,7 @@ bool CRobotMain::EventFrame(const Event &event) m_model->EventProcess(event); } - HiliteFrame(event.rTime); + HighlightFrame(event.rTime); // Moves the film indicator. if ( m_bMovieLock && !m_bEditLock ) // movie in progress? @@ -3605,7 +3605,7 @@ bool CRobotMain::EventFrame(const Event &event) } // Will move the arrow to visit. - if ( m_camera->RetType() == CAMERA_VISIT ) + if ( m_camera->GetType() == CAMERA_VISIT ) { FrameVisit(event.rTime); } @@ -3738,8 +3738,8 @@ void CRobotMain::Convert() Math::Vector pos; float value; - base = m_dialog->RetSceneName(); - rank = m_dialog->RetSceneRank(); + base = m_dialog->GetSceneName(); + rank = m_dialog->GetSceneRank(); m_dialog->BuildSceneName(line, base, rank); file = fopen(line, "r"); @@ -3951,7 +3951,7 @@ void CRobotMain::ScenePerso() pObj->SetDrawFront(true); // draws the interface - mh = (CMotionHuman*)pObj->RetMotion(); + mh = (CMotionHuman*)pObj->GetMotion(); if ( mh != 0 ) { mh->StartDisplayPerso(); @@ -3980,10 +3980,10 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) //? Convert(); - base = m_dialog->RetSceneName(); - rank = m_dialog->RetSceneRank(); - read = m_dialog->RetSceneRead(); - stack = m_dialog->RetStackRead(); + base = m_dialog->GetSceneName(); + rank = m_dialog->GetSceneRank(); + read = m_dialog->GetSceneRead(); + stack = m_dialog->GetStackRead(); m_dialog->SetUserDir(base, rank); m_bFixScene = bFixScene; @@ -4522,7 +4522,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) pObj->SetCheckToken(OpInt(line, "checkToken", 1)); pObj->SetManual(OpInt(line, "manual", 0)); - motion = pObj->RetMotion(); + motion = pObj->GetMotion(); if ( motion != 0 ) { p = SearchOp(line, "param"); @@ -4536,7 +4536,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) } run = -1; - pBrain = pObj->RetBrain(); + pBrain = pObj->GetBrain(); if ( pBrain != 0 ) { for ( i=0 ; i<10 ; i++ ) @@ -4544,7 +4544,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) sprintf(op, "script%d", i+1); // script1..script10 OpString(line, op, name); #if _SCHOOL - if ( !m_dialog->RetSoluce4() && i == 3 ) continue; + if ( !m_dialog->GetSoluce4() && i == 3 ) continue; #endif if ( name[0] != 0 ) { @@ -4559,7 +4559,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) pBrain->SetScriptRun(run); } } - pAuto = pObj->RetAuto(); + pAuto = pObj->GetAuto(); if ( pAuto != 0 ) { type = OpTypeObject(line, "autoType", OBJECT_NULL); @@ -4576,7 +4576,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) if ( i != -1 ) { if ( i != PARAM_FIXSCENE && - !m_dialog->RetMovies() ) i = 0; + !m_dialog->GetMovies() ) i = 0; pAuto->Start(i); // starts the film } } @@ -4587,8 +4587,8 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) pBrain->SetSoluceName(name); } - pObj->SetResetPosition(pObj->RetPosition(0)); - pObj->SetResetAngle(pObj->RetAngle(0)); + pObj->SetResetPosition(pObj->GetPosition(0)); + pObj->SetResetAngle(pObj->GetAngle(0)); pObj->SetResetRun(run); if ( OpInt(line, "reset", 0) == 1 ) @@ -4874,7 +4874,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) SelectObject(pObj); m_camera->SetObject(pObj); //? m_camera->SetType(CAMERA_BACK); - m_camera->SetType(pObj->RetCameraType()); + m_camera->SetType(pObj->GetCameraType()); } } if ( m_bFixScene ) @@ -4884,7 +4884,7 @@ void CRobotMain::CreateScene(bool bSoluce, bool bFixScene, bool bResetObject) if ( read[0] != 0 && pSel != 0 ) // loading file? { - pos = pSel->RetPosition(0); + pos = pSel->GetPosition(0); m_camera->Init(pos, pos, 0.0f); m_camera->FixCamera(); @@ -4942,7 +4942,7 @@ CObject* CRobotMain::CreateObject(Math::Vector pos, float angle, float zoom, flo pObject = new CObject(m_iMan); pObject->CreateBuilding(pos, angle, height, type, power); - automat = pObject->RetAuto(); + automat = pObject->GetAuto(); if ( automat != 0 ) { automat->Init(); @@ -5225,7 +5225,7 @@ CObject* CRobotMain::CreateObject(Math::Vector pos, float angle, float zoom, flo { CMotion* motion; - motion = pObject->RetMotion(); + motion = pObject->GetMotion(); if ( m_phase == PHASE_WIN ) motion->SetAction(MHS_WIN, 0.4f); if ( m_phase == PHASE_LOST ) motion->SetAction(MHS_LOST, 0.5f); } @@ -5322,9 +5322,9 @@ int CRobotMain::CreateSpot(Math::Vector pos, D3DCOLORVALUE color) D3DLIGHT7 light; int obj; - if ( !m_engine->RetLightMode() ) return -1; + if ( !m_engine->GetLightMode() ) return -1; - pos.y += m_terrain->RetFloorLevel(pos); + pos.y += m_terrain->GetFloorLevel(pos); ZeroMemory(&light, sizeof(D3DLIGHT7)); light.dltType = D3DLIGHT_SPOT; @@ -5367,11 +5367,11 @@ void CRobotMain::ChangeColor() colorRef1.r = 206.0f/256.0f; colorRef1.g = 206.0f/256.0f; colorRef1.b = 204.0f/256.0f; // ~white - colorNew1 = m_dialog->RetGamerColorCombi(); + colorNew1 = m_dialog->GetGamerColorCombi(); colorRef2.r = 255.0f/256.0f; colorRef2.g = 132.0f/256.0f; colorRef2.b = 1.0f/256.0f; // orange - colorNew2 = m_dialog->RetGamerColorBand(); + colorNew2 = m_dialog->GetGamerColorBand(); exclu[0] = Math::Point(192.0f/256.0f, 0.0f/256.0f); exclu[1] = Math::Point(256.0f/256.0f, 64.0f/256.0f); // crystals + cylinders exclu[2] = Math::Point(208.0f/256.0f, 224.0f/256.0f); @@ -5409,7 +5409,7 @@ void CRobotMain::ChangeColor() colorRef1.b = 0.0f/256.0f; // yellow tolerance = 0.20f; } - colorNew1 = m_dialog->RetGamerColorHair(); + colorNew1 = m_dialog->GetGamerColorHair(); colorRef2.r = 0.0f; colorRef2.g = 0.0f; colorRef2.b = 0.0f; @@ -5489,7 +5489,7 @@ bool CRobotMain::TestGadgetQuantity(int rank) static int table80[10] = {0,1,1,1,1,1,0,1,1,1}; static int table90[10] = {0,1,1,1,1,1,1,1,1,1}; - percent = m_engine->RetGadgetQuantity(); + percent = m_engine->GetGadgetQuantity(); if ( percent == 0.0f ) return false; if ( percent == 1.0f ) return true; @@ -5524,15 +5524,15 @@ float CRobotMain::SearchNearestObject(Math::Vector center, CObject *exclu) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( !pObj->RetActif() ) continue; // inactive? - if ( pObj->RetTruck() != 0 ) continue; // object carries? + if ( !pObj->GetActif() ) continue; // inactive? + if ( pObj->GetTruck() != 0 ) continue; // object carries? if ( pObj == exclu ) continue; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_BASE ) { - oPos = pObj->RetPosition(0); + oPos = pObj->GetPosition(0); if ( oPos.x != center.x || oPos.z != center.z ) { @@ -5547,7 +5547,7 @@ float CRobotMain::SearchNearestObject(Math::Vector center, CObject *exclu) type == OBJECT_REPAIR || type == OBJECT_DESTROYER ) { - oPos = pObj->RetPosition(0); + oPos = pObj->GetPosition(0); dist = Math::Distance(center, oPos)-8.0f; if ( dist < 0.0f ) dist = 0.0f; min = Math::Min(min, dist); @@ -5590,7 +5590,7 @@ bool CRobotMain::FreeSpace(Math::Vector ¢er, float minRadius, float maxRadiu dist = SearchNearestObject(pos, exclu); if ( dist >= space ) { - flat = m_terrain->RetFlatZoneRadius(pos, dist/2.0f); + flat = m_terrain->GetFlatZoneRadius(pos, dist/2.0f); if ( flat >= dist/2.0f ) { center = pos; @@ -5617,7 +5617,7 @@ bool CRobotMain::FreeSpace(Math::Vector ¢er, float minRadius, float maxRadiu dist = SearchNearestObject(pos, exclu); if ( dist >= space ) { - flat = m_terrain->RetFlatZoneRadius(pos, dist/2.0f); + flat = m_terrain->GetFlatZoneRadius(pos, dist/2.0f); if ( flat >= dist/2.0f ) { center = pos; @@ -5632,7 +5632,7 @@ bool CRobotMain::FreeSpace(Math::Vector ¢er, float minRadius, float maxRadiu // Calculates the maximum radius of a free space. -float CRobotMain::RetFlatZoneRadius(Math::Vector center, float maxRadius, +float CRobotMain::GetFlatZoneRadius(Math::Vector center, float maxRadius, CObject *exclu) { float dist; @@ -5643,7 +5643,7 @@ float CRobotMain::RetFlatZoneRadius(Math::Vector center, float maxRadius, { maxRadius = dist; } - return m_terrain->RetFlatZoneRadius(center, maxRadius); + return m_terrain->GetFlatZoneRadius(center, maxRadius); } @@ -5676,7 +5676,7 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck) if ( metal == 0 ) return; - center = metal->RetPosition(0); + center = metal->GetPosition(0); // Calculates the maximum radius possible depending on other items. oMax = 30.0f; // radius to build the biggest building @@ -5685,15 +5685,15 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( !pObj->RetActif() ) continue; // inactive? - if ( pObj->RetTruck() != 0 ) continue; // object carried? + if ( !pObj->GetActif() ) continue; // inactive? + if ( pObj->GetTruck() != 0 ) continue; // object carried? if ( pObj == metal ) continue; if ( pObj == truck ) continue; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_BASE ) { - oPos = pObj->RetPosition(0); + oPos = pObj->GetPosition(0); dist = Math::Distance(center, oPos)-80.0f; oMax = Math::Min(oMax, dist); } @@ -5738,7 +5738,7 @@ void CRobotMain::ShowDropZone(CObject* metal, CObject* truck) // Calculates the maximum possible radius depending on terrain. if ( oMax >= 2.0f ) { - tMax = m_terrain->RetFlatZoneRadius(center, 30.0f); + tMax = m_terrain->GetFlatZoneRadius(center, 30.0f); } else { @@ -5843,7 +5843,7 @@ void CRobotMain::FrameShowLimit(float rTime) float angle, factor, speed; int i, j; - if ( m_engine->RetPause() ) return; + if ( m_engine->GetPause() ) return; for ( i=0 ; iSearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetTruck() != 0 ) continue; + if ( pObj->GetTruck() != 0 ) continue; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) continue; for ( j=0 ; j<10 ; j++ ) { - if ( brain->RetCompile(j) ) continue; + if ( brain->GetCompile(j) ) continue; - name = brain->RetScriptName(j); + name = brain->GetScriptName(j); if ( name[0] != 0 ) { brain->ReadProgram(j, name); - if ( !brain->RetCompile(j) ) nbError++; + if ( !brain->GetCompile(j) ) nbError++; } } @@ -5964,12 +5964,12 @@ void CRobotMain::CompileScript(bool bSoluce) { pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetTruck() != 0 ) continue; + if ( pObj->GetTruck() != 0 ) continue; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) continue; - name = brain->RetSoluceName(); + name = brain->GetSoluceName(); if ( name[0] != 0 ) { brain->ReadSoluce(name); // load solution @@ -5982,12 +5982,12 @@ void CRobotMain::CompileScript(bool bSoluce) { pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetTruck() != 0 ) continue; + if ( pObj->GetTruck() != 0 ) continue; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) continue; - run = brain->RetScriptRun(); + run = brain->GetScriptRun(); if ( run != -1 ) { brain->RunProgram(run); // starts the program @@ -6005,29 +6005,29 @@ void CRobotMain::LoadOneScript(CObject *pObj, int &nbError) char* name; int rank, i, objRank; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) return; if ( !IsSelectable(pObj) ) return; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) return; - objRank = pObj->RetDefRank(); + objRank = pObj->GetDefRank(); if ( objRank == -1 ) return; - name = m_dialog->RetSceneName(); - rank = m_dialog->RetSceneRank(); + name = m_dialog->GetSceneName(); + rank = m_dialog->GetSceneRank(); for ( i=0 ; iRetCompile(i) ) continue; + if ( brain->GetCompile(i) ) continue; //? if ( brain->ProgramExist(i) ) continue; sprintf(filename, "%s\\%s\\%c%.3d%.3d%.1d.txt", RetSavegameDir(), m_gamerName, name[0], rank, objRank, i); brain->ReadProgram(i, filename); - if ( !brain->RetCompile(i) ) nbError++; + if ( !brain->GetCompile(i) ) nbError++; } } @@ -6045,14 +6045,14 @@ void CRobotMain::LoadFileScript(CObject *pObj, char* filename, int objRank, if ( objRank == -1 ) return; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) return; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) return; - name = m_dialog->RetSceneName(); - rank = m_dialog->RetSceneRank(); + name = m_dialog->GetSceneName(); + rank = m_dialog->GetSceneRank(); strcpy(fn, filename); ldir = SearchLastDir(fn); @@ -6060,12 +6060,12 @@ void CRobotMain::LoadFileScript(CObject *pObj, char* filename, int objRank, for ( i=0 ; iRetCompile(i) ) continue; + if ( brain->GetCompile(i) ) continue; //? if ( brain->ProgramExist(i) ) continue; sprintf(ldir, "\\prog%.3d%.1d.txt", objRank, i); brain->ReadProgram(i, fn); - if ( !brain->RetCompile(i) ) nbError++; + if ( !brain->GetCompile(i) ) nbError++; } } @@ -6096,19 +6096,19 @@ void CRobotMain::SaveOneScript(CObject *pObj) char* name; int rank, i, objRank; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) return; if ( !IsSelectable(pObj) ) return; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) return; - objRank = pObj->RetDefRank(); + objRank = pObj->GetDefRank(); if ( objRank == -1 ) return; - name = m_dialog->RetSceneName(); - rank = m_dialog->RetSceneRank(); + name = m_dialog->GetSceneName(); + rank = m_dialog->GetSceneRank(); for ( i=0 ; iRetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) return; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) return; - name = m_dialog->RetSceneName(); - rank = m_dialog->RetSceneRank(); + name = m_dialog->GetSceneName(); + rank = m_dialog->GetSceneRank(); strcpy(fn, filename); ldir = SearchLastDir(fn); @@ -6161,10 +6161,10 @@ bool CRobotMain::SaveFileStack(CObject *pObj, FILE *file, int objRank) if ( objRank == -1 ) return true; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) return true; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) return true; return brain->WriteStack(file); @@ -6179,10 +6179,10 @@ bool CRobotMain::ReadFileStack(CObject *pObj, FILE *file, int objRank) if ( objRank == -1 ) return true; - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain == 0 ) return true; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_HUMAN ) return true; return brain->ReadStack(file); @@ -6223,7 +6223,7 @@ bool CRobotMain::AddNewScriptName(ObjectType type, char *name) // Seeks a script name for a given type. -char* CRobotMain::RetNewScriptName(ObjectType type, int rank) +char* CRobotMain::GetNewScriptName(ObjectType type, int rank) { int i; @@ -6258,16 +6258,16 @@ bool CRobotMain::IsBusy() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - pBrain = pObj->RetBrain(); + pBrain = pObj->GetBrain(); if ( pBrain != 0 ) { if ( pBrain->IsBusy() ) return true; } -//? pAuto = pObj->RetAuto(); +//? pAuto = pObj->GetAuto(); //? if ( pAuto != 0 ) //? { -//? if ( pAuto->RetBusy() ) return true; +//? if ( pAuto->GetBusy() ) return true; //? } } return false; @@ -6283,33 +6283,33 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd) char name[100]; int run, i; - if ( pObj->RetType() == OBJECT_FIX ) return; + if ( pObj->GetType() == OBJECT_FIX ) return; strcpy(line, cmd); - sprintf(name, " type=%s", GetTypeObject(pObj->RetType())); + sprintf(name, " type=%s", GetTypeObject(pObj->GetType())); strcat(line, name); - sprintf(name, " id=%d", pObj->RetID()); + sprintf(name, " id=%d", pObj->GetID()); strcat(line, name); - pos = pObj->RetPosition(0)/g_unit; + pos = pObj->GetPosition(0)/g_unit; sprintf(name, " pos=%.2f;%.2f;%.2f", pos.x, pos.y, pos.z); strcat(line, name); - pos = pObj->RetAngle(0)/(Math::PI/180.0f); + pos = pObj->GetAngle(0)/(Math::PI/180.0f); sprintf(name, " angle=%.2f;%.2f;%.2f", pos.x, pos.y, pos.z); strcat(line, name); - pos = pObj->RetZoom(0); + pos = pObj->GetZoom(0); sprintf(name, " zoom=%.2f;%.2f;%.2f", pos.x, pos.y, pos.z); strcat(line, name); for ( i=1 ; iRetObjectRank(i) == -1 ) continue; + if ( pObj->GetObjectRank(i) == -1 ) continue; - pos = pObj->RetPosition(i); + pos = pObj->GetPosition(i); if ( pos.x != 0.0f || pos.y != 0.0f || pos.z != 0.0f ) { pos /= g_unit; @@ -6317,7 +6317,7 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd) strcat(line, name); } - pos = pObj->RetAngle(i); + pos = pObj->GetAngle(i); if ( pos.x != 0.0f || pos.y != 0.0f || pos.z != 0.0f ) { pos /= (Math::PI/180.0f); @@ -6325,7 +6325,7 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd) strcat(line, name); } - pos = pObj->RetZoom(i); + pos = pObj->GetZoom(i); if ( pos.x != 1.0f || pos.y != 1.0f || pos.z != 1.0f ) { sprintf(name, " z%d=%.2f;%.2f;%.2f", i, pos.x, pos.y, pos.z); @@ -6333,10 +6333,10 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd) } } - sprintf(name, " trainer=%d", pObj->RetTrainer()); + sprintf(name, " trainer=%d", pObj->GetTrainer()); strcat(line, name); - sprintf(name, " option=%d", pObj->RetOption()); + sprintf(name, " option=%d", pObj->GetOption()); strcat(line, name); if ( pObj == m_infoObject ) // selects object? @@ -6347,16 +6347,16 @@ void CRobotMain::IOWriteObject(FILE *file, CObject* pObj, char *cmd) pObj->Write(line); - if ( pObj->RetType() == OBJECT_BASE ) + if ( pObj->GetType() == OBJECT_BASE ) { sprintf(name, " run=3"); // stops and open (PARAM_FIXSCENE) strcat(line, name); } - pBrain = pObj->RetBrain(); + pBrain = pObj->GetBrain(); if ( pBrain != 0 ) { - run = pBrain->RetProgram(); + run = pBrain->GetProgram(); if ( run != -1 ) { sprintf(name, " run=%d", run+1); @@ -6389,18 +6389,18 @@ bool CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info) sprintf(line, "Version maj=%d min=%d\n", 0, 1); fputs(line, file); - name = m_dialog->RetSceneName(); + name = m_dialog->GetSceneName(); if ( strcmp(name, "user") == 0 ) { - sprintf(line, "Mission base=\"%s\" rank=%.3d dir=\"%s\"\n", name, m_dialog->RetSceneRank(), m_dialog->RetSceneDir()); + sprintf(line, "Mission base=\"%s\" rank=%.3d dir=\"%s\"\n", name, m_dialog->GetSceneRank(), m_dialog->GetSceneDir()); } else { - sprintf(line, "Mission base=\"%s\" rank=%.3d\n", name, m_dialog->RetSceneRank()); + sprintf(line, "Mission base=\"%s\" rank=%.3d\n", name, m_dialog->GetSceneRank()); } fputs(line, file); - sprintf(line, "Map zoom=%.2f\n", m_map->RetZoomMap()); + sprintf(line, "Map zoom=%.2f\n", m_map->GetZoomMap()); fputs(line, file); sprintf(line, "DoneResearch bits=%d\n", g_researchDone); @@ -6418,15 +6418,15 @@ bool CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetType() == OBJECT_TOTO ) continue; - if ( pObj->RetType() == OBJECT_FIX ) continue; - if ( pObj->RetTruck() != 0 ) continue; - if ( pObj->RetBurn() ) continue; - if ( pObj->RetDead() ) continue; - if ( pObj->RetExplo() ) continue; + if ( pObj->GetType() == OBJECT_TOTO ) continue; + if ( pObj->GetType() == OBJECT_FIX ) continue; + if ( pObj->GetTruck() != 0 ) continue; + if ( pObj->GetBurn() ) continue; + if ( pObj->GetDead() ) continue; + if ( pObj->GetExplo() ) continue; - pPower = pObj->RetPower(); - pFret = pObj->RetFret(); + pPower = pObj->GetPower(); + pFret = pObj->GetFret(); if ( pFret != 0 ) // object transported? { @@ -6460,11 +6460,11 @@ bool CRobotMain::IOWriteScene(char *filename, char *filecbot, char *info) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetType() == OBJECT_TOTO ) continue; - if ( pObj->RetType() == OBJECT_FIX ) continue; - if ( pObj->RetTruck() != 0 ) continue; - if ( pObj->RetBurn() ) continue; - if ( pObj->RetDead() ) continue; + if ( pObj->GetType() == OBJECT_TOTO ) continue; + if ( pObj->GetType() == OBJECT_FIX ) continue; + if ( pObj->GetTruck() != 0 ) continue; + if ( pObj->GetBurn() ) continue; + if ( pObj->GetDead() ) continue; if ( !SaveFileStack(pObj, file, objRank++) ) break; } @@ -6511,7 +6511,7 @@ CObject* CRobotMain::IOReadObject(char *line, char* filename, int objRank) for ( i=1 ; iRetObjectRank(i) == -1 ) continue; + if ( pObj->GetObjectRank(i) == -1 ) continue; sprintf(op, "p%d", i); pos = OpDir(line, op); @@ -6549,14 +6549,14 @@ CObject* CRobotMain::IOReadObject(char *line, char* filename, int objRank) { #if CBOT_STACK #else - pBrain = pObj->RetBrain(); + pBrain = pObj->GetBrain(); if ( pBrain != 0 ) { pBrain->RunProgram(run-1); // starts the program } #endif - pAuto = pObj->RetAuto(); + pAuto = pObj->GetAuto(); if ( pAuto != 0 ) { pAuto->Start(run); // starts the film @@ -6669,9 +6669,9 @@ CObject* CRobotMain::IOReadScene(char *filename, char *filecbot) { pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetTruck() != 0 ) continue; + if ( pObj->GetTruck() != 0 ) continue; - objRank = pObj->RetDefRank(); + objRank = pObj->GetDefRank(); if ( objRank == -1 ) continue; LoadFileScript(pObj, filename, objRank, nbError); @@ -6695,11 +6695,11 @@ CObject* CRobotMain::IOReadScene(char *filename, char *filecbot) pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( pObj->RetType() == OBJECT_TOTO ) continue; - if ( pObj->RetType() == OBJECT_FIX ) continue; - if ( pObj->RetTruck() != 0 ) continue; - if ( pObj->RetBurn() ) continue; - if ( pObj->RetDead() ) continue; + if ( pObj->GetType() == OBJECT_TOTO ) continue; + if ( pObj->GetType() == OBJECT_FIX ) continue; + if ( pObj->GetTruck() != 0 ) continue; + if ( pObj->GetBurn() ) continue; + if ( pObj->GetDead() ) continue; if ( !ReadFileStack(pObj, file, objRank++) ) break; } @@ -6797,12 +6797,12 @@ void CRobotMain::ResetObject() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - cap = pObj->RetResetCap(); + cap = pObj->GetResetCap(); if ( cap == RESET_NONE ) continue; if ( cap == RESET_DELETE ) { - pTruck = pObj->RetTruck(); + pTruck = pObj->GetTruck(); if ( pTruck != 0 ) { pTruck->SetFret(0); @@ -6814,22 +6814,22 @@ void CRobotMain::ResetObject() continue; } - pAuto = pObj->RetAuto(); + pAuto = pObj->GetAuto(); if ( pAuto != 0 ) { pAuto->Abort(); } - if ( pObj->RetEnable() ) // object still active? + if ( pObj->GetEnable() ) // object still active? { - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain != 0 ) { - pos = pObj->RetResetPosition(); - angle = pObj->RetResetAngle(); + pos = pObj->GetResetPosition(); + angle = pObj->GetResetAngle(); - if ( pos == pObj->RetPosition(0) && - angle == pObj->RetAngle(0) ) continue; + if ( pos == pObj->GetPosition(0) && + angle == pObj->GetAngle(0) ) continue; brain->StartTaskReset(pos, angle); continue; } @@ -6837,19 +6837,19 @@ void CRobotMain::ResetObject() pObj->SetEnable(true); // active again - pos = pObj->RetResetPosition(); - angle = pObj->RetResetAngle(); + pos = pObj->GetResetPosition(); + angle = pObj->GetResetAngle(); - if ( pos == pObj->RetPosition(0) && - angle == pObj->RetAngle(0) ) continue; + if ( pos == pObj->GetPosition(0) && + angle == pObj->GetAngle(0) ) continue; pyro = new CPyro(m_iMan); pyro->Create(PT_RESET, pObj); - brain = pObj->RetBrain(); + brain = pObj->GetBrain(); if ( brain != 0 ) { - brain->RunProgram(pObj->RetResetRun()); + brain->RunProgram(pObj->GetResetRun()); } } #else @@ -6885,7 +6885,7 @@ void CRobotMain::ResetCreate() m_iMan->Flush(CLASS_PYRO); m_camera->SetType(CAMERA_DIALOG); - CreateScene(m_dialog->RetSceneSoluce(), false, true); + CreateScene(m_dialog->GetSceneSoluce(), false, true); if ( !RetNiceReset() ) return; @@ -6894,7 +6894,7 @@ void CRobotMain::ResetCreate() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - cap = pObj->RetResetCap(); + cap = pObj->GetResetCap(); if ( cap == RESET_NONE ) continue; pyro = new CPyro(m_iMan); @@ -6926,11 +6926,11 @@ Error CRobotMain::CheckEndMission(bool bFrame) // Do not use RetActif () because an invisible worm (underground) // should be regarded as existing here! - if ( pObj->RetLock() ) continue; - if ( pObj->RetRuin() ) continue; - if ( !pObj->RetEnable() ) continue; + if ( pObj->GetLock() ) continue; + if ( pObj->GetRuin() ) continue; + if ( !pObj->GetEnable() ) continue; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_SCRAP2 || type == OBJECT_SCRAP3 || type == OBJECT_SCRAP4 || @@ -6940,13 +6940,13 @@ Error CRobotMain::CheckEndMission(bool bFrame) } if ( type != m_endTake[t].type ) continue; - if ( pObj->RetTruck() == 0 ) + if ( pObj->GetTruck() == 0 ) { - oPos = pObj->RetPosition(0); + oPos = pObj->GetPosition(0); } else { - oPos = pObj->RetTruck()->RetPosition(0); + oPos = pObj->GetTruck()->GetPosition(0); } oPos.y = 0.0f; if ( Math::DistanceProjected(oPos, bPos) <= m_endTake[t].dist ) @@ -7048,14 +7048,14 @@ void CRobotMain::CheckEndMessage(char *message) // Returns the number of instructions required. -int CRobotMain::RetObligatoryToken() +int CRobotMain::GetObligatoryToken() { return m_obligatoryTotal; } // Returns the name of a required instruction. -char* CRobotMain::RetObligatoryToken(int i) +char* CRobotMain::GetObligatoryToken(int i) { return m_obligatoryToken[i]; } @@ -7095,99 +7095,99 @@ bool CRobotMain::IsProhibitedToken(char *token) // Indicates whether it is possible to control a driving robot. -bool CRobotMain::RetTrainerPilot() +bool CRobotMain::GetTrainerPilot() { return m_bTrainerPilot; } // Indicates whether the scene is fixed, without interaction. -bool CRobotMain::RetFixScene() +bool CRobotMain::GetFixScene() { return m_bFixScene; } -char* CRobotMain::RetTitle() +char* CRobotMain::GetTitle() { return m_title; } -char* CRobotMain::RetResume() +char* CRobotMain::GetResume() { return m_resume; } -char* CRobotMain::RetScriptName() +char* CRobotMain::GetScriptName() { return m_scriptName; } -char* CRobotMain::RetScriptFile() +char* CRobotMain::GetScriptFile() { return m_scriptFile; } -bool CRobotMain::RetGlint() +bool CRobotMain::GetGlint() { - return m_dialog->RetGlint(); + return m_dialog->GetGlint(); } -bool CRobotMain::RetSoluce4() +bool CRobotMain::GetSoluce4() { - return m_dialog->RetSoluce4(); + return m_dialog->GetSoluce4(); } -bool CRobotMain::RetMovies() +bool CRobotMain::GetMovies() { - return m_dialog->RetMovies(); + return m_dialog->GetMovies(); } -bool CRobotMain::RetNiceReset() +bool CRobotMain::GetNiceReset() { - return m_dialog->RetNiceReset(); + return m_dialog->GetNiceReset(); } -bool CRobotMain::RetHimselfDamage() +bool CRobotMain::GetHimselfDamage() { - return m_dialog->RetHimselfDamage(); + return m_dialog->GetHimselfDamage(); } -bool CRobotMain::RetShowSoluce() +bool CRobotMain::GetShowSoluce() { return m_bShowSoluce; } -bool CRobotMain::RetSceneSoluce() +bool CRobotMain::GetSceneSoluce() { if ( m_infoFilename[SATCOM_SOLUCE][0] == 0 ) return false; - return m_dialog->RetSceneSoluce(); + return m_dialog->GetSceneSoluce(); } -bool CRobotMain::RetShowAll() +bool CRobotMain::GetShowAll() { return m_bShowAll; } -bool CRobotMain::RetCheatRadar() +bool CRobotMain::GetCheatRadar() { return m_bCheatRadar; } -char* CRobotMain::RetSavegameDir() +char* CRobotMain::GetSavegameDir() { - return m_dialog->RetSavegameDir(); + return m_dialog->GetSavegameDir(); } -char* CRobotMain::RetPublicDir() +char* CRobotMain::GetPublicDir() { - return m_dialog->RetPublicDir(); + return m_dialog->GetPublicDir(); } -char* CRobotMain::RetFilesDir() +char* CRobotMain::GetFilesDir() { - return m_dialog->RetFilesDir(); + return m_dialog->GetFilesDir(); } @@ -7202,7 +7202,7 @@ void CRobotMain::SetGamerName(char *name) // Getes the player's name. -char* CRobotMain::RetGamerName() +char* CRobotMain::GetGamerName() { return m_gamerName; } @@ -7210,30 +7210,30 @@ char* CRobotMain::RetGamerName() // Returns the representation to use for the player. -int CRobotMain::RetGamerFace() +int CRobotMain::GetGamerFace() { - return m_dialog->RetGamerFace(); + return m_dialog->GetGamerFace(); } // Returns the representation to use for the player. -int CRobotMain::RetGamerGlasses() +int CRobotMain::GetGamerGlasses() { - return m_dialog->RetGamerGlasses(); + return m_dialog->GetGamerGlasses(); } // Returns the mode with just the head. -bool CRobotMain::RetGamerOnlyHead() +bool CRobotMain::GetGamerOnlyHead() { - return m_dialog->RetGamerOnlyHead(); + return m_dialog->GetGamerOnlyHead(); } // Returns the angle of presentation. -float CRobotMain::RetPersoAngle() +float CRobotMain::GetPersoAngle() { - return m_dialog->RetPersoAngle(); + return m_dialog->GetPersoAngle(); } @@ -7246,7 +7246,7 @@ void CRobotMain::ChangePause(bool bPause) m_sound->MuteAll(m_bPause); CreateShortcuts(); - if ( m_bPause ) HiliteClear(); + if ( m_bPause ) HighlightClear(); } @@ -7275,9 +7275,9 @@ void CRobotMain::SetSpeed(float speed) } } -float CRobotMain::RetSpeed() +float CRobotMain::GetSpeed() { - return m_engine->RetSpeed(); + return m_engine->GetSpeed(); } @@ -7299,9 +7299,9 @@ void CRobotMain::UpdateMap() // Indicates whether the mini-map is visible. -bool CRobotMain::RetShowMap() +bool CRobotMain::GetShowMap() { - return m_map->RetShowMap() && m_bMapShow; + return m_map->GetShowMap() && m_bMapShow; } @@ -7314,16 +7314,16 @@ void CRobotMain::SetMovieLock(bool bLock) CreateShortcuts(); m_map->ShowMap(!m_bMovieLock && m_bMapShow); - if ( m_bMovieLock ) HiliteClear(); + if ( m_bMovieLock ) HighlightClear(); m_engine->SetMouseHide(m_bMovieLock); } -bool CRobotMain::RetMovieLock() +bool CRobotMain::GetMovieLock() { return m_bMovieLock; } -bool CRobotMain::RetInfoLock() +bool CRobotMain::GetInfoLock() { return ( m_displayInfo != 0 ); // info in progress? } @@ -7335,7 +7335,7 @@ void CRobotMain::SetSatComLock(bool bLock) m_bSatComLock = bLock; } -bool CRobotMain::RetSatComLock() +bool CRobotMain::GetSatComLock() { return m_bSatComLock; } @@ -7349,7 +7349,7 @@ void CRobotMain::SetEditLock(bool bLock, bool bEdit) CreateShortcuts(); // Do not remove the card if it contains a still image. - if ( !bLock || !m_map->RetFixImage() ) + if ( !bLock || !m_map->GetFixImage() ) { m_map->ShowMap(!m_bEditLock && m_bMapShow); } @@ -7359,7 +7359,7 @@ void CRobotMain::SetEditLock(bool bLock, bool bEdit) if ( m_bEditLock ) { - HiliteClear(); + HighlightClear(); } else { @@ -7367,7 +7367,7 @@ void CRobotMain::SetEditLock(bool bLock, bool bEdit) } } -bool CRobotMain::RetEditLock() +bool CRobotMain::GetEditLock() { return m_bEditLock; } @@ -7379,13 +7379,13 @@ void CRobotMain::SetEditFull(bool bFull) m_bEditFull = bFull; } -bool CRobotMain::RetEditFull() +bool CRobotMain::GetEditFull() { return m_bEditFull; } -bool CRobotMain::RetFreePhoto() +bool CRobotMain::GetFreePhoto() { return m_bFreePhoto; } @@ -7398,7 +7398,7 @@ void CRobotMain::SetFriendAim(bool bFriend) m_bFriendAim = bFriend; } -bool CRobotMain::RetFriendAim() +bool CRobotMain::GetFriendAim() { return m_bFriendAim; } @@ -7411,9 +7411,9 @@ void CRobotMain::SetTracePrecision(float factor) m_engine->SetTracePrecision(factor); } -float CRobotMain::RetTracePrecision() +float CRobotMain::GetTracePrecision() { - return m_engine->RetTracePrecision(); + return m_engine->GetTracePrecision(); } @@ -7432,7 +7432,7 @@ void CRobotMain::StartMusic() void CRobotMain::ClearInterface() { - HiliteClear(); // removes setting evidence + HighlightClear(); // removes setting evidence m_tooltipName[0] = 0; // really removes the tooltip } diff --git a/src/object/robotmain.h b/src/object/robotmain.h index d3b2e4d..684672f 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -156,25 +156,25 @@ public: void ScenePerso(); void SetMovieLock(bool bLock); - bool RetMovieLock(); - bool RetInfoLock(); + bool GetMovieLock(); + bool GetInfoLock(); void SetSatComLock(bool bLock); - bool RetSatComLock(); + bool GetSatComLock(); void SetEditLock(bool bLock, bool bEdit); - bool RetEditLock(); + bool GetEditLock(); void SetEditFull(bool bFull); - bool RetEditFull(); - bool RetFreePhoto(); + bool GetEditFull(); + bool GetFreePhoto(); void SetFriendAim(bool bFriend); - bool RetFriendAim(); + bool GetFriendAim(); void SetTracePrecision(float factor); - float RetTracePrecision(); + float GetTracePrecision(); void ChangePause(bool bPause); void SetSpeed(float speed); - float RetSpeed(); + float GetSpeed(); void UpdateShortcuts(); void SelectHuman(); @@ -182,7 +182,7 @@ public: CObject* SearchToto(); CObject* SearchNearest(Math::Vector pos, CObject* pExclu); bool SelectObject(CObject* pObj, bool bDisplayError=true); - CObject* RetSelectObject(); + CObject* GetSelectObject(); CObject* DeselectAll(); bool DeleteObject(); @@ -190,67 +190,67 @@ public: void ResetCreate(); Error CheckEndMission(bool bFrame); void CheckEndMessage(char *message); - int RetObligatoryToken(); - char* RetObligatoryToken(int i); + int GetObligatoryToken(); + char* GetObligatoryToken(int i); int IsObligatoryToken(char *token); bool IsProhibitedToken(char *token); void UpdateMap(); - bool RetShowMap(); + bool GetShowMap(); - MainMovieType RetMainMovie(); + MainMovieType GetMainMovie(); void FlushDisplayInfo(); void StartDisplayInfo(int index, bool bMovie); void StartDisplayInfo(char *filename, int index); void StopDisplayInfo(); - char* RetDisplayInfoName(int index); - int RetDisplayInfoPosition(int index); + char* GetDisplayInfoName(int index); + int GetDisplayInfoPosition(int index); void SetDisplayInfoPosition(int index, int pos); void StartSuspend(); void StopSuspend(); - float RetGameTime(); + float GetGameTime(); void SetFontSize(float size); - float RetFontSize(); + float GetFontSize(); void SetWindowPos(Math::Point pos); - Math::Point RetWindowPos(); + Math::Point GetWindowPos(); void SetWindowDim(Math::Point dim); - Math::Point RetWindowDim(); + Math::Point GetWindowDim(); void SetIOPublic(bool bMode); - bool RetIOPublic(); + bool GetIOPublic(); void SetIOPos(Math::Point pos); - Math::Point RetIOPos(); + Math::Point GetIOPos(); void SetIODim(Math::Point dim); - Math::Point RetIODim(); - - char* RetTitle(); - char* RetResume(); - char* RetScriptName(); - char* RetScriptFile(); - bool RetTrainerPilot(); - bool RetFixScene(); - bool RetGlint(); - bool RetSoluce4(); - bool RetMovies(); - bool RetNiceReset(); - bool RetHimselfDamage(); - bool RetShowSoluce(); - bool RetSceneSoluce(); - bool RetShowAll(); - bool RetCheatRadar(); - char* RetSavegameDir(); - char* RetPublicDir(); - char* RetFilesDir(); + Math::Point GetIODim(); + + char* GetTitle(); + char* GetResume(); + char* GetScriptName(); + char* GetScriptFile(); + bool GetTrainerPilot(); + bool GetFixScene(); + bool GetGlint(); + bool GetSoluce4(); + bool GetMovies(); + bool GetNiceReset(); + bool GetHimselfDamage(); + bool GetShowSoluce(); + bool GetSceneSoluce(); + bool GetShowAll(); + bool GetCheatRadar(); + char* GetSavegameDir(); + char* GetPublicDir(); + char* GetFilesDir(); void SetGamerName(char *name); - char* RetGamerName(); - int RetGamerFace(); - int RetGamerGlasses(); - bool RetGamerOnlyHead(); - float RetPersoAngle(); + char* GetGamerName(); + int GetGamerFace(); + int GetGamerGlasses(); + bool GetGamerOnlyHead(); + float GetPersoAngle(); void StartMusic(); void ClearInterface(); @@ -258,7 +258,7 @@ public: float SearchNearestObject(Math::Vector center, CObject *exclu); bool FreeSpace(Math::Vector ¢er, float minRadius, float maxRadius, float space, CObject *exclu); - float RetFlatZoneRadius(Math::Vector center, float maxRadius, CObject *exclu); + float GetFlatZoneRadius(Math::Vector center, float maxRadius, CObject *exclu); void HideDropZone(CObject* metal); void ShowDropZone(CObject* metal, CObject* truck); void FlushShowLimit(int i); @@ -278,7 +278,7 @@ public: bool FlushNewScriptName(); bool AddNewScriptName(ObjectType type, char *name); - char* RetNewScriptName(ObjectType type, int rank); + char* GetNewScriptName(ObjectType type, int rank); void WriteFreeParam(); void ReadFreeParam(); @@ -303,9 +303,9 @@ protected: Math::Vector LookatPoint( Math::Vector eye, float angleH, float angleV, float length ); CObject* CreateObject(Math::Vector pos, float angle, float zoom, float height, ObjectType type, float power=1.0f, bool bTrainer=false, bool bToy=false, int option=0); int CreateLight(Math::Vector direction, Gfx::Color color); - void HiliteClear(); - void HiliteObject(Math::Point pos); - void HiliteFrame(float rTime); + void HighlightClear(); + void HighlightObject(Math::Point pos); + void HighlightFrame(float rTime); void CreateTooltip(Math::Point pos, char* text); void ClearTooltip(); CObject* DetectObject(Math::Point pos); @@ -320,7 +320,7 @@ protected: void DeleteAllObjects(); void UpdateInfoText(); CObject* SearchObject(ObjectType type); - CObject* RetSelect(); + CObject* GetSelect(); void StartDisplayVisit(EventType event); void FrameVisit(float rTime); void StopDisplayVisit(); @@ -382,7 +382,7 @@ protected: bool m_bEditLock; // edition in progress? bool m_bEditFull; // edition in full screen? bool m_bPause; // simulation paused - bool m_bHilite; + bool m_bHighlight; bool m_bTrainerPilot; // remote trainer? bool m_bSuspend; bool m_bFriendAim; diff --git a/src/ui/mainmap.cpp b/src/ui/mainmap.cpp index 02453a4..e874fba 100644 --- a/src/ui/mainmap.cpp +++ b/src/ui/mainmap.cpp @@ -177,7 +177,7 @@ void CMainMap::DimMap() ps->SetPos(pos); ps->SetDim(dim); - value = pm->RetZoom(); + value = pm->GetZoom(); value = (value-ZOOM_MIN) / (ZOOM_MAX-ZOOM_MIN); value = powf(value, 0.5f); ps->SetVisibleValue(value); @@ -256,7 +256,8 @@ void CMainMap::ZoomMap() if (ps == nullptr) return; - zoom = ps->SetVisibleValue(); + + zoom = ps->GetVisibleValue(); zoom = powf(zoom, 2.0f); zoom = ZOOM_MIN+zoom*(ZOOM_MAX - ZOOM_MIN); pm->SetZoom(zoom); diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index f23354b..f51ee9b 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,36 +18,21 @@ // mainshort.cpp -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "common/global.h" -#include "common/event.h" -#include "common/iman.h" -#include "object/object.h" -#include "ui/interface.h" -#include "ui/map.h" -#include "ui/button.h" -#include "object/robotmain.h" -#include "ui/mainshort.h" - - +#include +namespace Ui { // Constructor of the application card. -CMainShort::CMainShort(CInstanceManager* iMan) +CMainShort::CMainShort() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_iMan->AddInstance(CLASS_SHORT, this); - m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); - m_event = (CEvent*)m_iMan->SearchInstance(CLASS_EVENT); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); - m_main = (CRobotMain*)m_iMan->SearchInstance(CLASS_MAIN); + m_interface = static_cast(m_iMan->SearchInstance(CLASS_INTERFACE)); + m_event = static_cast(m_iMan->SearchInstance(CLASS_EVENT)); + m_engine = static_cast(m_iMan->SearchInstance(CLASS_ENGINE)); + m_main = static_cast(m_iMan->SearchInstance(CLASS_MAIN)); FlushShortcuts(); } @@ -78,7 +64,7 @@ void CMainShort::FlushShortcuts() } } -static EventMsg table_sc_em[20] = +static EventType table_sc_em[20] = { EVENT_OBJECT_SHORTCUT00, EVENT_OBJECT_SHORTCUT01, @@ -113,13 +99,13 @@ bool CMainShort::CreateShortcuts() int i, rank, icon; char name[100]; - if ( m_main->RetFixScene() ) return false; + if ( m_main->GetFixScene() ) return false; m_interface->DeleteControl(EVENT_OBJECT_MOVIELOCK); m_interface->DeleteControl(EVENT_OBJECT_EDITLOCK); for ( i=0 ; i<20 ; i++ ) { - if ( i != 0 && m_shortcuts[i] == 0 ) continue; + if ( i != 0 && m_shortcuts[i] == nullptr ) continue; m_interface->DeleteControl(table_sc_em[i]); m_shortcuts[i] = 0; @@ -130,15 +116,15 @@ bool CMainShort::CreateShortcuts() pos.x = 4.0f/640.0f; pos.y = (480.0f-32.0f)/480.0f; - if ( m_main->RetMovieLock() && - !m_main->RetEditLock() ) // hangs during film? + if ( m_main->GetMovieLock() && + !m_main->GetEditLock() ) // hangs during film? { m_interface->CreateShortcut(pos, dim, 7, EVENT_OBJECT_MOVIELOCK); return true; } - if ( !m_main->RetFreePhoto() && - (m_main->RetEditLock() || - m_engine->RetPause()) ) // hangs during edition? + if ( !m_main->GetFreePhoto() && + (m_main->GetEditLock() || + m_engine->GetPause()) ) // hangs during edition? { m_interface->CreateShortcut(pos, dim, 6, EVENT_OBJECT_EDITLOCK); return true; @@ -154,13 +140,13 @@ bool CMainShort::CreateShortcuts() for ( i=0 ; i<1000000 ; i++ ) { pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); - if ( pObj == 0 ) break; + if ( pObj == nullptr ) break; - if ( !pObj->RetActif() ) continue; - if ( !pObj->RetSelectable() ) continue; - if ( pObj->RetProxyActivate() ) continue; + if ( !pObj->GetActif() ) continue; + if ( !pObj->GetSelectable() ) continue; + if ( pObj->GetProxyActivate() ) continue; - type = pObj->RetType(); + type = pObj->GetType(); icon = -1; if ( m_bBuilding ) { @@ -243,12 +229,12 @@ bool CMainShort::UpdateShortcuts() for ( i=0 ; i<20 ; i++ ) { - if ( m_shortcuts[i] == 0 ) continue; + if ( m_shortcuts[i] == nullptr ) continue; pc = m_interface->SearchControl(table_sc_em[i]); - if ( pc != 0 ) + if ( pc != nullptr ) { - pc->SetState(STATE_CHECK, m_shortcuts[i]->RetSelect()); + pc->SetState(STATE_CHECK, m_shortcuts[i]->GetSelect()); pc->SetState(STATE_RUN, m_shortcuts[i]->IsProgram()); } } @@ -257,7 +243,7 @@ bool CMainShort::UpdateShortcuts() // Selects an object through a shortcut. -void CMainShort::SelectShortcut(EventMsg event) +void CMainShort::SelectShortcut(EventType event) { int i; @@ -265,7 +251,7 @@ void CMainShort::SelectShortcut(EventMsg event) { if ( event == table_sc_em[i] ) { - if ( i != 0 && m_shortcuts[i] == 0 ) continue; + if ( i != 0 && m_shortcuts[i] == nullptr ) continue; if ( i == 0 ) // buildings <-> vehicles? { @@ -289,9 +275,9 @@ void CMainShort::SelectNext() CObject* pPrev; int i; - if ( m_main->RetMovieLock() || - m_main->RetEditLock() || - m_engine->RetPause() ) return; + if ( m_main->GetMovieLock() || + m_main->GetEditLock() || + m_engine->GetPause() ) return; pPrev = m_main->DeselectAll(); @@ -299,12 +285,12 @@ void CMainShort::SelectNext() { if ( m_shortcuts[i] == pPrev ) { - if ( m_shortcuts[++i] == 0 ) i = 1; + if ( m_shortcuts[++i] == nullptr ) i = 1; break; } } - if ( i == 20 || m_shortcuts[i] == 0 ) + if ( i == 20 || m_shortcuts[i] == nullptr ) { m_main->SelectHuman(); } @@ -325,13 +311,13 @@ CObject* CMainShort::DetectShort(Math::Point pos) for ( i=0 ; i<20 ; i++ ) { - if ( m_shortcuts[i] == 0 ) continue; + if ( m_shortcuts[i] == nullptr ) continue; pc = m_interface->SearchControl(table_sc_em[i]); if ( pc != 0 ) { - cpos = pc->RetPos(); - cdim = pc->RetDim(); + cpos = pc->GetPos(); + cdim = pc->GetDim(); if ( pos.x >= cpos.x && pos.x <= cpos.x+cdim.x && @@ -347,17 +333,17 @@ CObject* CMainShort::DetectShort(Math::Point pos) // Reports the object with the mouse hovers over. -void CMainShort::SetHilite(CObject* pObj) +void CMainShort::SetHighlight(CObject* pObj) { CControl* pc; int i; for ( i=0 ; i<20 ; i++ ) { - if ( m_shortcuts[i] == 0 ) continue; + if ( m_shortcuts[i] == nullptr ) continue; pc = m_interface->SearchControl(table_sc_em[i]); - if ( pc == 0 ) continue; + if ( pc == nullptr ) continue; if ( m_shortcuts[i] == pObj ) { @@ -372,3 +358,5 @@ void CMainShort::SetHilite(CObject* pObj) } } +} + diff --git a/src/ui/mainshort.h b/src/ui/mainshort.h index f260f0e..d570484 100644 --- a/src/ui/mainshort.h +++ b/src/ui/mainshort.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -18,45 +19,45 @@ #pragma once +#include -#include "common/event.h" -#include "math/point.h" +#include +#include -class CInstanceManager; -class CD3DEngine; -class CInterface; -class CRobotMain; -class CObject; +#include +#include + +namespace Ui { class CMainShort { -public: - CMainShort(CInstanceManager* iMan); - ~CMainShort(); - - void SetMode(bool bBuilding); - void FlushShortcuts(); - bool CreateShortcuts(); - bool UpdateShortcuts(); - void SelectShortcut(EventMsg event); - void SelectNext(); - CObject* DetectShort(Math::Point pos); - void SetHilite(CObject* pObj); - -protected: - -protected: - CInstanceManager* m_iMan; - CEvent* m_event; - CD3DEngine* m_engine; - CInterface* m_interface; - CRobotMain* m_main; - - CObject* m_shortcuts[20]; - bool m_bBuilding; + public: + CMainShort(); + ~CMainShort(); + + void SetMode(bool bBuilding); + void FlushShortcuts(); + bool CreateShortcuts(); + bool UpdateShortcuts(); + void SelectShortcut(EventType event); + void SelectNext(); + CObject* DetectShort(Math::Point pos); + void SetHighlight(CObject* pObj); + + protected: + + protected: + CInstanceManager* m_iMan; + CEvent* m_event; + Gfx::CEngine* m_engine; + CInterface* m_interface; + CRobotMain* m_main; + + CObject* m_shortcuts[20]; + bool m_bBuilding; }; - +} diff --git a/src/ui/map.cpp b/src/ui/map.cpp index 2714c04..30edfb1 100644 --- a/src/ui/map.cpp +++ b/src/ui/map.cpp @@ -223,7 +223,7 @@ void CMap::SetHighlight(CObject* pObj) m_highlightRank = -1; if ( m_bToy || m_fixImage[0] != 0 ) return; // card with still image? - if ( pObj == 0 ) + if ( pObj == nullptr ) return; for (int i = 0; i < MAPMAXOBJECT; i++) { -- cgit v1.2.3-1-g7c22 From 5b2bc489868f387dafcd470e25bd7e9d4aee3002 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 25 Aug 2012 13:45:40 +0400 Subject: Move EventType enum to a separate file --- src/common/event.h | 517 +---------------------------------------------- src/common/event_ids.h | 533 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 534 insertions(+), 516 deletions(-) create mode 100644 src/common/event_ids.h diff --git a/src/common/event.h b/src/common/event.h index 87c825e..3192931 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -20,6 +20,7 @@ #include +#include #include #include @@ -27,522 +28,6 @@ class CInstanceManager; -/** - \enum EventType - \brief Type of event message - */ -enum EventType -{ - -// TODO: document the meaning of each value - - //! Invalid event / no event - EVENT_NULL = 0, - - //! Event sent on user or system quit request - EVENT_QUIT = 1, - - //! Frame update event - EVENT_FRAME = 2, - - //! Event sent after pressing a mouse button - EVENT_MOUSE_BUTTON_DOWN = 3, - //! Event sent after releasing a mouse button - EVENT_MOUSE_BUTTON_UP = 4, - //! Event sent after moving the mouse - EVENT_MOUSE_MOVE = 7, - //! Event sent after pressing a key - EVENT_KEY_DOWN = 8, - //! Event sent after releasing a key - EVENT_KEY_UP = 9, - - //! Event sent when application window loses/gains focus - EVENT_ACTIVE = 10, - - //? EVENT_CHAR = 10, - //? EVENT_FOCUS = 11, - - //! Event sent after moving joystick axes - EVENT_JOY_AXIS = 12, - //! Event sent after pressing a joystick button - EVENT_JOY_BUTTON_DOWN = 13, - //! Event sent after releasing a joystick button - EVENT_JOY_BUTTON_UP = 14, - - EVENT_UPDINTERFACE = 20, - EVENT_WIN = 30, - EVENT_LOST = 31, - - EVENT_BUTTON_OK = 40, - EVENT_BUTTON_CANCEL = 41, - EVENT_BUTTON_NEXT = 42, - EVENT_BUTTON_PREV = 43, - EVENT_BUTTON_QUIT = 44, - - EVENT_BUTTON0 = 50, - EVENT_BUTTON1 = 51, - EVENT_BUTTON2 = 52, - EVENT_BUTTON3 = 53, - EVENT_BUTTON4 = 54, - EVENT_BUTTON5 = 55, - EVENT_BUTTON6 = 56, - EVENT_BUTTON7 = 57, - EVENT_BUTTON8 = 58, - EVENT_BUTTON9 = 59, - EVENT_BUTTON10 = 60, - EVENT_BUTTON11 = 61, - EVENT_BUTTON12 = 62, - EVENT_BUTTON13 = 63, - EVENT_BUTTON14 = 64, - EVENT_BUTTON15 = 65, - EVENT_BUTTON16 = 66, - EVENT_BUTTON17 = 67, - EVENT_BUTTON18 = 68, - EVENT_BUTTON19 = 69, - - EVENT_EDIT0 = 70, - EVENT_EDIT1 = 71, - EVENT_EDIT2 = 72, - EVENT_EDIT3 = 73, - EVENT_EDIT4 = 74, - EVENT_EDIT5 = 75, - EVENT_EDIT6 = 76, - EVENT_EDIT7 = 77, - EVENT_EDIT8 = 78, - EVENT_EDIT9 = 79, - - EVENT_WINDOW0 = 80, // the bottom panel - EVENT_WINDOW1 = 81, // map - EVENT_WINDOW2 = 82, // CDisplayText - EVENT_WINDOW3 = 83, // CStudio - EVENT_WINDOW4 = 84, // DisplayInfo - EVENT_WINDOW5 = 85, // setup - EVENT_WINDOW6 = 86, - EVENT_WINDOW7 = 87, - EVENT_WINDOW8 = 88, - EVENT_WINDOW9 = 89, // dialogue - - EVENT_LABEL0 = 90, - EVENT_LABEL1 = 91, - EVENT_LABEL2 = 92, - EVENT_LABEL3 = 93, - EVENT_LABEL4 = 94, - EVENT_LABEL5 = 95, - EVENT_LABEL6 = 96, - EVENT_LABEL7 = 97, - EVENT_LABEL8 = 98, - EVENT_LABEL9 = 99, - EVENT_LABEL10 = 100, - EVENT_LABEL11 = 101, - EVENT_LABEL12 = 102, - EVENT_LABEL13 = 103, - EVENT_LABEL14 = 104, - EVENT_LABEL15 = 105, - EVENT_LABEL16 = 106, - EVENT_LABEL17 = 107, - EVENT_LABEL18 = 108, - EVENT_LABEL19 = 109, - - EVENT_LIST0 = 110, - EVENT_LIST1 = 111, - EVENT_LIST2 = 112, - EVENT_LIST3 = 113, - EVENT_LIST4 = 114, - EVENT_LIST5 = 115, - EVENT_LIST6 = 116, - EVENT_LIST7 = 117, - EVENT_LIST8 = 118, - EVENT_LIST9 = 119, - - EVENT_TOOLTIP = 200, - - EVENT_DIALOG_OK = 300, - EVENT_DIALOG_CANCEL = 301, - EVENT_DIALOG_LABEL = 302, - EVENT_DIALOG_LABEL1 = 303, - EVENT_DIALOG_LABEL2 = 304, - EVENT_DIALOG_LABEL3 = 305, - EVENT_DIALOG_LIST = 306, - EVENT_DIALOG_EDIT = 307, - EVENT_DIALOG_CHECK1 = 308, - EVENT_DIALOG_CHECK2 = 309, - - EVENT_INTERFACE_TRAINER = 400, - EVENT_INTERFACE_DEFI = 401, - EVENT_INTERFACE_MISSION = 402, - EVENT_INTERFACE_FREE = 403, - EVENT_INTERFACE_PROTO = 404, - EVENT_INTERFACE_NAME = 405, - EVENT_INTERFACE_SETUP = 406, - EVENT_INTERFACE_QUIT = 407, - EVENT_INTERFACE_BACK = 408, - EVENT_INTERFACE_AGAIN = 409, - EVENT_INTERFACE_WRITE = 410, - EVENT_INTERFACE_READ = 411, - EVENT_INTERFACE_ABORT = 412, - EVENT_INTERFACE_USER = 413, - EVENT_INTERFACE_TEEN = 414, - - EVENT_INTERFACE_CHAP = 420, - EVENT_INTERFACE_LIST = 421, - EVENT_INTERFACE_RESUME = 422, - EVENT_INTERFACE_PLAY = 423, - - EVENT_INTERFACE_SETUPd = 430, - EVENT_INTERFACE_SETUPg = 431, - EVENT_INTERFACE_SETUPp = 432, - EVENT_INTERFACE_SETUPc = 433, - EVENT_INTERFACE_SETUPs = 434, - - EVENT_INTERFACE_DEVICE = 440, - EVENT_INTERFACE_RESOL = 441, - EVENT_INTERFACE_FULL = 442, - EVENT_INTERFACE_APPLY = 443, - - EVENT_INTERFACE_TOTO = 450, - EVENT_INTERFACE_SHADOW = 451, - EVENT_INTERFACE_DIRTY = 452, - EVENT_INTERFACE_LENS = 453, - EVENT_INTERFACE_SKY = 454, - EVENT_INTERFACE_PLANET = 456, - EVENT_INTERFACE_LIGHT = 457, - EVENT_INTERFACE_PARTI = 458, - EVENT_INTERFACE_CLIP = 459, - EVENT_INTERFACE_DETAIL = 460, - EVENT_INTERFACE_TEXTURE = 461, - EVENT_INTERFACE_RAIN = 462, - EVENT_INTERFACE_GLINT = 463, - EVENT_INTERFACE_TOOLTIP = 464, - EVENT_INTERFACE_MOVIES = 465, - EVENT_INTERFACE_NICERST = 466, - EVENT_INTERFACE_SCROLL = 467, - EVENT_INTERFACE_INVERTX = 468, - EVENT_INTERFACE_INVERTY = 469, - EVENT_INTERFACE_EFFECT = 470, - EVENT_INTERFACE_MOUSE = 471, - EVENT_INTERFACE_GROUND = 472, - EVENT_INTERFACE_GADGET = 473, - EVENT_INTERFACE_FOG = 474, - EVENT_INTERFACE_HIMSELF = 475, - EVENT_INTERFACE_EDITMODE= 476, - EVENT_INTERFACE_EDITVALUE= 477, - EVENT_INTERFACE_SOLUCE4 = 478, - - EVENT_INTERFACE_KINFO1 = 500, - EVENT_INTERFACE_KINFO2 = 501, - EVENT_INTERFACE_KGROUP = 502, - EVENT_INTERFACE_KSCROLL = 503, - EVENT_INTERFACE_KDEF = 504, - EVENT_INTERFACE_KLEFT = 505, - EVENT_INTERFACE_KRIGHT = 506, - EVENT_INTERFACE_KUP = 507, - EVENT_INTERFACE_KDOWN = 508, - EVENT_INTERFACE_KGUP = 509, - EVENT_INTERFACE_KGDOWN = 510, - EVENT_INTERFACE_KCAMERA = 511, - EVENT_INTERFACE_KDESEL = 512, - EVENT_INTERFACE_KACTION = 513, - EVENT_INTERFACE_KNEAR = 514, - EVENT_INTERFACE_KAWAY = 515, - EVENT_INTERFACE_KNEXT = 516, - EVENT_INTERFACE_KHUMAN = 517, - EVENT_INTERFACE_KQUIT = 518, - EVENT_INTERFACE_KHELP = 519, - EVENT_INTERFACE_KPROG = 520, - EVENT_INTERFACE_KCBOT = 521, - EVENT_INTERFACE_KVISIT = 522, - EVENT_INTERFACE_KSPEED10= 523, - EVENT_INTERFACE_KSPEED15= 524, - EVENT_INTERFACE_KSPEED20= 525, - EVENT_INTERFACE_KSPEED30= 526, - - EVENT_INTERFACE_VOLSOUND= 530, - EVENT_INTERFACE_VOLMUSIC= 531, - EVENT_INTERFACE_SOUND3D = 532, - - EVENT_INTERFACE_MIN = 540, - EVENT_INTERFACE_NORM = 541, - EVENT_INTERFACE_MAX = 542, - - EVENT_INTERFACE_SILENT = 550, - EVENT_INTERFACE_NOISY = 551, - - EVENT_INTERFACE_JOYSTICK= 560, - EVENT_INTERFACE_SOLUCE = 561, - - EVENT_INTERFACE_GLINTl = 570, - EVENT_INTERFACE_GLINTr = 571, - EVENT_INTERFACE_GLINTu = 572, - EVENT_INTERFACE_GLINTb = 573, - - EVENT_INTERFACE_NEDIT = 580, - EVENT_INTERFACE_NLIST = 581, - EVENT_INTERFACE_NOK = 582, - EVENT_INTERFACE_NCANCEL = 583, - EVENT_INTERFACE_NDELETE = 584, - EVENT_INTERFACE_NLABEL = 585, - - EVENT_INTERFACE_IOWRITE = 600, - EVENT_INTERFACE_IOREAD = 601, - EVENT_INTERFACE_IOLIST = 602, - EVENT_INTERFACE_IONAME = 603, - EVENT_INTERFACE_IOLABEL = 604, - EVENT_INTERFACE_IOIMAGE = 605, - EVENT_INTERFACE_IODELETE= 606, - - EVENT_INTERFACE_PERSO = 620, - EVENT_INTERFACE_POK = 621, - EVENT_INTERFACE_PCANCEL = 622, - EVENT_INTERFACE_PDEF = 623, - EVENT_INTERFACE_PHEAD = 624, - EVENT_INTERFACE_PBODY = 625, - EVENT_INTERFACE_PLROT = 626, - EVENT_INTERFACE_PRROT = 627, - EVENT_INTERFACE_PC0a = 640, - EVENT_INTERFACE_PC1a = 641, - EVENT_INTERFACE_PC2a = 642, - EVENT_INTERFACE_PC3a = 643, - EVENT_INTERFACE_PC4a = 644, - EVENT_INTERFACE_PC5a = 645, - EVENT_INTERFACE_PC6a = 646, - EVENT_INTERFACE_PC7a = 647, - EVENT_INTERFACE_PC8a = 648, - EVENT_INTERFACE_PC9a = 649, - EVENT_INTERFACE_PCRa = 650, - EVENT_INTERFACE_PCGa = 651, - EVENT_INTERFACE_PCBa = 652, - EVENT_INTERFACE_PC0b = 660, - EVENT_INTERFACE_PC1b = 661, - EVENT_INTERFACE_PC2b = 662, - EVENT_INTERFACE_PC3b = 663, - EVENT_INTERFACE_PC4b = 664, - EVENT_INTERFACE_PC5b = 665, - EVENT_INTERFACE_PC6b = 666, - EVENT_INTERFACE_PC7b = 667, - EVENT_INTERFACE_PC8b = 668, - EVENT_INTERFACE_PC9b = 669, - EVENT_INTERFACE_PCRb = 670, - EVENT_INTERFACE_PCGb = 671, - EVENT_INTERFACE_PCBb = 672, - EVENT_INTERFACE_PFACE1 = 680, - EVENT_INTERFACE_PFACE2 = 681, - EVENT_INTERFACE_PFACE3 = 682, - EVENT_INTERFACE_PFACE4 = 683, - EVENT_INTERFACE_PGLASS0 = 690, - EVENT_INTERFACE_PGLASS1 = 691, - EVENT_INTERFACE_PGLASS2 = 692, - EVENT_INTERFACE_PGLASS3 = 693, - EVENT_INTERFACE_PGLASS4 = 694, - EVENT_INTERFACE_PGLASS5 = 695, - EVENT_INTERFACE_PGLASS6 = 696, - EVENT_INTERFACE_PGLASS7 = 697, - EVENT_INTERFACE_PGLASS8 = 698, - EVENT_INTERFACE_PGLASS9 = 699, - - EVENT_DT_GROUP0 = 700, - EVENT_DT_GROUP1 = 701, - EVENT_DT_GROUP2 = 702, - EVENT_DT_GROUP3 = 703, - EVENT_DT_GROUP4 = 704, - EVENT_DT_LABEL0 = 710, - EVENT_DT_LABEL1 = 711, - EVENT_DT_LABEL2 = 712, - EVENT_DT_LABEL3 = 713, - EVENT_DT_LABEL4 = 714, - EVENT_DT_VISIT0 = 720, - EVENT_DT_VISIT1 = 721, - EVENT_DT_VISIT2 = 722, - EVENT_DT_VISIT3 = 723, - EVENT_DT_VISIT4 = 724, - EVENT_DT_END = 725, - - EVENT_CMD = 800, - EVENT_SPEED = 801, - - EVENT_HYPER_PREV = 900, - EVENT_HYPER_NEXT = 901, - EVENT_HYPER_HOME = 902, - EVENT_HYPER_COPY = 903, - EVENT_HYPER_SIZE1 = 904, - EVENT_HYPER_SIZE2 = 905, - EVENT_HYPER_SIZE3 = 906, - EVENT_HYPER_SIZE4 = 907, - EVENT_HYPER_SIZE5 = 908, - - EVENT_SATCOM_HUSTON = 920, - EVENT_SATCOM_SAT = 921, - EVENT_SATCOM_LOADING = 922, - EVENT_SATCOM_OBJECT = 923, - EVENT_SATCOM_PROG = 924, - EVENT_SATCOM_SOLUCE = 925, - - EVENT_OBJECT_DESELECT = 1000, - EVENT_OBJECT_LEFT = 1001, - EVENT_OBJECT_RIGHT = 1002, - EVENT_OBJECT_UP = 1003, - EVENT_OBJECT_DOWN = 1004, - EVENT_OBJECT_GASUP = 1005, - EVENT_OBJECT_GASDOWN = 1006, - EVENT_OBJECT_HTAKE = 1020, - EVENT_OBJECT_MTAKE = 1021, - EVENT_OBJECT_MFRONT = 1022, - EVENT_OBJECT_MBACK = 1023, - EVENT_OBJECT_MPOWER = 1024, - EVENT_OBJECT_BHELP = 1040, - EVENT_OBJECT_BTAKEOFF = 1041, - EVENT_OBJECT_BDERRICK = 1050, - EVENT_OBJECT_BSTATION = 1051, - EVENT_OBJECT_BFACTORY = 1052, - EVENT_OBJECT_BCONVERT = 1053, - EVENT_OBJECT_BTOWER = 1054, - EVENT_OBJECT_BREPAIR = 1055, - EVENT_OBJECT_BRESEARCH = 1056, - EVENT_OBJECT_BRADAR = 1057, - EVENT_OBJECT_BENERGY = 1058, - EVENT_OBJECT_BLABO = 1059, - EVENT_OBJECT_BNUCLEAR = 1060, - EVENT_OBJECT_BPARA = 1061, - EVENT_OBJECT_BINFO = 1062, - EVENT_OBJECT_BXXXX = 1063, - EVENT_OBJECT_GFLAT = 1070, - EVENT_OBJECT_FCREATE = 1071, - EVENT_OBJECT_FDELETE = 1072, - EVENT_OBJECT_FCOLORb = 1073, - EVENT_OBJECT_FCOLORr = 1074, - EVENT_OBJECT_FCOLORg = 1075, - EVENT_OBJECT_FCOLORy = 1076, - EVENT_OBJECT_FCOLORv = 1077, - EVENT_OBJECT_FACTORYwa = 1080, - EVENT_OBJECT_FACTORYta = 1081, - EVENT_OBJECT_FACTORYfa = 1082, - EVENT_OBJECT_FACTORYia = 1083, - EVENT_OBJECT_FACTORYwc = 1084, - EVENT_OBJECT_FACTORYtc = 1085, - EVENT_OBJECT_FACTORYfc = 1086, - EVENT_OBJECT_FACTORYic = 1087, - EVENT_OBJECT_FACTORYwi = 1088, - EVENT_OBJECT_FACTORYti = 1089, - EVENT_OBJECT_FACTORYfi = 1090, - EVENT_OBJECT_FACTORYii = 1091, - EVENT_OBJECT_FACTORYws = 1092, - EVENT_OBJECT_FACTORYts = 1093, - EVENT_OBJECT_FACTORYfs = 1094, - EVENT_OBJECT_FACTORYis = 1095, - EVENT_OBJECT_FACTORYrt = 1096, - EVENT_OBJECT_FACTORYrc = 1097, - EVENT_OBJECT_FACTORYrr = 1098, - EVENT_OBJECT_FACTORYrs = 1099, - EVENT_OBJECT_FACTORYsa = 1100, - EVENT_OBJECT_SEARCH = 1200, - EVENT_OBJECT_TERRAFORM = 1201, - EVENT_OBJECT_FIRE = 1202, - EVENT_OBJECT_FIREANT = 1203, - EVENT_OBJECT_RECOVER = 1220, - EVENT_OBJECT_BEGSHIELD = 1221, - EVENT_OBJECT_ENDSHIELD = 1222, - EVENT_OBJECT_RTANK = 1223, - EVENT_OBJECT_RFLY = 1224, - EVENT_OBJECT_RTHUMP = 1225, - EVENT_OBJECT_RCANON = 1226, - EVENT_OBJECT_RTOWER = 1227, - EVENT_OBJECT_RPHAZER = 1228, - EVENT_OBJECT_RSHIELD = 1229, - EVENT_OBJECT_RATOMIC = 1230, - EVENT_OBJECT_RiPAW = 1231, - EVENT_OBJECT_RiGUN = 1232, - EVENT_OBJECT_RESET = 1233, - EVENT_OBJECT_DIMSHIELD = 1234, - EVENT_OBJECT_TARGET = 1235, - EVENT_OBJECT_PROGLIST = 1310, - EVENT_OBJECT_PROGRUN = 1311, - EVENT_OBJECT_PROGEDIT = 1312, - EVENT_OBJECT_PROGSTART = 1313, - EVENT_OBJECT_PROGSTOP = 1314, - EVENT_OBJECT_INFOOK = 1340, - EVENT_OBJECT_DELETE = 1350, - EVENT_OBJECT_GENERGY = 1360, - EVENT_OBJECT_GSHIELD = 1361, - EVENT_OBJECT_GRANGE = 1362, - EVENT_OBJECT_COMPASS = 1363, - EVENT_OBJECT_MAP = 1364, - EVENT_OBJECT_MAPZOOM = 1365, - EVENT_OBJECT_GPROGRESS = 1366, - EVENT_OBJECT_GRADAR = 1367, - EVENT_OBJECT_GINFO = 1368, - EVENT_OBJECT_TYPE = 1369, - EVENT_OBJECT_CROSSHAIR = 1370, - EVENT_OBJECT_CORNERul = 1371, - EVENT_OBJECT_CORNERur = 1372, - EVENT_OBJECT_CORNERdl = 1373, - EVENT_OBJECT_CORNERdr = 1374, - EVENT_OBJECT_MAPi = 1375, - EVENT_OBJECT_MAPg = 1376, - EVENT_OBJECT_CAMERA = 1400, - EVENT_OBJECT_HELP = 1401, - EVENT_OBJECT_SOLUCE = 1402, - EVENT_OBJECT_CAMERAleft = 1403, - EVENT_OBJECT_CAMERAright= 1404, - EVENT_OBJECT_CAMERAnear = 1405, - EVENT_OBJECT_CAMERAaway = 1406, - EVENT_OBJECT_SHORTCUT00 = 1500, - EVENT_OBJECT_SHORTCUT01 = 1501, - EVENT_OBJECT_SHORTCUT02 = 1502, - EVENT_OBJECT_SHORTCUT03 = 1503, - EVENT_OBJECT_SHORTCUT04 = 1504, - EVENT_OBJECT_SHORTCUT05 = 1505, - EVENT_OBJECT_SHORTCUT06 = 1506, - EVENT_OBJECT_SHORTCUT07 = 1507, - EVENT_OBJECT_SHORTCUT08 = 1508, - EVENT_OBJECT_SHORTCUT09 = 1509, - EVENT_OBJECT_SHORTCUT10 = 1510, - EVENT_OBJECT_SHORTCUT11 = 1511, - EVENT_OBJECT_SHORTCUT12 = 1512, - EVENT_OBJECT_SHORTCUT13 = 1513, - EVENT_OBJECT_SHORTCUT14 = 1514, - EVENT_OBJECT_SHORTCUT15 = 1515, - EVENT_OBJECT_SHORTCUT16 = 1516, - EVENT_OBJECT_SHORTCUT17 = 1517, - EVENT_OBJECT_SHORTCUT18 = 1518, - EVENT_OBJECT_SHORTCUT19 = 1519, - EVENT_OBJECT_MOVIELOCK = 1550, - EVENT_OBJECT_EDITLOCK = 1551, - EVENT_OBJECT_LIMIT = 1560, - - EVENT_OBJECT_PEN0 = 1570, - EVENT_OBJECT_PEN1 = 1571, - EVENT_OBJECT_PEN2 = 1572, - EVENT_OBJECT_PEN3 = 1573, - EVENT_OBJECT_PEN4 = 1574, - EVENT_OBJECT_PEN5 = 1575, - EVENT_OBJECT_PEN6 = 1576, - EVENT_OBJECT_PEN7 = 1577, - EVENT_OBJECT_PEN8 = 1578, - EVENT_OBJECT_REC = 1580, - EVENT_OBJECT_STOP = 1581, - - EVENT_STUDIO_OK = 2000, - EVENT_STUDIO_CANCEL = 2001, - EVENT_STUDIO_EDIT = 2002, - EVENT_STUDIO_LIST = 2003, - EVENT_STUDIO_NEW = 2010, - EVENT_STUDIO_OPEN = 2011, - EVENT_STUDIO_SAVE = 2012, - EVENT_STUDIO_UNDO = 2013, - EVENT_STUDIO_CUT = 2014, - EVENT_STUDIO_COPY = 2015, - EVENT_STUDIO_PASTE = 2016, - EVENT_STUDIO_SIZE = 2017, - EVENT_STUDIO_TOOL = 2018, - EVENT_STUDIO_HELP = 2019, - EVENT_STUDIO_COMPILE = 2050, - EVENT_STUDIO_RUN = 2051, - EVENT_STUDIO_REALTIME = 2052, - EVENT_STUDIO_STEP = 2053, - - EVENT_USER = 10000, - EVENT_FORCE_LONG = 0x7fffffff -}; - /** \enum PressState \brief State of key/mouse button */ diff --git a/src/common/event_ids.h b/src/common/event_ids.h new file mode 100644 index 0000000..ab235d5 --- /dev/null +++ b/src/common/event_ids.h @@ -0,0 +1,533 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + +#pragma once + +/** + \enum EventType + \brief Type of event message + */ +enum EventType +{ + +// TODO: document the meaning of each value + + //! Invalid event / no event + EVENT_NULL = 0, + + //! Event sent on user or system quit request + EVENT_QUIT = 1, + + //! Frame update event + EVENT_FRAME = 2, + + //! Event sent after pressing a mouse button + EVENT_MOUSE_BUTTON_DOWN = 3, + //! Event sent after releasing a mouse button + EVENT_MOUSE_BUTTON_UP = 4, + //! Event sent after moving the mouse + EVENT_MOUSE_MOVE = 7, + //! Event sent after pressing a key + EVENT_KEY_DOWN = 8, + //! Event sent after releasing a key + EVENT_KEY_UP = 9, + + //! Event sent when application window loses/gains focus + EVENT_ACTIVE = 10, + + //? EVENT_CHAR = 10, + //? EVENT_FOCUS = 11, + + //! Event sent after moving joystick axes + EVENT_JOY_AXIS = 12, + //! Event sent after pressing a joystick button + EVENT_JOY_BUTTON_DOWN = 13, + //! Event sent after releasing a joystick button + EVENT_JOY_BUTTON_UP = 14, + + EVENT_UPDINTERFACE = 20, + EVENT_WIN = 30, + EVENT_LOST = 31, + + EVENT_BUTTON_OK = 40, + EVENT_BUTTON_CANCEL = 41, + EVENT_BUTTON_NEXT = 42, + EVENT_BUTTON_PREV = 43, + EVENT_BUTTON_QUIT = 44, + + EVENT_BUTTON0 = 50, + EVENT_BUTTON1 = 51, + EVENT_BUTTON2 = 52, + EVENT_BUTTON3 = 53, + EVENT_BUTTON4 = 54, + EVENT_BUTTON5 = 55, + EVENT_BUTTON6 = 56, + EVENT_BUTTON7 = 57, + EVENT_BUTTON8 = 58, + EVENT_BUTTON9 = 59, + EVENT_BUTTON10 = 60, + EVENT_BUTTON11 = 61, + EVENT_BUTTON12 = 62, + EVENT_BUTTON13 = 63, + EVENT_BUTTON14 = 64, + EVENT_BUTTON15 = 65, + EVENT_BUTTON16 = 66, + EVENT_BUTTON17 = 67, + EVENT_BUTTON18 = 68, + EVENT_BUTTON19 = 69, + + EVENT_EDIT0 = 70, + EVENT_EDIT1 = 71, + EVENT_EDIT2 = 72, + EVENT_EDIT3 = 73, + EVENT_EDIT4 = 74, + EVENT_EDIT5 = 75, + EVENT_EDIT6 = 76, + EVENT_EDIT7 = 77, + EVENT_EDIT8 = 78, + EVENT_EDIT9 = 79, + + EVENT_WINDOW0 = 80, // the bottom panel + EVENT_WINDOW1 = 81, // map + EVENT_WINDOW2 = 82, // CDisplayText + EVENT_WINDOW3 = 83, // CStudio + EVENT_WINDOW4 = 84, // DisplayInfo + EVENT_WINDOW5 = 85, // setup + EVENT_WINDOW6 = 86, + EVENT_WINDOW7 = 87, + EVENT_WINDOW8 = 88, + EVENT_WINDOW9 = 89, // dialogue + + EVENT_LABEL0 = 90, + EVENT_LABEL1 = 91, + EVENT_LABEL2 = 92, + EVENT_LABEL3 = 93, + EVENT_LABEL4 = 94, + EVENT_LABEL5 = 95, + EVENT_LABEL6 = 96, + EVENT_LABEL7 = 97, + EVENT_LABEL8 = 98, + EVENT_LABEL9 = 99, + EVENT_LABEL10 = 100, + EVENT_LABEL11 = 101, + EVENT_LABEL12 = 102, + EVENT_LABEL13 = 103, + EVENT_LABEL14 = 104, + EVENT_LABEL15 = 105, + EVENT_LABEL16 = 106, + EVENT_LABEL17 = 107, + EVENT_LABEL18 = 108, + EVENT_LABEL19 = 109, + + EVENT_LIST0 = 110, + EVENT_LIST1 = 111, + EVENT_LIST2 = 112, + EVENT_LIST3 = 113, + EVENT_LIST4 = 114, + EVENT_LIST5 = 115, + EVENT_LIST6 = 116, + EVENT_LIST7 = 117, + EVENT_LIST8 = 118, + EVENT_LIST9 = 119, + + EVENT_TOOLTIP = 200, + + EVENT_DIALOG_OK = 300, + EVENT_DIALOG_CANCEL = 301, + EVENT_DIALOG_LABEL = 302, + EVENT_DIALOG_LABEL1 = 303, + EVENT_DIALOG_LABEL2 = 304, + EVENT_DIALOG_LABEL3 = 305, + EVENT_DIALOG_LIST = 306, + EVENT_DIALOG_EDIT = 307, + EVENT_DIALOG_CHECK1 = 308, + EVENT_DIALOG_CHECK2 = 309, + + EVENT_INTERFACE_TRAINER = 400, + EVENT_INTERFACE_DEFI = 401, + EVENT_INTERFACE_MISSION = 402, + EVENT_INTERFACE_FREE = 403, + EVENT_INTERFACE_PROTO = 404, + EVENT_INTERFACE_NAME = 405, + EVENT_INTERFACE_SETUP = 406, + EVENT_INTERFACE_QUIT = 407, + EVENT_INTERFACE_BACK = 408, + EVENT_INTERFACE_AGAIN = 409, + EVENT_INTERFACE_WRITE = 410, + EVENT_INTERFACE_READ = 411, + EVENT_INTERFACE_ABORT = 412, + EVENT_INTERFACE_USER = 413, + EVENT_INTERFACE_TEEN = 414, + + EVENT_INTERFACE_CHAP = 420, + EVENT_INTERFACE_LIST = 421, + EVENT_INTERFACE_RESUME = 422, + EVENT_INTERFACE_PLAY = 423, + + EVENT_INTERFACE_SETUPd = 430, + EVENT_INTERFACE_SETUPg = 431, + EVENT_INTERFACE_SETUPp = 432, + EVENT_INTERFACE_SETUPc = 433, + EVENT_INTERFACE_SETUPs = 434, + + EVENT_INTERFACE_DEVICE = 440, + EVENT_INTERFACE_RESOL = 441, + EVENT_INTERFACE_FULL = 442, + EVENT_INTERFACE_APPLY = 443, + + EVENT_INTERFACE_TOTO = 450, + EVENT_INTERFACE_SHADOW = 451, + EVENT_INTERFACE_DIRTY = 452, + EVENT_INTERFACE_LENS = 453, + EVENT_INTERFACE_SKY = 454, + EVENT_INTERFACE_PLANET = 456, + EVENT_INTERFACE_LIGHT = 457, + EVENT_INTERFACE_PARTI = 458, + EVENT_INTERFACE_CLIP = 459, + EVENT_INTERFACE_DETAIL = 460, + EVENT_INTERFACE_TEXTURE = 461, + EVENT_INTERFACE_RAIN = 462, + EVENT_INTERFACE_GLINT = 463, + EVENT_INTERFACE_TOOLTIP = 464, + EVENT_INTERFACE_MOVIES = 465, + EVENT_INTERFACE_NICERST = 466, + EVENT_INTERFACE_SCROLL = 467, + EVENT_INTERFACE_INVERTX = 468, + EVENT_INTERFACE_INVERTY = 469, + EVENT_INTERFACE_EFFECT = 470, + EVENT_INTERFACE_MOUSE = 471, + EVENT_INTERFACE_GROUND = 472, + EVENT_INTERFACE_GADGET = 473, + EVENT_INTERFACE_FOG = 474, + EVENT_INTERFACE_HIMSELF = 475, + EVENT_INTERFACE_EDITMODE= 476, + EVENT_INTERFACE_EDITVALUE= 477, + EVENT_INTERFACE_SOLUCE4 = 478, + + EVENT_INTERFACE_KINFO1 = 500, + EVENT_INTERFACE_KINFO2 = 501, + EVENT_INTERFACE_KGROUP = 502, + EVENT_INTERFACE_KSCROLL = 503, + EVENT_INTERFACE_KDEF = 504, + EVENT_INTERFACE_KLEFT = 505, + EVENT_INTERFACE_KRIGHT = 506, + EVENT_INTERFACE_KUP = 507, + EVENT_INTERFACE_KDOWN = 508, + EVENT_INTERFACE_KGUP = 509, + EVENT_INTERFACE_KGDOWN = 510, + EVENT_INTERFACE_KCAMERA = 511, + EVENT_INTERFACE_KDESEL = 512, + EVENT_INTERFACE_KACTION = 513, + EVENT_INTERFACE_KNEAR = 514, + EVENT_INTERFACE_KAWAY = 515, + EVENT_INTERFACE_KNEXT = 516, + EVENT_INTERFACE_KHUMAN = 517, + EVENT_INTERFACE_KQUIT = 518, + EVENT_INTERFACE_KHELP = 519, + EVENT_INTERFACE_KPROG = 520, + EVENT_INTERFACE_KCBOT = 521, + EVENT_INTERFACE_KVISIT = 522, + EVENT_INTERFACE_KSPEED10= 523, + EVENT_INTERFACE_KSPEED15= 524, + EVENT_INTERFACE_KSPEED20= 525, + EVENT_INTERFACE_KSPEED30= 526, + + EVENT_INTERFACE_VOLSOUND= 530, + EVENT_INTERFACE_VOLMUSIC= 531, + EVENT_INTERFACE_SOUND3D = 532, + + EVENT_INTERFACE_MIN = 540, + EVENT_INTERFACE_NORM = 541, + EVENT_INTERFACE_MAX = 542, + + EVENT_INTERFACE_SILENT = 550, + EVENT_INTERFACE_NOISY = 551, + + EVENT_INTERFACE_JOYSTICK= 560, + EVENT_INTERFACE_SOLUCE = 561, + + EVENT_INTERFACE_GLINTl = 570, + EVENT_INTERFACE_GLINTr = 571, + EVENT_INTERFACE_GLINTu = 572, + EVENT_INTERFACE_GLINTb = 573, + + EVENT_INTERFACE_NEDIT = 580, + EVENT_INTERFACE_NLIST = 581, + EVENT_INTERFACE_NOK = 582, + EVENT_INTERFACE_NCANCEL = 583, + EVENT_INTERFACE_NDELETE = 584, + EVENT_INTERFACE_NLABEL = 585, + + EVENT_INTERFACE_IOWRITE = 600, + EVENT_INTERFACE_IOREAD = 601, + EVENT_INTERFACE_IOLIST = 602, + EVENT_INTERFACE_IONAME = 603, + EVENT_INTERFACE_IOLABEL = 604, + EVENT_INTERFACE_IOIMAGE = 605, + EVENT_INTERFACE_IODELETE= 606, + + EVENT_INTERFACE_PERSO = 620, + EVENT_INTERFACE_POK = 621, + EVENT_INTERFACE_PCANCEL = 622, + EVENT_INTERFACE_PDEF = 623, + EVENT_INTERFACE_PHEAD = 624, + EVENT_INTERFACE_PBODY = 625, + EVENT_INTERFACE_PLROT = 626, + EVENT_INTERFACE_PRROT = 627, + EVENT_INTERFACE_PC0a = 640, + EVENT_INTERFACE_PC1a = 641, + EVENT_INTERFACE_PC2a = 642, + EVENT_INTERFACE_PC3a = 643, + EVENT_INTERFACE_PC4a = 644, + EVENT_INTERFACE_PC5a = 645, + EVENT_INTERFACE_PC6a = 646, + EVENT_INTERFACE_PC7a = 647, + EVENT_INTERFACE_PC8a = 648, + EVENT_INTERFACE_PC9a = 649, + EVENT_INTERFACE_PCRa = 650, + EVENT_INTERFACE_PCGa = 651, + EVENT_INTERFACE_PCBa = 652, + EVENT_INTERFACE_PC0b = 660, + EVENT_INTERFACE_PC1b = 661, + EVENT_INTERFACE_PC2b = 662, + EVENT_INTERFACE_PC3b = 663, + EVENT_INTERFACE_PC4b = 664, + EVENT_INTERFACE_PC5b = 665, + EVENT_INTERFACE_PC6b = 666, + EVENT_INTERFACE_PC7b = 667, + EVENT_INTERFACE_PC8b = 668, + EVENT_INTERFACE_PC9b = 669, + EVENT_INTERFACE_PCRb = 670, + EVENT_INTERFACE_PCGb = 671, + EVENT_INTERFACE_PCBb = 672, + EVENT_INTERFACE_PFACE1 = 680, + EVENT_INTERFACE_PFACE2 = 681, + EVENT_INTERFACE_PFACE3 = 682, + EVENT_INTERFACE_PFACE4 = 683, + EVENT_INTERFACE_PGLASS0 = 690, + EVENT_INTERFACE_PGLASS1 = 691, + EVENT_INTERFACE_PGLASS2 = 692, + EVENT_INTERFACE_PGLASS3 = 693, + EVENT_INTERFACE_PGLASS4 = 694, + EVENT_INTERFACE_PGLASS5 = 695, + EVENT_INTERFACE_PGLASS6 = 696, + EVENT_INTERFACE_PGLASS7 = 697, + EVENT_INTERFACE_PGLASS8 = 698, + EVENT_INTERFACE_PGLASS9 = 699, + + EVENT_DT_GROUP0 = 700, + EVENT_DT_GROUP1 = 701, + EVENT_DT_GROUP2 = 702, + EVENT_DT_GROUP3 = 703, + EVENT_DT_GROUP4 = 704, + EVENT_DT_LABEL0 = 710, + EVENT_DT_LABEL1 = 711, + EVENT_DT_LABEL2 = 712, + EVENT_DT_LABEL3 = 713, + EVENT_DT_LABEL4 = 714, + EVENT_DT_VISIT0 = 720, + EVENT_DT_VISIT1 = 721, + EVENT_DT_VISIT2 = 722, + EVENT_DT_VISIT3 = 723, + EVENT_DT_VISIT4 = 724, + EVENT_DT_END = 725, + + EVENT_CMD = 800, + EVENT_SPEED = 801, + + EVENT_HYPER_PREV = 900, + EVENT_HYPER_NEXT = 901, + EVENT_HYPER_HOME = 902, + EVENT_HYPER_COPY = 903, + EVENT_HYPER_SIZE1 = 904, + EVENT_HYPER_SIZE2 = 905, + EVENT_HYPER_SIZE3 = 906, + EVENT_HYPER_SIZE4 = 907, + EVENT_HYPER_SIZE5 = 908, + + EVENT_SATCOM_HUSTON = 920, + EVENT_SATCOM_SAT = 921, + EVENT_SATCOM_LOADING = 922, + EVENT_SATCOM_OBJECT = 923, + EVENT_SATCOM_PROG = 924, + EVENT_SATCOM_SOLUCE = 925, + + EVENT_OBJECT_DESELECT = 1000, + EVENT_OBJECT_LEFT = 1001, + EVENT_OBJECT_RIGHT = 1002, + EVENT_OBJECT_UP = 1003, + EVENT_OBJECT_DOWN = 1004, + EVENT_OBJECT_GASUP = 1005, + EVENT_OBJECT_GASDOWN = 1006, + EVENT_OBJECT_HTAKE = 1020, + EVENT_OBJECT_MTAKE = 1021, + EVENT_OBJECT_MFRONT = 1022, + EVENT_OBJECT_MBACK = 1023, + EVENT_OBJECT_MPOWER = 1024, + EVENT_OBJECT_BHELP = 1040, + EVENT_OBJECT_BTAKEOFF = 1041, + EVENT_OBJECT_BDERRICK = 1050, + EVENT_OBJECT_BSTATION = 1051, + EVENT_OBJECT_BFACTORY = 1052, + EVENT_OBJECT_BCONVERT = 1053, + EVENT_OBJECT_BTOWER = 1054, + EVENT_OBJECT_BREPAIR = 1055, + EVENT_OBJECT_BRESEARCH = 1056, + EVENT_OBJECT_BRADAR = 1057, + EVENT_OBJECT_BENERGY = 1058, + EVENT_OBJECT_BLABO = 1059, + EVENT_OBJECT_BNUCLEAR = 1060, + EVENT_OBJECT_BPARA = 1061, + EVENT_OBJECT_BINFO = 1062, + EVENT_OBJECT_BXXXX = 1063, + EVENT_OBJECT_GFLAT = 1070, + EVENT_OBJECT_FCREATE = 1071, + EVENT_OBJECT_FDELETE = 1072, + EVENT_OBJECT_FCOLORb = 1073, + EVENT_OBJECT_FCOLORr = 1074, + EVENT_OBJECT_FCOLORg = 1075, + EVENT_OBJECT_FCOLORy = 1076, + EVENT_OBJECT_FCOLORv = 1077, + EVENT_OBJECT_FACTORYwa = 1080, + EVENT_OBJECT_FACTORYta = 1081, + EVENT_OBJECT_FACTORYfa = 1082, + EVENT_OBJECT_FACTORYia = 1083, + EVENT_OBJECT_FACTORYwc = 1084, + EVENT_OBJECT_FACTORYtc = 1085, + EVENT_OBJECT_FACTORYfc = 1086, + EVENT_OBJECT_FACTORYic = 1087, + EVENT_OBJECT_FACTORYwi = 1088, + EVENT_OBJECT_FACTORYti = 1089, + EVENT_OBJECT_FACTORYfi = 1090, + EVENT_OBJECT_FACTORYii = 1091, + EVENT_OBJECT_FACTORYws = 1092, + EVENT_OBJECT_FACTORYts = 1093, + EVENT_OBJECT_FACTORYfs = 1094, + EVENT_OBJECT_FACTORYis = 1095, + EVENT_OBJECT_FACTORYrt = 1096, + EVENT_OBJECT_FACTORYrc = 1097, + EVENT_OBJECT_FACTORYrr = 1098, + EVENT_OBJECT_FACTORYrs = 1099, + EVENT_OBJECT_FACTORYsa = 1100, + EVENT_OBJECT_SEARCH = 1200, + EVENT_OBJECT_TERRAFORM = 1201, + EVENT_OBJECT_FIRE = 1202, + EVENT_OBJECT_FIREANT = 1203, + EVENT_OBJECT_RECOVER = 1220, + EVENT_OBJECT_BEGSHIELD = 1221, + EVENT_OBJECT_ENDSHIELD = 1222, + EVENT_OBJECT_RTANK = 1223, + EVENT_OBJECT_RFLY = 1224, + EVENT_OBJECT_RTHUMP = 1225, + EVENT_OBJECT_RCANON = 1226, + EVENT_OBJECT_RTOWER = 1227, + EVENT_OBJECT_RPHAZER = 1228, + EVENT_OBJECT_RSHIELD = 1229, + EVENT_OBJECT_RATOMIC = 1230, + EVENT_OBJECT_RiPAW = 1231, + EVENT_OBJECT_RiGUN = 1232, + EVENT_OBJECT_RESET = 1233, + EVENT_OBJECT_DIMSHIELD = 1234, + EVENT_OBJECT_TARGET = 1235, + EVENT_OBJECT_PROGLIST = 1310, + EVENT_OBJECT_PROGRUN = 1311, + EVENT_OBJECT_PROGEDIT = 1312, + EVENT_OBJECT_PROGSTART = 1313, + EVENT_OBJECT_PROGSTOP = 1314, + EVENT_OBJECT_INFOOK = 1340, + EVENT_OBJECT_DELETE = 1350, + EVENT_OBJECT_GENERGY = 1360, + EVENT_OBJECT_GSHIELD = 1361, + EVENT_OBJECT_GRANGE = 1362, + EVENT_OBJECT_COMPASS = 1363, + EVENT_OBJECT_MAP = 1364, + EVENT_OBJECT_MAPZOOM = 1365, + EVENT_OBJECT_GPROGRESS = 1366, + EVENT_OBJECT_GRADAR = 1367, + EVENT_OBJECT_GINFO = 1368, + EVENT_OBJECT_TYPE = 1369, + EVENT_OBJECT_CROSSHAIR = 1370, + EVENT_OBJECT_CORNERul = 1371, + EVENT_OBJECT_CORNERur = 1372, + EVENT_OBJECT_CORNERdl = 1373, + EVENT_OBJECT_CORNERdr = 1374, + EVENT_OBJECT_MAPi = 1375, + EVENT_OBJECT_MAPg = 1376, + EVENT_OBJECT_CAMERA = 1400, + EVENT_OBJECT_HELP = 1401, + EVENT_OBJECT_SOLUCE = 1402, + EVENT_OBJECT_CAMERAleft = 1403, + EVENT_OBJECT_CAMERAright= 1404, + EVENT_OBJECT_CAMERAnear = 1405, + EVENT_OBJECT_CAMERAaway = 1406, + EVENT_OBJECT_SHORTCUT00 = 1500, + EVENT_OBJECT_SHORTCUT01 = 1501, + EVENT_OBJECT_SHORTCUT02 = 1502, + EVENT_OBJECT_SHORTCUT03 = 1503, + EVENT_OBJECT_SHORTCUT04 = 1504, + EVENT_OBJECT_SHORTCUT05 = 1505, + EVENT_OBJECT_SHORTCUT06 = 1506, + EVENT_OBJECT_SHORTCUT07 = 1507, + EVENT_OBJECT_SHORTCUT08 = 1508, + EVENT_OBJECT_SHORTCUT09 = 1509, + EVENT_OBJECT_SHORTCUT10 = 1510, + EVENT_OBJECT_SHORTCUT11 = 1511, + EVENT_OBJECT_SHORTCUT12 = 1512, + EVENT_OBJECT_SHORTCUT13 = 1513, + EVENT_OBJECT_SHORTCUT14 = 1514, + EVENT_OBJECT_SHORTCUT15 = 1515, + EVENT_OBJECT_SHORTCUT16 = 1516, + EVENT_OBJECT_SHORTCUT17 = 1517, + EVENT_OBJECT_SHORTCUT18 = 1518, + EVENT_OBJECT_SHORTCUT19 = 1519, + EVENT_OBJECT_MOVIELOCK = 1550, + EVENT_OBJECT_EDITLOCK = 1551, + EVENT_OBJECT_LIMIT = 1560, + + EVENT_OBJECT_PEN0 = 1570, + EVENT_OBJECT_PEN1 = 1571, + EVENT_OBJECT_PEN2 = 1572, + EVENT_OBJECT_PEN3 = 1573, + EVENT_OBJECT_PEN4 = 1574, + EVENT_OBJECT_PEN5 = 1575, + EVENT_OBJECT_PEN6 = 1576, + EVENT_OBJECT_PEN7 = 1577, + EVENT_OBJECT_PEN8 = 1578, + EVENT_OBJECT_REC = 1580, + EVENT_OBJECT_STOP = 1581, + + EVENT_STUDIO_OK = 2000, + EVENT_STUDIO_CANCEL = 2001, + EVENT_STUDIO_EDIT = 2002, + EVENT_STUDIO_LIST = 2003, + EVENT_STUDIO_NEW = 2010, + EVENT_STUDIO_OPEN = 2011, + EVENT_STUDIO_SAVE = 2012, + EVENT_STUDIO_UNDO = 2013, + EVENT_STUDIO_CUT = 2014, + EVENT_STUDIO_COPY = 2015, + EVENT_STUDIO_PASTE = 2016, + EVENT_STUDIO_SIZE = 2017, + EVENT_STUDIO_TOOL = 2018, + EVENT_STUDIO_HELP = 2019, + EVENT_STUDIO_COMPILE = 2050, + EVENT_STUDIO_RUN = 2051, + EVENT_STUDIO_REALTIME = 2052, + EVENT_STUDIO_STEP = 2053, + + EVENT_USER = 10000, + EVENT_FORCE_LONG = 0x7fffffff +}; -- cgit v1.2.3-1-g7c22 From 43f7b384e98e063aefa3e8b49a726aad0972a187 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 25 Aug 2012 13:46:49 +0400 Subject: Move Error enum to a separate file --- src/common/error_ids.h | 150 +++++++++++++++++++++++++++++++++++++++++++++++++ src/common/misc.h | 134 +------------------------------------------ 2 files changed, 151 insertions(+), 133 deletions(-) create mode 100644 src/common/error_ids.h diff --git a/src/common/error_ids.h b/src/common/error_ids.h new file mode 100644 index 0000000..b17a018 --- /dev/null +++ b/src/common/error_ids.h @@ -0,0 +1,150 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + +#pragma once + +enum Error +{ + ERR_OK = 0, // ok + ERR_GENERIC = 1, // any error + ERR_CONTINUE = 2, // continues + ERR_STOP = 3, // stops + ERR_CMD = 4, // unknown command + ERR_INSTALL = 20, // incorrectly installed program + ERR_NOCD = 21, // CD not found + ERR_MANIP_VEH = 100, // inappropriate vehicle + ERR_MANIP_FLY = 101, // impossible in flight + ERR_MANIP_BUSY = 102, // taking: hands already occupied + ERR_MANIP_NIL = 103, // taking: nothing has to take + ERR_MANIP_MOTOR = 105, // busy: impossible to move + ERR_MANIP_OCC = 106, // busy: location already occupied + ERR_MANIP_FRIEND = 107, // no other vehicle + ERR_MANIP_RADIO = 108, // impossible because radioactive + ERR_MANIP_WATER = 109, // not possible under water + ERR_MANIP_EMPTY = 110, // nothing to deposit + ERR_BUILD_FLY = 120, // not possible in flight + ERR_BUILD_WATER = 121, // not possible under water + ERR_BUILD_ENERGY = 122, // not enough energy + ERR_BUILD_METALAWAY = 123, // lack of metal (too far) + ERR_BUILD_METALNEAR = 124, // lack of metal (too close) + ERR_BUILD_METALINEX = 125, // lack of metal + ERR_BUILD_FLAT = 126, // not enough flat ground + ERR_BUILD_FLATLIT = 127, // not enough flat ground space + ERR_BUILD_BUSY = 128, // location occupied + ERR_BUILD_BASE = 129, // too close to the rocket + ERR_BUILD_NARROW = 130, // buildings too close + ERR_BUILD_MOTOR = 131, // built: not possible in movement + ERR_SEARCH_FLY = 140, // not possible in flight + ERR_SEARCH_VEH = 141, // inappropriate vehicle + ERR_SEARCH_MOTOR = 142, // impossible in movement + ERR_TERRA_VEH = 150, // inappropriate vehicle + ERR_TERRA_ENERGY = 151, // not enough energy + ERR_TERRA_FLOOR = 152, // inappropriate ground + ERR_TERRA_BUILDING = 153, // building too close + ERR_TERRA_OBJECT = 154, // object too close + ERR_FIRE_VEH = 160, // inappropriate vehicle + ERR_FIRE_ENERGY = 161, // not enough energy + ERR_FIRE_FLY = 162, // not possible in flight + ERR_RECOVER_VEH = 170, // inappropriate vehicle + ERR_RECOVER_ENERGY = 171, // not enough energy + ERR_RECOVER_NULL = 172, // lack of ruin + ERR_CONVERT_EMPTY = 180, // no stone was transformed + ERR_SHIELD_VEH = 190, // inappropriate vehicle + ERR_SHIELD_ENERGY = 191, // not enough energy + ERR_MOVE_IMPOSSIBLE = 200, // move impossible + ERR_FIND_IMPOSSIBLE = 201, // find impossible + ERR_GOTO_IMPOSSIBLE = 210, // goto impossible + ERR_GOTO_ITER = 211, // goto too complicated + ERR_GOTO_BUSY = 212, // goto destination occupied + ERR_DERRICK_NULL = 300, // no ore underground + ERR_STATION_NULL = 301, // no energy underground + ERR_TOWER_POWER = 310, // no battery + ERR_TOWER_ENERGY = 311, // more energy + ERR_RESEARCH_POWER = 320, // no battery + ERR_RESEARCH_ENERGY = 321, // more energy + ERR_RESEARCH_TYPE = 322, // the wrong type of battery + ERR_RESEARCH_ALREADY = 323, // research already done + ERR_ENERGY_NULL = 330, // no energy underground + ERR_ENERGY_LOW = 331, // not enough energy + ERR_ENERGY_EMPTY = 332, // lack of metal + ERR_ENERGY_BAD = 333, // transforms only the metal + ERR_BASE_DLOCK = 340, // doors locked + ERR_BASE_DHUMAN = 341, // you must be on spaceship + ERR_LABO_NULL = 350, // nothing to analyze + ERR_LABO_BAD = 351, // analyzes only organic ball + ERR_LABO_ALREADY = 352, // analysis already made + ERR_NUCLEAR_NULL = 360, // no energy underground + ERR_NUCLEAR_LOW = 361, // not enough energy + ERR_NUCLEAR_EMPTY = 362, // lack of uranium + ERR_NUCLEAR_BAD = 363, // transforms only uranium + ERR_FACTORY_NULL = 370, // no metal + ERR_FACTORY_NEAR = 371, // vehicle too close + ERR_RESET_NEAR = 380, // vehicle too close + ERR_INFO_NULL = 390, // no information terminal + ERR_VEH_VIRUS = 400, // vehicle infected by a virus + ERR_BAT_VIRUS = 401, // building infected by a virus + ERR_VEH_POWER = 500, // no battery + ERR_VEH_ENERGY = 501, // more energy + ERR_FLAG_FLY = 510, // impossible in flight + ERR_FLAG_WATER = 511, // impossible during swimming + ERR_FLAG_MOTOR = 512, // impossible in movement + ERR_FLAG_BUSY = 513, // taking: already creating flag + ERR_FLAG_CREATE = 514, // too many flags + ERR_FLAG_PROXY = 515, // too close + ERR_FLAG_DELETE = 516, // nothing to remove + ERR_MISSION_NOTERM = 600, // Mission not completed + ERR_DELETEMOBILE = 700, // vehicle destroyed + ERR_DELETEBUILDING = 701, // building destroyed + ERR_TOOMANY = 702, // too many objects + ERR_OBLIGATORYTOKEN = 800, // compulsory instruction missing + ERR_PROHIBITEDTOKEN = 801, // instruction prohibited + + INFO_FIRST = 10000, // first information + INFO_BUILD = 10001, // construction builded + INFO_CONVERT = 10002, // metal available + INFO_RESEARCH = 10003, // search ended + INFO_FACTORY = 10004, // vehicle manufactured + INFO_LABO = 10005, // analysis ended + INFO_ENERGY = 10006, // battery available + INFO_NUCLEAR = 10007, // nuclear battery available + INFO_FINDING = 10008, // nuclear battery available + INFO_MARKPOWER = 10020, // location for station found + INFO_MARKURANIUM = 10021, // location for derrick found + INFO_MARKSTONE = 10022, // location for derrick found + INFO_MARKKEYa = 10023, // location for derrick found + INFO_MARKKEYb = 10024, // location for derrick found + INFO_MARKKEYc = 10025, // location for derrick found + INFO_MARKKEYd = 10026, // location for derrick found + INFO_RESEARCHTANK = 10030, // research ended + INFO_RESEARCHFLY = 10031, // research ended + INFO_RESEARCHTHUMP = 10032, // research ended + INFO_RESEARCHCANON = 10033, // research ended + INFO_RESEARCHTOWER = 10034, // research ended + INFO_RESEARCHPHAZER = 10035, // research ended + INFO_RESEARCHSHIELD = 10036, // research ended + INFO_RESEARCHATOMIC = 10037, // research ended + INFO_WIN = 10040, // win + INFO_LOST = 10041, // lost + INFO_LOSTq = 10042, // lost immediately + INFO_WRITEOK = 10043, // record done + INFO_DELETEPATH = 10050, // way mark deleted + INFO_DELETEMOTHER = 10100, // insect killed + INFO_DELETEANT = 10101, // insect killed + INFO_DELETEBEE = 10102, // insect killed + INFO_DELETEWORM = 10103, // insect killed + INFO_DELETESPIDER = 10104, // insect killed + INFO_BEGINSATCOM = 10105, // use your SatCom +}; diff --git a/src/common/misc.h b/src/common/misc.h index 4853856..dca801f 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -24,6 +24,7 @@ #include "common/metafile.h" #include "common/event.h" +#include "common/error_ids.h" extern CMetaFile g_metafile; @@ -67,139 +68,6 @@ const int CLASS_MAX = 30; -enum Error -{ - ERR_OK = 0, // ok - ERR_GENERIC = 1, // any error - ERR_CONTINUE = 2, // continues - ERR_STOP = 3, // stops - ERR_CMD = 4, // unknown command - ERR_INSTALL = 20, // incorrectly installed program - ERR_NOCD = 21, // CD not found - ERR_MANIP_VEH = 100, // inappropriate vehicle - ERR_MANIP_FLY = 101, // impossible in flight - ERR_MANIP_BUSY = 102, // taking: hands already occupied - ERR_MANIP_NIL = 103, // taking: nothing has to take - ERR_MANIP_MOTOR = 105, // busy: impossible to move - ERR_MANIP_OCC = 106, // busy: location already occupied - ERR_MANIP_FRIEND = 107, // no other vehicle - ERR_MANIP_RADIO = 108, // impossible because radioactive - ERR_MANIP_WATER = 109, // not possible under water - ERR_MANIP_EMPTY = 110, // nothing to deposit - ERR_BUILD_FLY = 120, // not possible in flight - ERR_BUILD_WATER = 121, // not possible under water - ERR_BUILD_ENERGY = 122, // not enough energy - ERR_BUILD_METALAWAY = 123, // lack of metal (too far) - ERR_BUILD_METALNEAR = 124, // lack of metal (too close) - ERR_BUILD_METALINEX = 125, // lack of metal - ERR_BUILD_FLAT = 126, // not enough flat ground - ERR_BUILD_FLATLIT = 127, // not enough flat ground space - ERR_BUILD_BUSY = 128, // location occupied - ERR_BUILD_BASE = 129, // too close to the rocket - ERR_BUILD_NARROW = 130, // buildings too close - ERR_BUILD_MOTOR = 131, // built: not possible in movement - ERR_SEARCH_FLY = 140, // not possible in flight - ERR_SEARCH_VEH = 141, // inappropriate vehicle - ERR_SEARCH_MOTOR = 142, // impossible in movement - ERR_TERRA_VEH = 150, // inappropriate vehicle - ERR_TERRA_ENERGY = 151, // not enough energy - ERR_TERRA_FLOOR = 152, // inappropriate ground - ERR_TERRA_BUILDING = 153, // building too close - ERR_TERRA_OBJECT = 154, // object too close - ERR_FIRE_VEH = 160, // inappropriate vehicle - ERR_FIRE_ENERGY = 161, // not enough energy - ERR_FIRE_FLY = 162, // not possible in flight - ERR_RECOVER_VEH = 170, // inappropriate vehicle - ERR_RECOVER_ENERGY = 171, // not enough energy - ERR_RECOVER_NULL = 172, // lack of ruin - ERR_CONVERT_EMPTY = 180, // no stone was transformed - ERR_SHIELD_VEH = 190, // inappropriate vehicle - ERR_SHIELD_ENERGY = 191, // not enough energy - ERR_MOVE_IMPOSSIBLE = 200, // move impossible - ERR_FIND_IMPOSSIBLE = 201, // find impossible - ERR_GOTO_IMPOSSIBLE = 210, // goto impossible - ERR_GOTO_ITER = 211, // goto too complicated - ERR_GOTO_BUSY = 212, // goto destination occupied - ERR_DERRICK_NULL = 300, // no ore underground - ERR_STATION_NULL = 301, // no energy underground - ERR_TOWER_POWER = 310, // no battery - ERR_TOWER_ENERGY = 311, // more energy - ERR_RESEARCH_POWER = 320, // no battery - ERR_RESEARCH_ENERGY = 321, // more energy - ERR_RESEARCH_TYPE = 322, // the wrong type of battery - ERR_RESEARCH_ALREADY = 323, // research already done - ERR_ENERGY_NULL = 330, // no energy underground - ERR_ENERGY_LOW = 331, // not enough energy - ERR_ENERGY_EMPTY = 332, // lack of metal - ERR_ENERGY_BAD = 333, // transforms only the metal - ERR_BASE_DLOCK = 340, // doors locked - ERR_BASE_DHUMAN = 341, // you must be on spaceship - ERR_LABO_NULL = 350, // nothing to analyze - ERR_LABO_BAD = 351, // analyzes only organic ball - ERR_LABO_ALREADY = 352, // analysis already made - ERR_NUCLEAR_NULL = 360, // no energy underground - ERR_NUCLEAR_LOW = 361, // not enough energy - ERR_NUCLEAR_EMPTY = 362, // lack of uranium - ERR_NUCLEAR_BAD = 363, // transforms only uranium - ERR_FACTORY_NULL = 370, // no metal - ERR_FACTORY_NEAR = 371, // vehicle too close - ERR_RESET_NEAR = 380, // vehicle too close - ERR_INFO_NULL = 390, // no information terminal - ERR_VEH_VIRUS = 400, // vehicle infected by a virus - ERR_BAT_VIRUS = 401, // building infected by a virus - ERR_VEH_POWER = 500, // no battery - ERR_VEH_ENERGY = 501, // more energy - ERR_FLAG_FLY = 510, // impossible in flight - ERR_FLAG_WATER = 511, // impossible during swimming - ERR_FLAG_MOTOR = 512, // impossible in movement - ERR_FLAG_BUSY = 513, // taking: already creating flag - ERR_FLAG_CREATE = 514, // too many flags - ERR_FLAG_PROXY = 515, // too close - ERR_FLAG_DELETE = 516, // nothing to remove - ERR_MISSION_NOTERM = 600, // Mission not completed - ERR_DELETEMOBILE = 700, // vehicle destroyed - ERR_DELETEBUILDING = 701, // building destroyed - ERR_TOOMANY = 702, // too many objects - ERR_OBLIGATORYTOKEN = 800, // compulsory instruction missing - ERR_PROHIBITEDTOKEN = 801, // instruction prohibited - - INFO_FIRST = 10000, // first information - INFO_BUILD = 10001, // construction builded - INFO_CONVERT = 10002, // metal available - INFO_RESEARCH = 10003, // search ended - INFO_FACTORY = 10004, // vehicle manufactured - INFO_LABO = 10005, // analysis ended - INFO_ENERGY = 10006, // battery available - INFO_NUCLEAR = 10007, // nuclear battery available - INFO_FINDING = 10008, // nuclear battery available - INFO_MARKPOWER = 10020, // location for station found - INFO_MARKURANIUM = 10021, // location for derrick found - INFO_MARKSTONE = 10022, // location for derrick found - INFO_MARKKEYa = 10023, // location for derrick found - INFO_MARKKEYb = 10024, // location for derrick found - INFO_MARKKEYc = 10025, // location for derrick found - INFO_MARKKEYd = 10026, // location for derrick found - INFO_RESEARCHTANK = 10030, // research ended - INFO_RESEARCHFLY = 10031, // research ended - INFO_RESEARCHTHUMP = 10032, // research ended - INFO_RESEARCHCANON = 10033, // research ended - INFO_RESEARCHTOWER = 10034, // research ended - INFO_RESEARCHPHAZER = 10035, // research ended - INFO_RESEARCHSHIELD = 10036, // research ended - INFO_RESEARCHATOMIC = 10037, // research ended - INFO_WIN = 10040, // win - INFO_LOST = 10041, // lost - INFO_LOSTq = 10042, // lost immediately - INFO_WRITEOK = 10043, // record done - INFO_DELETEPATH = 10050, // way mark deleted - INFO_DELETEMOTHER = 10100, // insect killed - INFO_DELETEANT = 10101, // insect killed - INFO_DELETEBEE = 10102, // insect killed - INFO_DELETEWORM = 10103, // insect killed - INFO_DELETESPIDER = 10104, // insect killed - INFO_BEGINSATCOM = 10105, // use your SatCom -}; - // Keyboard state. -- cgit v1.2.3-1-g7c22 From f5a8a920501ce760892b7ef054be8cfac4063db3 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 25 Aug 2012 13:47:48 +0400 Subject: Move ObjectType enum to a separate file --- src/object/object.h | 246 +-------------------------------------------- src/object/object_ids.h | 262 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 263 insertions(+), 245 deletions(-) create mode 100644 src/object/object_ids.h diff --git a/src/object/object.h b/src/object/object.h index 4a4dcb0..88ae486 100644 --- a/src/object/object.h +++ b/src/object/object.h @@ -22,6 +22,7 @@ #include "graphics/engine/engine.h" #include "graphics/engine/camera.h" #include "sound/sound.h" +#include "object/object_ids.h" class CInstanceManager; @@ -45,251 +46,6 @@ const int OBJECTMAXDESELLIST = 10; const int OBJECTMAXINFO = 10; const int OBJECTMAXCMDLINE = 20; -enum ObjectType -{ - OBJECT_NULL = 0, // object destroyed - OBJECT_FIX = 1, // stationary scenery - OBJECT_PORTICO = 2, // gantry - OBJECT_BASE = 3, // great main base - OBJECT_DERRICK = 4, // derrick set - OBJECT_FACTORY = 5, // factory set - OBJECT_STATION = 6, // recharging station - OBJECT_CONVERT = 7, // converter station - OBJECT_REPAIR = 8, // reparation - OBJECT_TOWER = 9, // defense tower - OBJECT_NEST = 10, // nest - OBJECT_RESEARCH = 11, // research center - OBJECT_RADAR = 12, // radar - OBJECT_ENERGY = 13, // energy factory - OBJECT_LABO = 14, // analytical laboratory for insect - OBJECT_NUCLEAR = 15, // nuclear power plant - OBJECT_START = 16, // starting - OBJECT_END = 17, // finish - OBJECT_INFO = 18, // information terminal - OBJECT_PARA = 19, // lightning conductor - OBJECT_TARGET1 = 20, // gate target - OBJECT_TARGET2 = 21, // center target - OBJECT_SAFE = 22, // safe - OBJECT_HUSTON = 23, // control centre - OBJECT_DESTROYER = 24, // destroyer - OBJECT_FRET = 30, // transportable - OBJECT_STONE = 31, // stone - OBJECT_URANIUM = 32, // uranium - OBJECT_METAL = 33, // metal - OBJECT_POWER = 34, // normal battery - OBJECT_ATOMIC = 35, // atomic battery - OBJECT_BULLET = 36, // bullet - OBJECT_BBOX = 37, // black-box - OBJECT_TNT = 38, // box of TNT - OBJECT_SCRAP1 = 40, // metal waste - OBJECT_SCRAP2 = 41, // metal waste - OBJECT_SCRAP3 = 42, // metal waste - OBJECT_SCRAP4 = 43, // plastic waste - OBJECT_SCRAP5 = 44, // plastic waste - OBJECT_MARKPOWER = 50, // mark underground energy source - OBJECT_MARKSTONE = 51, // mark underground ore - OBJECT_MARKURANIUM = 52, // mark underground uranium - OBJECT_MARKKEYa = 53, // mark underground key - OBJECT_MARKKEYb = 54, // mark underground key - OBJECT_MARKKEYc = 55, // mark underground key - OBJECT_MARKKEYd = 56, // mark underground key - OBJECT_BOMB = 60, // bomb - OBJECT_WINFIRE = 61, // fireworks - OBJECT_SHOW = 62, // shows a place - OBJECT_BAG = 63, // survival bag - OBJECT_PLANT0 = 70, // plant 0 - OBJECT_PLANT1 = 71, // plant 1 - OBJECT_PLANT2 = 72, // plant 2 - OBJECT_PLANT3 = 73, // plant 3 - OBJECT_PLANT4 = 74, // plant 4 - OBJECT_PLANT5 = 75, // plant 5 - OBJECT_PLANT6 = 76, // plant 6 - OBJECT_PLANT7 = 77, // plant 7 - OBJECT_PLANT8 = 78, // plant 8 - OBJECT_PLANT9 = 79, // plant 9 - OBJECT_PLANT10 = 80, // plant 10 - OBJECT_PLANT11 = 81, // plant 11 - OBJECT_PLANT12 = 82, // plant 12 - OBJECT_PLANT13 = 83, // plant 13 - OBJECT_PLANT14 = 84, // plant 14 - OBJECT_PLANT15 = 85, // plant 15 - OBJECT_PLANT16 = 86, // plant 16 - OBJECT_PLANT17 = 87, // plant 17 - OBJECT_PLANT18 = 88, // plant 18 - OBJECT_PLANT19 = 89, // plant 19 - OBJECT_TREE0 = 90, // tree 0 - OBJECT_TREE1 = 91, // tree 1 - OBJECT_TREE2 = 92, // tree 2 - OBJECT_TREE3 = 93, // tree 3 - OBJECT_TREE4 = 94, // tree 4 - OBJECT_TREE5 = 95, // tree 5 - OBJECT_TREE6 = 96, // tree 6 - OBJECT_TREE7 = 97, // tree 7 - OBJECT_TREE8 = 98, // tree 8 - OBJECT_TREE9 = 99, // tree 9 - OBJECT_MOBILEwt = 100, // wheel-trainer - OBJECT_MOBILEtt = 101, // track-trainer - OBJECT_MOBILEft = 102, // fly-trainer - OBJECT_MOBILEit = 103, // insect-trainer - OBJECT_MOBILEwa = 110, // wheel-arm - OBJECT_MOBILEta = 111, // track-arm - OBJECT_MOBILEfa = 112, // fly-arm - OBJECT_MOBILEia = 113, // insect-arm - OBJECT_MOBILEwc = 120, // wheel-cannon - OBJECT_MOBILEtc = 121, // track-cannon - OBJECT_MOBILEfc = 122, // fly-cannon - OBJECT_MOBILEic = 123, // insect-cannon - OBJECT_MOBILEwi = 130, // wheel-insect-cannon - OBJECT_MOBILEti = 131, // track-insect-cannon - OBJECT_MOBILEfi = 132, // fly-insect-cannon - OBJECT_MOBILEii = 133, // insect-insect-cannon - OBJECT_MOBILEws = 140, // wheel-search - OBJECT_MOBILEts = 141, // track-search - OBJECT_MOBILEfs = 142, // fly-search - OBJECT_MOBILEis = 143, // insect-search - OBJECT_MOBILErt = 200, // roller-terraform - OBJECT_MOBILErc = 201, // roller-canon - OBJECT_MOBILErr = 202, // roller-recover - OBJECT_MOBILErs = 203, // roller-shield - OBJECT_MOBILEsa = 210, // submarine - OBJECT_MOBILEtg = 211, // training target - OBJECT_MOBILEdr = 212, // robot drawing - OBJECT_WAYPOINT = 250, // waypoint - OBJECT_FLAGb = 260, // blue flag - OBJECT_FLAGr = 261, // red flag - OBJECT_FLAGg = 262, // green flag - OBJECT_FLAGy = 263, // yellow flag - OBJECT_FLAGv = 264, // violet flag - OBJECT_KEYa = 270, // key a - OBJECT_KEYb = 271, // key b - OBJECT_KEYc = 272, // key c - OBJECT_KEYd = 273, // key d - OBJECT_HUMAN = 300, // human - OBJECT_TOTO = 301, // toto - OBJECT_TECH = 302, // technician - OBJECT_BARRIER0 = 400, // barrier - OBJECT_BARRIER1 = 401, // barrier - OBJECT_BARRIER2 = 402, // barrier - OBJECT_BARRIER3 = 403, // barrier - OBJECT_BARRIER4 = 404, // barrier - OBJECT_MOTHER = 500, // insect queen - OBJECT_EGG = 501, // egg - OBJECT_ANT = 502, // ant - OBJECT_SPIDER = 503, // spider - OBJECT_BEE = 504, // bee - OBJECT_WORM = 505, // worm - OBJECT_RUINmobilew1 = 600, // ruin 1 - OBJECT_RUINmobilew2 = 601, // ruin 1 - OBJECT_RUINmobilet1 = 602, // ruin 2 - OBJECT_RUINmobilet2 = 603, // ruin 2 - OBJECT_RUINmobiler1 = 604, // ruin 3 - OBJECT_RUINmobiler2 = 605, // ruin 3 - OBJECT_RUINfactory = 606, // ruin 4 - OBJECT_RUINdoor = 607, // ruin 5 - OBJECT_RUINsupport = 608, // ruin 6 - OBJECT_RUINradar = 609, // ruin 7 - OBJECT_RUINconvert = 610, // ruin 8 - OBJECT_RUINbase = 611, // ruin 9 - OBJECT_RUINhead = 612, // ruin 10 - OBJECT_TEEN0 = 620, // toy - OBJECT_TEEN1 = 621, // toy - OBJECT_TEEN2 = 622, // toy - OBJECT_TEEN3 = 623, // toy - OBJECT_TEEN4 = 624, // toy - OBJECT_TEEN5 = 625, // toy - OBJECT_TEEN6 = 626, // toy - OBJECT_TEEN7 = 627, // toy - OBJECT_TEEN8 = 628, // toy - OBJECT_TEEN9 = 629, // toy - OBJECT_TEEN10 = 630, // toy - OBJECT_TEEN11 = 631, // toy - OBJECT_TEEN12 = 632, // toy - OBJECT_TEEN13 = 633, // toy - OBJECT_TEEN14 = 634, // toy - OBJECT_TEEN15 = 635, // toy - OBJECT_TEEN16 = 636, // toy - OBJECT_TEEN17 = 637, // toy - OBJECT_TEEN18 = 638, // toy - OBJECT_TEEN19 = 639, // toy - OBJECT_TEEN20 = 640, // toy - OBJECT_TEEN21 = 641, // toy - OBJECT_TEEN22 = 642, // toy - OBJECT_TEEN23 = 643, // toy - OBJECT_TEEN24 = 644, // toy - OBJECT_TEEN25 = 645, // toy - OBJECT_TEEN26 = 646, // toy - OBJECT_TEEN27 = 647, // toy - OBJECT_TEEN28 = 648, // toy - OBJECT_TEEN29 = 649, // toy - OBJECT_TEEN30 = 650, // toy - OBJECT_TEEN31 = 651, // toy - OBJECT_TEEN32 = 652, // toy - OBJECT_TEEN33 = 653, // toy - OBJECT_TEEN34 = 654, // toy - OBJECT_TEEN35 = 655, // toy - OBJECT_TEEN36 = 656, // toy - OBJECT_TEEN37 = 657, // toy - OBJECT_TEEN38 = 658, // toy - OBJECT_TEEN39 = 659, // toy - OBJECT_TEEN40 = 660, // toy - OBJECT_TEEN41 = 661, // toy - OBJECT_TEEN42 = 662, // toy - OBJECT_TEEN43 = 663, // toy - OBJECT_TEEN44 = 664, // toy - OBJECT_TEEN45 = 665, // toy - OBJECT_TEEN46 = 666, // toy - OBJECT_TEEN47 = 667, // toy - OBJECT_TEEN48 = 668, // toy - OBJECT_TEEN49 = 669, // toy - OBJECT_QUARTZ0 = 700, // crystal 0 - OBJECT_QUARTZ1 = 701, // crystal 1 - OBJECT_QUARTZ2 = 702, // crystal 2 - OBJECT_QUARTZ3 = 703, // crystal 3 - OBJECT_QUARTZ4 = 704, // crystal 4 - OBJECT_QUARTZ5 = 705, // crystal 5 - OBJECT_QUARTZ6 = 706, // crystal 6 - OBJECT_QUARTZ7 = 707, // crystal 7 - OBJECT_QUARTZ8 = 708, // crystal 8 - OBJECT_QUARTZ9 = 709, // crystal 9 - OBJECT_ROOT0 = 710, // root 0 - OBJECT_ROOT1 = 711, // root 1 - OBJECT_ROOT2 = 712, // root 2 - OBJECT_ROOT3 = 713, // root 3 - OBJECT_ROOT4 = 714, // root 4 - OBJECT_ROOT5 = 715, // root 5 - OBJECT_ROOT6 = 716, // root 6 - OBJECT_ROOT7 = 717, // root 7 - OBJECT_ROOT8 = 718, // root 8 - OBJECT_ROOT9 = 719, // root 9 - OBJECT_SEAWEED0 = 720, // seaweed 0 - OBJECT_SEAWEED1 = 721, // seaweed 1 - OBJECT_SEAWEED2 = 722, // seaweed 2 - OBJECT_SEAWEED3 = 723, // seaweed 3 - OBJECT_SEAWEED4 = 724, // seaweed 4 - OBJECT_SEAWEED5 = 725, // seaweed 5 - OBJECT_SEAWEED6 = 726, // seaweed 6 - OBJECT_SEAWEED7 = 727, // seaweed 7 - OBJECT_SEAWEED8 = 728, // seaweed 8 - OBJECT_SEAWEED9 = 729, // seaweed 9 - OBJECT_MUSHROOM0 = 730, // mushroom 0 - OBJECT_MUSHROOM1 = 731, // mushroom 1 - OBJECT_MUSHROOM2 = 732, // mushroom 2 - OBJECT_MUSHROOM3 = 733, // mushroom 3 - OBJECT_MUSHROOM4 = 734, // mushroom 4 - OBJECT_MUSHROOM5 = 735, // mushroom 5 - OBJECT_MUSHROOM6 = 736, // mushroom 6 - OBJECT_MUSHROOM7 = 737, // mushroom 7 - OBJECT_MUSHROOM8 = 738, // mushroom 8 - OBJECT_MUSHROOM9 = 739, // mushroom 9 - OBJECT_APOLLO1 = 900, // apollo lem - OBJECT_APOLLO2 = 901, // apollo jeep - OBJECT_APOLLO3 = 902, // apollo flag - OBJECT_APOLLO4 = 903, // apollo module - OBJECT_APOLLO5 = 904, // apollo antenna - OBJECT_HOME1 = 910, // home 1 - OBJECT_MAX = 1000, -}; - enum ObjectMaterial { OM_METAL = 0, // metal diff --git a/src/object/object_ids.h b/src/object/object_ids.h new file mode 100644 index 0000000..2d9c1a8 --- /dev/null +++ b/src/object/object_ids.h @@ -0,0 +1,262 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + +#pragma once + +enum ObjectType +{ + OBJECT_NULL = 0, // object destroyed + OBJECT_FIX = 1, // stationary scenery + OBJECT_PORTICO = 2, // gantry + OBJECT_BASE = 3, // great main base + OBJECT_DERRICK = 4, // derrick set + OBJECT_FACTORY = 5, // factory set + OBJECT_STATION = 6, // recharging station + OBJECT_CONVERT = 7, // converter station + OBJECT_REPAIR = 8, // reparation + OBJECT_TOWER = 9, // defense tower + OBJECT_NEST = 10, // nest + OBJECT_RESEARCH = 11, // research center + OBJECT_RADAR = 12, // radar + OBJECT_ENERGY = 13, // energy factory + OBJECT_LABO = 14, // analytical laboratory for insect + OBJECT_NUCLEAR = 15, // nuclear power plant + OBJECT_START = 16, // starting + OBJECT_END = 17, // finish + OBJECT_INFO = 18, // information terminal + OBJECT_PARA = 19, // lightning conductor + OBJECT_TARGET1 = 20, // gate target + OBJECT_TARGET2 = 21, // center target + OBJECT_SAFE = 22, // safe + OBJECT_HUSTON = 23, // control centre + OBJECT_DESTROYER = 24, // destroyer + OBJECT_FRET = 30, // transportable + OBJECT_STONE = 31, // stone + OBJECT_URANIUM = 32, // uranium + OBJECT_METAL = 33, // metal + OBJECT_POWER = 34, // normal battery + OBJECT_ATOMIC = 35, // atomic battery + OBJECT_BULLET = 36, // bullet + OBJECT_BBOX = 37, // black-box + OBJECT_TNT = 38, // box of TNT + OBJECT_SCRAP1 = 40, // metal waste + OBJECT_SCRAP2 = 41, // metal waste + OBJECT_SCRAP3 = 42, // metal waste + OBJECT_SCRAP4 = 43, // plastic waste + OBJECT_SCRAP5 = 44, // plastic waste + OBJECT_MARKPOWER = 50, // mark underground energy source + OBJECT_MARKSTONE = 51, // mark underground ore + OBJECT_MARKURANIUM = 52, // mark underground uranium + OBJECT_MARKKEYa = 53, // mark underground key + OBJECT_MARKKEYb = 54, // mark underground key + OBJECT_MARKKEYc = 55, // mark underground key + OBJECT_MARKKEYd = 56, // mark underground key + OBJECT_BOMB = 60, // bomb + OBJECT_WINFIRE = 61, // fireworks + OBJECT_SHOW = 62, // shows a place + OBJECT_BAG = 63, // survival bag + OBJECT_PLANT0 = 70, // plant 0 + OBJECT_PLANT1 = 71, // plant 1 + OBJECT_PLANT2 = 72, // plant 2 + OBJECT_PLANT3 = 73, // plant 3 + OBJECT_PLANT4 = 74, // plant 4 + OBJECT_PLANT5 = 75, // plant 5 + OBJECT_PLANT6 = 76, // plant 6 + OBJECT_PLANT7 = 77, // plant 7 + OBJECT_PLANT8 = 78, // plant 8 + OBJECT_PLANT9 = 79, // plant 9 + OBJECT_PLANT10 = 80, // plant 10 + OBJECT_PLANT11 = 81, // plant 11 + OBJECT_PLANT12 = 82, // plant 12 + OBJECT_PLANT13 = 83, // plant 13 + OBJECT_PLANT14 = 84, // plant 14 + OBJECT_PLANT15 = 85, // plant 15 + OBJECT_PLANT16 = 86, // plant 16 + OBJECT_PLANT17 = 87, // plant 17 + OBJECT_PLANT18 = 88, // plant 18 + OBJECT_PLANT19 = 89, // plant 19 + OBJECT_TREE0 = 90, // tree 0 + OBJECT_TREE1 = 91, // tree 1 + OBJECT_TREE2 = 92, // tree 2 + OBJECT_TREE3 = 93, // tree 3 + OBJECT_TREE4 = 94, // tree 4 + OBJECT_TREE5 = 95, // tree 5 + OBJECT_TREE6 = 96, // tree 6 + OBJECT_TREE7 = 97, // tree 7 + OBJECT_TREE8 = 98, // tree 8 + OBJECT_TREE9 = 99, // tree 9 + OBJECT_MOBILEwt = 100, // wheel-trainer + OBJECT_MOBILEtt = 101, // track-trainer + OBJECT_MOBILEft = 102, // fly-trainer + OBJECT_MOBILEit = 103, // insect-trainer + OBJECT_MOBILEwa = 110, // wheel-arm + OBJECT_MOBILEta = 111, // track-arm + OBJECT_MOBILEfa = 112, // fly-arm + OBJECT_MOBILEia = 113, // insect-arm + OBJECT_MOBILEwc = 120, // wheel-cannon + OBJECT_MOBILEtc = 121, // track-cannon + OBJECT_MOBILEfc = 122, // fly-cannon + OBJECT_MOBILEic = 123, // insect-cannon + OBJECT_MOBILEwi = 130, // wheel-insect-cannon + OBJECT_MOBILEti = 131, // track-insect-cannon + OBJECT_MOBILEfi = 132, // fly-insect-cannon + OBJECT_MOBILEii = 133, // insect-insect-cannon + OBJECT_MOBILEws = 140, // wheel-search + OBJECT_MOBILEts = 141, // track-search + OBJECT_MOBILEfs = 142, // fly-search + OBJECT_MOBILEis = 143, // insect-search + OBJECT_MOBILErt = 200, // roller-terraform + OBJECT_MOBILErc = 201, // roller-canon + OBJECT_MOBILErr = 202, // roller-recover + OBJECT_MOBILErs = 203, // roller-shield + OBJECT_MOBILEsa = 210, // submarine + OBJECT_MOBILEtg = 211, // training target + OBJECT_MOBILEdr = 212, // robot drawing + OBJECT_WAYPOINT = 250, // waypoint + OBJECT_FLAGb = 260, // blue flag + OBJECT_FLAGr = 261, // red flag + OBJECT_FLAGg = 262, // green flag + OBJECT_FLAGy = 263, // yellow flag + OBJECT_FLAGv = 264, // violet flag + OBJECT_KEYa = 270, // key a + OBJECT_KEYb = 271, // key b + OBJECT_KEYc = 272, // key c + OBJECT_KEYd = 273, // key d + OBJECT_HUMAN = 300, // human + OBJECT_TOTO = 301, // toto + OBJECT_TECH = 302, // technician + OBJECT_BARRIER0 = 400, // barrier + OBJECT_BARRIER1 = 401, // barrier + OBJECT_BARRIER2 = 402, // barrier + OBJECT_BARRIER3 = 403, // barrier + OBJECT_BARRIER4 = 404, // barrier + OBJECT_MOTHER = 500, // insect queen + OBJECT_EGG = 501, // egg + OBJECT_ANT = 502, // ant + OBJECT_SPIDER = 503, // spider + OBJECT_BEE = 504, // bee + OBJECT_WORM = 505, // worm + OBJECT_RUINmobilew1 = 600, // ruin 1 + OBJECT_RUINmobilew2 = 601, // ruin 1 + OBJECT_RUINmobilet1 = 602, // ruin 2 + OBJECT_RUINmobilet2 = 603, // ruin 2 + OBJECT_RUINmobiler1 = 604, // ruin 3 + OBJECT_RUINmobiler2 = 605, // ruin 3 + OBJECT_RUINfactory = 606, // ruin 4 + OBJECT_RUINdoor = 607, // ruin 5 + OBJECT_RUINsupport = 608, // ruin 6 + OBJECT_RUINradar = 609, // ruin 7 + OBJECT_RUINconvert = 610, // ruin 8 + OBJECT_RUINbase = 611, // ruin 9 + OBJECT_RUINhead = 612, // ruin 10 + OBJECT_TEEN0 = 620, // toy + OBJECT_TEEN1 = 621, // toy + OBJECT_TEEN2 = 622, // toy + OBJECT_TEEN3 = 623, // toy + OBJECT_TEEN4 = 624, // toy + OBJECT_TEEN5 = 625, // toy + OBJECT_TEEN6 = 626, // toy + OBJECT_TEEN7 = 627, // toy + OBJECT_TEEN8 = 628, // toy + OBJECT_TEEN9 = 629, // toy + OBJECT_TEEN10 = 630, // toy + OBJECT_TEEN11 = 631, // toy + OBJECT_TEEN12 = 632, // toy + OBJECT_TEEN13 = 633, // toy + OBJECT_TEEN14 = 634, // toy + OBJECT_TEEN15 = 635, // toy + OBJECT_TEEN16 = 636, // toy + OBJECT_TEEN17 = 637, // toy + OBJECT_TEEN18 = 638, // toy + OBJECT_TEEN19 = 639, // toy + OBJECT_TEEN20 = 640, // toy + OBJECT_TEEN21 = 641, // toy + OBJECT_TEEN22 = 642, // toy + OBJECT_TEEN23 = 643, // toy + OBJECT_TEEN24 = 644, // toy + OBJECT_TEEN25 = 645, // toy + OBJECT_TEEN26 = 646, // toy + OBJECT_TEEN27 = 647, // toy + OBJECT_TEEN28 = 648, // toy + OBJECT_TEEN29 = 649, // toy + OBJECT_TEEN30 = 650, // toy + OBJECT_TEEN31 = 651, // toy + OBJECT_TEEN32 = 652, // toy + OBJECT_TEEN33 = 653, // toy + OBJECT_TEEN34 = 654, // toy + OBJECT_TEEN35 = 655, // toy + OBJECT_TEEN36 = 656, // toy + OBJECT_TEEN37 = 657, // toy + OBJECT_TEEN38 = 658, // toy + OBJECT_TEEN39 = 659, // toy + OBJECT_TEEN40 = 660, // toy + OBJECT_TEEN41 = 661, // toy + OBJECT_TEEN42 = 662, // toy + OBJECT_TEEN43 = 663, // toy + OBJECT_TEEN44 = 664, // toy + OBJECT_TEEN45 = 665, // toy + OBJECT_TEEN46 = 666, // toy + OBJECT_TEEN47 = 667, // toy + OBJECT_TEEN48 = 668, // toy + OBJECT_TEEN49 = 669, // toy + OBJECT_QUARTZ0 = 700, // crystal 0 + OBJECT_QUARTZ1 = 701, // crystal 1 + OBJECT_QUARTZ2 = 702, // crystal 2 + OBJECT_QUARTZ3 = 703, // crystal 3 + OBJECT_QUARTZ4 = 704, // crystal 4 + OBJECT_QUARTZ5 = 705, // crystal 5 + OBJECT_QUARTZ6 = 706, // crystal 6 + OBJECT_QUARTZ7 = 707, // crystal 7 + OBJECT_QUARTZ8 = 708, // crystal 8 + OBJECT_QUARTZ9 = 709, // crystal 9 + OBJECT_ROOT0 = 710, // root 0 + OBJECT_ROOT1 = 711, // root 1 + OBJECT_ROOT2 = 712, // root 2 + OBJECT_ROOT3 = 713, // root 3 + OBJECT_ROOT4 = 714, // root 4 + OBJECT_ROOT5 = 715, // root 5 + OBJECT_ROOT6 = 716, // root 6 + OBJECT_ROOT7 = 717, // root 7 + OBJECT_ROOT8 = 718, // root 8 + OBJECT_ROOT9 = 719, // root 9 + OBJECT_SEAWEED0 = 720, // seaweed 0 + OBJECT_SEAWEED1 = 721, // seaweed 1 + OBJECT_SEAWEED2 = 722, // seaweed 2 + OBJECT_SEAWEED3 = 723, // seaweed 3 + OBJECT_SEAWEED4 = 724, // seaweed 4 + OBJECT_SEAWEED5 = 725, // seaweed 5 + OBJECT_SEAWEED6 = 726, // seaweed 6 + OBJECT_SEAWEED7 = 727, // seaweed 7 + OBJECT_SEAWEED8 = 728, // seaweed 8 + OBJECT_SEAWEED9 = 729, // seaweed 9 + OBJECT_MUSHROOM0 = 730, // mushroom 0 + OBJECT_MUSHROOM1 = 731, // mushroom 1 + OBJECT_MUSHROOM2 = 732, // mushroom 2 + OBJECT_MUSHROOM3 = 733, // mushroom 3 + OBJECT_MUSHROOM4 = 734, // mushroom 4 + OBJECT_MUSHROOM5 = 735, // mushroom 5 + OBJECT_MUSHROOM6 = 736, // mushroom 6 + OBJECT_MUSHROOM7 = 737, // mushroom 7 + OBJECT_MUSHROOM8 = 738, // mushroom 8 + OBJECT_MUSHROOM9 = 739, // mushroom 9 + OBJECT_APOLLO1 = 900, // apollo lem + OBJECT_APOLLO2 = 901, // apollo jeep + OBJECT_APOLLO3 = 902, // apollo flag + OBJECT_APOLLO4 = 903, // apollo module + OBJECT_APOLLO5 = 904, // apollo antenna + OBJECT_HOME1 = 910, // home 1 + OBJECT_MAX = 1000, +}; -- cgit v1.2.3-1-g7c22 From 5ff4ce146a0de1a9e92576bcc2accf4104b8f61e Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 25 Aug 2012 13:51:17 +0400 Subject: Move ResTextType enum to a separate file --- src/common/restext.h | 110 +------------------------------------------ src/common/restext_ids.h | 119 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 109 deletions(-) create mode 100644 src/common/restext_ids.h diff --git a/src/common/restext.h b/src/common/restext.h index d5f22de..ac61d0b 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -18,15 +18,12 @@ #pragma once +#include "common/restext_ids.h" -#include "common/event.h" class CD3DEngine; - - - // Possible types of the text resources. enum ResType @@ -40,111 +37,6 @@ enum ResType }; -// Resources of type RES_TEXT. - -enum ResTextType -{ - RT_VERSION_ID = 1, - RT_DISINFO_TITLE = 2, - RT_WINDOW_MAXIMIZED = 3, - RT_WINDOW_MINIMIZED = 4, - RT_WINDOW_STANDARD = 5, - RT_WINDOW_CLOSE = 6, - - RT_STUDIO_TITLE = 10, - RT_SCRIPT_NEW = 20, - RT_NAME_DEFAULT = 21, - RT_IO_NEW = 22, - RT_KEY_OR = 23, - - RT_TITLE_BASE = 40, - RT_TITLE_INIT = 41, - RT_TITLE_TRAINER = 42, - RT_TITLE_DEFI = 43, - RT_TITLE_MISSION = 44, - RT_TITLE_FREE = 45, - RT_TITLE_PROTO = 46, - RT_TITLE_SETUP = 47, - RT_TITLE_NAME = 48, - RT_TITLE_PERSO = 49, - RT_TITLE_WRITE = 50, - RT_TITLE_READ = 51, - RT_TITLE_USER = 52, - RT_TITLE_TEEN = 53, - - RT_PLAY_CHAPt = 60, - RT_PLAY_CHAPd = 61, - RT_PLAY_CHAPm = 62, - RT_PLAY_CHAPf = 63, - RT_PLAY_CHAPp = 64, - RT_PLAY_LISTt = 65, - RT_PLAY_LISTd = 66, - RT_PLAY_LISTm = 67, - RT_PLAY_LISTf = 68, - RT_PLAY_LISTp = 69, - RT_PLAY_RESUME = 70, - RT_PLAY_CHAPu = 71, - RT_PLAY_LISTu = 72, - RT_PLAY_CHAPte = 73, - RT_PLAY_LISTk = 74, - - RT_SETUP_DEVICE = 80, - RT_SETUP_MODE = 81, - RT_SETUP_KEY1 = 82, - RT_SETUP_KEY2 = 83, - - RT_PERSO_FACE = 90, - RT_PERSO_GLASSES = 91, - RT_PERSO_HAIR = 92, - RT_PERSO_COMBI = 93, - RT_PERSO_BAND = 94, - - RT_DIALOG_TITLE = 100, - RT_DIALOG_ABORT = 101, - RT_DIALOG_QUIT = 102, - RT_DIALOG_YES = 103, - RT_DIALOG_NO = 104, - RT_DIALOG_DELOBJ = 105, - RT_DIALOG_DELGAME = 106, - RT_DIALOG_YESDEL = 107, - RT_DIALOG_NODEL = 108, - RT_DIALOG_LOADING = 109, - RT_DIALOG_YESQUIT = 110, - RT_DIALOG_NOQUIT = 111, - - RT_STUDIO_LISTTT = 120, - RT_STUDIO_COMPOK = 121, - RT_STUDIO_PROGSTOP = 122, - - RT_SATCOM_LIST = 140, - RT_SATCOM_BOT = 141, - RT_SATCOM_BUILDING = 142, - RT_SATCOM_FRET = 143, - RT_SATCOM_ALIEN = 144, - RT_SATCOM_NULL = 145, - RT_SATCOM_ERROR1 = 146, - RT_SATCOM_ERROR2 = 147, - - RT_IO_OPEN = 150, - RT_IO_SAVE = 151, - RT_IO_LIST = 152, - RT_IO_NAME = 153, - RT_IO_DIR = 154, - RT_IO_PRIVATE = 155, - RT_IO_PUBLIC = 156, - - RT_GENERIC_DEV1 = 170, - RT_GENERIC_DEV2 = 171, - RT_GENERIC_EDIT1 = 172, - RT_GENERIC_EDIT2 = 173, - - RT_INTERFACE_REC = 180, - - RT_MESSAGE_WIN = 200, - RT_MESSAGE_LOST = 201, -}; - - static CD3DEngine* g_engine = 0; static char g_gamerName[100]; diff --git a/src/common/restext_ids.h b/src/common/restext_ids.h new file mode 100644 index 0000000..bee8620 --- /dev/null +++ b/src/common/restext_ids.h @@ -0,0 +1,119 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + +#pragma once + +enum ResTextType +{ + RT_VERSION_ID = 1, + RT_DISINFO_TITLE = 2, + RT_WINDOW_MAXIMIZED = 3, + RT_WINDOW_MINIMIZED = 4, + RT_WINDOW_STANDARD = 5, + RT_WINDOW_CLOSE = 6, + + RT_STUDIO_TITLE = 10, + RT_SCRIPT_NEW = 20, + RT_NAME_DEFAULT = 21, + RT_IO_NEW = 22, + RT_KEY_OR = 23, + + RT_TITLE_BASE = 40, + RT_TITLE_INIT = 41, + RT_TITLE_TRAINER = 42, + RT_TITLE_DEFI = 43, + RT_TITLE_MISSION = 44, + RT_TITLE_FREE = 45, + RT_TITLE_PROTO = 46, + RT_TITLE_SETUP = 47, + RT_TITLE_NAME = 48, + RT_TITLE_PERSO = 49, + RT_TITLE_WRITE = 50, + RT_TITLE_READ = 51, + RT_TITLE_USER = 52, + RT_TITLE_TEEN = 53, + + RT_PLAY_CHAPt = 60, + RT_PLAY_CHAPd = 61, + RT_PLAY_CHAPm = 62, + RT_PLAY_CHAPf = 63, + RT_PLAY_CHAPp = 64, + RT_PLAY_LISTt = 65, + RT_PLAY_LISTd = 66, + RT_PLAY_LISTm = 67, + RT_PLAY_LISTf = 68, + RT_PLAY_LISTp = 69, + RT_PLAY_RESUME = 70, + RT_PLAY_CHAPu = 71, + RT_PLAY_LISTu = 72, + RT_PLAY_CHAPte = 73, + RT_PLAY_LISTk = 74, + + RT_SETUP_DEVICE = 80, + RT_SETUP_MODE = 81, + RT_SETUP_KEY1 = 82, + RT_SETUP_KEY2 = 83, + + RT_PERSO_FACE = 90, + RT_PERSO_GLASSES = 91, + RT_PERSO_HAIR = 92, + RT_PERSO_COMBI = 93, + RT_PERSO_BAND = 94, + + RT_DIALOG_TITLE = 100, + RT_DIALOG_ABORT = 101, + RT_DIALOG_QUIT = 102, + RT_DIALOG_YES = 103, + RT_DIALOG_NO = 104, + RT_DIALOG_DELOBJ = 105, + RT_DIALOG_DELGAME = 106, + RT_DIALOG_YESDEL = 107, + RT_DIALOG_NODEL = 108, + RT_DIALOG_LOADING = 109, + RT_DIALOG_YESQUIT = 110, + RT_DIALOG_NOQUIT = 111, + + RT_STUDIO_LISTTT = 120, + RT_STUDIO_COMPOK = 121, + RT_STUDIO_PROGSTOP = 122, + + RT_SATCOM_LIST = 140, + RT_SATCOM_BOT = 141, + RT_SATCOM_BUILDING = 142, + RT_SATCOM_FRET = 143, + RT_SATCOM_ALIEN = 144, + RT_SATCOM_NULL = 145, + RT_SATCOM_ERROR1 = 146, + RT_SATCOM_ERROR2 = 147, + + RT_IO_OPEN = 150, + RT_IO_SAVE = 151, + RT_IO_LIST = 152, + RT_IO_NAME = 153, + RT_IO_DIR = 154, + RT_IO_PRIVATE = 155, + RT_IO_PUBLIC = 156, + + RT_GENERIC_DEV1 = 170, + RT_GENERIC_DEV2 = 171, + RT_GENERIC_EDIT1 = 172, + RT_GENERIC_EDIT2 = 173, + + RT_INTERFACE_REC = 180, + + RT_MESSAGE_WIN = 200, + RT_MESSAGE_LOST = 201, +}; -- cgit v1.2.3-1-g7c22 From 9b4628fd028b5d7e5ab0ff5dba77d826221f9eca Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 25 Aug 2012 14:02:10 +0400 Subject: Move strings out of restext. Add i18n via gettext --- src/CMakeLists.txt | 3 +- src/common/restext.cpp | 3571 +----------------------------------------- src/common/restext.h | 17 +- src/common/restext_strings.c | 776 +++++++++ 4 files changed, 842 insertions(+), 3525 deletions(-) create mode 100644 src/common/restext_strings.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b998d19..11c62f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,7 +64,8 @@ common/iman.cpp # common/misc.cpp # common/modfile.cpp # common/profile.cpp -# common/restext.cpp +common/restext.cpp +common/restext_strings.c common/stringutils.cpp graphics/core/color.cpp graphics/engine/camera.cpp diff --git a/src/common/restext.cpp b/src/common/restext.cpp index bbec090..bdada27 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -14,9 +14,9 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/.// restext.cpp -#include +#include +#include #include "common/struct.h" -#include "old/d3dengine.h" #include "common/language.h" #include "common/misc.h" #include "common/event.h" @@ -25,13 +25,11 @@ #include "common/restext.h" - -//** -> text to translate! - - - // Gives the pointer to the engine. +static CD3DEngine* g_engine; +static char g_gamerName[100]; + void SetEngine(CD3DEngine *engine) { g_engine = engine; @@ -80,7 +78,7 @@ static KeyDesc keyTable[22] = // Seeks a key. -bool SearchKey(char *cmd, KeyRank &key) +bool SearchKey(const char *cmd, KeyRank &key) { int i; @@ -97,7 +95,7 @@ bool SearchKey(char *cmd, KeyRank &key) // Replaces the commands "\key name;" in a text. -void PutKeyName(char* dst, char* src) +static void PutKeyName(char* dst, const char* src) { KeyRank key; char name[50]; @@ -114,7 +112,8 @@ void PutKeyName(char* dst, char* src) { if ( SearchKey(src+s+5, key) ) { - res = g_engine->RetKey(key, 0); + // FIXME: res = g_engine->RetKey(key, 0); + res = 0; if ( res != 0 ) { if ( GetResource(RES_KEY, res, name) ) @@ -136,3524 +135,60 @@ void PutKeyName(char* dst, char* src) dst[d++] = 0; } +// Returns the translated text of a resource that needs key substitution + +static const char* GetResourceBase(ResType type, int num) +{ + const char *str = NULL; + + assert(num >= 0); + + switch (type) + { + case RES_TEXT: + assert(num < strings_text_len); + str = strings_text[num]; + break; + case RES_EVENT: + assert(num < strings_event_len); + str = strings_event[num]; + break; + case RES_OBJECT: + assert(num < strings_object_len); + if (num == OBJECT_HUMAN) + return g_gamerName; + str = strings_object[num]; + break; + case RES_ERR: + assert(num < strings_err_len); + str = strings_err[num]; + break; + case RES_CBOT: + assert(num < strings_cbot_len); + str = strings_cbot[num]; + break; + case RES_KEY: + assert(num < SDLK_LAST); + str = SDL_GetKeyName(static_cast(num)); + break; + default: + assert(false); + } + return gettext(str); +} // Returns the text of a resource. bool GetResource(ResType type, int num, char* text) { - char buffer[100]; + const char *tmpl = GetResourceBase(type, num); - if ( !GetResourceBase(type, num, buffer) ) + if (!tmpl) { text[0] = 0; return false; } - PutKeyName(text, buffer); + PutKeyName(text, tmpl); return true; } - - -// Returns the text of a resource. - -bool GetResourceBase(ResType type, int num, char* text) -{ - text[0] = 0; - -#if _ENGLISH - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "1.18 /e"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /e"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Maximize"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Minimize"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normal size"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Close"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Program editor"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "New"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Player"); - if ( num == RT_IO_NEW ) strcpy(text, "New ..."); - if ( num == RT_KEY_OR ) strcpy(text, " or "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programming exercises"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "Challenges"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Free game"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Free game"); - if ( num == RT_TITLE_USER ) strcpy(text, "User levels"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Options"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Player's name"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Customize your appearance"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Save the current mission"); - if ( num == RT_TITLE_READ ) strcpy(text, "Load a saved mission"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Chapters:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Chapters:"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planets:"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planets:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " User levels:"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planets:"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Chapters:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Exercises in the chapter:"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Challenges in the chapter:"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Missions on this planet:"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Free game on this planet:"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions on this level:"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Prototypes on this planet:"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Free game on this chapter:"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Summary:"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Drivers:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Resolution:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) First click on the key you want to redefine."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Then press the key you want to use instead."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Face type:"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Eyeglasses:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Hair color:"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Suit color:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Strip color:"); - -#if _NEWLOOK - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Do you want to quit CeeBot ?"); - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quit\\Quit CeeBot"); -#else - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Do you want to quit COLOBOT ?"); - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quit\\Quit COLOBOT"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Quit the mission?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Abort\\Abort the current mission"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Continue\\Continue the current mission"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continue\\Continue the game"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Do you really want to destroy the selected building?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Do you want to delete %s's saved games? "); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Delete"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Cancel"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "LOADING"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Keyword help(\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 errors)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program finished"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;List of objects\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Robots\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Buildings\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Moveable objects\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Aliens\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (none)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Error\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "The list is only available if a \\l;radar station\\u object\\radar; is working.\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "Open"); - if ( num == RT_IO_SAVE ) strcpy(text, "Save"); - if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Name:"); - if ( num == RT_IO_DIR ) strcpy(text, "Folder:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Private\\Private folder"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Common folder"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Developed by :"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); -//? if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "English version published by:"); -//? if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.?.com"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Recorder"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Cancel"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Next"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Previous"); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Cancel"); - - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Exercises\\Programming exercises"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Challenges\\Programming challenges"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\Select mission"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Free game\\Free game without a specific goal"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Free game\\Free game without a specific goal"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "User\\User levels"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes under development"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "New player\\Choose player's name"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\Preferences"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Restart\\Restart the mission from the beginning"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Save\\Save the current mission "); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Load\\Load a saved mission"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Return to CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quit\\Quit CeeBot"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Return to COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quit\\Quit COLOBOT"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Back \\Back to the previous screen"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Play\\Start mission!"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Device\\Driver and resolution settings"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphics\\Graphics settings"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Game\\Game settings"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Controls\\Keyboard, joystick and mouse settings"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Sound\\Music and game sound volume"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Resolution"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Full screen\\Full screen or window mode"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Apply changes\\Activates the changed settings"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Your assistant"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Shadows\\Shadows on the ground"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marks on the ground\\Marks on the ground"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Dust\\Dust and dirt on bots and buildings"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Fog\\Fog"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Sunbeams\\Sunbeams in the sky"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Sky\\Clouds and nebulae"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planets and stars\\Astronomical objects in the sky"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamic lighting\\Mobile light sources"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Number of particles\\Explosions, dust, reflections, etc."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Depth of field\\Maximum visibility"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Details\\Visual quality of 3D objects"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Textures\\Quality of textures "); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Num of decorative objects\\Number of purely ornamental objects"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particles in the interface\\Steam clouds and sparks in the interface"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflections on the buttons \\Shiny buttons"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Help balloons\\Explain the function of the buttons"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Film sequences\\Films before and after the missions"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Exit film\\Film at the exit of exercises"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Friendly fire\\Your shooting can damage your own objects "); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Scrolling\\Scrolling when the mouse touches right or left border"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Mouse inversion X\\Inversion of the scrolling direction on the X axis"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Quake at explosions\\The screen shakes at explosions"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Mouse shadow\\Gives the mouse a shadow"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatic indent\\When program editing"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Big indent\\Indent 2 or 4 spaces per level defined by braces"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Access to solutions\\Show program \"4: Solution\" in the exercises"); //** - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standard controls\\Standard key functions"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Turn left\\turns the bot to the left"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Turn right\\turns the bot to the right"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Forward\\Moves forward"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Backward\\Moves backward"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Climb\\Increases the power of the jet"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descend\\Reduces the power of the jet"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Change camera\\Switches between onboard camera and following camera"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Previous object\\Selects the previous object"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Camera closer\\Moves the camera forward"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Camera back\\Moves the camera backward"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Next object\\Selects the next object"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Select the astronaut\\Selects the astronaut"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quit\\Quit the current mission or exercise"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions\\Shows the instructions for the current mission"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Programming help\\Gives more detailed help with programming"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Key word help\\More detailed help about key words"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Origin of last message\\Shows where the last message was sent from"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Speed 1.0x\\Normal speed"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Speed 1.5x\\1.5 times faster"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Speed 2.0x\\Double speed"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Speed 3.0x\\Three times faster"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Sound effects:\\Volume of engines, voice, shooting, etc."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Background sound :\\Volume of audio tracks on the CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D sound\\3D positioning of the sound"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Lowest\\Minimum graphic quality (highest frame rate)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Normal graphic quality"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Highest\\Highest graphic quality (lowest frame rate)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Mute\\No sound"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normal sound volume"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Use a joystick\\Joystick or keyboard"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Access to solution\\Shows the solution (detailed instructions for missions)"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\New player name"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Choose the selected player"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Cancel\\Keep current player name"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Delete player\\Deletes the player from the list"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Player name"); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Save\\Saves the current mission"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Load\\Loads the selected mission"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "List of saved missions"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Filename:"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Mission name"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Photography"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Delete\\Deletes the selected file"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Appearance\\Choose your appearance"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Cancel"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Standard appearance settings"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Head\\Face and hair"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Suit\\Astronaut suit"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Turn left"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Turn right"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Red"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Green"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Blue"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Red"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Green"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Blue"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Face 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Face 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Face 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Face 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\No eyeglasses"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Eyeglasses 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Eyeglasses 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Eyeglasses 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Eyeglasses 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Eyeglasses 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Previous selection (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Turn left (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Turn right (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Forward (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Backward (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Up (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Down (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Grab or drop (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Grab or drop (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..in front"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..behind"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..power cell"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions for the mission (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Take off to finish the mission"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Build a derrick"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Build a power station"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Build a bot factory"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Build a repair center"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Build a converter"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Build a defense tower"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Build a research center"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Build a radar station"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Build a power cell factory"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Build an autolab"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Build a nuclear power plant"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Build a lightning conductor"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Build a exchange post"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Show if the ground is flat"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Plant a flag"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Remove a flag"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Blue flags"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Red flags"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Green flags"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Yellow flags"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Violet flags"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Build a winged grabber"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Build a tracked grabber"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Build a wheeled grabber"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Build a legged grabber"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Build a winged shooter"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Build a tracked shooter"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Build a wheeled shooter"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Build a legged shooter"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Build a winged orga shooter"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Build a tracked orga shooter"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Build a wheeled orga shooter"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Build a legged orga shooter"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Build a winged sniffer"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Build a tracked sniffer"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Build a wheeled sniffer"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Build a legged sniffer"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Build a thumper"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Build a phazer shooter"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Build a recycler"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Build a shielder"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Build a subber"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Run research program for tracked bots"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Run research program for winged bots"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Run research program for thumper"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Run research program for shooter"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Run research program for defense tower"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Run research program for phazer shooter"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Run research program for shielder"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Run research program for nuclear power"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Run research program for legged bots"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Run research program for orga shooter"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Return to start"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Sniff (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Thump (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Shoot (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Extend shield (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Withdraw shield (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Shield radius"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Execute the selected program"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edit the selected program"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\SatCom on standby"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Destroy the building"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energy level"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Shield level"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Jet temperature"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Still working ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Number of insects detected"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Transmitted information"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Compass"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-map"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-map"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Camera (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camera to left"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camera to right"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camera nearest"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camera awayest"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Help about selected object"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Show the solution"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Switch bots <-> buildings"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Show the range"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Raise the pencil"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Use the black pencil"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Use the yellow pencil"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Use the orange pencil"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Use the red pencil"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Use the purple pencil"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Use the blue pencil"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Use the green pencil"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Use the brown pencil"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Start recording"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stop recording"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Show the place"); - if ( num == EVENT_DT_END ) strcpy(text, "Continue"); - if ( num == EVENT_CMD ) strcpy(text, "Command line"); - if ( num == EVENT_SPEED ) strcpy(text, "Game speed"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Back"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Forward"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copy"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Size 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Size 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Size 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Size 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Size 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions from Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnary"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Satellite report"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programs dispatched by Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "List of objects"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Programming help"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Close program editor and return to game"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Cancel\\Cancel all changes"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "New"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Open (Ctrl+o)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Save (Ctrl+s)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Undo (Ctrl+z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Cut (Ctrl+x)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copy (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Paste (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Font size"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Programming help (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compile"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Execute/stop"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continue"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "One step"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "Gantry crane"); - if ( num == OBJECT_BASE ) strcpy(text, "Spaceship"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Bot factory"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Repair center"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Destroyer"); - if ( num == OBJECT_STATION ) strcpy(text, "Power station"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Converts ore to titanium"); - if ( num == OBJECT_TOWER ) strcpy(text, "Defense tower"); - if ( num == OBJECT_NEST ) strcpy(text, "Nest"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Research center"); - if ( num == OBJECT_RADAR ) strcpy(text, "Radar station"); - if ( num == OBJECT_INFO ) strcpy(text, "Information exchange post"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Power cell factory"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Power cell factory"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Autolab"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Nuclear power station"); - if ( num == OBJECT_PARA ) strcpy(text, "Lightning conductor"); - if ( num == OBJECT_SAFE ) strcpy(text, "Vault"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Houston Mission Control"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Target"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Target"); - if ( num == OBJECT_START ) strcpy(text, "Start"); - if ( num == OBJECT_END ) strcpy(text, "Finish"); - if ( num == OBJECT_STONE ) strcpy(text, "Titanium ore"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Uranium ore"); - if ( num == OBJECT_BULLET ) strcpy(text, "Organic matter"); - if ( num == OBJECT_METAL ) strcpy(text, "Titanium"); - if ( num == OBJECT_POWER ) strcpy(text, "Power cell"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Nuclear power cell"); - if ( num == OBJECT_BBOX ) strcpy(text, "Black box"); - if ( num == OBJECT_KEYa ) strcpy(text, "Key A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Key B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Key C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Key D"); - if ( num == OBJECT_TNT ) strcpy(text, "Explosive"); - if ( num == OBJECT_BOMB ) strcpy(text, "Fixed mine"); - if ( num == OBJECT_BAG ) strcpy(text, "Survival kit"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Checkpoint"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Blue flag"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Red flag"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Green flag"); - if ( num == OBJECT_FLAGy ) strcpy(text, "Yellow flag"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Violet flag"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Energy deposit (site for power station)"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Uranium deposit (site for derrick)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Found key A (site for derrick)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Found key B (site for derrick)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Found key C (site for derrick)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Found key D (site for derrick)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Titanium deposit (site for derrick)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Winged grabber"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Tracked grabber"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Wheeled grabber"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Legged grabber"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Winged shooter"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Tracked shooter"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Wheeled shooter"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Legged shooter"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Winged orga shooter"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Tracked orga shooter"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Wheeled orga shooter"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Legged orga shooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Winged sniffer"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Tracked sniffer"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Wheeled sniffer"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Legged sniffer"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Thumper"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Phazer shooter"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Recycler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Shielder"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Subber"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Target bot"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Drawer bot"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Engineer"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Alien Queen"); - if ( num == OBJECT_ANT ) strcpy(text, "Ant"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Spider"); - if ( num == OBJECT_BEE ) strcpy(text, "Wasp"); - if ( num == OBJECT_WORM ) strcpy(text, "Worm"); - if ( num == OBJECT_EGG ) strcpy(text, "Egg"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Waste"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Spaceship ruin"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Spaceship ruin"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Remains of Apollo mission"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Error"); - if ( num == ERR_CMD ) strcpy(text, "Unknown command"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot not installed."); - if ( num == ERR_NOCD ) strcpy(text, "Please insert the CeeBot CD\nand re-run the game."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT not installed."); - if ( num == ERR_NOCD ) strcpy(text, "Please insert the COLOBOT CD\nand re-run the game."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Already carrying something"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Nothing to grab"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Place occupied"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "No other robot"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "You can not carry a radioactive object"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "You can not carry an object under water"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nothing to drop"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible under water"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium too far away"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium too close"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "No titanium around"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Ground not flat enough"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Flat ground not large enough"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Place occupied"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Too close to space ship"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Too close to a building"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Ground inappropriate"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Building too close"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Object too close"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nothing to recycle"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "No more energy"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Error in instruction move"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Object not found"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: inaccessible destination"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: inaccessible destination"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: destination occupied"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "No titanium ore to convert"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "No ore in the subsoil"); - if ( num == ERR_STATION_NULL ) strcpy(text, "No energy in the subsoil"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "No power cell"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "No more energy"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "No power cell"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Inappropriate cell type"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Research program already performed"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "No energy in the subsoil"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Not enough energy yet"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "No titanium to transform"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Transforms only titanium"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Doors blocked by a robot or another object "); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "You must get on the spaceship to take off "); - if ( num == ERR_LABO_NULL ) strcpy(text, "Nothing to analyze"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analyzes only organic matter"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analysis already performed"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "No energy in the subsoil"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Not yet enough energy"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "No uranium to transform"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Transforms only uranium"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "No titanium"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Object too close"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Place occupied"); - if ( num == ERR_INFO_NULL ) strcpy(text, "No information exchange post within range"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program infected by a virus"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infected by a virus, temporarily out of order"); - if ( num == ERR_VEH_POWER ) strcpy(text, "No power cell"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "No more energy"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible when swimming"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible when carrying an object"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Too many flags of this color (maximum 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Too close to an existing flag"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "No flag nearby"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "The mission is not accomplished yet (press \\key help; for more details)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Bot destroyed"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Building destroyed"); - if ( num == ERR_TOOMANY ) strcpy(text, "Can not create this, there are too many objects"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "\"%s\" missing in this exercise"); //** - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Do not use in this exercise"); //** - - if ( num == INFO_BUILD ) strcpy(text, "Building completed"); - if ( num == INFO_CONVERT ) strcpy(text, "Titanium available"); - if ( num == INFO_RESEARCH ) strcpy(text, "Research program completed"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Plans for tracked robots available "); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "You can fly with the keys (\\key gup;) and (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Plans for thumper available"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Plans for shooter available"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Plans for defense tower available"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Plans for phazer shooter available"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Plans for shielder available"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Plans for nuclear power plant available"); - if ( num == INFO_FACTORY ) strcpy(text, "New bot available"); - if ( num == INFO_LABO ) strcpy(text, "Analysis performed"); - if ( num == INFO_ENERGY ) strcpy(text, "Power cell available"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Nuclear power cell available"); - if ( num == INFO_FINDING ) strcpy(text, "You found a usable object"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Found a site for power station"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_WIN ) strcpy(text, "<<< Well done, mission accomplished >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Sorry, mission failed >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Sorry, mission failed >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Current mission saved"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Checkpoint crossed"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Alien Queen killed"); - if ( num == INFO_DELETEANT ) strcpy(text, "Ant fatally wounded"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Wasp fatally wounded"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Worm fatally wounded"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Spider fatally wounded"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Press \\key help; to read instructions on your SatCom"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Error"); - if ( num == TX_OPENPAR ) strcpy(text, "Opening bracket missing"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Closing bracket missing "); - if ( num == TX_NOTBOOL ) strcpy(text, "The expression must return a boolean value"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable not declared"); - if ( num == TX_BADLEFT ) strcpy(text, "Assignment impossible"); - if ( num == TX_ENDOF ) strcpy(text, "Semicolon terminator missing"); - if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" outside a block ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Instructions after the final closing brace"); - if ( num == TX_CLOSEBLK ) strcpy(text, "End of block missing"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" without corresponding ""if"" "); - if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//dbut d'un bloc attendu? - if ( num == TX_BADTYPE ) strcpy(text, "Wrong type for the assignment"); - if ( num == TX_REDEFVAR ) strcpy(text, "A variable can not be declared twice"); - if ( num == TX_BAD2TYPE ) strcpy(text, "The types of the two operands are incompatible "); - if ( num == TX_UNDEFCALL ) strcpy(text, "Unknown function"); - if ( num == TX_MISDOTS ) strcpy(text, "Sign "" : "" missing"); - if ( num == TX_WHILE ) strcpy(text, "Keyword ""while"" missing"); - if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" outside a loop"); - if ( num == TX_LABEL ) strcpy(text, "A label must be followed by ""for"", ""while"", ""do"" or ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette tiquette n'existe pas - if ( num == TX_NOCASE ) strcpy(text, "Instruction ""case"" missing"); - if ( num == TX_BADNUM ) strcpy(text, "Number missing"); - if ( num == TX_VOID ) strcpy(text, "Void parameter"); - if ( num == TX_NOTYP ) strcpy(text, "Type declaration missing"); - if ( num == TX_NOVAR ) strcpy(text, "Variable name missing"); - if ( num == TX_NOFONC ) strcpy(text, "Function name missing"); - if ( num == TX_OVERPARAM ) strcpy(text, "Too many parameters"); - if ( num == TX_REDEF ) strcpy(text, "Function already exists"); - if ( num == TX_LOWPARAM ) strcpy(text, "Parameters missing "); - if ( num == TX_BADPARAM ) strcpy(text, "No function with this name accepts this kind of parameter"); - if ( num == TX_NUMPARAM ) strcpy(text, "No function with this name accepts this number of parameters"); - if ( num == TX_NOITEM ) strcpy(text, "This is not a member of this class"); - if ( num == TX_DOT ) strcpy(text, "This object is not a member of a class"); - if ( num == TX_NOCONST ) strcpy(text, "Appropriate constructor missing"); - if ( num == TX_REDEFCLASS ) strcpy(text, "This class already exists"); - if ( num == TX_CLBRK ) strcpy(text, """ ] "" missing"); - if ( num == TX_RESERVED ) strcpy(text, "Reserved keyword of CBOT language"); - if ( num == TX_BADNEW ) strcpy(text, "Bad argument for ""new"""); - if ( num == TX_OPBRK ) strcpy(text, """ [ "" expected"); - if ( num == TX_BADSTRING ) strcpy(text, "String missing"); - if ( num == TX_BADINDEX ) strcpy(text, "Incorrect index type"); - if ( num == TX_PRIVATE ) strcpy(text, "Private element"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Public required"); - if ( num == TX_DIVZERO ) strcpy(text, "Dividing by zero"); - if ( num == TX_NOTINIT ) strcpy(text, "Variable not initialized"); - if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, a? - if ( num == TX_NORETVAL ) strcpy(text, "The function returned no value "); - if ( num == TX_NORUN ) strcpy(text, "No function running"); - if ( num == TX_NOCALL ) strcpy(text, "Calling an unknown function"); - if ( num == TX_NOCLASS ) strcpy(text, "This class does not exist"); - if ( num == TX_NULLPT ) strcpy(text, "Unknown Object"); - if ( num == TX_OPNAN ) strcpy(text, "Operation impossible with value ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Access beyond array limit"); - if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow"); - if ( num == TX_DELETEDPT ) strcpy(text, "Illegal object"); - if ( num == TX_FILEOPEN ) strcpy(text, "Can't open file"); - if ( num == TX_NOTOPEN ) strcpy(text, "File not open"); - if ( num == TX_ERRREAD ) strcpy(text, "Read error"); - if ( num == TX_ERRWRITE ) strcpy(text, "Write error"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< none >"); - if ( num == VK_LEFT ) strcpy(text, "Arrow left"); - if ( num == VK_RIGHT ) strcpy(text, "Arrow right"); - if ( num == VK_UP ) strcpy(text, "Arrow up"); - if ( num == VK_DOWN ) strcpy(text, "Arrow down"); - if ( num == VK_CANCEL ) strcpy(text, "Control-break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_RETURN ) strcpy(text, "Enter"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Space"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Select"); - if ( num == VK_EXECUTE ) strcpy(text, "Execute"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Help"); - if ( num == VK_LWIN ) strcpy(text, "Left Windows"); - if ( num == VK_RWIN ) strcpy(text, "Right Windows"); - if ( num == VK_APPS ) strcpy(text, "Application key"); - if ( num == VK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == VK_ADD ) strcpy(text, "NumPad +"); - if ( num == VK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == VK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == VK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == VK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Play"); - if ( num == VK_ZOOM ) strcpy(text, "Zoom"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_BUTTON1 ) strcpy(text, "Button 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Button 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Button 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Button 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Button 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Button 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Button 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Button 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Button 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Button 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Button 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Button 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Button 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Button 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Button 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Button 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Button 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Button 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Button 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Button 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Button 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Button 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Button 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Button 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Button 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Button 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Button 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Button 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Button 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Button 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Button 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Button 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Wheel up"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Wheel down"); - } -#endif - -#if _FRENCH - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "1.18 /f"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /f"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Taille maximale"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille rduite"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Taille normale"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Fermer"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edition du programme"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "Nouveau"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Joueur"); - if ( num == RT_IO_NEW ) strcpy(text, "Nouveau ..."); - if ( num == RT_KEY_OR ) strcpy(text, " ou "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmation"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "Dfis"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Jeu libre"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Jeu libre"); - if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux supplmentaires"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Options"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Nom du joueur"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Personnalisation de votre apparence"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Enregistrement de la mission en cours"); - if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistre"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des plantes :"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des plantes :"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux supplmentaires :"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des plantes :"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste des exercices du chapitre :"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des dfis du chapitre :"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste des missions du chapitre :"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste des jeux libres du chapitre :"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions du niveau :"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste des prototypes du chapitre :"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Liste des jeux libres du chapitre :"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Rsum :"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Pilotes :"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Rsolutions :"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche redfinir."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhaite."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Type de visage :"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Lunettes :"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Couleur des cheveux :"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Couleur de la combinaison :"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Couleur des bandes :"); - -#if _NEWLOOK - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Voulez-vous quitter CeeBot ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quitter\\Quitter CeeBot"); -#else - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Voulez-vous quitter COLOBOT ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quitter\\Quitter COLOBOT"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Quitter la mission ?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Abandonner\\Abandonner la mission en cours"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Continuer\\Continuer la mission en cours"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continuer\\Continuer de jouer"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment dtruire le btiment slectionn ?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous dtruire les sauvegardes de %s ?"); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Dtruire"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Annuler"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "CHARGEMENT"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-cl (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 erreur)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme termin"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Listes des objets\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Listes des robots\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des btiments\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes des objets transportables\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes des ennemis\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (aucun)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Erreur\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Liste non disponible sans \\l;radar\\u object\\radar; !\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "Ouvrir"); - if ( num == RT_IO_SAVE ) strcpy(text, "Enregistrer"); - if ( num == RT_IO_LIST ) strcpy(text, "Dossier: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Nom:"); - if ( num == RT_IO_DIR ) strcpy(text, "Dans:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Priv\\Dossier priv"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun tous les joueurs"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Dvelopp par :"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); -#if _SCHOOL - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); -#else - //?if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version franaise dite par :"); - //?if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.alsyd.com"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); -#endif - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Enregistreur"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "D'accord"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Annuler"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Suivant"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Prcdent"); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "D'accord"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Annuler"); - - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmation\\Exercices de programmation"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Dfis\\Dfis de programmation"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\La grande aventure"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but prcis"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Jeu libre\\Jeu libre sans but prcis"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux supplmentaires"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'laboration"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Autre joueur\\Choix du nom du joueur"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\Rglages"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au dbut"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Enregistrer\\Enregistrer la mission en cours"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistre"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter CeeBot"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter COLOBOT"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau prcdent"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\Dmarrer l'action"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et rsolution d'affichage"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphique\\Options graphiques"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilit"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Commandes\\Touches du clavier"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Son\\Volumes bruitages & musiques"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rsolution"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein cran\\Plein cran ou fentr"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectus"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Votre assistant"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projetes au sol"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessines sur le sol"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et btiments"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Brouillard\\Nappes de brouillard"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Rayons du soleil\\Rayons selon l'orientation"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Ciel\\Ciel et nuages"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Plantes et toiles\\Motifs mobiles dans le ciel"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumires dynamiques\\Eclairages mobiles"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantit de particules\\Explosions, poussires, reflets, etc."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Profondeur de champ\\Distance de vue maximale"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Dtails des objets\\Qualit des objets en 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit des textures\\Qualit des images"); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nb d'objets dcoratifs\\Qualit d'objets non indispensables"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particules dans l'interface\\Pluie de particules"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflets sur les boutons\\Boutons brillants"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Bulles d'aide\\Bulles explicatives"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Squences cinmatiques\\Films avant ou aprs une mission"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour anim\\Retour anim dans les exercices"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Dgts soi-mme\\Vos tirs infligent des dommages vos units"); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Dfilement dans les bords\\Dfilement lorsque la souris touches les bords gauche ou droite"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'cran vibre lors d'une explosion"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombre\\Jolie souris avec une ombre"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'dition d'un programme"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Grande indentation\\Indente avec 2 ou 4 espaces"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Accs aux solutions\\Programme \"4: Solution\" dans les exercices"); - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout rinitialiser\\Remet toutes les touches standards"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner gauche\\Moteur gauche"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner droite\\Moteur droite"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Avancer\\Moteur en avant"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arrire"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du racteur"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du racteur"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de camra\\Autre de point de vue"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Slection prcdente\\Slectionne l'objet prcdent"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Action standard\\Action du bouton avec le cadre rouge"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Camra plus proche\\Avance la camra"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Camra plus loin\\Recule la camra"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Slectionner l'objet suivant\\Slectionner l'objet suivant"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Slectionner le cosmonaute\\Slectionner le cosmonaute"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quitter la mission en cours\\Terminer un exercice ou une mssion"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche suivre"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Instructions programmation\\Explication sur la programmation"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-cl\\Explication sur le mot-cl"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Montrer le lieu d'un message\\Montrer le lieu du dernier message"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Vitesse 1.0x\\Vitesse normale"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Vitesse 1.5x\\Une fois et demi plus rapide"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Vitesse 2.0x\\Deux fois plus rapide"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Vitesse 3.0x\\Trois fois plus rapide"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Bruitages :\\Volume des moteurs, voix, etc."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Fond sonore :\\Volume des pistes audio du CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Bruitages 3D\\Positionnement sonore dans l'espace"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualit minimale (+ rapide)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualit standard"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualit (+ lent)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Silencieux\\Totalement silencieux"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Niveaux normaux"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Utilise un joystick\\Joystick ou clavier"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Accs la solution\\Donne la solution"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur crer"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "D'accord\\Choisir le joueur"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Annuler\\Conserver le joueur actuel"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Supprimer le joueur\\Supprimer le joueur de la liste"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Nom du joueur"); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Enregistrer\\Enregistrer la mission en cours"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission slectionne"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistres"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nom du fichier :"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nom de la mission"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Vue de la mission"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement slectionn"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aspect\\Choisir votre aspect"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "D'accord"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Annuler"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Remet les couleurs standards"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Tte\\Visage et cheveux"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Corps\\Combinaison"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation gauche"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation droite"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rouge"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Vert"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Bleu"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Rouge"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Vert"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Bleu"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Visage 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Visage 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Visage 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Visage 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Pas de lunettes"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Lunettes 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Lunettes 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Lunettes 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Lunettes 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Lunettes 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Slection prcdente (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne gauche (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne droite (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Avance (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Recule (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Monte (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Descend (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou dpose (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou dpose (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..devant"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derrire"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..pile"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions sur la mission (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Dcolle pour terminer la mission"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Construit un derrick"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Construit une station"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Construit une fabrique de robots"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de rparation"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Construit un convertisseur"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Construit une tour"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Construit un centre de recherches"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Construit un radar"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Construit une fabrique de piles"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Construit un laboratoire"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nuclaire"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Construit un paratonnerre"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Construit une borne d'information"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Montre si le sol est plat"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Pose un drapeau de couleur"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enlve un drapeau"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Drapeaux bleus"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Drapeaux rouges"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Drapeaux verts"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Drapeaux jaunes"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Drapeaux violets"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un dmnageur volant"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un dmnageur chenilles"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un dmnageur roues"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un dmnageur pattes"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Fabrique un shooter volant"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter chenilles"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter roues"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter pattes"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Fabrique un orgaShooter volant"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter chenilles"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter roues"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter pattes"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Fabrique un renifleur volant"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur chenilles"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur roues"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur pattes"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Fabrique un robot secoueur"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Fabrique un robot phazer"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Fabrique un robot recycleur"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Fabrique un robot bouclier"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Fabrique un robot sous-marin"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Recherche les chenilles"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Recherche les robots volants"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Recherche le secoueur"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Recherche le canon shooter"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de dfense"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Recherche le canon phazer"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Recherche le bouclier"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nuclaire"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Recherche les pattes"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Recherche le canon orgaShooter"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au dpart"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Cherche (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Secoue (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Tir (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Dploie le bouclier (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Stoppe le bouclier (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Rayon du bouclier"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Excute le programme slectionn"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme slectionn"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Mettre le SatCom en veille"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Dmolit le btiment"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'nergie"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Niveau du bouclier"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temprature du racteur"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Travail en cours ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes dtects"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffuses"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Boussole"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-carte"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-carte"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Camra (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camra gauche"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camra droite"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camra plus proche"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camra plus loin"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la slection"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Donne la solution"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> btiments"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Montre le rayon d'action"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Relve le crayon"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Abaisse le crayon rouge"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Abaisse le crayon violet"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Dmarre l'enregistrement"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Montre l'endroit"); - if ( num == EVENT_DT_END ) strcpy(text, "Continuer"); - if ( num == EVENT_CMD ) strcpy(text, "Console de commande"); - if ( num == EVENT_SPEED ) strcpy(text, "Vitesse du jeu"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page prcdente"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Page suivante"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Page initiale"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copier"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Taille 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Taille 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Taille 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Taille 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Taille 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions de Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnaire anglais-franais"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Rapport du satellite"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoys par Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste des objets"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide la programmation"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "D'accord\\Compiler le programme"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Annuler\\Annuler toutes les modifications"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nouveau"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Ouvrir (Ctrl+o)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Enregistrer (Ctrl+s)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Annuler (Ctrl+z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Couper (Ctrl+x)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copier (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Coller (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caractres"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide la programmation (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compiler"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Dmarrer/stopper"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continuer"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Un pas"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "Portique"); - if ( num == OBJECT_BASE ) strcpy(text, "Vaisseau spatial"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Fabrique de robots"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de rparation"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Destructeur"); - if ( num == OBJECT_STATION ) strcpy(text, "Station de recharge"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Conversion minerai en titanium"); - if ( num == OBJECT_TOWER ) strcpy(text, "Tour de dfense"); - if ( num == OBJECT_NEST ) strcpy(text, "Nid"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Centre de recherches"); - if ( num == OBJECT_RADAR ) strcpy(text, "Radar"); - if ( num == OBJECT_INFO ) strcpy(text, "Borne d'information"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Dsintgrateur"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Fabrique de piles"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de matires organiques"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nuclaire"); - if ( num == OBJECT_PARA ) strcpy(text, "Paratonnerre"); - if ( num == OBJECT_SAFE ) strcpy(text, "Coffre-fort"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contrle"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Cible"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Cible"); - if ( num == OBJECT_START ) strcpy(text, "Dpart"); - if ( num == OBJECT_END ) strcpy(text, "But"); - if ( num == OBJECT_STONE ) strcpy(text, "Minerai de titanium"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Minerai d'uranium"); - if ( num == OBJECT_BULLET ) strcpy(text, "Matire organique"); - if ( num == OBJECT_METAL ) strcpy(text, "Titanium"); - if ( num == OBJECT_POWER ) strcpy(text, "Pile normale"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nuclaire"); - if ( num == OBJECT_BBOX ) strcpy(text, "Bote noire"); - if ( num == OBJECT_KEYa ) strcpy(text, "Cl A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Cl B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Cl C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Cl D"); - if ( num == OBJECT_TNT ) strcpy(text, "Explosif"); - if ( num == OBJECT_BOMB ) strcpy(text, "Mine fixe"); - if ( num == OBJECT_BAG ) strcpy(text, "Sac de survie"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Indicateur"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Drapeau bleu"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Drapeau rouge"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Drapeau vert"); - if ( num == OBJECT_FLAGy ) strcpy(text, "Drapeau jaune"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Drapeau violet"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Emplacement pour station"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Emplacement pour derrick (uranium)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (cl A)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (cl B)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (cl C)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (cl D)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Emplacement pour derrick (titanium)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entranement"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot dmnageur"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Robot secoueur"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Robot phazer"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Robot recycleur"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Robot bouclier"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot sous-marin"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entranement"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Robot dessinateur"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Technicien"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Pondeuse"); - if ( num == OBJECT_ANT ) strcpy(text, "Fourmi"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Araigne"); - if ( num == OBJECT_BEE ) strcpy(text, "Gupe"); - if ( num == OBJECT_WORM ) strcpy(text, "Ver"); - if ( num == OBJECT_EGG ) strcpy(text, "Oeuf"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Dchet"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Btiment en ruine"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Epave de vaisseau spatial"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Epave de vaisseau spatial"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Vestige d'une mission Apollo"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Erreur"); - if ( num == ERR_CMD ) strcpy(text, "Commande inconnue"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot n'est pas install."); - if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de CeeBot\net relancer le jeu."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas install."); - if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de COLOBOT\net relancer le jeu."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte dj quelque chose"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien prendre"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occup"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Pas d'autre robot"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Vous ne pouvez pas transporter un objet radioactif"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Vous ne pouvez pas transporter un objet sous l'eau"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien dposer"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible sous l'eau"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'nergie"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium trop loin"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium trop proche"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Titanium inexistant"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Sol pas assez plat"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Sol plat pas assez grand"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occup"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Trop proche du vaisseau spatial"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un btiment"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'nergie"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapt"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Btiment trop proche"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Objet trop proche"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'nergie"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien recycler"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'nergie"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Dplacement impossible"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Objet n'existe pas"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Chemin introuvable"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Position inaccessible"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occupe"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapt"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'nergie"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium convertir"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "Pas de minerai en sous-sol"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'nergie en sous-sol"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'nergie"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'nergie"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Pas le bon type de pile"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche dj effectue"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'nergie en sous-sol"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'nergie"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium transformer"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Ne transforme que le titanium"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloques par un robot ou un objet"); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir dcoller"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Rien analyser"); - if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la matire organique"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse dj effectue"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'nergie en sous-sol"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'nergie"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium transformer"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Ne transforme que l'uranium"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "Pas de titanium"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Quelque chose est trop proche"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occup"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouv de borne d'information"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infect par un virus"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infect par un virus, ne fonctionne plus temporairement"); - if ( num == ERR_VEH_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'nergie"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible en nageant"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible en portant un objet"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Trop de drapeaux de cette couleur (maximum 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Trop proche d'un drapeau existant"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau proximit"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas termine (appuyez sur \\key help; pour plus de dtails)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot dtruit"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Btiment dtruit"); - if ( num == ERR_TOOMANY ) strcpy(text, "Cration impossible, il y a trop d'objets"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Il manque \"%s\" dans le programme"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Interdit dans cet exercice"); - - if ( num == INFO_BUILD ) strcpy(text, "Btiment termin"); - if ( num == INFO_CONVERT ) strcpy(text, "Titanium disponible"); - if ( num == INFO_RESEARCH ) strcpy(text, "Recherche termine"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot chenilles possible"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Fabrication d'un robot secoueur possible"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Fabrication de robots shooter possible"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de dfense possible"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Fabrication d'un robot phazer possible"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Fabrication d'un robot bouclier possible"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nuclaire possible"); - if ( num == INFO_FACTORY ) strcpy(text, "Nouveau robot disponible"); - if ( num == INFO_LABO ) strcpy(text, "Analyse termine"); - if ( num == INFO_ENERGY ) strcpy(text, "Pile disponible"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nuclaire disponible"); - if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouv un objet utilisable"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouv"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouv"); - if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission termine >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Dsol, mission choue >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Dsol, mission choue >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectu"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Indicateur atteint"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touche"); - if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touche"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Gupe mortellement touche"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touch"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Araigne mortellement touche"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Consultez votre SatCom en appuyant sur \\key help;"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Erreur"); - if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenthse ouvrante"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenthse fermante"); - if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit tre un boolean"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non dclare"); - if ( num == TX_BADLEFT ) strcpy(text, "Assignation impossible"); - if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouv"); - if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" hors d'un bloc ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Instructions aprs la fin"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Il manque la fin du bloc"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" sans ""if"" correspondant"); - if ( num == TX_OPENBLK ) strcpy(text, "Dbut d'un bloc attendu"); - if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de rsultat pour l'assignation"); - if ( num == TX_REDEFVAR ) strcpy(text, "Redfinition d'une variable"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux oprandes ne sont pas de types compatibles"); - if ( num == TX_UNDEFCALL ) strcpy(text, "Routine inconnue"); - if ( num == TX_MISDOTS ) strcpy(text, "Sparateur "" : "" attendu"); - if ( num == TX_WHILE ) strcpy(text, "Manque le mot ""while"""); - if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" en dehors d'une boucle"); - if ( num == TX_LABEL ) strcpy(text, "Un label ne peut se placer que devant un ""for"", un ""while"", un ""do"" ou un ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "Cette tiquette n'existe pas"); - if ( num == TX_NOCASE ) strcpy(text, "Manque une instruction ""case"""); - if ( num == TX_BADNUM ) strcpy(text, "Un nombre est attendu"); - if ( num == TX_VOID ) strcpy(text, "Paramtre void"); - if ( num == TX_NOTYP ) strcpy(text, "Dclaration de type attendu"); - if ( num == TX_NOVAR ) strcpy(text, "Nom d'une variable attendu"); - if ( num == TX_NOFONC ) strcpy(text, "Nom de la fonction attendu"); - if ( num == TX_OVERPARAM ) strcpy(text, "Trop de paramtres"); - if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe dj"); - if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de paramtres"); - if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramtre(s)"); - if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de paramtres"); - if ( num == TX_NOITEM ) strcpy(text, "Cet lment n'existe pas dans cette classe"); - if ( num == TX_DOT ) strcpy(text, "L'objet n'est pas une instance d'une classe"); - if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur appropri"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe dj"); - if ( num == TX_CLBRK ) strcpy(text, """ ] "" attendu"); - if ( num == TX_RESERVED ) strcpy(text, "Ce mot est rserv"); - if ( num == TX_BADNEW ) strcpy(text, "Mauvais argument pour ""new"""); - if ( num == TX_OPBRK ) strcpy(text, """ [ "" attendu"); - if ( num == TX_BADSTRING ) strcpy(text, "Une chane de caractre est attendue"); - if ( num == TX_BADINDEX ) strcpy(text, "Mauvais type d'index"); - if ( num == TX_PRIVATE ) strcpy(text, "Elment protg"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Public requis"); - if ( num == TX_DIVZERO ) strcpy(text, "Division par zro"); - if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialise"); - if ( num == TX_BADTHROW ) strcpy(text, "Valeur ngative refuse pour ""throw"""); - if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourn de rsultat"); - if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en excution"); - if ( num == TX_NOCALL ) strcpy(text, "Appel d'une fonction inexistante"); - if ( num == TX_NOCLASS ) strcpy(text, "Cette classe n'existe pas"); - if ( num == TX_NULLPT ) strcpy(text, "Objet n'existe pas"); - if ( num == TX_OPNAN ) strcpy(text, "Opration sur un ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Accs hors du tableau"); - if ( num == TX_STACKOVER ) strcpy(text, "Dbordement de la pile"); - if ( num == TX_DELETEDPT ) strcpy(text, "Objet inaccessible"); - if ( num == TX_FILEOPEN ) strcpy(text, "Ouverture du fichier impossible"); - if ( num == TX_NOTOPEN ) strcpy(text, "Le fichier n'est pas ouvert"); - if ( num == TX_ERRREAD ) strcpy(text, "Erreur la lecture"); - if ( num == TX_ERRWRITE ) strcpy(text, "Erreur l'criture"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< aucune >"); - if ( num == VK_LEFT ) strcpy(text, "Flche Gauche"); - if ( num == VK_RIGHT ) strcpy(text, "Flche Droite"); - if ( num == VK_UP ) strcpy(text, "Flche Haut"); - if ( num == VK_DOWN ) strcpy(text, "Flche Bas"); - if ( num == VK_CANCEL ) strcpy(text, "Control-break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_RETURN ) strcpy(text, "Entre"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Espace"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Select"); - if ( num == VK_EXECUTE ) strcpy(text, "Execute"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Help"); - if ( num == VK_LWIN ) strcpy(text, "Left Windows"); - if ( num == VK_RWIN ) strcpy(text, "Right Windows"); - if ( num == VK_APPS ) strcpy(text, "Application key"); - if ( num == VK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == VK_ADD ) strcpy(text, "NumPad +"); - if ( num == VK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == VK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == VK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == VK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Play"); - if ( num == VK_ZOOM ) strcpy(text, "Zoom"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_BUTTON1 ) strcpy(text, "Bouton 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Bouton 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Bouton 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Bouton 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Bouton 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Bouton 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Bouton 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Bouton 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Bouton 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Bouton 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Bouton 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Bouton 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Bouton 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Bouton 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Bouton 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Bouton 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Bouton 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Bouton 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Bouton 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Bouton 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Bouton 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Bouton 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Bouton 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Bouton 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Bouton 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Bouton 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Bouton 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Bouton 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Bouton 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Bouton 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Bouton 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Bouton 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Molette haut"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Molette bas"); - } -#endif - -#if _GERMAN | _WG - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "1.18 /d"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /d"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Groes Fenster"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Reduzieren"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normale Gre"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Schlieen"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Programmeditor"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "Neu"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Spieler"); - if ( num == RT_IO_NEW ) strcpy(text, "Neu ..."); - if ( num == RT_KEY_OR ) strcpy(text, " oder "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif -#if _SCHOOL - if ( num == RT_TITLE_TRAINER ) strcpy(text, "bungen"); -#else - if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmieren"); -#endif - if ( num == RT_TITLE_DEFI ) strcpy(text, "Challenges"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Missionen"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Freestyle"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Freestyle"); - if ( num == RT_TITLE_USER ) strcpy(text, "Userlevels"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypen"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Einstellungen"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Name "); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Aussehen einstellen"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Aktuelle Mission speichern"); - if ( num == RT_TITLE_READ ) strcpy(text, "Gespeicherte Mission laden"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste der Planeten:"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste der Planeten:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Userlevels:"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste der Planeten:"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste der bungen des Kapitels:"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste der Challenges des Kapitels:"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste der Missionen des Planeten:"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste der freien Levels des Planeten:"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Missionen des Userlevels:"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste der Prototypen des Planeten:"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Liste der freien Levels des Kapitel:"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Zusammenfassung:"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Driver:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Auflsung:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Klicken Sie auf die neu zu definierende Taste."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Drcken Sie auf die neue Taste."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Kopf:"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Brille:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Haarfarbe:"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Farbe des Anzugs:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Farbe der Streifen:"); - -#if _NEWLOOK - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie CeeBot schlieen ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlieen\\CeeBot schlieen"); -#else - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie COLOBOT schlieen ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlieen\\COLOBOT schlieen"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Mission abbrechen ?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Abbrechen\\Mission abbrechen"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Weitermachen\\Mission weitermachen"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Weitermachen\\Weitermachen"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Wollen Sie das angewhlte Gebude wirklich zerstren ?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Wollen Sie die gespeicherten Missionen von %s lschen ?"); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Zerstren"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Abbrechen"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "Laden"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Hilfe ber den Begriff (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Kompilieren OK (0 Fehler)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programm beendet"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Liste der Objekte\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Liste der Roboter\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes der Gebude\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes der tragbaren Gegenstnde\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes der Feinde\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (keine)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Fehler\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verfgbar !\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "ffnen"); - if ( num == RT_IO_SAVE ) strcpy(text, "Speichern"); - if ( num == RT_IO_LIST ) strcpy(text, "Ordner: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Name:"); - if ( num == RT_IO_DIR ) strcpy(text, "In:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Privat\\Privater Ordner"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "ffentlich\\Gemeinsamer Ordner fr alle Spieler"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Entwickelt von:"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); -#if _WG - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Herausgegeben von:"); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.wg-verlag.ch"); -#else - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); -#endif - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Recorder"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Abbrechen"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nchster"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Vorherg."); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Men (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Abbrechen"); - -#if _SCHOOL - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "bungen\\Programmierbungen"); -#else - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmieren\\Programmierbungen"); -#endif - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Challenges\\Herausforderungen"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missionen\\Aufbruch ins Weltall"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Freestyle\\Freies Spielen ohne vorgegebenes Ziel"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Freestyle\\Freies Spielen ohne vorgegebenes Ziel"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "User\\Userlevels"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\In Entwicklung befindliche Prototypen"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Anderer Spieler\\Spielername ndern"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Einstellungen\\Einstellungen"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Neu anfangen\\Die Mission von vorne anfangen"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Speichern\\Aktuelle Mission speichern"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Laden\\Eine gespeicherte Mission ffnen"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zurck zu CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlieen\\CeeBot schlieen"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zurck zu COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlieen\\COLOBOT schlieen"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Zurck \\Zurck zum Hauptmen"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Spielen ...\\Los geht's"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Bildschirm\\Driver und Bildschirmauflsung"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafik\\Grafische Einstellungen"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Spiel\\Gameplay Einstellungen"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Steuerung\\Auswahl der Tasten"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Gerusche\\Lautstrke Gerusche und Musik"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Einheit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Auflsung"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Vollbildschirm\\Vollbildschirm oder Fenster"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "nderungen ausfhren\\Gettigte Einstellungen ausfhren"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robby\\Ihr Assistent"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Schatten\\Schlagschatten auf dem Boden"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Markierungen\\Markierungen auf dem Boden"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Schmutz\\Schmutz auf Robotern und Bauten"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Nebel\\Nebelschwaden"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Sonnenstrahlen\\Sonnenstrahlen"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Himmel\\Himmel und Wolken"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planeten und Sterne\\Kreisende Planeten und Sterne"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamische Beleuchtung\\Dynamische Beleuchtung"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Anzahl Partikel\\Explosionen, Staub, usw."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Sichtweite\\Maximale Sichtweite"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Details\\Detailliertheit der Objekte in 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualitt der Texturen\\Qualitt der Anzeige"); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Anzahl Ziergegenstnde\\Anzahl Gegenstnde ohne Funktion"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Partikel in den Mens\\Funken und Sterne in den Mens"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Glnzende Tasten\\Glnzende Tasten in den Mens"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Hilfsblasen\\Hilfsblasen"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Filme\\Filme vor und nach den Missionen"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Zurcksetzen \\Kleine Show beim Zurcksetzen in den bungen"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen beschdigt."); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Umkehr X\\Umkehr der Kameradrehung X-Achse"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Umkehr Y\\Umkehr der Kameradrehung Y-Achse"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Beben bei Explosionen\\Die Kamera bebt bei Explosionen"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Schatten unter der Maus\\Ein Schatten erscheint unter der Maus"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatisches Einrcken\\Beim Bearbeiten der Programme"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Einrcken mit 4 Leerstellen\\Einrcken mit 2 oder 4 Leerstellen"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Lsung zugnglich\\Die Lsung ist im Programmslot \"4: Lsung\" zugnglich"); - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Alles zurcksetzen\\Standarddefinition aller Tasten"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Drehung nach links\\Steuer links"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Drehung nach rechts\\Steuer rechts"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Vorwrts\\Bewegung nach vorne"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Rckwrts\\Bewegung nach hinten"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Steigen\\Leistung des Triebwerks steigern"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Sinken\\Leistung des Triebwerks drosseln"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Andere Kamera\\Sichtpunkt einstellen"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Vorherg. Auswahl\\Das vorhergehende Objekt auswhlen"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardhandlung\\Fhrt die Standardhandlung des Roboters aus."); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera nher\\Bewegung der Kamera vorwrts"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera weiter\\Bewegung der Kamera rckwrts"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nchstes auswhlen\\Nchstes Objekt auswhlen"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Astronauten auswhlen\\Astronauten auswhlen"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Mission verlassen\\Eine Mission oder bung verlassen"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Anweisungen\\Anweisungen fr die Mission oder bung"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Hilfe CBOT-Sprache\\Hilfe ber die Programmiersprache CBOT"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Hilfe ber Begriff\\Hilfe ber einen Begriff"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Ort der Meldung\\Zeigt den Ort, von dem die letzte Meldung stammt"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Geschwindigkeit 1.0x\\Normale Spielgeschwindigkeit"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Geschwindigkeit 1.5x\\Spielgeschwindigkeit anderthalb Mal schneller"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Geschwindigkeit 2.0x\\Spielgeschwindigkeit doppelt so schnell"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Geschwindigkeit 3.0x\\Spielgeschwindigkeit drei Mal schneller"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Gerusche:\\Lautstrke Motoren, Stimmen, usw."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Geruschkulisse:\\Lautstrke der Soundtracks der CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D-Gerusche\\Orten der Gerusche im Raum"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Min.\\Minimale Qualitt (groes Framerate)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Standardqualitt"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Max.\\Beste Qualitt (niedriges Framerate)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Kein Ton\\Keine Gerusche und Geruschkulisse"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normale Lautstrke"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Joystick\\Joystick oder Tastatur"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Zeigt die Lsung\\Zeigt nach 3mal Scheitern die Lsung"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Name des Spielers"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Spieler auswhlen"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Abbrechen\\Behlt den bisherigen Spieler bei"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Spieler lschen\\Lscht den Spieler aus der Liste"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Name "); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Speichern\\Speichert die Mission"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Laden\\ffnet eine gespeicherte Mission"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste der gespeicherten Missionen"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Dateiname:"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Name der Mission"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Ansicht der Mission"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Lschen\\Lscht die gespeicherte Mission"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aussehen\\Erscheinungsbild des Astronauten einstellen"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Abbrechen"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Standardfarben einsetzen"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Kopf\\Gesicht und Haare"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Anzug\\Raumfahrtanzug"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Drehung links"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Drehung rechts"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rot"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Grn"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Blau"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Rot"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Grn"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Blau"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Kopf 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Kopf 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Kopf 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Kopf 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Keine Brille"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Brille 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Brille 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Brille 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Brille 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Brille 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Vorherg. Auwahl (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Drehung links (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Drehung rechts (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Vorwrts (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Rckwrts (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Steigt (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Sinkt (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Nehmen oder hinlegen (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Nehmen oder hinlegen (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..vorne"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..hinten"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..Batterie"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Anweisungen ber die Mission(\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Abheben nach vollbrachter Mission"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Baut einen Bohrturm"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Baut ein Kraftwerk"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Baut eine Roboterfabrik"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Baut ein Reparaturzentrum"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Baut einen Konverter"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Baut einen Geschtzturm"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Baut ein Forschungszentrum"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Baut ein Radar"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Baut eine Batteriefabrik"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Baut ein automatisches Labor"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Baut eine Brennstoffzellenfabrik"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Baut einen Blitzableiter"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Baut einen Infoserver"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Zeigt ob der Boden eben ist"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Setzt eine Fahne"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Sammelt die Fahne ein"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Blaue Fahne"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Rote Fahne"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Grne Fahne"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Gelbe Fahne"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Violette Fahne"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Baut einen Jettransporter"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Baut einen Kettentransporter"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Baut einen Radtransporter"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Baut einen Krabbeltransporter"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Baut einen Jetshooter"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Baut einen Kettenshooter"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Baut einen Radshooter"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Baut einen Krabbelshooter"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Baut einen Jetorgashooter"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Baut einen Kettenorgashooter"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Baut einen Radorgashooter"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Baut einen Krabbelorgashooter"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Baut einen Jetschnffler"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Baut einen Kettenschnffler"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Baut einen Radschnffler"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Baut einen Krabbelschnffler"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Baut einen Stampfer"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Baut einen Phazershooter"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Baut einen Recycler"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Baut einen Schutzschild"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Baut einen Kettentaucher"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Forschungsprogramm Kettenantrieb"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Forschungsprogramm Jetantrieb"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Forschungsprogramm Stampfer"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Forschungsprogramm Shooterkanone"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Forschungsprogramm Geschtzturm"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Forschungsprogramm Phazerkanone"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Forschungsprogramm Schutzschild"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Forschungsprogramm Brennstoffzelle"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Forschungsprogramm Krabbelantrieb"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Forschungsprogramm Orgashooterkanone"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Alles zurcksetzen"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Schnffeln (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Stampfen (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Feuer (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recyceln (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Schutzschild ausfahren (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Schutzschild einholen (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Reichweite Schutzschild"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Gewhltes Programm ausfhren"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Gewhltes Programm bearbeiten"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\SatCom in Standby"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Gebude sprengen"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energievorrat"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Schden"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Triebwerktemperatur"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Prozess im Gang ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Anzahl erfasster Insekten"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Gesendete Informationen"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompass"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Minikarte"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom Minikarte"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Kamera links"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Kamera rechts"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Kamera nher"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Kamera weiter weg"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Anweisungen ber das ausgewhlte Objekt"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Zeigt die Lsung"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Anzeige Roboter <-> Bauten"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Zeigt die Reichweite"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Bleistift abheben"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Schwarzen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Gelben Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Orangefarbenen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Roten Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Violetten Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Blauen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Grnen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Braunen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Aufnahme starten"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Aufnahme stoppen"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Zeigt den Ort"); - if ( num == EVENT_DT_END ) strcpy(text, "Weitermachen"); - if ( num == EVENT_CMD ) strcpy(text, "Befehleingabe"); - if ( num == EVENT_SPEED ) strcpy(text, "Spielgeschwindigkeit"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Vorherg. Seite"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Nchste Seite"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopieren"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Gre 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Gre 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Gre 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Gre 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Gre 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Anweisungen von Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Wrterbuch Englisch-Deutsch"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Satellitenbericht"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Von Houston bermittelte Programme"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste der Objekte"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Hilfe ber Programmieren"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Lsung"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Programm kompilieren"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Abbrechen\\Editor schlieen"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Neu"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "ffnen (Ctrl+o)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Speichern (Ctrl+s)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Widerrufen (Ctrl+z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Ausschneiden (Ctrl+x)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopieren (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Einfgen (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Zeichengre"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Anweisungen (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Hilfe ber Programmieren (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompilieren"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Start/Stop"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/Weitermachen"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Ein Schritt"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "Trger"); - if ( num == OBJECT_BASE ) strcpy(text, "Raumschiff"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Bohrturm"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Roboterfabrik"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Reparaturzentrum"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Einstampfer"); - if ( num == OBJECT_STATION ) strcpy(text, "Kraftwerk"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Konverter Erz-Titan"); - if ( num == OBJECT_TOWER ) strcpy(text, "Geschtzturm"); - if ( num == OBJECT_NEST ) strcpy(text, "Orgastoffquelle"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Forschungszentrum"); - if ( num == OBJECT_RADAR ) strcpy(text, "Radar"); - if ( num == OBJECT_INFO ) strcpy(text, "Infoserver"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Auflser"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Batteriefabrik"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Automatisches Labor"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Brennstoffzellenfabrik"); - if ( num == OBJECT_PARA ) strcpy(text, "Blitzableiter"); - if ( num == OBJECT_SAFE ) strcpy(text, "Bunker"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Kontrollzentrum"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Zielscheibe"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Zielscheibe"); - if ( num == OBJECT_START ) strcpy(text, "Startflche"); - if ( num == OBJECT_END ) strcpy(text, "Zielflche"); - if ( num == OBJECT_STONE ) strcpy(text, "Titanerz"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Platinerz"); - if ( num == OBJECT_BULLET ) strcpy(text, "Orgastoff"); - if ( num == OBJECT_METAL ) strcpy(text, "Titan"); - if ( num == OBJECT_POWER ) strcpy(text, "Elektrolytische Batterie"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Brennstoffzelle"); - if ( num == OBJECT_BBOX ) strcpy(text, "Flugschreiber"); - if ( num == OBJECT_KEYa ) strcpy(text, "Schlssel A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Schlssel B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Schlssel C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Schlssel D"); - if ( num == OBJECT_TNT ) strcpy(text, "Sprengstoff"); - if ( num == OBJECT_BOMB ) strcpy(text, "Landmine"); - if ( num == OBJECT_BAG ) strcpy(text, "berlebenskit"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Checkpoint"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Blaue Fahne"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Rote Fahne"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Grne Fahne"); - if ( num == OBJECT_FLAGy ) strcpy(text, "Gelbe Fahne"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Violette Fahne"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Markierung fr unterirdische Energiequelle"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Markierung fr unterirdisches Platinvorkommen"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Markierung fr vergrabenen Schlssel A"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Markierung fr vergrabenen Schlssel B"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Markierung fr vergrabenen Schlssel C"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Markierung fr vergrabenen Schlssel D"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Markierung fr unterirdisches Titanvorkommen"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "bungsroboter"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Schnffler"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Stampfer"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Phazershooter"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Recycler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Schutzschild"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Kettentaucher"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Mobile Zielscheibe"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Zeichner"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Techniker"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robby"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Insektenknigin"); - if ( num == OBJECT_ANT ) strcpy(text, "Ameise"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Spinne"); - if ( num == OBJECT_BEE ) strcpy(text, "Wespe"); - if ( num == OBJECT_WORM ) strcpy(text, "Wurm"); - if ( num == OBJECT_EGG ) strcpy(text, "Ei"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Gebuderuine"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Gebuderuine"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Abfall"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Gebuderuine"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Gebuderuine"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Raumschiffruine"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Raumschiffruine"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "berreste einer Apollo-Mission"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Fehler"); - if ( num == ERR_CMD ) strcpy(text, "Befehl unbekannt"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot wurde nicht installiert."); - if ( num == ERR_NOCD ) strcpy(text, "Legen Sie die CeeBot-CD ein\nund starten Sie das Spiel neu."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT wurde nicht installiert."); - if ( num == ERR_NOCD ) strcpy(text, "Legen Sie die COLOBOT-CD ein\nund starten Sie das Spiel neu."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Trgt schon etwas"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Nichts zu ergreifen"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "In Fahrt unmglich"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Stelle schon besetzt"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Kein anderer Roboter"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Sie knnen keinen radioaktiven Gegenstand tragen"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Sie knnen unter Wasser nichts tragen"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nichts abzulegen"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Unter Wasser unmglich"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titan zu weit weg"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titan zu nahe"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Kein Titan vorhanden"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Boden nicht eben genug"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Ebener Boden nicht gro genug"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Stelle schon besetzt"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Zu nahe am Raumschiff"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Zu nahe an einem Gebude"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "In Fahrt unmglich"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "In Fahrt unmglich"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Boden ungeeignet"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Gebude zu nahe"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Gegenstand zu nahe"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nichts zu recyceln"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Keine Energie mehr"); -//? if ( num == ERR_COM ) strcpy(text, "Kommunikationsproblem mit dem Roboter"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Ziel kann nicht erreicht werden"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Das Objekt existiert nicht"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Ziel kann nicht erreicht werden"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Ziel kann nicht erreicht werden"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Ziel ist schon besetzt"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "Keine unterirdische Erzlagersttte"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "Keine Batterie"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Keine Energie mehr"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Keine Batterie"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Nicht mehr genug Energie"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Falscher Batterietyp"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Forschungsprogramm schon ausgefhrt"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Noch nicht genug Energie"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Wandelt nur Titanerz um"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Die Tren werden von einem Gegenstand blockiert"); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Gehen Sie an Bord, bevor Sie abheben"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Nichts zu analysieren"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analysiert nur Orgastoff"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse schon durchgefhrt"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Noch nicht genug Energie"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Kein konvertierbares Platin"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Wandelt nur Platin um"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "Kein Titan vorhanden"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Ein Gegenstand ist zu nahe"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Stelle schon besetzt"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Kein Infoserver in Reichweite"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Ein Programm wurde von einem Virus infiziert"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Von Virus infiziert, zeitweise auer Betrieb"); - if ( num == ERR_VEH_POWER ) strcpy(text, "Keine Batterie"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Keine Energie mehr"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Im Flug unmglich"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Im Wasser unmglich"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Beim Gehen unmglich"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Unmglich wenn Sie etwas tragen"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Zu viele Fahnen dieser Farbe (Maximum 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Zu nahe an einer anderen Fahne"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Keine Fahne in Reichweite"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Mission noch nicht beendet (Drcken Sie auf \\key help; fr weitere Informationen)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Roboter zerstrt"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Gebude zerstrt"); - if ( num == ERR_TOOMANY ) strcpy(text, "Kein neues Objekt kann erstellt werden (zu viele vorhanden)"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Es fehlt \"%s\" in Ihrem Programm"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "In dieser bung verboten"); - - if ( num == INFO_BUILD ) strcpy(text, "Gebude fertiggestellt"); - if ( num == INFO_CONVERT ) strcpy(text, "Titan verfgbar"); - if ( num == INFO_RESEARCH ) strcpy(text, "Forschungsprogramm abgeschlossen"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Herstellung eines Roboters mit Kettenantrieb mglich"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Sie knnen jetzt mit den Tasten \\key gup; und \\key gdown; fliegen"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Herstellung eines Stampfers mglich"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Herstellung eines Shooters mglich"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Errichtung eines Geschtzturms mglich"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Herstellung eines Phazershooters mglich"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Herstellung eines Schutzschildes mglich"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Errichtung einer Brennstoffzellenfabrik mglich"); - if ( num == INFO_FACTORY ) strcpy(text, "Neuer Roboter verfgbar"); - if ( num == INFO_LABO ) strcpy(text, "Analyse vollendet"); - if ( num == INFO_ENERGY ) strcpy(text, "Batterie verfgbar"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Brennstoffzelle verfgbar"); - if ( num == INFO_FINDING ) strcpy(text, "Sie haben ein brauchbares Objekt gefunden"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Geeignete Stelle fr Kraftwerk gefunden"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Geeignete Stelle fr Bohrturm gefunden"); - if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, Mission vollendet >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Mission gescheitert >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Mission gescheitert >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Mission gespeichert"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Checkpoint erreicht"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Insektenknigin tdlich verwundet"); - if ( num == INFO_DELETEANT ) strcpy(text, "Ameise tdlich verwundet"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Wespe tdlich verwundet"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Wurm tdlich verwundet"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Spinne tdlich verwundet"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; drcken"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Fehler"); - if ( num == TX_OPENPAR ) strcpy(text, "Es fehlt eine offene Klammer ""("""); - if ( num == TX_CLOSEPAR ) strcpy(text, "Es fehlt eine geschlossene Klammer "")"""); - if ( num == TX_NOTBOOL ) strcpy(text, "Der Ausdruck muss einen boolschen Wert ergeben"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable nicht deklariert"); - if ( num == TX_BADLEFT ) strcpy(text, "Zuweisung unmglich"); - if ( num == TX_ENDOF ) strcpy(text, "Es fehlt ein Strichpunkt "";"" am Ende der Anweisung"); - if ( num == TX_OUTCASE ) strcpy(text, "Anweisung ""case"" ohne vorhergehende Anweisung ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Hier ist eine Anweisung nach dem Ende des Programms"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Es fehlt eine geschlossene geschweifte Klammer ""}"" (Ende des Blocks)"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Anweisung ""else"" ohne vorhergehende Anweisung ""if"""); - if ( num == TX_OPENBLK ) strcpy(text, "Es fehlt eine offene geschweifte Klammer""{"""); - if ( num == TX_BADTYPE ) strcpy(text, "Der Ausdruck ergibt einen falschen Typ fr die Zuweisung"); - if ( num == TX_REDEFVAR ) strcpy(text, "Eine Variable wird zum zweiten Mal deklariert"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Die zwei Operanden sind nicht kompatibel"); - if ( num == TX_UNDEFCALL ) strcpy(text, "Unbekannte Funktion"); - if ( num == TX_MISDOTS ) strcpy(text, "Es fehlt ein Doppelpunkt "" : """); - if ( num == TX_WHILE ) strcpy(text, "Es fehlt das Wort ""while"""); - if ( num == TX_BREAK ) strcpy(text, "Anweisung ""break"" auerhalb einer Schleife"); - if ( num == TX_LABEL ) strcpy(text, "Ein Label kann nur vor den Anweisungen ""for"", ""while"", ""do"" oder ""switch"" vorkommen"); - if ( num == TX_NOLABEL ) strcpy(text, "Dieses Label existiert nicht"); - if ( num == TX_NOCASE ) strcpy(text, "Es fehlt eine Anweisung ""case"""); - if ( num == TX_BADNUM ) strcpy(text, "Es fehlt eine Zahl"); - if ( num == TX_VOID ) strcpy(text, "Parameter void"); - if ( num == TX_NOTYP ) strcpy(text, "Hier muss ein Variablentyp stehen"); - if ( num == TX_NOVAR ) strcpy(text, "Es fehlt der Name einer Variable"); - if ( num == TX_NOFONC ) strcpy(text, "Hier muss der Name der Funktion stehen"); - if ( num == TX_OVERPARAM ) strcpy(text, "Zu viele Parameter"); - if ( num == TX_REDEF ) strcpy(text, "Diese Funktion gibt es schon"); - if ( num == TX_LOWPARAM ) strcpy(text, "Nicht genug Parameter"); - if ( num == TX_BADPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertrgt Parameter diesen Typs"); - if ( num == TX_NUMPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertrgt diese Anzahl Parameter"); - if ( num == TX_NOITEM ) strcpy(text, "Dieses Element gibt es nicht in dieser Klasse"); - if ( num == TX_DOT ) strcpy(text, "Das Objekt ist nicht eine Instanz einer Klasse"); - if ( num == TX_NOCONST ) strcpy(text, "Es gibt keinen geeigneten Konstruktor"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Diese Klasse gibt es schon"); - if ( num == TX_CLBRK ) strcpy(text, "Es fehlt eine geschlossene eckige Klammer "" ] """); - if ( num == TX_RESERVED ) strcpy(text, "Dieses Wort ist reserviert"); - if ( num == TX_BADNEW ) strcpy(text, "Falsche Argumente fr ""new"""); - if ( num == TX_OPBRK ) strcpy(text, "Es fehlt eine offene eckige Klammer "" [ """); - if ( num == TX_BADSTRING ) strcpy(text, "Hier wird eine Zeichenkette erwartet"); - if ( num == TX_BADINDEX ) strcpy(text, "Falscher Typ fr einen Index"); - if ( num == TX_PRIVATE ) strcpy(text, "Geschtztes Element (private)"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Hier muss das Wort ""public"" stehen"); - if ( num == TX_DIVZERO ) strcpy(text, "Teilung durch Null"); - if ( num == TX_NOTINIT ) strcpy(text, "Der Wert dieser Variable wurde nicht definiert"); - if ( num == TX_BADTHROW ) strcpy(text, "Negativer Wert ungeeignet fr Anweisung ""throw"""); - if ( num == TX_NORETVAL ) strcpy(text, "Die Funktion hat kein Ergebnis zurckgegeben"); - if ( num == TX_NORUN ) strcpy(text, "Keine Funktion wird ausgefhrt"); - if ( num == TX_NOCALL ) strcpy(text, "Die aufgerufene Funktion existiert nicht"); - if ( num == TX_NOCLASS ) strcpy(text, "Diese Klasse existiert nicht"); - if ( num == TX_NULLPT ) strcpy(text, "Das Objekt existiert nicht"); - if ( num == TX_OPNAN ) strcpy(text, "Operation mit dem Wert ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Zugriff im Array auerhalb der Grenzen"); - if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow"); - if ( num == TX_DELETEDPT ) strcpy(text, "Objekt nicht verfgbar"); - if ( num == TX_FILEOPEN ) strcpy(text, "Die Datei kann nicht geffnet werden"); - if ( num == TX_NOTOPEN ) strcpy(text, "Die Datei wurde nicht geffnet"); - if ( num == TX_ERRREAD ) strcpy(text, "Fehler beim Lesezugriff"); - if ( num == TX_ERRWRITE ) strcpy(text, "Fehler beim Schreibzugriff"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< keine >"); - if ( num == VK_LEFT ) strcpy(text, "Pfeiltaste links"); - if ( num == VK_RIGHT ) strcpy(text, "Pfeiltaste rechts"); - if ( num == VK_UP ) strcpy(text, "Pfeil nach oben"); - if ( num == VK_DOWN ) strcpy(text, "Pfeil nach unten"); - if ( num == VK_CANCEL ) strcpy(text, "Ctrl-Break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_RETURN ) strcpy(text, "Eingabe"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Leertaste"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Select"); - if ( num == VK_EXECUTE ) strcpy(text, "Execute"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Help"); - if ( num == VK_LWIN ) strcpy(text, "Left Windows"); - if ( num == VK_RWIN ) strcpy(text, "Right Windows"); - if ( num == VK_APPS ) strcpy(text, "Application key"); - if ( num == VK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == VK_ADD ) strcpy(text, "NumPad +"); - if ( num == VK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == VK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == VK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == VK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Play"); - if ( num == VK_ZOOM ) strcpy(text, "Zoom"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == VK_BUTTON1 ) strcpy(text, "Knopf 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Knopf 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Knopf 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Knopf 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Knopf 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Knopf 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Knopf 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Knopf 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Knopf 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Knopf 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Knopf 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Knopf 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Knopf 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Knopf 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Knopf 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Knopf 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Knopf 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Knopf 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Knopf 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Knopf 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Knopf 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Knopf 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Knopf 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Knopf 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Knopf 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Knopf 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Knopf 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Knopf 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Knopf 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Knopf 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Knopf 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Knopf 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Mausrad nach vorne"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Mausrad zurck"); - } -#endif - -#if _POLISH - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "Wersja 1.18 /pl"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /pl"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powiksz"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Pomniejsz"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielko"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Zamknij"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edytor programu"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "Nowy"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Gracz"); - if ( num == RT_IO_NEW ) strcpy(text, "Nowy ..."); - if ( num == RT_KEY_OR ) strcpy(text, " lub "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "wiczenia programistyczne"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "Wyzwania"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Misje"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Swobodna gra"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Swobodna gra"); - if ( num == RT_TITLE_USER ) strcpy(text, "Poziomy uytkownika"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypy"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Opcje"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Imi gracza"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygld"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz biec misj"); - if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan misj"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdziay:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdziay:"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziomy uytkownika:"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " wiczenia w tym rozdziale:"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Wyzwania w tym rozdziale:"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Misje na tej planecie:"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Swobodna gra na tej planecie:"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Misje na tym poziomie:"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Prototypy na tej planecie:"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Prototypy na tej planecie:"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Streszczenie:"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Sterowniki:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Rozdzielczo:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, ktry chcesz przedefiniowa."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nastpnie nacinij klawisz, ktrego chcesz uywa."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Rodzaj twarzy:"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Okulary:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor wosw:"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Kolor skafandra:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor paskw:"); - -#if _NEWLOOK - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuci gr CeeBot?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakocz\\Koczy gr CeeBot"); -#else - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opuci gr COLOBOT?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zakocz\\Koczy gr COLOBOT"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opuci misj?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa biec misj"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje biec misj"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje gr"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczy zaznaczony budynek?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowa zapisane gry gracza %s? "); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usu"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Anuluj"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "WCZYTYWANIE"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skrty klawiszowe (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 bdw)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zakoczony"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiektw\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Roboty\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Budynki\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Obiekty ruchome\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Obcy\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (brak)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Bd\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dostpna jedynie gdy dziaa \\l;stacja radarowa\\u object\\radar;.\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "Otwrz"); - if ( num == RT_IO_SAVE ) strcpy(text, "Zapisz"); - if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Nazwa:"); - if ( num == RT_IO_DIR ) strcpy(text, "Folder:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Prywatny\\Folder prywatny"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder oglnodostpny"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Twrcy:"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Wersja polska wydana przez:"); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.manta.com.pl"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Recorder"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Anuluj"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nastpny"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Poprzedni"); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Anuluj"); - - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "wiczenia\\wiczenia programistyczne"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Wyzwania\\Wyzwania programistyczne"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misj"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celw"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych celw"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziomy\\Poziomy uytkownika"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Prototypy\\Prototypy w trakcie rozwijania"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imi gracza"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Opcje\\Preferencje"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misj od pocztku"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje biec misj"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan misj"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr do gry CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakocz\\Koczy gr CeeBot"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr do gry COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zakocz\\Koczy gr COLOBOT"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Wstecz \\Wraca do poprzedniego ekranu"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misj!"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urzdzenie\\Ustawienia sterownika i rozdzielczoci"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafika\\Ustawienia grafiki"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Gra\\Ustawienia gry"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Sterowanie\\Ustawienia klawiatury, joysticka i myszy"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Dwik\\Gono muzyki i dwikw gry"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Jednostka"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rozdzielczo"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Peny ekran\\Peny ekran lub tryb okna"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Zastosuj zmiany\\Aktywuje zmienione ustawienia"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Twj asystent"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Cienie\\Cienie na ziemi"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Znaki na ziemi\\Znaki na ziemi"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i brd na robotach i budynkach"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mga\\Mga"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie soneczne\\Promienie soneczne na niebie"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mgawice"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planety i gwiazdy\\Obiekty astronomiczne na niebie"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne owietlenie\\Ruchome rda wiata"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba czstek\\Wybuchy, kurz, odbicia, itp."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Gboko pola\\Maksymalna widoczno"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczegy\\Jako wizualna obiektw 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\Jako tekstur "); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Ilo elementw dekoracyjnych \\Ilo elementw czysto dekoracyjnych"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Czstki w interfejsie\\Para i iskry z silnikw w interfejsie"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\wiecce przyciski"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyjania funkcje przyciskw"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpoczciem i na zakoczenie misji"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Kocowy film\\Film na zakoczenie wicze"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogie\\Wasne strzay uszkadzaj Twoje obiekty"); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego krawdzi"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwrcenie myszy X\\Odwrcenie kierunkw przewijania w poziomie"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwrcenie myszy Y\\Odwrcenie kierunkw przewijania w pionie"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrzsy przy wybuchach\\Ekran trzsie si podczas wybuchw"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cie kursora myszy\\Dodaje cie kursorowi myszy"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wcicia\\Automatyczne wcicia podczas edycji programu"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Due wcicie\\2 lub 4 spacje wcicia na kady poziom zdefiniowany przez klamry"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Accs aux solutions\\Programme \"4: Solution\" dans les exercices"); - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standardowa kontrola\\Standardowe klawisze funkcyjne"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skr w lewo\\Obraca robota w lewo"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obr w prawo\\Obraca robota w prawo"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprzd\\Porusza do przodu"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do tyu"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W gr\\Zwiksza moc silnika"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W d\\Zmniejsza moc silnika"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmie kamer\\Przecza pomidzy kamer pokadow i ledzc"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Poprzedni obiekt\\Zaznacz poprzedni obiekt"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnie/upu, strzelaj, szukaj, itp.)"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bliej\\Przyblia kamer"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamer"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nastpny obiekt\\Zaznacza nastpny obiekt"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronaut\\Zaznacza astronaut"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zakocz\\Koczy biec misj lub wiczenie"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotyczce biecej misji"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podrcznik programowania\\Dostarcza szczegow pomoc w programowaniu"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. sw kluczowych\\Dokadniejsza pomoc na temat sw kluczowych"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomoci\\Pokazuje skd zostaa wysana ostatnia wiadomo"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Prdko 1,0x\\Prdko normalna"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Prdko 1,5x\\1,5 raza szybciej"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Prdko 2,0x\\Dwa razy szybciej"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Prdko 3,0x\\Trzy razy szybciej"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty dwikowe:\\Gono silnikw, gosw, strzaw, itp."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\Gono cieek dwikowych z pyty CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Dwik 3D\\Przestrzenne pozycjonowanie dwikw"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najnisza\\Minimalna jako grafiki (najwysza czstotliwo odwieania)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jako grafiki"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwysza\\Maksymalna jako grafiki (najnisza czstotliwo odwieania)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Brak dwikw"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna gono dwikw"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Uywaj joysticka\\Joystick lub klawiatura"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dostp do rozwizania\\Pokazuje rozwizanie (szczegowe instrukcje dotyczce misji)"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imi gracza"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Wybiera zaznaczonego gracza"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje biece imi gracza"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usu gracza\\Usuwa gracza z listy"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imi gracza"); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje biec misj"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon misj"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Lista zapisanych misji"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nazwa pliku:"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nazwa misji"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Fotografia"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usu\\Usuwa zaznaczony plik"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygld\\Wybierz swoj posta"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Anuluj"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygldu"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Gowa\\Twarz i wosy"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Skafander\\Skafander astronauty"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obr w lewo"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obr w prawo"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Czerwony"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Zielony"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Niebieski"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Czerwony"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Zielony"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Niebieski"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Twarz 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Twarz 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Twarz 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Twarz 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okularw"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Okulary 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Okulary 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Okulary 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Okulary 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Okulary 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Poprzednie zaznaczenie (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skr w lewo (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skr w prawo (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprzd (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Cofnij (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Gra (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "D (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnie lub upu (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnie lub upu (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..przed"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..za"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..ogniwo elektryczne"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotyczce misji (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odle, aby zakoczy misj"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalni"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowni"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabryk robotw"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Zbuduj warsztat"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hut"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie obronn"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Zbuduj centrum badawcze"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacj radarow"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabryk ogniw elektrycznych"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Zbuduj laboratorium"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowni atomow"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Zbuduj odgromnik"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacj przekanikow"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka czy teren jest paski"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flag"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usu flag"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Niebieskie flagi"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Czerwone flagi"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Zielone flagi"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\te flagi"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Fioletowe flagi"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter latajcy"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na koach"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Zbuduj transporter na nogach"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dziao latajce"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dziao na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dziao na koach"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dziao na nogach"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj latajce dziao organiczne"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dziao organiczne na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dziao organiczne na koach"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dziao organiczne na nogach"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz latajcy"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na gsienicach"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na koach"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Zbuduj szperacz na nogach"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Zbuduj robota uderzacza"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dziao fazowe"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Zbuduj robota recyklera"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota osaniajacza"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Zbuduj robota nurka"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na gsienicach"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze nad transporterem latajcym"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Rozpocznij prace badawcze nad robotem uderzaczem"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze nad dziaem"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze nad wie obronn"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze nad dziaem fazowym"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze nad robotem osaniaczem"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze nad energi atomow"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na nogach"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze nad dziaem organicznym"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powrt do pocztku"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Szukaj (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Uderz (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Strzelaj (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Odzyskaj (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz oson (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wycz oson (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasig osony"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Wykonaj zaznaczony program"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edytuj zaznaczony program"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Przecz przekanik SatCom w stan gotowoci"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Zniszcz budynek"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Poziom energii"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom osony"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temperatura silnika"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci pracuje..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insektw"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przesane informacje"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompas"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mapka"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powikszenie mapki"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camera to left"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camera to right"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camera nearest"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camera awayest"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Pomoc na temat zaznaczonego obiektu"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka rozwizanie"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Przecz roboty <-> budynki"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka zasig"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Relve le crayon"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Abaisse le crayon rouge"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Abaisse le crayon violet"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Dmarre l'enregistrement"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Poka miejsce"); - if ( num == EVENT_DT_END ) strcpy(text, "Kontynuuj"); - if ( num == EVENT_CMD ) strcpy(text, "Linia polecenia"); - if ( num == EVENT_SPEED ) strcpy(text, "Prdko gry"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Wstecz"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprzd"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Pocztek"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopiuj"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Wielko 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Wielko 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Wielko 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Wielko 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Wielko 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Rozkazy z Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Program dostarczony z Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiektw"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podrcznik programowania"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwizanie"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Zamyka edytor programu i powraca do gry"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Anuluj\\Pomija wszystkie zmiany"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nowy"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otwrz (Ctrl+O)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Zapisz (Ctrl+S)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Cofnij (Ctrl+Z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Wytnij (Ctrl+X)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopiuj (Ctrl+C)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Wklej (Ctrl+V)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Wielko czcionki"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Rozkazy (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podrcznik programowania (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompiluj"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Wykonaj/Zatrzymaj"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pauza/Kontynuuj"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Jeden krok"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "uraw przesuwalny"); - if ( num == OBJECT_BASE ) strcpy(text, "Statek kosmiczny"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Kopalnia"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robotw"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Warsztat"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Destroyer"); - if ( num == OBJECT_STATION ) strcpy(text, "Stacja energetyczna"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rud na tytan"); - if ( num == OBJECT_TOWER ) strcpy(text, "Wiea obronna"); - if ( num == OBJECT_NEST ) strcpy(text, "Gniazdo"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Centrum badawcze"); - if ( num == OBJECT_RADAR ) strcpy(text, "Stacja radarowa"); - if ( num == OBJECT_INFO ) strcpy(text, "Stacja przekanikowa informacji"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Laboratorium"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Elektrownia atomowa"); - if ( num == OBJECT_PARA ) strcpy(text, "Odgromnik"); - if ( num == OBJECT_SAFE ) strcpy(text, "Skrytka"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Centrum Kontroli Misji w Houston"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Cel"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Cel"); - if ( num == OBJECT_START ) strcpy(text, "Pocztek"); - if ( num == OBJECT_END ) strcpy(text, "Koniec"); - if ( num == OBJECT_STONE ) strcpy(text, "Ruda tytanu"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Ruda uranu"); - if ( num == OBJECT_BULLET ) strcpy(text, "Materia organiczna"); - if ( num == OBJECT_METAL ) strcpy(text, "Tytan"); - if ( num == OBJECT_POWER ) strcpy(text, "Ogniwo elektryczne"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Atomowe ogniwa elektryczne"); - if ( num == OBJECT_BBOX ) strcpy(text, "Czarna skrzynka"); - if ( num == OBJECT_KEYa ) strcpy(text, "Klucz A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Klucz B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Klucz C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Klucz D"); - if ( num == OBJECT_TNT ) strcpy(text, "Materiay wybuchowe"); - if ( num == OBJECT_BOMB ) strcpy(text, "Mina"); - if ( num == OBJECT_BAG ) strcpy(text, "Zestaw przetrwania"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Punkt kontrolny"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Niebieska flaga"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Czerwona flaga"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Zielona flaga"); - if ( num == OBJECT_FLAGy ) strcpy(text, "ta flaga"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Fioletowa flaga"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "rdo energii (miejsce na elektrowni)"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Zoe uranu (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalni)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalni)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Zoe tytanu (miejsce na kopalni)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter latajcy"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na gsienicach"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na koach"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter na nogach"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dziao latajce"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dziao na gsienicach"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dziao na koach"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Dziao na nogach"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Latajce dziao organiczne"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Dziao organiczne na gsienicach"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dziao organiczne na koach"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Dziao organiczne na nogach"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz latajcy"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na gsienicach"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na koach"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Szperacz na nogach"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Uderzacz"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Dziao fazowe"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Recykler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Osaniacz"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot nurek"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Robot cel"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Drawer bot"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Inynier"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Krlowa Obcych"); - if ( num == OBJECT_ANT ) strcpy(text, "Mrwka"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Pajk"); - if ( num == OBJECT_BEE ) strcpy(text, "Osa"); - if ( num == OBJECT_WORM ) strcpy(text, "Robal"); - if ( num == OBJECT_EGG ) strcpy(text, "Jajo"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Odpady"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Ruiny statku kosmicznego"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Ruiny statku kosmicznego"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Pozostaoci z misji Apollo"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksiycowy"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Bd"); - if ( num == ERR_CMD ) strcpy(text, "Nieznane polecenie"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "Gra CeeBot nie jest zainstalowana."); - if ( num == ERR_NOCD ) strcpy(text, "W dysk CD z gr CeeBot\ni uruchom gr jeszcze raz."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "Gra COLOBOT nie jest zainstalowana."); - if ( num == ERR_NOCD ) strcpy(text, "W dysk CD z gr COLOBOT\ni uruchom gr jeszcze raz."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mona nie wicej przedmiotw"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Nie ma nic do podniesienia"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zajte"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Brak innego robota"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie moesz przenosi przedmiotw radioaktywnych"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie moesz przenosi przedmiotw pod wod"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nie ma nic do upuszczenia"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemoliwe pod wod"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za mao energii"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Tytan za daleko"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Tytan za blisko"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobliu"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczajco paska"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za mao paskiego terenu"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zajte"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Za blisko statku kosmicznego"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Za blisko budynku"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za mao energii"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Nieodpowiedni teren"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Budynek za blisko"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Obiekt za blisko"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za mao energii"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nie ma niczego do odzysku"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wicej energii"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Bd w poleceniu ruchu"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Obiekt nieznany"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedostpne"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedostpne"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zajte"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za mao energii"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Brak rudy tytanu do przetopienia"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma adnej rudy"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wicej energii"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za mao energii"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Nieodpowiedni rodzaj ogniw"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta ju wykonany"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci za mao energii"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Brak tytanu do przetworzenia"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Przetwarza jedynie tytan"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Drzwi zablokowane przez robota lub inny obiekt "); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz by na statku kosmicznym aby nim odlecie"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Nie ma niczego do zanalizowania"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materi organiczn"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zostaa ju wykonana"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci za mao energii"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Brak uranu do przetworzenia"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Przetwarza jedynie uran"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "Brak tytanu"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Obiekt za blisko"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zajte"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma adnej stacji przekanikowej w zasigu"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program zawirusowany"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Zainfekowane wirusem, chwilowo niesprawne"); - if ( num == ERR_VEH_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wicej energii"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemoliwe podczas lotu"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemoliwe podczas pywania"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemoliwe podczas ruchu"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemoliwe podczas przenoszenia przedmiotu"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za duo flag w tym kolorze (maksymalnie 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniejcej flagi"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobliu"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wypeniona (nacinij \\key help; aby uzyska szczegy)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot zniszczony"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Budynek zniszczony"); - if ( num == ERR_TOOMANY ) strcpy(text, "Nie mona tego utworzy, za duo obiektw"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "It misses \"%s\" in this exercise"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Do not use in this exercise"); - - if ( num == INFO_BUILD ) strcpy(text, "Budowa zakoczona"); - if ( num == INFO_CONVERT ) strcpy(text, "Tytan dostpny"); - if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zakoczony"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dostpne plany tranporterw na gsienicach"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Moesz lata uywajc klawiszy (\\key gup;) oraz (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dostpne plany robota uderzacza"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dostpne plany dziaa"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dostpne plany wiey obronnej"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dostpne plany dziaa fazowego"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dostpne plany robota osaniacza"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dostpne plany elektrowni atomowej"); - if ( num == INFO_FACTORY ) strcpy(text, "Dostpny nowy robot"); - if ( num == INFO_LABO ) strcpy(text, "Analiza wykonana"); - if ( num == INFO_ENERGY ) strcpy(text, "Wytworzono ogniwo elektryczne"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Wytworzono atomowe ogniwo elektryczne"); - if ( num == INFO_FINDING ) strcpy(text, "Znaleziono uyteczny przedmiot"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowni"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalni"); - if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wypeniona >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powioda si >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powioda si >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Bieca misja zapisana"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Przekroczono punkt kontrolny"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Krlowa Obcych zostaa zabita"); - if ( num == INFO_DELETEANT ) strcpy(text, "Mrwka miertelnie raniona"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Osa miertelnie raniona"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Robal miertelnie raniony"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Pajk miertelnie raniony"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Nacinij klawisz \\key help; aby wywietli rozkazy na przekaniku SatCom"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Bd"); - if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwierajcego"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykajcego"); - if ( num == TX_NOTBOOL ) strcpy(text, "Wyraenie musi zwrci warto logiczn"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zostaa zadeklarowana"); - if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemoliwe"); - if ( num == TX_ENDOF ) strcpy(text, "Brak rednika na kocu wiersza"); - if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" na zewntrz bloku ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Polecenie po kocowej klamrze zamykajcej"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Brak koca bloku"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" bez wystpienia ""if"" "); - if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwierajcej");//dbut d'un bloc attendu? - if ( num == TX_BADTYPE ) strcpy(text, "Zy typ dla przypisania"); - if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie moe by zadeklarowana dwukrotnie"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operatorw"); - if ( num == TX_UNDEFCALL ) strcpy(text, "Funkcja nieznana"); - if ( num == TX_MISDOTS ) strcpy(text, "Brak znaku "" : "); - if ( num == TX_WHILE ) strcpy(text, "Brak kluczowego sowa ""while"); - if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" na zewntrz ptli"); - if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wystpi ""for"", ""while"", ""do"" lub ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette tiquette n'existe pas - if ( num == TX_NOCASE ) strcpy(text, "Brak polecenia ""case"); - if ( num == TX_BADNUM ) strcpy(text, "Brak liczby"); - if ( num == TX_VOID ) strcpy(text, "Pusty parametr"); - if ( num == TX_NOTYP ) strcpy(text, "Brak deklaracji typu"); - if ( num == TX_NOVAR ) strcpy(text, "Brak nazwy zmiennej"); - if ( num == TX_NOFONC ) strcpy(text, "Brakujca nazwa funkcji"); - if ( num == TX_OVERPARAM ) strcpy(text, "Za duo parametrw"); - if ( num == TX_REDEF ) strcpy(text, "Funkcja ju istnieje"); - if ( num == TX_LOWPARAM ) strcpy(text, "Brak wymaganego parametru"); - if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametrw tego typu"); - if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametrw"); - if ( num == TX_NOITEM ) strcpy(text, "To nie jest obiekt tej klasy"); - if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest czonkiem klasy"); - if ( num == TX_NOCONST ) strcpy(text, "Brak odpowiedniego konstruktora"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju istnieje"); - if ( num == TX_CLBRK ) strcpy(text, "Brak "" ] """); - if ( num == TX_RESERVED ) strcpy(text, "Sowo zarezerwowane jzyka CBOT"); - if ( num == TX_BADNEW ) strcpy(text, "Zy argument dla funkcji ""new"""); - if ( num == TX_OPBRK ) strcpy(text, "Oczekiwane "" [ """); - if ( num == TX_BADSTRING ) strcpy(text, "Brak acucha"); - if ( num == TX_BADINDEX ) strcpy(text, "Nieprawidowy typ indeksu"); - if ( num == TX_PRIVATE ) strcpy(text, "Element prywatny"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Wymagany publiczny"); - if ( num == TX_DIVZERO ) strcpy(text, "Dzielenie przez zero"); - if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zostaa zainicjalizowana"); - if ( num == TX_BADTHROW ) strcpy(text, "Warto ujemna odrzucona przez ""throw""");//C'est quoi, a? - if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwrcia adnej wartoci "); - if ( num == TX_NORUN ) strcpy(text, "adna funkcja nie dziaa"); - if ( num == TX_NOCALL ) strcpy(text, "Odwoanie do nieznanej funkcji"); - if ( num == TX_NOCLASS ) strcpy(text, "Taka klasa nie istnieje"); - if ( num == TX_NULLPT ) strcpy(text, "Obiekt nieznany"); - if ( num == TX_OPNAN ) strcpy(text, "Dziaanie niemoliwe z wartoci ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Dostp poza tablic"); - if ( num == TX_STACKOVER ) strcpy(text, "Przepenienie stosu"); - if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawidowy obiekt"); - if ( num == TX_FILEOPEN ) strcpy(text, "Nie mona otworzy pliku"); - if ( num == TX_NOTOPEN ) strcpy(text, "Plik nie jest otwarty"); - if ( num == TX_ERRREAD ) strcpy(text, "Bd odczytu"); - if ( num == TX_ERRWRITE ) strcpy(text, "Bd zapisu"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< brak >"); - if ( num == VK_LEFT ) strcpy(text, "Strzaka w lewo"); - if ( num == VK_RIGHT ) strcpy(text, "Strzaka w prawo"); - if ( num == VK_UP ) strcpy(text, "Strzaka w gr"); - if ( num == VK_DOWN ) strcpy(text, "Strzaka w d"); - if ( num == VK_CANCEL ) strcpy(text, "Ctrl-break"); - if ( num == VK_BACK ) strcpy(text, "<--"); - if ( num == VK_TAB ) strcpy(text, "Tab"); - if ( num == VK_CLEAR ) strcpy(text, "Delete"); - if ( num == VK_RETURN ) strcpy(text, "Enter"); - if ( num == VK_SHIFT ) strcpy(text, "Shift"); - if ( num == VK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == VK_MENU ) strcpy(text, "Alt"); - if ( num == VK_PAUSE ) strcpy(text, "Pause"); - if ( num == VK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == VK_ESCAPE ) strcpy(text, "Esc"); - if ( num == VK_SPACE ) strcpy(text, "Spacja"); - if ( num == VK_PRIOR ) strcpy(text, "Page Up"); - if ( num == VK_NEXT ) strcpy(text, "Page Down"); - if ( num == VK_END ) strcpy(text, "End"); - if ( num == VK_HOME ) strcpy(text, "Home"); - if ( num == VK_SELECT ) strcpy(text, "Zaznacz"); - if ( num == VK_EXECUTE ) strcpy(text, "Wykonaj"); - if ( num == VK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == VK_INSERT ) strcpy(text, "Insert"); - if ( num == VK_DELETE ) strcpy(text, "Delete"); - if ( num == VK_HELP ) strcpy(text, "Pomoc"); - if ( num == VK_LWIN ) strcpy(text, "Lewy klawisz Windows"); - if ( num == VK_RWIN ) strcpy(text, "Prawy klawisz Windows"); - if ( num == VK_APPS ) strcpy(text, "Klawisz menu kontekstowego"); - if ( num == VK_NUMPAD0 ) strcpy(text, "Klaw. Num. 0"); - if ( num == VK_NUMPAD1 ) strcpy(text, "Klaw. Num. 1"); - if ( num == VK_NUMPAD2 ) strcpy(text, "Klaw. Num. 2"); - if ( num == VK_NUMPAD3 ) strcpy(text, "Klaw. Num. 3"); - if ( num == VK_NUMPAD4 ) strcpy(text, "Klaw. Num. 4"); - if ( num == VK_NUMPAD5 ) strcpy(text, "Klaw. Num. 5"); - if ( num == VK_NUMPAD6 ) strcpy(text, "Klaw. Num. 6"); - if ( num == VK_NUMPAD7 ) strcpy(text, "Klaw. Num. 7"); - if ( num == VK_NUMPAD8 ) strcpy(text, "Klaw. Num. 8"); - if ( num == VK_NUMPAD9 ) strcpy(text, "Klaw. Num. 9"); - if ( num == VK_MULTIPLY ) strcpy(text, "Klaw. Num. *"); - if ( num == VK_ADD ) strcpy(text, "Klaw. Num. +"); - if ( num == VK_SEPARATOR ) strcpy(text, "Klaw. Num. separator"); - if ( num == VK_SUBTRACT ) strcpy(text, "Klaw. Num. -"); - if ( num == VK_DECIMAL ) strcpy(text, "Klaw. Num. ."); - if ( num == VK_DIVIDE ) strcpy(text, "Klaw. Num. /"); - if ( num == VK_F1 ) strcpy(text, "F1"); - if ( num == VK_F2 ) strcpy(text, "F2"); - if ( num == VK_F3 ) strcpy(text, "F3"); - if ( num == VK_F4 ) strcpy(text, "F4"); - if ( num == VK_F5 ) strcpy(text, "F5"); - if ( num == VK_F6 ) strcpy(text, "F6"); - if ( num == VK_F7 ) strcpy(text, "F7"); - if ( num == VK_F8 ) strcpy(text, "F8"); - if ( num == VK_F9 ) strcpy(text, "F9"); - if ( num == VK_F10 ) strcpy(text, "F10"); - if ( num == VK_F11 ) strcpy(text, "F11"); - if ( num == VK_F12 ) strcpy(text, "F12"); - if ( num == VK_F13 ) strcpy(text, "F13"); - if ( num == VK_F14 ) strcpy(text, "F14"); - if ( num == VK_F15 ) strcpy(text, "F15"); - if ( num == VK_F16 ) strcpy(text, "F16"); - if ( num == VK_F17 ) strcpy(text, "F17"); - if ( num == VK_F18 ) strcpy(text, "F18"); - if ( num == VK_F19 ) strcpy(text, "F19"); - if ( num == VK_F20 ) strcpy(text, "F20"); - if ( num == VK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == VK_SCROLL ) strcpy(text, "Scroll Lock"); - if ( num == VK_ATTN ) strcpy(text, "Attn"); - if ( num == VK_CRSEL ) strcpy(text, "CrSel"); - if ( num == VK_EXSEL ) strcpy(text, "ExSel"); - if ( num == VK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == VK_PLAY ) strcpy(text, "Graj"); - if ( num == VK_ZOOM ) strcpy(text, "Powikszenie"); - if ( num == VK_PA1 ) strcpy(text, "PA1"); - if ( num == VK_OEM_CLEAR ) strcpy(text, "Wyczy"); - if ( num == VK_BUTTON1 ) strcpy(text, "Przycisk 1"); - if ( num == VK_BUTTON2 ) strcpy(text, "Przycisk 2"); - if ( num == VK_BUTTON3 ) strcpy(text, "Przycisk 3"); - if ( num == VK_BUTTON4 ) strcpy(text, "Przycisk 4"); - if ( num == VK_BUTTON5 ) strcpy(text, "Przycisk 5"); - if ( num == VK_BUTTON6 ) strcpy(text, "Przycisk 6"); - if ( num == VK_BUTTON7 ) strcpy(text, "Przycisk 7"); - if ( num == VK_BUTTON8 ) strcpy(text, "Przycisk 8"); - if ( num == VK_BUTTON9 ) strcpy(text, "Przycisk 9"); - if ( num == VK_BUTTON10 ) strcpy(text, "Przycisk 10"); - if ( num == VK_BUTTON11 ) strcpy(text, "Przycisk 11"); - if ( num == VK_BUTTON12 ) strcpy(text, "Przycisk 12"); - if ( num == VK_BUTTON13 ) strcpy(text, "Przycisk 13"); - if ( num == VK_BUTTON14 ) strcpy(text, "Przycisk 14"); - if ( num == VK_BUTTON15 ) strcpy(text, "Przycisk 15"); - if ( num == VK_BUTTON16 ) strcpy(text, "Przycisk 16"); - if ( num == VK_BUTTON17 ) strcpy(text, "Przycisk 17"); - if ( num == VK_BUTTON18 ) strcpy(text, "Przycisk 18"); - if ( num == VK_BUTTON19 ) strcpy(text, "Przycisk 19"); - if ( num == VK_BUTTON20 ) strcpy(text, "Przycisk 20"); - if ( num == VK_BUTTON21 ) strcpy(text, "Przycisk 21"); - if ( num == VK_BUTTON22 ) strcpy(text, "Przycisk 22"); - if ( num == VK_BUTTON23 ) strcpy(text, "Przycisk 23"); - if ( num == VK_BUTTON24 ) strcpy(text, "Przycisk 24"); - if ( num == VK_BUTTON25 ) strcpy(text, "Przycisk 25"); - if ( num == VK_BUTTON26 ) strcpy(text, "Przycisk 26"); - if ( num == VK_BUTTON27 ) strcpy(text, "Przycisk 27"); - if ( num == VK_BUTTON28 ) strcpy(text, "Przycisk 28"); - if ( num == VK_BUTTON29 ) strcpy(text, "Przycisk 29"); - if ( num == VK_BUTTON30 ) strcpy(text, "Przycisk 30"); - if ( num == VK_BUTTON31 ) strcpy(text, "Przycisk 31"); - if ( num == VK_BUTTON32 ) strcpy(text, "Przycisk 32"); - if ( num == VK_WHEELUP ) strcpy(text, "Kko w gr"); - if ( num == VK_WHEELDOWN ) strcpy(text, "Kko w d"); - } -#endif - - return ( text[0] != 0 ); -} - - diff --git a/src/common/restext.h b/src/common/restext.h index ac61d0b..624803b 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -37,14 +37,19 @@ enum ResType }; -static CD3DEngine* g_engine = 0; -static char g_gamerName[100]; - extern void SetEngine(CD3DEngine *engine); extern void SetGlobalGamerName(char *name); extern bool SearchKey(char *cmd, KeyRank &key); -extern void PutKeyName(char* dst, char* src); extern bool GetResource(ResType type, int num, char* text); -extern bool GetResourceBase(ResType type, int num, char* text); - +extern const char * const strings_text[]; +extern const char * const strings_event[]; +extern const char * const strings_object[]; +extern const char * const strings_err[]; +extern const char * const strings_cbot[]; + +extern const int strings_text_len; +extern const int strings_event_len; +extern const int strings_object_len; +extern const int strings_err_len; +extern const int strings_cbot_len; diff --git a/src/common/restext_strings.c b/src/common/restext_strings.c new file mode 100644 index 0000000..8e9471b --- /dev/null +++ b/src/common/restext_strings.c @@ -0,0 +1,776 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + +#include "common/restext_ids.h" +#include "common/event_ids.h" +#include "object/object_ids.h" +#include "common/error_ids.h" +#include "CBot/resource.h" + +const char * const strings_text[] = +{ +#if _FULL + [RT_VERSION_ID] = "1.18 /e", +#endif +#if _NET + [RT_VERSION_ID] = "CeeBot-A 1.18", +#endif +#if _SCHOOL & _EDU +#if _TEEN + [RT_VERSION_ID] = "CeeBot-Teen EDU 1.18", +#else + [RT_VERSION_ID] = "CeeBot-A EDU 1.18", +#endif +#endif +#if _SCHOOL & _PERSO +#if _TEEN + [RT_VERSION_ID] = "CeeBot-Teen PERSO 1.18", +#else + [RT_VERSION_ID] = "CeeBot-A PERSO 1.18", +#endif +#endif +#if _SCHOOL & _CEEBOTDEMO +#if _TEEN + [RT_VERSION_ID] = "CeeBot-Teen DEMO 1.18", +#else + [RT_VERSION_ID] = "CeeBot-A DEMO 1.18", +#endif +#endif +#if _DEMO + [RT_VERSION_ID] = "Demo 1.18 /e", +#endif + [RT_DISINFO_TITLE] = "SatCom", + [RT_WINDOW_MAXIMIZED] = "Maximize", + [RT_WINDOW_MINIMIZED] = "Minimize", + [RT_WINDOW_STANDARD] = "Normal size", + [RT_WINDOW_CLOSE] = "Close", + + [RT_STUDIO_TITLE] = "Program editor", + [RT_SCRIPT_NEW] = "New", + [RT_NAME_DEFAULT] = "Player", + [RT_IO_NEW] = "New ...", + [RT_KEY_OR] = " or ", + +#if _NEWLOOK + [RT_TITLE_BASE] = "CeeBot", + [RT_TITLE_INIT] = "CeeBot", +#else + [RT_TITLE_BASE] = "COLOBOT", + [RT_TITLE_INIT] = "COLOBOT", +#endif + [RT_TITLE_TRAINER] = "Programming exercises", + [RT_TITLE_DEFI] = "Challenges", + [RT_TITLE_MISSION] = "Missions", + [RT_TITLE_FREE] = "Free game", + [RT_TITLE_TEEN] = "Free game", + [RT_TITLE_USER] = "User levels", + [RT_TITLE_PROTO] = "Prototypes", + [RT_TITLE_SETUP] = "Options", + [RT_TITLE_NAME] = "Player's name", + [RT_TITLE_PERSO] = "Customize your appearance", + [RT_TITLE_WRITE] = "Save the current mission", + [RT_TITLE_READ] = "Load a saved mission", + + [RT_PLAY_CHAPt] = " Chapters:", + [RT_PLAY_CHAPd] = " Chapters:", + [RT_PLAY_CHAPm] = " Planets:", + [RT_PLAY_CHAPf] = " Planets:", + [RT_PLAY_CHAPu] = " User levels:", + [RT_PLAY_CHAPp] = " Planets:", + [RT_PLAY_CHAPte] = " Chapters:", + [RT_PLAY_LISTt] = " Exercises in the chapter:", + [RT_PLAY_LISTd] = " Challenges in the chapter:", + [RT_PLAY_LISTm] = " Missions on this planet:", + [RT_PLAY_LISTf] = " Free game on this planet:", + [RT_PLAY_LISTu] = " Missions on this level:", + [RT_PLAY_LISTp] = " Prototypes on this planet:", + [RT_PLAY_LISTk] = " Free game on this chapter:", + [RT_PLAY_RESUME] = " Summary:", + + [RT_SETUP_DEVICE] = " Drivers:", + [RT_SETUP_MODE] = " Resolution:", + [RT_SETUP_KEY1] = "1) First click on the key you want to redefine.", + [RT_SETUP_KEY2] = "2) Then press the key you want to use instead.", + + [RT_PERSO_FACE] = "Face type:", + [RT_PERSO_GLASSES] = "Eyeglasses:", + [RT_PERSO_HAIR] = "Hair color:", + [RT_PERSO_COMBI] = "Suit color:", + [RT_PERSO_BAND] = "Strip color:", + +#if _NEWLOOK + [RT_DIALOG_QUIT] = "Do you want to quit CeeBot ?", + [RT_DIALOG_TITLE] = "CeeBot", + [RT_DIALOG_YESQUIT] = "Quit\\Quit CeeBot", +#else + [RT_DIALOG_QUIT] = "Do you want to quit COLOBOT ?", + [RT_DIALOG_TITLE] = "COLOBOT", + [RT_DIALOG_YESQUIT] = "Quit\\Quit COLOBOT", +#endif + [RT_DIALOG_ABORT] = "Quit the mission?", + [RT_DIALOG_YES] = "Abort\\Abort the current mission", + [RT_DIALOG_NO] = "Continue\\Continue the current mission", + [RT_DIALOG_NOQUIT] = "Continue\\Continue the game", + [RT_DIALOG_DELOBJ] = "Do you really want to destroy the selected building?", + [RT_DIALOG_DELGAME] = "Do you want to delete %s's saved games? ", + [RT_DIALOG_YESDEL] = "Delete", + [RT_DIALOG_NODEL] = "Cancel", + [RT_DIALOG_LOADING] = "LOADING", + + [RT_STUDIO_LISTTT] = "Keyword help(\\key cbot;)", + [RT_STUDIO_COMPOK] = "Compilation ok (0 errors)", + [RT_STUDIO_PROGSTOP] = "Program finished", + + [RT_SATCOM_LIST] = "\\b;List of objects\n", + [RT_SATCOM_BOT] = "\\b;Robots\n", + [RT_SATCOM_BUILDING] = "\\b;Buildings\n", + [RT_SATCOM_FRET] = "\\b;Moveable objects\n", + [RT_SATCOM_ALIEN] = "\\b;Aliens\n", + [RT_SATCOM_NULL] = "\\c; (none)\\n;\n", + [RT_SATCOM_ERROR1] = "\\b;Error\n", + [RT_SATCOM_ERROR2] = "The list is only available if a \\l;radar station\\u object\\radar; is working.\n", + + [RT_IO_OPEN] = "Open", + [RT_IO_SAVE] = "Save", + [RT_IO_LIST] = "Folder: %s", + [RT_IO_NAME] = "Name:", + [RT_IO_DIR] = "Folder:", + [RT_IO_PRIVATE] = "Private\\Private folder", + [RT_IO_PUBLIC] = "Public\\Common folder", + + [RT_GENERIC_DEV1] = "Developed by :", + [RT_GENERIC_DEV2] = "www.epsitec.com", + [RT_GENERIC_EDIT1] = " ", + [RT_GENERIC_EDIT2] = " ", + + [RT_INTERFACE_REC] = "Recorder" +}; + +const char * const strings_event[] = +{ + [EVENT_BUTTON_OK] = "OK", + [EVENT_BUTTON_CANCEL] = "Cancel", + [EVENT_BUTTON_NEXT] = "Next", + [EVENT_BUTTON_PREV] = "Previous", + [EVENT_BUTTON_QUIT] = "Menu (\\key quit;)", + + [EVENT_DIALOG_OK] = "OK", + [EVENT_DIALOG_CANCEL] = "Cancel", + + [EVENT_INTERFACE_TRAINER] = "Exercises\\Programming exercises", + [EVENT_INTERFACE_DEFI] = "Challenges\\Programming challenges", + [EVENT_INTERFACE_MISSION] = "Missions\\Select mission", + [EVENT_INTERFACE_FREE] = "Free game\\Free game without a specific goal", + [EVENT_INTERFACE_TEEN] = "Free game\\Free game without a specific goal", + [EVENT_INTERFACE_USER] = "User\\User levels", + [EVENT_INTERFACE_PROTO] = "Proto\\Prototypes under development", + [EVENT_INTERFACE_NAME] = "New player\\Choose player's name", + [EVENT_INTERFACE_SETUP] = "Options\\Preferences", + [EVENT_INTERFACE_AGAIN] = "Restart\\Restart the mission from the beginning", + [EVENT_INTERFACE_WRITE] = "Save\\Save the current mission ", + [EVENT_INTERFACE_READ] = "Load\\Load a saved mission", +#if _NEWLOOK + [EVENT_INTERFACE_ABORT] = "\\Return to CeeBot", + [EVENT_INTERFACE_QUIT] = "Quit\\Quit CeeBot", +#else + [EVENT_INTERFACE_ABORT] = "\\Return to COLOBOT", + [EVENT_INTERFACE_QUIT] = "Quit\\Quit COLOBOT", +#endif + [EVENT_INTERFACE_BACK] = "<< Back \\Back to the previous screen", + [EVENT_INTERFACE_PLAY] = "Play\\Start mission!", + [EVENT_INTERFACE_SETUPd] = "Device\\Driver and resolution settings", + [EVENT_INTERFACE_SETUPg] = "Graphics\\Graphics settings", + [EVENT_INTERFACE_SETUPp] = "Game\\Game settings", + [EVENT_INTERFACE_SETUPc] = "Controls\\Keyboard, joystick and mouse settings", + [EVENT_INTERFACE_SETUPs] = "Sound\\Music and game sound volume", + [EVENT_INTERFACE_DEVICE] = "Unit", + [EVENT_INTERFACE_RESOL] = "Resolution", + [EVENT_INTERFACE_FULL] = "Full screen\\Full screen or window mode", + [EVENT_INTERFACE_APPLY] = "Apply changes\\Activates the changed settings", + + [EVENT_INTERFACE_TOTO] = "Robbie\\Your assistant", + [EVENT_INTERFACE_SHADOW] = "Shadows\\Shadows on the ground", + [EVENT_INTERFACE_GROUND] = "Marks on the ground\\Marks on the ground", + [EVENT_INTERFACE_DIRTY] = "Dust\\Dust and dirt on bots and buildings", + [EVENT_INTERFACE_FOG] = "Fog\\Fog", + [EVENT_INTERFACE_LENS] = "Sunbeams\\Sunbeams in the sky", + [EVENT_INTERFACE_SKY] = "Sky\\Clouds and nebulae", + [EVENT_INTERFACE_PLANET] = "Planets and stars\\Astronomical objects in the sky", + [EVENT_INTERFACE_LIGHT] = "Dynamic lighting\\Mobile light sources", + [EVENT_INTERFACE_PARTI] = "Number of particles\\Explosions, dust, reflections, etc.", + [EVENT_INTERFACE_CLIP] = "Depth of field\\Maximum visibility", + [EVENT_INTERFACE_DETAIL] = "Details\\Visual quality of 3D objects", + [EVENT_INTERFACE_TEXTURE] = "Textures\\Quality of textures ", + [EVENT_INTERFACE_GADGET] = "Num of decorative objects\\Number of purely ornamental objects", + [EVENT_INTERFACE_RAIN] = "Particles in the interface\\Steam clouds and sparks in the interface", + [EVENT_INTERFACE_GLINT] = "Reflections on the buttons \\Shiny buttons", + [EVENT_INTERFACE_TOOLTIP] = "Help balloons\\Explain the function of the buttons", + [EVENT_INTERFACE_MOVIES] = "Film sequences\\Films before and after the missions", + [EVENT_INTERFACE_NICERST] = "Exit film\\Film at the exit of exercises", + [EVENT_INTERFACE_HIMSELF] = "Friendly fire\\Your shooting can damage your own objects ", + [EVENT_INTERFACE_SCROLL] = "Scrolling\\Scrolling when the mouse touches right or left border", + [EVENT_INTERFACE_INVERTX] = "Mouse inversion X\\Inversion of the scrolling direction on the X axis", + [EVENT_INTERFACE_INVERTY] = "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis", + [EVENT_INTERFACE_EFFECT] = "Quake at explosions\\The screen shakes at explosions", + [EVENT_INTERFACE_MOUSE] = "Mouse shadow\\Gives the mouse a shadow", + [EVENT_INTERFACE_EDITMODE] = "Automatic indent\\When program editing", + [EVENT_INTERFACE_EDITVALUE] = "Big indent\\Indent 2 or 4 spaces per level defined by braces", + [EVENT_INTERFACE_SOLUCE4] = "Access to solutions\\Show program \"4: Solution\" in the exercises", + + [EVENT_INTERFACE_KDEF] = "Standard controls\\Standard key functions", + [EVENT_INTERFACE_KLEFT] = "Turn left\\turns the bot to the left", + [EVENT_INTERFACE_KRIGHT] = "Turn right\\turns the bot to the right", + [EVENT_INTERFACE_KUP] = "Forward\\Moves forward", + [EVENT_INTERFACE_KDOWN] = "Backward\\Moves backward", + [EVENT_INTERFACE_KGUP] = "Climb\\Increases the power of the jet", + [EVENT_INTERFACE_KGDOWN] = "Descend\\Reduces the power of the jet", + [EVENT_INTERFACE_KCAMERA] = "Change camera\\Switches between onboard camera and following camera", + [EVENT_INTERFACE_KDESEL] = "Previous object\\Selects the previous object", + [EVENT_INTERFACE_KACTION] = "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)", + [EVENT_INTERFACE_KNEAR] = "Camera closer\\Moves the camera forward", + [EVENT_INTERFACE_KAWAY] = "Camera back\\Moves the camera backward", + [EVENT_INTERFACE_KNEXT] = "Next object\\Selects the next object", + [EVENT_INTERFACE_KHUMAN] = "Select the astronaut\\Selects the astronaut", + [EVENT_INTERFACE_KQUIT] = "Quit\\Quit the current mission or exercise", + [EVENT_INTERFACE_KHELP] = "Instructions\\Shows the instructions for the current mission", + [EVENT_INTERFACE_KPROG] = "Programming help\\Gives more detailed help with programming", + [EVENT_INTERFACE_KCBOT] = "Key word help\\More detailed help about key words", + [EVENT_INTERFACE_KVISIT] = "Origin of last message\\Shows where the last message was sent from", + [EVENT_INTERFACE_KSPEED10] = "Speed 1.0x\\Normal speed", + [EVENT_INTERFACE_KSPEED15] = "Speed 1.5x\\1.5 times faster", + [EVENT_INTERFACE_KSPEED20] = "Speed 2.0x\\Double speed", + [EVENT_INTERFACE_KSPEED30] = "Speed 3.0x\\Three times faster", + + [EVENT_INTERFACE_VOLSOUND] = "Sound effects:\\Volume of engines, voice, shooting, etc.", + [EVENT_INTERFACE_VOLMUSIC] = "Background sound :\\Volume of audio tracks on the CD", + [EVENT_INTERFACE_SOUND3D] = "3D sound\\3D positioning of the sound", + + [EVENT_INTERFACE_MIN] = "Lowest\\Minimum graphic quality (highest frame rate)", + [EVENT_INTERFACE_NORM] = "Normal\\Normal graphic quality", + [EVENT_INTERFACE_MAX] = "Highest\\Highest graphic quality (lowest frame rate)", + + [EVENT_INTERFACE_SILENT] = "Mute\\No sound", + [EVENT_INTERFACE_NOISY] = "Normal\\Normal sound volume", + + [EVENT_INTERFACE_JOYSTICK] = "Use a joystick\\Joystick or keyboard", + [EVENT_INTERFACE_SOLUCE] = "Access to solution\\Shows the solution (detailed instructions for missions)", + + [EVENT_INTERFACE_NEDIT] = "\\New player name", + [EVENT_INTERFACE_NOK] = "OK\\Choose the selected player", + [EVENT_INTERFACE_NCANCEL] = "Cancel\\Keep current player name", + [EVENT_INTERFACE_NDELETE] = "Delete player\\Deletes the player from the list", + [EVENT_INTERFACE_NLABEL] = "Player name", + + [EVENT_INTERFACE_IOWRITE] = "Save\\Saves the current mission", + [EVENT_INTERFACE_IOREAD] = "Load\\Loads the selected mission", + [EVENT_INTERFACE_IOLIST] = "List of saved missions", + [EVENT_INTERFACE_IOLABEL] = "Filename:", + [EVENT_INTERFACE_IONAME] = "Mission name", + [EVENT_INTERFACE_IOIMAGE] = "Photography", + [EVENT_INTERFACE_IODELETE] = "Delete\\Deletes the selected file", + + [EVENT_INTERFACE_PERSO] = "Appearance\\Choose your appearance", + [EVENT_INTERFACE_POK] = "OK", + [EVENT_INTERFACE_PCANCEL] = "Cancel", + [EVENT_INTERFACE_PDEF] = "Standard\\Standard appearance settings", + [EVENT_INTERFACE_PHEAD] = "Head\\Face and hair", + [EVENT_INTERFACE_PBODY] = "Suit\\Astronaut suit", + [EVENT_INTERFACE_PLROT] = "\\Turn left", + [EVENT_INTERFACE_PRROT] = "\\Turn right", + [EVENT_INTERFACE_PCRa] = "Red", + [EVENT_INTERFACE_PCGa] = "Green", + [EVENT_INTERFACE_PCBa] = "Blue", + [EVENT_INTERFACE_PCRb] = "Red", + [EVENT_INTERFACE_PCGb] = "Green", + [EVENT_INTERFACE_PCBb] = "Blue", + [EVENT_INTERFACE_PFACE1] = "\\Face 1", + [EVENT_INTERFACE_PFACE2] = "\\Face 4", + [EVENT_INTERFACE_PFACE3] = "\\Face 3", + [EVENT_INTERFACE_PFACE4] = "\\Face 2", + [EVENT_INTERFACE_PGLASS0] = "\\No eyeglasses", + [EVENT_INTERFACE_PGLASS1] = "\\Eyeglasses 1", + [EVENT_INTERFACE_PGLASS2] = "\\Eyeglasses 2", + [EVENT_INTERFACE_PGLASS3] = "\\Eyeglasses 3", + [EVENT_INTERFACE_PGLASS4] = "\\Eyeglasses 4", + [EVENT_INTERFACE_PGLASS5] = "\\Eyeglasses 5", + + [EVENT_OBJECT_DESELECT] = "Previous selection (\\key desel;)", + [EVENT_OBJECT_LEFT] = "Turn left (\\key left;)", + [EVENT_OBJECT_RIGHT] = "Turn right (\\key right;)", + [EVENT_OBJECT_UP] = "Forward (\\key up;)", + [EVENT_OBJECT_DOWN] = "Backward (\\key down;)", + [EVENT_OBJECT_GASUP] = "Up (\\key gup;)", + [EVENT_OBJECT_GASDOWN] = "Down (\\key gdown;)", + [EVENT_OBJECT_HTAKE] = "Grab or drop (\\key action;)", + [EVENT_OBJECT_MTAKE] = "Grab or drop (\\key action;)", + [EVENT_OBJECT_MFRONT] = "..in front", + [EVENT_OBJECT_MBACK] = "..behind", + [EVENT_OBJECT_MPOWER] = "..power cell", + [EVENT_OBJECT_BHELP] = "Instructions for the mission (\\key help;)", + [EVENT_OBJECT_BTAKEOFF] = "Take off to finish the mission", + [EVENT_OBJECT_BDERRICK] = "Build a derrick", + [EVENT_OBJECT_BSTATION] = "Build a power station", + [EVENT_OBJECT_BFACTORY] = "Build a bot factory", + [EVENT_OBJECT_BREPAIR] = "Build a repair center", + [EVENT_OBJECT_BCONVERT] = "Build a converter", + [EVENT_OBJECT_BTOWER] = "Build a defense tower", + [EVENT_OBJECT_BRESEARCH] = "Build a research center", + [EVENT_OBJECT_BRADAR] = "Build a radar station", + [EVENT_OBJECT_BENERGY] = "Build a power cell factory", + [EVENT_OBJECT_BLABO] = "Build an autolab", + [EVENT_OBJECT_BNUCLEAR] = "Build a nuclear power plant", + [EVENT_OBJECT_BPARA] = "Build a lightning conductor", + [EVENT_OBJECT_BINFO] = "Build a exchange post", + [EVENT_OBJECT_GFLAT] = "Show if the ground is flat", + [EVENT_OBJECT_FCREATE] = "Plant a flag", + [EVENT_OBJECT_FDELETE] = "Remove a flag", + [EVENT_OBJECT_FCOLORb] = "\\Blue flags", + [EVENT_OBJECT_FCOLORr] = "\\Red flags", + [EVENT_OBJECT_FCOLORg] = "\\Green flags", + [EVENT_OBJECT_FCOLORy] = "\\Yellow flags", + [EVENT_OBJECT_FCOLORv] = "\\Violet flags", + [EVENT_OBJECT_FACTORYfa] = "Build a winged grabber", + [EVENT_OBJECT_FACTORYta] = "Build a tracked grabber", + [EVENT_OBJECT_FACTORYwa] = "Build a wheeled grabber", + [EVENT_OBJECT_FACTORYia] = "Build a legged grabber", + [EVENT_OBJECT_FACTORYfc] = "Build a winged shooter", + [EVENT_OBJECT_FACTORYtc] = "Build a tracked shooter", + [EVENT_OBJECT_FACTORYwc] = "Build a wheeled shooter", + [EVENT_OBJECT_FACTORYic] = "Build a legged shooter", + [EVENT_OBJECT_FACTORYfi] = "Build a winged orga shooter", + [EVENT_OBJECT_FACTORYti] = "Build a tracked orga shooter", + [EVENT_OBJECT_FACTORYwi] = "Build a wheeled orga shooter", + [EVENT_OBJECT_FACTORYii] = "Build a legged orga shooter", + [EVENT_OBJECT_FACTORYfs] = "Build a winged sniffer", + [EVENT_OBJECT_FACTORYts] = "Build a tracked sniffer", + [EVENT_OBJECT_FACTORYws] = "Build a wheeled sniffer", + [EVENT_OBJECT_FACTORYis] = "Build a legged sniffer", + [EVENT_OBJECT_FACTORYrt] = "Build a thumper", + [EVENT_OBJECT_FACTORYrc] = "Build a phazer shooter", + [EVENT_OBJECT_FACTORYrr] = "Build a recycler", + [EVENT_OBJECT_FACTORYrs] = "Build a shielder", + [EVENT_OBJECT_FACTORYsa] = "Build a subber", + [EVENT_OBJECT_RTANK] = "Run research program for tracked bots", + [EVENT_OBJECT_RFLY] = "Run research program for winged bots", + [EVENT_OBJECT_RTHUMP] = "Run research program for thumper", + [EVENT_OBJECT_RCANON] = "Run research program for shooter", + [EVENT_OBJECT_RTOWER] = "Run research program for defense tower", + [EVENT_OBJECT_RPHAZER] = "Run research program for phazer shooter", + [EVENT_OBJECT_RSHIELD] = "Run research program for shielder", + [EVENT_OBJECT_RATOMIC] = "Run research program for nuclear power", + [EVENT_OBJECT_RiPAW] = "Run research program for legged bots", + [EVENT_OBJECT_RiGUN] = "Run research program for orga shooter", + [EVENT_OBJECT_RESET] = "Return to start", + [EVENT_OBJECT_SEARCH] = "Sniff (\\key action;)", + [EVENT_OBJECT_TERRAFORM] = "Thump (\\key action;)", + [EVENT_OBJECT_FIRE] = "Shoot (\\key action;)", + [EVENT_OBJECT_RECOVER] = "Recycle (\\key action;)", + [EVENT_OBJECT_BEGSHIELD] = "Extend shield (\\key action;)", + [EVENT_OBJECT_ENDSHIELD] = "Withdraw shield (\\key action;)", + [EVENT_OBJECT_DIMSHIELD] = "Shield radius", + [EVENT_OBJECT_PROGRUN] = "Execute the selected program", + [EVENT_OBJECT_PROGEDIT] = "Edit the selected program", + [EVENT_OBJECT_INFOOK] = "\\SatCom on standby", + [EVENT_OBJECT_DELETE] = "Destroy the building", + [EVENT_OBJECT_GENERGY] = "Energy level", + [EVENT_OBJECT_GSHIELD] = "Shield level", + [EVENT_OBJECT_GRANGE] = "Jet temperature", + [EVENT_OBJECT_GPROGRESS] = "Still working ...", + [EVENT_OBJECT_GRADAR] = "Number of insects detected", + [EVENT_OBJECT_GINFO] = "Transmitted information", + [EVENT_OBJECT_COMPASS] = "Compass", + [EVENT_OBJECT_MAPZOOM] = "Zoom mini-map", + [EVENT_OBJECT_CAMERA] = "Camera (\\key camera;)", + [EVENT_OBJECT_CAMERAleft] = "Camera to left", + [EVENT_OBJECT_CAMERAright] = "Camera to right", + [EVENT_OBJECT_CAMERAnear] = "Camera nearest", + [EVENT_OBJECT_CAMERAaway] = "Camera awayest", + [EVENT_OBJECT_HELP] = "Help about selected object", + [EVENT_OBJECT_SOLUCE] = "Show the solution", + [EVENT_OBJECT_SHORTCUT00] = "Switch bots <-> buildings", + [EVENT_OBJECT_LIMIT] = "Show the range", + [EVENT_OBJECT_PEN0] = "\\Raise the pencil", + [EVENT_OBJECT_PEN1] = "\\Use the black pencil", + [EVENT_OBJECT_PEN2] = "\\Use the yellow pencil", + [EVENT_OBJECT_PEN3] = "\\Use the orange pencil", + [EVENT_OBJECT_PEN4] = "\\Use the red pencil", + [EVENT_OBJECT_PEN5] = "\\Use the purple pencil", + [EVENT_OBJECT_PEN6] = "\\Use the blue pencil", + [EVENT_OBJECT_PEN7] = "\\Use the green pencil", + [EVENT_OBJECT_PEN8] = "\\Use the brown pencil", + [EVENT_OBJECT_REC] = "\\Start recording", + [EVENT_OBJECT_STOP] = "\\Stop recording", + [EVENT_DT_VISIT0] = "Show the place", + [EVENT_DT_VISIT1] = "Show the place", + [EVENT_DT_VISIT2] = "Show the place", + [EVENT_DT_VISIT3] = "Show the place", + [EVENT_DT_VISIT4] = "Show the place", + [EVENT_DT_END] = "Continue", + [EVENT_CMD] = "Command line", + [EVENT_SPEED] = "Game speed", + + [EVENT_HYPER_PREV] = "Back", + [EVENT_HYPER_NEXT] = "Forward", + [EVENT_HYPER_HOME] = "Home", + [EVENT_HYPER_COPY] = "Copy", + [EVENT_HYPER_SIZE1] = "Size 1", + [EVENT_HYPER_SIZE2] = "Size 2", + [EVENT_HYPER_SIZE3] = "Size 3", + [EVENT_HYPER_SIZE4] = "Size 4", + [EVENT_HYPER_SIZE5] = "Size 5", + [EVENT_SATCOM_HUSTON] = "Instructions from Houston", +#if _TEEN + [EVENT_SATCOM_SAT] = "Dictionnary", +#else + [EVENT_SATCOM_SAT] = "Satellite report", +#endif + [EVENT_SATCOM_LOADING] = "Programs dispatched by Houston", + [EVENT_SATCOM_OBJECT] = "List of objects", + [EVENT_SATCOM_PROG] = "Programming help", + [EVENT_SATCOM_SOLUCE] = "Solution", + + [EVENT_STUDIO_OK] = "OK\\Close program editor and return to game", + [EVENT_STUDIO_CANCEL] = "Cancel\\Cancel all changes", + [EVENT_STUDIO_NEW] = "New", + [EVENT_STUDIO_OPEN] = "Open (Ctrl+o)", + [EVENT_STUDIO_SAVE] = "Save (Ctrl+s)", + [EVENT_STUDIO_UNDO] = "Undo (Ctrl+z)", + [EVENT_STUDIO_CUT] = "Cut (Ctrl+x)", + [EVENT_STUDIO_COPY] = "Copy (Ctrl+c)", + [EVENT_STUDIO_PASTE] = "Paste (Ctrl+v)", + [EVENT_STUDIO_SIZE] = "Font size", + [EVENT_STUDIO_TOOL] = "Instructions (\\key help;)", + [EVENT_STUDIO_HELP] = "Programming help (\\key prog;)", + [EVENT_STUDIO_COMPILE] = "Compile", + [EVENT_STUDIO_RUN] = "Execute/stop", + [EVENT_STUDIO_REALTIME] = "Pause/continue", + [EVENT_STUDIO_STEP] = "One step" +}; + +const char * const strings_object[] = +{ + [OBJECT_PORTICO] = "Gantry crane", + [OBJECT_BASE] = "Spaceship", + [OBJECT_DERRICK] = "Derrick", + [OBJECT_FACTORY] = "Bot factory", + [OBJECT_REPAIR] = "Repair center", + [OBJECT_DESTROYER] = "Destroyer", + [OBJECT_STATION] = "Power station", + [OBJECT_CONVERT] = "Converts ore to titanium", + [OBJECT_TOWER] = "Defense tower", + [OBJECT_NEST] = "Nest", + [OBJECT_RESEARCH] = "Research center", + [OBJECT_RADAR] = "Radar station", + [OBJECT_INFO] = "Information exchange post", +#if _TEEN + [OBJECT_ENERGY] = "Disintegrator", +#else + [OBJECT_ENERGY] = "Power cell factory", +#endif + [OBJECT_LABO] = "Autolab", + [OBJECT_NUCLEAR] = "Nuclear power station", + [OBJECT_PARA] = "Lightning conductor", + [OBJECT_SAFE] = "Vault", + [OBJECT_HUSTON] = "Houston Mission Control", + [OBJECT_TARGET1] = "Target", + [OBJECT_TARGET2] = "Target", + [OBJECT_START] = "Start", + [OBJECT_END] = "Finish", + [OBJECT_STONE] = "Titanium ore", + [OBJECT_URANIUM] = "Uranium ore", + [OBJECT_BULLET] = "Organic matter", + [OBJECT_METAL] = "Titanium", + [OBJECT_POWER] = "Power cell", + [OBJECT_ATOMIC] = "Nuclear power cell", + [OBJECT_BBOX] = "Black box", + [OBJECT_KEYa] = "Key A", + [OBJECT_KEYb] = "Key B", + [OBJECT_KEYc] = "Key C", + [OBJECT_KEYd] = "Key D", + [OBJECT_TNT] = "Explosive", + [OBJECT_BOMB] = "Fixed mine", + [OBJECT_BAG] = "Survival kit", + [OBJECT_WAYPOINT] = "Checkpoint", + [OBJECT_FLAGb] = "Blue flag", + [OBJECT_FLAGr] = "Red flag", + [OBJECT_FLAGg] = "Green flag", + [OBJECT_FLAGy] = "Yellow flag", + [OBJECT_FLAGv] = "Violet flag", + [OBJECT_MARKPOWER] = "Energy deposit (site for power station)", + [OBJECT_MARKURANIUM] = "Uranium deposit (site for derrick)", + [OBJECT_MARKKEYa] = "Found key A (site for derrick)", + [OBJECT_MARKKEYb] = "Found key B (site for derrick)", + [OBJECT_MARKKEYc] = "Found key C (site for derrick)", + [OBJECT_MARKKEYd] = "Found key D (site for derrick)", + [OBJECT_MARKSTONE] = "Titanium deposit (site for derrick)", + [OBJECT_MOBILEft] = "Practice bot", + [OBJECT_MOBILEtt] = "Practice bot", + [OBJECT_MOBILEwt] = "Practice bot", + [OBJECT_MOBILEit] = "Practice bot", + [OBJECT_MOBILEfa] = "Winged grabber", + [OBJECT_MOBILEta] = "Tracked grabber", + [OBJECT_MOBILEwa] = "Wheeled grabber", + [OBJECT_MOBILEia] = "Legged grabber", + [OBJECT_MOBILEfc] = "Winged shooter", + [OBJECT_MOBILEtc] = "Tracked shooter", + [OBJECT_MOBILEwc] = "Wheeled shooter", + [OBJECT_MOBILEic] = "Legged shooter", + [OBJECT_MOBILEfi] = "Winged orga shooter", + [OBJECT_MOBILEti] = "Tracked orga shooter", + [OBJECT_MOBILEwi] = "Wheeled orga shooter", + [OBJECT_MOBILEii] = "Legged orga shooter", + [OBJECT_MOBILEfs] = "Winged sniffer", + [OBJECT_MOBILEts] = "Tracked sniffer", + [OBJECT_MOBILEws] = "Wheeled sniffer", + [OBJECT_MOBILEis] = "Legged sniffer", + [OBJECT_MOBILErt] = "Thumper", + [OBJECT_MOBILErc] = "Phazer shooter", + [OBJECT_MOBILErr] = "Recycler", + [OBJECT_MOBILErs] = "Shielder", + [OBJECT_MOBILEsa] = "Subber", + [OBJECT_MOBILEtg] = "Target bot", + [OBJECT_MOBILEdr] = "Drawer bot", + [OBJECT_TECH] = "Engineer", + [OBJECT_TOTO] = "Robbie", + [OBJECT_MOTHER] = "Alien Queen", + [OBJECT_ANT] = "Ant", + [OBJECT_SPIDER] = "Spider", + [OBJECT_BEE] = "Wasp", + [OBJECT_WORM] = "Worm", + [OBJECT_EGG] = "Egg", + [OBJECT_RUINmobilew1] = "Wreckage", + [OBJECT_RUINmobilew2] = "Wreckage", + [OBJECT_RUINmobilet1] = "Wreckage", + [OBJECT_RUINmobilet2] = "Wreckage", + [OBJECT_RUINmobiler1] = "Wreckage", + [OBJECT_RUINmobiler2] = "Wreckage", + [OBJECT_RUINfactory] = "Ruin", + [OBJECT_RUINdoor] = "Ruin", + [OBJECT_RUINsupport] = "Waste", + [OBJECT_RUINradar] = "Ruin", + [OBJECT_RUINconvert] = "Ruin", + [OBJECT_RUINbase] = "Spaceship ruin", + [OBJECT_RUINhead] = "Spaceship ruin", + [OBJECT_APOLLO1] = "Remains of Apollo mission", + [OBJECT_APOLLO3] = "Remains of Apollo mission", + [OBJECT_APOLLO4] = "Remains of Apollo mission", + [OBJECT_APOLLO5] = "Remains of Apollo mission", + [OBJECT_APOLLO2] = "Lunar Roving Vehicle" +}; + +const char * const strings_err[] = +{ + [ERR_CMD] = "Unknown command", +#if _NEWLOOK + [ERR_INSTALL] = "CeeBot not installed.", + [ERR_NOCD] = "Please insert the CeeBot CD\nand re-run the game.", +#else + [ERR_INSTALL] = "COLOBOT not installed.", + [ERR_NOCD] = "Please insert the COLOBOT CD\nand re-run the game.", +#endif + [ERR_MANIP_VEH] = "Inappropriate bot", + [ERR_MANIP_FLY] = "Impossible when flying", + [ERR_MANIP_BUSY] = "Already carrying something", + [ERR_MANIP_NIL] = "Nothing to grab", + [ERR_MANIP_MOTOR] = "Impossible when moving", + [ERR_MANIP_OCC] = "Place occupied", + [ERR_MANIP_FRIEND] = "No other robot", + [ERR_MANIP_RADIO] = "You can not carry a radioactive object", + [ERR_MANIP_WATER] = "You can not carry an object under water", + [ERR_MANIP_EMPTY] = "Nothing to drop", + [ERR_BUILD_FLY] = "Impossible when flying", + [ERR_BUILD_WATER] = "Impossible under water", + [ERR_BUILD_ENERGY] = "Not enough energy", + [ERR_BUILD_METALAWAY] = "Titanium too far away", + [ERR_BUILD_METALNEAR] = "Titanium too close", + [ERR_BUILD_METALINEX] = "No titanium around", + [ERR_BUILD_FLAT] = "Ground not flat enough", + [ERR_BUILD_FLATLIT] = "Flat ground not large enough", + [ERR_BUILD_BUSY] = "Place occupied", + [ERR_BUILD_BASE] = "Too close to space ship", + [ERR_BUILD_NARROW] = "Too close to a building", + [ERR_BUILD_MOTOR] = "Impossible when moving", + [ERR_SEARCH_FLY] = "Impossible when flying", + [ERR_SEARCH_VEH] = "Inappropriate bot", + [ERR_SEARCH_MOTOR] = "Impossible when moving", + [ERR_TERRA_VEH] = "Inappropriate bot", + [ERR_TERRA_ENERGY] = "Not enough energy", + [ERR_TERRA_FLOOR] = "Ground inappropriate", + [ERR_TERRA_BUILDING] = "Building too close", + [ERR_TERRA_OBJECT] = "Object too close", + [ERR_RECOVER_VEH] = "Inappropriate bot", + [ERR_RECOVER_ENERGY] = "Not enough energy", + [ERR_RECOVER_NULL] = "Nothing to recycle", + [ERR_SHIELD_VEH] = "Inappropriate bot", + [ERR_SHIELD_ENERGY] = "No more energy", + [ERR_MOVE_IMPOSSIBLE] = "Error in instruction move", + [ERR_FIND_IMPOSSIBLE] = "Object not found", + [ERR_GOTO_IMPOSSIBLE] = "Goto: inaccessible destination", + [ERR_GOTO_ITER] = "Goto: inaccessible destination", + [ERR_GOTO_BUSY] = "Goto: destination occupied", + [ERR_FIRE_VEH] = "Inappropriate bot", + [ERR_FIRE_ENERGY] = "Not enough energy", + [ERR_FIRE_FLY] = "Impossible when flying", + [ERR_CONVERT_EMPTY] = "No titanium ore to convert", + [ERR_DERRICK_NULL] = "No ore in the subsoil", + [ERR_STATION_NULL] = "No energy in the subsoil", + [ERR_TOWER_POWER] = "No power cell", + [ERR_TOWER_ENERGY] = "No more energy", + [ERR_RESEARCH_POWER] = "No power cell", + [ERR_RESEARCH_ENERGY] = "Not enough energy", + [ERR_RESEARCH_TYPE] = "Inappropriate cell type", + [ERR_RESEARCH_ALREADY]= "Research program already performed", + [ERR_ENERGY_NULL] = "No energy in the subsoil", + [ERR_ENERGY_LOW] = "Not enough energy yet", + [ERR_ENERGY_EMPTY] = "No titanium to transform", + [ERR_ENERGY_BAD] = "Transforms only titanium", + [ERR_BASE_DLOCK] = "Doors blocked by a robot or another object ", + [ERR_BASE_DHUMAN] = "You must get on the spaceship to take off ", + [ERR_LABO_NULL] = "Nothing to analyze", + [ERR_LABO_BAD] = "Analyzes only organic matter", + [ERR_LABO_ALREADY] = "Analysis already performed", + [ERR_NUCLEAR_NULL] = "No energy in the subsoil", + [ERR_NUCLEAR_LOW] = "Not yet enough energy", + [ERR_NUCLEAR_EMPTY] = "No uranium to transform", + [ERR_NUCLEAR_BAD] = "Transforms only uranium", + [ERR_FACTORY_NULL] = "No titanium", + [ERR_FACTORY_NEAR] = "Object too close", + [ERR_RESET_NEAR] = "Place occupied", + [ERR_INFO_NULL] = "No information exchange post within range", + [ERR_VEH_VIRUS] = "Program infected by a virus", + [ERR_BAT_VIRUS] = "Infected by a virus, temporarily out of order", + [ERR_VEH_POWER] = "No power cell", + [ERR_VEH_ENERGY] = "No more energy", + [ERR_FLAG_FLY] = "Impossible when flying", + [ERR_FLAG_WATER] = "Impossible when swimming", + [ERR_FLAG_MOTOR] = "Impossible when moving", + [ERR_FLAG_BUSY] = "Impossible when carrying an object", + [ERR_FLAG_CREATE] = "Too many flags of this color (maximum 5)", + [ERR_FLAG_PROXY] = "Too close to an existing flag", + [ERR_FLAG_DELETE] = "No flag nearby", + [ERR_MISSION_NOTERM] = "The mission is not accomplished yet (press \\key help; for more details)", + [ERR_DELETEMOBILE] = "Bot destroyed", + [ERR_DELETEBUILDING] = "Building destroyed", + [ERR_TOOMANY] = "Can not create this, there are too many objects", + [ERR_OBLIGATORYTOKEN] = "\"%s\" missing in this exercise", + [ERR_PROHIBITEDTOKEN] = "Do not use in this exercise", + + [INFO_BUILD] = "Building completed", + [INFO_CONVERT] = "Titanium available", + [INFO_RESEARCH] = "Research program completed", + [INFO_RESEARCHTANK] = "Plans for tracked robots available ", + [INFO_RESEARCHFLY] = "You can fly with the keys (\\key gup;) and (\\key gdown;)", + [INFO_RESEARCHTHUMP] = "Plans for thumper available", + [INFO_RESEARCHCANON] = "Plans for shooter available", + [INFO_RESEARCHTOWER] = "Plans for defense tower available", + [INFO_RESEARCHPHAZER] = "Plans for phazer shooter available", + [INFO_RESEARCHSHIELD] = "Plans for shielder available", + [INFO_RESEARCHATOMIC] = "Plans for nuclear power plant available", + [INFO_FACTORY] = "New bot available", + [INFO_LABO] = "Analysis performed", + [INFO_ENERGY] = "Power cell available", + [INFO_NUCLEAR] = "Nuclear power cell available", + [INFO_FINDING] = "You found a usable object", + [INFO_MARKPOWER] = "Found a site for power station", + [INFO_MARKURANIUM] = "Found a site for a derrick", + [INFO_MARKSTONE] = "Found a site for a derrick", + [INFO_MARKKEYa] = "Found a site for a derrick", + [INFO_MARKKEYb] = "Found a site for a derrick", + [INFO_MARKKEYc] = "Found a site for a derrick", + [INFO_MARKKEYd] = "Found a site for a derrick", + [INFO_WIN] = "<<< Well done, mission accomplished >>>", + [INFO_LOST] = "<<< Sorry, mission failed >>>", + [INFO_LOSTq] = "<<< Sorry, mission failed >>>", + [INFO_WRITEOK] = "Current mission saved", + [INFO_DELETEPATH] = "Checkpoint crossed", + [INFO_DELETEMOTHER] = "Alien Queen killed", + [INFO_DELETEANT] = "Ant fatally wounded", + [INFO_DELETEBEE] = "Wasp fatally wounded", + [INFO_DELETEWORM] = "Worm fatally wounded", + [INFO_DELETESPIDER] = "Spider fatally wounded", + [INFO_BEGINSATCOM] = "Press \\key help; to read instructions on your SatCom" +}; + +const char * const strings_cbot[] = +{ + [TX_OPENPAR] = "Opening bracket missing", + [TX_CLOSEPAR] = "Closing bracket missing ", + [TX_NOTBOOL] = "The expression must return a boolean value", + [TX_UNDEFVAR] = "Variable not declared", + [TX_BADLEFT] = "Assignment impossible", + [TX_ENDOF] = "Semicolon terminator missing", + [TX_OUTCASE] = "Instruction \"case\" outside a block \"switch\"", + [TX_NOTERM] = "Instructions after the final closing brace", + [TX_CLOSEBLK] = "End of block missing", + [TX_ELSEWITHOUTIF] = "Instruction \"else\" without corresponding \"if\" ", + [TX_OPENBLK] = "Opening brace missing ", + [TX_BADTYPE] = "Wrong type for the assignment", + [TX_REDEFVAR] = "A variable can not be declared twice", + [TX_BAD2TYPE] = "The types of the two operands are incompatible ", + [TX_UNDEFCALL] = "Unknown function", + [TX_MISDOTS] = "Sign \" : \" missing", + [TX_WHILE] = "Keyword \"while\" missing", + [TX_BREAK] = "Instruction \"break\" outside a loop", + [TX_LABEL] = "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"", + [TX_NOLABEL] = "This label does not exist", + [TX_NOCASE] = "Instruction \"case\" missing", + [TX_BADNUM] = "Number missing", + [TX_VOID] = "Void parameter", + [TX_NOTYP] = "Type declaration missing", + [TX_NOVAR] = "Variable name missing", + [TX_NOFONC] = "Function name missing", + [TX_OVERPARAM] = "Too many parameters", + [TX_REDEF] = "Function already exists", + [TX_LOWPARAM] = "Parameters missing ", + [TX_BADPARAM] = "No function with this name accepts this kind of parameter", + [TX_NUMPARAM] = "No function with this name accepts this number of parameters", + [TX_NOITEM] = "This is not a member of this class", + [TX_DOT] = "This object is not a member of a class", + [TX_NOCONST] = "Appropriate constructor missing", + [TX_REDEFCLASS] = "This class already exists", + [TX_CLBRK] = "\" ] \" missing", + [TX_RESERVED] = "Reserved keyword of CBOT language", + [TX_BADNEW] = "Bad argument for \"new\"", + [TX_OPBRK] = "\" [ \" expected", + [TX_BADSTRING] = "String missing", + [TX_BADINDEX] = "Incorrect index type", + [TX_PRIVATE] = "Private element", + [TX_NOPUBLIC] = "Public required", + [TX_DIVZERO] = "Dividing by zero", + [TX_NOTINIT] = "Variable not initialized", + [TX_BADTHROW] = "Negative value rejected by \"throw\"", + [TX_NORETVAL] = "The function returned no value ", + [TX_NORUN] = "No function running", + [TX_NOCALL] = "Calling an unknown function", + [TX_NOCLASS] = "This class does not exist", + [TX_NULLPT] = "Unknown Object", + [TX_OPNAN] = "Operation impossible with value \"nan\"", + [TX_OUTARRAY] = "Access beyond array limit", + [TX_STACKOVER] = "Stack overflow", + [TX_DELETEDPT] = "Illegal object", + [TX_FILEOPEN] = "Can't open file", + [TX_NOTOPEN] = "File not open", + [TX_ERRREAD] = "Read error", + [TX_ERRWRITE] = "Write error" +}; + +#define N_ELTS(Array) (sizeof(Array) / sizeof(Array[0])) + +const int strings_text_len = N_ELTS(strings_text); +const int strings_event_len = N_ELTS(strings_event); +const int strings_object_len = N_ELTS(strings_object); +const int strings_err_len = N_ELTS(strings_err); +const int strings_cbot_len = N_ELTS(strings_cbot); -- cgit v1.2.3-1-g7c22 From 896291b7697456b1f2e01c016a1dbbf40b942761 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sat, 25 Aug 2012 14:13:26 +0400 Subject: Add translation files --- src/po/de.po | 2097 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/po/fr.po | 2097 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/po/pl.po | 2097 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 6291 insertions(+) create mode 100644 src/po/de.po create mode 100644 src/po/fr.po create mode 100644 src/po/pl.po diff --git a/src/po/de.po b/src/po/de.po new file mode 100644 index 0000000..88ab6f1 --- /dev/null +++ b/src/po/de.po @@ -0,0 +1,2097 @@ +msgid "1.18 /e" +msgstr "1.18 /d" + +msgid "CeeBot-A 1.18" +msgstr "CeeBot-A 1.18" + +msgid "CeeBot-Teen EDU 1.18" +msgstr "CeeBot-Teen EDU 1.18" + +msgid "CeeBot-A EDU 1.18" +msgstr "CeeBot-A EDU 1.18" + +msgid "CeeBot-Teen PERSO 1.18" +msgstr "CeeBot-Teen PERSO 1.18" + +msgid "CeeBot-A PERSO 1.18" +msgstr "CeeBot-A PERSO 1.18" + +msgid "CeeBot-Teen DEMO 1.18" +msgstr "CeeBot-Teen DEMO 1.18" + +msgid "CeeBot-A DEMO 1.18" +msgstr "CeeBot-A DEMO 1.18" + +msgid "Demo 1.18 /e" +msgstr "Demo 1.18 /d" + +msgid "SatCom" +msgstr "SatCom" + +msgid "Maximize" +msgstr "Großes Fenster" + +msgid "Minimize" +msgstr "Reduzieren" + +msgid "Normal size" +msgstr "Normale Größe" + +msgid "Close" +msgstr "Schließen" + +msgid "Program editor" +msgstr "Programmeditor" + +msgid "New" +msgstr "Neu" + +msgid "Player" +msgstr "Spieler" + +msgid "New ..." +msgstr "Neu ..." + +msgid " or " +msgstr " oder " + +msgid "CeeBot" +msgstr "CeeBot" + +msgid "COLOBOT" +msgstr "COLOBOT" + +msgid "Programming exercises" +msgstr "Programmieren" + +msgid "Challenges" +msgstr "Challenges" + +msgid "Missions" +msgstr "Missionen" + +msgid "Free game" +msgstr "Freestyle" + +msgid "User levels" +msgstr "Userlevels" + +msgid "Prototypes" +msgstr "Prototypen" + +msgid "Options" +msgstr "Einstellungen" + +msgid "Player's name" +msgstr "Name " + +msgid "Customize your appearance" +msgstr "Aussehen einstellen" + +msgid "Save the current mission" +msgstr "Aktuelle Mission speichern" + +msgid "Load a saved mission" +msgstr "Gespeicherte Mission laden" + +msgid " Chapters:" +msgstr " Liste der Kapitel:" + +msgid " Planets:" +msgstr " Liste der Planeten:" + +msgid " User levels:" +msgstr " Userlevels:" + +msgid " Exercises in the chapter:" +msgstr " Liste der Übungen des Kapitels:" + +msgid " Challenges in the chapter:" +msgstr " Liste der Challenges des Kapitels:" + +msgid " Missions on this planet:" +msgstr " Liste der Missionen des Planeten:" + +msgid " Free game on this planet:" +msgstr " Liste der freien Levels des Planeten:" + +msgid " Missions on this level:" +msgstr " Missionen des Userlevels:" + +msgid " Prototypes on this planet:" +msgstr " Liste der Prototypen des Planeten:" + +msgid " Free game on this chapter:" +msgstr " Liste der freien Levels des Kapitel:" + +msgid " Summary:" +msgstr " Zusammenfassung:" + +msgid " Drivers:" +msgstr " Driver:" + +msgid " Resolution:" +msgstr " Auflösung:" + +msgid "1) First click on the key you want to redefine." +msgstr "1) Klicken Sie auf die neu zu definierende Taste." + +msgid "2) Then press the key you want to use instead." +msgstr "2) Drücken Sie auf die neue Taste." + +msgid "Face type:" +msgstr "Kopf:" + +msgid "Eyeglasses:" +msgstr "Brille:" + +msgid "Hair color:" +msgstr "Haarfarbe:" + +msgid "Suit color:" +msgstr "Farbe des Anzugs:" + +msgid "Strip color:" +msgstr "Farbe der Streifen:" + +msgid "Do you want to quit CeeBot ?" +msgstr "Wollen Sie CeeBot schließen ?" + +msgid "Quit\\Quit CeeBot" +msgstr "Schließen\\CeeBot schließen" + +msgid "Do you want to quit COLOBOT ?" +msgstr "Wollen Sie COLOBOT schließen ?" + +msgid "Quit\\Quit COLOBOT" +msgstr "Schließen\\COLOBOT schließen" + +msgid "Quit the mission?" +msgstr "Mission abbrechen ?" + +msgid "Abort\\Abort the current mission" +msgstr "Abbrechen\\Mission abbrechen" + +msgid "Continue\\Continue the current mission" +msgstr "Weitermachen\\Mission weitermachen" + +msgid "Continue\\Continue the game" +msgstr "Weitermachen\\Weitermachen" + +msgid "Do you really want to destroy the selected building?" +msgstr "Wollen Sie das angewählte Gebäude wirklich zerstören ?" + +msgid "Do you want to delete %s's saved games? " +msgstr "Wollen Sie die gespeicherten Missionen von %s löschen ?" + +msgid "Delete" +msgstr "Zerstören" + +msgid "Cancel" +msgstr "Abbrechen" + +msgid "LOADING" +msgstr "Laden" + +msgid "Keyword help(\\key cbot;)" +msgstr "Hilfe über den Begriff (\\key cbot;)" + +msgid "Compilation ok (0 errors)" +msgstr "Kompilieren OK (0 Fehler)" + +msgid "Program finished" +msgstr "Programm beendet" + +msgid "\\b;List of objects\n" +msgstr "\\b;Liste der Objekte\n" + +msgid "\\b;Robots\n" +msgstr "\\b;Liste der Roboter\n" + +msgid "\\b;Buildings\n" +msgstr "\\b;Listes der Gebäude\n" + +msgid "\\b;Moveable objects\n" +msgstr "\\b;Listes der tragbaren Gegenstände\n" + +msgid "\\b;Aliens\n" +msgstr "\\b;Listes der Feinde\n" + +msgid "\\c; (none)\\n;\n" +msgstr "\\c; (keine)\\n;\n" + +msgid "\\b;Error\n" +msgstr "\\b;Fehler\n" + +msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" +msgstr "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verfügbar !\n" + +msgid "Open" +msgstr "Öffnen" + +msgid "Save" +msgstr "Speichern" + +msgid "Folder: %s" +msgstr "Ordner: %s" + +msgid "Name:" +msgstr "Name:" + +msgid "Folder:" +msgstr "In:" + +msgid "Private\\Private folder" +msgstr "Privat\\Privater Ordner" + +msgid "Public\\Common folder" +msgstr "Öffentlich\\Gemeinsamer Ordner für alle Spieler" + +msgid "Developed by :" +msgstr "Entwickelt von:" + +msgid "www.epsitec.com" +msgstr "www.epsitec.com" + +msgid " " +msgstr " " + +msgid "Recorder" +msgstr "Recorder" + +msgid "OK" +msgstr "OK" + +msgid "Next" +msgstr "Nächster" + +msgid "Previous" +msgstr "Vorherg." + +msgid "Menu (\\key quit;)" +msgstr "Menü (\\key quit;)" + +msgid "Exercises\\Programming exercises" +msgstr "Programmieren\\Programmierübungen" + +msgid "Challenges\\Programming challenges" +msgstr "Challenges\\Herausforderungen" + +msgid "Missions\\Select mission" +msgstr "Missionen\\Aufbruch ins Weltall" + +msgid "Free game\\Free game without a specific goal" +msgstr "Freestyle\\Freies Spielen ohne vorgegebenes Ziel" + +msgid "User\\User levels" +msgstr "User\\Userlevels" + +msgid "Proto\\Prototypes under development" +msgstr "Proto\\In Entwicklung befindliche Prototypen" + +msgid "New player\\Choose player's name" +msgstr "Anderer Spieler\\Spielername ändern" + +msgid "Options\\Preferences" +msgstr "Einstellungen\\Einstellungen" + +msgid "Restart\\Restart the mission from the beginning" +msgstr "Neu anfangen\\Die Mission von vorne anfangen" + +msgid "Save\\Save the current mission " +msgstr "Speichern\\Aktuelle Mission speichern" + +msgid "Load\\Load a saved mission" +msgstr "Laden\\Eine gespeicherte Mission öffnen" + +msgid "\\Return to CeeBot" +msgstr "\\Zurück zu CeeBot" + +msgid "\\Return to COLOBOT" +msgstr "\\Zurück zu COLOBOT" + +msgid "<< Back \\Back to the previous screen" +msgstr "<< Zurück \\Zurück zum Hauptmenü" + +msgid "Play\\Start mission!" +msgstr "Spielen ...\\Los geht's" + +msgid "Device\\Driver and resolution settings" +msgstr "Bildschirm\\Driver und Bildschirmauflösung" + +msgid "Graphics\\Graphics settings" +msgstr "Grafik\\Grafische Einstellungen" + +msgid "Game\\Game settings" +msgstr "Spiel\\Gameplay Einstellungen" + +msgid "Controls\\Keyboard, joystick and mouse settings" +msgstr "Steuerung\\Auswahl der Tasten" + +msgid "Sound\\Music and game sound volume" +msgstr "Geräusche\\Lautstärke Geräusche und Musik" + +msgid "Unit" +msgstr "Einheit" + +msgid "Resolution" +msgstr "Auflösung" + +msgid "Full screen\\Full screen or window mode" +msgstr "Vollbildschirm\\Vollbildschirm oder Fenster" + +msgid "Apply changes\\Activates the changed settings" +msgstr "Änderungen ausführen\\Getätigte Einstellungen ausführen" + +msgid "Robbie\\Your assistant" +msgstr "Robby\\Ihr Assistent" + +msgid "Shadows\\Shadows on the ground" +msgstr "Schatten\\Schlagschatten auf dem Boden" + +msgid "Marks on the ground\\Marks on the ground" +msgstr "Markierungen\\Markierungen auf dem Boden" + +msgid "Dust\\Dust and dirt on bots and buildings" +msgstr "Schmutz\\Schmutz auf Robotern und Bauten" + +msgid "Fog\\Fog" +msgstr "Nebel\\Nebelschwaden" + +msgid "Sunbeams\\Sunbeams in the sky" +msgstr "Sonnenstrahlen\\Sonnenstrahlen" + +msgid "Sky\\Clouds and nebulae" +msgstr "Himmel\\Himmel und Wolken" + +msgid "Planets and stars\\Astronomical objects in the sky" +msgstr "Planeten und Sterne\\Kreisende Planeten und Sterne" + +msgid "Dynamic lighting\\Mobile light sources" +msgstr "Dynamische Beleuchtung\\Dynamische Beleuchtung" + +msgid "Number of particles\\Explosions, dust, reflections, etc." +msgstr "Anzahl Partikel\\Explosionen, Staub, usw." + +msgid "Depth of field\\Maximum visibility" +msgstr "Sichtweite\\Maximale Sichtweite" + +msgid "Details\\Visual quality of 3D objects" +msgstr "Details\\Detailliertheit der Objekte in 3D" + +msgid "Textures\\Quality of textures " +msgstr "Qualität der Texturen\\Qualität der Anzeige" + +msgid "Num of decorative objects\\Number of purely ornamental objects" +msgstr "Anzahl Ziergegenstände\\Anzahl Gegenstände ohne Funktion" + +msgid "Particles in the interface\\Steam clouds and sparks in the interface" +msgstr "Partikel in den Menüs\\Funken und Sterne in den Menüs" + +msgid "Reflections on the buttons \\Shiny buttons" +msgstr "Glänzende Tasten\\Glänzende Tasten in den Menüs" + +msgid "Help balloons\\Explain the function of the buttons" +msgstr "Hilfsblasen\\Hilfsblasen" + +msgid "Film sequences\\Films before and after the missions" +msgstr "Filme\\Filme vor und nach den Missionen" + +msgid "Exit film\\Film at the exit of exercises" +msgstr "Zurücksetzen \\Kleine Show beim Zurücksetzen in den Übungen" + +msgid "Friendly fire\\Your shooting can damage your own objects " +msgstr "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen beschädigt." + +msgid "Scrolling\\Scrolling when the mouse touches right or left border" +msgstr "Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht" + +msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" +msgstr "Umkehr X\\Umkehr der Kameradrehung X-Achse" + +msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" +msgstr "Umkehr Y\\Umkehr der Kameradrehung Y-Achse" + +msgid "Quake at explosions\\The screen shakes at explosions" +msgstr "Beben bei Explosionen\\Die Kamera bebt bei Explosionen" + +msgid "Mouse shadow\\Gives the mouse a shadow" +msgstr "Schatten unter der Maus\\Ein Schatten erscheint unter der Maus" + +msgid "Automatic indent\\When program editing" +msgstr "Automatisches Einrücken\\Beim Bearbeiten der Programme" + +msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" +msgstr "Einrücken mit 4 Leerstellen\\Einrücken mit 2 oder 4 Leerstellen" + +msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" +msgstr "Lösung zugänglich\\Die Lösung ist im Programmslot \"4: Lösung\" zugänglich" + +msgid "Standard controls\\Standard key functions" +msgstr "Alles zurücksetzen\\Standarddefinition aller Tasten" + +msgid "Turn left\\turns the bot to the left" +msgstr "Drehung nach links\\Steuer links" + +msgid "Turn right\\turns the bot to the right" +msgstr "Drehung nach rechts\\Steuer rechts" + +msgid "Forward\\Moves forward" +msgstr "Vorwärts\\Bewegung nach vorne" + +msgid "Backward\\Moves backward" +msgstr "Rückwärts\\Bewegung nach hinten" + +msgid "Climb\\Increases the power of the jet" +msgstr "Steigen\\Leistung des Triebwerks steigern" + +msgid "Descend\\Reduces the power of the jet" +msgstr "Sinken\\Leistung des Triebwerks drosseln" + +msgid "Change camera\\Switches between onboard camera and following camera" +msgstr "Andere Kamera\\Sichtpunkt einstellen" + +msgid "Previous object\\Selects the previous object" +msgstr "Vorherg. Auswahl\\Das vorhergehende Objekt auswählen" + +msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Standardhandlung\\Führt die Standardhandlung des Roboters aus." + +msgid "Camera closer\\Moves the camera forward" +msgstr "Kamera näher\\Bewegung der Kamera vorwärts" + +msgid "Camera back\\Moves the camera backward" +msgstr "Kamera weiter\\Bewegung der Kamera rückwärts" + +msgid "Next object\\Selects the next object" +msgstr "Nächstes auswählen\\Nächstes Objekt auswählen" + +msgid "Select the astronaut\\Selects the astronaut" +msgstr "Astronauten auswählen\\Astronauten auswählen" + +msgid "Quit\\Quit the current mission or exercise" +msgstr "Mission verlassen\\Eine Mission oder Übung verlassen" + +msgid "Instructions\\Shows the instructions for the current mission" +msgstr "Anweisungen\\Anweisungen für die Mission oder Übung" + +msgid "Programming help\\Gives more detailed help with programming" +msgstr "Hilfe CBOT-Sprache\\Hilfe über die Programmiersprache CBOT" + +msgid "Key word help\\More detailed help about key words" +msgstr "Hilfe über Begriff\\Hilfe über einen Begriff" + +msgid "Origin of last message\\Shows where the last message was sent from" +msgstr "Ort der Meldung\\Zeigt den Ort, von dem die letzte Meldung stammt" + +msgid "Speed 1.0x\\Normal speed" +msgstr "Geschwindigkeit 1.0x\\Normale Spielgeschwindigkeit" + +msgid "Speed 1.5x\\1.5 times faster" +msgstr "Geschwindigkeit 1.5x\\Spielgeschwindigkeit anderthalb Mal schneller" + +msgid "Speed 2.0x\\Double speed" +msgstr "Geschwindigkeit 2.0x\\Spielgeschwindigkeit doppelt so schnell" + +msgid "Speed 3.0x\\Three times faster" +msgstr "Geschwindigkeit 3.0x\\Spielgeschwindigkeit drei Mal schneller" + +msgid "Sound effects:\\Volume of engines, voice, shooting, etc." +msgstr "Geräusche:\\Lautstärke Motoren, Stimmen, usw." + +msgid "Background sound :\\Volume of audio tracks on the CD" +msgstr "Geräuschkulisse:\\Lautstärke der Soundtracks der CD" + +msgid "3D sound\\3D positioning of the sound" +msgstr "3D-Geräusche\\Orten der Geräusche im Raum" + +msgid "Lowest\\Minimum graphic quality (highest frame rate)" +msgstr "Min.\\Minimale Qualität (großes Framerate)" + +msgid "Normal\\Normal graphic quality" +msgstr "Normal\\Standardqualität" + +msgid "Highest\\Highest graphic quality (lowest frame rate)" +msgstr "Max.\\Beste Qualität (niedriges Framerate)" + +msgid "Mute\\No sound" +msgstr "Kein Ton\\Keine Geräusche und Geräuschkulisse" + +msgid "Normal\\Normal sound volume" +msgstr "Normal\\Normale Lautstärke" + +msgid "Use a joystick\\Joystick or keyboard" +msgstr "Joystick\\Joystick oder Tastatur" + +msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "Zeigt die Lösung\\Zeigt nach 3mal Scheitern die Lösung" + +msgid "\\New player name" +msgstr "\\Name des Spielers" + +msgid "OK\\Choose the selected player" +msgstr "OK\\Spieler auswählen" + +msgid "Cancel\\Keep current player name" +msgstr "Abbrechen\\Behält den bisherigen Spieler bei" + +msgid "Delete player\\Deletes the player from the list" +msgstr "Spieler löschen\\Löscht den Spieler aus der Liste" + +msgid "Player name" +msgstr "Name " + +msgid "Save\\Saves the current mission" +msgstr "Speichern\\Speichert die Mission" + +msgid "Load\\Loads the selected mission" +msgstr "Laden\\Öffnet eine gespeicherte Mission" + +msgid "List of saved missions" +msgstr "Liste der gespeicherten Missionen" + +msgid "Filename:" +msgstr "Dateiname:" + +msgid "Mission name" +msgstr "Name der Mission" + +msgid "Photography" +msgstr "Ansicht der Mission" + +msgid "Delete\\Deletes the selected file" +msgstr "Löschen\\Löscht die gespeicherte Mission" + +msgid "Appearance\\Choose your appearance" +msgstr "Aussehen\\Erscheinungsbild des Astronauten einstellen" + +msgid "Standard\\Standard appearance settings" +msgstr "Standard\\Standardfarben einsetzen" + +msgid "Head\\Face and hair" +msgstr "Kopf\\Gesicht und Haare" + +msgid "Suit\\Astronaut suit" +msgstr "Anzug\\Raumfahrtanzug" + +msgid "\\Turn left" +msgstr "\\Drehung links" + +msgid "\\Turn right" +msgstr "\\Drehung rechts" + +msgid "Red" +msgstr "Rot" + +msgid "Green" +msgstr "Grün" + +msgid "Blue" +msgstr "Blau" + +msgid "\\Face 1" +msgstr "\\Kopf 1" + +msgid "\\Face 4" +msgstr "\\Kopf 4" + +msgid "\\Face 3" +msgstr "\\Kopf 3" + +msgid "\\Face 2" +msgstr "\\Kopf 2" + +msgid "\\No eyeglasses" +msgstr "\\Keine Brille" + +msgid "\\Eyeglasses 1" +msgstr "\\Brille 1" + +msgid "\\Eyeglasses 2" +msgstr "\\Brille 2" + +msgid "\\Eyeglasses 3" +msgstr "\\Brille 3" + +msgid "\\Eyeglasses 4" +msgstr "\\Brille 4" + +msgid "\\Eyeglasses 5" +msgstr "\\Brille 5" + +msgid "Previous selection (\\key desel;)" +msgstr "Vorherg. Auwahl (\\key desel;)" + +msgid "Turn left (\\key left;)" +msgstr "Drehung links (\\key left;)" + +msgid "Turn right (\\key right;)" +msgstr "Drehung rechts (\\key right;)" + +msgid "Forward (\\key up;)" +msgstr "Vorwärts (\\key up;)" + +msgid "Backward (\\key down;)" +msgstr "Rückwärts (\\key down;)" + +msgid "Up (\\key gup;)" +msgstr "Steigt (\\key gup;)" + +msgid "Down (\\key gdown;)" +msgstr "Sinkt (\\key gdown;)" + +msgid "Grab or drop (\\key action;)" +msgstr "Nehmen oder hinlegen (\\key action;)" + +msgid "..in front" +msgstr "..vorne" + +msgid "..behind" +msgstr "..hinten" + +msgid "..power cell" +msgstr "..Batterie" + +msgid "Instructions for the mission (\\key help;)" +msgstr "Anweisungen über die Mission(\\key help;)" + +msgid "Take off to finish the mission" +msgstr "Abheben nach vollbrachter Mission" + +msgid "Build a derrick" +msgstr "Baut einen Bohrturm" + +msgid "Build a power station" +msgstr "Baut ein Kraftwerk" + +msgid "Build a bot factory" +msgstr "Baut eine Roboterfabrik" + +msgid "Build a repair center" +msgstr "Baut ein Reparaturzentrum" + +msgid "Build a converter" +msgstr "Baut einen Konverter" + +msgid "Build a defense tower" +msgstr "Baut einen Geschützturm" + +msgid "Build a research center" +msgstr "Baut ein Forschungszentrum" + +msgid "Build a radar station" +msgstr "Baut ein Radar" + +msgid "Build a power cell factory" +msgstr "Baut eine Batteriefabrik" + +msgid "Build an autolab" +msgstr "Baut ein automatisches Labor" + +msgid "Build a nuclear power plant" +msgstr "Baut eine Brennstoffzellenfabrik" + +msgid "Build a lightning conductor" +msgstr "Baut einen Blitzableiter" + +msgid "Build a exchange post" +msgstr "Baut einen Infoserver" + +msgid "Show if the ground is flat" +msgstr "Zeigt ob der Boden eben ist" + +msgid "Plant a flag" +msgstr "Setzt eine Fahne" + +msgid "Remove a flag" +msgstr "Sammelt die Fahne ein" + +msgid "\\Blue flags" +msgstr "\\Blaue Fahne" + +msgid "\\Red flags" +msgstr "\\Rote Fahne" + +msgid "\\Green flags" +msgstr "\\Grüne Fahne" + +msgid "\\Yellow flags" +msgstr "\\Gelbe Fahne" + +msgid "\\Violet flags" +msgstr "\\Violette Fahne" + +msgid "Build a winged grabber" +msgstr "Baut einen Jettransporter" + +msgid "Build a tracked grabber" +msgstr "Baut einen Kettentransporter" + +msgid "Build a wheeled grabber" +msgstr "Baut einen Radtransporter" + +msgid "Build a legged grabber" +msgstr "Baut einen Krabbeltransporter" + +msgid "Build a winged shooter" +msgstr "Baut einen Jetshooter" + +msgid "Build a tracked shooter" +msgstr "Baut einen Kettenshooter" + +msgid "Build a wheeled shooter" +msgstr "Baut einen Radshooter" + +msgid "Build a legged shooter" +msgstr "Baut einen Krabbelshooter" + +msgid "Build a winged orga shooter" +msgstr "Baut einen Jetorgashooter" + +msgid "Build a tracked orga shooter" +msgstr "Baut einen Kettenorgashooter" + +msgid "Build a wheeled orga shooter" +msgstr "Baut einen Radorgashooter" + +msgid "Build a legged orga shooter" +msgstr "Baut einen Krabbelorgashooter" + +msgid "Build a winged sniffer" +msgstr "Baut einen Jetschnüffler" + +msgid "Build a tracked sniffer" +msgstr "Baut einen Kettenschnüffler" + +msgid "Build a wheeled sniffer" +msgstr "Baut einen Radschnüffler" + +msgid "Build a legged sniffer" +msgstr "Baut einen Krabbelschnüffler" + +msgid "Build a thumper" +msgstr "Baut einen Stampfer" + +msgid "Build a phazer shooter" +msgstr "Baut einen Phazershooter" + +msgid "Build a recycler" +msgstr "Baut einen Recycler" + +msgid "Build a shielder" +msgstr "Baut einen Schutzschild" + +msgid "Build a subber" +msgstr "Baut einen Kettentaucher" + +msgid "Run research program for tracked bots" +msgstr "Forschungsprogramm Kettenantrieb" + +msgid "Run research program for winged bots" +msgstr "Forschungsprogramm Jetantrieb" + +msgid "Run research program for thumper" +msgstr "Forschungsprogramm Stampfer" + +msgid "Run research program for shooter" +msgstr "Forschungsprogramm Shooterkanone" + +msgid "Run research program for defense tower" +msgstr "Forschungsprogramm Geschützturm" + +msgid "Run research program for phazer shooter" +msgstr "Forschungsprogramm Phazerkanone" + +msgid "Run research program for shielder" +msgstr "Forschungsprogramm Schutzschild" + +msgid "Run research program for nuclear power" +msgstr "Forschungsprogramm Brennstoffzelle" + +msgid "Run research program for legged bots" +msgstr "Forschungsprogramm Krabbelantrieb" + +msgid "Run research program for orga shooter" +msgstr "Forschungsprogramm Orgashooterkanone" + +msgid "Return to start" +msgstr "Alles zurücksetzen" + +msgid "Sniff (\\key action;)" +msgstr "Schnüffeln (\\key action;)" + +msgid "Thump (\\key action;)" +msgstr "Stampfen (\\key action;)" + +msgid "Shoot (\\key action;)" +msgstr "Feuer (\\key action;)" + +msgid "Recycle (\\key action;)" +msgstr "Recyceln (\\key action;)" + +msgid "Extend shield (\\key action;)" +msgstr "Schutzschild ausfahren (\\key action;)" + +msgid "Withdraw shield (\\key action;)" +msgstr "Schutzschild einholen (\\key action;)" + +msgid "Shield radius" +msgstr "Reichweite Schutzschild" + +msgid "Execute the selected program" +msgstr "Gewähltes Programm ausführen" + +msgid "Edit the selected program" +msgstr "Gewähltes Programm bearbeiten" + +msgid "\\SatCom on standby" +msgstr "\\SatCom in Standby" + +msgid "Destroy the building" +msgstr "Gebäude sprengen" + +msgid "Energy level" +msgstr "Energievorrat" + +msgid "Shield level" +msgstr "Schäden" + +msgid "Jet temperature" +msgstr "Triebwerktemperatur" + +msgid "Still working ..." +msgstr "Prozess im Gang ..." + +msgid "Number of insects detected" +msgstr "Anzahl erfasster Insekten" + +msgid "Transmitted information" +msgstr "Gesendete Informationen" + +msgid "Compass" +msgstr "Kompass" + +msgid "Mini-map" +msgstr "Minikarte" + +msgid "Zoom mini-map" +msgstr "Zoom Minikarte" + +msgid "Camera (\\key camera;)" +msgstr "Kamera (\\key camera;)" + +msgid "Camera to left" +msgstr "Kamera links" + +msgid "Camera to right" +msgstr "Kamera rechts" + +msgid "Camera nearest" +msgstr "Kamera näher" + +msgid "Camera awayest" +msgstr "Kamera weiter weg" + +msgid "Help about selected object" +msgstr "Anweisungen über das ausgewählte Objekt" + +msgid "Show the solution" +msgstr "Zeigt die Lösung" + +msgid "Switch bots <-> buildings" +msgstr "Anzeige Roboter <-> Bauten" + +msgid "Show the range" +msgstr "Zeigt die Reichweite" + +msgid "\\Raise the pencil" +msgstr "\\Bleistift abheben" + +msgid "\\Use the black pencil" +msgstr "\\Schwarzen Bleistift hinunterlassen" + +msgid "\\Use the yellow pencil" +msgstr "\\Gelben Bleistift hinunterlassen" + +msgid "\\Use the orange pencil" +msgstr "\\Orangefarbenen Bleistift hinunterlassen" + +msgid "\\Use the red pencil" +msgstr "\\Roten Bleistift hinunterlassen" + +msgid "\\Use the purple pencil" +msgstr "\\Violetten Bleistift hinunterlassen" + +msgid "\\Use the blue pencil" +msgstr "\\Blauen Bleistift hinunterlassen" + +msgid "\\Use the green pencil" +msgstr "\\Grünen Bleistift hinunterlassen" + +msgid "\\Use the brown pencil" +msgstr "\\Braunen Bleistift hinunterlassen" + +msgid "\\Start recording" +msgstr "\\Aufnahme starten" + +msgid "\\Stop recording" +msgstr "\\Aufnahme stoppen" + +msgid "Show the place" +msgstr "Zeigt den Ort" + +msgid "Continue" +msgstr "Weitermachen" + +msgid "Command line" +msgstr "Befehleingabe" + +msgid "Game speed" +msgstr "Spielgeschwindigkeit" + +msgid "Back" +msgstr "Vorherg. Seite" + +msgid "Forward" +msgstr "Nächste Seite" + +msgid "Home" +msgstr "Home" + +msgid "Copy" +msgstr "Kopieren" + +msgid "Size 1" +msgstr "Größe 1" + +msgid "Size 2" +msgstr "Größe 2" + +msgid "Size 3" +msgstr "Größe 3" + +msgid "Size 4" +msgstr "Größe 4" + +msgid "Size 5" +msgstr "Größe 5" + +msgid "Instructions from Houston" +msgstr "Anweisungen von Houston" + +msgid "Dictionnary" +msgstr "Wörterbuch Englisch-Deutsch" + +msgid "Satellite report" +msgstr "Satellitenbericht" + +msgid "Programs dispatched by Houston" +msgstr "Von Houston übermittelte Programme" + +msgid "List of objects" +msgstr "Liste der Objekte" + +msgid "Programming help" +msgstr "Hilfe über Programmieren" + +msgid "Solution" +msgstr "Lösung" + +msgid "OK\\Close program editor and return to game" +msgstr "OK\\Programm kompilieren" + +msgid "Cancel\\Cancel all changes" +msgstr "Abbrechen\\Editor schließen" + +msgid "Open (Ctrl+o)" +msgstr "Öffnen (Ctrl+o)" + +msgid "Save (Ctrl+s)" +msgstr "Speichern (Ctrl+s)" + +msgid "Undo (Ctrl+z)" +msgstr "Widerrufen (Ctrl+z)" + +msgid "Cut (Ctrl+x)" +msgstr "Ausschneiden (Ctrl+x)" + +msgid "Copy (Ctrl+c)" +msgstr "Kopieren (Ctrl+c)" + +msgid "Paste (Ctrl+v)" +msgstr "Einfügen (Ctrl+v)" + +msgid "Font size" +msgstr "Zeichengröße" + +msgid "Instructions (\\key help;)" +msgstr "Anweisungen (\\key help;)" + +msgid "Programming help (\\key prog;)" +msgstr "Hilfe über Programmieren (\\key prog;)" + +msgid "Compile" +msgstr "Kompilieren" + +msgid "Execute/stop" +msgstr "Start/Stop" + +msgid "Pause/continue" +msgstr "Pause/Weitermachen" + +msgid "One step" +msgstr "Ein Schritt" + +msgid "Gantry crane" +msgstr "Träger" + +msgid "Spaceship" +msgstr "Raumschiff" + +msgid "Derrick" +msgstr "Bohrturm" + +msgid "Bot factory" +msgstr "Roboterfabrik" + +msgid "Repair center" +msgstr "Reparaturzentrum" + +msgid "Destroyer" +msgstr "Einstampfer" + +msgid "Power station" +msgstr "Kraftwerk" + +msgid "Converts ore to titanium" +msgstr "Konverter Erz-Titan" + +msgid "Defense tower" +msgstr "Geschützturm" + +msgid "Nest" +msgstr "Orgastoffquelle" + +msgid "Research center" +msgstr "Forschungszentrum" + +msgid "Radar station" +msgstr "Radar" + +msgid "Information exchange post" +msgstr "Infoserver" + +msgid "Disintegrator" +msgstr "Auflöser" + +msgid "Power cell factory" +msgstr "Batteriefabrik" + +msgid "Autolab" +msgstr "Automatisches Labor" + +msgid "Nuclear power station" +msgstr "Brennstoffzellenfabrik" + +msgid "Lightning conductor" +msgstr "Blitzableiter" + +msgid "Vault" +msgstr "Bunker" + +msgid "Houston Mission Control" +msgstr "Kontrollzentrum" + +msgid "Target" +msgstr "Zielscheibe" + +msgid "Start" +msgstr "Startfläche" + +msgid "Finish" +msgstr "Zielfläche" + +msgid "Titanium ore" +msgstr "Titanerz" + +msgid "Uranium ore" +msgstr "Platinerz" + +msgid "Organic matter" +msgstr "Orgastoff" + +msgid "Titanium" +msgstr "Titan" + +msgid "Power cell" +msgstr "Elektrolytische Batterie" + +msgid "Nuclear power cell" +msgstr "Brennstoffzelle" + +msgid "Black box" +msgstr "Flugschreiber" + +msgid "Key A" +msgstr "Schlüssel A" + +msgid "Key B" +msgstr "Schlüssel B" + +msgid "Key C" +msgstr "Schlüssel C" + +msgid "Key D" +msgstr "Schlüssel D" + +msgid "Explosive" +msgstr "Sprengstoff" + +msgid "Fixed mine" +msgstr "Landmine" + +msgid "Survival kit" +msgstr "Überlebenskit" + +msgid "Checkpoint" +msgstr "Checkpoint" + +msgid "Blue flag" +msgstr "Blaue Fahne" + +msgid "Red flag" +msgstr "Rote Fahne" + +msgid "Green flag" +msgstr "Grüne Fahne" + +msgid "Yellow flag" +msgstr "Gelbe Fahne" + +msgid "Violet flag" +msgstr "Violette Fahne" + +msgid "Energy deposit (site for power station)" +msgstr "Markierung für unterirdische Energiequelle" + +msgid "Uranium deposit (site for derrick)" +msgstr "Markierung für unterirdisches Platinvorkommen" + +msgid "Found key A (site for derrick)" +msgstr "Markierung für vergrabenen Schlüssel A" + +msgid "Found key B (site for derrick)" +msgstr "Markierung für vergrabenen Schlüssel B" + +msgid "Found key C (site for derrick)" +msgstr "Markierung für vergrabenen Schlüssel C" + +msgid "Found key D (site for derrick)" +msgstr "Markierung für vergrabenen Schlüssel D" + +msgid "Titanium deposit (site for derrick)" +msgstr "Markierung für unterirdisches Titanvorkommen" + +msgid "Practice bot" +msgstr "Übungsroboter" + +msgid "Winged grabber" +msgstr "Transporter" + +msgid "Tracked grabber" +msgstr "Transporter" + +msgid "Wheeled grabber" +msgstr "Transporter" + +msgid "Legged grabber" +msgstr "Transporter" + +msgid "Winged shooter" +msgstr "Shooter" + +msgid "Tracked shooter" +msgstr "Shooter" + +msgid "Wheeled shooter" +msgstr "Shooter" + +msgid "Legged shooter" +msgstr "Shooter" + +msgid "Winged orga shooter" +msgstr "OrgaShooter" + +msgid "Tracked orga shooter" +msgstr "OrgaShooter" + +msgid "Wheeled orga shooter" +msgstr "OrgaShooter" + +msgid "Legged orga shooter" +msgstr "OrgaShooter" + +msgid "Winged sniffer" +msgstr "Schnüffler" + +msgid "Tracked sniffer" +msgstr "Schnüffler" + +msgid "Wheeled sniffer" +msgstr "Schnüffler" + +msgid "Legged sniffer" +msgstr "Schnüffler" + +msgid "Thumper" +msgstr "Stampfer" + +msgid "Phazer shooter" +msgstr "Phazershooter" + +msgid "Recycler" +msgstr "Recycler" + +msgid "Shielder" +msgstr "Schutzschild" + +msgid "Subber" +msgstr "Kettentaucher" + +msgid "Target bot" +msgstr "Mobile Zielscheibe" + +msgid "Drawer bot" +msgstr "Zeichner" + +msgid "Engineer" +msgstr "Techniker" + +msgid "Robbie" +msgstr "Robby" + +msgid "Alien Queen" +msgstr "Insektenkönigin" + +msgid "Ant" +msgstr "Ameise" + +msgid "Spider" +msgstr "Spinne" + +msgid "Wasp" +msgstr "Wespe" + +msgid "Worm" +msgstr "Wurm" + +msgid "Egg" +msgstr "Ei" + +msgid "Wreckage" +msgstr "Roboterwrack" + +msgid "Ruin" +msgstr "Gebäuderuine" + +msgid "Waste" +msgstr "Abfall" + +msgid "Spaceship ruin" +msgstr "Raumschiffruine" + +msgid "Remains of Apollo mission" +msgstr "Überreste einer Apollo-Mission" + +msgid "Lunar Roving Vehicle" +msgstr "Lunar Roving Vehicle" + +msgid "Error" +msgstr "Fehler" + +msgid "Unknown command" +msgstr "Befehl unbekannt" + +msgid "CeeBot not installed." +msgstr "CeeBot wurde nicht installiert." + +msgid "" +"Please insert the CeeBot CD\n" +"and re-run the game." +msgstr "Legen Sie die CeeBot-CD ein\nund starten Sie das Spiel neu." + +msgid "COLOBOT not installed." +msgstr "COLOBOT wurde nicht installiert." + +msgid "" +"Please insert the COLOBOT CD\n" +"and re-run the game." +msgstr "Legen Sie die COLOBOT-CD ein\nund starten Sie das Spiel neu." + +msgid "Inappropriate bot" +msgstr "Roboter ungeeignet" + +msgid "Impossible when flying" +msgstr "Im Flug unmöglich" + +msgid "Already carrying something" +msgstr "Trägt schon etwas" + +msgid "Nothing to grab" +msgstr "Nichts zu ergreifen" + +msgid "Impossible when moving" +msgstr "In Fahrt unmöglich" + +msgid "Place occupied" +msgstr "Stelle schon besetzt" + +msgid "No other robot" +msgstr "Kein anderer Roboter" + +msgid "You can not carry a radioactive object" +msgstr "Sie können keinen radioaktiven Gegenstand tragen" + +msgid "You can not carry an object under water" +msgstr "Sie können unter Wasser nichts tragen" + +msgid "Nothing to drop" +msgstr "Nichts abzulegen" + +msgid "Impossible under water" +msgstr "Unter Wasser unmöglich" + +msgid "Not enough energy" +msgstr "Nicht genug Energie" + +msgid "Titanium too far away" +msgstr "Titan zu weit weg" + +msgid "Titanium too close" +msgstr "Titan zu nahe" + +msgid "No titanium around" +msgstr "Kein Titan vorhanden" + +msgid "Ground not flat enough" +msgstr "Boden nicht eben genug" + +msgid "Flat ground not large enough" +msgstr "Ebener Boden nicht groß genug" + +msgid "Too close to space ship" +msgstr "Zu nahe am Raumschiff" + +msgid "Too close to a building" +msgstr "Zu nahe an einem Gebäude" + +msgid "Ground inappropriate" +msgstr "Boden ungeeignet" + +msgid "Building too close" +msgstr "Gebäude zu nahe" + +msgid "Object too close" +msgstr "Gegenstand zu nahe" + +msgid "Nothing to recycle" +msgstr "Nichts zu recyceln" + +msgid "No more energy" +msgstr "Keine Energie mehr" + +msgid "Error in instruction move" +msgstr "Ziel kann nicht erreicht werden" + +msgid "Object not found" +msgstr "Das Objekt existiert nicht" + +msgid "Goto: inaccessible destination" +msgstr "Ziel kann nicht erreicht werden" + +msgid "Goto: destination occupied" +msgstr "Ziel ist schon besetzt" + +msgid "No titanium ore to convert" +msgstr "Kein konvertierbares Titanerz vorhanden" + +msgid "No ore in the subsoil" +msgstr "Keine unterirdische Erzlagerstätte" + +msgid "No energy in the subsoil" +msgstr "Kein unterirdisches Energievorkommen" + +msgid "No power cell" +msgstr "Keine Batterie" + +msgid "Inappropriate cell type" +msgstr "Falscher Batterietyp" + +msgid "Research program already performed" +msgstr "Forschungsprogramm schon ausgeführt" + +msgid "Not enough energy yet" +msgstr "Noch nicht genug Energie" + +msgid "No titanium to transform" +msgstr "Kein konvertierbares Titanerz vorhanden" + +msgid "Transforms only titanium" +msgstr "Wandelt nur Titanerz um" + +msgid "Doors blocked by a robot or another object " +msgstr "Die Türen werden von einem Gegenstand blockiert" + +msgid "You must get on the spaceship to take off " +msgstr "Gehen Sie an Bord, bevor Sie abheben" + +msgid "Nothing to analyze" +msgstr "Nichts zu analysieren" + +msgid "Analyzes only organic matter" +msgstr "Analysiert nur Orgastoff" + +msgid "Analysis already performed" +msgstr "Analyse schon durchgeführt" + +msgid "Not yet enough energy" +msgstr "Noch nicht genug Energie" + +msgid "No uranium to transform" +msgstr "Kein konvertierbares Platin" + +msgid "Transforms only uranium" +msgstr "Wandelt nur Platin um" + +msgid "No titanium" +msgstr "Kein Titan vorhanden" + +msgid "No information exchange post within range" +msgstr "Kein Infoserver in Reichweite" + +msgid "Program infected by a virus" +msgstr "Ein Programm wurde von einem Virus infiziert" + +msgid "Infected by a virus, temporarily out of order" +msgstr "Von Virus infiziert, zeitweise außer Betrieb" + +msgid "Impossible when swimming" +msgstr "Im Wasser unmöglich" + +msgid "Impossible when carrying an object" +msgstr "Unmöglich wenn Sie etwas tragen" + +msgid "Too many flags of this color (maximum 5)" +msgstr "Zu viele Fahnen dieser Farbe (Maximum 5)" + +msgid "Too close to an existing flag" +msgstr "Zu nahe an einer anderen Fahne" + +msgid "No flag nearby" +msgstr "Keine Fahne in Reichweite" + +msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgstr "Mission noch nicht beendet (Drücken Sie auf \\key help; für weitere Informationen)" + +msgid "Bot destroyed" +msgstr "Roboter zerstört" + +msgid "Building destroyed" +msgstr "Gebäude zerstört" + +msgid "Can not create this, there are too many objects" +msgstr "Kein neues Objekt kann erstellt werden (zu viele vorhanden)" + +msgid "\"%s\" missing in this exercise" +msgstr "Es fehlt \"%s\" in Ihrem Programm" + +msgid "Do not use in this exercise" +msgstr "In dieser Übung verboten" + +msgid "Building completed" +msgstr "Gebäude fertiggestellt" + +msgid "Titanium available" +msgstr "Titan verfügbar" + +msgid "Research program completed" +msgstr "Forschungsprogramm abgeschlossen" + +msgid "Plans for tracked robots available " +msgstr "Herstellung eines Roboters mit Kettenantrieb möglich" + +msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" +msgstr "Sie können jetzt mit den Tasten \\key gup; und \\key gdown; fliegen" + +msgid "Plans for thumper available" +msgstr "Herstellung eines Stampfers möglich" + +msgid "Plans for shooter available" +msgstr "Herstellung eines Shooters möglich" + +msgid "Plans for defense tower available" +msgstr "Errichtung eines Geschützturms möglich" + +msgid "Plans for phazer shooter available" +msgstr "Herstellung eines Phazershooters möglich" + +msgid "Plans for shielder available" +msgstr "Herstellung eines Schutzschildes möglich" + +msgid "Plans for nuclear power plant available" +msgstr "Errichtung einer Brennstoffzellenfabrik möglich" + +msgid "New bot available" +msgstr "Neuer Roboter verfügbar" + +msgid "Analysis performed" +msgstr "Analyse vollendet" + +msgid "Power cell available" +msgstr "Batterie verfügbar" + +msgid "Nuclear power cell available" +msgstr "Brennstoffzelle verfügbar" + +msgid "You found a usable object" +msgstr "Sie haben ein brauchbares Objekt gefunden" + +msgid "Found a site for power station" +msgstr "Geeignete Stelle für Kraftwerk gefunden" + +msgid "Found a site for a derrick" +msgstr "Geeignete Stelle für Bohrturm gefunden" + +msgid "<<< Well done, mission accomplished >>>" +msgstr "<<< Bravo, Mission vollendet >>>" + +msgid "<<< Sorry, mission failed >>>" +msgstr "<<< Mission gescheitert >>>" + +msgid "Current mission saved" +msgstr "Mission gespeichert" + +msgid "Checkpoint crossed" +msgstr "Checkpoint erreicht" + +msgid "Alien Queen killed" +msgstr "Insektenkönigin tödlich verwundet" + +msgid "Ant fatally wounded" +msgstr "Ameise tödlich verwundet" + +msgid "Wasp fatally wounded" +msgstr "Wespe tödlich verwundet" + +msgid "Worm fatally wounded" +msgstr "Wurm tödlich verwundet" + +msgid "Spider fatally wounded" +msgstr "Spinne tödlich verwundet" + +msgid "Press \\key help; to read instructions on your SatCom" +msgstr "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; drücken" + +msgid "Opening bracket missing" +msgstr "Es fehlt eine offene Klammer \"(\"" + +msgid "Closing bracket missing " +msgstr "Es fehlt eine geschlossene Klammer \")\"" + +msgid "The expression must return a boolean value" +msgstr "Der Ausdruck muss einen boolschen Wert ergeben" + +msgid "Variable not declared" +msgstr "Variable nicht deklariert" + +msgid "Assignment impossible" +msgstr "Zuweisung unmöglich" + +msgid "Semicolon terminator missing" +msgstr "Es fehlt ein Strichpunkt \";\" am Ende der Anweisung" + +msgid "Instruction \"case\" outside a block \"switch\"" +msgstr "Anweisung \"case\" ohne vorhergehende Anweisung \"switch\"" + +msgid "Instructions after the final closing brace" +msgstr "Hier ist eine Anweisung nach dem Ende des Programms" + +msgid "End of block missing" +msgstr "Es fehlt eine geschlossene geschweifte Klammer \"}\" (Ende des Blocks)" + +msgid "Instruction \"else\" without corresponding \"if\" " +msgstr "Anweisung \"else\" ohne vorhergehende Anweisung \"if\"" + +msgid "Opening brace missing " +msgstr "Es fehlt eine offene geschweifte Klammer\"{\"" + +msgid "Wrong type for the assignment" +msgstr "Der Ausdruck ergibt einen falschen Typ für die Zuweisung" + +msgid "A variable can not be declared twice" +msgstr "Eine Variable wird zum zweiten Mal deklariert" + +msgid "The types of the two operands are incompatible " +msgstr "Die zwei Operanden sind nicht kompatibel" + +msgid "Unknown function" +msgstr "Unbekannte Funktion" + +msgid "Sign \" : \" missing" +msgstr "Es fehlt ein Doppelpunkt \" : \"" + +msgid "Keyword \"while\" missing" +msgstr "Es fehlt das Wort \"while\"" + +msgid "Instruction \"break\" outside a loop" +msgstr "Anweisung \"break\" außerhalb einer Schleife" + +msgid "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"" +msgstr "Ein Label kann nur vor den Anweisungen \"for\", \"while\", \"do\" oder \"switch\" vorkommen" + +msgid "This label does not exist" +msgstr "Dieses Label existiert nicht" + +msgid "Instruction \"case\" missing" +msgstr "Es fehlt eine Anweisung \"case\"" + +msgid "Number missing" +msgstr "Es fehlt eine Zahl" + +msgid "Void parameter" +msgstr "Parameter void" + +msgid "Type declaration missing" +msgstr "Hier muss ein Variablentyp stehen" + +msgid "Variable name missing" +msgstr "Es fehlt der Name einer Variable" + +msgid "Function name missing" +msgstr "Hier muss der Name der Funktion stehen" + +msgid "Too many parameters" +msgstr "Zu viele Parameter" + +msgid "Function already exists" +msgstr "Diese Funktion gibt es schon" + +msgid "Parameters missing " +msgstr "Nicht genug Parameter" + +msgid "No function with this name accepts this kind of parameter" +msgstr "Keine Funktion mit diesem Namen verträgt Parameter diesen Typs" + +msgid "No function with this name accepts this number of parameters" +msgstr "Keine Funktion mit diesem Namen verträgt diese Anzahl Parameter" + +msgid "This is not a member of this class" +msgstr "Dieses Element gibt es nicht in dieser Klasse" + +msgid "This object is not a member of a class" +msgstr "Das Objekt ist nicht eine Instanz einer Klasse" + +msgid "Appropriate constructor missing" +msgstr "Es gibt keinen geeigneten Konstruktor" + +msgid "This class already exists" +msgstr "Diese Klasse gibt es schon" + +msgid "\" ] \" missing" +msgstr "Es fehlt eine geschlossene eckige Klammer \" ] \"" + +msgid "Reserved keyword of CBOT language" +msgstr "Dieses Wort ist reserviert" + +msgid "Bad argument for \"new\"" +msgstr "Falsche Argumente für \"new\"" + +msgid "\" [ \" expected" +msgstr "Es fehlt eine offene eckige Klammer \" [ \"" + +msgid "String missing" +msgstr "Hier wird eine Zeichenkette erwartet" + +msgid "Incorrect index type" +msgstr "Falscher Typ für einen Index" + +msgid "Private element" +msgstr "Geschütztes Element (private)" + +msgid "Public required" +msgstr "Hier muss das Wort \"public\" stehen" + +msgid "Dividing by zero" +msgstr "Teilung durch Null" + +msgid "Variable not initialized" +msgstr "Der Wert dieser Variable wurde nicht definiert" + +msgid "Negative value rejected by \"throw\"" +msgstr "Negativer Wert ungeeignet für Anweisung \"throw\"" + +msgid "The function returned no value " +msgstr "Die Funktion hat kein Ergebnis zurückgegeben" + +msgid "No function running" +msgstr "Keine Funktion wird ausgeführt" + +msgid "Calling an unknown function" +msgstr "Die aufgerufene Funktion existiert nicht" + +msgid "This class does not exist" +msgstr "Diese Klasse existiert nicht" + +msgid "Unknown Object" +msgstr "Das Objekt existiert nicht" + +msgid "Operation impossible with value \"nan\"" +msgstr "Operation mit dem Wert \"nan\"" + +msgid "Access beyond array limit" +msgstr "Zugriff im Array außerhalb der Grenzen" + +msgid "Stack overflow" +msgstr "Stack overflow" + +msgid "Illegal object" +msgstr "Objekt nicht verfügbar" + +msgid "Can't open file" +msgstr "Die Datei kann nicht geöffnet werden" + +msgid "File not open" +msgstr "Die Datei wurde nicht geöffnet" + +msgid "Read error" +msgstr "Fehler beim Lesezugriff" + +msgid "Write error" +msgstr "Fehler beim Schreibzugriff" + +msgid "< none >" +msgstr "< keine >" + +msgid "Arrow left" +msgstr "Pfeiltaste links" + +msgid "Arrow right" +msgstr "Pfeiltaste rechts" + +msgid "Arrow up" +msgstr "Pfeil nach oben" + +msgid "Arrow down" +msgstr "Pfeil nach unten" + +msgid "Control-break" +msgstr "Ctrl-Break" + +msgid "<--" +msgstr "<--" + +msgid "Tab" +msgstr "Tab" + +msgid "Clear" +msgstr "Clear" + +msgid "Enter" +msgstr "Eingabe" + +msgid "Shift" +msgstr "Shift" + +msgid "Ctrl" +msgstr "Ctrl" + +msgid "Alt" +msgstr "Alt" + +msgid "Pause" +msgstr "Pause" + +msgid "Caps Lock" +msgstr "Caps Lock" + +msgid "Esc" +msgstr "Esc" + +msgid "Space" +msgstr "Leertaste" + +msgid "Page Up" +msgstr "Page Up" + +msgid "Page Down" +msgstr "Page Down" + +msgid "End" +msgstr "End" + +msgid "Home Key" +msgstr "Home" + +msgid "Select" +msgstr "Select" + +msgid "Execute" +msgstr "Execute" + +msgid "Print Scrn" +msgstr "Print Scrn" + +msgid "Insert" +msgstr "Insert" + +msgid "Delete Key" +msgstr "Delete" + +msgid "Help" +msgstr "Help" + +msgid "Left Windows" +msgstr "Left Windows" + +msgid "Right Windows" +msgstr "Right Windows" + +msgid "Application key" +msgstr "Application key" + +msgid "NumPad 0" +msgstr "NumPad 0" + +msgid "NumPad 1" +msgstr "NumPad 1" + +msgid "NumPad 2" +msgstr "NumPad 2" + +msgid "NumPad 3" +msgstr "NumPad 3" + +msgid "NumPad 4" +msgstr "NumPad 4" + +msgid "NumPad 5" +msgstr "NumPad 5" + +msgid "NumPad 6" +msgstr "NumPad 6" + +msgid "NumPad 7" +msgstr "NumPad 7" + +msgid "NumPad 8" +msgstr "NumPad 8" + +msgid "NumPad 9" +msgstr "NumPad 9" + +msgid "NumPad *" +msgstr "NumPad *" + +msgid "NumPad +" +msgstr "NumPad +" + +msgid "NumPad sep" +msgstr "NumPad sep" + +msgid "NumPad -" +msgstr "NumPad -" + +msgid "NumPad ." +msgstr "NumPad ." + +msgid "NumPad /" +msgstr "NumPad /" + +msgid "F1" +msgstr "F1" + +msgid "F2" +msgstr "F2" + +msgid "F3" +msgstr "F3" + +msgid "F4" +msgstr "F4" + +msgid "F5" +msgstr "F5" + +msgid "F6" +msgstr "F6" + +msgid "F7" +msgstr "F7" + +msgid "F8" +msgstr "F8" + +msgid "F9" +msgstr "F9" + +msgid "F10" +msgstr "F10" + +msgid "F11" +msgstr "F11" + +msgid "F12" +msgstr "F12" + +msgid "F13" +msgstr "F13" + +msgid "F14" +msgstr "F14" + +msgid "F15" +msgstr "F15" + +msgid "F16" +msgstr "F16" + +msgid "F17" +msgstr "F17" + +msgid "F18" +msgstr "F18" + +msgid "F19" +msgstr "F19" + +msgid "F20" +msgstr "F20" + +msgid "Num Lock" +msgstr "Num Lock" + +msgid "Scroll" +msgstr "Scroll" + +msgid "Attn" +msgstr "Attn" + +msgid "CrSel" +msgstr "CrSel" + +msgid "ExSel" +msgstr "ExSel" + +msgid "Erase EOF" +msgstr "Erase EOF" + +msgid "Play" +msgstr "Play" + +msgid "Zoom" +msgstr "Zoom" + +msgid "PA1" +msgstr "PA1" + +msgid "Button 1" +msgstr "Knopf 1" + +msgid "Button 2" +msgstr "Knopf 2" + +msgid "Button 3" +msgstr "Knopf 3" + +msgid "Button 4" +msgstr "Knopf 4" + +msgid "Button 5" +msgstr "Knopf 5" + +msgid "Button 6" +msgstr "Knopf 6" + +msgid "Button 7" +msgstr "Knopf 7" + +msgid "Button 8" +msgstr "Knopf 8" + +msgid "Button 9" +msgstr "Knopf 9" + +msgid "Button 10" +msgstr "Knopf 10" + +msgid "Button 11" +msgstr "Knopf 11" + +msgid "Button 12" +msgstr "Knopf 12" + +msgid "Button 13" +msgstr "Knopf 13" + +msgid "Button 14" +msgstr "Knopf 14" + +msgid "Button 15" +msgstr "Knopf 15" + +msgid "Button 16" +msgstr "Knopf 16" + +msgid "Button 17" +msgstr "Knopf 17" + +msgid "Button 18" +msgstr "Knopf 18" + +msgid "Button 19" +msgstr "Knopf 19" + +msgid "Button 20" +msgstr "Knopf 20" + +msgid "Button 21" +msgstr "Knopf 21" + +msgid "Button 22" +msgstr "Knopf 22" + +msgid "Button 23" +msgstr "Knopf 23" + +msgid "Button 24" +msgstr "Knopf 24" + +msgid "Button 25" +msgstr "Knopf 25" + +msgid "Button 26" +msgstr "Knopf 26" + +msgid "Button 27" +msgstr "Knopf 27" + +msgid "Button 28" +msgstr "Knopf 28" + +msgid "Button 29" +msgstr "Knopf 29" + +msgid "Button 30" +msgstr "Knopf 30" + +msgid "Button 31" +msgstr "Knopf 31" + +msgid "Button 32" +msgstr "Knopf 32" + +msgid "Wheel up" +msgstr "Mausrad nach vorne" + +msgid "Wheel down" +msgstr "Mausrad zurück" diff --git a/src/po/fr.po b/src/po/fr.po new file mode 100644 index 0000000..c70a77e --- /dev/null +++ b/src/po/fr.po @@ -0,0 +1,2097 @@ +msgid "1.18 /e" +msgstr "1.18 /f" + +msgid "CeeBot-A 1.18" +msgstr "CeeBot-A 1.18" + +msgid "CeeBot-Teen EDU 1.18" +msgstr "CeeBot-Teen EDU 1.18" + +msgid "CeeBot-A EDU 1.18" +msgstr "CeeBot-A EDU 1.18" + +msgid "CeeBot-Teen PERSO 1.18" +msgstr "CeeBot-Teen PERSO 1.18" + +msgid "CeeBot-A PERSO 1.18" +msgstr "CeeBot-A PERSO 1.18" + +msgid "CeeBot-Teen DEMO 1.18" +msgstr "CeeBot-Teen DEMO 1.18" + +msgid "CeeBot-A DEMO 1.18" +msgstr "CeeBot-A DEMO 1.18" + +msgid "Demo 1.18 /e" +msgstr "Demo 1.18 /f" + +msgid "SatCom" +msgstr "SatCom" + +msgid "Maximize" +msgstr "Taille maximale" + +msgid "Minimize" +msgstr "Taille réduite" + +msgid "Normal size" +msgstr "Taille normale" + +msgid "Close" +msgstr "Fermer" + +msgid "Program editor" +msgstr "Edition du programme" + +msgid "New" +msgstr "Nouveau" + +msgid "Player" +msgstr "Joueur" + +msgid "New ..." +msgstr "Nouveau ..." + +msgid " or " +msgstr " ou " + +msgid "CeeBot" +msgstr "CeeBot" + +msgid "COLOBOT" +msgstr "COLOBOT" + +msgid "Programming exercises" +msgstr "Programmation" + +msgid "Challenges" +msgstr "Défis" + +msgid "Missions" +msgstr "Missions" + +msgid "Free game" +msgstr "Jeu libre" + +msgid "User levels" +msgstr "Niveaux supplémentaires" + +msgid "Prototypes" +msgstr "Prototypes" + +msgid "Options" +msgstr "Options" + +msgid "Player's name" +msgstr "Nom du joueur" + +msgid "Customize your appearance" +msgstr "Personnalisation de votre apparence" + +msgid "Save the current mission" +msgstr "Enregistrement de la mission en cours" + +msgid "Load a saved mission" +msgstr "Chargement d'une mission enregistrée" + +msgid " Chapters:" +msgstr " Liste des chapitres :" + +msgid " Planets:" +msgstr " Liste des plančtes :" + +msgid " User levels:" +msgstr " Niveaux supplémentaires :" + +msgid " Exercises in the chapter:" +msgstr " Liste des exercices du chapitre :" + +msgid " Challenges in the chapter:" +msgstr " Liste des défis du chapitre :" + +msgid " Missions on this planet:" +msgstr " Liste des missions du chapitre :" + +msgid " Free game on this planet:" +msgstr " Liste des jeux libres du chapitre :" + +msgid " Missions on this level:" +msgstr " Missions du niveau :" + +msgid " Prototypes on this planet:" +msgstr " Liste des prototypes du chapitre :" + +msgid " Free game on this chapter:" +msgstr " Liste des jeux libres du chapitre :" + +msgid " Summary:" +msgstr " Résumé :" + +msgid " Drivers:" +msgstr " Pilotes :" + +msgid " Resolution:" +msgstr " Résolutions :" + +msgid "1) First click on the key you want to redefine." +msgstr "1) Cliquez d'abord sur la touche ŕ redéfinir." + +msgid "2) Then press the key you want to use instead." +msgstr "2) Appuyez ensuite sur la nouvelle touche souhaitée." + +msgid "Face type:" +msgstr "Type de visage :" + +msgid "Eyeglasses:" +msgstr "Lunettes :" + +msgid "Hair color:" +msgstr "Couleur des cheveux :" + +msgid "Suit color:" +msgstr "Couleur de la combinaison :" + +msgid "Strip color:" +msgstr "Couleur des bandes :" + +msgid "Do you want to quit CeeBot ?" +msgstr "Voulez-vous quitter CeeBot ?" + +msgid "Quit\\Quit CeeBot" +msgstr "Quitter\\Quitter CeeBot" + +msgid "Do you want to quit COLOBOT ?" +msgstr "Voulez-vous quitter COLOBOT ?" + +msgid "Quit\\Quit COLOBOT" +msgstr "Quitter\\Quitter COLOBOT" + +msgid "Quit the mission?" +msgstr "Quitter la mission ?" + +msgid "Abort\\Abort the current mission" +msgstr "Abandonner\\Abandonner la mission en cours" + +msgid "Continue\\Continue the current mission" +msgstr "Continuer\\Continuer la mission en cours" + +msgid "Continue\\Continue the game" +msgstr "Continuer\\Continuer de jouer" + +msgid "Do you really want to destroy the selected building?" +msgstr "Voulez-vous vraiment détruire le bâtiment sélectionné ?" + +msgid "Do you want to delete %s's saved games? " +msgstr "Voulez-vous détruire les sauvegardes de %s ?" + +msgid "Delete" +msgstr "Détruire" + +msgid "Cancel" +msgstr "Annuler" + +msgid "LOADING" +msgstr "CHARGEMENT" + +msgid "Keyword help(\\key cbot;)" +msgstr "Aide sur le mot-clé (\\key cbot;)" + +msgid "Compilation ok (0 errors)" +msgstr "Compilation ok (0 erreur)" + +msgid "Program finished" +msgstr "Programme terminé" + +msgid "\\b;List of objects\n" +msgstr "\\b;Listes des objets\n" + +msgid "\\b;Robots\n" +msgstr "\\b;Listes des robots\n" + +msgid "\\b;Buildings\n" +msgstr "\\b;Listes des bâtiments\n" + +msgid "\\b;Moveable objects\n" +msgstr "\\b;Listes des objets transportables\n" + +msgid "\\b;Aliens\n" +msgstr "\\b;Listes des ennemis\n" + +msgid "\\c; (none)\\n;\n" +msgstr "\\c; (aucun)\\n;\n" + +msgid "\\b;Error\n" +msgstr "\\b;Erreur\n" + +msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" +msgstr "Liste non disponible sans \\l;radar\\u object\\radar; !\n" + +msgid "Open" +msgstr "Ouvrir" + +msgid "Save" +msgstr "Enregistrer" + +msgid "Folder: %s" +msgstr "Dossier: %s" + +msgid "Name:" +msgstr "Nom:" + +msgid "Folder:" +msgstr "Dans:" + +msgid "Private\\Private folder" +msgstr "Privé\\Dossier privé" + +msgid "Public\\Common folder" +msgstr "Public\\Dossier commun ŕ tous les joueurs" + +msgid "Developed by :" +msgstr "Développé par :" + +msgid "www.epsitec.com" +msgstr "www.epsitec.com" + +msgid " " +msgstr " " + +msgid "Recorder" +msgstr "Enregistreur" + +msgid "OK" +msgstr "D'accord" + +msgid "Next" +msgstr "Suivant" + +msgid "Previous" +msgstr "Précédent" + +msgid "Menu (\\key quit;)" +msgstr "Menu (\\key quit;)" + +msgid "Exercises\\Programming exercises" +msgstr "Programmation\\Exercices de programmation" + +msgid "Challenges\\Programming challenges" +msgstr "Défis\\Défis de programmation" + +msgid "Missions\\Select mission" +msgstr "Missions\\La grande aventure" + +msgid "Free game\\Free game without a specific goal" +msgstr "Jeu libre\\Jeu libre sans but précis" + +msgid "User\\User levels" +msgstr "Suppl.\\Niveaux supplémentaires" + +msgid "Proto\\Prototypes under development" +msgstr "Proto\\Prototypes en cours d'élaboration" + +msgid "New player\\Choose player's name" +msgstr "Autre joueur\\Choix du nom du joueur" + +msgid "Options\\Preferences" +msgstr "Options\\Réglages" + +msgid "Restart\\Restart the mission from the beginning" +msgstr "Recommencer\\Recommencer la mission au début" + +msgid "Save\\Save the current mission " +msgstr "Enregistrer\\Enregistrer la mission en cours" + +msgid "Load\\Load a saved mission" +msgstr "Charger\\Charger une mission enregistrée" + +msgid "\\Return to CeeBot" +msgstr "\\Retourner dans CeeBot" + +msgid "\\Return to COLOBOT" +msgstr "\\Retourner dans COLOBOT" + +msgid "<< Back \\Back to the previous screen" +msgstr "<< Retour \\Retour au niveau précédent" + +msgid "Play\\Start mission!" +msgstr "Jouer ...\\Démarrer l'action" + +msgid "Device\\Driver and resolution settings" +msgstr "Affichage\\Pilote et résolution d'affichage" + +msgid "Graphics\\Graphics settings" +msgstr "Graphique\\Options graphiques" + +msgid "Game\\Game settings" +msgstr "Jeu\\Options de jouabilité" + +msgid "Controls\\Keyboard, joystick and mouse settings" +msgstr "Commandes\\Touches du clavier" + +msgid "Sound\\Music and game sound volume" +msgstr "Son\\Volumes bruitages & musiques" + +msgid "Unit" +msgstr "Unité" + +msgid "Resolution" +msgstr "Résolution" + +msgid "Full screen\\Full screen or window mode" +msgstr "Plein écran\\Plein écran ou fenętré" + +msgid "Apply changes\\Activates the changed settings" +msgstr "Appliquer les changements\\Active les changements effectués" + +msgid "Robbie\\Your assistant" +msgstr "Robbie\\Votre assistant" + +msgid "Shadows\\Shadows on the ground" +msgstr "Ombres\\Ombres projetées au sol" + +msgid "Marks on the ground\\Marks on the ground" +msgstr "Marques sur le sol\\Marques dessinées sur le sol" + +msgid "Dust\\Dust and dirt on bots and buildings" +msgstr "Salissures\\Salissures des robots et bâtiments" + +msgid "Fog\\Fog" +msgstr "Brouillard\\Nappes de brouillard" + +msgid "Sunbeams\\Sunbeams in the sky" +msgstr "Rayons du soleil\\Rayons selon l'orientation" + +msgid "Sky\\Clouds and nebulae" +msgstr "Ciel\\Ciel et nuages" + +msgid "Planets and stars\\Astronomical objects in the sky" +msgstr "Plančtes et étoiles\\Motifs mobiles dans le ciel" + +msgid "Dynamic lighting\\Mobile light sources" +msgstr "Lumičres dynamiques\\Eclairages mobiles" + +msgid "Number of particles\\Explosions, dust, reflections, etc." +msgstr "Quantité de particules\\Explosions, poussičres, reflets, etc." + +msgid "Depth of field\\Maximum visibility" +msgstr "Profondeur de champ\\Distance de vue maximale" + +msgid "Details\\Visual quality of 3D objects" +msgstr "Détails des objets\\Qualité des objets en 3D" + +msgid "Textures\\Quality of textures " +msgstr "Qualité des textures\\Qualité des images" + +msgid "Num of decorative objects\\Number of purely ornamental objects" +msgstr "Nb d'objets décoratifs\\Qualité d'objets non indispensables" + +msgid "Particles in the interface\\Steam clouds and sparks in the interface" +msgstr "Particules dans l'interface\\Pluie de particules" + +msgid "Reflections on the buttons \\Shiny buttons" +msgstr "Reflets sur les boutons\\Boutons brillants" + +msgid "Help balloons\\Explain the function of the buttons" +msgstr "Bulles d'aide\\Bulles explicatives" + +msgid "Film sequences\\Films before and after the missions" +msgstr "Séquences cinématiques\\Films avant ou aprčs une mission" + +msgid "Exit film\\Film at the exit of exercises" +msgstr "Retour animé\\Retour animé dans les exercices" + +msgid "Friendly fire\\Your shooting can damage your own objects " +msgstr "Dégâts ŕ soi-męme\\Vos tirs infligent des dommages ŕ vos unités" + +msgid "Scrolling\\Scrolling when the mouse touches right or left border" +msgstr "Défilement dans les bords\\Défilement lorsque la souris touches les bords gauche ou droite" + +msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" +msgstr "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord" + +msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" +msgstr "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord" + +msgid "Quake at explosions\\The screen shakes at explosions" +msgstr "Secousses lors d'explosions\\L'écran vibre lors d'une explosion" + +msgid "Mouse shadow\\Gives the mouse a shadow" +msgstr "Souris ombrée\\Jolie souris avec une ombre" + +msgid "Automatic indent\\When program editing" +msgstr "Indentation automatique\\Pendant l'édition d'un programme" + +msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" +msgstr "Grande indentation\\Indente avec 2 ou 4 espaces" + +msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" +msgstr "Accčs aux solutions\\Programme \"4: Solution\" dans les exercices" + +msgid "Standard controls\\Standard key functions" +msgstr "Tout réinitialiser\\Remet toutes les touches standards" + +msgid "Turn left\\turns the bot to the left" +msgstr "Tourner ŕ gauche\\Moteur ŕ gauche" + +msgid "Turn right\\turns the bot to the right" +msgstr "Tourner ŕ droite\\Moteur ŕ droite" + +msgid "Forward\\Moves forward" +msgstr "Avancer\\Moteur en avant" + +msgid "Backward\\Moves backward" +msgstr "Reculer\\Moteur en arričre" + +msgid "Climb\\Increases the power of the jet" +msgstr "Monter\\Augmenter la puissance du réacteur" + +msgid "Descend\\Reduces the power of the jet" +msgstr "Descendre\\Diminuer la puissance du réacteur" + +msgid "Change camera\\Switches between onboard camera and following camera" +msgstr "Changement de caméra\\Autre de point de vue" + +msgid "Previous object\\Selects the previous object" +msgstr "Sélection précédente\\Sélectionne l'objet précédent" + +msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Action standard\\Action du bouton avec le cadre rouge" + +msgid "Camera closer\\Moves the camera forward" +msgstr "Caméra plus proche\\Avance la caméra" + +msgid "Camera back\\Moves the camera backward" +msgstr "Caméra plus loin\\Recule la caméra" + +msgid "Next object\\Selects the next object" +msgstr "Sélectionner l'objet suivant\\Sélectionner l'objet suivant" + +msgid "Select the astronaut\\Selects the astronaut" +msgstr "Sélectionner le cosmonaute\\Sélectionner le cosmonaute" + +msgid "Quit\\Quit the current mission or exercise" +msgstr "Quitter la mission en cours\\Terminer un exercice ou une mssion" + +msgid "Instructions\\Shows the instructions for the current mission" +msgstr "Instructions mission\\Marche ŕ suivre" + +msgid "Programming help\\Gives more detailed help with programming" +msgstr "Instructions programmation\\Explication sur la programmation" + +msgid "Key word help\\More detailed help about key words" +msgstr "Instructions mot-clé\\Explication sur le mot-clé" + +msgid "Origin of last message\\Shows where the last message was sent from" +msgstr "Montrer le lieu d'un message\\Montrer le lieu du dernier message" + +msgid "Speed 1.0x\\Normal speed" +msgstr "Vitesse 1.0x\\Vitesse normale" + +msgid "Speed 1.5x\\1.5 times faster" +msgstr "Vitesse 1.5x\\Une fois et demi plus rapide" + +msgid "Speed 2.0x\\Double speed" +msgstr "Vitesse 2.0x\\Deux fois plus rapide" + +msgid "Speed 3.0x\\Three times faster" +msgstr "Vitesse 3.0x\\Trois fois plus rapide" + +msgid "Sound effects:\\Volume of engines, voice, shooting, etc." +msgstr "Bruitages :\\Volume des moteurs, voix, etc." + +msgid "Background sound :\\Volume of audio tracks on the CD" +msgstr "Fond sonore :\\Volume des pistes audio du CD" + +msgid "3D sound\\3D positioning of the sound" +msgstr "Bruitages 3D\\Positionnement sonore dans l'espace" + +msgid "Lowest\\Minimum graphic quality (highest frame rate)" +msgstr "Mini\\Qualité minimale (+ rapide)" + +msgid "Normal\\Normal graphic quality" +msgstr "Normal\\Qualité standard" + +msgid "Highest\\Highest graphic quality (lowest frame rate)" +msgstr "Maxi\\Haute qualité (+ lent)" + +msgid "Mute\\No sound" +msgstr "Silencieux\\Totalement silencieux" + +msgid "Normal\\Normal sound volume" +msgstr "Normal\\Niveaux normaux" + +msgid "Use a joystick\\Joystick or keyboard" +msgstr "Utilise un joystick\\Joystick ou clavier" + +msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "Accčs ŕ la solution\\Donne la solution" + +msgid "\\New player name" +msgstr "\\Nom du joueur ŕ créer" + +msgid "OK\\Choose the selected player" +msgstr "D'accord\\Choisir le joueur" + +msgid "Cancel\\Keep current player name" +msgstr "Annuler\\Conserver le joueur actuel" + +msgid "Delete player\\Deletes the player from the list" +msgstr "Supprimer le joueur\\Supprimer le joueur de la liste" + +msgid "Player name" +msgstr "Nom du joueur" + +msgid "Save\\Saves the current mission" +msgstr "Enregistrer\\Enregistrer la mission en cours" + +msgid "Load\\Loads the selected mission" +msgstr "Charger\\Charger la mission sélectionnée" + +msgid "List of saved missions" +msgstr "Liste des missions enregistrées" + +msgid "Filename:" +msgstr "Nom du fichier :" + +msgid "Mission name" +msgstr "Nom de la mission" + +msgid "Photography" +msgstr "Vue de la mission" + +msgid "Delete\\Deletes the selected file" +msgstr "Supprimer\\Supprime l'enregistrement sélectionné" + +msgid "Appearance\\Choose your appearance" +msgstr "Aspect\\Choisir votre aspect" + +msgid "Standard\\Standard appearance settings" +msgstr "Standard\\Remet les couleurs standards" + +msgid "Head\\Face and hair" +msgstr "Tęte\\Visage et cheveux" + +msgid "Suit\\Astronaut suit" +msgstr "Corps\\Combinaison" + +msgid "\\Turn left" +msgstr "\\Rotation ŕ gauche" + +msgid "\\Turn right" +msgstr "\\Rotation ŕ droite" + +msgid "Red" +msgstr "Rouge" + +msgid "Green" +msgstr "Vert" + +msgid "Blue" +msgstr "Bleu" + +msgid "\\Face 1" +msgstr "\\Visage 1" + +msgid "\\Face 4" +msgstr "\\Visage 4" + +msgid "\\Face 3" +msgstr "\\Visage 3" + +msgid "\\Face 2" +msgstr "\\Visage 2" + +msgid "\\No eyeglasses" +msgstr "\\Pas de lunettes" + +msgid "\\Eyeglasses 1" +msgstr "\\Lunettes 1" + +msgid "\\Eyeglasses 2" +msgstr "\\Lunettes 2" + +msgid "\\Eyeglasses 3" +msgstr "\\Lunettes 3" + +msgid "\\Eyeglasses 4" +msgstr "\\Lunettes 4" + +msgid "\\Eyeglasses 5" +msgstr "\\Lunettes 5" + +msgid "Previous selection (\\key desel;)" +msgstr "Sélection précédente (\\key desel;)" + +msgid "Turn left (\\key left;)" +msgstr "Tourne ŕ gauche (\\key left;)" + +msgid "Turn right (\\key right;)" +msgstr "Tourne ŕ droite (\\key right;)" + +msgid "Forward (\\key up;)" +msgstr "Avance (\\key up;)" + +msgid "Backward (\\key down;)" +msgstr "Recule (\\key down;)" + +msgid "Up (\\key gup;)" +msgstr "Monte (\\key gup;)" + +msgid "Down (\\key gdown;)" +msgstr "Descend (\\key gdown;)" + +msgid "Grab or drop (\\key action;)" +msgstr "Prend ou dépose (\\key action;)" + +msgid "..in front" +msgstr "..devant" + +msgid "..behind" +msgstr "..derričre" + +msgid "..power cell" +msgstr "..pile" + +msgid "Instructions for the mission (\\key help;)" +msgstr "Instructions sur la mission (\\key help;)" + +msgid "Take off to finish the mission" +msgstr "Décolle pour terminer la mission" + +msgid "Build a derrick" +msgstr "Construit un derrick" + +msgid "Build a power station" +msgstr "Construit une station" + +msgid "Build a bot factory" +msgstr "Construit une fabrique de robots" + +msgid "Build a repair center" +msgstr "Construit un centre de réparation" + +msgid "Build a converter" +msgstr "Construit un convertisseur" + +msgid "Build a defense tower" +msgstr "Construit une tour" + +msgid "Build a research center" +msgstr "Construit un centre de recherches" + +msgid "Build a radar station" +msgstr "Construit un radar" + +msgid "Build a power cell factory" +msgstr "Construit une fabrique de piles" + +msgid "Build an autolab" +msgstr "Construit un laboratoire" + +msgid "Build a nuclear power plant" +msgstr "Construit une centrale nucléaire" + +msgid "Build a lightning conductor" +msgstr "Construit un paratonnerre" + +msgid "Build a exchange post" +msgstr "Construit une borne d'information" + +msgid "Show if the ground is flat" +msgstr "Montre si le sol est plat" + +msgid "Plant a flag" +msgstr "Pose un drapeau de couleur" + +msgid "Remove a flag" +msgstr "Enlčve un drapeau" + +msgid "\\Blue flags" +msgstr "\\Drapeaux bleus" + +msgid "\\Red flags" +msgstr "\\Drapeaux rouges" + +msgid "\\Green flags" +msgstr "\\Drapeaux verts" + +msgid "\\Yellow flags" +msgstr "\\Drapeaux jaunes" + +msgid "\\Violet flags" +msgstr "\\Drapeaux violets" + +msgid "Build a winged grabber" +msgstr "Fabrique un déménageur volant" + +msgid "Build a tracked grabber" +msgstr "Fabrique un déménageur ŕ chenilles" + +msgid "Build a wheeled grabber" +msgstr "Fabrique un déménageur ŕ roues" + +msgid "Build a legged grabber" +msgstr "Fabrique un déménageur ŕ pattes" + +msgid "Build a winged shooter" +msgstr "Fabrique un shooter volant" + +msgid "Build a tracked shooter" +msgstr "Fabrique un shooter ŕ chenilles" + +msgid "Build a wheeled shooter" +msgstr "Fabrique un shooter ŕ roues" + +msgid "Build a legged shooter" +msgstr "Fabrique un shooter ŕ pattes" + +msgid "Build a winged orga shooter" +msgstr "Fabrique un orgaShooter volant" + +msgid "Build a tracked orga shooter" +msgstr "Fabrique un orgaShooter ŕ chenilles" + +msgid "Build a wheeled orga shooter" +msgstr "Fabrique un orgaShooter ŕ roues" + +msgid "Build a legged orga shooter" +msgstr "Fabrique un orgaShooter ŕ pattes" + +msgid "Build a winged sniffer" +msgstr "Fabrique un renifleur volant" + +msgid "Build a tracked sniffer" +msgstr "Fabrique un renifleur ŕ chenilles" + +msgid "Build a wheeled sniffer" +msgstr "Fabrique un renifleur ŕ roues" + +msgid "Build a legged sniffer" +msgstr "Fabrique un renifleur ŕ pattes" + +msgid "Build a thumper" +msgstr "Fabrique un robot secoueur" + +msgid "Build a phazer shooter" +msgstr "Fabrique un robot phazer" + +msgid "Build a recycler" +msgstr "Fabrique un robot recycleur" + +msgid "Build a shielder" +msgstr "Fabrique un robot bouclier" + +msgid "Build a subber" +msgstr "Fabrique un robot sous-marin" + +msgid "Run research program for tracked bots" +msgstr "Recherche les chenilles" + +msgid "Run research program for winged bots" +msgstr "Recherche les robots volants" + +msgid "Run research program for thumper" +msgstr "Recherche le secoueur" + +msgid "Run research program for shooter" +msgstr "Recherche le canon shooter" + +msgid "Run research program for defense tower" +msgstr "Recherche la tour de défense" + +msgid "Run research program for phazer shooter" +msgstr "Recherche le canon phazer" + +msgid "Run research program for shielder" +msgstr "Recherche le bouclier" + +msgid "Run research program for nuclear power" +msgstr "Recherche le nucléaire" + +msgid "Run research program for legged bots" +msgstr "Recherche les pattes" + +msgid "Run research program for orga shooter" +msgstr "Recherche le canon orgaShooter" + +msgid "Return to start" +msgstr "Remet au départ" + +msgid "Sniff (\\key action;)" +msgstr "Cherche (\\key action;)" + +msgid "Thump (\\key action;)" +msgstr "Secoue (\\key action;)" + +msgid "Shoot (\\key action;)" +msgstr "Tir (\\key action;)" + +msgid "Recycle (\\key action;)" +msgstr "Recycle (\\key action;)" + +msgid "Extend shield (\\key action;)" +msgstr "Déploie le bouclier (\\key action;)" + +msgid "Withdraw shield (\\key action;)" +msgstr "Stoppe le bouclier (\\key action;)" + +msgid "Shield radius" +msgstr "Rayon du bouclier" + +msgid "Execute the selected program" +msgstr "Exécute le programme sélectionné" + +msgid "Edit the selected program" +msgstr "Edite le programme sélectionné" + +msgid "\\SatCom on standby" +msgstr "\\Mettre le SatCom en veille" + +msgid "Destroy the building" +msgstr "Démolit le bâtiment" + +msgid "Energy level" +msgstr "Niveau d'énergie" + +msgid "Shield level" +msgstr "Niveau du bouclier" + +msgid "Jet temperature" +msgstr "Température du réacteur" + +msgid "Still working ..." +msgstr "Travail en cours ..." + +msgid "Number of insects detected" +msgstr "Nombre d'insectes détectés" + +msgid "Transmitted information" +msgstr "Informations diffusées" + +msgid "Compass" +msgstr "Boussole" + +msgid "Mini-map" +msgstr "Mini-carte" + +msgid "Zoom mini-map" +msgstr "Zoom mini-carte" + +msgid "Camera (\\key camera;)" +msgstr "Caméra (\\key camera;)" + +msgid "Camera to left" +msgstr "Caméra ŕ gauche" + +msgid "Camera to right" +msgstr "Caméra ŕ droite" + +msgid "Camera nearest" +msgstr "Caméra plus proche" + +msgid "Camera awayest" +msgstr "Caméra plus loin" + +msgid "Help about selected object" +msgstr "Instructions sur la sélection" + +msgid "Show the solution" +msgstr "Donne la solution" + +msgid "Switch bots <-> buildings" +msgstr "Permute robots <-> bâtiments" + +msgid "Show the range" +msgstr "Montre le rayon d'action" + +msgid "\\Raise the pencil" +msgstr "\\Relčve le crayon" + +msgid "\\Use the black pencil" +msgstr "\\Abaisse le crayon noir" + +msgid "\\Use the yellow pencil" +msgstr "\\Abaisse le crayon jaune" + +msgid "\\Use the orange pencil" +msgstr "\\Abaisse le crayon orange" + +msgid "\\Use the red pencil" +msgstr "\\Abaisse le crayon rouge" + +msgid "\\Use the purple pencil" +msgstr "\\Abaisse le crayon violet" + +msgid "\\Use the blue pencil" +msgstr "\\Abaisse le crayon bleu" + +msgid "\\Use the green pencil" +msgstr "\\Abaisse le crayon vert" + +msgid "\\Use the brown pencil" +msgstr "\\Abaisse le crayon brun" + +msgid "\\Start recording" +msgstr "\\Démarre l'enregistrement" + +msgid "\\Stop recording" +msgstr "\\Stoppe l'enregistrement" + +msgid "Show the place" +msgstr "Montre l'endroit" + +msgid "Continue" +msgstr "Continuer" + +msgid "Command line" +msgstr "Console de commande" + +msgid "Game speed" +msgstr "Vitesse du jeu" + +msgid "Back" +msgstr "Page précédente" + +msgid "Forward" +msgstr "Page suivante" + +msgid "Home" +msgstr "Page initiale" + +msgid "Copy" +msgstr "Copier" + +msgid "Size 1" +msgstr "Taille 1" + +msgid "Size 2" +msgstr "Taille 2" + +msgid "Size 3" +msgstr "Taille 3" + +msgid "Size 4" +msgstr "Taille 4" + +msgid "Size 5" +msgstr "Taille 5" + +msgid "Instructions from Houston" +msgstr "Instructions de Houston" + +msgid "Dictionnary" +msgstr "Dictionnaire anglais-français" + +msgid "Satellite report" +msgstr "Rapport du satellite" + +msgid "Programs dispatched by Houston" +msgstr "Programmes envoyés par Houston" + +msgid "List of objects" +msgstr "Liste des objets" + +msgid "Programming help" +msgstr "Aide ŕ la programmation" + +msgid "Solution" +msgstr "Solution" + +msgid "OK\\Close program editor and return to game" +msgstr "D'accord\\Compiler le programme" + +msgid "Cancel\\Cancel all changes" +msgstr "Annuler\\Annuler toutes les modifications" + +msgid "Open (Ctrl+o)" +msgstr "Ouvrir (Ctrl+o)" + +msgid "Save (Ctrl+s)" +msgstr "Enregistrer (Ctrl+s)" + +msgid "Undo (Ctrl+z)" +msgstr "Annuler (Ctrl+z)" + +msgid "Cut (Ctrl+x)" +msgstr "Couper (Ctrl+x)" + +msgid "Copy (Ctrl+c)" +msgstr "Copier (Ctrl+c)" + +msgid "Paste (Ctrl+v)" +msgstr "Coller (Ctrl+v)" + +msgid "Font size" +msgstr "Taille des caractčres" + +msgid "Instructions (\\key help;)" +msgstr "Instructions (\\key help;)" + +msgid "Programming help (\\key prog;)" +msgstr "Aide ŕ la programmation (\\key prog;)" + +msgid "Compile" +msgstr "Compiler" + +msgid "Execute/stop" +msgstr "Démarrer/stopper" + +msgid "Pause/continue" +msgstr "Pause/continuer" + +msgid "One step" +msgstr "Un pas" + +msgid "Gantry crane" +msgstr "Portique" + +msgid "Spaceship" +msgstr "Vaisseau spatial" + +msgid "Derrick" +msgstr "Derrick" + +msgid "Bot factory" +msgstr "Fabrique de robots" + +msgid "Repair center" +msgstr "Centre de réparation" + +msgid "Destroyer" +msgstr "Destructeur" + +msgid "Power station" +msgstr "Station de recharge" + +msgid "Converts ore to titanium" +msgstr "Conversion minerai en titanium" + +msgid "Defense tower" +msgstr "Tour de défense" + +msgid "Nest" +msgstr "Nid" + +msgid "Research center" +msgstr "Centre de recherches" + +msgid "Radar station" +msgstr "Radar" + +msgid "Information exchange post" +msgstr "Borne d'information" + +msgid "Disintegrator" +msgstr "Désintégrateur" + +msgid "Power cell factory" +msgstr "Fabrique de piles" + +msgid "Autolab" +msgstr "Laboratoire de matičres organiques" + +msgid "Nuclear power station" +msgstr "Centrale nucléaire" + +msgid "Lightning conductor" +msgstr "Paratonnerre" + +msgid "Vault" +msgstr "Coffre-fort" + +msgid "Houston Mission Control" +msgstr "Centre de contrôle" + +msgid "Target" +msgstr "Cible" + +msgid "Start" +msgstr "Départ" + +msgid "Finish" +msgstr "But" + +msgid "Titanium ore" +msgstr "Minerai de titanium" + +msgid "Uranium ore" +msgstr "Minerai d'uranium" + +msgid "Organic matter" +msgstr "Matičre organique" + +msgid "Titanium" +msgstr "Titanium" + +msgid "Power cell" +msgstr "Pile normale" + +msgid "Nuclear power cell" +msgstr "Pile nucléaire" + +msgid "Black box" +msgstr "Boîte noire" + +msgid "Key A" +msgstr "Clé A" + +msgid "Key B" +msgstr "Clé B" + +msgid "Key C" +msgstr "Clé C" + +msgid "Key D" +msgstr "Clé D" + +msgid "Explosive" +msgstr "Explosif" + +msgid "Fixed mine" +msgstr "Mine fixe" + +msgid "Survival kit" +msgstr "Sac de survie" + +msgid "Checkpoint" +msgstr "Indicateur" + +msgid "Blue flag" +msgstr "Drapeau bleu" + +msgid "Red flag" +msgstr "Drapeau rouge" + +msgid "Green flag" +msgstr "Drapeau vert" + +msgid "Yellow flag" +msgstr "Drapeau jaune" + +msgid "Violet flag" +msgstr "Drapeau violet" + +msgid "Energy deposit (site for power station)" +msgstr "Emplacement pour station" + +msgid "Uranium deposit (site for derrick)" +msgstr "Emplacement pour derrick (uranium)" + +msgid "Found key A (site for derrick)" +msgstr "Emplacement pour derrick (clé A)" + +msgid "Found key B (site for derrick)" +msgstr "Emplacement pour derrick (clé B)" + +msgid "Found key C (site for derrick)" +msgstr "Emplacement pour derrick (clé C)" + +msgid "Found key D (site for derrick)" +msgstr "Emplacement pour derrick (clé D)" + +msgid "Titanium deposit (site for derrick)" +msgstr "Emplacement pour derrick (titanium)" + +msgid "Practice bot" +msgstr "Robot d'entraînement" + +msgid "Winged grabber" +msgstr "Robot déménageur" + +msgid "Tracked grabber" +msgstr "Robot déménageur" + +msgid "Wheeled grabber" +msgstr "Robot déménageur" + +msgid "Legged grabber" +msgstr "Robot déménageur" + +msgid "Winged shooter" +msgstr "Robot shooter" + +msgid "Tracked shooter" +msgstr "Robot shooter" + +msgid "Wheeled shooter" +msgstr "Robot shooter" + +msgid "Legged shooter" +msgstr "Robot shooter" + +msgid "Winged orga shooter" +msgstr "Robot orgaShooter" + +msgid "Tracked orga shooter" +msgstr "Robot orgaShooter" + +msgid "Wheeled orga shooter" +msgstr "Robot orgaShooter" + +msgid "Legged orga shooter" +msgstr "Robot orgaShooter" + +msgid "Winged sniffer" +msgstr "Robot renifleur" + +msgid "Tracked sniffer" +msgstr "Robot renifleur" + +msgid "Wheeled sniffer" +msgstr "Robot renifleur" + +msgid "Legged sniffer" +msgstr "Robot renifleur" + +msgid "Thumper" +msgstr "Robot secoueur" + +msgid "Phazer shooter" +msgstr "Robot phazer" + +msgid "Recycler" +msgstr "Robot recycleur" + +msgid "Shielder" +msgstr "Robot bouclier" + +msgid "Subber" +msgstr "Robot sous-marin" + +msgid "Target bot" +msgstr "Cible d'entraînement" + +msgid "Drawer bot" +msgstr "Robot dessinateur" + +msgid "Engineer" +msgstr "Technicien" + +msgid "Robbie" +msgstr "Robbie" + +msgid "Alien Queen" +msgstr "Pondeuse" + +msgid "Ant" +msgstr "Fourmi" + +msgid "Spider" +msgstr "Araignée" + +msgid "Wasp" +msgstr "Guępe" + +msgid "Worm" +msgstr "Ver" + +msgid "Egg" +msgstr "Oeuf" + +msgid "Wreckage" +msgstr "Epave de robot" + +msgid "Ruin" +msgstr "Bâtiment en ruine" + +msgid "Waste" +msgstr "Déchet" + +msgid "Spaceship ruin" +msgstr "Epave de vaisseau spatial" + +msgid "Remains of Apollo mission" +msgstr "Vestige d'une mission Apollo" + +msgid "Lunar Roving Vehicle" +msgstr "Lunar Roving Vehicle" + +msgid "Error" +msgstr "Erreur" + +msgid "Unknown command" +msgstr "Commande inconnue" + +msgid "CeeBot not installed." +msgstr "CeeBot n'est pas installé." + +msgid "" +"Please insert the CeeBot CD\n" +"and re-run the game." +msgstr "Veuillez mettre le CD de CeeBot\net relancer le jeu." + +msgid "COLOBOT not installed." +msgstr "COLOBOT n'est pas installé." + +msgid "" +"Please insert the COLOBOT CD\n" +"and re-run the game." +msgstr "Veuillez mettre le CD de COLOBOT\net relancer le jeu." + +msgid "Inappropriate bot" +msgstr "Robot inadapté" + +msgid "Impossible when flying" +msgstr "Impossible en vol" + +msgid "Already carrying something" +msgstr "Porte déjŕ quelque chose" + +msgid "Nothing to grab" +msgstr "Rien ŕ prendre" + +msgid "Impossible when moving" +msgstr "Impossible en mouvement" + +msgid "Place occupied" +msgstr "Emplacement occupé" + +msgid "No other robot" +msgstr "Pas d'autre robot" + +msgid "You can not carry a radioactive object" +msgstr "Vous ne pouvez pas transporter un objet radioactif" + +msgid "You can not carry an object under water" +msgstr "Vous ne pouvez pas transporter un objet sous l'eau" + +msgid "Nothing to drop" +msgstr "Rien ŕ déposer" + +msgid "Impossible under water" +msgstr "Impossible sous l'eau" + +msgid "Not enough energy" +msgstr "Pas assez d'énergie" + +msgid "Titanium too far away" +msgstr "Titanium trop loin" + +msgid "Titanium too close" +msgstr "Titanium trop proche" + +msgid "No titanium around" +msgstr "Titanium inexistant" + +msgid "Ground not flat enough" +msgstr "Sol pas assez plat" + +msgid "Flat ground not large enough" +msgstr "Sol plat pas assez grand" + +msgid "Too close to space ship" +msgstr "Trop proche du vaisseau spatial" + +msgid "Too close to a building" +msgstr "Trop proche d'un bâtiment" + +msgid "Ground inappropriate" +msgstr "Terrain inadapté" + +msgid "Building too close" +msgstr "Bâtiment trop proche" + +msgid "Object too close" +msgstr "Objet trop proche" + +msgid "Nothing to recycle" +msgstr "Rien ŕ recycler" + +msgid "No more energy" +msgstr "Plus d'énergie" + +msgid "Error in instruction move" +msgstr "Déplacement impossible" + +msgid "Object not found" +msgstr "Objet n'existe pas" + +msgid "Goto: inaccessible destination" +msgstr "Chemin introuvable" + +msgid "Goto: destination occupied" +msgstr "Destination occupée" + +msgid "No titanium ore to convert" +msgstr "Pas de minerai de titanium ŕ convertir" + +msgid "No ore in the subsoil" +msgstr "Pas de minerai en sous-sol" + +msgid "No energy in the subsoil" +msgstr "Pas d'énergie en sous-sol" + +msgid "No power cell" +msgstr "Pas de pile" + +msgid "Inappropriate cell type" +msgstr "Pas le bon type de pile" + +msgid "Research program already performed" +msgstr "Recherche déjŕ effectuée" + +msgid "Not enough energy yet" +msgstr "Pas encore assez d'énergie" + +msgid "No titanium to transform" +msgstr "Pas de titanium ŕ transformer" + +msgid "Transforms only titanium" +msgstr "Ne transforme que le titanium" + +msgid "Doors blocked by a robot or another object " +msgstr "Portes bloquées par un robot ou un objet" + +msgid "You must get on the spaceship to take off " +msgstr "Vous devez embarquer pour pouvoir décoller" + +msgid "Nothing to analyze" +msgstr "Rien ŕ analyser" + +msgid "Analyzes only organic matter" +msgstr "N'analyse que la matičre organique" + +msgid "Analysis already performed" +msgstr "Analyse déjŕ effectuée" + +msgid "Not yet enough energy" +msgstr "Pas encore assez d'énergie" + +msgid "No uranium to transform" +msgstr "Pas d'uranium ŕ transformer" + +msgid "Transforms only uranium" +msgstr "Ne transforme que l'uranium" + +msgid "No titanium" +msgstr "Pas de titanium" + +msgid "No information exchange post within range" +msgstr "Pas trouvé de borne d'information" + +msgid "Program infected by a virus" +msgstr "Un programme est infecté par un virus" + +msgid "Infected by a virus, temporarily out of order" +msgstr "Infecté par un virus, ne fonctionne plus temporairement" + +msgid "Impossible when swimming" +msgstr "Impossible en nageant" + +msgid "Impossible when carrying an object" +msgstr "Impossible en portant un objet" + +msgid "Too many flags of this color (maximum 5)" +msgstr "Trop de drapeaux de cette couleur (maximum 5)" + +msgid "Too close to an existing flag" +msgstr "Trop proche d'un drapeau existant" + +msgid "No flag nearby" +msgstr "Aucun drapeau ŕ proximité" + +msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgstr "La misssion n'est pas terminée (appuyez sur \\key help; pour plus de détails)" + +msgid "Bot destroyed" +msgstr "Robot détruit" + +msgid "Building destroyed" +msgstr "Bâtiment détruit" + +msgid "Can not create this, there are too many objects" +msgstr "Création impossible, il y a trop d'objets" + +msgid "\"%s\" missing in this exercise" +msgstr "Il manque \"%s\" dans le programme" + +msgid "Do not use in this exercise" +msgstr "Interdit dans cet exercice" + +msgid "Building completed" +msgstr "Bâtiment terminé" + +msgid "Titanium available" +msgstr "Titanium disponible" + +msgid "Research program completed" +msgstr "Recherche terminée" + +msgid "Plans for tracked robots available " +msgstr "Fabrication d'un robot ŕ chenilles possible" + +msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" +msgstr "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)" + +msgid "Plans for thumper available" +msgstr "Fabrication d'un robot secoueur possible" + +msgid "Plans for shooter available" +msgstr "Fabrication de robots shooter possible" + +msgid "Plans for defense tower available" +msgstr "Construction d'une tour de défense possible" + +msgid "Plans for phazer shooter available" +msgstr "Fabrication d'un robot phazer possible" + +msgid "Plans for shielder available" +msgstr "Fabrication d'un robot bouclier possible" + +msgid "Plans for nuclear power plant available" +msgstr "Construction d'une centrale nucléaire possible" + +msgid "New bot available" +msgstr "Nouveau robot disponible" + +msgid "Analysis performed" +msgstr "Analyse terminée" + +msgid "Power cell available" +msgstr "Pile disponible" + +msgid "Nuclear power cell available" +msgstr "Pile nucléaire disponible" + +msgid "You found a usable object" +msgstr "Vous avez trouvé un objet utilisable" + +msgid "Found a site for power station" +msgstr "Emplacement pour station trouvé" + +msgid "Found a site for a derrick" +msgstr "Emplacement pour derrick trouvé" + +msgid "<<< Well done, mission accomplished >>>" +msgstr "<<< Bravo, mission terminée >>>" + +msgid "<<< Sorry, mission failed >>>" +msgstr "<<< Désolé, mission échouée >>>" + +msgid "Current mission saved" +msgstr "Enregistrement effectué" + +msgid "Checkpoint crossed" +msgstr "Indicateur atteint" + +msgid "Alien Queen killed" +msgstr "Pondeuse mortellement touchée" + +msgid "Ant fatally wounded" +msgstr "Fourmi mortellement touchée" + +msgid "Wasp fatally wounded" +msgstr "Guępe mortellement touchée" + +msgid "Worm fatally wounded" +msgstr "Ver mortellement touché" + +msgid "Spider fatally wounded" +msgstr "Araignée mortellement touchée" + +msgid "Press \\key help; to read instructions on your SatCom" +msgstr "Consultez votre SatCom en appuyant sur \\key help;" + +msgid "Opening bracket missing" +msgstr "Il manque une parenthčse ouvrante" + +msgid "Closing bracket missing " +msgstr "Il manque une parenthčse fermante" + +msgid "The expression must return a boolean value" +msgstr "L'expression doit ętre un boolean" + +msgid "Variable not declared" +msgstr "Variable non déclarée" + +msgid "Assignment impossible" +msgstr "Assignation impossible" + +msgid "Semicolon terminator missing" +msgstr "Terminateur point-virgule non trouvé" + +msgid "Instruction \"case\" outside a block \"switch\"" +msgstr "Instruction \"case\" hors d'un bloc \"switch\"" + +msgid "Instructions after the final closing brace" +msgstr "Instructions aprčs la fin" + +msgid "End of block missing" +msgstr "Il manque la fin du bloc" + +msgid "Instruction \"else\" without corresponding \"if\" " +msgstr "Instruction \"else\" sans \"if\" correspondant" + +msgid "Opening brace missing " +msgstr "Début d'un bloc attendu" + +msgid "Wrong type for the assignment" +msgstr "Mauvais type de résultat pour l'assignation" + +msgid "A variable can not be declared twice" +msgstr "Redéfinition d'une variable" + +msgid "The types of the two operands are incompatible " +msgstr "Les deux opérandes ne sont pas de types compatibles" + +msgid "Unknown function" +msgstr "Routine inconnue" + +msgid "Sign \" : \" missing" +msgstr "Séparateur \" : \" attendu" + +msgid "Keyword \"while\" missing" +msgstr "Manque le mot \"while\"" + +msgid "Instruction \"break\" outside a loop" +msgstr "Instruction \"break\" en dehors d'une boucle" + +msgid "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"" +msgstr "Un label ne peut se placer que devant un \"for\", un \"while\", un \"do\" ou un \"switch\"" + +msgid "This label does not exist" +msgstr "Cette étiquette n'existe pas" + +msgid "Instruction \"case\" missing" +msgstr "Manque une instruction \"case\"" + +msgid "Number missing" +msgstr "Un nombre est attendu" + +msgid "Void parameter" +msgstr "Paramčtre void" + +msgid "Type declaration missing" +msgstr "Déclaration de type attendu" + +msgid "Variable name missing" +msgstr "Nom d'une variable attendu" + +msgid "Function name missing" +msgstr "Nom de la fonction attendu" + +msgid "Too many parameters" +msgstr "Trop de paramčtres" + +msgid "Function already exists" +msgstr "Cette fonction existe déjŕ" + +msgid "Parameters missing " +msgstr "Pas assez de paramčtres" + +msgid "No function with this name accepts this kind of parameter" +msgstr "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramčtre(s)" + +msgid "No function with this name accepts this number of parameters" +msgstr "Aucune fonction de ce nom n'accepte ce nombre de paramčtres" + +msgid "This is not a member of this class" +msgstr "Cet élément n'existe pas dans cette classe" + +msgid "This object is not a member of a class" +msgstr "L'objet n'est pas une instance d'une classe" + +msgid "Appropriate constructor missing" +msgstr "Il n'y a pas de constructeur approprié" + +msgid "This class already exists" +msgstr "Cette classe existe déjŕ" + +msgid "\" ] \" missing" +msgstr "\" ] \" attendu" + +msgid "Reserved keyword of CBOT language" +msgstr "Ce mot est réservé" + +msgid "Bad argument for \"new\"" +msgstr "Mauvais argument pour \"new\"" + +msgid "\" [ \" expected" +msgstr "\" [ \" attendu" + +msgid "String missing" +msgstr "Une chaîne de caractčre est attendue" + +msgid "Incorrect index type" +msgstr "Mauvais type d'index" + +msgid "Private element" +msgstr "Elément protégé" + +msgid "Public required" +msgstr "Public requis" + +msgid "Dividing by zero" +msgstr "Division par zéro" + +msgid "Variable not initialized" +msgstr "Variable non initialisée" + +msgid "Negative value rejected by \"throw\"" +msgstr "Valeur négative refusée pour \"throw\"" + +msgid "The function returned no value " +msgstr "La fonction n'a pas retourné de résultat" + +msgid "No function running" +msgstr "Pas de fonction en exécution" + +msgid "Calling an unknown function" +msgstr "Appel d'une fonction inexistante" + +msgid "This class does not exist" +msgstr "Cette classe n'existe pas" + +msgid "Unknown Object" +msgstr "Objet n'existe pas" + +msgid "Operation impossible with value \"nan\"" +msgstr "Opération sur un \"nan\"" + +msgid "Access beyond array limit" +msgstr "Accčs hors du tableau" + +msgid "Stack overflow" +msgstr "Débordement de la pile" + +msgid "Illegal object" +msgstr "Objet inaccessible" + +msgid "Can't open file" +msgstr "Ouverture du fichier impossible" + +msgid "File not open" +msgstr "Le fichier n'est pas ouvert" + +msgid "Read error" +msgstr "Erreur ŕ la lecture" + +msgid "Write error" +msgstr "Erreur ŕ l'écriture" + +msgid "< none >" +msgstr "< aucune >" + +msgid "Arrow left" +msgstr "Flčche Gauche" + +msgid "Arrow right" +msgstr "Flčche Droite" + +msgid "Arrow up" +msgstr "Flčche Haut" + +msgid "Arrow down" +msgstr "Flčche Bas" + +msgid "Control-break" +msgstr "Control-break" + +msgid "<--" +msgstr "<--" + +msgid "Tab" +msgstr "Tab" + +msgid "Clear" +msgstr "Clear" + +msgid "Enter" +msgstr "Entrée" + +msgid "Shift" +msgstr "Shift" + +msgid "Ctrl" +msgstr "Ctrl" + +msgid "Alt" +msgstr "Alt" + +msgid "Pause" +msgstr "Pause" + +msgid "Caps Lock" +msgstr "Caps Lock" + +msgid "Esc" +msgstr "Esc" + +msgid "Space" +msgstr "Espace" + +msgid "Page Up" +msgstr "Page Up" + +msgid "Page Down" +msgstr "Page Down" + +msgid "End" +msgstr "End" + +msgid "Home Key" +msgstr "Home" + +msgid "Select" +msgstr "Select" + +msgid "Execute" +msgstr "Execute" + +msgid "Print Scrn" +msgstr "Print Scrn" + +msgid "Insert" +msgstr "Insert" + +msgid "Delete Key" +msgstr "Delete" + +msgid "Help" +msgstr "Help" + +msgid "Left Windows" +msgstr "Left Windows" + +msgid "Right Windows" +msgstr "Right Windows" + +msgid "Application key" +msgstr "Application key" + +msgid "NumPad 0" +msgstr "NumPad 0" + +msgid "NumPad 1" +msgstr "NumPad 1" + +msgid "NumPad 2" +msgstr "NumPad 2" + +msgid "NumPad 3" +msgstr "NumPad 3" + +msgid "NumPad 4" +msgstr "NumPad 4" + +msgid "NumPad 5" +msgstr "NumPad 5" + +msgid "NumPad 6" +msgstr "NumPad 6" + +msgid "NumPad 7" +msgstr "NumPad 7" + +msgid "NumPad 8" +msgstr "NumPad 8" + +msgid "NumPad 9" +msgstr "NumPad 9" + +msgid "NumPad *" +msgstr "NumPad *" + +msgid "NumPad +" +msgstr "NumPad +" + +msgid "NumPad sep" +msgstr "NumPad sep" + +msgid "NumPad -" +msgstr "NumPad -" + +msgid "NumPad ." +msgstr "NumPad ." + +msgid "NumPad /" +msgstr "NumPad /" + +msgid "F1" +msgstr "F1" + +msgid "F2" +msgstr "F2" + +msgid "F3" +msgstr "F3" + +msgid "F4" +msgstr "F4" + +msgid "F5" +msgstr "F5" + +msgid "F6" +msgstr "F6" + +msgid "F7" +msgstr "F7" + +msgid "F8" +msgstr "F8" + +msgid "F9" +msgstr "F9" + +msgid "F10" +msgstr "F10" + +msgid "F11" +msgstr "F11" + +msgid "F12" +msgstr "F12" + +msgid "F13" +msgstr "F13" + +msgid "F14" +msgstr "F14" + +msgid "F15" +msgstr "F15" + +msgid "F16" +msgstr "F16" + +msgid "F17" +msgstr "F17" + +msgid "F18" +msgstr "F18" + +msgid "F19" +msgstr "F19" + +msgid "F20" +msgstr "F20" + +msgid "Num Lock" +msgstr "Num Lock" + +msgid "Scroll" +msgstr "Scroll" + +msgid "Attn" +msgstr "Attn" + +msgid "CrSel" +msgstr "CrSel" + +msgid "ExSel" +msgstr "ExSel" + +msgid "Erase EOF" +msgstr "Erase EOF" + +msgid "Play" +msgstr "Play" + +msgid "Zoom" +msgstr "Zoom" + +msgid "PA1" +msgstr "PA1" + +msgid "Button 1" +msgstr "Bouton 1" + +msgid "Button 2" +msgstr "Bouton 2" + +msgid "Button 3" +msgstr "Bouton 3" + +msgid "Button 4" +msgstr "Bouton 4" + +msgid "Button 5" +msgstr "Bouton 5" + +msgid "Button 6" +msgstr "Bouton 6" + +msgid "Button 7" +msgstr "Bouton 7" + +msgid "Button 8" +msgstr "Bouton 8" + +msgid "Button 9" +msgstr "Bouton 9" + +msgid "Button 10" +msgstr "Bouton 10" + +msgid "Button 11" +msgstr "Bouton 11" + +msgid "Button 12" +msgstr "Bouton 12" + +msgid "Button 13" +msgstr "Bouton 13" + +msgid "Button 14" +msgstr "Bouton 14" + +msgid "Button 15" +msgstr "Bouton 15" + +msgid "Button 16" +msgstr "Bouton 16" + +msgid "Button 17" +msgstr "Bouton 17" + +msgid "Button 18" +msgstr "Bouton 18" + +msgid "Button 19" +msgstr "Bouton 19" + +msgid "Button 20" +msgstr "Bouton 20" + +msgid "Button 21" +msgstr "Bouton 21" + +msgid "Button 22" +msgstr "Bouton 22" + +msgid "Button 23" +msgstr "Bouton 23" + +msgid "Button 24" +msgstr "Bouton 24" + +msgid "Button 25" +msgstr "Bouton 25" + +msgid "Button 26" +msgstr "Bouton 26" + +msgid "Button 27" +msgstr "Bouton 27" + +msgid "Button 28" +msgstr "Bouton 28" + +msgid "Button 29" +msgstr "Bouton 29" + +msgid "Button 30" +msgstr "Bouton 30" + +msgid "Button 31" +msgstr "Bouton 31" + +msgid "Button 32" +msgstr "Bouton 32" + +msgid "Wheel up" +msgstr "Molette haut" + +msgid "Wheel down" +msgstr "Molette bas" diff --git a/src/po/pl.po b/src/po/pl.po new file mode 100644 index 0000000..1f5db21 --- /dev/null +++ b/src/po/pl.po @@ -0,0 +1,2097 @@ +msgid "1.18 /e" +msgstr "Wersja 1.18 /pl" + +msgid "CeeBot-A 1.18" +msgstr "CeeBot-A 1.18" + +msgid "CeeBot-Teen EDU 1.18" +msgstr "CeeBot-Teen EDU 1.18" + +msgid "CeeBot-A EDU 1.18" +msgstr "CeeBot-A EDU 1.18" + +msgid "CeeBot-Teen PERSO 1.18" +msgstr "CeeBot-Teen PERSO 1.18" + +msgid "CeeBot-A PERSO 1.18" +msgstr "CeeBot-A PERSO 1.18" + +msgid "CeeBot-Teen DEMO 1.18" +msgstr "CeeBot-Teen DEMO 1.18" + +msgid "CeeBot-A DEMO 1.18" +msgstr "CeeBot-A DEMO 1.18" + +msgid "Demo 1.18 /e" +msgstr "Demo 1.18 /pl" + +msgid "SatCom" +msgstr "SatCom" + +msgid "Maximize" +msgstr "Powiększ" + +msgid "Minimize" +msgstr "Pomniejsz" + +msgid "Normal size" +msgstr "Normalna wielkość" + +msgid "Close" +msgstr "Zamknij" + +msgid "Program editor" +msgstr "Edytor programu" + +msgid "New" +msgstr "Nowy" + +msgid "Player" +msgstr "Gracz" + +msgid "New ..." +msgstr "Nowy ..." + +msgid " or " +msgstr " lub " + +msgid "CeeBot" +msgstr "CeeBot" + +msgid "COLOBOT" +msgstr "COLOBOT" + +msgid "Programming exercises" +msgstr "Ćwiczenia programistyczne" + +msgid "Challenges" +msgstr "Wyzwania" + +msgid "Missions" +msgstr "Misje" + +msgid "Free game" +msgstr "Swobodna gra" + +msgid "User levels" +msgstr "Poziomy użytkownika" + +msgid "Prototypes" +msgstr "Prototypy" + +msgid "Options" +msgstr "Opcje" + +msgid "Player's name" +msgstr "Imię gracza" + +msgid "Customize your appearance" +msgstr "Dostosuj wygląd" + +msgid "Save the current mission" +msgstr "Zapisz bieżącą misję" + +msgid "Load a saved mission" +msgstr "Wczytaj zapisaną misję" + +msgid " Chapters:" +msgstr " Rozdziały:" + +msgid " Planets:" +msgstr " Planety:" + +msgid " User levels:" +msgstr " Poziomy użytkownika:" + +msgid " Exercises in the chapter:" +msgstr " Ćwiczenia w tym rozdziale:" + +msgid " Challenges in the chapter:" +msgstr " Wyzwania w tym rozdziale:" + +msgid " Missions on this planet:" +msgstr " Misje na tej planecie:" + +msgid " Free game on this planet:" +msgstr " Swobodna gra na tej planecie:" + +msgid " Missions on this level:" +msgstr " Misje na tym poziomie:" + +msgid " Prototypes on this planet:" +msgstr " Prototypy na tej planecie:" + +msgid " Free game on this chapter:" +msgstr " Prototypy na tej planecie:" + +msgid " Summary:" +msgstr " Streszczenie:" + +msgid " Drivers:" +msgstr " Sterowniki:" + +msgid " Resolution:" +msgstr " Rozdzielczość:" + +msgid "1) First click on the key you want to redefine." +msgstr "1) Najpierw kliknij klawisz, który chcesz przedefiniować." + +msgid "2) Then press the key you want to use instead." +msgstr "2) Następnie naciśnij klawisz, którego chcesz używać." + +msgid "Face type:" +msgstr "Rodzaj twarzy:" + +msgid "Eyeglasses:" +msgstr "Okulary:" + +msgid "Hair color:" +msgstr "Kolor włosów:" + +msgid "Suit color:" +msgstr "Kolor skafandra:" + +msgid "Strip color:" +msgstr "Kolor pasków:" + +msgid "Do you want to quit CeeBot ?" +msgstr "Czy na pewno chcesz opuścić grę CeeBot?" + +msgid "Quit\\Quit CeeBot" +msgstr "Zakończ\\Kończy grę CeeBot" + +msgid "Do you want to quit COLOBOT ?" +msgstr "Czy na pewno chcesz opuścić grę COLOBOT?" + +msgid "Quit\\Quit COLOBOT" +msgstr "Zakończ\\Kończy grę COLOBOT" + +msgid "Quit the mission?" +msgstr "Opuścić misję?" + +msgid "Abort\\Abort the current mission" +msgstr "Przerwij\\Przerywa bieżącą misję" + +msgid "Continue\\Continue the current mission" +msgstr "Kontynuuj\\Kontynuuje bieżącą misję" + +msgid "Continue\\Continue the game" +msgstr "Kontynuuj\\Kontynuuje grę" + +msgid "Do you really want to destroy the selected building?" +msgstr "Czy na pewno chcesz zniszczyć zaznaczony budynek?" + +msgid "Do you want to delete %s's saved games? " +msgstr "Czy na pewno chcesz skasować zapisane gry gracza %s? " + +msgid "Delete" +msgstr "Usuń" + +msgid "Cancel" +msgstr "Anuluj" + +msgid "LOADING" +msgstr "WCZYTYWANIE" + +msgid "Keyword help(\\key cbot;)" +msgstr "Skróty klawiszowe (\\key cbot;)" + +msgid "Compilation ok (0 errors)" +msgstr "Program skompilowany (0 błędów)" + +msgid "Program finished" +msgstr "Program zakończony" + +msgid "\\b;List of objects\n" +msgstr "\\b;Lista obiektów\n" + +msgid "\\b;Robots\n" +msgstr "\\b;Roboty\n" + +msgid "\\b;Buildings\n" +msgstr "\\b;Budynki\n" + +msgid "\\b;Moveable objects\n" +msgstr "\\b;Obiekty ruchome\n" + +msgid "\\b;Aliens\n" +msgstr "\\b;Obcy\n" + +msgid "\\c; (none)\\n;\n" +msgstr "\\c; (brak)\\n;\n" + +msgid "\\b;Error\n" +msgstr "\\b;Błąd\n" + +msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" +msgstr "Lista jest dostępna jedynie gdy działa \\l;stacja radarowa\\u object\\radar;.\n" + +msgid "Open" +msgstr "Otwórz" + +msgid "Save" +msgstr "Zapisz" + +msgid "Folder: %s" +msgstr "Folder: %s" + +msgid "Name:" +msgstr "Nazwa:" + +msgid "Folder:" +msgstr "Folder:" + +msgid "Private\\Private folder" +msgstr "Prywatny\\Folder prywatny" + +msgid "Public\\Common folder" +msgstr "Publiczny\\Folder ogólnodostępny" + +msgid "Developed by :" +msgstr "Twórcy:" + +msgid "www.epsitec.com" +msgstr "www.epsitec.com" + +msgid " " +msgstr " " + +msgid "Recorder" +msgstr "Recorder" + +msgid "OK" +msgstr "OK" + +msgid "Next" +msgstr "Następny" + +msgid "Previous" +msgstr "Poprzedni" + +msgid "Menu (\\key quit;)" +msgstr "Menu (\\key quit;)" + +msgid "Exercises\\Programming exercises" +msgstr "Ćwiczenia\\Ćwiczenia programistyczne" + +msgid "Challenges\\Programming challenges" +msgstr "Wyzwania\\Wyzwania programistyczne" + +msgid "Missions\\Select mission" +msgstr "Misje\\Wybierz misję" + +msgid "Free game\\Free game without a specific goal" +msgstr "Swobodna gra\\Swobodna gra bez konkretnych celów" + +msgid "User\\User levels" +msgstr "Poziomy\\Poziomy użytkownika" + +msgid "Proto\\Prototypes under development" +msgstr "Prototypy\\Prototypy w trakcie rozwijania" + +msgid "New player\\Choose player's name" +msgstr "Nowy gracz\\Wybierz imię gracza" + +msgid "Options\\Preferences" +msgstr "Opcje\\Preferencje" + +msgid "Restart\\Restart the mission from the beginning" +msgstr "Uruchom ponownie\\Uruchamia ponownie misję od początku" + +msgid "Save\\Save the current mission " +msgstr "Zapisz\\Zapisuje bieżącą misję" + +msgid "Load\\Load a saved mission" +msgstr "Wczytaj\\Wczytuje zapisaną misję" + +msgid "\\Return to CeeBot" +msgstr "\\Powróć do gry CeeBot" + +msgid "\\Return to COLOBOT" +msgstr "\\Powróć do gry COLOBOT" + +msgid "<< Back \\Back to the previous screen" +msgstr "<< Wstecz \\Wraca do poprzedniego ekranu" + +msgid "Play\\Start mission!" +msgstr "Graj\\Rozpoczyna misję!" + +msgid "Device\\Driver and resolution settings" +msgstr "Urządzenie\\Ustawienia sterownika i rozdzielczości" + +msgid "Graphics\\Graphics settings" +msgstr "Grafika\\Ustawienia grafiki" + +msgid "Game\\Game settings" +msgstr "Gra\\Ustawienia gry" + +msgid "Controls\\Keyboard, joystick and mouse settings" +msgstr "Sterowanie\\Ustawienia klawiatury, joysticka i myszy" + +msgid "Sound\\Music and game sound volume" +msgstr "Dźwięk\\Głośność muzyki i dźwięków gry" + +msgid "Unit" +msgstr "Jednostka" + +msgid "Resolution" +msgstr "Rozdzielczość" + +msgid "Full screen\\Full screen or window mode" +msgstr "Pełny ekran\\Pełny ekran lub tryb okna" + +msgid "Apply changes\\Activates the changed settings" +msgstr "Zastosuj zmiany\\Aktywuje zmienione ustawienia" + +msgid "Robbie\\Your assistant" +msgstr "Robbie\\Twój asystent" + +msgid "Shadows\\Shadows on the ground" +msgstr "Cienie\\Cienie na ziemi" + +msgid "Marks on the ground\\Marks on the ground" +msgstr "Znaki na ziemi\\Znaki na ziemi" + +msgid "Dust\\Dust and dirt on bots and buildings" +msgstr "Kurz\\Kurz i bród na robotach i budynkach" + +msgid "Fog\\Fog" +msgstr "Mgła\\Mgła" + +msgid "Sunbeams\\Sunbeams in the sky" +msgstr "Promienie słoneczne\\Promienie słoneczne na niebie" + +msgid "Sky\\Clouds and nebulae" +msgstr "Niebo\\Chmury i mgławice" + +msgid "Planets and stars\\Astronomical objects in the sky" +msgstr "Planety i gwiazdy\\Obiekty astronomiczne na niebie" + +msgid "Dynamic lighting\\Mobile light sources" +msgstr "Dynamiczne oświetlenie\\Ruchome źródła światła" + +msgid "Number of particles\\Explosions, dust, reflections, etc." +msgstr "Liczba cząstek\\Wybuchy, kurz, odbicia, itp." + +msgid "Depth of field\\Maximum visibility" +msgstr "Głębokość pola\\Maksymalna widoczność" + +msgid "Details\\Visual quality of 3D objects" +msgstr "Szczegóły\\Jakość wizualna obiektów 3D" + +msgid "Textures\\Quality of textures " +msgstr "Tekstury\\Jakość tekstur " + +msgid "Num of decorative objects\\Number of purely ornamental objects" +msgstr "Ilość elementów dekoracyjnych \\Ilość elementów czysto dekoracyjnych" + +msgid "Particles in the interface\\Steam clouds and sparks in the interface" +msgstr "Cząstki w interfejsie\\Para i iskry z silników w interfejsie" + +msgid "Reflections on the buttons \\Shiny buttons" +msgstr "Odbicia na przyciskach \\Świecące przyciski" + +msgid "Help balloons\\Explain the function of the buttons" +msgstr "Dymki pomocy\\Wyjaśnia funkcje przycisków" + +msgid "Film sequences\\Films before and after the missions" +msgstr "Sekwencje filmowe\\Filmy przed rozpoczęciem i na zakończenie misji" + +msgid "Exit film\\Film at the exit of exercises" +msgstr "Końcowy film\\Film na zakończenie ćwiczeń" + +msgid "Friendly fire\\Your shooting can damage your own objects " +msgstr "Przyjacielski ogień\\Własne strzały uszkadzają Twoje obiekty" + +msgid "Scrolling\\Scrolling when the mouse touches right or left border" +msgstr "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego krawędzi" + +msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" +msgstr "Odwrócenie myszy X\\Odwrócenie kierunków przewijania w poziomie" + +msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" +msgstr "Odwrócenie myszy Y\\Odwrócenie kierunków przewijania w pionie" + +msgid "Quake at explosions\\The screen shakes at explosions" +msgstr "Wstrząsy przy wybuchach\\Ekran trzęsie się podczas wybuchów" + +msgid "Mouse shadow\\Gives the mouse a shadow" +msgstr "Cień kursora myszy\\Dodaje cień kursorowi myszy" + +msgid "Automatic indent\\When program editing" +msgstr "Automatyczne wcięcia\\Automatyczne wcięcia podczas edycji programu" + +msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" +msgstr "Duże wcięcie\\2 lub 4 spacje wcięcia na każdy poziom zdefiniowany przez klamry" + +msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" +msgstr "Accčs aux solutions\\Programme \"4: Solution\" dans les exercices" + +msgid "Standard controls\\Standard key functions" +msgstr "Standardowa kontrola\\Standardowe klawisze funkcyjne" + +msgid "Turn left\\turns the bot to the left" +msgstr "Skręć w lewo\\Obraca robota w lewo" + +msgid "Turn right\\turns the bot to the right" +msgstr "Obróć w prawo\\Obraca robota w prawo" + +msgid "Forward\\Moves forward" +msgstr "Naprzód\\Porusza do przodu" + +msgid "Backward\\Moves backward" +msgstr "Wstecz\\Porusza do tyłu" + +msgid "Climb\\Increases the power of the jet" +msgstr "W górę\\Zwiększa moc silnika" + +msgid "Descend\\Reduces the power of the jet" +msgstr "W dół\\Zmniejsza moc silnika" + +msgid "Change camera\\Switches between onboard camera and following camera" +msgstr "Zmień kamerę\\Przełącza pomiędzy kamerą pokładową i śledzącą" + +msgid "Previous object\\Selects the previous object" +msgstr "Poprzedni obiekt\\Zaznacz poprzedni obiekt" + +msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Standardowa akcja\\Standardowa akcja robota (podnieś/upuść, strzelaj, szukaj, itp.)" + +msgid "Camera closer\\Moves the camera forward" +msgstr "Kamera bliżej\\Przybliża kamerę" + +msgid "Camera back\\Moves the camera backward" +msgstr "Kamera dalej\\Oddala kamerę" + +msgid "Next object\\Selects the next object" +msgstr "Następny obiekt\\Zaznacza następny obiekt" + +msgid "Select the astronaut\\Selects the astronaut" +msgstr "Zaznacz astronautę\\Zaznacza astronautę" + +msgid "Quit\\Quit the current mission or exercise" +msgstr "Zakończ\\Kończy bieżącą misję lub ćwiczenie" + +msgid "Instructions\\Shows the instructions for the current mission" +msgstr "Rozkazy\\Pokazuje rozkazy dotyczące bieżącej misji" + +msgid "Programming help\\Gives more detailed help with programming" +msgstr "Podręcznik programowania\\Dostarcza szczegółową pomoc w programowaniu" + +msgid "Key word help\\More detailed help about key words" +msgstr "Pomoc dot. słów kluczowych\\Dokładniejsza pomoc na temat słów kluczowych" + +msgid "Origin of last message\\Shows where the last message was sent from" +msgstr "Miejsce nadania wiadomości\\Pokazuje skąd została wysłana ostatnia wiadomość" + +msgid "Speed 1.0x\\Normal speed" +msgstr "Prędkość 1,0x\\Prędkość normalna" + +msgid "Speed 1.5x\\1.5 times faster" +msgstr "Prędkość 1,5x\\1,5 raza szybciej" + +msgid "Speed 2.0x\\Double speed" +msgstr "Prędkość 2,0x\\Dwa razy szybciej" + +msgid "Speed 3.0x\\Three times faster" +msgstr "Prędkość 3,0x\\Trzy razy szybciej" + +msgid "Sound effects:\\Volume of engines, voice, shooting, etc." +msgstr "Efekty dźwiękowe:\\Głośność silników, głosów, strzałów, itp." + +msgid "Background sound :\\Volume of audio tracks on the CD" +msgstr "Muzyka w tle :\\Głośność ścieżek dźwiękowych z płyty CD" + +msgid "3D sound\\3D positioning of the sound" +msgstr "Dźwięk 3D\\Przestrzenne pozycjonowanie dźwięków" + +msgid "Lowest\\Minimum graphic quality (highest frame rate)" +msgstr "Najniższa\\Minimalna jakość grafiki (najwyższa częstotliwość odświeżania)" + +msgid "Normal\\Normal graphic quality" +msgstr "Normalna\\Normalna jakość grafiki" + +msgid "Highest\\Highest graphic quality (lowest frame rate)" +msgstr "Najwyższa\\Maksymalna jakość grafiki (najniższa częstotliwość odświeżania)" + +msgid "Mute\\No sound" +msgstr "Cisza\\Brak dźwięków" + +msgid "Normal\\Normal sound volume" +msgstr "Normalne\\Normalna głośność dźwięków" + +msgid "Use a joystick\\Joystick or keyboard" +msgstr "Używaj joysticka\\Joystick lub klawiatura" + +msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "Dostęp do rozwiązania\\Pokazuje rozwiązanie (szczegółowe instrukcje dotyczące misji)" + +msgid "\\New player name" +msgstr "\\Nowe imię gracza" + +msgid "OK\\Choose the selected player" +msgstr "OK\\Wybiera zaznaczonego gracza" + +msgid "Cancel\\Keep current player name" +msgstr "Anuluj\\Zachowuje bieżące imię gracza" + +msgid "Delete player\\Deletes the player from the list" +msgstr "Usuń gracza\\Usuwa gracza z listy" + +msgid "Player name" +msgstr "Imię gracza" + +msgid "Save\\Saves the current mission" +msgstr "Zapisz\\Zapisuje bieżącą misję" + +msgid "Load\\Loads the selected mission" +msgstr "Wczytaj\\Wczytuje zaznaczoną misję" + +msgid "List of saved missions" +msgstr "Lista zapisanych misji" + +msgid "Filename:" +msgstr "Nazwa pliku:" + +msgid "Mission name" +msgstr "Nazwa misji" + +msgid "Photography" +msgstr "Fotografia" + +msgid "Delete\\Deletes the selected file" +msgstr "Usuń\\Usuwa zaznaczony plik" + +msgid "Appearance\\Choose your appearance" +msgstr "Wygląd\\Wybierz swoją postać" + +msgid "Standard\\Standard appearance settings" +msgstr "Standardowe\\Standardowe ustawienia wyglądu" + +msgid "Head\\Face and hair" +msgstr "Głowa\\Twarz i włosy" + +msgid "Suit\\Astronaut suit" +msgstr "Skafander\\Skafander astronauty" + +msgid "\\Turn left" +msgstr "\\Obróć w lewo" + +msgid "\\Turn right" +msgstr "\\Obróć w prawo" + +msgid "Red" +msgstr "Czerwony" + +msgid "Green" +msgstr "Zielony" + +msgid "Blue" +msgstr "Niebieski" + +msgid "\\Face 1" +msgstr "\\Twarz 1" + +msgid "\\Face 4" +msgstr "\\Twarz 4" + +msgid "\\Face 3" +msgstr "\\Twarz 3" + +msgid "\\Face 2" +msgstr "\\Twarz 2" + +msgid "\\No eyeglasses" +msgstr "\\Bez okularów" + +msgid "\\Eyeglasses 1" +msgstr "\\Okulary 1" + +msgid "\\Eyeglasses 2" +msgstr "\\Okulary 2" + +msgid "\\Eyeglasses 3" +msgstr "\\Okulary 3" + +msgid "\\Eyeglasses 4" +msgstr "\\Okulary 4" + +msgid "\\Eyeglasses 5" +msgstr "\\Okulary 5" + +msgid "Previous selection (\\key desel;)" +msgstr "Poprzednie zaznaczenie (\\key desel;)" + +msgid "Turn left (\\key left;)" +msgstr "Skręć w lewo (\\key left;)" + +msgid "Turn right (\\key right;)" +msgstr "Skręć w prawo (\\key right;)" + +msgid "Forward (\\key up;)" +msgstr "Naprzód (\\key up;)" + +msgid "Backward (\\key down;)" +msgstr "Cofnij (\\key down;)" + +msgid "Up (\\key gup;)" +msgstr "Góra (\\key gup;)" + +msgid "Down (\\key gdown;)" +msgstr "Dół (\\key gdown;)" + +msgid "Grab or drop (\\key action;)" +msgstr "Podnieś lub upuść (\\key action;)" + +msgid "..in front" +msgstr "..przed" + +msgid "..behind" +msgstr "..za" + +msgid "..power cell" +msgstr "..ogniwo elektryczne" + +msgid "Instructions for the mission (\\key help;)" +msgstr "Rozkazy dotyczące misji (\\key help;)" + +msgid "Take off to finish the mission" +msgstr "Odleć, aby zakończyć misję" + +msgid "Build a derrick" +msgstr "Zbuduj kopalnię" + +msgid "Build a power station" +msgstr "Zbuduj elektrownię" + +msgid "Build a bot factory" +msgstr "Zbuduj fabrykę robotów" + +msgid "Build a repair center" +msgstr "Zbuduj warsztat" + +msgid "Build a converter" +msgstr "Zbuduj hutę" + +msgid "Build a defense tower" +msgstr "Zbuduj wieżę obronną" + +msgid "Build a research center" +msgstr "Zbuduj centrum badawcze" + +msgid "Build a radar station" +msgstr "Zbuduj stację radarową" + +msgid "Build a power cell factory" +msgstr "Zbuduj fabrykę ogniw elektrycznych" + +msgid "Build an autolab" +msgstr "Zbuduj laboratorium" + +msgid "Build a nuclear power plant" +msgstr "Zbuduj elektrownię atomową" + +msgid "Build a lightning conductor" +msgstr "Zbuduj odgromnik" + +msgid "Build a exchange post" +msgstr "Zbuduj stację przekaźnikową" + +msgid "Show if the ground is flat" +msgstr "Pokaż czy teren jest płaski" + +msgid "Plant a flag" +msgstr "Postaw flagę" + +msgid "Remove a flag" +msgstr "Usuń flagę" + +msgid "\\Blue flags" +msgstr "\\Niebieskie flagi" + +msgid "\\Red flags" +msgstr "\\Czerwone flagi" + +msgid "\\Green flags" +msgstr "\\Zielone flagi" + +msgid "\\Yellow flags" +msgstr "\\Żółte flagi" + +msgid "\\Violet flags" +msgstr "\\Fioletowe flagi" + +msgid "Build a winged grabber" +msgstr "Zbuduj transporter latający" + +msgid "Build a tracked grabber" +msgstr "Zbuduj transporter na gąsienicach" + +msgid "Build a wheeled grabber" +msgstr "Zbuduj transporter na kołach" + +msgid "Build a legged grabber" +msgstr "Zbuduj transporter na nogach" + +msgid "Build a winged shooter" +msgstr "Zbuduj działo latające" + +msgid "Build a tracked shooter" +msgstr "Zbuduj działo na gąsienicach" + +msgid "Build a wheeled shooter" +msgstr "Zbuduj działo na kołach" + +msgid "Build a legged shooter" +msgstr "Zbuduj działo na nogach" + +msgid "Build a winged orga shooter" +msgstr "Zbuduj latające działo organiczne" + +msgid "Build a tracked orga shooter" +msgstr "Zbuduj działo organiczne na gąsienicach" + +msgid "Build a wheeled orga shooter" +msgstr "Zbuduj działo organiczne na kołach" + +msgid "Build a legged orga shooter" +msgstr "Zbuduj działo organiczne na nogach" + +msgid "Build a winged sniffer" +msgstr "Zbuduj szperacz latający" + +msgid "Build a tracked sniffer" +msgstr "Zbuduj szperacz na gąsienicach" + +msgid "Build a wheeled sniffer" +msgstr "Zbuduj szperacz na kołach" + +msgid "Build a legged sniffer" +msgstr "Zbuduj szperacz na nogach" + +msgid "Build a thumper" +msgstr "Zbuduj robota uderzacza" + +msgid "Build a phazer shooter" +msgstr "Zbuduj działo fazowe" + +msgid "Build a recycler" +msgstr "Zbuduj robota recyklera" + +msgid "Build a shielder" +msgstr "Zbuduj robota osłaniajacza" + +msgid "Build a subber" +msgstr "Zbuduj robota nurka" + +msgid "Run research program for tracked bots" +msgstr "Rozpocznij prace badawcze nad transporterem na gąsienicach" + +msgid "Run research program for winged bots" +msgstr "Rozpocznij prace badawcze nad transporterem latającym" + +msgid "Run research program for thumper" +msgstr "Rozpocznij prace badawcze nad robotem uderzaczem" + +msgid "Run research program for shooter" +msgstr "Rozpocznij prace badawcze nad działem" + +msgid "Run research program for defense tower" +msgstr "Rozpocznij prace badawcze nad wieżą obronną" + +msgid "Run research program for phazer shooter" +msgstr "Rozpocznij prace badawcze nad działem fazowym" + +msgid "Run research program for shielder" +msgstr "Rozpocznij prace badawcze nad robotem osłaniaczem" + +msgid "Run research program for nuclear power" +msgstr "Rozpocznij prace badawcze nad energią atomową" + +msgid "Run research program for legged bots" +msgstr "Rozpocznij prace badawcze nad transporterem na nogach" + +msgid "Run research program for orga shooter" +msgstr "Rozpocznij prace badawcze nad działem organicznym" + +msgid "Return to start" +msgstr "Powrót do początku" + +msgid "Sniff (\\key action;)" +msgstr "Szukaj (\\key action;)" + +msgid "Thump (\\key action;)" +msgstr "Uderz (\\key action;)" + +msgid "Shoot (\\key action;)" +msgstr "Strzelaj (\\key action;)" + +msgid "Recycle (\\key action;)" +msgstr "Odzyskaj (\\key action;)" + +msgid "Extend shield (\\key action;)" +msgstr "Rozszerz osłonę (\\key action;)" + +msgid "Withdraw shield (\\key action;)" +msgstr "Wyłącz osłonę (\\key action;)" + +msgid "Shield radius" +msgstr "Zasięg osłony" + +msgid "Execute the selected program" +msgstr "Wykonaj zaznaczony program" + +msgid "Edit the selected program" +msgstr "Edytuj zaznaczony program" + +msgid "\\SatCom on standby" +msgstr "\\Przełącz przekaźnik SatCom w stan gotowości" + +msgid "Destroy the building" +msgstr "Zniszcz budynek" + +msgid "Energy level" +msgstr "Poziom energii" + +msgid "Shield level" +msgstr "Poziom osłony" + +msgid "Jet temperature" +msgstr "Temperatura silnika" + +msgid "Still working ..." +msgstr "Wciąż pracuje..." + +msgid "Number of insects detected" +msgstr "Liczba wykrytych insektów" + +msgid "Transmitted information" +msgstr "Przesłane informacje" + +msgid "Compass" +msgstr "Kompas" + +msgid "Mini-map" +msgstr "Mapka" + +msgid "Zoom mini-map" +msgstr "Powiększenie mapki" + +msgid "Camera (\\key camera;)" +msgstr "Kamera (\\key camera;)" + +msgid "Camera to left" +msgstr "Camera to left" + +msgid "Camera to right" +msgstr "Camera to right" + +msgid "Camera nearest" +msgstr "Camera nearest" + +msgid "Camera awayest" +msgstr "Camera awayest" + +msgid "Help about selected object" +msgstr "Pomoc na temat zaznaczonego obiektu" + +msgid "Show the solution" +msgstr "Pokaż rozwiązanie" + +msgid "Switch bots <-> buildings" +msgstr "Przełącz roboty <-> budynki" + +msgid "Show the range" +msgstr "Pokaż zasięg" + +msgid "\\Raise the pencil" +msgstr "\\Relčve le crayon" + +msgid "\\Use the black pencil" +msgstr "\\Abaisse le crayon noir" + +msgid "\\Use the yellow pencil" +msgstr "\\Abaisse le crayon jaune" + +msgid "\\Use the orange pencil" +msgstr "\\Abaisse le crayon orange" + +msgid "\\Use the red pencil" +msgstr "\\Abaisse le crayon rouge" + +msgid "\\Use the purple pencil" +msgstr "\\Abaisse le crayon violet" + +msgid "\\Use the blue pencil" +msgstr "\\Abaisse le crayon bleu" + +msgid "\\Use the green pencil" +msgstr "\\Abaisse le crayon vert" + +msgid "\\Use the brown pencil" +msgstr "\\Abaisse le crayon brun" + +msgid "\\Start recording" +msgstr "\\Démarre l'enregistrement" + +msgid "\\Stop recording" +msgstr "\\Stoppe l'enregistrement" + +msgid "Show the place" +msgstr "Pokaż miejsce" + +msgid "Continue" +msgstr "Kontynuuj" + +msgid "Command line" +msgstr "Linia polecenia" + +msgid "Game speed" +msgstr "Prędkość gry" + +msgid "Back" +msgstr "Wstecz" + +msgid "Forward" +msgstr "Naprzód" + +msgid "Home" +msgstr "Początek" + +msgid "Copy" +msgstr "Kopiuj" + +msgid "Size 1" +msgstr "Wielkość 1" + +msgid "Size 2" +msgstr "Wielkość 2" + +msgid "Size 3" +msgstr "Wielkość 3" + +msgid "Size 4" +msgstr "Wielkość 4" + +msgid "Size 5" +msgstr "Wielkość 5" + +msgid "Instructions from Houston" +msgstr "Rozkazy z Houston" + +msgid "Dictionnary" +msgstr "Raport z satelity" + +msgid "Satellite report" +msgstr "Raport z satelity" + +msgid "Programs dispatched by Houston" +msgstr "Program dostarczony z Houston" + +msgid "List of objects" +msgstr "Lista obiektów" + +msgid "Programming help" +msgstr "Podręcznik programowania" + +msgid "Solution" +msgstr "Rozwiązanie" + +msgid "OK\\Close program editor and return to game" +msgstr "OK\\Zamyka edytor programu i powraca do gry" + +msgid "Cancel\\Cancel all changes" +msgstr "Anuluj\\Pomija wszystkie zmiany" + +msgid "Open (Ctrl+o)" +msgstr "Otwórz (Ctrl+O)" + +msgid "Save (Ctrl+s)" +msgstr "Zapisz (Ctrl+S)" + +msgid "Undo (Ctrl+z)" +msgstr "Cofnij (Ctrl+Z)" + +msgid "Cut (Ctrl+x)" +msgstr "Wytnij (Ctrl+X)" + +msgid "Copy (Ctrl+c)" +msgstr "Kopiuj (Ctrl+C)" + +msgid "Paste (Ctrl+v)" +msgstr "Wklej (Ctrl+V)" + +msgid "Font size" +msgstr "Wielkość czcionki" + +msgid "Instructions (\\key help;)" +msgstr "Rozkazy (\\key help;)" + +msgid "Programming help (\\key prog;)" +msgstr "Podręcznik programowania (\\key prog;)" + +msgid "Compile" +msgstr "Kompiluj" + +msgid "Execute/stop" +msgstr "Wykonaj/Zatrzymaj" + +msgid "Pause/continue" +msgstr "Pauza/Kontynuuj" + +msgid "One step" +msgstr "Jeden krok" + +msgid "Gantry crane" +msgstr "Żuraw przesuwalny" + +msgid "Spaceship" +msgstr "Statek kosmiczny" + +msgid "Derrick" +msgstr "Kopalnia" + +msgid "Bot factory" +msgstr "Fabryka robotów" + +msgid "Repair center" +msgstr "Warsztat" + +msgid "Destroyer" +msgstr "Destroyer" + +msgid "Power station" +msgstr "Stacja energetyczna" + +msgid "Converts ore to titanium" +msgstr "Przetop rudę na tytan" + +msgid "Defense tower" +msgstr "Wieża obronna" + +msgid "Nest" +msgstr "Gniazdo" + +msgid "Research center" +msgstr "Centrum badawcze" + +msgid "Radar station" +msgstr "Stacja radarowa" + +msgid "Information exchange post" +msgstr "Stacja przekaźnikowa informacji" + +msgid "Disintegrator" +msgstr "Fabryka ogniw elektrycznych" + +msgid "Power cell factory" +msgstr "Fabryka ogniw elektrycznych" + +msgid "Autolab" +msgstr "Laboratorium" + +msgid "Nuclear power station" +msgstr "Elektrownia atomowa" + +msgid "Lightning conductor" +msgstr "Odgromnik" + +msgid "Vault" +msgstr "Skrytka" + +msgid "Houston Mission Control" +msgstr "Centrum Kontroli Misji w Houston" + +msgid "Target" +msgstr "Cel" + +msgid "Start" +msgstr "Początek" + +msgid "Finish" +msgstr "Koniec" + +msgid "Titanium ore" +msgstr "Ruda tytanu" + +msgid "Uranium ore" +msgstr "Ruda uranu" + +msgid "Organic matter" +msgstr "Materia organiczna" + +msgid "Titanium" +msgstr "Tytan" + +msgid "Power cell" +msgstr "Ogniwo elektryczne" + +msgid "Nuclear power cell" +msgstr "Atomowe ogniwa elektryczne" + +msgid "Black box" +msgstr "Czarna skrzynka" + +msgid "Key A" +msgstr "Klucz A" + +msgid "Key B" +msgstr "Klucz B" + +msgid "Key C" +msgstr "Klucz C" + +msgid "Key D" +msgstr "Klucz D" + +msgid "Explosive" +msgstr "Materiały wybuchowe" + +msgid "Fixed mine" +msgstr "Mina" + +msgid "Survival kit" +msgstr "Zestaw przetrwania" + +msgid "Checkpoint" +msgstr "Punkt kontrolny" + +msgid "Blue flag" +msgstr "Niebieska flaga" + +msgid "Red flag" +msgstr "Czerwona flaga" + +msgid "Green flag" +msgstr "Zielona flaga" + +msgid "Yellow flag" +msgstr "Żółta flaga" + +msgid "Violet flag" +msgstr "Fioletowa flaga" + +msgid "Energy deposit (site for power station)" +msgstr "Źródło energii (miejsce na elektrownię)" + +msgid "Uranium deposit (site for derrick)" +msgstr "Złoże uranu (miejsce na kopalnię)" + +msgid "Found key A (site for derrick)" +msgstr "Znaleziono klucz A (miejsce na kopalnię)" + +msgid "Found key B (site for derrick)" +msgstr "Znaleziono klucz B (miejsce na kopalnię)" + +msgid "Found key C (site for derrick)" +msgstr "Znaleziono klucz C (miejsce na kopalnię)" + +msgid "Found key D (site for derrick)" +msgstr "Znaleziono klucz D (miejsce na kopalnię)" + +msgid "Titanium deposit (site for derrick)" +msgstr "Złoże tytanu (miejsce na kopalnię)" + +msgid "Practice bot" +msgstr "Robot treningowy" + +msgid "Winged grabber" +msgstr "Transporter latający" + +msgid "Tracked grabber" +msgstr "Transporter na gąsienicach" + +msgid "Wheeled grabber" +msgstr "Transporter na kołach" + +msgid "Legged grabber" +msgstr "Transporter na nogach" + +msgid "Winged shooter" +msgstr "Działo latające" + +msgid "Tracked shooter" +msgstr "Działo na gąsienicach" + +msgid "Wheeled shooter" +msgstr "Działo na kołach" + +msgid "Legged shooter" +msgstr "Działo na nogach" + +msgid "Winged orga shooter" +msgstr "Latające działo organiczne" + +msgid "Tracked orga shooter" +msgstr "Działo organiczne na gąsienicach" + +msgid "Wheeled orga shooter" +msgstr "Działo organiczne na kołach" + +msgid "Legged orga shooter" +msgstr "Działo organiczne na nogach" + +msgid "Winged sniffer" +msgstr "Szperacz latający" + +msgid "Tracked sniffer" +msgstr "Szperacz na gąsienicach" + +msgid "Wheeled sniffer" +msgstr "Szperacz na kołach" + +msgid "Legged sniffer" +msgstr "Szperacz na nogach" + +msgid "Thumper" +msgstr "Uderzacz" + +msgid "Phazer shooter" +msgstr "Działo fazowe" + +msgid "Recycler" +msgstr "Recykler" + +msgid "Shielder" +msgstr "Osłaniacz" + +msgid "Subber" +msgstr "Robot nurek" + +msgid "Target bot" +msgstr "Robot cel" + +msgid "Drawer bot" +msgstr "Drawer bot" + +msgid "Engineer" +msgstr "Inżynier" + +msgid "Robbie" +msgstr "Robbie" + +msgid "Alien Queen" +msgstr "Królowa Obcych" + +msgid "Ant" +msgstr "Mrówka" + +msgid "Spider" +msgstr "Pająk" + +msgid "Wasp" +msgstr "Osa" + +msgid "Worm" +msgstr "Robal" + +msgid "Egg" +msgstr "Jajo" + +msgid "Wreckage" +msgstr "Wrak" + +msgid "Ruin" +msgstr "Ruiny" + +msgid "Waste" +msgstr "Odpady" + +msgid "Spaceship ruin" +msgstr "Ruiny statku kosmicznego" + +msgid "Remains of Apollo mission" +msgstr "Pozostałości z misji Apollo" + +msgid "Lunar Roving Vehicle" +msgstr "Pojazd Księżycowy" + +msgid "Error" +msgstr "Błąd" + +msgid "Unknown command" +msgstr "Nieznane polecenie" + +msgid "CeeBot not installed." +msgstr "Gra CeeBot nie jest zainstalowana." + +msgid "" +"Please insert the CeeBot CD\n" +"and re-run the game." +msgstr "Włóż dysk CD z grą CeeBot\ni uruchom grę jeszcze raz." + +msgid "COLOBOT not installed." +msgstr "Gra COLOBOT nie jest zainstalowana." + +msgid "" +"Please insert the COLOBOT CD\n" +"and re-run the game." +msgstr "Włóż dysk CD z grą COLOBOT\ni uruchom grę jeszcze raz." + +msgid "Inappropriate bot" +msgstr "Nieodpowiedni robot" + +msgid "Impossible when flying" +msgstr "Niemożliwe podczas lotu" + +msgid "Already carrying something" +msgstr "Nie można nieść więcej przedmiotów" + +msgid "Nothing to grab" +msgstr "Nie ma nic do podniesienia" + +msgid "Impossible when moving" +msgstr "Niemożliwe podczas ruchu" + +msgid "Place occupied" +msgstr "Miejsce zajęte" + +msgid "No other robot" +msgstr "Brak innego robota" + +msgid "You can not carry a radioactive object" +msgstr "Nie możesz przenosić przedmiotów radioaktywnych" + +msgid "You can not carry an object under water" +msgstr "Nie możesz przenosić przedmiotów pod wodą" + +msgid "Nothing to drop" +msgstr "Nie ma nic do upuszczenia" + +msgid "Impossible under water" +msgstr "Niemożliwe pod wodą" + +msgid "Not enough energy" +msgstr "Za mało energii" + +msgid "Titanium too far away" +msgstr "Tytan za daleko" + +msgid "Titanium too close" +msgstr "Tytan za blisko" + +msgid "No titanium around" +msgstr "Brak tytanu w pobliżu" + +msgid "Ground not flat enough" +msgstr "Powierzchnia nie jest wystarczająco płaska" + +msgid "Flat ground not large enough" +msgstr "Za mało płaskiego terenu" + +msgid "Too close to space ship" +msgstr "Za blisko statku kosmicznego" + +msgid "Too close to a building" +msgstr "Za blisko budynku" + +msgid "Ground inappropriate" +msgstr "Nieodpowiedni teren" + +msgid "Building too close" +msgstr "Budynek za blisko" + +msgid "Object too close" +msgstr "Obiekt za blisko" + +msgid "Nothing to recycle" +msgstr "Nie ma niczego do odzysku" + +msgid "No more energy" +msgstr "Nie ma więcej energii" + +msgid "Error in instruction move" +msgstr "Błąd w poleceniu ruchu" + +msgid "Object not found" +msgstr "Obiekt nieznany" + +msgid "Goto: inaccessible destination" +msgstr "Goto: miejsce docelowe niedostępne" + +msgid "Goto: destination occupied" +msgstr "Goto: miejsce docelowe zajęte" + +msgid "No titanium ore to convert" +msgstr "Brak rudy tytanu do przetopienia" + +msgid "No ore in the subsoil" +msgstr "W ziemi nie ma żadnej rudy" + +msgid "No energy in the subsoil" +msgstr "Brak energii w ziemi" + +msgid "No power cell" +msgstr "Brak ogniwa elektrycznego" + +msgid "Inappropriate cell type" +msgstr "Nieodpowiedni rodzaj ogniw" + +msgid "Research program already performed" +msgstr "Program badawczy został już wykonany" + +msgid "Not enough energy yet" +msgstr "Wciąż za mało energii" + +msgid "No titanium to transform" +msgstr "Brak tytanu do przetworzenia" + +msgid "Transforms only titanium" +msgstr "Przetwarza jedynie tytan" + +msgid "Doors blocked by a robot or another object " +msgstr "Drzwi zablokowane przez robota lub inny obiekt " + +msgid "You must get on the spaceship to take off " +msgstr "Musisz być na statku kosmicznym aby nim odlecieć" + +msgid "Nothing to analyze" +msgstr "Nie ma niczego do zanalizowania" + +msgid "Analyzes only organic matter" +msgstr "Analizuje jedynie materię organiczną" + +msgid "Analysis already performed" +msgstr "Analiza została już wykonana" + +msgid "Not yet enough energy" +msgstr "Wciąż za mało energii" + +msgid "No uranium to transform" +msgstr "Brak uranu do przetworzenia" + +msgid "Transforms only uranium" +msgstr "Przetwarza jedynie uran" + +msgid "No titanium" +msgstr "Brak tytanu" + +msgid "No information exchange post within range" +msgstr "Nie ma żadnej stacji przekaźnikowej w zasięgu" + +msgid "Program infected by a virus" +msgstr "Program zawirusowany" + +msgid "Infected by a virus, temporarily out of order" +msgstr "Zainfekowane wirusem, chwilowo niesprawne" + +msgid "Impossible when swimming" +msgstr "Niemożliwe podczas pływania" + +msgid "Impossible when carrying an object" +msgstr "Niemożliwe podczas przenoszenia przedmiotu" + +msgid "Too many flags of this color (maximum 5)" +msgstr "Za dużo flag w tym kolorze (maksymalnie 5)" + +msgid "Too close to an existing flag" +msgstr "Za blisko istniejącej flagi" + +msgid "No flag nearby" +msgstr "Nie ma flagi w pobliżu" + +msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgstr "Misja nie jest wypełniona (naciśnij \\key help; aby uzyskać szczegóły)" + +msgid "Bot destroyed" +msgstr "Robot zniszczony" + +msgid "Building destroyed" +msgstr "Budynek zniszczony" + +msgid "Can not create this, there are too many objects" +msgstr "Nie można tego utworzyć, za dużo obiektów" + +msgid "\"%s\" missing in this exercise" +msgstr "It misses \"%s\" in this exercise" + +msgid "Do not use in this exercise" +msgstr "Do not use in this exercise" + +msgid "Building completed" +msgstr "Budowa zakończona" + +msgid "Titanium available" +msgstr "Tytan dostępny" + +msgid "Research program completed" +msgstr "Program badawczy zakończony" + +msgid "Plans for tracked robots available " +msgstr "Dostępne plany tranporterów na gąsienicach" + +msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" +msgstr "Możesz latać używając klawiszy (\\key gup;) oraz (\\key gdown;)" + +msgid "Plans for thumper available" +msgstr "Dostępne plany robota uderzacza" + +msgid "Plans for shooter available" +msgstr "Dostępne plany działa" + +msgid "Plans for defense tower available" +msgstr "Dostępne plany wieży obronnej" + +msgid "Plans for phazer shooter available" +msgstr "Dostępne plany działa fazowego" + +msgid "Plans for shielder available" +msgstr "Dostępne plany robota osłaniacza" + +msgid "Plans for nuclear power plant available" +msgstr "Dostępne plany elektrowni atomowej" + +msgid "New bot available" +msgstr "Dostępny nowy robot" + +msgid "Analysis performed" +msgstr "Analiza wykonana" + +msgid "Power cell available" +msgstr "Wytworzono ogniwo elektryczne" + +msgid "Nuclear power cell available" +msgstr "Wytworzono atomowe ogniwo elektryczne" + +msgid "You found a usable object" +msgstr "Znaleziono użyteczny przedmiot" + +msgid "Found a site for power station" +msgstr "Znaleziono miejsce na elektrownię" + +msgid "Found a site for a derrick" +msgstr "Znaleziono miejsce na kopalnię" + +msgid "<<< Well done, mission accomplished >>>" +msgstr "<<< Dobra robota, misja wypełniona >>>" + +msgid "<<< Sorry, mission failed >>>" +msgstr "<<< Niestety, misja nie powiodła się >>>" + +msgid "Current mission saved" +msgstr "Bieżąca misja zapisana" + +msgid "Checkpoint crossed" +msgstr "Przekroczono punkt kontrolny" + +msgid "Alien Queen killed" +msgstr "Królowa Obcych została zabita" + +msgid "Ant fatally wounded" +msgstr "Mrówka śmiertelnie raniona" + +msgid "Wasp fatally wounded" +msgstr "Osa śmiertelnie raniona" + +msgid "Worm fatally wounded" +msgstr "Robal śmiertelnie raniony" + +msgid "Spider fatally wounded" +msgstr "Pająk śmiertelnie raniony" + +msgid "Press \\key help; to read instructions on your SatCom" +msgstr "Naciśnij klawisz \\key help; aby wyświetlić rozkazy na przekaźniku SatCom" + +msgid "Opening bracket missing" +msgstr "Brak nawiasu otwierającego" + +msgid "Closing bracket missing " +msgstr "Brak nawiasu zamykającego" + +msgid "The expression must return a boolean value" +msgstr "Wyrażenie musi zwrócić wartość logiczną" + +msgid "Variable not declared" +msgstr "Zmienna nie została zadeklarowana" + +msgid "Assignment impossible" +msgstr "Przypisanie niemożliwe" + +msgid "Semicolon terminator missing" +msgstr "Brak średnika na końcu wiersza" + +msgid "Instruction \"case\" outside a block \"switch\"" +msgstr "Polecenie \"case\" na zewnątrz bloku \"switch\"" + +msgid "Instructions after the final closing brace" +msgstr "Polecenie po końcowej klamrze zamykającej" + +msgid "End of block missing" +msgstr "Brak końca bloku" + +msgid "Instruction \"else\" without corresponding \"if\" " +msgstr "Polecenie \"else\" bez wystąpienia \"if\" " + +msgid "Opening brace missing " +msgstr "Brak klamry otwierającej" + +msgid "Wrong type for the assignment" +msgstr "Zły typ dla przypisania" + +msgid "A variable can not be declared twice" +msgstr "Zmienna nie może być zadeklarowana dwukrotnie" + +msgid "The types of the two operands are incompatible " +msgstr "Niezgodne typy operatorów" + +msgid "Unknown function" +msgstr "Funkcja nieznana" + +msgid "Sign \" : \" missing" +msgstr "Brak znaku \" : " + +msgid "Keyword \"while\" missing" +msgstr "Brak kluczowego słowa \"while" + +msgid "Instruction \"break\" outside a loop" +msgstr "Polecenie \"break\" na zewnątrz pętli" + +msgid "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"" +msgstr "Po etykiecie musi wystąpić \"for\", \"while\", \"do\" lub \"switch\"" + +msgid "This label does not exist" +msgstr "Taka etykieta nie istnieje" + +msgid "Instruction \"case\" missing" +msgstr "Brak polecenia \"case" + +msgid "Number missing" +msgstr "Brak liczby" + +msgid "Void parameter" +msgstr "Pusty parametr" + +msgid "Type declaration missing" +msgstr "Brak deklaracji typu" + +msgid "Variable name missing" +msgstr "Brak nazwy zmiennej" + +msgid "Function name missing" +msgstr "Brakująca nazwa funkcji" + +msgid "Too many parameters" +msgstr "Za dużo parametrów" + +msgid "Function already exists" +msgstr "Funkcja już istnieje" + +msgid "Parameters missing " +msgstr "Brak wymaganego parametru" + +msgid "No function with this name accepts this kind of parameter" +msgstr "Funkcja o tej nazwie nie akceptuje parametrów tego typu" + +msgid "No function with this name accepts this number of parameters" +msgstr "Funkcja o tej nazwie nie akceptuje takiej liczby parametrów" + +msgid "This is not a member of this class" +msgstr "To nie jest obiekt tej klasy" + +msgid "This object is not a member of a class" +msgstr "Ten obiekt nie jest członkiem klasy" + +msgid "Appropriate constructor missing" +msgstr "Brak odpowiedniego konstruktora" + +msgid "This class already exists" +msgstr "Taka klasa już istnieje" + +msgid "\" ] \" missing" +msgstr "Brak \" ] \"" + +msgid "Reserved keyword of CBOT language" +msgstr "Słowo zarezerwowane języka CBOT" + +msgid "Bad argument for \"new\"" +msgstr "Zły argument dla funkcji \"new\"" + +msgid "\" [ \" expected" +msgstr "Oczekiwane \" [ \"" + +msgid "String missing" +msgstr "Brak łańcucha" + +msgid "Incorrect index type" +msgstr "Nieprawidłowy typ indeksu" + +msgid "Private element" +msgstr "Element prywatny" + +msgid "Public required" +msgstr "Wymagany publiczny" + +msgid "Dividing by zero" +msgstr "Dzielenie przez zero" + +msgid "Variable not initialized" +msgstr "Zmienna nie została zainicjalizowana" + +msgid "Negative value rejected by \"throw\"" +msgstr "Wartość ujemna odrzucona przez \"throw\"" + +msgid "The function returned no value " +msgstr "Funkcja nie zwróciła żadnej wartości " + +msgid "No function running" +msgstr "Żadna funkcja nie działa" + +msgid "Calling an unknown function" +msgstr "Odwołanie do nieznanej funkcji" + +msgid "This class does not exist" +msgstr "Taka klasa nie istnieje" + +msgid "Unknown Object" +msgstr "Obiekt nieznany" + +msgid "Operation impossible with value \"nan\"" +msgstr "Działanie niemożliwe z wartością \"nan\"" + +msgid "Access beyond array limit" +msgstr "Dostęp poza tablicę" + +msgid "Stack overflow" +msgstr "Przepełnienie stosu" + +msgid "Illegal object" +msgstr "Nieprawidłowy obiekt" + +msgid "Can't open file" +msgstr "Nie można otworzyć pliku" + +msgid "File not open" +msgstr "Plik nie jest otwarty" + +msgid "Read error" +msgstr "Błąd odczytu" + +msgid "Write error" +msgstr "Błąd zapisu" + +msgid "< none >" +msgstr "< brak >" + +msgid "Arrow left" +msgstr "Strzałka w lewo" + +msgid "Arrow right" +msgstr "Strzałka w prawo" + +msgid "Arrow up" +msgstr "Strzałka w górę" + +msgid "Arrow down" +msgstr "Strzałka w dół" + +msgid "Control-break" +msgstr "Ctrl-break" + +msgid "<--" +msgstr "<--" + +msgid "Tab" +msgstr "Tab" + +msgid "Clear" +msgstr "Delete" + +msgid "Enter" +msgstr "Enter" + +msgid "Shift" +msgstr "Shift" + +msgid "Ctrl" +msgstr "Ctrl" + +msgid "Alt" +msgstr "Alt" + +msgid "Pause" +msgstr "Pause" + +msgid "Caps Lock" +msgstr "Caps Lock" + +msgid "Esc" +msgstr "Esc" + +msgid "Space" +msgstr "Spacja" + +msgid "Page Up" +msgstr "Page Up" + +msgid "Page Down" +msgstr "Page Down" + +msgid "End" +msgstr "End" + +msgid "Home Key" +msgstr "Home" + +msgid "Select" +msgstr "Zaznacz" + +msgid "Execute" +msgstr "Wykonaj" + +msgid "Print Scrn" +msgstr "Print Scrn" + +msgid "Insert" +msgstr "Insert" + +msgid "Delete Key" +msgstr "Delete" + +msgid "Help" +msgstr "Pomoc" + +msgid "Left Windows" +msgstr "Lewy klawisz Windows" + +msgid "Right Windows" +msgstr "Prawy klawisz Windows" + +msgid "Application key" +msgstr "Klawisz menu kontekstowego" + +msgid "NumPad 0" +msgstr "Klaw. Num. 0" + +msgid "NumPad 1" +msgstr "Klaw. Num. 1" + +msgid "NumPad 2" +msgstr "Klaw. Num. 2" + +msgid "NumPad 3" +msgstr "Klaw. Num. 3" + +msgid "NumPad 4" +msgstr "Klaw. Num. 4" + +msgid "NumPad 5" +msgstr "Klaw. Num. 5" + +msgid "NumPad 6" +msgstr "Klaw. Num. 6" + +msgid "NumPad 7" +msgstr "Klaw. Num. 7" + +msgid "NumPad 8" +msgstr "Klaw. Num. 8" + +msgid "NumPad 9" +msgstr "Klaw. Num. 9" + +msgid "NumPad *" +msgstr "Klaw. Num. *" + +msgid "NumPad +" +msgstr "Klaw. Num. +" + +msgid "NumPad sep" +msgstr "Klaw. Num. separator" + +msgid "NumPad -" +msgstr "Klaw. Num. -" + +msgid "NumPad ." +msgstr "Klaw. Num. ." + +msgid "NumPad /" +msgstr "Klaw. Num. /" + +msgid "F1" +msgstr "F1" + +msgid "F2" +msgstr "F2" + +msgid "F3" +msgstr "F3" + +msgid "F4" +msgstr "F4" + +msgid "F5" +msgstr "F5" + +msgid "F6" +msgstr "F6" + +msgid "F7" +msgstr "F7" + +msgid "F8" +msgstr "F8" + +msgid "F9" +msgstr "F9" + +msgid "F10" +msgstr "F10" + +msgid "F11" +msgstr "F11" + +msgid "F12" +msgstr "F12" + +msgid "F13" +msgstr "F13" + +msgid "F14" +msgstr "F14" + +msgid "F15" +msgstr "F15" + +msgid "F16" +msgstr "F16" + +msgid "F17" +msgstr "F17" + +msgid "F18" +msgstr "F18" + +msgid "F19" +msgstr "F19" + +msgid "F20" +msgstr "F20" + +msgid "Num Lock" +msgstr "Num Lock" + +msgid "Scroll" +msgstr "Scroll Lock" + +msgid "Attn" +msgstr "Attn" + +msgid "CrSel" +msgstr "CrSel" + +msgid "ExSel" +msgstr "ExSel" + +msgid "Erase EOF" +msgstr "Erase EOF" + +msgid "Play" +msgstr "Graj" + +msgid "Zoom" +msgstr "Powiększenie" + +msgid "PA1" +msgstr "PA1" + +msgid "Button 1" +msgstr "Przycisk 1" + +msgid "Button 2" +msgstr "Przycisk 2" + +msgid "Button 3" +msgstr "Przycisk 3" + +msgid "Button 4" +msgstr "Przycisk 4" + +msgid "Button 5" +msgstr "Przycisk 5" + +msgid "Button 6" +msgstr "Przycisk 6" + +msgid "Button 7" +msgstr "Przycisk 7" + +msgid "Button 8" +msgstr "Przycisk 8" + +msgid "Button 9" +msgstr "Przycisk 9" + +msgid "Button 10" +msgstr "Przycisk 10" + +msgid "Button 11" +msgstr "Przycisk 11" + +msgid "Button 12" +msgstr "Przycisk 12" + +msgid "Button 13" +msgstr "Przycisk 13" + +msgid "Button 14" +msgstr "Przycisk 14" + +msgid "Button 15" +msgstr "Przycisk 15" + +msgid "Button 16" +msgstr "Przycisk 16" + +msgid "Button 17" +msgstr "Przycisk 17" + +msgid "Button 18" +msgstr "Przycisk 18" + +msgid "Button 19" +msgstr "Przycisk 19" + +msgid "Button 20" +msgstr "Przycisk 20" + +msgid "Button 21" +msgstr "Przycisk 21" + +msgid "Button 22" +msgstr "Przycisk 22" + +msgid "Button 23" +msgstr "Przycisk 23" + +msgid "Button 24" +msgstr "Przycisk 24" + +msgid "Button 25" +msgstr "Przycisk 25" + +msgid "Button 26" +msgstr "Przycisk 26" + +msgid "Button 27" +msgstr "Przycisk 27" + +msgid "Button 28" +msgstr "Przycisk 28" + +msgid "Button 29" +msgstr "Przycisk 29" + +msgid "Button 30" +msgstr "Przycisk 30" + +msgid "Button 31" +msgstr "Przycisk 31" + +msgid "Button 32" +msgstr "Przycisk 32" + +msgid "Wheel up" +msgstr "Kółko w górę" + +msgid "Wheel down" +msgstr "Kółko w dół" -- cgit v1.2.3-1-g7c22 From 7f277c9ab9912bcf2a7e5e4b07faa506cb7527c2 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Mon, 27 Aug 2012 01:05:59 +0200 Subject: Whitespace fix --- src/common/restext.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/common/restext.cpp b/src/common/restext.cpp index bdada27..487d1a6 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -113,7 +113,7 @@ static void PutKeyName(char* dst, const char* src) if ( SearchKey(src+s+5, key) ) { // FIXME: res = g_engine->RetKey(key, 0); - res = 0; + res = 0; if ( res != 0 ) { if ( GetResource(RES_KEY, res, name) ) @@ -146,33 +146,33 @@ static const char* GetResourceBase(ResType type, int num) switch (type) { case RES_TEXT: - assert(num < strings_text_len); - str = strings_text[num]; - break; + assert(num < strings_text_len); + str = strings_text[num]; + break; case RES_EVENT: - assert(num < strings_event_len); - str = strings_event[num]; - break; + assert(num < strings_event_len); + str = strings_event[num]; + break; case RES_OBJECT: - assert(num < strings_object_len); - if (num == OBJECT_HUMAN) - return g_gamerName; - str = strings_object[num]; - break; + assert(num < strings_object_len); + if (num == OBJECT_HUMAN) + return g_gamerName; + str = strings_object[num]; + break; case RES_ERR: - assert(num < strings_err_len); - str = strings_err[num]; - break; + assert(num < strings_err_len); + str = strings_err[num]; + break; case RES_CBOT: - assert(num < strings_cbot_len); - str = strings_cbot[num]; - break; + assert(num < strings_cbot_len); + str = strings_cbot[num]; + break; case RES_KEY: - assert(num < SDLK_LAST); - str = SDL_GetKeyName(static_cast(num)); - break; + assert(num < SDLK_LAST); + str = SDL_GetKeyName(static_cast(num)); + break; default: - assert(false); + assert(false); } return gettext(str); } -- cgit v1.2.3-1-g7c22 From 6ba0f42f22a170625f15879e01b4653a4ac153a1 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 31 Aug 2012 22:28:07 +0200 Subject: latest changes; few more classes should compile now --- src/CMakeLists.txt | 4 +- src/common/misc.cpp | 2 +- src/common/misc.h | 2 +- src/ui/button.cpp | 16 +--- src/ui/button.h | 12 ++- src/ui/control.cpp | 104 +++++++----------------- src/ui/control.h | 44 ++++++----- src/ui/edit.cpp | 217 ++++++++++++++++++++++++--------------------------- src/ui/edit.h | 42 ++++++---- src/ui/gauge.cpp | 14 +--- src/ui/gauge.h | 33 ++++---- src/ui/interface.cpp | 4 +- src/ui/interface.h | 5 +- src/ui/key.cpp | 2 +- src/ui/studio.cpp | 196 +++++++++++++++++++--------------------------- src/ui/studio.h | 165 ++++++++++++++++++++++----------------- src/ui/target.cpp | 4 +- src/ui/target.h | 3 +- src/ui/window.cpp | 84 +++++--------------- src/ui/window.h | 34 ++++++-- 20 files changed, 446 insertions(+), 541 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a49d371..c3b460c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -149,10 +149,10 @@ graphics/opengl/gldevice.cpp # ui/check.cpp # ui/color.cpp # ui/compass.cpp -# ui/control.cpp +ui/control.cpp # ui/displayinfo.cpp # ui/displaytext.cpp -# ui/edit.cpp +ui/edit.cpp # ui/editvalue.cpp # ui/gauge.cpp # ui/group.cpp diff --git a/src/common/misc.cpp b/src/common/misc.cpp index d4805e6..747c66d 100644 --- a/src/common/misc.cpp +++ b/src/common/misc.cpp @@ -381,7 +381,7 @@ void UserDir(bool bUser, char* dir) // def = "abc\" // out: buffer = "abc\toto.txt" -void UserDir(char* buffer, char* dir, char* def) +void UserDir(char* buffer, const char* dir, const char* def) { char ddir[100]; char* add; diff --git a/src/common/misc.h b/src/common/misc.h index bb4bf1f..0001332 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -231,7 +231,7 @@ extern bool CopyFileToTemp(char* filename); extern bool CopyFileListToTemp(char* filename, int* list, int total); extern void AddExt(char* filename, char* ext); extern void UserDir(bool bUser, char* dir); -extern void UserDir(char* buffer, char* dir, char* def); +extern void UserDir(char* buffer, const char* dir, const char* def); extern char GetLanguageLetter(); diff --git a/src/ui/button.cpp b/src/ui/button.cpp index 1f11a0c..60c76b3 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -16,20 +16,8 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -//#include -//#include -//#include - -//#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -//#include "common/language.h" -//#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "common/restext.h" -#include "ui/button.h" + +#include namespace Ui { diff --git a/src/ui/button.h b/src/ui/button.h index 924a4d8..789b51c 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -20,13 +20,17 @@ #pragma once -#include "ui/control.h" +#include + +#include + +#include +#include +#include -namespace Gfx{ -class CEngine; -} namespace Ui { + class CButton : public CControl { public: diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 37392d7..59e9f00 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -16,28 +16,7 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -//#include -#include -//#include - -#include "graphics/core/device.h" -//#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -#include "common/language.h" -#include "common/restext.h" -//#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "object/robotmain.h" -//#include "old/particule.h" -#include "graphics/engine/particle.h" -#include "common/iman.h" -//#include "old/text.h" -#include "graphics/engine/text.h" -//#include "old/sound.h" -#include "sound/sound.h" -#include "ui/control.h" +#include @@ -60,8 +39,6 @@ CControl::CControl() m_fontType = Gfx::FONT_COLOBOT; m_textAlign = Gfx::TEXT_ALIGN_CENTER; //instead m_justify // m_justif = 0; - m_name[0] = 0; - m_tooltip[0] = 0; m_bFocus = false; m_bCapture = false; @@ -84,10 +61,11 @@ CControl::~CControl() bool CControl::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { - char text[100]; - char* p; + char text[100]; + std::string str_text; - if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); + if ( eventType == EVENT_NULL ) + eventType = GetUniqueEventType(); m_pos = pos; m_dim = dim; @@ -99,17 +77,13 @@ bool CControl::Create(Math::Point pos, Math::Point dim, int icon, EventType even GlintCreate(pos); GetResource(RES_EVENT, m_eventType, text); - p = strchr(text, '\\'); - if ( p == 0 ) - { + str_text = std::string(text); + auto p = str_text.find("\\"); + if ( p == std::string::npos ) { if ( icon != -1 ) - { - strcpy(m_tooltip, text); - } - } - else - { - strcpy(m_tooltip, p+1); // text after "\\" + m_tooltip = str_text; + } else { + m_tooltip = str_text.substr(p + 1); } return true; @@ -202,41 +176,21 @@ int CControl::GetIcon() // Management of the button name. -void CControl::SetName(char* name, bool bTooltip) +void CControl::SetName(std::string name, bool bTooltip) { - char* p; - - if ( bTooltip ) - { - p = strchr(name, '\\'); - if ( p == 0 ) - { - strncpy(m_name, name, 100); - m_name[100-1] = 0; + if ( bTooltip ) { + auto p = name.find("\\"); + if ( p == std::string::npos ) + m_name = name; + else { + m_tooltip = name.substr(p + 1); + m_name = name.substr(0, p); } - else - { - char buffer[100]; - - strncpy(m_tooltip, p+1, 100); // text after "\\" - m_tooltip[100-1] = 0; - - strncpy(buffer, name, 100); - buffer[100-1] = 0; - p = strchr(buffer, '\\'); - if ( p != 0 ) *p = 0; - strncpy(m_name, buffer, 100); - m_name[100-1] = 0; - } - } - else - { - strncpy(m_name, name, 100); - m_name[100-1] = 0; - } + } else + m_name = name; } -char* CControl::GetName() +std::string CControl::GetName() { return m_name; } @@ -298,21 +252,21 @@ Gfx::FontType CControl::GetFontType() // Specifies the tooltip. -bool CControl::SetTooltip(char* name) +bool CControl::SetTooltip(std::string name) { - strcpy(m_tooltip, name); + m_tooltip = name; return true; } -bool CControl::GetTooltip(Math::Point pos, char* name) +bool CControl::GetTooltip(Math::Point pos, std::string &name) { - if ( m_tooltip[0] == 0 ) return false; - if ( (m_state & STATE_VISIBLE) == 0 ) return false; + if ( m_tooltip.length() == 0 ) return false; + if ( (m_state & STATE_VISIBLE) == 0 ) return false; if ( (m_state & STATE_ENABLE) == 0 ) return false; if ( m_state & STATE_DEAD ) return false; if ( !Detect(pos) ) return false; - strcpy(name, m_tooltip); + name = m_tooltip; return true; } @@ -454,7 +408,7 @@ void CControl::GlintFrame(const Event &event) (m_state & STATE_ENABLE ) == 0 || (m_state & STATE_VISIBLE) == 0 ) return; - if ( !m_main->RetGlint() ) return; + if ( !m_main->GetGlint() ) return; m_glintProgress += event.rTime; diff --git a/src/ui/control.h b/src/ui/control.h index 13cf998..b16a324 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -18,25 +19,28 @@ #pragma once +#include -//#include "old/text.h" -#include "graphics/engine/text.h" -//#include "common/struct.h" -#include "common/event.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include -namespace Gfx { -class CEngine; -class CParticle; -}; -class CInstanceManager; -class CEvent; -//class Gfx::CEngine; -class CRobotMain; -//class Gfx::CParticle; -class CSoundInterface; namespace Ui { + + enum ControlState { STATE_ENABLE = (1<<0), // active @@ -82,8 +86,8 @@ public: virtual int GetState(); virtual void SetIcon(int icon); virtual int GetIcon(); - virtual void SetName(const char* name, bool bTooltip=true); - virtual char* GetName(); + virtual void SetName(std::string name, bool bTooltip=true); + virtual std::string GetName(); virtual void SetTextAlign(Gfx::TextAlign mode); virtual int GetTextAlign(); virtual void SetFontSize(float size); @@ -92,8 +96,8 @@ public: virtual float GetFontStretch(); virtual void SetFontType(Gfx::FontType font); virtual Gfx::FontType GetFontType(); - virtual bool SetTooltip(char* name); - virtual bool GetTooltip(Math::Point pos, char* name); + virtual bool SetTooltip(std::string name); + virtual bool GetTooltip(Math::Point pos, std::string &name); virtual void SetFocus(bool bFocus); virtual bool GetFocus(); @@ -130,8 +134,8 @@ protected: Gfx::FontType m_fontType; // type of font Gfx::TextAlign m_textAlign; //type of alignment //comes in the place of m_justif // int m_justif; // type of justification (-1,0,1) - char m_name[100]; // name of the button - char m_tooltip[100]; // name of tooltip + std::string m_name; // name of the button + std::string m_tooltip; // name of tooltip bool m_bFocus; bool m_bCapture; diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index 86f0011..2052356 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -18,26 +18,7 @@ // edit.cpp -#include -#include -#include -//#include -//#include - -//#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -#include "common/language.h" -//#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "common/restext.h" -#include "ui/scroll.h" -//#include "old/text.h" -#include "graphics/engine/text.h" -//#include "graphics/engine/color.h" -#include "ui/edit.h" +#include namespace Ui { @@ -96,9 +77,9 @@ CEdit::CEdit () : CControl () int i; m_maxChar = 100; - m_text = new char* [sizeof(char)*(m_maxChar+1)]; // TODO - m_format = 0; + m_text = new char[sizeof(char)*(m_maxChar+1)]; m_len = 0; + m_app = CApplication::GetInstancePointer(); m_fontType = Gfx::FONT_COURIER; m_scroll = 0; @@ -139,7 +120,6 @@ CEdit::~CEdit() } delete m_text; - delete m_format; delete m_scroll; } @@ -565,7 +545,7 @@ bool CEdit::IsLinkPos(Math::Point pos) { int i; - if ( m_format == 0 ) return false; + if ( m_format.size() == 0 ) return false; i = MouseDetect(pos); if ( i == -1 ) return false; @@ -645,7 +625,7 @@ void CEdit::MouseRelease(Math::Point mouse) if ( !m_bEdit ) { - if ( m_format != 0 && i < m_len && m_cursor1 == m_cursor2 && + if ( m_format.size() > 0 && i < m_len && m_cursor1 == m_cursor2 && (m_format[i]&Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_LINK) //TODO { rank = -1; @@ -712,7 +692,7 @@ int CEdit::MouseDetect(Math::Point mouse) pos.y = m_pos.y+m_dim.y-m_lineHeight-(m_bMulti?MARGY:MARGY1); for ( i=m_lineFirst ; i 0 && (m_format[m_lineOffset[i]]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG ); if ( i >= m_lineFirst+m_lineVisible ) break; @@ -729,12 +709,12 @@ int CEdit::MouseDetect(Math::Point mouse) { len = m_lineOffset[i+1] - m_lineOffset[i]; - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { // c = m_engine->GetText()->Detect(m_text+m_lineOffset[i], // len, offset, m_fontSize, // m_fontStretch, m_fontType); - c = m_engine->GetText()->Detect(m_text+m_lineOffset[i], m_fontType, m_fontSize, offset); // TODO check if good + c = m_engine->GetText()->Detect(std::string(m_text+m_lineOffset[i]), m_fontType, m_fontSize, offset); // TODO check if good } else { @@ -745,7 +725,10 @@ int CEdit::MouseDetect(Math::Point mouse) // m_format+m_lineOffset[i], // len, offset, size, // m_fontStretch); - c = m_engine->GetText()->Detect(m_text+m_lineOffset[i],m_format+m_lineOffset[i], size, offset); // TODO check if good + c = m_engine->GetText()->Detect(std::string(m_text+m_lineOffset[i]), + std::vector(m_format.begin()+m_lineOffset[i], m_format.end()), + size, + offset); // TODO check if good } return m_lineOffset[i]+c; } @@ -767,7 +750,7 @@ void CEdit::HyperFlush() // Indicates which is the home page. -void CEdit::HyperHome(char *filename) +void CEdit::HyperHome(const char *filename) { HyperFlush(); HyperAdd(filename, 0); @@ -775,7 +758,7 @@ void CEdit::HyperHome(char *filename) // Performs a hyper jump through a link. -void CEdit::HyperJump(char *name, char *marker) +void CEdit::HyperJump(const char *name, const char *marker) { char filename[100]; char sMarker[100]; @@ -826,7 +809,7 @@ void CEdit::HyperJump(char *name, char *marker) // Adds text to the history of visited. -bool CEdit::HyperAdd(char *filename, int firstLine) +bool CEdit::HyperAdd(const char *filename, int firstLine) { if ( m_historyCurrent >= EDITHISTORYMAX-1 ) return false; @@ -958,7 +941,7 @@ void CEdit::Draw() size = m_fontSize; // Headline \b;? - if ( beg+len < m_len && m_format != 0 && + if ( beg+len < m_len && m_format.size() > 0 && (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG ) { start.x = ppos.x-MARGX; @@ -972,7 +955,7 @@ void CEdit::Draw() } // As \t;? - if ( beg+len < m_len && m_format != 0 && + if ( beg+len < m_len && m_format.size() > 0 && (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_NORM ) { start.x = ppos.x-MARGX; @@ -983,7 +966,7 @@ void CEdit::Draw() } // Subtitle \s;? - if ( beg+len < m_len && m_format != 0 && + if ( beg+len < m_len && m_format.size() > 0 && (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_LITTLE ) { start.x = ppos.x-MARGX; @@ -994,7 +977,7 @@ void CEdit::Draw() } // Table \tab;? - if ( beg+len < m_len && m_format != 0 && + if ( beg+len < m_len && m_format.size() > 0 && (m_format[beg]&Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_TABLE ) { start.x = ppos.x-MARGX; @@ -1005,7 +988,7 @@ void CEdit::Draw() } // Image \image; ? - if ( beg+len < m_len && m_format != 0 && + if ( beg+len < m_len && m_format.size() > 0 && (m_format[beg]&Gfx::FONT_MASK_IMAGE) != 0 ) { line = 1; @@ -1034,20 +1017,24 @@ void CEdit::Draw() o1 = c1; if ( o1 < beg ) o1 = beg; o2 = c2; if ( o2 > beg+len ) o2 = beg+len; - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { - start.x = ppos.x+m_engine->GetText()->GetStringWidth(m_text+beg, m_fontType, size); - end.x = m_engine->GetText()->GetStringWidth(m_text+o1, m_fontType, size); + start.x = ppos.x+m_engine->GetText()->GetStringWidth(std::string(m_text+beg), m_fontType, size); + end.x = m_engine->GetText()->GetStringWidth(std::string(m_text+o1), m_fontType, size); } else { - start.x = ppos.x+m_engine->GetText()->GetStringWidth(m_text+beg, m_format+beg, size); - end.x = m_engine->GetText()->GetStringWidth(m_text+o1, m_format+o1, size); + start.x = ppos.x+m_engine->GetText()->GetStringWidth(std::string(m_text+beg), + std::vector(m_format.begin()+beg, m_format.end()), + size); + end.x = m_engine->GetText()->GetStringWidth(std::string(m_text+o1), + std::vector(m_format.begin()+o1, m_format.end()), + size); } start.y = ppos.y-(m_bMulti?0.0f:MARGY1); end.y = m_lineHeight; - if ( m_format != 0 && (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG) end.y *= BIG_FONT; + if ( m_format.size() > 0 && (m_format[beg]&Gfx::FONT_MASK_TITLE) == Gfx::FONT_TITLE_BIG) end.y *= BIG_FONT; DrawPart(start, end, 1); // plain yellow background } @@ -1062,13 +1049,19 @@ void CEdit::Draw() eol = 2; // square (eot) } if ( !m_bMulti || !m_bDisplaySpec ) eol = 0; - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { - m_engine->GetText()->DrawText(m_text+beg, m_fontType, size, ppos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, eol); + m_engine->GetText()->DrawText(std::string(m_text+beg), m_fontType, size, ppos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, eol); } else { - m_engine->GetText()->DrawText(m_text+beg, m_format+beg, size, ppos, m_dim.x, Gfx::TEXT_ALIGN_RIGHT, eol); + m_engine->GetText()->DrawText(std::string(m_text+beg), + std::vector(m_format.begin()+beg, m_format.end()), + size, + ppos, + m_dim.x, + Gfx::TEXT_ALIGN_RIGHT, + eol); } pos.y -= m_lineHeight; @@ -1096,16 +1089,16 @@ void CEdit::Draw() len = m_cursor1 - m_lineOffset[i]; - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { - m_engine->GetText()->SizeText(m_text+m_lineOffset[i], m_fontType, + m_engine->GetText()->SizeText(std::string(m_text+m_lineOffset[i]), m_fontType, size, pos, Gfx::TEXT_ALIGN_RIGHT, start, end); } else { - m_engine->GetText()->SizeText(m_text+m_lineOffset[i], - m_format+m_lineOffset[i], + m_engine->GetText()->SizeText(std::string(m_text+m_lineOffset[i]), + std::vector(m_format.begin()+m_lineOffset[i], m_format.end()), size, pos, Gfx::TEXT_ALIGN_RIGHT, start, end); } @@ -1129,7 +1122,7 @@ void CEdit::Draw() // Draw an image part. -void CEdit::DrawImage(Math::Point pos, char *name, float width, +void CEdit::DrawImage(Math::Point pos, const char *name, float width, float offset, float height, int nbLine) { Math::Point uv1, uv2, dim; @@ -1242,7 +1235,7 @@ void CEdit::DrawPart(Math::Point pos, Math::Point dim, int icon) // Give the text to edit. -void CEdit::SetText(char *text, bool bNew) +void CEdit::SetText(const char *text, bool bNew) { int i, j, font; bool bBOL; @@ -1252,7 +1245,7 @@ void CEdit::SetText(char *text, bool bNew) m_len = strlen(text); if ( m_len > m_maxChar ) m_len = m_maxChar; - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { if ( m_bAutoIndent ) { @@ -1382,7 +1375,7 @@ int CEdit::GetTextLength() // Returns a name in a command. // \x nom1 nom2 nom3; -void GetNameParam(char *cmd, int rank, char *buffer) +void GetNameParam(const char *cmd, int rank, char *buffer) { int i; @@ -1405,7 +1398,7 @@ void GetNameParam(char *cmd, int rank, char *buffer) // Returns a number of a command. // \x nom n1 n2; -int GetValueParam(char *cmd, int rank) +int GetValueParam(const char *cmd, int rank) { int n, i; @@ -1440,7 +1433,7 @@ void CEdit::FreeImage() // Reads the texture of an image. -void CEdit::LoadImage(char *name) +void CEdit::LoadImage(const char *name) { char filename[100]; @@ -1452,7 +1445,7 @@ void CEdit::LoadImage(char *name) // Read from a text file. -bool CEdit::ReadText(char *filename, int addSize) +bool CEdit::ReadText(const char *filename, int addSize) { FILE *file = NULL; char *buffer; @@ -1482,10 +1475,9 @@ bool CEdit::ReadText(char *filename, int addSize) buffer = new char[sizeof(char)*(m_maxChar+1)]; fread(buffer, 1, len, file); - if ( m_format != 0 ) + if ( m_format.size() > 0 ) { - delete m_format; - m_format = new char[sizeof(char)*m_maxChar]; + m_format.clear(); } fclose(file); @@ -1507,7 +1499,7 @@ bool CEdit::ReadText(char *filename, int addSize) if ( !bBOL ) { m_text[j] = buffer[i]; - if ( m_format != 0 ) m_format[j] = font; + if ( m_format.size() > 0 ) m_format[j] = font; j ++; } i ++; @@ -1520,7 +1512,7 @@ bool CEdit::ReadText(char *filename, int addSize) { i ++; } - else if ( m_format != 0 && buffer[i] == '\\' && buffer[i+2] == ';' ) + else if ( m_format.size() > 0 && buffer[i] == '\\' && buffer[i+2] == ';' ) { if ( buffer[i+1] == 'n' ) // normal ? { @@ -1581,7 +1573,7 @@ bool CEdit::ReadText(char *filename, int addSize) i += 3; } } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \u marker name; ? buffer[i+1] == 'u' && buffer[i+2] == ' ' ) @@ -1598,7 +1590,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += strchr(buffer+i, ';')-(buffer+i)+1; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \m marker; ? buffer[i+1] == 'm' && buffer[i+2] == ' ' ) @@ -1614,7 +1606,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += strchr(buffer+i, ';')-(buffer+i)+1; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \image name lx ly; ? buffer[i+1] == 'i' && buffer[i+2] == 'm' && @@ -1651,7 +1643,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += strchr(buffer+i, ';')-(buffer+i)+1; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \button; ? buffer[i+1] == 'b' && buffer[i+2] == 'u' && @@ -1669,7 +1661,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += strchr(buffer+i, ';')-(buffer+i)+1; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \token; ? buffer[i+1] == 't' && buffer[i+2] == 'o' && @@ -1685,7 +1677,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += 7; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \type; ? buffer[i+1] == 't' && buffer[i+2] == 'y' && @@ -1700,7 +1692,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += 6; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \const; ? buffer[i+1] == 'c' && buffer[i+2] == 'o' && @@ -1716,7 +1708,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += 7; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \key; ? buffer[i+1] == 'k' && buffer[i+2] == 'e' && @@ -1730,7 +1722,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += 5; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \tab; ? buffer[i+1] == 't' && buffer[i+2] == 'a' && @@ -1743,7 +1735,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += 5; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \norm; ? buffer[i+1] == 'n' && buffer[i+2] == 'o' && @@ -1757,7 +1749,7 @@ bool CEdit::ReadText(char *filename, int addSize) } i += 6; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \begin soluce; ? buffer[i+1] == 'b' && buffer[i+2] == 's' && @@ -1766,7 +1758,7 @@ bool CEdit::ReadText(char *filename, int addSize) bInSoluce = true; i += 4; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \end soluce; ? buffer[i+1] == 'e' && buffer[i+2] == 's' && @@ -1775,7 +1767,7 @@ bool CEdit::ReadText(char *filename, int addSize) bInSoluce = false; i += 4; } - else if ( m_format != 0 && + else if ( m_format.size() > 0 && buffer[i+0] == '\\' && // \key name; ? buffer[i+1] == 'k' && buffer[i+2] == 'e' && @@ -1786,7 +1778,7 @@ bool CEdit::ReadText(char *filename, int addSize) { if ( SearchKey(buffer+i+5, key) ) { - res = m_engine->GetKey(key, 0); // TODO + res = m_app->GetKey(key, 0); // TODO if ( res != 0 ) { if ( GetResource(RES_KEY, res, iName) ) @@ -1805,7 +1797,7 @@ bool CEdit::ReadText(char *filename, int addSize) m_format[j] = font; j ++; - res = m_engine->GetKey(key, 1); // TODO + res = m_app->GetKey(key, 1); // TODO if ( res != 0 ) { if ( GetResource(RES_KEY, res, iName) ) @@ -1846,7 +1838,7 @@ bool CEdit::ReadText(char *filename, int addSize) if ( m_bSoluce || !bInSoluce ) { m_text[j] = buffer[i]; - if ( m_format != 0 ) m_format[j] = font; + if ( m_format.size() > 0 ) m_format[j] = font; j ++; } i ++; @@ -1871,7 +1863,7 @@ bool CEdit::ReadText(char *filename, int addSize) // Writes all the text in a file. -bool CEdit::WriteText(char *filename) +bool CEdit::WriteText(const char *filename) { FILE* file; char buffer[1000+20]; @@ -1943,10 +1935,9 @@ void CEdit::SetMaxChar(int max) delete m_text; m_text = (char*)malloc(sizeof(char)*(m_maxChar+1)); - if ( m_format != 0 ) + if ( m_format.size() > 0 ) { - delete m_format; - m_format = (char*)malloc(sizeof(char)*m_maxChar); + m_format.clear(); } m_len = 0; @@ -2135,22 +2126,12 @@ bool CEdit::GetDisplaySpec() void CEdit::SetMultiFont(bool bMulti) { - if ( bMulti ) - { - delete m_format; - m_format = (char*)malloc(sizeof(char)*m_maxChar); - memset(m_format, 0, m_maxChar); - } - else - { - delete m_format; - m_format = 0; - } + m_format.clear(); } bool CEdit::GetMultiFont() { - return ( m_format != 0 ); + return ( m_format.size() > 0 ); } @@ -2439,16 +2420,16 @@ void CEdit::MoveLine(int move, bool bWord, bool bSelect) column -= indentLength*m_lineIndent[line]; } - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { - c = m_engine->GetText()->Detect(m_text+m_lineOffset[line], + c = m_engine->GetText()->Detect(std::string(m_text+m_lineOffset[line]), m_fontType, m_fontSize, m_lineOffset[line+1]-m_lineOffset[line]); } else { - c = m_engine->GetText()->Detect(m_text+m_lineOffset[line], - m_format+m_lineOffset[line], + c = m_engine->GetText()->Detect(std::string(m_text+m_lineOffset[line]), + std::vector(m_format.begin()+m_lineOffset[line], m_format.end()), m_fontSize, m_lineOffset[line+1]-m_lineOffset[line]); } @@ -2469,17 +2450,17 @@ void CEdit::ColumnFix() line = GetCursorLine(m_cursor1); - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { m_column = m_engine->GetText()->GetStringWidth( - m_text+m_lineOffset[line], + std::string(m_text+m_lineOffset[line]), m_fontType, m_fontSize); } else { m_column = m_engine->GetText()->GetStringWidth( - m_text+m_lineOffset[line], - m_format+m_lineOffset[line], + std::string(m_text+m_lineOffset[line]), + std::vector(m_format.begin()+m_lineOffset[line], m_format.end()), m_fontSize ); } @@ -2497,7 +2478,7 @@ void CEdit::ColumnFix() bool CEdit::Cut() // TODO MS Windows allocations { - HGLOBAL hg; + /* HGLOBAL hg; char* text; char c; int c1, c2, start, len, i, j; @@ -2570,7 +2551,7 @@ bool CEdit::Cut() // TODO MS Windows allocations DeleteOne(0); // deletes the selected characters Justif(); ColumnFix(); - SendModifEvent(); + SendModifEvent();*/ return true; } @@ -2578,7 +2559,7 @@ bool CEdit::Cut() // TODO MS Windows allocations bool CEdit::Copy() // TODO { - HGLOBAL hg; + /* HGLOBAL hg; char* text; char c; int c1, c2, start, len, i, j; @@ -2642,7 +2623,7 @@ bool CEdit::Copy() // TODO return false; } CloseClipboard(); - +*/ return true; } @@ -2650,7 +2631,7 @@ bool CEdit::Copy() // TODO bool CEdit::Paste() // TODO { - HANDLE h; + /*HANDLE h; char c; char* p; @@ -2688,7 +2669,7 @@ bool CEdit::Paste() // TODO Justif(); ColumnFix(); - SendModifEvent(); + SendModifEvent();*/ return true; } @@ -2821,7 +2802,7 @@ void CEdit::InsertOne(char character) { m_text[i] = m_text[i-1]; // shoot - if ( m_format != 0 ) + if ( m_format.size() > 0 ) { m_format[i] = m_format[i-1]; // shoot } @@ -2831,7 +2812,7 @@ void CEdit::InsertOne(char character) m_text[m_cursor1] = character; - if ( m_format != 0 ) + if ( m_format.size() > 0 ) { m_format[m_cursor1] = 0; } @@ -2882,7 +2863,7 @@ void CEdit::DeleteOne(int dir) { m_text[i] = m_text[i+hole]; - if ( m_format != 0 ) + if ( m_format.size() > 0 ) { m_format[i] = m_format[i+hole]; } @@ -3074,7 +3055,7 @@ void CEdit::Justif() width -= indentLength*m_lineIndent[m_lineTotal-1]; } - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { // TODO check if good i += m_engine->GetText()->Justify(m_text+i, m_fontType, @@ -3097,8 +3078,10 @@ void CEdit::Justif() else { // TODO check if good - i += m_engine->GetText()->Justify(m_text+i, m_format+i, - size, width); + i += m_engine->GetText()->Justify(std::string(m_text+i), + std::vector(m_format.begin()+i, m_format.end()), + size, + width); } } @@ -3293,11 +3276,11 @@ bool CEdit::UndoRecall() bool CEdit::ClearFormat() { - if ( m_format == 0 ) + if ( m_format.size() == 0 ) { SetMultiFont(true); } - memset(m_format, m_fontType, m_len); + m_format.clear(); return true; } @@ -3308,7 +3291,7 @@ bool CEdit::SetFormat(int cursor1, int cursor2, int format) { int i; - if ( m_format == 0 ) return false; + if ( m_format.size() == 0 ) return false; for ( i=cursor1 ; i +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include + -namespace Gfx{ -class CEngine; -}; namespace Ui { -class CScroll; + //! maximum number of characters in CBOT edit @@ -128,13 +139,13 @@ public: bool EventProcess(const Event &event); void Draw(); - void SetText(char *text, bool bNew=true); + void SetText(const char *text, bool bNew=true); void GetText(char *buffer, int max); char* GetText(); int GetTextLength(); - bool ReadText(char *filename, int addSize=0); - bool WriteText(char *filename); + bool ReadText(const char *filename, int addSize=0); + bool WriteText(const char *filename); void SetMaxChar(int max); int GetMaxChar(); @@ -176,7 +187,7 @@ public: bool Undo(); void HyperFlush(); - void HyperHome(char *filename); + void HyperHome(const char *filename); bool HyperTest(EventType event); bool HyperGo(EventType event); @@ -195,15 +206,15 @@ protected: int MouseDetect(Math::Point mouse); void MoveAdjust(); - void HyperJump(char *name, char *marker); - bool HyperAdd(char *filename, int firstLine); + void HyperJump(const char *name, const char *marker); + bool HyperAdd(const char *filename, int firstLine); - void DrawImage(Math::Point pos, char *name, float width, float offset, float height, int nbLine); + void DrawImage(Math::Point pos, const char *name, float width, float offset, float height, int nbLine); void DrawBack(Math::Point pos, Math::Point dim); void DrawPart(Math::Point pos, Math::Point dim, int icon); void FreeImage(); - void LoadImage(char *name); + void LoadImage(const char *name); void Scroll(int pos, bool bAdjustCursor); void Scroll(); void MoveChar(int move, bool bWord, bool bSelect); @@ -232,10 +243,11 @@ protected: int m_maxChar; // max length of the buffer m_text char* m_text; // text (without zero terminator) - char* m_format; // format characters + std::vector m_format; // format characters int m_len; // length used in m_text int m_cursor1; // offset cursor int m_cursor2; // offset cursor + CApplication *m_app; bool m_bMulti; // true -> multi-line bool m_bEdit; // true -> editable diff --git a/src/ui/gauge.cpp b/src/ui/gauge.cpp index cc4eca0..20904f7 100644 --- a/src/ui/gauge.cpp +++ b/src/ui/gauge.cpp @@ -18,19 +18,7 @@ // gauge.cpp -//#include -//#include -//#include - -//#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -//#include "old/math3d.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "ui/gauge.h" - +#include namespace Ui { diff --git a/src/ui/gauge.h b/src/ui/gauge.h index b745834..8b7ef66 100644 --- a/src/ui/gauge.h +++ b/src/ui/gauge.h @@ -19,35 +19,36 @@ #pragma once +#include -#include "ui/control.h" +#include +#include + +#include -namespace Gfx{ -class CEngine; -}; namespace Ui { class CGauge : public CControl { -public: -// CGauge(CInstanceManager* iMan); - CGauge(); - virtual ~CGauge(); + public: + // CGauge(CInstanceManager* iMan); + CGauge(); + virtual ~CGauge(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); - bool EventProcess(const Event &event); + bool EventProcess(const Event &event); - void Draw(); + void Draw(); - void SetLevel(float level); - float GetLevel(); + void SetLevel(float level); + float GetLevel(); -protected: + protected: -protected: - float m_level; + protected: + float m_level; }; diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 6c96501..a042899 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -162,7 +162,7 @@ CImage* CInterface::CreateImage(Math::Point pos, Math::Point dim, int icon, Even // Creates a new label. -CLabel* CInterface::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, const char *name) +CLabel* CInterface::CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, std::string name) { CLabel* pc = CreateControl(pos, dim, icon, eventMsg); if (pc != nullptr) @@ -297,7 +297,7 @@ bool CInterface::EventProcess(const Event &event) // Gives the tooltip binding to the window. -bool CInterface::GetTooltip(Math::Point pos, const char* name) +bool CInterface::GetTooltip(Math::Point pos, std::string &name) { for (int i = MAXCONTROL-1; i >= 0; i--) { if (m_table[i] != nullptr) { diff --git a/src/ui/interface.h b/src/ui/interface.h index 43f2698..7123c05 100644 --- a/src/ui/interface.h +++ b/src/ui/interface.h @@ -19,6 +19,7 @@ #pragma once +#include #include #include @@ -61,7 +62,7 @@ class CInterface ~CInterface(); bool EventProcess(const Event &event); - bool GetTooltip(Math::Point pos, const char* name); + bool GetTooltip(Math::Point pos, std::string &name); void Flush(); CButton* CreateButton(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); @@ -81,7 +82,7 @@ class CInterface CWindow* CreateWindows(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); CList* CreateList(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand=1.2f); - CLabel* CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, const char *name); + CLabel* CreateLabel(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, std::string name); bool DeleteControl(EventType eventMsg); CControl* SearchControl(EventType eventMsg); diff --git a/src/ui/key.cpp b/src/ui/key.cpp index 0cf74bc..89473a8 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -64,7 +64,7 @@ bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg CControl::Create(pos, dim, icon, eventMsg); GetResource(RES_EVENT, eventMsg, name); - SetName(name); + SetName(std::string(name)); return true; } diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp index cba19d6..928e129 100644 --- a/src/ui/studio.cpp +++ b/src/ui/studio.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,58 +18,24 @@ // studio.cpp -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/d3dmath.h" -#include "common/language.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "common/restext.h" -#include "old/math3d.h" -#include "object/robotmain.h" -#include "object/object.h" -#include "old/camera.h" -#include "old/sound.h" -#include "script/script.h" -#include "ui/interface.h" -#include "ui/button.h" -#include "ui/check.h" -#include "ui/slider.h" -#include "ui/edit.h" -#include "ui/list.h" -#include "ui/label.h" -#include "ui/group.h" -#include "ui/window.h" -#include "old/text.h" -#include "script/cbottoken.h" -#include "ui/studio.h" - +#include +namespace Ui { // Object's constructor. -CStudio::CStudio(CInstanceManager* iMan) +CStudio::CStudio() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_iMan->AddInstance(CLASS_STUDIO, this); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); - m_event = (CEvent*)m_iMan->SearchInstance(CLASS_EVENT); - m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); - m_main = (CRobotMain*)m_iMan->SearchInstance(CLASS_MAIN); - m_camera = (CCamera*)m_iMan->SearchInstance(CLASS_CAMERA); - m_sound = (CSound*)m_iMan->SearchInstance(CLASS_SOUND); + m_engine = static_cast(m_iMan->SearchInstance(CLASS_ENGINE)); + m_event = static_cast(m_iMan->SearchInstance(CLASS_EVENT)); + m_interface = static_cast(m_iMan->SearchInstance(CLASS_INTERFACE)); + m_main = static_cast(m_iMan->SearchInstance(CLASS_MAIN)); + m_camera = static_cast(m_iMan->SearchInstance(CLASS_CAMERA)); + m_sound = static_cast(m_iMan->SearchInstance(CLASS_SOUND)); m_bEditMaximized = false; m_bEditMinimized = false; @@ -103,7 +70,7 @@ bool CStudio::EventProcess(const Event &event) return EventDialog(event); } - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { EventFrame(event); } @@ -114,74 +81,74 @@ bool CStudio::EventProcess(const Event &event) edit = (CEdit*)pw->SearchControl(EVENT_STUDIO_EDIT); if ( edit == 0 ) return false; - if ( event.event == pw->RetEventMsgClose() ) + if ( event.type == pw->GetEventTypeClose() ) { Event newEvent = event; newEvent.event = EVENT_STUDIO_OK; m_event->AddEvent(newEvent); } - if ( event.event == EVENT_STUDIO_EDIT ) // text modifief? + if ( event.type == EVENT_STUDIO_EDIT ) // text modifief? { ColorizeScript(edit); } - if ( event.event == EVENT_STUDIO_LIST ) // list clicked? + if ( event.type == EVENT_STUDIO_LIST ) // list clicked? { m_main->StartDisplayInfo(m_helpFilename, -1); } - if ( event.event == EVENT_STUDIO_NEW ) // new? + if ( event.type == EVENT_STUDIO_NEW ) // new? { m_script->New(edit, ""); } - if ( event.event == EVENT_STUDIO_OPEN ) // open? + if ( event.type == EVENT_STUDIO_OPEN ) // open? { StartDialog(SD_OPEN); } - if ( event.event == EVENT_STUDIO_SAVE ) // save? + if ( event.type == EVENT_STUDIO_SAVE ) // save? { StartDialog(SD_SAVE); } - if ( event.event == EVENT_STUDIO_UNDO ) // undo? + if ( event.type == EVENT_STUDIO_UNDO ) // undo? { edit->Undo(); } - if ( event.event == EVENT_STUDIO_CUT ) // cut? + if ( event.type == EVENT_STUDIO_CUT ) // cut? { edit->Cut(); } - if ( event.event == EVENT_STUDIO_COPY ) // copy? + if ( event.type == EVENT_STUDIO_COPY ) // copy? { edit->Copy(); } - if ( event.event == EVENT_STUDIO_PASTE ) // paste? + if ( event.type == EVENT_STUDIO_PASTE ) // paste? { edit->Paste(); } - if ( event.event == EVENT_STUDIO_SIZE ) // size? + if ( event.type == EVENT_STUDIO_SIZE ) // size? { slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); if ( slider == 0 ) return false; - m_main->SetFontSize(9.0f+slider->RetVisibleValue()*6.0f); + m_main->SetFontSize(9.0f+slider->GetVisibleValue()*6.0f); ViewEditScript(); } - if ( event.event == EVENT_STUDIO_TOOL && // instructions? + if ( event.type == EVENT_STUDIO_TOOL && // instructions? m_dialog == SD_NULL ) { m_main->StartDisplayInfo(SATCOM_HUSTON, false); } - if ( event.event == EVENT_STUDIO_HELP && // help? + if ( event.type == EVENT_STUDIO_HELP && // help? m_dialog == SD_NULL ) { m_main->StartDisplayInfo(SATCOM_PROG, false); } - if ( event.event == EVENT_STUDIO_COMPILE ) // compile? + if ( event.type == EVENT_STUDIO_COMPILE ) // compile? { char buffer[100]; @@ -197,7 +164,7 @@ bool CStudio::EventProcess(const Event &event) } } - if ( event.event == EVENT_STUDIO_RUN ) // run/stop? + if ( event.type == EVENT_STUDIO_RUN ) // run/stop? { if ( m_script->IsRunning() ) { @@ -224,7 +191,7 @@ bool CStudio::EventProcess(const Event &event) } } - if ( event.event == EVENT_STUDIO_REALTIME ) // real time? + if ( event.type == EVENT_STUDIO_REALTIME ) // real time? { m_bRealTime = !m_bRealTime; m_script->SetStepMode(!m_bRealTime); @@ -232,15 +199,15 @@ bool CStudio::EventProcess(const Event &event) UpdateButtons(); } - if ( event.event == EVENT_STUDIO_STEP ) // step? + if ( event.type == EVENT_STUDIO_STEP ) // step? { m_script->Step(event); } - if ( event.event == EVENT_KEYDOWN ) + if ( event.type == EVENT_KEYDOWN ) { - if ( event.param == m_engine->RetKey(KEYRANK_CBOT, 0) || - event.param == m_engine->RetKey(KEYRANK_CBOT, 1) ) + if ( event.param == m_engine->GetKey(KEYRANK_CBOT, 0) || + event.param == m_engine->GetKey(KEYRANK_CBOT, 1) ) { if ( m_helpFilename[0] != 0 ) { @@ -249,20 +216,20 @@ bool CStudio::EventProcess(const Event &event) } } - if ( event.event == EVENT_WINDOW3 ) // window is moved? + if ( event.type == EVENT_WINDOW3 ) // window is moved? { - m_editActualPos = m_editFinalPos = pw->RetPos(); - m_editActualDim = m_editFinalDim = pw->RetDim(); + m_editActualPos = m_editFinalPos = pw->GetPos(); + m_editActualDim = m_editFinalDim = pw->GetDim(); m_main->SetWindowPos(m_editActualPos); m_main->SetWindowDim(m_editActualDim); AdjustEditScript(); } - if ( event.event == pw->RetEventMsgReduce() ) + if ( event.type == pw->GetEventTypeReduce() ) { if ( m_bEditMinimized ) { - m_editFinalPos = m_main->RetWindowPos(); - m_editFinalDim = m_main->RetWindowDim(); + m_editFinalPos = m_main->GetWindowPos(); + m_editFinalDim = m_main->GetWindowDim(); m_bEditMinimized = false; m_bEditMaximized = false; } @@ -283,12 +250,12 @@ bool CStudio::EventProcess(const Event &event) pw->SetMinimized(m_bEditMinimized); } } - if ( event.event == pw->RetEventMsgFull() ) + if ( event.type == pw->GetEventTypeFull() ) { if ( m_bEditMaximized ) { - m_editFinalPos = m_main->RetWindowPos(); - m_editFinalDim = m_main->RetWindowDim(); + m_editFinalPos = m_main->GetWindowPos(); + m_editFinalDim = m_main->GetWindowDim(); m_bEditMinimized = false; m_bEditMaximized = false; } @@ -435,8 +402,8 @@ void CStudio::SearchToken(CEdit* edit) char* text; char token[100]; - text = edit->RetText(); - len = edit->RetTextLength(); + text = edit->GetText(); + len = edit->GetTextLength(); edit->GetCursor(cursor1, cursor2); i = cursor1; @@ -499,18 +466,18 @@ void CStudio::SearchToken(CEdit* edit) } token[i] = 0; - strcpy(m_helpFilename, RetHelpFilename(token)); + strcpy(m_helpFilename, GetHelpFilename(token)); if ( m_helpFilename[0] == 0 ) { for ( i=0 ; iSetEditLock(true, true); m_main->SetEditFull(false); - m_bInitPause = m_engine->RetPause(); + m_bInitPause = m_engine->GetPause(); m_main->SetSpeed(1.0f); - m_editCamera = m_camera->RetType(); + m_editCamera = m_camera->GetType(); m_camera->SetType(CAMERA_EDIT); m_bRunning = m_script->IsRunning(); @@ -579,8 +546,8 @@ void CStudio::StartEditScript(CScript *script, char* name, int rank) button->ClearState(STATE_VISIBLE); } - pos = m_editFinalPos = m_editActualPos = m_main->RetWindowPos(); - dim = m_editFinalDim = m_editActualDim = m_main->RetWindowDim(); + pos = m_editFinalPos = m_editActualPos = m_main->GetWindowPos(); + dim = m_editFinalDim = m_editActualDim = m_main->GetWindowDim(); pw = m_interface->CreateWindows(pos, dim, 8, EVENT_WINDOW3); if ( pw == 0 ) return; pw->SetState(STATE_SHADOW); @@ -603,7 +570,7 @@ void CStudio::StartEditScript(CScript *script, char* name, int rank) edit->SetFontType(FONT_COURIER); edit->SetFontStretch(0.7f); edit->SetDisplaySpec(true); - edit->SetAutoIndent(m_engine->RetEditIndentMode()); + edit->SetAutoIndent(m_engine->GetEditIndentMode()); m_script->PutScript(edit, name); ColorizeScript(edit); @@ -632,7 +599,7 @@ void CStudio::StartEditScript(CScript *script, char* name, int rank) button->SetState(STATE_SHADOW); slider = pw->CreateSlider(pos, dim, 0, EVENT_STUDIO_SIZE); slider->SetState(STATE_SHADOW); - slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); pw->CreateGroup(pos, dim, 19, EVENT_LABEL1); // SatCom logo button = pw->CreateButton(pos, dim, 128+57, EVENT_STUDIO_TOOL); button->SetState(STATE_SHADOW); @@ -678,7 +645,7 @@ void CStudio::AdjustEditScript() { pw->SetPos(wpos); pw->SetDim(wdim); - wdim = pw->RetDim(); + wdim = pw->GetDim(); } if ( m_bRunning ) hList = 80.0f/480.0f; @@ -938,8 +905,8 @@ void CStudio::ViewEditScript() edit = (CEdit*)pw->SearchControl(EVENT_STUDIO_EDIT); if ( edit == 0 ) return; - dim = m_engine->RetDim(); - edit->SetFontSize(m_main->RetFontSize()/(dim.x/640.0f)); + dim = m_engine->GetDim(); + edit->SetFontSize(m_main->GetFontSize()/(dim.x/640.0f)); } @@ -1063,8 +1030,8 @@ void CStudio::StartDialog(StudioDialog type) if ( m_dialog == SD_OPEN || m_dialog == SD_SAVE ) { - pos = m_main->RetIOPos(); - dim = m_main->RetIODim(); + pos = m_main->GetIOPos(); + dim = m_main->GetIODim(); } //? pw = m_interface->CreateWindows(pos, dim, 8, EVENT_WINDOW9); pw = m_interface->CreateWindows(pos, dim, m_dialog==SD_OPEN?14:13, EVENT_WINDOW9); @@ -1097,7 +1064,7 @@ void CStudio::StartDialog(StudioDialog type) pe->SetState(STATE_SHADOW); if ( m_dialog == SD_SAVE ) { - pe->SetText(m_script->RetFilename()); + pe->SetText(m_script->GetFilename()); } GetResource(RES_TEXT, RT_IO_DIR, name); @@ -1200,8 +1167,8 @@ void CStudio::AdjustDialog() pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW9); if ( pw == 0 ) return; - wpos = pw->RetPos(); - wdim = pw->RetDim(); + wpos = pw->GetPos(); + wdim = pw->GetDim(); pw->SetPos(wpos); // to move the buttons on the titlebar if ( m_dialog == SD_OPEN || @@ -1318,10 +1285,10 @@ bool CStudio::EventDialog(const Event &event) pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW9); if ( pw == 0 ) return false; - if ( event.event == EVENT_WINDOW9 ) // window is moved? + if ( event.type == EVENT_WINDOW9 ) // window is moved? { - wpos = pw->RetPos(); - wdim = pw->RetDim(); + wpos = pw->GetPos(); + wdim = pw->GetDim(); m_main->SetIOPos(wpos); m_main->SetIODim(wdim); AdjustDialog(); @@ -1330,22 +1297,22 @@ bool CStudio::EventDialog(const Event &event) if ( m_dialog == SD_OPEN || m_dialog == SD_SAVE ) { - if ( event.event == EVENT_DIALOG_LIST ) + if ( event.type == EVENT_DIALOG_LIST ) { UpdateChangeList(); } - if ( event.event == EVENT_DIALOG_EDIT ) + if ( event.type == EVENT_DIALOG_EDIT ) { UpdateChangeEdit(); } - if ( event.event == EVENT_DIALOG_CHECK1 ) // private? + if ( event.type == EVENT_DIALOG_CHECK1 ) // private? { m_main->SetIOPublic(false); UpdateDialogPublic(); UpdateDialogList(); } - if ( event.event == EVENT_DIALOG_CHECK2 ) // public? + if ( event.type == EVENT_DIALOG_CHECK2 ) // public? { m_main->SetIOPublic(true); UpdateDialogPublic(); @@ -1353,8 +1320,8 @@ bool CStudio::EventDialog(const Event &event) } } - if ( event.event == EVENT_DIALOG_OK || - (event.event == EVENT_KEYDOWN && event.param == VK_RETURN) ) + if ( event.type == EVENT_DIALOG_OK || + (event.type == EVENT_KEYDOWN && event.param == VK_RETURN) ) { if ( m_dialog == SD_OPEN ) { @@ -1369,9 +1336,9 @@ bool CStudio::EventDialog(const Event &event) return true; } - if ( event.event == EVENT_DIALOG_CANCEL || - (event.event == EVENT_KEYDOWN && event.param == VK_ESCAPE) || - event.event == pw->RetEventMsgClose() ) + if ( event.type == EVENT_DIALOG_CANCEL || + (event.type == EVENT_KEYDOWN && event.param == VK_ESCAPE) || + event.type == pw->GetEventTypeClose() ) { StopDialog(); return true; @@ -1397,8 +1364,8 @@ void CStudio::UpdateChangeList() pe = (CEdit*)pw->SearchControl(EVENT_DIALOG_EDIT); if ( pe == 0 ) return; - strcpy(name, pl->RetName(pl->RetSelect())); - name[pe->RetMaxChar()] = 0; // truncates according lg max editable + strcpy(name, pl->GetName(pl->GetSelect())); + name[pe->GetMaxChar()] = 0; // truncates according lg max editable p = strchr(name, '\t'); // seeks first tab if ( p != 0 ) *p = 0; pe->SetText(name); @@ -1486,13 +1453,13 @@ void CStudio::UpdateDialogPublic() pc = (CCheck*)pw->SearchControl(EVENT_DIALOG_CHECK1); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, !m_main->RetIOPublic()); + pc->SetState(STATE_CHECK, !m_main->GetIOPublic()); } pc = (CCheck*)pw->SearchControl(EVENT_DIALOG_CHECK2); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, m_main->RetIOPublic()); + pc->SetState(STATE_CHECK, m_main->GetIOPublic()); } pl = (CLabel*)pw->SearchControl(EVENT_DIALOG_LABEL1); @@ -1573,13 +1540,13 @@ void CStudio::UpdateDialogList() void CStudio::SearchDirectory(char *dir, bool bCreate) { - if ( m_main->RetIOPublic() ) + if ( m_main->GetIOPublic() ) { - sprintf(dir, "%s\\", m_main->RetPublicDir()); + sprintf(dir, "%s\\", m_main->GetPublicDir()); } else { - sprintf(dir, "%s\\%s\\Program\\", m_main->RetSavegameDir(), m_main->RetGamerName()); + sprintf(dir, "%s\\%s\\Program\\", m_main->GetSavegameDir(), m_main->GetGamerName()); } if ( bCreate ) @@ -1663,3 +1630,4 @@ bool CStudio::WriteProgram() return true; } +} diff --git a/src/ui/studio.h b/src/ui/studio.h index 687ab22..6af69ee 100644 --- a/src/ui/studio.h +++ b/src/ui/studio.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -19,22 +20,42 @@ #pragma once -#include "object/object.h" -#include "script/script.h" +#include +#include