1
0
forked from 0ad/0ad
Commit Graph

517 Commits

Author SHA1 Message Date
1bc2db56ea Stops unit following when other object selected. Fixes #775
This was SVN commit r9764.
2011-07-05 21:29:11 +00:00
31832cd9ae Initialise minimap and LOS textures properly
This was SVN commit r9673.
2011-06-26 21:47:07 +00:00
33e8ac6fa5 Applies Kenny's patch for CInput pasting behavior (fixes #640)
Simplifies some clipboard hotkeys

This was SVN commit r9658.
2011-06-25 00:04:41 +00:00
492e49da38 add support for selection and deletion of entire words in text controls (ctrl+backspace/delete/left/right) based on patch by Chakakhan/kenny (thanks!)
also refactored wclipboard
closes #511

This was SVN commit r9646.
2011-06-23 10:12:43 +00:00
1357000401 Fix #805 more so it doesn't ignore the second click on non-double-clickable buttons.
This was SVN commit r9604.
2011-06-09 17:30:34 +00:00
43d817bc22 --
This was SVN commit r9593.
2011-06-06 19:39:19 +00:00
9906a86a2e Support double-click on unit group buttons. patch by Merolum. fixes #805.
This was SVN commit r9592.
2011-06-06 19:31:34 +00:00
1bf2598429 Fixes square maps to behave like circular maps and fit within the circle. Fixes #822
This was SVN commit r9554.
2011-05-27 03:04:59 +00:00
26de01cdd1 Adjusts unit selection behavior to account for ranks. Triple-click now selects units regardless of their rank.
Adds modifier hotkey to select units offscreen.
Fixes #826.

This was SVN commit r9443.
2011-05-05 01:27:49 +00:00
7523894760 ENSURE(0) -> DEBUG_WARN_ERR(ERR::LOGIC) (a bit smaller, and more descriptive)
This was SVN commit r9423.
2011-05-04 12:10:17 +00:00
cccd6849a7 cleanup (requires update-workspaces)
lib_errors.cpp: replace with status.cpp, adapt to needs at work
wutil: fix runtime warning reported via feedback box
config: merge CONFIG_PARANOIA and !CONFIG_FINAL into
CONFIG_ENABLE_CHECKS
add openmp, pointer_typedefs.h

This was SVN commit r9410.
2011-05-03 12:38:42 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
67ca7461cd Adds Skip method to SGUIMessage which works more or less like wxEvent.Skip: GUI objects can allow other event handlers to process an input event after they finish.
Allows hotkey handling of mousewheel events after minimap. Fixes #673.
Adds SendEvent to GUI objects, used in place of separate calls to
HandleMessage and ScriptEvent.

This was SVN commit r9340.
2011-04-28 20:42:11 +00:00
e5e9e38532 Fix GCC 4.6 "set but not used" warnings
This was SVN commit r9194.
2011-04-07 16:34:51 +00:00
ce85f4e825 Fix minimap ignoring GUI z-ordering.
This was SVN commit r9139.
2011-04-01 17:58:33 +00:00
588bfa11bf remove unnecessary utf8 includes
This was SVN commit r9110.
2011-03-23 16:32:44 +00:00
dcd192cb60 refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of
strings/paths; allows safe+easy join via operator/ and convenient
case-insensitive comparison via operator==, avoids NativePathFromString,
similar to boost::filesystem)
- NativePath -> OsPath
- add hash and To/FromJSVal for Path
- add TS_ASSERT_PATH_EQUALS
- replace _wfopen_s with sys_OpenFile
- remove obsolete SortFiles/Directories

This was SVN commit r9107.
2011-03-23 13:36:20 +00:00
c0a105432e Use path types and conversions more consistently.
This was SVN commit r9094.
2011-03-21 22:59:00 +00:00
c3405e6f50 path improvements/fixes:
- replace more std::wstring with Native or VfsPath; wstring_from_utf8 ->
NativePathFromString
- replace sequences of Join(Path(), Basename+extension) with
ChangeExtension in wsdl, CacheLoader
- add Path::IsDirectory to replace .empty() / path_is_dir_sep(.back()).
also changed behavior to reflect the fact that "" is the VFS root
_directory_
- Path::Join now allows 2 identical path types (e.g. VfsPath) or one
char* literal (prevents inadvertently introducing non-safe characters).
to convert from wstring or wchar_t, use an explicit ctor (e.g.
VfsPath(wchar_t_string))

This was SVN commit r9091.
2011-03-21 19:54:08 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
16a4eb36dd Various minor optimisations.
Enable SpiderMonkey method JIT in Release mode.
Add Engine.ProfileStart/Engine.ProfileStop functions for scripts.
Fix AI to clone initial entity data and shared metadata.

This was SVN commit r9003.
2011-03-03 00:16:14 +00:00
d045258c29 Let exceptions in GUI script events triggered by script setters propagate out of the setter, so error messages aren't useless.
This was SVN commit r8997.
2011-02-27 17:57:32 +00:00
807663cd54 Fix uninitialised value
This was SVN commit r8961.
2011-02-20 20:52:35 +00:00
1a2a7677fd replace set/map with boost::unordered_* to reduce the number of expensive filesystem::basic_path::operator< calls based on a patch by ortalo (thanks!)
This was SVN commit r8947.
2011-02-19 21:24:39 +00:00
f3372bf11d Add some rough performance reporting.
Make the profiler converge a bit faster.

This was SVN commit r8939.
2011-02-19 03:14:37 +00:00
d600a400fe Fix GUI text input box scrollbars not moving when the window is resized.
This was SVN commit r8932.
2011-02-18 22:49:24 +00:00
387b801aed Fix tooltip crash/corruption, caused by inconsistently changing types.
This was SVN commit r8931.
2011-02-18 22:36:39 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
0da7e822ff # Add opt-in automatic feedback system.
Add GL implementation limits to hwdetect.
Make the in-game manual support multiple text files.
Remove unnecessary instruction on how to close the manual window.
Make guitextobject.caption return the original value without stripping
formatting tags.
Remove unused non-VFS support from config system.
Support writing config files back to their original path.
Remove unnecessary user profile directory; use normal config directory.

This was SVN commit r8925.
2011-02-16 20:40:15 +00:00
dbd3de82ff Fix #705 (tooltips go off screen when displayed near a corner), based on patch from Leonard
This was SVN commit r8916.
2011-02-13 12:16:31 +00:00
804e817cf5 Fix rendering of main menu buttons after leaving a game
This was SVN commit r8907.
2011-02-10 23:58:33 +00:00
c710e718aa Windows fixes
This was SVN commit r8884.
2011-02-03 02:33:37 +00:00
cb78822f19 Delete some unused bits.
This was SVN commit r8883.
2011-02-03 01:17:16 +00:00
fe21c5e023 # Rewrite fog-of-war rendering.
Disable shadows when only 2 TMUs available.
Clean up some other rendering code.

This was SVN commit r8882.
2011-02-03 01:12:24 +00:00
dd501b2a5a # Add initial basic player AI framework.
Support direct access to serializer streams, so serializers can be
nested.
Make component script "this.template" read-only.
Stop globally-subscribed component scripts receiving messages posted to
local components, to reduce out-of-sync risks.
Move pathfinder data out of entity template directory.
Fix GuiInterface deserialization.

This was SVN commit r8865.
2011-01-12 12:29:00 +00:00
8ddef2fee0 Add fast-forward/rewind commands, to help with testing.
This was SVN commit r8803.
2010-12-06 19:58:06 +00:00
1201956b93 Additional cleaning up of logging: removed LOG_CATEGORY macro definitions.
This was SVN commit r8792.
2010-12-05 08:50:33 +00:00
19dbbb816d Changed all references from old CLogger API to use the new API. Removed old API. Fixes #247
This was SVN commit r8791.
2010-12-05 08:41:55 +00:00
f378a63d94 Add some tests for UnitAI.
Fix said tests for UnitAI.
Hopefully fix #647 too.
Document HFSM interface a bit.
Add Engine.DumpSimState() console command for debugging.

This was SVN commit r8681.
2010-11-22 20:12:04 +00:00
47246c8155 Fixes #572. Changed MoveCameraToTarget so that for minimap scrolling it will ignore changes in Y position, to maintain previous zoom level as expected (constraint keeps the new view from being inappropriate)
This was SVN commit r8676.
2010-11-21 04:59:59 +00:00
c36fc2b8d7 Add script-based system for doing messy stuff based on system configuration.
Display warning for certain broken NVIDIA drivers.

This was SVN commit r8663.
2010-11-20 19:46:49 +00:00
74c19b5015 Add xmessage-based GUI dialog box for debug messages on Linux (fixes #663).
Switch out of fullscreen before displaying dialog boxes.
Add Engine.DebugWarn for testing.

This was SVN commit r8661.
2010-11-20 17:14:45 +00:00
64bd264fc0 Attempt to fix GUI script interaction with JITs.
Simplify some other GUI script interface code.

This was SVN commit r8657.
2010-11-20 00:45:58 +00:00
bd3bd084c0 Support new SpiderMonkey API.
wposix: Define int8_t compatibly with SpiderMonkey.
Remove unused camera, lightenv JS interfaces.
Remove most of vector JS interface.
Remove some of the redundant JS string conversion functions.
Remove unneeded vmem, _lodBias functions.
Clean up some formatting.

This was SVN commit r8629.
2010-11-16 23:00:52 +00:00
293e5e33ec Changed GUI mouse event handling so that button events use the mouse position at the time of the button state change. Fixed minimap message handling to respect out-of-order events. Fixes #669
This was SVN commit r8610.
2010-11-14 22:47:39 +00:00
e43eb0c18b # Various hotkey fixes and cleanups.
Support ctrl for removing entities from selection.
Move big screenshot hotkey to shift+F2.
Increase mouse wheel rotation speed.
Fix HotkeyIsPressed when a more specific hotkey was matched instead.
Support multiple hotkeys with the same binding.
Use hotkeys instead of raw key events in GUI.
Delete some obsolete hotkey definitions.
Remove unused broken EntitySelection toggle method.

This was SVN commit r8546.
2010-11-07 20:42:52 +00:00
644b9aedea # Add double-click and triple-click selection modes, based on patch by Christoph and evans.
Fixes #515.

This was SVN commit r8544.
2010-11-07 00:12:55 +00:00
3407983e98 remove no-longer needed (and non-reentrant) MICROLOG as per today's meeting
This was SVN commit r8542.
2010-11-06 19:11:40 +00:00
818ea52c3b Delete obsolete non-working i18n code
This was SVN commit r8527.
2010-11-03 17:52:07 +00:00
540925aa32 Add a rubbish experimental FPS camera view
This was SVN commit r8520.
2010-11-01 21:40:29 +00:00
5d764f1435 Run network server in a separate thread, to minimise latency.
Make some parts of logger and console thread-safe.
Simplify console: remove special commands; remove prefix for script
commands.
Remove LOG_ONCE, to simplify logger.
Change some code to use the new logger interface.
Fix OOS when revealing map.
Clean up some formatting.

This was SVN commit r8511.
2010-10-31 22:00:28 +00:00
9ee44bd9b8 Game setup changes, including showing name, civ, team, and some options loaded from the scenarios. Civ data added. Civ info window to preview civs. Icon tooltips. Support for random map implementation. Fixes #590.
This was SVN commit r8494.
2010-10-30 04:02:42 +00:00
02aa8499ed Partial experimental version of circular maps
This was SVN commit r8470.
2010-10-25 21:59:52 +00:00
9e499cdec5 # Fix hotkey bugs.
Simplify hotkey system to use strings consistently.
Restrict scope of GUI hotkey bindings to the associated page.
Avoid hard-coding list of hotkeys.
Clean up the code a little bit and fix some bugs.
Remove unused "!" prefix for key negation.
Fixes #567.

This was SVN commit r8444.
2010-10-23 02:37:00 +00:00
eb8ca841cd Add special "colour:r g b a" sprite syntax to GUI. Fixes #616, based on patch from historic_bruno.
This was SVN commit r8431.
2010-10-21 21:22:40 +00:00
c0a7a36f7a Use JSFastNative API in more places, for improved compatibility with future SpiderMonkey versions.
Remove some unnecessary script-exposed functions, and move some more
into the Engine namespace.

This was SVN commit r8428.
2010-10-21 19:54:59 +00:00
82691683cb Fix #56 (add unit-following camera mode (press 'F')), based on patch from markelov.
Remove obsolete IsNewSimulation function.

This was SVN commit r8190.
2010-09-26 23:05:25 +00:00
58026a3c6d Fix bug with failing to reset GL state when sometimes necessary
This was SVN commit r8172.
2010-09-24 21:42:41 +00:00
46b79f8a6d Scale minimap LOS texture down, to reduce update/upload costs.
Reduce minimap LOS update frequency.

This was SVN commit r8169.
2010-09-24 16:52:29 +00:00
e1082e5adb Fix warnings
This was SVN commit r8162.
2010-09-23 12:54:16 +00:00
924d1219a7 # Add fog-of-war.
Move Vision component to C++, for more efficient FoW processing.
Disable FoW on demo maps.

This was SVN commit r8160.
2010-09-23 12:13:13 +00:00
1cc4d358d7 Fix #549 (Allow units to be moved by right-clicking on the mini-map), based on patch from Badmadblacksad
This was SVN commit r8107.
2010-09-11 19:49:21 +00:00
67a94572ec # Add new texture loading system with automatic compression.
Replace almost all texture uses with calls to the new system.
Add some anistropic filtering to terrain textures.
Let Atlas load terrain texture previews partly-asynchronously by
polling.
Fix inefficient texture colour determination for minimap.
Remove unused global g_TerrainModified.
Change GUI texcoord computation to be less efficient but to cope with
dynamic texture changes.
Fix GUI renderer effects leaving bogus colour state.

This was SVN commit r8099.
2010-09-10 21:02:10 +00:00
6c7830df3f Rename CTextureManager and CTextureEntry since they are only for terrain textures
This was SVN commit r8076.
2010-09-04 21:26:52 +00:00
5e15a0279e Print JS stack trace when reporting exceptions.
Increase maximum logger message size.
Fix GC bug.

This was SVN commit r8063.
2010-09-03 20:06:17 +00:00
0858b76bed Fix #556 (Minimap camera outline clips incorrectly), based on patch from Jayschwa
This was SVN commit r8045.
2010-08-29 13:31:19 +00:00
dab8365978 Make GUI buttons respond to multiple rapid clicks
This was SVN commit r8021.
2010-08-22 01:00:57 +00:00
a9b11b780e Fix right clicks passing through GUI objects and triggering unit commands.
Fix cursor displaying unit commands when over a GUI object.

This was SVN commit r8020.
2010-08-21 23:58:08 +00:00
715a2715c9 Fix #541 (Strange shape of camera view on minimap), based on patch from lubos
This was SVN commit r8017.
2010-08-21 22:06:44 +00:00
2deac598eb Remove focus from chat box after sending message
This was SVN commit r7931.
2010-08-13 13:50:03 +00:00
6c7b82130c # Redesigned the camera control system.
Add shift+wheel (and Q/E, and ctrl+arrows, and ctrl+WASD) to rotate the
camera.
Restrict the rotation and zoom to narrow ranges. (Constraints can be
disabled in the dev overlay).
Smooth the movement and rotation.
Fix some stupid whitespace.
Fix some const correctness.

This was SVN commit r7930.
2010-08-13 13:26:29 +00:00
54d9224918 Add focus() script method to GUI objects.
Add basic GUI script timer.

This was SVN commit r7908.
2010-08-11 21:04:09 +00:00
d46abd9aaf Use a fixed aspect ratio for the menu screen background and loading screen concept art, to prevent ugly stretching at widescreen resolutions
This was SVN commit r7898.
2010-08-10 22:39:00 +00:00
2b6f11e834 Add list_data property to GUI list controls, to associate extra data with the human-readable list item names.
This was SVN commit r7869.
2010-08-08 15:22:17 +00:00
30a6dbcb89 Fix uninitialised-value warnings
This was SVN commit r7861.
2010-08-06 14:15:08 +00:00
65bcedb9fc Load map descriptions from their XML file.
Add basic hold-fire stance, and use it for some test maps.
Add JSON data container to map XML files, to simplify the interaction
between scripts and maps.
Fix fixed-point printing so it roundtrips safely through map files.
Fix camera startup positions in old-format maps.

This was SVN commit r7844.
2010-08-04 21:15:41 +00:00
8286218cad Delete lots of obsolete unused script-interface code.
Delete unused code from various other places.

This was SVN commit r7839.
2010-08-01 20:56:34 +00:00
1706363bab Fix #423 (Switch from CppDoc to Doxygen), based on patch from anr.
Also delete some unused declarations, and rename is_playing to
snd_is_playing.

This was SVN commit r7813.
2010-07-29 15:55:41 +00:00
7bf60c086e Update GUI documentation
This was SVN commit r7777.
2010-07-21 17:53:38 +00:00
9674c3c0fe Remove ScriptingHost initialisation code (share with ScriptInterface instead).
Fix GUI scripts to avoid strict warnings.
Rejig GUI/SpiderMonkey interface to use less custom code, and to work
with JSOPTION_VAROBJFIX.
Add event name to GUI event handler function names (visible in the
profiler).

This was SVN commit r7769.
2010-07-19 23:01:58 +00:00
4b06ebd52d Add basic help page into the main menu.
Add buttons to open the web site and IRC.
Tentatively allow Atlas to be launched from the menu.
Add some shutdown functions to support relaunching into Atlas without
having to restart the whole process.

This was SVN commit r7714.
2010-07-07 21:47:31 +00:00
6bd38c1e5d Report errors when hosting/joining fails
This was SVN commit r7709.
2010-07-06 20:51:45 +00:00
31699e830d Handle disconnections better.
Remove local sessions (just use ENet for everything instead) because
they add far too much complexity.
Fix memory leaks.

This was SVN commit r7706.
2010-07-06 19:54:17 +00:00
76a099f626 Reserve space for minimap units. Saves approximately 0.01ms per frame.
This was SVN commit r7700.
2010-07-05 19:18:40 +00:00
d2cf6ceb88 less global variables: make most uses of g_VFS explicit (required for another app that has two VFSes), g_yres is no longer required by cursor module
This was SVN commit r7686.
2010-07-04 10:15:53 +00:00
41e786837e Fix updating of scrollbars on text controls.
This was SVN commit r7670.
2010-07-03 13:12:44 +00:00
051aa70940 Basic disconnection handling.
Pre-game chat.
Fix dynamic updates of focused input controls.
Allow scrollable texts to automatically scroll to the bottom.
Force usernames to be unique.

This was SVN commit r7664.
2010-07-02 21:28:48 +00:00
1c0536bf08 # Refactored the networking code, and redesigned the game setup screen.
Major updates to most network classes.
Simplify CNetServer so it doesn't duplicate any client behaviour; all
players now run CNetClient.
Remove most player/slot management from networking code.
Wait for all players to finish loading before starting the simulation.
Remove CGameAttributes; attributes are now just a JS object.
Remove CPlayer; they are now just simulation entities.
Handle player colours via simulation system.
Add a default map for Atlas, so it always has something to load.
Move network documentation to Doxygen.
Remove lots of now-unused code.

This was SVN commit r7653.
2010-06-30 21:41:04 +00:00
e88391e5d8 # GUI bug fixes.
Align rendered shapes to pixels, to avoid fuzzy textures and subpixel
gaps at unlucky screen sizes.
Reposition dropdown scrollbars correctly after dynamic size changes.
Fix mouse-drag selection of text in input controls.
Draw input selection background as a nicer size.
Support tooltips on lists.
Support 'enabled' on lists.
Fix crash when switching GUI pages in tick hander.

This was SVN commit r7649.
2010-06-30 21:20:08 +00:00
97a1b7dc2d Reduce use of strongly-discouraged JS_ValueToFunction
This was SVN commit r7636.
2010-06-27 11:55:49 +00:00
7dca91f26b # Various changes to the text rendering system.
Rewrite font builder tool to be much simpler and to support more text
effects.
Change GUI to use new set of fonts.
Switch font textures from TGA to PNG so they're easier for the font
builder to create.
Support RGBA font textures (for e.g. stroked text).
Greatly improve text rendering performance by using vertex arrays.
Fix rendering code leaving vertex buffers bound.
Add 'clip' property to GUI text objects, to disable clipping when
rendering.
Delete part of unused console function registration system.

This was SVN commit r7595.
2010-05-30 13:42:56 +00:00
4ff8d8742c Partially support Unicode strings in GUI XML files
This was SVN commit r7594.
2010-05-30 13:11:32 +00:00
11a20e1bcf # Handle terrain passability and movement costs in pathfinder.
Simplify terrain code (remove Handle indirection).
Delete unused terrain properties.

This was SVN commit r7590.
2010-05-27 23:31:03 +00:00
828400d82e # Support floating units in new simulation system.
Fix rendering of underwater lines.
Fix rendering of unit selection outlines in Atlas.
Remove some obsolete hotkeys.

This was SVN commit r7589.
2010-05-27 23:23:53 +00:00
56bb858802 # Delete a lot of obsolete simulation code.
This was SVN commit r7555.
2010-05-20 18:09:23 +00:00
a78e6dbe26 # Delete a lot of obsolete networking code.
Remove the -sim1 flag since it no longer works.

This was SVN commit r7554.
2010-05-20 17:58:37 +00:00
c684c211a2 # Basic experimental multiplayer integration with new simulation system.
Add new turn manager that should be more correct and potentially more
efficient.
Remove evil CNetServer/CNetClient multiple inheritance of CTurnManager.
Add multiplayer autostart.
Various minor cleanups.

This was SVN commit r7551.
2010-05-20 00:59:01 +00:00
ae08adc55d # Fix possible GC crash bugs
This was SVN commit r7546.
2010-05-15 11:21:40 +00:00
f339837afd Try to fix potential problems when right-clicking minimap
This was SVN commit r7521.
2010-05-09 00:53:25 +00:00
fe53bce3b1 Rewrite the clone-object-between-JS-contexts code (for GUI<->simulation interface) to be more efficient.
Delete unnecessary unused incomplete profiler scripting support.
Clean up some JSAPI code to use newer features.
Display simulation script functions in the profiler.

This was SVN commit r7503.
2010-05-05 22:36:35 +00:00