Subversion Repositories eduke32

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
4978 2445d 5h hendricks266 /polymer/eduke32/source/premap.h Provide a RETURN value of -2 to EVENT_DISPLAYLOADINGSCREEN after G_CacheMapData().  
4831 2494d 19h helixhorned /polymer/eduke32/source/premap.h Minor cleanup around security cameras / viewscreens. DONT_BUILD.

The only semantic change is that an out-of-sync instance of a distance to
check (viewscreen sprite <-> player sprite) is changed in
actors.c:G_MoveStandables(), from 2048 (as in Duke3D 1.5) to 8192, now
represented by the define VIEWSCREEN_ACTIVE_DISTANCE. I have not yet observed
any change in behavior regarding this change (but there ought to be one).

Also, in DNCOORDS display, print 'totalclock' count, too.
 
4766 2520d 6h hendricks266 /polymer/eduke32/source/premap.h Make a bunch of things extern "C". This should fix C++ builds on OS X and with Lunatic. DONT_BUILD.  
4747 2523d 22h terminx /polymer/eduke32/source/premap.h Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.  
4541 2649d 2h hendricks266 /polymer/eduke32/source/premap.h Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.

DONT_BUILD.
 
4335 2802d 16h helixhorned /polymer/eduke32/source/premap.h In loadlookups(), look for gap of 4 consecutive unused pals for fog pals.

As opposed to the previous way, where the first fog pals was <numlookups>+1,
where <numlookups> is the first byte value of LOOKUP.DAT. This allows to
pack e.g. lookups [1 .. 25] and [30 .. <lastpal>] into LOOKUP.DAT and have fog
pals be generated at pals [26 .. 29] (i.e. the additional lookups don't
shift the fog pals, making user maps depending on these numbers not look as
intended.)
 
3929 3029d 15h helixhorned /polymer/eduke32/source/premap.h Lunatic: various changes.

- swap 2d and 3rd args in xmath.rotate() -- now rotate(point, ang, pivot)
- add vec3 method 'rotate', calling xmath.rotate
- store game tic count in savegames
 
3421 3194d 13h helixhorned /polymer/eduke32/source/premap.h Reimplement pixel doubling by drawing scene at 1/(2*2) resolution and expanding.

The pixel doubling now only applies to the area where the world scene is drawn,
i.e. it may be smaller than the physical screen / WM window size. The optimized
version is slightly faster than for non-doubled pixels for me (optimized build),
but see code for caveats. Some other minor issues:
- won't work when the world is drawn from demo cameras (and offscreen, but that
matters less)
- will leave a few pixels empty when running with x resolutions not evenly
divisible by 4
 
3402 3197d 13h helixhorned /polymer/eduke32/source/premap.h Simplify HUD scale and viewport size logic and clean up related code.

* Make the "classic status bar fullscreen viewport" mode accessible
in classic too.
* Make range of status bar scale 36..100
* Update ud.statusbarmode when executing OSD command r_size (ud.screen_size).
NOTE: ud.statusbarmode is considered internal. Don't use from CON!
* Make sure 1) loading any configuration and 2) menu bars work correctly.
(The "classic status bar fullscreen viewport" mode will never be restored
though because ud.statusbarmode isn't handled by the OSD var system).
 
3116 3271d 8h hendricks266 /polymer/eduke32/source/premap.h Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup.

Credit to Plagman for the idea and doing the work on the game side, which is included in this commit.

(Building as C++ will give us features with which we can make improvements and optimizations on the multiplayer code and Polymer.)
 
3102 3276d 19h terminx /polymer/eduke32/source/premap.h Retire the actorscrptr[], actorLoadEventScrptr[], SpriteFlags[], ActorType[], SpriteCacheList[], ProjectileData[] and DefaultProjectile[] arrays in favor of a tile_t structure exposed as g_tile[]. This consolidates most of the MAXTILES sized arrays on the game side into one place.  
2561 3492d 15h helixhorned /polymer/eduke32/source/premap.h Clear up handling of g_*NamePtr in the game.

The primary change is that things have been made memory-clean. Some of these
pointers may point to wildly different places during the course of the program
such as statically or dynamically allocated storage, the buffer returned by
getenv() (which must not be modified according to the docs), or an element of
argv[]. Consequently, we need to strdup, or better, dup_filename them if they
are ever to be passed to a function that modifies their pointed-to data.

Specifically:
- added statics or consts according to usage
- 3 new functions clear{Grp,Def,Script}NamePtr, only 'Def' one extern for now
- in G_CheckCommandLine, don't strip 'const'; use Bstrncpyz where appropriate
- remove multiple declarations

Also, warn if an application parameter has been ignored (not matched).
 
2463 3507d 15h helixhorned /polymer/eduke32/source/premap.h engine cleanup: make pow2char and pow2long const, make voxlock static.  
2202 3586d 19h helixhorned /polymer/eduke32/source/premap.h Factor out filename-based music setup code into G_SetupFilenameBasedMusic.

There were two instances of nearly identical code in premap.c and savegame.c.
Also identifies a (harmless) problem with realloc'ing, we had:

if (len+1 > sizeof(MapInfo[...].musicfn))
MapInfo[...].musicfn = Brealloc(MapInfo[...].musicfn, len+1)

which reallocs almost all the time (since .musicfn is a pointer). Now we do
realloc every time...
 
1969 3716d 16h helixhorned /polymer/eduke32/source/premap.h Various cleanup work:
- fix an earlier 'oops': make highpals load correctly again
- maphack lights shouldn't be double-loaded now
- slight tweak to the loading screen fadein/out timing
- two bound checks
- make some variables static in engine.c
 
1949 3735d 13h helixhorned /polymer/eduke32/source/premap.h maint 1: refactor 3 redundant instances of the same code into G_ResetInterpolations()  
1802 3889d 13h terminx /polymer/eduke32/source/premap.h Multiplayer improvements  
1693 4086d 14h helixhorned /polymer/eduke32/source/premap.h Makefile cleanups: fixed building with GCC 3, made tabs into spaces where outside command context; Windows: make startup window stay 3 seconds if there was an error -- this way you won't mistake yourself forgetting to copy game data for a crash *d'oh*  
1677 4097d 3h terminx /polymer/eduke32/source/premap.h Global thermonuclear code rape