1
1
forked from 0ad/0ad
Commit Graph

871 Commits

Author SHA1 Message Date
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
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
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
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
3ded398729 g++ forbis goto across variable declarations.
This was SVN commit r2796.
2005-09-28 18:46:26 +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
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
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
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
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
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
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
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
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
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
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
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
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