Commit graph

15865 commits

Author SHA1 Message Date
Joris
58dd608ebc Some clean up : const and ref 2012-07-07 00:02:34 +02:00
Joris
6cf6c2c9b8 Some clean up.
Change commented code to Fix AStyle result
2012-07-06 11:48:55 +02:00
Joris
f89a5cd3ab Move declaration of std::string SaveGlobal(lua_State *l); from stratagus.h to scripts.h 2012-07-05 17:22:51 +02:00
Joris
d2a581832c Move some include from stratagus.h to iocompat.h 2012-07-05 15:42:34 +02:00
Joris
380c8450c9 Fix some warning with MSVC 2012-07-05 14:41:35 +02:00
Joris
b9447bbbe1 Fix compilation for MSVC 2012-07-05 14:35:55 +02:00
Joris
fc511815c9 Remove #include "iocompat.h" from map.h 2012-07-05 11:10:10 +02:00
Joris
42316e4f14 Remove uneeded #define. 2012-07-04 18:05:41 +02:00
Joris
77f78b4c41 [AStyle] 2012-07-04 17:02:24 +02:00
Joris
84f9626130 Clean up. 2012-07-04 16:59:46 +02:00
Joris
36bc4a4f14 Remove UnitMax and MAX_UNIT_SLOTS
(in fact still hardcoded in upgrade.cpp)
2012-07-04 16:46:40 +02:00
Joris
8b01dac8ee Optimize the search of AI repair. 2012-07-04 16:44:25 +02:00
Joris
096ba40efd Remove PlayerAi::TriedRepairWorkers[UnitMax] 2012-07-04 15:52:17 +02:00
Joris
4f97d6a805 Fix Assert in Action_Attack. 2012-07-04 10:46:11 +02:00
Joris
6b4c7bab48 Make CUnit::slot and CUnit::unitSlot private except for UnitManager. 2012-07-03 23:37:41 +02:00
Joris
88e507c4d3 use UnitNumber(unit) instead of unit.Slot 2012-07-03 22:32:56 +02:00
Joris
a15ddb37ce Move global Units into CUnitManager.
Fix typo in network.cpp (network should not use units from Units but from UnitSlot).
Rename CUnitManager::GetUnit into UnitManager.GetSlotUnit
2012-07-03 17:06:07 +02:00
Joris
f45e195cc4 Fix 'bug/typo' in ai_force.cpp 2012-07-03 11:47:27 +02:00
Joris
fb01e178c6 Replace type of CUnit::UnitSlot from CUnit** by int. 2012-07-03 11:14:56 +02:00
Joris
42bf264713 Some clean up. 2012-07-02 22:38:35 +02:00
Joris
831dada057 Move UnitSlots and UnitSlotFree into CUnitManager 2012-07-02 18:14:45 +02:00
Joris
4d9ceb77ae Fix scrolling with mouse middle-click. 2012-07-02 16:28:15 +02:00
Joris
2ebc020833 Replace int ButtonStyleProperties::Text[XY] by PixelPos TextPos. 2012-07-02 15:52:54 +02:00
Joris
4921da175e Some clean up. 2012-07-02 15:29:01 +02:00
Joris
0b588bc989 Remove unused CUnit::Next
Move CUnit::GetReactionRange code into unit_find where code is used.
2012-07-02 14:56:30 +02:00
Joris
1b49911c24 Move MapDistance from unit.h to Vec2i
(add SquareDistance as it is faster to compute squareDistance than Distance).
2012-07-02 13:16:52 +02:00
Joris
fe93aa5f5d Remove unneeded include. 2012-07-02 12:51:45 +02:00
Joris
57e8cd728e Replace some NoUnitP by NULL. 2012-07-02 12:39:53 +02:00
Joris
990c14f5ba Remove unneeded include. 2012-07-02 12:26:12 +02:00
Joris
87a68e9490 Some clean up. 2012-07-02 12:12:29 +02:00
Joris
55d9c4b267 Move some functions from unit.cpp to unit_find.cpp
Add unit_find.h
2012-06-29 13:18:12 +02:00
Joris
77ad8b6eb5 Some clean up in unit_draw.cpp 2012-06-29 12:22:03 +02:00
Joris
9bc93f4bae Replace Cursor::Hot[XY] by HotPos. 2012-06-29 11:53:31 +02:00
Joris
4864f6959f Clean up :
- Use PixelPos instead of x, y
- Use Map.MapPixelPosToTilePos
2012-06-28 18:08:24 +02:00
Joris
131a05e41e TargetOnMap takes Vec2i instead of x, y.
remove unneeded code inside TargetOnMap.
2012-06-28 16:43:43 +02:00
Joris
93071937ac Replace SavedMapPosition[XY] by Vec2i version. 2012-06-28 16:23:06 +02:00
Joris
a0c56c95b6 Add constructors to Vec2T. 2012-06-28 16:19:18 +02:00
Joris
bd3d24c0bd [AStyle] 2012-06-28 14:41:04 +02:00
Joris
6e091cb4ce Rewrite AiCheckSurrounding. 2012-06-28 14:36:04 +02:00
Joris
4799bfe761 Some clean up. 2012-06-28 14:35:28 +02:00
Joris
294c9ab192 Fix warning. 2012-06-28 14:30:08 +02:00
cybermind
ca8d2ea568 [+] Added OnEachCycle and OnEachSecond lua callbacks in unittype to make some action on each cycle or on each second
[*] Cleanup:
- check if we can save the order before clonning it
- removed unused unit.State
[-] More correct spell checking for AI magic
[-] Fixed UnitOnScreen for shared vision
2012-06-28 14:26:07 +06:00
Joris
812f065687 Change ouptput of SaveGlobal to not overwrite missing value in table. 2012-06-26 14:35:34 +02:00
Joris
07d248e17b Change some x, y into PixelPos. 2012-06-26 14:21:09 +02:00
Joris
0c42a7512a Some more convertion of x, y into PixelPos. 2012-06-22 18:04:13 +02:00
Joris
8b4271c082 Some clean up in Minimap. 2012-06-22 15:23:14 +02:00
Joris
619b487b4a Some clean up. 2012-06-22 12:49:05 +02:00
Joris
cd919a1fc0 Replace some (x, y) parameters of some method by PixelPos 2012-06-21 16:22:06 +02:00
Joris
a5ef7ac002 Rename Cursor[XY] into CursorScreenPos.
Rename UI::MouseWarp[XY] into UI.MouseWarpPos.
2012-06-21 13:03:37 +02:00
Joris
6e83730a05 Replace CursorStart[XY] by CursorStartScreenPos. 2012-06-21 10:58:09 +02:00