diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c40d00f..1297c73b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,14 +1,12 @@ # CBot shared library is built separately add_subdirectory(CBot) -<<<<<<< HEAD # Tools directory is built separately add_subdirectory(tools) # Tests add_subdirectory(graphics/engine/test) -======= ->>>>>>> dev-ui +add_subdirectory(math/test) # Configure options @@ -67,12 +65,11 @@ app/main.cpp app/system.cpp common/event.cpp common/image.cpp -common/logger.cpp common/iman.cpp -# common/metafile.cpp -# common/misc.cpp -# common/modfile.cpp -# common/profile.cpp +common/logger.cpp +common/metafile.cpp +common/misc.cpp +common/profile.cpp common/restext.cpp common/restext_strings.c common/stringutils.cpp @@ -116,8 +113,8 @@ object/auto/autoroot.cpp object/auto/autosafe.cpp object/auto/autostation.cpp object/auto/autotower.cpp -# object/brain.cpp -# object/mainmovie.cpp +object/brain.cpp +object/mainmovie.cpp object/motion/motion.cpp object/motion/motionant.cpp object/motion/motionbee.cpp @@ -154,33 +151,32 @@ physics/physics.cpp script/cbottoken.cpp script/cmdtoken.cpp script/script.cpp -# sound/sound.cpp -# ui/button.cpp -# ui/check.cpp -# ui/color.cpp -# ui/compass.cpp +ui/button.cpp +ui/check.cpp +ui/color.cpp +ui/compass.cpp ui/control.cpp -# ui/displayinfo.cpp -# ui/displaytext.cpp +ui/displayinfo.cpp +ui/displaytext.cpp ui/edit.cpp -# ui/editvalue.cpp -# ui/gauge.cpp -# ui/group.cpp -# ui/image.cpp -# ui/interface.cpp -# ui/key.cpp -# ui/label.cpp -# ui/list.cpp +ui/editvalue.cpp +ui/gauge.cpp +ui/group.cpp +ui/image.cpp +ui/interface.cpp +ui/key.cpp +ui/label.cpp +ui/list.cpp # ui/maindialog.cpp -# ui/mainmap.cpp -# ui/mainshort.cpp -# ui/map.cpp -# ui/scroll.cpp -# ui/shortcut.cpp -# ui/slider.cpp +ui/mainmap.cpp +ui/mainshort.cpp +ui/map.cpp +ui/scroll.cpp +ui/shortcut.cpp +ui/slider.cpp # ui/studio.cpp -# ui/target.cpp -# ui/window.cpp +ui/target.cpp +ui/window.cpp ) set(LIBS @@ -194,7 +190,10 @@ ${PLATFORM_LIBS} CBot ) -include_directories(. ${CMAKE_CURRENT_BINARY_DIR} +include_directories( +. +.. +${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR} ${SDL_IMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR} diff --git a/src/app/app.cpp b/src/app/app.cpp index 00cd13d1..6e336a23 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -29,10 +29,13 @@ #include #include -#include +#include + +#include +#include -template<> CApplication* CSingleton::mInstance = NULL; +template<> CApplication* CSingleton::mInstance = nullptr; //! Interval of timer called to update joystick state @@ -62,8 +65,8 @@ struct ApplicationPrivate ApplicationPrivate() { memset(¤tEvent, 0, sizeof(SDL_Event)); - surface = NULL; - joystick = NULL; + surface = nullptr; + joystick = nullptr; joystickTimer = 0; } }; @@ -76,14 +79,10 @@ CApplication::CApplication() m_iMan = new CInstanceManager(); m_eventQueue = new CEventQueue(m_iMan); - m_engine = NULL; - m_device = NULL; - m_robotMain = NULL; - m_sound = NULL; - - m_keyState = 0; - m_axeKey = Math::Vector(0.0f, 0.0f, 0.0f); - m_axeJoy = Math::Vector(0.0f, 0.0f, 0.0f); + m_engine = nullptr; + m_device = nullptr; + m_robotMain = nullptr; + m_sound = nullptr; m_exitCode = 0; m_active = false; @@ -91,29 +90,64 @@ CApplication::CApplication() m_windowTitle = "COLOBOT"; + m_simulationSuspended = false; + + m_simulationSpeed = 1.0f; + + m_realAbsTimeBase = 0LL; + m_realAbsTime = 0LL; + m_realRelTime = 0LL; + + m_absTimeBase = 0LL; + m_exactAbsTime = 0LL; + m_exactRelTime = 0LL; + + m_absTime = 0.0f; + m_relTime = 0.0f; + + m_baseTimeStamp = CreateTimeStamp(); + m_curTimeStamp = CreateTimeStamp(); + m_lastTimeStamp = CreateTimeStamp(); + m_joystickEnabled = false; + m_kmodState = 0; + m_mouseButtonsState = 0; + + for (int i = 0; i < TRKEY_MAX; ++i) + m_trackedKeysState[i] = false; + + m_keyMotion = Math::Vector(0.0f, 0.0f, 0.0f); + m_joyMotion = Math::Vector(0.0f, 0.0f, 0.0f); + m_dataPath = "./data"; - ResetKey(); + m_language = LANG_ENGLISH; + + SetDefaultInputBindings(); } CApplication::~CApplication() { delete m_private; - m_private = NULL; + m_private = nullptr; delete m_eventQueue; - m_eventQueue = NULL; + m_eventQueue = nullptr; delete m_iMan; - m_iMan = NULL; + m_iMan = nullptr; + + DestroyTimeStamp(m_baseTimeStamp); + DestroyTimeStamp(m_curTimeStamp); + DestroyTimeStamp(m_lastTimeStamp); } bool CApplication::ParseArguments(int argc, char *argv[]) { bool waitDataDir = false; bool waitLogLevel = false; + bool waitLanguage = false; for (int i = 1; i < argc; ++i) { @@ -123,6 +157,7 @@ bool CApplication::ParseArguments(int argc, char *argv[]) { waitDataDir = false; m_dataPath = arg; + GetLogger()->Info("Using custom data dir: '%s'\n", m_dataPath.c_str()); continue; } @@ -146,6 +181,22 @@ bool CApplication::ParseArguments(int argc, char *argv[]) continue; } + if (waitLanguage) + { + waitLanguage = false; + if (arg == "en") + m_language = LANG_ENGLISH; + else if (arg == "de") + m_language = LANG_GERMAN; + else if (arg == "fr") + m_language = LANG_FRENCH; + else if (arg == "pl") + m_language = LANG_POLISH; + else + return false; + continue; + } + if (arg == "-debug") { SetDebugMode(true); @@ -158,6 +209,21 @@ bool CApplication::ParseArguments(int argc, char *argv[]) { waitDataDir = true; } + else if (arg == "-language") + { + waitLanguage = true; + } + else if (arg == "-help") + { + GetLogger()->Message("COLOBOT\n"); + GetLogger()->Message("\n"); + GetLogger()->Message("List of available options:\n"); + GetLogger()->Message(" -help this help\n"); + GetLogger()->Message(" -datadir path set custom data directory path\n"); + GetLogger()->Message(" -debug enable debug mode (more info printed in logs)\n"); + GetLogger()->Message(" -loglevel level set log level to level (one of: trace, debug, info, warn, error, none)\n"); + GetLogger()->Message(" -language lang set language (one of: en, de, fr, pl)\n"); + } else { m_exitCode = 1; @@ -166,7 +232,7 @@ bool CApplication::ParseArguments(int argc, char *argv[]) } // Args not given? - if (waitDataDir || waitLogLevel) + if (waitDataDir || waitLogLevel || waitLanguage) return false; return true; @@ -176,7 +242,50 @@ bool CApplication::Create() { GetLogger()->Info("Creating CApplication\n"); - // TODO: verify that data directory exists + // I know, a primitive way to check for dir, but works + std::string readmePath = m_dataPath + "/README.txt"; + std::ifstream testReadme; + testReadme.open(readmePath.c_str(), std::ios_base::in); + if (!testReadme.good()) + { + GetLogger()->Error("Could not open test file in data dir: '%s'\n", readmePath.c_str()); + m_errorMessage = std::string("Could not read from data directory:\n") + + std::string("'") + m_dataPath + std::string("'\n") + + std::string("Please check your installation, or supply a valid data directory by -datadir option."); + m_exitCode = 1; + return false; + } + + /* Gettext initialization */ + + std::string locale = "C"; + switch (m_language) + { + case LANG_ENGLISH: + locale = "en_US.utf8"; + break; + + case LANG_GERMAN: + locale = "de_DE.utf8"; + break; + + case LANG_FRENCH: + locale = "fr_FR.utf8"; + break; + + case LANG_POLISH: + locale = "pl_PL.utf8"; + break; + } + + setlocale(LC_ALL, locale.c_str()); + + std::string trPath = m_dataPath + std::string("/i18n"); + bindtextdomain("colobot", trPath.c_str()); + bind_textdomain_codeset("colobot", "UTF-8"); + textdomain("colobot"); + + GetLogger()->Debug("Testing gettext translation: '%s'\n", gettext("Colobot rules!")); // Temporarily -- only in windowed mode m_deviceConfig.fullScreen = false; @@ -218,7 +327,7 @@ bool CApplication::Create() if (! CreateVideoSurface()) return false; // dialog is in function - if (m_private->surface == NULL) + if (m_private->surface == nullptr) { m_errorMessage = std::string("SDL error while setting video mode:\n") + std::string(SDL_GetError()); @@ -269,7 +378,7 @@ bool CApplication::Create() bool CApplication::CreateVideoSurface() { const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo(); - if (videoInfo == NULL) + if (videoInfo == nullptr) { m_errorMessage = std::string("SDL error while getting video info:\n ") + std::string(SDL_GetError()); @@ -321,44 +430,44 @@ bool CApplication::CreateVideoSurface() void CApplication::Destroy() { - /*if (m_robotMain != NULL) + /*if (m_robotMain != nullptr) { delete m_robotMain; - m_robotMain = NULL; + m_robotMain = nullptr; } - if (m_sound != NULL) + if (m_sound != nullptr) { delete m_sound; - m_sound = NULL; + m_sound = nullptr; }*/ - if (m_engine != NULL) + if (m_engine != nullptr) { m_engine->Destroy(); delete m_engine; - m_engine = NULL; + m_engine = nullptr; } - if (m_device != NULL) + if (m_device != nullptr) { m_device->Destroy(); delete m_device; - m_device = NULL; + m_device = nullptr; } - if (m_private->joystick != NULL) + if (m_private->joystick != nullptr) { SDL_JoystickClose(m_private->joystick); - m_private->joystick = NULL; + m_private->joystick = nullptr; } - if (m_private->surface != NULL) + if (m_private->surface != nullptr) { SDL_FreeSurface(m_private->surface); - m_private->surface = NULL; + m_private->surface = nullptr; } IMG_Quit(); @@ -383,7 +492,7 @@ bool CApplication::ChangeVideoConfig(const Gfx::GLDeviceConfig &newConfig) return false; } - if (m_private->surface == NULL) + if (m_private->surface == nullptr) { if (! restore) { @@ -426,7 +535,7 @@ bool CApplication::OpenJoystick() return false; m_private->joystick = SDL_JoystickOpen(m_joystick.index); - if (m_private->joystick == NULL) + if (m_private->joystick == nullptr) return false; m_joystick.axisCount = SDL_JoystickNumAxes(m_private->joystick); @@ -437,7 +546,7 @@ bool CApplication::OpenJoystick() m_joyButtonState = std::vector(m_joystick.buttonCount, false); // Create a timer for polling joystick state - m_private->joystickTimer = SDL_AddTimer(JOYSTICK_TIMER_INTERVAL, JoystickTimerCallback, NULL); + m_private->joystickTimer = SDL_AddTimer(JOYSTICK_TIMER_INTERVAL, JoystickTimerCallback, nullptr); return true; } @@ -447,7 +556,7 @@ void CApplication::CloseJoystick() // Timer will remove itself automatically SDL_JoystickClose(m_private->joystick); - m_private->joystick = NULL; + m_private->joystick = nullptr; } bool CApplication::ChangeJoystick(const JoystickDevice &newJoystick) @@ -455,7 +564,7 @@ bool CApplication::ChangeJoystick(const JoystickDevice &newJoystick) if ( (newJoystick.index < 0) || (newJoystick.index >= SDL_NumJoysticks()) ) return false; - if (m_private->joystick != NULL) + if (m_private->joystick != nullptr) CloseJoystick(); return OpenJoystick(); @@ -464,7 +573,7 @@ bool CApplication::ChangeJoystick(const JoystickDevice &newJoystick) Uint32 JoystickTimerCallback(Uint32 interval, void *) { CApplication *app = CApplication::GetInstancePointer(); - if ((app == NULL) || (! app->GetJoystickEnabled())) + if ((app == nullptr) || (! app->GetJoystickEnabled())) return 0; // don't run the timer again app->UpdateJoystick(); @@ -540,6 +649,10 @@ int CApplication::Run() { m_active = true; + GetCurrentTimeStamp(m_baseTimeStamp); + GetCurrentTimeStamp(m_lastTimeStamp); + GetCurrentTimeStamp(m_curTimeStamp); + while (true) { // To be sure no old event remains @@ -577,7 +690,7 @@ int CApplication::Run() { bool passOn = ProcessEvent(event); - if (m_engine != NULL && passOn) + if (m_engine != nullptr && passOn) passOn = m_engine->ProcessEvent(event); if (passOn) @@ -602,11 +715,11 @@ int CApplication::Run() { passOn = ProcessEvent(event); - if (passOn && m_engine != NULL) + if (passOn && m_engine != nullptr) passOn = m_engine->ProcessEvent(event); } - /*if (passOn && m_robotMain != NULL) + /*if (passOn && m_robotMain != nullptr) m_robotMain->ProcessEvent(event); */ } @@ -616,6 +729,9 @@ int CApplication::Run() // Update game and render a frame during idle time (no messages are waiting) Render(); + + // Update simulation state + StepSimulation(); } } @@ -734,9 +850,76 @@ bool CApplication::ProcessEvent(const Event &event) if (event.type == EVENT_ACTIVE) { - m_active = event.active.gain; if (m_debugMode) - l->Info("Focus change: active = %s\n", m_active ? "true" : "false"); + l->Info("Focus change: active = %s\n", event.active.gain ? "true" : "false"); + + if (m_active != event.active.gain) + { + m_active = event.active.gain; + + if (m_active) + ResumeSimulation(); + else + SuspendSimulation(); + } + } + else if (event.type == EVENT_KEY_DOWN) + { + m_kmodState = event.key.mod; + + if ((m_kmodState & KEY_MOD(SHIFT)) != 0) + m_trackedKeysState[TRKEY_SHIFT] = true; + else if ((m_kmodState & KEY_MOD(CTRL)) != 0) + m_trackedKeysState[TRKEY_CONTROL] = true; + else if (event.key.key == KEY(KP8)) + m_trackedKeysState[TRKEY_NUM_UP] = true; + else if (event.key.key == KEY(KP2)) + m_trackedKeysState[TRKEY_NUM_DOWN] = true; + else if (event.key.key == KEY(KP4)) + m_trackedKeysState[TRKEY_NUM_LEFT] = true; + else if (event.key.key == KEY(KP6)) + m_trackedKeysState[TRKEY_NUM_RIGHT] = true; + else if (event.key.key == KEY(KP_PLUS)) + m_trackedKeysState[TRKEY_NUM_PLUS] = true; + else if (event.key.key == KEY(KP_MINUS)) + m_trackedKeysState[TRKEY_NUM_MINUS] = true; + else if (event.key.key == KEY(PAGEUP)) + m_trackedKeysState[TRKEY_PAGE_UP] = true; + else if (event.key.key == KEY(PAGEDOWN)) + m_trackedKeysState[TRKEY_PAGE_DOWN] = true; + } + else if (event.type == EVENT_KEY_UP) + { + m_kmodState = event.key.mod; + + if ((m_kmodState & KEY_MOD(SHIFT)) != 0) + m_trackedKeysState[TRKEY_SHIFT] = false; + else if ((m_kmodState & KEY_MOD(CTRL)) != 0) + m_trackedKeysState[TRKEY_CONTROL] = false; + else if (event.key.key == KEY(KP8)) + m_trackedKeysState[TRKEY_NUM_UP] = false; + else if (event.key.key == KEY(KP2)) + m_trackedKeysState[TRKEY_NUM_DOWN] = false; + else if (event.key.key == KEY(KP4)) + m_trackedKeysState[TRKEY_NUM_LEFT] = false; + else if (event.key.key == KEY(KP6)) + m_trackedKeysState[TRKEY_NUM_RIGHT] = false; + else if (event.key.key == KEY(KP_PLUS)) + m_trackedKeysState[TRKEY_NUM_PLUS] = false; + else if (event.key.key == KEY(KP_MINUS)) + m_trackedKeysState[TRKEY_NUM_MINUS] = false; + else if (event.key.key == KEY(PAGEUP)) + m_trackedKeysState[TRKEY_PAGE_UP] = false; + else if (event.key.key == KEY(PAGEDOWN)) + m_trackedKeysState[TRKEY_PAGE_DOWN] = false; + } + else if (event.type == EVENT_MOUSE_BUTTON_DOWN) + { + m_mouseButtonsState |= 1 << event.mouseButton.button; + } + else if (event.type == EVENT_MOUSE_BUTTON_UP) + { + m_mouseButtonsState &= ~(1 << event.mouseButton.button); } // Print the events in debug mode to test the code @@ -798,9 +981,101 @@ void CApplication::Render() SDL_GL_SwapBuffers(); } -void CApplication::StepSimulation(float rTime) +void CApplication::SuspendSimulation() { - // TODO + m_simulationSuspended = true; + GetLogger()->Info("Suspend simulation\n"); +} + +void CApplication::ResumeSimulation() +{ + m_simulationSuspended = false; + + GetCurrentTimeStamp(m_baseTimeStamp); + CopyTimeStamp(m_curTimeStamp, m_baseTimeStamp); + m_realAbsTimeBase = m_realAbsTime; + m_absTimeBase = m_exactAbsTime; + + GetLogger()->Info("Resume simulation\n"); +} + +bool CApplication::GetSimulationSuspended() +{ + return m_simulationSuspended; +} + +void CApplication::SetSimulationSpeed(float speed) +{ + m_simulationSpeed = speed; + + GetCurrentTimeStamp(m_baseTimeStamp); + m_realAbsTimeBase = m_realAbsTime; + m_absTimeBase = m_exactAbsTime; + + GetLogger()->Info("Simulation speed = %.2f\n", speed); +} + +void CApplication::StepSimulation() +{ + if (m_simulationSuspended) + return; + + CopyTimeStamp(m_lastTimeStamp, m_curTimeStamp); + GetCurrentTimeStamp(m_curTimeStamp); + + long long absDiff = TimeStampExactDiff(m_baseTimeStamp, m_curTimeStamp); + m_realAbsTime = m_realAbsTimeBase + absDiff; + // m_baseTimeStamp is updated on simulation speed change, so this is OK + m_exactAbsTime = m_absTimeBase + m_simulationSpeed * absDiff; + m_absTime = (m_absTimeBase + m_simulationSpeed * absDiff) / 1e9f; + + m_realRelTime = TimeStampExactDiff(m_lastTimeStamp, m_curTimeStamp); + m_exactRelTime = m_simulationSpeed * m_realRelTime; + m_relTime = (m_simulationSpeed * m_realRelTime) / 1e9f; + + + m_engine->FrameUpdate(); + //m_sound->FrameMove(m_relTime); + + + Event frameEvent(EVENT_FRAME); + frameEvent.rTime = m_relTime; + m_eventQueue->AddEvent(frameEvent); +} + +float CApplication::GetSimulationSpeed() +{ + return m_simulationSpeed; +} + +float CApplication::GetAbsTime() +{ + return m_absTime; +} + +long long CApplication::GetExactAbsTime() +{ + return m_exactAbsTime; +} + +long long CApplication::GetRealAbsTime() +{ + return m_realAbsTime; +} + +float CApplication::GetRelTime() +{ + return m_relTime; +} + +long long CApplication::GetExactRelTime() +{ + return m_exactRelTime; +} + +long long CApplication::GetRealRelTime() +{ + return m_realRelTime; } Gfx::GLDeviceConfig CApplication::GetVideoConfig() @@ -814,7 +1089,7 @@ VideoQueryResult CApplication::GetVideoResolutionList(std::vector GetJoystickList(); @@ -159,10 +266,11 @@ public: //! Change the current joystick device bool ChangeJoystick(const JoystickDevice &newJoystick); - //! Enables/disables joystick + //! Management of joystick enable state + //@{ void SetJoystickEnabled(bool enable); - //! Returns whether joystick is enabled bool GetJoystickEnabled(); + //@} //! Polls the state of joystick axes and buttons void UpdateJoystick(); @@ -170,34 +278,66 @@ public: //! Updates the mouse position explicitly void UpdateMouse(); - void FlushPressKey(); - void ResetKey(); - void SetKey(int keyRank, int option, int key); - int GetKey(int keyRank, int option); + //! Returns the current key modifiers + int GetKmods(); + //! Returns whether the given kmod is active + bool GetKmodState(int kmod); - //! Sets the grab mode for input (keyboard & mouse) + //! Returns whether the tracked key is pressed + bool GetTrackedKeyState(TrackedKey key); + + //! Returns whether the mouse button is pressed + bool GetMouseButtonState(int index); + + //! Resets tracked key states, modifiers and motion vectors + void ResetKeyStates(); + + + // TODO move input binding and motion vectors to CRobotMain + + //! Sets the default input bindings + void SetDefaultInputBindings(); + + //! Management of input bindings + //@{ + void SetInputBinding(InputSlot slot, const InputBinding& binding); + const InputBinding& GetInputBinding(InputSlot slot); + //@} + + + //! Management of the grab mode for input (keyboard & mouse) + //@{ void SetGrabInput(bool grab); - //! Returns the grab mode bool GetGrabInput(); + //@} - //! Sets the visiblity of system mouse cursor + //! Management of the visiblity of system mouse cursor + //@{ void SetSystemMouseVisible(bool visible); - //! Returns the visiblity of system mouse cursor bool GetSystemMouseVisibile(); + //@} - //! Sets the position of system mouse cursor (in interface coords) + //! Management of the position of system mouse cursor (in interface coords) + //@{ void SetSystemMousePos(Math::Point pos); - //! Returns the position of system mouse cursor (in interface coords) Math::Point GetSystemMousePos(); + //@} - //! Enables/disables debug mode (prints more info in logger) + //! Management of debug mode (prints more info in logger) + //@{ void SetDebugMode(bool mode); - //! Returns whether debug mode is enabled bool GetDebugMode(); + //@} //! Returns the full path to a file in data directory std::string GetDataFilePath(const std::string &dirName, const std::string &fileName); + //! Management of language + //@{ + Language GetLanguage(); + void SetLanguage(Language language); + //@} + protected: //! Creates the window's SDL_Surface bool CreateVideoSurface(); @@ -248,13 +388,44 @@ protected: //! Text set as window title std::string m_windowTitle; - int m_keyState; - Math::Vector m_axeKey; - Math::Vector m_axeJoy; - Math::Point m_systemMousePos; - long m_mouseWheel; + //! Animation time stamps, etc. + //@{ + SystemTimeStamp* m_baseTimeStamp; + SystemTimeStamp* m_lastTimeStamp; + SystemTimeStamp* m_curTimeStamp; - long m_key[50][2]; + long long m_realAbsTimeBase; + long long m_realAbsTime; + long long m_realRelTime; + + long long m_absTimeBase; + long long m_exactAbsTime; + long long m_exactRelTime; + + float m_absTime; + float m_relTime; + + float m_simulationSpeed; + bool m_simulationSuspended; + //@} + + //! Current state of key modifiers (mask of SDLMod) + unsigned int m_kmodState; + //! Current state of some tracked keys (mask of TrackedKey) + bool m_trackedKeysState[TRKEY_MAX]; + //! Current state of mouse buttons (mask of button indexes) + unsigned int m_mouseButtonsState; + + //! Bindings for user inputs + InputBinding m_inputBindings[INPUT_SLOT_MAX]; + + //! Motion vector set by keyboard + Math::Vector m_keyMotion; + //! Motion vector set by joystick + Math::Vector m_joyMotion; + + //! Current system mouse position + Math::Point m_systemMousePos; //! Info about current joystick device JoystickDevice m_joystick; @@ -267,5 +438,8 @@ protected: //! Path to directory with data files std::string m_dataPath; + + //! Application language + Language m_language; }; diff --git a/src/common/error_ids.h b/src/common/error_ids.h index b17a0189..fc1f7d67 100644 --- a/src/common/error_ids.h +++ b/src/common/error_ids.h @@ -14,6 +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/. + +// TODO: move to global.h after restext rewrite + #pragma once enum Error @@ -23,8 +26,6 @@ enum Error ERR_CONTINUE = 2, // continues ERR_STOP = 3, // stops ERR_CMD = 4, // unknown command - ERR_INSTALL = 20, // incorrectly installed program - ERR_NOCD = 21, // CD not found ERR_MANIP_VEH = 100, // inappropriate vehicle ERR_MANIP_FLY = 101, // impossible in flight ERR_MANIP_BUSY = 102, // taking: hands already occupied diff --git a/src/common/event.cpp b/src/common/event.cpp index 6a5f4d39..d082ba9a 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -19,6 +19,16 @@ #include "common/event.h" #include "common/iman.h" +static EventType g_uniqueEventType = EVENT_USER; + + +EventType GetUniqueEventType() +{ + int i = (int)g_uniqueEventType+1; + g_uniqueEventType = (EventType)i; + return g_uniqueEventType; +} + CEventQueue::CEventQueue(CInstanceManager* iMan) diff --git a/src/common/event.h b/src/common/event.h index 31929315..4df1e6db 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -14,17 +14,17 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// event.h +/** + * \file common/event.h + * \brief Event types, structs and event queue + */ #pragma once -#include -#include -#include - -#include - +#include "common/key.h" +#include "common/event_ids.h" +#include "math/point.h" class CInstanceManager; @@ -171,13 +171,19 @@ struct Event ActiveEventData active; }; - // TODO: refactor/rewrite + // TODO: remove long param; // parameter + + // TODO: remove? Math::Point pos; // mouse position (0 .. 1) + + // TODO: ? float axeX; // control the X axis (-1 .. 1) float axeY; // control of the Y axis (-1 .. 1) float axeZ; // control the Z axis (-1 .. 1) short keyState; // state of the keyboard (KS_ *) + + // TODO: remove in longer term (use CApplication's new time functions instead) float rTime; // relative time Event(EventType aType = EVENT_NULL) @@ -193,40 +199,8 @@ struct Event }; -/** - \enum KeyRank - \brief Slots for key assignment of user controls - */ - -// TODO: move to global.h ? - -enum KeyRank -{ - KEYRANK_LEFT = 0, - KEYRANK_RIGHT = 1, - KEYRANK_UP = 2, - KEYRANK_DOWN = 3, - KEYRANK_GUP = 4, - KEYRANK_GDOWN = 5, - KEYRANK_CAMERA = 6, - KEYRANK_DESEL = 7, - KEYRANK_ACTION = 8, - KEYRANK_NEAR = 9, - KEYRANK_AWAY = 10, - KEYRANK_NEXT = 11, - KEYRANK_HUMAN = 12, - KEYRANK_QUIT = 13, - KEYRANK_HELP = 14, - KEYRANK_PROG = 15, - KEYRANK_VISIT = 16, - KEYRANK_SPEED10 = 17, - KEYRANK_SPEED15 = 18, - KEYRANK_SPEED20 = 19, - KEYRANK_SPEED30 = 20, - KEYRANK_AIMUP = 21, - KEYRANK_AIMDOWN = 22, - KEYRANK_CBOT = 23, -}; +//! Returns an unique event type (above the standard IDs) +EventType GetUniqueEventType(); /** @@ -261,5 +235,3 @@ protected: int m_tail; int m_total; }; - - diff --git a/src/common/event_ids.h b/src/common/event_ids.h index ab235d54..1bbc9bec 100644 --- a/src/common/event_ids.h +++ b/src/common/event_ids.h @@ -14,6 +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/. + +// TODO: move to event.h after restext rewrite + #pragma once /** diff --git a/src/common/global.h b/src/common/global.h index 670c578d..88f753ea 100644 --- a/src/common/global.h +++ b/src/common/global.h @@ -14,53 +14,111 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// global.h +/** + * \file common/global.h + * \brief Some common, global definitions + */ #pragma once +#include "error_ids.h" +/** + * \enum Language + * \brief Application language + */ +enum Language +{ + LANG_ENGLISH = 0, + LANG_FRENCH = 1, + LANG_GERMAN = 2, + LANG_POLISH = 3 +}; + +/** + * \enum BuildType + * \brief Construction actions (buildings, etc.) available to user + * + * TODO: refactor + */ enum BuildType { - BUILD_FACTORY = (1<<0), // factory - BUILD_DERRICK = (1<<1), // derrick - BUILD_CONVERT = (1<<2), // converter - BUILD_RADAR = (1<<3), // radar - BUILD_ENERGY = (1<<4), // factory of cells - BUILD_NUCLEAR = (1<<5), // nuclear power plant - BUILD_STATION = (1<<6), // base station - BUILD_REPAIR = (1<<7), // repair center - BUILD_TOWER = (1<<8), // defense tower - BUILD_RESEARCH = (1<<9), // research center - BUILD_LABO = (1<<10), // laboratory - BUILD_PARA = (1<<11), // lightning protection - BUILD_INFO = (1<<12), // information terminal - BUILD_GFLAT = (1<<16), // flat floor - BUILD_FLAG = (1<<17) // puts / removes colored flag + BUILD_FACTORY = (1<<0), //! < factory + BUILD_DERRICK = (1<<1), //! < derrick + BUILD_CONVERT = (1<<2), //! < converter + BUILD_RADAR = (1<<3), //! < radar + BUILD_ENERGY = (1<<4), //! < factory of cells + BUILD_NUCLEAR = (1<<5), //! < nuclear power plant + BUILD_STATION = (1<<6), //! < base station + BUILD_REPAIR = (1<<7), //! < repair center + BUILD_TOWER = (1<<8), //! < defense tower + BUILD_RESEARCH = (1<<9), //! < research center + BUILD_LABO = (1<<10), //! < laboratory + BUILD_PARA = (1<<11), //! < lightning protection + BUILD_INFO = (1<<12), //! < information terminal + BUILD_GFLAT = (1<<16), //! < flat floor + BUILD_FLAG = (1<<17) //! < puts / removes colored flag }; - -// Do not change values ​​was because of backups (bits = ...). +/** + * \enum ResearchType + * \brief Research actions available to user + */ enum ResearchType { - RESEARCH_TANK = (1<<0), // caterpillars - RESEARCH_FLY = (1<<1), // wings - RESEARCH_CANON = (1<<2), // cannon - RESEARCH_TOWER = (1<<3), // defense tower - RESEARCH_ATOMIC = (1<<4), // nuclear - RESEARCH_THUMP = (1<<5), // thumper - RESEARCH_SHIELD = (1<<6), // shield - RESEARCH_PHAZER = (1<<7), // phazer gun - RESEARCH_iPAW = (1<<8), // legs of insects - RESEARCH_iGUN = (1<<9), // cannon of insects - RESEARCH_RECYCLER = (1<<10), // recycler - RESEARCH_SUBM = (1<<11), // submarine - RESEARCH_SNIFFER = (1<<12) // sniffer + RESEARCH_TANK = (1<<0), //! < caterpillars + RESEARCH_FLY = (1<<1), //! < wings + RESEARCH_CANON = (1<<2), //! < cannon + RESEARCH_TOWER = (1<<3), //! < defense tower + RESEARCH_ATOMIC = (1<<4), //! < nuclear + RESEARCH_THUMP = (1<<5), //! < thumper + RESEARCH_SHIELD = (1<<6), //! < shield + RESEARCH_PHAZER = (1<<7), //! < phazer gun + RESEARCH_iPAW = (1<<8), //! < legs of insects + RESEARCH_iGUN = (1<<9), //! < cannon of insects + RESEARCH_RECYCLER = (1<<10), //! < recycler + RESEARCH_SUBM = (1<<11), //! < submarine + RESEARCH_SNIFFER = (1<<12) //! < sniffer }; +/** + * \enum KeyRank + * \brief Slots for key assignment of user controls + */ +// TODO: remove (use the new InputSlot enum from app/app.h) +enum KeyRank +{ + KEYRANK_LEFT = 0, + KEYRANK_RIGHT = 1, + KEYRANK_UP = 2, + KEYRANK_DOWN = 3, + KEYRANK_GUP = 4, + KEYRANK_GDOWN = 5, + KEYRANK_CAMERA = 6, + KEYRANK_DESEL = 7, + KEYRANK_ACTION = 8, + KEYRANK_NEAR = 9, + KEYRANK_AWAY = 10, + KEYRANK_NEXT = 11, + KEYRANK_HUMAN = 12, + KEYRANK_QUIT = 13, + KEYRANK_HELP = 14, + KEYRANK_PROG = 15, + KEYRANK_VISIT = 16, + KEYRANK_SPEED10 = 17, + KEYRANK_SPEED15 = 18, + KEYRANK_SPEED20 = 19, + KEYRANK_SPEED30 = 20, + KEYRANK_AIMUP = 21, + KEYRANK_AIMDOWN = 22, + KEYRANK_CBOT = 23, + + KEYRANK_MAX +}; + +// TODO: move to CRobotMain extern long g_id; // unique identifier extern long g_build; // constructible buildings extern long g_researchDone; // research done extern long g_researchEnable; // research available extern float g_unit; // conversion factor - - diff --git a/src/common/image.cpp b/src/common/image.cpp index 3d643775..50f6eee4 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -21,6 +21,8 @@ #include #include #include +#include + #include #include #include @@ -88,21 +90,21 @@ bool PNGSaveSurface(const char *filename, SDL_Surface *surf) /* Opening output file */ fp = fopen(filename, "wb"); - if (fp == NULL) + if (fp == nullptr) { PNG_ERROR = std::string("Could not open file '") + std::string(filename) + std::string("' for saving"); return false; } /* Initializing png structures and callbacks */ - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, PNGUserError, NULL); - if (png_ptr == NULL) + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, PNGUserError, nullptr); + if (png_ptr == nullptr) return false; info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) + if (info_ptr == nullptr) { - png_destroy_write_struct(&png_ptr, static_cast(NULL)); + png_destroy_write_struct(&png_ptr, static_cast(nullptr)); PNG_ERROR = "png_create_info_struct() error!"; return false; } @@ -142,7 +144,7 @@ bool PNGSaveSurface(const char *filename, SDL_Surface *surf) CImage::CImage() { - m_data = NULL; + m_data = nullptr; } CImage::~CImage() @@ -150,22 +152,22 @@ CImage::~CImage() Free(); } -bool CImage::IsEmpty() +bool CImage::IsEmpty() const { - return m_data == NULL; + return m_data == nullptr; } void CImage::Free() { - if (m_data != NULL) + if (m_data != nullptr) { - if (m_data->surface != NULL) + if (m_data->surface != nullptr) { SDL_FreeSurface(m_data->surface); - m_data->surface = NULL; + m_data->surface = nullptr; } delete m_data; - m_data = NULL; + m_data = nullptr; } } @@ -174,6 +176,118 @@ ImageData* CImage::GetData() return m_data; } +Math::IntPoint CImage::GetSize() const +{ + if (m_data == nullptr) + return Math::IntPoint(); + + return Math::IntPoint(m_data->surface->w, m_data->surface->h); +} + +/** + * Image must be valid and pixel coords in valid range. + * + * \param pixel pixel coords (range x: 0..width-1 y: 0..height-1) + * \returns color + */ +Gfx::Color CImage::GetPixel(Math::IntPoint pixel) +{ + assert(m_data != nullptr); + assert(pixel.x >= 0 || pixel.x <= m_data->surface->w); + assert(pixel.y >= 0 || pixel.y <= m_data->surface->h); + + int bpp = m_data->surface->format->BytesPerPixel; + int index = pixel.y * m_data->surface->pitch + pixel.x * bpp; + Uint8* p = &static_cast(m_data->surface->pixels)[index]; + + Uint32 u = 0; + switch (bpp) + { + case 1: + u = *p; + break; + + case 2: + u = *reinterpret_cast(p); + break; + + case 3: + if (SDL_BYTEORDER == SDL_BIG_ENDIAN) + u = (p[0] << 16) | (p[1] << 8) | p[2]; + else + u = p[0] | (p[1] << 8) | (p[2] << 16); + break; + + case 4: + u = *reinterpret_cast(p); + break; + + default: + assert(false); + } + + Uint8 r = 0, g = 0, b = 0, a = 0; + SDL_GetRGBA(u, m_data->surface->format, &r, &g, &b, &a); + + return Gfx::Color(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f); +} + +/** + * Image must be valid and pixel coords in valid range. + * + * \param pixel pixel coords (range x: 0..width-1 y: 0..height-1) + * \param color color + */ +void CImage::SetPixel(Math::IntPoint pixel, Gfx::Color color) +{ + assert(m_data != nullptr); + assert(pixel.x >= 0 || pixel.x <= m_data->surface->w); + assert(pixel.y >= 0 || pixel.y <= m_data->surface->h); + + int bpp = m_data->surface->format->BytesPerPixel; + int index = pixel.y * m_data->surface->pitch + pixel.x * bpp; + Uint8* p = &static_cast(m_data->surface->pixels)[index]; + + Uint8 r = static_cast(color.r * 255.0f); + Uint8 g = static_cast(color.g * 255.0f); + Uint8 b = static_cast(color.b * 255.0f); + Uint8 a = static_cast(color.a * 255.0f); + Uint32 u = SDL_MapRGBA(m_data->surface->format, r, g, b, a); + + switch(bpp) + { + case 1: + *p = u; + break; + + case 2: + *reinterpret_cast(p) = u; + break; + + case 3: + if (SDL_BYTEORDER == SDL_BIG_ENDIAN) + { + p[0] = (u >> 16) & 0xFF; + p[1] = (u >> 8) & 0xFF; + p[2] = u & 0xFF; + } + else + { + p[0] = u & 0xFF; + p[1] = (u >> 8) & 0xFF; + p[2] = (u >> 16) & 0xFF; + } + break; + + case 4: + *reinterpret_cast(p) = u; + break; + + default: + assert(false); + } +} + std::string CImage::GetError() { return m_error; @@ -189,10 +303,10 @@ bool CImage::Load(const std::string& fileName) m_error = ""; m_data->surface = IMG_Load(fileName.c_str()); - if (m_data->surface == NULL) + if (m_data->surface == nullptr) { delete m_data; - m_data = NULL; + m_data = nullptr; m_error = std::string(IMG_GetError()); return false; diff --git a/src/common/image.h b/src/common/image.h index 4d86d317..93c7cab4 100644 --- a/src/common/image.h +++ b/src/common/image.h @@ -14,10 +14,15 @@ // * 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.h +/** + * \file common/image.h + * \brief Class for loading and saving images + */ #pragma once +#include "graphics/core/color.h" +#include "math/intpoint.h" #include #include @@ -61,12 +66,21 @@ public: //! Frees the allocated image data void Free(); - //! Returns whether the image is empty (has NULL data) - bool IsEmpty(); + //! Returns whether the image is empty (has null data) + bool IsEmpty() const; - //! Returns the image data; if empty - returns NULL + //! Returns the image data; if empty - returns nullptr ImageData* GetData(); + //! Returns the image size + Math::IntPoint GetSize() const; + + //! Sets the color at given pixel + void SetPixel(Math::IntPoint pixel, Gfx::Color color); + + //! Returns the color at given pixel + Gfx::Color GetPixel(Math::IntPoint pixel); + //! Loads an image from the specified file bool Load(const std::string &fileName); diff --git a/src/common/iman.cpp b/src/common/iman.cpp index 4b89ecff..e59afb18 100644 --- a/src/common/iman.cpp +++ b/src/common/iman.cpp @@ -16,12 +16,10 @@ // iman.cpp - -#include - -#include "common/struct.h" #include "common/iman.h" +#include + template<> CInstanceManager* CSingleton::mInstance = nullptr; @@ -39,139 +37,91 @@ CInstanceManager* CInstanceManager::GetInstancePointer() return mInstance; } - -// Object's constructor. - CInstanceManager::CInstanceManager() { - int i; - - for ( i=0 ; i= CLASS_MAX ) return; - if ( m_table[classType].classPointer == 0 ) return; + if (classType < 0 || classType >= CLASS_MAX) return; + if (m_table[classType].instances == nullptr) return; - free(m_table[classType].classPointer); - m_table[classType].classPointer = 0; + delete[] m_table[classType].instances; + m_table[classType].instances = nullptr; } - -// Adds a new instance of a class. - -bool CInstanceManager::AddInstance(ClassType classType, void* pointer, int max) +bool CInstanceManager::AddInstance(ManagedClassType classType, void* instance, int max) { - int i; + if (classType < 0 || classType >= CLASS_MAX) return false; - if ( classType < 0 || classType >= CLASS_MAX ) return false; - - if ( m_table[classType].classPointer == 0 ) + if (m_table[classType].instances == nullptr) { - m_table[classType].classPointer = static_cast( malloc(max*sizeof(void*)) ); - m_table[classType].totalPossible = max; - m_table[classType].totalUsed = 0; + m_table[classType].instances = new void*[max]; + m_table[classType].maxCount = max; + m_table[classType].usedCount = 0; } - if ( m_table[classType].totalUsed >= m_table[classType].totalPossible ) return false; + if (m_table[classType].usedCount >= m_table[classType].maxCount) return false; - i = m_table[classType].totalUsed++; - m_table[classType].classPointer[i] = pointer; + int i = m_table[classType].usedCount++; + m_table[classType].instances[i] = instance; return true; } -// Deletes an instance of a class. - -bool CInstanceManager::DeleteInstance(ClassType classType, void* pointer) +bool CInstanceManager::DeleteInstance(ManagedClassType classType, void* instance) { - int i; + if (classType < 0 || classType >= CLASS_MAX) return false; - if ( classType < 0 || classType >= CLASS_MAX ) return false; - - for ( i=0 ; i= CLASS_MAX ) return 0; - if ( m_table[classType].classPointer == 0 ) return 0; -#endif - if ( rank >= m_table[classType].totalUsed ) return 0; + if (classType < 0 || classType >= CLASS_MAX) return nullptr; + if (m_table[classType].instances == nullptr) return nullptr; + if (rank >= m_table[classType].usedCount) return nullptr; - return m_table[classType].classPointer[rank]; + return m_table[classType].instances[rank]; } - -// Fills holes in a table. - -void CInstanceManager::Compress(ClassType classType) +void CInstanceManager::Compress(ManagedClassType classType) { - int i, j; + if (classType < 0 || classType >= CLASS_MAX) return; - if ( classType < 0 || classType >= CLASS_MAX ) return; - - j = 0; - for ( i=0 ; i +/** + * \enum ManagedClassType + * \brief Type of class managed by CInstanceManager + */ -struct BaseClass +// TODO: remove unnecessary, refactor to singletons, move to CRobotMain, keep others? + +enum ManagedClassType { - int totalPossible; - int totalUsed; - void** classPointer; + //! CEventQueue + CLASS_EVENT = 1, + //! Ui::CInterface + CLASS_INTERFACE = 2, + //! CRobotMain + CLASS_MAIN = 3, + //! Gfx::CEngine + CLASS_ENGINE = 4, + //! Gfx::CTerrain + CLASS_TERRAIN = 5, + //! CObject + CLASS_OBJECT = 6, + //! CPhysics + CLASS_PHYSICS = 7, + //! CBrain + CLASS_BRAIN = 8, + //! Gfx::CCamera + CLASS_CAMERA = 9, + //! Gfx::CLightManager + CLASS_LIGHT = 10, + //! Gfx::CParticle + CLASS_PARTICULE = 11, + //! CAuto; TODO: remove (unused) + CLASS_AUTO = 12, + //! Ui::CDisplayText + CLASS_DISPLAYTEXT = 13, + //! Gfx::CPyro + CLASS_PYRO = 14, + //! Ui::CScript; TODO: remove (unused) + CLASS_SCRIPT = 15, + //! Gfx::CText + CLASS_TEXT = 16, + //! Ui::CStudio, Ui::CDisplayText; TODO: remove (unused) + CLASS_STUDIO = 17, + //! Gfx::CWater + CLASS_WATER = 18, + //! Gfx::CCloud; TODO: remove (unused) + CLASS_CLOUD = 19, + //! CMotion; TODO: remove (unused) + CLASS_MOTION = 20, + //! CSoundInterface + CLASS_SOUND = 21, + //! Gfx::CPlanet + CLASS_PLANET = 22, + //! CTaskManager; TODO: remove (unused) + CLASS_TASKMANAGER = 23, + //! Ui::CMainDialog; TODO: remove (unused) + CLASS_DIALOG = 24, + //! Ui::CMainMap; TODO: remove (unused) + CLASS_MAP = 25, + //! Ui::CMainShort, CMainMovie; TODO: remove (unused) + CLASS_SHORT = 26, + //! Gfx::CLightning; TODO: remove (unused) + CLASS_BLITZ = 27, + + //! Maximum (number of managed classes) + CLASS_MAX = 30 }; +/** + * \enum ManagedClassInstances + * \brief Instances of class managed by CInstanceManager + */ +struct ManagedClassInstances +{ + int maxCount; + int usedCount; + void** instances; +}; +/** + * \class CInstanceManager + * \brief Manager for instances of certain classes + * + * Instance manager (often shortened to iMan) allows to register instances of + * classes and search them. + */ class CInstanceManager : public CSingleton { public: CInstanceManager(); ~CInstanceManager(); + //! Remove all managed instances void Flush(); - void Flush(ClassType classType); - bool AddInstance(ClassType classType, void* pointer, int max=1); - bool DeleteInstance(ClassType classType, void* pointer); - void* SearchInstance(ClassType classType, int rank=0); + //! Removes instances of one type of class + void Flush(ManagedClassType classType); + //! Registers new instance of class type + bool AddInstance(ManagedClassType classType, void* instance, int max=1); + //! Deletes the registered instance of class type + bool DeleteInstance(ManagedClassType classType, void* instance); + //! Seeks a class instance of given type + void* SearchInstance(ManagedClassType classType, int rank=0); static CInstanceManager& GetInstance(); static CInstanceManager* GetInstancePointer(); protected: - void Compress(ClassType classType); + //! Fills holes in instance table + void Compress(ManagedClassType classType); protected: - BaseClass m_table[CLASS_MAX]; + ManagedClassInstances m_table[CLASS_MAX]; }; diff --git a/src/common/ioutils.h b/src/common/ioutils.h index 2a542c6a..e7668eb6 100644 --- a/src/common/ioutils.h +++ b/src/common/ioutils.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/. -// ioutils.h +/** + * \file ioutils.h + * \brief Functions for binary I/O + */ #pragma once diff --git a/src/common/language.h b/src/common/language.h deleted file mode 100644 index 82a7235c..00000000 --- a/src/common/language.h +++ /dev/null @@ -1,54 +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/. - -// language.h - -#pragma once - - -#define _FULL true // CoLoBoT -#define _SCHOOL false // CeeBot-A or Teen - #define _TEEN false // false for CeeBot-A, true for CeeBot-Teen - #define _EDU false - #define _PERSO false - #define _CEEBOTDEMO false -#define _NET false -#define _DEMO false // DEMO only CoLoBoT (with _Full = false)! - -#define _FRENCH false -#define _ENGLISH true -#define _GERMAN false -#define _WG false -#define _POLISH false - -#define _NEWLOOK false // false for CoLoBoT, true for all CeeBot -#define _SOUNDTRACKS false // always false since InitAudioTrackVolume crop in Vista - - -// Verifications - -#if !_FULL & !_SCHOOL & !_NET & !_DEMO --> no version chosen! -#endif - -#if _SCHOOL -#if !_EDU & !_PERSO & !_CEEBOTDEMO --> EDU or PERSO or CEEBOTDEMO? -#endif -#if _EDU & _PERSO & _CEEBOTDEMO --> EDU and PERSO and CEEBOTDEMO not at the same time!!! -#endif -#endif diff --git a/src/common/logger.h b/src/common/logger.h index fc43735e..dfeeb988 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -14,22 +14,20 @@ // * 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.h +/** + * \file common/logger.h + * \brief Class for logging information to file or console + */ #pragma once +#include "common/singleton.h" + #include #include #include -#include - -/** - * @file common/logger.h - * @brief Class for loggin information to file or console - */ - /** * \public diff --git a/src/common/metafile.cpp b/src/common/metafile.cpp index 9d54f78f..d1692cef 100644 --- a/src/common/metafile.cpp +++ b/src/common/metafile.cpp @@ -16,17 +16,15 @@ // metafile.cpp - -#include -#include - -#include "common/language.h" #include "common/metafile.h" +#include +#include +#include -#if _FULL | _NET +//#if _FULL | _NET static unsigned char table_codec[23] = { 0x85, 0x91, 0x73, 0xcf, 0xa2, 0xbb, 0xf4, 0x77, @@ -44,9 +42,9 @@ void Codec(void* buffer, int len, int start) b[i] ^= table_codec[(start++)%23]; } } -#endif +//#endif -#if _SCHOOL +/*#if _SCHOOL #if _CEEBOTDEMO static unsigned char table_codec[136] = { @@ -99,9 +97,9 @@ void Codec(void* buffer, int len, int start) } } #endif -#endif +#endif*/ -#if _DEMO +/*#if _DEMO static unsigned char table_codec[27] = { 0x85, 0x91, 0x77, 0xcf, 0xa3, 0xbb, 0xf4, 0x77, @@ -120,7 +118,7 @@ void Codec(void* buffer, int len, int start) b[i] ^= table_codec[(start++)%27]; } } -#endif +#endif*/ @@ -286,7 +284,7 @@ int CMetaFile::Read(void *buffer, int size) int CMetaFile::GetByte() { - BYTE b; + int b; if ( !m_bOpen ) return 1; @@ -303,7 +301,7 @@ int CMetaFile::GetByte() int CMetaFile::GetWord() { - WORD w; + int w; if ( !m_bOpen ) return 1; diff --git a/src/common/misc.cpp b/src/common/misc.cpp index 747c66d3..57c16f4a 100644 --- a/src/common/misc.cpp +++ b/src/common/misc.cpp @@ -17,51 +17,25 @@ // misc.cpp +#include "common/misc.h" + #include #include #include +#include #include -//#include #include -//#include - -#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -//#include "old/d3dmath.h" -//#include "math/math.h" -//#include "old/d3dutil.h" -#include "common/language.h" -#include "common/event.h" -#include "common/misc.h" - -CMetaFile g_metafile; - -static EventType g_uniqueEventType = EVENT_USER; static bool g_bUserDir = false; static char g_userDir[100] = ""; - -// Gives a single user event. - -EventType GetUniqueEventType() -{ - int i; - - i = static_cast (g_uniqueEventType+1); - g_uniqueEventType = static_cast(i); - return g_uniqueEventType; -} - - - // Returns a non-accented letter. char GetNoAccent(char letter) { + /* if ( letter < 0 ) { if ( letter == '�' || @@ -125,7 +99,7 @@ char GetNoAccent(char letter) if ( letter == '�' ) return 'C'; if ( letter == '�' ) return 'N'; - } + }*/ return letter; } @@ -134,7 +108,7 @@ char GetNoAccent(char letter) char GetToUpper(char letter) { - if ( letter < 0 ) + /*if ( letter < 0 ) { if ( letter == '�' ) return '�'; if ( letter == '�' ) return '�'; @@ -166,7 +140,7 @@ char GetToUpper(char letter) if ( letter == '�' ) return '�'; if ( letter == '�' ) return '�'; - } + }*/ return toupper(letter); } @@ -175,7 +149,7 @@ char GetToUpper(char letter) char GetToLower(char letter) { - if ( letter < 0 ) + /*if ( letter < 0 ) { if ( letter == '�' ) return '�'; if ( letter == '�' ) return '�'; @@ -207,7 +181,7 @@ char GetToLower(char letter) if ( letter == '�' ) return '�'; if ( letter == '�' ) return '�'; - } + }*/ return tolower(letter); } @@ -224,6 +198,7 @@ void GimeToAscii(time_t time, char *buffer) year = when.tm_year+1900; if ( year < 2000 ) year -= 1900; else year -= 2000; +/* TODO #if _FRENCH sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d", when.tm_mday, when.tm_mon+1, year, @@ -234,7 +209,7 @@ void GimeToAscii(time_t time, char *buffer) when.tm_mday, when.tm_mon+1, year, when.tm_hour, when.tm_min); #endif -#if _ENGLISH +#if _ENGLISH*/ char format[10]; int hour; @@ -253,12 +228,12 @@ void GimeToAscii(time_t time, char *buffer) sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d %s", when.tm_mon+1, when.tm_mday, year, hour, when.tm_min, format); -#endif +/*#endif #if _POLISH sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d", when.tm_mday, when.tm_mon+1, year, when.tm_hour, when.tm_min); -#endif +#endif*/ } @@ -313,7 +288,9 @@ bool CopyFileToTemp(char* filename) UserDir(dst, filename, "textures"); strcpy(g_userDir, save); -// _mkdir("temp"); TODO + //_mkdir("temp"); + system("mkdir temp"); + if ( !Xfer(src, dst) ) return false; strcpy(filename, dst); @@ -384,7 +361,7 @@ void UserDir(bool bUser, char* dir) void UserDir(char* buffer, const char* dir, const char* def) { char ddir[100]; - char* add; + const char* add; if ( strstr(dir, "\\") == 0 && def[0] != 0 ) { @@ -420,24 +397,3 @@ void UserDir(char* buffer, const char* dir, const char* def) } *buffer = 0; } - - -// Returns the letter corresponding to the language. - -char RetLanguageLetter() -{ -#if _FRENCH - return 'F'; -#endif -#if _ENGLISH - return 'E'; -#endif -#if _GERMAN | _WG - return 'D'; -#endif -#if _POLISH - return 'P'; -#endif - return 'X'; -} - diff --git a/src/common/misc.h b/src/common/misc.h index 0928acbf..002c910b 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -22,55 +22,7 @@ #include -#include "common/metafile.h" -#include "common/event.h" -#include "common/error_ids.h" - - -extern CMetaFile g_metafile; - - - -// Existing classes. - -enum ClassType -{ - CLASS_EVENT = 1, - CLASS_INTERFACE = 2, - CLASS_MAIN = 3, - CLASS_ENGINE = 4, - CLASS_TERRAIN = 5, - CLASS_OBJECT = 6, - CLASS_PHYSICS = 7, - CLASS_BRAIN = 8, - CLASS_CAMERA = 9, - CLASS_LIGHT = 10, - CLASS_PARTICULE = 11, - CLASS_AUTO = 12, - CLASS_DISPLAYTEXT = 13, - CLASS_PYRO = 14, - CLASS_SCRIPT = 15, - CLASS_TEXT = 16, - CLASS_STUDIO = 17, - CLASS_WATER = 18, - CLASS_CLOUD = 19, - CLASS_MOTION = 20, - CLASS_SOUND = 21, - CLASS_PLANET = 22, - CLASS_TASKMANAGER = 23, - CLASS_DIALOG = 24, - CLASS_MAP = 25, - CLASS_SHORT = 26, - CLASS_BLITZ = 27, -}; - -const int CLASS_MAX = 30; - - - - -// Keyboard state. - +// 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); @@ -84,10 +36,7 @@ const int KS_NUMRIGHT = (1<<13); const int KS_NUMPLUS = (1<<14); const int KS_NUMMINUS = (1<<15); - -// Procedures. - -extern EventType GetUniqueEventType(); +// TODO: rewrite/refactor or remove extern char GetNoAccent(char letter); extern char GetToUpper(char letter); @@ -100,7 +49,3 @@ extern bool CopyFileListToTemp(char* filename, int* list, int total); extern void AddExt(char* filename, char* ext); extern void UserDir(bool bUser, char* dir); extern void UserDir(char* buffer, const char* dir, const char* def); - -extern char GetLanguageLetter(); - - diff --git a/src/common/profile.cpp b/src/common/profile.cpp index 29a68e14..efcfa66c 100644 --- a/src/common/profile.cpp +++ b/src/common/profile.cpp @@ -17,7 +17,10 @@ // profile.cpp -#include +#include "common/profile.h" + +#include +#include template<> CProfile* CSingleton::mInstance = nullptr; diff --git a/src/common/profile.h b/src/common/profile.h index 08865220..7a23d94a 100644 --- a/src/common/profile.h +++ b/src/common/profile.h @@ -14,22 +14,19 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// profile.h +/** + * \file common/profile.h + * \brief Class for loading profile (currently for loading ini config file) + */ #pragma once -#include +#include "lib/simpleini/SimpleIni.h" + +#include "common/singleton.h" + +#include #include -#include - -#include - -#include - -/** - * @file common/profile.h - * @brief Class for loading profile (currently for loading ini config file) - */ /** diff --git a/src/common/restext.cpp b/src/common/restext.cpp index ee5d9612..e66c70e7 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -14,31 +14,18 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/.// restext.cpp -#include -//#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -#include "common/language.h" -#include "common/misc.h" -#include "common/event.h" -#include "object/object.h" -#include "CBot/resource.h" #include "common/restext.h" +#include "common/global.h" +#include "common/event.h" +#include "CBot/resource.h" +#include "object/object.h" + +#include +#include -//** -> text to translate! - - - -// Gives the pointer to the engine. - -void SetEngine(Gfx::CEngine *engine) -{ - g_engine = engine; -} - -// Give the player's name. +static char g_gamerName[100]; void SetGlobalGamerName(char *name) { @@ -81,7 +68,7 @@ static KeyDesc keyTable[22] = // Seeks a key. -bool SearchKey(char *cmd, KeyRank &key) +bool SearchKey(const char *cmd, KeyRank &key) { int i; @@ -98,7 +85,7 @@ bool SearchKey(char *cmd, KeyRank &key) // Replaces the commands "\key name;" in a text. -void PutKeyName(char* dst, char* src) +static void PutKeyName(char* dst, const char* src) { KeyRank key; char name[50]; @@ -115,7 +102,8 @@ void PutKeyName(char* dst, char* src) { if ( SearchKey(src+s+5, key) ) { - // res = g_engine->GetKey(key, 0); TODO + // FIXME: res = g_engine->RetKey(key, 0); + res = 0; if ( res != 0 ) { if ( GetResource(RES_KEY, res, name) ) @@ -137,3524 +125,60 @@ void PutKeyName(char* dst, char* src) dst[d++] = 0; } +// Returns the translated text of a resource that needs key substitution + +static const char* GetResourceBase(ResType type, int num) +{ + const char *str = NULL; + + assert(num >= 0); + + switch (type) + { + case RES_TEXT: + assert(num < strings_text_len); + str = strings_text[num]; + break; + case RES_EVENT: + assert(num < strings_event_len); + str = strings_event[num]; + break; + case RES_OBJECT: + assert(num < strings_object_len); + if (num == OBJECT_HUMAN) + return g_gamerName; + str = strings_object[num]; + break; + case RES_ERR: + assert(num < strings_err_len); + str = strings_err[num]; + break; + case RES_CBOT: + assert(num < strings_cbot_len); + str = strings_cbot[num]; + break; + case RES_KEY: + assert(num < SDLK_LAST); + str = SDL_GetKeyName(static_cast(num)); + break; + default: + assert(false); + } + return gettext(str); +} // Returns the text of a resource. bool GetResource(ResType type, int num, char* text) { - char buffer[100]; + const char *tmpl = GetResourceBase(type, num); - if ( !GetResourceBase(type, num, buffer) ) + if (!tmpl) { text[0] = 0; return false; } - PutKeyName(text, buffer); + PutKeyName(text, tmpl); return true; } - - -// Returns the text of a resource. - -bool GetResourceBase(ResType type, int num, char* text) -{ - text[0] = 0; - -#if _ENGLISH - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "1.18 /e"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /e"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Maximize"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Minimize"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normal size"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Close"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Program editor"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "New"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Player"); - if ( num == RT_IO_NEW ) strcpy(text, "New ..."); - if ( num == RT_KEY_OR ) strcpy(text, " or "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programming exercises"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "Challenges"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Free game"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Free game"); - if ( num == RT_TITLE_USER ) strcpy(text, "User levels"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Options"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Player's name"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Customize your appearance"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Save the current mission"); - if ( num == RT_TITLE_READ ) strcpy(text, "Load a saved mission"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Chapters:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Chapters:"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planets:"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planets:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " User levels:"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planets:"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Chapters:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Exercises in the chapter:"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Challenges in the chapter:"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Missions on this planet:"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Free game on this planet:"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions on this level:"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Prototypes on this planet:"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Free game on this chapter:"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Summary:"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Drivers:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Resolution:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) First click on the key you want to redefine."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Then press the key you want to use instead."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Face type:"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Eyeglasses:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Hair color:"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Suit color:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Strip color:"); - -#if _NEWLOOK - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Do you want to quit CeeBot ?"); - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quit\\Quit CeeBot"); -#else - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Do you want to quit COLOBOT ?"); - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quit\\Quit COLOBOT"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Quit the mission?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Abort\\Abort the current mission"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Continue\\Continue the current mission"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continue\\Continue the game"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Do you really want to destroy the selected building?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Do you want to delete %s's saved games? "); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Delete"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Cancel"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "LOADING"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Keyword help(\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 errors)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program finished"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;List of objects\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Robots\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Buildings\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Moveable objects\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Aliens\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (none)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Error\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "The list is only available if a \\l;radar station\\u object\\radar; is working.\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "Open"); - if ( num == RT_IO_SAVE ) strcpy(text, "Save"); - if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Name:"); - if ( num == RT_IO_DIR ) strcpy(text, "Folder:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Private\\Private folder"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Common folder"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Developed by :"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); -//? if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "English version published by:"); -//? if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.?.com"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Recorder"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Cancel"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Next"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Previous"); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Cancel"); - - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Exercises\\Programming exercises"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Challenges\\Programming challenges"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\Select mission"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Free game\\Free game without a specific goal"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Free game\\Free game without a specific goal"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "User\\User levels"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes under development"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "New player\\Choose player's name"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\Preferences"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Restart\\Restart the mission from the beginning"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Save\\Save the current mission "); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Load\\Load a saved mission"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Return to CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quit\\Quit CeeBot"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Return to COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quit\\Quit COLOBOT"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Back \\Back to the previous screen"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Play\\Start mission!"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Device\\Driver and resolution settings"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphics\\Graphics settings"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Game\\Game settings"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Controls\\Keyboard, joystick and mouse settings"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Sound\\Music and game sound volume"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Resolution"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Full screen\\Full screen or window mode"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Apply changes\\Activates the changed settings"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Your assistant"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Shadows\\Shadows on the ground"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marks on the ground\\Marks on the ground"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Dust\\Dust and dirt on bots and buildings"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Fog\\Fog"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Sunbeams\\Sunbeams in the sky"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Sky\\Clouds and nebulae"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planets and stars\\Astronomical objects in the sky"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamic lighting\\Mobile light sources"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Number of particles\\Explosions, dust, reflections, etc."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Depth of field\\Maximum visibility"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Details\\Visual quality of 3D objects"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Textures\\Quality of textures "); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Num of decorative objects\\Number of purely ornamental objects"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particles in the interface\\Steam clouds and sparks in the interface"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflections on the buttons \\Shiny buttons"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Help balloons\\Explain the function of the buttons"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Film sequences\\Films before and after the missions"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Exit film\\Film at the exit of exercises"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Friendly fire\\Your shooting can damage your own objects "); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Scrolling\\Scrolling when the mouse touches right or left border"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Mouse inversion X\\Inversion of the scrolling direction on the X axis"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Quake at explosions\\The screen shakes at explosions"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Mouse shadow\\Gives the mouse a shadow"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatic indent\\When program editing"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Big indent\\Indent 2 or 4 spaces per level defined by braces"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Access to solutions\\Show program \"4: Solution\" in the exercises"); //** - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standard controls\\Standard key functions"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Turn left\\turns the bot to the left"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Turn right\\turns the bot to the right"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Forward\\Moves forward"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Backward\\Moves backward"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Climb\\Increases the power of the jet"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descend\\Reduces the power of the jet"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Change camera\\Switches between onboard camera and following camera"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Previous object\\Selects the previous object"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Camera closer\\Moves the camera forward"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Camera back\\Moves the camera backward"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Next object\\Selects the next object"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Select the astronaut\\Selects the astronaut"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quit\\Quit the current mission or exercise"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions\\Shows the instructions for the current mission"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Programming help\\Gives more detailed help with programming"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Key word help\\More detailed help about key words"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Origin of last message\\Shows where the last message was sent from"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Speed 1.0x\\Normal speed"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Speed 1.5x\\1.5 times faster"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Speed 2.0x\\Double speed"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Speed 3.0x\\Three times faster"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Sound effects:\\Volume of engines, voice, shooting, etc."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Background sound :\\Volume of audio tracks on the CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D sound\\3D positioning of the sound"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Lowest\\Minimum graphic quality (highest frame rate)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Normal graphic quality"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Highest\\Highest graphic quality (lowest frame rate)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Mute\\No sound"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normal sound volume"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Use a joystick\\Joystick or keyboard"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Access to solution\\Shows the solution (detailed instructions for missions)"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\New player name"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Choose the selected player"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Cancel\\Keep current player name"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Delete player\\Deletes the player from the list"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Player name"); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Save\\Saves the current mission"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Load\\Loads the selected mission"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "List of saved missions"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Filename:"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Mission name"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Photography"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Delete\\Deletes the selected file"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Appearance\\Choose your appearance"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Cancel"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Standard appearance settings"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Head\\Face and hair"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Suit\\Astronaut suit"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Turn left"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Turn right"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Red"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Green"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Blue"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Red"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Green"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Blue"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Face 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Face 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Face 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Face 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\No eyeglasses"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Eyeglasses 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Eyeglasses 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Eyeglasses 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Eyeglasses 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Eyeglasses 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Previous selection (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Turn left (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Turn right (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Forward (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Backward (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Up (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Down (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Grab or drop (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Grab or drop (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..in front"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..behind"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..power cell"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions for the mission (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Take off to finish the mission"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Build a derrick"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Build a power station"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Build a bot factory"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Build a repair center"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Build a converter"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Build a defense tower"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Build a research center"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Build a radar station"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Build a power cell factory"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Build an autolab"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Build a nuclear power plant"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Build a lightning conductor"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Build a exchange post"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Show if the ground is flat"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Plant a flag"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Remove a flag"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Blue flags"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Red flags"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Green flags"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Yellow flags"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Violet flags"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Build a winged grabber"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Build a tracked grabber"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Build a wheeled grabber"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Build a legged grabber"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Build a winged shooter"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Build a tracked shooter"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Build a wheeled shooter"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Build a legged shooter"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Build a winged orga shooter"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Build a tracked orga shooter"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Build a wheeled orga shooter"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Build a legged orga shooter"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Build a winged sniffer"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Build a tracked sniffer"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Build a wheeled sniffer"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Build a legged sniffer"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Build a thumper"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Build a phazer shooter"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Build a recycler"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Build a shielder"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Build a subber"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Run research program for tracked bots"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Run research program for winged bots"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Run research program for thumper"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Run research program for shooter"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Run research program for defense tower"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Run research program for phazer shooter"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Run research program for shielder"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Run research program for nuclear power"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Run research program for legged bots"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Run research program for orga shooter"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Return to start"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Sniff (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Thump (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Shoot (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Extend shield (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Withdraw shield (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Shield radius"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Execute the selected program"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edit the selected program"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\SatCom on standby"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Destroy the building"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energy level"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Shield level"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Jet temperature"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Still working ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Number of insects detected"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Transmitted information"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Compass"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-map"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-map"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Camera (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camera to left"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camera to right"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camera nearest"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camera awayest"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Help about selected object"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Show the solution"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Switch bots <-> buildings"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Show the range"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Raise the pencil"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Use the black pencil"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Use the yellow pencil"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Use the orange pencil"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Use the red pencil"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Use the purple pencil"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Use the blue pencil"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Use the green pencil"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Use the brown pencil"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Start recording"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stop recording"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Show the place"); - if ( num == EVENT_DT_END ) strcpy(text, "Continue"); - if ( num == EVENT_CMD ) strcpy(text, "Command line"); - if ( num == EVENT_SPEED ) strcpy(text, "Game speed"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Back"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Forward"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copy"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Size 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Size 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Size 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Size 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Size 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions from Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnary"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Satellite report"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programs dispatched by Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "List of objects"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Programming help"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Close program editor and return to game"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Cancel\\Cancel all changes"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "New"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Open (Ctrl+o)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Save (Ctrl+s)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Undo (Ctrl+z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Cut (Ctrl+x)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copy (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Paste (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Font size"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Programming help (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compile"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Execute/stop"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continue"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "One step"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "Gantry crane"); - if ( num == OBJECT_BASE ) strcpy(text, "Spaceship"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Bot factory"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Repair center"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Destroyer"); - if ( num == OBJECT_STATION ) strcpy(text, "Power station"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Converts ore to titanium"); - if ( num == OBJECT_TOWER ) strcpy(text, "Defense tower"); - if ( num == OBJECT_NEST ) strcpy(text, "Nest"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Research center"); - if ( num == OBJECT_RADAR ) strcpy(text, "Radar station"); - if ( num == OBJECT_INFO ) strcpy(text, "Information exchange post"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Power cell factory"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Power cell factory"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Autolab"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Nuclear power station"); - if ( num == OBJECT_PARA ) strcpy(text, "Lightning conductor"); - if ( num == OBJECT_SAFE ) strcpy(text, "Vault"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Houston Mission Control"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Target"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Target"); - if ( num == OBJECT_START ) strcpy(text, "Start"); - if ( num == OBJECT_END ) strcpy(text, "Finish"); - if ( num == OBJECT_STONE ) strcpy(text, "Titanium ore"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Uranium ore"); - if ( num == OBJECT_BULLET ) strcpy(text, "Organic matter"); - if ( num == OBJECT_METAL ) strcpy(text, "Titanium"); - if ( num == OBJECT_POWER ) strcpy(text, "Power cell"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Nuclear power cell"); - if ( num == OBJECT_BBOX ) strcpy(text, "Black box"); - if ( num == OBJECT_KEYa ) strcpy(text, "Key A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Key B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Key C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Key D"); - if ( num == OBJECT_TNT ) strcpy(text, "Explosive"); - if ( num == OBJECT_BOMB ) strcpy(text, "Fixed mine"); - if ( num == OBJECT_BAG ) strcpy(text, "Survival kit"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Checkpoint"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Blue flag"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Red flag"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Green flag"); - if ( num == OBJECT_FLAGy ) strcpy(text, "Yellow flag"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Violet flag"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Energy deposit (site for power station)"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Uranium deposit (site for derrick)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Found key A (site for derrick)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Found key B (site for derrick)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Found key C (site for derrick)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Found key D (site for derrick)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Titanium deposit (site for derrick)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Practice bot"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Winged grabber"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Tracked grabber"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Wheeled grabber"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Legged grabber"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Winged shooter"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Tracked shooter"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Wheeled shooter"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Legged shooter"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Winged orga shooter"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Tracked orga shooter"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Wheeled orga shooter"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Legged orga shooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Winged sniffer"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Tracked sniffer"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Wheeled sniffer"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Legged sniffer"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Thumper"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Phazer shooter"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Recycler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Shielder"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Subber"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Target bot"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Drawer bot"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Engineer"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Alien Queen"); - if ( num == OBJECT_ANT ) strcpy(text, "Ant"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Spider"); - if ( num == OBJECT_BEE ) strcpy(text, "Wasp"); - if ( num == OBJECT_WORM ) strcpy(text, "Worm"); - if ( num == OBJECT_EGG ) strcpy(text, "Egg"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Wreckage"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Waste"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Ruin"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Spaceship ruin"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Spaceship ruin"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Remains of Apollo mission"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Error"); - if ( num == ERR_CMD ) strcpy(text, "Unknown command"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot not installed."); - if ( num == ERR_NOCD ) strcpy(text, "Please insert the CeeBot CD\nand re-run the game."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT not installed."); - if ( num == ERR_NOCD ) strcpy(text, "Please insert the COLOBOT CD\nand re-run the game."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Already carrying something"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Nothing to grab"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Place occupied"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "No other robot"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "You can not carry a radioactive object"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "You can not carry an object under water"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nothing to drop"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible under water"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium too far away"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium too close"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "No titanium around"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Ground not flat enough"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Flat ground not large enough"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Place occupied"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Too close to space ship"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Too close to a building"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Ground inappropriate"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Building too close"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Object too close"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nothing to recycle"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "No more energy"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Error in instruction move"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Object not found"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: inaccessible destination"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: inaccessible destination"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: destination occupied"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Inappropriate bot"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "No titanium ore to convert"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "No ore in the subsoil"); - if ( num == ERR_STATION_NULL ) strcpy(text, "No energy in the subsoil"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "No power cell"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "No more energy"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "No power cell"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Not enough energy"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Inappropriate cell type"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Research program already performed"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "No energy in the subsoil"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Not enough energy yet"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "No titanium to transform"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Transforms only titanium"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Doors blocked by a robot or another object "); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "You must get on the spaceship to take off "); - if ( num == ERR_LABO_NULL ) strcpy(text, "Nothing to analyze"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analyzes only organic matter"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analysis already performed"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "No energy in the subsoil"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Not yet enough energy"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "No uranium to transform"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Transforms only uranium"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "No titanium"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Object too close"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Place occupied"); - if ( num == ERR_INFO_NULL ) strcpy(text, "No information exchange post within range"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program infected by a virus"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infected by a virus, temporarily out of order"); - if ( num == ERR_VEH_POWER ) strcpy(text, "No power cell"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "No more energy"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible when flying"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible when swimming"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible when moving"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible when carrying an object"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Too many flags of this color (maximum 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Too close to an existing flag"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "No flag nearby"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "The mission is not accomplished yet (press \\key help; for more details)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Bot destroyed"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Building destroyed"); - if ( num == ERR_TOOMANY ) strcpy(text, "Can not create this, there are too many objects"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "\"%s\" missing in this exercise"); //** - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Do not use in this exercise"); //** - - if ( num == INFO_BUILD ) strcpy(text, "Building completed"); - if ( num == INFO_CONVERT ) strcpy(text, "Titanium available"); - if ( num == INFO_RESEARCH ) strcpy(text, "Research program completed"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Plans for tracked robots available "); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "You can fly with the keys (\\key gup;) and (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Plans for thumper available"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Plans for shooter available"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Plans for defense tower available"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Plans for phazer shooter available"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Plans for shielder available"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Plans for nuclear power plant available"); - if ( num == INFO_FACTORY ) strcpy(text, "New bot available"); - if ( num == INFO_LABO ) strcpy(text, "Analysis performed"); - if ( num == INFO_ENERGY ) strcpy(text, "Power cell available"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Nuclear power cell available"); - if ( num == INFO_FINDING ) strcpy(text, "You found a usable object"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Found a site for power station"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Found a site for a derrick"); - if ( num == INFO_WIN ) strcpy(text, "<<< Well done, mission accomplished >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Sorry, mission failed >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Sorry, mission failed >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Current mission saved"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Checkpoint crossed"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Alien Queen killed"); - if ( num == INFO_DELETEANT ) strcpy(text, "Ant fatally wounded"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Wasp fatally wounded"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Worm fatally wounded"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Spider fatally wounded"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Press \\key help; to read instructions on your SatCom"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Error"); - if ( num == TX_OPENPAR ) strcpy(text, "Opening bracket missing"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Closing bracket missing "); - if ( num == TX_NOTBOOL ) strcpy(text, "The expression must return a boolean value"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable not declared"); - if ( num == TX_BADLEFT ) strcpy(text, "Assignment impossible"); - if ( num == TX_ENDOF ) strcpy(text, "Semicolon terminator missing"); - if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" outside a block ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Instructions after the final closing brace"); - if ( num == TX_CLOSEBLK ) strcpy(text, "End of block missing"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" without corresponding ""if"" "); - if ( num == TX_OPENBLK ) strcpy(text, "Opening brace missing ");//d�but d'un bloc attendu? - if ( num == TX_BADTYPE ) strcpy(text, "Wrong type for the assignment"); - if ( num == TX_REDEFVAR ) strcpy(text, "A variable can not be declared twice"); - if ( num == TX_BAD2TYPE ) strcpy(text, "The types of the two operands are incompatible "); - if ( num == TX_UNDEFCALL ) strcpy(text, "Unknown function"); - if ( num == TX_MISDOTS ) strcpy(text, "Sign "" : "" missing"); - if ( num == TX_WHILE ) strcpy(text, "Keyword ""while"" missing"); - if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" outside a loop"); - if ( num == TX_LABEL ) strcpy(text, "A label must be followed by ""for"", ""while"", ""do"" or ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "This label does not exist");// Cette �tiquette n'existe pas - if ( num == TX_NOCASE ) strcpy(text, "Instruction ""case"" missing"); - if ( num == TX_BADNUM ) strcpy(text, "Number missing"); - if ( num == TX_VOID ) strcpy(text, "Void parameter"); - if ( num == TX_NOTYP ) strcpy(text, "Type declaration missing"); - if ( num == TX_NOVAR ) strcpy(text, "Variable name missing"); - if ( num == TX_NOFONC ) strcpy(text, "Function name missing"); - if ( num == TX_OVERPARAM ) strcpy(text, "Too many parameters"); - if ( num == TX_REDEF ) strcpy(text, "Function already exists"); - if ( num == TX_LOWPARAM ) strcpy(text, "Parameters missing "); - if ( num == TX_BADPARAM ) strcpy(text, "No function with this name accepts this kind of parameter"); - if ( num == TX_NUMPARAM ) strcpy(text, "No function with this name accepts this number of parameters"); - if ( num == TX_NOITEM ) strcpy(text, "This is not a member of this class"); - if ( num == TX_DOT ) strcpy(text, "This object is not a member of a class"); - if ( num == TX_NOCONST ) strcpy(text, "Appropriate constructor missing"); - if ( num == TX_REDEFCLASS ) strcpy(text, "This class already exists"); - if ( num == TX_CLBRK ) strcpy(text, """ ] "" missing"); - if ( num == TX_RESERVED ) strcpy(text, "Reserved keyword of CBOT language"); - if ( num == TX_BADNEW ) strcpy(text, "Bad argument for ""new"""); - if ( num == TX_OPBRK ) strcpy(text, """ [ "" expected"); - if ( num == TX_BADSTRING ) strcpy(text, "String missing"); - if ( num == TX_BADINDEX ) strcpy(text, "Incorrect index type"); - if ( num == TX_PRIVATE ) strcpy(text, "Private element"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Public required"); - if ( num == TX_DIVZERO ) strcpy(text, "Dividing by zero"); - if ( num == TX_NOTINIT ) strcpy(text, "Variable not initialized"); - if ( num == TX_BADTHROW ) strcpy(text, "Negative value rejected by ""throw""");//C'est quoi, �a? - if ( num == TX_NORETVAL ) strcpy(text, "The function returned no value "); - if ( num == TX_NORUN ) strcpy(text, "No function running"); - if ( num == TX_NOCALL ) strcpy(text, "Calling an unknown function"); - if ( num == TX_NOCLASS ) strcpy(text, "This class does not exist"); - if ( num == TX_NULLPT ) strcpy(text, "Unknown Object"); - if ( num == TX_OPNAN ) strcpy(text, "Operation impossible with value ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Access beyond array limit"); - if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow"); - if ( num == TX_DELETEDPT ) strcpy(text, "Illegal object"); - if ( num == TX_FILEOPEN ) strcpy(text, "Can't open file"); - if ( num == TX_NOTOPEN ) strcpy(text, "File not open"); - if ( num == TX_ERRREAD ) strcpy(text, "Read error"); - if ( num == TX_ERRWRITE ) strcpy(text, "Write error"); - } -// \TODO - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< none >"); - if ( num == SDLK_LEFT ) strcpy(text, "Arrow left"); - if ( num == SDLK_RIGHT ) strcpy(text, "Arrow right"); - if ( num == SDLK_UP ) strcpy(text, "Arrow up"); - if ( num == SDLK_DOWN ) strcpy(text, "Arrow down"); -// if ( num == SDLK_CANCEL ) strcpy(text, "Control-break"); -// if ( num == SDLK_BACK ) strcpy(text, "<--"); - if ( num == SDLK_TAB ) strcpy(text, "Tab"); - if ( num == SDLK_CLEAR ) strcpy(text, "Clear"); - if ( num == SDLK_RETURN ) strcpy(text, "Enter"); -// if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); -// if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == SDLK_MENU ) strcpy(text, "Alt"); - if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); -// if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); - if ( num == SDLK_SPACE ) strcpy(text, "Space"); -// if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); -// if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); - if ( num == SDLK_END ) strcpy(text, "End"); - if ( num == SDLK_HOME ) strcpy(text, "Home"); -// if ( num == SDLK_SELECT ) strcpy(text, "Select"); -// if ( num == SDLK_EXECUTE ) strcpy(text, "Execute"); -// if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == SDLK_INSERT ) strcpy(text, "Insert"); - if ( num == SDLK_DELETE ) strcpy(text, "Delete"); - if ( num == SDLK_HELP ) strcpy(text, "Help"); -// if ( num == SDLK_LWIN ) strcpy(text, "Left Windows"); -// if ( num == SDLK_RWIN ) strcpy(text, "Right Windows"); -// if ( num == SDLK_APPS ) strcpy(text, "Application key"); -// if ( num == SDLK_NUMPAD0 ) strcpy(text, "NumPad 0"); -// if ( num == SDLK_NUMPAD1 ) strcpy(text, "NumPad 1"); -// if ( num == SDLK_NUMPAD2 ) strcpy(text, "NumPad 2"); -// if ( num == SDLK_NUMPAD3 ) strcpy(text, "NumPad 3"); -// if ( num == SDLK_NUMPAD4 ) strcpy(text, "NumPad 4"); -// if ( num == SDLK_NUMPAD5 ) strcpy(text, "NumPad 5"); -// if ( num == SDLK_NUMPAD6 ) strcpy(text, "NumPad 6"); -// if ( num == SDLK_NUMPAD7 ) strcpy(text, "NumPad 7"); -// if ( num == SDLK_NUMPAD8 ) strcpy(text, "NumPad 8"); -// if ( num == SDLK_NUMPAD9 ) strcpy(text, "NumPad 9"); -// if ( num == SDLK_MULTIPLY ) strcpy(text, "NumPad *"); -// if ( num == SDLK_ADD ) strcpy(text, "NumPad +"); -// if ( num == SDLK_SEPARATOR ) strcpy(text, "NumPad sep"); -// if ( num == SDLK_SUBTRACT ) strcpy(text, "NumPad -"); -// if ( num == SDLK_DECIMAL ) strcpy(text, "NumPad ."); -// if ( num == SDLK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == SDLK_F1 ) strcpy(text, "F1"); - if ( num == SDLK_F2 ) strcpy(text, "F2"); - if ( num == SDLK_F3 ) strcpy(text, "F3"); - if ( num == SDLK_F4 ) strcpy(text, "F4"); - if ( num == SDLK_F5 ) strcpy(text, "F5"); - if ( num == SDLK_F6 ) strcpy(text, "F6"); - if ( num == SDLK_F7 ) strcpy(text, "F7"); - if ( num == SDLK_F8 ) strcpy(text, "F8"); - if ( num == SDLK_F9 ) strcpy(text, "F9"); - if ( num == SDLK_F10 ) strcpy(text, "F10"); - if ( num == SDLK_F11 ) strcpy(text, "F11"); - if ( num == SDLK_F12 ) strcpy(text, "F12"); - if ( num == SDLK_F13 ) strcpy(text, "F13"); - if ( num == SDLK_F14 ) strcpy(text, "F14"); - if ( num == SDLK_F15 ) strcpy(text, "F15"); -// if ( num == SDLK_F16 ) strcpy(text, "F16"); -// if ( num == SDLK_F17 ) strcpy(text, "F17"); -// if ( num == SDLK_F18 ) strcpy(text, "F18"); -// if ( num == SDLK_F19 ) strcpy(text, "F19"); -// if ( num == SDLK_F20 ) strcpy(text, "F20"); - if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); -// if ( num == SDLK_SCROLL ) strcpy(text, "Scroll"); -// if ( num == SDLK_ATTN ) strcpy(text, "Attn"); -// if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); -// if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); -// if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); -// if ( num == SDLK_PLAY ) strcpy(text, "Play"); -// if ( num == SDLK_ZOOM ) strcpy(text, "Zoom"); -// if ( num == SDLK_PA1 ) strcpy(text, "PA1"); -// if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Clear"); -// if ( num == SDLK_BUTTON1 ) strcpy(text, "Button 1"); -// if ( num == SDLK_BUTTON2 ) strcpy(text, "Button 2"); -// if ( num == SDLK_BUTTON3 ) strcpy(text, "Button 3"); -// if ( num == SDLK_BUTTON4 ) strcpy(text, "Button 4"); -// if ( num == SDLK_BUTTON5 ) strcpy(text, "Button 5"); -// if ( num == SDLK_BUTTON6 ) strcpy(text, "Button 6"); -// if ( num == SDLK_BUTTON7 ) strcpy(text, "Button 7"); -// if ( num == SDLK_BUTTON8 ) strcpy(text, "Button 8"); -// if ( num == SDLK_BUTTON9 ) strcpy(text, "Button 9"); -// if ( num == SDLK_BUTTON10 ) strcpy(text, "Button 10"); -// if ( num == SDLK_BUTTON11 ) strcpy(text, "Button 11"); -// if ( num == SDLK_BUTTON12 ) strcpy(text, "Button 12"); -// if ( num == SDLK_BUTTON13 ) strcpy(text, "Button 13"); -// if ( num == SDLK_BUTTON14 ) strcpy(text, "Button 14"); -// if ( num == SDLK_BUTTON15 ) strcpy(text, "Button 15"); -// if ( num == SDLK_BUTTON16 ) strcpy(text, "Button 16"); -// if ( num == SDLK_BUTTON17 ) strcpy(text, "Button 17"); -// if ( num == SDLK_BUTTON18 ) strcpy(text, "Button 18"); -// if ( num == SDLK_BUTTON19 ) strcpy(text, "Button 19"); -// if ( num == SDLK_BUTTON20 ) strcpy(text, "Button 20"); -// if ( num == SDLK_BUTTON21 ) strcpy(text, "Button 21"); -// if ( num == SDLK_BUTTON22 ) strcpy(text, "Button 22"); -// if ( num == SDLK_BUTTON23 ) strcpy(text, "Button 23"); -// if ( num == SDLK_BUTTON24 ) strcpy(text, "Button 24"); -// if ( num == SDLK_BUTTON25 ) strcpy(text, "Button 25"); -// if ( num == SDLK_BUTTON26 ) strcpy(text, "Button 26"); -// if ( num == SDLK_BUTTON27 ) strcpy(text, "Button 27"); -// if ( num == SDLK_BUTTON28 ) strcpy(text, "Button 28"); -// if ( num == SDLK_BUTTON29 ) strcpy(text, "Button 29"); -// if ( num == SDLK_BUTTON30 ) strcpy(text, "Button 30"); -// if ( num == SDLK_BUTTON31 ) strcpy(text, "Button 31"); -// if ( num == SDLK_BUTTON32 ) strcpy(text, "Button 32"); -// if ( num == SDLK_WHEELUP ) strcpy(text, "Wheel up"); -// if ( num == SDLK_WHEELDOWN ) strcpy(text, "Wheel down"); - } -#endif - -#if _FRENCH - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "1.18 /f"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /f"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Taille maximale"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Taille r�duite"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Taille normale"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Fermer"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edition du programme"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "Nouveau"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Joueur"); - if ( num == RT_IO_NEW ) strcpy(text, "Nouveau ..."); - if ( num == RT_KEY_OR ) strcpy(text, " ou "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmation"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "D�fis"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Missions"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Jeu libre"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Jeu libre"); - if ( num == RT_TITLE_USER ) strcpy(text, "Niveaux suppl�mentaires"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypes"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Options"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Nom du joueur"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Personnalisation de votre apparence"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Enregistrement de la mission en cours"); - if ( num == RT_TITLE_READ ) strcpy(text, "Chargement d'une mission enregistr�e"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste des plan�tes :"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste des plan�tes :"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Niveaux suppl�mentaires :"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste des plan�tes :"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste des chapitres :"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste des exercices du chapitre :"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste des d�fis du chapitre :"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste des missions du chapitre :"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste des jeux libres du chapitre :"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Missions du niveau :"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste des prototypes du chapitre :"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Liste des jeux libres du chapitre :"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " R�sum� :"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Pilotes :"); - if ( num == RT_SETUP_MODE ) strcpy(text, " R�solutions :"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Cliquez d'abord sur la touche � red�finir."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Appuyez ensuite sur la nouvelle touche souhait�e."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Type de visage :"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Lunettes :"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Couleur des cheveux :"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Couleur de la combinaison :"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Couleur des bandes :"); - -#if _NEWLOOK - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Voulez-vous quitter CeeBot ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quitter\\Quitter CeeBot"); -#else - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Voulez-vous quitter COLOBOT ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Quitter\\Quitter COLOBOT"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Quitter la mission ?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Abandonner\\Abandonner la mission en cours"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Continuer\\Continuer la mission en cours"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Continuer\\Continuer de jouer"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Voulez-vous vraiment d�truire le b�timent s�lectionn� ?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Voulez-vous d�truire les sauvegardes de %s ?"); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "D�truire"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Annuler"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "CHARGEMENT"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Aide sur le mot-cl� (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Compilation ok (0 erreur)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programme termin�"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Listes des objets\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Listes des robots\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes des b�timents\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes des objets transportables\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes des ennemis\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (aucun)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Erreur\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Liste non disponible sans \\l;radar\\u object\\radar; !\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "Ouvrir"); - if ( num == RT_IO_SAVE ) strcpy(text, "Enregistrer"); - if ( num == RT_IO_LIST ) strcpy(text, "Dossier: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Nom:"); - if ( num == RT_IO_DIR ) strcpy(text, "Dans:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Priv�\\Dossier priv�"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Public\\Dossier commun � tous les joueurs"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "D�velopp� par :"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); -#if _SCHOOL - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); -#else - //?if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Version fran�aise �dit�e par :"); - //?if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.alsyd.com"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); -#endif - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Enregistreur"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "D'accord"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Annuler"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Suivant"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Pr�c�dent"); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "D'accord"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Annuler"); - - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmation\\Exercices de programmation"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "D�fis\\D�fis de programmation"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missions\\La grande aventure"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Jeu libre\\Jeu libre sans but pr�cis"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Suppl.\\Niveaux suppl�mentaires"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\Prototypes en cours d'�laboration"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Autre joueur\\Choix du nom du joueur"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Options\\R�glages"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Recommencer\\Recommencer la mission au d�but"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Enregistrer\\Enregistrer la mission en cours"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Charger\\Charger une mission enregistr�e"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter CeeBot"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Retourner dans COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Quitter\\Quitter COLOBOT"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Retour \\Retour au niveau pr�c�dent"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Jouer ...\\D�marrer l'action"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Affichage\\Pilote et r�solution d'affichage"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Graphique\\Options graphiques"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Jeu\\Options de jouabilit�"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Commandes\\Touches du clavier"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Son\\Volumes bruitages & musiques"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Unit�"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "R�solution"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Plein �cran\\Plein �cran ou fen�tr�"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Appliquer les changements\\Active les changements effectu�s"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Votre assistant"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Ombres\\Ombres projet�es au sol"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Marques sur le sol\\Marques dessin�es sur le sol"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Salissures\\Salissures des robots et b�timents"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Brouillard\\Nappes de brouillard"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Rayons du soleil\\Rayons selon l'orientation"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Ciel\\Ciel et nuages"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Plan�tes et �toiles\\Motifs mobiles dans le ciel"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Lumi�res dynamiques\\Eclairages mobiles"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Quantit� de particules\\Explosions, poussi�res, reflets, etc."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Profondeur de champ\\Distance de vue maximale"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "D�tails des objets\\Qualit� des objets en 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit� des textures\\Qualit� des images"); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Nb d'objets d�coratifs\\Qualit� d'objets non indispensables"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Particules dans l'interface\\Pluie de particules"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Reflets sur les boutons\\Boutons brillants"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Bulles d'aide\\Bulles explicatives"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "S�quences cin�matiques\\Films avant ou apr�s une mission"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Retour anim�\\Retour anim� dans les exercices"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "D�g�ts � soi-m�me\\Vos tirs infligent des dommages � vos unit�s"); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "D�filement dans les bords\\D�filement lorsque la souris touches les bords gauche ou droite"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Secousses lors d'explosions\\L'�cran vibre lors d'une explosion"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Souris ombr�e\\Jolie souris avec une ombre"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Indentation automatique\\Pendant l'�dition d'un programme"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Grande indentation\\Indente avec 2 ou 4 espaces"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Acc�s aux solutions\\Programme \"4: Solution\" dans les exercices"); - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Tout r�initialiser\\Remet toutes les touches standards"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Tourner � gauche\\Moteur � gauche"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Tourner � droite\\Moteur � droite"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Avancer\\Moteur en avant"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Reculer\\Moteur en arri�re"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Monter\\Augmenter la puissance du r�acteur"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Descendre\\Diminuer la puissance du r�acteur"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Changement de cam�ra\\Autre de point de vue"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "S�lection pr�c�dente\\S�lectionne l'objet pr�c�dent"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Action standard\\Action du bouton avec le cadre rouge"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Cam�ra plus proche\\Avance la cam�ra"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Cam�ra plus loin\\Recule la cam�ra"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "S�lectionner l'objet suivant\\S�lectionner l'objet suivant"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "S�lectionner le cosmonaute\\S�lectionner le cosmonaute"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Quitter la mission en cours\\Terminer un exercice ou une mssion"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Instructions mission\\Marche � suivre"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Instructions programmation\\Explication sur la programmation"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Instructions mot-cl�\\Explication sur le mot-cl�"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Montrer le lieu d'un message\\Montrer le lieu du dernier message"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Vitesse 1.0x\\Vitesse normale"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Vitesse 1.5x\\Une fois et demi plus rapide"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Vitesse 2.0x\\Deux fois plus rapide"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Vitesse 3.0x\\Trois fois plus rapide"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Bruitages :\\Volume des moteurs, voix, etc."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Fond sonore :\\Volume des pistes audio du CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "Bruitages 3D\\Positionnement sonore dans l'espace"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Mini\\Qualit� minimale (+ rapide)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Qualit� standard"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Maxi\\Haute qualit� (+ lent)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Silencieux\\Totalement silencieux"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Niveaux normaux"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Utilise un joystick\\Joystick ou clavier"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Acc�s � la solution\\Donne la solution"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nom du joueur � cr�er"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "D'accord\\Choisir le joueur"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Annuler\\Conserver le joueur actuel"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Supprimer le joueur\\Supprimer le joueur de la liste"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Nom du joueur"); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Enregistrer\\Enregistrer la mission en cours"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Charger\\Charger la mission s�lectionn�e"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste des missions enregistr�es"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nom du fichier :"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nom de la mission"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Vue de la mission"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Supprimer\\Supprime l'enregistrement s�lectionn�"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aspect\\Choisir votre aspect"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "D'accord"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Annuler"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Remet les couleurs standards"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "T�te\\Visage et cheveux"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Corps\\Combinaison"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Rotation � gauche"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Rotation � droite"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rouge"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Vert"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Bleu"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Rouge"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Vert"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Bleu"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Visage 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Visage 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Visage 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Visage 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Pas de lunettes"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Lunettes 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Lunettes 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Lunettes 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Lunettes 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Lunettes 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "S�lection pr�c�dente (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Tourne � gauche (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Tourne � droite (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Avance (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Recule (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Monte (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Descend (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Prend ou d�pose (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..devant"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..derri�re"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..pile"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Instructions sur la mission (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "D�colle pour terminer la mission"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Construit un derrick"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Construit une station"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Construit une fabrique de robots"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Construit un centre de r�paration"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Construit un convertisseur"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Construit une tour"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Construit un centre de recherches"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Construit un radar"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Construit une fabrique de piles"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Construit un laboratoire"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Construit une centrale nucl�aire"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Construit un paratonnerre"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Construit une borne d'information"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Montre si le sol est plat"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Pose un drapeau de couleur"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Enl�ve un drapeau"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Drapeaux bleus"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Drapeaux rouges"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Drapeaux verts"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Drapeaux jaunes"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Drapeaux violets"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Fabrique un d�m�nageur volant"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Fabrique un d�m�nageur � chenilles"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Fabrique un d�m�nageur � roues"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Fabrique un d�m�nageur � pattes"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Fabrique un shooter volant"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Fabrique un shooter � chenilles"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Fabrique un shooter � roues"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Fabrique un shooter � pattes"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Fabrique un orgaShooter volant"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Fabrique un orgaShooter � chenilles"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Fabrique un orgaShooter � roues"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Fabrique un orgaShooter � pattes"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Fabrique un renifleur volant"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Fabrique un renifleur � chenilles"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Fabrique un renifleur � roues"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Fabrique un renifleur � pattes"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Fabrique un robot secoueur"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Fabrique un robot phazer"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Fabrique un robot recycleur"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Fabrique un robot bouclier"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Fabrique un robot sous-marin"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Recherche les chenilles"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Recherche les robots volants"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Recherche le secoueur"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Recherche le canon shooter"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Recherche la tour de d�fense"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Recherche le canon phazer"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Recherche le bouclier"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Recherche le nucl�aire"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Recherche les pattes"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Recherche le canon orgaShooter"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Remet au d�part"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Cherche (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Secoue (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Tir (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recycle (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "D�ploie le bouclier (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Stoppe le bouclier (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Rayon du bouclier"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Ex�cute le programme s�lectionn�"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edite le programme s�lectionn�"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Mettre le SatCom en veille"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "D�molit le b�timent"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Niveau d'�nergie"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Niveau du bouclier"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temp�rature du r�acteur"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Travail en cours ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Nombre d'insectes d�tect�s"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Informations diffus�es"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Boussole"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mini-carte"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom mini-carte"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Cam�ra (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Cam�ra � gauche"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Cam�ra � droite"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Cam�ra plus proche"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Cam�ra plus loin"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Instructions sur la s�lection"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Donne la solution"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Permute robots <-> b�timents"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Montre le rayon d'action"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Rel�ve le crayon"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Abaisse le crayon rouge"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Abaisse le crayon violet"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\D�marre l'enregistrement"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Montre l'endroit"); - if ( num == EVENT_DT_END ) strcpy(text, "Continuer"); - if ( num == EVENT_CMD ) strcpy(text, "Console de commande"); - if ( num == EVENT_SPEED ) strcpy(text, "Vitesse du jeu"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Page pr�c�dente"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Page suivante"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Page initiale"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Copier"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Taille 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Taille 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Taille 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Taille 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Taille 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Instructions de Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Dictionnaire anglais-fran�ais"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Rapport du satellite"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Programmes envoy�s par Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste des objets"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Aide � la programmation"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Solution"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "D'accord\\Compiler le programme"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Annuler\\Annuler toutes les modifications"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nouveau"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Ouvrir (Ctrl+o)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Enregistrer (Ctrl+s)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Annuler (Ctrl+z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Couper (Ctrl+x)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Copier (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Coller (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Taille des caract�res"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Instructions (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Aide � la programmation (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Compiler"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "D�marrer/stopper"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/continuer"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Un pas"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "Portique"); - if ( num == OBJECT_BASE ) strcpy(text, "Vaisseau spatial"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Derrick"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Fabrique de robots"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Centre de r�paration"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Destructeur"); - if ( num == OBJECT_STATION ) strcpy(text, "Station de recharge"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Conversion minerai en titanium"); - if ( num == OBJECT_TOWER ) strcpy(text, "Tour de d�fense"); - if ( num == OBJECT_NEST ) strcpy(text, "Nid"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Centre de recherches"); - if ( num == OBJECT_RADAR ) strcpy(text, "Radar"); - if ( num == OBJECT_INFO ) strcpy(text, "Borne d'information"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "D�sint�grateur"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Fabrique de piles"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Laboratoire de mati�res organiques"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Centrale nucl�aire"); - if ( num == OBJECT_PARA ) strcpy(text, "Paratonnerre"); - if ( num == OBJECT_SAFE ) strcpy(text, "Coffre-fort"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Centre de contr�le"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Cible"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Cible"); - if ( num == OBJECT_START ) strcpy(text, "D�part"); - if ( num == OBJECT_END ) strcpy(text, "But"); - if ( num == OBJECT_STONE ) strcpy(text, "Minerai de titanium"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Minerai d'uranium"); - if ( num == OBJECT_BULLET ) strcpy(text, "Mati�re organique"); - if ( num == OBJECT_METAL ) strcpy(text, "Titanium"); - if ( num == OBJECT_POWER ) strcpy(text, "Pile normale"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Pile nucl�aire"); - if ( num == OBJECT_BBOX ) strcpy(text, "Bo�te noire"); - if ( num == OBJECT_KEYa ) strcpy(text, "Cl� A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Cl� B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Cl� C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Cl� D"); - if ( num == OBJECT_TNT ) strcpy(text, "Explosif"); - if ( num == OBJECT_BOMB ) strcpy(text, "Mine fixe"); - if ( num == OBJECT_BAG ) strcpy(text, "Sac de survie"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Indicateur"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Drapeau bleu"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Drapeau rouge"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Drapeau vert"); - if ( num == OBJECT_FLAGy ) strcpy(text, "Drapeau jaune"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Drapeau violet"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Emplacement pour station"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Emplacement pour derrick (uranium)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Emplacement pour derrick (cl� A)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Emplacement pour derrick (cl� B)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Emplacement pour derrick (cl� C)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Emplacement pour derrick (cl� D)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Emplacement pour derrick (titanium)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot d'entra�nement"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot d'entra�nement"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot d'entra�nement"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot d'entra�nement"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Robot d�m�nageur"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Robot d�m�nageur"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Robot d�m�nageur"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Robot d�m�nageur"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Robot shooter"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Robot orgaShooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Robot renifleur"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Robot secoueur"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Robot phazer"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Robot recycleur"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Robot bouclier"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot sous-marin"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Cible d'entra�nement"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Robot dessinateur"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Technicien"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Pondeuse"); - if ( num == OBJECT_ANT ) strcpy(text, "Fourmi"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Araign�e"); - if ( num == OBJECT_BEE ) strcpy(text, "Gu�pe"); - if ( num == OBJECT_WORM ) strcpy(text, "Ver"); - if ( num == OBJECT_EGG ) strcpy(text, "Oeuf"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Epave de robot"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "B�timent en ruine"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "B�timent en ruine"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "D�chet"); - if ( num == OBJECT_RUINradar ) strcpy(text, "B�timent en ruine"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "B�timent en ruine"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Epave de vaisseau spatial"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Epave de vaisseau spatial"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Vestige d'une mission Apollo"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Erreur"); - if ( num == ERR_CMD ) strcpy(text, "Commande inconnue"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot n'est pas install�."); - if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de CeeBot\net relancer le jeu."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT n'est pas install�."); - if ( num == ERR_NOCD ) strcpy(text, "Veuillez mettre le CD de COLOBOT\net relancer le jeu."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Robot inadapt�"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Porte d�j� quelque chose"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Rien � prendre"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Emplacement occup�"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Pas d'autre robot"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Vous ne pouvez pas transporter un objet radioactif"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Vous ne pouvez pas transporter un objet sous l'eau"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Rien � d�poser"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Impossible sous l'eau"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Pas assez d'�nergie"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titanium trop loin"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titanium trop proche"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Titanium inexistant"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Sol pas assez plat"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Sol plat pas assez grand"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Emplacement occup�"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Trop proche du vaisseau spatial"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Trop proche d'un b�timent"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Robot inadapt�"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Robot inadapt�"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Pas assez d'�nergie"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Terrain inadapt�"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "B�timent trop proche"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Objet trop proche"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Robot inadapt�"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Pas assez d'�nergie"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Rien � recycler"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Robot inadapt�"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Plus d'�nergie"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "D�placement impossible"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Objet n'existe pas"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Chemin introuvable"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Position inaccessible"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Destination occup�e"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Robot inadapt�"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Pas assez d'�nergie"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Pas de minerai de titanium � convertir"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "Pas de minerai en sous-sol"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Pas d'�nergie en sous-sol"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Plus d'�nergie"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Plus assez d'�nergie"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Pas le bon type de pile"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Recherche d�j� effectu�e"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Pas d'�nergie en sous-sol"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Pas encore assez d'�nergie"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Pas de titanium � transformer"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Ne transforme que le titanium"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Portes bloqu�es par un robot ou un objet"); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Vous devez embarquer pour pouvoir d�coller"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Rien � analyser"); - if ( num == ERR_LABO_BAD ) strcpy(text, "N'analyse que la mati�re organique"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse d�j� effectu�e"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Pas d'�nergie en sous-sol"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Pas encore assez d'�nergie"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Pas d'uranium � transformer"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Ne transforme que l'uranium"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "Pas de titanium"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Quelque chose est trop proche"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Emplacement occup�"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Pas trouv� de borne d'information"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Un programme est infect� par un virus"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Infect� par un virus, ne fonctionne plus temporairement"); - if ( num == ERR_VEH_POWER ) strcpy(text, "Pas de pile"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Plus d'�nergie"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Impossible en vol"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Impossible en nageant"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Impossible en mouvement"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Impossible en portant un objet"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Trop de drapeaux de cette couleur (maximum 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Trop proche d'un drapeau existant"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Aucun drapeau � proximit�"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "La misssion n'est pas termin�e (appuyez sur \\key help; pour plus de d�tails)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot d�truit"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "B�timent d�truit"); - if ( num == ERR_TOOMANY ) strcpy(text, "Cr�ation impossible, il y a trop d'objets"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Il manque \"%s\" dans le programme"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Interdit dans cet exercice"); - - if ( num == INFO_BUILD ) strcpy(text, "B�timent termin�"); - if ( num == INFO_CONVERT ) strcpy(text, "Titanium disponible"); - if ( num == INFO_RESEARCH ) strcpy(text, "Recherche termin�e"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Fabrication d'un robot � chenilles possible"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Fabrication d'un robot secoueur possible"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Fabrication de robots shooter possible"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Construction d'une tour de d�fense possible"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Fabrication d'un robot phazer possible"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Fabrication d'un robot bouclier possible"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Construction d'une centrale nucl�aire possible"); - if ( num == INFO_FACTORY ) strcpy(text, "Nouveau robot disponible"); - if ( num == INFO_LABO ) strcpy(text, "Analyse termin�e"); - if ( num == INFO_ENERGY ) strcpy(text, "Pile disponible"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Pile nucl�aire disponible"); - if ( num == INFO_FINDING ) strcpy(text, "Vous avez trouv� un objet utilisable"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Emplacement pour station trouv�"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Emplacement pour derrick trouv�"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Emplacement pour derrick trouv�"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Emplacement pour derrick trouv�"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Emplacement pour derrick trouv�"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Emplacement pour derrick trouv�"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Emplacement pour derrick trouv�"); - if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, mission termin�e >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< D�sol�, mission �chou�e >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< D�sol�, mission �chou�e >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Enregistrement effectu�"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Indicateur atteint"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Pondeuse mortellement touch�e"); - if ( num == INFO_DELETEANT ) strcpy(text, "Fourmi mortellement touch�e"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Gu�pe mortellement touch�e"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Ver mortellement touch�"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Araign�e mortellement touch�e"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Consultez votre SatCom en appuyant sur \\key help;"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Erreur"); - if ( num == TX_OPENPAR ) strcpy(text, "Il manque une parenth�se ouvrante"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Il manque une parenth�se fermante"); - if ( num == TX_NOTBOOL ) strcpy(text, "L'expression doit �tre un boolean"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable non d�clar�e"); - if ( num == TX_BADLEFT ) strcpy(text, "Assignation impossible"); - if ( num == TX_ENDOF ) strcpy(text, "Terminateur point-virgule non trouv�"); - if ( num == TX_OUTCASE ) strcpy(text, "Instruction ""case"" hors d'un bloc ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Instructions apr�s la fin"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Il manque la fin du bloc"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Instruction ""else"" sans ""if"" correspondant"); - if ( num == TX_OPENBLK ) strcpy(text, "D�but d'un bloc attendu"); - if ( num == TX_BADTYPE ) strcpy(text, "Mauvais type de r�sultat pour l'assignation"); - if ( num == TX_REDEFVAR ) strcpy(text, "Red�finition d'une variable"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Les deux op�randes ne sont pas de types compatibles"); - if ( num == TX_UNDEFCALL ) strcpy(text, "Routine inconnue"); - if ( num == TX_MISDOTS ) strcpy(text, "S�parateur "" : "" attendu"); - if ( num == TX_WHILE ) strcpy(text, "Manque le mot ""while"""); - if ( num == TX_BREAK ) strcpy(text, "Instruction ""break"" en dehors d'une boucle"); - if ( num == TX_LABEL ) strcpy(text, "Un label ne peut se placer que devant un ""for"", un ""while"", un ""do"" ou un ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "Cette �tiquette n'existe pas"); - if ( num == TX_NOCASE ) strcpy(text, "Manque une instruction ""case"""); - if ( num == TX_BADNUM ) strcpy(text, "Un nombre est attendu"); - if ( num == TX_VOID ) strcpy(text, "Param�tre void"); - if ( num == TX_NOTYP ) strcpy(text, "D�claration de type attendu"); - if ( num == TX_NOVAR ) strcpy(text, "Nom d'une variable attendu"); - if ( num == TX_NOFONC ) strcpy(text, "Nom de la fonction attendu"); - if ( num == TX_OVERPARAM ) strcpy(text, "Trop de param�tres"); - if ( num == TX_REDEF ) strcpy(text, "Cette fonction existe d�j�"); - if ( num == TX_LOWPARAM ) strcpy(text, "Pas assez de param�tres"); - if ( num == TX_BADPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce(s) type(s) de param�tre(s)"); - if ( num == TX_NUMPARAM ) strcpy(text, "Aucune fonction de ce nom n'accepte ce nombre de param�tres"); - if ( num == TX_NOITEM ) strcpy(text, "Cet �l�ment n'existe pas dans cette classe"); - if ( num == TX_DOT ) strcpy(text, "L'objet n'est pas une instance d'une classe"); - if ( num == TX_NOCONST ) strcpy(text, "Il n'y a pas de constructeur appropri�"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Cette classe existe d�j�"); - if ( num == TX_CLBRK ) strcpy(text, """ ] "" attendu"); - if ( num == TX_RESERVED ) strcpy(text, "Ce mot est r�serv�"); - if ( num == TX_BADNEW ) strcpy(text, "Mauvais argument pour ""new"""); - if ( num == TX_OPBRK ) strcpy(text, """ [ "" attendu"); - if ( num == TX_BADSTRING ) strcpy(text, "Une cha�ne de caract�re est attendue"); - if ( num == TX_BADINDEX ) strcpy(text, "Mauvais type d'index"); - if ( num == TX_PRIVATE ) strcpy(text, "El�ment prot�g�"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Public requis"); - if ( num == TX_DIVZERO ) strcpy(text, "Division par z�ro"); - if ( num == TX_NOTINIT ) strcpy(text, "Variable non initialis�e"); - if ( num == TX_BADTHROW ) strcpy(text, "Valeur n�gative refus�e pour ""throw"""); - if ( num == TX_NORETVAL ) strcpy(text, "La fonction n'a pas retourn� de r�sultat"); - if ( num == TX_NORUN ) strcpy(text, "Pas de fonction en ex�cution"); - if ( num == TX_NOCALL ) strcpy(text, "Appel d'une fonction inexistante"); - if ( num == TX_NOCLASS ) strcpy(text, "Cette classe n'existe pas"); - if ( num == TX_NULLPT ) strcpy(text, "Objet n'existe pas"); - if ( num == TX_OPNAN ) strcpy(text, "Op�ration sur un ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Acc�s hors du tableau"); - if ( num == TX_STACKOVER ) strcpy(text, "D�bordement de la pile"); - if ( num == TX_DELETEDPT ) strcpy(text, "Objet inaccessible"); - if ( num == TX_FILEOPEN ) strcpy(text, "Ouverture du fichier impossible"); - if ( num == TX_NOTOPEN ) strcpy(text, "Le fichier n'est pas ouvert"); - if ( num == TX_ERRREAD ) strcpy(text, "Erreur � la lecture"); - if ( num == TX_ERRWRITE ) strcpy(text, "Erreur � l'�criture"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< aucune >"); - if ( num == SDLK_LEFT ) strcpy(text, "Fl�che Gauche"); - if ( num == SDLK_RIGHT ) strcpy(text, "Fl�che Droite"); - if ( num == SDLK_UP ) strcpy(text, "Fl�che Haut"); - if ( num == SDLK_DOWN ) strcpy(text, "Fl�che Bas"); - if ( num == SDLK_CANCEL ) strcpy(text, "Control-break"); - if ( num == SDLK_BACK ) strcpy(text, "<--"); - if ( num == SDLK_TAB ) strcpy(text, "Tab"); - if ( num == SDLK_CLEAR ) strcpy(text, "Clear"); - if ( num == SDLK_RETURN ) strcpy(text, "Entr�e"); - if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); - if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == SDLK_MENU ) strcpy(text, "Alt"); - if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); - if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); - if ( num == SDLK_SPACE ) strcpy(text, "Espace"); - if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); - if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); - if ( num == SDLK_END ) strcpy(text, "End"); - if ( num == SDLK_HOME ) strcpy(text, "Home"); - if ( num == SDLK_SELECT ) strcpy(text, "Select"); - if ( num == SDLK_EXECUTE ) strcpy(text, "Execute"); - if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == SDLK_INSERT ) strcpy(text, "Insert"); - if ( num == SDLK_DELETE ) strcpy(text, "Delete"); - if ( num == SDLK_HELP ) strcpy(text, "Help"); - if ( num == SDLK_LWIN ) strcpy(text, "Left Windows"); - if ( num == SDLK_RWIN ) strcpy(text, "Right Windows"); - if ( num == SDLK_APPS ) strcpy(text, "Application key"); - if ( num == SDLK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == SDLK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == SDLK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == SDLK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == SDLK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == SDLK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == SDLK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == SDLK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == SDLK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == SDLK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == SDLK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == SDLK_ADD ) strcpy(text, "NumPad +"); - if ( num == SDLK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == SDLK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == SDLK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == SDLK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == SDLK_F1 ) strcpy(text, "F1"); - if ( num == SDLK_F2 ) strcpy(text, "F2"); - if ( num == SDLK_F3 ) strcpy(text, "F3"); - if ( num == SDLK_F4 ) strcpy(text, "F4"); - if ( num == SDLK_F5 ) strcpy(text, "F5"); - if ( num == SDLK_F6 ) strcpy(text, "F6"); - if ( num == SDLK_F7 ) strcpy(text, "F7"); - if ( num == SDLK_F8 ) strcpy(text, "F8"); - if ( num == SDLK_F9 ) strcpy(text, "F9"); - if ( num == SDLK_F10 ) strcpy(text, "F10"); - if ( num == SDLK_F11 ) strcpy(text, "F11"); - if ( num == SDLK_F12 ) strcpy(text, "F12"); - if ( num == SDLK_F13 ) strcpy(text, "F13"); - if ( num == SDLK_F14 ) strcpy(text, "F14"); - if ( num == SDLK_F15 ) strcpy(text, "F15"); - if ( num == SDLK_F16 ) strcpy(text, "F16"); - if ( num == SDLK_F17 ) strcpy(text, "F17"); - if ( num == SDLK_F18 ) strcpy(text, "F18"); - if ( num == SDLK_F19 ) strcpy(text, "F19"); - if ( num == SDLK_F20 ) strcpy(text, "F20"); - if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == SDLK_SCROLL ) strcpy(text, "Scroll"); - if ( num == SDLK_ATTN ) strcpy(text, "Attn"); - if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); - if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); - if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == SDLK_PLAY ) strcpy(text, "Play"); - if ( num == SDLK_ZOOM ) strcpy(text, "Zoom"); - if ( num == SDLK_PA1 ) strcpy(text, "PA1"); - if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == SDLK_BUTTON1 ) strcpy(text, "Bouton 1"); - if ( num == SDLK_BUTTON2 ) strcpy(text, "Bouton 2"); - if ( num == SDLK_BUTTON3 ) strcpy(text, "Bouton 3"); - if ( num == SDLK_BUTTON4 ) strcpy(text, "Bouton 4"); - if ( num == SDLK_BUTTON5 ) strcpy(text, "Bouton 5"); - if ( num == SDLK_BUTTON6 ) strcpy(text, "Bouton 6"); - if ( num == SDLK_BUTTON7 ) strcpy(text, "Bouton 7"); - if ( num == SDLK_BUTTON8 ) strcpy(text, "Bouton 8"); - if ( num == SDLK_BUTTON9 ) strcpy(text, "Bouton 9"); - if ( num == SDLK_BUTTON10 ) strcpy(text, "Bouton 10"); - if ( num == SDLK_BUTTON11 ) strcpy(text, "Bouton 11"); - if ( num == SDLK_BUTTON12 ) strcpy(text, "Bouton 12"); - if ( num == SDLK_BUTTON13 ) strcpy(text, "Bouton 13"); - if ( num == SDLK_BUTTON14 ) strcpy(text, "Bouton 14"); - if ( num == SDLK_BUTTON15 ) strcpy(text, "Bouton 15"); - if ( num == SDLK_BUTTON16 ) strcpy(text, "Bouton 16"); - if ( num == SDLK_BUTTON17 ) strcpy(text, "Bouton 17"); - if ( num == SDLK_BUTTON18 ) strcpy(text, "Bouton 18"); - if ( num == SDLK_BUTTON19 ) strcpy(text, "Bouton 19"); - if ( num == SDLK_BUTTON20 ) strcpy(text, "Bouton 20"); - if ( num == SDLK_BUTTON21 ) strcpy(text, "Bouton 21"); - if ( num == SDLK_BUTTON22 ) strcpy(text, "Bouton 22"); - if ( num == SDLK_BUTTON23 ) strcpy(text, "Bouton 23"); - if ( num == SDLK_BUTTON24 ) strcpy(text, "Bouton 24"); - if ( num == SDLK_BUTTON25 ) strcpy(text, "Bouton 25"); - if ( num == SDLK_BUTTON26 ) strcpy(text, "Bouton 26"); - if ( num == SDLK_BUTTON27 ) strcpy(text, "Bouton 27"); - if ( num == SDLK_BUTTON28 ) strcpy(text, "Bouton 28"); - if ( num == SDLK_BUTTON29 ) strcpy(text, "Bouton 29"); - if ( num == SDLK_BUTTON30 ) strcpy(text, "Bouton 30"); - if ( num == SDLK_BUTTON31 ) strcpy(text, "Bouton 31"); - if ( num == SDLK_BUTTON32 ) strcpy(text, "Bouton 32"); - if ( num == SDLK_WHEELUP ) strcpy(text, "Molette haut"); - if ( num == SDLK_WHEELDOWN ) strcpy(text, "Molette bas"); - } -#endif - -#if _GERMAN | _WG - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "1.18 /d"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /d"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Gro�es Fenster"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Reduzieren"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normale Gr��e"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Schlie�en"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Programmeditor"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "Neu"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Spieler"); - if ( num == RT_IO_NEW ) strcpy(text, "Neu ..."); - if ( num == RT_KEY_OR ) strcpy(text, " oder "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif -#if _SCHOOL - if ( num == RT_TITLE_TRAINER ) strcpy(text, "�bungen"); -#else - if ( num == RT_TITLE_TRAINER ) strcpy(text, "Programmieren"); -#endif - if ( num == RT_TITLE_DEFI ) strcpy(text, "Challenges"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Missionen"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Freestyle"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Freestyle"); - if ( num == RT_TITLE_USER ) strcpy(text, "Userlevels"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypen"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Einstellungen"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Name "); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Aussehen einstellen"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Aktuelle Mission speichern"); - if ( num == RT_TITLE_READ ) strcpy(text, "Gespeicherte Mission laden"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Liste der Planeten:"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Liste der Planeten:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Userlevels:"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Liste der Planeten:"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Liste der Kapitel:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " Liste der �bungen des Kapitels:"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Liste der Challenges des Kapitels:"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Liste der Missionen des Planeten:"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Liste der freien Levels des Planeten:"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Missionen des Userlevels:"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Liste der Prototypen des Planeten:"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Liste der freien Levels des Kapitel:"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Zusammenfassung:"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Driver:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Aufl�sung:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Klicken Sie auf die neu zu definierende Taste."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Dr�cken Sie auf die neue Taste."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Kopf:"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Brille:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Haarfarbe:"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Farbe des Anzugs:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Farbe der Streifen:"); - -#if _NEWLOOK - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie CeeBot schlie�en ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlie�en\\CeeBot schlie�en"); -#else - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Wollen Sie COLOBOT schlie�en ?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Schlie�en\\COLOBOT schlie�en"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Mission abbrechen ?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Abbrechen\\Mission abbrechen"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Weitermachen\\Mission weitermachen"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Weitermachen\\Weitermachen"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Wollen Sie das angew�hlte Geb�ude wirklich zerst�ren ?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Wollen Sie die gespeicherten Missionen von %s l�schen ?"); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Zerst�ren"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Abbrechen"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "Laden"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Hilfe �ber den Begriff (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Kompilieren OK (0 Fehler)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Programm beendet"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Liste der Objekte\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Liste der Roboter\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Listes der Geb�ude\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Listes der tragbaren Gegenst�nde\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Listes der Feinde\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (keine)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;Fehler\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verf�gbar !\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "�ffnen"); - if ( num == RT_IO_SAVE ) strcpy(text, "Speichern"); - if ( num == RT_IO_LIST ) strcpy(text, "Ordner: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Name:"); - if ( num == RT_IO_DIR ) strcpy(text, "In:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Privat\\Privater Ordner"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "�ffentlich\\Gemeinsamer Ordner f�r alle Spieler"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Entwickelt von:"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); -#if _WG - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Herausgegeben von:"); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.wg-verlag.ch"); -#else - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); -#endif - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Recorder"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Abbrechen"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "N�chster"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Vorherg."); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Men� (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Abbrechen"); - -#if _SCHOOL - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�bungen\\Programmier�bungen"); -#else - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "Programmieren\\Programmier�bungen"); -#endif - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Challenges\\Herausforderungen"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Missionen\\Aufbruch ins Weltall"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Freestyle\\Freies Spielen ohne vorgegebenes Ziel"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Freestyle\\Freies Spielen ohne vorgegebenes Ziel"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "User\\Userlevels"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Proto\\In Entwicklung befindliche Prototypen"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Anderer Spieler\\Spielername �ndern"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Einstellungen\\Einstellungen"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Neu anfangen\\Die Mission von vorne anfangen"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Speichern\\Aktuelle Mission speichern"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Laden\\Eine gespeicherte Mission �ffnen"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zur�ck zu CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlie�en\\CeeBot schlie�en"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Zur�ck zu COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Schlie�en\\COLOBOT schlie�en"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Zur�ck \\Zur�ck zum Hauptmen�"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Spielen ...\\Los geht's"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Bildschirm\\Driver und Bildschirmaufl�sung"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafik\\Grafische Einstellungen"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Spiel\\Gameplay Einstellungen"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Steuerung\\Auswahl der Tasten"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "Ger�usche\\Lautst�rke Ger�usche und Musik"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Einheit"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Aufl�sung"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Vollbildschirm\\Vollbildschirm oder Fenster"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "�nderungen ausf�hren\\Get�tigte Einstellungen ausf�hren"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robby\\Ihr Assistent"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Schatten\\Schlagschatten auf dem Boden"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Markierungen\\Markierungen auf dem Boden"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Schmutz\\Schmutz auf Robotern und Bauten"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Nebel\\Nebelschwaden"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Sonnenstrahlen\\Sonnenstrahlen"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Himmel\\Himmel und Wolken"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planeten und Sterne\\Kreisende Planeten und Sterne"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamische Beleuchtung\\Dynamische Beleuchtung"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Anzahl Partikel\\Explosionen, Staub, usw."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "Sichtweite\\Maximale Sichtweite"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Details\\Detailliertheit der Objekte in 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Qualit�t der Texturen\\Qualit�t der Anzeige"); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Anzahl Ziergegenst�nde\\Anzahl Gegenst�nde ohne Funktion"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Partikel in den Men�s\\Funken und Sterne in den Men�s"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Gl�nzende Tasten\\Gl�nzende Tasten in den Men�s"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Hilfsblasen\\Hilfsblasen"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Filme\\Filme vor und nach den Missionen"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Zur�cksetzen \\Kleine Show beim Zur�cksetzen in den �bungen"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen besch�digt."); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Umkehr X\\Umkehr der Kameradrehung X-Achse"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Umkehr Y\\Umkehr der Kameradrehung Y-Achse"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Beben bei Explosionen\\Die Kamera bebt bei Explosionen"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Schatten unter der Maus\\Ein Schatten erscheint unter der Maus"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatisches Einr�cken\\Beim Bearbeiten der Programme"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Einr�cken mit 4 Leerstellen\\Einr�cken mit 2 oder 4 Leerstellen"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "L�sung zug�nglich\\Die L�sung ist im Programmslot \"4: L�sung\" zug�nglich"); - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Alles zur�cksetzen\\Standarddefinition aller Tasten"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Drehung nach links\\Steuer links"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Drehung nach rechts\\Steuer rechts"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Vorw�rts\\Bewegung nach vorne"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "R�ckw�rts\\Bewegung nach hinten"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "Steigen\\Leistung des Triebwerks steigern"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "Sinken\\Leistung des Triebwerks drosseln"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Andere Kamera\\Sichtpunkt einstellen"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Vorherg. Auswahl\\Das vorhergehende Objekt ausw�hlen"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardhandlung\\F�hrt die Standardhandlung des Roboters aus."); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera n�her\\Bewegung der Kamera vorw�rts"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera weiter\\Bewegung der Kamera r�ckw�rts"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "N�chstes ausw�hlen\\N�chstes Objekt ausw�hlen"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Astronauten ausw�hlen\\Astronauten ausw�hlen"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Mission verlassen\\Eine Mission oder �bung verlassen"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Anweisungen\\Anweisungen f�r die Mission oder �bung"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Hilfe CBOT-Sprache\\Hilfe �ber die Programmiersprache CBOT"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Hilfe �ber Begriff\\Hilfe �ber einen Begriff"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Ort der Meldung\\Zeigt den Ort, von dem die letzte Meldung stammt"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Geschwindigkeit 1.0x\\Normale Spielgeschwindigkeit"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Geschwindigkeit 1.5x\\Spielgeschwindigkeit anderthalb Mal schneller"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Geschwindigkeit 2.0x\\Spielgeschwindigkeit doppelt so schnell"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Geschwindigkeit 3.0x\\Spielgeschwindigkeit drei Mal schneller"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Ger�usche:\\Lautst�rke Motoren, Stimmen, usw."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Ger�uschkulisse:\\Lautst�rke der Soundtracks der CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "3D-Ger�usche\\Orten der Ger�usche im Raum"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Min.\\Minimale Qualit�t (gro�es Framerate)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normal\\Standardqualit�t"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Max.\\Beste Qualit�t (niedriges Framerate)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Kein Ton\\Keine Ger�usche und Ger�uschkulisse"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normal\\Normale Lautst�rke"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "Joystick\\Joystick oder Tastatur"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Zeigt die L�sung\\Zeigt nach 3mal Scheitern die L�sung"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Name des Spielers"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Spieler ausw�hlen"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Abbrechen\\Beh�lt den bisherigen Spieler bei"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Spieler l�schen\\L�scht den Spieler aus der Liste"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Name "); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Speichern\\Speichert die Mission"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Laden\\�ffnet eine gespeicherte Mission"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Liste der gespeicherten Missionen"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Dateiname:"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Name der Mission"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Ansicht der Mission"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "L�schen\\L�scht die gespeicherte Mission"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Aussehen\\Erscheinungsbild des Astronauten einstellen"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Abbrechen"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standard\\Standardfarben einsetzen"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "Kopf\\Gesicht und Haare"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Anzug\\Raumfahrtanzug"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Drehung links"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Drehung rechts"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Rot"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Gr�n"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Blau"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Rot"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Gr�n"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Blau"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Kopf 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Kopf 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Kopf 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Kopf 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Keine Brille"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Brille 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Brille 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Brille 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Brille 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Brille 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Vorherg. Auwahl (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Drehung links (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Drehung rechts (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Vorw�rts (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "R�ckw�rts (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "Steigt (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "Sinkt (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Nehmen oder hinlegen (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Nehmen oder hinlegen (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..vorne"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..hinten"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..Batterie"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Anweisungen �ber die Mission(\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Abheben nach vollbrachter Mission"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Baut einen Bohrturm"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Baut ein Kraftwerk"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Baut eine Roboterfabrik"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Baut ein Reparaturzentrum"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Baut einen Konverter"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Baut einen Gesch�tzturm"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Baut ein Forschungszentrum"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Baut ein Radar"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Baut eine Batteriefabrik"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Baut ein automatisches Labor"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Baut eine Brennstoffzellenfabrik"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Baut einen Blitzableiter"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Baut einen Infoserver"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Zeigt ob der Boden eben ist"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Setzt eine Fahne"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Sammelt die Fahne ein"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Blaue Fahne"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Rote Fahne"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Gr�ne Fahne"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\Gelbe Fahne"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Violette Fahne"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Baut einen Jettransporter"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Baut einen Kettentransporter"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Baut einen Radtransporter"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Baut einen Krabbeltransporter"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Baut einen Jetshooter"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Baut einen Kettenshooter"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Baut einen Radshooter"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Baut einen Krabbelshooter"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Baut einen Jetorgashooter"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Baut einen Kettenorgashooter"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Baut einen Radorgashooter"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Baut einen Krabbelorgashooter"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Baut einen Jetschn�ffler"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Baut einen Kettenschn�ffler"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Baut einen Radschn�ffler"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Baut einen Krabbelschn�ffler"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Baut einen Stampfer"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Baut einen Phazershooter"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Baut einen Recycler"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Baut einen Schutzschild"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Baut einen Kettentaucher"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Forschungsprogramm Kettenantrieb"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Forschungsprogramm Jetantrieb"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Forschungsprogramm Stampfer"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Forschungsprogramm Shooterkanone"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Forschungsprogramm Gesch�tzturm"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Forschungsprogramm Phazerkanone"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Forschungsprogramm Schutzschild"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Forschungsprogramm Brennstoffzelle"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Forschungsprogramm Krabbelantrieb"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Forschungsprogramm Orgashooterkanone"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Alles zur�cksetzen"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Schn�ffeln (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Stampfen (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Feuer (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Recyceln (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Schutzschild ausfahren (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Schutzschild einholen (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Reichweite Schutzschild"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Gew�hltes Programm ausf�hren"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Gew�hltes Programm bearbeiten"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\SatCom in Standby"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Geb�ude sprengen"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Energievorrat"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Sch�den"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Triebwerktemperatur"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Prozess im Gang ..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Anzahl erfasster Insekten"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Gesendete Informationen"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompass"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Minikarte"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Zoom Minikarte"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Kamera links"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Kamera rechts"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Kamera n�her"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Kamera weiter weg"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Anweisungen �ber das ausgew�hlte Objekt"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Zeigt die L�sung"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Anzeige Roboter <-> Bauten"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Zeigt die Reichweite"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Bleistift abheben"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Schwarzen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Gelben Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Orangefarbenen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Roten Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Violetten Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Blauen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Gr�nen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Braunen Bleistift hinunterlassen"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\Aufnahme starten"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Aufnahme stoppen"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Zeigt den Ort"); - if ( num == EVENT_DT_END ) strcpy(text, "Weitermachen"); - if ( num == EVENT_CMD ) strcpy(text, "Befehleingabe"); - if ( num == EVENT_SPEED ) strcpy(text, "Spielgeschwindigkeit"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Vorherg. Seite"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "N�chste Seite"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Home"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopieren"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Gr��e 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Gr��e 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Gr��e 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Gr��e 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Gr��e 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Anweisungen von Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "W�rterbuch Englisch-Deutsch"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Satellitenbericht"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Von Houston �bermittelte Programme"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Liste der Objekte"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Hilfe �ber Programmieren"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "L�sung"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Programm kompilieren"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Abbrechen\\Editor schlie�en"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Neu"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "�ffnen (Ctrl+o)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Speichern (Ctrl+s)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Widerrufen (Ctrl+z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Ausschneiden (Ctrl+x)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopieren (Ctrl+c)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Einf�gen (Ctrl+v)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Zeichengr��e"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Anweisungen (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Hilfe �ber Programmieren (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompilieren"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Start/Stop"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pause/Weitermachen"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Ein Schritt"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "Tr�ger"); - if ( num == OBJECT_BASE ) strcpy(text, "Raumschiff"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Bohrturm"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Roboterfabrik"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Reparaturzentrum"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Einstampfer"); - if ( num == OBJECT_STATION ) strcpy(text, "Kraftwerk"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Konverter Erz-Titan"); - if ( num == OBJECT_TOWER ) strcpy(text, "Gesch�tzturm"); - if ( num == OBJECT_NEST ) strcpy(text, "Orgastoffquelle"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Forschungszentrum"); - if ( num == OBJECT_RADAR ) strcpy(text, "Radar"); - if ( num == OBJECT_INFO ) strcpy(text, "Infoserver"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Aufl�ser"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Batteriefabrik"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Automatisches Labor"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Brennstoffzellenfabrik"); - if ( num == OBJECT_PARA ) strcpy(text, "Blitzableiter"); - if ( num == OBJECT_SAFE ) strcpy(text, "Bunker"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Kontrollzentrum"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Zielscheibe"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Zielscheibe"); - if ( num == OBJECT_START ) strcpy(text, "Startfl�che"); - if ( num == OBJECT_END ) strcpy(text, "Zielfl�che"); - if ( num == OBJECT_STONE ) strcpy(text, "Titanerz"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Platinerz"); - if ( num == OBJECT_BULLET ) strcpy(text, "Orgastoff"); - if ( num == OBJECT_METAL ) strcpy(text, "Titan"); - if ( num == OBJECT_POWER ) strcpy(text, "Elektrolytische Batterie"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Brennstoffzelle"); - if ( num == OBJECT_BBOX ) strcpy(text, "Flugschreiber"); - if ( num == OBJECT_KEYa ) strcpy(text, "Schl�ssel A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Schl�ssel B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Schl�ssel C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Schl�ssel D"); - if ( num == OBJECT_TNT ) strcpy(text, "Sprengstoff"); - if ( num == OBJECT_BOMB ) strcpy(text, "Landmine"); - if ( num == OBJECT_BAG ) strcpy(text, "�berlebenskit"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Checkpoint"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Blaue Fahne"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Rote Fahne"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Gr�ne Fahne"); - if ( num == OBJECT_FLAGy ) strcpy(text, "Gelbe Fahne"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Violette Fahne"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "Markierung f�r unterirdische Energiequelle"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Markierung f�r unterirdisches Platinvorkommen"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel A"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel B"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel C"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Markierung f�r vergrabenen Schl�ssel D"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Markierung f�r unterirdisches Titanvorkommen"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "�bungsroboter"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "�bungsroboter"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "�bungsroboter"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "�bungsroboter"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Shooter"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "OrgaShooter"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Schn�ffler"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Schn�ffler"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Schn�ffler"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Schn�ffler"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Stampfer"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Phazershooter"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Recycler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Schutzschild"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Kettentaucher"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Mobile Zielscheibe"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Zeichner"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "Techniker"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robby"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Insektenk�nigin"); - if ( num == OBJECT_ANT ) strcpy(text, "Ameise"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Spinne"); - if ( num == OBJECT_BEE ) strcpy(text, "Wespe"); - if ( num == OBJECT_WORM ) strcpy(text, "Wurm"); - if ( num == OBJECT_EGG ) strcpy(text, "Ei"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Roboterwrack"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Geb�uderuine"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Geb�uderuine"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Abfall"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Geb�uderuine"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Geb�uderuine"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Raumschiffruine"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Raumschiffruine"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "�berreste einer Apollo-Mission"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Lunar Roving Vehicle"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "Fehler"); - if ( num == ERR_CMD ) strcpy(text, "Befehl unbekannt"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "CeeBot wurde nicht installiert."); - if ( num == ERR_NOCD ) strcpy(text, "Legen Sie die CeeBot-CD ein\nund starten Sie das Spiel neu."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "COLOBOT wurde nicht installiert."); - if ( num == ERR_NOCD ) strcpy(text, "Legen Sie die COLOBOT-CD ein\nund starten Sie das Spiel neu."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Im Flug unm�glich"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Tr�gt schon etwas"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Nichts zu ergreifen"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "In Fahrt unm�glich"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Stelle schon besetzt"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Kein anderer Roboter"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Sie k�nnen keinen radioaktiven Gegenstand tragen"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Sie k�nnen unter Wasser nichts tragen"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nichts abzulegen"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Im Flug unm�glich"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Unter Wasser unm�glich"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Titan zu weit weg"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Titan zu nahe"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Kein Titan vorhanden"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Boden nicht eben genug"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Ebener Boden nicht gro� genug"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Stelle schon besetzt"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Zu nahe am Raumschiff"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Zu nahe an einem Geb�ude"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "In Fahrt unm�glich"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Im Flug unm�glich"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "In Fahrt unm�glich"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Boden ungeeignet"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Geb�ude zu nahe"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Gegenstand zu nahe"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nichts zu recyceln"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Keine Energie mehr"); -//? if ( num == ERR_COM ) strcpy(text, "Kommunikationsproblem mit dem Roboter"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "Ziel kann nicht erreicht werden"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Das Objekt existiert nicht"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Ziel kann nicht erreicht werden"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Ziel kann nicht erreicht werden"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Ziel ist schon besetzt"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Roboter ungeeignet"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Nicht genug Energie"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Im Flug unm�glich"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "Keine unterirdische Erzlagerst�tte"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "Keine Batterie"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Keine Energie mehr"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Keine Batterie"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Nicht mehr genug Energie"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Falscher Batterietyp"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Forschungsprogramm schon ausgef�hrt"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Noch nicht genug Energie"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Kein konvertierbares Titanerz vorhanden"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Wandelt nur Titanerz um"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Die T�ren werden von einem Gegenstand blockiert"); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Gehen Sie an Bord, bevor Sie abheben"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Nichts zu analysieren"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analysiert nur Orgastoff"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analyse schon durchgef�hrt"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Kein unterirdisches Energievorkommen"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Noch nicht genug Energie"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Kein konvertierbares Platin"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Wandelt nur Platin um"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "Kein Titan vorhanden"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Ein Gegenstand ist zu nahe"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Stelle schon besetzt"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Kein Infoserver in Reichweite"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Ein Programm wurde von einem Virus infiziert"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Von Virus infiziert, zeitweise au�er Betrieb"); - if ( num == ERR_VEH_POWER ) strcpy(text, "Keine Batterie"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Keine Energie mehr"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Im Flug unm�glich"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Im Wasser unm�glich"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Beim Gehen unm�glich"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Unm�glich wenn Sie etwas tragen"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Zu viele Fahnen dieser Farbe (Maximum 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Zu nahe an einer anderen Fahne"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Keine Fahne in Reichweite"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Mission noch nicht beendet (Dr�cken Sie auf \\key help; f�r weitere Informationen)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Roboter zerst�rt"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Geb�ude zerst�rt"); - if ( num == ERR_TOOMANY ) strcpy(text, "Kein neues Objekt kann erstellt werden (zu viele vorhanden)"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "Es fehlt \"%s\" in Ihrem Programm"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "In dieser �bung verboten"); - - if ( num == INFO_BUILD ) strcpy(text, "Geb�ude fertiggestellt"); - if ( num == INFO_CONVERT ) strcpy(text, "Titan verf�gbar"); - if ( num == INFO_RESEARCH ) strcpy(text, "Forschungsprogramm abgeschlossen"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Herstellung eines Roboters mit Kettenantrieb m�glich"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Sie k�nnen jetzt mit den Tasten \\key gup; und \\key gdown; fliegen"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Herstellung eines Stampfers m�glich"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Herstellung eines Shooters m�glich"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Errichtung eines Gesch�tzturms m�glich"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Herstellung eines Phazershooters m�glich"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Herstellung eines Schutzschildes m�glich"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Errichtung einer Brennstoffzellenfabrik m�glich"); - if ( num == INFO_FACTORY ) strcpy(text, "Neuer Roboter verf�gbar"); - if ( num == INFO_LABO ) strcpy(text, "Analyse vollendet"); - if ( num == INFO_ENERGY ) strcpy(text, "Batterie verf�gbar"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Brennstoffzelle verf�gbar"); - if ( num == INFO_FINDING ) strcpy(text, "Sie haben ein brauchbares Objekt gefunden"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Geeignete Stelle f�r Kraftwerk gefunden"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Geeignete Stelle f�r Bohrturm gefunden"); - if ( num == INFO_WIN ) strcpy(text, "<<< Bravo, Mission vollendet >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Mission gescheitert >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Mission gescheitert >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Mission gespeichert"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Checkpoint erreicht"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Insektenk�nigin t�dlich verwundet"); - if ( num == INFO_DELETEANT ) strcpy(text, "Ameise t�dlich verwundet"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Wespe t�dlich verwundet"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Wurm t�dlich verwundet"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Spinne t�dlich verwundet"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Beziehen Sie sich auf Ihren SatCom, indem Sie auf \\key help; dr�cken"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "Fehler"); - if ( num == TX_OPENPAR ) strcpy(text, "Es fehlt eine offene Klammer ""("""); - if ( num == TX_CLOSEPAR ) strcpy(text, "Es fehlt eine geschlossene Klammer "")"""); - if ( num == TX_NOTBOOL ) strcpy(text, "Der Ausdruck muss einen boolschen Wert ergeben"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Variable nicht deklariert"); - if ( num == TX_BADLEFT ) strcpy(text, "Zuweisung unm�glich"); - if ( num == TX_ENDOF ) strcpy(text, "Es fehlt ein Strichpunkt "";"" am Ende der Anweisung"); - if ( num == TX_OUTCASE ) strcpy(text, "Anweisung ""case"" ohne vorhergehende Anweisung ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Hier ist eine Anweisung nach dem Ende des Programms"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Es fehlt eine geschlossene geschweifte Klammer ""}"" (Ende des Blocks)"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Anweisung ""else"" ohne vorhergehende Anweisung ""if"""); - if ( num == TX_OPENBLK ) strcpy(text, "Es fehlt eine offene geschweifte Klammer""{"""); - if ( num == TX_BADTYPE ) strcpy(text, "Der Ausdruck ergibt einen falschen Typ f�r die Zuweisung"); - if ( num == TX_REDEFVAR ) strcpy(text, "Eine Variable wird zum zweiten Mal deklariert"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Die zwei Operanden sind nicht kompatibel"); - if ( num == TX_UNDEFCALL ) strcpy(text, "Unbekannte Funktion"); - if ( num == TX_MISDOTS ) strcpy(text, "Es fehlt ein Doppelpunkt "" : """); - if ( num == TX_WHILE ) strcpy(text, "Es fehlt das Wort ""while"""); - if ( num == TX_BREAK ) strcpy(text, "Anweisung ""break"" au�erhalb einer Schleife"); - if ( num == TX_LABEL ) strcpy(text, "Ein Label kann nur vor den Anweisungen ""for"", ""while"", ""do"" oder ""switch"" vorkommen"); - if ( num == TX_NOLABEL ) strcpy(text, "Dieses Label existiert nicht"); - if ( num == TX_NOCASE ) strcpy(text, "Es fehlt eine Anweisung ""case"""); - if ( num == TX_BADNUM ) strcpy(text, "Es fehlt eine Zahl"); - if ( num == TX_VOID ) strcpy(text, "Parameter void"); - if ( num == TX_NOTYP ) strcpy(text, "Hier muss ein Variablentyp stehen"); - if ( num == TX_NOVAR ) strcpy(text, "Es fehlt der Name einer Variable"); - if ( num == TX_NOFONC ) strcpy(text, "Hier muss der Name der Funktion stehen"); - if ( num == TX_OVERPARAM ) strcpy(text, "Zu viele Parameter"); - if ( num == TX_REDEF ) strcpy(text, "Diese Funktion gibt es schon"); - if ( num == TX_LOWPARAM ) strcpy(text, "Nicht genug Parameter"); - if ( num == TX_BADPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertr�gt Parameter diesen Typs"); - if ( num == TX_NUMPARAM ) strcpy(text, "Keine Funktion mit diesem Namen vertr�gt diese Anzahl Parameter"); - if ( num == TX_NOITEM ) strcpy(text, "Dieses Element gibt es nicht in dieser Klasse"); - if ( num == TX_DOT ) strcpy(text, "Das Objekt ist nicht eine Instanz einer Klasse"); - if ( num == TX_NOCONST ) strcpy(text, "Es gibt keinen geeigneten Konstruktor"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Diese Klasse gibt es schon"); - if ( num == TX_CLBRK ) strcpy(text, "Es fehlt eine geschlossene eckige Klammer "" ] """); - if ( num == TX_RESERVED ) strcpy(text, "Dieses Wort ist reserviert"); - if ( num == TX_BADNEW ) strcpy(text, "Falsche Argumente f�r ""new"""); - if ( num == TX_OPBRK ) strcpy(text, "Es fehlt eine offene eckige Klammer "" [ """); - if ( num == TX_BADSTRING ) strcpy(text, "Hier wird eine Zeichenkette erwartet"); - if ( num == TX_BADINDEX ) strcpy(text, "Falscher Typ f�r einen Index"); - if ( num == TX_PRIVATE ) strcpy(text, "Gesch�tztes Element (private)"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Hier muss das Wort ""public"" stehen"); - if ( num == TX_DIVZERO ) strcpy(text, "Teilung durch Null"); - if ( num == TX_NOTINIT ) strcpy(text, "Der Wert dieser Variable wurde nicht definiert"); - if ( num == TX_BADTHROW ) strcpy(text, "Negativer Wert ungeeignet f�r Anweisung ""throw"""); - if ( num == TX_NORETVAL ) strcpy(text, "Die Funktion hat kein Ergebnis zur�ckgegeben"); - if ( num == TX_NORUN ) strcpy(text, "Keine Funktion wird ausgef�hrt"); - if ( num == TX_NOCALL ) strcpy(text, "Die aufgerufene Funktion existiert nicht"); - if ( num == TX_NOCLASS ) strcpy(text, "Diese Klasse existiert nicht"); - if ( num == TX_NULLPT ) strcpy(text, "Das Objekt existiert nicht"); - if ( num == TX_OPNAN ) strcpy(text, "Operation mit dem Wert ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Zugriff im Array au�erhalb der Grenzen"); - if ( num == TX_STACKOVER ) strcpy(text, "Stack overflow"); - if ( num == TX_DELETEDPT ) strcpy(text, "Objekt nicht verf�gbar"); - if ( num == TX_FILEOPEN ) strcpy(text, "Die Datei kann nicht ge�ffnet werden"); - if ( num == TX_NOTOPEN ) strcpy(text, "Die Datei wurde nicht ge�ffnet"); - if ( num == TX_ERRREAD ) strcpy(text, "Fehler beim Lesezugriff"); - if ( num == TX_ERRWRITE ) strcpy(text, "Fehler beim Schreibzugriff"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< keine >"); - if ( num == SDLK_LEFT ) strcpy(text, "Pfeiltaste links"); - if ( num == SDLK_RIGHT ) strcpy(text, "Pfeiltaste rechts"); - if ( num == SDLK_UP ) strcpy(text, "Pfeil nach oben"); - if ( num == SDLK_DOWN ) strcpy(text, "Pfeil nach unten"); - if ( num == SDLK_CANCEL ) strcpy(text, "Ctrl-Break"); - if ( num == SDLK_BACK ) strcpy(text, "<--"); - if ( num == SDLK_TAB ) strcpy(text, "Tab"); - if ( num == SDLK_CLEAR ) strcpy(text, "Clear"); - if ( num == SDLK_RETURN ) strcpy(text, "Eingabe"); - if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); - if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == SDLK_MENU ) strcpy(text, "Alt"); - if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); - if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); - if ( num == SDLK_SPACE ) strcpy(text, "Leertaste"); - if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); - if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); - if ( num == SDLK_END ) strcpy(text, "End"); - if ( num == SDLK_HOME ) strcpy(text, "Home"); - if ( num == SDLK_SELECT ) strcpy(text, "Select"); - if ( num == SDLK_EXECUTE ) strcpy(text, "Execute"); - if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == SDLK_INSERT ) strcpy(text, "Insert"); - if ( num == SDLK_DELETE ) strcpy(text, "Delete"); - if ( num == SDLK_HELP ) strcpy(text, "Help"); - if ( num == SDLK_LWIN ) strcpy(text, "Left Windows"); - if ( num == SDLK_RWIN ) strcpy(text, "Right Windows"); - if ( num == SDLK_APPS ) strcpy(text, "Application key"); - if ( num == SDLK_NUMPAD0 ) strcpy(text, "NumPad 0"); - if ( num == SDLK_NUMPAD1 ) strcpy(text, "NumPad 1"); - if ( num == SDLK_NUMPAD2 ) strcpy(text, "NumPad 2"); - if ( num == SDLK_NUMPAD3 ) strcpy(text, "NumPad 3"); - if ( num == SDLK_NUMPAD4 ) strcpy(text, "NumPad 4"); - if ( num == SDLK_NUMPAD5 ) strcpy(text, "NumPad 5"); - if ( num == SDLK_NUMPAD6 ) strcpy(text, "NumPad 6"); - if ( num == SDLK_NUMPAD7 ) strcpy(text, "NumPad 7"); - if ( num == SDLK_NUMPAD8 ) strcpy(text, "NumPad 8"); - if ( num == SDLK_NUMPAD9 ) strcpy(text, "NumPad 9"); - if ( num == SDLK_MULTIPLY ) strcpy(text, "NumPad *"); - if ( num == SDLK_ADD ) strcpy(text, "NumPad +"); - if ( num == SDLK_SEPARATOR ) strcpy(text, "NumPad sep"); - if ( num == SDLK_SUBTRACT ) strcpy(text, "NumPad -"); - if ( num == SDLK_DECIMAL ) strcpy(text, "NumPad ."); - if ( num == SDLK_DIVIDE ) strcpy(text, "NumPad /"); - if ( num == SDLK_F1 ) strcpy(text, "F1"); - if ( num == SDLK_F2 ) strcpy(text, "F2"); - if ( num == SDLK_F3 ) strcpy(text, "F3"); - if ( num == SDLK_F4 ) strcpy(text, "F4"); - if ( num == SDLK_F5 ) strcpy(text, "F5"); - if ( num == SDLK_F6 ) strcpy(text, "F6"); - if ( num == SDLK_F7 ) strcpy(text, "F7"); - if ( num == SDLK_F8 ) strcpy(text, "F8"); - if ( num == SDLK_F9 ) strcpy(text, "F9"); - if ( num == SDLK_F10 ) strcpy(text, "F10"); - if ( num == SDLK_F11 ) strcpy(text, "F11"); - if ( num == SDLK_F12 ) strcpy(text, "F12"); - if ( num == SDLK_F13 ) strcpy(text, "F13"); - if ( num == SDLK_F14 ) strcpy(text, "F14"); - if ( num == SDLK_F15 ) strcpy(text, "F15"); - if ( num == SDLK_F16 ) strcpy(text, "F16"); - if ( num == SDLK_F17 ) strcpy(text, "F17"); - if ( num == SDLK_F18 ) strcpy(text, "F18"); - if ( num == SDLK_F19 ) strcpy(text, "F19"); - if ( num == SDLK_F20 ) strcpy(text, "F20"); - if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == SDLK_SCROLL ) strcpy(text, "Scroll"); - if ( num == SDLK_ATTN ) strcpy(text, "Attn"); - if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); - if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); - if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == SDLK_PLAY ) strcpy(text, "Play"); - if ( num == SDLK_ZOOM ) strcpy(text, "Zoom"); - if ( num == SDLK_PA1 ) strcpy(text, "PA1"); - if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Clear"); - if ( num == SDLK_BUTTON1 ) strcpy(text, "Knopf 1"); - if ( num == SDLK_BUTTON2 ) strcpy(text, "Knopf 2"); - if ( num == SDLK_BUTTON3 ) strcpy(text, "Knopf 3"); - if ( num == SDLK_BUTTON4 ) strcpy(text, "Knopf 4"); - if ( num == SDLK_BUTTON5 ) strcpy(text, "Knopf 5"); - if ( num == SDLK_BUTTON6 ) strcpy(text, "Knopf 6"); - if ( num == SDLK_BUTTON7 ) strcpy(text, "Knopf 7"); - if ( num == SDLK_BUTTON8 ) strcpy(text, "Knopf 8"); - if ( num == SDLK_BUTTON9 ) strcpy(text, "Knopf 9"); - if ( num == SDLK_BUTTON10 ) strcpy(text, "Knopf 10"); - if ( num == SDLK_BUTTON11 ) strcpy(text, "Knopf 11"); - if ( num == SDLK_BUTTON12 ) strcpy(text, "Knopf 12"); - if ( num == SDLK_BUTTON13 ) strcpy(text, "Knopf 13"); - if ( num == SDLK_BUTTON14 ) strcpy(text, "Knopf 14"); - if ( num == SDLK_BUTTON15 ) strcpy(text, "Knopf 15"); - if ( num == SDLK_BUTTON16 ) strcpy(text, "Knopf 16"); - if ( num == SDLK_BUTTON17 ) strcpy(text, "Knopf 17"); - if ( num == SDLK_BUTTON18 ) strcpy(text, "Knopf 18"); - if ( num == SDLK_BUTTON19 ) strcpy(text, "Knopf 19"); - if ( num == SDLK_BUTTON20 ) strcpy(text, "Knopf 20"); - if ( num == SDLK_BUTTON21 ) strcpy(text, "Knopf 21"); - if ( num == SDLK_BUTTON22 ) strcpy(text, "Knopf 22"); - if ( num == SDLK_BUTTON23 ) strcpy(text, "Knopf 23"); - if ( num == SDLK_BUTTON24 ) strcpy(text, "Knopf 24"); - if ( num == SDLK_BUTTON25 ) strcpy(text, "Knopf 25"); - if ( num == SDLK_BUTTON26 ) strcpy(text, "Knopf 26"); - if ( num == SDLK_BUTTON27 ) strcpy(text, "Knopf 27"); - if ( num == SDLK_BUTTON28 ) strcpy(text, "Knopf 28"); - if ( num == SDLK_BUTTON29 ) strcpy(text, "Knopf 29"); - if ( num == SDLK_BUTTON30 ) strcpy(text, "Knopf 30"); - if ( num == SDLK_BUTTON31 ) strcpy(text, "Knopf 31"); - if ( num == SDLK_BUTTON32 ) strcpy(text, "Knopf 32"); - if ( num == SDLK_WHEELUP ) strcpy(text, "Mausrad nach vorne"); - if ( num == SDLK_WHEELDOWN ) strcpy(text, "Mausrad zur�ck"); - } -#endif - -#if _POLISH - if ( type == RES_TEXT ) - { - #if _FULL - if ( num == RT_VERSION_ID ) strcpy(text, "Wersja 1.18 /pl"); - #endif - #if _NET - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A 1.18"); - #endif - #if _SCHOOL & _EDU - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen EDU 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A EDU 1.18"); - #endif - #endif - #if _SCHOOL & _PERSO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen PERSO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A PERSO 1.18"); - #endif - #endif - #if _SCHOOL & _CEEBOTDEMO - #if _TEEN - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-Teen DEMO 1.18"); - #else - if ( num == RT_VERSION_ID ) strcpy(text, "CeeBot-A DEMO 1.18"); - #endif - #endif - #if _DEMO - if ( num == RT_VERSION_ID ) strcpy(text, "Demo 1.18 /pl"); - #endif - if ( num == RT_DISINFO_TITLE ) strcpy(text, "SatCom"); - if ( num == RT_WINDOW_MAXIMIZED ) strcpy(text, "Powi�ksz"); - if ( num == RT_WINDOW_MINIMIZED ) strcpy(text, "Pomniejsz"); - if ( num == RT_WINDOW_STANDARD ) strcpy(text, "Normalna wielko��"); - if ( num == RT_WINDOW_CLOSE ) strcpy(text, "Zamknij"); - - if ( num == RT_STUDIO_TITLE ) strcpy(text, "Edytor programu"); - if ( num == RT_SCRIPT_NEW ) strcpy(text, "Nowy"); - if ( num == RT_NAME_DEFAULT ) strcpy(text, "Gracz"); - if ( num == RT_IO_NEW ) strcpy(text, "Nowy ..."); - if ( num == RT_KEY_OR ) strcpy(text, " lub "); - -#if _NEWLOOK - if ( num == RT_TITLE_BASE ) strcpy(text, "CeeBot"); - if ( num == RT_TITLE_INIT ) strcpy(text, "CeeBot"); -#else - if ( num == RT_TITLE_BASE ) strcpy(text, "COLOBOT"); - if ( num == RT_TITLE_INIT ) strcpy(text, "COLOBOT"); -#endif - if ( num == RT_TITLE_TRAINER ) strcpy(text, "�wiczenia programistyczne"); - if ( num == RT_TITLE_DEFI ) strcpy(text, "Wyzwania"); - if ( num == RT_TITLE_MISSION ) strcpy(text, "Misje"); - if ( num == RT_TITLE_FREE ) strcpy(text, "Swobodna gra"); - if ( num == RT_TITLE_TEEN ) strcpy(text, "Swobodna gra"); - if ( num == RT_TITLE_USER ) strcpy(text, "Poziomy u�ytkownika"); - if ( num == RT_TITLE_PROTO ) strcpy(text, "Prototypy"); - if ( num == RT_TITLE_SETUP ) strcpy(text, "Opcje"); - if ( num == RT_TITLE_NAME ) strcpy(text, "Imi� gracza"); - if ( num == RT_TITLE_PERSO ) strcpy(text, "Dostosuj wygl�d"); - if ( num == RT_TITLE_WRITE ) strcpy(text, "Zapisz bie��c� misj�"); - if ( num == RT_TITLE_READ ) strcpy(text, "Wczytaj zapisan� misj�"); - - if ( num == RT_PLAY_CHAPt ) strcpy(text, " Rozdzia�y:"); - if ( num == RT_PLAY_CHAPd ) strcpy(text, " Rozdzia�y:"); - if ( num == RT_PLAY_CHAPm ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPf ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPu ) strcpy(text, " Poziomy u�ytkownika:"); - if ( num == RT_PLAY_CHAPp ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_CHAPte ) strcpy(text, " Planety:"); - if ( num == RT_PLAY_LISTt ) strcpy(text, " �wiczenia w tym rozdziale:"); - if ( num == RT_PLAY_LISTd ) strcpy(text, " Wyzwania w tym rozdziale:"); - if ( num == RT_PLAY_LISTm ) strcpy(text, " Misje na tej planecie:"); - if ( num == RT_PLAY_LISTf ) strcpy(text, " Swobodna gra na tej planecie:"); - if ( num == RT_PLAY_LISTu ) strcpy(text, " Misje na tym poziomie:"); - if ( num == RT_PLAY_LISTp ) strcpy(text, " Prototypy na tej planecie:"); - if ( num == RT_PLAY_LISTk ) strcpy(text, " Prototypy na tej planecie:"); - if ( num == RT_PLAY_RESUME ) strcpy(text, " Streszczenie:"); - - if ( num == RT_SETUP_DEVICE ) strcpy(text, " Sterowniki:"); - if ( num == RT_SETUP_MODE ) strcpy(text, " Rozdzielczo��:"); - if ( num == RT_SETUP_KEY1 ) strcpy(text, "1) Najpierw kliknij klawisz, kt�ry chcesz przedefiniowa�."); - if ( num == RT_SETUP_KEY2 ) strcpy(text, "2) Nast�pnie naci�nij klawisz, kt�rego chcesz u�ywa�."); - - if ( num == RT_PERSO_FACE ) strcpy(text, "Rodzaj twarzy:"); - if ( num == RT_PERSO_GLASSES ) strcpy(text, "Okulary:"); - if ( num == RT_PERSO_HAIR ) strcpy(text, "Kolor w�os�w:"); - if ( num == RT_PERSO_COMBI ) strcpy(text, "Kolor skafandra:"); - if ( num == RT_PERSO_BAND ) strcpy(text, "Kolor pask�w:"); - -#if _NEWLOOK - if ( num == RT_DIALOG_TITLE ) strcpy(text, "CeeBot"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� CeeBot?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� CeeBot"); -#else - if ( num == RT_DIALOG_TITLE ) strcpy(text, "COLOBOT"); - if ( num == RT_DIALOG_QUIT ) strcpy(text, "Czy na pewno chcesz opu�ci� gr� COLOBOT?"); - if ( num == RT_DIALOG_YESQUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOBOT"); -#endif - if ( num == RT_DIALOG_ABORT ) strcpy(text, "Opu�ci� misj�?"); - if ( num == RT_DIALOG_YES ) strcpy(text, "Przerwij\\Przerywa bie��c� misj�"); - if ( num == RT_DIALOG_NO ) strcpy(text, "Kontynuuj\\Kontynuuje bie��c� misj�"); - if ( num == RT_DIALOG_NOQUIT ) strcpy(text, "Kontynuuj\\Kontynuuje gr�"); - if ( num == RT_DIALOG_DELOBJ ) strcpy(text, "Czy na pewno chcesz zniszczy� zaznaczony budynek?"); - if ( num == RT_DIALOG_DELGAME ) strcpy(text, "Czy na pewno chcesz skasowa� zapisane gry gracza %s? "); - if ( num == RT_DIALOG_YESDEL ) strcpy(text, "Usu�"); - if ( num == RT_DIALOG_NODEL ) strcpy(text, "Anuluj"); - if ( num == RT_DIALOG_LOADING ) strcpy(text, "WCZYTYWANIE"); - - if ( num == RT_STUDIO_LISTTT ) strcpy(text, "Skr�ty klawiszowe (\\key cbot;)"); - if ( num == RT_STUDIO_COMPOK ) strcpy(text, "Program skompilowany (0 b��d�w)"); - if ( num == RT_STUDIO_PROGSTOP ) strcpy(text, "Program zako�czony"); - - if ( num == RT_SATCOM_LIST ) strcpy(text, "\\b;Lista obiekt�w\n"); - if ( num == RT_SATCOM_BOT ) strcpy(text, "\\b;Roboty\n"); - if ( num == RT_SATCOM_BUILDING ) strcpy(text, "\\b;Budynki\n"); - if ( num == RT_SATCOM_FRET ) strcpy(text, "\\b;Obiekty ruchome\n"); - if ( num == RT_SATCOM_ALIEN ) strcpy(text, "\\b;Obcy\n"); - if ( num == RT_SATCOM_NULL ) strcpy(text, "\\c; (brak)\\n;\n"); - if ( num == RT_SATCOM_ERROR1 ) strcpy(text, "\\b;B��d\n"); - if ( num == RT_SATCOM_ERROR2 ) strcpy(text, "Lista jest dost�pna jedynie gdy dzia�a \\l;stacja radarowa\\u object\\radar;.\n"); - - if ( num == RT_IO_OPEN ) strcpy(text, "Otw�rz"); - if ( num == RT_IO_SAVE ) strcpy(text, "Zapisz"); - if ( num == RT_IO_LIST ) strcpy(text, "Folder: %s"); - if ( num == RT_IO_NAME ) strcpy(text, "Nazwa:"); - if ( num == RT_IO_DIR ) strcpy(text, "Folder:"); - if ( num == RT_IO_PRIVATE ) strcpy(text, "Prywatny\\Folder prywatny"); - if ( num == RT_IO_PUBLIC ) strcpy(text, "Publiczny\\Folder og�lnodost�pny"); - - if ( num == RT_GENERIC_DEV1 ) strcpy(text, "Tw�rcy:"); - if ( num == RT_GENERIC_DEV2 ) strcpy(text, "www.epsitec.com"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, "Wersja polska wydana przez:"); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, "www.manta.com.pl"); - if ( num == RT_GENERIC_EDIT1 ) strcpy(text, " "); - if ( num == RT_GENERIC_EDIT2 ) strcpy(text, " "); - - if ( num == RT_INTERFACE_REC ) strcpy(text, "Recorder"); - } - - if ( type == RES_EVENT ) - { - if ( num == EVENT_BUTTON_OK ) strcpy(text, "OK"); - if ( num == EVENT_BUTTON_CANCEL ) strcpy(text, "Anuluj"); - if ( num == EVENT_BUTTON_NEXT ) strcpy(text, "Nast�pny"); - if ( num == EVENT_BUTTON_PREV ) strcpy(text, "Poprzedni"); - if ( num == EVENT_BUTTON_QUIT ) strcpy(text, "Menu (\\key quit;)"); - - if ( num == EVENT_DIALOG_OK ) strcpy(text, "OK"); - if ( num == EVENT_DIALOG_CANCEL ) strcpy(text, "Anuluj"); - - if ( num == EVENT_INTERFACE_TRAINER) strcpy(text, "�wiczenia\\�wiczenia programistyczne"); - if ( num == EVENT_INTERFACE_DEFI ) strcpy(text, "Wyzwania\\Wyzwania programistyczne"); - if ( num == EVENT_INTERFACE_MISSION) strcpy(text, "Misje\\Wybierz misj�"); - if ( num == EVENT_INTERFACE_FREE ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w"); - if ( num == EVENT_INTERFACE_TEEN ) strcpy(text, "Swobodna gra\\Swobodna gra bez konkretnych cel�w"); - if ( num == EVENT_INTERFACE_USER ) strcpy(text, "Poziomy\\Poziomy u�ytkownika"); - if ( num == EVENT_INTERFACE_PROTO ) strcpy(text, "Prototypy\\Prototypy w trakcie rozwijania"); - if ( num == EVENT_INTERFACE_NAME ) strcpy(text, "Nowy gracz\\Wybierz imi� gracza"); - if ( num == EVENT_INTERFACE_SETUP ) strcpy(text, "Opcje\\Preferencje"); - if ( num == EVENT_INTERFACE_AGAIN ) strcpy(text, "Uruchom ponownie\\Uruchamia ponownie misj� od pocz�tku"); - if ( num == EVENT_INTERFACE_WRITE ) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�"); - if ( num == EVENT_INTERFACE_READ ) strcpy(text, "Wczytaj\\Wczytuje zapisan� misj�"); -#if _NEWLOOK - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry CeeBot"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� CeeBot"); -#else - if ( num == EVENT_INTERFACE_ABORT ) strcpy(text, "\\Powr�� do gry COLOBOT"); - if ( num == EVENT_INTERFACE_QUIT ) strcpy(text, "Zako�cz\\Ko�czy gr� COLOBOT"); -#endif - if ( num == EVENT_INTERFACE_BACK ) strcpy(text, "<< Wstecz \\Wraca do poprzedniego ekranu"); - if ( num == EVENT_INTERFACE_PLAY ) strcpy(text, "Graj\\Rozpoczyna misj�!"); - if ( num == EVENT_INTERFACE_SETUPd ) strcpy(text, "Urz�dzenie\\Ustawienia sterownika i rozdzielczo�ci"); - if ( num == EVENT_INTERFACE_SETUPg ) strcpy(text, "Grafika\\Ustawienia grafiki"); - if ( num == EVENT_INTERFACE_SETUPp ) strcpy(text, "Gra\\Ustawienia gry"); - if ( num == EVENT_INTERFACE_SETUPc ) strcpy(text, "Sterowanie\\Ustawienia klawiatury, joysticka i myszy"); - if ( num == EVENT_INTERFACE_SETUPs ) strcpy(text, "D�wi�k\\G�o�no�� muzyki i d�wi�k�w gry"); - if ( num == EVENT_INTERFACE_DEVICE ) strcpy(text, "Jednostka"); - if ( num == EVENT_INTERFACE_RESOL ) strcpy(text, "Rozdzielczo��"); - if ( num == EVENT_INTERFACE_FULL ) strcpy(text, "Pe�ny ekran\\Pe�ny ekran lub tryb okna"); - if ( num == EVENT_INTERFACE_APPLY ) strcpy(text, "Zastosuj zmiany\\Aktywuje zmienione ustawienia"); - - if ( num == EVENT_INTERFACE_TOTO ) strcpy(text, "Robbie\\Tw�j asystent"); - if ( num == EVENT_INTERFACE_SHADOW ) strcpy(text, "Cienie\\Cienie na ziemi"); - if ( num == EVENT_INTERFACE_GROUND ) strcpy(text, "Znaki na ziemi\\Znaki na ziemi"); - if ( num == EVENT_INTERFACE_DIRTY ) strcpy(text, "Kurz\\Kurz i br�d na robotach i budynkach"); - if ( num == EVENT_INTERFACE_FOG ) strcpy(text, "Mg�a\\Mg�a"); - if ( num == EVENT_INTERFACE_LENS ) strcpy(text, "Promienie s�oneczne\\Promienie s�oneczne na niebie"); - if ( num == EVENT_INTERFACE_SKY ) strcpy(text, "Niebo\\Chmury i mg�awice"); - if ( num == EVENT_INTERFACE_PLANET ) strcpy(text, "Planety i gwiazdy\\Obiekty astronomiczne na niebie"); - if ( num == EVENT_INTERFACE_LIGHT ) strcpy(text, "Dynamiczne o�wietlenie\\Ruchome �r�d�a �wiat�a"); - if ( num == EVENT_INTERFACE_PARTI ) strcpy(text, "Liczba cz�stek\\Wybuchy, kurz, odbicia, itp."); - if ( num == EVENT_INTERFACE_CLIP ) strcpy(text, "G��boko�� pola\\Maksymalna widoczno��"); - if ( num == EVENT_INTERFACE_DETAIL ) strcpy(text, "Szczeg�y\\Jako�� wizualna obiekt�w 3D"); - if ( num == EVENT_INTERFACE_TEXTURE) strcpy(text, "Tekstury\\Jako�� tekstur "); - if ( num == EVENT_INTERFACE_GADGET ) strcpy(text, "Ilo�� element�w dekoracyjnych \\Ilo�� element�w czysto dekoracyjnych"); - if ( num == EVENT_INTERFACE_RAIN ) strcpy(text, "Cz�stki w interfejsie\\Para i iskry z silnik�w w interfejsie"); - if ( num == EVENT_INTERFACE_GLINT ) strcpy(text, "Odbicia na przyciskach \\�wiec�ce przyciski"); - if ( num == EVENT_INTERFACE_TOOLTIP) strcpy(text, "Dymki pomocy\\Wyja�nia funkcje przycisk�w"); - if ( num == EVENT_INTERFACE_MOVIES ) strcpy(text, "Sekwencje filmowe\\Filmy przed rozpocz�ciem i na zako�czenie misji"); - if ( num == EVENT_INTERFACE_NICERST) strcpy(text, "Ko�cowy film\\Film na zako�czenie �wicze�"); - if ( num == EVENT_INTERFACE_HIMSELF) strcpy(text, "Przyjacielski ogie�\\W�asne strza�y uszkadzaj� Twoje obiekty"); - if ( num == EVENT_INTERFACE_SCROLL ) strcpy(text, "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego kraw�dzi"); - if ( num == EVENT_INTERFACE_INVERTX) strcpy(text, "Odwr�cenie myszy X\\Odwr�cenie kierunk�w przewijania w poziomie"); - if ( num == EVENT_INTERFACE_INVERTY) strcpy(text, "Odwr�cenie myszy Y\\Odwr�cenie kierunk�w przewijania w pionie"); - if ( num == EVENT_INTERFACE_EFFECT ) strcpy(text, "Wstrz�sy przy wybuchach\\Ekran trz�sie si� podczas wybuch�w"); - if ( num == EVENT_INTERFACE_MOUSE ) strcpy(text, "Cie� kursora myszy\\Dodaje cie� kursorowi myszy"); - if ( num == EVENT_INTERFACE_EDITMODE) strcpy(text, "Automatyczne wci�cia\\Automatyczne wci�cia podczas edycji programu"); - if ( num == EVENT_INTERFACE_EDITVALUE)strcpy(text, "Du�e wci�cie\\2 lub 4 spacje wci�cia na ka�dy poziom zdefiniowany przez klamry"); - if ( num == EVENT_INTERFACE_SOLUCE4) strcpy(text, "Acc�s aux solutions\\Programme \"4: Solution\" dans les exercices"); - - if ( num == EVENT_INTERFACE_KDEF ) strcpy(text, "Standardowa kontrola\\Standardowe klawisze funkcyjne"); - if ( num == EVENT_INTERFACE_KLEFT ) strcpy(text, "Skr�� w lewo\\Obraca robota w lewo"); - if ( num == EVENT_INTERFACE_KRIGHT ) strcpy(text, "Obr�� w prawo\\Obraca robota w prawo"); - if ( num == EVENT_INTERFACE_KUP ) strcpy(text, "Naprz�d\\Porusza do przodu"); - if ( num == EVENT_INTERFACE_KDOWN ) strcpy(text, "Wstecz\\Porusza do ty�u"); - if ( num == EVENT_INTERFACE_KGUP ) strcpy(text, "W g�r�\\Zwi�ksza moc silnika"); - if ( num == EVENT_INTERFACE_KGDOWN ) strcpy(text, "W d�\\Zmniejsza moc silnika"); - if ( num == EVENT_INTERFACE_KCAMERA) strcpy(text, "Zmie� kamer�\\Prze��cza pomi�dzy kamer� pok�adow� i �ledz�c�"); - if ( num == EVENT_INTERFACE_KDESEL ) strcpy(text, "Poprzedni obiekt\\Zaznacz poprzedni obiekt"); - if ( num == EVENT_INTERFACE_KACTION) strcpy(text, "Standardowa akcja\\Standardowa akcja robota (podnie�/upu��, strzelaj, szukaj, itp.)"); - if ( num == EVENT_INTERFACE_KNEAR ) strcpy(text, "Kamera bli�ej\\Przybli�a kamer�"); - if ( num == EVENT_INTERFACE_KAWAY ) strcpy(text, "Kamera dalej\\Oddala kamer�"); - if ( num == EVENT_INTERFACE_KNEXT ) strcpy(text, "Nast�pny obiekt\\Zaznacza nast�pny obiekt"); - if ( num == EVENT_INTERFACE_KHUMAN ) strcpy(text, "Zaznacz astronaut�\\Zaznacza astronaut�"); - if ( num == EVENT_INTERFACE_KQUIT ) strcpy(text, "Zako�cz\\Ko�czy bie��c� misj� lub �wiczenie"); - if ( num == EVENT_INTERFACE_KHELP ) strcpy(text, "Rozkazy\\Pokazuje rozkazy dotycz�ce bie��cej misji"); - if ( num == EVENT_INTERFACE_KPROG ) strcpy(text, "Podr�cznik programowania\\Dostarcza szczeg�ow� pomoc w programowaniu"); - if ( num == EVENT_INTERFACE_KCBOT ) strcpy(text, "Pomoc dot. s��w kluczowych\\Dok�adniejsza pomoc na temat s��w kluczowych"); - if ( num == EVENT_INTERFACE_KVISIT ) strcpy(text, "Miejsce nadania wiadomo�ci\\Pokazuje sk�d zosta�a wys�ana ostatnia wiadomo��"); - if ( num == EVENT_INTERFACE_KSPEED10) strcpy(text, "Pr�dko�� 1,0x\\Pr�dko�� normalna"); - if ( num == EVENT_INTERFACE_KSPEED15) strcpy(text, "Pr�dko�� 1,5x\\1,5 raza szybciej"); - if ( num == EVENT_INTERFACE_KSPEED20) strcpy(text, "Pr�dko�� 2,0x\\Dwa razy szybciej"); - if ( num == EVENT_INTERFACE_KSPEED30) strcpy(text, "Pr�dko�� 3,0x\\Trzy razy szybciej"); - - if ( num == EVENT_INTERFACE_VOLSOUND) strcpy(text, "Efekty d�wi�kowe:\\G�o�no�� silnik�w, g�os�w, strza��w, itp."); - if ( num == EVENT_INTERFACE_VOLMUSIC) strcpy(text, "Muzyka w tle :\\G�o�no�� �cie�ek d�wi�kowych z p�yty CD"); - if ( num == EVENT_INTERFACE_SOUND3D) strcpy(text, "D�wi�k 3D\\Przestrzenne pozycjonowanie d�wi�k�w"); - - if ( num == EVENT_INTERFACE_MIN ) strcpy(text, "Najni�sza\\Minimalna jako�� grafiki (najwy�sza cz�stotliwo�� od�wie�ania)"); - if ( num == EVENT_INTERFACE_NORM ) strcpy(text, "Normalna\\Normalna jako�� grafiki"); - if ( num == EVENT_INTERFACE_MAX ) strcpy(text, "Najwy�sza\\Maksymalna jako�� grafiki (najni�sza cz�stotliwo�� od�wie�ania)"); - - if ( num == EVENT_INTERFACE_SILENT ) strcpy(text, "Cisza\\Brak d�wi�k�w"); - if ( num == EVENT_INTERFACE_NOISY ) strcpy(text, "Normalne\\Normalna g�o�no�� d�wi�k�w"); - - if ( num == EVENT_INTERFACE_JOYSTICK) strcpy(text, "U�ywaj joysticka\\Joystick lub klawiatura"); - if ( num == EVENT_INTERFACE_SOLUCE ) strcpy(text, "Dost�p do rozwi�zania\\Pokazuje rozwi�zanie (szczeg�owe instrukcje dotycz�ce misji)"); - - if ( num == EVENT_INTERFACE_NEDIT ) strcpy(text, "\\Nowe imi� gracza"); - if ( num == EVENT_INTERFACE_NOK ) strcpy(text, "OK\\Wybiera zaznaczonego gracza"); - if ( num == EVENT_INTERFACE_NCANCEL) strcpy(text, "Anuluj\\Zachowuje bie��ce imi� gracza"); - if ( num == EVENT_INTERFACE_NDELETE) strcpy(text, "Usu� gracza\\Usuwa gracza z listy"); - if ( num == EVENT_INTERFACE_NLABEL ) strcpy(text, "Imi� gracza"); - - if ( num == EVENT_INTERFACE_IOWRITE) strcpy(text, "Zapisz\\Zapisuje bie��c� misj�"); - if ( num == EVENT_INTERFACE_IOREAD ) strcpy(text, "Wczytaj\\Wczytuje zaznaczon� misj�"); - if ( num == EVENT_INTERFACE_IOLIST ) strcpy(text, "Lista zapisanych misji"); - if ( num == EVENT_INTERFACE_IOLABEL) strcpy(text, "Nazwa pliku:"); - if ( num == EVENT_INTERFACE_IONAME ) strcpy(text, "Nazwa misji"); - if ( num == EVENT_INTERFACE_IOIMAGE) strcpy(text, "Fotografia"); - if ( num == EVENT_INTERFACE_IODELETE) strcpy(text, "Usu�\\Usuwa zaznaczony plik"); - - if ( num == EVENT_INTERFACE_PERSO ) strcpy(text, "Wygl�d\\Wybierz swoj� posta�"); - if ( num == EVENT_INTERFACE_POK ) strcpy(text, "OK"); - if ( num == EVENT_INTERFACE_PCANCEL) strcpy(text, "Anuluj"); - if ( num == EVENT_INTERFACE_PDEF ) strcpy(text, "Standardowe\\Standardowe ustawienia wygl�du"); - if ( num == EVENT_INTERFACE_PHEAD ) strcpy(text, "G�owa\\Twarz i w�osy"); - if ( num == EVENT_INTERFACE_PBODY ) strcpy(text, "Skafander\\Skafander astronauty"); - if ( num == EVENT_INTERFACE_PLROT ) strcpy(text, "\\Obr�� w lewo"); - if ( num == EVENT_INTERFACE_PRROT ) strcpy(text, "\\Obr�� w prawo"); - if ( num == EVENT_INTERFACE_PCRa ) strcpy(text, "Czerwony"); - if ( num == EVENT_INTERFACE_PCGa ) strcpy(text, "Zielony"); - if ( num == EVENT_INTERFACE_PCBa ) strcpy(text, "Niebieski"); - if ( num == EVENT_INTERFACE_PCRb ) strcpy(text, "Czerwony"); - if ( num == EVENT_INTERFACE_PCGb ) strcpy(text, "Zielony"); - if ( num == EVENT_INTERFACE_PCBb ) strcpy(text, "Niebieski"); - if ( num == EVENT_INTERFACE_PFACE1 ) strcpy(text, "\\Twarz 1"); - if ( num == EVENT_INTERFACE_PFACE2 ) strcpy(text, "\\Twarz 4"); - if ( num == EVENT_INTERFACE_PFACE3 ) strcpy(text, "\\Twarz 3"); - if ( num == EVENT_INTERFACE_PFACE4 ) strcpy(text, "\\Twarz 2"); - if ( num == EVENT_INTERFACE_PGLASS0) strcpy(text, "\\Bez okular�w"); - if ( num == EVENT_INTERFACE_PGLASS1) strcpy(text, "\\Okulary 1"); - if ( num == EVENT_INTERFACE_PGLASS2) strcpy(text, "\\Okulary 2"); - if ( num == EVENT_INTERFACE_PGLASS3) strcpy(text, "\\Okulary 3"); - if ( num == EVENT_INTERFACE_PGLASS4) strcpy(text, "\\Okulary 4"); - if ( num == EVENT_INTERFACE_PGLASS5) strcpy(text, "\\Okulary 5"); - - if ( num == EVENT_OBJECT_DESELECT ) strcpy(text, "Poprzednie zaznaczenie (\\key desel;)"); - if ( num == EVENT_OBJECT_LEFT ) strcpy(text, "Skr�� w lewo (\\key left;)"); - if ( num == EVENT_OBJECT_RIGHT ) strcpy(text, "Skr�� w prawo (\\key right;)"); - if ( num == EVENT_OBJECT_UP ) strcpy(text, "Naprz�d (\\key up;)"); - if ( num == EVENT_OBJECT_DOWN ) strcpy(text, "Cofnij (\\key down;)"); - if ( num == EVENT_OBJECT_GASUP ) strcpy(text, "G�ra (\\key gup;)"); - if ( num == EVENT_OBJECT_GASDOWN ) strcpy(text, "D� (\\key gdown;)"); - if ( num == EVENT_OBJECT_HTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)"); - if ( num == EVENT_OBJECT_MTAKE ) strcpy(text, "Podnie� lub upu�� (\\key action;)"); - if ( num == EVENT_OBJECT_MFRONT ) strcpy(text, "..przed"); - if ( num == EVENT_OBJECT_MBACK ) strcpy(text, "..za"); - if ( num == EVENT_OBJECT_MPOWER ) strcpy(text, "..ogniwo elektryczne"); - if ( num == EVENT_OBJECT_BHELP ) strcpy(text, "Rozkazy dotycz�ce misji (\\key help;)"); - if ( num == EVENT_OBJECT_BTAKEOFF ) strcpy(text, "Odle�, aby zako�czy� misj�"); - if ( num == EVENT_OBJECT_BDERRICK ) strcpy(text, "Zbuduj kopalni�"); - if ( num == EVENT_OBJECT_BSTATION ) strcpy(text, "Zbuduj elektrowni�"); - if ( num == EVENT_OBJECT_BFACTORY ) strcpy(text, "Zbuduj fabryk� robot�w"); - if ( num == EVENT_OBJECT_BREPAIR ) strcpy(text, "Zbuduj warsztat"); - if ( num == EVENT_OBJECT_BCONVERT ) strcpy(text, "Zbuduj hut�"); - if ( num == EVENT_OBJECT_BTOWER ) strcpy(text, "Zbuduj wie�� obronn�"); - if ( num == EVENT_OBJECT_BRESEARCH ) strcpy(text, "Zbuduj centrum badawcze"); - if ( num == EVENT_OBJECT_BRADAR ) strcpy(text, "Zbuduj stacj� radarow�"); - if ( num == EVENT_OBJECT_BENERGY ) strcpy(text, "Zbuduj fabryk� ogniw elektrycznych"); - if ( num == EVENT_OBJECT_BLABO ) strcpy(text, "Zbuduj laboratorium"); - if ( num == EVENT_OBJECT_BNUCLEAR ) strcpy(text, "Zbuduj elektrowni� atomow�"); - if ( num == EVENT_OBJECT_BPARA ) strcpy(text, "Zbuduj odgromnik"); - if ( num == EVENT_OBJECT_BINFO ) strcpy(text, "Zbuduj stacj� przeka�nikow�"); - if ( num == EVENT_OBJECT_GFLAT ) strcpy(text, "Poka� czy teren jest p�aski"); - if ( num == EVENT_OBJECT_FCREATE ) strcpy(text, "Postaw flag�"); - if ( num == EVENT_OBJECT_FDELETE ) strcpy(text, "Usu� flag�"); - if ( num == EVENT_OBJECT_FCOLORb ) strcpy(text, "\\Niebieskie flagi"); - if ( num == EVENT_OBJECT_FCOLORr ) strcpy(text, "\\Czerwone flagi"); - if ( num == EVENT_OBJECT_FCOLORg ) strcpy(text, "\\Zielone flagi"); - if ( num == EVENT_OBJECT_FCOLORy ) strcpy(text, "\\��te flagi"); - if ( num == EVENT_OBJECT_FCOLORv ) strcpy(text, "\\Fioletowe flagi"); - if ( num == EVENT_OBJECT_FACTORYfa ) strcpy(text, "Zbuduj transporter lataj�cy"); - if ( num == EVENT_OBJECT_FACTORYta ) strcpy(text, "Zbuduj transporter na g�sienicach"); - if ( num == EVENT_OBJECT_FACTORYwa ) strcpy(text, "Zbuduj transporter na ko�ach"); - if ( num == EVENT_OBJECT_FACTORYia ) strcpy(text, "Zbuduj transporter na nogach"); - if ( num == EVENT_OBJECT_FACTORYfc ) strcpy(text, "Zbuduj dzia�o lataj�ce"); - if ( num == EVENT_OBJECT_FACTORYtc ) strcpy(text, "Zbuduj dzia�o na g�sienicach"); - if ( num == EVENT_OBJECT_FACTORYwc ) strcpy(text, "Zbuduj dzia�o na ko�ach"); - if ( num == EVENT_OBJECT_FACTORYic ) strcpy(text, "Zbuduj dzia�o na nogach"); - if ( num == EVENT_OBJECT_FACTORYfi ) strcpy(text, "Zbuduj lataj�ce dzia�o organiczne"); - if ( num == EVENT_OBJECT_FACTORYti ) strcpy(text, "Zbuduj dzia�o organiczne na g�sienicach"); - if ( num == EVENT_OBJECT_FACTORYwi ) strcpy(text, "Zbuduj dzia�o organiczne na ko�ach"); - if ( num == EVENT_OBJECT_FACTORYii ) strcpy(text, "Zbuduj dzia�o organiczne na nogach"); - if ( num == EVENT_OBJECT_FACTORYfs ) strcpy(text, "Zbuduj szperacz lataj�cy"); - if ( num == EVENT_OBJECT_FACTORYts ) strcpy(text, "Zbuduj szperacz na g�sienicach"); - if ( num == EVENT_OBJECT_FACTORYws ) strcpy(text, "Zbuduj szperacz na ko�ach"); - if ( num == EVENT_OBJECT_FACTORYis ) strcpy(text, "Zbuduj szperacz na nogach"); - if ( num == EVENT_OBJECT_FACTORYrt ) strcpy(text, "Zbuduj robota uderzacza"); - if ( num == EVENT_OBJECT_FACTORYrc ) strcpy(text, "Zbuduj dzia�o fazowe"); - if ( num == EVENT_OBJECT_FACTORYrr ) strcpy(text, "Zbuduj robota recyklera"); - if ( num == EVENT_OBJECT_FACTORYrs ) strcpy(text, "Zbuduj robota os�aniajacza"); - if ( num == EVENT_OBJECT_FACTORYsa ) strcpy(text, "Zbuduj robota nurka"); - if ( num == EVENT_OBJECT_RTANK ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na g�sienicach"); - if ( num == EVENT_OBJECT_RFLY ) strcpy(text, "Rozpocznij prace badawcze nad transporterem lataj�cym"); - if ( num == EVENT_OBJECT_RTHUMP ) strcpy(text, "Rozpocznij prace badawcze nad robotem uderzaczem"); - if ( num == EVENT_OBJECT_RCANON ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em"); - if ( num == EVENT_OBJECT_RTOWER ) strcpy(text, "Rozpocznij prace badawcze nad wie�� obronn�"); - if ( num == EVENT_OBJECT_RPHAZER ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em fazowym"); - if ( num == EVENT_OBJECT_RSHIELD ) strcpy(text, "Rozpocznij prace badawcze nad robotem os�aniaczem"); - if ( num == EVENT_OBJECT_RATOMIC ) strcpy(text, "Rozpocznij prace badawcze nad energi� atomow�"); - if ( num == EVENT_OBJECT_RiPAW ) strcpy(text, "Rozpocznij prace badawcze nad transporterem na nogach"); - if ( num == EVENT_OBJECT_RiGUN ) strcpy(text, "Rozpocznij prace badawcze nad dzia�em organicznym"); - if ( num == EVENT_OBJECT_RESET ) strcpy(text, "Powr�t do pocz�tku"); - if ( num == EVENT_OBJECT_SEARCH ) strcpy(text, "Szukaj (\\key action;)"); - if ( num == EVENT_OBJECT_TERRAFORM ) strcpy(text, "Uderz (\\key action;)"); - if ( num == EVENT_OBJECT_FIRE ) strcpy(text, "Strzelaj (\\key action;)"); - if ( num == EVENT_OBJECT_RECOVER ) strcpy(text, "Odzyskaj (\\key action;)"); - if ( num == EVENT_OBJECT_BEGSHIELD ) strcpy(text, "Rozszerz os�on� (\\key action;)"); - if ( num == EVENT_OBJECT_ENDSHIELD ) strcpy(text, "Wy��cz os�on� (\\key action;)"); - if ( num == EVENT_OBJECT_DIMSHIELD ) strcpy(text, "Zasi�g os�ony"); - if ( num == EVENT_OBJECT_PROGRUN ) strcpy(text, "Wykonaj zaznaczony program"); - if ( num == EVENT_OBJECT_PROGEDIT ) strcpy(text, "Edytuj zaznaczony program"); - if ( num == EVENT_OBJECT_INFOOK ) strcpy(text, "\\Prze��cz przeka�nik SatCom w stan gotowo�ci"); - if ( num == EVENT_OBJECT_DELETE ) strcpy(text, "Zniszcz budynek"); - if ( num == EVENT_OBJECT_GENERGY ) strcpy(text, "Poziom energii"); - if ( num == EVENT_OBJECT_GSHIELD ) strcpy(text, "Poziom os�ony"); - if ( num == EVENT_OBJECT_GRANGE ) strcpy(text, "Temperatura silnika"); - if ( num == EVENT_OBJECT_GPROGRESS ) strcpy(text, "Wci�� pracuje..."); - if ( num == EVENT_OBJECT_GRADAR ) strcpy(text, "Liczba wykrytych insekt�w"); - if ( num == EVENT_OBJECT_GINFO ) strcpy(text, "Przes�ane informacje"); - if ( num == EVENT_OBJECT_COMPASS ) strcpy(text, "Kompas"); -//? if ( num == EVENT_OBJECT_MAP ) strcpy(text, "Mapka"); - if ( num == EVENT_OBJECT_MAPZOOM ) strcpy(text, "Powi�kszenie mapki"); - if ( num == EVENT_OBJECT_CAMERA ) strcpy(text, "Kamera (\\key camera;)"); - if ( num == EVENT_OBJECT_CAMERAleft) strcpy(text, "Camera to left"); - if ( num == EVENT_OBJECT_CAMERAright) strcpy(text, "Camera to right"); - if ( num == EVENT_OBJECT_CAMERAnear) strcpy(text, "Camera nearest"); - if ( num == EVENT_OBJECT_CAMERAaway) strcpy(text, "Camera awayest"); - if ( num == EVENT_OBJECT_HELP ) strcpy(text, "Pomoc na temat zaznaczonego obiektu"); - if ( num == EVENT_OBJECT_SOLUCE ) strcpy(text, "Poka� rozwi�zanie"); - if ( num == EVENT_OBJECT_SHORTCUT00) strcpy(text, "Prze��cz roboty <-> budynki"); - if ( num == EVENT_OBJECT_LIMIT ) strcpy(text, "Poka� zasi�g"); - if ( num == EVENT_OBJECT_PEN0 ) strcpy(text, "\\Rel�ve le crayon"); - if ( num == EVENT_OBJECT_PEN1 ) strcpy(text, "\\Abaisse le crayon noir"); - if ( num == EVENT_OBJECT_PEN2 ) strcpy(text, "\\Abaisse le crayon jaune"); - if ( num == EVENT_OBJECT_PEN3 ) strcpy(text, "\\Abaisse le crayon orange"); - if ( num == EVENT_OBJECT_PEN4 ) strcpy(text, "\\Abaisse le crayon rouge"); - if ( num == EVENT_OBJECT_PEN5 ) strcpy(text, "\\Abaisse le crayon violet"); - if ( num == EVENT_OBJECT_PEN6 ) strcpy(text, "\\Abaisse le crayon bleu"); - if ( num == EVENT_OBJECT_PEN7 ) strcpy(text, "\\Abaisse le crayon vert"); - if ( num == EVENT_OBJECT_PEN8 ) strcpy(text, "\\Abaisse le crayon brun"); - if ( num == EVENT_OBJECT_REC ) strcpy(text, "\\D�marre l'enregistrement"); - if ( num == EVENT_OBJECT_STOP ) strcpy(text, "\\Stoppe l'enregistrement"); - if ( num == EVENT_DT_VISIT0 || - num == EVENT_DT_VISIT1 || - num == EVENT_DT_VISIT2 || - num == EVENT_DT_VISIT3 || - num == EVENT_DT_VISIT4 ) strcpy(text, "Poka� miejsce"); - if ( num == EVENT_DT_END ) strcpy(text, "Kontynuuj"); - if ( num == EVENT_CMD ) strcpy(text, "Linia polecenia"); - if ( num == EVENT_SPEED ) strcpy(text, "Pr�dko�� gry"); - - if ( num == EVENT_HYPER_PREV ) strcpy(text, "Wstecz"); - if ( num == EVENT_HYPER_NEXT ) strcpy(text, "Naprz�d"); - if ( num == EVENT_HYPER_HOME ) strcpy(text, "Pocz�tek"); - if ( num == EVENT_HYPER_COPY ) strcpy(text, "Kopiuj"); - if ( num == EVENT_HYPER_SIZE1 ) strcpy(text, "Wielko�� 1"); - if ( num == EVENT_HYPER_SIZE2 ) strcpy(text, "Wielko�� 2"); - if ( num == EVENT_HYPER_SIZE3 ) strcpy(text, "Wielko�� 3"); - if ( num == EVENT_HYPER_SIZE4 ) strcpy(text, "Wielko�� 4"); - if ( num == EVENT_HYPER_SIZE5 ) strcpy(text, "Wielko�� 5"); - if ( num == EVENT_SATCOM_HUSTON ) strcpy(text, "Rozkazy z Houston"); -#if _TEEN - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity"); -#else - if ( num == EVENT_SATCOM_SAT ) strcpy(text, "Raport z satelity"); -#endif - if ( num == EVENT_SATCOM_LOADING ) strcpy(text, "Program dostarczony z Houston"); - if ( num == EVENT_SATCOM_OBJECT ) strcpy(text, "Lista obiekt�w"); - if ( num == EVENT_SATCOM_PROG ) strcpy(text, "Podr�cznik programowania"); - if ( num == EVENT_SATCOM_SOLUCE ) strcpy(text, "Rozwi�zanie"); - - if ( num == EVENT_STUDIO_OK ) strcpy(text, "OK\\Zamyka edytor programu i powraca do gry"); - if ( num == EVENT_STUDIO_CANCEL ) strcpy(text, "Anuluj\\Pomija wszystkie zmiany"); - if ( num == EVENT_STUDIO_NEW ) strcpy(text, "Nowy"); - if ( num == EVENT_STUDIO_OPEN ) strcpy(text, "Otw�rz (Ctrl+O)"); - if ( num == EVENT_STUDIO_SAVE ) strcpy(text, "Zapisz (Ctrl+S)"); - if ( num == EVENT_STUDIO_UNDO ) strcpy(text, "Cofnij (Ctrl+Z)"); - if ( num == EVENT_STUDIO_CUT ) strcpy(text, "Wytnij (Ctrl+X)"); - if ( num == EVENT_STUDIO_COPY ) strcpy(text, "Kopiuj (Ctrl+C)"); - if ( num == EVENT_STUDIO_PASTE ) strcpy(text, "Wklej (Ctrl+V)"); - if ( num == EVENT_STUDIO_SIZE ) strcpy(text, "Wielko�� czcionki"); - if ( num == EVENT_STUDIO_TOOL ) strcpy(text, "Rozkazy (\\key help;)"); - if ( num == EVENT_STUDIO_HELP ) strcpy(text, "Podr�cznik programowania (\\key prog;)"); - if ( num == EVENT_STUDIO_COMPILE ) strcpy(text, "Kompiluj"); - if ( num == EVENT_STUDIO_RUN ) strcpy(text, "Wykonaj/Zatrzymaj"); - if ( num == EVENT_STUDIO_REALTIME ) strcpy(text, "Pauza/Kontynuuj"); - if ( num == EVENT_STUDIO_STEP ) strcpy(text, "Jeden krok"); - } - - if ( type == RES_OBJECT ) - { - if ( num == OBJECT_PORTICO ) strcpy(text, "�uraw przesuwalny"); - if ( num == OBJECT_BASE ) strcpy(text, "Statek kosmiczny"); - if ( num == OBJECT_DERRICK ) strcpy(text, "Kopalnia"); - if ( num == OBJECT_FACTORY ) strcpy(text, "Fabryka robot�w"); - if ( num == OBJECT_REPAIR ) strcpy(text, "Warsztat"); - if ( num == OBJECT_DESTROYER ) strcpy(text, "Destroyer"); - if ( num == OBJECT_STATION ) strcpy(text, "Stacja energetyczna"); - if ( num == OBJECT_CONVERT ) strcpy(text, "Przetop rud� na tytan"); - if ( num == OBJECT_TOWER ) strcpy(text, "Wie�a obronna"); - if ( num == OBJECT_NEST ) strcpy(text, "Gniazdo"); - if ( num == OBJECT_RESEARCH ) strcpy(text, "Centrum badawcze"); - if ( num == OBJECT_RADAR ) strcpy(text, "Stacja radarowa"); - if ( num == OBJECT_INFO ) strcpy(text, "Stacja przeka�nikowa informacji"); -#if _TEEN - if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych"); -#else - if ( num == OBJECT_ENERGY ) strcpy(text, "Fabryka ogniw elektrycznych"); -#endif - if ( num == OBJECT_LABO ) strcpy(text, "Laboratorium"); - if ( num == OBJECT_NUCLEAR ) strcpy(text, "Elektrownia atomowa"); - if ( num == OBJECT_PARA ) strcpy(text, "Odgromnik"); - if ( num == OBJECT_SAFE ) strcpy(text, "Skrytka"); - if ( num == OBJECT_HUSTON ) strcpy(text, "Centrum Kontroli Misji w Houston"); - if ( num == OBJECT_TARGET1 ) strcpy(text, "Cel"); - if ( num == OBJECT_TARGET2 ) strcpy(text, "Cel"); - if ( num == OBJECT_START ) strcpy(text, "Pocz�tek"); - if ( num == OBJECT_END ) strcpy(text, "Koniec"); - if ( num == OBJECT_STONE ) strcpy(text, "Ruda tytanu"); - if ( num == OBJECT_URANIUM ) strcpy(text, "Ruda uranu"); - if ( num == OBJECT_BULLET ) strcpy(text, "Materia organiczna"); - if ( num == OBJECT_METAL ) strcpy(text, "Tytan"); - if ( num == OBJECT_POWER ) strcpy(text, "Ogniwo elektryczne"); - if ( num == OBJECT_ATOMIC ) strcpy(text, "Atomowe ogniwa elektryczne"); - if ( num == OBJECT_BBOX ) strcpy(text, "Czarna skrzynka"); - if ( num == OBJECT_KEYa ) strcpy(text, "Klucz A"); - if ( num == OBJECT_KEYb ) strcpy(text, "Klucz B"); - if ( num == OBJECT_KEYc ) strcpy(text, "Klucz C"); - if ( num == OBJECT_KEYd ) strcpy(text, "Klucz D"); - if ( num == OBJECT_TNT ) strcpy(text, "Materia�y wybuchowe"); - if ( num == OBJECT_BOMB ) strcpy(text, "Mina"); - if ( num == OBJECT_BAG ) strcpy(text, "Zestaw przetrwania"); - if ( num == OBJECT_WAYPOINT ) strcpy(text, "Punkt kontrolny"); - if ( num == OBJECT_FLAGb ) strcpy(text, "Niebieska flaga"); - if ( num == OBJECT_FLAGr ) strcpy(text, "Czerwona flaga"); - if ( num == OBJECT_FLAGg ) strcpy(text, "Zielona flaga"); - if ( num == OBJECT_FLAGy ) strcpy(text, "��ta flaga"); - if ( num == OBJECT_FLAGv ) strcpy(text, "Fioletowa flaga"); - if ( num == OBJECT_MARKPOWER ) strcpy(text, "�r�d�o energii (miejsce na elektrowni�)"); - if ( num == OBJECT_MARKURANIUM ) strcpy(text, "Z�o�e uranu (miejsce na kopalni�)"); - if ( num == OBJECT_MARKKEYa ) strcpy(text, "Znaleziono klucz A (miejsce na kopalni�)"); - if ( num == OBJECT_MARKKEYb ) strcpy(text, "Znaleziono klucz B (miejsce na kopalni�)"); - if ( num == OBJECT_MARKKEYc ) strcpy(text, "Znaleziono klucz C (miejsce na kopalni�)"); - if ( num == OBJECT_MARKKEYd ) strcpy(text, "Znaleziono klucz D (miejsce na kopalni�)"); - if ( num == OBJECT_MARKSTONE ) strcpy(text, "Z�o�e tytanu (miejsce na kopalni�)"); - if ( num == OBJECT_MOBILEft ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEtt ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEwt ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEit ) strcpy(text, "Robot treningowy"); - if ( num == OBJECT_MOBILEfa ) strcpy(text, "Transporter lataj�cy"); - if ( num == OBJECT_MOBILEta ) strcpy(text, "Transporter na g�sienicach"); - if ( num == OBJECT_MOBILEwa ) strcpy(text, "Transporter na ko�ach"); - if ( num == OBJECT_MOBILEia ) strcpy(text, "Transporter na nogach"); - if ( num == OBJECT_MOBILEfc ) strcpy(text, "Dzia�o lataj�ce"); - if ( num == OBJECT_MOBILEtc ) strcpy(text, "Dzia�o na g�sienicach"); - if ( num == OBJECT_MOBILEwc ) strcpy(text, "Dzia�o na ko�ach"); - if ( num == OBJECT_MOBILEic ) strcpy(text, "Dzia�o na nogach"); - if ( num == OBJECT_MOBILEfi ) strcpy(text, "Lataj�ce dzia�o organiczne"); - if ( num == OBJECT_MOBILEti ) strcpy(text, "Dzia�o organiczne na g�sienicach"); - if ( num == OBJECT_MOBILEwi ) strcpy(text, "Dzia�o organiczne na ko�ach"); - if ( num == OBJECT_MOBILEii ) strcpy(text, "Dzia�o organiczne na nogach"); - if ( num == OBJECT_MOBILEfs ) strcpy(text, "Szperacz lataj�cy"); - if ( num == OBJECT_MOBILEts ) strcpy(text, "Szperacz na g�sienicach"); - if ( num == OBJECT_MOBILEws ) strcpy(text, "Szperacz na ko�ach"); - if ( num == OBJECT_MOBILEis ) strcpy(text, "Szperacz na nogach"); - if ( num == OBJECT_MOBILErt ) strcpy(text, "Uderzacz"); - if ( num == OBJECT_MOBILErc ) strcpy(text, "Dzia�o fazowe"); - if ( num == OBJECT_MOBILErr ) strcpy(text, "Recykler"); - if ( num == OBJECT_MOBILErs ) strcpy(text, "Os�aniacz"); - if ( num == OBJECT_MOBILEsa ) strcpy(text, "Robot nurek"); - if ( num == OBJECT_MOBILEtg ) strcpy(text, "Robot cel"); - if ( num == OBJECT_MOBILEdr ) strcpy(text, "Drawer bot"); - if ( num == OBJECT_HUMAN ) strcpy(text, g_gamerName); - if ( num == OBJECT_TECH ) strcpy(text, "In�ynier"); - if ( num == OBJECT_TOTO ) strcpy(text, "Robbie"); - if ( num == OBJECT_MOTHER ) strcpy(text, "Kr�lowa Obcych"); - if ( num == OBJECT_ANT ) strcpy(text, "Mr�wka"); - if ( num == OBJECT_SPIDER ) strcpy(text, "Paj�k"); - if ( num == OBJECT_BEE ) strcpy(text, "Osa"); - if ( num == OBJECT_WORM ) strcpy(text, "Robal"); - if ( num == OBJECT_EGG ) strcpy(text, "Jajo"); - if ( num == OBJECT_RUINmobilew1 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobilew2 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobilet1 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobilet2 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobiler1 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINmobiler2 ) strcpy(text, "Wrak"); - if ( num == OBJECT_RUINfactory ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINdoor ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINsupport ) strcpy(text, "Odpady"); - if ( num == OBJECT_RUINradar ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINconvert ) strcpy(text, "Ruiny"); - if ( num == OBJECT_RUINbase ) strcpy(text, "Ruiny statku kosmicznego"); - if ( num == OBJECT_RUINhead ) strcpy(text, "Ruiny statku kosmicznego"); - if ( num == OBJECT_APOLLO1 || - num == OBJECT_APOLLO3 || - num == OBJECT_APOLLO4 || - num == OBJECT_APOLLO5 ) strcpy(text, "Pozosta�o�ci z misji Apollo"); - if ( num == OBJECT_APOLLO2 ) strcpy(text, "Pojazd Ksi�ycowy"); - } - - if ( type == RES_ERR ) - { - strcpy(text, "B��d"); - if ( num == ERR_CMD ) strcpy(text, "Nieznane polecenie"); -#if _NEWLOOK - if ( num == ERR_INSTALL ) strcpy(text, "Gra CeeBot nie jest zainstalowana."); - if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� CeeBot\ni uruchom gr� jeszcze raz."); -#else - if ( num == ERR_INSTALL ) strcpy(text, "Gra COLOBOT nie jest zainstalowana."); - if ( num == ERR_NOCD ) strcpy(text, "W�� dysk CD z gr� COLOBOT\ni uruchom gr� jeszcze raz."); -#endif - if ( num == ERR_MANIP_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_MANIP_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); - if ( num == ERR_MANIP_BUSY ) strcpy(text, "Nie mo�na nie�� wi�cej przedmiot�w"); - if ( num == ERR_MANIP_NIL ) strcpy(text, "Nie ma nic do podniesienia"); - if ( num == ERR_MANIP_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); - if ( num == ERR_MANIP_OCC ) strcpy(text, "Miejsce zaj�te"); - if ( num == ERR_MANIP_FRIEND ) strcpy(text, "Brak innego robota"); - if ( num == ERR_MANIP_RADIO ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w radioaktywnych"); - if ( num == ERR_MANIP_WATER ) strcpy(text, "Nie mo�esz przenosi� przedmiot�w pod wod�"); - if ( num == ERR_MANIP_EMPTY ) strcpy(text, "Nie ma nic do upuszczenia"); - if ( num == ERR_BUILD_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); - if ( num == ERR_BUILD_WATER ) strcpy(text, "Niemo�liwe pod wod�"); - if ( num == ERR_BUILD_ENERGY ) strcpy(text, "Za ma�o energii"); - if ( num == ERR_BUILD_METALAWAY ) strcpy(text, "Tytan za daleko"); - if ( num == ERR_BUILD_METALNEAR ) strcpy(text, "Tytan za blisko"); - if ( num == ERR_BUILD_METALINEX ) strcpy(text, "Brak tytanu w pobli�u"); - if ( num == ERR_BUILD_FLAT ) strcpy(text, "Powierzchnia nie jest wystarczaj�co p�aska"); - if ( num == ERR_BUILD_FLATLIT ) strcpy(text, "Za ma�o p�askiego terenu"); - if ( num == ERR_BUILD_BUSY ) strcpy(text, "Miejsce zaj�te"); - if ( num == ERR_BUILD_BASE ) strcpy(text, "Za blisko statku kosmicznego"); - if ( num == ERR_BUILD_NARROW ) strcpy(text, "Za blisko budynku"); - if ( num == ERR_BUILD_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); - if ( num == ERR_SEARCH_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); - if ( num == ERR_SEARCH_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_SEARCH_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); - if ( num == ERR_TERRA_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_TERRA_ENERGY ) strcpy(text, "Za ma�o energii"); - if ( num == ERR_TERRA_FLOOR ) strcpy(text, "Nieodpowiedni teren"); - if ( num == ERR_TERRA_BUILDING ) strcpy(text, "Budynek za blisko"); - if ( num == ERR_TERRA_OBJECT ) strcpy(text, "Obiekt za blisko"); - if ( num == ERR_RECOVER_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_RECOVER_ENERGY ) strcpy(text, "Za ma�o energii"); - if ( num == ERR_RECOVER_NULL ) strcpy(text, "Nie ma niczego do odzysku"); - if ( num == ERR_SHIELD_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_SHIELD_ENERGY ) strcpy(text, "Nie ma wi�cej energii"); - if ( num == ERR_MOVE_IMPOSSIBLE ) strcpy(text, "B��d w poleceniu ruchu"); - if ( num == ERR_FIND_IMPOSSIBLE ) strcpy(text, "Obiekt nieznany"); - if ( num == ERR_GOTO_IMPOSSIBLE ) strcpy(text, "Goto: miejsce docelowe niedost�pne"); - if ( num == ERR_GOTO_ITER ) strcpy(text, "Goto: miejsce docelowe niedost�pne"); - if ( num == ERR_GOTO_BUSY ) strcpy(text, "Goto: miejsce docelowe zaj�te"); - if ( num == ERR_FIRE_VEH ) strcpy(text, "Nieodpowiedni robot"); - if ( num == ERR_FIRE_ENERGY ) strcpy(text, "Za ma�o energii"); - if ( num == ERR_FIRE_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); - if ( num == ERR_CONVERT_EMPTY ) strcpy(text, "Brak rudy tytanu do przetopienia"); - if ( num == ERR_DERRICK_NULL ) strcpy(text, "W ziemi nie ma �adnej rudy"); - if ( num == ERR_STATION_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_TOWER_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_TOWER_ENERGY ) strcpy(text, "Nie ma wi�cej energii"); - if ( num == ERR_RESEARCH_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_RESEARCH_ENERGY ) strcpy(text, "Za ma�o energii"); - if ( num == ERR_RESEARCH_TYPE ) strcpy(text, "Nieodpowiedni rodzaj ogniw"); - if ( num == ERR_RESEARCH_ALREADY) strcpy(text, "Program badawczy zosta� ju� wykonany"); - if ( num == ERR_ENERGY_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_ENERGY_LOW ) strcpy(text, "Wci�� za ma�o energii"); - if ( num == ERR_ENERGY_EMPTY ) strcpy(text, "Brak tytanu do przetworzenia"); - if ( num == ERR_ENERGY_BAD ) strcpy(text, "Przetwarza jedynie tytan"); - if ( num == ERR_BASE_DLOCK ) strcpy(text, "Drzwi zablokowane przez robota lub inny obiekt "); - if ( num == ERR_BASE_DHUMAN ) strcpy(text, "Musisz by� na statku kosmicznym aby nim odlecie�"); - if ( num == ERR_LABO_NULL ) strcpy(text, "Nie ma niczego do zanalizowania"); - if ( num == ERR_LABO_BAD ) strcpy(text, "Analizuje jedynie materi� organiczn�"); - if ( num == ERR_LABO_ALREADY ) strcpy(text, "Analiza zosta�a ju� wykonana"); - if ( num == ERR_NUCLEAR_NULL ) strcpy(text, "Brak energii w ziemi"); - if ( num == ERR_NUCLEAR_LOW ) strcpy(text, "Wci�� za ma�o energii"); - if ( num == ERR_NUCLEAR_EMPTY ) strcpy(text, "Brak uranu do przetworzenia"); - if ( num == ERR_NUCLEAR_BAD ) strcpy(text, "Przetwarza jedynie uran"); - if ( num == ERR_FACTORY_NULL ) strcpy(text, "Brak tytanu"); - if ( num == ERR_FACTORY_NEAR ) strcpy(text, "Obiekt za blisko"); - if ( num == ERR_RESET_NEAR ) strcpy(text, "Miejsce zaj�te"); - if ( num == ERR_INFO_NULL ) strcpy(text, "Nie ma �adnej stacji przeka�nikowej w zasi�gu"); - if ( num == ERR_VEH_VIRUS ) strcpy(text, "Program zawirusowany"); - if ( num == ERR_BAT_VIRUS ) strcpy(text, "Zainfekowane wirusem, chwilowo niesprawne"); - if ( num == ERR_VEH_POWER ) strcpy(text, "Brak ogniwa elektrycznego"); - if ( num == ERR_VEH_ENERGY ) strcpy(text, "Nie ma wi�cej energii"); - if ( num == ERR_FLAG_FLY ) strcpy(text, "Niemo�liwe podczas lotu"); - if ( num == ERR_FLAG_WATER ) strcpy(text, "Niemo�liwe podczas p�ywania"); - if ( num == ERR_FLAG_MOTOR ) strcpy(text, "Niemo�liwe podczas ruchu"); - if ( num == ERR_FLAG_BUSY ) strcpy(text, "Niemo�liwe podczas przenoszenia przedmiotu"); - if ( num == ERR_FLAG_CREATE ) strcpy(text, "Za du�o flag w tym kolorze (maksymalnie 5)"); - if ( num == ERR_FLAG_PROXY ) strcpy(text, "Za blisko istniej�cej flagi"); - if ( num == ERR_FLAG_DELETE ) strcpy(text, "Nie ma flagi w pobli�u"); - if ( num == ERR_MISSION_NOTERM ) strcpy(text, "Misja nie jest wype�niona (naci�nij \\key help; aby uzyska� szczeg�y)"); - if ( num == ERR_DELETEMOBILE ) strcpy(text, "Robot zniszczony"); - if ( num == ERR_DELETEBUILDING ) strcpy(text, "Budynek zniszczony"); - if ( num == ERR_TOOMANY ) strcpy(text, "Nie mo�na tego utworzy�, za du�o obiekt�w"); - if ( num == ERR_OBLIGATORYTOKEN ) strcpy(text, "It misses \"%s\" in this exercise"); - if ( num == ERR_PROHIBITEDTOKEN ) strcpy(text, "Do not use in this exercise"); - - if ( num == INFO_BUILD ) strcpy(text, "Budowa zako�czona"); - if ( num == INFO_CONVERT ) strcpy(text, "Tytan dost�pny"); - if ( num == INFO_RESEARCH ) strcpy(text, "Program badawczy zako�czony"); - if ( num == INFO_RESEARCHTANK ) strcpy(text, "Dost�pne plany tranporter�w na g�sienicach"); - if ( num == INFO_RESEARCHFLY ) strcpy(text, "Mo�esz lata� u�ywaj�c klawiszy (\\key gup;) oraz (\\key gdown;)"); - if ( num == INFO_RESEARCHTHUMP ) strcpy(text, "Dost�pne plany robota uderzacza"); - if ( num == INFO_RESEARCHCANON ) strcpy(text, "Dost�pne plany dzia�a"); - if ( num == INFO_RESEARCHTOWER ) strcpy(text, "Dost�pne plany wie�y obronnej"); - if ( num == INFO_RESEARCHPHAZER ) strcpy(text, "Dost�pne plany dzia�a fazowego"); - if ( num == INFO_RESEARCHSHIELD ) strcpy(text, "Dost�pne plany robota os�aniacza"); - if ( num == INFO_RESEARCHATOMIC ) strcpy(text, "Dost�pne plany elektrowni atomowej"); - if ( num == INFO_FACTORY ) strcpy(text, "Dost�pny nowy robot"); - if ( num == INFO_LABO ) strcpy(text, "Analiza wykonana"); - if ( num == INFO_ENERGY ) strcpy(text, "Wytworzono ogniwo elektryczne"); - if ( num == INFO_NUCLEAR ) strcpy(text, "Wytworzono atomowe ogniwo elektryczne"); - if ( num == INFO_FINDING ) strcpy(text, "Znaleziono u�yteczny przedmiot"); - if ( num == INFO_MARKPOWER ) strcpy(text, "Znaleziono miejsce na elektrowni�"); - if ( num == INFO_MARKURANIUM ) strcpy(text, "Znaleziono miejsce na kopalni�"); - if ( num == INFO_MARKSTONE ) strcpy(text, "Znaleziono miejsce na kopalni�"); - if ( num == INFO_MARKKEYa ) strcpy(text, "Znaleziono miejsce na kopalni�"); - if ( num == INFO_MARKKEYb ) strcpy(text, "Znaleziono miejsce na kopalni�"); - if ( num == INFO_MARKKEYc ) strcpy(text, "Znaleziono miejsce na kopalni�"); - if ( num == INFO_MARKKEYd ) strcpy(text, "Znaleziono miejsce na kopalni�"); - if ( num == INFO_WIN ) strcpy(text, "<<< Dobra robota, misja wype�niona >>>"); - if ( num == INFO_LOST ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>"); - if ( num == INFO_LOSTq ) strcpy(text, "<<< Niestety, misja nie powiod�a si� >>>"); - if ( num == INFO_WRITEOK ) strcpy(text, "Bie��ca misja zapisana"); - if ( num == INFO_DELETEPATH ) strcpy(text, "Przekroczono punkt kontrolny"); - if ( num == INFO_DELETEMOTHER ) strcpy(text, "Kr�lowa Obcych zosta�a zabita"); - if ( num == INFO_DELETEANT ) strcpy(text, "Mr�wka �miertelnie raniona"); - if ( num == INFO_DELETEBEE ) strcpy(text, "Osa �miertelnie raniona"); - if ( num == INFO_DELETEWORM ) strcpy(text, "Robal �miertelnie raniony"); - if ( num == INFO_DELETESPIDER ) strcpy(text, "Paj�k �miertelnie raniony"); - if ( num == INFO_BEGINSATCOM ) strcpy(text, "Naci�nij klawisz \\key help; aby wy�wietli� rozkazy na przeka�niku SatCom"); - } - - if ( type == RES_CBOT ) - { - strcpy(text, "B��d"); - if ( num == TX_OPENPAR ) strcpy(text, "Brak nawiasu otwieraj�cego"); - if ( num == TX_CLOSEPAR ) strcpy(text, "Brak nawiasu zamykaj�cego"); - if ( num == TX_NOTBOOL ) strcpy(text, "Wyra�enie musi zwr�ci� warto�� logiczn�"); - if ( num == TX_UNDEFVAR ) strcpy(text, "Zmienna nie zosta�a zadeklarowana"); - if ( num == TX_BADLEFT ) strcpy(text, "Przypisanie niemo�liwe"); - if ( num == TX_ENDOF ) strcpy(text, "Brak �rednika na ko�cu wiersza"); - if ( num == TX_OUTCASE ) strcpy(text, "Polecenie ""case"" na zewn�trz bloku ""switch"""); - if ( num == TX_NOTERM ) strcpy(text, "Polecenie po ko�cowej klamrze zamykaj�cej"); - if ( num == TX_CLOSEBLK ) strcpy(text, "Brak ko�ca bloku"); - if ( num == TX_ELSEWITHOUTIF ) strcpy(text, "Polecenie ""else"" bez wyst�pienia ""if"" "); - if ( num == TX_OPENBLK ) strcpy(text, "Brak klamry otwieraj�cej");//d�but d'un bloc attendu? - if ( num == TX_BADTYPE ) strcpy(text, "Z�y typ dla przypisania"); - if ( num == TX_REDEFVAR ) strcpy(text, "Zmienna nie mo�e by� zadeklarowana dwukrotnie"); - if ( num == TX_BAD2TYPE ) strcpy(text, "Niezgodne typy operator�w"); - if ( num == TX_UNDEFCALL ) strcpy(text, "Funkcja nieznana"); - if ( num == TX_MISDOTS ) strcpy(text, "Brak znaku "" : "); - if ( num == TX_WHILE ) strcpy(text, "Brak kluczowego s�owa ""while"); - if ( num == TX_BREAK ) strcpy(text, "Polecenie ""break"" na zewn�trz p�tli"); - if ( num == TX_LABEL ) strcpy(text, "Po etykiecie musi wyst�pi� ""for"", ""while"", ""do"" lub ""switch"""); - if ( num == TX_NOLABEL ) strcpy(text, "Taka etykieta nie istnieje");// Cette �tiquette n'existe pas - if ( num == TX_NOCASE ) strcpy(text, "Brak polecenia ""case"); - if ( num == TX_BADNUM ) strcpy(text, "Brak liczby"); - if ( num == TX_VOID ) strcpy(text, "Pusty parametr"); - if ( num == TX_NOTYP ) strcpy(text, "Brak deklaracji typu"); - if ( num == TX_NOVAR ) strcpy(text, "Brak nazwy zmiennej"); - if ( num == TX_NOFONC ) strcpy(text, "Brakuj�ca nazwa funkcji"); - if ( num == TX_OVERPARAM ) strcpy(text, "Za du�o parametr�w"); - if ( num == TX_REDEF ) strcpy(text, "Funkcja ju� istnieje"); - if ( num == TX_LOWPARAM ) strcpy(text, "Brak wymaganego parametru"); - if ( num == TX_BADPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje parametr�w tego typu"); - if ( num == TX_NUMPARAM ) strcpy(text, "Funkcja o tej nazwie nie akceptuje takiej liczby parametr�w"); - if ( num == TX_NOITEM ) strcpy(text, "To nie jest obiekt tej klasy"); - if ( num == TX_DOT ) strcpy(text, "Ten obiekt nie jest cz�onkiem klasy"); - if ( num == TX_NOCONST ) strcpy(text, "Brak odpowiedniego konstruktora"); - if ( num == TX_REDEFCLASS ) strcpy(text, "Taka klasa ju� istnieje"); - if ( num == TX_CLBRK ) strcpy(text, "Brak "" ] """); - if ( num == TX_RESERVED ) strcpy(text, "S�owo zarezerwowane j�zyka CBOT"); - if ( num == TX_BADNEW ) strcpy(text, "Z�y argument dla funkcji ""new"""); - if ( num == TX_OPBRK ) strcpy(text, "Oczekiwane "" [ """); - if ( num == TX_BADSTRING ) strcpy(text, "Brak �a�cucha"); - if ( num == TX_BADINDEX ) strcpy(text, "Nieprawid�owy typ indeksu"); - if ( num == TX_PRIVATE ) strcpy(text, "Element prywatny"); - if ( num == TX_NOPUBLIC ) strcpy(text, "Wymagany publiczny"); - if ( num == TX_DIVZERO ) strcpy(text, "Dzielenie przez zero"); - if ( num == TX_NOTINIT ) strcpy(text, "Zmienna nie zosta�a zainicjalizowana"); - if ( num == TX_BADTHROW ) strcpy(text, "Warto�� ujemna odrzucona przez ""throw""");//C'est quoi, �a? - if ( num == TX_NORETVAL ) strcpy(text, "Funkcja nie zwr�ci�a �adnej warto�ci "); - if ( num == TX_NORUN ) strcpy(text, "�adna funkcja nie dzia�a"); - if ( num == TX_NOCALL ) strcpy(text, "Odwo�anie do nieznanej funkcji"); - if ( num == TX_NOCLASS ) strcpy(text, "Taka klasa nie istnieje"); - if ( num == TX_NULLPT ) strcpy(text, "Obiekt nieznany"); - if ( num == TX_OPNAN ) strcpy(text, "Dzia�anie niemo�liwe z warto�ci� ""nan"""); - if ( num == TX_OUTARRAY ) strcpy(text, "Dost�p poza tablic�"); - if ( num == TX_STACKOVER ) strcpy(text, "Przepe�nienie stosu"); - if ( num == TX_DELETEDPT ) strcpy(text, "Nieprawid�owy obiekt"); - if ( num == TX_FILEOPEN ) strcpy(text, "Nie mo�na otworzy� pliku"); - if ( num == TX_NOTOPEN ) strcpy(text, "Plik nie jest otwarty"); - if ( num == TX_ERRREAD ) strcpy(text, "B��d odczytu"); - if ( num == TX_ERRWRITE ) strcpy(text, "B��d zapisu"); - } - - if ( type == RES_KEY ) - { - if ( num == 0 ) strcpy(text, "< brak >"); - if ( num == SDLK_LEFT ) strcpy(text, "Strza�ka w lewo"); - if ( num == SDLK_RIGHT ) strcpy(text, "Strza�ka w prawo"); - if ( num == SDLK_UP ) strcpy(text, "Strza�ka w g�r�"); - if ( num == SDLK_DOWN ) strcpy(text, "Strza�ka w d�"); - if ( num == SDLK_CANCEL ) strcpy(text, "Ctrl-break"); - if ( num == SDLK_BACK ) strcpy(text, "<--"); - if ( num == SDLK_TAB ) strcpy(text, "Tab"); - if ( num == SDLK_CLEAR ) strcpy(text, "Delete"); - if ( num == SDLK_RETURN ) strcpy(text, "Enter"); - if ( num == SDLK_SHIFT ) strcpy(text, "Shift"); - if ( num == SDLK_CONTROL ) strcpy(text, "Ctrl"); - if ( num == SDLK_MENU ) strcpy(text, "Alt"); - if ( num == SDLK_PAUSE ) strcpy(text, "Pause"); - if ( num == SDLK_CAPITAL ) strcpy(text, "Caps Lock"); - if ( num == SDLK_ESCAPE ) strcpy(text, "Esc"); - if ( num == SDLK_SPACE ) strcpy(text, "Spacja"); - if ( num == SDLK_PRIOR ) strcpy(text, "Page Up"); - if ( num == SDLK_NEXT ) strcpy(text, "Page Down"); - if ( num == SDLK_END ) strcpy(text, "End"); - if ( num == SDLK_HOME ) strcpy(text, "Home"); - if ( num == SDLK_SELECT ) strcpy(text, "Zaznacz"); - if ( num == SDLK_EXECUTE ) strcpy(text, "Wykonaj"); - if ( num == SDLK_SNAPSHOT ) strcpy(text, "Print Scrn"); - if ( num == SDLK_INSERT ) strcpy(text, "Insert"); - if ( num == SDLK_DELETE ) strcpy(text, "Delete"); - if ( num == SDLK_HELP ) strcpy(text, "Pomoc"); - if ( num == SDLK_LWIN ) strcpy(text, "Lewy klawisz Windows"); - if ( num == SDLK_RWIN ) strcpy(text, "Prawy klawisz Windows"); - if ( num == SDLK_APPS ) strcpy(text, "Klawisz menu kontekstowego"); - if ( num == SDLK_NUMPAD0 ) strcpy(text, "Klaw. Num. 0"); - if ( num == SDLK_NUMPAD1 ) strcpy(text, "Klaw. Num. 1"); - if ( num == SDLK_NUMPAD2 ) strcpy(text, "Klaw. Num. 2"); - if ( num == SDLK_NUMPAD3 ) strcpy(text, "Klaw. Num. 3"); - if ( num == SDLK_NUMPAD4 ) strcpy(text, "Klaw. Num. 4"); - if ( num == SDLK_NUMPAD5 ) strcpy(text, "Klaw. Num. 5"); - if ( num == SDLK_NUMPAD6 ) strcpy(text, "Klaw. Num. 6"); - if ( num == SDLK_NUMPAD7 ) strcpy(text, "Klaw. Num. 7"); - if ( num == SDLK_NUMPAD8 ) strcpy(text, "Klaw. Num. 8"); - if ( num == SDLK_NUMPAD9 ) strcpy(text, "Klaw. Num. 9"); - if ( num == SDLK_MULTIPLY ) strcpy(text, "Klaw. Num. *"); - if ( num == SDLK_ADD ) strcpy(text, "Klaw. Num. +"); - if ( num == SDLK_SEPARATOR ) strcpy(text, "Klaw. Num. separator"); - if ( num == SDLK_SUBTRACT ) strcpy(text, "Klaw. Num. -"); - if ( num == SDLK_DECIMAL ) strcpy(text, "Klaw. Num. ."); - if ( num == SDLK_DIVIDE ) strcpy(text, "Klaw. Num. /"); - if ( num == SDLK_F1 ) strcpy(text, "F1"); - if ( num == SDLK_F2 ) strcpy(text, "F2"); - if ( num == SDLK_F3 ) strcpy(text, "F3"); - if ( num == SDLK_F4 ) strcpy(text, "F4"); - if ( num == SDLK_F5 ) strcpy(text, "F5"); - if ( num == SDLK_F6 ) strcpy(text, "F6"); - if ( num == SDLK_F7 ) strcpy(text, "F7"); - if ( num == SDLK_F8 ) strcpy(text, "F8"); - if ( num == SDLK_F9 ) strcpy(text, "F9"); - if ( num == SDLK_F10 ) strcpy(text, "F10"); - if ( num == SDLK_F11 ) strcpy(text, "F11"); - if ( num == SDLK_F12 ) strcpy(text, "F12"); - if ( num == SDLK_F13 ) strcpy(text, "F13"); - if ( num == SDLK_F14 ) strcpy(text, "F14"); - if ( num == SDLK_F15 ) strcpy(text, "F15"); - if ( num == SDLK_F16 ) strcpy(text, "F16"); - if ( num == SDLK_F17 ) strcpy(text, "F17"); - if ( num == SDLK_F18 ) strcpy(text, "F18"); - if ( num == SDLK_F19 ) strcpy(text, "F19"); - if ( num == SDLK_F20 ) strcpy(text, "F20"); - if ( num == SDLK_NUMLOCK ) strcpy(text, "Num Lock"); - if ( num == SDLK_SCROLL ) strcpy(text, "Scroll Lock"); - if ( num == SDLK_ATTN ) strcpy(text, "Attn"); - if ( num == SDLK_CRSEL ) strcpy(text, "CrSel"); - if ( num == SDLK_EXSEL ) strcpy(text, "ExSel"); - if ( num == SDLK_EREOF ) strcpy(text, "Erase EOF"); - if ( num == SDLK_PLAY ) strcpy(text, "Graj"); - if ( num == SDLK_ZOOM ) strcpy(text, "Powi�kszenie"); - if ( num == SDLK_PA1 ) strcpy(text, "PA1"); - if ( num == SDLK_OEM_CLEAR ) strcpy(text, "Wyczy��"); - if ( num == SDLK_BUTTON1 ) strcpy(text, "Przycisk 1"); - if ( num == SDLK_BUTTON2 ) strcpy(text, "Przycisk 2"); - if ( num == SDLK_BUTTON3 ) strcpy(text, "Przycisk 3"); - if ( num == SDLK_BUTTON4 ) strcpy(text, "Przycisk 4"); - if ( num == SDLK_BUTTON5 ) strcpy(text, "Przycisk 5"); - if ( num == SDLK_BUTTON6 ) strcpy(text, "Przycisk 6"); - if ( num == SDLK_BUTTON7 ) strcpy(text, "Przycisk 7"); - if ( num == SDLK_BUTTON8 ) strcpy(text, "Przycisk 8"); - if ( num == SDLK_BUTTON9 ) strcpy(text, "Przycisk 9"); - if ( num == SDLK_BUTTON10 ) strcpy(text, "Przycisk 10"); - if ( num == SDLK_BUTTON11 ) strcpy(text, "Przycisk 11"); - if ( num == SDLK_BUTTON12 ) strcpy(text, "Przycisk 12"); - if ( num == SDLK_BUTTON13 ) strcpy(text, "Przycisk 13"); - if ( num == SDLK_BUTTON14 ) strcpy(text, "Przycisk 14"); - if ( num == SDLK_BUTTON15 ) strcpy(text, "Przycisk 15"); - if ( num == SDLK_BUTTON16 ) strcpy(text, "Przycisk 16"); - if ( num == SDLK_BUTTON17 ) strcpy(text, "Przycisk 17"); - if ( num == SDLK_BUTTON18 ) strcpy(text, "Przycisk 18"); - if ( num == SDLK_BUTTON19 ) strcpy(text, "Przycisk 19"); - if ( num == SDLK_BUTTON20 ) strcpy(text, "Przycisk 20"); - if ( num == SDLK_BUTTON21 ) strcpy(text, "Przycisk 21"); - if ( num == SDLK_BUTTON22 ) strcpy(text, "Przycisk 22"); - if ( num == SDLK_BUTTON23 ) strcpy(text, "Przycisk 23"); - if ( num == SDLK_BUTTON24 ) strcpy(text, "Przycisk 24"); - if ( num == SDLK_BUTTON25 ) strcpy(text, "Przycisk 25"); - if ( num == SDLK_BUTTON26 ) strcpy(text, "Przycisk 26"); - if ( num == SDLK_BUTTON27 ) strcpy(text, "Przycisk 27"); - if ( num == SDLK_BUTTON28 ) strcpy(text, "Przycisk 28"); - if ( num == SDLK_BUTTON29 ) strcpy(text, "Przycisk 29"); - if ( num == SDLK_BUTTON30 ) strcpy(text, "Przycisk 30"); - if ( num == SDLK_BUTTON31 ) strcpy(text, "Przycisk 31"); - if ( num == SDLK_BUTTON32 ) strcpy(text, "Przycisk 32"); - if ( num == SDLK_WHEELUP ) strcpy(text, "K�ko w g�r�"); - if ( num == SDLK_WHEELDOWN ) strcpy(text, "K�ko w d�"); - } -#endif - - return ( text[0] != 0 ); -} - - diff --git a/src/common/restext.h b/src/common/restext.h index 44bc6b4c..b47e03c7 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -14,147 +14,46 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// restext.h +/** + * \file common/restext.h + * \brief Translation and string resource utilities + */ #pragma once -//#include "graphics/engine/engine.h" -#include "common/event.h" - -namespace Gfx -{ - class CEngine; -} +#include "common/global.h" +#include "common/restext_ids.h" - - -// Possible types of the text resources. - +/** + * \enum ResType + * \brief Types of text resources + */ enum ResType { - RES_TEXT = 0, // RT_* - RES_EVENT = 1, // EVENT_* (EventType) - RES_OBJECT = 2, // OBJECT_* (ObjectType) - RES_ERR = 3, // ERR_* (Error) - RES_KEY = 4, // VK_* (keys) - RES_CBOT = 5, // TX_* (cbot.dll) + RES_TEXT = 0, //! < RT_* + RES_EVENT = 1, //! < EVENT_* (EventMsg) + RES_OBJECT = 2, //! < OBJECT_* (ObjectType) + RES_ERR = 3, //! < ERR_* (Error) + RES_KEY = 4, //! < KEY() (keys) + RES_CBOT = 5, //! < TX_* (CBot) }; -// Resources of type RES_TEXT. +// TODO: move to CRobotMain -enum ResTextType -{ - RT_VERSION_ID = 1, - RT_DISINFO_TITLE = 2, - RT_WINDOW_MAXIMIZED = 3, - RT_WINDOW_MINIMIZED = 4, - RT_WINDOW_STANDARD = 5, - RT_WINDOW_CLOSE = 6, - - RT_STUDIO_TITLE = 10, - RT_SCRIPT_NEW = 20, - RT_NAME_DEFAULT = 21, - RT_IO_NEW = 22, - RT_KEY_OR = 23, - - RT_TITLE_BASE = 40, - RT_TITLE_INIT = 41, - RT_TITLE_TRAINER = 42, - RT_TITLE_DEFI = 43, - RT_TITLE_MISSION = 44, - RT_TITLE_FREE = 45, - RT_TITLE_PROTO = 46, - RT_TITLE_SETUP = 47, - RT_TITLE_NAME = 48, - RT_TITLE_PERSO = 49, - RT_TITLE_WRITE = 50, - RT_TITLE_READ = 51, - RT_TITLE_USER = 52, - RT_TITLE_TEEN = 53, - - RT_PLAY_CHAPt = 60, - RT_PLAY_CHAPd = 61, - RT_PLAY_CHAPm = 62, - RT_PLAY_CHAPf = 63, - RT_PLAY_CHAPp = 64, - RT_PLAY_LISTt = 65, - RT_PLAY_LISTd = 66, - RT_PLAY_LISTm = 67, - RT_PLAY_LISTf = 68, - RT_PLAY_LISTp = 69, - RT_PLAY_RESUME = 70, - RT_PLAY_CHAPu = 71, - RT_PLAY_LISTu = 72, - RT_PLAY_CHAPte = 73, - RT_PLAY_LISTk = 74, - - RT_SETUP_DEVICE = 80, - RT_SETUP_MODE = 81, - RT_SETUP_KEY1 = 82, - RT_SETUP_KEY2 = 83, - - RT_PERSO_FACE = 90, - RT_PERSO_GLASSES = 91, - RT_PERSO_HAIR = 92, - RT_PERSO_COMBI = 93, - RT_PERSO_BAND = 94, - - RT_DIALOG_TITLE = 100, - RT_DIALOG_ABORT = 101, - RT_DIALOG_QUIT = 102, - RT_DIALOG_YES = 103, - RT_DIALOG_NO = 104, - RT_DIALOG_DELOBJ = 105, - RT_DIALOG_DELGAME = 106, - RT_DIALOG_YESDEL = 107, - RT_DIALOG_NODEL = 108, - RT_DIALOG_LOADING = 109, - RT_DIALOG_YESQUIT = 110, - RT_DIALOG_NOQUIT = 111, - - RT_STUDIO_LISTTT = 120, - RT_STUDIO_COMPOK = 121, - RT_STUDIO_PROGSTOP = 122, - - RT_SATCOM_LIST = 140, - RT_SATCOM_BOT = 141, - RT_SATCOM_BUILDING = 142, - RT_SATCOM_FRET = 143, - RT_SATCOM_ALIEN = 144, - RT_SATCOM_NULL = 145, - RT_SATCOM_ERROR1 = 146, - RT_SATCOM_ERROR2 = 147, - - RT_IO_OPEN = 150, - RT_IO_SAVE = 151, - RT_IO_LIST = 152, - RT_IO_NAME = 153, - RT_IO_DIR = 154, - RT_IO_PRIVATE = 155, - RT_IO_PUBLIC = 156, - - RT_GENERIC_DEV1 = 170, - RT_GENERIC_DEV2 = 171, - RT_GENERIC_EDIT1 = 172, - RT_GENERIC_EDIT2 = 173, - - RT_INTERFACE_REC = 180, - - RT_MESSAGE_WIN = 200, - RT_MESSAGE_LOST = 201, -}; - - -static Gfx::CEngine* g_engine = 0; -static char g_gamerName[100]; - -extern void SetEngine(Gfx::CEngine *engine); extern void SetGlobalGamerName(char *name); extern bool SearchKey(char *cmd, KeyRank &key); -extern void PutKeyName(char* dst, char* src); extern bool GetResource(ResType type, int num, char* text); -extern bool GetResourceBase(ResType type, int num, char* text); +extern const char * const strings_text[]; +extern const char * const strings_event[]; +extern const char * const strings_object[]; +extern const char * const strings_err[]; +extern const char * const strings_cbot[]; +extern const int strings_text_len; +extern const int strings_event_len; +extern const int strings_object_len; +extern const int strings_err_len; +extern const int strings_cbot_len; diff --git a/src/common/restext_ids.h b/src/common/restext_ids.h index bee86207..4223a1ce 100644 --- a/src/common/restext_ids.h +++ b/src/common/restext_ids.h @@ -14,6 +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/. + +// TODO: move to restext.h after restext rewrite + #pragma once enum ResTextType diff --git a/src/common/restext_strings.c b/src/common/restext_strings.c index 8e9471ba..d041a280 100644 --- a/src/common/restext_strings.c +++ b/src/common/restext_strings.c @@ -22,36 +22,8 @@ const char * const strings_text[] = { -#if _FULL - [RT_VERSION_ID] = "1.18 /e", -#endif -#if _NET - [RT_VERSION_ID] = "CeeBot-A 1.18", -#endif -#if _SCHOOL & _EDU -#if _TEEN - [RT_VERSION_ID] = "CeeBot-Teen EDU 1.18", -#else - [RT_VERSION_ID] = "CeeBot-A EDU 1.18", -#endif -#endif -#if _SCHOOL & _PERSO -#if _TEEN - [RT_VERSION_ID] = "CeeBot-Teen PERSO 1.18", -#else - [RT_VERSION_ID] = "CeeBot-A PERSO 1.18", -#endif -#endif -#if _SCHOOL & _CEEBOTDEMO -#if _TEEN - [RT_VERSION_ID] = "CeeBot-Teen DEMO 1.18", -#else - [RT_VERSION_ID] = "CeeBot-A DEMO 1.18", -#endif -#endif -#if _DEMO - [RT_VERSION_ID] = "Demo 1.18 /e", -#endif + [RT_VERSION_ID] = "Colobot Gold", + [RT_DISINFO_TITLE] = "SatCom", [RT_WINDOW_MAXIMIZED] = "Maximize", [RT_WINDOW_MINIMIZED] = "Minimize", @@ -64,13 +36,8 @@ const char * const strings_text[] = [RT_IO_NEW] = "New ...", [RT_KEY_OR] = " or ", -#if _NEWLOOK - [RT_TITLE_BASE] = "CeeBot", - [RT_TITLE_INIT] = "CeeBot", -#else [RT_TITLE_BASE] = "COLOBOT", [RT_TITLE_INIT] = "COLOBOT", -#endif [RT_TITLE_TRAINER] = "Programming exercises", [RT_TITLE_DEFI] = "Challenges", [RT_TITLE_MISSION] = "Missions", @@ -111,15 +78,9 @@ const char * const strings_text[] = [RT_PERSO_COMBI] = "Suit color:", [RT_PERSO_BAND] = "Strip color:", -#if _NEWLOOK - [RT_DIALOG_QUIT] = "Do you want to quit CeeBot ?", - [RT_DIALOG_TITLE] = "CeeBot", - [RT_DIALOG_YESQUIT] = "Quit\\Quit CeeBot", -#else [RT_DIALOG_QUIT] = "Do you want to quit COLOBOT ?", [RT_DIALOG_TITLE] = "COLOBOT", [RT_DIALOG_YESQUIT] = "Quit\\Quit COLOBOT", -#endif [RT_DIALOG_ABORT] = "Quit the mission?", [RT_DIALOG_YES] = "Abort\\Abort the current mission", [RT_DIALOG_NO] = "Continue\\Continue the current mission", @@ -182,13 +143,8 @@ const char * const strings_event[] = [EVENT_INTERFACE_AGAIN] = "Restart\\Restart the mission from the beginning", [EVENT_INTERFACE_WRITE] = "Save\\Save the current mission ", [EVENT_INTERFACE_READ] = "Load\\Load a saved mission", -#if _NEWLOOK - [EVENT_INTERFACE_ABORT] = "\\Return to CeeBot", - [EVENT_INTERFACE_QUIT] = "Quit\\Quit CeeBot", -#else [EVENT_INTERFACE_ABORT] = "\\Return to COLOBOT", [EVENT_INTERFACE_QUIT] = "Quit\\Quit COLOBOT", -#endif [EVENT_INTERFACE_BACK] = "<< Back \\Back to the previous screen", [EVENT_INTERFACE_PLAY] = "Play\\Start mission!", [EVENT_INTERFACE_SETUPd] = "Device\\Driver and resolution settings", @@ -432,11 +388,7 @@ const char * const strings_event[] = [EVENT_HYPER_SIZE4] = "Size 4", [EVENT_HYPER_SIZE5] = "Size 5", [EVENT_SATCOM_HUSTON] = "Instructions from Houston", -#if _TEEN - [EVENT_SATCOM_SAT] = "Dictionnary", -#else [EVENT_SATCOM_SAT] = "Satellite report", -#endif [EVENT_SATCOM_LOADING] = "Programs dispatched by Houston", [EVENT_SATCOM_OBJECT] = "List of objects", [EVENT_SATCOM_PROG] = "Programming help", @@ -475,11 +427,7 @@ const char * const strings_object[] = [OBJECT_RESEARCH] = "Research center", [OBJECT_RADAR] = "Radar station", [OBJECT_INFO] = "Information exchange post", -#if _TEEN - [OBJECT_ENERGY] = "Disintegrator", -#else [OBJECT_ENERGY] = "Power cell factory", -#endif [OBJECT_LABO] = "Autolab", [OBJECT_NUCLEAR] = "Nuclear power station", [OBJECT_PARA] = "Lightning conductor", @@ -574,13 +522,6 @@ const char * const strings_object[] = const char * const strings_err[] = { [ERR_CMD] = "Unknown command", -#if _NEWLOOK - [ERR_INSTALL] = "CeeBot not installed.", - [ERR_NOCD] = "Please insert the CeeBot CD\nand re-run the game.", -#else - [ERR_INSTALL] = "COLOBOT not installed.", - [ERR_NOCD] = "Please insert the COLOBOT CD\nand re-run the game.", -#endif [ERR_MANIP_VEH] = "Inappropriate bot", [ERR_MANIP_FLY] = "Impossible when flying", [ERR_MANIP_BUSY] = "Already carrying something", diff --git a/src/common/singleton.h b/src/common/singleton.h index f631ed41..74075044 100644 --- a/src/common/singleton.h +++ b/src/common/singleton.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/. -// singleton.h +/** + * \file common/singleton.h + * \brief CSingleton base class for singletons + */ #pragma once diff --git a/src/common/stringutils.h b/src/common/stringutils.h index a0cae704..064351d3 100644 --- a/src/common/stringutils.h +++ b/src/common/stringutils.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/. -// stringutils.h +/** + * \file common/stringutils.h + * \brief Some useful string operations + */ #pragma once diff --git a/src/common/struct.h b/src/common/struct.h deleted file mode 100644 index 45ac3147..00000000 --- a/src/common/struct.h +++ /dev/null @@ -1,54 +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/. - -// struct.h - -#pragma once - - -#include - - -#define D3DFVF_VERTEX2 (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX2) - -struct D3DVERTEX2 -{ - float x,y,z; - float nx,ny,nz; - float tu, tv; - float tu2, tv2; - - D3DVERTEX2() { } - D3DVERTEX2(const Math::Vector& _v, const Math::Vector& _n, float _tu=0.0f, float _tv=0.0f, float _tu2=0.0f, float _tv2=0.0f) - { - x = _v.x; - y = _v.y; - z = _v.z; - nx = _n.x; - ny = _n.y; - nz = _n.z; - tu = _tu; - tv = _tv; - tu2 = _tu2; - tv2 = _tv2; - } -}; - - -struct ColorHSV -{ - float h,s,v; -}; \ No newline at end of file diff --git a/src/common/test/CMakeLists.txt b/src/common/test/CMakeLists.txt index d81acab0..a1a7a50d 100644 --- a/src/common/test/CMakeLists.txt +++ b/src/common/test/CMakeLists.txt @@ -7,6 +7,8 @@ include_directories("../../") include_directories("../../../") add_executable(image_test ../image.cpp image_test.cpp) +target_link_libraries(image_test -lpng -lSDL -lSDL_image) + add_executable(profile_test ../profile.cpp profile_test.cpp) add_test(profile_test ./profile_test) diff --git a/src/common/test/image_test.cpp b/src/common/test/image_test.cpp index 0ad1ee2b..a98c9cca 100644 --- a/src/common/test/image_test.cpp +++ b/src/common/test/image_test.cpp @@ -22,6 +22,29 @@ int main(int argc, char *argv[]) printf("Error loading '%s': %s\n", err.c_str()); return 1; } + Gfx::Color color; + std::string str; + + color = image.GetPixel(Math::IntPoint(0, 0)); + str = color.ToString(); + printf("pixel @ (0,0): %s\n", str.c_str()); + + color = image.GetPixel(Math::IntPoint(0, 1)); + str = color.ToString(); + printf("pixel @ (0,1): %s\n", str.c_str()); + + color = image.GetPixel(Math::IntPoint(1, 0)); + str = color.ToString(); + printf("pixel @ (1,0): %s\n", str.c_str()); + + color = image.GetPixel(Math::IntPoint(1, 1)); + str = color.ToString(); + printf("pixel @ (1,1): %s\n", str.c_str()); + + image.SetPixel(Math::IntPoint(0, 0), Gfx::Color(0.1f, 0.2f, 0.3f, 0.0f)); + image.SetPixel(Math::IntPoint(1, 0), Gfx::Color(0.3f, 0.2f, 0.1f, 1.0f)); + image.SetPixel(Math::IntPoint(0, 1), Gfx::Color(1.0f, 1.0f, 1.0f, 1.0f)); + image.SetPixel(Math::IntPoint(1, 1), Gfx::Color(0.0f, 0.0f, 0.0f, 1.0f)); if (! image.SavePNG(argv[2])) { diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 068687a1..d368aa63 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -357,22 +357,22 @@ bool Gfx::CEngine::ProcessEvent(const Event &event) } } } - else if (event.type == EVENT_FRAME) - { - m_highlightTime += event.rTime; - } // By default, pass on all events return true; } -void Gfx::CEngine::FrameMove(float rTime) +void Gfx::CEngine::FrameUpdate() { + float rTime = m_app->GetRelTime(); + m_lightMan->UpdateProgression(rTime); m_particle->FrameParticle(rTime); ComputeDistance(); UpdateGeometry(); + m_highlightTime = m_app->GetAbsTime(); + if (m_groundMark.draw) { if (m_groundMark.phase == Gfx::ENG_GR_MARK_PHASE_INC) // growing? @@ -402,16 +402,6 @@ void Gfx::CEngine::FrameMove(float rTime) } } } - - if (m_sound == nullptr) - m_sound = static_cast( m_iMan->SearchInstance(CLASS_SOUND) ); - - m_sound->FrameMove(rTime); -} - -void Gfx::CEngine::StepSimulation(float rTime) -{ - m_app->StepSimulation(rTime); } bool Gfx::CEngine::WriteScreenShot(const std::string& fileName, int width, int height) @@ -2726,16 +2716,6 @@ int Gfx::CEngine::GetEditIndentValue() return m_editIndentValue; } -void Gfx::CEngine::SetSpeed(float speed) -{ - m_speed = speed; -} - -float Gfx::CEngine::GetSpeed() -{ - return m_speed; -} - void Gfx::CEngine::SetTracePrecision(float factor) { m_tracePrecision = factor; diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 705c83a9..1ce93a3f 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -664,9 +664,7 @@ public: bool ProcessEvent(const Event& event); //! Called once per frame, the call is the entry point for animating the scene - void FrameMove(float rTime); - //! Evolved throughout the game - void StepSimulation(float rTime); + void FrameUpdate(); //! Writes a screenshot containing the current frame @@ -1098,11 +1096,6 @@ public: int GetEditIndentValue(); //@} - //@{ - //! Management of game speed - void SetSpeed(float speed); - float GetSpeed(); - //@{ //! Management of precision of robot tracks void SetTracePrecision(float factor); diff --git a/src/graphics/engine/lightning.h b/src/graphics/engine/lightning.h index e34eb3b9..af389f20 100644 --- a/src/graphics/engine/lightning.h +++ b/src/graphics/engine/lightning.h @@ -22,7 +22,7 @@ #pragma once -#include "common/misc.h" +#include "common/event.h" #include "math/vector.h" diff --git a/src/graphics/engine/pyro.h b/src/graphics/engine/pyro.h index 5d2ca639..c0c01449 100644 --- a/src/graphics/engine/pyro.h +++ b/src/graphics/engine/pyro.h @@ -22,7 +22,8 @@ #pragma once -#include "common/misc.h" +#include "common/event.h" +#include "common/global.h" #include "graphics/engine/engine.h" #include "object/object.h" diff --git a/src/math/all.h b/src/math/all.h index 4ac9d554..0d067d37 100644 --- a/src/math/all.h +++ b/src/math/all.h @@ -27,5 +27,3 @@ #include "vector.h" #include "matrix.h" #include "geometry.h" - -#include "conv.h" diff --git a/src/math/const.h b/src/math/const.h index 0b6f971e..3f85feeb 100644 --- a/src/math/const.h +++ b/src/math/const.h @@ -51,4 +51,3 @@ const float RAD_TO_DEG = 57.29577951308232286465f; const float LOG_2 = log(2.0f); }; // namespace Math - diff --git a/src/math/conv.h b/src/math/conv.h deleted file mode 100644 index 43e6fbd9..00000000 --- a/src/math/conv.h +++ /dev/null @@ -1,39 +0,0 @@ -/* math/conv.h - - Temporary conversion functions for D3DVECTOR and D3DMATRIX */ - -#pragma once - -#include - -#include "vector.h" -#include "matrix.h" - -inline D3DVECTOR VEC_TO_D3DVEC(Math::Vector vec) -{ - return D3DVECTOR(vec.x, vec.y, vec.z); -} - -inline Math::Vector D3DVEC_TO_VEC(D3DVECTOR vec) -{ - return Math::Vector(vec.x, vec.y, vec.z); -} - -inline D3DMATRIX MAT_TO_D3DMAT(Math::Matrix mat) -{ - D3DMATRIX result; - mat.Transpose(); - for (int r = 0; r < 4; ++r) - { - for (int c = 0; c < 16; ++c) - result.m[r][c] = mat.m[4*c+r]; - } - return result; -} - -inline Math::Matrix D3DMAT_TO_MAT(D3DMATRIX mat) -{ - Math::Matrix result(mat.m); - result.Transpose(); - return result; -} diff --git a/src/math/geometry.h b/src/math/geometry.h index 1c5f60fc..55bc745d 100644 --- a/src/math/geometry.h +++ b/src/math/geometry.h @@ -76,9 +76,11 @@ inline bool IsInsideTriangle(Math::Point a, Math::Point b, Math::Point c, Math:: } //! Rotates a point around a center -/** \a center center of rotation - \a angle angle is in radians (positive is counterclockwise (CCW) ) - \a p the point */ +/** + * \param center center of rotation + * \param angle angle [radians] (positive is CCW) + * \param p the point to be rotated + */ inline Math::Point RotatePoint(const Math::Point ¢er, float angle, const Math::Point &p) { Math::Point a; @@ -96,8 +98,10 @@ inline Math::Point RotatePoint(const Math::Point ¢er, float angle, const Mat } //! Rotates a point around the origin (0,0) -/** \a angle angle in radians (positive is counterclockwise (CCW) ) - \a p the point */ +/** + * \param angle angle [radians] (positive is CCW) + * \param p the point to be rotated + */ inline Math::Point RotatePoint(float angle, const Math::Point &p) { float x = p.x*cosf(angle) - p.y*sinf(angle); @@ -106,9 +110,11 @@ inline Math::Point RotatePoint(float angle, const Math::Point &p) return Math::Point(x, y); } -//! Rotates a vector (dist, 0). -/** \a angle angle is in radians (positive is counterclockwise (CCW) ) - \a dist distance to origin */ +//! Rotates a vector (dist, 0) +/** + * \param angle angle [radians] (positive is CCW) + * \param dist distance to origin + */ inline Math::Point RotatePoint(float angle, float dist) { float x = dist*cosf(angle); @@ -117,7 +123,12 @@ inline Math::Point RotatePoint(float angle, float dist) return Math::Point(x, y); } -//! TODO documentation +//! Rotates a point around a center on 2D plane +/** + * \param cx,cy center of rotation + * \param angle angle of rotation [radians] (positive is CCW) + * \param px,py point coordinates to rotate + */ inline void RotatePoint(float cx, float cy, float angle, float &px, float &py) { float ax, ay; @@ -132,11 +143,14 @@ inline void RotatePoint(float cx, float cy, float angle, float &px, float &py) py = cy+ay; } -//! Rotates a point around a center in space. -/** \a center center of rotation - \a angleH,angleV rotation angles in radians (positive is counterclockwise (CCW) ) ) - \a p the point - \returns the rotated point */ +//! Rotates a point around a center in space +/** + * \a angleH is rotation along Y axis (heading) while \a angleV is rotation along X axis (TODO: ?). + * + * \param center center of rotation + * \param angleH,angleV rotation angles [radians] (positive is CCW) + * \param p the point to be rotated + */ inline void RotatePoint(const Math::Vector ¢er, float angleH, float angleV, Math::Vector &p) { p.x -= center.x; @@ -151,11 +165,14 @@ inline void RotatePoint(const Math::Vector ¢er, float angleH, float angleV, p = center + b; } -//! Rotates a point around a center in space. -/** \a center center of rotation - \a angleH,angleV rotation angles in radians (positive is counterclockwise (CCW) ) ) - \a p the point - \returns the rotated point */ +//! Rotates a point around a center in space +/** + * The rotation is performed first along Y axis (\a angleH) and then along X axis (\a angleV). + * + * \param center center of rotation + * \param angleH,angleV rotation angles [radians] (positive is CCW) + * \param p the point to be rotated + */ inline void RotatePoint2(const Math::Vector center, float angleH, float angleV, Math::Vector &p) { p.x -= center.x; @@ -189,10 +206,12 @@ inline float RotateAngle(float x, float y) return -atan + 0.5f*PI; } -//! Calculates the angle between two points and one center -/** \a center the center point - \a p1,p2 the two points - \returns The angle in radians (positive is counterclockwise (CCW) ) */ +//! Calculates the angle between two points and a center +/** + * \param center the center point + * \param p1,p2 the two points + * \returns the angle [radians] (positive is CCW) + */ inline float RotateAngle(const Math::Point ¢er, const Math::Point &p1, const Math::Point &p2) { if (PointsEqual(p1, center)) @@ -215,9 +234,11 @@ inline float RotateAngle(const Math::Point ¢er, const Math::Point &p1, const } //! Loads view matrix from the given vectors -/** \a from origin - \a at view direction - \a worldUp up vector */ +/** + * \param from origin + * \param at view direction + * \param worldUp up vector + */ inline void LoadViewMatrix(Math::Matrix &mat, const Math::Vector &from, const Math::Vector &at, const Math::Vector &worldUp) { @@ -280,10 +301,12 @@ inline void LoadViewMatrix(Math::Matrix &mat, const Math::Vector &from, } //! Loads a perspective projection matrix -/** \a fov field of view in radians - \a aspect aspect ratio (width / height) - \a nearPlane distance to near cut plane - \a farPlane distance to far cut plane */ +/** + * \param fov field of view in radians + * \param aspect aspect ratio (width / height) + * \param nearPlane distance to near cut plane + * \param farPlane distance to far cut plane + */ inline void LoadProjectionMatrix(Math::Matrix &mat, float fov = Math::PI / 2.0f, float aspect = 1.0f, float nearPlane = 1.0f, float farPlane = 1000.0f) { @@ -302,9 +325,11 @@ inline void LoadProjectionMatrix(Math::Matrix &mat, float fov = Math::PI / 2.0f, } //! Loads an othogonal projection matrix -/** \a left,right coordinates for left and right vertical clipping planes - \a bottom,top coordinates for bottom and top horizontal clipping planes - \a zNear,zFar distance to nearer and farther depth clipping planes */ +/** + * \param left,right coordinates for left and right vertical clipping planes + * \param bottom,top coordinates for bottom and top horizontal clipping planes + * \param zNear,zFar distance to nearer and farther depth clipping planes + */ inline void LoadOrthoProjectionMatrix(Math::Matrix &mat, float left, float right, float bottom, float top, float zNear = -1.0f, float zFar = 1.0f) { @@ -320,7 +345,10 @@ inline void LoadOrthoProjectionMatrix(Math::Matrix &mat, float left, float right } //! Loads a translation matrix from given vector -/** \a trans vector of translation*/ +/** + * \param mat result matrix + * \param trans vector of translation + */ inline void LoadTranslationMatrix(Math::Matrix &mat, const Math::Vector &trans) { mat.LoadIdentity(); @@ -330,7 +358,10 @@ inline void LoadTranslationMatrix(Math::Matrix &mat, const Math::Vector &trans) } //! Loads a scaling matrix fom given vector -/** \a scale vector with scaling factors for X, Y, Z */ +/** + * \param mat result matrix + * \param scale vector with scaling factors for X, Y, Z + */ inline void LoadScaleMatrix(Math::Matrix &mat, const Math::Vector &scale) { mat.LoadIdentity(); @@ -340,7 +371,10 @@ inline void LoadScaleMatrix(Math::Matrix &mat, const Math::Vector &scale) } //! Loads a rotation matrix along the X axis -/** \a angle angle in radians */ +/** + * \param mat result matrix + * \param angle angle [radians] + */ inline void LoadRotationXMatrix(Math::Matrix &mat, float angle) { mat.LoadIdentity(); @@ -351,7 +385,10 @@ inline void LoadRotationXMatrix(Math::Matrix &mat, float angle) } //! Loads a rotation matrix along the Y axis -/** \a angle angle in radians */ +/** + * \param mat result matrix + * \param angle angle [radians] + */ inline void LoadRotationYMatrix(Math::Matrix &mat, float angle) { mat.LoadIdentity(); @@ -362,7 +399,10 @@ inline void LoadRotationYMatrix(Math::Matrix &mat, float angle) } //! Loads a rotation matrix along the Z axis -/** \a angle angle in radians */ +/** + * \param mat result matrix + * \param angle angle [radians] + */ inline void LoadRotationZMatrix(Math::Matrix &mat, float angle) { mat.LoadIdentity(); @@ -373,8 +413,11 @@ inline void LoadRotationZMatrix(Math::Matrix &mat, float angle) } //! Loads a rotation matrix along the given axis -/** \a dir axis of rotation - \a angle angle in radians */ +/** + * \param mat result matrix + * \param dir axis of rotation + * \param angle angle [radians] + */ inline void LoadRotationMatrix(Math::Matrix &mat, const Math::Vector &dir, float angle) { float cos = cosf(angle); @@ -397,28 +440,28 @@ inline void LoadRotationMatrix(Math::Matrix &mat, const Math::Vector &dir, float } //! Calculates the matrix to make three rotations in the order X, Z and Y -inline void LoadRotationXZYMatrix(Math::Matrix &mat, const Math::Vector &angle) +inline void LoadRotationXZYMatrix(Math::Matrix &mat, const Math::Vector &angles) { Math::Matrix temp; - LoadRotationXMatrix(temp, angle.x); + LoadRotationXMatrix(temp, angles.x); - LoadRotationZMatrix(mat, angle.z); + LoadRotationZMatrix(mat, angles.z); mat = Math::MultiplyMatrices(temp, mat); - LoadRotationYMatrix(temp, angle.y); + LoadRotationYMatrix(temp, angles.y); mat = Math::MultiplyMatrices(temp, mat); } //! Calculates the matrix to make three rotations in the order Z, X and Y -inline void LoadRotationZXYMatrix(Math::Matrix &mat, const Math::Vector &angle) +inline void LoadRotationZXYMatrix(Math::Matrix &mat, const Math::Vector &angles) { Math::Matrix temp; - LoadRotationZMatrix(temp, angle.z); + LoadRotationZMatrix(temp, angles.z); - LoadRotationXMatrix(mat, angle.x); + LoadRotationXMatrix(mat, angles.x); mat = Math::MultiplyMatrices(temp, mat); - LoadRotationYMatrix(temp, angle.y); + LoadRotationYMatrix(temp, angles.y); mat = Math::MultiplyMatrices(temp, mat); } @@ -430,7 +473,9 @@ inline float DistanceProjected(const Math::Vector &a, const Math::Vector &b) } //! Returns the normal vector to a plane -/** \param p1,p2,p3 points defining the plane */ +/** + * \param p1,p2,p3 points defining the plane + */ inline Math::Vector NormalToPlane(const Math::Vector &p1, const Math::Vector &p2, const Math::Vector &p3) { Math::Vector u = p3 - p1; @@ -440,16 +485,20 @@ inline Math::Vector NormalToPlane(const Math::Vector &p1, const Math::Vector &p2 } //! Returns a point on the line \a p1 - \a p2, in \a dist distance from \a p1 -/** \a p1,p2 line start and end - \a dist scaling factor from \a p1, relative to distance between \a p1 and \a p2 */ +/** + * \param p1,p2 line start and end + * \param dist scaling factor from \a p1, relative to distance between \a p1 and \a p2 + */ inline Math::Vector SegmentPoint(const Math::Vector &p1, const Math::Vector &p2, float dist) { return p1 + (p2 - p1) * dist; } //! Returns the distance between given point and a plane -/** \param p the point - \param a,b,c points defining the plane */ +/** + * \param p the point + * \param a,b,c points defining the plane + */ inline float DistanceToPlane(const Math::Vector &a, const Math::Vector &b, const Math::Vector &c, const Math::Vector &p) { @@ -460,8 +509,10 @@ inline float DistanceToPlane(const Math::Vector &a, const Math::Vector &b, } //! Checks if two planes defined by three points are the same -/** \a plane1 array of three vectors defining the first plane - \a plane2 array of three vectors defining the second plane */ +/** + * \param plane1 array of three vectors defining the first plane + * \param plane2 array of three vectors defining the second plane + */ inline bool IsSamePlane(const Math::Vector (&plane1)[3], const Math::Vector (&plane2)[3]) { Math::Vector n1 = NormalToPlane(plane1[0], plane1[1], plane1[2]); @@ -479,7 +530,7 @@ inline bool IsSamePlane(const Math::Vector (&plane1)[3], const Math::Vector (&pl return true; } -//! Calculates the intersection "i" right "of" the plane "abc". +//! Calculates the intersection "i" right "of" the plane "abc" (TODO: ?) inline bool Intersect(const Math::Vector &a, const Math::Vector &b, const Math::Vector &c, const Math::Vector &d, const Math::Vector &e, Math::Vector &i) { @@ -502,7 +553,7 @@ inline bool Intersect(const Math::Vector &a, const Math::Vector &b, const Math:: } //! Calculates the intersection of the straight line passing through p (x, z) -/** Line is parallel to the y axis, with the plane abc. Returns p.y. */ +/** Line is parallel to the y axis, with the plane abc. Returns p.y. (TODO: ?) */ inline bool IntersectY(const Math::Vector &a, const Math::Vector &b, const Math::Vector &c, Math::Vector &p) { float d = (b.x-a.x)*(c.z-a.z) - (c.x-a.x)*(b.z-a.z); @@ -528,15 +579,18 @@ inline Math::Vector LookatPoint(const Math::Vector &eye, float angleH, float ang return lookat; } -//! TODO documentation +//! Transforms the point \a p by matrix \a m +/** Is equal to multiplying the matrix by the vector (of course without perspective divide). */ inline Math::Vector Transform(const Math::Matrix &m, const Math::Vector &p) { return MatrixVectorMultiply(m, p); } -//! Calculates the projection of the point \a p on a straight line \a a to \a b. -/** \a p point to project - \a a,b two ends of the line */ +//! Calculates the projection of the point \a p on a straight line \a a to \a b +/** + * \param point to project + * \param a,b two ends of the line + */ inline Math::Vector Projection(const Math::Vector &a, const Math::Vector &b, const Math::Vector &p) { float k = DotProduct(b - a, p - a); diff --git a/src/math/matrix.h b/src/math/matrix.h index 30e629a9..30f790cb 100644 --- a/src/math/matrix.h +++ b/src/math/matrix.h @@ -33,13 +33,14 @@ namespace Math { -/** \struct Matrix math/matrix.h - \brief 4x4 matrix - - Represents an universal 4x4 matrix that can be used in OpenGL and DirectX engines. - Contains the required methods for operating on matrices (inverting, multiplying, etc.). - - The internal representation is a 16-value table in column-major order, thus: +/** + * \struct Matrix math/matrix.h + * \brief 4x4 matrix + * + * Represents an universal 4x4 matrix that can be used in OpenGL and DirectX engines. + * Contains the required methods for operating on matrices (inverting, multiplying, etc.). + * + * The internal representation is a 16-value table in column-major order, thus: \verbatim m[0 ] m[4 ] m[8 ] m[12] @@ -48,16 +49,16 @@ m[2 ] m[6 ] m[10] m[14] m[3 ] m[7 ] m[11] m[15] \endverbatim - This representation is native to OpenGL; DirectX requires transposing the matrix. - - The order of multiplication of matrix and vector is also OpenGL-native - (see the function MatrixVectorMultiply). - - All methods are made inline to maximize optimization. - - Unit tests for the structure and related functions are in module: math/test/matrix_test.cpp. - - **/ + * This representation is native to OpenGL; DirectX requires transposing the matrix. + * + * The order of multiplication of matrix and vector is also OpenGL-native + * (see the function MatrixVectorMultiply). + * + * All methods are made inline to maximize optimization. + * + * Unit tests for the structure and related functions are in module: math/test/matrix_test.cpp. + * + */ struct Matrix { //! Matrix values in column-major order @@ -78,8 +79,10 @@ struct Matrix } //! Creates the matrix from 2D array - /** The array's first index is row, second is column. - \a m array with values */ + /** + * The array's first index is row, second is column. + * \param m array with values + */ inline explicit Matrix(const float (&m)[4][4]) { for (int c = 0; c < 4; ++c) @@ -91,11 +94,23 @@ struct Matrix } } + //! Sets value in given row and col + /** + * \param row row (0 to 3) + * \param col column (0 to 3) + * \param value value + */ inline void Set(int row, int col, float value) { m[(col-1)*4+(row-1)] = value; } + //! Returns the value in given row and col + /** + * \param row row (0 to 3) + * \param col column (0 to 3) + * \returns value + */ inline float Get(int row, int col) { return m[(col-1)*4+(row-1)]; @@ -148,9 +163,11 @@ struct Matrix } //! Calculates the cofactor of the matrix - /** \a r row (0 to 3) - \a c column (0 to 3) - \returns the cofactor */ + /** + * \param r row (0 to 3) + * \param c column (0 to 3) + * \returns the cofactor + */ inline float Cofactor(int r, int c) const { assert(r >= 0 && r <= 3); @@ -330,8 +347,10 @@ struct Matrix } //! Calculates the inverse matrix - /** The determinant of the matrix must not be zero. - \returns the inverted matrix */ + /** + * The determinant of the matrix must not be zero. + * \returns the inverted matrix + */ inline Matrix Inverse() const { float d = Det(); @@ -352,8 +371,10 @@ struct Matrix } //! Calculates the multiplication of this matrix * given matrix - /** \a right right-hand matrix - \returns multiplication result */ + /** + * \param right right-hand matrix + * \returns multiplication result + */ inline Matrix Multiply(const Matrix &right) const { float result[16] = { 0.0f }; diff --git a/src/math/point.h b/src/math/point.h index ecf896fc..1093c549 100644 --- a/src/math/point.h +++ b/src/math/point.h @@ -32,14 +32,14 @@ namespace Math { -/** \struct Point math/point.h - \brief 2D point - - Represents a 2D point (x, y). - Contains the required methods for operating on points. - - All methods are made inline to maximize optimization. - +/** + * \struct Point + * \brief 2D point + * + * Represents a 2D point (x, y). + * Contains the required methods for operating on points. + * + * All methods are made inline to maximize optimization. */ struct Point { diff --git a/src/math/test/CMakeLists.txt b/src/math/test/CMakeLists.txt index c7360221..87121a0b 100644 --- a/src/math/test/CMakeLists.txt +++ b/src/math/test/CMakeLists.txt @@ -1,33 +1,23 @@ cmake_minimum_required(VERSION 2.8) set(CMAKE_BUILD_TYPE debug) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -O0") +set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wold-style-cast -std=gnu++0x") -add_executable(matrix_test matrix_test.cpp) -add_executable(vector_test vector_test.cpp) -add_executable(geometry_test geometry_test.cpp ../old/math3d.cpp ../old/d3dmath.cpp ../../graphics/d3d/d3dutil.cpp) - -enable_testing() - -add_test(matrix_test ./matrix_test) -add_test(vector_test ./vector_test) -add_test(geometry_test ./geometry_test) - -# Change to DirectX SDK directory -include_directories("c:/dxsdk/include") - -add_definitions(-DSTRICT -DD3D_OVERLOADS) - -# 'make check' will compile the required test programs -# Note that 'make test' will still fail without compiled programs -add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS matrix_test vector_test) - -# Files to be removed in distclean -set(REMOVE_FILES - CMakeFiles Testing cmake_install.cmake CMakeCache.txt CTestTestfile.cmake Makefile - ./matrix_test - ./vector_test - ./geometry_test +include_directories( +. +../../.. +${GTEST_DIR}/include ) -add_custom_target(distclean COMMAND rm -rf ${REMOVE_FILES}) +add_executable(matrix_test matrix_test.cpp) +target_link_libraries(matrix_test gtest) + +add_executable(vector_test vector_test.cpp) +target_link_libraries(vector_test gtest) + +add_executable(geometry_test geometry_test.cpp) +target_link_libraries(geometry_test gtest) + +add_test(matrix_test matrix_test) +add_test(vector_test vector_test) +add_test(geometry_test geometry_test) diff --git a/src/math/test/geometry_test.cpp b/src/math/test/geometry_test.cpp index 07fa2cfd..8b83b8d7 100644 --- a/src/math/test/geometry_test.cpp +++ b/src/math/test/geometry_test.cpp @@ -20,53 +20,41 @@ #include "../func.h" #include "../geometry.h" -#include "../conv.h" -#include "../../old/math3d.h" -#include "../../old/d3dutil.h" -#include -#include +#include "gtest/gtest.h" -using namespace std; const float TEST_TOLERANCE = 1e-5; // Test for rewritten function RotateAngle() -int TestRotateAngle() +TEST(GeometryTest, RotateAngleTest) { - if (! Math::IsEqual(Math::RotateAngle(0.0f, 0.0f), 0.0f, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(0.0f, 0.0f), 0.0f, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(1.0f, 0.0f), 0.0f, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(1.0f, 0.0f), 0.0f, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(1.0f, 1.0f), 0.25f * Math::PI, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(1.0f, 1.0f), 0.25f * Math::PI, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(0.0f, 2.0f), 0.5f * Math::PI, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(0.0f, 2.0f), 0.5f * Math::PI, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(-0.5f, 0.5f), 0.75f * Math::PI, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(-0.5f, 0.5f), 0.75f * Math::PI, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(-1.0f, 0.0f), Math::PI, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(-1.0f, 0.0f), Math::PI, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(-1.0f, -1.0f), 1.25f * Math::PI, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(-1.0f, -1.0f), 1.25f * Math::PI, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(0.0f, -2.0f), 1.5f * Math::PI, TEST_TOLERANCE)) - return __LINE__; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(0.0f, -2.0f), 1.5f * Math::PI, TEST_TOLERANCE)); - if (! Math::IsEqual(Math::RotateAngle(1.0f, -1.0f), 1.75f * Math::PI, TEST_TOLERANCE)) - return __LINE__; - - return 0; + EXPECT_TRUE(Math::IsEqual(Math::RotateAngle(1.0f, -1.0f), 1.75f * Math::PI, TEST_TOLERANCE)); } // Tests for other altered, complex or uncertain functions +/* + + TODO: write meaningful tests with proper test values + int TestAngle() { const Math::Vector u(-0.0786076246943884, 0.2231249091714256, -1.1601361718477805); @@ -360,42 +348,12 @@ int TestTransform() return 0; } -int main() +*/ + + +int main(int argc, char* argv[]) { - // Functions to test - int (*TESTS[])() = - { - TestRotateAngle, - TestAngle, - TestRotateView, - TestLookatPoint, - TestProjection, - TestLoadViewMatrix, - TestLoadProjectionMatrix, - TestLoadTranslationMatrix, - TestLoadScaleMatrix, - TestLoadRotationXMatrix, - TestLoadRotationYMatrix, - TestLoadRotationZMatrix, - TestLoadRotationMatrix, - TestLoadRotationXZYMatrix, - TestLoadRotationZXYMatrix, - TestTransform - }; - const int TESTS_SIZE = sizeof(TESTS) / sizeof(*TESTS); + ::testing::InitGoogleTest(&argc, argv); - int result = 0; - for (int i = 0; i < TESTS_SIZE; ++i) - { - result = TESTS[i](); - if (result != 0) - { - fprintf(stderr, "Test function %d failed at line %d\n", i+1, result); - return result; - } - } - - fprintf(stderr, "All tests successful\n"); - - return 0; + return RUN_ALL_TESTS(); } diff --git a/src/math/test/matrix_test.cpp b/src/math/test/matrix_test.cpp index 663234c0..867e0ec1 100644 --- a/src/math/test/matrix_test.cpp +++ b/src/math/test/matrix_test.cpp @@ -26,13 +26,13 @@ #include "../func.h" #include "../matrix.h" -#include +#include "gtest/gtest.h" -using namespace std; const float TEST_TOLERANCE = 1e-6; -int TestTranspose() + +TEST(MatrixTest, TransposeTest) { const Math::Matrix mat( (float[4][4]) @@ -56,16 +56,10 @@ int TestTranspose() Math::Matrix transpose = Math::Transpose(mat); - if (! Math::MatricesEqual(transpose, expectedTranspose, TEST_TOLERANCE)) - { - fprintf(stderr, "Transpose mismatch!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::MatricesEqual(transpose, expectedTranspose, TEST_TOLERANCE)); } -int TestCofactor() +TEST(MatrixTest, CofactorTest) { const Math::Matrix mat1( (float[4][4]) @@ -93,12 +87,7 @@ int TestCofactor() { float ret = mat1.Cofactor(r, c); float exp = expectedCofactors1.m[4*c+r]; - if (! Math::IsEqual(ret, exp, TEST_TOLERANCE)) - { - fprintf(stderr, "Cofactors 1 mismatch!\n"); - fprintf(stderr, "r=%d, c=%d, %f (returned) != %f (expected)\n", r, c, ret, exp); - return __LINE__; - } + EXPECT_TRUE(Math::IsEqual(ret, exp, TEST_TOLERANCE)); } } @@ -129,19 +118,12 @@ int TestCofactor() { float ret = mat2.Cofactor(r, c); float exp = expectedCofactors2.m[4*c+r]; - if (! Math::IsEqual(ret, exp, TEST_TOLERANCE)) - { - fprintf(stderr, "Cofactors 2 mismatch!\n"); - fprintf(stderr, "r=%d, c=%d, %f (returned) != %f (expected)\n", r, c, ret, exp); - return __LINE__; - } + EXPECT_TRUE(Math::IsEqual(ret, exp, TEST_TOLERANCE)); } } - - return 0; } -int TestDet() +TEST(MatrixTest, DetTest) { const Math::Matrix mat1( (float[4][4]) @@ -156,12 +138,7 @@ int TestDet() const float expectedDet1 = 4.07415413729671; float ret1 = mat1.Det(); - if (! Math::IsEqual(ret1, expectedDet1, TEST_TOLERANCE)) - { - fprintf(stderr, "Det mismatch!\n"); - fprintf(stderr, "%f (returned) != %f (expected)\n", ret1, expectedDet1); - return __LINE__; - } + EXPECT_TRUE(Math::IsEqual(ret1, expectedDet1, TEST_TOLERANCE)); const Math::Matrix mat2( (float[4][4]) @@ -176,17 +153,10 @@ int TestDet() const float expectedDet2 = -6.35122307880942; float ret2 = mat2.Det(); - if (! Math::IsEqual(ret2, expectedDet2, TEST_TOLERANCE)) - { - fprintf(stderr, "Det mismatch!\n"); - fprintf(stderr, "%f (returned) != %f (expected)\n", ret2, expectedDet2); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::IsEqual(ret2, expectedDet2, TEST_TOLERANCE)); } -int TestInverse() +TEST(MatrixTest, InverseTest) { const Math::Matrix mat1( (float[4][4]) @@ -210,11 +180,7 @@ int TestInverse() Math::Matrix inverse1 = mat1.Inverse(); - if (! Math::MatricesEqual(inverse1, expectedInverse1, TEST_TOLERANCE)) - { - fprintf(stderr, "Inverse 1 mismatch!\n"); - return __LINE__; - } + EXPECT_TRUE(Math::MatricesEqual(inverse1, expectedInverse1, TEST_TOLERANCE)); const Math::Matrix mat2( (float[4][4]) @@ -238,16 +204,10 @@ int TestInverse() Math::Matrix inverse2 = mat2.Inverse(); - if (! Math::MatricesEqual(inverse2, expectedInverse2, TEST_TOLERANCE)) - { - fprintf(stderr, "Inverse 2 mismatch!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::MatricesEqual(inverse2, expectedInverse2, TEST_TOLERANCE)); } -int TestMultiply() +TEST(MatrixTest, MultiplyTest) { const Math::Matrix mat1A( (float[4][4]) @@ -280,11 +240,7 @@ int TestMultiply() ); Math::Matrix multiply1 = Math::MultiplyMatrices(mat1A, mat1B); - if (! Math::MatricesEqual(multiply1, expectedMultiply1, TEST_TOLERANCE ) ) - { - fprintf(stderr, "Multiply 1 mismath!\n"); - return __LINE__; - } + EXPECT_TRUE(Math::MatricesEqual(multiply1, expectedMultiply1, TEST_TOLERANCE)); const Math::Matrix mat2A( (float[4][4]) @@ -317,16 +273,10 @@ int TestMultiply() ); Math::Matrix multiply2 = Math::MultiplyMatrices(mat2A, mat2B); - if (! Math::MatricesEqual(multiply2, expectedMultiply2, TEST_TOLERANCE ) ) - { - fprintf(stderr, "Multiply 2 mismath!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::MatricesEqual(multiply2, expectedMultiply2, TEST_TOLERANCE)); } -int TestMultiplyVector() +TEST(MatrixTest, MultiplyVectorTest) { const Math::Matrix mat1( (float[4][4]) @@ -343,11 +293,7 @@ int TestMultiplyVector() const Math::Vector expectedMultiply1(0.608932463260470, -1.356893266403749, 3.457156276255142); Math::Vector multiply1 = Math::MatrixVectorMultiply(mat1, vec1, false); - if (! Math::VectorsEqual(multiply1, expectedMultiply1, TEST_TOLERANCE ) ) - { - fprintf(stderr, "Multiply vector 1 mismath!\n"); - return __LINE__; - } + EXPECT_TRUE(Math::VectorsEqual(multiply1, expectedMultiply1, TEST_TOLERANCE)); const Math::Matrix mat2( (float[4][4]) @@ -364,39 +310,13 @@ int TestMultiplyVector() const Math::Vector expectedMultiply2(0.2816820577317669, 0.0334468811767428, 0.1996974284970455); Math::Vector multiply2 = Math::MatrixVectorMultiply(mat2, vec2, true); - if (! Math::VectorsEqual(multiply2, expectedMultiply2, TEST_TOLERANCE ) ) - { - fprintf(stderr, "Multiply vector 2 mismath!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::VectorsEqual(multiply2, expectedMultiply2, TEST_TOLERANCE)); } -int main() +int main(int argc, char* argv[]) { - // Functions to test - int (*TESTS[])() = - { - TestTranspose, - TestCofactor, - TestDet, - TestInverse, - TestMultiply, - TestMultiplyVector - }; - const int TESTS_SIZE = sizeof(TESTS) / sizeof(*TESTS); + ::testing::InitGoogleTest(&argc, argv); - int result = 0; - for (int i = 0; i < TESTS_SIZE; ++i) - { - result = TESTS[i](); - if (result != 0) - return result; - } - - fprintf(stderr, "All tests successful\n"); - - return 0; + return RUN_ALL_TESTS(); } diff --git a/src/math/test/vector_test.cpp b/src/math/test/vector_test.cpp index 899a5806..ead2fd22 100644 --- a/src/math/test/vector_test.cpp +++ b/src/math/test/vector_test.cpp @@ -26,59 +26,41 @@ #include "../func.h" #include "../vector.h" -#include +#include "gtest/gtest.h" -using namespace std; const float TEST_TOLERANCE = 1e-6; -int TestLength() + +TEST(VectorTest, LengthTest) { Math::Vector vec(-1.288447945923275, 0.681452565308134, -0.633761098985957); const float expectedLength = 1.58938001708428; - if (! Math::IsEqual(vec.Length(), expectedLength, TEST_TOLERANCE) ) - { - fprintf(stderr, "Length mismatch!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::IsEqual(vec.Length(), expectedLength, TEST_TOLERANCE)); } -int TestNormalize() +TEST(VectorTest, NormalizeTest) { Math::Vector vec(1.848877241804398, -0.157262961268577, -1.963031403332377); const Math::Vector expectedNormalized(0.6844609421393856, -0.0582193085618106, -0.7267212194481797); vec.Normalize(); - if (! Math::VectorsEqual(vec, expectedNormalized, TEST_TOLERANCE)) - { - fprintf(stderr, "Normalize mismatch!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::VectorsEqual(vec, expectedNormalized, TEST_TOLERANCE)); } -int TestDot() +TEST(VectorTest, DotTest) { Math::Vector vecA(0.8202190530968309, 0.0130926060162780, 0.2411914183883510); Math::Vector vecB(-0.0524083951404069, 1.5564932716738220, -0.8971342631500536); float expectedDot = -0.238988896477326; - if (! Math::IsEqual(Math::DotProduct(vecA, vecB), expectedDot, TEST_TOLERANCE) ) - { - fprintf(stderr, "Dot product mismatch!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::IsEqual(Math::DotProduct(vecA, vecB), expectedDot, TEST_TOLERANCE)); } -int TestCross() +TEST(VectorTest, CrossTest) { Math::Vector vecA(1.37380499798567, 1.18054518384682, 1.95166361293121); Math::Vector vecB(0.891657855926886, 0.447591335394532, -0.901604070087823); @@ -86,42 +68,14 @@ int TestCross() Math::Vector expectedCross(-1.937932065431669, 2.978844370287636, -0.437739173833581); Math::Vector expectedReverseCross = -expectedCross; - if (! Math::VectorsEqual(vecA.CrossMultiply(vecB), expectedCross, TEST_TOLERANCE) ) - { - fprintf(stderr, "Cross product mismatch!\n"); - return __LINE__; - } + EXPECT_TRUE(Math::VectorsEqual(vecA.CrossMultiply(vecB), expectedCross, TEST_TOLERANCE)); - if (! Math::VectorsEqual(vecB.CrossMultiply(vecA), expectedReverseCross, TEST_TOLERANCE) ) - { - fprintf(stderr, "Reverse cross product mismatch!\n"); - return __LINE__; - } - - return 0; + EXPECT_TRUE(Math::VectorsEqual(vecB.CrossMultiply(vecA), expectedReverseCross, TEST_TOLERANCE)); } -int main() +int main(int argc, char* argv[]) { - // Functions to test - int (*TESTS[])() = - { - TestLength, - TestNormalize, - TestDot, - TestCross - }; - const int TESTS_SIZE = sizeof(TESTS) / sizeof(*TESTS); + ::testing::InitGoogleTest(&argc, argv); - int result = 0; - for (int i = 0; i < TESTS_SIZE; ++i) - { - result = TESTS[i](); - if (result != 0) - return result; - } - - fprintf(stderr, "All tests successful\n"); - - return 0; + return RUN_ALL_TESTS(); } diff --git a/src/math/vector.h b/src/math/vector.h index 4378e751..eb54a5bd 100644 --- a/src/math/vector.h +++ b/src/math/vector.h @@ -32,16 +32,17 @@ namespace Math { -/** \struct Vector math/vector.h - \brief 3D (3x1) vector - - Represents a universal 3x1 vector that can be used in OpenGL and DirectX engines. - Contains the required methods for operating on vectors. - - All methods are made inline to maximize optimization. - - Unit tests for the structure and related functions are in module: math/test/vector_test.cpp. - +/** + * \struct Vector + * \brief 3D (3x1) vector + * + * Represents a universal 3x1 vector that can be used in OpenGL and DirectX engines. + * Contains the required methods for operating on vectors. + * + * All methods are made inline to maximize optimization. + * + * Unit tests for the structure and related functions are in module: math/test/vector_test.cpp. + * */ struct Vector { @@ -103,8 +104,10 @@ struct Vector } //! Calculates the cross product with another vector - /** \a right right-hand side vector - \returns the cross product*/ + /** + * \param right right-hand side vector + * \returns the cross product + */ inline Vector CrossMultiply(const Vector &right) const { float px = y * right.z - z * right.y; @@ -114,8 +117,10 @@ struct Vector } //! Calculates the dot product with another vector - /** \a right right-hand side vector - \returns the dot product */ + /** + * \param right right-hand side vector + * \returns the dot product + */ inline float DotMultiply(const Vector &right) const { return x * right.x + y * right.y + z * right.z; @@ -218,7 +223,7 @@ struct Vector return s.str(); } -}; // struct Point +}; // struct Vector //! Checks if two vectors are equal within given \a tolerance inline bool VectorsEqual(const Math::Vector &a, const Math::Vector &b, float tolerance = TOLERANCE) diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp index 509904cc..711497d4 100644 --- a/src/object/auto/auto.cpp +++ b/src/object/auto/auto.cpp @@ -15,8 +15,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/auto.h" @@ -26,7 +24,8 @@ #include "ui/gauge.h" #include "ui/window.h" - +#include +#include // Object's constructor. diff --git a/src/object/auto/auto.h b/src/object/auto/auto.h index dd55904d..21949248 100644 --- a/src/object/auto/auto.h +++ b/src/object/auto/auto.h @@ -19,7 +19,7 @@ #pragma once -#include "common/misc.h" +#include "common/global.h" #include "object/object.h" diff --git a/src/object/auto/autoconvert.cpp b/src/object/auto/autoconvert.cpp index 14fa4cfc..ec4392b7 100644 --- a/src/object/auto/autoconvert.cpp +++ b/src/object/auto/autoconvert.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoconvert.h" #include "common/iman.h" @@ -27,7 +25,8 @@ #include "ui/window.h" #include "ui/displaytext.h" - +#include +#include // Object's constructor. diff --git a/src/object/auto/autoderrick.cpp b/src/object/auto/autoderrick.cpp index 432c5ea7..3578c0d9 100644 --- a/src/object/auto/autoderrick.cpp +++ b/src/object/auto/autoderrick.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoderrick.h" #include "common/iman.h" @@ -28,7 +26,8 @@ #include "ui/window.h" #include "ui/displaytext.h" - +#include +#include const float DERRICK_DELAY = 10.0f; // duration of the extraction diff --git a/src/object/auto/autodestroyer.cpp b/src/object/auto/autodestroyer.cpp index d91af292..740f600a 100644 --- a/src/object/auto/autodestroyer.cpp +++ b/src/object/auto/autodestroyer.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autodestroyer.h" #include "common/iman.h" @@ -25,7 +23,8 @@ #include "ui/interface.h" #include "ui/window.h" - +#include +#include // Object's constructor. diff --git a/src/object/auto/autoegg.cpp b/src/object/auto/autoegg.cpp index 04d03f9d..35a6addd 100644 --- a/src/object/auto/autoegg.cpp +++ b/src/object/auto/autoegg.cpp @@ -16,15 +16,14 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoegg.h" #include "math/geometry.h" #include "common/iman.h" #include "script/cmdtoken.h" - +#include +#include // Object's constructor. diff --git a/src/object/auto/autoenergy.cpp b/src/object/auto/autoenergy.cpp index d0117ab3..18a21ab3 100644 --- a/src/object/auto/autoenergy.cpp +++ b/src/object/auto/autoenergy.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoenergy.h" #include "common/iman.h" @@ -29,6 +27,8 @@ #include "ui/window.h" #include "ui/displaytext.h" +#include +#include const float ENERGY_POWER = 0.4f; // Necessary energy for a battery diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 8e7d4807..07894438 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autofactory.h" #include "common/global.h" @@ -30,7 +28,8 @@ #include "ui/window.h" #include "ui/displaytext.h" - +#include +#include diff --git a/src/object/auto/autoflag.cpp b/src/object/auto/autoflag.cpp index acab2d09..e88ee3a8 100644 --- a/src/object/auto/autoflag.cpp +++ b/src/object/auto/autoflag.cpp @@ -16,13 +16,13 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoflag.h" #include "math/geometry.h" #include "graphics/engine/terrain.h" +#include + #define ADJUST_ANGLE false // true -> adjusts the angles of the members diff --git a/src/object/auto/autohuston.cpp b/src/object/auto/autohuston.cpp index 1dd92f0d..1e81a65a 100644 --- a/src/object/auto/autohuston.cpp +++ b/src/object/auto/autohuston.cpp @@ -16,14 +16,12 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autohuston.h" #include "ui/interface.h" #include "ui/window.h" - +#include // Object's constructor. diff --git a/src/object/auto/autoinfo.cpp b/src/object/auto/autoinfo.cpp index 1edd5e09..78cc2492 100644 --- a/src/object/auto/autoinfo.cpp +++ b/src/object/auto/autoinfo.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoinfo.h" #include "script/cmdtoken.h" @@ -25,7 +23,8 @@ #include "ui/list.h" #include "ui/window.h" - +#include +#include diff --git a/src/object/auto/autojostle.cpp b/src/object/auto/autojostle.cpp index 68fe6d1a..788b562a 100644 --- a/src/object/auto/autojostle.cpp +++ b/src/object/auto/autojostle.cpp @@ -16,11 +16,9 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autojostle.h" - +#include // Object's constructor. diff --git a/src/object/auto/autokid.cpp b/src/object/auto/autokid.cpp index 0ffbd7fd..7004e6bf 100644 --- a/src/object/auto/autokid.cpp +++ b/src/object/auto/autokid.cpp @@ -16,13 +16,12 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autokid.h" #include "graphics/engine/particle.h" #include "graphics/engine/water.h" +#include // Object's constructor. diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index c5e4c82b..af780e0b 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autolabo.h" #include "common/global.h" @@ -29,6 +27,8 @@ #include "ui/window.h" #include "ui/displaytext.h" +#include +#include const float LABO_DELAY = 20.0f; // duration of the analysis diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index 0b1608b6..d7aa98e0 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -16,14 +16,14 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/automush.h" #include "common/iman.h" #include "script/cmdtoken.h" +#include +#include // Object's constructor. diff --git a/src/object/auto/autonest.cpp b/src/object/auto/autonest.cpp index d7f94e1c..4a8132a6 100644 --- a/src/object/auto/autonest.cpp +++ b/src/object/auto/autonest.cpp @@ -16,15 +16,14 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autonest.h" #include "common/iman.h" #include "graphics/engine/terrain.h" #include "script/cmdtoken.h" - +#include +#include // Object's constructor. diff --git a/src/object/auto/autonuclear.cpp b/src/object/auto/autonuclear.cpp index d8a3bdf5..bb20dde6 100644 --- a/src/object/auto/autonuclear.cpp +++ b/src/object/auto/autonuclear.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autonuclear.h" #include "common/iman.h" @@ -27,6 +25,8 @@ #include "ui/window.h" #include "ui/displaytext.h" +#include +#include const float NUCLEAR_DELAY = 30.0f; // duration of the generation diff --git a/src/object/auto/autopara.cpp b/src/object/auto/autopara.cpp index 973a8479..b52344f4 100644 --- a/src/object/auto/autopara.cpp +++ b/src/object/auto/autopara.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autopara.h" @@ -27,6 +25,8 @@ #include "ui/interface.h" #include "ui/window.h" +#include +#include diff --git a/src/object/auto/autoportico.cpp b/src/object/auto/autoportico.cpp index 3d934116..01c981d1 100644 --- a/src/object/auto/autoportico.cpp +++ b/src/object/auto/autoportico.cpp @@ -16,14 +16,13 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoportico.h" #include "object/robotmain.h" - +#include +#include const int PARAM_DEPOSE = 2; // run=2 -> deposits the spaceship diff --git a/src/object/auto/autoradar.cpp b/src/object/auto/autoradar.cpp index 224246c3..b5865215 100644 --- a/src/object/auto/autoradar.cpp +++ b/src/object/auto/autoradar.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoradar.h" #include "common/iman.h" @@ -26,6 +24,8 @@ #include "ui/window.h" #include "ui/gauge.h" +#include + // Object's constructor. diff --git a/src/object/auto/autorepair.cpp b/src/object/auto/autorepair.cpp index 2f679fa1..46626992 100644 --- a/src/object/auto/autorepair.cpp +++ b/src/object/auto/autorepair.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autorepair.h" #include "common/iman.h" @@ -26,6 +24,9 @@ #include "ui/interface.h" #include "ui/window.h" +#include +#include + // Object's constructor. diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index c2395e8b..a3ce4649 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoresearch.h" #include "common/global.h" @@ -29,6 +27,8 @@ #include "ui/window.h" #include "ui/displaytext.h" +#include +#include const float SEARCH_TIME = 30.0f; // duration of a research diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp index b43f40b3..4413d56a 100644 --- a/src/object/auto/autoroot.cpp +++ b/src/object/auto/autoroot.cpp @@ -15,15 +15,13 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autoroot.h" #include "graphics/engine/particle.h" #include "graphics/engine/terrain.h" #include "math/geometry.h" - +#include // Object's constructor. diff --git a/src/object/auto/autosafe.cpp b/src/object/auto/autosafe.cpp index 144f36ed..82b1c120 100644 --- a/src/object/auto/autosafe.cpp +++ b/src/object/auto/autosafe.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autosafe.h" #include "common/iman.h" @@ -27,6 +25,9 @@ #include "ui/interface.h" #include "ui/window.h" +#include +#include + const float OPEN_DELAY = 8.0f; // duration of opening diff --git a/src/object/auto/autostation.cpp b/src/object/auto/autostation.cpp index 3771c0f4..1dbcf265 100644 --- a/src/object/auto/autostation.cpp +++ b/src/object/auto/autostation.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autostation.h" #include "common/iman.h" @@ -28,7 +26,7 @@ #include "ui/gauge.h" #include "ui/window.h" - +#include // Object's constructor. diff --git a/src/object/auto/autotower.cpp b/src/object/auto/autotower.cpp index 8410086a..76747947 100644 --- a/src/object/auto/autotower.cpp +++ b/src/object/auto/autotower.cpp @@ -16,8 +16,6 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include - #include "object/auto/autotower.h" #include "common/iman.h" @@ -29,6 +27,9 @@ #include "ui/window.h" #include "ui/gauge.h" +#include +#include + const float TOWER_SCOPE = 200.0f; // range of beam const float ENERGY_FIRE = 0.125f; // energy consumed by fire diff --git a/src/object/brain.cpp b/src/object/brain.cpp index f32aea9c..d0471851 100644 --- a/src/object/brain.cpp +++ b/src/object/brain.cpp @@ -15,57 +15,23 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -// #include -// #include "object/brain.h" -// -// #include "CBot/CBotDll.h" -// #include "common/struct.h" -// #include "math/geometry.h" -// #include "math/const.h" -// #include "old/d3dengine.h" -// #include "old/d3dmath.h" -// #include "common/language.h" -// #include "common/global.h" -// #include "common/event.h" + #include "common/misc.h" #include "common/iman.h" -// #include "common/restext.h" -// #include "old/math3d.h" -// #include "object/robotmain.h" #include "graphics/core/color.h" #include "graphics/engine/terrain.h" -// #include "old/water.h" -// #include "old/camera.h" -// #include "object/object.h" -// #include "physics/physics.h" -// #include "object/motion/motion.h" -// #include "object/motion/motionspider.h" -// #include "old/pyro.h" +#include "object/motion/motion.h" #include "object/task/taskmanager.h" -// #include "object/task/task.h" -// #include "object/task/taskmanip.h" -// #include "object/task/taskflag.h" -// #include "object/task/taskshield.h" -#include "script/script.h" -// #include "ui/studio.h" -#include "ui/interface.h" -// #include "ui/button.h" -// #include "ui/color.h" -// #include "ui/edit.h" -// #include "ui/list.h" -// #include "ui/label.h" -// #include "ui/group.h" -// #include "ui/gauge.h" -#include "ui/slider.h" -// #include "ui/compass.h" -// #include "ui/target.h" -#include "ui/window.h" -// #include "ui/displaytext.h" -// #include "old/text.h" -#include "sound/sound.h" -// #include "old/particule.h" +#include "physics/physics.h" #include "script/cmdtoken.h" +#include "script/script.h" +#include "sound/sound.h" +#include "ui/displaytext.h" +#include "ui/interface.h" +#include "ui/slider.h" +#include "ui/studio.h" +#include "ui/window.h" @@ -96,8 +62,7 @@ CBrain::CBrain(CInstanceManager* iMan, CObject* object) m_motion = 0; m_primaryTask = 0; m_secondaryTask = 0; - // TODO uncoment when ui/studio will be implemented. - // m_studio = 0; + m_studio = 0; m_program = -1; m_bActivity = true; @@ -144,8 +109,7 @@ CBrain::~CBrain() delete m_primaryTask; delete m_secondaryTask; - // TODO uncoment when ui/studio will be implemented. - // delete m_studio; + delete m_studio; delete m_traceRecordBuffer; m_iMan->DeleteInstance(CLASS_BRAIN, this); } @@ -172,8 +136,7 @@ void CBrain::DeleteObject(bool bAll) } } - // TODO uncoment when ui/studio will be implemented. - // if ( m_studio != 0 ) // current edition? + if ( m_studio != 0 ) // current edition? { StopEditScript(true); } @@ -239,9 +202,12 @@ bool CBrain::EventProcess(const Event &event) action = EVENT_NULL; + CApplication* app = CApplication::GetInstancePointer(); + if ( event.type == EVENT_KEY_DOWN && - (event.param == m_engine->GetKey(KEYRANK_ACTION, 0) || - event.param == m_engine->GetKey(KEYRANK_ACTION, 1) ) && + (event.key.key == app->GetInputBinding(INPUT_SLOT_ACTION).key + /* TODO joystick input binding + event.param == app->GetInputBinding(INPUT_SLOT_ACTION).joy*/ ) && !m_main->GetEditLock() ) { pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); @@ -250,7 +216,7 @@ bool CBrain::EventProcess(const Event &event) pc = pw->SearchControl(m_defaultEnter); if ( pc != 0 ) { - if ( pc->TestState(STATE_ENABLE) ) + if ( pc->TestState(Ui::STATE_ENABLE) ) { action = m_defaultEnter; } @@ -274,9 +240,8 @@ bool CBrain::EventProcess(const Event &event) EventFrame(event); } - // TODO uncoment when ui/studio will be implemented. if ( m_object->GetSelect() && // robot selected? - /* m_studio != 0 */ ) // current issue? + m_studio != 0 ) // current issue? { // m_studio->EventProcess(event); @@ -394,8 +359,7 @@ bool CBrain::EventProcess(const Event &event) { m_buttonAxe = action; } - if ( action == EVENT_LBUTTONUP || - action == EVENT_RBUTTONUP ) + if ( action == EVENT_MOUSE_BUTTON_UP ) { m_buttonAxe = EVENT_NULL; } @@ -770,11 +734,10 @@ bool CBrain::EventFrame(const Event &event) m_sound->Position(m_soundChannelAlarm, m_object->GetPosition(0)); } - // TODO uncoment when ui/studio will be implemented. - // if ( m_studio != 0 ) // current edition? - // { - // m_studio->EventProcess(event); - // } + if ( m_studio != 0 ) // current edition? + { + m_studio->EventProcess(event); + } UpdateInterface(event.rTime); @@ -826,7 +789,7 @@ void CBrain::StopProgram() UpdateInterface(); m_main->UpdateShortcuts(); - m_object->CreateSelectParticule(); + m_object->CreateSelectParticle(); } // Stops the current task. @@ -897,9 +860,8 @@ void CBrain::StartEditScript(int rank, char* name) m_script[rank] = new CScript(m_iMan, m_object, &m_secondaryTask); } - // TODO uncoment when ui/studio will be implemented. - // m_studio = new CStudio(m_iMan); - // m_studio->StartEditScript(m_script[rank], name, rank); + m_studio = new Ui::CStudio(); + m_studio->StartEditScript(m_script[rank], name, rank); } // End of editing a program. @@ -908,11 +870,10 @@ void CBrain::StopEditScript(bool bCancel) { if ( !bCancel ) SetActiveVirus(false); - // TODO uncoment when ui/studio will be implemented. - // if ( !m_studio->StopEditScript(bCancel) ) return; + if ( !m_studio->StopEditScript(bCancel) ) return; - // delete m_studio; - // m_studio = 0; + delete m_studio; + m_studio = 0; CreateInterface(true); // puts the control buttons } @@ -1506,19 +1467,19 @@ bool CBrain::CreateInterface(bool bSelect) pos.x = ox+sx*10.1f; pos.y = oy+sy*2.0f-ddim.y; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORb); - pc->SetColor(GetColor(Gfx::Color(0.28f, 0.56f, 1.0f, 0.0f))); + pc->SetColor(Gfx::Color(0.28f, 0.56f, 1.0f, 0.0f)); pos.x += ddim.x; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORr); - pc->SetColor(GetColor(Gfx::Color(1.0f, 0.0f, 0.0f, 0.0f); + pc->SetColor(Gfx::Color(1.0f, 0.0f, 0.0f, 0.0f)); pos.x += ddim.x; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORg); - pc->SetColor(GetColor(Gfx::Color(0.0f, 0.8f, 0.0f, 0.0f))); + pc->SetColor(Gfx::Color(0.0f, 0.8f, 0.0f, 0.0f)); pos.x += ddim.x; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORy); - pc->SetColor(GetColor(Gfx::Color(1.0f, 0.93f, 0.0f, 0.0f); //0x00ffec00 + pc->SetColor(Gfx::Color(1.0f, 0.93f, 0.0f, 0.0f)); //0x00ffec00 pos.x += ddim.x; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORv); - pc->SetColor(GetColor(Gfx::Color(0.82f, 0.004f, 0.99f, 0.0f); //0x00d101fe + pc->SetColor(Gfx::Color(0.82f, 0.004f, 0.99f, 0.0f)); //0x00d101fe } } @@ -1577,7 +1538,7 @@ bool CBrain::CreateInterface(bool bSelect) ddim.x = dim.x*0.5f; ddim.y = dim.y*2.0f; ps = pw->CreateSlider(pos, ddim, 0, EVENT_OBJECT_DIMSHIELD); - ps->SetState(STATE_VALUE); + ps->SetState(Ui::STATE_VALUE); ps->SetLimit((RADIUS_SHIELD_MIN/g_unit), (RADIUS_SHIELD_MAX/g_unit)); ps->SetArrowStep(1.0f); } @@ -1628,35 +1589,35 @@ bool CBrain::CreateInterface(bool bSelect) pos.x = ox+sx*10.15f; pos.y = oy+sy*1.50f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN1); // black - pc->SetColor(GetColor(Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f))); + pc->SetColor(Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f)); pos.x = ox+sx*10.65f; pos.y = oy+sy*1.25f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN2); // yellow - pc->SetColor(GetColor(Gfx::Color(1.0f, 1.0f, 0.0f, 0.0f ))); + pc->SetColor(Gfx::Color(1.0f, 1.0f, 0.0f, 0.0f )); pos.x = ox+sx*10.90f; pos.y = oy+sy*0.75f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN3); // orange - pc->SetColor(GetColor(Gfx::Color(1.0f, 0.53f, 0x00, 0x00))); + pc->SetColor(Gfx::Color(1.0f, 0.53f, 0x00, 0x00)); pos.x = ox+sx*10.65f; pos.y = oy+sy*0.25f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN4); // red - pc->SetColor(GetColor(Gfx::Color(1.0f, 0.0f, 0.0f, 0.0f))); + pc->SetColor(Gfx::Color(1.0f, 0.0f, 0.0f, 0.0f)); pos.x = ox+sx*10.15f; pos.y = oy+sy*0.00f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN5); // violet - pc->SetColor(GetColor(Gfx::Color(1.0f, 0.0f, 1.0f 0.0f ))); + pc->SetColor(Gfx::Color(1.0f, 0.0f, 1.0f, 0.0f)); pos.x = ox+sx*9.65f; pos.y = oy+sy*0.25f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN6); // blue - pc->SetColor(GetColor(Gfx::Color(0.0f, 0.4f, 1.0f, 0.0f)));//0x000066ff)); + pc->SetColor(Gfx::Color(0.0f, 0.4f, 1.0f, 0.0f));//0x000066ff)); pos.x = ox+sx*9.40f; pos.y = oy+sy*0.75f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN7); // green - pc->SetColor(GetColor(Gfx::Color(0.0f, 0.0f, 0.8f, 0.0f)));//0x0000cc00)); + pc->SetColor(Gfx::Color(0.0f, 0.0f, 0.8f, 0.0f));//0x0000cc00)); pos.x = ox+sx*9.65f; pos.y = oy+sy*1.25f; pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_PEN8); // brown - pc->SetColor(GetColor(Gfx::Color(0.53f, 0.27f, 0.0f, 0.0f)));//0x00884400)); + pc->SetColor(Gfx::Color(0.53f, 0.27f, 0.0f, 0.0f));//0x00884400)); pos.x = ox+sx*6.9f; pos.y = oy+sy*1.2f; @@ -1869,7 +1830,7 @@ bool CBrain::CreateInterface(bool bSelect) pc = (CCompass*)pw->SearchControl(EVENT_OBJECT_COMPASS); if ( pc != 0 ) { - pc->SetState(STATE_VISIBLE, m_main->GetShowMap()); + pc->SetState(Ui::STATE_VISIBLE, m_main->GetShowMap()); } } #endif @@ -1895,7 +1856,7 @@ bool CBrain::CreateInterface(bool bSelect) ddim.x = 600.0f/640.0f; ddim.y = 340.0f/480.0f; pt = pw->CreateTarget(pos, ddim, 0, EVENT_OBJECT_TARGET); - pt->ClearState(STATE_GLINT); + pt->ClearState(Ui::STATE_GLINT); } ddim.x = 64.0f/640.0f; @@ -1935,14 +1896,14 @@ bool CBrain::CreateInterface(bool bSelect) void CBrain::UpdateInterface(float rTime) { Ui::CWindow* pw; -#if _TEEN - CButton* pb; -#endif - CGauge* pg; - CCompass* pc; - CGroup* pgr; - CTarget* ptg; - CObject* power; +/* TODO: #if _TEEN + Ui::CButton* pb; +#endif*/ + Ui::CGauge* pg; + Ui::CCompass* pc; + Ui::CGroup* pgr; + Ui::CTarget* ptg; + CObject* power; Math::Vector pos, hPos; Math::Point ppos; float energy, limit, angle, range; @@ -2045,7 +2006,7 @@ void CBrain::UpdateInterface(float rTime) angle = -(m_object->GetAngleY(0)+Math::PI/2.0f); pc->SetDirection(angle); - pc->SetState(STATE_VISIBLE, m_main->GetShowMap()); + pc->SetState(Ui::STATE_VISIBLE, m_main->GetShowMap()); } #if _TEEN @@ -2054,16 +2015,16 @@ void CBrain::UpdateInterface(float rTime) { if ( m_bTraceRecord && Math::Mod(m_time, 0.4f) >= 0.2f ) { - pb->SetState(STATE_CHECK); + pb->SetState(Ui::STATE_CHECK); } else { - pb->ClearState(STATE_CHECK); + pb->ClearState(Ui::STATE_CHECK); } } #endif - bOnBoard = m_camera->GetType() == CAMERA_ONBOARD; + bOnBoard = m_camera->GetType() == Gfx::CAM_TYPE_ONBOARD; pgr = static_cast< Ui::CGroup* >(pw->SearchControl(EVENT_OBJECT_CROSSHAIR)); if ( pgr != 0 ) @@ -2087,11 +2048,11 @@ void CBrain::UpdateInterface(float rTime) ppos.y += m_object->GetGunGoalV()/1.3f; pgr->SetPos(ppos); #endif - pgr->SetState(STATE_VISIBLE, !m_main->GetFriendAim()); + pgr->SetState(Ui::STATE_VISIBLE, !m_main->GetFriendAim()); } else { - pgr->ClearState(STATE_VISIBLE); + pgr->ClearState(Ui::STATE_VISIBLE); } } @@ -2100,36 +2061,36 @@ void CBrain::UpdateInterface(float rTime) { if ( bOnBoard ) { - ptg->SetState(STATE_VISIBLE); + ptg->SetState(Ui::STATE_VISIBLE); } else { - ptg->ClearState(STATE_VISIBLE); + ptg->ClearState(Ui::STATE_VISIBLE); } } pgr = static_cast< Ui::CGroup* >(pw->SearchControl(EVENT_OBJECT_CORNERul)); if ( pgr != 0 ) { - pgr->SetState(STATE_VISIBLE, bOnBoard); + pgr->SetState(Ui::STATE_VISIBLE, bOnBoard); } pgr = static_cast< Ui::CGroup* >(pw->SearchControl(EVENT_OBJECT_CORNERur)); if ( pgr != 0 ) { - pgr->SetState(STATE_VISIBLE, bOnBoard); + pgr->SetState(Ui::STATE_VISIBLE, bOnBoard); } pgr = static_cast< Ui::CGroup* >(pw->SearchControl(EVENT_OBJECT_CORNERdl)); if ( pgr != 0 ) { - pgr->SetState(STATE_VISIBLE, bOnBoard); + pgr->SetState(Ui::STATE_VISIBLE, bOnBoard); } pgr = static_cast< Ui::CGroup* >(pw->SearchControl(EVENT_OBJECT_CORNERdr)); if ( pgr != 0 ) { - pgr->SetState(STATE_VISIBLE, bOnBoard); + pgr->SetState(Ui::STATE_VISIBLE, bOnBoard); } } @@ -2213,7 +2174,7 @@ void CBrain::UpdateInterface() pb = static_cast< Ui::CButton* >(pw->SearchControl(EVENT_OBJECT_GFLAT)); if ( pb != 0 ) { - pb->SetState(STATE_VISIBLE, m_engine->GetGroundSpot()); + pb->SetState(Ui::STATE_VISIBLE, m_engine->GetGroundSpot()); } if ( type == OBJECT_HUMAN || // builder? @@ -2347,49 +2308,49 @@ void CBrain::UpdateInterface() pb = static_cast< Ui::CButton* >(pw->SearchControl(EVENT_OBJECT_PEN0)); if ( pb != 0 ) { - pb->ClearState(STATE_CHECK); + pb->ClearState(Ui::STATE_CHECK); } color = m_object->GetTraceColor(); pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN1)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==1); + pc->SetState(Ui::STATE_CHECK, color==1); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN2)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==8); + pc->SetState(Ui::STATE_CHECK, color==8); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN3)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==7); + pc->SetState(Ui::STATE_CHECK, color==7); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN4)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==4); + pc->SetState(Ui::STATE_CHECK, color==4); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN5)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==6); + pc->SetState(Ui::STATE_CHECK, color==6); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN6)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==14); + pc->SetState(Ui::STATE_CHECK, color==14); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN7)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==12); + pc->SetState(Ui::STATE_CHECK, color==12); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN8)); if ( pc != 0 ) { - pc->SetState(STATE_CHECK, color==10); + pc->SetState(Ui::STATE_CHECK, color==10); } } else @@ -2397,48 +2358,48 @@ void CBrain::UpdateInterface() pb = static_cast< Ui::CButton* >(pw->SearchControl(EVENT_OBJECT_PEN0)); if ( pb != 0 ) { - pb->SetState(STATE_CHECK); + pb->SetState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN1)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN2)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN3)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN4)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN5)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN6)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN7)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } pc = static_cast< Ui::CColor* >(pw->SearchControl(EVENT_OBJECT_PEN8)); if ( pc != 0 ) { - pc->ClearState(STATE_CHECK); + pc->ClearState(Ui::STATE_CHECK); } } #endif @@ -2535,7 +2496,7 @@ void CBrain::CheckInterface(Ui::CWindow *pw, EventType event, bool bState) control = pw->SearchControl(event); if ( control == 0 ) return; - control->SetState(STATE_CHECK, bState); + control->SetState(Ui::STATE_CHECK, bState); } // Changes the state of a button interface. @@ -2547,7 +2508,7 @@ void CBrain::EnableInterface(Ui::CWindow *pw, EventType event, bool bState) control = pw->SearchControl(event); if ( control == 0 ) return; - control->SetState(STATE_ENABLE, bState); + control->SetState(Ui::STATE_ENABLE, bState); } // Changes the state of a button on the interface. @@ -2559,7 +2520,7 @@ void CBrain::DeadInterface(Ui::CWindow *pw, EventType event, bool bState) control = pw->SearchControl(event); if ( control == 0 ) return; - control->SetState(STATE_DEAD, !bState); + control->SetState(Ui::STATE_DEAD, !bState); } // Change the default input state of a button interface. @@ -2573,12 +2534,12 @@ void CBrain::DefaultEnter(Ui::CWindow *pw, EventType event, bool bState) if ( bState ) { - control->SetState(STATE_DEFAULT); + control->SetState(Ui::STATE_DEFAULT); m_defaultEnter = event; } else { - control->ClearState(STATE_DEFAULT); + control->ClearState(Ui::STATE_DEFAULT); } } diff --git a/src/object/brain.h b/src/object/brain.h index 3db5b4c2..008fb678 100644 --- a/src/object/brain.h +++ b/src/object/brain.h @@ -18,9 +18,6 @@ #pragma once - -// #include - #include "common/event.h" #include "common/misc.h" diff --git a/src/object/motion/motion.cpp b/src/object/motion/motion.cpp index c3b74eed..df8a4be1 100644 --- a/src/object/motion/motion.cpp +++ b/src/object/motion/motion.cpp @@ -17,14 +17,13 @@ // motion.cpp -#include - #include "object/motion/motion.h" #include "common/iman.h" #include "script/cmdtoken.h" - +#include +#include // Object's constructor. diff --git a/src/object/motion/motion.h b/src/object/motion/motion.h index ef943d25..d195e650 100644 --- a/src/object/motion/motion.h +++ b/src/object/motion/motion.h @@ -20,7 +20,7 @@ #include "common/event.h" -#include "common/misc.h" +#include "common/global.h" #include "object/object.h" diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index af69d409..1e545624 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -17,8 +17,6 @@ // motionvehicle.cpp -#include - #include "object/motion/motionvehicle.h" #include "graphics/engine/modelfile.h" @@ -28,6 +26,8 @@ #include "object/brain.h" #include "physics/physics.h" +#include +#include diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 3f7ad9e0..b5218629 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -2760,7 +2760,7 @@ void CRobotMain::HiliteFrame(float rTime) } //! Creates a tooltip -void CRobotMain::CreateTooltip(Math::Point pos, char* text) +void CRobotMain::CreateTooltip(Math::Point pos, const char* text) { Math::Point corner; corner.x = pos.x+0.022f; @@ -6193,7 +6193,7 @@ Error CRobotMain::CheckEndMission(bool frame) } //! Checks if the mission is finished after displaying a message -void CRobotMain::CheckEndMessage(char *message) +void CRobotMain::CheckEndMessage(const char* message) { for (int t = 0; t < m_endTakeTotal; t++) { @@ -6222,7 +6222,7 @@ char* CRobotMain::GetObligatoryToken(int i) } //! Checks if an instruction is part of the obligatory list -int CRobotMain::IsObligatoryToken(char *token) +int CRobotMain::IsObligatoryToken(const char* token) { for (int i = 0; i < m_obligatoryTotal; i++) { @@ -6233,7 +6233,7 @@ int CRobotMain::IsObligatoryToken(char *token) } //! Checks if an instruction is not part of the banned list -bool CRobotMain::IsProhibitedToken(char *token) +bool CRobotMain::IsProhibitedToken(const char* token) { for (int i = 0; i < m_prohibitedTotal; i++) { diff --git a/src/object/robotmain.h b/src/object/robotmain.h index 4ec897b8..fead48d5 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -189,11 +189,11 @@ public: void ResetObject(); void ResetCreate(); Error CheckEndMission(bool frame); - void CheckEndMessage(char *message); + void CheckEndMessage(const char* message); int GetObligatoryToken(); char* GetObligatoryToken(int i); - int IsObligatoryToken(char *token); - bool IsProhibitedToken(char *token); + int IsObligatoryToken(const char* token); + bool IsProhibitedToken(const char* token); void UpdateMap(); bool GetShowMap(); diff --git a/src/object/task/task.h b/src/object/task/task.h index a0da9d27..7239d48d 100644 --- a/src/object/task/task.h +++ b/src/object/task/task.h @@ -19,7 +19,8 @@ #pragma once -#include "common/misc.h" +#include "common/event.h" +#include "common/global.h" #include "math/const.h" diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 6aa0ed2a..469e9cb7 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -31,6 +31,8 @@ #include "physics/physics.h" #include "ui/displaytext.h" +#include + // Object's constructor. CTaskBuild::CTaskBuild(CInstanceManager* iMan, CObject* object) diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp index fb3c9a28..ce778ef4 100644 --- a/src/object/task/taskgoto.cpp +++ b/src/object/task/taskgoto.cpp @@ -28,6 +28,7 @@ #include "math/geometry.h" #include "physics/physics.h" +#include const float FLY_DIST_GROUND = 80.0f; // minimum distance to remain on the ground diff --git a/src/object/task/taskinfo.cpp b/src/object/task/taskinfo.cpp index ab81d230..4e645841 100644 --- a/src/object/task/taskinfo.cpp +++ b/src/object/task/taskinfo.cpp @@ -22,7 +22,7 @@ #include "graphics/engine/particle.h" #include "object/auto/autoinfo.h" - +#include diff --git a/src/object/task/taskshield.cpp b/src/object/task/taskshield.cpp index f6dc8978..682bcb18 100644 --- a/src/object/task/taskshield.cpp +++ b/src/object/task/taskshield.cpp @@ -26,6 +26,7 @@ #include "object/brain.h" #include "physics/physics.h" +#include const float ENERGY_TIME = 20.0f; // maximum duration if full battery diff --git a/src/physics/physics.h b/src/physics/physics.h index 79d28e49..e8a1f84b 100644 --- a/src/physics/physics.h +++ b/src/physics/physics.h @@ -24,7 +24,7 @@ -#include "common/misc.h" +#include "common/global.h" #include "object/object.h" #include "math/vector.h" diff --git a/src/po/de.po b/src/po/de.po index 88ab6f1e..5af628cb 100644 --- a/src/po/de.po +++ b/src/po/de.po @@ -1,29 +1,17 @@ -msgid "1.18 /e" -msgstr "1.18 /d" +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Language: de_DE\n" +"X-Source-Language: en_US\n" -msgid "CeeBot-A 1.18" -msgstr "CeeBot-A 1.18" +msgid "Colobot rules!" +msgstr "Colobot ist wunderbar!" -msgid "CeeBot-Teen EDU 1.18" -msgstr "CeeBot-Teen EDU 1.18" - -msgid "CeeBot-A EDU 1.18" -msgstr "CeeBot-A EDU 1.18" - -msgid "CeeBot-Teen PERSO 1.18" -msgstr "CeeBot-Teen PERSO 1.18" - -msgid "CeeBot-A PERSO 1.18" -msgstr "CeeBot-A PERSO 1.18" - -msgid "CeeBot-Teen DEMO 1.18" -msgstr "CeeBot-Teen DEMO 1.18" - -msgid "CeeBot-A DEMO 1.18" -msgstr "CeeBot-A DEMO 1.18" - -msgid "Demo 1.18 /e" -msgstr "Demo 1.18 /d" +msgid "Colobot Gold" +msgstr "Colobot Gold" msgid "SatCom" msgstr "SatCom" @@ -55,9 +43,6 @@ msgstr "Neu ..." msgid " or " msgstr " oder " -msgid "CeeBot" -msgstr "CeeBot" - msgid "COLOBOT" msgstr "COLOBOT" @@ -154,12 +139,6 @@ msgstr "Farbe des Anzugs:" msgid "Strip color:" msgstr "Farbe der Streifen:" -msgid "Do you want to quit CeeBot ?" -msgstr "Wollen Sie CeeBot schließen ?" - -msgid "Quit\\Quit CeeBot" -msgstr "Schließen\\CeeBot schließen" - msgid "Do you want to quit COLOBOT ?" msgstr "Wollen Sie COLOBOT schließen ?" @@ -223,8 +202,10 @@ msgstr "\\c; (keine)\\n;\n" msgid "\\b;Error\n" msgstr "\\b;Fehler\n" -msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" -msgstr "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verfügbar !\n" +msgid "" +"The list is only available if a \\l;radar station\\u object\\radar; is " +"working.\n" +msgstr "Die Liste ist ohne \\l;Radar\\u object\\radar; nicht verfügbar.\n" msgid "Open" msgstr "Öffnen" @@ -266,7 +247,7 @@ msgid "Next" msgstr "Nächster" msgid "Previous" -msgstr "Vorherg." +msgstr "Vorherg" msgid "Menu (\\key quit;)" msgstr "Menü (\\key quit;)" @@ -304,9 +285,6 @@ msgstr "Speichern\\Aktuelle Mission speichern" msgid "Load\\Load a saved mission" msgstr "Laden\\Eine gespeicherte Mission öffnen" -msgid "\\Return to CeeBot" -msgstr "\\Zurück zu CeeBot" - msgid "\\Return to COLOBOT" msgstr "\\Zurück zu COLOBOT" @@ -314,7 +292,7 @@ msgid "<< Back \\Back to the previous screen" msgstr "<< Zurück \\Zurück zum Hauptmenü" msgid "Play\\Start mission!" -msgstr "Spielen ...\\Los geht's" +msgstr "Spielen ...\\Los geht's!" msgid "Device\\Driver and resolution settings" msgstr "Bildschirm\\Driver und Bildschirmauflösung" @@ -401,10 +379,11 @@ msgid "Exit film\\Film at the exit of exercises" msgstr "Zurücksetzen \\Kleine Show beim Zurücksetzen in den Übungen" msgid "Friendly fire\\Your shooting can damage your own objects " -msgstr "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen beschädigt." +msgstr "Eigenbeschuss\\Ihre Einheiten werden von Ihren Waffen beschädigt" msgid "Scrolling\\Scrolling when the mouse touches right or left border" -msgstr "Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht" +msgstr "" +"Kameradrehung mit der Maus\\Die Kamera dreht wenn die Maus den Rand erreicht" msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" msgstr "Umkehr X\\Umkehr der Kameradrehung X-Achse" @@ -425,7 +404,8 @@ msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" msgstr "Einrücken mit 4 Leerstellen\\Einrücken mit 2 oder 4 Leerstellen" msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" -msgstr "Lösung zugänglich\\Die Lösung ist im Programmslot \"4: Lösung\" zugänglich" +msgstr "" +"Lösung zugänglich\\Die Lösung ist im Programmslot \"4: Lösung\" zugänglich" msgid "Standard controls\\Standard key functions" msgstr "Alles zurücksetzen\\Standarddefinition aller Tasten" @@ -454,8 +434,9 @@ msgstr "Andere Kamera\\Sichtpunkt einstellen" msgid "Previous object\\Selects the previous object" msgstr "Vorherg. Auswahl\\Das vorhergehende Objekt auswählen" -msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" -msgstr "Standardhandlung\\Führt die Standardhandlung des Roboters aus." +msgid "" +"Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Standardhandlung\\Führt die Standardhandlung des Roboters aus" msgid "Camera closer\\Moves the camera forward" msgstr "Kamera näher\\Bewegung der Kamera vorwärts" @@ -523,7 +504,8 @@ msgstr "Normal\\Normale Lautstärke" msgid "Use a joystick\\Joystick or keyboard" msgstr "Joystick\\Joystick oder Tastatur" -msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgid "" +"Access to solution\\Shows the solution (detailed instructions for missions)" msgstr "Zeigt die Lösung\\Zeigt nach 3mal Scheitern die Lösung" msgid "\\New player name" @@ -1312,22 +1294,6 @@ msgstr "Fehler" msgid "Unknown command" msgstr "Befehl unbekannt" -msgid "CeeBot not installed." -msgstr "CeeBot wurde nicht installiert." - -msgid "" -"Please insert the CeeBot CD\n" -"and re-run the game." -msgstr "Legen Sie die CeeBot-CD ein\nund starten Sie das Spiel neu." - -msgid "COLOBOT not installed." -msgstr "COLOBOT wurde nicht installiert." - -msgid "" -"Please insert the COLOBOT CD\n" -"and re-run the game." -msgstr "Legen Sie die COLOBOT-CD ein\nund starten Sie das Spiel neu." - msgid "Inappropriate bot" msgstr "Roboter ungeeignet" @@ -1490,8 +1456,11 @@ msgstr "Zu nahe an einer anderen Fahne" msgid "No flag nearby" msgstr "Keine Fahne in Reichweite" -msgid "The mission is not accomplished yet (press \\key help; for more details)" -msgstr "Mission noch nicht beendet (Drücken Sie auf \\key help; für weitere Informationen)" +msgid "" +"The mission is not accomplished yet (press \\key help; for more details)" +msgstr "" +"Mission noch nicht beendet (Drücken Sie auf \\key help; für weitere " +"Informationen)" msgid "Bot destroyed" msgstr "Roboter zerstört" @@ -1647,7 +1616,9 @@ msgid "Instruction \"break\" outside a loop" msgstr "Anweisung \"break\" außerhalb einer Schleife" msgid "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"" -msgstr "Ein Label kann nur vor den Anweisungen \"for\", \"while\", \"do\" oder \"switch\" vorkommen" +msgstr "" +"Ein Label kann nur vor den Anweisungen \"for\", \"while\", \"do\" oder " +"\"switch\" vorkommen" msgid "This label does not exist" msgstr "Dieses Label existiert nicht" diff --git a/src/po/fr.po b/src/po/fr.po index c70a77e3..f8934408 100644 --- a/src/po/fr.po +++ b/src/po/fr.po @@ -1,29 +1,17 @@ -msgid "1.18 /e" -msgstr "1.18 /f" +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Language: fr_FR\n" +"X-Source-Language: en_US\n" -msgid "CeeBot-A 1.18" -msgstr "CeeBot-A 1.18" +msgid "Colobot rules!" +msgstr "Colobot est super!" -msgid "CeeBot-Teen EDU 1.18" -msgstr "CeeBot-Teen EDU 1.18" - -msgid "CeeBot-A EDU 1.18" -msgstr "CeeBot-A EDU 1.18" - -msgid "CeeBot-Teen PERSO 1.18" -msgstr "CeeBot-Teen PERSO 1.18" - -msgid "CeeBot-A PERSO 1.18" -msgstr "CeeBot-A PERSO 1.18" - -msgid "CeeBot-Teen DEMO 1.18" -msgstr "CeeBot-Teen DEMO 1.18" - -msgid "CeeBot-A DEMO 1.18" -msgstr "CeeBot-A DEMO 1.18" - -msgid "Demo 1.18 /e" -msgstr "Demo 1.18 /f" +msgid "Colobot Gold" +msgstr "Colobot Gold" msgid "SatCom" msgstr "SatCom" @@ -55,9 +43,6 @@ msgstr "Nouveau ..." msgid " or " msgstr " ou " -msgid "CeeBot" -msgstr "CeeBot" - msgid "COLOBOT" msgstr "COLOBOT" @@ -154,12 +139,6 @@ msgstr "Couleur de la combinaison :" msgid "Strip color:" msgstr "Couleur des bandes :" -msgid "Do you want to quit CeeBot ?" -msgstr "Voulez-vous quitter CeeBot ?" - -msgid "Quit\\Quit CeeBot" -msgstr "Quitter\\Quitter CeeBot" - msgid "Do you want to quit COLOBOT ?" msgstr "Voulez-vous quitter COLOBOT ?" @@ -223,8 +202,10 @@ msgstr "\\c; (aucun)\\n;\n" msgid "\\b;Error\n" msgstr "\\b;Erreur\n" -msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" -msgstr "Liste non disponible sans \\l;radar\\u object\\radar; !\n" +msgid "" +"The list is only available if a \\l;radar station\\u object\\radar; is " +"working.\n" +msgstr "Liste non disponible sans \\l;radar\\u object\\radar;.\n" msgid "Open" msgstr "Ouvrir" @@ -304,9 +285,6 @@ msgstr "Enregistrer\\Enregistrer la mission en cours" msgid "Load\\Load a saved mission" msgstr "Charger\\Charger une mission enregistrée" -msgid "\\Return to CeeBot" -msgstr "\\Retourner dans CeeBot" - msgid "\\Return to COLOBOT" msgstr "\\Retourner dans COLOBOT" @@ -314,7 +292,7 @@ msgid "<< Back \\Back to the previous screen" msgstr "<< Retour \\Retour au niveau précédent" msgid "Play\\Start mission!" -msgstr "Jouer ...\\Démarrer l'action" +msgstr "Jouer ...\\Démarrer l'action!" msgid "Device\\Driver and resolution settings" msgstr "Affichage\\Pilote et résolution d'affichage" @@ -404,13 +382,17 @@ msgid "Friendly fire\\Your shooting can damage your own objects " msgstr "Dégâts ŕ soi-męme\\Vos tirs infligent des dommages ŕ vos unités" msgid "Scrolling\\Scrolling when the mouse touches right or left border" -msgstr "Défilement dans les bords\\Défilement lorsque la souris touches les bords gauche ou droite" +msgstr "" +"Défilement dans les bords\\Défilement lorsque la souris touches les bords " +"gauche ou droite" msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" -msgstr "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord" +msgstr "" +"Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord" msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" -msgstr "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord" +msgstr "" +"Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord" msgid "Quake at explosions\\The screen shakes at explosions" msgstr "Secousses lors d'explosions\\L'écran vibre lors d'une explosion" @@ -454,7 +436,8 @@ msgstr "Changement de caméra\\Autre de point de vue" msgid "Previous object\\Selects the previous object" msgstr "Sélection précédente\\Sélectionne l'objet précédent" -msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgid "" +"Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" msgstr "Action standard\\Action du bouton avec le cadre rouge" msgid "Camera closer\\Moves the camera forward" @@ -523,7 +506,8 @@ msgstr "Normal\\Niveaux normaux" msgid "Use a joystick\\Joystick or keyboard" msgstr "Utilise un joystick\\Joystick ou clavier" -msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgid "" +"Access to solution\\Shows the solution (detailed instructions for missions)" msgstr "Accčs ŕ la solution\\Donne la solution" msgid "\\New player name" @@ -1312,22 +1296,6 @@ msgstr "Erreur" msgid "Unknown command" msgstr "Commande inconnue" -msgid "CeeBot not installed." -msgstr "CeeBot n'est pas installé." - -msgid "" -"Please insert the CeeBot CD\n" -"and re-run the game." -msgstr "Veuillez mettre le CD de CeeBot\net relancer le jeu." - -msgid "COLOBOT not installed." -msgstr "COLOBOT n'est pas installé." - -msgid "" -"Please insert the COLOBOT CD\n" -"and re-run the game." -msgstr "Veuillez mettre le CD de COLOBOT\net relancer le jeu." - msgid "Inappropriate bot" msgstr "Robot inadapté" @@ -1490,8 +1458,10 @@ msgstr "Trop proche d'un drapeau existant" msgid "No flag nearby" msgstr "Aucun drapeau ŕ proximité" -msgid "The mission is not accomplished yet (press \\key help; for more details)" -msgstr "La misssion n'est pas terminée (appuyez sur \\key help; pour plus de détails)" +msgid "" +"The mission is not accomplished yet (press \\key help; for more details)" +msgstr "" +"La misssion n'est pas terminée (appuyez sur \\key help; pour plus de détails)" msgid "Bot destroyed" msgstr "Robot détruit" @@ -1521,7 +1491,8 @@ msgid "Plans for tracked robots available " msgstr "Fabrication d'un robot ŕ chenilles possible" msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" -msgstr "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)" +msgstr "" +"Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)" msgid "Plans for thumper available" msgstr "Fabrication d'un robot secoueur possible" @@ -1647,7 +1618,9 @@ msgid "Instruction \"break\" outside a loop" msgstr "Instruction \"break\" en dehors d'une boucle" msgid "A label must be followed by \"for\", \"while\", \"do\" or \"switch\"" -msgstr "Un label ne peut se placer que devant un \"for\", un \"while\", un \"do\" ou un \"switch\"" +msgstr "" +"Un label ne peut se placer que devant un \"for\", un \"while\", un \"do\" ou " +"un \"switch\"" msgid "This label does not exist" msgstr "Cette étiquette n'existe pas" diff --git a/src/po/pl.po b/src/po/pl.po index 1f5db212..98fda0e8 100644 --- a/src/po/pl.po +++ b/src/po/pl.po @@ -1,29 +1,17 @@ -msgid "1.18 /e" -msgstr "Wersja 1.18 /pl" +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Language: pl_PL\n" +"X-Source-Language: en_US\n" -msgid "CeeBot-A 1.18" -msgstr "CeeBot-A 1.18" +msgid "Colobot rules!" +msgstr "Colobot rządzi!" -msgid "CeeBot-Teen EDU 1.18" -msgstr "CeeBot-Teen EDU 1.18" - -msgid "CeeBot-A EDU 1.18" -msgstr "CeeBot-A EDU 1.18" - -msgid "CeeBot-Teen PERSO 1.18" -msgstr "CeeBot-Teen PERSO 1.18" - -msgid "CeeBot-A PERSO 1.18" -msgstr "CeeBot-A PERSO 1.18" - -msgid "CeeBot-Teen DEMO 1.18" -msgstr "CeeBot-Teen DEMO 1.18" - -msgid "CeeBot-A DEMO 1.18" -msgstr "CeeBot-A DEMO 1.18" - -msgid "Demo 1.18 /e" -msgstr "Demo 1.18 /pl" +msgid "Colobot Gold" +msgstr "Colobot Gold" msgid "SatCom" msgstr "SatCom" @@ -55,9 +43,6 @@ msgstr "Nowy ..." msgid " or " msgstr " lub " -msgid "CeeBot" -msgstr "CeeBot" - msgid "COLOBOT" msgstr "COLOBOT" @@ -154,12 +139,6 @@ msgstr "Kolor skafandra:" msgid "Strip color:" msgstr "Kolor pasków:" -msgid "Do you want to quit CeeBot ?" -msgstr "Czy na pewno chcesz opuścić grę CeeBot?" - -msgid "Quit\\Quit CeeBot" -msgstr "Zakończ\\Kończy grę CeeBot" - msgid "Do you want to quit COLOBOT ?" msgstr "Czy na pewno chcesz opuścić grę COLOBOT?" @@ -223,8 +202,12 @@ msgstr "\\c; (brak)\\n;\n" msgid "\\b;Error\n" msgstr "\\b;Błąd\n" -msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" -msgstr "Lista jest dostępna jedynie gdy działa \\l;stacja radarowa\\u object\\radar;.\n" +msgid "" +"The list is only available if a \\l;radar station\\u object\\radar; is " +"working.\n" +msgstr "" +"Lista jest dostępna jedynie gdy działa \\l;stacja radarowa\\u " +"object\\radar;.\n" msgid "Open" msgstr "Otwórz" @@ -304,9 +287,6 @@ msgstr "Zapisz\\Zapisuje bieżącą misję" msgid "Load\\Load a saved mission" msgstr "Wczytaj\\Wczytuje zapisaną misję" -msgid "\\Return to CeeBot" -msgstr "\\Powróć do gry CeeBot" - msgid "\\Return to COLOBOT" msgstr "\\Powróć do gry COLOBOT" @@ -404,7 +384,9 @@ msgid "Friendly fire\\Your shooting can damage your own objects " msgstr "Przyjacielski ogień\\Własne strzały uszkadzają Twoje obiekty" msgid "Scrolling\\Scrolling when the mouse touches right or left border" -msgstr "Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego krawędzi" +msgstr "" +"Przewijanie\\Ekran jest przewijany gdy mysz dotknie prawej lub lewej jego " +"krawędzi" msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" msgstr "Odwrócenie myszy X\\Odwrócenie kierunków przewijania w poziomie" @@ -422,7 +404,9 @@ msgid "Automatic indent\\When program editing" msgstr "Automatyczne wcięcia\\Automatyczne wcięcia podczas edycji programu" msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" -msgstr "Duże wcięcie\\2 lub 4 spacje wcięcia na każdy poziom zdefiniowany przez klamry" +msgstr "" +"Duże wcięcie\\2 lub 4 spacje wcięcia na każdy poziom zdefiniowany przez " +"klamry" msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" msgstr "Accčs aux solutions\\Programme \"4: Solution\" dans les exercices" @@ -454,8 +438,11 @@ msgstr "Zmień kamerę\\Przełącza pomiędzy kamerą pokładową i śledzącą" msgid "Previous object\\Selects the previous object" msgstr "Poprzedni obiekt\\Zaznacz poprzedni obiekt" -msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" -msgstr "Standardowa akcja\\Standardowa akcja robota (podnieś/upuść, strzelaj, szukaj, itp.)" +msgid "" +"Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "" +"Standardowa akcja\\Standardowa akcja robota (podnieś/upuść, strzelaj, " +"szukaj, itp.)" msgid "Camera closer\\Moves the camera forward" msgstr "Kamera bliżej\\Przybliża kamerę" @@ -479,10 +466,12 @@ msgid "Programming help\\Gives more detailed help with programming" msgstr "Podręcznik programowania\\Dostarcza szczegółową pomoc w programowaniu" msgid "Key word help\\More detailed help about key words" -msgstr "Pomoc dot. słów kluczowych\\Dokładniejsza pomoc na temat słów kluczowych" +msgstr "" +"Pomoc dot. słów kluczowych\\Dokładniejsza pomoc na temat słów kluczowych" msgid "Origin of last message\\Shows where the last message was sent from" -msgstr "Miejsce nadania wiadomości\\Pokazuje skąd została wysłana ostatnia wiadomość" +msgstr "" +"Miejsce nadania wiadomości\\Pokazuje skąd została wysłana ostatnia wiadomość" msgid "Speed 1.0x\\Normal speed" msgstr "Prędkość 1,0x\\Prędkość normalna" @@ -506,13 +495,15 @@ msgid "3D sound\\3D positioning of the sound" msgstr "Dźwięk 3D\\Przestrzenne pozycjonowanie dźwięków" msgid "Lowest\\Minimum graphic quality (highest frame rate)" -msgstr "Najniższa\\Minimalna jakość grafiki (najwyższa częstotliwość odświeżania)" +msgstr "" +"Najniższa\\Minimalna jakość grafiki (najwyższa częstotliwość odświeżania)" msgid "Normal\\Normal graphic quality" msgstr "Normalna\\Normalna jakość grafiki" msgid "Highest\\Highest graphic quality (lowest frame rate)" -msgstr "Najwyższa\\Maksymalna jakość grafiki (najniższa częstotliwość odświeżania)" +msgstr "" +"Najwyższa\\Maksymalna jakość grafiki (najniższa częstotliwość odświeżania)" msgid "Mute\\No sound" msgstr "Cisza\\Brak dźwięków" @@ -523,8 +514,11 @@ msgstr "Normalne\\Normalna głośność dźwięków" msgid "Use a joystick\\Joystick or keyboard" msgstr "Używaj joysticka\\Joystick lub klawiatura" -msgid "Access to solution\\Shows the solution (detailed instructions for missions)" -msgstr "Dostęp do rozwiązania\\Pokazuje rozwiązanie (szczegółowe instrukcje dotyczące misji)" +msgid "" +"Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "" +"Dostęp do rozwiązania\\Pokazuje rozwiązanie (szczegółowe instrukcje " +"dotyczące misji)" msgid "\\New player name" msgstr "\\Nowe imię gracza" @@ -1312,22 +1306,6 @@ msgstr "Błąd" msgid "Unknown command" msgstr "Nieznane polecenie" -msgid "CeeBot not installed." -msgstr "Gra CeeBot nie jest zainstalowana." - -msgid "" -"Please insert the CeeBot CD\n" -"and re-run the game." -msgstr "Włóż dysk CD z grą CeeBot\ni uruchom grę jeszcze raz." - -msgid "COLOBOT not installed." -msgstr "Gra COLOBOT nie jest zainstalowana." - -msgid "" -"Please insert the COLOBOT CD\n" -"and re-run the game." -msgstr "Włóż dysk CD z grą COLOBOT\ni uruchom grę jeszcze raz." - msgid "Inappropriate bot" msgstr "Nieodpowiedni robot" @@ -1490,7 +1468,8 @@ msgstr "Za blisko istniejącej flagi" msgid "No flag nearby" msgstr "Nie ma flagi w pobliżu" -msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgid "" +"The mission is not accomplished yet (press \\key help; for more details)" msgstr "Misja nie jest wypełniona (naciśnij \\key help; aby uzyskać szczegóły)" msgid "Bot destroyed" @@ -1590,7 +1569,8 @@ msgid "Spider fatally wounded" msgstr "Pająk śmiertelnie raniony" msgid "Press \\key help; to read instructions on your SatCom" -msgstr "Naciśnij klawisz \\key help; aby wyświetlić rozkazy na przekaźniku SatCom" +msgstr "" +"Naciśnij klawisz \\key help; aby wyświetlić rozkazy na przekaźniku SatCom" msgid "Opening bracket missing" msgstr "Brak nawiasu otwierającego" @@ -1638,7 +1618,7 @@ msgid "Unknown function" msgstr "Funkcja nieznana" msgid "Sign \" : \" missing" -msgstr "Brak znaku \" : " +msgstr "Brak znaku \" :\"" msgid "Keyword \"while\" missing" msgstr "Brak kluczowego słowa \"while" diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 4d33bcae..a9cc5990 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -15,20 +15,11 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -// #include -// #include -// #include -// -// #include "common/struct.h" -// #include "old/d3dengine.h" -// #include "old/d3dmath.h" -// #include "common/language.h" -// #include "common/global.h" -// #include "common/event.h" +#include "script/cbottoken.h" + #include "object/object.h" -// #include "script/cbottoken.h" - +#include // Seeking the name of an object. diff --git a/src/script/cmdtoken.cpp b/src/script/cmdtoken.cpp index 0b441a48..d79fbf17 100644 --- a/src/script/cmdtoken.cpp +++ b/src/script/cmdtoken.cpp @@ -15,10 +15,11 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include "common/global.h" #include "script/cmdtoken.h" +#include "common/global.h" +#include diff --git a/src/script/cmdtoken.h b/src/script/cmdtoken.h index 911bd557..e457d96a 100644 --- a/src/script/cmdtoken.h +++ b/src/script/cmdtoken.h @@ -18,10 +18,6 @@ #pragma once - -// #include "old/d3denum.h" -// #include "old/d3dengine.h" -// #include "object/object.h" #include "graphics/engine/water.h" #include "graphics/engine/engine.h" #include "graphics/engine/pyro.h" diff --git a/src/script/script.cpp b/src/script/script.cpp index cbdbbf48..4f7f1ee6 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -18,37 +18,27 @@ #include "script/script.h" -// #include -#include -// #include -// -#include "math/vector.h" -// #include "common/struct.h" -#include "math/geometry.h" -// #include "old/d3dengine.h" -// #include "old/d3dmath.h" + #include "common/global.h" -// #include "common/event.h" -// #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" -// #include "old/math3d.h" -#include "object/robotmain.h" #include "graphics/engine/terrain.h" #include "graphics/engine/water.h" #include "graphics/engine/text.h" +#include "math/geometry.h" +#include "math/vector.h" #include "object/object.h" +#include "object/robotmain.h" +#include "object/task/taskmanager.h" #include "physics/physics.h" +#include "script/cbottoken.h" #include "ui/interface.h" #include "ui/edit.h" #include "ui/list.h" #include "ui/displaytext.h" -#include "object/task/taskmanager.h" -// #include "object/task/task.h" -// #include "object/task/taskmanip.h" -// #include "object/task/taskgoto.h" -// #include "object/task/taskshield.h" -#include "script/cbottoken.h" + + +#include @@ -3101,7 +3091,7 @@ bool CScript::Step(const Event &event) if ( !m_bStepMode ) return false; m_engine->SetPause(false); - m_engine->StepSimulation(0.01f); // advance of 10ms + // TODO: m_app StepSimulation??? m_engine->StepSimulation(0.01f); // advance of 10ms m_engine->SetPause(true); m_event = event; @@ -3650,7 +3640,7 @@ bool CScript::SendScript(char* text) // Reads a script as a text file. -bool CScript::ReadScript(char* filename) +bool CScript::ReadScript(const char* filename) { FILE* file; Ui::CEdit* edit; @@ -3685,7 +3675,7 @@ bool CScript::ReadScript(char* filename) // Writes a script as a text file. -bool CScript::WriteScript(char* filename) +bool CScript::WriteScript(const char* filename) { Ui::CEdit* edit; char name[100]; diff --git a/src/script/script.h b/src/script/script.h index 3cb1a85e..5462a184 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -76,8 +76,8 @@ public: void New(Ui::CEdit* edit, char* name); bool SendScript(char* text); - bool ReadScript(char* filename); - bool WriteScript(char* filename); + bool ReadScript(const char* filename); + bool WriteScript(const char* filename); bool ReadStack(FILE *file); bool WriteStack(FILE *file); bool Compare(CScript* other); diff --git a/src/ui/button.cpp b/src/ui/button.cpp index b8934c42..d6a5c403 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -17,13 +17,15 @@ -#include "button.h" +#include "ui/button.h" -#include -#include -#include +#include "common/event.h" +#include "common/misc.h" +#include "common/restext.h" -#include +#include "graphics/engine/engine.h" + +#include namespace Ui { diff --git a/src/ui/button.h b/src/ui/button.h index ffaf2204..33a48eef 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -19,7 +19,8 @@ #pragma once -#include "control.h" +#include "ui/control.h" + namespace Ui { diff --git a/src/ui/check.cpp b/src/ui/check.cpp index 5c076d47..43db0d14 100644 --- a/src/ui/check.cpp +++ b/src/ui/check.cpp @@ -16,16 +16,17 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include "check.h" +#include "ui/check.h" -#include -#include -#include -#include +#include "common/event.h" +#include "common/iman.h" +#include "common/misc.h" +#include "common/restext.h" -#include -#include +#include "graphics/engine/engine.h" +#include "graphics/engine/text.h" +#include namespace Ui { diff --git a/src/ui/check.h b/src/ui/check.h index 1ad8a3a7..af26adde 100644 --- a/src/ui/check.h +++ b/src/ui/check.h @@ -19,7 +19,7 @@ #pragma once -#include "control.h" +#include "ui/control.h" namespace Gfx{ diff --git a/src/ui/color.cpp b/src/ui/color.cpp index c8588b89..2666f84c 100644 --- a/src/ui/color.cpp +++ b/src/ui/color.cpp @@ -16,7 +16,7 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include "color.h" +#include "ui/color.h" #include "common/event.h" #include "common/iman.h" @@ -26,6 +26,8 @@ #include "graphics/core/device.h" #include "graphics/engine/engine.h" +#include + namespace Ui { const float DELAY1 = 0.4f; @@ -188,10 +190,10 @@ void CColor::Draw() m_engine->SetTexture("xxx.tga"); // no texture m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); - vertex[0] = Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); - vertex[1] = Gfx::VertexCol(Math::Vector(p1.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); - vertex[2] = Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); - vertex[3] = Gfx::VertexCol(Math::Vector(p2.x, p2.y, 0.0f), color,0x00000000, Math::Point(0.0f, 0.0f)); + vertex[0] = Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), color, Gfx::Color(), Math::Point(0.0f, 0.0f)); + vertex[1] = Gfx::VertexCol(Math::Vector(p1.x, p2.y, 0.0f), color, Gfx::Color(), Math::Point(0.0f, 0.0f)); + vertex[2] = Gfx::VertexCol(Math::Vector(p2.x, p1.y, 0.0f), color, Gfx::Color(), Math::Point(0.0f, 0.0f)); + vertex[3] = Gfx::VertexCol(Math::Vector(p2.x, p2.y, 0.0f), color, Gfx::Color(), Math::Point(0.0f, 0.0f)); device = m_engine->GetDevice(); device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4); diff --git a/src/ui/color.h b/src/ui/color.h index c282429b..ad99dddd 100644 --- a/src/ui/color.h +++ b/src/ui/color.h @@ -19,8 +19,8 @@ #pragma once +#include "ui/control.h" -#include "control.h" namespace Gfx{ class CEngine; diff --git a/src/ui/compass.cpp b/src/ui/compass.cpp index 19697103..102b697c 100644 --- a/src/ui/compass.cpp +++ b/src/ui/compass.cpp @@ -15,7 +15,7 @@ // * 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 "compass.h" +#include "ui/compass.h" #include "common/event.h" #include "common/iman.h" diff --git a/src/ui/compass.h b/src/ui/compass.h index e8ccc177..09eec9d1 100644 --- a/src/ui/compass.h +++ b/src/ui/compass.h @@ -19,8 +19,8 @@ #pragma once +#include "ui/control.h" -#include "control.h" namespace Gfx { class CEngine; diff --git a/src/ui/control.h b/src/ui/control.h index 48c3ef9e..e1000027 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index 2cba9e31..43909b25 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -28,7 +28,6 @@ #include "window.h" #include "common/iman.h" -#include "common/language.h" #include "common/misc.h" #include "common/restext.h" @@ -44,7 +43,7 @@ #include "script/cbottoken.h" - +#include namespace Ui { diff --git a/src/ui/displaytext.cpp b/src/ui/displaytext.cpp index aa51653f..63075ee7 100644 --- a/src/ui/displaytext.cpp +++ b/src/ui/displaytext.cpp @@ -28,7 +28,6 @@ #include "common/event.h" #include "common/iman.h" -#include "common/misc.h" #include "common/restext.h" #include "graphics/engine/engine.h" @@ -180,7 +179,7 @@ void CDisplayText::DisplayError(Error err, Math::Vector goal, float height, // Displays text. -void CDisplayText::DisplayText(char *text, CObject* pObj, +void CDisplayText::DisplayText(const char *text, CObject* pObj, float time, TextType type) { Math::Vector pos; @@ -196,7 +195,7 @@ void CDisplayText::DisplayText(char *text, CObject* pObj, // Displays text. -void CDisplayText::DisplayText(char *text, Math::Vector goal, float height, +void CDisplayText::DisplayText(const char *text, Math::Vector goal, float height, float dist, float time, TextType type) { CObject* toto; diff --git a/src/ui/displaytext.h b/src/ui/displaytext.h index b8af97e1..5714cc53 100644 --- a/src/ui/displaytext.h +++ b/src/ui/displaytext.h @@ -21,7 +21,7 @@ #include "common/event.h" -#include "common/misc.h" +#include "common/global.h" #include "sound/sound.h" @@ -64,8 +64,8 @@ public: void DisplayError(Error err, CObject* pObj, float time=10.0f); void DisplayError(Error err, Math::Vector goal, float height=15.0f, float dist=60.0f, float time=10.0f); - void DisplayText(char *text, CObject* pObj, float time=10.0f, TextType type=TT_INFO); - void DisplayText(char *text, Math::Vector goal, float height=15.0f, float dist=60.0f, float time=10.0f, TextType type=TT_INFO); + void DisplayText(const char *text, CObject* pObj, float time=10.0f, TextType type=TT_INFO); + void DisplayText(const char *text, Math::Vector goal, float height=15.0f, float dist=60.0f, float time=10.0f, TextType type=TT_INFO); void HideText(bool bHide); void ClearText(); bool ClearLastText(); diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index cc911a48..d298ad30 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -20,6 +20,8 @@ #include "edit.h" +#include + namespace Ui { const float MARGX = (5.0f/640.0f); @@ -1778,7 +1780,8 @@ bool CEdit::ReadText(const char *filename, int addSize) { if ( SearchKey(buffer+i+5, key) ) { - res = m_app->GetKey(key, 0); // TODO + res = 0; + //res = m_app->GetInputBinding(key).key; // TODO input bindings if ( res != 0 ) { if ( GetResource(RES_KEY, res, iName) ) @@ -1797,7 +1800,8 @@ bool CEdit::ReadText(const char *filename, int addSize) m_format[j] = font; j ++; - res = m_app->GetKey(key, 1); // TODO + // res = m_app->GetInputBinding(key).joy; // TODO input bindings + res = 0; if ( res != 0 ) { if ( GetResource(RES_KEY, res, iName) ) diff --git a/src/ui/edit.h b/src/ui/edit.h index 22ac5777..2de30285 100644 --- a/src/ui/edit.h +++ b/src/ui/edit.h @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/src/ui/editvalue.cpp b/src/ui/editvalue.cpp index f747c941..e5780fd4 100644 --- a/src/ui/editvalue.cpp +++ b/src/ui/editvalue.cpp @@ -22,7 +22,6 @@ //#include //#include -//#include "common/struct.h" //#include "old/d3dengine.h" //#include "old/math3d.h" #include "common/event.h" diff --git a/src/ui/group.cpp b/src/ui/group.cpp index da0aa37a..facf2085 100644 --- a/src/ui/group.cpp +++ b/src/ui/group.cpp @@ -16,22 +16,18 @@ // group.cpp +#include "ui/group.h" -//#include -#include -//#include - -//#include "common/struct.h" -//#include "old/d3dengine.h" -#include "graphics/engine/engine.h" -//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" -#include "ui/group.h" +#include "graphics/engine/engine.h" +#include +#include + namespace Ui { // Object's constructor. diff --git a/src/ui/image.cpp b/src/ui/image.cpp index 5bf6e450..473492f9 100644 --- a/src/ui/image.cpp +++ b/src/ui/image.cpp @@ -18,20 +18,16 @@ // image.cpp -//#include #include -//#include -//#include "common/struct.h" -//#include "old/d3dengine.h" #include "graphics/engine/engine.h" -//#include "old/math3d.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" #include "ui/image.h" +#include namespace Ui { diff --git a/src/ui/interface.h b/src/ui/interface.h index 7123c05f..aa0bd985 100644 --- a/src/ui/interface.h +++ b/src/ui/interface.h @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/ui/key.cpp b/src/ui/key.cpp index 89473a80..77c17b0e 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -20,6 +20,8 @@ #include +#include + namespace Ui { void GetKeyName(char *name, int key) @@ -116,6 +118,7 @@ bool CKey::TestKey(int key) { if ( key == KEY(PAUSE) || key == KEY(PRINT) ) return true; // blocked key + /* TODO: input bindings for (int i = 0; i < 20; i++) { for (int j = 0; j < 2; j++) { if (key == m_app->GetKey(i, j) ) // key used? @@ -126,7 +129,7 @@ bool CKey::TestKey(int key) m_app->SetKey(i, 0, m_app->GetKey(i, 1)); // shift m_app->SetKey(i, 1, 0); } - } + }*/ return false; // not used } diff --git a/src/ui/list.cpp b/src/ui/list.cpp index 73a48e3e..cbf82680 100644 --- a/src/ui/list.cpp +++ b/src/ui/list.cpp @@ -20,6 +20,7 @@ #include +#include namespace Ui { diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index 6b071c17..84a4871c 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -17,9 +17,7 @@ // maindialog.cpp -#include "common/struct.h" #include "common/global.h" -#include "common/language.h" #include "common/event.h" #include "common/misc.h" #include "common/profile.h" diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h index bddd61fd..5b33f926 100644 --- a/src/ui/maindialog.h +++ b/src/ui/maindialog.h @@ -19,7 +19,6 @@ #pragma once -#include "common/struct.h" #include "object/robotmain.h" diff --git a/src/ui/mainmap.cpp b/src/ui/mainmap.cpp index e874fba8..601c0358 100644 --- a/src/ui/mainmap.cpp +++ b/src/ui/mainmap.cpp @@ -36,8 +36,8 @@ CMainMap::CMainMap() m_iMan->AddInstance(CLASS_MAP, this); m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); - m_event = (CEvent*)m_iMan->SearchInstance(CLASS_EVENT); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); + m_event = (CEventQueue*)m_iMan->SearchInstance(CLASS_EVENT); + m_engine = (Gfx::CEngine*)m_iMan->SearchInstance(CLASS_ENGINE); m_mapMode = 1; m_bFixImage = false; diff --git a/src/ui/mainmap.h b/src/ui/mainmap.h index 91e93c9d..35aae4cd 100644 --- a/src/ui/mainmap.h +++ b/src/ui/mainmap.h @@ -19,16 +19,12 @@ #pragma once -#include +#include "common/event.h" +#include "graphics/core/color.h" +#include "math/point.h" +#include "object/object.h" +#include "ui/interface.h" -#include -#include - -#include - -#include - -#include namespace Ui { @@ -60,8 +56,8 @@ class CMainMap protected: CInstanceManager* m_iMan; - CEvent* m_event; - CD3DEngine* m_engine; + CEventQueue* m_event; + Gfx::CEngine* m_engine; CInterface* m_interface; int m_mapMode; diff --git a/src/ui/map.cpp b/src/ui/map.cpp index 5139d88f..5440854e 100644 --- a/src/ui/map.cpp +++ b/src/ui/map.cpp @@ -20,7 +20,7 @@ #include "map.h" - +#include namespace Ui { @@ -48,7 +48,7 @@ CMap::CMap() : CControl() m_waterColor.g = 0.80f; m_waterColor.b = 1.00f; // blue - m_half = m_terrain->GetMosaic() * m_terrain->GetBrick() * m_terrain->GetSize() / 2.0f; + m_half = m_terrain->GetMosaicCount() * m_terrain->GetBrickCount() * m_terrain->GetBrickSize() / 2.0f; m_highlightRank = -1; FlushObject(); @@ -84,7 +84,7 @@ void CMap::SetOffset(float ox, float oy) { m_offset.x = ox; m_offset.y = oy; - m_half = m_terrain->GetMosaic() * m_terrain->GetBrick() * m_terrain->GetSize() / 2.0f; + m_half = m_terrain->GetMosaicCount() * m_terrain->GetBrickCount() * m_terrain->GetBrickSize() / 2.0f; } // Choice of the global angle of rotation. @@ -119,7 +119,7 @@ void CMap::SetDebug(bool bDebug) void CMap::SetZoom(float value) { m_zoom = value; - m_half = m_terrain->GetMosaic() * m_terrain->GetBrick() * m_terrain->GetSize() / 2.0f; + m_half = m_terrain->GetMosaicCount() * m_terrain->GetBrickCount() * m_terrain->GetBrickSize() / 2.0f; } float CMap::GetZoom() @@ -999,9 +999,13 @@ void CMap::UpdateTerrain() int x, y; if ( m_fixImage[0] != 0 ) return; // still image? - if ( !m_engine->OpenImage("map.tga") ) return; - scale = m_terrain->GetScaleRelief(); + // TODO: map texture manipulation + return; + + // if ( !m_engine->OpenImage("map.tga") ) return; + + scale = m_terrain->GetReliefScale(); water = m_water->GetLevel(); color.a = 0.0f; @@ -1040,12 +1044,12 @@ void CMap::UpdateTerrain() color.b = m_waterColor.b + (intensity-0.5f); } - m_engine->SetDot(x, y, color); + //m_engine->SetDot(x, y, color); } } - m_engine->CopyImage(); // copy the ground drawing - m_engine->CloseImage(); + //m_engine->CopyImage(); // copy the ground drawing + //m_engine->CloseImage(); } // Updates the field in the map. @@ -1058,10 +1062,14 @@ void CMap::UpdateTerrain(int bx, int by, int ex, int ey) int x, y; if ( m_fixImage[0] != 0 ) return; // still image? - if ( !m_engine->OpenImage("map.tga") ) return; - m_engine->LoadImage(); - scale = m_terrain->GetScaleRelief(); + // TODO: map texture manipulation + return; + + //if ( !m_engine->OpenImage("map.tga") ) return; + //m_engine->LoadImage(); + + scale = m_terrain->GetReliefScale(); water = m_water->GetLevel(); color.a = 0.0f; @@ -1100,12 +1108,12 @@ void CMap::UpdateTerrain(int bx, int by, int ex, int ey) color.b = m_waterColor.b + (intensity-0.5f); } - m_engine->SetDot(x, y, color); + //m_engine->SetDot(x, y, color); } } - m_engine->CopyImage(); // copy the ground drawing - m_engine->CloseImage(); + //m_engine->CopyImage(); // copy the ground drawing + //m_engine->CloseImage(); } diff --git a/src/ui/scroll.cpp b/src/ui/scroll.cpp index b54c8685..86595f9d 100644 --- a/src/ui/scroll.cpp +++ b/src/ui/scroll.cpp @@ -17,20 +17,14 @@ // scroll.cpp +#include "ui/scroll.h" -//#include -//#include -//#include - -//#include "common/struct.h" -//#include "old/d3dengine.h" -//#include "old/math3d.h" -#include "graphics/engine/engine.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" +#include "graphics/engine/engine.h" #include "ui/button.h" -#include "ui/scroll.h" + namespace Ui { diff --git a/src/ui/shortcut.cpp b/src/ui/shortcut.cpp index 05e5d2d8..7001e970 100644 --- a/src/ui/shortcut.cpp +++ b/src/ui/shortcut.cpp @@ -17,21 +17,15 @@ // shortcut.cpp +#include "ui/shortcut.h" -//#include -//#include -//#include -#include -//#include "common/struct.h" -//#include "old/d3dengine.h" -//#include "old/math3d.h" -#include "graphics/engine/engine.h" -#include "graphics/core/device.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" -#include "ui/shortcut.h" +#include "graphics/engine/engine.h" +#include "graphics/core/device.h" +#include namespace Ui { diff --git a/src/ui/shortcut.h b/src/ui/shortcut.h index 9ee97e0c..7e7899e8 100644 --- a/src/ui/shortcut.h +++ b/src/ui/shortcut.h @@ -19,9 +19,9 @@ #pragma once -#include +#include "ui/control.h" -#include +#include "common/event.h" namespace Ui { diff --git a/src/ui/slider.cpp b/src/ui/slider.cpp index 27bcfbb5..2bf0cc89 100644 --- a/src/ui/slider.cpp +++ b/src/ui/slider.cpp @@ -17,22 +17,16 @@ // slider.cpp +#include "ui/slider.h" -//#include -#include -//#include - -//#include "common/struct.h" -//#include "old/d3dengine.h" -//#include "old/math3d.h" -#include "graphics/engine/engine.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" -//#include "old/text.h" +#include "graphics/engine/engine.h" #include "graphics/engine/text.h" #include "ui/button.h" -#include "ui/slider.h" + +#include namespace Ui { diff --git a/src/ui/slider.h b/src/ui/slider.h index 0de9b3c7..b0de011f 100644 --- a/src/ui/slider.h +++ b/src/ui/slider.h @@ -26,6 +26,8 @@ namespace Ui { +class CButton; + class CSlider : public CControl { public: diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp index 50627988..2b90b8f7 100644 --- a/src/ui/studio.cpp +++ b/src/ui/studio.cpp @@ -22,6 +22,10 @@ #include