Commit Graph

234 Commits

Author SHA1 Message Date
92578ae553 # Some initial work on networking, fixing session setup, game startup, and command queueing.
- Fixed outdated / buggy networking code in the GUI scripts.
- Finished the API to CNetClient so that it's possible to start a CGame
from it.
- Some enhancements for debugging networking: Enabled updates while the
game is minimized/out-of-focus if it's in a network session. Also
reduced the turn length to something slightly more manageable but still
unplayable (1 sec versus 3 sec).
- Fixed a bug where IssueCommand used to access the order it creates
after queueing it, which is bad if the order gets deleted while being
queued (e.g. in CNetClient).

This was SVN commit r5139.
2007-06-04 07:41:05 +00:00
ecaf665d5a Separate JS_ShutDown from the normal ScriptingHost shutdown, because it's resetting non-thread-safe per-process state.
DllLoader: Report dlerror when dlopen fails.
AtlasObject: Avoid ICC warnings caused by 'const T' being equivalent to
'T' when 'T' is already const.

This was SVN commit r5133.
2007-06-03 15:37:26 +00:00
6b6b6198f9 # Linux ICC compatibility.
Don't disable PCH in AtlasUI for non-GCC builds.
Prevented some excessive warnings ("implicitly-signed bit field of
length 1").
Removed (wcs|str)nlen functions on OS_UNIX, since they were already
removed from the .h.

This was SVN commit r5125.
2007-06-01 00:34:36 +00:00
fba692c8b5 # Fixed some warnings and potentially misleading code
* Removed ToJSVal<jsval> because it's treated as ToJSVal<long> and
causes minor confusion and/or compiler errors.
   Changed script interface functions to return either C++ types or a
jsval_t wrapper.
 * Replaced some C casts with static_cast to avoid significant confusion
and to cause compiler errors instead.
 * Removed some redundant argument-checking code. Simplified some
string-generating code.
 * Fixed some "dereferencing type-punned pointer will break
strict-aliasing rules" warnings (from `g++ -O3`).

This was SVN commit r5115.
2007-05-29 19:01:21 +00:00
a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip

This was SVN commit r5050.
2007-05-09 21:01:11 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
73683b6109 # SwEng
. the massive renaming undertaking: camelCase functions -> PascalCase.
. add some cppdoc.
. minor additional renaming improvements: e.g. GetIsClosed -> IsClosed
. in entity code, replace constructs like "pvec = new vector; return
pvec; use *pvec; delete pvec" with a simple stack variable passed as
output parameter (avoid unnecessary dynamic allocs)
. timer: simpler handling of raw ticks vs normal timer (less #if)

This was SVN commit r5017.
2007-05-02 12:07:08 +00:00
5a427440d0 #SwEng
fpclassify fix
EntityManager: rename getExtant -> GetExtantAsHandles, fix its
implementation+call site to avoid dynamic alloc/auto ptr, rename extant
-> IsExtant
vsnprintf2 -> sys_vsnprintf. remove printf.h (function is declared in
sysdep header)
use SUS/posix-ish strcasecmp instead of defining that to the
windows-only stricmp
add cppdoc for ia32/cpu

This was SVN commit r5011.
2007-04-30 19:58:04 +00:00
pyrolink
684dbbe9ba #Preliminary end game conditions; cinematic and trigger fixes
Cinematic editor is less clumsy.  Forward and backward buttons now move
the camera to the next and previous nodes.

This was SVN commit r5000.
2007-04-27 03:05:26 +00:00
cf21949640 Fixed a few issues for Linux build:
- Quick change of _mkdir into mkdir (really, this should be done with a
library function, which Jan is working on).
- Moved CJSComplex::GetScript() implementation into its .h file from its
.inl file to avoid some link errors in release build due to inlining.

This was SVN commit r4994.
2007-04-25 03:10:56 +00:00
29f44d66ed # Bug fix
Fixes problem introduced in 8d0a7170f6, removes workaround from
faf8358b3c

This was SVN commit r4957.
2007-03-16 10:05:05 +00:00
bdbb2bcb16 # Updated unit animation code.
Added UnitAnimation class, to act as the interface between the entity
and actor. (Currently doesn't work very well, but it does make
animations loop smoothly and sometimes kind of makes them stay
synchronised.)
Fixed corpse animation - it now plays the final frame of the death
animation before turning static.
Fixed update/interpolate timings.
Added JS function saveProfileData.
Updated ffmpeg library.

This was SVN commit r4880.
2007-02-10 03:09:52 +00:00
8d0a7170f6 # Slightly tidied up string code.
CStr: Indented comments more consistently. Made some parameters
pass-by-reference, made some others not. Removed some useless methods -
Length (use length or empty), GetSubstring (use substr), LCase/UCase
(use LowerCase/UpperCase). Removed operator[] bounds-checking because
VS2005 does that anyway.
Maybe fixed noncopyable warnings on VS2003.

This was SVN commit r4828.
2007-02-01 14:46:14 +00:00
1e195ac519 Changed task unit triggers to use unit ID's properly.
This was SVN commit r4823.
2007-01-30 03:50:28 +00:00
c065b6fc2a Fix VC2003 compilation (hopefully).
This was SVN commit r4780.
2007-01-17 03:41:23 +00:00
6cfb96855a # Added initial play-testing support in the scenario editor.
Atlas: Added simulation play/pause/reset controls; automatically plays
while recording cinematics.
FFmpeg: Fixed broken output files.
MapReader: Fixed entity loading.
ObjectHandlers: Made unit preview more robust when the preview unit gets
destroyed.
Various: Replaced manual matrix construction with SetYRotation call.
Turned some more CStr8 back into CStr.
h_mgr: Optimisation - don't calculate slow debug-output strings if
they're never going to be seen (since it takes a few hundred
milliseconds).
TerrainRenderer: Made more tolerant of accidental negative times.
Entity: Fixed m_refd being out of date when deleteAll is called. Fixed
problems when doing an initializeAll...deleteAll...initializeAll
sequence.
SCN: Removed non-useful AoE3Ed code that never did anything.
SVNLog: Made output more valid and made titles more descriptive, so it
works properly in FF's live bookmarks.

This was SVN commit r4779.
2007-01-17 03:25:20 +00:00
pyrolink
31d1e14912 #Cinematic improvements; trigger features
-Cinematic rotation shouldn't suck anymore
-Triggers still suck

This was SVN commit r4777.
2007-01-16 23:22:25 +00:00
fffc32f8ad Oops, bug. Fixed.
This was SVN commit r4734.
2007-01-02 18:55:24 +00:00
1926317975 # Linux/ICC fixes
- added "--icc" Premake flag, to disable PCH and set different warning
flags
 - added required headers
 - changed debug_warn to not generate constant-expression-in-conditional
warnings
 - changed FAM popup-warning into a log message, so it's not so
irritating
 - Atlas: pass around wxGLCanvas instead of wxGLContext, because the
context is sometimes just NULL

This was SVN commit r4733.
2007-01-02 18:11:00 +00:00
e3e0d513b5 # minor fixes exposed by ICC 9.0 warnings
This was SVN commit r4701.
2006-12-17 00:49:09 +00:00
13f2e3ca0c Tried compiling with ICC9 on Linux, which raised various issues:
* Fixed some bugs with incorrect macro usage (SDL_BYTE_ORDER vs
SDL_BYTEORDER, {MSC,GCC}_VER vs {MSC,GCC}_VERSION, OS_WIN/OS_UNIX in
projects where they're not defined).
 * Removed some redundant declarations of g_Console.
 * Removed some unnecessary semicolons.
 * Removed some unused variables.
 * Added throw specification to operator new.

This was SVN commit r4698.
2006-12-16 01:01:15 +00:00
6ed4ad6519 Added a hotkey to toggle rendering of territory outlines. (Currently "T").
This was SVN commit r4675.
2006-12-05 02:08:52 +00:00
835003d525 # Fixes for GCC
Renamed 'not' to 'negated', since 'not' is special in C++. Added some
includes, etc.

This was SVN commit r4665.
2006-11-29 23:37:10 +00:00
pyrolink
0d0a767fa2 #Trigger framework, terrain flattening on building placement
This was SVN commit r4648.
2006-11-24 19:45:04 +00:00
a265a441fd # Fixed string handling for Windows/Linux compatibility.
* vsnprintf2: Made compatible between GCC and MSVC - it now always
null-terminates the buffer, and returns -1 on overflow. Fixes #158.
Added tests.
 * MeshManager: Use shared_ptr.expired() instead of checking for
bad_weak_ptr exception.
 * Xeromyces: Added tests for GetXMBPath, because it does unusual things
in sscanf which MSVC's /analyze complains about.
 * ConfigDB, ScriptGlue: Replaced some asserts with return-on-failure,
to avoid invalid array accesses when continuing after the assert (as
complained about by /analyze).
 * CStr: Removed "using namespace std". Added tests for handling of
invalid UTF-8.

This was SVN commit r4625.
2006-11-07 21:03:13 +00:00
4fb0f2ae5d Added CEventTargetExhausted, used by the unit AI for gather and build, as well as GetDistance and GetVisibleEntities JS functions in CEntity that are required by the JS code for these events.
This was SVN commit r4531.
2006-10-09 04:17:15 +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
985a4cc6d5 # Bug fixes.
- Fixed shutdown order so the console is shut down after the simulation
(fixes #152).
- Fixed CPlayer::JSI_GetColour to not create a copy of the colour
object, since that caused problems when the copy went out of scope and
the corresponding JSObject was deleted.

This was SVN commit r4522.
2006-10-08 04:56:30 +00:00
a2432adad3 # GCC 4.1.1 compatibility
which is just "class C { void C::f(); }" code, which other compilers
seem to have ignored.
Also removed HAVE_PCH from GCC because our build system doesn't have
PCH. Added necessary headers to make it compile again.

This was SVN commit r4437.
2006-09-30 15:46:40 +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
a1a7dac59c # Integrated Actor Viewer and Actor Editor tools
ObjectManager: Removed ObjectTypes because it hasn't been used for
years.
Atlas: Fixed leak when saving with Xerces. Changed range of water
shininess slider.
Actor Editor: Relabelled "Freq" to "Ratio". Made modal dialogs use the
correct parent.

This was SVN commit r4376.
2006-09-22 17:43:00 +00:00
871cdb6ef9 # SwEng (reduce full recompiles by splitting up master error header)
- error codes now accessed as ERR::NO_MEM, INFO::OK etc.
- no more X-macros => the above are now recognized by visual assist
- error codes are defined by the module originating them (lib_errors has
some generic ones)
  => no full rebuild when adding some
- error descriptions are now in C++ files => can be changed without full
rebuild

added AT_STARTUP in lib.h.

This was SVN commit r4374.
2006-09-22 13:19:40 +00:00
e4bcc1c6a3 Gameplay fixes:
- Set the default rally point to be right on top of each building
(rather than (0,0)).
- issueCommand used to send 2 copies of a command, which caused for
example units to be trained in twos (it added some entities twice to
msgEntities).

This was SVN commit r4348.
2006-09-17 02:20:20 +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
df1a779d76 # Updates to water rendering (more effects).
This was SVN commit r4318.
2006-09-10 05:31:41 +00:00
c7870cfbb4 buildFileList -> buildDirEntList to emphasize that dirs can be returned. (pt2)
This was SVN commit r4310.
2006-09-08 18:41:30 +00:00
8e02ec84f9 Updated OpenAL to 1.1 (which no longer includes ALUT).
Changed player-id code a bit so the entity and actor and unit should
stay in sync more often. (The entity/actor/unit mixing still looks a bit
dodgy and unreliable, though.)
Simplified console help code.
Allowed init/shutdown to be done with the simulation/world/etc parts
disabled (so the actor viewer can load faster).

This was SVN commit r4289.
2006-09-02 21:20:25 +00:00
dave
12b060d34f isfinite etc.. is now properly defined as a macro
This was SVN commit r4288.
2006-09-02 19:41:26 +00:00
dave
2bb1bde51e Mac gcc complains about mixing size_t, uint etc..
This was SVN commit r4285.
2006-09-01 06:59:29 +00:00
35e91718c5 # Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.

This was SVN commit r4261.
2006-08-28 17:36:42 +00:00
5205944dce Added the concept of diplomatic stance in CPlayer.
This was SVN commit r4259.
2006-08-28 03:07:48 +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
6732af1ba9 # Updates to the order system, including shift-click queueing.
This was SVN commit r4240.
2006-08-25 04:24:06 +00:00
6a7ee226f0 Restored Windows compatibility (and hopefully didn't break OS X compatibility).
Fixed copy-constructor-generation warnings in VS2003.

This was SVN commit r4232.
2006-08-21 21:27:12 +00:00
dave
98697b4676 Mac OS X Compat
LightEnv - has byte order marks
Texture - conv from int to GLint wasn't allowed
JSConversion - to use isfinite you need the std:: namespace
	(this is temporary... atm I don't know why you can't call isfinite)
ScriptableComplex - when implementing methods it did not like default
values (they were removed from the cpp file)
timer.h - simple change

This was SVN commit r4231.
2006-08-19 20:24:49 +00:00
48e80bdfbc Fixed deunicodification of actor strings - need to be converted from CStr to std::wstring when passed to Atlas
This was SVN commit r4200.
2006-08-06 18:41:07 +00:00
399e26a9c5 # macosx compat
This was SVN commit r4196.
2006-08-04 09:30:43 +00:00
f007b1dc0c Added a random number generator in CSimulation and functions to access it from JavaScript, which will be useful for things like projectile inaccuracy.
This was SVN commit r4183.
2006-07-30 00:24:04 +00:00
554b9e537e - Changed actor selection sets to CStr8 rather than CStrW.
- Added more comments in ScriptableComplex.h/inl explaining how they are
split up and when to #include the inl.

This was SVN commit r4180.
2006-07-29 22:02:11 +00:00
dbe4451da2 # Housekeeping.
ScriptableComplex.inl is now only #included in CPP files that need it
(files that use functions from it directly), which is a total of 5
files, so recompiling after modifying it should be a lot faster.

This was SVN commit r4176.
2006-07-27 21:20:30 +00:00