1
0
forked from 0ad/0ad
Commit Graph

251 Commits

Author SHA1 Message Date
bed9363bfe lib/input.h was old+bad code. fixed in_add_handler return type to enum; renamed EV_PASS to IN_PASS; no longer include sdl.h from other code (instead rely on input.h)
This was SVN commit r2975.
2005-10-20 17:44:56 +00:00
02341916dc Minimap: refactor if() spanning 200 lines into if(!) return
cause of minimap click no longer working has been found:
GlobalInputHandler isn't getting called due to incorrect order of
registration. fix is pending.

game: add code from ScEd that fixes lack of player color (by setting up
local players)
thanks to Simon for finding the cause (I want that crystal ball :D)

This was SVN commit r2967.
2005-10-19 06:11:21 +00:00
2ef8a7b630 Sped up minimap rendering by having a separate LOS texture and recomputing only that per frame. To force a recompute of the terrain texture, set g_TerrainModified to true sometime before the render step of each frame (it is set back to false at the end of the frame).
This was SVN commit r2963.
2005-10-19 03:02:51 +00:00
b350f54162 ogl_tex: centralize OpenGL caps detection; allow user override for broken card/driver combos
- enable floating point exceptions (helps catch bugs)
file.cpp: improved error checking in dir_open/dir_next_ent code
vfs.h: expand docs; add note on patching + SCM
main: use spf (1/fps) to derive TimeSinceLastFrame (makes for smoother
updates)
timer: rename SUM_TIMER to TIMER_ACCRUE. interface change allows
unlimited number of timers (instead of static limit as before).
documented everything

This was SVN commit r2958.
2005-10-17 23:35:16 +00:00
953d2621dd timer: improved timer_add_client - no longer has fixed-size storage. btw, name will change here - not happy with SUM_TIMER.
GUI/input code: moved g_active, g_keys etc. into ps/Globals; it has its
own input handler as well

all users of fopen(): add file_make_full_native_path to get correct path
even though current dir = system/

This was SVN commit r2954.
2005-10-16 23:16:08 +00:00
af70f0136b GameView: made file-scope data static (prevents accidental/evil use from other files and name collisions)
TextureEntry: add SUM_TIMER around base color calculation
Zip: add SUM_TIMER around inflate/memcpy

main: re-removed g_MaxZoomHeight - this doesn't belong in the message
loop. it resides in GameView.cpp

This was SVN commit r2945.
2005-10-15 21:15:33 +00:00
pyrolink
bf99370232 Lowered g_YMinOffset
This was SVN commit r2944.
2005-10-15 19:38:04 +00:00
7b31f0372b GameView: move camera lock params here
wsdl: add proper event queuing mechanism (no longer requires hacky
polling for changes and avoids WM_USER)
rename keys[] and mouse_buttons to g_keys and g_mouse_buttons
fix flipped mouse wheel direction; wsdl now sends up AND down event
(removed 'reset' hack in main.cpp)
main: clean up event handler and kill_mainloop

This was SVN commit r2934.
2005-10-13 18:05:55 +00:00
c498468fd0 wsdl(+main): add support for cleanly shutting down game if X clicked or Alt+F4 pressed. also cleanup; correctly declare SDL_Event
dyn_array: add pool allocator - see comments.
file(+gamesetup): add suballocator for aiocb (requires shutdown); revise
validator; rename file_*_io to file_io_*

This was SVN commit r2906.
2005-10-12 04:27:55 +00:00
c92c9376b9 Fix out-of-range write to the keys[] array, caused by fake SDL_KEY* events.
Pressing the Windows key no longer crashes the Linux build.

This was SVN commit r2814.
2005-09-29 22:22:43 +00:00
b67b023513 Add more verbosity to the shutdown sequence.
Shutdown doesn't look clean on Linux, and this might help highlight
current and future problems. Besides, we don't want shutdown to take
ages, do we? ;)

This was SVN commit r2801.
2005-09-29 02:30:30 +00:00
a769783d5d Fix scroll wheel zooming on Linux.
Refactored HandleEvent into CGameView.

This was SVN commit r2800.
2005-09-28 23:57:55 +00:00
pyrolink
ed0dbb6d89 Added variables used by the MiniMap.cpp and GameView.cpp, and are for the CameraLock() function.
This was SVN commit r2788.
2005-09-28 03:44:21 +00:00
aa118403bb Terrain: CalcFromPosition, to convert world-space to tile-space.
ScEd: Compilation fixes.
Atlas: Screen-space to world-space conversion when editing terrain.
Wireframe option. Minor wxWidgets 2.6.1 fixes. AoE3Ed.

This was SVN commit r2698.
2005-09-12 20:04:26 +00:00
1af9aa074e Added initial version of building placement cursor, which can be shown with the startPlacing(templateName) JS function.
Also activated depth test for selection outlines so they don't overlap
units.

This was SVN commit r2667.
2005-09-05 19:48:28 +00:00
5d62c3f3f7 Atlas: Simple undo system
This was SVN commit r2627.
2005-08-20 15:44:50 +00:00
b4ad393ee4 moved ps/X* to ps/XML/
premake: reflect 2 added and 1 removed source dir
add ps/Util - some helpful functions that were previously in main.cpp

This was SVN commit r2624.
2005-08-14 23:50:37 +00:00
dc027002c0 host of changes to accommodate Atlas:
- input.cpp allows feeding in events from the outside (will be used by
main.cpp and Atlas msg loop)
- most of main.cpp split into ps/GameSetup.*
- main.cpp is now a "controller" that drives the game via SDL events
(Atlas is another such controller that can override main.cpp). it calls
GameSetup functions to set up and processes messages.
- add functions to import AtlasUI.dll automatically

also, the usual refactoring ;)

This was SVN commit r2622.
2005-08-14 23:34:37 +00:00
b5575256e9 wposix: add warning for RTLD_GLOBAL, which isn't supported.
main: add logic for run-time load of Atlas (ATLAS_* section). also moved
GUI code into a GUI_* section, removed console "Testing function
registration", moved input init into a separate function and cleaned up
a bit

This was SVN commit r2619.
2005-08-14 15:23:59 +00:00
0e20c08969 waio: fix spurious WARN_ERR
vfs: integrate hotload code
fixed a few warnings as well.

This was SVN commit r2609.
2005-08-13 17:09:57 +00:00
4aa740bff5 - split up lib/res into file, graphics and sound.
- wposix.cpp: initial support for MEM_RESERVE and MEM_COMMIT semantics
in mmap
- cstr: removed no longer necessary serialization header
- xmlutils: wrap new() calls in nommgr/mmgr; allows tracking other
allocs in this file.
- add u64_from_u32
- various minor comments/improvements.

This was SVN commit r2604.
2005-08-12 17:06:53 +00:00
622ceeda94 - color -> colour
- add note on performance in TextureManager.cpp

debug_stl: more fine-grained #if STL_DINKUMWARE (gets this closer to
working on other STL implementations)
vfs.h: improved dox and moved vfs_path public functions here.
cursor: pass g_mouse_x as a parameter (SwEng)

This was SVN commit r2595.
2005-08-10 01:12:03 +00:00
620c65722f group all config-related code into CFG_ functions. also as in prev. 2 revisions
This was SVN commit r2587.
2005-08-09 16:03:36 +00:00
630b375f4d ScEd updated for new terrain stuff, window styles for pyrogenesis in windowed mode changed to give a bordered movable window.
This was SVN commit r2583.
2005-08-08 03:59:50 +00:00
0b193342e7 fix init order bug that was rendering CLogger inoperable
This was SVN commit r2496.
2005-07-20 04:52:05 +00:00
67777bd159 cursor: remove old Win32 implementation
main: add new variable for clarity

scriptglue: massive refactor. added docs, rearranged into groups,
eliminate forward decls, consistent param checking, some progress on
consistent naming and formatting.

This was SVN commit r2492.
2005-07-20 00:57:17 +00:00
7a889deca3 cursor: tried all sorts of implementations to fix bug#66, but after 2 days of debugging, the problem was found to be elsewhere (issue with delay-loading). fixed by keeping a reference to user32 at startup.
main: replace old memory_debug_turbo_extreme_plus with debug_heap_enable

This was SVN commit r2488.
2005-07-16 17:52:05 +00:00
c0b4abafb6 main: slight bugfix: typo -> compiler optimizations were left disabled instead of only temporarily.
JSI_Sound: add special case to prevent exceptions from being thrown when
sound is disabled via quickstart

This was SVN commit r2486.
2005-07-15 17:58:27 +00:00
2546abbaf1 bugfixes: floats, STL containers; add self-test (exposed many many problems) and more comments
main: removed obvious MICROLOG

This was SVN commit r2462.
2005-07-03 20:48:47 +00:00
549150fe38 Atlas: simple camera control and terrain editing.
Terrain: added terrain-editing code to CTerrain, for better
encapsulation or something.
Console: simplified screen resizing.
Game/etc: removed some unnecessary header file inclusions.

This was SVN commit r2459.
2005-07-03 16:25:48 +00:00
ec6b78b252 rename assert2 debug_assert; use instead of all plain assert(), since there are no longer any issues (e.g. can't use while handling an exception)
This was SVN commit r2447.
2005-06-28 04:06:25 +00:00
cf37e9cbe6 Atlas: Added a button. Reorganised game<->UI communication system.
main.cpp: Allowed correct operation when not calling Init/Shutdown.
Game.cpp: Stopped complaint when starting game with no GUI.

This was SVN commit r2446.
2005-06-27 23:04:34 +00:00
5c4d41fd0f Initial parts of Atlas integration
This was SVN commit r2435.
2005-06-25 02:21:26 +00:00
9c4148aa0c replace display_msg with full-blown error dialog
(makes possible philip's suggestion of continuing even if exts are
missing)

printf: add extern "C"

This was SVN commit r2417.
2005-06-21 16:27:26 +00:00
32772dbf71 So, ScEd updated to comply with terrain XML's (and it seems to work fine too!)
This was SVN commit r2414.
2005-06-20 17:34:17 +00:00
7577d224a6 Terrain XML loading, plus mouse/JS portability and some misc stuff to mix it up
This was SVN commit r2412.
2005-06-20 15:14:36 +00:00
ae0f4fa731 timer.h: require trailing ; after TIMER
wtime.cpp: fix comment
main: reorder includes, remove deadwood, rename a few functions for
consistency, moved config code together into one section, slight change
to system info text file (for new ogl driver detect code), remove
_control87 (see comment)

This was SVN commit r2392.
2005-06-16 21:50:20 +00:00
d24fd1b0c9 Use gl*ARB wherever possible. They are mapped onto the core gl* function if the driver's version is high enough, else onto the extension's gl*ARB function.
(Just for fun, compressed texture uploads are mapped onto a
decompression function if the user's system doesn't understand S3TC
textures.)
Corrected (unless I'm wrong) GL version identification logic.

This was SVN commit r2384.
2005-06-14 03:33:16 +00:00
dd3c8f6fb5 Use the standard Singleton for CLogger, to fix problems with unordered shutdown
This was SVN commit r2383.
2005-06-13 19:31:48 +00:00
33a2f16ec3 remove sundry debug remnants
This was SVN commit r2375.
2005-06-05 05:07:22 +00:00
21149d9fd0 Renamed translate() to I18n::translate(), to minimise conflicts
This was SVN commit r2334.
2005-05-22 22:58:27 +00:00
d0f7cb015c - Linux/GCC (as usual :P)
- Ported lockless code to gcc inline assembly
- A few new net messages (gather, attack, add waypoint)
- Support for new messages in network->entity order converter
- Implemented rudimentary JS interface for Interaction
- issueCommand JS API, connected to the network
- Removed Interaction stuff now replaced by JS
- And something in there should probably break VS builds :P

This was SVN commit r2316.
2005-05-18 05:32:09 +00:00
fd4eb91e93 debug_out -> debug_printf; MICROLOG moved to ps/Pyrogenesis.h
This was SVN commit r2285.
2005-05-11 18:56:30 +00:00
1ff0d112d2 revise loader return values - nicer interface now.
This was SVN commit r2281.
2005-05-11 04:39:21 +00:00
MarkT
86dc351205 Projectile code and updates to some actors that can use it (celt_ijv and hele_iar)
This was SVN commit r2266.
2005-05-10 07:13:25 +00:00
cab424ce81 Creating playlist sub-window to soon try out file access functions. (Committing in-development stuff to get an auto-build incorporating change to GUI .xml names.)
This was SVN commit r2214.
2005-05-02 22:04:29 +00:00
MarkT
bcabe3aa53 Script integration work - valueOf() is no longer required most of the time; also property-change watches and enumeration over entities (but not yet other native objects), rudimentary beginnings of a global events system, and adjusted the status orb to update only on changes.
This was SVN commit r2157.
2005-04-22 07:12:55 +00:00
771a9ba0dd label each system_info field (because even I was getting confused :P). nicer network host/IP detect code
This was SVN commit r2150.
2005-04-19 17:04:12 +00:00
MarkT
2120576bc7 Gathering and unit training (engine-side); also other minor improvements
This was SVN commit r2132.
2005-04-15 04:23:33 +00:00
6a0b5fa0ab ScEd: Added unit deletion. Made zoom less frustrating. Let >2 players work.
Fixed random actor props.

This was SVN commit r2109.
2005-04-03 05:02:00 +00:00