Commit Graph

153 Commits (6978c28ee0a5d2b8784605cb00655a8d73fffad7)

Author SHA1 Message Date
AbigailBuccaneer 6978c28ee0 Compile with -Wsuggest-override under GCC
Clang by default compiles with -Winconsistent-missing-override, which
warns when a class declares virtual functions that override those in the
base class, and some but not all of them are explicitly declared
`override`.

GCC doesn't support this option, but has a stronger version,
-Wsuggest-override. In combination with -Werror, this means that any
virtual function that overrides another *must* be explicitly declared as
`override`.

This commit enables -Wsuggest-override where available. This means that
GCC users can't break the Clang build with inconsistent overrides (see
 #1113 and #1114) and consequently that any build that passes the pull
request CI build on Jenkins won't break because of inconsistent
overrides.
2018-04-19 19:58:44 +01:00
krzys-h bb35585194 Fix object.factory() code type detection, closes #938 2017-06-03 21:43:10 +02:00
krzys-h 46aa6fc907 Some CRobotMain cleanup
* improved documentation
* renamed cheat variables to include the word "cheat" to make it clearer what they do
* removed some useless members
2016-12-27 23:38:57 +01:00
krzys-h b6cda6cd4c Add error when object is busy (#871) 2016-12-27 13:36:46 +01:00
krzys-h 646e5104f6 Some CCamera cleanup and docs 2016-05-28 18:44:38 +02:00
krzys-h 04d7c343ef Removed misc.cpp / misc.h 2016-04-09 18:46:12 +02:00
KarolTrzeszczkowski 1960b373f1 Solves #700
It turns out, that tower is not over powered in code battle mode. It never hits flying enemy robot.
2016-04-03 13:31:08 +02:00
krzys-h 98dd9f90c8 Fixed code style warnings 2016-04-03 13:06:55 +02:00
krzys-h 45c93f58ec Fixed Houston lights when object is rotated 2016-03-27 18:54:56 +02:00
krzys-h 977607a934 Updated license headers 2016-02-13 14:11:30 +01:00
Piotr Dziwinski d11ebc891c Bring to zero some types of issues reported by colobot-lint 2015-10-04 00:09:10 +02:00
Piotr Dziwinski 94b3f82988 Fix colobot-lint issues in restored code 2015-09-29 20:55:51 +02:00
krzys-h 2cb2782c9d Restored old Ceebot-Teen objects
In preparations for new programming course
2015-09-28 22:08:59 +02:00
Piotr Dziwinski 66ce745be0 Introduce forward declarations as suggested by colobot-lint 2015-09-27 16:28:14 +02:00
krzys-h ff17961584 Refactored CPauseManager 2015-08-31 21:47:55 +02:00
Piotr Dziwinski a47da3fd3f Whitespace fixes 2015-08-30 22:18:49 +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
Piotr Dziwinski a8eb7499ac Fix #607 2015-08-29 10:49:04 +02:00
krzys-h 65d26733fa Fixed Derrick output direction, closes #605
I won't even ask who designed it like that, okay?
2015-08-25 12:37:55 +02:00
krzys-h b9e7143734 Fixed PowerCaptor not recharging transported objects, closes #594 2015-08-25 10:32:50 +02:00
krzys-h 5a29bee3b4 Fixed RepairCenter repairing itself, closes #579 and #589 2015-08-25 10:27:14 +02:00
krzys-h 2722e72afb Fixed Destroyer destroying itself, closes #599 2015-08-24 20:27:57 +02:00
Piotr Dziwinski b93f610930 Fix license header in all files 2015-08-22 16:40:02 +02:00
krzys-h eef76a9b29 Fixed not working Converter, closes #574 2015-08-18 19:38:58 +02:00
krzys-h 28925106e4 Cleaned up some long lists of ifs 2015-08-18 12:29:41 +02:00
krzys-h a5c84b9a1e Removed unused OBJECT_FIX and OBJECT_FRET 2015-08-18 11:43:41 +02:00
Piotr Dziwinski a63a959dbe Apply clang-modernize -use-nullptr 2015-08-17 22:40:52 +02:00
Piotr Dziwinski ba3284b8b8 Apply clang-modernize -add-override 2015-08-17 22:12:09 +02:00
krzys-h d5a468df46 Fixed regex in checking object.factory parameter 2015-08-17 19:30:27 +02:00
krzys-h e11d2ec33e Refactor object dying status and GetActive 2015-08-16 20:24:48 +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
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 5d52214737 CFlyingObject; CJetFlyingObject 2015-08-12 19:09:35 +02:00
krzys-h 60797f72d3 Removed some old, unused code 2015-08-12 17:25:41 +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 63d83185b5 Move GetTooltipText and Get/SetLock to CObject; remove Get/SetEnable 2015-08-12 00:16:57 +02:00
krzys-h 364f87c49b CPowerContainerObject interface 2015-08-11 22:51:16 +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
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