- Made some classes not be singletons, since there's no reason why they
should be.
- Made them non-global too (because globals have unclear lifetimes, and
make it harder to test things, etc). They're now owned by CGameView and
CWorld, and mostly accessed via g_Game or arguments (vaguely trying to
avoid the graphics code calling into the game code).
- Moved CGameView implementation into pimpl, so the header file isn't
so heavy.
- Changed a few pointers into references, to indicate that they're
never NULL.
This was SVN commit r4756.
- remove headers always included from PCH
- nommgr.h is only included ifdef REDEFINED_NEW (allows leaving out the
mmgr stuff)
- in lib/*.cpp, moved the corresponding include file to right behind the
PCH (catches headers that aren't compilable by themselves)
- byte_order no longer depends on SDL
- add debug_level (another means of filtering debug output; needed for
thesis)
- split posix stuff up into subdirs (lib/posix and sysdep/win/wposix).
makes including only some of the modules (e.g. sockets, time) much
easier.
This was SVN commit r4728.
- 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.
* 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.
* Skinning is done in a way that works when there's more than one bone
influencing a vertex.
* PMDs now store vertexes in world-space instead of bind-space. (The
loader converts the old-version PMDs so they still work.)
* Moved SkinPoint, SkinNormal into CModelDef so it could use them when
loading the old PMDs.
* Made the FastNormals approach non-optional, so the inverse-transpose
bone matrices could be removed. Changed the explanation of why it's a
valid approach.
* Quaternion: Made GetInverse assume that the quaternions have unit
length (which they do when they're representing 3D rotations).
* lib: Added support for DDS files that aren't a multiple of 4x4 (most
useful for 1x1, 2x2, etc that are still powers of two).
* Actor Viewer: Added white terrain texture to the minimal test mod, so
shadows are visible. Changed default so walk/run animations don't move
the unit along the ground.
* Removed some redundant repetition in doc comments.
* Removed some unnecessary #includes.
This was SVN commit r4696.
Initially saved a little bit of time by changing it to use vertex
arrays, and then realised that disabling point-smoothing saved much more
time (from 70ms per frame on cantabrian_generated down to 2ms, which is
worth any quality loss)
This was SVN commit r4256.
moved some fields (e.g. size of health bar) out of CEntity and into
BaseEntity so they can be shared between entities (instead of duplicated
in each).
TODO: is it ok to remove AddProperty for those properties in CEntity?
(BaseEntity is still adding them)
This was SVN commit r4078.
Entities with traits.is_territory_centre == true will act as territory
centres, and territory areas are calculated and displayed on the
minimap. It remains to display these areas in the game view and to make
Civ Centres "socketable" so you can build them on Settlements to claim
them.
This was SVN commit r4070.
remove no longer needed timers and debug_printfs.
delete JSInterface_*Entity.cpp files because they are empty and cause
linker warnings.
This was SVN commit r4043.
# 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.
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.
textureentry: add performance note
list, text: fix mousewheel direction
input: was going to add a deque to allow registering handlers in back
and front. obviated by minimap fix, though. cleaned up a bit and renamed
stuff (again, sigh).
loaderthunks: fixed weird alignment/padding warning
This was SVN commit r2979.
ia32, sysdep: add rint()
minimap: saw TODO on GetMapSpaceCoords and sped it up by 15% using rintf
and precalculating scaleX
timer: add indication of how often something was billed (helps measure
stuff called an indeterminate number of times)
This was SVN commit r2973.
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.
cause of minimap click no longer working has been found:
GlobalInputHandler isn't getting called due to incorrect order of
registration. fix is pending.
game: add code from ScEd that fixes lack of player color (by setting up
local players)
thanks to Simon for finding the cause (I want that crystal ball :D)
This was SVN commit r2967.
GUI/input code: moved g_active, g_keys etc. into ps/Globals; it has its
own input handler as well
all users of fopen(): add file_make_full_native_path to get correct path
even though current dir = system/
This was SVN commit r2954.
wsdl: add proper event queuing mechanism (no longer requires hacky
polling for changes and avoids WM_USER)
rename keys[] and mouse_buttons to g_keys and g_mouse_buttons
fix flipped mouse wheel direction; wsdl now sends up AND down event
(removed 'reset' hack in main.cpp)
main: clean up event handler and kill_mainloop
This was SVN commit r2934.
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.
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.
- 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.
Viewing rectangle now moves with the camera on the mini-map and shows
it's FOV correctly. Currently it is a little out of place and possibly
out of scale as well.
This was SVN commit r1872.