1
0
forked from 0ad/0ad
Commit Graph

46 Commits

Author SHA1 Message Date
603401dc09 # Bug fixes.
- Fixed a crash that was happening in pathfinding on maps where some
tiles had invalid texture names (from earlier versions of the game).
- Releasing the mouse over the minimap while dragging a selection band
will no longer cause the view to move there. Unfortunately, the bandbox
still won't properly "release". The bandbox input routine should ideally
be placed at a higher priority than the GUI, separate from the other
Interact.cpp routines.

This was SVN commit r4711.
2006-12-20 05:41:54 +00:00
db045c330b # Made Atlas compile on linux
graphics: basic terrain passibility
atlas: lots of changes to make atlas compile under linux
unix/X: more clipboard support - copy from 0AD to other programs
unix/debug: use sys_get_executable_name instead of hard-coded paths
... and lots of other misc. changes

This was SVN commit r4640.
2006-11-12 04:02:36 +00:00
1f268b17bb GCC compatibility (fixed CStr.h case, got rid of a few warnings)
This was SVN commit r4581.
2006-10-20 01:06:43 +00:00
fa229121ec Bug fixes and more game setup options.
- Added "Screenshot Mode" and "Fog of War" game attributes. (Screenshot
Mode causes units to be initialized to Hold stance instead of Aggress
and also forces LOS to be All Visible. Atlas turn on Screenshot Mode by
default so units don't try to kill each other in there.)
- Modified LOSManager to allow disabling fog of war.
- Removed some debug message spam.
- Enabled line antialiasing for aura rendering and fixed some bugs that
caused strange effects (color was not set properly for the center point,
and when a unit was both mouseover'ed and selected, the aura was drawn
twice).
- Modified Stand stance to allow retaliation on attacks (normally Stand
will attack any enemy in LOS, but this is useful if a neutral unit is in
LOS).
- Modified pathfinder to not take into account terrain slope, which is
an expensive calculation - we'll eventually take into account terrain
type instead.

This was SVN commit r4527.
2006-10-08 17:39:46 +00:00
2f53eea71a Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without
indirectly including CVector[34]D.
Terrain: Added 'base colour', for the Actor Viewer to be able to
modulate the colour of normally-white terrain.
Removed some "using namespace std" (because it doesn't make the code
easier to read, and it defeats the point of namespaces, and the rest of
the code doesn't do it).

This was SVN commit r4392.
2006-09-26 01:44:20 +00:00
04b9809e0b Made CTerrain::getSlopeAngleFace even more "continous" at places where the slope changes rapidly (before, it only checked elevation forward and right, now it also looks left and up).
This was SVN commit r4340.
2006-09-16 20:16:42 +00:00
0baca62d61 # Fixes to terrain conformance and movement speed bonus.
- Simplified CTerrain::getSlopeAngleFace and made it work correctly in
all cases (before, it sometimes returned NAN and used an overly
complicated method based on 8 angle sectors instead of a "continuous"
method).
- Removed the EntityMovement event - instead, movement speed modifier is
calculated in C++ for performance.

This was SVN commit r4339.
2006-09-16 20:13:40 +00:00
7d3d8fdbf3 # move ps/Network into top level project (and static lib).
This was SVN commit r4249.
2006-08-26 20:25:37 +00:00
d39a4fac21 Premake: include precompiled.h in the project; set up dependencies for Atlas projects.
# Attempted to make compilation faster
by including as little as possible in some .h files, and moving it into
.cpp.
Fixed BaseTechCollection memory leak.

This was SVN commit r3992.
2006-06-09 16:44:16 +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
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
64ef19475d # housekeeping
terrain: fix unused a90 etc. warnings by commenting them out
renamed ERR_TEX_CODEC_CANNOT_HANDLE to INFO_.. (to prevent the kind of
mistake that philip just fixed)

This was SVN commit r3805.
2006-04-24 01:50:32 +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
pyrolink
b5d9da29c1 #When appropriate (i.e. wheeled units), units will align with the slope of the terrain. *JS documentation
*added CTerrain::getSlopeAngle[Face]() which returns the angle in
radians of the slope of the terrain.  getSlopeAngleFace should be used
for entities because it takes into account which way the entity is
facing, which allows for negative angles.
*the max and min graphical rotation for the slope is under traits.pitch.
This is used so that you can have certain units such as infantry that
don't rotate very far go down steep slopes but not rotate too much.
*JS documentation in docs/JSReg.rtf -- I put in most of the relevant
global functions; still needs entity functions.

This was SVN commit r3794.
2006-04-22 05:52:23 +00:00
8a11f53011 # More consistent terrain-space coordinate names
# Removed more ancient unused code
# Partial VC2005 compatibility for Atlas editor / AoE3Ed
# Terrain overlay rendering system; used to implemented Atlas brush
display
# Renamed 'right' to 'left'

This was SVN commit r3771.
2006-04-17 20:02:51 +00:00
kevmo
baf357d2ea # Began work on new pathfinder
Created CTerrain::getSlope(x,y), and added a new order type to support
high-level pathing.

This was SVN commit r3735.
2006-04-09 00:36:52 +00:00
b37d3f2095 # fix W4 warnings on VC
This was SVN commit r3726.
2006-04-03 22:06:09 +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
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
pyrolink
5680fcf687 This was SVN commit r3504. 2006-02-13 03:30:34 +00:00
bd2c1d73a3 Terrain, Interact, LOSManager, Atlas, etc: Fixed some off-by-one and off-by-FLT_EPSILON problems with objects near/off the edge of the map. Also changed some model.GetBounds().GetCentre() into model.GetTransform().GetTranslation() to fix off-by-centre-of-bounds-minus-position problems. Thus, you can no longer make units in Atlas disappear off the edge and never be seen or selected again. Also changed out-of-bounds LOS value to make them visible if they somehow escape anyway. Also fixed out-of-bounds access of terrain heightmap.
MapReader: Tidied usage of Xeromyces.
Projectile: Avoided warnings.

This was SVN commit r3212.
2005-12-09 01:08:08 +00:00
124f7171bd More reliable texture blending. Resource unloading. Minor fixes.
This was SVN commit r3106.
2005-11-06 05:05:07 +00:00
6668ad6e1c CTerrain, Brushes: made CalcFromPosition static and added float x,y overload
minimap, PatchRData, renderer: fix ELOSState comparison vs & and use
SAFE_DELETE
ia32: add rounding control constants (for FISTP)
premake: set /QIfist compiler setting which causes float->int casts to
go through FISTP instruction instead of _ftol2() (much faster, but
requires CPU state to have been set)
LOSManager.cpp: cache m_TilesPerSize; use MIN/MAX; use
CTerrain::CalcFromPosition; clean up GetUnitState a bit. now runs at
203ns, down from 222

This was SVN commit r3099.
2005-11-06 01:33:16 +00:00
faaee7d1b5 Atlas: Terrain painting
This was SVN commit r3092.
2005-11-05 04:59:54 +00:00
20d038efda profiling indicates memcpy is a bottleneck, so globally replace all of them with memcpy2 (hand-optimized). depending on transfer size, this is 10%..300% faster. also made memcpy2 into a macro instead of thunk function because vc7 was still generating a jump.
This was SVN commit r3057.
2005-10-30 16:19:20 +00:00
364e36128e g_YMinOffset declared in gameview.h instead of extern elsewhere
terrain: made const-correct
lib: Add round_up_to_pow2
minimap: cleanup. split user input and DrawViewRect out of Draw; add
m_Camera; made pointers const; user local x,x2 variables instead of
writing out m_CachedActualSize

This was SVN commit r2970.
2005-10-19 17:16:34 +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
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
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
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
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
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
549150fe38 Atlas: simple camera control and terrain editing.
Terrain: added terrain-editing code to CTerrain, for better
encapsulation or something.
Console: simplified screen resizing.
Game/etc: removed some unnecessary header file inclusions.

This was SVN commit r2459.
2005-07-03 16:25:48 +00:00
ec6b78b252 rename assert2 debug_assert; use instead of all plain assert(), since there are no longer any issues (e.g. can't use while handling an exception)
This was SVN commit r2447.
2005-06-28 04:06:25 +00:00
3b1395d80b Optimised game-loading, by not reading terrain textures or calculating bounding boxes when not necessary; maps load about twenty seconds faster (at least in Debug mode). Also fixed possible minor bug (FLT_MIN vs -FLT_MAX) and other trivial things.
This was SVN commit r1917.
2005-02-09 23:19:48 +00:00
notpete
17a4174505 Minor additional functionality.
This was SVN commit r1218.
2004-10-06 18:45:59 +00:00
e4f160df27 fix headers: ogl_tex.h is user-level texture stuff, tex.h is only the texture loader.
this came up due to header change - some unnecessary stuff isn't
included by default anymore.

This was SVN commit r1155.
2004-09-19 11:57:51 +00:00
1b3887a274 Fixed some warnings
This was SVN commit r921.
2004-08-06 11:20:37 +00:00
MarkT
2b396ccb57 Minor improvements to some simulation code.
This was SVN commit r887.
2004-08-02 23:14:54 +00:00
MarkT
befae8627d Changed hotkey handling for groups and bookmarks; small pathfinding fixes.
This was SVN commit r809.
2004-07-23 10:56:52 +00:00
notpete
97b7efab20 Fixed some assumptions PATCH_SIZE is 16.
This was SVN commit r415.
2004-06-07 19:59:20 +00:00
c7a84e84be added precompiled.h everywhere
This was SVN commit r392.
2004-06-03 18:38:14 +00:00
3abf9ac4b5 lots of type fixes; types.h is now a convenience wrapper on top of the standard uintN_t routines
This was SVN commit r334.
2004-06-01 17:34:12 +00:00
notpete
7fb944a1e1 Either moved from terrain directory, or an inital revision, depending on the file. Whole bunch of changes related to props and animation.
This was SVN commit r306.
2004-05-29 20:56:24 +00:00