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
Piotr Dziwinski
544e513148
Minor MSVC compilation fixes
2015-04-27 18:17:03 +02:00
krzys-h
87ccb759e6
Allow Tech to use build(), closes #461
2015-04-18 11:40:42 +02:00
krzys-h
a3ae7802a2
New scripts interface, removed script limit
...
This is a big change in game structure and requires more testing!
2015-03-29 14:21:02 +02:00
krzys-h
47ed73247b
Use std::wstring in boost::filesystem calls on Windows, fixes #414
2015-03-22 13:36:23 +01:00
krzys-h
2b21f5f40c
Fixed another Travis problem ( #393 )
2015-03-21 17:29:17 +01:00
krzys-h
f582b58c2e
Fixed "files" directory creation
...
Related to #444
2015-03-08 16:21:09 +01:00
krzys-h
f54b46b61d
CPathManager
...
* Moved path management from CApplication to CPathManager
* Moved %lvl% replacements from CParserParam to CPathManager
* Added %lvl% support in produce(), closes #426
2015-03-08 15:22:21 +01:00
Tomasz Kapuściński
03bb000e82
Revert "Potential fix to Travis build fails"
...
This reverts commit ed0e5dfef5
.
2015-01-31 11:55:37 +01:00
Tomasz Kapuściński
ed0e5dfef5
Potential fix to Travis build fails
2015-01-30 22:13:07 +01:00
krzys-h
0ee86c3d15
Fixed loading scripts in produce() ( #418 )
2015-01-08 19:21:02 +01:00
krzys-h
61b186343f
Fixed #424 , #423 and probably #421
2015-01-08 18:56:26 +01:00
krzys-h
4fef3af9ef
Moved all CObject management from CInstanceManager to CObjectManager
2014-12-21 19:04:31 +01:00
krzys-h
e8a0dc8ddb
CObjectManager::Radar
2014-12-20 20:36:09 +01:00
krzys-h
c5b6faea05
Refactored CObjectManager to std::map
2014-12-20 19:09:53 +01:00
krzys-h
58bc01c82c
Removed unused script/dd.cpp
2014-12-20 18:48:44 +01:00
krzys-h
07c651bd0a
Moved all CBot functions into a separate class
2014-12-20 18:45:46 +01:00
krzys-h
af9960d41e
Fixed saving files from CBot
2014-12-20 18:20:59 +01:00
krzys-h
ce27a80caa
Moved "file" CBot class (CRobotMain -> CScript)
2014-12-20 18:03:49 +01:00
tomangelo2
7b03479a85
Fixed #386
2014-11-12 10:07:25 +01:00
krzys-h
abcbaa1902
Fixed running programs with long names ( #379 )
2014-11-10 22:42:05 +01:00
krzys-h
f65b00089a
Merge branch 'dev' into dev-physfs
...
Conflicts:
data
2014-10-14 15:42:19 +02:00
krzys-h
9fd6cf5449
Changed all occurences of PPC in the code to TerranovaTeam
2014-10-14 15:26:18 +02:00
krzys-h
740036e430
New level parser
...
Known issues:
* TerrainLevel for some reason doesn't work
* %lvl% is not yet implemented everywhere because of hardcoded directories in functions
2014-09-24 22:56:19 +02:00
krzys-h
96d49d84aa
Merge branch 'dev' into dev-physfs
...
Conflicts:
data
src/app/gamedata.cpp
src/ui/control.cpp
src/ui/edit.cpp
src/ui/maindialog.cpp
2014-07-11 15:24:44 +02:00
krzys-h
bc3b7ef283
Fixed negative parameter in fire() (issue #305 )
...
Also fixed checking parameter count and type for ants, spiders and shooters
2014-06-26 21:06:53 +02:00
Krzysztof Dermont
3aca1de731
More work on levels
2014-06-22 21:30:23 +02:00
Krzysztof Dermont
2260f6bf4f
Big part of PhysFS support
...
* removed -mod argument
* removed -datadir argument
* removed -lang argument
* removed some dead ui code
* added resource manager and file loaders (stream and SDL)
* changed interface textures location to match new directory structure
* removed CGameData for mod support
* added PhysFS support
2014-06-20 23:51:28 +02:00
krzys-h
f0d97bfdb9
Better datadir mod support
2014-05-18 12:12:47 +02:00
Oleg Kosmakov
a2a4eb75cb
Whitespace
2014-03-21 13:22:02 +02:00
Oleg Kosmakov
119fce546a
Issue #295 - continue
...
Renamed the method, fixed typo in comments
2014-03-21 13:18:28 +02:00
Oleg Kosmakov
7485ed790c
Fixes #295
...
When cannon cannot turn at specified angle, it will still reach the edge angle, but return the error code
2014-03-21 13:08:36 +02:00
krzys-h
fbe2bf8bc7
Added special mode in scene for bots to build more buildings than they usualy can
...
Will be used in "Leaving Earth" missions for making decorative bots building base
2014-03-03 21:55:28 +01:00
Piotr Dziwinski
181a404930
Fixed warnings about unknown commands in scene files
2014-01-18 19:24:08 +01:00
krzys-h
652dc6081d
Removed some unused objects
2014-01-11 23:43:10 +01:00
krzys-h
d855586674
Fixed a bug from 59935b4706
...
Cmd() now checks if length of token we're looking for is equal to token we've found
2014-01-11 18:22:37 +01:00
krzys-h
59935b4706
Changed comments in ObjectType to be object categories; removed unused SEAWEED
2014-01-01 17:33:19 +01:00
krzys-h
90437d1765
Fixed two bugs in dc81cda4b1
...
* win/end scene animations
* produce() was producing empty cells
2014-01-01 16:45:08 +01:00
krzys-h
3d7017525b
Added camerafocus() for changing camera
2013-12-31 19:09:54 +01:00
krzys-h
4a237f5925
CPauseManager
2013-12-31 13:24:09 +01:00
krzys-h
12e17224b3
Added nullptr shecks to object.factory()
...
Trying to fix #275
2013-12-29 16:31:32 +01:00
krzys-h
a36450a6da
Added tool= i drive=
2013-12-29 15:03:21 +01:00
krzys-h
dc81cda4b1
Cleaned up creating objects
2013-12-29 12:08:59 +01:00
krzys-h
0d31f59b12
.takeoff() for SpaceShip ( #265 )
2013-12-26 18:50:05 +01:00
krzys-h
f1e267b18e
Fixed bug #240 - CAuto in produce()
2013-12-25 19:13:15 +01:00
Piotr Dziwinski
8deb130572
Changed char[] to std::string in restext
...
Experimental changes
2013-12-04 00:15:39 +01:00
Piotr Dziwinski
5d0d9b5aa5
Fixed some CBot-related memory leaks
...
* fixed leaks in CScript::CheckToken()
* fixed leaks in CInterface
* commented out unused function in robotmain.cpp
2013-10-12 18:50:30 +02:00
erihel
41fa8458c2
Some Ui refactoring
2013-06-24 22:09:39 +02:00
Piotr Dziwinski
8765d58b02
Fixed code formatting
...
* moved braces to new lines
* fixed some function/variable names
* fixed whitespace issues
2013-05-27 10:19:16 +02:00
Piotr Dziwinski
538745a731
Fixed some compilation warnings
...
* fixed warnings about hiding virtual functions and several others
2013-05-27 10:19:04 +02:00
krzys-h
f90a4b48f5
Added object.research(type)
2013-05-19 21:48:29 +02:00
krzys-h
6798641a71
Translated <erreur> and <sans nom>
2013-05-19 17:03:55 +02:00
krzys-h
6b25608e69
Added progfunc( funcname );
...
For simple creating of programs executing public functions :)
Example:
public void object::SecondBot()
{
message("It works!");
}
extern void object::FirstBot()
{
object item = radar(BotFactory);
item.factory(WheeledGrabber, progfunc("SecondBot"));
}
2013-05-19 16:56:08 +02:00
krzys-h
b9d0ee034e
Running program in robots created using object.factory()
2013-05-19 16:27:33 +02:00
krzys-h
7662f312b3
Changed "Inappropariate bot"->"Inappropariate object" in newly added functions
2013-05-18 18:29:07 +02:00
krzys-h
58cc0603cc
Fix for build() not being able to build Detroyer
2013-05-18 18:04:48 +02:00
krzys-h
796cb92ffc
Added object.destroy()
2013-05-18 18:04:48 +02:00
krzys-h
d0de6a88ba
Renamed destroy() -> delete()
2013-05-18 18:04:48 +02:00
krzys-h
8004e68948
Added object.busy()
2013-05-18 18:04:48 +02:00
krzys-h
47d7b80507
Added object.factory(cat)
2013-05-18 18:04:48 +02:00
krzys-h
61841b3f40
Backwards combatibility for retobject() ( #209 )
2013-05-12 15:54:35 +02:00
krzys-h
1f77efb9cb
Fixed bug with std::bad_alloc when using produce()
...
I'm not sure why it wasn't happening before, but it's fixed :)
2013-05-12 15:38:09 +02:00
krzys-h
fcb052cc8d
Added [set/get][build/research[done/enable]] ( ); function fo CBot
...
* setbuild ( );
* setresearchdone ( );
* setresearchenable ( );
* getbuild ( );
* getresearchdone ( );
* getresearchenable ( );
2013-05-05 14:44:51 +02:00
krzys-h
fb5d14dddf
Functions playmusic(filename, repeat) and stopmusic()
...
for MissionController
Parameter repeat can be 0 or 1
2013-05-01 22:11:08 +02:00
krzys-h
9e1870f6bd
Removed some warnings
...
+ fix for previous commit
2013-05-01 13:19:10 +02:00
krzys-h
643153d64d
Added function endmission()
...
Works only with MissionFile version=3
Created for MissionController, but works on any bot
- 1st parameter:
* ResultWin - win mission
* ResultLost - lost mission
* ResultLostQuick - lost mission (Me died)
- 2nd parameter: win/lost delay, like in mission file. Doesn't work for ResultLostQuick.
Please don't use for cheating =)
2013-04-30 21:43:59 +02:00
krzys-h
75950c55ba
MissionController improved
2013-04-29 17:26:32 +02:00
XienDev
6a4ac9ce16
Added functions "canbuild(category)" and "buildinfo(category)"
...
Also fixed issue with undefined behaviour of build(category) function
2013-04-28 16:49:48 +03:00
XienDev
41fb814e99
Added build
...
Third patch
2013-04-27 18:11:26 +03:00
erihel
a693e87293
* Patch for issue #167
2013-04-27 13:03:20 +02:00
krzys-h
69e52e5f24
Removed find() & repeat() functions
...
Issue #168
2013-04-12 23:28:44 +02:00
krzys-h
0d70b6e2f8
More parameters to destroy()
...
Also, removed some warnings in script.cpp
2013-03-31 12:04:12 +02:00
krzys-h
90301e24c0
Added field "item" to class "object" in CBot
2013-03-31 10:21:22 +02:00
krzys-h
040a7e8f24
Added function destroy(rank)
2013-03-30 15:43:09 +01:00
krzys-h
8777c126de
Added SatCom translations
2013-03-29 10:03:35 +01:00
krzys-h
c6d89f6210
Revert "Fix for #30"
...
This reverts commit bfdd52ade0
.
That wasn't working. :(
2013-03-27 21:58:34 +01:00
krzys-h
bfdd52ade0
Fix for #30
2013-03-27 21:37:37 +01:00
krzys-h
8f379e5cf1
Changes to Scribbler interface
2013-03-27 19:55:27 +01:00
erihel
d6bbc99c90
* Changed file loading to fix issue #73
...
* Moved few functions from misc.cpp to profile.cpp (used to set/get user dir)
* Removed some warnings
* More work to change const char* to std::string
* Some work on file path to fix issue #60 with bad slashes on POSIX platform
2013-03-17 19:01:32 +01:00
krzys-h
37a095b5b6
MORE improvements to produce()
2013-03-01 21:56:52 +01:00
krzys-h
0864e44c7b
Fix for #135
...
jet() parameter > 1
2013-03-01 21:36:38 +01:00
Piotr Dziwiński
001d37b257
CInstanceManager refactoring
...
* removed classes managed by CInstanceManager
except for CObject, CPyro, CBrain and CPhysics
because of dependencies
* refactored instance searching to use existing singleton instances of
CApplication, CEngine and CRobotMain and calling their getter
functions
2013-02-17 12:11:56 +01:00
krzys-h
5d331f37ae
Another small fix.
...
I'm a noob. Sorry.
2013-02-14 17:26:01 +01:00
krzys-h
945299ae5d
Small fix
2013-02-14 17:23:26 +01:00
krzys-h
e2d0f44961
More fixes to produce()
...
Now every object can be created.
2013-02-14 17:18:04 +01:00
krzys-h
de228f57e8
Small fix in produce()
2013-02-14 16:04:52 +01:00
krzys-h
89a272cf87
produce() extended
2013-02-14 15:48:02 +01:00
krzys-h
59a40088a5
Merge pull request #125 from PaweX/dev
2013-02-13 11:26:17 -08:00
krzys-h
8658d6da80
Added Destroyer from Ceebot-Teen.
...
We need a new icon for it.
2013-02-13 16:58:19 +01:00
PaweX
86b302eb17
Added cAim(CBotVar* &var, void* user)
2013-02-13 16:20:35 +01:00
PaweX
4128383ee1
Update src/script/script.cpp
2013-02-13 14:04:24 +01:00
PaweX
bcd06bd0e8
Function aim(x, y) - "Giv" to "Get"
2013-02-13 13:56:50 +01:00
PaweX
f25aed44d2
aim(x,y) - "Giv" to "Get"
2013-02-13 13:48:56 +01:00
PaweX
c26c063c5f
Additional parameter for function aim(x, y).
2013-02-13 02:36:20 +01:00
PaweX
34a008a49d
Additional parameter for function aim(x, y).
2013-02-13 02:32:41 +01:00
erihel
6f64770714
* Fixes to ingame editor
...
* Fixes to editor window. It's now possible to resize, move and press buttons
2013-02-09 21:00:07 +01:00
Piotr Dziwinski
89a3f586a2
Merge branch 'dev' into dev-graphics
2013-01-04 00:05:28 +01:00
Piotr Dziwinski
3e4c1a1ad8
Replaced malloc/free with new/delete
...
- now new/delete used everywhere except for CBotStack, which
has to be fixed in other way
- some segfaults should be fixed with this
2012-12-28 13:37:08 +01:00
Piotr Dziwinski
5574eccebd
Engine optimization - rewritten model management
...
- new class CModelManager
- rewritten engine object structure in CEngine
- created shared model data instead of separate objects per each
model instance
- minor refactoring
2012-12-26 20:58:02 +01:00
Piotr Dziwinski
f6e27099b2
Doxygen/comment fixes and some #include refactoring
2012-10-17 21:55:45 +02:00
Zaba999
7575ffd49b
Merge branch 'dev' of https://github.com/colobot/colobot into dev
2012-10-11 23:10:07 +02:00
Zaba999
8a932fed3e
Added saving user scripts on game save. Fixed bug in writing script to file.
2012-10-11 23:09:29 +02:00
Piotr Dziwinski
97f44035f1
Changing and saving input bindings
2012-10-07 00:46:46 +02:00
adiblol
ac1472621a
Fixed not working message(...) CBot function
2012-09-30 17:09:49 +02:00
Piotr Dziwinski
caf8e08a8d
Enabled CBot (experimental)
2012-09-29 20:27:23 +02:00
Zaba999
f6638a173e
Work in progress on opening files, and listing dirs
...
Fixed includes
profile changed from SimpleIni to boost::ptree -> not finished yet
2012-09-26 22:57:43 +02:00
Zaba999
36ae984ac7
Warnings cleaned, left only those connected to commented out code.
2012-09-18 22:33:28 +02:00
Zaba999
a397922e8d
warnings fight in progress.
2012-09-18 00:01:00 +02:00
Zaba999
844e11db4f
changes needeto to cimpile on windows.
2012-09-17 20:47:27 +02:00
Piotr Dziwinski
ad6bc13dc2
Merge dev-common and various fixes to achieve compilation
...
- merged changes from dev-common
- fixed many compilation errors (CBrain, UI, ...)
- temporarily commented out some problematic code (e.g. input bindings)
- (partially) fixed #include styling
- everything compiles except for CRobotMain, CMainDialog and CStudio
2012-09-15 18:50:51 +02:00
Michał Konopacki
d439f4fa93
Merge branch 'dev-ui' into dev
...
Conflicts:
src/CMakeLists.txt
src/common/misc.cpp
src/common/misc.h
src/object/robotmain.cpp
src/object/robotmain.h
src/script/cbottoken.cpp
src/script/cbottoken.h
src/ui/button.cpp
src/ui/button.h
src/ui/check.cpp
src/ui/check.h
src/ui/color.cpp
src/ui/color.h
src/ui/compass.cpp
src/ui/compass.h
src/ui/control.cpp
src/ui/control.h
src/ui/displayinfo.cpp
src/ui/displayinfo.h
src/ui/displaytext.cpp
src/ui/displaytext.h
src/ui/edit.cpp
src/ui/edit.h
src/ui/gauge.cpp
src/ui/gauge.h
src/ui/interface.cpp
src/ui/interface.h
src/ui/key.cpp
src/ui/map.h
src/ui/shortcut.h
src/ui/slider.h
src/ui/target.cpp
src/ui/target.h
src/ui/window.cpp
src/ui/window.h
2012-09-15 16:35:48 +02:00
erihel
01cc0fbc49
* latest changes
...
* all files except studio, map and maindialog should compile
* did some code cleanup
2012-09-11 12:49:41 +02:00
Zaba999
479a67a731
Merge with changes from Zaba999 fork.
2012-09-10 23:29:38 +02:00
Piotr Dziwinski
af3057df7e
Merged changes from dev
...
Resolved conflicts & added fixes.
2012-07-04 19:56:22 +02:00
Piotr Dziwinski
c2a7375788
Removed trailing whitespace
2012-06-26 23:01:17 +02:00
Piotr Dziwinski
ebed57aa22
Whitespace and language change
...
- changed tabs to spaces and DOS line endings to Unix
(except in CBot and metafile)
- changed language to English
- fixed #include <d3d.h> in d3dengine.h
2012-06-26 22:23:05 +02:00
Piotr Dziwinski
8bb223e679
Templates for new implementation
...
- added template of classes/structs for new implementation
- changed #include paths
- updated README files
2012-06-22 16:31:55 +02:00
Piotr Dziwinski
9f784e81f8
Switched to new implementation of the rest of math module
...
- changed structs from D3DVECTOR to Math::Vector
and from D3DMATRIX to Math::Matrix
- changed functions to new Math namespace functions
- moved mainmovie module from graphics to object
- added Get and Set to Math::Matrix
2012-06-19 20:11:47 +02:00
Piotr Dziwinski
b735913deb
FPOINT -> Math::Point & other math functions
...
- changed FPOINT to Math::Point and some functions
from math module to the new implementation
- moved old function and FPOINT struct declarations to math3d.cpp
- removed some unused functions in math module
- fixed some #include dependencies
- moved #define STRICT and #define D3D_OVERLOADS to compile options
2012-06-13 22:48:35 +02:00
Piotr Dziwinski
a8665d2042
Changed #defined constants to consts; typedef struct -> struct
2012-06-11 17:28:27 +02:00