1
0
forked from 0ad/0ad
Commit Graph

88 Commits

Author SHA1 Message Date
9542ecdd7e # boatload of fixes to get self-tests to compile+mostly run
refs #117

stub_impl_hack: defines a function otherwise provided by main.cpp

remove old self_test.h contents (e.g. TEST); superceded by cxxtestgen
TS_ASSERT etc.
only include self_test from a test (otherwise, cxxtest include dir won't
be set)
cxxtest won't run tests named only "test"; add more descriptive name

FIXES uncovered by self tests
lib: infinite loop in log2
lockfree: incorrect params

This was SVN commit r3979.
2006-06-08 19:03:43 +00:00
40f29a8345 Some fixes for techs.
This was SVN commit r3954.
2006-06-07 01:04:41 +00:00
pyrolink
e4c40841b2 #Configurable game speed, techs, elevation attack bonus
-techs are not operational yet
-set the game speed with setSimRate() in the console or in the config
file under hotkey.speed.increase or hotkey.speed.decrease
-made a few other small fixes

This was SVN commit r3950.
2006-06-06 06:31:17 +00:00
8bba11af2b remove vfs_display; greatly speeds up startup when -quickstart isn't specified, although that is strongly recommended.
This was SVN commit r3937.
2006-06-03 21:21:59 +00:00
54c1508db6 Renamed autobuilt ps.exe to pyrogenesis.exe, to match the new project layout.
Fixed Atlas project creation.
Improved VS2005 linking speed.
Added work-in-progress environment (water, sun) editing to Atlas.

This was SVN commit r3935.
2006-06-03 05:08:32 +00:00
5814e10126 # complete revamp of build system in preparation for automated self tests.
* now splits everything up into independent static libraries.
* fixed a great deal of incorrect #include statements. all headers must
now be specified with their full path relative to source. exception: if
file being included and including file are in the same directory, no
path needed.
use <> when relying on the build system's include path (e.g. for system
headers and external libraries, e.g. boost), otherwise "".

* temporarily renamed maths/Vector2D to Vector2D_Maths to avoid
conflict. these should be merged.
* hacked around VC linker stupidness when building static libs; texture
codecs must now be registered manually.

This was SVN commit r3931.
2006-06-02 03:56:24 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
67ede785d5 Updates to water and a fix for a rendering bug with bar textures
This was SVN commit r3902.
2006-05-28 21:58:56 +00:00
e6be7e36d2 FILE_WRITE_TO_MOD is now FILE_WRITE_TO_TARGET
ERR_(FILE|PATH)_NOT_FOUND -> ERR_TNODE_NOT_FOUND, ERR_NOT_(FILE|DIR) ->
ERR_TNODE_WRONG TYPE
path_util:
- path_append: bugfix (no more extraneous /); add support for appending
slash
- path_replace: bugfix (no more warnings for expected error)
- add path_last_component, path_foreach_component
- move some defs to the header that belong there from vfs.h/path.h

file: add dir_create; move PosixFile definition here and provide
accessor for fileio
vfs: no longer automatically append slash; instead, make sure caller
does
vfs_mount:
- mount_realpath: bugfix (strip trailing /), interface improvement
- document write_target; clarify MULTIPLE_MOUNTINGS; add support for
creating real dirs
vfs_tree:
- refactor TDir::add into find, add, find_and_add
- fix TDir and TNode for dir-ends-with-slash requirement
- split up lookup into lookup_cb and path_foreach_component
- add support for inserting dirs with given mount point: tree_add_path
(needed when mounting)

wposix: get rid of weird PATH_MAX = 260 (Win32 weirdness)


TextureManager: remove no longer needed SupportedTextureFormats
GameSetup, Xeromyces: setup XMB location to data/cache/mods/official/xmb
Util: HardcodedErrorString now uses error_description_r
VFSUtil, i18n: fixes for dir slash issue

Closes #79, #80

This was SVN commit r3874.
2006-05-17 14:48:18 +00:00
18eb72a25a Added Perlin noise class, which will be useful for water.
This was SVN commit r3871.
2006-05-17 03:53:54 +00:00
275a73851c # Added sky box as well as repair, heal and trample actions.
Closes #31, #32, #37. Refs  #46.

This was SVN commit r3865.
2006-05-16 04:41:37 +00:00
2a2d115f4d # Updates to construction: Added a start construction net message and made the selected units start working on a newly placed building after you place it.
This was SVN commit r3845.
2006-05-04 07:40:31 +00:00
pyrolink
39e89c406e #Fixes to flank penalty, notifications, sectors, terrain conformance. Added speed bonus based on terrain slope.
-added NOTIFY_ORDER_CHANGE, which is used for flank penalty instead of
idle.
-entity speed is now actions.move.speed_curr for the current speed, but
the original speed is still actions.move.speed.  Changes take place in
entityEventMovemen.

This was SVN commit r3840.
2006-05-04 04:14:48 +00:00
66b898dca5 # Fixed saving over archived files
This was SVN commit r3837.
2006-05-04 02:56:06 +00:00
2e1374c3ed # add cmdline param to mount a mod
syntax is -mod=NAME, where NAME is a subdirectory of data/mods/ that
contains the mod (either loose files or archives)

This was SVN commit r3820.
2006-04-26 17:08:08 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
89c3fad6f3 # Fixed a bug with the rendering of unit rank icons.
This was SVN commit r3768.
2006-04-14 08:33:52 +00:00
6fbce9c355 # refactoring
- color: the sse codepath is now detected and activated from within
color.cpp, which avoids making ia32 dependent on the color header. it's
called from gamesetup!InitRenderer.
- move VFSUtil::EnumDirEnts to vfs.cpp!vfs_dir_enum - allows it to be
used from within lib/ without dependency on ps (annoying for other
projects)

This was SVN commit r3764.
2006-04-14 06:32:05 +00:00
34637ba5dc # refactor sysdep API, split it into parts
- split up detect.cpp into snd, cpu, gfx (headers were already split)
- rename detect functions for more clarity (e.g. get_cur_vmode ->
gfx_get_video_mode)
- rename lib/res/sound/snd to snd_mgr to avoid conflict with
sysdep/snd.cpp
- waio: set errno in aio_rw (addresses bug #73)

This was SVN commit r3745.
2006-04-10 20:12:25 +00:00
pyrolink
f2e867e239 #Bar borders and angle penalty
-Changes to notifications. They take different parameters now-see
template_entity_script.js.  You can choose to destroy the notifiers
yourself in the script (useful for idle)
-Added "idle" event with registerIdle and registerDamage to assist with
the angle penalty.
-Bar border stuff
-Angle penalty is set up but untested-it just needs to use
this.getAttackDirections() to find the number of directions the entity
is being attacked from.  The penalty is specified in template_unit

There is a problem when the game exits-it attempts to destroy the
notifiers in entity.cpp's constructor, where it calls
DestroyAllNotifiers().  The problem is that the notifiers don't exist
any longer because they've been destroyed. I would fix it but I'm
leaving for vacation (Jason told me it was OK to comitt). Hope it isn't
too much of a problem.

This was SVN commit r3732.
2006-04-08 22:34:54 +00:00
d9944f9524 # remove last occurrences of old ScEd-specific code
This was SVN commit r3719.
2006-04-02 16:27:34 +00:00
pyrolink
3408b078b7 #Unit formations and rank textures
-Added functionality for "casting" and creating net messages (without
JS)
-Rank textures-specified in XML
-Formations-currently don't attack correctly (i.e. travel like mobs) and
don't switch to their movement formations when tasked to go somewhere
(the pathfinder doesn't give any heads up about destination reached, so
there's no way to change back to the original).  Also, base switching is
untested so no garuntees for next and prior formation things.

This was SVN commit r3710.
2006-03-31 03:30:34 +00:00
73506eb076 #Code cleanups related to renderer
Remove the OPT_NOPBUFFER and OPT_SHADOWCOLOR options and related
variables
since they weren't really used.

This was SVN commit r3694.
2006-03-26 17:46:18 +00:00
8fd256c458 #Use EXT_framebuffer_object when available
* noframebufferobject configuration in system.cfg can be used to
  disable EXT_fbo (in case drivers are flaky etc.)
* shadow texture size now honours the OpenGL maximum texture size as
reported
  by the implementation

This was SVN commit r3693.
2006-03-26 17:36:33 +00:00
f45c44ca09 Rotated various things (terrain texture UVs, default light and camera angles) by 45 degrees.
Map XML: Store camera position. Stopped using DTDs (because they make it
too hard to change the XML structure without breaking all the old XML
files).
Game.h: Include fewer files, to make compilation sometimes faster.
World: Changed some things to not be singletons, since they were
(ab)used as CWorld members.

This was SVN commit r3670.
2006-03-21 20:55:45 +00:00
201aae41d9 file: pp_set_dir fix: safely handle case where pp.path already contains data; add TFile* member to DirEnt
vfs: add VFS_MOUNT_ARCHIVABLE flag; allow archive builder to only
include files from mount points with this set.

VFSUtil: make EnumDirEnts more efficient while at it (uses PathPackage
and filename storage)

This was SVN commit r3618.
2006-03-09 21:37:23 +00:00
e0280949fd file_cache: fix: add buf/size combo to exact_buf_oracle if file_io rounded size up.
trace: split code out of vfs_optimizer (was getting too large)
vfs_mount: expose API to unmount all (needed to be able to delete
archives after building)
vfs_optimizer: safely handle empty connection/node lists;
refactored+documented
vfs_tree: eliminate 'file in root dir' warning (can happen easily
enough)

rest: fixes/minor tweaks

This was SVN commit r3610.
2006-03-07 05:44:34 +00:00
bc07b9ff0a file code v2 is now feature complete and works.
- adts: add basic benchmark to self-test; use fminf instead of MIN; fix
overly pessimistic invalidation in Landlord_Cached
- allocators: no longer complain if DynArray is full
- lib: warn if rand() min=max
- archive: bugfixes: plug leak, correctly handle 0-length files, carry
over flags when reading uncompressed file from archive
- file: expose file_get_sorted_dirents and implement file_enum in terms
of that
- file_cache: many bugfixes (especially related to CacheAllocator
freelist)
- vfs_optimizer: finish implementation of archive builder
- zip: correctly handle 0-length files
- tex: add tex_is_known_extension
- sysdep: add efficient fminf implementation (assumes P6+)

- config: update archive builder call site
- gamesetup: add call for delayed self tests
- entity: return JSVAL_VOID as per philip's suggestion

This was SVN commit r3553.
2006-02-23 07:55:32 +00:00
7a4aeb69ed Added production queue system and associated events. It might still need some extra features but it should be functional.
This was SVN commit r3547.
2006-02-22 22:45:16 +00:00
livingaftermidnight
285d9281e0 This was SVN commit r3529. 2006-02-17 02:03:00 +00:00
36fa5ec2bf * clean up CLightEnv a bit
* add CLightEnv::m_TerrainShadowTransparency
* shadows will let a fraction of diffuse light through
* added JS LightEnv objects, so the lighting environment can be changed
  from the console
* new element TerrainShadowTransparency supported in the scenario .xml
format,
  changed cantabrian_generated with an example

This was SVN commit r3513.
2006-02-15 00:45:16 +00:00
7dee30e24c - Terrain self-shadows (only noticeable with a low angle of sun)
- explicitly split ambient and diffuse
- add renderer.shadowZBias to bias depths in the depth texture
  and avoid flickering artifacts caused by Z fighting
- cantabrian_generated uses new light values so that shadows aren't
pitch
  black

This was SVN commit r3508.
2006-02-13 14:18:20 +00:00
livingaftermidnight
adf7c66788 Added particle stuff.
This was SVN commit r3492.
2006-02-11 09:39:15 +00:00
21f8f8555e adts: remove_least_valuable safely handles empty cache
lib: add u32_hi/lo
archive: move archive builder logic here from vf_optimizer
file_cache: add flush() call - used when simulating cache
vfs_optimizer: WIP, not yet functional: file gatherer, 50% of TSP tour
generator

This was SVN commit r3486.
2006-02-09 05:59:33 +00:00
06412a7751 allocators: bugfix (wasn't setting freelist to 0)
archive: afile_read bugfix (wasn't returning byte count)
byte_order: add to_leXX, implement read_leXX in terms of that, add
write_leXX (and also big-endian versions)
compression: support 0 length buffers + minor fixes
file: no longer support passing fn_len (that didn't work anyway due to
DynHashTbl find(const char*) interface); add FILE_DONT_SET_FN
optimization that prevents cluttering name cache.
file_cache: add logic to verify load/free/load/free sequence; add
FILE_LONG_LIVED flag to specify exceptions (e.g. XMB files that don't
free their buffer immediately)
vfs_mount/vfs_tree: bugfix (was mixing up portable and VFS paths)
vfs_optimizer: small fixes; creating Zip files now works
vfs_tree: add PathName that stores pointer to path and name component
for efficiency + convenience
zip: bugfixes (wasn't endian safe; incorrect handling of cmethod; forgot
to initialize ZipArchive members)

config: add -buildarchive flag
Xeromyces.cpp, FileUnpacker.cpp: add FILE_LONG_LIVED
mapreader: bump time estimate for ReadXML

This was SVN commit r3446.
2006-01-31 03:47:52 +00:00
fcfa746244 Linux compat changes, fix for (really old) bug in VertexBufferManager shutdown, GUI header reorganization for gcc 4.0
This was SVN commit r3437.
2006-01-29 18:23:47 +00:00
7838627cd2 - vfs_load now returns error code and takes FileIOBuf; that must be freed via file_buf_free. if Handle is needed, use mem_wrap.
- remove ScEd hacks and CFont et al macro rename
- fix accursed bug in VFS buffer management that was causing ReadFile to
fail without error (not allocating enough padding)
- vfs_tree: bugfix in tree_lookup
- waio: temporarily disable sector size determination (pending better
approach - need to determine if using DVD drive)

This was SVN commit r3421.
2006-01-24 08:16:29 +00:00
pyrolink
8be78ad51c This was SVN commit r3401. 2006-01-22 11:08:46 +00:00
c2c5e87c61 Removed references to the old attack, gather, heal and damage events (that were no longer used).
This was SVN commit r3375.
2006-01-20 21:38:58 +00:00
pyrolink
a917ffa711 Run order, secondary order support --still needs secondary cursor.
This was SVN commit r3363.
2006-01-16 10:56:12 +00:00
pyrolink
ee0227092a Defined notification codes.
This was SVN commit r3339.
2006-01-08 05:58:53 +00:00
b889826a3d Some Linux compile fixes over the place.
Create TerrainRenderer, ShadowMap and WaterManager classes to divide
CRenderer's functions into more logical units.

This was SVN commit r3332.
2006-01-07 01:04:26 +00:00
0a3e9ec537 - Added pause game functionality.
- Removed CDamageType from the engine - damage is now handled only
within the entity script (easier to mod/modify).

This was SVN commit r3325.
2006-01-02 03:07:29 +00:00
4a40baef33 Generic orders source commit. Also includes a fix to the animation bug where one frame of "idle" is played at the end of each cycle, and an enhancement to the entity script loading code to only load each script file once, which should save loading time and also allow script files to behave in a more logical way (e.g. no redeclaration errors when you have a constant).
This was SVN commit r3309.
2005-12-29 08:42:44 +00:00
6e82e33ccf - display_msg and display_error -> debug prefix since in debug header
- debug_warn_err now takes LibError
- lib_error.cpp: revise error code -> string (only support liberror
now); add function to set errno from LibError
- unifont, CFont: parameter made a simple wchar_t from const wchar_t&
- mmap now sets errno
- Loader and VfsUtil function now return LibError as well
- Profile.cpp, ProfileViewer.cpp: fix int/uint/size_t warnings
- Renderer.cpp: fix cannot-generate-assignment-operator warning

This was SVN commit r3235.
2005-12-12 19:19:30 +00:00
pyrolink
2358540305 Added heal
This was SVN commit r3220.
2005-12-10 19:38:42 +00:00
b242eafd02 various small fixes; some changes as in previous rev (which was only the files in lib/)
split a part of win.cpp up into wsysdep
GameSetup: bugfix for incorrect window title text

This was SVN commit r3204.
2005-12-07 03:44:17 +00:00
41ae0f9a44 Various hacks to make ScEd work. Should be removed once ScEd is no longer needed.
This was SVN commit r3162.
2005-11-20 00:41:45 +00:00
5087732fe3 Refactor ProfileViewer into a singleton that uses AbstractProfileTable as
data model.
Profile.cpp implements AbstractProfileTable so the original
functionality
of the profiling display remains.
CRenderer also contains an AbstractProfileTable implementation that
displays
the rendering stats. Switch through different profile views using F11.

This was SVN commit r3154.
2005-11-19 16:15:34 +00:00
9476dc4ad0 ia32: remove _ceil, mark functions as being sysdep implementations; prefix fpucw constants with IA32 to avoid conflicts
sysdep: remove round; document several functions; use ia32.h header
instead of a hack that extern-declared sysdep functions that are
implemented as macro-redirection
wsdl: add SDL_EnableKeyRepeat stub; group related functions in header
together; no longer need OS_WIN wrapper around that

This was SVN commit r3115.
2005-11-07 02:45:25 +00:00