1
0
forked from 0ad/0ad
Commit Graph

1797 Commits

Author SHA1 Message Date
ad98213c39 config - fix problem with stl version detect, cleanup
debug - documented
debug_stl - WIP; large changes because specialized containers were
breaking in some cases. now have to do it "right" ;p
add SLIST container and MULTISET

This was SVN commit r2461.
2005-07-03 20:47:24 +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
e84b8bd017 Fixed regression caused by not understanding my code
This was SVN commit r2457.
2005-07-03 01:37:49 +00:00
580d0c7892 Everything-except-for-VS2005 fix: disable warning disabling to avoid warnings
This was SVN commit r2456.
2005-07-03 00:50:49 +00:00
2ea40a23a3 VS2005 compatibility fixes and warning adjustments:
Updated DLLs.
Added DirectX headers/libraries, since they're not in the platform SDK.
Fixed invalid STL iterator usage.
Disabled STL in stack trace, since it breaks.
Added comments for some reported warnings.
Corrected some apparent off-by-one errors.
Defined strlen_s to strnlen.
Probably broke pre-beta2 versions of VC2005.

This was SVN commit r2454.
2005-07-02 21:42:55 +00:00
f3b5e08030 CStr: VC2005 fix - mustn't dereference end()
snd: Only open device once

This was SVN commit r2452.
2005-07-01 22:53:03 +00:00
54bd7367e8 VC2005 const fixes
This was SVN commit r2451.
2005-07-01 02:11:45 +00:00
a1e149ab11 more of the asserts.. also:
- increase stack trace buffer size (needed for some complicated nested
expressions)
- fix bug in container output - no longer treat iterator (i.e.
x::iterator) as an x string (now uses match_wildcard instead of simple
string compare)
- add unicode match_wildcard
- bugfix for vectored exception handler - was always ignoring exceptions
from main thread (fixed the previous fix where it was always grabbing
all exceptions ;p)
- better array display (display less of huge arrays)
- fix nesting limit (which was too low); make sure infinite
nesting/indirection can't happen

This was SVN commit r2448.
2005-06-28 04:12:50 +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
22a9ccb00a fix UDT/array separators and empty UDT handling; now also dump base classes; cleanup; prevent nested stack trace
win: fixed-pitch font for error dlg

This was SVN commit r2444.
2005-06-27 00:28:50 +00:00
1367825d47 config: detect STL version
debug_stl: commented, improved validation functions and #ifdef-ed
STL-version-specific code
wdbg: prevent vectored exception handler from preempting __try (by

This was SVN commit r2443.
2005-06-27 00:25:10 +00:00
9007d77030 ScEd/lib compatibility - USE_WINMAIN (since it uses WinMain instead of main) and NO_MAIN_REDIRECT (so it can use MFC's WinMain)
This was SVN commit r2442.
2005-06-26 17:12:48 +00:00
a50b118c6c Added SmoothElevationPainter.
This was SVN commit r2441.
2005-06-26 10:28:39 +00:00
c4bf180bfc add support for displaying values in stl containers; also moved stl_simplify_name here.
win.cpp: fix WinXP dependency

This was SVN commit r2438.
2005-06-25 07:54:15 +00:00
8669593b33 - gracefully handle buffer overflow without an annoying warning (allows finding out cause)
- revised dump_sequence to support arbitrary containers and added
dump_array wrapper for simplicity
- check UDT member offset against total size for safety
- disambiguate type and data ids
- prevent duplicated and cyclic display of pointers

This was SVN commit r2437.
2005-06-25 07:47:33 +00:00
85a8d217de config: add endian detect
byte_order: use config.h defines (avoids pulling in sdl.h everywhere)
precompiled: now include *all* C++ headers

This was SVN commit r2436.
2005-06-25 07:43:13 +00:00
5c4d41fd0f Initial parts of Atlas integration
This was SVN commit r2435.
2005-06-25 02:21:26 +00:00
dan
816293ff36 Added iniFromScenario code through a new constructor in Map::
Initial test, doesn't load the .xml yet,

This was SVN commit r2433.
2005-06-24 04:46:13 +00:00
6562096d62 - improve stack trace stop condition (don't stop at kernel32 callbacks; don't report spurious errors)
- rename *idx* as *id*
- add special-case for std::vector and ignore all other std::* UDTs
- clean up UDT handling

This was SVN commit r2431.
2005-06-22 23:41:43 +00:00
634b09dec7 debug, wdbg: fix skip accounting for debug_dump_stack if context was passed
win: fix typo causing pre_main functions not to be called

This was SVN commit r2430.
2005-06-22 23:38:04 +00:00
8f9a3fc38f - config.h: massive improvements, much clearer.
- tentatively activate PCH if gcc > 3.4. remove XP_ defines (which were
undocumented; now in scripting/spidermonkey.h)
- rename some config defines
- move sysdep/debug.h to lib/debug.h (it's portable; was wrong all
along)
- grouped all debug heap related stuff to debug.h:debug_heap_*
- sysdep: fix circular include issue with debug.h

This was SVN commit r2427.
2005-06-22 03:23:22 +00:00
064dd5699d - read() and write() are now implemented as functions (avoids having to #undef them)
- HAVE_DEBUGALLOC renamed to HAVE_VC_DEBUG_ALLOC

This was SVN commit r2426.
2005-06-22 03:14:35 +00:00
f3951fbfae all JS-dependent code now includes scripting/SpiderMonkey.h instead of <js*.h> directly - see rationale in that header.
singleton: removed unnecessary headers

This was SVN commit r2425.
2005-06-22 02:23:46 +00:00
92e50f2992 wdbg: increase stack trace size, fix nasty typo and remove testing assert
wdbg_sym: add new tests; WIP: dumping std::vectors

This was SVN commit r2423.
2005-06-21 18:16:28 +00:00
6d648d5293 fix conflict; assert now uses display_error
This was SVN commit r2421.
2005-06-21 16:48:09 +00:00
28e50ab752 - sysdep: moved posix versions of display_msg etc. to new unix.cpp
- add new portable display_error (and convenience macro DISPLAY_ERROR,
if advanced params aren't needed; don't want to break C compat). this is
the old assert dialog and more; allows ErrorReaction (see sysdep.h) to
be carried out according to users wishes.
- add win_is_locked for deadlock avoidance

This was SVN commit r2420.
2005-06-21 16:44:12 +00:00
0a0699c212 - split into symbol engine and everything else
- thread-safe init and stack trace output (more robust)
- better symbol display (no longer suppress all STL; UDT line splitting
- add debug_wprintf and debug_disable_leak_reporting
- exception handler now called from __try and vectored chain (if
supported by OS); will even work while being debugged and isn't stomped
on by some other UnhandledExceptionFilter users

This was SVN commit r2419.
2005-06-21 16:39:40 +00:00
65f9816a21 - callback mechanism uses defines instead of easy-to-get-wrong hardcoded strings (e.g. .LIB$WTB)
- main init hook no longer calls main() - that was causing stack
weirdness and is forbidden. provide support for the app calling init
directly (in case someone else is already hooking main)

- wdetect: add support for old drivers that set OpenGLDrivers
incorrectly (my laptop, so I can test ;p)

This was SVN commit r2418.
2005-06-21 16:31:55 +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
d4617cbd3e Minor warning-fixes and miscellaneous tidiness
This was SVN commit r2416.
2005-06-20 22:04:08 +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
470d87c489 Added simple elevation painter as well as array syntax for AndConstraint, RandomTerrain and the new MultiPainter.
This was SVN commit r2407.
2005-06-20 03:18:51 +00:00
2bfad45723 Added initFromScenario function for Dan to work on.
This was SVN commit r2405.
2005-06-20 02:45:11 +00:00
06b3e512d7 Modified the way objects are converted from JS to C++ to make it easier to use.
This was SVN commit r2404.
2005-06-19 22:43:07 +00:00
e3d8dd1b82 Colour Tester: added display of DXT version and image size
This was SVN commit r2401.
2005-06-18 00:56:50 +00:00
92d221f183 Interact.cpp: Use double instead of float for storing absolute times (since the precision is required).
Atlas: Nicer handling of menus.

This was SVN commit r2400.
2005-06-17 23:14:06 +00:00
471fd5d6f3 Unbroke more; plus some minor changes.
This was SVN commit r2398.
2005-06-17 01:28:35 +00:00
2f0c785ba7 reorganize code; add paranoid checking for core support of extensions in case the driver forgot to advertise some; remove deadwood (oglPrintErrors - oglCheck does the same); prefix the feature/limit variables with ogl_; add oglHaveExtensions call
This was SVN commit r2396.
2005-06-16 22:21:12 +00:00
87d055efd9 add error codes; reorder some code for better grouping; locking is now hopefully correct; symbol delimiting improved; now able to decode "which register is it stored in"; refactor dump_sym (no longer determine size; it's now only a manager); more robust stack frame treatment; dialog now usable for exceptions as well; figure out correct exception locus (SEH location is bogus).
This was SVN commit r2395.
2005-06-16 22:00:58 +00:00
d9d8d3ea2b wdetect: refactor DLL version code (now used for gfx and sound drivers). now hopefully correctly handles multiple opengl drivers (e.g. due to remnants from old drivers).
This was SVN commit r2394.
2005-06-16 21:55:02 +00:00
40bfeb37c1 ogl_tex: max_tex_size -> ogl_max_tex_size
assert_dlg, udbg, debug.h: dialog with stack trace is now used in dev
mode for exceptions as well

This was SVN commit r2393.
2005-06-16 21:52:35 +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
40b26227d7 singleton.h: use assert2 (avoid trouble in wdbg code)
lib.h: reorder error codes (more clear) and add a few

detect.cpp, gfx.h: move gfx_mem (amount of video memory) here from ogl

This was SVN commit r2391.
2005-06-16 21:46:33 +00:00
e43892634b Trying once more to rename this stuff correctly...
This was SVN commit r2389.
2005-06-14 20:46:45 +00:00
79b92f8a16 Renaming new PMDExp
This was SVN commit r2388.
2005-06-14 20:42:41 +00:00
982bcf268d Deleting old PMDExp...
This was SVN commit r2387.
2005-06-14 20:39:51 +00:00
5d72244c0c Minor changes to the new PMDExp code, to make it compile successfully. Removed redundant files.
This was SVN commit r2386.
2005-06-14 20:33:50 +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
64e2234e81 Latest version of pmdexp provided by Rich (though he's not sure if it's in a compileable state or not).
This was SVN commit r2381.
2005-06-09 22:43:04 +00:00
08ef5c2b68 Redesigned part of RMS (removed "CenteredPlacer" concept, made createMulti a JavaScript library function).
This was SVN commit r2379.
2005-06-07 07:21:55 +00:00
bd53b14f58 More work on RMS:
- Created binaries/data/mods/official/maps/random folder to store maps
and also moved rmlibrary.js to maps (though perhaps it should be
somewhere in system?).
- RM generator now uses "logical terrains" that can have units attached
to them in addition to textures, for things like forests.
- Added basic clump placer, avoid constraints, layered painter, and
random terrains (each tile is chosen between several options).
- Misc. infrastructure changes.

This was SVN commit r2378.
2005-06-06 07:46:28 +00:00
dbecf93e82 WIP; fix some internal errors when in release mode: no more div-by-zero, reduced access violations.
revised get-crash-location code (very much trial+error, as StackWalk64
doesn't report errors) - it now looks to be bulletproof.
TODO: symbol addresses in release mode appear to be incorrect => value
display is completely worthless.

This was SVN commit r2376.
2005-06-05 05:10:45 +00:00
33a2f16ec3 remove sundry debug remnants
This was SVN commit r2375.
2005-06-05 05:07:22 +00:00
121780b733 win_internal: add DataKind (fix for dbghelp.h which left it out)
wdbg: work around several dbghelp flaws (most importantly concerning
address of symbol, which was leading to completely wrong display).
refactored sym_dump_*. also further cleanup + dox.

This was SVN commit r2373.
2005-06-04 18:17:56 +00:00
211c8e66d8 win_internal: add DataKind (fix for dbghelp.h which left it out)
wdbg: work around several dbghelp flaws (most importantly concerning
address of symbol, which was leading to completely wrong display).
refactored sym_dump_*. also further cleanup + dox.

This was SVN commit r2372.
2005-06-04 18:17:29 +00:00
4c16658a09 Updated autobuilder to maybe work.
This was SVN commit r2369.
2005-06-02 18:13:38 +00:00
e583af307f Updated autobuilder to update ps.pdb.
Animation files with filename="" are now ignored.

This was SVN commit r2368.
2005-06-02 18:04:20 +00:00
b657a1cbca Added CStr and some other things to precompiled.h, to reduce build times.
Altered CStr/UniDoubler's macros, to avoid polluting/conflicting/etc.
Fixed headers in non-PCH builds.
Used the _d version of vorbisfile*.lib in Debug builds.

This was SVN commit r2366.
2005-06-01 20:12:45 +00:00
7c099ce3cf further improvements to stack trace for invalid string pointers, floats, arrays and std::string.
asserts now correctly retrieve thread context in release mode (worked
around VC problem with __asm in macros)
added sample code to enable SE_DEBUG_NAME (pending)

This was SVN commit r2361.
2005-05-31 19:00:49 +00:00
bdf84e769c WIP. significant improvements+cleanup. work continues on stack trace - still fails under some conditions in release builds.
This was SVN commit r2358.
2005-05-30 06:11:10 +00:00
e2552b8341 debug.cpp: bugfix in cat_atow
lib: add EXTERN_C
win: move get_module_filename here, add to sysdep
wdll: use EXTERN_C

This was SVN commit r2356.
2005-05-30 04:51:47 +00:00
f0cbe8e440 fix several shortcomings noted in the stack trace code. now handles pointers much better; all-round better parsing+formatting and more robust.
also moved some utility functions to lib.cpp

This was SVN commit r2352.
2005-05-27 04:40:29 +00:00
MarkT
d6c4bf3302 Changes to actor speed specifications.
This was SVN commit r2350.
2005-05-27 00:38:30 +00:00
7179bd893e debug: fix crashlog output (now platform-independent newlines; BOM written correctly)
wdbg: major improvements to exception handler. now catches and displays
C++ exceptions (no small feat). also fixed a few bugs in stack trace;
minor improvements elsewhere.

This was SVN commit r2346.
2005-05-24 07:11:17 +00:00
982e051c54 Changed PSERROR to inherit from std::exception
This was SVN commit r2344.
2005-05-24 00:00:40 +00:00
34f599f3d4 Completed the area placement classes (AreaPlacer, AreaPainter and Constraint) and JS equivalents. Now it remains to implement some of the more interesting ones :P.
This was SVN commit r2340.
2005-05-23 03:51:37 +00:00
6c7dfedcbf Repaint ScEd at 2 fps when non-minimised but behind other windows
This was SVN commit r2339.
2005-05-23 03:11:04 +00:00
56343ae9c8 Updated ScEd to no longer repaint when minimized and repaint at only 20 FPS normally. The result is much friendlier on your other applications and on your fan.
This was SVN commit r2338.
2005-05-23 02:52:37 +00:00
aa027d20ec Fixed ScEd again - renamed the network system's CCommand to CNetCommand, since ScEd used that name first :-P
This was SVN commit r2337.
2005-05-23 02:39:07 +00:00
4d8c1014fb Fixed ScEd
This was SVN commit r2336.
2005-05-23 01:55:30 +00:00
21149d9fd0 Renamed translate() to I18n::translate(), to minimise conflicts
This was SVN commit r2334.
2005-05-22 22:58:27 +00:00
641806cc22 zip, lockfree: minor comments
debug.*: move crashlog write code here
wdbg: improvements to breakpoint code. major cleanup in exception
handler; de-hackified. mostly done, not yet stress-tested when not
running in debugger

This was SVN commit r2333.
2005-05-22 22:32:58 +00:00
26b1cf5556 Random animations.
This was SVN commit r2330.
2005-05-21 01:40:32 +00:00
0331883a86 Temporary fix for mouse input. Improved performance in player-colour model renderer. Also improved performance in lighting, at least in unoptimised builds.
This was SVN commit r2328.
2005-05-20 17:09:47 +00:00
409675eb44 Added icons
This was SVN commit r2326.
2005-05-20 03:28:37 +00:00
16853b79a9 Actor Editor: drop-down list of materials; event/load in animations; no grey/white stripes in main actor list.
Colour Tester: supports drag-and-drop of image files onto program
window.

This was SVN commit r2324.
2005-05-19 05:06:28 +00:00
7f3a74f077 Updated the Atlas-based tools build system, to create several .exes and one .dll. And some other minor changes that I'll try to remember later.
This was SVN commit r2323.
2005-05-19 02:46:42 +00:00
f61a5d1c25 Off-by-one bug in the CEntityList Serialize method; was storing the last entity twice
This was SVN commit r2320.
2005-05-18 22:03:02 +00:00
f1e9bf6227 Fixed warnings
This was SVN commit r2319.
2005-05-18 21:19:56 +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
600a55b7d7 Boost Random
This was SVN commit r2315.
2005-05-16 15:19:46 +00:00
e41ddc4e77 Added random number functions using Boost as well as a "library.js" file in which the high-level API can be implemented in JS.
This was SVN commit r2313.
2005-05-16 07:30:39 +00:00
7054957514 Minimap: Corrected orientation. Also cleaned up a bit, and fixed some inefficiencies.
Camera: Corrected code that wasn't doing what it looked like it was
doing, and was crashing JS "new Camera".

This was SVN commit r2302.
2005-05-13 01:15:53 +00:00
08ada296f8 Replaced tabs with 4 spaces each to be consisent.
This was SVN commit r2301.
2005-05-13 00:54:10 +00:00
b772559fbe Added get/setTerrain and get/setHeight functions to the RMS API which allow control of each individual tile, and base height argument to init().
This was SVN commit r2300.
2005-05-13 00:39:13 +00:00
c8dc599ab8 Un-hardcoded the rmgen output path since it's not useful when you run it out of binaries/system. You should now type
rmgen script.js ../../binaries/data/mods/official/maps/scenarios/map

This was SVN commit r2297.
2005-05-12 21:17:32 +00:00
2063404672 Removed #pragma once's and .ncb file for rmgen, and added binaries/system/rmgen.exe to version control.Made rmgen use js32d.lib instead of js32.lib.
This was SVN commit r2296.
2005-05-12 21:02:55 +00:00
bad202f4d0 Removed #pragma once's and .ncb file for rmgen, and added binaries/system/rmgen.exe to version control.
This was SVN commit r2295.
2005-05-12 20:59:22 +00:00
304037164b Initial stub of RM Generator. This will gradually get updated with the algorithms from the ASCII generator.
This was SVN commit r2293.
2005-05-12 05:16:59 +00:00
a75bf7fb1e Updates to texture converter and DDS code: Generates sharpened mipmaps. DDS decompression now identical to NVIDIA PS plugin (and probably most hardware). Compression lossless when possible (e.g. always for DDS->TGA->DDS), and slightly improved in other cases.
This was SVN commit r2291.
2005-05-12 03:55:39 +00:00
e4d1454fd8 slight revisions to comments.
breakpoint code looks to work, but self-test isn't yet complete.

This was SVN commit r2290.
2005-05-12 02:58:40 +00:00
add0a0aa94 give symbolic names to assert return val
wdbg: breakpoint code now compiles, untested

This was SVN commit r2288.
2005-05-11 22:49:01 +00:00
f911bdc4b1 move debug_microlog to debug.cpp, call it debug_wprintf_mem. move MICROLOG define to pyrogenesis.h.
major cleanup+documenting in debug.h; added breakpoint interface.
sysdep: moved debug_out definition to udbg.cpp

This was SVN commit r2287.
2005-05-11 22:44:20 +00:00
758251edfd further debug_out -> debug_printf; (comment) cleanup
ogl_tex: minor formatting improvements

This was SVN commit r2286.
2005-05-11 22:40:19 +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
5821ebb629 Tidied up a bit more
This was SVN commit r2283.
2005-05-11 05:26:24 +00:00
6034821b4a Slightly more readable enum naming in mipmap code
This was SVN commit r2282.
2005-05-11 04:56:05 +00:00