1
0
forked from 0ad/0ad
Commit Graph

2137 Commits

Author SHA1 Message Date
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
ece006f43e sysdep: add restrict keyword (placebo if not supported)
gfx: extern "C"-ed
wtime, util, win, wdbg_sym: minor / commenting only
wdetect: don't skip gfx_card detect if buffer already filled
glext_funcs: remove obsolete defs

detect: call both OpenGL and platform-specific gfx_card detect; cleanup
vendor name to remove copyright/Inc crap

ogl: remove some variables that don't belong. moved vendor cleanup to
detect. moved S3TC emu code to ogl_tex

This was SVN commit r2905.
2005-10-12 04:22:44 +00:00
990e343ae6 renderer: load/unload water textures (similar to alpha maps); do that in delay load and avoid leaking them.
GUIrenderer: add oglSquelchError

lib.h: add feq() (checks for floating point equality); remove redundant
if from SAFE_DELETE
maths: use new feq()
Model*RData, VertexArray: fix trivial warnings

This was SVN commit r2904.
2005-10-12 04:16:41 +00:00
de5361047a Player colour rendering fallback now looks exactly the same as the fast path
again (using multi-pass).

This was SVN commit r2902.
2005-10-12 01:07:01 +00:00
e05ca36bc5 Changed water color/depth/alpha again
This was SVN commit r2897.
2005-10-10 23:05:53 +00:00
1b59f4c56e Keep renderer in sync with simulation when running too slowly for the sim to keep up
This was SVN commit r2895.
2005-10-10 19:49:02 +00:00
f2ccab089c new cumulative timer as requested for entity slowdown investigation.
use SUM_TIMER; see comments in source+header.

(i've tested this on my laptop, but only get as far as the main menu.
hopefully this won't break anything :S)

This was SVN commit r2893.
2005-10-10 17:33:34 +00:00
6efb1e1c00 Single pass player color rendering.
Falls back to a simpler formula when only 2 TMUs are available.
CRenderer is now a JS object called "renderer" for scripting.

This was SVN commit r2891.
2005-10-10 14:15:28 +00:00
faa6a78304 Added LOS setting to GameAttributes. Also fixed a small bug with LOS rendering (the patch's render data wasn't updated for LOS until the second frame after it became visible, displaying it in black for 1 frame).
This was SVN commit r2887.
2005-10-10 03:35:32 +00:00
c468eedbbb Sped up LOS rendering.
This was SVN commit r2880.
2005-10-09 08:14:42 +00:00
57cfc7c6ac Made LOS drawn using terrain vertex color (which requires some terrain render data to be rebuilt each frame, but is faster).
This was SVN commit r2878.
2005-10-09 04:40:18 +00:00
aa1348b6a8 Atlas: Disable LOS when editing. Set up initial terrain data before starting CGame (since initialisation of LOS (and probably other things in the future) wants to know about the terrain).
World: Deallocate LOSManager.

This was SVN commit r2877.
2005-10-09 04:29:58 +00:00
0ed2815c8b Added initial version of LOS, and updated minimap to show both LOS and water.
LOS issues still outstanding:
- LOS looks ugly because of quad tesselation into 2 triangles
- Quad tesselation is unspecified by OpenGL (in fact using GL_QUADS on
LOS quads seemed to give different tesselations than it did for the
underlying terrain quads, but terrain rendering also used GL_QUADS).
This should be fixed once we decide on the quad tesselation issue.
- Units with traits.vision.permanent set are visible through FOW even if
you havent seen them before; this should only be true when you have seen
them before. But it gets even more complicated - if a permanent unit
seen through FOW dies or gets upgraded or something, perhaps you should
remember the old version. I'm not completely sure how to do this
(probably involves cloning its actor somehow).

This was SVN commit r2876.
2005-10-09 03:43:03 +00:00
7ebdefec4b Atlas: improved brushes
This was SVN commit r2875.
2005-10-09 03:26:16 +00:00
8bc8bcb740 Atlas: more flexible brushes
This was SVN commit r2868.
2005-10-08 03:55:21 +00:00
29d6f420fd GameView: removed unused ancient camera code.
Terrain: nicer handling of negative map coordinates (mainly for Atlas
brush previews that fall over the edge).
Misc: reverted seconds->microseconds.

This was SVN commit r2866.
2005-10-07 21:09:29 +00:00
04650efe7a Lots of gcc -Wall fixes. The common ones:
- switch() statements don't handle all values in an enum
- missing \n at end of file
- non-virtual destructors in classes containing virtual functions
- order of initializers in constructor initializer lists
... some other stuff (signedness, nested comments, unused variables) as
well.

This was SVN commit r2864.
2005-10-07 15:24:29 +00:00
8529426fa8 Optimisation: Don't recalculate actor transform data for entities that haven't moved
This was SVN commit r2862.
2005-10-07 02:44:54 +00:00
dbd58f4011 Remove CRenderer::Close(), which wasn't called anyway and the only reasonable
calling site would have been just before the destructor.
m_VertexShader is no longer leaked.

This was SVN commit r2860.
2005-10-06 16:07:36 +00:00
greybeard
6b25cafe05 The const size_t GFX_DRV_VER_LEN was increased from 64 to 256 to accommodate extraneous drivers found in the windows registry. This was made to prevent an assertion in wdetect.
This was SVN commit r2858.
2005-10-06 03:45:33 +00:00
bc8eba1002 Work around a bug in ATI's Linux OpenGL driver.
This was SVN commit r2857.
2005-10-06 03:29:26 +00:00
13697b8512 Stupid bug in VertexArrayIterator template - forgot a return *this.
This was SVN commit r2854.
2005-10-05 16:54:10 +00:00
f1ee2cd66d Add the notion of render paths and an appropriate configuration option.
Add Ogl_Shader and Ogl_Program handle types for shaders/programs loaded
from
files.
In the vertexshader render path, use a vertex program for lighting for
optimization.

This was SVN commit r2853.
2005-10-05 16:42:09 +00:00
a4fc7105be Explicitly call VertexBufferManager cleanup code, since we can't rely on
the order of destructors called for global instances.

This was SVN commit r2846.
2005-10-04 20:54:47 +00:00
721f6e4a1e Atlas: [very] primitive brushes
This was SVN commit r2843.
2005-10-04 02:50:59 +00:00
5e3b6fcbe3 goto crosses initialization (deja vu? ;)).
This was SVN commit r2840.
2005-10-03 19:37:45 +00:00
b8c2f424e7 glDrawRangeElements -> glDrawRangeElementsEXT (fixes compilation error; EXT/ARB/etc extensions need to be used for everything not in GL1.1)
Reinserted mu-like symbol.
Fixed some minor warnings.

This was SVN commit r2838.
2005-10-03 16:04:55 +00:00
d367014972 vfs_store: set return value to #bytes written
fix 2 bugs in tex / ogl_tex reported by philip (related to caching) -
thanks!
tex: documented header and improved implementation. add tex_transform_to
for convenience. change tex_write to require going through tex_wrap.

This was SVN commit r2837.
2005-10-03 12:57:31 +00:00
6fc1f45fa6 Stab at fixing the VertexArray compile error on VC++.
Added float-to-byte color conversion, including an SSE assembler
version.
Model renderer: Push UV coordinates into a shared vertex array and use
bytes instead of floats for the color array, thereby, significantly
reducing
the total size of vertex arrays.

This was SVN commit r2827.
2005-10-03 03:41:42 +00:00
a05e712319 Added VertexArray & co. classes to simplify a flexible, render path dependent
vertex array layout.
Add CModelDefRData, a per-CModelDef render data class.

This was SVN commit r2826.
2005-10-02 21:11:11 +00:00
ffd8630c45 Updated autobuilder to get the .pdb files from 'system'.
Deleted ps_test, since it isn't updated by the autobuilder and will be
out of date.
Removed console history file, since it doesn't need to be
version-controlled.

This was SVN commit r2823.
2005-10-01 04:26:12 +00:00
a92e92cd46 Basic GL_ARB_vertex_shader detection.
Remove a redundant copy operation in ModelRData::BuildVertices

This was SVN commit r2822.
2005-09-30 22:23:48 +00:00
99c6af533d fix for bug#68. allows opening hidden or system dirs because on some machines, the Windows dir is marked as such.
This was SVN commit r2820.
2005-09-30 15:24:03 +00:00
19b66bf0ff Use BOOST_PP_CAT to delay token pasting until arguments are fully evaluated.
Fixes compile error on g++-3.3

This was SVN commit r2819.
2005-09-30 15:16:03 +00:00
2790981eae CVSROOT: doesn't seem particularly useful now
ObjectBase: removed support for old actor format
Various: reduced sometimes-unnecessary header inclusions
Atlas: slightly nicer tool and message systems

This was SVN commit r2816.
2005-09-30 00:59:42 +00:00
ae20f157bc Accidentally committed experimental changes. Sorry about that.
This was SVN commit r2815.
2005-09-29 22:40:13 +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
fff184b8fb Added sanity checks in hotkey handling.
This was SVN commit r2813.
2005-09-29 22:06:20 +00:00
38dfc3da99 Hardware cursor isn't implemented for X.
Remove dead sys_cursor_create references.

This was SVN commit r2812.
2005-09-29 21:48:04 +00:00
d98abf0685 final refactor (i hope). split up fmt / int_fmt determination to allow override of fmt without overriding int_fmt (useful for unifont.cpp). this changed the signature of ogl_tex_upload. better explained flags in OglTex and warn_if_uploaded.
also a few improvements / stomped on some warnings.

This was SVN commit r2809.
2005-09-29 17:33:30 +00:00
cd2f3948dd changed sys_cursor interface to load directly from file; can add createFromMemory version later if ever needed.
cursor: reflects the above; much simplified now.

ogl_tex: preserve all texture state across reloads. add quality
mechanism (perf boost on older cards). split up upload code. add
ogl_tex_transform(). add more docs.

renderer, GUIrenderer, unifont: bring in line with ogl_tex changes (int
-> uint and call setters before ogl_tex_upload)

GameSetup.cpp: add tex quality mechanism

This was SVN commit r2803.
2005-09-29 05:00:20 +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
7fbbc1b0c6 Darken the background of the profile viewer for better readability.
This was SVN commit r2798.
2005-09-28 22:35:08 +00:00
3ded398729 g++ forbis goto across variable declarations.
This was SVN commit r2796.
2005-09-28 18:46:26 +00:00
f5613e74c8 Changed water color to Jason's dark blue.
This was SVN commit r2792.
2005-09-28 05:53:22 +00:00
pyrolink
41aa9ebda1 Added CameraLock() which makes the camera scroll smoothly over terrain and makes sure it is within g_YMinOffset+Terrain height and g_MaxZoomHeight, which are declared in main.cpp
This was SVN commit r2790.
2005-09-28 03:49:11 +00:00
pyrolink
56257d110e Added changes to interactive minimap so that the camera will stay g_YMinOffset away from terrain it's warped to.
This was SVN commit r2789.
2005-09-28 03:46:05 +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
b7c04793f4 Updated water to use black-and-white texture and mix it with material color, allowing water color to be changed.
This was SVN commit r2786.
2005-09-27 23:14:08 +00:00
f2cae8cb9b Added animated water.
This was SVN commit r2783.
2005-09-27 18:17:45 +00:00
db27ff6c9b bugfix when writing screenshot: was calculating rounded up size for VFS incorrectly.
also fix refcnt for tex_wrap temporarily until mem_assign/mem_get_ptr
do.

h_mgr: add disallow-reload support (required for wrapped ogl_tex since
they are not backed by a file)

This was SVN commit r2780.
2005-09-27 15:35:17 +00:00
609be94b8c comments/cosmetics;
fix UNREACHABLE def on unix;
string_s: use HAVE_STRING_S;
wdbg_sym: fix option set code; explain why search path isn't needed
WriteScreenshot: make sure there's enough mem; use Handle to free mem
(more efficient+less error prone)

This was SVN commit r2779.
2005-09-27 15:20:56 +00:00
8e31f44249 This is what the explicit "this->" before accesses of members of a
template base class needs to look like. More will surely follow.

This was SVN commit r2772.
2005-09-26 23:37:37 +00:00
9f9ab188e1 Add missing ret from ia32_control87 ;)
This was SVN commit r2771.
2005-09-26 23:36:43 +00:00
6c7759700f More explicit %ls instead of %s for wide strings.
This was SVN commit r2770.
2005-09-26 23:36:17 +00:00
3c61029ff1 Some changes to how wchar_t strings are handled to make wchar debug messages
appear on stdout.

This was SVN commit r2769.
2005-09-26 23:20:04 +00:00
ee35659dc7 udbg fixes and a fix for the underscore problem in the assembler symbols
This was SVN commit r2765.
2005-09-26 05:38:40 +00:00
1c71c72e74 Fix for Linux build:
Header filenames in #include are case sensitive

This was SVN commit r2764.
2005-09-25 21:17:35 +00:00
37e9fc0388 - update load times
- config: add proper HAVE_ macro for string_s functions rather than
checking MSC ver directly
- string_s: disable parts of the self-test that trigger errors if not
using the string_s.cpp implementation

This was SVN commit r2760.
2005-09-21 16:42:56 +00:00
d6f31e4157 ogl_tex: documented and cleaned up.
h_mgr: add h_get_refcnt; saw h_alloc was a mess and split it up
mem: remove obsolete 'scope'

This was SVN commit r2759.
2005-09-21 16:11:43 +00:00
8ba42d5a3c ia32.asm: add explicit init function (simplifies other code)
memcpy no longer requires SSE yet is still efficient (clever trick,
hehe)

This was SVN commit r2757.
2005-09-20 04:05:23 +00:00
2a8953452d inlined bits and bit_mask for efficiency (as suggested by philip - thanks!)
add sanity check for struct Tex

This was SVN commit r2755.
2005-09-19 23:40:33 +00:00
13501cf58b hook up emulate_glCompressedTexImage2D to new tex transform code (which takes care of DDS unpack)
to that end, provide support for "wrapping" existing textures so that
tex_* and ogl_tex* calls may be used.

also have renderer use ogl_tex for its created-on-the-fly composite
alpha texture
also named atlas's thread (for fun+profit during debugging)

This was SVN commit r2754.
2005-09-19 22:48:20 +00:00
a3967624af add 64-bit endian-safe read; also bit_mask
work continues on DDS decode. endian-safe; supports dxt1a; now fairly
efficient and cleaned up.

This was SVN commit r2751.
2005-09-18 18:10:23 +00:00
603c475cf0 This was SVN commit r2749. 2005-09-18 06:28:23 +00:00
e5dea3e5a1 Water source code :|.
This was SVN commit r2746.
2005-09-18 03:47:15 +00:00
2b69209fcd bits() param clarification
dds: serious cleanup of DDS decoder

This was SVN commit r2741.
2005-09-17 15:47:00 +00:00
6b10e4b010 tex codecs: fix some warnings (remove unnecessary locals)
ia32: fix register clobbering bug (thanks to philip for reporting it)

This was SVN commit r2738.
2005-09-16 19:19:14 +00:00
3ecdefe973 Atlas: Allow VFS reloading
This was SVN commit r2736.
2005-09-16 06:07:04 +00:00
f0885bde69 Atlas: Simple (and ugly and unreliable) interface to rmgen
This was SVN commit r2735.
2005-09-16 05:29:40 +00:00
599452af85 Atlas: Camera controls.
Elsewhere: Quaternion stuff.

This was SVN commit r2734.
2005-09-15 05:31:49 +00:00
99127e2458 This was SVN commit r2732. 2005-09-15 02:56:24 +00:00
27539d25e8 improvements to memcpy; cleaned up the whole thing and ia32 is now done (knock on wood)
executive summary: memcpy2 aka. ia32_memcpy is a drop-in replacement
that is much faster than memcpy (7% on small buffers, 300% on 192K
buffers)

This was SVN commit r2729.
2005-09-15 00:51:59 +00:00
ff35050d37 This was SVN commit r2725. 2005-09-14 19:43:16 +00:00
c50505f54c read intel doc on multicore, realized it'd break our #cpu detect (which is actually critical because it determines safety of TSC). wrote new CPU detect code which should fix it (wasn't easy, grr); cannot test for lack of Pentium EE hardware ;p
This was SVN commit r2722.
2005-09-14 16:58:10 +00:00
4a7d0e9038 Config: Changed -e to -entgraph (to avoid conflicts with -editor).
Premake: Don't compile Atlas when compiling ScEd, though I can't
remember why.
Atlas: Load existing maps.

This was SVN commit r2720.
2005-09-14 05:37:52 +00:00
a2622cdef7 hotfix for bug in ia32 (code path where ebx was clobbered due to cpuid; incorrect ptr arithmetic passing cpu_type to ia32_cpuid)
+ manual Release build that fixes it

This was SVN commit r2718.
2005-09-14 04:08:23 +00:00
f8ed148370 cpuid -> ia32_cpuid
considerable continued cleanup in ia32
came across article detailing HT detect on multicore systems. that
requires new code, working on it.
pthread: while reading, came across idea of wrapping thread trampoline
in __except -> more reliable exception handling

This was SVN commit r2716.
2005-09-14 01:34:16 +00:00
093e5c2519 Enanced the Cantabrian Highlands map some more, and added a few more comments and utility functions to rmgen and JS API.
This was SVN commit r2714.
2005-09-13 23:00:56 +00:00
fd3437d181 lib: add CPU error code.
ia32: replace get_cur_processor_id with cpuid(0); move cpuid(func, regs)
to asm - it takes care of detecting cpuid.

This was SVN commit r2710.
2005-09-13 21:12:29 +00:00
2ab9584840 snd.cpp: initialize listener orientation and position (my OpenAL drivers complained about the old random values)
premake stuff: call assembler objects *.asm.obj instead of *.obj (so
that ia32.asm doesn't collide with ia32.cpp)
ia32.asm: use .text section for proper linkage

This was SVN commit r2709.
2005-09-13 20:42:01 +00:00
d8da47bd0a quick fix to alleviate breakage until build system accepts .asm files
This was SVN commit r2707.
2005-09-13 04:27:08 +00:00
808a0f7cbe config: additional macro is checked
lib: add bits() function (actually moved it from zip.cpp)
ia32: start moving code out to external asm file (will use NASM in
pre-build step; avoids needing MSC and GCC-specific inline code). move
memcpy test code out to other file

This was SVN commit r2706.
2005-09-13 04:00:41 +00:00
0b72d0f86c Atlas: More portable GL context usage. Smoother and more responsive terrain editing.
This was SVN commit r2705.
2005-09-13 03:57:34 +00:00
a0a01e7a7d Linux/GCC Compat, added some includes, ported inline assembly stuff to gnu syntax (and misc. cleanup in ia32.cpp)
This was SVN commit r2702.
2005-09-12 23:37:52 +00:00
3fdf41bd54 misused SVN to transfer from laptop. fixed a compile error that was in there
This was SVN commit r2701.
2005-09-12 22:58:55 +00:00
15ca12311b more WIP; initial memcpy code
This was SVN commit r2700.
2005-09-12 22:13:03 +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
d64e2ed19f dyn_array: use memcpy2
add tex error codes
move memcpy code to ia32
tex: simplify codec call with separate tex_codec_for* calls
codecs: use error code instead of string; remove redundant params
ia32: heavy WIP - testing memcpy implementations
util: prepare for zero-copy improvement to screenshot code

This was SVN commit r2695.
2005-09-10 14:28:55 +00:00
189786928e minor error path improvements+comments; add WARN_IF_FALSE et al.
This was SVN commit r2693.
2005-09-08 17:14:19 +00:00
3c9ad073bc minor error reporting / wording changes while cruising through.
This was SVN commit r2691.
2005-09-08 01:48:57 +00:00
494d27bdd4 moved SAFE_DELETE to lib.h
dyn_array supports "wrapping" other types of memory (stopgap measure)
texture codecs now load via DynArray (intermediate step to all mem stuff
going through res/mem.cpp)
simplified tex codecs by doing as many checks as possible in
tex_load_mem ("template method"-esque)

This was SVN commit r2690.
2005-09-08 01:47:45 +00:00
467b14e928 - Added stay-in-tile-class and border-tile-class constraints.
- Made objects snap to terrain (the game does this automatically for
entities but it was a problem with actors)
- Small enhancements to the RMS API
- New version of cantabrian_highlands

This was SVN commit r2688.
2005-09-08 01:20:51 +00:00
4cc30aeb56 This was SVN commit r2684. 2005-09-07 02:24:13 +00:00
1a7d67a97f dyn_array: efficient expandable array that doesn't waste mem or relocate itself. TODO: self test and dox
file: expose block size constant; always round user transfers up
tex: transform() now receives what to change, not what to achieve.
tex*: encoding works with DynArray+VFS backend
GameSetup: free g_BuildingPlacer to avoid mem leak.
fixed some warnings+bugs.

This was SVN commit r2679.
2005-09-06 22:44:48 +00:00
9dc8a71b15 Added health properties to BaseEntity so they work properly for Entity as well (on units that don't directly specify them).
This was SVN commit r2677.
2005-09-06 19:30:41 +00:00
6f10e8c09c Updated building placement cursor to make the object glow read and not be placeable if trying to place in an invalid area.
Also a small fix: made the selection bandbox not appear when the view is
being rotated using left+right drag (it doesn't make sense to show it
then).

This was SVN commit r2674.
2005-09-06 08:25:41 +00:00
11de356225 Improved building placer to show the actor that will be placed instead of the original white lines.
This was SVN commit r2671.
2005-09-05 23:44:21 +00:00
65e90614f2 Added hitpoint bars above selected and mouseovered units.
This was SVN commit r2669.
2005-09-05 21:45: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
7b144a11ca ogl_tex: has to be aware of multitexturing because if hotloading a texture on TMU1, we have to re-bind it to that. done
waio: fix bug with SetErrorMode usage triggered by reading "The old new
thing" (Raymond Chen's blog)

This was SVN commit r2664.
2005-09-04 20:49:58 +00:00
819aca0f1c work around flaw in some DDS headers (not setting alpha flag). this is critical because renderer/GUI code now uses TEX_ALPHA flag instead of just checking against all known GL formats containing alpha
This was SVN commit r2663.
2005-09-04 20:05:21 +00:00
c6215a1451 guirenderer: fix bug that was breaking the ScEd button in main menu. it was calling glEnable/glActiveTextureUnit before ogl_tex_bind, which is now also doing that.
self_test: added another note
wtime: fix evil bug - was casting FILETIME* to u64*, which has different
alignment guarantees.

This was SVN commit r2662.
2005-09-04 19:48:26 +00:00
b071585610 Added tile class and "avoid at distance" support to RMGen.
This was SVN commit r2659.
2005-09-03 21:53:07 +00:00
2b55945893 doc clarification as requested by Philip (thanks for feedback!)
This was SVN commit r2656.
2005-09-03 14:41:06 +00:00
f4c535a326 lib.cpp: forgot to use TEST (for self-test)
self_test: add dox (also to wiki)
tex_codecs: further work; renamed+reorg for clarity. separating codecs
from IO implementation

This was SVN commit r2654.
2005-09-02 18:38:25 +00:00
50ea8c532c - PathPackage now does CHECK_ERR. adjusted callers appropriately
- mem.h: export mem_assign (needed to wrap a mem buffer)
- use stricmp in some file extension comparisons
- wposix: properly sets last-error code when opendir fails
- also: misc comments

This was SVN commit r2650.
2005-09-02 03:03:06 +00:00
21709a5a7a (as before, belonged in the previous batches)
This was SVN commit r2649.
2005-09-02 02:58:40 +00:00
71f7fccd12 split texture loader into codecs (greatly eases navigation)
tex.cpp now has loader API and codec support routines.
provide for codecs "transforming" the image; this allows e.g.
decompressing DDS, which is currently done in ogl code (but belongs
here)

This was SVN commit r2648.
2005-09-02 02:56:54 +00:00
9ec828f6fd - both tex.cpp and ogl_tex.cpp had functions named tex_* - confusing. renamed to ogl_tex* to disambiguate.
- ogl_tex_bind now supports multitexturing (avoids need to get id and
then bind manually)
- provide nicer API for querying texture properties (no longer one big
getter). improved GUI determination of texture alpha.
- renderer: another see-if-texture-has-alpha and fixed alpha map code
(wasn't checking if all are same size. only worked because the first map
was larger than the rest

This was SVN commit r2647.
2005-09-02 02:54:02 +00:00
ed5041a301 some infrastructure for self-tests: gets rid of boilerplate code.
squelch debug asserts during self-tests to avoid warning about intended
errors (passing invalid data into functions to test their error
reporting)

This was SVN commit r2646.
2005-09-02 02:47:25 +00:00
43fda176cc This was SVN commit r2631. 2005-08-22 03:27:15 +00:00
e46136fe96 This was SVN commit r2630. 2005-08-22 03:26:40 +00:00
1039e9f2a2 Atlas: Removed compile-time linking
This was SVN commit r2629.
2005-08-20 18:05:25 +00:00
ccb813119e Atlas: Slightly better undo system (with merging of 'continuous' commands)
This was SVN commit r2628.
2005-08-20 17:37:48 +00:00
5d62c3f3f7 Atlas: Simple undo system
This was SVN commit r2627.
2005-08-20 15:44:50 +00:00
a10082d69b Minor fixes
This was SVN commit r2625.
2005-08-16 19:51:18 +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
70b44f6485 moved self-tests into their respective files (this makes checking if a file has one easier) and automatically calls them if #if PERFORM_SELF_TEST == 1 (allows global enable/disable of all tests and also per-file override).
This was SVN commit r2623.
2005-08-14 23:36:43 +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
5f1983b9a4 Avoid "unreachable code" warnings
This was SVN commit r2618.
2005-08-14 02:07:12 +00:00
9e40ebc93d RealDir.watch wasn't initialized, leading to complaints at exit. fixed
This was SVN commit r2614.
2005-08-13 23:37:31 +00:00
3552c54bdc Made ToPrimitive throw on failure (since that is preferable to returning an undefined value)
This was SVN commit r2613.
2005-08-13 18:32:58 +00:00
a0e7d02cdd Fixed and rebuilt ScEd. Updated tex to handle greyscale PNGs.
This was SVN commit r2610.
2005-08-13 17:14:57 +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
fac9a8aa87 reading a gamedev thread triggered the realization that WDIR no longer needs to store full path in dirent. therefore, streamlined opendir/readdir/closedir; I guess they are a good bit more efficient now.
This was SVN commit r2606.
2005-08-12 22:19:31 +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
8475c16c31 fix bugs in ilog2 (yoink) and add self-test+asserts.
This was SVN commit r2600.
2005-08-11 02:02:10 +00:00
aba23e4fdb config: got my grubby hands on a list of OS defines, so those have been assimilated. also add STL_ defines for GCC and ICC.
vfs.h: wording in dox
win.cpp: add note on suspending threads in display_error_impl

This was SVN commit r2598.
2005-08-10 20:53:52 +00:00
cd4273cd16 Oops, I broke it. Fixed by reinserting memory leak.
This was SVN commit r2596.
2005-08-10 01:27:33 +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
ff97a903b8 wpthread: improved code and avoid memory alloc during thread creation
wsdl and tex: use british english terms

This was SVN commit r2594.
2005-08-10 00:33:15 +00:00
4b33f49da1 - sysdep cursor functions renamed sys_cursor_*
- res/cursor.cpp cleaned up, uses sys_cursor_*; also fixed some bugs.

This was SVN commit r2593.
2005-08-10 00:27:56 +00:00
b63bc42245 TextureManager: stopped memory leaks
wsdl: create window at expected size, and retrieve correct mouse coords
CStr: not ISerializable (=> not virtual)
Game: less excessive complaining, since the original problem seems to be
fixed
Entity: fixed evaluation order
Others: minor comments/etc

This was SVN commit r2591.
2005-08-09 21:26:40 +00:00
78c751aff6 ogl: add oglSquelchError call. use that if you know a piece of code will trigger an error and want to suppress it (e.g. INVALID_ENUM after using GL_CLAMP_TO_EDGE although we've already warned the user that not everything may work)
file: now provides a much more efficient alternative to file_enum that
does not sort all files (this was a problem for check_if_oal_dll which
was scanning the entire system32 dir)

- use the same DirEnt struct for file and VFS due to clever name pointer
trick.
- wposix: avoid malloc for most opendir() and fix mmap() bugs (thanks to
Philip for noticing+reporting them)
- VFS: was getting too large to manage, now split into an additional
file
- WIP: much more efficient mounting; supports other mount sources than
file or zip (e.g. if we want to add network files); clean separation
between VFS submodules; dox; beginning of thread locking.

This was SVN commit r2589.
2005-08-09 16:32:23 +00:00
5299dcad86 - config: all macros are defined as 1 / 0. testing with #if allows compiler warnings (testing undefined macro) to spot misspelled macros
- debug: add provision for naming threads. allows adding current thread
name to log messages and displays their names in the debugger.
- replaced various if(err < 0) complain() sequences with new variants of
CHECK_ERR (see lib.h)
- fixes to mmgr/VC debug alloc enable code
- improved h_mgr error reporting (now complains when h_free fails)
- US -> UK english (partial)
- fix tex_load double-free bug
- move win32 mouse cursor code into sysdep
- error dialog is now topmost to make sure it's visible (was a problem)
- handle WM_QUIT before displaying error dialog (makes sure it's shown)

also as in previous 3 revisions.

This was SVN commit r2588.
2005-08-09 16:23:19 +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
52ebd6ba11 scripting-interface improvements
- strict param count checks
- use ScriptingHost::RunMemScript instead of copy+pasted code
- replace duplicated parameter access code with macros

StringBuffer: use pointer instead of reference to allow
compiler-generated copy ctor
singleton: fix whitespace

This was SVN commit r2586.
2005-08-09 16:02:15 +00:00
a69ac0dee9 - fix w4 warnings
- add convenience macros for config_db(CFG_GET_SYS_VAL)
- VFSUtil::EnumDirEnts now uses flags instead of bool recursive
- UNUSED() for params, UNUSED2 (<- need better name) for variables
- config.h defines must be tested with #if (always defined) -> allows
detecting misspellings thanks to compiler warnings
- replace debug_assert(0) with debug_warn (its sole purpose)
- replace ScriptingHost::ValueToInt et al with ToPrimitive
- use nommgr.h to disable both mmgr and VC debug heap

This was SVN commit r2585.
2005-08-09 15:55:44 +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
b3a9ed2886 New terrain properties stuff, gcc compatability and updated unix debugging stuff
This was SVN commit r2581.
2005-08-07 21:58:36 +00:00
pyrolink
2451e009d1 Added a line that had been somehow deleted and was causing errors.
This was SVN commit r2576.
2005-08-04 23:07:21 +00:00
pyrolink
7fb59c8471 Corrected the minimap's "interactive"/"warp" function so it works on all zooms and rotations.
This was SVN commit r2575.
2005-08-04 08:33:33 +00:00
pyrolink
8ae90b6fdb Corrected the view rectangle for the minimap and added "interactivity" as well (click a point on the minimap, and the camera moves to that spot).
This was SVN commit r2572.
2005-07-31 23:54:19 +00:00
dan
df536edb67 This was SVN commit r2569. 2005-07-30 21:21:36 +00:00
5b1d7b8c4b This was SVN commit r2568. 2005-07-30 21:07:02 +00:00
5cd416d82f This was SVN commit r2567. 2005-07-30 20:57:18 +00:00
a04abf2967 Fail more quietly while loading
This was SVN commit r2565.
2005-07-30 20:12:41 +00:00
af3a188200 This was SVN commit r2564. 2005-07-30 19:22:16 +00:00
a18bb56add Recognise alpha-channel DDS files in GUI
This was SVN commit r2562.
2005-07-29 03:18:41 +00:00
c3d42c1025 Fixed mmap bug, and GUI memory leak.
This was SVN commit r2560.
2005-07-28 17:39:27 +00:00
88724d5f95 Updated i18n test system
This was SVN commit r2549.
2005-07-26 21:13:52 +00:00
Gee
b1ef166bf3 Added support for customized colors.
This was SVN commit r2547.
2005-07-25 19:06:18 +00:00
Gee
b94c443037 Fixed so that you can have both types of tooltip (other-object 0 delay and pop-up non-zero delay) in the same environment. Haven't tested it that thorough, but hopefully all scenarios are covered.
This was SVN commit r2545.
2005-07-25 05:54:58 +00:00
Gee
f84cfcdf2a Added default to <image size> ("0 0 100% 100%")
This was SVN commit r2543.
2005-07-25 04:48:13 +00:00
661114e7a1 This was SVN commit r2540. 2005-07-25 01:31:19 +00:00
Gee
727d2035d3 Changed <icon>'s property 'texture' to 'sprite'. Better late than never. Fixed a bug in the Input rendering code. Minor changes.
This was SVN commit r2539.
2005-07-25 00:52:03 +00:00
Gee
b5f6d19332 Lots of minor updates. Touched up the check-box quite a lot.
This was SVN commit r2532.
2005-07-24 08:29:02 +00:00
Gee
74e1c8a772 Text clipping
This was SVN commit r2527.
2005-07-24 00:01:41 +00:00
Gee
77c0ab074e Someone had renamed a variable to one that already existed in a super-scope, this collided. Fixed it.
i.e. now the selection area is hid again.

This was SVN commit r2526.
2005-07-23 23:22:23 +00:00
Gee
fe087a73f7 Fixed some bugs, updated some things, etc etc
This was SVN commit r2523.
2005-07-23 22:27:55 +00:00
61387e95b2 This was SVN commit r2519. 2005-07-23 07:53:21 +00:00
524263577f Updated Errors.cpp
This was SVN commit r2516.
2005-07-22 19:21:19 +00:00
4b6a19cdfb better error reporter, use consistent exceptions if init fails, add notes which functions are currently unused
This was SVN commit r2515.
2005-07-22 18:41:49 +00:00
533eb66ea7 add dox
This was SVN commit r2513.
2005-07-22 03:56:11 +00:00
825bd40b68 wdbg_sym: revert to __declspec(naked) because compiler-generated prolog code otherwise trashes the regs
win: formatting
wposix: add mprotect and beef up mmap (WIP).

This was SVN commit r2512.
2005-07-22 03:54:09 +00:00
Gee
4d390f501c Heads up, I changed "SelectionChanged" to "SelectionChange" for consistency, it should be read "on selection change", just like "on press".
This was SVN commit r2511.
2005-07-22 03:11:28 +00:00
Gee
abdc96b300 Default value for property 'selected' is now -1, i.e. no selection. Defining this value's default in the default style would be awkward.
This was SVN commit r2505.
2005-07-21 07:34:48 +00:00
Gee
8ebbb0bf35 Added IsRootParent function to check if the absolute property should be ignored or not.
This was SVN commit r2502.
2005-07-20 23:49:39 +00:00
Gee
c3cf031a52 Uncommented list, does anyone know why that has been done anyway? I can't even remember if I've done that or not. Also removed the annoying "Left click has been blocked" error in the log.
This was SVN commit r2498.
2005-07-20 05:27:32 +00:00
f715e6c226 ScriptableComplex.h: ScriptingHost already includes SpiderMonkey.h
scriptglue: additional refactoring
scriptinghost: remove useless GC function
SpiderMonkey.h: more dox

This was SVN commit r2497.
2005-07-20 04:53:58 +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
Gee
5f15ff3b2d It is now valid for parentless objects to have absolute set to "false", this can be viewed as if the object were the screen's child, i.e., it doesn't matter if absolute is true or false if an object has got no parent, the property is ignored.
This was SVN commit r2495.
2005-07-20 03:52:09 +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
1d69845cee snd: better snd_disable dox
ia32: fix comments and fix EBP warning
wdbg: fix bug if exception locus is unavailable
wdetect: store full DS driver path (-> version reported correctly)

This was SVN commit r2491.
2005-07-20 00:54:39 +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
2f5b116842 mmgr: remove random fill option (makes no sense, since we want to fill with unused and freed memory pattern only)
snd: better explain __try hack; avoid any updates if not initialized
ia32: no longer user declspec(naked) (unsafe)
wdbg_sym: also declspec(naked) and refactor display of libstdc++ objects
wdll: remove redundant #undef
wsdl: add comment

This was SVN commit r2487.
2005-07-16 17:49:38 +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
5754128dec lib.h: have CHECK|RETURN_ERR etc. store+compare as i64 (safer). document details.
h_mgr.h: debug_warn if H_DEREF fails

have vfs / res functions only CHECK_ERR (i.e. complain) once per call
sequence. made sure vfs_load and vfs_open debug_warn and everything else
just passes on the error.

This was SVN commit r2482.
2005-07-14 00:19:56 +00:00
57f396a5b8 little stuff (adopt debug_get_nth_caller change, document catch(...))
snd: make __try() more obvious and fix old bug that causes a NULL read
when many sources are playing
add alloca implementation (takes care of stack overflow handling)

This was SVN commit r2475.
2005-07-09 20:20:57 +00:00
37e7732b40 debug: add alloca fallback in case heap alloc fails (no more "not enough mem to display stack trace")
bring debug_get_nth_caller in line with debug_dump_stack; clarify
parameter dox.
use debug_get_nth_caller instead of debug_dump_stack to get exception
locus (much less evil)
fix out() clamping if buffer is full - no more chicken scratching at end
of buffer

This was SVN commit r2474.
2005-07-09 20:17:58 +00:00
9bf5316b72 wdbg, wposix, wsdl: fix some VC2005 warnings
wdbg_sym: prevent nested trees/arrays from hogging too much buffer space

This was SVN commit r2471.
2005-07-04 17:09:28 +00:00
3d23b2d9f5 debug.h: more dox
snd.cpp - remove stack size note
vfs_tree - fix uninitialized variable problem
string_s - match official rename of strlen_s to strnlen
ia32 - fix infinite recursion, the apparent cause of bug#64

This was SVN commit r2470.
2005-07-04 17:03:08 +00:00
36a40479c8 mixed C/asm function CAS_ now no longer __declspec(naked) - less efficient but avoids VC problems with its parameters
This was SVN commit r2468.
2005-07-04 02:43:54 +00:00
af4b399cde share set and map impl
add further test cases and fixed the ensuing problems.

This was SVN commit r2466.
2005-07-04 01:00:22 +00:00
3eb916ee1a share set and map impl
add further test cases and fixed the ensuing problems.

This was SVN commit r2465.
2005-07-04 00:50:53 +00:00
cc6abc389a - debug_stl: revert to char* for all program symbols (helpful due to preprocessor limitation)
- add stdext and new STL containers to stl_simplify_name
- fix internal error when container is uninitialized (now check cntr
fields directly instead of calling e.g. size(), which can crash)
- all container wrappers now have a consistent interface, no more
specialization needed in iterator
- fix potential loophole with container adapters
- refactor dump_sequence

This was SVN commit r2464.
2005-07-03 22:36:24 +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
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