Commit Graph

272 Commits (3f04654cd372ca688b9f79ef128e7e4eee896f36)

Author SHA1 Message Date
krzys-h 2ed1494574 Syntax highlighting for "super" keyword, closes #680 2015-11-21 14:00:38 +01:00
Piotr Dziwinski d11ebc891c Bring to zero some types of issues reported by colobot-lint 2015-10-04 00:09:10 +02:00
krzys-h 2c7deea6a9 Removed some unused functions from CRobotMain 2015-10-01 19:37:31 +02:00
Piotr Dziwinski 61a3ba2800 Fix undefined function colobot-lint issues 2015-09-29 21:44:24 +02:00
krzys-h 2cb2782c9d Restored old Ceebot-Teen objects
In preparations for new programming course
2015-09-28 22:08:59 +02:00
krzys-h ff17961584 Refactored CPauseManager 2015-08-31 21:47:55 +02:00
krzys-h 6711154762 Fixed produce() and NewScript not marking programs as loaded from level files (closes #613); refactored NewScript to std::vector and std::string 2015-08-29 16:52:07 +02:00
krzys-h 06e10a515e Fixed crash when loading SatCom files with both images and code, closes #587 2015-08-25 11:22:35 +02:00
krzys-h 270c77da5b Fixed memory corruption in produce(), closes #600 2015-08-25 10:49:59 +02:00
krzys-h 07141f6d90 Fixed wrong energy level in CBot (mentioned in #601) 2015-08-24 21:14:19 +02:00
Piotr Dziwinski b93f610930 Fix license header in all files 2015-08-22 16:40:02 +02:00
krzys-h d6a946618e Syntax highlighting in SatCom 2015-08-18 22:35:38 +02:00
krzys-h c5da68d516 New CBot syntax highlighting 2015-08-18 22:12:00 +02:00
Piotr Dziwinski a63a959dbe Apply clang-modernize -use-nullptr 2015-08-17 22:40:52 +02:00
krzys-h 1059ae37c1 Shielder subclass 2015-08-17 14:06:31 +02:00
krzys-h 63bee182d2 Moved SetFixed/GetFixed to CBaseAlien 2015-08-17 13:19:21 +02:00
krzys-h ad84478c71 Removed Get/SetInfoReturn 2015-08-17 11:44:05 +02:00
krzys-h 3f303ea824 Removed some unneccessary includes 2015-08-16 16:35:39 +02:00
Piotr Dziwinski 2289d69735 Replace NULL -> nullptr 2015-08-16 12:43:42 +02:00
krzys-h 0eaf0d6f65 Split Programmable and ProgramStorage 2015-08-15 21:29:08 +02:00
krzys-h 856c5baa0e Removed CTaskManager 2015-08-15 20:30:15 +02:00
krzys-h 9a15db1bea Split global.h 2015-08-15 14:02:07 +02:00
Piotr Dziwinski efedb44cce Add proper initializations and remove manual memory management in remaining classes
Except CBot-related stuff of course
2015-08-14 23:44:00 +02:00
Piotr Dziwinski 870f89ac4a Further fixes for GCC 4.7 build 2015-08-14 19:34:17 +02:00
krzys-h 57646c0c7b Refactored object creation 2015-08-14 18:20:44 +02:00
krzys-h 275e792a81 Removed old Scrap objects; cleaned up some more if()'s 2015-08-13 19:41:21 +02:00
krzys-h bfd3a5b23c Refactored ExplodeObject 2015-08-13 18:54:44 +02:00
krzys-h e5e1d4973f CDestroyableObject, CFragileObject, CShieldedObject and CShieldedAutoRegenObject 2015-08-13 13:41:25 +02:00
krzys-h ff957afefc Moved files not directly related to CObject into src/level/ directory 2015-08-13 11:47:32 +02:00
krzys-h e937db94c8 Moved GetPhysics() and GetMotion() to CMovableObject; moved trace drawing to CTraceDrawingObject 2015-08-13 10:49:45 +02:00
krzys-h f7d2f501bb Moved common interface implementations to separate classes
Additionaly, merged all "inappropariate bot" errors into one and renamed ERR_GENERIC -> ERR_UNKNOWN
2015-08-12 16:54:44 +02:00
krzys-h a9673d5f72 Moved StartDetectEffect to CRobotMain 2015-08-11 23:13:57 +02:00
krzys-h 7e18757d29 CScript user pointer cleanup; moved some functions from COldObjectInterface to main CObject
* moved (Get|Set)Clip [renamed to (Get|Set)Collisions], (Get|Set)Team, (Get|Set)Proxy(Activate|Distance) and GetBotVar to main CObject class
* refactored scripting to pass CScript* as the user pointer, removing the need for GetRunScript()
* changed accessing of "object" class in CBot to use ->GetUserPtr()
* refactored object limits to remove (Start|Stop)ShowLimit from COldObject
* added notes on possible interfaces for most of the other COldObjectInterface functions
2015-08-11 17:51:39 +02:00
krzys-h 15c1c7ee03 CMovableObject, CControllableObject 2015-08-10 23:21:15 +02:00
krzys-h abb272600e Merged CBrain into CProgrammableObject 2015-08-10 18:16:00 +02:00
krzys-h 2b44a7be3d Removed m_event from script.h 2015-08-10 13:52:03 +02:00
krzys-h 3a5f618f65 CTaskExecutorObject interface; some general task and CBrain cleanup 2015-08-10 13:46:39 +02:00
krzys-h 73e0abc510 Fixed AlienQueen crash 2015-08-10 13:33:11 +02:00
krzys-h e5d652acef Fixed a crash when trying to infect an empty program 2015-08-06 22:50:22 +02:00
Piotr Dziwinski f95980456a Replace anonymous union in Event with pointer to appropriate struct 2015-08-06 19:11:50 +02:00
krzys-h dc85aa2138 Moved all UI controls to a subdirectory 2015-08-06 13:25:24 +02:00
Piotr Dziwinski bdeeaf690b Get rid of memsets 2015-08-06 09:37:25 +02:00
krzys-h 47d79c9977 Added #Include support in level files 2015-08-05 19:27:26 +02:00
krzys-h 72210d523f Fixed this.orientation values outside of 0-360 range 2015-08-03 23:10:24 +02:00
krzys-h 4bdadc8cc8 Updated help file paths 2015-08-03 20:23:35 +02:00
krzys-h 794d1f3cbe Fixed "this" (#547) 2015-08-03 19:56:35 +02:00
Piotr Dziwinski 11b0398c03 Include refactoring
* reordered includes according to correct style
 * removed some unnecessary includes
2015-08-02 17:49:07 +02:00
Piotr Dziwinski 7d8b56d9ab More style fixes 2015-08-02 12:06:14 +02:00
Victor Vieux 7c421b7151 fix highlighting
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-29 00:37:56 -07:00
Victor Vieux 38c64940a5 this is not a type
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-29 00:37:29 -07:00
MrSimbax d7cdcab2c5 Fix flatspace editor hint 2015-07-27 18:49:02 +02:00
MrSimbax a5d579fc31 Add filter parameter to radar editor hint 2015-07-27 18:12:38 +02:00
krzys-h dfd73118a6 Added flatspace()
Works like space(), but makes sure there is enough flat space for building
2015-07-22 18:26:05 +02:00
krzys-h 59d5545eca Fixed code pause editor bug (#527) 2015-07-22 18:01:24 +02:00
krzys-h 393317fa48 Added researched(), canresearch() and buildingenabled()
closes #524
2015-07-22 17:08:51 +02:00
krzys-h d5d8c0b29f Removed the need for progfunc() in object.factory()
Changes to object.factory():
* The second argument will be automatically interpreted as public function name, file name or program code
* The program starts earlier (when the robot is ready, not when the doors open)
* Refactored to std::string
2015-07-22 16:16:16 +02:00
krzys-h 329393a65a Added object.velocity, closes #523 2015-07-22 13:46:13 +02:00
krzys-h abdb4e9782 Moved "object" class management to CScriptFunctions 2015-07-22 13:25:51 +02:00
krzys-h 347654db15 Refactored CBot class "file" to PHYSFS 2015-07-19 22:34:41 +02:00
krzys-h 0554a77813 Refactor reading "object" class in CBot 2015-07-19 21:53:08 +02:00
krzys-h 264f5dc278 Removed obsolete save directory configuration
This was used in one of the CeeBots probably for setting up networked installations in schools. This is now obsolete since now those are only paths relative to main PHYSFS save directory.
2015-07-19 16:05:09 +02:00
krzys-h c8f6e8124e Replaced CLogger::GetInstancePointer() calls with GetLogger() 2015-07-16 22:12:44 +02:00
Piotr Dziwinski 31bc740f4b Fix focusing issues with controls and cheat console 2015-07-15 19:11:48 +02:00
Piotr Dziwinski d5da68d59a Refactor old Get/SetAngle/Zoom -> Get/SetPartRotation/Scale 2015-07-14 21:35:43 +02:00
krzys-h 4506a4b8bd TraceColor enum 2015-07-14 13:53:50 +02:00
krzys-h 78f4749134 Disallow controlling enemy objects from CBot 2015-07-13 18:53:56 +02:00
krzys-h 0e66104829 Hacked CBot engine to get pointers to CObject* in calls to class members 2015-07-13 18:40:13 +02:00
krzys-h 79c131394d Separate DoneResearch for teams 2015-07-13 18:13:28 +02:00
krzys-h 3479c51bb9 Refactored EnableBuild, EnableResearch and DoneResearch
* Moved from global variables to CRobotMain members
* Added functions for accessing the values
* Cleaned up some code related to building objects, BotFactory, ResearchCenter and AutoLab
2015-07-13 17:38:19 +02:00
Piotr Dziwinski e72936c240 Clean up more functions from COldObjectInterface 2015-07-12 20:05:12 +02:00
Piotr Dziwinski 394f911d7b Remove unnecessary #include "object/object.h" 2015-07-12 14:23:18 +02:00
Piotr Dziwinski 3ed8980c46 Make CTask classes use COldObject 2015-07-12 14:22:12 +02:00
Piotr Dziwinski 9a7c1961a4 GetPostion(), GetRotation() and GetScale() in CObject interface
Also replace old calls like GetPosition(0) to GetPosition()
2015-07-12 11:05:50 +02:00
krzys-h 639de56e6c Fixed file.readln() help file 2015-07-11 18:36:36 +02:00
krzys-h 9537048964 Cleaned up GetHelpFilename 2015-07-10 23:30:11 +02:00
Piotr Dziwinski 5d30de0d09 CProgrammableObject interface 2015-07-10 20:46:33 +02:00
krzys-h 26619e3f88 Removed old level parser functions (cmdtoken.cpp) 2015-07-10 11:51:59 +02:00
krzys-h e6c6b77be2 Removed old Teen objects
The models for them were removed a looong time ago, but the code was left for no reason
2015-07-10 11:37:32 +02:00
Piotr Dziwinski 9b232ee3f5 Sound enum refactoring
* rename Sound -> SoundType
 * add parsing string to SoundType
2015-07-09 21:32:25 +02:00
krzys-h 5da4adad41 Added Any constant in CBot 2015-07-07 19:01:18 +02:00
krzys-h 79c5fabfe6 Support for team filters in radar() 2015-07-07 18:54:36 +02:00
krzys-h 9a873c9bea Added object.team in CBot 2015-07-07 18:11:28 +02:00
krzys-h a32efc09a2 Refactored EndMissionTake and AudioChange 2015-07-07 16:17:19 +02:00
dreamer.dead 958ef43c1e Address review remarks, fix names and errors in code. 2015-07-06 22:00:33 +03:00
dreamer.dead b3c2d2c450 Set CBotVar::m_binit type to specific enum instead of plain int. 2015-07-05 23:39:55 +03:00
Piotr Dziwinski b00d62b9bb Further cleaning of CObject interface
* remove unused functions/members
 * delegate some functions to other objects
 * change some names to be more meaningful
2015-06-29 22:46:13 +02:00
Piotr Dziwinski f871ba4729 Create CExchangePost subclass 2015-06-27 23:22:55 +02:00
krzys-h 4fc8364136 Fixed Destroyer object destruction (fixes #308) 2015-06-26 19:20:16 +02:00
Piotr Dziwinski 67be6fca2a CObject interface cleanup
* remove unused functions and members
 * make protected functions used only locally or in factory
 * rename some functions to be more meaningful
 * refactor some enums to enum classes
2015-06-25 20:43:50 +02:00
Piotr Dziwinski 7814c0c7bd Remove unused field "material" from CObject class in CBot 2015-06-25 18:07:48 +02:00
Piotr Dziwinski 8806d1708d Proper CAuto, CBrain, CMotion, CPhysics, CPyro lifetime management
* change manual memory manament to std::unique_ptr
 * create CPyroManager
 * finally get rid of CInstanceManager
2015-06-22 21:58:58 +02:00
Piotr Dziwinski 0c9a9bce98 Proper CObject lifetime management
CObjectManager is now the only class responsible for storing CObjects
2015-06-21 15:13:55 +02:00
Piotr Dziwinski fed67e6640 Rename objman.h/cpp -> object_manger.h/cpp 2015-06-20 20:02:40 +02:00
Piotr Dziwinski f9b09d08f0 Create CObjectFactory
* move functions creating objects to new class CObjectFactory
 * replace calls to CObject::Create*() with CObjectManager::Create()
 * move creation/deletion of some objects to better places
 * make CModelManager non-singleton
 * clean up some code in changed functions
2015-06-20 19:37:25 +02:00
Tomasz Kapuściński f69dfe3421 shield() rejects incorrect robots that try to invoke it (should fix #475) 2015-05-28 14:03:05 +02:00
Tomasz Kapuściński 361a8c4ddd Another fix to warning 2015-05-19 17:24:07 +02:00
Tomasz Kapuściński 3a1dffd8df Fixing some warnings 2015-05-19 17:15:08 +02:00
Tomasz Kapuściński c28e1f6150 Added CBot functions for rounding: floor(), ceil(), round(), and trunc() 2015-05-06 23:29:55 +02:00
Tomasz Kapuściński 1db9d8bdca Changed CBot file handling, potentially solved problems with 64-bit executables 2015-05-06 20:39:09 +02:00
Tomasz Kapuściński 05bf5be6f4 Added atan2() function to CBot 2015-05-06 13:02:44 +02:00