diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/error_ids.h | 151 | ||||
-rw-r--r-- | src/common/event.cpp | 1 | ||||
-rw-r--r-- | src/common/event.h | 526 | ||||
-rw-r--r-- | src/common/event_ids.h | 541 | ||||
-rw-r--r-- | src/common/global.h | 139 | ||||
-rw-r--r-- | src/common/image.cpp | 3 | ||||
-rw-r--r-- | src/common/image.h | 2 | ||||
-rw-r--r-- | src/common/iman.cpp | 1 | ||||
-rw-r--r-- | src/common/iman.h | 6 | ||||
-rw-r--r-- | src/common/ioutils.h | 2 | ||||
-rw-r--r-- | src/common/key.h | 5 | ||||
-rw-r--r-- | src/common/logger.cpp | 3 | ||||
-rw-r--r-- | src/common/logger.h | 30 | ||||
-rw-r--r-- | src/common/misc.cpp | 2 | ||||
-rw-r--r-- | src/common/misc.h | 15 | ||||
-rw-r--r-- | src/common/profile.cpp | 3 | ||||
-rw-r--r-- | src/common/profile.h | 63 | ||||
-rw-r--r-- | src/common/restext.cpp | 729 | ||||
-rw-r--r-- | src/common/restext.h | 131 | ||||
-rw-r--r-- | src/common/restext_ids.h | 122 | ||||
-rw-r--r-- | src/common/restext_strings.c | 717 | ||||
-rw-r--r-- | src/common/singleton.h | 1 | ||||
-rw-r--r-- | src/common/stringutils.cpp | 3 |
23 files changed, 1552 insertions, 1644 deletions
diff --git a/src/common/error_ids.h b/src/common/error_ids.h deleted file mode 100644 index fc1f7d6..0000000 --- a/src/common/error_ids.h +++ /dev/null @@ -1,151 +0,0 @@ -// * 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/. - - -// TODO: move to global.h after restext rewrite - -#pragma once - -enum Error -{ - ERR_OK = 0, // ok - ERR_GENERIC = 1, // any error - ERR_CONTINUE = 2, // continues - ERR_STOP = 3, // stops - ERR_CMD = 4, // unknown command - ERR_MANIP_VEH = 100, // inappropriate vehicle - ERR_MANIP_FLY = 101, // impossible in flight - ERR_MANIP_BUSY = 102, // taking: hands already occupied - ERR_MANIP_NIL = 103, // taking: nothing has to take - ERR_MANIP_MOTOR = 105, // busy: impossible to move - ERR_MANIP_OCC = 106, // busy: location already occupied - ERR_MANIP_FRIEND = 107, // no other vehicle - ERR_MANIP_RADIO = 108, // impossible because radioactive - ERR_MANIP_WATER = 109, // not possible under water - ERR_MANIP_EMPTY = 110, // nothing to deposit - ERR_BUILD_FLY = 120, // not possible in flight - ERR_BUILD_WATER = 121, // not possible under water - ERR_BUILD_ENERGY = 122, // not enough energy - ERR_BUILD_METALAWAY = 123, // lack of metal (too far) - ERR_BUILD_METALNEAR = 124, // lack of metal (too close) - ERR_BUILD_METALINEX = 125, // lack of metal - ERR_BUILD_FLAT = 126, // not enough flat ground - ERR_BUILD_FLATLIT = 127, // not enough flat ground space - ERR_BUILD_BUSY = 128, // location occupied - ERR_BUILD_BASE = 129, // too close to the rocket - ERR_BUILD_NARROW = 130, // buildings too close - ERR_BUILD_MOTOR = 131, // built: not possible in movement - ERR_SEARCH_FLY = 140, // not possible in flight - ERR_SEARCH_VEH = 141, // inappropriate vehicle - ERR_SEARCH_MOTOR = 142, // impossible in movement - ERR_TERRA_VEH = 150, // inappropriate vehicle - ERR_TERRA_ENERGY = 151, // not enough energy - ERR_TERRA_FLOOR = 152, // inappropriate ground - ERR_TERRA_BUILDING = 153, // building too close - ERR_TERRA_OBJECT = 154, // object too close - ERR_FIRE_VEH = 160, // inappropriate vehicle - ERR_FIRE_ENERGY = 161, // not enough energy - ERR_FIRE_FLY = 162, // not possible in flight - ERR_RECOVER_VEH = 170, // inappropriate vehicle - ERR_RECOVER_ENERGY = 171, // not enough energy - ERR_RECOVER_NULL = 172, // lack of ruin - ERR_CONVERT_EMPTY = 180, // no stone was transformed - ERR_SHIELD_VEH = 190, // inappropriate vehicle - ERR_SHIELD_ENERGY = 191, // not enough energy - ERR_MOVE_IMPOSSIBLE = 200, // move impossible - ERR_FIND_IMPOSSIBLE = 201, // find impossible - ERR_GOTO_IMPOSSIBLE = 210, // goto impossible - ERR_GOTO_ITER = 211, // goto too complicated - ERR_GOTO_BUSY = 212, // goto destination occupied - ERR_DERRICK_NULL = 300, // no ore underground - ERR_STATION_NULL = 301, // no energy underground - ERR_TOWER_POWER = 310, // no battery - ERR_TOWER_ENERGY = 311, // more energy - ERR_RESEARCH_POWER = 320, // no battery - ERR_RESEARCH_ENERGY = 321, // more energy - ERR_RESEARCH_TYPE = 322, // the wrong type of battery - ERR_RESEARCH_ALREADY = 323, // research already done - ERR_ENERGY_NULL = 330, // no energy underground - ERR_ENERGY_LOW = 331, // not enough energy - ERR_ENERGY_EMPTY = 332, // lack of metal - ERR_ENERGY_BAD = 333, // transforms only the metal - ERR_BASE_DLOCK = 340, // doors locked - ERR_BASE_DHUMAN = 341, // you must be on spaceship - ERR_LABO_NULL = 350, // nothing to analyze - ERR_LABO_BAD = 351, // analyzes only organic ball - ERR_LABO_ALREADY = 352, // analysis already made - ERR_NUCLEAR_NULL = 360, // no energy underground - ERR_NUCLEAR_LOW = 361, // not enough energy - ERR_NUCLEAR_EMPTY = 362, // lack of uranium - ERR_NUCLEAR_BAD = 363, // transforms only uranium - ERR_FACTORY_NULL = 370, // no metal - ERR_FACTORY_NEAR = 371, // vehicle too close - ERR_RESET_NEAR = 380, // vehicle too close - ERR_INFO_NULL = 390, // no information terminal - ERR_VEH_VIRUS = 400, // vehicle infected by a virus - ERR_BAT_VIRUS = 401, // building infected by a virus - ERR_VEH_POWER = 500, // no battery - ERR_VEH_ENERGY = 501, // more energy - ERR_FLAG_FLY = 510, // impossible in flight - ERR_FLAG_WATER = 511, // impossible during swimming - ERR_FLAG_MOTOR = 512, // impossible in movement - ERR_FLAG_BUSY = 513, // taking: already creating flag - ERR_FLAG_CREATE = 514, // too many flags - ERR_FLAG_PROXY = 515, // too close - ERR_FLAG_DELETE = 516, // nothing to remove - ERR_MISSION_NOTERM = 600, // Mission not completed - ERR_DELETEMOBILE = 700, // vehicle destroyed - ERR_DELETEBUILDING = 701, // building destroyed - ERR_TOOMANY = 702, // too many objects - ERR_OBLIGATORYTOKEN = 800, // compulsory instruction missing - ERR_PROHIBITEDTOKEN = 801, // instruction prohibited - - INFO_FIRST = 10000, // first information - INFO_BUILD = 10001, // construction builded - INFO_CONVERT = 10002, // metal available - INFO_RESEARCH = 10003, // search ended - INFO_FACTORY = 10004, // vehicle manufactured - INFO_LABO = 10005, // analysis ended - INFO_ENERGY = 10006, // battery available - INFO_NUCLEAR = 10007, // nuclear battery available - INFO_FINDING = 10008, // nuclear battery available - INFO_MARKPOWER = 10020, // location for station found - INFO_MARKURANIUM = 10021, // location for derrick found - INFO_MARKSTONE = 10022, // location for derrick found - INFO_MARKKEYa = 10023, // location for derrick found - INFO_MARKKEYb = 10024, // location for derrick found - INFO_MARKKEYc = 10025, // location for derrick found - INFO_MARKKEYd = 10026, // location for derrick found - INFO_RESEARCHTANK = 10030, // research ended - INFO_RESEARCHFLY = 10031, // research ended - INFO_RESEARCHTHUMP = 10032, // research ended - INFO_RESEARCHCANON = 10033, // research ended - INFO_RESEARCHTOWER = 10034, // research ended - INFO_RESEARCHPHAZER = 10035, // research ended - INFO_RESEARCHSHIELD = 10036, // research ended - INFO_RESEARCHATOMIC = 10037, // research ended - INFO_WIN = 10040, // win - INFO_LOST = 10041, // lost - INFO_LOSTq = 10042, // lost immediately - INFO_WRITEOK = 10043, // record done - INFO_DELETEPATH = 10050, // way mark deleted - INFO_DELETEMOTHER = 10100, // insect killed - INFO_DELETEANT = 10101, // insect killed - INFO_DELETEBEE = 10102, // insect killed - INFO_DELETEWORM = 10103, // insect killed - INFO_DELETESPIDER = 10104, // insect killed - INFO_BEGINSATCOM = 10105, // use your SatCom -}; diff --git a/src/common/event.cpp b/src/common/event.cpp index 4e5ec1a..b078dc5 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -16,6 +16,7 @@ #include "common/event.h" + #include "common/iman.h" #include "common/logger.h" diff --git a/src/common/event.h b/src/common/event.h index ce2872a..169f0d0 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -23,7 +23,7 @@ #include "common/key.h" -#include "common/event_ids.h" + #include "math/point.h" #include "math/vector.h" @@ -31,6 +31,530 @@ class CInstanceManager; /** + \enum EventType + \brief Type of event message + */ +enum EventType +{ + +// TODO: document the meaning of each value + + //! Invalid event / no event + EVENT_NULL = 0, + + //! Event sent on user or system quit request + EVENT_QUIT = 1, + + //! Frame update event + EVENT_FRAME = 2, + + //! Event sent after pressing a mouse button + EVENT_MOUSE_BUTTON_DOWN = 3, + //! Event sent after releasing a mouse button + EVENT_MOUSE_BUTTON_UP = 4, + //! Event sent after moving mouse wheel up or down + EVENT_MOUSE_WHEEL = 5, + //! Event sent after moving the mouse + EVENT_MOUSE_MOVE = 7, + //! Event sent after pressing a key + EVENT_KEY_DOWN = 8, + //! Event sent after releasing a key + EVENT_KEY_UP = 9, + + //! Event sent when application window loses/gains focus + EVENT_ACTIVE = 10, + + //! Event sent after moving joystick axes + EVENT_JOY_AXIS = 12, + //! Event sent after pressing a joystick button + EVENT_JOY_BUTTON_DOWN = 13, + //! Event sent after releasing a joystick button + EVENT_JOY_BUTTON_UP = 14, + + + /* Events sent/received in game and user interface */ + + EVENT_UPDINTERFACE = 20, + EVENT_WIN = 30, + EVENT_LOST = 31, + + //! CEdit focus + EVENT_FOCUS = 35, + + 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_STD_MAX, //! < maximum value of standard events + + EVENT_USER = 10000, + EVENT_FORCE_LONG = 0x7fffffff +}; + + +/** * \struct KeyEventData * \brief Additional data for keyboard event */ diff --git a/src/common/event_ids.h b/src/common/event_ids.h deleted file mode 100644 index b6c646c..0000000 --- a/src/common/event_ids.h +++ /dev/null @@ -1,541 +0,0 @@ -// * 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/. - - -// TODO: move to event.h after restext rewrite - -#pragma once - -/** - \enum EventType - \brief Type of event message - */ -enum EventType -{ - -// TODO: document the meaning of each value - - //! Invalid event / no event - EVENT_NULL = 0, - - //! Event sent on user or system quit request - EVENT_QUIT = 1, - - //! Frame update event - EVENT_FRAME = 2, - - //! Event sent after pressing a mouse button - EVENT_MOUSE_BUTTON_DOWN = 3, - //! Event sent after releasing a mouse button - EVENT_MOUSE_BUTTON_UP = 4, - //! Event sent after moving mouse wheel up or down - EVENT_MOUSE_WHEEL = 5, - //! Event sent after moving the mouse - EVENT_MOUSE_MOVE = 7, - //! Event sent after pressing a key - EVENT_KEY_DOWN = 8, - //! Event sent after releasing a key - EVENT_KEY_UP = 9, - - //! Event sent when application window loses/gains focus - EVENT_ACTIVE = 10, - - //! Event sent after moving joystick axes - EVENT_JOY_AXIS = 12, - //! Event sent after pressing a joystick button - EVENT_JOY_BUTTON_DOWN = 13, - //! Event sent after releasing a joystick button - EVENT_JOY_BUTTON_UP = 14, - - - /* Events sent/received in game and user interface */ - - EVENT_UPDINTERFACE = 20, - EVENT_WIN = 30, - EVENT_LOST = 31, - - //! CEdit focus - EVENT_FOCUS = 35, - - EVENT_BUTTON_OK = 40, - EVENT_BUTTON_CANCEL = 41, - EVENT_BUTTON_NEXT = 42, - EVENT_BUTTON_PREV = 43, - EVENT_BUTTON_QUIT = 44, - - EVENT_BUTTON0 = 50, - EVENT_BUTTON1 = 51, - EVENT_BUTTON2 = 52, - EVENT_BUTTON3 = 53, - EVENT_BUTTON4 = 54, - EVENT_BUTTON5 = 55, - EVENT_BUTTON6 = 56, - EVENT_BUTTON7 = 57, - EVENT_BUTTON8 = 58, - EVENT_BUTTON9 = 59, - EVENT_BUTTON10 = 60, - EVENT_BUTTON11 = 61, - EVENT_BUTTON12 = 62, - EVENT_BUTTON13 = 63, - EVENT_BUTTON14 = 64, - EVENT_BUTTON15 = 65, - EVENT_BUTTON16 = 66, - EVENT_BUTTON17 = 67, - EVENT_BUTTON18 = 68, - EVENT_BUTTON19 = 69, - - EVENT_EDIT0 = 70, - EVENT_EDIT1 = 71, - EVENT_EDIT2 = 72, - EVENT_EDIT3 = 73, - EVENT_EDIT4 = 74, - EVENT_EDIT5 = 75, - EVENT_EDIT6 = 76, - EVENT_EDIT7 = 77, - EVENT_EDIT8 = 78, - EVENT_EDIT9 = 79, - - EVENT_WINDOW0 = 80, // the bottom panel - EVENT_WINDOW1 = 81, // map - EVENT_WINDOW2 = 82, // CDisplayText - EVENT_WINDOW3 = 83, // CStudio - EVENT_WINDOW4 = 84, // DisplayInfo - EVENT_WINDOW5 = 85, // setup - EVENT_WINDOW6 = 86, - EVENT_WINDOW7 = 87, - EVENT_WINDOW8 = 88, - EVENT_WINDOW9 = 89, // dialogue - - EVENT_LABEL0 = 90, - EVENT_LABEL1 = 91, - EVENT_LABEL2 = 92, - EVENT_LABEL3 = 93, - EVENT_LABEL4 = 94, - EVENT_LABEL5 = 95, - EVENT_LABEL6 = 96, - EVENT_LABEL7 = 97, - EVENT_LABEL8 = 98, - EVENT_LABEL9 = 99, - EVENT_LABEL10 = 100, - EVENT_LABEL11 = 101, - EVENT_LABEL12 = 102, - EVENT_LABEL13 = 103, - EVENT_LABEL14 = 104, - EVENT_LABEL15 = 105, - EVENT_LABEL16 = 106, - EVENT_LABEL17 = 107, - EVENT_LABEL18 = 108, - EVENT_LABEL19 = 109, - - EVENT_LIST0 = 110, - EVENT_LIST1 = 111, - EVENT_LIST2 = 112, - EVENT_LIST3 = 113, - EVENT_LIST4 = 114, - EVENT_LIST5 = 115, - EVENT_LIST6 = 116, - EVENT_LIST7 = 117, - EVENT_LIST8 = 118, - EVENT_LIST9 = 119, - - EVENT_TOOLTIP = 200, - - EVENT_DIALOG_OK = 300, - EVENT_DIALOG_CANCEL = 301, - EVENT_DIALOG_LABEL = 302, - EVENT_DIALOG_LABEL1 = 303, - EVENT_DIALOG_LABEL2 = 304, - EVENT_DIALOG_LABEL3 = 305, - EVENT_DIALOG_LIST = 306, - EVENT_DIALOG_EDIT = 307, - EVENT_DIALOG_CHECK1 = 308, - EVENT_DIALOG_CHECK2 = 309, - - EVENT_INTERFACE_TRAINER = 400, - EVENT_INTERFACE_DEFI = 401, - EVENT_INTERFACE_MISSION = 402, - EVENT_INTERFACE_FREE = 403, - EVENT_INTERFACE_PROTO = 404, - EVENT_INTERFACE_NAME = 405, - EVENT_INTERFACE_SETUP = 406, - EVENT_INTERFACE_QUIT = 407, - EVENT_INTERFACE_BACK = 408, - EVENT_INTERFACE_AGAIN = 409, - EVENT_INTERFACE_WRITE = 410, - EVENT_INTERFACE_READ = 411, - EVENT_INTERFACE_ABORT = 412, - EVENT_INTERFACE_USER = 413, - EVENT_INTERFACE_TEEN = 414, - - EVENT_INTERFACE_CHAP = 420, - EVENT_INTERFACE_LIST = 421, - EVENT_INTERFACE_RESUME = 422, - EVENT_INTERFACE_PLAY = 423, - - EVENT_INTERFACE_SETUPd = 430, - EVENT_INTERFACE_SETUPg = 431, - EVENT_INTERFACE_SETUPp = 432, - EVENT_INTERFACE_SETUPc = 433, - EVENT_INTERFACE_SETUPs = 434, - - EVENT_INTERFACE_DEVICE = 440, - EVENT_INTERFACE_RESOL = 441, - EVENT_INTERFACE_FULL = 442, - EVENT_INTERFACE_APPLY = 443, - - EVENT_INTERFACE_TOTO = 450, - EVENT_INTERFACE_SHADOW = 451, - EVENT_INTERFACE_DIRTY = 452, - EVENT_INTERFACE_LENS = 453, - EVENT_INTERFACE_SKY = 454, - EVENT_INTERFACE_PLANET = 456, - EVENT_INTERFACE_LIGHT = 457, - EVENT_INTERFACE_PARTI = 458, - EVENT_INTERFACE_CLIP = 459, - EVENT_INTERFACE_DETAIL = 460, - EVENT_INTERFACE_TEXTURE = 461, - EVENT_INTERFACE_RAIN = 462, - EVENT_INTERFACE_GLINT = 463, - EVENT_INTERFACE_TOOLTIP = 464, - EVENT_INTERFACE_MOVIES = 465, - EVENT_INTERFACE_NICERST = 466, - EVENT_INTERFACE_SCROLL = 467, - EVENT_INTERFACE_INVERTX = 468, - EVENT_INTERFACE_INVERTY = 469, - EVENT_INTERFACE_EFFECT = 470, - EVENT_INTERFACE_MOUSE = 471, - EVENT_INTERFACE_GROUND = 472, - EVENT_INTERFACE_GADGET = 473, - EVENT_INTERFACE_FOG = 474, - EVENT_INTERFACE_HIMSELF = 475, - EVENT_INTERFACE_EDITMODE= 476, - EVENT_INTERFACE_EDITVALUE= 477, - EVENT_INTERFACE_SOLUCE4 = 478, - - EVENT_INTERFACE_KINFO1 = 500, - EVENT_INTERFACE_KINFO2 = 501, - EVENT_INTERFACE_KGROUP = 502, - EVENT_INTERFACE_KSCROLL = 503, - EVENT_INTERFACE_KDEF = 504, - EVENT_INTERFACE_KLEFT = 505, - EVENT_INTERFACE_KRIGHT = 506, - EVENT_INTERFACE_KUP = 507, - EVENT_INTERFACE_KDOWN = 508, - EVENT_INTERFACE_KGUP = 509, - EVENT_INTERFACE_KGDOWN = 510, - EVENT_INTERFACE_KCAMERA = 511, - EVENT_INTERFACE_KDESEL = 512, - EVENT_INTERFACE_KACTION = 513, - EVENT_INTERFACE_KNEAR = 514, - EVENT_INTERFACE_KAWAY = 515, - EVENT_INTERFACE_KNEXT = 516, - EVENT_INTERFACE_KHUMAN = 517, - EVENT_INTERFACE_KQUIT = 518, - EVENT_INTERFACE_KHELP = 519, - EVENT_INTERFACE_KPROG = 520, - EVENT_INTERFACE_KCBOT = 521, - EVENT_INTERFACE_KVISIT = 522, - EVENT_INTERFACE_KSPEED10= 523, - EVENT_INTERFACE_KSPEED15= 524, - EVENT_INTERFACE_KSPEED20= 525, - EVENT_INTERFACE_KSPEED30= 526, - - EVENT_INTERFACE_VOLSOUND= 530, - EVENT_INTERFACE_VOLMUSIC= 531, - EVENT_INTERFACE_SOUND3D = 532, - - EVENT_INTERFACE_MIN = 540, - EVENT_INTERFACE_NORM = 541, - EVENT_INTERFACE_MAX = 542, - - EVENT_INTERFACE_SILENT = 550, - EVENT_INTERFACE_NOISY = 551, - - EVENT_INTERFACE_JOYSTICK= 560, - EVENT_INTERFACE_SOLUCE = 561, - - EVENT_INTERFACE_GLINTl = 570, - EVENT_INTERFACE_GLINTr = 571, - EVENT_INTERFACE_GLINTu = 572, - EVENT_INTERFACE_GLINTb = 573, - - EVENT_INTERFACE_NEDIT = 580, - EVENT_INTERFACE_NLIST = 581, - EVENT_INTERFACE_NOK = 582, - EVENT_INTERFACE_NCANCEL = 583, - EVENT_INTERFACE_NDELETE = 584, - EVENT_INTERFACE_NLABEL = 585, - - EVENT_INTERFACE_IOWRITE = 600, - EVENT_INTERFACE_IOREAD = 601, - EVENT_INTERFACE_IOLIST = 602, - EVENT_INTERFACE_IONAME = 603, - EVENT_INTERFACE_IOLABEL = 604, - EVENT_INTERFACE_IOIMAGE = 605, - EVENT_INTERFACE_IODELETE= 606, - - EVENT_INTERFACE_PERSO = 620, - EVENT_INTERFACE_POK = 621, - EVENT_INTERFACE_PCANCEL = 622, - EVENT_INTERFACE_PDEF = 623, - EVENT_INTERFACE_PHEAD = 624, - EVENT_INTERFACE_PBODY = 625, - EVENT_INTERFACE_PLROT = 626, - EVENT_INTERFACE_PRROT = 627, - EVENT_INTERFACE_PC0a = 640, - EVENT_INTERFACE_PC1a = 641, - EVENT_INTERFACE_PC2a = 642, - EVENT_INTERFACE_PC3a = 643, - EVENT_INTERFACE_PC4a = 644, - EVENT_INTERFACE_PC5a = 645, - EVENT_INTERFACE_PC6a = 646, - EVENT_INTERFACE_PC7a = 647, - EVENT_INTERFACE_PC8a = 648, - EVENT_INTERFACE_PC9a = 649, - EVENT_INTERFACE_PCRa = 650, - EVENT_INTERFACE_PCGa = 651, - EVENT_INTERFACE_PCBa = 652, - EVENT_INTERFACE_PC0b = 660, - EVENT_INTERFACE_PC1b = 661, - EVENT_INTERFACE_PC2b = 662, - EVENT_INTERFACE_PC3b = 663, - EVENT_INTERFACE_PC4b = 664, - EVENT_INTERFACE_PC5b = 665, - EVENT_INTERFACE_PC6b = 666, - EVENT_INTERFACE_PC7b = 667, - EVENT_INTERFACE_PC8b = 668, - EVENT_INTERFACE_PC9b = 669, - EVENT_INTERFACE_PCRb = 670, - EVENT_INTERFACE_PCGb = 671, - EVENT_INTERFACE_PCBb = 672, - EVENT_INTERFACE_PFACE1 = 680, - EVENT_INTERFACE_PFACE2 = 681, - EVENT_INTERFACE_PFACE3 = 682, - EVENT_INTERFACE_PFACE4 = 683, - EVENT_INTERFACE_PGLASS0 = 690, - EVENT_INTERFACE_PGLASS1 = 691, - EVENT_INTERFACE_PGLASS2 = 692, - EVENT_INTERFACE_PGLASS3 = 693, - EVENT_INTERFACE_PGLASS4 = 694, - EVENT_INTERFACE_PGLASS5 = 695, - EVENT_INTERFACE_PGLASS6 = 696, - EVENT_INTERFACE_PGLASS7 = 697, - EVENT_INTERFACE_PGLASS8 = 698, - EVENT_INTERFACE_PGLASS9 = 699, - - EVENT_DT_GROUP0 = 700, - EVENT_DT_GROUP1 = 701, - EVENT_DT_GROUP2 = 702, - EVENT_DT_GROUP3 = 703, - EVENT_DT_GROUP4 = 704, - EVENT_DT_LABEL0 = 710, - EVENT_DT_LABEL1 = 711, - EVENT_DT_LABEL2 = 712, - EVENT_DT_LABEL3 = 713, - EVENT_DT_LABEL4 = 714, - EVENT_DT_VISIT0 = 720, - EVENT_DT_VISIT1 = 721, - EVENT_DT_VISIT2 = 722, - EVENT_DT_VISIT3 = 723, - EVENT_DT_VISIT4 = 724, - EVENT_DT_END = 725, - - EVENT_CMD = 800, - EVENT_SPEED = 801, - - EVENT_HYPER_PREV = 900, - EVENT_HYPER_NEXT = 901, - EVENT_HYPER_HOME = 902, - EVENT_HYPER_COPY = 903, - EVENT_HYPER_SIZE1 = 904, - EVENT_HYPER_SIZE2 = 905, - EVENT_HYPER_SIZE3 = 906, - EVENT_HYPER_SIZE4 = 907, - EVENT_HYPER_SIZE5 = 908, - - EVENT_SATCOM_HUSTON = 920, - EVENT_SATCOM_SAT = 921, - EVENT_SATCOM_LOADING = 922, - EVENT_SATCOM_OBJECT = 923, - EVENT_SATCOM_PROG = 924, - EVENT_SATCOM_SOLUCE = 925, - - EVENT_OBJECT_DESELECT = 1000, - EVENT_OBJECT_LEFT = 1001, - EVENT_OBJECT_RIGHT = 1002, - EVENT_OBJECT_UP = 1003, - EVENT_OBJECT_DOWN = 1004, - EVENT_OBJECT_GASUP = 1005, - EVENT_OBJECT_GASDOWN = 1006, - EVENT_OBJECT_HTAKE = 1020, - EVENT_OBJECT_MTAKE = 1021, - EVENT_OBJECT_MFRONT = 1022, - EVENT_OBJECT_MBACK = 1023, - EVENT_OBJECT_MPOWER = 1024, - EVENT_OBJECT_BHELP = 1040, - EVENT_OBJECT_BTAKEOFF = 1041, - EVENT_OBJECT_BDERRICK = 1050, - EVENT_OBJECT_BSTATION = 1051, - EVENT_OBJECT_BFACTORY = 1052, - EVENT_OBJECT_BCONVERT = 1053, - EVENT_OBJECT_BTOWER = 1054, - EVENT_OBJECT_BREPAIR = 1055, - EVENT_OBJECT_BRESEARCH = 1056, - EVENT_OBJECT_BRADAR = 1057, - EVENT_OBJECT_BENERGY = 1058, - EVENT_OBJECT_BLABO = 1059, - EVENT_OBJECT_BNUCLEAR = 1060, - EVENT_OBJECT_BPARA = 1061, - EVENT_OBJECT_BINFO = 1062, - EVENT_OBJECT_BXXXX = 1063, - EVENT_OBJECT_GFLAT = 1070, - EVENT_OBJECT_FCREATE = 1071, - EVENT_OBJECT_FDELETE = 1072, - EVENT_OBJECT_FCOLORb = 1073, - EVENT_OBJECT_FCOLORr = 1074, - EVENT_OBJECT_FCOLORg = 1075, - EVENT_OBJECT_FCOLORy = 1076, - EVENT_OBJECT_FCOLORv = 1077, - EVENT_OBJECT_FACTORYwa = 1080, - EVENT_OBJECT_FACTORYta = 1081, - EVENT_OBJECT_FACTORYfa = 1082, - EVENT_OBJECT_FACTORYia = 1083, - EVENT_OBJECT_FACTORYwc = 1084, - EVENT_OBJECT_FACTORYtc = 1085, - EVENT_OBJECT_FACTORYfc = 1086, - EVENT_OBJECT_FACTORYic = 1087, - EVENT_OBJECT_FACTORYwi = 1088, - EVENT_OBJECT_FACTORYti = 1089, - EVENT_OBJECT_FACTORYfi = 1090, - EVENT_OBJECT_FACTORYii = 1091, - EVENT_OBJECT_FACTORYws = 1092, - EVENT_OBJECT_FACTORYts = 1093, - EVENT_OBJECT_FACTORYfs = 1094, - EVENT_OBJECT_FACTORYis = 1095, - EVENT_OBJECT_FACTORYrt = 1096, - EVENT_OBJECT_FACTORYrc = 1097, - EVENT_OBJECT_FACTORYrr = 1098, - EVENT_OBJECT_FACTORYrs = 1099, - EVENT_OBJECT_FACTORYsa = 1100, - EVENT_OBJECT_SEARCH = 1200, - EVENT_OBJECT_TERRAFORM = 1201, - EVENT_OBJECT_FIRE = 1202, - EVENT_OBJECT_FIREANT = 1203, - EVENT_OBJECT_RECOVER = 1220, - EVENT_OBJECT_BEGSHIELD = 1221, - EVENT_OBJECT_ENDSHIELD = 1222, - EVENT_OBJECT_RTANK = 1223, - EVENT_OBJECT_RFLY = 1224, - EVENT_OBJECT_RTHUMP = 1225, - EVENT_OBJECT_RCANON = 1226, - EVENT_OBJECT_RTOWER = 1227, - EVENT_OBJECT_RPHAZER = 1228, - EVENT_OBJECT_RSHIELD = 1229, - EVENT_OBJECT_RATOMIC = 1230, - EVENT_OBJECT_RiPAW = 1231, - EVENT_OBJECT_RiGUN = 1232, - EVENT_OBJECT_RESET = 1233, - EVENT_OBJECT_DIMSHIELD = 1234, - EVENT_OBJECT_TARGET = 1235, - EVENT_OBJECT_PROGLIST = 1310, - EVENT_OBJECT_PROGRUN = 1311, - EVENT_OBJECT_PROGEDIT = 1312, - EVENT_OBJECT_PROGSTART = 1313, - EVENT_OBJECT_PROGSTOP = 1314, - EVENT_OBJECT_INFOOK = 1340, - EVENT_OBJECT_DELETE = 1350, - EVENT_OBJECT_GENERGY = 1360, - EVENT_OBJECT_GSHIELD = 1361, - EVENT_OBJECT_GRANGE = 1362, - EVENT_OBJECT_COMPASS = 1363, - EVENT_OBJECT_MAP = 1364, - EVENT_OBJECT_MAPZOOM = 1365, - EVENT_OBJECT_GPROGRESS = 1366, - EVENT_OBJECT_GRADAR = 1367, - EVENT_OBJECT_GINFO = 1368, - EVENT_OBJECT_TYPE = 1369, - EVENT_OBJECT_CROSSHAIR = 1370, - EVENT_OBJECT_CORNERul = 1371, - EVENT_OBJECT_CORNERur = 1372, - EVENT_OBJECT_CORNERdl = 1373, - EVENT_OBJECT_CORNERdr = 1374, - EVENT_OBJECT_MAPi = 1375, - EVENT_OBJECT_MAPg = 1376, - EVENT_OBJECT_CAMERA = 1400, - EVENT_OBJECT_HELP = 1401, - EVENT_OBJECT_SOLUCE = 1402, - EVENT_OBJECT_CAMERAleft = 1403, - EVENT_OBJECT_CAMERAright= 1404, - EVENT_OBJECT_CAMERAnear = 1405, - EVENT_OBJECT_CAMERAaway = 1406, - EVENT_OBJECT_SHORTCUT00 = 1500, - EVENT_OBJECT_SHORTCUT01 = 1501, - EVENT_OBJECT_SHORTCUT02 = 1502, - EVENT_OBJECT_SHORTCUT03 = 1503, - EVENT_OBJECT_SHORTCUT04 = 1504, - EVENT_OBJECT_SHORTCUT05 = 1505, - EVENT_OBJECT_SHORTCUT06 = 1506, - EVENT_OBJECT_SHORTCUT07 = 1507, - EVENT_OBJECT_SHORTCUT08 = 1508, - EVENT_OBJECT_SHORTCUT09 = 1509, - EVENT_OBJECT_SHORTCUT10 = 1510, - EVENT_OBJECT_SHORTCUT11 = 1511, - EVENT_OBJECT_SHORTCUT12 = 1512, - EVENT_OBJECT_SHORTCUT13 = 1513, - EVENT_OBJECT_SHORTCUT14 = 1514, - EVENT_OBJECT_SHORTCUT15 = 1515, - EVENT_OBJECT_SHORTCUT16 = 1516, - EVENT_OBJECT_SHORTCUT17 = 1517, - EVENT_OBJECT_SHORTCUT18 = 1518, - EVENT_OBJECT_SHORTCUT19 = 1519, - EVENT_OBJECT_MOVIELOCK = 1550, - EVENT_OBJECT_EDITLOCK = 1551, - EVENT_OBJECT_LIMIT = 1560, - - EVENT_OBJECT_PEN0 = 1570, - EVENT_OBJECT_PEN1 = 1571, - EVENT_OBJECT_PEN2 = 1572, - EVENT_OBJECT_PEN3 = 1573, - EVENT_OBJECT_PEN4 = 1574, - EVENT_OBJECT_PEN5 = 1575, - EVENT_OBJECT_PEN6 = 1576, - EVENT_OBJECT_PEN7 = 1577, - EVENT_OBJECT_PEN8 = 1578, - EVENT_OBJECT_REC = 1580, - EVENT_OBJECT_STOP = 1581, - - EVENT_STUDIO_OK = 2000, - EVENT_STUDIO_CANCEL = 2001, - EVENT_STUDIO_EDIT = 2002, - EVENT_STUDIO_LIST = 2003, - EVENT_STUDIO_NEW = 2010, - EVENT_STUDIO_OPEN = 2011, - EVENT_STUDIO_SAVE = 2012, - EVENT_STUDIO_UNDO = 2013, - EVENT_STUDIO_CUT = 2014, - EVENT_STUDIO_COPY = 2015, - EVENT_STUDIO_PASTE = 2016, - EVENT_STUDIO_SIZE = 2017, - EVENT_STUDIO_TOOL = 2018, - EVENT_STUDIO_HELP = 2019, - EVENT_STUDIO_COMPILE = 2050, - EVENT_STUDIO_RUN = 2051, - EVENT_STUDIO_REALTIME = 2052, - EVENT_STUDIO_STEP = 2053, - - EVENT_USER = 10000, - EVENT_FORCE_LONG = 0x7fffffff -}; diff --git a/src/common/global.h b/src/common/global.h index 579db7d..2d57ee0 100644 --- a/src/common/global.h +++ b/src/common/global.h @@ -21,7 +21,143 @@ #pragma once -#include "error_ids.h" + +/** + * \enum Error + * \brief Type of error or info message + */ +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_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 + + ERR_MAX //! < number of values +}; /** * \enum Language @@ -56,6 +192,7 @@ enum DataDir DIR_MAX //! < number of dirs }; + /** * \enum BuildType * \brief Construction actions (buildings, etc.) available to user diff --git a/src/common/image.cpp b/src/common/image.cpp index adb8ce7..f3cfa34 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -14,9 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// image.cpp -#include "image.h" +#include "common/image.h" #include <stdlib.h> #include <stdio.h> diff --git a/src/common/image.h b/src/common/image.h index 54bbd3d..d23a6fa 100644 --- a/src/common/image.h +++ b/src/common/image.h @@ -21,7 +21,9 @@ #pragma once + #include "graphics/core/color.h" + #include "math/intpoint.h" #include <stddef.h> diff --git a/src/common/iman.cpp b/src/common/iman.cpp index e59afb1..6a0a9eb 100644 --- a/src/common/iman.cpp +++ b/src/common/iman.cpp @@ -14,7 +14,6 @@ // * 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 #include "common/iman.h" diff --git a/src/common/iman.h b/src/common/iman.h index 75655aa..53caed7 100644 --- a/src/common/iman.h +++ b/src/common/iman.h @@ -15,14 +15,14 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. /** - * \file iman.h + * \file common/iman.h * \brief Instance manager for managed classes */ #pragma once -#include <common/singleton.h> -#include <common/misc.h> + +#include "common/singleton.h" /** diff --git a/src/common/ioutils.h b/src/common/ioutils.h index e7668eb..9a94617 100644 --- a/src/common/ioutils.h +++ b/src/common/ioutils.h @@ -15,7 +15,7 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. /** - * \file ioutils.h + * \file common/ioutils.h * \brief Functions for binary I/O */ diff --git a/src/common/key.h b/src/common/key.h index 11076a3..196f66d 100644 --- a/src/common/key.h +++ b/src/common/key.h @@ -14,7 +14,10 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// key.h +/** + * \file common/key.h + * \brief Key-related macros and enums + */ #pragma once diff --git a/src/common/logger.cpp b/src/common/logger.cpp index ed8df8c..5a78433 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp @@ -14,9 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// logger.cpp -#include <common/logger.h> +#include "common/logger.h" #include <stdio.h> diff --git a/src/common/logger.h b/src/common/logger.h index dfeeb98..198e5e5 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -19,9 +19,9 @@ * \brief Class for logging information to file or console */ - #pragma once + #include "common/singleton.h" #include <string> @@ -58,48 +58,48 @@ class CLogger : public CSingleton<CLogger> ~CLogger(); /** Write message to console or file - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Message(const char *str, ...); /** Write message to console or file with LOG_TRACE level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Trace(const char *str, ...); /** Write message to console or file with LOG_DEBUG level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Debug(const char *str, ...); /** Write message to console or file with LOG_INFO level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Info(const char *str, ...); /** Write message to console or file with LOG_WARN level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Warn(const char *str, ...); /** Write message to console or file with LOG_ERROR level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Error(const char *str, ...); /** Set output file to write logs to - * @param filename - output file to write to + * \param filename - output file to write to */ void SetOutputFile(std::string filename); /** Set log level. Logs with level below will not be shown - * @param level - minimum log level to write + * \param level - minimum log level to write */ void SetLogLevel(LogType level); diff --git a/src/common/misc.cpp b/src/common/misc.cpp index 2ed6e2c..2bce3b8 100644 --- a/src/common/misc.cpp +++ b/src/common/misc.cpp @@ -14,8 +14,6 @@ // * 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 - #include "common/misc.h" diff --git a/src/common/misc.h b/src/common/misc.h index f6fd609..f210706 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -14,7 +14,6 @@ // * 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 #pragma once @@ -22,20 +21,6 @@ #include <time.h> -// TODO: to be removed (replaced by TrackedKey enum and mouse states in app.h) -const int KS_PAGEUP = (1<<4); -const int KS_PAGEDOWN = (1<<5); -const int KS_SHIFT = (1<<6); -const int KS_CONTROL = (1<<7); -const int KS_MLEFT = (1<<8); -const int KS_MRIGHT = (1<<9); -const int KS_NUMUP = (1<<10); -const int KS_NUMDOWN = (1<<11); -const int KS_NUMLEFT = (1<<12); -const int KS_NUMRIGHT = (1<<13); -const int KS_NUMPLUS = (1<<14); -const int KS_NUMMINUS = (1<<15); - // TODO: rewrite/refactor or remove extern char GetNoAccent(char letter); diff --git a/src/common/profile.cpp b/src/common/profile.cpp index 2c78f9f..5432489 100644 --- a/src/common/profile.cpp +++ b/src/common/profile.cpp @@ -14,10 +14,9 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// profile.cpp - #include "common/profile.h" + #include "common/logger.h" #include <utility> diff --git a/src/common/profile.h b/src/common/profile.h index facb414..9bc6c37 100644 --- a/src/common/profile.h +++ b/src/common/profile.h @@ -21,18 +21,19 @@ #pragma once -#include <boost/property_tree/ptree.hpp> #include "common/singleton.h" +#include <boost/property_tree/ptree.hpp> + #include <string> #include <vector> /** -* @class CProfile +* \class CProfile * -* @brief Class for loading profile (currently for loading ini config file) +* \brief Class for loading profile (currently for loading ini config file) * */ class CProfile : public CSingleton<CProfile> @@ -42,62 +43,62 @@ class CProfile : public CSingleton<CProfile> ~CProfile(); /** Loads colobot.ini from current directory - * @return return true on success + * \return return true on success */ bool InitCurrentDirectory(); /** Sets string value in section under specified key - * @param std::string section - * @param std::string key - * @param std::string value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool SetLocalProfileString(std::string section, std::string key, std::string value); /** Gets string value in section under specified key - * @param std::string section - * @param std::string key - * @param std::string& buffer - * @return return true on success + * \param section + * \param key + * \param buffer + * \return return true on success */ bool GetLocalProfileString(std::string section, std::string key, std::string& buffer); /** Sets int value in section under specified key - * @param std::string section - * @param std::string key - * @param int value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool SetLocalProfileInt(std::string section, std::string key, int value); /** Gets int value in section under specified key - * @param std::string section - * @param std::string key - * @param int& value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool GetLocalProfileInt(std::string section, std::string key, int &value); /** Sets float value in section under specified key - * @param std::string section - * @param std::string key - * @param float value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool SetLocalProfileFloat(std::string section, std::string key, float value); /** Gets float value in section under specified key - * @param std::string section - * @param std::string key - * @param float& value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool GetLocalProfileFloat(std::string section, std::string key, float &value); /** Gets all values in section under specified key - * @param std::string section - * @param std::string key - * @return vector of values + * \param section + * \param key + * \return vector of values */ std::vector< std::string > GetLocalProfileSection(std::string section, std::string key); diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 0f33f52..da06131 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -12,7 +12,8 @@ // * 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 +// * along with this program. If not, see http://www.gnu.org/licenses/. + #include "common/restext.h" @@ -20,13 +21,707 @@ #include "common/event.h" #include "common/logger.h" #include "common/stringutils.h" + #include "CBot/resource.h" + #include "object/object.h" #include "object/robotmain.h" #include <libintl.h> #include <SDL/SDL_keyboard.h> +const char* stringsText[RT_MAX] = { nullptr }; +const char* stringsEvent[EVENT_STD_MAX] = { nullptr }; +const char* stringsObject[OBJECT_MAX] = { nullptr }; +const char* stringsErr[ERR_MAX] = { nullptr }; +const char* stringsCbot[TX_MAX] = { nullptr }; + + +void InitializeRestext() +{ + stringsText[RT_VERSION_ID] = "Colobot Gold"; + + stringsText[RT_DISINFO_TITLE] = "SatCom"; + stringsText[RT_WINDOW_MAXIMIZED] = "Maximize"; + stringsText[RT_WINDOW_MINIMIZED] = "Minimize"; + stringsText[RT_WINDOW_STANDARD] = "Normal size"; + stringsText[RT_WINDOW_CLOSE] = "Close"; + + stringsText[RT_STUDIO_TITLE] = "Program editor"; + stringsText[RT_SCRIPT_NEW] = "New"; + stringsText[RT_NAME_DEFAULT] = "Player"; + stringsText[RT_IO_NEW] = "New ..."; + stringsText[RT_KEY_OR] = " or "; + + stringsText[RT_TITLE_BASE] = "COLOBOT"; + stringsText[RT_TITLE_INIT] = "COLOBOT"; + stringsText[RT_TITLE_TRAINER] = "Programming exercises"; + stringsText[RT_TITLE_DEFI] = "Challenges"; + stringsText[RT_TITLE_MISSION] = "Missions"; + stringsText[RT_TITLE_FREE] = "Free game"; + stringsText[RT_TITLE_TEEN] = "Free game"; + stringsText[RT_TITLE_USER] = "User levels"; + stringsText[RT_TITLE_PROTO] = "Prototypes"; + stringsText[RT_TITLE_SETUP] = "Options"; + stringsText[RT_TITLE_NAME] = "Player's name"; + stringsText[RT_TITLE_PERSO] = "Customize your appearance"; + stringsText[RT_TITLE_WRITE] = "Save the current mission"; + stringsText[RT_TITLE_READ] = "Load a saved mission"; + + stringsText[RT_PLAY_CHAPt] = " Chapters:"; + stringsText[RT_PLAY_CHAPd] = " Chapters:"; + stringsText[RT_PLAY_CHAPm] = " Planets:"; + stringsText[RT_PLAY_CHAPf] = " Planets:"; + stringsText[RT_PLAY_CHAPu] = " User levels:"; + stringsText[RT_PLAY_CHAPp] = " Planets:"; + stringsText[RT_PLAY_CHAPte] = " Chapters:"; + stringsText[RT_PLAY_LISTt] = " Exercises in the chapter:"; + stringsText[RT_PLAY_LISTd] = " Challenges in the chapter:"; + stringsText[RT_PLAY_LISTm] = " Missions on this planet:"; + stringsText[RT_PLAY_LISTf] = " Free game on this planet:"; + stringsText[RT_PLAY_LISTu] = " Missions on this level:"; + stringsText[RT_PLAY_LISTp] = " Prototypes on this planet:"; + stringsText[RT_PLAY_LISTk] = " Free game on this chapter:"; + stringsText[RT_PLAY_RESUME] = " Summary:"; + + stringsText[RT_SETUP_DEVICE] = " Drivers:"; + stringsText[RT_SETUP_MODE] = " Resolution:"; + stringsText[RT_SETUP_KEY1] = "1) First click on the key you want to redefine."; + stringsText[RT_SETUP_KEY2] = "2) Then press the key you want to use instead."; + + stringsText[RT_PERSO_FACE] = "Face type:"; + stringsText[RT_PERSO_GLASSES] = "Eyeglasses:"; + stringsText[RT_PERSO_HAIR] = "Hair color:"; + stringsText[RT_PERSO_COMBI] = "Suit color:"; + stringsText[RT_PERSO_BAND] = "Strip color:"; + + stringsText[RT_DIALOG_QUIT] = "Do you want to quit COLOBOT ?"; + stringsText[RT_DIALOG_TITLE] = "COLOBOT"; + stringsText[RT_DIALOG_YESQUIT] = "Quit\\Quit COLOBOT"; + stringsText[RT_DIALOG_ABORT] = "Quit the mission?"; + stringsText[RT_DIALOG_YES] = "Abort\\Abort the current mission"; + stringsText[RT_DIALOG_NO] = "Continue\\Continue the current mission"; + stringsText[RT_DIALOG_NOQUIT] = "Continue\\Continue the game"; + stringsText[RT_DIALOG_DELOBJ] = "Do you really want to destroy the selected building?"; + stringsText[RT_DIALOG_DELGAME] = "Do you want to delete %s's saved games? "; + stringsText[RT_DIALOG_YESDEL] = "Delete"; + stringsText[RT_DIALOG_NODEL] = "Cancel"; + stringsText[RT_DIALOG_LOADING] = "LOADING"; + + stringsText[RT_STUDIO_LISTTT] = "Keyword help(\\key cbot;)"; + stringsText[RT_STUDIO_COMPOK] = "Compilation ok (0 errors)"; + stringsText[RT_STUDIO_PROGSTOP] = "Program finished"; + + stringsText[RT_SATCOM_LIST] = "\\b;List of objects\n"; + stringsText[RT_SATCOM_BOT] = "\\b;Robots\n"; + stringsText[RT_SATCOM_BUILDING] = "\\b;Buildings\n"; + stringsText[RT_SATCOM_FRET] = "\\b;Moveable objects\n"; + stringsText[RT_SATCOM_ALIEN] = "\\b;Aliens\n"; + stringsText[RT_SATCOM_NULL] = "\\c; (none)\\n;\n"; + stringsText[RT_SATCOM_ERROR1] = "\\b;Error\n"; + stringsText[RT_SATCOM_ERROR2] = "The list is only available if a \\l;radar station\\u object\\radar; is working.\n"; + + stringsText[RT_IO_OPEN] = "Open"; + stringsText[RT_IO_SAVE] = "Save"; + stringsText[RT_IO_LIST] = "Folder: %s"; + stringsText[RT_IO_NAME] = "Name:"; + stringsText[RT_IO_DIR] = "Folder:"; + stringsText[RT_IO_PRIVATE] = "Private\\Private folder"; + stringsText[RT_IO_PUBLIC] = "Public\\Common folder"; + + stringsText[RT_GENERIC_DEV1] = "Developed by :"; + stringsText[RT_GENERIC_DEV2] = "www.epsitec.com"; + stringsText[RT_GENERIC_EDIT1] = " "; + stringsText[RT_GENERIC_EDIT2] = " "; + + stringsText[RT_INTERFACE_REC] = "Recorder"; + + + + stringsEvent[EVENT_BUTTON_OK] = "OK"; + stringsEvent[EVENT_BUTTON_CANCEL] = "Cancel"; + stringsEvent[EVENT_BUTTON_NEXT] = "Next"; + stringsEvent[EVENT_BUTTON_PREV] = "Previous"; + stringsEvent[EVENT_BUTTON_QUIT] = "Menu (\\key quit;)"; + + stringsEvent[EVENT_DIALOG_OK] = "OK"; + stringsEvent[EVENT_DIALOG_CANCEL] = "Cancel"; + + stringsEvent[EVENT_INTERFACE_TRAINER] = "Exercises\\Programming exercises"; + stringsEvent[EVENT_INTERFACE_DEFI] = "Challenges\\Programming challenges"; + stringsEvent[EVENT_INTERFACE_MISSION] = "Missions\\Select mission"; + stringsEvent[EVENT_INTERFACE_FREE] = "Free game\\Free game without a specific goal"; + stringsEvent[EVENT_INTERFACE_TEEN] = "Free game\\Free game without a specific goal"; + stringsEvent[EVENT_INTERFACE_USER] = "User\\User levels"; + stringsEvent[EVENT_INTERFACE_PROTO] = "Proto\\Prototypes under development"; + stringsEvent[EVENT_INTERFACE_NAME] = "New player\\Choose player's name"; + stringsEvent[EVENT_INTERFACE_SETUP] = "Options\\Preferences"; + stringsEvent[EVENT_INTERFACE_AGAIN] = "Restart\\Restart the mission from the beginning"; + stringsEvent[EVENT_INTERFACE_WRITE] = "Save\\Save the current mission "; + stringsEvent[EVENT_INTERFACE_READ] = "Load\\Load a saved mission"; + stringsEvent[EVENT_INTERFACE_ABORT] = "\\Return to COLOBOT"; + stringsEvent[EVENT_INTERFACE_QUIT] = "Quit\\Quit COLOBOT"; + stringsEvent[EVENT_INTERFACE_BACK] = "<< Back \\Back to the previous screen"; + stringsEvent[EVENT_INTERFACE_PLAY] = "Play\\Start mission!"; + stringsEvent[EVENT_INTERFACE_SETUPd] = "Device\\Driver and resolution settings"; + stringsEvent[EVENT_INTERFACE_SETUPg] = "Graphics\\Graphics settings"; + stringsEvent[EVENT_INTERFACE_SETUPp] = "Game\\Game settings"; + stringsEvent[EVENT_INTERFACE_SETUPc] = "Controls\\Keyboard, joystick and mouse settings"; + stringsEvent[EVENT_INTERFACE_SETUPs] = "Sound\\Music and game sound volume"; + stringsEvent[EVENT_INTERFACE_DEVICE] = "Unit"; + stringsEvent[EVENT_INTERFACE_RESOL] = "Resolution"; + stringsEvent[EVENT_INTERFACE_FULL] = "Full screen\\Full screen or window mode"; + stringsEvent[EVENT_INTERFACE_APPLY] = "Apply changes\\Activates the changed settings"; + + stringsEvent[EVENT_INTERFACE_TOTO] = "Robbie\\Your assistant"; + stringsEvent[EVENT_INTERFACE_SHADOW] = "Shadows\\Shadows on the ground"; + stringsEvent[EVENT_INTERFACE_GROUND] = "Marks on the ground\\Marks on the ground"; + stringsEvent[EVENT_INTERFACE_DIRTY] = "Dust\\Dust and dirt on bots and buildings"; + stringsEvent[EVENT_INTERFACE_FOG] = "Fog\\Fog"; + stringsEvent[EVENT_INTERFACE_LENS] = "Sunbeams\\Sunbeams in the sky"; + stringsEvent[EVENT_INTERFACE_SKY] = "Sky\\Clouds and nebulae"; + stringsEvent[EVENT_INTERFACE_PLANET] = "Planets and stars\\Astronomical objects in the sky"; + stringsEvent[EVENT_INTERFACE_LIGHT] = "Dynamic lighting\\Mobile light sources"; + stringsEvent[EVENT_INTERFACE_PARTI] = "Number of particles\\Explosions, dust, reflections, etc."; + stringsEvent[EVENT_INTERFACE_CLIP] = "Depth of field\\Maximum visibility"; + stringsEvent[EVENT_INTERFACE_DETAIL] = "Details\\Visual quality of 3D objects"; + stringsEvent[EVENT_INTERFACE_TEXTURE] = "Textures\\Quality of textures "; + stringsEvent[EVENT_INTERFACE_GADGET] = "Num of decorative objects\\Number of purely ornamental objects"; + stringsEvent[EVENT_INTERFACE_RAIN] = "Particles in the interface\\Steam clouds and sparks in the interface"; + stringsEvent[EVENT_INTERFACE_GLINT] = "Reflections on the buttons \\Shiny buttons"; + stringsEvent[EVENT_INTERFACE_TOOLTIP] = "Help balloons\\Explain the function of the buttons"; + stringsEvent[EVENT_INTERFACE_MOVIES] = "Film sequences\\Films before and after the missions"; + stringsEvent[EVENT_INTERFACE_NICERST] = "Exit film\\Film at the exit of exercises"; + stringsEvent[EVENT_INTERFACE_HIMSELF] = "Friendly fire\\Your shooting can damage your own objects "; + stringsEvent[EVENT_INTERFACE_SCROLL] = "Scrolling\\Scrolling when the mouse touches right or left border"; + stringsEvent[EVENT_INTERFACE_INVERTX] = "Mouse inversion X\\Inversion of the scrolling direction on the X axis"; + stringsEvent[EVENT_INTERFACE_INVERTY] = "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis"; + stringsEvent[EVENT_INTERFACE_EFFECT] = "Quake at explosions\\The screen shakes at explosions"; + stringsEvent[EVENT_INTERFACE_MOUSE] = "Mouse shadow\\Gives the mouse a shadow"; + stringsEvent[EVENT_INTERFACE_EDITMODE] = "Automatic indent\\When program editing"; + stringsEvent[EVENT_INTERFACE_EDITVALUE] = "Big indent\\Indent 2 or 4 spaces per level defined by braces"; + stringsEvent[EVENT_INTERFACE_SOLUCE4] = "Access to solutions\\Show program \"4: Solution\" in the exercises"; + + stringsEvent[EVENT_INTERFACE_KDEF] = "Standard controls\\Standard key functions"; + stringsEvent[EVENT_INTERFACE_KLEFT] = "Turn left\\turns the bot to the left"; + stringsEvent[EVENT_INTERFACE_KRIGHT] = "Turn right\\turns the bot to the right"; + stringsEvent[EVENT_INTERFACE_KUP] = "Forward\\Moves forward"; + stringsEvent[EVENT_INTERFACE_KDOWN] = "Backward\\Moves backward"; + stringsEvent[EVENT_INTERFACE_KGUP] = "Climb\\Increases the power of the jet"; + stringsEvent[EVENT_INTERFACE_KGDOWN] = "Descend\\Reduces the power of the jet"; + stringsEvent[EVENT_INTERFACE_KCAMERA] = "Change camera\\Switches between onboard camera and following camera"; + stringsEvent[EVENT_INTERFACE_KDESEL] = "Previous object\\Selects the previous object"; + stringsEvent[EVENT_INTERFACE_KACTION] = "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)"; + stringsEvent[EVENT_INTERFACE_KNEAR] = "Camera closer\\Moves the camera forward"; + stringsEvent[EVENT_INTERFACE_KAWAY] = "Camera back\\Moves the camera backward"; + stringsEvent[EVENT_INTERFACE_KNEXT] = "Next object\\Selects the next object"; + stringsEvent[EVENT_INTERFACE_KHUMAN] = "Select the astronaut\\Selects the astronaut"; + stringsEvent[EVENT_INTERFACE_KQUIT] = "Quit\\Quit the current mission or exercise"; + stringsEvent[EVENT_INTERFACE_KHELP] = "Instructions\\Shows the instructions for the current mission"; + stringsEvent[EVENT_INTERFACE_KPROG] = "Programming help\\Gives more detailed help with programming"; + stringsEvent[EVENT_INTERFACE_KCBOT] = "Key word help\\More detailed help about key words"; + stringsEvent[EVENT_INTERFACE_KVISIT] = "Origin of last message\\Shows where the last message was sent from"; + stringsEvent[EVENT_INTERFACE_KSPEED10] = "Speed 1.0x\\Normal speed"; + stringsEvent[EVENT_INTERFACE_KSPEED15] = "Speed 1.5x\\1.5 times faster"; + stringsEvent[EVENT_INTERFACE_KSPEED20] = "Speed 2.0x\\Double speed"; + stringsEvent[EVENT_INTERFACE_KSPEED30] = "Speed 3.0x\\Three times faster"; + + stringsEvent[EVENT_INTERFACE_VOLSOUND] = "Sound effects:\\Volume of engines, voice, shooting, etc."; + stringsEvent[EVENT_INTERFACE_VOLMUSIC] = "Background sound :\\Volume of audio tracks on the CD"; + stringsEvent[EVENT_INTERFACE_SOUND3D] = "3D sound\\3D positioning of the sound"; + + stringsEvent[EVENT_INTERFACE_MIN] = "Lowest\\Minimum graphic quality (highest frame rate)"; + stringsEvent[EVENT_INTERFACE_NORM] = "Normal\\Normal graphic quality"; + stringsEvent[EVENT_INTERFACE_MAX] = "Highest\\Highest graphic quality (lowest frame rate)"; + + stringsEvent[EVENT_INTERFACE_SILENT] = "Mute\\No sound"; + stringsEvent[EVENT_INTERFACE_NOISY] = "Normal\\Normal sound volume"; + + stringsEvent[EVENT_INTERFACE_JOYSTICK] = "Use a joystick\\Joystick or keyboard"; + stringsEvent[EVENT_INTERFACE_SOLUCE] = "Access to solution\\Shows the solution (detailed instructions for missions)"; + + stringsEvent[EVENT_INTERFACE_NEDIT] = "\\New player name"; + stringsEvent[EVENT_INTERFACE_NOK] = "OK\\Choose the selected player"; + stringsEvent[EVENT_INTERFACE_NCANCEL] = "Cancel\\Keep current player name"; + stringsEvent[EVENT_INTERFACE_NDELETE] = "Delete player\\Deletes the player from the list"; + stringsEvent[EVENT_INTERFACE_NLABEL] = "Player name"; + + stringsEvent[EVENT_INTERFACE_IOWRITE] = "Save\\Saves the current mission"; + stringsEvent[EVENT_INTERFACE_IOREAD] = "Load\\Loads the selected mission"; + stringsEvent[EVENT_INTERFACE_IOLIST] = "List of saved missions"; + stringsEvent[EVENT_INTERFACE_IOLABEL] = "Filename:"; + stringsEvent[EVENT_INTERFACE_IONAME] = "Mission name"; + stringsEvent[EVENT_INTERFACE_IOIMAGE] = "Photography"; + stringsEvent[EVENT_INTERFACE_IODELETE] = "Delete\\Deletes the selected file"; + + stringsEvent[EVENT_INTERFACE_PERSO] = "Appearance\\Choose your appearance"; + stringsEvent[EVENT_INTERFACE_POK] = "OK"; + stringsEvent[EVENT_INTERFACE_PCANCEL] = "Cancel"; + stringsEvent[EVENT_INTERFACE_PDEF] = "Standard\\Standard appearance settings"; + stringsEvent[EVENT_INTERFACE_PHEAD] = "Head\\Face and hair"; + stringsEvent[EVENT_INTERFACE_PBODY] = "Suit\\Astronaut suit"; + stringsEvent[EVENT_INTERFACE_PLROT] = "\\Turn left"; + stringsEvent[EVENT_INTERFACE_PRROT] = "\\Turn right"; + stringsEvent[EVENT_INTERFACE_PCRa] = "Red"; + stringsEvent[EVENT_INTERFACE_PCGa] = "Green"; + stringsEvent[EVENT_INTERFACE_PCBa] = "Blue"; + stringsEvent[EVENT_INTERFACE_PCRb] = "Red"; + stringsEvent[EVENT_INTERFACE_PCGb] = "Green"; + stringsEvent[EVENT_INTERFACE_PCBb] = "Blue"; + stringsEvent[EVENT_INTERFACE_PFACE1] = "\\Face 1"; + stringsEvent[EVENT_INTERFACE_PFACE2] = "\\Face 4"; + stringsEvent[EVENT_INTERFACE_PFACE3] = "\\Face 3"; + stringsEvent[EVENT_INTERFACE_PFACE4] = "\\Face 2"; + stringsEvent[EVENT_INTERFACE_PGLASS0] = "\\No eyeglasses"; + stringsEvent[EVENT_INTERFACE_PGLASS1] = "\\Eyeglasses 1"; + stringsEvent[EVENT_INTERFACE_PGLASS2] = "\\Eyeglasses 2"; + stringsEvent[EVENT_INTERFACE_PGLASS3] = "\\Eyeglasses 3"; + stringsEvent[EVENT_INTERFACE_PGLASS4] = "\\Eyeglasses 4"; + stringsEvent[EVENT_INTERFACE_PGLASS5] = "\\Eyeglasses 5"; + + stringsEvent[EVENT_OBJECT_DESELECT] = "Previous selection (\\key desel;)"; + stringsEvent[EVENT_OBJECT_LEFT] = "Turn left (\\key left;)"; + stringsEvent[EVENT_OBJECT_RIGHT] = "Turn right (\\key right;)"; + stringsEvent[EVENT_OBJECT_UP] = "Forward (\\key up;)"; + stringsEvent[EVENT_OBJECT_DOWN] = "Backward (\\key down;)"; + stringsEvent[EVENT_OBJECT_GASUP] = "Up (\\key gup;)"; + stringsEvent[EVENT_OBJECT_GASDOWN] = "Down (\\key gdown;)"; + stringsEvent[EVENT_OBJECT_HTAKE] = "Grab or drop (\\key action;)"; + stringsEvent[EVENT_OBJECT_MTAKE] = "Grab or drop (\\key action;)"; + stringsEvent[EVENT_OBJECT_MFRONT] = "..in front"; + stringsEvent[EVENT_OBJECT_MBACK] = "..behind"; + stringsEvent[EVENT_OBJECT_MPOWER] = "..power cell"; + stringsEvent[EVENT_OBJECT_BHELP] = "Instructions for the mission (\\key help;)"; + stringsEvent[EVENT_OBJECT_BTAKEOFF] = "Take off to finish the mission"; + stringsEvent[EVENT_OBJECT_BDERRICK] = "Build a derrick"; + stringsEvent[EVENT_OBJECT_BSTATION] = "Build a power station"; + stringsEvent[EVENT_OBJECT_BFACTORY] = "Build a bot factory"; + stringsEvent[EVENT_OBJECT_BREPAIR] = "Build a repair center"; + stringsEvent[EVENT_OBJECT_BCONVERT] = "Build a converter"; + stringsEvent[EVENT_OBJECT_BTOWER] = "Build a defense tower"; + stringsEvent[EVENT_OBJECT_BRESEARCH] = "Build a research center"; + stringsEvent[EVENT_OBJECT_BRADAR] = "Build a radar station"; + stringsEvent[EVENT_OBJECT_BENERGY] = "Build a power cell factory"; + stringsEvent[EVENT_OBJECT_BLABO] = "Build an autolab"; + stringsEvent[EVENT_OBJECT_BNUCLEAR] = "Build a nuclear power plant"; + stringsEvent[EVENT_OBJECT_BPARA] = "Build a lightning conductor"; + stringsEvent[EVENT_OBJECT_BINFO] = "Build a exchange post"; + stringsEvent[EVENT_OBJECT_GFLAT] = "Show if the ground is flat"; + stringsEvent[EVENT_OBJECT_FCREATE] = "Plant a flag"; + stringsEvent[EVENT_OBJECT_FDELETE] = "Remove a flag"; + stringsEvent[EVENT_OBJECT_FCOLORb] = "\\Blue flags"; + stringsEvent[EVENT_OBJECT_FCOLORr] = "\\Red flags"; + stringsEvent[EVENT_OBJECT_FCOLORg] = "\\Green flags"; + stringsEvent[EVENT_OBJECT_FCOLORy] = "\\Yellow flags"; + stringsEvent[EVENT_OBJECT_FCOLORv] = "\\Violet flags"; + stringsEvent[EVENT_OBJECT_FACTORYfa] = "Build a winged grabber"; + stringsEvent[EVENT_OBJECT_FACTORYta] = "Build a tracked grabber"; + stringsEvent[EVENT_OBJECT_FACTORYwa] = "Build a wheeled grabber"; + stringsEvent[EVENT_OBJECT_FACTORYia] = "Build a legged grabber"; + stringsEvent[EVENT_OBJECT_FACTORYfc] = "Build a winged shooter"; + stringsEvent[EVENT_OBJECT_FACTORYtc] = "Build a tracked shooter"; + stringsEvent[EVENT_OBJECT_FACTORYwc] = "Build a wheeled shooter"; + stringsEvent[EVENT_OBJECT_FACTORYic] = "Build a legged shooter"; + stringsEvent[EVENT_OBJECT_FACTORYfi] = "Build a winged orga shooter"; + stringsEvent[EVENT_OBJECT_FACTORYti] = "Build a tracked orga shooter"; + stringsEvent[EVENT_OBJECT_FACTORYwi] = "Build a wheeled orga shooter"; + stringsEvent[EVENT_OBJECT_FACTORYii] = "Build a legged orga shooter"; + stringsEvent[EVENT_OBJECT_FACTORYfs] = "Build a winged sniffer"; + stringsEvent[EVENT_OBJECT_FACTORYts] = "Build a tracked sniffer"; + stringsEvent[EVENT_OBJECT_FACTORYws] = "Build a wheeled sniffer"; + stringsEvent[EVENT_OBJECT_FACTORYis] = "Build a legged sniffer"; + stringsEvent[EVENT_OBJECT_FACTORYrt] = "Build a thumper"; + stringsEvent[EVENT_OBJECT_FACTORYrc] = "Build a phazer shooter"; + stringsEvent[EVENT_OBJECT_FACTORYrr] = "Build a recycler"; + stringsEvent[EVENT_OBJECT_FACTORYrs] = "Build a shielder"; + stringsEvent[EVENT_OBJECT_FACTORYsa] = "Build a subber"; + stringsEvent[EVENT_OBJECT_RTANK] = "Run research program for tracked bots"; + stringsEvent[EVENT_OBJECT_RFLY] = "Run research program for winged bots"; + stringsEvent[EVENT_OBJECT_RTHUMP] = "Run research program for thumper"; + stringsEvent[EVENT_OBJECT_RCANON] = "Run research program for shooter"; + stringsEvent[EVENT_OBJECT_RTOWER] = "Run research program for defense tower"; + stringsEvent[EVENT_OBJECT_RPHAZER] = "Run research program for phazer shooter"; + stringsEvent[EVENT_OBJECT_RSHIELD] = "Run research program for shielder"; + stringsEvent[EVENT_OBJECT_RATOMIC] = "Run research program for nuclear power"; + stringsEvent[EVENT_OBJECT_RiPAW] = "Run research program for legged bots"; + stringsEvent[EVENT_OBJECT_RiGUN] = "Run research program for orga shooter"; + stringsEvent[EVENT_OBJECT_RESET] = "Return to start"; + stringsEvent[EVENT_OBJECT_SEARCH] = "Sniff (\\key action;)"; + stringsEvent[EVENT_OBJECT_TERRAFORM] = "Thump (\\key action;)"; + stringsEvent[EVENT_OBJECT_FIRE] = "Shoot (\\key action;)"; + stringsEvent[EVENT_OBJECT_RECOVER] = "Recycle (\\key action;)"; + stringsEvent[EVENT_OBJECT_BEGSHIELD] = "Extend shield (\\key action;)"; + stringsEvent[EVENT_OBJECT_ENDSHIELD] = "Withdraw shield (\\key action;)"; + stringsEvent[EVENT_OBJECT_DIMSHIELD] = "Shield radius"; + stringsEvent[EVENT_OBJECT_PROGRUN] = "Execute the selected program"; + stringsEvent[EVENT_OBJECT_PROGEDIT] = "Edit the selected program"; + stringsEvent[EVENT_OBJECT_INFOOK] = "\\SatCom on standby"; + stringsEvent[EVENT_OBJECT_DELETE] = "Destroy the building"; + stringsEvent[EVENT_OBJECT_GENERGY] = "Energy level"; + stringsEvent[EVENT_OBJECT_GSHIELD] = "Shield level"; + stringsEvent[EVENT_OBJECT_GRANGE] = "Jet temperature"; + stringsEvent[EVENT_OBJECT_GPROGRESS] = "Still working ..."; + stringsEvent[EVENT_OBJECT_GRADAR] = "Number of insects detected"; + stringsEvent[EVENT_OBJECT_GINFO] = "Transmitted information"; + stringsEvent[EVENT_OBJECT_COMPASS] = "Compass"; + stringsEvent[EVENT_OBJECT_MAPZOOM] = "Zoom mini-map"; + stringsEvent[EVENT_OBJECT_CAMERA] = "Camera (\\key camera;)"; + stringsEvent[EVENT_OBJECT_CAMERAleft] = "Camera to left"; + stringsEvent[EVENT_OBJECT_CAMERAright] = "Camera to right"; + stringsEvent[EVENT_OBJECT_CAMERAnear] = "Camera nearest"; + stringsEvent[EVENT_OBJECT_CAMERAaway] = "Camera awayest"; + stringsEvent[EVENT_OBJECT_HELP] = "Help about selected object"; + stringsEvent[EVENT_OBJECT_SOLUCE] = "Show the solution"; + stringsEvent[EVENT_OBJECT_SHORTCUT00] = "Switch bots <-> buildings"; + stringsEvent[EVENT_OBJECT_LIMIT] = "Show the range"; + stringsEvent[EVENT_OBJECT_PEN0] = "\\Raise the pencil"; + stringsEvent[EVENT_OBJECT_PEN1] = "\\Use the black pencil"; + stringsEvent[EVENT_OBJECT_PEN2] = "\\Use the yellow pencil"; + stringsEvent[EVENT_OBJECT_PEN3] = "\\Use the orange pencil"; + stringsEvent[EVENT_OBJECT_PEN4] = "\\Use the red pencil"; + stringsEvent[EVENT_OBJECT_PEN5] = "\\Use the purple pencil"; + stringsEvent[EVENT_OBJECT_PEN6] = "\\Use the blue pencil"; + stringsEvent[EVENT_OBJECT_PEN7] = "\\Use the green pencil"; + stringsEvent[EVENT_OBJECT_PEN8] = "\\Use the brown pencil"; + stringsEvent[EVENT_OBJECT_REC] = "\\Start recording"; + stringsEvent[EVENT_OBJECT_STOP] = "\\Stop recording"; + stringsEvent[EVENT_DT_VISIT0] = "Show the place"; + stringsEvent[EVENT_DT_VISIT1] = "Show the place"; + stringsEvent[EVENT_DT_VISIT2] = "Show the place"; + stringsEvent[EVENT_DT_VISIT3] = "Show the place"; + stringsEvent[EVENT_DT_VISIT4] = "Show the place"; + stringsEvent[EVENT_DT_END] = "Continue"; + stringsEvent[EVENT_CMD] = "Command line"; + stringsEvent[EVENT_SPEED] = "Game speed"; + + stringsEvent[EVENT_HYPER_PREV] = "Back"; + stringsEvent[EVENT_HYPER_NEXT] = "Forward"; + stringsEvent[EVENT_HYPER_HOME] = "Home"; + stringsEvent[EVENT_HYPER_COPY] = "Copy"; + stringsEvent[EVENT_HYPER_SIZE1] = "Size 1"; + stringsEvent[EVENT_HYPER_SIZE2] = "Size 2"; + stringsEvent[EVENT_HYPER_SIZE3] = "Size 3"; + stringsEvent[EVENT_HYPER_SIZE4] = "Size 4"; + stringsEvent[EVENT_HYPER_SIZE5] = "Size 5"; + stringsEvent[EVENT_SATCOM_HUSTON] = "Instructions from Houston"; + stringsEvent[EVENT_SATCOM_SAT] = "Satellite report"; + stringsEvent[EVENT_SATCOM_LOADING] = "Programs dispatched by Houston"; + stringsEvent[EVENT_SATCOM_OBJECT] = "List of objects"; + stringsEvent[EVENT_SATCOM_PROG] = "Programming help"; + stringsEvent[EVENT_SATCOM_SOLUCE] = "Solution"; + + stringsEvent[EVENT_STUDIO_OK] = "OK\\Close program editor and return to game"; + stringsEvent[EVENT_STUDIO_CANCEL] = "Cancel\\Cancel all changes"; + stringsEvent[EVENT_STUDIO_NEW] = "New"; + stringsEvent[EVENT_STUDIO_OPEN] = "Open (Ctrl+o)"; + stringsEvent[EVENT_STUDIO_SAVE] = "Save (Ctrl+s)"; + stringsEvent[EVENT_STUDIO_UNDO] = "Undo (Ctrl+z)"; + stringsEvent[EVENT_STUDIO_CUT] = "Cut (Ctrl+x)"; + stringsEvent[EVENT_STUDIO_COPY] = "Copy (Ctrl+c)"; + stringsEvent[EVENT_STUDIO_PASTE] = "Paste (Ctrl+v)"; + stringsEvent[EVENT_STUDIO_SIZE] = "Font size"; + stringsEvent[EVENT_STUDIO_TOOL] = "Instructions (\\key help;)"; + stringsEvent[EVENT_STUDIO_HELP] = "Programming help (\\key prog;)"; + stringsEvent[EVENT_STUDIO_COMPILE] = "Compile"; + stringsEvent[EVENT_STUDIO_RUN] = "Execute/stop"; + stringsEvent[EVENT_STUDIO_REALTIME] = "Pause/continue"; + stringsEvent[EVENT_STUDIO_STEP] = "One step"; + + + + stringsObject[OBJECT_PORTICO] = "Gantry crane"; + stringsObject[OBJECT_BASE] = "Spaceship"; + stringsObject[OBJECT_DERRICK] = "Derrick"; + stringsObject[OBJECT_FACTORY] = "Bot factory"; + stringsObject[OBJECT_REPAIR] = "Repair center"; + stringsObject[OBJECT_DESTROYER] = "Destroyer"; + stringsObject[OBJECT_STATION] = "Power station"; + stringsObject[OBJECT_CONVERT] = "Converts ore to titanium"; + stringsObject[OBJECT_TOWER] = "Defense tower"; + stringsObject[OBJECT_NEST] = "Nest"; + stringsObject[OBJECT_RESEARCH] = "Research center"; + stringsObject[OBJECT_RADAR] = "Radar station"; + stringsObject[OBJECT_INFO] = "Information exchange post"; + stringsObject[OBJECT_ENERGY] = "Power cell factory"; + stringsObject[OBJECT_LABO] = "Autolab"; + stringsObject[OBJECT_NUCLEAR] = "Nuclear power station"; + stringsObject[OBJECT_PARA] = "Lightning conductor"; + stringsObject[OBJECT_SAFE] = "Vault"; + stringsObject[OBJECT_HUSTON] = "Houston Mission Control"; + stringsObject[OBJECT_TARGET1] = "Target"; + stringsObject[OBJECT_TARGET2] = "Target"; + stringsObject[OBJECT_START] = "Start"; + stringsObject[OBJECT_END] = "Finish"; + stringsObject[OBJECT_STONE] = "Titanium ore"; + stringsObject[OBJECT_URANIUM] = "Uranium ore"; + stringsObject[OBJECT_BULLET] = "Organic matter"; + stringsObject[OBJECT_METAL] = "Titanium"; + stringsObject[OBJECT_POWER] = "Power cell"; + stringsObject[OBJECT_ATOMIC] = "Nuclear power cell"; + stringsObject[OBJECT_BBOX] = "Black box"; + stringsObject[OBJECT_KEYa] = "Key A"; + stringsObject[OBJECT_KEYb] = "Key B"; + stringsObject[OBJECT_KEYc] = "Key C"; + stringsObject[OBJECT_KEYd] = "Key D"; + stringsObject[OBJECT_TNT] = "Explosive"; + stringsObject[OBJECT_BOMB] = "Fixed mine"; + stringsObject[OBJECT_BAG] = "Survival kit"; + stringsObject[OBJECT_WAYPOINT] = "Checkpoint"; + stringsObject[OBJECT_FLAGb] = "Blue flag"; + stringsObject[OBJECT_FLAGr] = "Red flag"; + stringsObject[OBJECT_FLAGg] = "Green flag"; + stringsObject[OBJECT_FLAGy] = "Yellow flag"; + stringsObject[OBJECT_FLAGv] = "Violet flag"; + stringsObject[OBJECT_MARKPOWER] = "Energy deposit (site for power station)"; + stringsObject[OBJECT_MARKURANIUM] = "Uranium deposit (site for derrick)"; + stringsObject[OBJECT_MARKKEYa] = "Found key A (site for derrick)"; + stringsObject[OBJECT_MARKKEYb] = "Found key B (site for derrick)"; + stringsObject[OBJECT_MARKKEYc] = "Found key C (site for derrick)"; + stringsObject[OBJECT_MARKKEYd] = "Found key D (site for derrick)"; + stringsObject[OBJECT_MARKSTONE] = "Titanium deposit (site for derrick)"; + stringsObject[OBJECT_MOBILEft] = "Practice bot"; + stringsObject[OBJECT_MOBILEtt] = "Practice bot"; + stringsObject[OBJECT_MOBILEwt] = "Practice bot"; + stringsObject[OBJECT_MOBILEit] = "Practice bot"; + stringsObject[OBJECT_MOBILEfa] = "Winged grabber"; + stringsObject[OBJECT_MOBILEta] = "Tracked grabber"; + stringsObject[OBJECT_MOBILEwa] = "Wheeled grabber"; + stringsObject[OBJECT_MOBILEia] = "Legged grabber"; + stringsObject[OBJECT_MOBILEfc] = "Winged shooter"; + stringsObject[OBJECT_MOBILEtc] = "Tracked shooter"; + stringsObject[OBJECT_MOBILEwc] = "Wheeled shooter"; + stringsObject[OBJECT_MOBILEic] = "Legged shooter"; + stringsObject[OBJECT_MOBILEfi] = "Winged orga shooter"; + stringsObject[OBJECT_MOBILEti] = "Tracked orga shooter"; + stringsObject[OBJECT_MOBILEwi] = "Wheeled orga shooter"; + stringsObject[OBJECT_MOBILEii] = "Legged orga shooter"; + stringsObject[OBJECT_MOBILEfs] = "Winged sniffer"; + stringsObject[OBJECT_MOBILEts] = "Tracked sniffer"; + stringsObject[OBJECT_MOBILEws] = "Wheeled sniffer"; + stringsObject[OBJECT_MOBILEis] = "Legged sniffer"; + stringsObject[OBJECT_MOBILErt] = "Thumper"; + stringsObject[OBJECT_MOBILErc] = "Phazer shooter"; + stringsObject[OBJECT_MOBILErr] = "Recycler"; + stringsObject[OBJECT_MOBILErs] = "Shielder"; + stringsObject[OBJECT_MOBILEsa] = "Subber"; + stringsObject[OBJECT_MOBILEtg] = "Target bot"; + stringsObject[OBJECT_MOBILEdr] = "Drawer bot"; + stringsObject[OBJECT_TECH] = "Engineer"; + stringsObject[OBJECT_TOTO] = "Robbie"; + stringsObject[OBJECT_MOTHER] = "Alien Queen"; + stringsObject[OBJECT_ANT] = "Ant"; + stringsObject[OBJECT_SPIDER] = "Spider"; + stringsObject[OBJECT_BEE] = "Wasp"; + stringsObject[OBJECT_WORM] = "Worm"; + stringsObject[OBJECT_EGG] = "Egg"; + stringsObject[OBJECT_RUINmobilew1] = "Wreckage"; + stringsObject[OBJECT_RUINmobilew2] = "Wreckage"; + stringsObject[OBJECT_RUINmobilet1] = "Wreckage"; + stringsObject[OBJECT_RUINmobilet2] = "Wreckage"; + stringsObject[OBJECT_RUINmobiler1] = "Wreckage"; + stringsObject[OBJECT_RUINmobiler2] = "Wreckage"; + stringsObject[OBJECT_RUINfactory] = "Ruin"; + stringsObject[OBJECT_RUINdoor] = "Ruin"; + stringsObject[OBJECT_RUINsupport] = "Waste"; + stringsObject[OBJECT_RUINradar] = "Ruin"; + stringsObject[OBJECT_RUINconvert] = "Ruin"; + stringsObject[OBJECT_RUINbase] = "Spaceship ruin"; + stringsObject[OBJECT_RUINhead] = "Spaceship ruin"; + stringsObject[OBJECT_APOLLO1] = "Remains of Apollo mission"; + stringsObject[OBJECT_APOLLO3] = "Remains of Apollo mission"; + stringsObject[OBJECT_APOLLO4] = "Remains of Apollo mission"; + stringsObject[OBJECT_APOLLO5] = "Remains of Apollo mission"; + stringsObject[OBJECT_APOLLO2] = "Lunar Roving Vehicle"; + + + + stringsErr[ERR_CMD] = "Unknown command"; + stringsErr[ERR_MANIP_VEH] = "Inappropriate bot"; + stringsErr[ERR_MANIP_FLY] = "Impossible when flying"; + stringsErr[ERR_MANIP_BUSY] = "Already carrying something"; + stringsErr[ERR_MANIP_NIL] = "Nothing to grab"; + stringsErr[ERR_MANIP_MOTOR] = "Impossible when moving"; + stringsErr[ERR_MANIP_OCC] = "Place occupied"; + stringsErr[ERR_MANIP_FRIEND] = "No other robot"; + stringsErr[ERR_MANIP_RADIO] = "You can not carry a radioactive object"; + stringsErr[ERR_MANIP_WATER] = "You can not carry an object under water"; + stringsErr[ERR_MANIP_EMPTY] = "Nothing to drop"; + stringsErr[ERR_BUILD_FLY] = "Impossible when flying"; + stringsErr[ERR_BUILD_WATER] = "Impossible under water"; + stringsErr[ERR_BUILD_ENERGY] = "Not enough energy"; + stringsErr[ERR_BUILD_METALAWAY] = "Titanium too far away"; + stringsErr[ERR_BUILD_METALNEAR] = "Titanium too close"; + stringsErr[ERR_BUILD_METALINEX] = "No titanium around"; + stringsErr[ERR_BUILD_FLAT] = "Ground not flat enough"; + stringsErr[ERR_BUILD_FLATLIT] = "Flat ground not large enough"; + stringsErr[ERR_BUILD_BUSY] = "Place occupied"; + stringsErr[ERR_BUILD_BASE] = "Too close to space ship"; + stringsErr[ERR_BUILD_NARROW] = "Too close to a building"; + stringsErr[ERR_BUILD_MOTOR] = "Impossible when moving"; + stringsErr[ERR_SEARCH_FLY] = "Impossible when flying"; + stringsErr[ERR_SEARCH_VEH] = "Inappropriate bot"; + stringsErr[ERR_SEARCH_MOTOR] = "Impossible when moving"; + stringsErr[ERR_TERRA_VEH] = "Inappropriate bot"; + stringsErr[ERR_TERRA_ENERGY] = "Not enough energy"; + stringsErr[ERR_TERRA_FLOOR] = "Ground inappropriate"; + stringsErr[ERR_TERRA_BUILDING] = "Building too close"; + stringsErr[ERR_TERRA_OBJECT] = "Object too close"; + stringsErr[ERR_RECOVER_VEH] = "Inappropriate bot"; + stringsErr[ERR_RECOVER_ENERGY] = "Not enough energy"; + stringsErr[ERR_RECOVER_NULL] = "Nothing to recycle"; + stringsErr[ERR_SHIELD_VEH] = "Inappropriate bot"; + stringsErr[ERR_SHIELD_ENERGY] = "No more energy"; + stringsErr[ERR_MOVE_IMPOSSIBLE] = "Error in instruction move"; + stringsErr[ERR_FIND_IMPOSSIBLE] = "Object not found"; + stringsErr[ERR_GOTO_IMPOSSIBLE] = "Goto: inaccessible destination"; + stringsErr[ERR_GOTO_ITER] = "Goto: inaccessible destination"; + stringsErr[ERR_GOTO_BUSY] = "Goto: destination occupied"; + stringsErr[ERR_FIRE_VEH] = "Inappropriate bot"; + stringsErr[ERR_FIRE_ENERGY] = "Not enough energy"; + stringsErr[ERR_FIRE_FLY] = "Impossible when flying"; + stringsErr[ERR_CONVERT_EMPTY] = "No titanium ore to convert"; + stringsErr[ERR_DERRICK_NULL] = "No ore in the subsoil"; + stringsErr[ERR_STATION_NULL] = "No energy in the subsoil"; + stringsErr[ERR_TOWER_POWER] = "No power cell"; + stringsErr[ERR_TOWER_ENERGY] = "No more energy"; + stringsErr[ERR_RESEARCH_POWER] = "No power cell"; + stringsErr[ERR_RESEARCH_ENERGY] = "Not enough energy"; + stringsErr[ERR_RESEARCH_TYPE] = "Inappropriate cell type"; + stringsErr[ERR_RESEARCH_ALREADY]= "Research program already performed"; + stringsErr[ERR_ENERGY_NULL] = "No energy in the subsoil"; + stringsErr[ERR_ENERGY_LOW] = "Not enough energy yet"; + stringsErr[ERR_ENERGY_EMPTY] = "No titanium to transform"; + stringsErr[ERR_ENERGY_BAD] = "Transforms only titanium"; + stringsErr[ERR_BASE_DLOCK] = "Doors blocked by a robot or another object "; + stringsErr[ERR_BASE_DHUMAN] = "You must get on the spaceship to take off "; + stringsErr[ERR_LABO_NULL] = "Nothing to analyze"; + stringsErr[ERR_LABO_BAD] = "Analyzes only organic matter"; + stringsErr[ERR_LABO_ALREADY] = "Analysis already performed"; + stringsErr[ERR_NUCLEAR_NULL] = "No energy in the subsoil"; + stringsErr[ERR_NUCLEAR_LOW] = "Not yet enough energy"; + stringsErr[ERR_NUCLEAR_EMPTY] = "No uranium to transform"; + stringsErr[ERR_NUCLEAR_BAD] = "Transforms only uranium"; + stringsErr[ERR_FACTORY_NULL] = "No titanium"; + stringsErr[ERR_FACTORY_NEAR] = "Object too close"; + stringsErr[ERR_RESET_NEAR] = "Place occupied"; + stringsErr[ERR_INFO_NULL] = "No information exchange post within range"; + stringsErr[ERR_VEH_VIRUS] = "Program infected by a virus"; + stringsErr[ERR_BAT_VIRUS] = "Infected by a virus; temporarily out of order"; + stringsErr[ERR_VEH_POWER] = "No power cell"; + stringsErr[ERR_VEH_ENERGY] = "No more energy"; + stringsErr[ERR_FLAG_FLY] = "Impossible when flying"; + stringsErr[ERR_FLAG_WATER] = "Impossible when swimming"; + stringsErr[ERR_FLAG_MOTOR] = "Impossible when moving"; + stringsErr[ERR_FLAG_BUSY] = "Impossible when carrying an object"; + stringsErr[ERR_FLAG_CREATE] = "Too many flags of this color (maximum 5)"; + stringsErr[ERR_FLAG_PROXY] = "Too close to an existing flag"; + stringsErr[ERR_FLAG_DELETE] = "No flag nearby"; + stringsErr[ERR_MISSION_NOTERM] = "The mission is not accomplished yet (press \\key help; for more details)"; + stringsErr[ERR_DELETEMOBILE] = "Bot destroyed"; + stringsErr[ERR_DELETEBUILDING] = "Building destroyed"; + stringsErr[ERR_TOOMANY] = "Can not create this; there are too many objects"; + stringsErr[ERR_OBLIGATORYTOKEN] = "\"%s\" missing in this exercise"; + stringsErr[ERR_PROHIBITEDTOKEN] = "Do not use in this exercise"; + + stringsErr[INFO_BUILD] = "Building completed"; + stringsErr[INFO_CONVERT] = "Titanium available"; + stringsErr[INFO_RESEARCH] = "Research program completed"; + stringsErr[INFO_RESEARCHTANK] = "Plans for tracked robots available "; + stringsErr[INFO_RESEARCHFLY] = "You can fly with the keys (\\key gup;) and (\\key gdown;)"; + stringsErr[INFO_RESEARCHTHUMP] = "Plans for thumper available"; + stringsErr[INFO_RESEARCHCANON] = "Plans for shooter available"; + stringsErr[INFO_RESEARCHTOWER] = "Plans for defense tower available"; + stringsErr[INFO_RESEARCHPHAZER] = "Plans for phazer shooter available"; + stringsErr[INFO_RESEARCHSHIELD] = "Plans for shielder available"; + stringsErr[INFO_RESEARCHATOMIC] = "Plans for nuclear power plant available"; + stringsErr[INFO_FACTORY] = "New bot available"; + stringsErr[INFO_LABO] = "Analysis performed"; + stringsErr[INFO_ENERGY] = "Power cell available"; + stringsErr[INFO_NUCLEAR] = "Nuclear power cell available"; + stringsErr[INFO_FINDING] = "You found a usable object"; + stringsErr[INFO_MARKPOWER] = "Found a site for power station"; + stringsErr[INFO_MARKURANIUM] = "Found a site for a derrick"; + stringsErr[INFO_MARKSTONE] = "Found a site for a derrick"; + stringsErr[INFO_MARKKEYa] = "Found a site for a derrick"; + stringsErr[INFO_MARKKEYb] = "Found a site for a derrick"; + stringsErr[INFO_MARKKEYc] = "Found a site for a derrick"; + stringsErr[INFO_MARKKEYd] = "Found a site for a derrick"; + stringsErr[INFO_WIN] = "<<< Well done; mission accomplished >>>"; + stringsErr[INFO_LOST] = "<<< Sorry; mission failed >>>"; + stringsErr[INFO_LOSTq] = "<<< Sorry; mission failed >>>"; + stringsErr[INFO_WRITEOK] = "Current mission saved"; + stringsErr[INFO_DELETEPATH] = "Checkpoint crossed"; + stringsErr[INFO_DELETEMOTHER] = "Alien Queen killed"; + stringsErr[INFO_DELETEANT] = "Ant fatally wounded"; + stringsErr[INFO_DELETEBEE] = "Wasp fatally wounded"; + stringsErr[INFO_DELETEWORM] = "Worm fatally wounded"; + stringsErr[INFO_DELETESPIDER] = "Spider fatally wounded"; + stringsErr[INFO_BEGINSATCOM] = "Press \\key help; to read instructions on your SatCom"; + + + + stringsCbot[TX_OPENPAR] = "Opening bracket missing"; + stringsCbot[TX_CLOSEPAR] = "Closing bracket missing "; + stringsCbot[TX_NOTBOOL] = "The expression must return a boolean value"; + stringsCbot[TX_UNDEFVAR] = "Variable not declared"; + stringsCbot[TX_BADLEFT] = "Assignment impossible"; + stringsCbot[TX_ENDOF] = "Semicolon terminator missing"; + stringsCbot[TX_OUTCASE] = "Instruction \"case\" outside a block \"switch\""; + stringsCbot[TX_NOTERM] = "Instructions after the final closing brace"; + stringsCbot[TX_CLOSEBLK] = "End of block missing"; + stringsCbot[TX_ELSEWITHOUTIF] = "Instruction \"else\" without corresponding \"if\" "; + stringsCbot[TX_OPENBLK] = "Opening brace missing "; + stringsCbot[TX_BADTYPE] = "Wrong type for the assignment"; + stringsCbot[TX_REDEFVAR] = "A variable can not be declared twice"; + stringsCbot[TX_BAD2TYPE] = "The types of the two operands are incompatible "; + stringsCbot[TX_UNDEFCALL] = "Unknown function"; + stringsCbot[TX_MISDOTS] = "Sign \" : \" missing"; + stringsCbot[TX_WHILE] = "Keyword \"while\" missing"; + stringsCbot[TX_BREAK] = "Instruction \"break\" outside a loop"; + stringsCbot[TX_LABEL] = "A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\""; + stringsCbot[TX_NOLABEL] = "This label does not exist"; + stringsCbot[TX_NOCASE] = "Instruction \"case\" missing"; + stringsCbot[TX_BADNUM] = "Number missing"; + stringsCbot[TX_VOID] = "Void parameter"; + stringsCbot[TX_NOTYP] = "Type declaration missing"; + stringsCbot[TX_NOVAR] = "Variable name missing"; + stringsCbot[TX_NOFONC] = "Function name missing"; + stringsCbot[TX_OVERPARAM] = "Too many parameters"; + stringsCbot[TX_REDEF] = "Function already exists"; + stringsCbot[TX_LOWPARAM] = "Parameters missing "; + stringsCbot[TX_BADPARAM] = "No function with this name accepts this kind of parameter"; + stringsCbot[TX_NUMPARAM] = "No function with this name accepts this number of parameters"; + stringsCbot[TX_NOITEM] = "This is not a member of this class"; + stringsCbot[TX_DOT] = "This object is not a member of a class"; + stringsCbot[TX_NOCONST] = "Appropriate constructor missing"; + stringsCbot[TX_REDEFCLASS] = "This class already exists"; + stringsCbot[TX_CLBRK] = "\" ] \" missing"; + stringsCbot[TX_RESERVED] = "Reserved keyword of CBOT language"; + stringsCbot[TX_BADNEW] = "Bad argument for \"new\""; + stringsCbot[TX_OPBRK] = "\" [ \" expected"; + stringsCbot[TX_BADSTRING] = "String missing"; + stringsCbot[TX_BADINDEX] = "Incorrect index type"; + stringsCbot[TX_PRIVATE] = "Private element"; + stringsCbot[TX_NOPUBLIC] = "Public required"; + stringsCbot[TX_DIVZERO] = "Dividing by zero"; + stringsCbot[TX_NOTINIT] = "Variable not initialized"; + stringsCbot[TX_BADTHROW] = "Negative value rejected by \"throw\""; + stringsCbot[TX_NORETVAL] = "The function returned no value "; + stringsCbot[TX_NORUN] = "No function running"; + stringsCbot[TX_NOCALL] = "Calling an unknown function"; + stringsCbot[TX_NOCLASS] = "This class does not exist"; + stringsCbot[TX_NULLPT] = "Unknown Object"; + stringsCbot[TX_OPNAN] = "Operation impossible with value \"nan\""; + stringsCbot[TX_OUTARRAY] = "Access beyond array limit"; + stringsCbot[TX_STACKOVER] = "Stack overflow"; + stringsCbot[TX_DELETEDPT] = "Illegal object"; + stringsCbot[TX_FILEOPEN] = "Can't open file"; + stringsCbot[TX_NOTOPEN] = "File not open"; + stringsCbot[TX_ERRREAD] = "Read error"; + stringsCbot[TX_ERRWRITE] = "Write error"; +} + + static char g_gamerName[100]; @@ -36,7 +731,6 @@ void SetGlobalGamerName(char *name) } - struct KeyDesc { InputSlot key; @@ -105,7 +799,7 @@ static void PutKeyName(char* dst, const char* src) { if ( SearchKey(src+s+5, key) ) { - res = CRobotMain::GetInstancePointer()->GetInputBinding(key).key; + res = CRobotMain::GetInstancePointer()->GetInputBinding(key).primary; if (res != KEY_INVALID) { if ( GetResource(RES_KEY, res, name) ) @@ -138,41 +832,42 @@ static const char* GetResourceBase(ResType type, int num) switch (type) { case RES_TEXT: - assert(num < strings_text_len); - str = strings_text[num]; + assert(num < RT_MAX); + str = stringsText[num]; break; - case RES_EVENT: - // assert(num < strings_event_len); - if (num >= strings_event_len) + case RES_EVENT: + if (num >= EVENT_STD_MAX) { GetLogger()->Trace("GetResource event num out of range: %d\n", num); // TODO: fix later return ""; } - str = strings_event[num]; + str = stringsEvent[num]; break; case RES_OBJECT: - assert(num < strings_object_len); + assert(num < OBJECT_MAX); if (num == OBJECT_HUMAN) return g_gamerName; - str = strings_object[num]; + str = stringsObject[num]; break; case RES_ERR: - assert(num < strings_err_len); - str = strings_err[num]; + assert(num < ERR_MAX); + str = stringsErr[num]; break; case RES_CBOT: - assert(num < strings_cbot_len); - str = strings_cbot[num]; + assert(num < TX_MAX); + str = stringsCbot[num]; break; case RES_KEY: - if (num == VIRTUAL_KMOD_CTRL) + if (static_cast<unsigned int>(num) == KEY_INVALID) + return ""; + else if (num == VIRTUAL_KMOD_CTRL) return "Ctrl"; else if (num == VIRTUAL_KMOD_SHIFT) return "Shift"; @@ -185,7 +880,7 @@ static const char* GetResourceBase(ResType type, int num) // TODO: temporary fix static std::string sstr; sstr = gettext("Button %1"); - StrUtils::Replace(sstr, "%1", StrUtils::ToString<int>(1 + num - VIRTUAL_JOY(0))); + sstr = StrUtils::Replace(sstr, "%1", StrUtils::ToString<int>(1 + num - VIRTUAL_JOY(0))); return sstr.c_str(); } else diff --git a/src/common/restext.h b/src/common/restext.h index 6abb7f5..8199f9f 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -21,8 +21,8 @@ #pragma once + #include "common/global.h" -#include "common/restext_ids.h" /** @@ -39,21 +39,120 @@ enum ResType RES_CBOT = 5, //! < TX_* (CBot) }; +/** + * \enum ResTextType + * \brief Text resources available for translation + */ +enum ResTextType +{ + RT_VERSION_ID = 1, + RT_DISINFO_TITLE = 2, + RT_WINDOW_MAXIMIZED = 3, + RT_WINDOW_MINIMIZED = 4, + RT_WINDOW_STANDARD = 5, + RT_WINDOW_CLOSE = 6, + + RT_STUDIO_TITLE = 10, + RT_SCRIPT_NEW = 20, + RT_NAME_DEFAULT = 21, + RT_IO_NEW = 22, + RT_KEY_OR = 23, + + RT_TITLE_BASE = 40, + RT_TITLE_INIT = 41, + RT_TITLE_TRAINER = 42, + RT_TITLE_DEFI = 43, + RT_TITLE_MISSION = 44, + RT_TITLE_FREE = 45, + RT_TITLE_PROTO = 46, + RT_TITLE_SETUP = 47, + RT_TITLE_NAME = 48, + RT_TITLE_PERSO = 49, + RT_TITLE_WRITE = 50, + RT_TITLE_READ = 51, + RT_TITLE_USER = 52, + RT_TITLE_TEEN = 53, + + RT_PLAY_CHAPt = 60, + RT_PLAY_CHAPd = 61, + RT_PLAY_CHAPm = 62, + RT_PLAY_CHAPf = 63, + RT_PLAY_CHAPp = 64, + RT_PLAY_LISTt = 65, + RT_PLAY_LISTd = 66, + RT_PLAY_LISTm = 67, + RT_PLAY_LISTf = 68, + RT_PLAY_LISTp = 69, + RT_PLAY_RESUME = 70, + RT_PLAY_CHAPu = 71, + RT_PLAY_LISTu = 72, + RT_PLAY_CHAPte = 73, + RT_PLAY_LISTk = 74, + + RT_SETUP_DEVICE = 80, + RT_SETUP_MODE = 81, + RT_SETUP_KEY1 = 82, + RT_SETUP_KEY2 = 83, + + RT_PERSO_FACE = 90, + RT_PERSO_GLASSES = 91, + RT_PERSO_HAIR = 92, + RT_PERSO_COMBI = 93, + RT_PERSO_BAND = 94, + + RT_DIALOG_TITLE = 100, + RT_DIALOG_ABORT = 101, + RT_DIALOG_QUIT = 102, + RT_DIALOG_YES = 103, + RT_DIALOG_NO = 104, + RT_DIALOG_DELOBJ = 105, + RT_DIALOG_DELGAME = 106, + RT_DIALOG_YESDEL = 107, + RT_DIALOG_NODEL = 108, + RT_DIALOG_LOADING = 109, + RT_DIALOG_YESQUIT = 110, + RT_DIALOG_NOQUIT = 111, + + RT_STUDIO_LISTTT = 120, + RT_STUDIO_COMPOK = 121, + RT_STUDIO_PROGSTOP = 122, + + RT_SATCOM_LIST = 140, + RT_SATCOM_BOT = 141, + RT_SATCOM_BUILDING = 142, + RT_SATCOM_FRET = 143, + RT_SATCOM_ALIEN = 144, + RT_SATCOM_NULL = 145, + RT_SATCOM_ERROR1 = 146, + RT_SATCOM_ERROR2 = 147, + + RT_IO_OPEN = 150, + RT_IO_SAVE = 151, + RT_IO_LIST = 152, + RT_IO_NAME = 153, + RT_IO_DIR = 154, + RT_IO_PRIVATE = 155, + RT_IO_PUBLIC = 156, + + RT_GENERIC_DEV1 = 170, + RT_GENERIC_DEV2 = 171, + RT_GENERIC_EDIT1 = 172, + RT_GENERIC_EDIT2 = 173, + + RT_INTERFACE_REC = 180, + + RT_MESSAGE_WIN = 200, + RT_MESSAGE_LOST = 201, + + + RT_MAX //! < number of values +}; + // TODO: move to CRobotMain -extern void SetGlobalGamerName(char *name); -extern bool SearchKey(const char *cmd, InputSlot& slot); -extern bool GetResource(ResType type, int num, char* text); - -extern const char * const strings_text[]; -extern const char * const strings_event[]; -extern const char * const strings_object[]; -extern const char * const strings_err[]; -extern const char * const strings_cbot[]; - -extern const int strings_text_len; -extern const int strings_event_len; -extern const int strings_object_len; -extern const int strings_err_len; -extern const int strings_cbot_len; +void InitializeRestext(); + +void SetGlobalGamerName(char *name); +bool SearchKey(const char *cmd, InputSlot& slot); +bool GetResource(ResType type, int num, char* text); diff --git a/src/common/restext_ids.h b/src/common/restext_ids.h deleted file mode 100644 index 4223a1c..0000000 --- a/src/common/restext_ids.h +++ /dev/null @@ -1,122 +0,0 @@ -// * 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/. - - -// TODO: move to restext.h after restext rewrite - -#pragma once - -enum ResTextType -{ - RT_VERSION_ID = 1, - RT_DISINFO_TITLE = 2, - RT_WINDOW_MAXIMIZED = 3, - RT_WINDOW_MINIMIZED = 4, - RT_WINDOW_STANDARD = 5, - RT_WINDOW_CLOSE = 6, - - RT_STUDIO_TITLE = 10, - RT_SCRIPT_NEW = 20, - RT_NAME_DEFAULT = 21, - RT_IO_NEW = 22, - RT_KEY_OR = 23, - - RT_TITLE_BASE = 40, - RT_TITLE_INIT = 41, - RT_TITLE_TRAINER = 42, - RT_TITLE_DEFI = 43, - RT_TITLE_MISSION = 44, - RT_TITLE_FREE = 45, - RT_TITLE_PROTO = 46, - RT_TITLE_SETUP = 47, - RT_TITLE_NAME = 48, - RT_TITLE_PERSO = 49, - RT_TITLE_WRITE = 50, - RT_TITLE_READ = 51, - RT_TITLE_USER = 52, - RT_TITLE_TEEN = 53, - - RT_PLAY_CHAPt = 60, - RT_PLAY_CHAPd = 61, - RT_PLAY_CHAPm = 62, - RT_PLAY_CHAPf = 63, - RT_PLAY_CHAPp = 64, - RT_PLAY_LISTt = 65, - RT_PLAY_LISTd = 66, - RT_PLAY_LISTm = 67, - RT_PLAY_LISTf = 68, - RT_PLAY_LISTp = 69, - RT_PLAY_RESUME = 70, - RT_PLAY_CHAPu = 71, - RT_PLAY_LISTu = 72, - RT_PLAY_CHAPte = 73, - RT_PLAY_LISTk = 74, - - RT_SETUP_DEVICE = 80, - RT_SETUP_MODE = 81, - RT_SETUP_KEY1 = 82, - RT_SETUP_KEY2 = 83, - - RT_PERSO_FACE = 90, - RT_PERSO_GLASSES = 91, - RT_PERSO_HAIR = 92, - RT_PERSO_COMBI = 93, - RT_PERSO_BAND = 94, - - RT_DIALOG_TITLE = 100, - RT_DIALOG_ABORT = 101, - RT_DIALOG_QUIT = 102, - RT_DIALOG_YES = 103, - RT_DIALOG_NO = 104, - RT_DIALOG_DELOBJ = 105, - RT_DIALOG_DELGAME = 106, - RT_DIALOG_YESDEL = 107, - RT_DIALOG_NODEL = 108, - RT_DIALOG_LOADING = 109, - RT_DIALOG_YESQUIT = 110, - RT_DIALOG_NOQUIT = 111, - - RT_STUDIO_LISTTT = 120, - RT_STUDIO_COMPOK = 121, - RT_STUDIO_PROGSTOP = 122, - - RT_SATCOM_LIST = 140, - RT_SATCOM_BOT = 141, - RT_SATCOM_BUILDING = 142, - RT_SATCOM_FRET = 143, - RT_SATCOM_ALIEN = 144, - RT_SATCOM_NULL = 145, - RT_SATCOM_ERROR1 = 146, - RT_SATCOM_ERROR2 = 147, - - RT_IO_OPEN = 150, - RT_IO_SAVE = 151, - RT_IO_LIST = 152, - RT_IO_NAME = 153, - RT_IO_DIR = 154, - RT_IO_PRIVATE = 155, - RT_IO_PUBLIC = 156, - - RT_GENERIC_DEV1 = 170, - RT_GENERIC_DEV2 = 171, - RT_GENERIC_EDIT1 = 172, - RT_GENERIC_EDIT2 = 173, - - RT_INTERFACE_REC = 180, - - RT_MESSAGE_WIN = 200, - RT_MESSAGE_LOST = 201, -}; diff --git a/src/common/restext_strings.c b/src/common/restext_strings.c deleted file mode 100644 index d041a28..0000000 --- a/src/common/restext_strings.c +++ /dev/null @@ -1,717 +0,0 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. - -#include "common/restext_ids.h" -#include "common/event_ids.h" -#include "object/object_ids.h" -#include "common/error_ids.h" -#include "CBot/resource.h" - -const char * const strings_text[] = -{ - [RT_VERSION_ID] = "Colobot Gold", - - [RT_DISINFO_TITLE] = "SatCom", - [RT_WINDOW_MAXIMIZED] = "Maximize", - [RT_WINDOW_MINIMIZED] = "Minimize", - [RT_WINDOW_STANDARD] = "Normal size", - [RT_WINDOW_CLOSE] = "Close", - - [RT_STUDIO_TITLE] = "Program editor", - [RT_SCRIPT_NEW] = "New", - [RT_NAME_DEFAULT] = "Player", - [RT_IO_NEW] = "New ...", - [RT_KEY_OR] = " or ", - - [RT_TITLE_BASE] = "COLOBOT", - [RT_TITLE_INIT] = "COLOBOT", - [RT_TITLE_TRAINER] = "Programming exercises", - [RT_TITLE_DEFI] = "Challenges", - [RT_TITLE_MISSION] = "Missions", - [RT_TITLE_FREE] = "Free game", - [RT_TITLE_TEEN] = "Free game", - [RT_TITLE_USER] = "User levels", - [RT_TITLE_PROTO] = "Prototypes", - [RT_TITLE_SETUP] = "Options", - [RT_TITLE_NAME] = "Player's name", - [RT_TITLE_PERSO] = "Customize your appearance", - [RT_TITLE_WRITE] = "Save the current mission", - [RT_TITLE_READ] = "Load a saved mission", - - [RT_PLAY_CHAPt] = " Chapters:", - [RT_PLAY_CHAPd] = " Chapters:", - [RT_PLAY_CHAPm] = " Planets:", - [RT_PLAY_CHAPf] = " Planets:", - [RT_PLAY_CHAPu] = " User levels:", - [RT_PLAY_CHAPp] = " Planets:", - [RT_PLAY_CHAPte] = " Chapters:", - [RT_PLAY_LISTt] = " Exercises in the chapter:", - [RT_PLAY_LISTd] = " Challenges in the chapter:", - [RT_PLAY_LISTm] = " Missions on this planet:", - [RT_PLAY_LISTf] = " Free game on this planet:", - [RT_PLAY_LISTu] = " Missions on this level:", - [RT_PLAY_LISTp] = " Prototypes on this planet:", - [RT_PLAY_LISTk] = " Free game on this chapter:", - [RT_PLAY_RESUME] = " Summary:", - - [RT_SETUP_DEVICE] = " Drivers:", - [RT_SETUP_MODE] = " Resolution:", - [RT_SETUP_KEY1] = "1) First click on the key you want to redefine.", - [RT_SETUP_KEY2] = "2) Then press the key you want to use instead.", - - [RT_PERSO_FACE] = "Face type:", - [RT_PERSO_GLASSES] = "Eyeglasses:", - [RT_PERSO_HAIR] = "Hair color:", - [RT_PERSO_COMBI] = "Suit color:", - [RT_PERSO_BAND] = "Strip color:", - - [RT_DIALOG_QUIT] = "Do you want to quit COLOBOT ?", - [RT_DIALOG_TITLE] = "COLOBOT", - [RT_DIALOG_YESQUIT] = "Quit\\Quit COLOBOT", - [RT_DIALOG_ABORT] = "Quit the mission?", - [RT_DIALOG_YES] = "Abort\\Abort the current mission", - [RT_DIALOG_NO] = "Continue\\Continue the current mission", - [RT_DIALOG_NOQUIT] = "Continue\\Continue the game", - [RT_DIALOG_DELOBJ] = "Do you really want to destroy the selected building?", - [RT_DIALOG_DELGAME] = "Do you want to delete %s's saved games? ", - [RT_DIALOG_YESDEL] = "Delete", - [RT_DIALOG_NODEL] = "Cancel", - [RT_DIALOG_LOADING] = "LOADING", - - [RT_STUDIO_LISTTT] = "Keyword help(\\key cbot;)", - [RT_STUDIO_COMPOK] = "Compilation ok (0 errors)", - [RT_STUDIO_PROGSTOP] = "Program finished", - - [RT_SATCOM_LIST] = "\\b;List of objects\n", - [RT_SATCOM_BOT] = "\\b;Robots\n", - [RT_SATCOM_BUILDING] = "\\b;Buildings\n", - [RT_SATCOM_FRET] = "\\b;Moveable objects\n", - [RT_SATCOM_ALIEN] = "\\b;Aliens\n", - [RT_SATCOM_NULL] = "\\c; (none)\\n;\n", - [RT_SATCOM_ERROR1] = "\\b;Error\n", - [RT_SATCOM_ERROR2] = "The list is only available if a \\l;radar station\\u object\\radar; is working.\n", - - [RT_IO_OPEN] = "Open", - [RT_IO_SAVE] = "Save", - [RT_IO_LIST] = "Folder: %s", - [RT_IO_NAME] = "Name:", - [RT_IO_DIR] = "Folder:", - [RT_IO_PRIVATE] = "Private\\Private folder", - [RT_IO_PUBLIC] = "Public\\Common folder", - - [RT_GENERIC_DEV1] = "Developed by :", - [RT_GENERIC_DEV2] = "www.epsitec.com", - [RT_GENERIC_EDIT1] = " ", - [RT_GENERIC_EDIT2] = " ", - - [RT_INTERFACE_REC] = "Recorder" -}; - -const char * const strings_event[] = -{ - [EVENT_BUTTON_OK] = "OK", - [EVENT_BUTTON_CANCEL] = "Cancel", - [EVENT_BUTTON_NEXT] = "Next", - [EVENT_BUTTON_PREV] = "Previous", - [EVENT_BUTTON_QUIT] = "Menu (\\key quit;)", - - [EVENT_DIALOG_OK] = "OK", - [EVENT_DIALOG_CANCEL] = "Cancel", - - [EVENT_INTERFACE_TRAINER] = "Exercises\\Programming exercises", - [EVENT_INTERFACE_DEFI] = "Challenges\\Programming challenges", - [EVENT_INTERFACE_MISSION] = "Missions\\Select mission", - [EVENT_INTERFACE_FREE] = "Free game\\Free game without a specific goal", - [EVENT_INTERFACE_TEEN] = "Free game\\Free game without a specific goal", - [EVENT_INTERFACE_USER] = "User\\User levels", - [EVENT_INTERFACE_PROTO] = "Proto\\Prototypes under development", - [EVENT_INTERFACE_NAME] = "New player\\Choose player's name", - [EVENT_INTERFACE_SETUP] = "Options\\Preferences", - [EVENT_INTERFACE_AGAIN] = "Restart\\Restart the mission from the beginning", - [EVENT_INTERFACE_WRITE] = "Save\\Save the current mission ", - [EVENT_INTERFACE_READ] = "Load\\Load a saved mission", - [EVENT_INTERFACE_ABORT] = "\\Return to COLOBOT", - [EVENT_INTERFACE_QUIT] = "Quit\\Quit COLOBOT", - [EVENT_INTERFACE_BACK] = "<< Back \\Back to the previous screen", - [EVENT_INTERFACE_PLAY] = "Play\\Start mission!", - [EVENT_INTERFACE_SETUPd] = "Device\\Driver and resolution settings", - [EVENT_INTERFACE_SETUPg] = "Graphics\\Graphics settings", - [EVENT_INTERFACE_SETUPp] = "Game\\Game settings", - [EVENT_INTERFACE_SETUPc] = "Controls\\Keyboard, joystick and mouse settings", - [EVENT_INTERFACE_SETUPs] = "Sound\\Music and game sound volume", - [EVENT_INTERFACE_DEVICE] = "Unit", - [EVENT_INTERFACE_RESOL] = "Resolution", - [EVENT_INTERFACE_FULL] = "Full screen\\Full screen or window mode", - [EVENT_INTERFACE_APPLY] = "Apply changes\\Activates the changed settings", - - [EVENT_INTERFACE_TOTO] = "Robbie\\Your assistant", - [EVENT_INTERFACE_SHADOW] = "Shadows\\Shadows on the ground", - [EVENT_INTERFACE_GROUND] = "Marks on the ground\\Marks on the ground", - [EVENT_INTERFACE_DIRTY] = "Dust\\Dust and dirt on bots and buildings", - [EVENT_INTERFACE_FOG] = "Fog\\Fog", - [EVENT_INTERFACE_LENS] = "Sunbeams\\Sunbeams in the sky", - [EVENT_INTERFACE_SKY] = "Sky\\Clouds and nebulae", - [EVENT_INTERFACE_PLANET] = "Planets and stars\\Astronomical objects in the sky", - [EVENT_INTERFACE_LIGHT] = "Dynamic lighting\\Mobile light sources", - [EVENT_INTERFACE_PARTI] = "Number of particles\\Explosions, dust, reflections, etc.", - [EVENT_INTERFACE_CLIP] = "Depth of field\\Maximum visibility", - [EVENT_INTERFACE_DETAIL] = "Details\\Visual quality of 3D objects", - [EVENT_INTERFACE_TEXTURE] = "Textures\\Quality of textures ", - [EVENT_INTERFACE_GADGET] = "Num of decorative objects\\Number of purely ornamental objects", - [EVENT_INTERFACE_RAIN] = "Particles in the interface\\Steam clouds and sparks in the interface", - [EVENT_INTERFACE_GLINT] = "Reflections on the buttons \\Shiny buttons", - [EVENT_INTERFACE_TOOLTIP] = "Help balloons\\Explain the function of the buttons", - [EVENT_INTERFACE_MOVIES] = "Film sequences\\Films before and after the missions", - [EVENT_INTERFACE_NICERST] = "Exit film\\Film at the exit of exercises", - [EVENT_INTERFACE_HIMSELF] = "Friendly fire\\Your shooting can damage your own objects ", - [EVENT_INTERFACE_SCROLL] = "Scrolling\\Scrolling when the mouse touches right or left border", - [EVENT_INTERFACE_INVERTX] = "Mouse inversion X\\Inversion of the scrolling direction on the X axis", - [EVENT_INTERFACE_INVERTY] = "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis", - [EVENT_INTERFACE_EFFECT] = "Quake at explosions\\The screen shakes at explosions", - [EVENT_INTERFACE_MOUSE] = "Mouse shadow\\Gives the mouse a shadow", - [EVENT_INTERFACE_EDITMODE] = "Automatic indent\\When program editing", - [EVENT_INTERFACE_EDITVALUE] = "Big indent\\Indent 2 or 4 spaces per level defined by braces", - [EVENT_INTERFACE_SOLUCE4] = "Access to solutions\\Show program \"4: Solution\" in the exercises", - - [EVENT_INTERFACE_KDEF] = "Standard controls\\Standard key functions", - [EVENT_INTERFACE_KLEFT] = "Turn left\\turns the bot to the left", - [EVENT_INTERFACE_KRIGHT] = "Turn right\\turns the bot to the right", - [EVENT_INTERFACE_KUP] = "Forward\\Moves forward", - [EVENT_INTERFACE_KDOWN] = "Backward\\Moves backward", - [EVENT_INTERFACE_KGUP] = "Climb\\Increases the power of the jet", - [EVENT_INTERFACE_KGDOWN] = "Descend\\Reduces the power of the jet", - [EVENT_INTERFACE_KCAMERA] = "Change camera\\Switches between onboard camera and following camera", - [EVENT_INTERFACE_KDESEL] = "Previous object\\Selects the previous object", - [EVENT_INTERFACE_KACTION] = "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)", - [EVENT_INTERFACE_KNEAR] = "Camera closer\\Moves the camera forward", - [EVENT_INTERFACE_KAWAY] = "Camera back\\Moves the camera backward", - [EVENT_INTERFACE_KNEXT] = "Next object\\Selects the next object", - [EVENT_INTERFACE_KHUMAN] = "Select the astronaut\\Selects the astronaut", - [EVENT_INTERFACE_KQUIT] = "Quit\\Quit the current mission or exercise", - [EVENT_INTERFACE_KHELP] = "Instructions\\Shows the instructions for the current mission", - [EVENT_INTERFACE_KPROG] = "Programming help\\Gives more detailed help with programming", - [EVENT_INTERFACE_KCBOT] = "Key word help\\More detailed help about key words", - [EVENT_INTERFACE_KVISIT] = "Origin of last message\\Shows where the last message was sent from", - [EVENT_INTERFACE_KSPEED10] = "Speed 1.0x\\Normal speed", - [EVENT_INTERFACE_KSPEED15] = "Speed 1.5x\\1.5 times faster", - [EVENT_INTERFACE_KSPEED20] = "Speed 2.0x\\Double speed", - [EVENT_INTERFACE_KSPEED30] = "Speed 3.0x\\Three times faster", - - [EVENT_INTERFACE_VOLSOUND] = "Sound effects:\\Volume of engines, voice, shooting, etc.", - [EVENT_INTERFACE_VOLMUSIC] = "Background sound :\\Volume of audio tracks on the CD", - [EVENT_INTERFACE_SOUND3D] = "3D sound\\3D positioning of the sound", - - [EVENT_INTERFACE_MIN] = "Lowest\\Minimum graphic quality (highest frame rate)", - [EVENT_INTERFACE_NORM] = "Normal\\Normal graphic quality", - [EVENT_INTERFACE_MAX] = "Highest\\Highest graphic quality (lowest frame rate)", - - [EVENT_INTERFACE_SILENT] = "Mute\\No sound", - [EVENT_INTERFACE_NOISY] = "Normal\\Normal sound volume", - - [EVENT_INTERFACE_JOYSTICK] = "Use a joystick\\Joystick or keyboard", - [EVENT_INTERFACE_SOLUCE] = "Access to solution\\Shows the solution (detailed instructions for missions)", - - [EVENT_INTERFACE_NEDIT] = "\\New player name", - [EVENT_INTERFACE_NOK] = "OK\\Choose the selected player", - [EVENT_INTERFACE_NCANCEL] = "Cancel\\Keep current player name", - [EVENT_INTERFACE_NDELETE] = "Delete player\\Deletes the player from the list", - [EVENT_INTERFACE_NLABEL] = "Player name", - - [EVENT_INTERFACE_IOWRITE] = "Save\\Saves the current mission", - [EVENT_INTERFACE_IOREAD] = "Load\\Loads the selected mission", - [EVENT_INTERFACE_IOLIST] = "List of saved missions", - [EVENT_INTERFACE_IOLABEL] = "Filename:", - [EVENT_INTERFACE_IONAME] = "Mission name", - [EVENT_INTERFACE_IOIMAGE] = "Photography", - [EVENT_INTERFACE_IODELETE] = "Delete\\Deletes the selected file", - - [EVENT_INTERFACE_PERSO] = "Appearance\\Choose your appearance", - [EVENT_INTERFACE_POK] = "OK", - [EVENT_INTERFACE_PCANCEL] = "Cancel", - [EVENT_INTERFACE_PDEF] = "Standard\\Standard appearance settings", - [EVENT_INTERFACE_PHEAD] = "Head\\Face and hair", - [EVENT_INTERFACE_PBODY] = "Suit\\Astronaut suit", - [EVENT_INTERFACE_PLROT] = "\\Turn left", - [EVENT_INTERFACE_PRROT] = "\\Turn right", - [EVENT_INTERFACE_PCRa] = "Red", - [EVENT_INTERFACE_PCGa] = "Green", - [EVENT_INTERFACE_PCBa] = "Blue", - [EVENT_INTERFACE_PCRb] = "Red", - [EVENT_INTERFACE_PCGb] = "Green", - [EVENT_INTERFACE_PCBb] = "Blue", - [EVENT_INTERFACE_PFACE1] = "\\Face 1", - [EVENT_INTERFACE_PFACE2] = "\\Face 4", - [EVENT_INTERFACE_PFACE3] = "\\Face 3", - [EVENT_INTERFACE_PFACE4] = "\\Face 2", - [EVENT_INTERFACE_PGLASS0] = "\\No eyeglasses", - [EVENT_INTERFACE_PGLASS1] = "\\Eyeglasses 1", - [EVENT_INTERFACE_PGLASS2] = "\\Eyeglasses 2", - [EVENT_INTERFACE_PGLASS3] = "\\Eyeglasses 3", - [EVENT_INTERFACE_PGLASS4] = "\\Eyeglasses 4", - [EVENT_INTERFACE_PGLASS5] = "\\Eyeglasses 5", - - [EVENT_OBJECT_DESELECT] = "Previous selection (\\key desel;)", - [EVENT_OBJECT_LEFT] = "Turn left (\\key left;)", - [EVENT_OBJECT_RIGHT] = "Turn right (\\key right;)", - [EVENT_OBJECT_UP] = "Forward (\\key up;)", - [EVENT_OBJECT_DOWN] = "Backward (\\key down;)", - [EVENT_OBJECT_GASUP] = "Up (\\key gup;)", - [EVENT_OBJECT_GASDOWN] = "Down (\\key gdown;)", - [EVENT_OBJECT_HTAKE] = "Grab or drop (\\key action;)", - [EVENT_OBJECT_MTAKE] = "Grab or drop (\\key action;)", - [EVENT_OBJECT_MFRONT] = "..in front", - [EVENT_OBJECT_MBACK] = "..behind", - [EVENT_OBJECT_MPOWER] = "..power cell", - [EVENT_OBJECT_BHELP] = "Instructions for the mission (\\key help;)", - [EVENT_OBJECT_BTAKEOFF] = "Take off to finish the mission", - [EVENT_OBJECT_BDERRICK] = "Build a derrick", - [EVENT_OBJECT_BSTATION] = "Build a power station", - [EVENT_OBJECT_BFACTORY] = "Build a bot factory", - [EVENT_OBJECT_BREPAIR] = "Build a repair center", - [EVENT_OBJECT_BCONVERT] = "Build a converter", - [EVENT_OBJECT_BTOWER] = "Build a defense tower", - [EVENT_OBJECT_BRESEARCH] = "Build a research center", - [EVENT_OBJECT_BRADAR] = "Build a radar station", - [EVENT_OBJECT_BENERGY] = "Build a power cell factory", - [EVENT_OBJECT_BLABO] = "Build an autolab", - [EVENT_OBJECT_BNUCLEAR] = "Build a nuclear power plant", - [EVENT_OBJECT_BPARA] = "Build a lightning conductor", - [EVENT_OBJECT_BINFO] = "Build a exchange post", - [EVENT_OBJECT_GFLAT] = "Show if the ground is flat", - [EVENT_OBJECT_FCREATE] = "Plant a flag", - [EVENT_OBJECT_FDELETE] = "Remove a flag", - [EVENT_OBJECT_FCOLORb] = "\\Blue flags", - [EVENT_OBJECT_FCOLORr] = "\\Red flags", - [EVENT_OBJECT_FCOLORg] = "\\Green flags", - [EVENT_OBJECT_FCOLORy] = "\\Yellow flags", - [EVENT_OBJECT_FCOLORv] = "\\Violet flags", - [EVENT_OBJECT_FACTORYfa] = "Build a winged grabber", - [EVENT_OBJECT_FACTORYta] = "Build a tracked grabber", - [EVENT_OBJECT_FACTORYwa] = "Build a wheeled grabber", - [EVENT_OBJECT_FACTORYia] = "Build a legged grabber", - [EVENT_OBJECT_FACTORYfc] = "Build a winged shooter", - [EVENT_OBJECT_FACTORYtc] = "Build a tracked shooter", - [EVENT_OBJECT_FACTORYwc] = "Build a wheeled shooter", - [EVENT_OBJECT_FACTORYic] = "Build a legged shooter", - [EVENT_OBJECT_FACTORYfi] = "Build a winged orga shooter", - [EVENT_OBJECT_FACTORYti] = "Build a tracked orga shooter", - [EVENT_OBJECT_FACTORYwi] = "Build a wheeled orga shooter", - [EVENT_OBJECT_FACTORYii] = "Build a legged orga shooter", - [EVENT_OBJECT_FACTORYfs] = "Build a winged sniffer", - [EVENT_OBJECT_FACTORYts] = "Build a tracked sniffer", - [EVENT_OBJECT_FACTORYws] = "Build a wheeled sniffer", - [EVENT_OBJECT_FACTORYis] = "Build a legged sniffer", - [EVENT_OBJECT_FACTORYrt] = "Build a thumper", - [EVENT_OBJECT_FACTORYrc] = "Build a phazer shooter", - [EVENT_OBJECT_FACTORYrr] = "Build a recycler", - [EVENT_OBJECT_FACTORYrs] = "Build a shielder", - [EVENT_OBJECT_FACTORYsa] = "Build a subber", - [EVENT_OBJECT_RTANK] = "Run research program for tracked bots", - [EVENT_OBJECT_RFLY] = "Run research program for winged bots", - [EVENT_OBJECT_RTHUMP] = "Run research program for thumper", - [EVENT_OBJECT_RCANON] = "Run research program for shooter", - [EVENT_OBJECT_RTOWER] = "Run research program for defense tower", - [EVENT_OBJECT_RPHAZER] = "Run research program for phazer shooter", - [EVENT_OBJECT_RSHIELD] = "Run research program for shielder", - [EVENT_OBJECT_RATOMIC] = "Run research program for nuclear power", - [EVENT_OBJECT_RiPAW] = "Run research program for legged bots", - [EVENT_OBJECT_RiGUN] = "Run research program for orga shooter", - [EVENT_OBJECT_RESET] = "Return to start", - [EVENT_OBJECT_SEARCH] = "Sniff (\\key action;)", - [EVENT_OBJECT_TERRAFORM] = "Thump (\\key action;)", - [EVENT_OBJECT_FIRE] = "Shoot (\\key action;)", - [EVENT_OBJECT_RECOVER] = "Recycle (\\key action;)", - [EVENT_OBJECT_BEGSHIELD] = "Extend shield (\\key action;)", - [EVENT_OBJECT_ENDSHIELD] = "Withdraw shield (\\key action;)", - [EVENT_OBJECT_DIMSHIELD] = "Shield radius", - [EVENT_OBJECT_PROGRUN] = "Execute the selected program", - [EVENT_OBJECT_PROGEDIT] = "Edit the selected program", - [EVENT_OBJECT_INFOOK] = "\\SatCom on standby", - [EVENT_OBJECT_DELETE] = "Destroy the building", - [EVENT_OBJECT_GENERGY] = "Energy level", - [EVENT_OBJECT_GSHIELD] = "Shield level", - [EVENT_OBJECT_GRANGE] = "Jet temperature", - [EVENT_OBJECT_GPROGRESS] = "Still working ...", - [EVENT_OBJECT_GRADAR] = "Number of insects detected", - [EVENT_OBJECT_GINFO] = "Transmitted information", - [EVENT_OBJECT_COMPASS] = "Compass", - [EVENT_OBJECT_MAPZOOM] = "Zoom mini-map", - [EVENT_OBJECT_CAMERA] = "Camera (\\key camera;)", - [EVENT_OBJECT_CAMERAleft] = "Camera to left", - [EVENT_OBJECT_CAMERAright] = "Camera to right", - [EVENT_OBJECT_CAMERAnear] = "Camera nearest", - [EVENT_OBJECT_CAMERAaway] = "Camera awayest", - [EVENT_OBJECT_HELP] = "Help about selected object", - [EVENT_OBJECT_SOLUCE] = "Show the solution", - [EVENT_OBJECT_SHORTCUT00] = "Switch bots <-> buildings", - [EVENT_OBJECT_LIMIT] = "Show the range", - [EVENT_OBJECT_PEN0] = "\\Raise the pencil", - [EVENT_OBJECT_PEN1] = "\\Use the black pencil", - [EVENT_OBJECT_PEN2] = "\\Use the yellow pencil", - [EVENT_OBJECT_PEN3] = "\\Use the orange pencil", - [EVENT_OBJECT_PEN4] = "\\Use the red pencil", - [EVENT_OBJECT_PEN5] = "\\Use the purple pencil", - [EVENT_OBJECT_PEN6] = "\\Use the blue pencil", - [EVENT_OBJECT_PEN7] = "\\Use the green pencil", - [EVENT_OBJECT_PEN8] = "\\Use the brown pencil", - [EVENT_OBJECT_REC] = "\\Start recording", - [EVENT_OBJECT_STOP] = "\\Stop recording", - [EVENT_DT_VISIT0] = "Show the place", - [EVENT_DT_VISIT1] = "Show the place", - [EVENT_DT_VISIT2] = "Show the place", - [EVENT_DT_VISIT3] = "Show the place", - [EVENT_DT_VISIT4] = "Show the place", - [EVENT_DT_END] = "Continue", - [EVENT_CMD] = "Command line", - [EVENT_SPEED] = "Game speed", - - [EVENT_HYPER_PREV] = "Back", - [EVENT_HYPER_NEXT] = "Forward", - [EVENT_HYPER_HOME] = "Home", - [EVENT_HYPER_COPY] = "Copy", - [EVENT_HYPER_SIZE1] = "Size 1", - [EVENT_HYPER_SIZE2] = "Size 2", - [EVENT_HYPER_SIZE3] = "Size 3", - [EVENT_HYPER_SIZE4] = "Size 4", - [EVENT_HYPER_SIZE5] = "Size 5", - [EVENT_SATCOM_HUSTON] = "Instructions from Houston", - [EVENT_SATCOM_SAT] = "Satellite report", - [EVENT_SATCOM_LOADING] = "Programs dispatched by Houston", - [EVENT_SATCOM_OBJECT] = "List of objects", - [EVENT_SATCOM_PROG] = "Programming help", - [EVENT_SATCOM_SOLUCE] = "Solution", - - [EVENT_STUDIO_OK] = "OK\\Close program editor and return to game", - [EVENT_STUDIO_CANCEL] = "Cancel\\Cancel all changes", - [EVENT_STUDIO_NEW] = "New", - [EVENT_STUDIO_OPEN] = "Open (Ctrl+o)", - [EVENT_STUDIO_SAVE] = "Save (Ctrl+s)", - [EVENT_STUDIO_UNDO] = "Undo (Ctrl+z)", - [EVENT_STUDIO_CUT] = "Cut (Ctrl+x)", - [EVENT_STUDIO_COPY] = "Copy (Ctrl+c)", - [EVENT_STUDIO_PASTE] = "Paste (Ctrl+v)", - [EVENT_STUDIO_SIZE] = "Font size", - [EVENT_STUDIO_TOOL] = "Instructions (\\key help;)", - [EVENT_STUDIO_HELP] = "Programming help (\\key prog;)", - [EVENT_STUDIO_COMPILE] = "Compile", - [EVENT_STUDIO_RUN] = "Execute/stop", - [EVENT_STUDIO_REALTIME] = "Pause/continue", - [EVENT_STUDIO_STEP] = "One step" -}; - -const char * const strings_object[] = -{ - [OBJECT_PORTICO] = "Gantry crane", - [OBJECT_BASE] = "Spaceship", - [OBJECT_DERRICK] = "Derrick", - [OBJECT_FACTORY] = "Bot factory", - [OBJECT_REPAIR] = "Repair center", - [OBJECT_DESTROYER] = "Destroyer", - [OBJECT_STATION] = "Power station", - [OBJECT_CONVERT] = "Converts ore to titanium", - [OBJECT_TOWER] = "Defense tower", - [OBJECT_NEST] = "Nest", - [OBJECT_RESEARCH] = "Research center", - [OBJECT_RADAR] = "Radar station", - [OBJECT_INFO] = "Information exchange post", - [OBJECT_ENERGY] = "Power cell factory", - [OBJECT_LABO] = "Autolab", - [OBJECT_NUCLEAR] = "Nuclear power station", - [OBJECT_PARA] = "Lightning conductor", - [OBJECT_SAFE] = "Vault", - [OBJECT_HUSTON] = "Houston Mission Control", - [OBJECT_TARGET1] = "Target", - [OBJECT_TARGET2] = "Target", - [OBJECT_START] = "Start", - [OBJECT_END] = "Finish", - [OBJECT_STONE] = "Titanium ore", - [OBJECT_URANIUM] = "Uranium ore", - [OBJECT_BULLET] = "Organic matter", - [OBJECT_METAL] = "Titanium", - [OBJECT_POWER] = "Power cell", - [OBJECT_ATOMIC] = "Nuclear power cell", - [OBJECT_BBOX] = "Black box", - [OBJECT_KEYa] = "Key A", - [OBJECT_KEYb] = "Key B", - [OBJECT_KEYc] = "Key C", - [OBJECT_KEYd] = "Key D", - [OBJECT_TNT] = "Explosive", - [OBJECT_BOMB] = "Fixed mine", - [OBJECT_BAG] = "Survival kit", - [OBJECT_WAYPOINT] = "Checkpoint", - [OBJECT_FLAGb] = "Blue flag", - [OBJECT_FLAGr] = "Red flag", - [OBJECT_FLAGg] = "Green flag", - [OBJECT_FLAGy] = "Yellow flag", - [OBJECT_FLAGv] = "Violet flag", - [OBJECT_MARKPOWER] = "Energy deposit (site for power station)", - [OBJECT_MARKURANIUM] = "Uranium deposit (site for derrick)", - [OBJECT_MARKKEYa] = "Found key A (site for derrick)", - [OBJECT_MARKKEYb] = "Found key B (site for derrick)", - [OBJECT_MARKKEYc] = "Found key C (site for derrick)", - [OBJECT_MARKKEYd] = "Found key D (site for derrick)", - [OBJECT_MARKSTONE] = "Titanium deposit (site for derrick)", - [OBJECT_MOBILEft] = "Practice bot", - [OBJECT_MOBILEtt] = "Practice bot", - [OBJECT_MOBILEwt] = "Practice bot", - [OBJECT_MOBILEit] = "Practice bot", - [OBJECT_MOBILEfa] = "Winged grabber", - [OBJECT_MOBILEta] = "Tracked grabber", - [OBJECT_MOBILEwa] = "Wheeled grabber", - [OBJECT_MOBILEia] = "Legged grabber", - [OBJECT_MOBILEfc] = "Winged shooter", - [OBJECT_MOBILEtc] = "Tracked shooter", - [OBJECT_MOBILEwc] = "Wheeled shooter", - [OBJECT_MOBILEic] = "Legged shooter", - [OBJECT_MOBILEfi] = "Winged orga shooter", - [OBJECT_MOBILEti] = "Tracked orga shooter", - [OBJECT_MOBILEwi] = "Wheeled orga shooter", - [OBJECT_MOBILEii] = "Legged orga shooter", - [OBJECT_MOBILEfs] = "Winged sniffer", - [OBJECT_MOBILEts] = "Tracked sniffer", - [OBJECT_MOBILEws] = "Wheeled sniffer", - [OBJECT_MOBILEis] = "Legged sniffer", - [OBJECT_MOBILErt] = "Thumper", - [OBJECT_MOBILErc] = "Phazer shooter", - [OBJECT_MOBILErr] = "Recycler", - [OBJECT_MOBILErs] = "Shielder", - [OBJECT_MOBILEsa] = "Subber", - [OBJECT_MOBILEtg] = "Target bot", - [OBJECT_MOBILEdr] = "Drawer bot", - [OBJECT_TECH] = "Engineer", - [OBJECT_TOTO] = "Robbie", - [OBJECT_MOTHER] = "Alien Queen", - [OBJECT_ANT] = "Ant", - [OBJECT_SPIDER] = "Spider", - [OBJECT_BEE] = "Wasp", - [OBJECT_WORM] = "Worm", - [OBJECT_EGG] = "Egg", - [OBJECT_RUINmobilew1] = "Wreckage", - [OBJECT_RUINmobilew2] = "Wreckage", - [OBJECT_RUINmobilet1] = "Wreckage", - [OBJECT_RUINmobilet2] = "Wreckage", - [OBJECT_RUINmobiler1] = "Wreckage", - [OBJECT_RUINmobiler2] = "Wreckage", - [OBJECT_RUINfactory] = "Ruin", - [OBJECT_RUINdoor] = "Ruin", - [OBJECT_RUINsupport] = "Waste", - [OBJECT_RUINradar] = "Ruin", - [OBJECT_RUINconvert] = "Ruin", - [OBJECT_RUINbase] = "Spaceship ruin", - [OBJECT_RUINhead] = "Spaceship ruin", - [OBJECT_APOLLO1] = "Remains of Apollo mission", - [OBJECT_APOLLO3] = "Remains of Apollo mission", - [OBJECT_APOLLO4] = "Remains of Apollo mission", - [OBJECT_APOLLO5] = "Remains of Apollo mission", - [OBJECT_APOLLO2] = "Lunar Roving Vehicle" -}; - -const char * const strings_err[] = -{ - [ERR_CMD] = "Unknown command", - [ERR_MANIP_VEH] = "Inappropriate bot", - [ERR_MANIP_FLY] = "Impossible when flying", - [ERR_MANIP_BUSY] = "Already carrying something", - [ERR_MANIP_NIL] = "Nothing to grab", - [ERR_MANIP_MOTOR] = "Impossible when moving", - [ERR_MANIP_OCC] = "Place occupied", - [ERR_MANIP_FRIEND] = "No other robot", - [ERR_MANIP_RADIO] = "You can not carry a radioactive object", - [ERR_MANIP_WATER] = "You can not carry an object under water", - [ERR_MANIP_EMPTY] = "Nothing to drop", - [ERR_BUILD_FLY] = "Impossible when flying", - [ERR_BUILD_WATER] = "Impossible under water", - [ERR_BUILD_ENERGY] = "Not enough energy", - [ERR_BUILD_METALAWAY] = "Titanium too far away", - [ERR_BUILD_METALNEAR] = "Titanium too close", - [ERR_BUILD_METALINEX] = "No titanium around", - [ERR_BUILD_FLAT] = "Ground not flat enough", - [ERR_BUILD_FLATLIT] = "Flat ground not large enough", - [ERR_BUILD_BUSY] = "Place occupied", - [ERR_BUILD_BASE] = "Too close to space ship", - [ERR_BUILD_NARROW] = "Too close to a building", - [ERR_BUILD_MOTOR] = "Impossible when moving", - [ERR_SEARCH_FLY] = "Impossible when flying", - [ERR_SEARCH_VEH] = "Inappropriate bot", - [ERR_SEARCH_MOTOR] = "Impossible when moving", - [ERR_TERRA_VEH] = "Inappropriate bot", - [ERR_TERRA_ENERGY] = "Not enough energy", - [ERR_TERRA_FLOOR] = "Ground inappropriate", - [ERR_TERRA_BUILDING] = "Building too close", - [ERR_TERRA_OBJECT] = "Object too close", - [ERR_RECOVER_VEH] = "Inappropriate bot", - [ERR_RECOVER_ENERGY] = "Not enough energy", - [ERR_RECOVER_NULL] = "Nothing to recycle", - [ERR_SHIELD_VEH] = "Inappropriate bot", - [ERR_SHIELD_ENERGY] = "No more energy", - [ERR_MOVE_IMPOSSIBLE] = "Error in instruction move", - [ERR_FIND_IMPOSSIBLE] = "Object not found", - [ERR_GOTO_IMPOSSIBLE] = "Goto: inaccessible destination", - [ERR_GOTO_ITER] = "Goto: inaccessible destination", - [ERR_GOTO_BUSY] = "Goto: destination occupied", - [ERR_FIRE_VEH] = "Inappropriate bot", - [ERR_FIRE_ENERGY] = "Not enough energy", - [ERR_FIRE_FLY] = "Impossible when flying", - [ERR_CONVERT_EMPTY] = "No titanium ore to convert", - [ERR_DERRICK_NULL] = "No ore in the subsoil", - [ERR_STATION_NULL] = "No energy in the subsoil", - [ERR_TOWER_POWER] = "No power cell", - [ERR_TOWER_ENERGY] = "No more energy", - [ERR_RESEARCH_POWER] = "No power cell", - [ERR_RESEARCH_ENERGY] = "Not enough energy", - [ERR_RESEARCH_TYPE] = "Inappropriate cell type", - [ERR_RESEARCH_ALREADY]= "Research program already performed", - [ERR_ENERGY_NULL] = "No energy in the subsoil", - [ERR_ENERGY_LOW] = "Not enough energy yet", - [ERR_ENERGY_EMPTY] = "No titanium to transform", - [ERR_ENERGY_BAD] = "Transforms only titanium", - [ERR_BASE_DLOCK] = "Doors blocked by a robot or another object ", - [ERR_BASE_DHUMAN] = "You must get on the spaceship to take off ", - [ERR_LABO_NULL] = "Nothing to analyze", - [ERR_LABO_BAD] = "Analyzes only organic matter", - [ERR_LABO_ALREADY] = "Analysis already performed", - [ERR_NUCLEAR_NULL] = "No energy in the subsoil", - [ERR_NUCLEAR_LOW] = "Not yet enough energy", - [ERR_NUCLEAR_EMPTY] = "No uranium to transform", - [ERR_NUCLEAR_BAD] = "Transforms only uranium", - [ERR_FACTORY_NULL] = "No titanium", - [ERR_FACTORY_NEAR] = "Object too close", - [ERR_RESET_NEAR] = "Place occupied", - [ERR_INFO_NULL] = "No information exchange post within range", - [ERR_VEH_VIRUS] = "Program infected by a virus", - [ERR_BAT_VIRUS] = "Infected by a virus, temporarily out of order", - [ERR_VEH_POWER] = "No power cell", - [ERR_VEH_ENERGY] = "No more energy", - [ERR_FLAG_FLY] = "Impossible when flying", - [ERR_FLAG_WATER] = "Impossible when swimming", - [ERR_FLAG_MOTOR] = "Impossible when moving", - [ERR_FLAG_BUSY] = "Impossible when carrying an object", - [ERR_FLAG_CREATE] = "Too many flags of this color (maximum 5)", - [ERR_FLAG_PROXY] = "Too close to an existing flag", - [ERR_FLAG_DELETE] = "No flag nearby", - [ERR_MISSION_NOTERM] = "The mission is not accomplished yet (press \\key help; for more details)", - [ERR_DELETEMOBILE] = "Bot destroyed", - [ERR_DELETEBUILDING] = "Building destroyed", - [ERR_TOOMANY] = "Can not create this, there are too many objects", - [ERR_OBLIGATORYTOKEN] = "\"%s\" missing in this exercise", - [ERR_PROHIBITEDTOKEN] = "Do not use in this exercise", - - [INFO_BUILD] = "Building completed", - [INFO_CONVERT] = "Titanium available", - [INFO_RESEARCH] = "Research program completed", - [INFO_RESEARCHTANK] = "Plans for tracked robots available ", - [INFO_RESEARCHFLY] = "You can fly with the keys (\\key gup;) and (\\key gdown;)", - [INFO_RESEARCHTHUMP] = "Plans for thumper available", - [INFO_RESEARCHCANON] = "Plans for shooter available", - [INFO_RESEARCHTOWER] = "Plans for defense tower available", - [INFO_RESEARCHPHAZER] = "Plans for phazer shooter available", - [INFO_RESEARCHSHIELD] = "Plans for shielder available", - [INFO_RESEARCHATOMIC] = "Plans for nuclear power plant available", - [INFO_FACTORY] = "New bot available", - [INFO_LABO] = "Analysis performed", - [INFO_ENERGY] = "Power cell available", - [INFO_NUCLEAR] = "Nuclear power cell available", - [INFO_FINDING] = "You found a usable object", - [INFO_MARKPOWER] = "Found a site for power station", - [INFO_MARKURANIUM] = "Found a site for a derrick", - [INFO_MARKSTONE] = "Found a site for a derrick", - [INFO_MARKKEYa] = "Found a site for a derrick", - [INFO_MARKKEYb] = "Found a site for a derrick", - [INFO_MARKKEYc] = "Found a site for a derrick", - [INFO_MARKKEYd] = "Found a site for a derrick", - [INFO_WIN] = "<<< Well done, mission accomplished >>>", - [INFO_LOST] = "<<< Sorry, mission failed >>>", - [INFO_LOSTq] = "<<< Sorry, mission failed >>>", - [INFO_WRITEOK] = "Current mission saved", - [INFO_DELETEPATH] = "Checkpoint crossed", - [INFO_DELETEMOTHER] = "Alien Queen killed", - [INFO_DELETEANT] = "Ant fatally wounded", - [INFO_DELETEBEE] = "Wasp fatally wounded", - [INFO_DELETEWORM] = "Worm fatally wounded", - [INFO_DELETESPIDER] = "Spider fatally wounded", - [INFO_BEGINSATCOM] = "Press \\key help; to read instructions on your SatCom" -}; - -const char * const strings_cbot[] = -{ - [TX_OPENPAR] = "Opening bracket missing", - [TX_CLOSEPAR] = "Closing bracket missing ", - [TX_NOTBOOL] = "The expression must return a boolean value", - [TX_UNDEFVAR] = "Variable not declared", - [TX_BADLEFT] = "Assignment impossible", - [TX_ENDOF] = "Semicolon terminator missing", - [TX_OUTCASE] = "Instruction \"case\" outside a block \"switch\"", - [TX_NOTERM] = "Instructions after the final closing brace", - [TX_CLOSEBLK] = "End of block missing", - [TX_ELSEWITHOUTIF] = "Instruction \"else\" without corresponding \"if\" ", - [TX_OPENBLK] = "Opening brace missing ", - [TX_BADTYPE] = "Wrong type for the assignment", - [TX_REDEFVAR] = "A variable can not be declared twice", - [TX_BAD2TYPE] = "The types of the two operands are incompatible ", - [TX_UNDEFCALL] = "Unknown function", - [TX_MISDOTS] = "Sign \" : \" missing", - [TX_WHILE] = "Keyword \"while\" missing", - [TX_BREAK] = "Instruction \"break\" outside a loop", - [TX_LABEL] = "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"", - [TX_NOLABEL] = "This label does not exist", - [TX_NOCASE] = "Instruction \"case\" missing", - [TX_BADNUM] = "Number missing", - [TX_VOID] = "Void parameter", - [TX_NOTYP] = "Type declaration missing", - [TX_NOVAR] = "Variable name missing", - [TX_NOFONC] = "Function name missing", - [TX_OVERPARAM] = "Too many parameters", - [TX_REDEF] = "Function already exists", - [TX_LOWPARAM] = "Parameters missing ", - [TX_BADPARAM] = "No function with this name accepts this kind of parameter", - [TX_NUMPARAM] = "No function with this name accepts this number of parameters", - [TX_NOITEM] = "This is not a member of this class", - [TX_DOT] = "This object is not a member of a class", - [TX_NOCONST] = "Appropriate constructor missing", - [TX_REDEFCLASS] = "This class already exists", - [TX_CLBRK] = "\" ] \" missing", - [TX_RESERVED] = "Reserved keyword of CBOT language", - [TX_BADNEW] = "Bad argument for \"new\"", - [TX_OPBRK] = "\" [ \" expected", - [TX_BADSTRING] = "String missing", - [TX_BADINDEX] = "Incorrect index type", - [TX_PRIVATE] = "Private element", - [TX_NOPUBLIC] = "Public required", - [TX_DIVZERO] = "Dividing by zero", - [TX_NOTINIT] = "Variable not initialized", - [TX_BADTHROW] = "Negative value rejected by \"throw\"", - [TX_NORETVAL] = "The function returned no value ", - [TX_NORUN] = "No function running", - [TX_NOCALL] = "Calling an unknown function", - [TX_NOCLASS] = "This class does not exist", - [TX_NULLPT] = "Unknown Object", - [TX_OPNAN] = "Operation impossible with value \"nan\"", - [TX_OUTARRAY] = "Access beyond array limit", - [TX_STACKOVER] = "Stack overflow", - [TX_DELETEDPT] = "Illegal object", - [TX_FILEOPEN] = "Can't open file", - [TX_NOTOPEN] = "File not open", - [TX_ERRREAD] = "Read error", - [TX_ERRWRITE] = "Write error" -}; - -#define N_ELTS(Array) (sizeof(Array) / sizeof(Array[0])) - -const int strings_text_len = N_ELTS(strings_text); -const int strings_event_len = N_ELTS(strings_event); -const int strings_object_len = N_ELTS(strings_object); -const int strings_err_len = N_ELTS(strings_err); -const int strings_cbot_len = N_ELTS(strings_cbot); diff --git a/src/common/singleton.h b/src/common/singleton.h index 7407504..c1b28d9 100644 --- a/src/common/singleton.h +++ b/src/common/singleton.h @@ -19,7 +19,6 @@ * \brief CSingleton base class for singletons */ - #pragma once #include <cassert> diff --git a/src/common/stringutils.cpp b/src/common/stringutils.cpp index 12a3179..db486f0 100644 --- a/src/common/stringutils.cpp +++ b/src/common/stringutils.cpp @@ -14,9 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// stringutils.cpp -#include "stringutils.h" +#include "common/stringutils.h" std::string StrUtils::Replace(const std::string &str, const std::string &oldStr, const std::string &newStr) |