Commit Graph

278 Commits (b925838a913a61a993acdeac1ea06caa8c10f09e)

Author SHA1 Message Date
melex750 1058a326ad Add binary and character literals in CBOT 2019-04-11 05:14:11 -04:00
melex750 c0cdd84e85 Add missing primitive data types in CBOT 2019-04-11 04:19:29 -04:00
melex750 a66b3d0672 Refactor SaveState and RestoreState to use streams 2019-04-11 04:13:13 -04:00
tomangelo 04b8bf6c42
Merge pull request #1235 from vkuzkokov/master
Put pitch and roll in [-180,180) range.
2019-01-29 20:31:37 +01:00
Vladislav Kuzkokov e3f53dc203 Put pitch and roll in [-180,180) range.
Reasonable values lie close to either side of 0.
2019-01-06 07:09:57 +01:00
tomangelo2 fb00898035 Fix switch case documentation shortcut
Also some polishing of loops help texts
2018-07-21 00:09:37 +02:00
krzys-h 319d8e6854 Fix delete() not returning sometimes, closes #1067 2018-05-09 23:12:26 +02:00
krzys_h 8b86a1f222
Merge pull request #1142 from AbigailBuccaneer/Wmissing-declarations
Compile with -Wmissing-declarations
2018-04-24 14:12:43 +02:00
krzys_h 6289ea91b1
Merge pull request #1140 from AbigailBuccaneer/Wsuggest-override
Compile with -Wsuggest-override under GCC
2018-04-24 14:12:31 +02:00
AbigailBuccaneer ea64edaa0b Compile with -Wmissing-declarations
-Wmissing-declarations enforces that every function (except for static
functions) must be declared separately before it's defined. This
essentially enforces that every function must be either static, or
declared in a header elsewhere.

This helps the optimizer, as it can do a better job of inlining if it
knows that a function won't be used outside of a given file. It also
helps -Wunused-function (which is enabled by -Wall) find more unused
functions.

Note that Clang spells this option -Wmissing-prototypes, which
confusingly is the name of a related but different warning option under
GCC.
2018-04-21 16:49:27 +01:00
krzys-h e964d3e48c Fix colobot-lint warnings 2018-04-20 02:21:12 +02:00
krzys-h 1c2bdc9cab Update license headers 2018-04-20 02:08:50 +02:00
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
melex750 e3c44e956f Add syntax highlighting for escape codes 2017-07-22 14:30:05 -04:00
krzys-h a95f736cbe Fix delete(this.id), closes #925 2017-06-03 20:05:54 +02:00
melex750 30210d0de7 Add searchall() and improve search() function 2017-05-25 02:01:42 -04:00
krzys-h 2d7911f155 Fix delete() in CBot not destroying PowerCells properly 2017-05-23 20:19:47 +02:00
krzys-h 108551c199 Fix @tomangelo2's code style
see 47a8f70f0f
2017-05-22 11:11:44 +02:00
Abigail 11d950221b Fix all compiler warnings and enable -Werror (#955)
This removes all compilation warnings on:
* g++ 4.7.4, 4.8.5, 4.9.4, 5.4.1, 6.3.0, 7.0.1-svn246759
* clang++ 3.9.1, 4.0.0, 5.0.0-svn303007
2017-05-22 11:10:35 +02:00
tomangelo2 47a8f70f0f Display warning if there is not enough energy to shoot
Fix issue #949
2017-05-20 20:41:30 +02:00
tomangelo2 588bf30b94 Fixed some functions doesn't returning 0 if no error
Fix issue #917
2017-03-02 23:01:55 +01:00
krzys-h 1b074bd94d Fix crash on loading saves with produce()d objects (#765)
Thanks @melex750!
2016-11-11 13:38:43 +01:00
krzys-h a96835e35f Change CBot file log messages
Open mode is logged now. Additionally fixed incorrect file path in log when deleting files.
2016-09-30 17:08:37 +02:00
MatiRg d107605007 Add file append mode in CBot (#838) 2016-09-30 17:03:13 +02:00
MatiRg dc415c3d2a Remove character limit in CEdit (#836) 2016-09-25 19:13:04 +02:00
krzys-h 14e2910f83 Proper plural form translations for ObligatoryToken 2016-04-09 16:28:11 +02:00
krzys-h bd9184bd92 Refactored part of CScript to std::string 2016-04-08 22:27:42 +02:00
krzys-h 7f38aca766 Improvements to ObligatoryToken/ProhibitedToken
Now you can specify exactly how many times given instruction can occur
2016-04-08 22:15:58 +02:00
krzys-h 4c8da2c503 LevelController improvements; minor EndMissionTake cleanup
* using LevelController script in the level doesn't forcefully disable EndMissionTake and AudioChange anymore
* cleaned up some code related to processing EndMissionTake commands
2016-04-08 20:56:09 +02:00
krzys-h 6e89d097e8 Cleaned up (now unnecessary) .c_str() converstions to CList::SetItemName 2016-03-15 20:47:06 +01:00
krzys-h fef8a8e355 Fixes to variable list in CBot debugger
* fixed stack overflow with circular references (closes #434)
* fixed displaying boolean variables
* fixed buffer overflows with entries longer than 100 characters
* removed hard-limit to 100 entries with at most 100 characters in CList (this also allows you to have more than 100 programs in a robot, up to 999)
2016-03-15 20:39:31 +01:00
krzys-h 977607a934 Updated license headers 2016-02-13 14:11:30 +01:00
krzys-h 6bdebcf8e4 Fix delete() CBot command 2016-01-30 17:42:35 +01:00
krzys-h b96305060b Fix colobot-lint warnings 2016-01-23 21:59:02 +01:00
krzys-h 048534e89d Fixed some errors reported by colobot-lint 2016-01-23 20:58:03 +01:00
krzys-h d63773d89d Refactored EOX 2015-12-31 18:57:11 +01:00
krzys-h a70381e1c8 Refactored CBotVarClass instance list to std::set 2015-12-31 16:54:13 +01:00
krzys-h 07a4d6a16b CBot namespace 2015-12-26 14:29:10 +01:00
krzys-h 921c266311 Some random refactoring 2015-12-24 14:52:17 +01:00
krzys-h 6ef14617a0 More random CBotToken refactoring, removed CBotToken::Delete 2015-12-23 16:46:41 +01:00
krzys-h fbdc071659 Some random CBotProgram and CBotToken refactoring 2015-12-23 16:11:03 +01:00
krzys-h 9b4a6e0131 TokenType enum 2015-12-23 14:05:29 +01:00
krzys-h 2519825104 CBotVar::ProtectionLevel enum 2015-12-21 23:07:40 +01:00
krzys-h eedf8dacea Documentation for CBotProgram; some CBotError refactoring 2015-12-21 21:35:20 +01:00
krzys-h 51644369cb Moved standard math and file functions into CBot library 2015-12-20 18:36:20 +01:00
krzys-h 9ec61d93e5 Refactored CBotString and const char* to std::string in CBot engine
A lot of changes, so it needs lots of testing
2015-12-20 16:19:10 +01:00
krzys-h 3eeab0f9b7 Removed CBotStringArray 2015-12-20 14:49:30 +01:00
Grunaka ece0666954 Create new file CBot.h. Included only useful interfaces. 2015-12-01 23:25:36 +01:00
Grunaka 1a6b5ded64 Delete CBotDll.h 2015-12-01 23:25:36 +01:00
Grunaka 43ac0e35f2 Moving global files function from CBot.cpp to CBotFileUtils.cpp 2015-12-01 23:25:36 +01:00