summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/README.txt3
-rw-r--r--src/common/event.cpp91
-rw-r--r--src/common/event.h636
-rw-r--r--src/common/global.h64
-rw-r--r--src/common/iman.cpp165
-rw-r--r--src/common/iman.h58
-rw-r--r--src/common/language.h51
-rw-r--r--src/common/metafile.cpp418
-rw-r--r--src/common/metafile.h78
-rw-r--r--src/common/misc.cpp443
-rw-r--r--src/common/misc.h240
-rw-r--r--src/common/modfile.cpp697
-rw-r--r--src/common/modfile.h119
-rw-r--r--src/common/profile.cpp116
-rw-r--r--src/common/profile.h36
-rw-r--r--src/common/restext.cpp3663
-rw-r--r--src/common/restext.h159
-rw-r--r--src/common/struct.h73
18 files changed, 7110 insertions, 0 deletions
diff --git a/src/common/README.txt b/src/common/README.txt
new file mode 100644
index 0000000..36653cc
--- /dev/null
+++ b/src/common/README.txt
@@ -0,0 +1,3 @@
+src/common
+
+Contains headers and modules with common structs and enums.
diff --git a/src/common/event.cpp b/src/common/event.cpp
new file mode 100644
index 0000000..2eeddb4
--- /dev/null
+++ b/src/common/event.cpp
@@ -0,0 +1,91 @@
+// * 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/.
+
+// event.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <windows.h>
+#include <stdio.h>
+
+#include "struct.h"
+#include "iman.h"
+#include "event.h"
+
+
+
+
+// Object's constructor.
+
+CEvent::CEvent(CInstanceManager* iMan)
+{
+ m_iMan = iMan;
+ m_iMan->AddInstance(CLASS_EVENT, this);
+
+ Flush();
+}
+
+// Object's destructor.
+
+CEvent::~CEvent()
+{
+}
+
+
+// Empty the FIFO of events.
+
+void CEvent::Flush()
+{
+ m_head = 0;
+ m_tail = 0;
+ m_total = 0;
+}
+
+// Produces an event.
+
+void CEvent::MakeEvent(Event &event, EventMsg msg)
+{
+ ZeroMemory(&event, sizeof(Event));
+ event.event = msg;
+}
+
+// Adds an event in the FIFO.
+
+BOOL CEvent::AddEvent(const Event &event)
+{
+ if ( m_total >= MAXEVENT ) return FALSE;
+
+ m_fifo[m_head++] = event;
+ if ( m_head >= MAXEVENT ) m_head = 0;
+ m_total ++;
+
+ return TRUE;
+}
+
+// Removes an event from the FIFO.
+
+BOOL CEvent::GetEvent(Event &event)
+{
+ if ( m_head == m_tail ) return FALSE;
+
+ event = m_fifo[m_tail++];
+ if ( m_tail >= MAXEVENT ) m_tail = 0;
+ m_total --;
+
+ return TRUE;
+}
+
diff --git a/src/common/event.h b/src/common/event.h
new file mode 100644
index 0000000..8da2600
--- /dev/null
+++ b/src/common/event.h
@@ -0,0 +1,636 @@
+// * 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/.
+
+// event.h
+
+#ifndef _EVENT_H_
+#define _EVENT_H_
+
+
+#include "struct.h"
+
+
+#if !defined (WM_XBUTTONDOWN)
+#define WM_XBUTTONDOWN 0x020B
+#define WM_XBUTTONUP 0x020C
+#define XBUTTON1 0x0001
+#define XBUTTON2 0x0002
+#endif
+
+
+
+class CInstanceManager;
+
+
+#define MAXEVENT 100
+
+// Events.
+
+enum EventMsg
+{
+ EVENT_NULL = 0,
+
+ EVENT_QUIT = 1,
+ EVENT_FRAME = 2,
+ EVENT_LBUTTONDOWN = 3,
+ EVENT_RBUTTONDOWN = 4,
+ EVENT_LBUTTONUP = 5,
+ EVENT_RBUTTONUP = 6,
+ EVENT_MOUSEMOVE = 7,
+ EVENT_KEYDOWN = 8,
+ EVENT_KEYUP = 9,
+ EVENT_CHAR = 10,
+ EVENT_FOCUS = 11,
+
+ 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_DWORD = 0x7fffffff
+};
+
+typedef struct
+{
+ EventMsg event; // event (EVENT *)
+ long param; // parameter
+ FPOINT pos; // mouse position (0 .. 1)
+ float axeX; // control the X axis (-1 .. 1)
+ float axeY; // control of the Y axis (-1 .. 1)
+ float axeZ; // control the Z axis (-1 .. 1)
+ short keyState; // state of the keyboard (KS_ *)
+ float rTime; // relative time
+}
+Event;
+
+
+#define VK_BUTTON1 (0x100+1) // joystick button 1
+#define VK_BUTTON2 (0x100+2) // joystick button 2
+#define VK_BUTTON3 (0x100+3) // joystick button 3
+#define VK_BUTTON4 (0x100+4) // joystick button 4
+#define VK_BUTTON5 (0x100+5) // joystick button 5
+#define VK_BUTTON6 (0x100+6) // joystick button 6
+#define VK_BUTTON7 (0x100+7) // joystick button 7
+#define VK_BUTTON8 (0x100+8) // joystick button 8
+#define VK_BUTTON9 (0x100+9) // joystick button 9
+#define VK_BUTTON10 (0x100+10) // joystick button 10
+#define VK_BUTTON11 (0x100+11) // joystick button 11
+#define VK_BUTTON12 (0x100+12) // joystick button 12
+#define VK_BUTTON13 (0x100+13) // joystick button 13
+#define VK_BUTTON14 (0x100+14) // joystick button 14
+#define VK_BUTTON15 (0x100+15) // joystick button 15
+#define VK_BUTTON16 (0x100+16) // joystick button 16
+#define VK_BUTTON17 (0x100+17) // joystick button 17
+#define VK_BUTTON18 (0x100+18) // joystick button 18
+#define VK_BUTTON19 (0x100+19) // joystick button 19
+#define VK_BUTTON20 (0x100+20) // joystick button 20
+#define VK_BUTTON21 (0x100+21) // joystick button 21
+#define VK_BUTTON22 (0x100+22) // joystick button 22
+#define VK_BUTTON23 (0x100+23) // joystick button 23
+#define VK_BUTTON24 (0x100+24) // joystick button 24
+#define VK_BUTTON25 (0x100+25) // joystick button 25
+#define VK_BUTTON26 (0x100+26) // joystick button 26
+#define VK_BUTTON27 (0x100+27) // joystick button 27
+#define VK_BUTTON28 (0x100+28) // joystick button 28
+#define VK_BUTTON29 (0x100+29) // joystick button 29
+#define VK_BUTTON30 (0x100+30) // joystick button 30
+#define VK_BUTTON31 (0x100+31) // joystick button 31
+#define VK_BUTTON32 (0x100+32) // joystick button 32
+
+#define VK_WHEELUP (0x200+1) // Mousewheel up
+#define VK_WHEELDOWN (0x200+2) // Mousewheel down
+
+
+enum KeyRank
+{
+ KEYRANK_LEFT = 0,
+ KEYRANK_RIGHT = 1,
+ KEYRANK_UP = 2,
+ KEYRANK_DOWN = 3,
+ KEYRANK_GUP = 4,
+ KEYRANK_GDOWN = 5,
+ KEYRANK_CAMERA = 6,
+ KEYRANK_DESEL = 7,
+ KEYRANK_ACTION = 8,
+ KEYRANK_NEAR = 9,
+ KEYRANK_AWAY = 10,
+ KEYRANK_NEXT = 11,
+ KEYRANK_HUMAN = 12,
+ KEYRANK_QUIT = 13,
+ KEYRANK_HELP = 14,
+ KEYRANK_PROG = 15,
+ KEYRANK_VISIT = 16,
+ KEYRANK_SPEED10 = 17,
+ KEYRANK_SPEED15 = 18,
+ KEYRANK_SPEED20 = 19,
+ KEYRANK_SPEED30 = 20,
+ KEYRANK_AIMUP = 21,
+ KEYRANK_AIMDOWN = 22,
+ KEYRANK_CBOT = 23,
+};
+
+
+
+class CEvent
+{
+public:
+ CEvent(CInstanceManager* iMan);
+ ~CEvent();
+
+ void Flush();
+ void MakeEvent(Event &event, EventMsg msg);
+ BOOL AddEvent(const Event &event);
+ BOOL GetEvent(Event &event);
+
+protected:
+
+protected:
+ CInstanceManager* m_iMan;
+
+ Event m_fifo[MAXEVENT];
+ int m_head;
+ int m_tail;
+ int m_total;
+};
+
+
+#endif //_EVENT_H_
diff --git a/src/common/global.h b/src/common/global.h
new file mode 100644
index 0000000..32aefdc
--- /dev/null
+++ b/src/common/global.h
@@ -0,0 +1,64 @@
+// * 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/.
+
+// global.h
+
+#ifndef _GLOBAL_H_
+#define _GLOBAL_H_
+
+
+#define BUILD_FACTORY (1<<0) // factory
+#define BUILD_DERRICK (1<<1) // derrick
+#define BUILD_CONVERT (1<<2) // converter
+#define BUILD_RADAR (1<<3) // radar
+#define BUILD_ENERGY (1<<4) // factory of cells
+#define BUILD_NUCLEAR (1<<5) // nuclear power plant
+#define BUILD_STATION (1<<6) // base station
+#define BUILD_REPAIR (1<<7) // repair center
+#define BUILD_TOWER (1<<8) // defense tower
+#define BUILD_RESEARCH (1<<9) // research center
+#define BUILD_LABO (1<<10) // laboratory
+#define BUILD_PARA (1<<11) // lightning protection
+#define BUILD_INFO (1<<12) // information terminal
+#define BUILD_GFLAT (1<<16) // flat floor
+#define BUILD_FLAG (1<<17) // puts / removes colored flag
+
+
+// Do not change values ​​was because of backups (bits = ...).
+
+#define RESEARCH_TANK (1<<0) // caterpillars
+#define RESEARCH_FLY (1<<1) // wings
+#define RESEARCH_CANON (1<<2) // cannon
+#define RESEARCH_TOWER (1<<3) // defense tower
+#define RESEARCH_ATOMIC (1<<4) // nuclear
+#define RESEARCH_THUMP (1<<5) // thumper
+#define RESEARCH_SHIELD (1<<6) // shield
+#define RESEARCH_PHAZER (1<<7) // phazer gun
+#define RESEARCH_iPAW (1<<8) // legs of insects
+#define RESEARCH_iGUN (1<<9) // cannon of insects
+#define RESEARCH_RECYCLER (1<<10) // recycler
+#define RESEARCH_SUBM (1<<11) // submarine
+#define RESEARCH_SNIFFER (1<<12) // sniffer
+
+extern long g_id; // unique identifier
+extern long g_build; // constructible buildings
+extern long g_researchDone; // research done
+extern long g_researchEnable; // research available
+extern float g_unit; // conversion factor
+
+
+
+#endif //_GLOBAL_H_
diff --git a/src/common/iman.cpp b/src/common/iman.cpp
new file mode 100644
index 0000000..eacb3f4
--- /dev/null
+++ b/src/common/iman.cpp
@@ -0,0 +1,165 @@
+// * 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/.
+
+// iman.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <windows.h>
+#include <stdio.h>
+
+#include "struct.h"
+#include "iman.h"
+
+
+
+
+// Object's constructor.
+
+CInstanceManager::CInstanceManager()
+{
+ int i;
+
+ for ( i=0 ; i<CLASS_MAX ; i++ )
+ {
+ m_table[i].totalPossible = 0;
+ m_table[i].totalUsed = 0;
+ m_table[i].classPointer = 0;
+ }
+}
+
+// Object's destructor.
+
+CInstanceManager::~CInstanceManager()
+{
+ int i;
+
+ for ( i=0 ; i<CLASS_MAX ; i++ )
+ {
+ if ( m_table[i].classPointer != 0 )
+ {
+ free(m_table[i].classPointer);
+ }
+ }
+}
+
+
+// Empty the list of all classes.
+
+void CInstanceManager::Flush()
+{
+ int i;
+
+ for ( i=0 ; i<CLASS_MAX ; i++ )
+ {
+ if ( m_table[i].classPointer != 0 )
+ {
+ free(m_table[i].classPointer);
+ }
+ m_table[i].classPointer = 0;
+ }
+}
+
+// Empty all instances of a given class.
+
+void CInstanceManager::Flush(ClassType classType)
+{
+ if ( classType < 0 || classType >= CLASS_MAX ) return;
+ if ( m_table[classType].classPointer == 0 ) return;
+
+ free(m_table[classType].classPointer);
+ m_table[classType].classPointer = 0;
+}
+
+
+// Adds a new instance of a class.
+
+BOOL CInstanceManager::AddInstance(ClassType classType, void* pointer, int max)
+{
+ int i;
+
+ if ( classType < 0 || classType >= CLASS_MAX ) return FALSE;
+
+ if ( m_table[classType].classPointer == 0 )
+ {
+ m_table[classType].classPointer = (void**)malloc(max*sizeof(void*));
+ m_table[classType].totalPossible = max;
+ m_table[classType].totalUsed = 0;
+ }
+
+ if ( m_table[classType].totalUsed >= m_table[classType].totalPossible ) return FALSE;
+
+ i = m_table[classType].totalUsed++;
+ m_table[classType].classPointer[i] = pointer;
+ return TRUE;
+}
+
+// Deletes an instance of a class.
+
+BOOL CInstanceManager::DeleteInstance(ClassType classType, void* pointer)
+{
+ int i;
+
+ if ( classType < 0 || classType >= CLASS_MAX ) return FALSE;
+
+ for ( i=0 ; i<m_table[classType].totalUsed ; i++ )
+ {
+ if ( m_table[classType].classPointer[i] == pointer )
+ {
+ m_table[classType].classPointer[i] = 0;
+ }
+ }
+
+ Compress(classType);
+ return TRUE;
+}
+
+// Seeking an existing instance. Returns 0 if it does not exist.
+// Must be super fast!
+
+void* CInstanceManager::SearchInstance(ClassType classType, int rank)
+{
+#if _DEBUG
+ if ( classType < 0 || classType >= CLASS_MAX ) return 0;
+ if ( m_table[classType].classPointer == 0 ) return 0;
+#endif
+ if ( rank >= m_table[classType].totalUsed ) return 0;
+
+ return m_table[classType].classPointer[rank];
+}
+
+
+// Fills holes in a table.
+
+void CInstanceManager::Compress(ClassType classType)
+{
+ int i, j;
+
+ if ( classType < 0 || classType >= CLASS_MAX ) return;
+
+ j = 0;
+ for ( i=0 ; i<m_table[classType].totalUsed ; i++ )
+ {
+ if ( m_table[classType].classPointer[i] != 0 )
+ {
+ m_table[classType].classPointer[j++] = m_table[classType].classPointer[i];
+ }
+ }
+ m_table[classType].totalUsed = j;
+}
+
+
diff --git a/src/common/iman.h b/src/common/iman.h
new file mode 100644
index 0000000..65ec8dd
--- /dev/null
+++ b/src/common/iman.h
@@ -0,0 +1,58 @@
+// * 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/.
+
+// iman.h
+
+#ifndef _IMAN_H_
+#define _IMAN_H_
+
+
+#include "misc.h"
+
+
+
+typedef struct
+{
+ int totalPossible;
+ int totalUsed;
+ void** classPointer;
+}
+BaseClass;
+
+
+
+class CInstanceManager
+{
+public:
+ CInstanceManager();
+ ~CInstanceManager();
+
+ void Flush();
+ void Flush(ClassType classType);
+ BOOL AddInstance(ClassType classType, void* pointer, int max=1);
+ BOOL DeleteInstance(ClassType classType, void* pointer);
+ void* SearchInstance(ClassType classType, int rank=0);
+
+
+protected:
+ void Compress(ClassType classType);
+
+protected:
+ BaseClass m_table[CLASS_MAX];
+};
+
+
+#endif //_IMAN_H_
diff --git a/src/common/language.h b/src/common/language.h
new file mode 100644
index 0000000..4ae97f9
--- /dev/null
+++ b/src/common/language.h
@@ -0,0 +1,51 @@
+// * 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/.
+
+// language.h
+
+#define _FULL TRUE // CoLoBoT
+#define _SCHOOL FALSE // CeeBot-A or Teen
+ #define _TEEN FALSE // FALSE for CeeBot-A, TRUE for CeeBot-Teen
+ #define _EDU FALSE
+ #define _PERSO FALSE
+ #define _CEEBOTDEMO FALSE
+#define _NET FALSE
+#define _DEMO FALSE // DEMO only CoLoBoT (with _Full = FALSE)!
+
+#define _FRENCH TRUE
+#define _ENGLISH FALSE
+#define _GERMAN FALSE
+#define _WG FALSE
+#define _POLISH FALSE
+
+#define _NEWLOOK FALSE // FALSE for CoLoBoT, TRUE for all CeeBot
+#define _SOUNDTRACKS FALSE // always FALSE since InitAudioTrackVolume crop in Vista
+
+
+// Verifications
+
+#if !_FULL & !_SCHOOL & !_NET & !_DEMO
+-> no version chosen!
+#endif
+
+#if _SCHOOL
+#if !_EDU & !_PERSO & !_CEEBOTDEMO
+-> EDU or PERSO or CEEBOTDEMO?
+#endif
+#if _EDU & _PERSO & _CEEBOTDEMO
+-> EDU and PERSO and CEEBOTDEMO not at the same time!!!
+#endif
+#endif
diff --git a/src/common/metafile.cpp b/src/common/metafile.cpp
new file mode 100644
index 0000000..d7e260e
--- /dev/null
+++ b/src/common/metafile.cpp
@@ -0,0 +1,418 @@
+// * 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/.
+
+// metafile.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <windows.h>
+#include <stdio.h>
+
+#include "language.h"
+#include "metafile.h"
+
+
+
+
+#if _FULL | _NET
+static unsigned char table_codec[23] =
+{
+ 0x85, 0x91, 0x73, 0xcf, 0xa2, 0xbb, 0xf4, 0x77,
+ 0x58, 0x39, 0x37, 0xfd, 0x2a, 0xcc, 0x5f, 0x55,
+ 0x96, 0x90, 0x07, 0xcd, 0x11, 0x88, 0x21,
+};
+
+void Codec(void* buffer, int len, int start)
+{
+ unsigned char *b = (unsigned char*)buffer;
+ int i;
+
+ for ( i=0 ; i<len ; i++ )
+ {
+ b[i] ^= table_codec[(start++)%23];
+ }
+}
+#endif
+
+#if _SCHOOL
+#if _CEEBOTDEMO
+static unsigned char table_codec[136] =
+{
+ 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+};
+
+void Codec(void* buffer, int len, int start)
+{
+ unsigned char *b = (unsigned char*)buffer;
+ int i;
+
+ for ( i=0 ; i<len ; i++ )
+ {
+ b[i] ^= table_codec[(start++)%136];
+ }
+}
+#else
+static unsigned char table_codec[29] =
+{
+ 0x72, 0x91, 0x37, 0xdf, 0xa1, 0xcc, 0xf5, 0x67,
+ 0x53, 0x40, 0xd3, 0xed, 0x3a, 0xbb, 0x5e, 0x43,
+ 0x67, 0x9a, 0x0c, 0xed, 0x33, 0x77, 0x2f, 0xf2,
+ 0xe3, 0x42, 0x11, 0x5e, 0xc2,
+};
+
+void Codec(void* buffer, int len, int start)
+{
+ unsigned char *b = (unsigned char*)buffer;
+ int i;
+
+ for ( i=0 ; i<len ; i++ )
+ {
+ b[i] ^= table_codec[(start++)%29];
+ }
+}
+#endif
+#endif
+
+#if _DEMO
+static unsigned char table_codec[27] =
+{
+ 0x85, 0x91, 0x77, 0xcf, 0xa3, 0xbb, 0xf4, 0x77,
+ 0x58, 0x39, 0x37, 0xfd, 0x2a, 0xcc, 0x7f, 0x55,
+ 0x96, 0x80, 0x07, 0xcd, 0x11, 0x88, 0x21, 0x44,
+ 0x17, 0xee, 0xf0,
+};
+
+void Codec(void* buffer, int len, int start)
+{
+ unsigned char *b = (unsigned char*)buffer;
+ int i;
+
+ for ( i=0 ; i<len ; i++ )
+ {
+ b[i] ^= table_codec[(start++)%27];
+ }
+}
+#endif
+
+
+
+// Object's constructor.
+
+CMetaFile::CMetaFile()
+{
+ int i;
+
+ for ( i=0 ; i<METAMAX ; i++ )
+ {
+ m_list[i].stream = 0;
+ m_list[i].headers = 0;
+ }
+
+ m_bMeta = FALSE;
+ m_bOpen = FALSE;
+ m_start = 0;
+ m_pos = 0;
+ m_len = 0;
+ m_stream = 0;
+}
+
+// Object's destructor.
+
+CMetaFile::~CMetaFile()
+{
+ MetaClose();
+}
+
+
+// Test if a file exists.
+
+BOOL CMetaFile::IsExist(char *metaname, char *filename)
+{
+ FILE* file;
+ int index, i;
+
+ if ( metaname[0] == 0 )
+ {
+ file = fopen(filename, "rb");
+ if ( file == NULL ) return FALSE;
+ fclose(file);
+ return TRUE;
+ }
+ else
+ {
+ index = MetaOpen(metaname);
+ if ( index == -1 ) return 1;
+
+ for ( i=0 ; i<m_list[index].total ; i++ )
+ {
+ if ( strcmp(m_list[index].headers[i].name, filename) == 0 )
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+ }
+}
+
+// Opens a file. If metaname is empty, it normally opens a file.
+
+int CMetaFile::Open(char *metaname, char *filename)
+{
+ int index, i;
+
+ if ( m_bOpen ) // file already open?
+ {
+ Close();
+ }
+
+ if ( metaname[0] == 0 )
+ {
+ m_stream = fopen(filename, "rb");
+ if ( m_stream == 0 ) return 1;
+ m_bOpen = TRUE;
+ m_bMeta = FALSE;
+ return 0;
+ }
+ else
+ {
+ index = MetaOpen(metaname);
+ if ( index == -1 ) return 1;
+
+ for ( i=0 ; i<m_list[index].total ; i++ )
+ {
+ if ( strcmp(m_list[index].headers[i].name, filename) == 0 )
+ {
+ m_stream = m_list[index].stream;
+ m_start = m_list[index].headers[i].start;
+ m_len = m_list[index].headers[i].len;
+ m_bOpen = TRUE;
+ m_bMeta = TRUE;
+ Seek(0);
+ return 0;
+ }
+ }
+ return 1;
+ }
+}
+
+// Returns the length of a file.
+
+int CMetaFile::RetLength()
+{
+ int len;
+
+ if ( !m_bOpen ) return 0;
+
+ if ( m_bMeta )
+ {
+ len = m_len;
+ }
+ else
+ {
+ fseek(m_stream, 0, SEEK_END);
+ len = ftell(m_stream);
+ fseek(m_stream, 0, SEEK_SET);
+ }
+ return len;
+}
+
+// Positioning in the file, relative to the beginning.
+
+int CMetaFile::Seek(int offset)
+{
+ if ( !m_bOpen ) return 1;
+
+ if ( m_bMeta )
+ {
+ m_pos = m_start+offset;
+ return fseek(m_stream, m_start+offset, SEEK_SET);
+ }
+ else
+ {
+ return fseek(m_stream, offset, SEEK_SET);
+ }
+}
+
+// Reads bytes number.
+
+int CMetaFile::Read(void *buffer, int size)
+{
+ int err;
+
+ if ( !m_bOpen ) return 1;
+
+ if ( m_bMeta )
+ {
+ err = fread(buffer, size, 1, m_stream);
+ Codec(buffer, size, m_pos);
+ m_pos += size;
+ return err;
+ }
+ else
+ {
+ return fread(buffer, size, 1, m_stream);
+ }
+}
+
+// Reads a byte.
+
+int CMetaFile::GetByte()
+{
+ BYTE b;
+
+ if ( !m_bOpen ) return 1;
+
+ b = getc(m_stream);
+ if ( m_bMeta )
+ {
+ Codec(&b, 1, m_pos);
+ m_pos += 1;
+ }
+ return b;
+}
+
+// Reads 2 bytes.
+
+int CMetaFile::GetWord()
+{
+ WORD w;
+
+ if ( !m_bOpen ) return 1;
+
+ w = getc(m_stream);
+ if ( m_bMeta )
+ {
+ Codec(&w, 2, m_pos);
+ m_pos += 2;
+ }
+ return w;
+}
+
+// Closes the file.
+
+int CMetaFile::Close()
+{
+ if ( !m_bOpen ) return 1;
+
+ if ( !m_bMeta )
+ {
+ fclose(m_stream);
+ }
+ m_bOpen = FALSE;
+ m_stream = 0;
+
+ return 0;
+}
+
+
+// Opens a metafile. Returns the index or -1.
+
+int CMetaFile::MetaOpen(char *metaname)
+{
+ int i, j, offset;
+
+ i = MetaSearch(metaname);
+ if ( i != -1 ) return i;
+
+ for ( i=0 ; i<METAMAX ; i++ )
+ {
+ if ( m_list[i].stream == 0 )
+ {
+ m_list[i].stream = fopen(metaname, "rb");
+ if ( m_list[i].stream == 0 ) return -1;
+
+ strcpy(m_list[i].name, metaname); // memorized the name
+
+ fread(&m_list[i].total, sizeof(int), 1, m_list[i].stream);
+ m_list[i].headers = (MetaHeader*)malloc(sizeof(MetaHeader)*m_list[i].total);
+
+ offset = 4;
+ for ( j=0 ; j<m_list[i].total ; j++ )
+ {
+ fread(&m_list[i].headers[j], sizeof(MetaHeader), 1, m_list[i].stream);
+ Codec(&m_list[i].headers[j], sizeof(MetaHeader), offset);
+ offset += sizeof(MetaHeader);
+ }
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+// Seeks if the metafile is already open. Returns the index or -1.
+
+int CMetaFile::MetaSearch(char *metaname)
+{
+ int i;
+
+ for ( i=0 ; i<METAMAX ; i++ )
+ {
+ if ( m_list[i].stream != 0 )
+ {
+ if ( strcmp(m_list[i].name, metaname) == 0 ) return i;
+ }
+ }
+
+ return -1;
+}
+
+// Closes all metafiles.
+
+int CMetaFile::MetaClose()
+{
+ int i;
+
+ if ( m_stream != 0 )
+ {
+ fclose(m_stream);
+ m_stream = 0;
+ }
+
+ for ( i=0 ; i<METAMAX ; i++ )
+ {
+ if ( m_list[i].stream != 0 )
+ {
+ free(m_list[i].headers);
+ m_list[i].headers = 0;
+
+ fclose(m_list[i].stream);
+ m_list[i].stream = 0;
+ }
+ }
+
+ return 0;
+}
+
+
+
diff --git a/src/common/metafile.h b/src/common/metafile.h
new file mode 100644
index 0000000..b334b3e
--- /dev/null
+++ b/src/common/metafile.h
@@ -0,0 +1,78 @@
+// * 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/.
+
+// metafile.h
+
+#ifndef _METAFILE_H_
+#define _METAFILE_H_
+
+
+#include <stdio.h>
+
+
+#define METAMAX 5
+
+typedef struct
+{
+ char name[14]; // file name (8.3 max)
+ int start; // position from the beginning of the metafile
+ int len; // length of the file
+}
+MetaHeader;
+
+typedef struct
+{
+ char name[50]; // name of the metafile
+ FILE* stream; // channel
+ int total; // number of files
+ MetaHeader* headers; // headers of files
+}
+MetaFile;
+
+
+
+class CMetaFile
+{
+public:
+ CMetaFile();
+ ~CMetaFile();
+
+ BOOL IsExist(char *metaname, char *filename);
+ int Open(char *metaname, char *filename);
+ int RetLength();
+ int Seek(int offset);
+ int Read(void *buffer, int size);
+ int GetByte();
+ int GetWord();
+ int Close();
+ int MetaClose();
+
+protected:
+ int MetaOpen(char *metaname);
+ int MetaSearch(char *metaname);
+
+protected:
+ MetaFile m_list[METAMAX]; // metafile open
+ BOOL m_bOpen; // open file
+ BOOL m_bMeta; // metafile open
+ FILE* m_stream; // channel
+ int m_start; // position from the beginning
+ int m_pos; // current position
+ int m_len; // length of the file
+};
+
+
+#endif //_METAFILE_H_
diff --git a/src/common/misc.cpp b/src/common/misc.cpp
new file mode 100644
index 0000000..ce42de0
--- /dev/null
+++ b/src/common/misc.cpp
@@ -0,0 +1,443 @@
+// * 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/.
+
+// misc.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <direct.h>
+#include <time.h>
+#include <d3d.h>
+
+#include "struct.h"
+#include "d3dengine.h"
+#include "d3dmath.h"
+#include "d3dutil.h"
+#include "language.h"
+#include "event.h"
+#include "misc.h"
+
+
+
+CMetaFile g_metafile;
+
+static EventMsg g_uniqueEventMsg = EVENT_USER;
+static BOOL g_bUserDir = FALSE;
+static char g_userDir[100] = "";
+
+
+
+// Gives a single user event.
+
+EventMsg GetUniqueEventMsg()
+{
+ int i;
+
+ i = (int)g_uniqueEventMsg+1;
+ g_uniqueEventMsg = (EventMsg)i;
+ return g_uniqueEventMsg;
+}
+
+
+
+// Returns a non-accented letter.
+
+char RetNoAccent(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';
+ }
+
+ return letter;
+}
+
+// Returns an uppercase letter.
+
+char RetToUpper(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 'Ń';
+ }
+
+ return toupper(letter);
+}
+
+// Returns a lowercase letter.
+
+char RetToLower(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 'ń';
+ }
+
+ return tolower(letter);
+}
+
+
+// Converting time to string.
+
+void TimeToAscii(time_t time, char *buffer)
+{
+ struct tm when;
+ int year;
+
+ when = *localtime(&time);
+ year = when.tm_year+1900;
+ if ( year < 2000 ) year -= 1900;
+ else year -= 2000;
+#if _FRENCH
+ sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d",
+ when.tm_mday, when.tm_mon+1, year,
+ when.tm_hour, when.tm_min);
+#endif
+#if _GERMAN | _WG
+ sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d",
+ when.tm_mday, when.tm_mon+1, year,
+ when.tm_hour, when.tm_min);
+#endif
+#if _ENGLISH
+ char format[10];
+ int hour;
+
+ hour = when.tm_hour; // 0..23
+ if ( hour < 12 ) // morning?
+ {
+ strcpy(format, "am");
+ }
+ else // afternoon?
+ {
+ strcpy(format, "pm");
+ hour -= 12; // 0..11
+ }
+ if ( hour == 0 ) hour = 12;
+
+ sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d %s",
+ when.tm_mon+1, when.tm_mday, year,
+ hour, when.tm_min, format);
+#endif
+#if _POLISH
+ sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d",
+ when.tm_mday, when.tm_mon+1, year,
+ when.tm_hour, when.tm_min);
+#endif
+}
+
+
+// Makes a copy of a file.
+
+BOOL Xfer(char* src, char* dst)
+{
+ FILE *fs, *fd;
+ char *buffer;
+ int len;
+
+ fs = fopen(src, "rb");
+ if ( fs == 0 )
+ {
+ return FALSE;
+ }
+
+ fd = fopen(dst, "wb");
+ if ( fd == 0 )
+ {
+ fclose(fs);
+ return FALSE;
+ }
+
+ buffer = (char*)malloc(10000);
+
+ while ( TRUE )
+ {
+ len = fread(buffer, 1, 10000, fs);
+ if ( len == 0 ) break;
+ fwrite(buffer, 1, len, fd);
+ }
+
+ free(buffer);
+ fclose(fs);
+ fclose(fd);
+ return TRUE;
+}
+
+// Copy a file into the temporary folder.
+
+BOOL CopyFileToTemp(char* filename)
+{
+ char src[100];
+ char dst[100];
+ char save[100];
+
+ UserDir(src, filename, "textures");
+
+ strcpy(save, g_userDir);
+ strcpy(g_userDir, "temp");
+ UserDir(dst, filename, "textures");
+ strcpy(g_userDir, save);
+
+ _mkdir("temp");
+ if ( !Xfer(src, dst) ) return FALSE;
+
+ strcpy(filename, dst);
+ return TRUE;
+}
+
+// Copy a list of numbered files into the temporary folder.
+
+BOOL CopyFileListToTemp(char* filename, int* list, int total)
+{
+ char name[100];
+ char ext[10];
+ char file[100];
+ char save[100];
+ char* p;
+ int i;
+
+ strcpy(name, filename);
+ p = strchr(name, '.');
+ if ( p == 0 )
+ {
+ strcpy(ext, ".tga");
+ }
+ else
+ {
+ strcpy(ext, p);
+ *p = 0;
+ }
+
+ for ( i=0 ; i<total ; i++ )
+ {
+ sprintf(file, "%s%.3d%s", name, list[i], ext); // nameNNN.ext
+ CopyFileToTemp(file);
+ }
+
+ strcpy(save, g_userDir);
+ strcpy(g_userDir, "temp");
+ UserDir(file, filename, "textures");
+ strcpy(filename, file);
+ strcpy(g_userDir, save);
+
+ return TRUE;
+}
+
+
+// Adds an extension to file, if doesn't already one.
+
+void AddExt(char* filename, char* ext)
+{
+ if ( strchr(filename, '.') != 0 ) return; // already an extension?
+ strcat(filename, ext);
+}
+
+
+// Specifies the user folder.
+
+void UserDir(BOOL bUser, char* dir)
+{
+ g_bUserDir = bUser;
+ strcpy(g_userDir, dir);
+}
+
+// Replaces the string %user% by the user folder.
+// in: dir = "%user%toto.txt"
+// def = "abc\"
+// out: buffer = "abc\toto.txt"
+
+void UserDir(char* buffer, char* dir, char* def)
+{
+ char ddir[100];
+ char* add;
+
+ if ( strstr(dir, "\\") == 0 && def[0] != 0 )
+ {
+ sprintf(ddir, "%s\\%s", def, dir);
+ }
+ else
+ {
+ strcpy(ddir, dir);
+ }
+ dir = ddir;
+
+ while ( *dir != 0 )
+ {
+ if ( dir[0] == '%' &&
+ dir[1] == 'u' &&
+ dir[2] == 's' &&
+ dir[3] == 'e' &&
+ dir[4] == 'r' &&
+ dir[5] == '%' ) // %user% ?
+ {
+ if ( g_bUserDir ) add = g_userDir;
+ else add = def;
+
+ while ( *add != 0 )
+ {
+ *buffer++ = *add++;
+ }
+ dir += 6; // jumps to %user%
+ continue;
+ }
+
+ *buffer++ = *dir++;
+ }
+ *buffer = 0;
+}
+
+
+// Returns the letter corresponding to the language.
+
+char RetLanguageLetter()
+{
+#if _FRENCH
+ return 'F';
+#endif
+#if _ENGLISH
+ return 'E';
+#endif
+#if _GERMAN | _WG
+ return 'D';
+#endif
+#if _POLISH
+ return 'P';
+#endif
+ return 'X';
+}
+
diff --git a/src/common/misc.h b/src/common/misc.h
new file mode 100644
index 0000000..9eaba53
--- /dev/null
+++ b/src/common/misc.h
@@ -0,0 +1,240 @@
+// * 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/.
+
+// misc.h
+
+#ifndef _MISC_H_
+#define _MISC_H_
+
+#include <time.h>
+
+
+#include "metafile.h"
+#include "event.h"
+
+
+extern CMetaFile g_metafile;
+
+
+
+// Existing classes.
+
+enum ClassType
+{
+ CLASS_EVENT = 1,
+ CLASS_INTERFACE = 2,
+ CLASS_MAIN = 3,
+ CLASS_ENGINE = 4,
+ CLASS_TERRAIN = 5,
+ CLASS_OBJECT = 6,
+ CLASS_PHYSICS = 7,
+ CLASS_BRAIN = 8,
+ CLASS_CAMERA = 9,
+ CLASS_LIGHT = 10,
+ CLASS_PARTICULE = 11,
+ CLASS_AUTO = 12,
+ CLASS_DISPLAYTEXT = 13,
+ CLASS_PYRO = 14,
+ CLASS_SCRIPT = 15,
+ CLASS_TEXT = 16,
+ CLASS_STUDIO = 17,
+ CLASS_WATER = 18,
+ CLASS_CLOUD = 19,
+ CLASS_MOTION = 20,
+ CLASS_SOUND = 21,
+ CLASS_PLANET = 22,
+ CLASS_TASKMANAGER = 23,
+ CLASS_DIALOG = 24,
+ CLASS_MAP = 25,
+ CLASS_SHORT = 26,
+ CLASS_BLITZ = 27,
+};
+
+#define 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.
+
+#define KS_PAGEUP (1<<4)
+#define KS_PAGEDOWN (1<<5)
+#define KS_SHIFT (1<<6)
+#define KS_CONTROL (1<<7)
+#define KS_MLEFT (1<<8)
+#define KS_MRIGHT (1<<9)
+#define KS_NUMUP (1<<10)
+#define KS_NUMDOWN (1<<11)
+#define KS_NUMLEFT (1<<12)
+#define KS_NUMRIGHT (1<<13)
+#define KS_NUMPLUS (1<<14)
+#define KS_NUMMINUS (1<<15)
+
+
+// Procedures.
+
+extern EventMsg GetUniqueEventMsg();
+
+extern char RetNoAccent(char letter);
+extern char RetToUpper(char letter);
+extern char RetToLower(char letter);
+
+extern void TimeToAscii(time_t time, char *buffer);
+
+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 char RetLanguageLetter();
+
+
+
+#endif //_MISC_H_
diff --git a/src/common/modfile.cpp b/src/common/modfile.cpp
new file mode 100644
index 0000000..08fb89d
--- /dev/null
+++ b/src/common/modfile.cpp
@@ -0,0 +1,697 @@
+// * 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/.
+
+// modfile.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <windows.h>
+#include <stdio.h>
+#include <d3d.h>
+
+#include "struct.h"
+#include "d3dengine.h"
+#include "d3dmath.h"
+#include "language.h"
+#include "event.h"
+#include "misc.h"
+#include "iman.h"
+#include "math3d.h"
+#include "modfile.h"
+
+
+
+#define MAX_VERTICES 2000
+
+
+
+// Object's constructor.
+
+CModFile::CModFile(CInstanceManager* iMan)
+{
+ m_iMan = iMan;
+
+ m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE);
+
+ m_triangleUsed = 0;
+ m_triangleTable = (ModelTriangle*)malloc(sizeof(ModelTriangle)*MAX_VERTICES);
+ ZeroMemory(m_triangleTable, sizeof(ModelTriangle)*MAX_VERTICES);
+}
+
+// Object's destructor.
+
+CModFile::~CModFile()
+{
+ free(m_triangleTable);
+}
+
+
+
+
+// Creates a triangle in the internal structure.
+
+BOOL CModFile::CreateTriangle(D3DVECTOR p1, D3DVECTOR p2, D3DVECTOR p3,
+ float min, float max)
+{
+ D3DVECTOR n;
+ int i;
+
+ if ( m_triangleUsed >= MAX_VERTICES )
+ {
+ OutputDebugString("ERROR: CreateTriangle::Too many triangles\n");
+ return FALSE;
+ }
+
+ i = m_triangleUsed++;
+
+ ZeroMemory(&m_triangleTable[i], sizeof(ModelTriangle));
+
+ m_triangleTable[i].bUsed = TRUE;
+ m_triangleTable[i].bSelect = FALSE;
+
+ n = ComputeNormal(p3, p2, p1);
+ m_triangleTable[i].p1 = D3DVERTEX2( p1, n);
+ m_triangleTable[i].p2 = D3DVERTEX2( p2, n);
+ m_triangleTable[i].p3 = D3DVERTEX2( p3, n);
+
+ m_triangleTable[i].material.diffuse.r = 1.0f;
+ m_triangleTable[i].material.diffuse.g = 1.0f;
+ m_triangleTable[i].material.diffuse.b = 1.0f; // white
+ m_triangleTable[i].material.ambient.r = 0.5f;
+ m_triangleTable[i].material.ambient.g = 0.5f;
+ m_triangleTable[i].material.ambient.b = 0.5f;
+
+ m_triangleTable[i].min = min;
+ m_triangleTable[i].max = max;
+
+ return TRUE;
+}
+
+// Reads a DXF file.
+
+BOOL CModFile::ReadDXF(char *filename, float min, float max)
+{
+ FILE* file = NULL;
+ char line[100];
+ int command, rankSommet, nbSommet, nbFace;
+ D3DVECTOR table[MAX_VERTICES];
+ BOOL bWaitNbSommet;
+ BOOL bWaitNbFace;
+ BOOL bWaitSommetX;
+ BOOL bWaitSommetY;
+ BOOL bWaitSommetZ;
+ BOOL bWaitFaceX;
+ BOOL bWaitFaceY;
+ BOOL bWaitFaceZ;
+ float x,y,z;
+ int p1,p2,p3;
+
+ file = fopen(filename, "r");
+ if ( file == NULL ) return FALSE;
+
+ m_triangleUsed = 0;
+
+ rankSommet = 0;
+ bWaitNbSommet = FALSE;
+ bWaitNbFace = FALSE;
+ bWaitSommetX = FALSE;
+ bWaitSommetY = FALSE;
+ bWaitSommetZ = FALSE;
+ bWaitFaceX = FALSE;
+ bWaitFaceY = FALSE;
+ bWaitFaceZ = FALSE;
+
+ while ( fgets(line, 100, file) != NULL )
+ {
+ sscanf(line, "%d", &command);
+ if ( fgets(line, 100, file) == NULL ) break;
+
+ if ( command == 66 )
+ {
+ bWaitNbSommet = TRUE;
+ }
+
+ if ( command == 71 && bWaitNbSommet )
+ {
+ bWaitNbSommet = FALSE;
+ sscanf(line, "%d", &nbSommet);
+ if ( nbSommet > MAX_VERTICES ) nbSommet = MAX_VERTICES;
+ rankSommet = 0;
+ bWaitNbFace = TRUE;
+
+//? sprintf(s, "Waiting for %d sommets\n", nbSommet);
+//? OutputDebugString(s);
+ }
+
+ if ( command == 72 && bWaitNbFace )
+ {
+ bWaitNbFace = FALSE;
+ sscanf(line, "%d", &nbFace);
+ bWaitSommetX = TRUE;
+
+//? sprintf(s, "Waiting for %d faces\n", nbFace);
+//? OutputDebugString(s);
+ }
+
+ if ( command == 10 && bWaitSommetX )
+ {
+ bWaitSommetX = FALSE;
+ sscanf(line, "%f", &x);
+ bWaitSommetY = TRUE;
+ }
+
+ if ( command == 20 && bWaitSommetY )
+ {
+ bWaitSommetY = FALSE;
+ sscanf(line, "%f", &y);
+ bWaitSommetZ = TRUE;
+ }
+
+ if ( command == 30 && bWaitSommetZ )
+ {
+ bWaitSommetZ = FALSE;
+ sscanf(line, "%f", &z);
+
+ nbSommet --;
+ if ( nbSommet >= 0 )
+ {
+ D3DVECTOR p(x,z,y); // permutation of Y and Z!
+ table[rankSommet++] = p;
+ bWaitSommetX = TRUE;
+
+//? sprintf(s, "Sommet[%d]=%f;%f;%f\n", rankSommet, p.x,p.y,p.z);
+//? OutputDebugString(s);
+ }
+ else
+ {
+ bWaitFaceX = TRUE;
+ }
+ }
+
+ if ( command == 71 && bWaitFaceX )
+ {
+ bWaitFaceX = FALSE;
+ sscanf(line, "%d", &p1);
+ if ( p1 < 0 ) p1 = -p1;
+ bWaitFaceY = TRUE;
+ }
+
+ if ( command == 72 && bWaitFaceY )
+ {
+ bWaitFaceY = FALSE;
+ sscanf(line, "%d", &p2);
+ if ( p2 < 0 ) p2 = -p2;
+ bWaitFaceZ = TRUE;
+ }
+
+ if ( command == 73 && bWaitFaceZ )
+ {
+ bWaitFaceZ = FALSE;
+ sscanf(line, "%d", &p3);
+ if ( p3 < 0 ) p3 = -p3;
+
+ nbFace --;
+ if ( nbFace >= 0 )
+ {
+ CreateTriangle( table[p3-1], table[p2-1], table[p1-1], min,max );
+ bWaitFaceX = TRUE;
+
+//? sprintf(s, "Face=%d;%d;%d\n", p1,p2,p3);
+//? OutputDebugString(s);
+ }
+ }
+
+ }
+
+ fclose(file);
+ return TRUE;
+}
+
+
+
+typedef struct
+{
+ int rev;
+ int vers;
+ int total;
+ int reserve[10];
+}
+InfoMOD;
+
+
+// Change nom.bmp to nom.tga
+
+void ChangeBMPtoTGA(char *filename)
+{
+ char* p;
+
+ p = strstr(filename, ".bmp");
+ if ( p != 0 ) strcpy(p, ".tga");
+}
+
+
+// Reads a MOD file.
+
+BOOL CModFile::AddModel(char *filename, int first, BOOL bEdit, BOOL bMeta)
+{
+ FILE* file;
+ InfoMOD info;
+ float limit[2];
+ int i, nb, err;
+ char* p;
+
+ if ( m_engine->RetDebugMode() )
+ {
+ bMeta = FALSE;
+ }
+
+ if ( bMeta )
+ {
+ p = strchr(filename, '\\');
+ if ( p == 0 )
+ {
+#if _SCHOOL
+ err = g_metafile.Open("ceebot2.dat", filename);
+#else
+ err = g_metafile.Open("colobot2.dat", filename);
+#endif
+ }
+ else
+ {
+#if _SCHOOL
+ err = g_metafile.Open("ceebot2.dat", p+1);
+#else
+ err = g_metafile.Open("colobot2.dat", p+1);
+#endif
+ }
+ if ( err != 0 ) bMeta = FALSE;
+ }
+ if ( !bMeta )
+ {
+ file = fopen(filename, "rb");
+ if ( file == NULL ) return FALSE;
+ }
+
+ if ( bMeta )
+ {
+ g_metafile.Read(&info, sizeof(InfoMOD));
+ }
+ else
+ {
+ fread(&info, sizeof(InfoMOD), 1, file);
+ }
+ nb = info.total;
+ m_triangleUsed += nb;
+
+ if ( info.rev == 1 && info.vers == 0 )
+ {
+ OldModelTriangle1 old;
+
+ for ( i=first ; i<m_triangleUsed ; i++ )
+ {
+ if ( bMeta )
+ {
+ g_metafile.Read(&old, sizeof(OldModelTriangle1));
+ }
+ else
+ {
+ fread(&old, sizeof(OldModelTriangle1), 1, file);
+ }
+
+ ZeroMemory(&m_triangleTable[i], sizeof(ModelTriangle));
+ m_triangleTable[i].bUsed = old.bUsed;
+ m_triangleTable[i].bSelect = old.bSelect;
+
+ m_triangleTable[i].p1.x = old.p1.x;
+ m_triangleTable[i].p1.y = old.p1.y;
+ m_triangleTable[i].p1.z = old.p1.z;
+ m_triangleTable[i].p1.nx = old.p1.nx;
+ m_triangleTable[i].p1.ny = old.p1.ny;
+ m_triangleTable[i].p1.nz = old.p1.nz;
+ m_triangleTable[i].p1.tu = old.p1.tu;
+ m_triangleTable[i].p1.tv = old.p1.tv;
+
+ m_triangleTable[i].p2.x = old.p2.x;
+ m_triangleTable[i].p2.y = old.p2.y;
+ m_triangleTable[i].p2.z = old.p2.z;
+ m_triangleTable[i].p2.nx = old.p2.nx;
+ m_triangleTable[i].p2.ny = old.p2.ny;
+ m_triangleTable[i].p2.nz = old.p2.nz;
+ m_triangleTable[i].p2.tu = old.p2.tu;
+ m_triangleTable[i].p2.tv = old.p2.tv;
+
+ m_triangleTable[i].p3.x = old.p3.x;
+ m_triangleTable[i].p3.y = old.p3.y;
+ m_triangleTable[i].p3.z = old.p3.z;
+ m_triangleTable[i].p3.nx = old.p3.nx;
+ m_triangleTable[i].p3.ny = old.p3.ny;
+ m_triangleTable[i].p3.nz = old.p3.nz;
+ m_triangleTable[i].p3.tu = old.p3.tu;
+ m_triangleTable[i].p3.tv = old.p3.tv;
+
+ m_triangleTable[i].material = old.material;
+ strcpy(m_triangleTable[i].texName, old.texName);
+ m_triangleTable[i].min = old.min;
+ m_triangleTable[i].max = old.max;
+ }
+ }
+ else if ( info.rev == 1 && info.vers == 1 )
+ {
+ OldModelTriangle2 old;
+
+ for ( i=first ; i<m_triangleUsed ; i++ )
+ {
+ if ( bMeta )
+ {
+ g_metafile.Read(&old, sizeof(OldModelTriangle2));
+ }
+ else
+ {
+ fread(&old, sizeof(OldModelTriangle2), 1, file);
+ }
+
+ ZeroMemory(&m_triangleTable[i], sizeof(ModelTriangle));
+ m_triangleTable[i].bUsed = old.bUsed;
+ m_triangleTable[i].bSelect = old.bSelect;
+
+ m_triangleTable[i].p1.x = old.p1.x;
+ m_triangleTable[i].p1.y = old.p1.y;
+ m_triangleTable[i].p1.z = old.p1.z;
+ m_triangleTable[i].p1.nx = old.p1.nx;
+ m_triangleTable[i].p1.ny = old.p1.ny;
+ m_triangleTable[i].p1.nz = old.p1.nz;
+ m_triangleTable[i].p1.tu = old.p1.tu;
+ m_triangleTable[i].p1.tv = old.p1.tv;
+
+ m_triangleTable[i].p2.x = old.p2.x;
+ m_triangleTable[i].p2.y = old.p2.y;
+ m_triangleTable[i].p2.z = old.p2.z;
+ m_triangleTable[i].p2.nx = old.p2.nx;
+ m_triangleTable[i].p2.ny = old.p2.ny;
+ m_triangleTable[i].p2.nz = old.p2.nz;
+ m_triangleTable[i].p2.tu = old.p2.tu;
+ m_triangleTable[i].p2.tv = old.p2.tv;
+
+ m_triangleTable[i].p3.x = old.p3.x;
+ m_triangleTable[i].p3.y = old.p3.y;
+ m_triangleTable[i].p3.z = old.p3.z;
+ m_triangleTable[i].p3.nx = old.p3.nx;
+ m_triangleTable[i].p3.ny = old.p3.ny;
+ m_triangleTable[i].p3.nz = old.p3.nz;
+ m_triangleTable[i].p3.tu = old.p3.tu;
+ m_triangleTable[i].p3.tv = old.p3.tv;
+
+ m_triangleTable[i].material = old.material;
+ strcpy(m_triangleTable[i].texName, old.texName);
+ m_triangleTable[i].min = old.min;
+ m_triangleTable[i].max = old.max;
+ m_triangleTable[i].state = old.state;
+ m_triangleTable[i].reserve2 = old.reserve2;
+ m_triangleTable[i].reserve3 = old.reserve3;
+ m_triangleTable[i].reserve4 = old.reserve4;
+ }
+ }
+ else
+ {
+ if ( bMeta )
+ {
+ g_metafile.Read(m_triangleTable+first, sizeof(ModelTriangle)*nb);
+ }
+ else
+ {
+ fread(m_triangleTable+first, sizeof(ModelTriangle), nb, file);
+ }
+ }
+
+ for ( i=first ; i<m_triangleUsed ; i++ )
+ {
+ ChangeBMPtoTGA(m_triangleTable[i].texName);
+ }
+
+ if ( !bEdit )
+ {
+ limit[0] = m_engine->RetLimitLOD(0); // frontier AB as config
+ limit[1] = m_engine->RetLimitLOD(1); // frontier BC as config
+
+ // Standard frontiers -> config.
+ for ( i=first ; i<m_triangleUsed ; i++ )
+ {
+ if ( m_triangleTable[i].min == 0.0f &&
+ m_triangleTable[i].max == 100.0f ) // resolution A ?
+ {
+ m_triangleTable[i].max = limit[0];
+ }
+ else if ( m_triangleTable[i].min == 100.0f &&
+ m_triangleTable[i].max == 200.0f ) // resolution B ?
+ {
+ m_triangleTable[i].min = limit[0];
+ m_triangleTable[i].max = limit[1];
+ }
+ else if ( m_triangleTable[i].min == 200.0f &&
+ m_triangleTable[i].max == 1000000.0f ) // resolution C ?
+ {
+ m_triangleTable[i].min = limit[1];
+ }
+ }
+ }
+
+ if ( bMeta )
+ {
+ g_metafile.Close();
+ }
+ else
+ {
+ fclose(file);
+ }
+ return TRUE;
+}
+
+// Reads a MOD file.
+
+BOOL CModFile::ReadModel(char *filename, BOOL bEdit, BOOL bMeta)
+{
+ m_triangleUsed = 0;
+ return AddModel(filename, 0, bEdit, bMeta);
+}
+
+
+// Writes a MOD file.
+
+BOOL CModFile::WriteModel(char *filename)
+{
+ FILE* file;
+ InfoMOD info;
+
+ if ( m_triangleUsed == 0 ) return FALSE;
+
+ file = fopen(filename, "wb");
+ if ( file == NULL ) return FALSE;
+
+ ZeroMemory(&info, sizeof(InfoMOD));
+ info.rev = 1;
+ info.vers = 2;
+ info.total = m_triangleUsed;
+ fwrite(&info, sizeof(InfoMOD), 1, file);
+
+ fwrite(m_triangleTable, sizeof(ModelTriangle), m_triangleUsed, file);
+
+ fclose(file);
+ return TRUE;
+}
+
+
+// Creates the object in the 3D engine.
+
+BOOL CModFile::CreateEngineObject(int objRank, int addState)
+{
+#if 0
+ char texName2[20];
+ int texNum, i, state;
+
+ for ( i=0 ; i<m_triangleUsed ; i++ )
+ {
+ if ( !m_triangleTable[i].bUsed ) continue;
+
+ state = m_triangleTable[i].state;
+ texName2[0] = 0;
+
+ if ( m_triangleTable[i].texNum2 != 0 )
+ {
+ if ( m_triangleTable[i].texNum2 == 1 )
+ {
+ texNum = m_engine->RetSecondTexture();
+ }
+ else
+ {
+ texNum = m_triangleTable[i].texNum2;
+ }
+
+ if ( texNum >= 1 && texNum <= 10 )
+ {
+ state = m_triangleTable[i].state|D3DSTATEDUALb;
+ }
+ if ( texNum >= 11 && texNum <= 20 )
+ {
+ state = m_triangleTable[i].state|D3DSTATEDUALw;
+ }
+ sprintf(texName2, "dirty%.2d.bmp", texNum);
+ }
+
+ m_engine->AddTriangle(objRank, &m_triangleTable[i].p1, 3,
+ m_triangleTable[i].material,
+ state+addState,
+ m_triangleTable[i].texName, texName2,
+ m_triangleTable[i].min,
+ m_triangleTable[i].max, FALSE);
+ }
+ return TRUE;
+#else
+ char texName1[20];
+ char texName2[20];
+ int texNum, i, state;
+
+ for ( i=0 ; i<m_triangleUsed ; i++ )
+ {
+ if ( !m_triangleTable[i].bUsed ) continue;
+
+ state = m_triangleTable[i].state;
+ strcpy(texName1, m_triangleTable[i].texName);
+ texName2[0] = 0;
+
+ if ( strcmp(texName1, "plant.tga") == 0 )
+ {
+ state |= D3DSTATEALPHA;
+ }
+
+ if ( m_triangleTable[i].texNum2 != 0 )
+ {
+ if ( m_triangleTable[i].texNum2 == 1 )
+ {
+ texNum = m_engine->RetSecondTexture();
+ }
+ else
+ {
+ texNum = m_triangleTable[i].texNum2;
+ }
+
+ if ( texNum >= 1 && texNum <= 10 )
+ {
+ state |= D3DSTATEDUALb;
+ }
+ if ( texNum >= 11 && texNum <= 20 )
+ {
+ state |= D3DSTATEDUALw;
+ }
+ sprintf(texName2, "dirty%.2d.tga", texNum);
+ }
+
+ m_engine->AddTriangle(objRank, &m_triangleTable[i].p1, 3,
+ m_triangleTable[i].material,
+ state+addState,
+ texName1, texName2,
+ m_triangleTable[i].min,
+ m_triangleTable[i].max, FALSE);
+ }
+ return TRUE;
+#endif
+}
+
+
+// Performs a mirror according to Z.
+
+void CModFile::Mirror()
+{
+ D3DVERTEX2 t;
+ int i;
+
+ for ( i=0 ; i<m_triangleUsed ; i++ )
+ {
+ t = m_triangleTable[i].p1;
+ m_triangleTable[i].p1 = m_triangleTable[i].p2;
+ m_triangleTable[i].p2 = t;
+
+ m_triangleTable[i].p1.z = -m_triangleTable[i].p1.z;
+ m_triangleTable[i].p2.z = -m_triangleTable[i].p2.z;
+ m_triangleTable[i].p3.z = -m_triangleTable[i].p3.z;
+
+ m_triangleTable[i].p1.nz = -m_triangleTable[i].p1.nz;
+ m_triangleTable[i].p2.nz = -m_triangleTable[i].p2.nz;
+ m_triangleTable[i].p3.nz = -m_triangleTable[i].p3.nz;
+ }
+}
+
+
+// Returns the pointer to the list of triangles.
+
+void CModFile::SetTriangleUsed(int total)
+{
+ m_triangleUsed = total;
+}
+
+int CModFile::RetTriangleUsed()
+{
+ return m_triangleUsed;
+}
+
+int CModFile::RetTriangleMax()
+{
+ return MAX_VERTICES;
+}
+
+ModelTriangle* CModFile::RetTriangleList()
+{
+ return m_triangleTable;
+}
+
+
+// Returns the height according to a position (x - z);
+
+float CModFile::RetHeight(D3DVECTOR pos)
+{
+ D3DVECTOR p1, p2, p3;
+ float limit;
+ int i;
+
+ limit = 5.0f;
+
+ for ( i=0 ; i<m_triangleUsed ; i++ )
+ {
+ if ( !m_triangleTable[i].bUsed ) continue;
+
+ if ( Abs(pos.x-m_triangleTable[i].p1.x) < limit &&
+ Abs(pos.z-m_triangleTable[i].p1.z) < limit )
+ {
+ return m_triangleTable[i].p1.y;
+ }
+
+ if ( Abs(pos.x-m_triangleTable[i].p2.x) < limit &&
+ Abs(pos.z-m_triangleTable[i].p2.z) < limit )
+ {
+ return m_triangleTable[i].p2.y;
+ }
+
+ if ( Abs(pos.x-m_triangleTable[i].p3.x) < limit &&
+ Abs(pos.z-m_triangleTable[i].p3.z) < limit )
+ {
+ return m_triangleTable[i].p3.y;
+ }
+ }
+
+ return 0.0f;
+}
+
+
diff --git a/src/common/modfile.h b/src/common/modfile.h
new file mode 100644
index 0000000..f97ae91
--- /dev/null
+++ b/src/common/modfile.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/.
+
+// modfile.h
+
+#ifndef _MODFILE_H_
+#define _MODFILE_H_
+
+
+#include "d3dengine.h"
+
+
+class CInstanceManager;
+
+
+
+
+typedef struct
+{
+ char bUsed; // TRUE -> using
+ char bSelect; // TRUE -> selected
+ D3DVERTEX p1;
+ D3DVERTEX p2;
+ D3DVERTEX p3;
+ D3DMATERIAL7 material;
+ char texName[20];
+ float min;
+ float max;
+}
+OldModelTriangle1; // length = 196 bytes
+
+typedef struct
+{
+ char bUsed; // TRUE -> used
+ char bSelect; // TRUE -> selected
+ D3DVERTEX p1;
+ D3DVERTEX p2;
+ D3DVERTEX p3;
+ D3DMATERIAL7 material;
+ char texName[20];
+ float min;
+ float max;
+ long state;
+ short reserve1;
+ short reserve2;
+ short reserve3;
+ short reserve4;
+}
+OldModelTriangle2;
+
+typedef struct
+{
+ char bUsed; // TRUE -> used
+ char bSelect; // TRUE -> selected
+ D3DVERTEX2 p1;
+ D3DVERTEX2 p2;
+ D3DVERTEX2 p3;
+ D3DMATERIAL7 material;
+ char texName[20];
+ float min;
+ float max;
+ long state;
+ short texNum2;
+ short reserve2;
+ short reserve3;
+ short reserve4;
+}
+ModelTriangle; // length = 208 bytes
+
+
+
+
+class CModFile
+{
+public:
+ CModFile(CInstanceManager* iMan);
+ ~CModFile();
+
+ BOOL ReadDXF(char *filename, float min, float max);
+ BOOL AddModel(char *filename, int first, BOOL bEdit=FALSE, BOOL bMeta=TRUE);
+ BOOL ReadModel(char *filename, BOOL bEdit=FALSE, BOOL bMeta=TRUE);
+ BOOL WriteModel(char *filename);
+
+ BOOL CreateEngineObject(int objRank, int addState=0);
+ void Mirror();
+
+ void SetTriangleUsed(int total);
+ int RetTriangleUsed();
+ int RetTriangleMax();
+ ModelTriangle* RetTriangleList();
+
+ float RetHeight(D3DVECTOR pos);
+
+protected:
+ BOOL CreateTriangle(D3DVECTOR p1, D3DVECTOR p2, D3DVECTOR p3, float min, float max);
+
+protected:
+ CInstanceManager* m_iMan;
+ CD3DEngine* m_engine;
+
+ ModelTriangle* m_triangleTable;
+ int m_triangleUsed;
+};
+
+
+#endif //_MODFILE_H_
diff --git a/src/common/profile.cpp b/src/common/profile.cpp
new file mode 100644
index 0000000..2baffb0
--- /dev/null
+++ b/src/common/profile.cpp
@@ -0,0 +1,116 @@
+// * 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/.
+
+// profile.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <stdio.h>
+#include <d3d.h>
+#include <stdlib.h>
+
+#include "language.h"
+#include "struct.h"
+#include "profile.h"
+
+
+
+static char g_filename[100];
+
+
+
+BOOL InitCurrentDirectory()
+{
+#if _SCHOOL
+ _fullpath(g_filename, "ceebot.ini", 100);
+#else
+ _fullpath(g_filename, "colobot.ini", 100);
+#endif
+ return TRUE;
+}
+
+
+BOOL SetProfileString(char* section, char* key, char* string)
+{
+ WritePrivateProfileString(section, key, string, g_filename);
+ return TRUE;
+}
+
+BOOL GetProfileString(char* section, char* key, char* buffer, int max)
+{
+ int nb;
+
+ nb = GetPrivateProfileString(section, key, "", buffer, max, g_filename);
+ if ( nb == 0 )
+ {
+ buffer[0] = 0;
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+BOOL SetProfileInt(char* section, char* key, int value)
+{
+ char s[20];
+
+ sprintf(s, "%d", value);
+ WritePrivateProfileString(section, key, s, g_filename);
+ return TRUE;
+}
+
+BOOL GetProfileInt(char* section, char* key, int &value)
+{
+ char s[20];
+ int nb;
+
+ nb = GetPrivateProfileString(section, key, "", s, 20, g_filename);
+ if ( nb == 0 )
+ {
+ value = 0;
+ return FALSE;
+ }
+ sscanf(s, "%d", &value);
+ return TRUE;
+}
+
+
+BOOL SetProfileFloat(char* section, char* key, float value)
+{
+ char s[20];
+
+ sprintf(s, "%.2f", value);
+ WritePrivateProfileString(section, key, s, g_filename);
+ return TRUE;
+}
+
+BOOL GetProfileFloat(char* section, char* key, float &value)
+{
+ char s[20];
+ int nb;
+
+ nb = GetPrivateProfileString(section, key, "", s, 20, g_filename);
+ if ( nb == 0 )
+ {
+ value = 0.0f;
+ return FALSE;
+ }
+ sscanf(s, "%f", &value);
+ return TRUE;
+}
+
+
diff --git a/src/common/profile.h b/src/common/profile.h
new file mode 100644
index 0000000..969b764
--- /dev/null
+++ b/src/common/profile.h
@@ -0,0 +1,36 @@
+// * 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/.
+
+// profile.h
+
+#ifndef _PROFILE_H_
+#define _PROFILE_H_
+
+
+#define STRICT
+#define D3D_OVERLOADS
+
+
+extern BOOL InitCurrentDirectory();
+extern BOOL SetProfileString(char* section, char* key, char* string);
+extern BOOL GetProfileString(char* section, char* key, char* buffer, int max);
+extern BOOL SetProfileInt(char* section, char* key, int value);
+extern BOOL GetProfileInt(char* section, char* key, int &value);
+extern BOOL SetProfileFloat(char* section, char* key, float value);
+extern BOOL GetProfileFloat(char* section, char* key, float &value);
+
+
+#endif //_PROFILE_H_
diff --git a/src/common/restext.cpp b/src/common/restext.cpp
new file mode 100644
index 0000000..7422990
--- /dev/null
+++ b/src/common/restext.cpp
@@ -0,0 +1,3663 @@
+// * 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/.// restext.cpp
+
+#define STRICT
+#define D3D_OVERLOADS
+
+#include <stdio.h>
+#include "struct.h"
+#include "d3dengine.h"
+#include "language.h"
+#include "misc.h"
+#include "event.h"
+#include "object.h"
+#include "CBot/resource.h"
+#include "restext.h"
+
+
+
+//** -> text to translate!
+
+
+
+// Gives the pointer to the engine.
+
+void SetEngine(CD3DEngine *engine)
+{
+ g_engine = engine;
+}
+
+// Give the player's name.
+
+void SetGlobalGamerName(char *name)
+{
+ strcpy(g_gamerName, name);
+}
+
+
+
+typedef struct
+{
+ KeyRank key;
+ char name[20];
+}
+KeyDesc;
+
+static KeyDesc keyTable[22] =
+{
+ { KEYRANK_LEFT, "left;" },
+ { KEYRANK_RIGHT, "right;" },
+ { KEYRANK_UP, "up;" },
+ { KEYRANK_DOWN, "down;" },
+ { KEYRANK_GUP, "gup;" },
+ { KEYRANK_GDOWN, "gdown;" },
+ { KEYRANK_CAMERA, "camera;" },
+ { KEYRANK_DESEL, "desel;" },
+ { KEYRANK_ACTION, "action;" },
+ { KEYRANK_NEAR, "near;" },
+ { KEYRANK_AWAY, "away;" },
+ { KEYRANK_NEXT, "next;" },
+ { KEYRANK_HUMAN, "human;" },
+ { KEYRANK_QUIT, "quit;" },
+ { KEYRANK_HELP, "help;" },
+ { KEYRANK_PROG, "prog;" },
+ { KEYRANK_CBOT, "cbot;" },
+ { KEYRANK_VISIT, "visit;" },
+ { KEYRANK_SPEED10, "speed10;" },
+ { KEYRANK_SPEED15, "speed15;" },
+ { KEYRANK_SPEED20, "speed20;" },
+ { KEYRANK_SPEED30, "speed30;" },
+};
+
+// Seeks a key.
+
+BOOL SearchKey(char *cmd, KeyRank &key)
+{
+ int i;
+
+ for ( i=0 ; i<22 ; i++ )
+ {
+ if ( strstr(cmd, keyTable[i].name) == cmd )
+ {
+ key = keyTable[i].key;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+// Replaces the commands "\key name;" in a text.
+
+void PutKeyName(char* dst, char* src)
+{
+ KeyRank key;
+ char name[50];
+ int s, d, n, res;
+
+ s = d = 0;
+ while ( src[s] != 0 )
+ {
+ if ( src[s+0] == '\\' &&
+ src[s+1] == 'k' &&
+ src[s+2] == 'e' &&
+ src[s+3] == 'y' &&
+ src[s+4] == ' ' )
+ {
+ if ( SearchKey(src+s+5, key) )
+ {
+ res = g_engine->RetKey(key, 0);
+ if ( res != 0 )
+ {
+ if ( GetResource(RES_KEY, res, name) )
+ {
+ n = 0;
+ while ( name[n] != 0 )
+ {
+ dst[d++] = name[n++];
+ }
+ while ( src[s++] != ';' );
+ continue;
+ }
+ }
+ }
+ }
+
+ dst[d++] = src[s++];
+ }
+ dst[d++] = 0;
+}
+
+
+// Returns the text of a resource.
+
+BOOL GetResource(ResType type, int num, char* text)
+{
+ char buffer[100];
+
+ if ( !GetResourceBase(type, num, buffer) )
+ {
+ text[0] = 0;
+ return FALSE;
+ }
+
+ PutKeyName(text, buffer);
+ 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 ");//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 ");
+ 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 réduite");
+ 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, "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 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 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 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 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, " Résumé :");
+
+ if ( num == RT_SETUP_DEVICE ) strcpy(text, " Pilotes :");
+ 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 :");
+ 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 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_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 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");
+ 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, "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 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, " ");
+#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, "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, "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 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\\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 enregistrée");
+#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 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_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, "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 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, "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, "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, "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 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, "Accčs aux solutions\\Programme \"4: Solution\" dans les exercices");
+
+ 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 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, "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_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, "Accčs ŕ la solution\\Donne la solution");
+
+ 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 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 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, "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_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, "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 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, "..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, "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 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 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, "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 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_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 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 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 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, "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, "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, "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, "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 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, "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 <-> bâtiments");
+ if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Montre le rayon d'action");
+ 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");
+ 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, "\\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, "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 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");
+ 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-français");
+#else
+ if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Rapport du satellite");
+#endif
+ 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_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 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_COMPILE ) strcpy(text, "Compiler");
+ 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");
+ }
+
+ 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 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 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, "Désintégrateur");
+#else
+ if ( num == OBJECT_ENERGY ) strcpy(text, "Fabrique de piles");
+#endif
+ 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 contrôle");
+ if ( num == OBJECT_TARGET1 ) strcpy(text, "Cible");
+ if ( num == OBJECT_TARGET2 ) strcpy(text, "Cible");
+ 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, "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 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");
+ 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'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");
+ 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'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, "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");
+ 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, "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 ||
+ 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 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_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 ŕ 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_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 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_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, "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, "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 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_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 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 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_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 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, "Bâtiment terminé");
+ if ( num == INFO_CONVERT ) strcpy(text, "Titanium disponible");
+ 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 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 nucléaire possible");
+ if ( num == INFO_FACTORY ) strcpy(text, "Nouveau robot disponible");
+ if ( num == INFO_LABO ) strcpy(text, "Analyse terminée");
+ if ( num == INFO_ENERGY ) strcpy(text, "Pile disponible");
+ 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 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 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_OUTCASE ) strcpy(text, "Instruction ""case"" hors d'un bloc ""switch""");
+ 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, "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, "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_NOCASE ) strcpy(text, "Manque une instruction ""case""");
+ if ( num == TX_BADNUM ) strcpy(text, "Un nombre est 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 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 déjŕ");
+ if ( num == TX_CLBRK ) strcpy(text, """ ] "" attendu");
+ 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 chaîne de caractčre est attendue");
+ if ( num == TX_BADINDEX ) strcpy(text, "Mauvais type d'index");
+ 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 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, "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 ( type == RES_KEY )
+ {
+ if ( num == 0 ) strcpy(text, "< aucune >");
+ if ( num == VK_LEFT ) strcpy(text, "Flčche Gauche");
+ if ( num == VK_RIGHT ) strcpy(text, "Flčche Droite");
+ if ( num == VK_UP ) strcpy(text, "Flčche Haut");
+ if ( num == VK_DOWN ) strcpy(text, "Flčche 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, "Entrée");
+ 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, "Großes Fenster");
+ if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Reduzieren");
+ 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");
+ 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, " 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) Drücken 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 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 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 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_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 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 verfügbar !\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 für 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, "Nächster");
+ 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\\Programmierübungen");
+#else
+ 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");
+ 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, "\\Zurück zu CeeBot");
+ if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schließen\\CeeBot schließen");
+#else
+ 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, "<< 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 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, "Geräusche\\Lautstärke Geräusche und Musik");
+ if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Einheit");
+ 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 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");
+ 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, "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, "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 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 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, "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 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, "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 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 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 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 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_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, "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");
+ 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, "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, "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");
+ 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, "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;)");
+ 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 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");
+ 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, "\\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");
+ 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 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");
+ 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 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 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, "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, "Gebäude sprengen");
+ if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energievorrat");
+ 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");
+ 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 näher");
+ if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Kamera weiter weg");
+ 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");
+ 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, "\\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");
+ 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, "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, "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, "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_OBJECT ) strcpy(text, "Liste der Objekte");
+ 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 schließen");
+ 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, "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_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, "Träger");
+ 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, "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, "Auflöser");
+#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, "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");
+ 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, "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_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, "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 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");
+ 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, "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");
+ 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, "Insektenkönigin");
+ 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, "Gebäuderuine");
+ if ( num == OBJECT_RUINdoor ) strcpy(text, "Gebäuderuine");
+ if ( num == OBJECT_RUINsupport ) strcpy(text, "Abfall");
+ 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");
+ 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 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 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 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 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_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 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 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, "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");
+ 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 unmöglich");
+ if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden");
+ 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 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 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 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");
+ 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 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 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 (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 == 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 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 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 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, "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 )
+ {
+ 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 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 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"" 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""");
+ 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 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 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 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 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 außerhalb der Grenzen");
+ if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow");
+ 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");
+ }
+
+ 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 zurück");
+ }
+#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, "Powiększ");
+ 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 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 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, " 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 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_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, 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 włosów:");
+ if ( num == RT_PERSO_COMBI ) strcpy(text, "Kolor skafandra:");
+ 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 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 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, "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, "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 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;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, "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 ogólnodostępny");
+
+ 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");
+ 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, "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_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 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_SETUP ) strcpy(text, "Opcje\\Preferencje");
+ 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, "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, "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, "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, "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, "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\\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 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 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, "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 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 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 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_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 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_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 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");
+ 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, "Naprzód (\\key up;)");
+ if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Cofnij (\\key down;)");
+ 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 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_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ę 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_FCOLORv ) strcpy(text, "\\Fioletowe flagi");
+ 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 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 działo fazowe");
+ if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Zbuduj robota recyklera");
+ 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 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 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 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 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, "\\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 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 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, "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ż 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");
+ 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, "\\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");
+ if ( num == EVENT_DT_END ) strcpy(text, "Kontynuuj");
+ if ( num == EVENT_CMD ) strcpy(text, "Linia polecenia");
+ if ( num == EVENT_SPEED ) strcpy(text, "Prędkość gry");
+
+ if ( num == EVENT_HYPER_PREV ) strcpy(text, "Wstecz");
+ 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_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 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, "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_TOOL ) strcpy(text, "Rozkazy (\\key help;)");
+ 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");
+ 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 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, "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 przekaźnikowa 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, "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");
+ 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, "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_FLAGv ) strcpy(text, "Fioletowa flaga");
+ 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 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, "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, "Działo fazowe");
+ if ( num == OBJECT_MOBILErr ) strcpy(text, "Recykler");
+ 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, "Inżynier");
+ if ( num == OBJECT_TOTO ) strcpy(text, "Robbie");
+ 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");
+ 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, "Pozostałości z misji Apollo");
+ if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Księżycowy");
+ }
+
+ if ( type == RES_ERR )
+ {
+ 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.");
+#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, "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, "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 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, "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 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, "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, "Niemożliwe podczas ruchu");
+ if ( num == ERR_TERRA_VEH ) strcpy(text, "Nieodpowiedni robot");
+ 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 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 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 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 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_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 więcej energii");
+ if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Brak ogniwa elektrycznego");
+ 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_ENERGY_NULL ) strcpy(text, "Brak energii w ziemi");
+ 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_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 została już wykonana");
+ if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Brak energii w ziemi");
+ 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 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 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 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 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 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, "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, "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 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, "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 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 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_CLBRK ) strcpy(text, "Brak "" ] """);
+ 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 ł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 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, "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, "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, "Strzałka w lewo");
+ if ( num == VK_RIGHT ) strcpy(text, "Strzałka w prawo");
+ if ( num == VK_UP ) strcpy(text, "Strzałka w górę");
+ if ( num == VK_DOWN ) strcpy(text, "Strzałka 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, "Powiększenie");
+ 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, "Kółko w górę");
+ if ( num == VK_WHEELDOWN ) strcpy(text, "Kółko w dół");
+ }
+#endif
+
+ return ( text[0] != 0 );
+}
+
+
diff --git a/src/common/restext.h b/src/common/restext.h
new file mode 100644
index 0000000..2fe53fe
--- /dev/null
+++ b/src/common/restext.h
@@ -0,0 +1,159 @@
+// * 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/.
+
+// restext.h
+
+#ifndef _RESTEXT_H_
+#define _RESTEXT_H_
+
+
+#define STRICT
+#define D3D_OVERLOADS
+
+
+#include "d3dengine.h"
+#include "event.h"
+
+
+
+
+// Possible types of the text resources.
+
+enum ResType
+{
+ RES_TEXT = 0, // RT_*
+ RES_EVENT = 1, // EVENT_* (EventMsg)
+ RES_OBJECT = 2, // OBJECT_* (ObjectType)
+ RES_ERR = 3, // ERR_* (Error)
+ RES_KEY = 4, // VK_* (keys)
+ RES_CBOT = 5, // TX_* (cbot.dll)
+};
+
+
+// Resources of type RES_TEXT.
+
+#define RT_VERSION_ID 1
+#define RT_DISINFO_TITLE 2
+#define RT_WINDOW_MAXIMIZED 3
+#define RT_WINDOW_MINIMIZED 4
+#define RT_WINDOW_STANDARD 5
+#define RT_WINDOW_CLOSE 6
+
+#define RT_STUDIO_TITLE 10
+#define RT_SCRIPT_NEW 20
+#define RT_NAME_DEFAULT 21
+#define RT_IO_NEW 22
+#define RT_KEY_OR 23
+
+#define RT_TITLE_BASE 40
+#define RT_TITLE_INIT 41
+#define RT_TITLE_TRAINER 42
+#define RT_TITLE_DEFI 43
+#define RT_TITLE_MISSION 44
+#define RT_TITLE_FREE 45
+#define RT_TITLE_PROTO 46
+#define RT_TITLE_SETUP 47
+#define RT_TITLE_NAME 48
+#define RT_TITLE_PERSO 49
+#define RT_TITLE_WRITE 50
+#define RT_TITLE_READ 51
+#define RT_TITLE_USER 52
+#define RT_TITLE_TEEN 53
+
+#define RT_PLAY_CHAPt 60
+#define RT_PLAY_CHAPd 61
+#define RT_PLAY_CHAPm 62
+#define RT_PLAY_CHAPf 63
+#define RT_PLAY_CHAPp 64
+#define RT_PLAY_LISTt 65
+#define RT_PLAY_LISTd 66
+#define RT_PLAY_LISTm 67
+#define RT_PLAY_LISTf 68
+#define RT_PLAY_LISTp 69
+#define RT_PLAY_RESUME 70
+#define RT_PLAY_CHAPu 71
+#define RT_PLAY_LISTu 72
+#define RT_PLAY_CHAPte 73
+#define RT_PLAY_LISTk 74
+
+#define RT_SETUP_DEVICE 80
+#define RT_SETUP_MODE 81
+#define RT_SETUP_KEY1 82
+#define RT_SETUP_KEY2 83
+
+#define RT_PERSO_FACE 90
+#define RT_PERSO_GLASSES 91
+#define RT_PERSO_HAIR 92
+#define RT_PERSO_COMBI 93
+#define RT_PERSO_BAND 94
+
+#define RT_DIALOG_TITLE 100
+#define RT_DIALOG_ABORT 101
+#define RT_DIALOG_QUIT 102
+#define RT_DIALOG_YES 103
+#define RT_DIALOG_NO 104
+#define RT_DIALOG_DELOBJ 105
+#define RT_DIALOG_DELGAME 106
+#define RT_DIALOG_YESDEL 107
+#define RT_DIALOG_NODEL 108
+#define RT_DIALOG_LOADING 109
+#define RT_DIALOG_YESQUIT 110
+#define RT_DIALOG_NOQUIT 111
+
+#define RT_STUDIO_LISTTT 120
+#define RT_STUDIO_COMPOK 121
+#define RT_STUDIO_PROGSTOP 122
+
+#define RT_SATCOM_LIST 140
+#define RT_SATCOM_BOT 141
+#define RT_SATCOM_BUILDING 142
+#define RT_SATCOM_FRET 143
+#define RT_SATCOM_ALIEN 144
+#define RT_SATCOM_NULL 145
+#define RT_SATCOM_ERROR1 146
+#define RT_SATCOM_ERROR2 147
+
+#define RT_IO_OPEN 150
+#define RT_IO_SAVE 151
+#define RT_IO_LIST 152
+#define RT_IO_NAME 153
+#define RT_IO_DIR 154
+#define RT_IO_PRIVATE 155
+#define RT_IO_PUBLIC 156
+
+#define RT_GENERIC_DEV1 170
+#define RT_GENERIC_DEV2 171
+#define RT_GENERIC_EDIT1 172
+#define RT_GENERIC_EDIT2 173
+
+#define RT_INTERFACE_REC 180
+
+#define RT_MESSAGE_WIN 200
+#define RT_MESSAGE_LOST 201
+
+
+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);
+
+
+#endif //_RESTEXT_H_
diff --git a/src/common/struct.h b/src/common/struct.h
new file mode 100644
index 0000000..8b90288
--- /dev/null
+++ b/src/common/struct.h
@@ -0,0 +1,73 @@
+// * 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/.
+
+// struct.h
+
+#ifndef _STRUCT_H_
+#define _STRUCT_H_
+
+#include <d3d.h>
+
+
+#define NAN 999999
+
+#define D3DFVF_VERTEX2 (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX2)
+
+struct D3DVERTEX2
+{
+ float x,y,z;
+ float nx,ny,nz;
+ float tu, tv;
+ float tu2, tv2;
+
+ D3DVERTEX2() { }
+ D3DVERTEX2(const D3DVECTOR& _v, const D3DVECTOR& _n, float _tu=0.0f, float _tv=0.0f, float _tu2=0.0f, float _tv2=0.0f)
+ {
+ x = _v.x;
+ y = _v.y;
+ z = _v.z;
+ nx = _n.x;
+ ny = _n.y;
+ nz = _n.z;
+ tu = _tu;
+ tv = _tv;
+ tu2 = _tu2;
+ tv2 = _tv2;
+ }
+};
+
+
+struct FPOINT
+{
+ float x;
+ float y;
+
+ FPOINT() { }
+ FPOINT(float _x, float _y)
+ {
+ x = _x;
+ y = _y;
+ }
+};
+
+
+struct ColorHSV
+{
+ float h,s,v;
+};
+
+
+#endif //_STRUCT_H_