These two functions draw a vertical line 4 neighboring pixels at a time.
This gives a significant speed boost for a full screen solid and masked wall
scene for x86_64 (where we have plenty of registers), about 60 --> 76 fps.
git-svn-id: https://svn.eduke32.com/eduke32@2497 1a8010ca-5511-0410-912e-c29ae57300e0
Also, a very minor change in the con/def module code. (int --> int32_t)
git-svn-id: https://svn.eduke32.com/eduke32@2495 1a8010ca-5511-0410-912e-c29ae57300e0
- Make all arguments explicit toggles (except for onlyzip).
- Disable PowerPC builds by default on Snow Leopard in addition to Lion.
- Enable Darwin 9 compatibility for all builds whenever PowerPC is enabled.
git-svn-id: https://svn.eduke32.com/eduke32@2487 1a8010ca-5511-0410-912e-c29ae57300e0
Previously, if the sprite turned really out to be in void space, either freelist
inconsistency (before the list rewrite) or oob access (now) would happen.
Also add an bound-checking assert() for insertsprite's sectnum argument (it's not
a bound check!)
git-svn-id: https://svn.eduke32.com/eduke32@2480 1a8010ca-5511-0410-912e-c29ae57300e0
New engine variable 'int32_t Numsprites', not yet saved into savegames
or mapstates. (The capitalization is to distinguish it from the often-used
'numsprites' locals or structure member names.
In the editor, get rid of updatenumsprites().
git-svn-id: https://svn.eduke32.com/eduke32@2478 1a8010ca-5511-0410-912e-c29ae57300e0
Previously, the lists starting at headspritestat[MAXSTATUS] and
headspritesect[MAXSECTORS] were both used as sprite freelists and were always
in complete synchrony. Now, make only the statnum list keep the free sprites.
This way, it has no CON compatibility implications because
headspritesect[MAXSECTORS] is inaccessible there. Leave the array at its
original size for now.
git-svn-id: https://svn.eduke32.com/eduke32@2477 1a8010ca-5511-0410-912e-c29ae57300e0
Makefiles: new features to facilitate above:
- buildtools: "make printutils" is a phony which simply lists all the tools
- $(EXESUFFIX_OVERRIDE)
git-svn-id: https://svn.eduke32.com/eduke32@2476 1a8010ca-5511-0410-912e-c29ae57300e0
The major outside-visible change is that this fixes the sound cutoff bugs that
happened because newly-spawned sprites took the place of those whose sounds
had not yet finished playing.
Besides, there are these changes:
- remove deletesprite{sect,stat}
- we have a new engine variable 'tailspritefree' that keeps track of the
sprite freelist tail
- we need to store it in savegames and mapstates, so bump the savegame
minor version
git-svn-id: https://svn.eduke32.com/eduke32@2470 1a8010ca-5511-0410-912e-c29ae57300e0
This is simply done by using the two list helper functions defined earlier
instead of a deletespriteX/insertspriteX pair.
git-svn-id: https://svn.eduke32.com/eduke32@2469 1a8010ca-5511-0410-912e-c29ae57300e0
Factor out two helper functions, do_deletesprite{sect,stat}
and do_insertsprite_at_headof{sect,stat}.
git-svn-id: https://svn.eduke32.com/eduke32@2466 1a8010ca-5511-0410-912e-c29ae57300e0
These operations aren't executed THAT often to warrant exposing four internal
functions. Besides, I'll be hacking on them and need everything laid out
cleanly. Should somebody complain, they can go change them to __fastcall or
something.
git-svn-id: https://svn.eduke32.com/eduke32@2465 1a8010ca-5511-0410-912e-c29ae57300e0
In changesprite{stat,sect}, don't check for deletesprite{stat,sect} failure,
because the only way it can fail was already checked for above. So, this is
essentially dead code elimination.
git-svn-id: https://svn.eduke32.com/eduke32@2462 1a8010ca-5511-0410-912e-c29ae57300e0
- JFBuild ports: arttool, givedepth, and mkpalette
- All viable tools are now built when 'make utils' is invoked, not just some
- Revert "initprintf" hack of previous commit and replace it with "compat_tools.c"
- Move Bstrtolower from baselayer.c to compat.c
- Makefiles: Add start and finish messages for the tools
- Makefiles: To prevent "-Wimplicit" from being passed to the C++ compiler, create $(*CONLYFLAGS)
git-svn-id: https://svn.eduke32.com/eduke32@2458 1a8010ca-5511-0410-912e-c29ae57300e0
- Adding $(EXESUFFIX) where it belongs in the Makefile.
- Eliminating a call to initprintf() from compat.c. This may not be ideal.
git-svn-id: https://svn.eduke32.com/eduke32@2457 1a8010ca-5511-0410-912e-c29ae57300e0
- forgot a glogy --> logy in a-c.c
- comment out stretchhline and slopevlin2 in a.nasm, the former also in a-c.c
- make transmaskvline2 use a uintptr_t where appropriate
git-svn-id: https://svn.eduke32.com/eduke32@2448 1a8010ca-5511-0410-912e-c29ae57300e0
With VBOs enabled, the virtual pointer to the geometry of frame 0 of a model
is always NULL. This was confusing the polymer code responsible for deciding
whether to enable smooth animations or not, which meant that any animation
that would loop to frame 0 would do it as if animation interpolation was
disabled, which looks very choppy.
git-svn-id: https://svn.eduke32.com/eduke32@2443 1a8010ca-5511-0410-912e-c29ae57300e0
- make some variables static
- conditionally compile out some code with DEBUG_ALLOCACHE_AS_MALLOC
- exit(1) on failure (instead of exit(0))
- some formatting
git-svn-id: https://svn.eduke32.com/eduke32@2438 1a8010ca-5511-0410-912e-c29ae57300e0
Note: I'm not really sure whether I'm initializing it in the right places.
git-svn-id: https://svn.eduke32.com/eduke32@2429 1a8010ca-5511-0410-912e-c29ae57300e0
When drawing from inside the mirror, there may be no 'bunches' (BUILD lingo,
not TROR ones) collected, but following code used the first one unconditionally.
git-svn-id: https://svn.eduke32.com/eduke32@2427 1a8010ca-5511-0410-912e-c29ae57300e0
Hlines for masked and translucent masked ceiling/floor (sprites).
- apply the --> 'do { ... } while (--cnt)' transformation, making these
functions iterate cnt+1 times like the asm version. This also fixes an
off-by-one issue where sprites or masked ceilings/floors had a one-pixel
non-drawn line to the right.
- This time, only declare-as-local two 'extern' globals (asm1 and asm2).
It seems that I was too eager with "localing" all file-scoped vars earlier.
GCC is able to remove the loads from memory inside the loop by itself, whereas
clang is not. This is not trivial, since it has to prove that the 'screen'
pointer passed to the functions will never alias these globals.
git-svn-id: https://svn.eduke32.com/eduke32@2424 1a8010ca-5511-0410-912e-c29ae57300e0
The apparent horizon (in units proportional to pixels by a constant factor)
was being calculated without normalizing to viewingrange, resulting a
discrepancy between the drawn and actual up/down angle with non-default
viewingranges (e.g. with r_usenewaspect=1, or when setting it from setaspect).
This also means that the center-of-aim will now be the same regardless of
the aspect.
This fixes many derived bugs:
* inconsistency w/ crosshair when shooting a gun and aiming up/down (obviously)
* bugs resulting from being able to look up/down too far (garbage non-slope
texture-mapping and viewing BIGORBIT skies above the borders in classic).
Note: mods that had workaround logic for this bug will have to remove it...
git-svn-id: https://svn.eduke32.com/eduke32@2414 1a8010ca-5511-0410-912e-c29ae57300e0
This has no measureable difference. Oh well, maybe it benefits weaker
machines, since the generated loop code should definitely be prettier.
git-svn-id: https://svn.eduke32.com/eduke32@2408 1a8010ca-5511-0410-912e-c29ae57300e0
This doesn't give much, maybe 0.5 fps more, probably because the
loop body is pretty long.
git-svn-id: https://svn.eduke32.com/eduke32@2406 1a8010ca-5511-0410-912e-c29ae57300e0
Affected functions: hlineasm4, vlineasm1, mvlineasm1, tvlineasm1.
Optimizations:
- declare all used variables as possibly const-qualified locals in each
function. This removes unnecessary loads from memory in the loops.
- rewrite "for (; cnt>=0; cnt--) {...}" to "cnt++; do {...} while (--cnt);"
in the three last ones (yes, these function iterate cnt+1 times). This
makes them functionally equivalent to the asm versions (madness ensues for
cnt < 0) and allows the compiler to remove one 'test' instruction at the
end of each loop.
- in the translucence function, replace addition by ORing
Observations (system: Core2 Duo Linux x86_64):
With a 1680x1050 window fully covered by the respective type of wall (simple,
masked, trans. masked), fps increases by 3-4 from the baseline of approx. 60.
git-svn-id: https://svn.eduke32.com/eduke32@2405 1a8010ca-5511-0410-912e-c29ae57300e0
- remove the objects too on 'clean'
- fix warning with 'transpal' on x64
(generates translucency and shade tables)
git-svn-id: https://svn.eduke32.com/eduke32@2404 1a8010ca-5511-0410-912e-c29ae57300e0
- print compilation status for building the final executable
- add 'cleanutils' target in build/Makefile
- don't link against pthread, seems unnecessary
- don't build nedmalloc.o when not requested in Makefile.common
git-svn-id: https://svn.eduke32.com/eduke32@2403 1a8010ca-5511-0410-912e-c29ae57300e0
It needs to have the sound quality box removed and the Game directory box added, possibly among other things.
git-svn-id: https://svn.eduke32.com/eduke32@2396 1a8010ca-5511-0410-912e-c29ae57300e0
(Classic renderer). We don't need 64-bit integers; also use the nice
asm version of divscale32() if possible.
git-svn-id: https://svn.eduke32.com/eduke32@2390 1a8010ca-5511-0410-912e-c29ae57300e0
This was discovered because viewscreens (TILE_VIEWSCR) ceased being drawn
with the MAXTILES increase (reported by Hank, who also did the bisect).
git-svn-id: https://svn.eduke32.com/eduke32@2376 1a8010ca-5511-0410-912e-c29ae57300e0
That is, everyplace a user input is to be converted. The only remaining
instance of atoi() is now atoi(s_buildDate).
git-svn-id: https://svn.eduke32.com/eduke32@2374 1a8010ca-5511-0410-912e-c29ae57300e0
Internally, the last argument to neartag is now a pointer to a function
int32_t (*blacklist_sprite_func)(int32_t i),
which is supposed to return 1 if sprite[i] should NOT be considered for hitting.
This is now used in the hard-coded neartag() calls in sector.c, but not in any
way in CON (there's neither a C blacklist function provided, nor is there a
possibility to define one in CON). There, all sprites with picnums >=1 and <=10
(i.e. the effectors) will be blacklisted. This remedies problems where such
sprites would get in the way of switches.
Note that a whitelist approach (only consider a predefined set, namely those
picnums which will be checked afterwards) has back-compatibility implications
since people may have used e.g. lotagged window sprites to cover a switch.
Also, the >=1 to <=10 range is [sic] (the static, not dynamic values are used),
since anyone redefining effector picnums is clearly out of their mind.
git-svn-id: https://svn.eduke32.com/eduke32@2373 1a8010ca-5511-0410-912e-c29ae57300e0
lzwcompress can access one byte after lzwrawbuf[LZWSIZE] when provided with
an uncompleng of LZWSIZE, so we increase that array's size by one.
git-svn-id: https://svn.eduke32.com/eduke32@2369 1a8010ca-5511-0410-912e-c29ae57300e0
Remove dfread and kdfwrite, only leave a recipe how to get their
source from the respective used functions.
git-svn-id: https://svn.eduke32.com/eduke32@2368 1a8010ca-5511-0410-912e-c29ae57300e0
The following functions have const qualifiers attached for the 'destination'
arguments: kdfwrite, dfwrite in cache1d.c and copybuf{byte,reverse,} in the
pragmas source or headers. A couple uses of the latter ones were replaced
with calls to standard library functions.
git-svn-id: https://svn.eduke32.com/eduke32@2361 1a8010ca-5511-0410-912e-c29ae57300e0
This is useful to debug out-of-bound violations for memory allocated
with that function.
git-svn-id: https://svn.eduke32.com/eduke32@2360 1a8010ca-5511-0410-912e-c29ae57300e0
This makes more sense because the game selector draws the names with uppercase
letters and the hotkeys to jump to a map starting with a particualar letter
aren't case sensitive, either. Mapster32's selector will still display maps
starting with upper case first.
git-svn-id: https://svn.eduke32.com/eduke32@2356 1a8010ca-5511-0410-912e-c29ae57300e0
The bulk are whitespace changes; the only exception is a
"if (expr) { stmt; }" --> "if (expr) stmt;"
git-svn-id: https://svn.eduke32.com/eduke32@2353 1a8010ca-5511-0410-912e-c29ae57300e0
The reason was that drawmasks(), which was where the resetting of the fake
RoR textures happened under Polymer, can be called from polymer_displayrooms()
when mirrors are present. I was assuming that drawmasks() was only ever called
after the 'main' drawrooms and that hence the sequence of fake RoR tile tweaking
was set, reset, set, reset, ... which it was not.
Now, do the resetting explicitly after every drawmasks() in the editor.
git-svn-id: https://svn.eduke32.com/eduke32@2350 1a8010ca-5511-0410-912e-c29ae57300e0
I find this cleaner for two reasons. First, lotags won't get in the way of
neartag(), so that doors and switches near constrained TROR walls can be
pushed. Second, this removes the information leak so that CON coders aren't
tempted to read that values directly before a proper API for that comes along.
When writing out a map in-game (e.g. with dndebug), restore the respective
members so that it can be loaded in the editor again.
git-svn-id: https://svn.eduke32.com/eduke32@2349 1a8010ca-5511-0410-912e-c29ae57300e0
getzrange() returns the floor rather than the sprite if their heights are
equal. Now, make an exception for extended floors (analogously, ceilings).
git-svn-id: https://svn.eduke32.com/eduke32@2347 1a8010ca-5511-0410-912e-c29ae57300e0
- guard cansee() against negative sectnums (return 0 immediately), since
it's often called with the player sectnum as one argument
- in resetpspritevars(), don't inset APLAYER sprite if sectnum < 0, which
can happen if a map is started in void space accidentally (e.g. from
the editor)
- two checks before accessing sector[] with a player sectnum
git-svn-id: https://svn.eduke32.com/eduke32@2342 1a8010ca-5511-0410-912e-c29ae57300e0
Internally, there's a new function fade_screen_black() that implements the
fading more efficiently than calling rotatesprite for classic, and uses
tile 0 (assumed to have at least 64x32 size) in the GL modes.
The black background of the user map selector is still done with rotatesprite
and tile BLANK in every renderer.
git-svn-id: https://svn.eduke32.com/eduke32@2312 1a8010ca-5511-0410-912e-c29ae57300e0
So that the game won't exit if you write 'vidmode 4' when intending
'setrendermode 4'.
git-svn-id: https://svn.eduke32.com/eduke32@2311 1a8010ca-5511-0410-912e-c29ae57300e0
The implementation uses the recently introduced updatesector_onlynextwall when
setspritez fails.
git-svn-id: https://svn.eduke32.com/eduke32@2302 1a8010ca-5511-0410-912e-c29ae57300e0
for an assertion failure with clang. Really ought to file a bug report instead.
git-svn-id: https://svn.eduke32.com/eduke32@2292 1a8010ca-5511-0410-912e-c29ae57300e0
It looks like GCC doesn't honor the 'used' attribute with LTO. This is
"fixed" by declaring the variables in question with external linkage
(i.e. removing the 'static'). I consider such behavior a GCC bug, though.
git-svn-id: https://svn.eduke32.com/eduke32@2286 1a8010ca-5511-0410-912e-c29ae57300e0
Internally, updateanimation() now takes a third parameter 'lpal'.
git-svn-id: https://svn.eduke32.com/eduke32@2277 1a8010ca-5511-0410-912e-c29ae57300e0
This may fix compilation for optimized builds with GCC or clang where
the compiler would otherwise decide that those symbols are unused.
git-svn-id: https://svn.eduke32.com/eduke32@2271 1a8010ca-5511-0410-912e-c29ae57300e0
If enabled, this makes the following arrays be allocated statically:
spriteext, spritesmooth, sector, wall, sprite, tsprite, while
necessarily disabling the clipshape feature (because it relies on
setting sector/wall to different malloc'd block temporarily).
To compile, pass DEBUGANYWAY=1 in addition to RELEASE=0 to 'make',
and it's really only useful with CC=clang, of course.
git-svn-id: https://svn.eduke32.com/eduke32@2270 1a8010ca-5511-0410-912e-c29ae57300e0
I'm decreasing EXTRATILES because I feel that it's way overcommitted. It's the
max number of model-tiles that have their own skin for a certain palette,
like the slimer egg in the HRP.
git-svn-id: https://svn.eduke32.com/eduke32@2267 1a8010ca-5511-0410-912e-c29ae57300e0
- fix one bound-checking line
- rewrite two lines in astub.c to potentially not overflow an int16
- make tiletovox[] an array of int16's
git-svn-id: https://svn.eduke32.com/eduke32@2266 1a8010ca-5511-0410-912e-c29ae57300e0
Always malloc that buffer. This allows us to remove suckcache() from
cache1d.c, which I believe to be buggy (see comments in the source).
git-svn-id: https://svn.eduke32.com/eduke32@2261 1a8010ca-5511-0410-912e-c29ae57300e0
- 'whitecol' was defined in the engine and in build.c, use only the engine one
- make cachesize, artsize, artversion static in engine.c
- undo some formatting havoc presumably done by astyle
git-svn-id: https://svn.eduke32.com/eduke32@2260 1a8010ca-5511-0410-912e-c29ae57300e0
It is likely that this is the value it used to have at some point, because
the MAXTILEFILES macro equals 256 and is as old as the Duke3D source.
loadpics() now refuses to load an ART file with localtilestart or localtileend
out of bounds, or if localtileend<=localtilestart (i.e. no tiles in ART file, or
nonsense). Also, on 'invalid art file version', continue instead of returning.
Note: this does not increase the maximum number of tiles, which is still 15360,
it only gives a bit more freedom to arrange them (well, into more art files).
Also, I don't see what anyone keeps off from packing any number of tiles (from
1 to 15360) into an art file. Old EDITART limits?
git-svn-id: https://svn.eduke32.com/eduke32@2259 1a8010ca-5511-0410-912e-c29ae57300e0
The cause was a combination of many factors. First, Polymer requires the
start-drawing position to be inside the sector to draw (deviations lead to
incorrect drawing). This was violated by the game, because it interpolated
the current and next tic position without updating the sectnum, leading to
inconsistencies especially when passing through narrow sectors. Polymer
worked around it by doing an updatesector() each frame, however this works
poorly for maps with overlapping geometry such as SoS or RoR.
The solution to this is to add a new engine function,
updatesector_onlynextwalls(), which searches the sectors (via nextsector)
in breadth-first fashion instead of from 0 to numsectors-1, like updatesector
does when it fails for the *immediate* nextwall neighbors.
Internally, the breadt-first search helpers are moved into the engine.
git-svn-id: https://svn.eduke32.com/eduke32@2256 1a8010ca-5511-0410-912e-c29ae57300e0
so try and steal it back"), prevent calling IDirectDrawSurface_SetPalette()
with NULL arguments, causing a crash. It's happened for me on Vista, when
initially changing from 8-bit to 32-bit mode.
git-svn-id: https://svn.eduke32.com/eduke32@2255 1a8010ca-5511-0410-912e-c29ae57300e0
I didn't have much success in finding bugs using it, but it works
out-of-the-box on my setup, so it may be useful in the future.
git-svn-id: https://svn.eduke32.com/eduke32@2254 1a8010ca-5511-0410-912e-c29ae57300e0
The second one is passed to the 'mouseb' variable, but the game currently
can't map it since ud.config.MouseFunctions[] would have to be enlarged,
breaking savegame compatibility.
Works both for the Windows and SDL layers. For the latter, instead of using
the SDL_BUTTON_X1/X2 macro constants, I'm using 8 and 9, since that is what
SDL (and incidentally or not, xev) gives me for those buttons.
git-svn-id: https://svn.eduke32.com/eduke32@2252 1a8010ca-5511-0410-912e-c29ae57300e0
It turns out that with model interpolation, out-of-bounds frame numbers may
be generated with thinned out models, so disable it until I can sort out
what's wrong with it.
Also, minor code cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@2251 1a8010ca-5511-0410-912e-c29ae57300e0
Also, for debugging builds, show this message from verbosity level 1 on.
git-svn-id: https://svn.eduke32.com/eduke32@2250 1a8010ca-5511-0410-912e-c29ae57300e0
the only visible change is that polymost_trytexcache (formerly two
instances of nearly duplicate code) now prints a diagnostic after
a cache miss. The one that one is most likely to encounter is
"r_downsize doesn't match", meaning that this setting likely differs
between Mapster and the game.
git-svn-id: https://svn.eduke32.com/eduke32@2248 1a8010ca-5511-0410-912e-c29ae57300e0
The syntax is as follows:
animsounds <anim> { frame1 sound1 frame2 sound2 ... }
<anim> has to be one of the tokens: cineov2, cineov3, RADLOGO, DUKETEAM,
logo, vol41a, vol42a, vol4e1, vol43a, vol4e2, or vol4e3, corresponding
to hard-coded Duke3D anims.
The frameN's (1-based frame numbers) have to be in ascending order (but not
necessarily strictly ascending, so that a frame may have more than one sound).
Example: for Duke3D's XBLA nuke logo animation (IVF extracted from nuke.webm),
the following definition overlays the video with a sound sequence similar
(identical save for timing) to the original nuke animation:
// frame 1: FLY_BY, frame 64: PIPEBOMB_EXPLODE
animsounds logo { 1 244 64 14 }
git-svn-id: https://svn.eduke32.com/eduke32@2242 1a8010ca-5511-0410-912e-c29ae57300e0
let it hang around causing trouble later on; delete it right now and inform
the user.
Add a couple of 'static's to some functions and file scope data in mdsprite.c
git-svn-id: https://svn.eduke32.com/eduke32@2237 1a8010ca-5511-0410-912e-c29ae57300e0
the SE ones douple, triple, ... after each save. Maphack lights are reloaded
with polymer_resetlights() (though I've had them disappearing after load, I
couldn't reproduce it afterwards).
- in debugging builds, print a message when polymer_resetlight is called on a
nonexistent one. The problem is not so much the call itself (it's guarded),
but the fact that resources on the caller side may not have been freed if it
thinks that those lights do in fact exist. Right now, it's not the case though.
- add 'loaded map hack' messages after some other successful loadmaphack calls
git-svn-id: https://svn.eduke32.com/eduke32@2236 1a8010ca-5511-0410-912e-c29ae57300e0
'frequently' isn't such a good idea. Assume an actor constantly changes the
palette to some value and you're attacked by a newbeast at the same time. Then
the pain tinting would be reset each time the actor's code is run. This commit
adds a new flag 16 to setbrightness(), meaning "don't reset the fade tinting".
Its only use right now is from CON's setgamepalette command (and there, always).
The change is done in the engine and thus affects all platforms.
git-svn-id: https://svn.eduke32.com/eduke32@2225 1a8010ca-5511-0410-912e-c29ae57300e0
This is in the similar vein as the set-palette deferring and it's this
that fixes the low FPS in the radioactively contaminated area in AMC TC:
Megabase (since setgamma() is called from setbrightness()).
Again, update issues might be expected, but changing focus between EDuke32
and the desktop and back seems to restore the gamma settings properly on
Kubuntu. Looks like X (or whatever above handles this stuff) maintains it
on a per-application basis.
git-svn-id: https://svn.eduke32.com/eduke32@2222 1a8010ca-5511-0410-912e-c29ae57300e0
CON code sometimes uses 'setgamepalette' from withing actors, which is a bit too
frequent. Deferring the actual palette updating means that multiple requests in
between two screen redraws are coalesced into one, which is desirable for
performance reasons and for the reduction of 'tearing' artefacts (but not
prevention, since the drawing isn't synced to the screen refresh rate with
vsync off).
(Did-not-)update issues might be introduced.
Windows isn't touched because
- I expect it to be more brittle, especially in light of the ATI HW gamma
problems.
- I haven't tested whether the particular performance penalty that lead to this
change ('gas' in AMC TC) exists there too
git-svn-id: https://svn.eduke32.com/eduke32@2221 1a8010ca-5511-0410-912e-c29ae57300e0
color-inversed shots. For both PNG and TGA, change the way they're
done in 8-bit mode: instead of XORing every byte with 15, save the
inverse palette (each component taken 255-x).
git-svn-id: https://svn.eduke32.com/eduke32@2219 1a8010ca-5511-0410-912e-c29ae57300e0
instead of shorts. This fixes their values' overflow in AMC TC megabase and
probably a couple of other large maps.
git-svn-id: https://svn.eduke32.com/eduke32@2216 1a8010ca-5511-0410-912e-c29ae57300e0
This makes savegames practically the same as the initial snapshot of a demo.
Saves are now named 'dukesavX.esv' (demos: 'edemoX.edm').
Additionally, many changes that couldn't/needn't be cleanly separated are added
with this commit:
- make spriteext_t have the same size across 32/64 bit platforms (actor_t partially)
- prevent saving/loading in MP games (it certainly didn't work and still doesn't)
- it's time we start using assertions! Define NDEBUG for releasse builds.
- reset savegame major and minor versions (we have a new magic string, so no conflict)
git-svn-id: https://svn.eduke32.com/eduke32@2207 1a8010ca-5511-0410-912e-c29ae57300e0
32- and 64-bit platforms. Also, make struct type actor_t also have a common
size of 128 bytes. New code currently disabled and #ifdef'd for comparison.
This requires certain t_data[] entries ([1]: move ptr, [4]: action ptr and
[5]: ai ptr with actors) to be converted to script offsets instead of pointers,
breaking savegame and net packet compatibility (we could in theory try hard not
to, but it would be too much trouble).
git-svn-id: https://svn.eduke32.com/eduke32@2185 1a8010ca-5511-0410-912e-c29ae57300e0
Actors are always moved such that _they_ clip against blocking sprites, even
if their blocking bit is clear. Setting the new bit make them not clip against
anything. The promary use of this is for decorative moving sprites that are
spawned in masses, such as rain or snow.
git-svn-id: https://svn.eduke32.com/eduke32@2184 1a8010ca-5511-0410-912e-c29ae57300e0
already have MAXSPRITESONSCREEN of them, return 1 to signal that the caller
should break out of the loop.
git-svn-id: https://svn.eduke32.com/eduke32@2183 1a8010ca-5511-0410-912e-c29ae57300e0
Usage: press the ['] (quote) modifier together with the PERIOD key.
Aligns only the immediate upper and lower neighbors of each wall that got
aligned by following point2s or nextwalls. Doesn't play well with Alt
(carry over xrepeat) yet, might need two subsequent alignment passes.
git-svn-id: https://svn.eduke32.com/eduke32@2178 1a8010ca-5511-0410-912e-c29ae57300e0
(getzrange, hitscan, clipmove, drawmapview).
They're reproducible with DNE1.3D; Since these angle values most likely come
from CON code, my suggestion would be to bit-and all values representing angles
with 2047 when setting the from CON, but I'd have to think about potential
side-effects of doing this.
git-svn-id: https://svn.eduke32.com/eduke32@2170 1a8010ca-5511-0410-912e-c29ae57300e0
callback 'G_Polymer_UnInit'.
- In astub.c, reset spritelightid to -1 when nulling the spritelightptr of
a sprite (no crashes observed, just precaution)
- In sdlayer.c, catch SIGILLs with our signal handler too, since illegal
instructions are what the instrumented debug builds will execute when
attempting to carry out an undefined (per C) operation.
git-svn-id: https://svn.eduke32.com/eduke32@2169 1a8010ca-5511-0410-912e-c29ae57300e0
How in the name of hell this could pass undetected for so long is a
mystery to me.
git-svn-id: https://svn.eduke32.com/eduke32@2163 1a8010ca-5511-0410-912e-c29ae57300e0
values; check the color index that is potentially gotten from the string to
be printed.
git-svn-id: https://svn.eduke32.com/eduke32@2162 1a8010ca-5511-0410-912e-c29ae57300e0
them has a different height, print the sectnums of two differing sectors
to so that the mapper can find and examine them with Ctrl-J.
git-svn-id: https://svn.eduke32.com/eduke32@2146 1a8010ca-5511-0410-912e-c29ae57300e0
The texture warping mode will need to be set depending on whether we're
actually drawing a parallaxed sky or not.
git-svn-id: https://svn.eduke32.com/eduke32@2142 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes the vertical (~1 texel wide) stripes that are especially
noticable with tiled art skies and Polymost with r_parallaxskyclamp=1
or Polymer (which always uploads skies with repeating s and t coords).
What constitutes a sky tile is currently hardcoded to be >=78 and <=99.
git-svn-id: https://svn.eduke32.com/eduke32@2141 1a8010ca-5511-0410-912e-c29ae57300e0
and restore_highlighted_sector functions. What this means is that TROR bunches
are now correctly duplicated too (only if all sectors of a given bunch are
highlighted).
git-svn-id: https://svn.eduke32.com/eduke32@2138 1a8010ca-5511-0410-912e-c29ae57300e0
(i.e. first press RAlt, then hold RShift to make it active), consider all
sectors, even the grayed out ones.
This makes 6 modifier keys in 4 categories for RAlt. Can you name them all?
Also spell out the labels that get drawn near the reticle when applying
some of the modifiers and make them not show when not actually selecting
(e.g. pressed RShift alone, but have highlighted sectors)
git-svn-id: https://svn.eduke32.com/eduke32@2137 1a8010ca-5511-0410-912e-c29ae57300e0
that bunches and nextwall links are restores, too. Now, to coalesce two
TROR maps (e.g. for a CBP), one could
do for i allsectors, sethighlightsector i 1
on the console, and then load the 'other' map to copy over the contents
of the first, including all TROR stuff. Note that neither selecting
all sectors with RAlt, nor duplicating them with Insert would lead to
the desired effect (yet).
Internally,
- yax_setbunch() now has different behavior for bunchnums -1, -2 and -3
(it either clears the nextwalls or not)
- build.c has a helper function free_n_ptrs(). This could be handy in
other situations where many blocks of memory must be allocated
consecutively and freed in case of failure
git-svn-id: https://svn.eduke32.com/eduke32@2136 1a8010ca-5511-0410-912e-c29ae57300e0
suboptimal, but at least 'correct' and won't produce the aforementioned
corruptions anymore.
git-svn-id: https://svn.eduke32.com/eduke32@2135 1a8010ca-5511-0410-912e-c29ae57300e0
next{wall,sector} indices instead of using checksectorpointer() so
that the nextwalls will be restored exactly as they were (provided
that they are copied). Also fix tweaking the sectnums of sprites.
git-svn-id: https://svn.eduke32.com/eduke32@2132 1a8010ca-5511-0410-912e-c29ae57300e0
Called 'loop punching'. In addition to duplicating the loop, the inner
portions of the original and cloned loop are made into a new bunch, and
the loop walls are made to be neighbors, linking their movement to each
other. This gives a way to create island sectors with a differing
bunchnum in the midst of an already extended area.
Usage:
For an extended sector containing a CCW inner loop, select its points
using Ctrl+Shift. Press Ctrl-E to be queried whether to duplicate the
points into the upper or lower extension (even if it's unambiguous).
A number of conditions must be met for a successful 'punch', which
should hopefully be more or less obvious. Among them:
- loop walls should all be red
- the starting wall is only considered among the non-grayed-out ones
- the neighboring sector must not contain points inside or at the loop
git-svn-id: https://svn.eduke32.com/eduke32@2130 1a8010ca-5511-0410-912e-c29ae57300e0
would break out of the 2D mode loop when splitting a sector would exceed
limits.
git-svn-id: https://svn.eduke32.com/eduke32@2129 1a8010ca-5511-0410-912e-c29ae57300e0
- Don't crash when sector joining fails under certain circumstances.
- Increase the point lock (Manhattan) distance from 1/16th to 1/8th
of the grid square length, making it easier to snap to vertices not
lying at the grid points with grid lock on
- When drawing walls, don't snap to any of them except the first drawn
git-svn-id: https://svn.eduke32.com/eduke32@2126 1a8010ca-5511-0410-912e-c29ae57300e0
When having drawn N new points (and having one 'free') and pressing
ENTER, the N line segments between the new points are checked one by
one for intersection with every non-grayed-out wall and a wall vertex
is inserted at every intersecting point. This may be viewed as a
prerequisite for a 'cutter' style tool.
git-svn-id: https://svn.eduke32.com/eduke32@2125 1a8010ca-5511-0410-912e-c29ae57300e0
This function only handles the actual insertion, also taking care of
constrained TROR walls. Anything around the inserting such as backing up
drawn walls or snapping the x/y position to the grid is handled outside.
git-svn-id: https://svn.eduke32.com/eduke32@2123 1a8010ca-5511-0410-912e-c29ae57300e0
The main change consist of adding a key press (and release) callback
whose only purpose is to be used from m32script as EVENT_KEYPRESS.
When entering that event, the RETURN variable will be set to the
keystatus code of the key, and whether it was pressed or released can
be checked by looking at keystatus[] at that code (ifholdkey and
ifhitkey do this). The purpose of this, then, is to be able to remap
keys in a more general (and complicated) fashion than is possible with
the mapster32.cfg 'remap' option. Various other additions build around
this central one:
- add an example EVENT_KEYPRESS to a.m32, among other things emulating
the keypad arrows with Alt-<normal arrows> for notebook convenience;
disabled initially
- a.m32: set 'owner' with Alt-KP2: now Alt-Shift-KP2, because of
collision with the above
- new m32script command: setkey <keycode>, setting keystatus[<keycode>]
to 1 (note: may be restricted to use in EVENT_KEYPRESS only in the
future)
- fix indexing an m32script array with a defined label, there used to
be a 'not a gamevar' error instead
- add the following constant labels for some key codes:
KEY_SCROLL, KEY_F1 .. KEY_F12
git-svn-id: https://svn.eduke32.com/eduke32@2122 1a8010ca-5511-0410-912e-c29ae57300e0
with no highlighted sectors; and when entering 3D mode, even if there are
highlighted sectors. This should have almost no effect, but I find it cleaner
that way.
- Check map for corruption every time an editing change is done. This was
accidentally disabled when commenting out the undo code (which I've yet
to debug).
git-svn-id: https://svn.eduke32.com/eduke32@2121 1a8010ca-5511-0410-912e-c29ae57300e0
of SPACE and C when in side-view mode. Now, this is accomplished by checking
directly in the overheadeditor code.
git-svn-id: https://svn.eduke32.com/eduke32@2119 1a8010ca-5511-0410-912e-c29ae57300e0
- new mapster32.cfg and OSD variable 'fixmaponsave_sprites', telling the
editor whether to 'fix' the sprite sectnums on saving and entering 3D
mode. Note that a) sprite sectnums are never fixed when 'script_expertmode'
is enabled, as before, and b) sprites that have out-of-bounds sectnums
are still fixed if a proper sector is found
- if saving and some sprite sectnums have thus been tweaked, inform the
mapper on the status line and print the changes in the OSD
- fix update issue similar to an earlier one: when 'saving as', the astub.c-
based file name is now updated too, so saving with Ctrl-S now saves into
the one save with 'save as' (and not the old one)
- don't attempt to recheck wall pointers from scratch (when saving and running
with -check) if it's a TROR map
git-svn-id: https://svn.eduke32.com/eduke32@2110 1a8010ca-5511-0410-912e-c29ae57300e0
Hopefully this fixes the periodic pausing/unpausing that a few people
have been experiencing.
Also fix build with GCC 3.
git-svn-id: https://svn.eduke32.com/eduke32@2108 1a8010ca-5511-0410-912e-c29ae57300e0
with RAND_MAX > 32767 (everything except Windows?). The 'displayrand' command
now returns values from 0 to 32767 inclusive, across all platforms.
git-svn-id: https://svn.eduke32.com/eduke32@2105 1a8010ca-5511-0410-912e-c29ae57300e0
last one + this one:
A couple of tweaks against accidental overwriting of maps.
- first, fix a bug where the map name wasn't reset to 'newboard.map' when starting a
new map
- When saving with Ctrl-S, query the user for confirmation and also show the file name
where the map will be written
- when going into the ESC-menu, print the file name where the map will be written
on pressing 'S' above the '(S)ave' text
git-svn-id: https://svn.eduke32.com/eduke32@2096 1a8010ca-5511-0410-912e-c29ae57300e0
cursor, query the mapper to pick one. The joining can still fail afterwards,
which makes it only a semi-automatic helper feature.
git-svn-id: https://svn.eduke32.com/eduke32@2092 1a8010ca-5511-0410-912e-c29ae57300e0
allowed circle-walls started on the unconstrained _other_ side of a constrained
wall. Also fix a potential invalid wall access when inserting a point (pretty
serious, that!)
git-svn-id: https://svn.eduke32.com/eduke32@2091 1a8010ca-5511-0410-912e-c29ae57300e0
also for make-circle (C, SPACE). There's still a TROR corruption happening
probably when inserting on constrained walls, but I've yet to get behind the
real cause.
git-svn-id: https://svn.eduke32.com/eduke32@2090 1a8010ca-5511-0410-912e-c29ae57300e0
some wall drawing state is ripped out from overheadeditor() into a
a file-scope struct (even if we don't yet need it there). If the deleting
touches the first drawn point, the walls drawn so far are cleared.
git-svn-id: https://svn.eduke32.com/eduke32@2089 1a8010ca-5511-0410-912e-c29ae57300e0
overheadeditor() by allocating temp variables in the blocks where they
are needed.
git-svn-id: https://svn.eduke32.com/eduke32@2088 1a8010ca-5511-0410-912e-c29ae57300e0
- fix arg checking in checkdefs.sh
- some tilenum and quote ID validation in the CON interpreter
- G_DrawDigiNum and friends: eliminate redundant strlen calls
git-svn-id: https://svn.eduke32.com/eduke32@2086 1a8010ca-5511-0410-912e-c29ae57300e0
ATI cards.
From the time of OpenGL initialization, gamma lookup in classic/fullscreen
will be done in software. Before that, always do a setgamma() after setting the
palette, since this is what resets the HW gamma. However, this may lead to
unappealing artifacts with portions of the scene being sent to the screen with
different gammas.
git-svn-id: https://svn.eduke32.com/eduke32@2085 1a8010ca-5511-0410-912e-c29ae57300e0
maybe replace them with the proper names.
Usage:
checkdefs.sh <some.def> [[<some_dir>] -patch]
<some_dir> is taken to be the base directory of the search path.
-patch uses 'sed -i' to replace the offending findings
git-svn-id: https://svn.eduke32.com/eduke32@2081 1a8010ca-5511-0410-912e-c29ae57300e0
We pack our own copy of glext.h to avoid build breakages on older environments,
and having gl.h include its own was defeating all that.
git-svn-id: https://svn.eduke32.com/eduke32@2080 1a8010ca-5511-0410-912e-c29ae57300e0
fashion. Among other things, this makes the FOV widening when shrunk
work. User CON code should always check the initial viewingrange value
when attempting to do FOV effects like zoom, because it is not guaranteed
to be 65536 due to different screen aspect ratios etc.
git-svn-id: https://svn.eduke32.com/eduke32@2078 1a8010ca-5511-0410-912e-c29ae57300e0
polymer_addlight(). I have no idea whether it's the 'right' thing,
but it fixes this:
Conditional jump or move depends on uninitialised value(s)
at polymer_updatelights (polymer.c:5090)
by polymer_drawrooms (polymer.c:938)
. . .
Uninitialised value was created by a stack allocation
at loadmaphack (engine.c:9482)
Fix another uninitialized access when rendering jpegs.
git-svn-id: https://svn.eduke32.com/eduke32@2069 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes a crash when loading a map afterwards.
Tweak a few debugging messages and some whitespace.
git-svn-id: https://svn.eduke32.com/eduke32@2068 1a8010ca-5511-0410-912e-c29ae57300e0
Also move a 'int16_t editstatus' declaration from polymost.c to engine_priv.h.
git-svn-id: https://svn.eduke32.com/eduke32@2066 1a8010ca-5511-0410-912e-c29ae57300e0
Getting the texture handles without requiring invalidation means we can
handle ART-animating tilenums without impacting performance too much.
git-svn-id: https://svn.eduke32.com/eduke32@2058 1a8010ca-5511-0410-912e-c29ae57300e0
This won't actually do anything until the a debug bit is added when
creating the context, but that requires support for GLX_create_context
which SDL doesn't support. I'll add support for WGL_create_context to
winlayer in a bit as a stopgap.
Also updates our local copy of glext.h with a fresh one from the
Khronos registry.
git-svn-id: https://svn.eduke32.com/eduke32@2056 1a8010ca-5511-0410-912e-c29ae57300e0
We need to Y-invert the projection texcoords when sampling
from the lightmap.
git-svn-id: https://svn.eduke32.com/eduke32@2055 1a8010ca-5511-0410-912e-c29ae57300e0
Sprites would stick with their old material on global palette change.
This goes through all prsprites and clobbers their CRCs so that an
alternate skin / tint / highpal can be applied accordingly.
git-svn-id: https://svn.eduke32.com/eduke32@2053 1a8010ca-5511-0410-912e-c29ae57300e0
The winding order of faces is different if only flipping about X or Y,
and we were unconditionally culling CW faces.
git-svn-id: https://svn.eduke32.com/eduke32@2052 1a8010ca-5511-0410-912e-c29ae57300e0
the nextwall pointers correctly; Add some 'asksave=1' and 'make old-nextwalls
invalid'.
git-svn-id: https://svn.eduke32.com/eduke32@2048 1a8010ca-5511-0410-912e-c29ae57300e0
First, if we're in Polymer, don't precache tinted tiles that have a highpal
for that certain pal. Second, don't precache tiles for palnum 251 (the last
non-reserved one, which is used as a crosshair pal). Assuming that there are
no other tints, this cuts the initial precache time and cache size on disk in
half.
git-svn-id: https://svn.eduke32.com/eduke32@2045 1a8010ca-5511-0410-912e-c29ae57300e0
of the picnums of all sprites, omit the newly inserted sprite itself!
git-svn-id: https://svn.eduke32.com/eduke32@2043 1a8010ca-5511-0410-912e-c29ae57300e0
This way, crashlogs will really be appended. Additionally, print a time
at the end of each backtrace.
winlayer.c: load ebacktrace1.dll instead of the old one
Makefile.common: when building with DEBUGANYWAY=1, don't omit frame pointers
This will let us get a stack trace for crashes with the release build code.
git-svn-id: https://svn.eduke32.com/eduke32@2040 1a8010ca-5511-0410-912e-c29ae57300e0
Keep track of which side is getting culled, swap around mirrors, swap
around model drawing.
git-svn-id: https://svn.eduke32.com/eduke32@2032 1a8010ca-5511-0410-912e-c29ae57300e0
is picked" but still not perfect. In particular, sometimes a wrong wall is
selected, and sprites don't get picked through portals. As a rule of thumb,
don't be too far away from the objects you're modifying in 3D mode.
git-svn-id: https://svn.eduke32.com/eduke32@2030 1a8010ca-5511-0410-912e-c29ae57300e0
before, and additionally a mode that doesn't clip against masked walls
and sprites.
git-svn-id: https://svn.eduke32.com/eduke32@2028 1a8010ca-5511-0410-912e-c29ae57300e0
uint64_t gethiticks() and gethitickspersec(). For SDL 1.2, the timer
has the same resolution as getticks (1000 Hz). For Windows and SDL 1.3,
the resolution of the underlying perf-timers is used. The only user of
these functions right now is some TROR on-screen debugging code.
Revert an earlier change regarding r_preview_mouseaim. We can't do the
check because editstatus is set later.
git-svn-id: https://svn.eduke32.com/eduke32@2026 1a8010ca-5511-0410-912e-c29ae57300e0
the additional rendering pass
- Remove r_preview_mouseaim cvar from the game, since it's only for Mapster
- sdlmusic.c: (Failed) attempt to fix a call of waitpid() with a non-existent
process ID in the external MIDI playing code. I think there's a race there...
git-svn-id: https://svn.eduke32.com/eduke32@2025 1a8010ca-5511-0410-912e-c29ae57300e0
functionality, Polymost).
The new feature can be enabled/disabled with the 'r_tror_nomaskpass' cvar.
The basic idea is that when drawing lower or upper levels, a first pass
is performed that ignores all red walls for which the TROR nextwall link
'towards' the viewer arrives at a red wall. Thus, in the worst case, there
can be up to twice as many rendering passes now (when it is discovered that
the no-mask-pass isn't different that what would be drawn with the ordinary
one, the latter is skipped, since we've already drawn all needed geometry).
Hovever, this kind of multi-pass splitting is only suitable for simple scenes,
like the upper subway in the TROR test map. In particular, multiple islands
shouldn't 'see' each other.
Two issues are worth mentioning: first, care needs to be taken for translucent
ceilings or floors, since drawing them twice isn't the same as drawing them
once. This is done for classic, but not for Polymost. Second, sprites (which
are always drawn _after_ the geometry for a given pass) are still clipped to
the geometry of the ordinary pass, resulting in their disappearance from
certain angles.
--
Additionaly, a change made it into this commit that fixes redundant collection
of sprites in TROR:classic/Polymost.
git-svn-id: https://svn.eduke32.com/eduke32@2024 1a8010ca-5511-0410-912e-c29ae57300e0
- remove 'imageSize' global which was always yres*bytesperline and only used once
- some clearbuf() -> Bmemset() because I find the latter easier to read
- remove some clearbufs to 0 of some global arrays on init
git-svn-id: https://svn.eduke32.com/eduke32@2023 1a8010ca-5511-0410-912e-c29ae57300e0
always like this now:
ExtUninit -> (writesetup, misc.)
uninitengine -> (uninitsystem -> (uninit timers, mouse, ...))
exit()
Some paths still lead to a plain exit(), like failures in cache1d.c or mdsprite.c
git-svn-id: https://svn.eduke32.com/eduke32@2022 1a8010ca-5511-0410-912e-c29ae57300e0
with other than base levels, since the y*most arrays are copied there later.
git-svn-id: https://svn.eduke32.com/eduke32@2020 1a8010ca-5511-0410-912e-c29ae57300e0
handled could lead to a bunch whose floors and ceilings covered different
areas. A fix for the reduced functionality arising from this change is
underway.
- Rewrite a small portion of code using yax_vnextsec() in game.c.
git-svn-id: https://svn.eduke32.com/eduke32@2019 1a8010ca-5511-0410-912e-c29ae57300e0
dealing with sectors on the two sides of a bunch. Make yax_globallev and
yax_globalbunch variables non-static.
Rewrite a TROR-related bit in the engine code using the new function.
git-svn-id: https://svn.eduke32.com/eduke32@2018 1a8010ca-5511-0410-912e-c29ae57300e0
palette changed from the last one (either globally or within the last call of
one of the function). This fixes the ugly OSD flickering in 8-bit mode when
a screen tint effect is in action (such as when being hurt or snotted on).
git-svn-id: https://svn.eduke32.com/eduke32@2015 1a8010ca-5511-0410-912e-c29ae57300e0
effects:
1) Mouse turning works with SDL 1.3
2) The mouse pointer can't leave the window area with the console up, so that
focus always stays with the application
3) Menu selection using the mouse doesn't work. Not dramatic IMO.
git-svn-id: https://svn.eduke32.com/eduke32@2011 1a8010ca-5511-0410-912e-c29ae57300e0
is present (like in E4L1). Also sneak in a trivial change in cache1d.c
git-svn-id: https://svn.eduke32.com/eduke32@2010 1a8010ca-5511-0410-912e-c29ae57300e0
fix two issues with signed integer overflow. One is related to clipping
and the other to Polymost mouse-picking for overlong walls. Many more
remain especially in the 8-bit rendering code, but I expect many of
them to be intended.
git-svn-id: https://svn.eduke32.com/eduke32@2009 1a8010ca-5511-0410-912e-c29ae57300e0
is to remove a couple of 'inline's for functions with external linkage, which
seems to be a GCC convenience.
git-svn-id: https://svn.eduke32.com/eduke32@2008 1a8010ca-5511-0410-912e-c29ae57300e0
name into m->head.nam after loading (but before preprocessing for Polymer)
git-svn-id: https://svn.eduke32.com/eduke32@2007 1a8010ca-5511-0410-912e-c29ae57300e0
whenever we change to another renderer etc. and define it for the game and
editor. The purpose of the function is to clean up references to Polymer
resources like lights.
This fixes 1) all lights becoming spot lights in the game and 2)
an issue with maphack lights in the editor (can't recall which exactly).
git-svn-id: https://svn.eduke32.com/eduke32@2006 1a8010ca-5511-0410-912e-c29ae57300e0
Specifically, now also consider the sprite tile's yoffset, and fix an
issue when a tsprite got duplicated 'toward' the viewer. Also add a
couple of tests in trueror1.map.
git-svn-id: https://svn.eduke32.com/eduke32@2004 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the latter also correct when testing a map from the editor.
git-svn-id: https://svn.eduke32.com/eduke32@2001 1a8010ca-5511-0410-912e-c29ae57300e0
TROR portals that works with a little help from updatesectorz() (change not visible
from CON code). Relies only on the presence of an extension whose portal isn't
blocked and also plays nicely with corner cases like being shrunk and enabling
the jetpack. This should fix the upward moving platforms in WGR2.
git-svn-id: https://svn.eduke32.com/eduke32@1996 1a8010ca-5511-0410-912e-c29ae57300e0
on the command-line isn't found (instead of saying nothing)
* editor: Move inconsistent (stat&2)/heinum detection into the corruption
checker. This makes a lot of original maps spew countless 'errors', but
it's preferable for new maps since such floors and ceilings could behave
strangely with TROR.
git-svn-id: https://svn.eduke32.com/eduke32@1995 1a8010ca-5511-0410-912e-c29ae57300e0
In cases where performing occlusion queries for multiple red walls
leading to the same sector, we would sometimes leak a number of
query objects. This was apparently harmless on NVIDIA drivers, but
would leak tons of memory on ATI.
git-svn-id: https://svn.eduke32.com/eduke32@1993 1a8010ca-5511-0410-912e-c29ae57300e0
The code was using the Polymer-cached version of the sector cstat to
determine the translucency of its diffuse material, meaning it would
never get it right on the first try; that's what you get for having
completely different variables named 's' and 'sec'.
git-svn-id: https://svn.eduke32.com/eduke32@1991 1a8010ca-5511-0410-912e-c29ae57300e0
We normally enable backface culling always, but turn it off for
two-sided sprites; we need to make sure it's re-enabled after that
as sector masks are drawn after.
git-svn-id: https://svn.eduke32.com/eduke32@1990 1a8010ca-5511-0410-912e-c29ae57300e0
Some of the ROR code was operating under the assumption that drawasks
always correspond to one call of polymer_displarooms(), but that's not
necessarily the case; external view draws all sectors from the top
polymer_drawrooms(), which was causing crashes. Just ignore the sector
mask queues in external view mode, we already don't draw masked walls.
git-svn-id: https://svn.eduke32.com/eduke32@1982 1a8010ca-5511-0410-912e-c29ae57300e0
Check all the bunch siblings if we get a floor/ceiling hit and walk
them if their own planes hit.
git-svn-id: https://svn.eduke32.com/eduke32@1981 1a8010ca-5511-0410-912e-c29ae57300e0
When walking the sectors in displayrooms, detect floor/sector masks to
place them in a mask queue. The queues are allocated on the heap, but
a stack pointer is maintained by the displayrooms to allow it to play
nice with mirror recursion.
Right now the masks are drawn after all of drawmasks is finished; that
means you can see sprites and wall masks through sector masks, but not
the opposite. There is a slight attempt at blending far to near, but
nothing too conclusive yet; that means that in some cases some sector
masks won't be visible through other sector masks, but it should work
for trivial cases.
The next step would be to copy all the drawmasks logic into Polymer
and have it (attempt to) properly interleave sector masks where they
belong in the blending order.
git-svn-id: https://svn.eduke32.com/eduke32@1980 1a8010ca-5511-0410-912e-c29ae57300e0
Previously they would get counted both as 1-way walls for immediate
drawing and as mask walls for delayed drawing.
git-svn-id: https://svn.eduke32.com/eduke32@1979 1a8010ca-5511-0410-912e-c29ae57300e0
Assigns the right alpha value to floor/ceiling planes if their
translucency bits are set and make sure that changing the cstat now
triggers an update of the material for editing purposes.
This doesn't do anything by itself, but will be needed to correctly
draw floor/ceiling masks.
git-svn-id: https://svn.eduke32.com/eduke32@1977 1a8010ca-5511-0410-912e-c29ae57300e0
When walking the sectors, put more drawing work between queuing and
reaping the occlusion queries to potentially make them more efficient.
git-svn-id: https://svn.eduke32.com/eduke32@1976 1a8010ca-5511-0410-912e-c29ae57300e0
Enumerate the vertical siblings of each walked sector and check them
against the current frustum. No occlusion queries yet, but that should
correct any missing sectors until a flaw in that logic is discovered.
git-svn-id: https://svn.eduke32.com/eduke32@1975 1a8010ca-5511-0410-912e-c29ae57300e0
Reorganize polymer.c a bit to match the order of prototypes from the
header, move macros from the middle into the header.
git-svn-id: https://svn.eduke32.com/eduke32@1974 1a8010ca-5511-0410-912e-c29ae57300e0
- 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
git-svn-id: https://svn.eduke32.com/eduke32@1969 1a8010ca-5511-0410-912e-c29ae57300e0
which switches have been hidden in the original and user maps. One is to make
it face a wall, and another is to 'embed' it in e.g. the floor, like the
monitor with the burning fuse in E4L1. Both kinds show up when the switches
are rendered as models, revealing the secrets that the mapper sought to hide.
My proposal, implemented in this commit, is to apply a heuristic for such
switches at premap and make them invisible (set cstat bit 32768). The
conditions are re-checked during the game in case there is a switch coming
out of the floor, for example. A new spriteext bit is used for this feature.
git-svn-id: https://svn.eduke32.com/eduke32@1968 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes a ridiculous interaction problem between non-black fog and
additive lighting passes. Plagman is stupid.
git-svn-id: https://svn.eduke32.com/eduke32@1965 1a8010ca-5511-0410-912e-c29ae57300e0
by using setspritez() instead of setsprite() for the sectnum updating.
* Change 'yax-nextwall(0/1)' to 'upwall/downwall' in the corruption checker, makes it much nicer to read.
git-svn-id: https://svn.eduke32.com/eduke32@1959 1a8010ca-5511-0410-912e-c29ae57300e0
* make Ctrl-Alt-A (formerly 'toggle inner gray walls') now remove all gray walls entirely in 2d mode
* make r_usenewaspect enabled by default
git-svn-id: https://svn.eduke32.com/eduke32@1957 1a8010ca-5511-0410-912e-c29ae57300e0
* fix breaking out of 'switch' blocks and compilation of the 'default' case
* Have a way of assigning 'special function' menu [' F] entries to script states. Writing a string literal after the state name will register the state under that name. Menu names are limited to 24 characters and it's possible to have up to 16 of them.
* new branching command 'ifinteractive', true if a state runs from the menu mentioned above.
* new command: getnumberfromuser <<retvar>> "query_string" <maxnum> <flags>
See 'state collect_teleporting_sectors' in a.m32 for a combined usage of the new functionality.
git-svn-id: https://svn.eduke32.com/eduke32@1955 1a8010ca-5511-0410-912e-c29ae57300e0
* helper feature: when shade preview is enabled, the ceilings and floors of highlighted sectors are shown in pal 6. This makes it possible to highlight the TROR-joining candidate sectors in 3D mode using e.g. 'sethighlightsector searchsector 1' while aiming at the respective ceilings and floors, and get visual feedback.
* when failing TROR-joining early ('no consistent joining combinations found'), print to the console why it failed.
* more Makefile.deps updating
git-svn-id: https://svn.eduke32.com/eduke32@1952 1a8010ca-5511-0410-912e-c29ae57300e0
* New shade/visibility calculation code, which is activated with 'r_usenewshading' (on by default), and is closer to the classic look. Also tweak the FOGSCALE macro to have approximately the same fog distance with all renderers.
* Mapster32: END modifier to RShift. If it's pressed when RShift is released, sprites which are in grayed out sectors are also selected; Make changing shade affect all highlighted sprites in 3D mode (when aiming at one of them).
* some debug code to watch out for suspicious glGenTexture/glDeleteTextures calls, not active.
git-svn-id: https://svn.eduke32.com/eduke32@1943 1a8010ca-5511-0410-912e-c29ae57300e0
First, it is now possible to disable the memcache (which is there to cache the texcache) by setting the new cvar 'r_memcache' to 0. Do this if you're constrained on memory or getting crashes when e.g. doing vidrestart often. Also, the memcache will disable itself (and free its storage, if it's there) the first time it fails to allocate.
Fix a strcpy with identical arguments in game.c and a couple of uninitialized mem accesses related to Polymer lights.
git-svn-id: https://svn.eduke32.com/eduke32@1941 1a8010ca-5511-0410-912e-c29ae57300e0
The main feature is the addition of -mx and -mh command-line parameters to EDuke32 and Mapster32. These parameters include a con and def "module" respectively. This translates into essentially including the file from the bottom of the compiled script.
I fixed the classic buggy behavior of the BROKEHYDROPLANT and REACTOR2 sprites.
I also fixed a small, long-standing bug where FRAMEEFFECT1 blurs are not affected by sector floorpal. You can see one example of this by shrinking the Enforcer on the upper inside of the toppled building in E3L11: Freeway.
I tweaked the Makefile so that it would automatically regenerate the keep.me files in the $(OBJ) and $(EOBJ) directories after they are deleted for cleaning.
One final change is a slight positioning cleanup of both programs' --help dialog boxes.
git-svn-id: https://svn.eduke32.com/eduke32@1937 1a8010ca-5511-0410-912e-c29ae57300e0
Usage: For an ANM file <somefile>.anm/ANM, EDuke32 looks for <somefile>.ivf, which is the VP8 stream transported by an IVF container. It can be extracted from a WebM file with e.g.
mkvextract tracks <filename>.webm 1:<filename>.ivf
(part of Mkvtoolnix, the Matroska toolset)
Libvpx is required, and the 'YUV'-->RGB conversion is implemented using a fragment shader, so it's for OpenGL modes only. Also, this commit doesn't enable the code.
Unfinished: sound, aspect correction for fullscreen w/ non-square pixels, ... ?
---
Make MAXNODESPERLINE in engine_priv.h actually a macro that depends on MAXYSAVES and MAXDIM instead of using the obsolete precomputed value. I think this might have been the cause for the latest patched-up overhead view crash.
git-svn-id: https://svn.eduke32.com/eduke32@1933 1a8010ca-5511-0410-912e-c29ae57300e0
* Read-only CON access to sector bunchnums by adding the labels '.ceilingbunch' and '.floorbunch' to the CON sector structure
git-svn-id: https://svn.eduke32.com/eduke32@1931 1a8010ca-5511-0410-912e-c29ae57300e0
* slightly tweaked status line, now also displaying the number of bunches
* fix a couple of issues unearthed by valgrind and a TROR nextwall corruption when joining sectors
git-svn-id: https://svn.eduke32.com/eduke32@1930 1a8010ca-5511-0410-912e-c29ae57300e0
* it is now possible to paste (and have an outer red wall automatically) highlighted sectors into a sector that is extended on one side and non-sloped on the other. For this, the highlighted sectors must be in one connected component.
* Make it possible to not display inner gray walls, toggled with Ctrl-Alt-A, but only when no manual grayout (Ctrl-R) is in effect.
* bugfix: don't clear original TROR-nextwall link when duplicating extended highlighted sector
* m32script: protect wall members relevant to TROR
* save autogray (Ctrl-A) and showinnergray (see above) to mapster32.cfg
git-svn-id: https://svn.eduke32.com/eduke32@1928 1a8010ca-5511-0410-912e-c29ae57300e0
- sethighlightsector <sectnum> <on?>
- updatehighlightsector
- collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>
The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).
* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,
corruptcheck tryfix 9-21 ?
would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.
* fix demo playback (tueidj figured this out)
git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
* When dragging highlighted sprites, do a setsprite() after each position update. This way, they won't end up on the wrong level
* TROR support for SE 31 and 32 in-game, example provided in test map
* some uncommited stuff for TROR: SE 6/14
git-svn-id: https://svn.eduke32.com/eduke32@1924 1a8010ca-5511-0410-912e-c29ae57300e0
* Make the minimum resolution possible 640x480. Sometimes you'd accidentally enter something like 'vidmode 800 60' and crashes would ensue...
* fix a warning
git-svn-id: https://svn.eduke32.com/eduke32@1921 1a8010ca-5511-0410-912e-c29ae57300e0
* fix memory corruption when loading a Polymer savegame using another renderer and then change to Polymer
* fix possible crash in OSD_Exec() and uninitialized mem access in game config reader
* move makeasmwriteable() to baselayer.c
git-svn-id: https://svn.eduke32.com/eduke32@1910 1a8010ca-5511-0410-912e-c29ae57300e0
"The most noticeable change is the addition of the "includedefault" CON and DEF command, which will attempt to include eduke.con (or nam.con, or ww2gi.con), then game.con, or duke3d.def, or nam.def, or ww2gi.def. This is useful for TCs like my add-ons, where for my pseudo-mutators I currently say "include EDUKE.CON", but I also have to juggle this terrible order of paths, so that I can have an EDUKE.CON file in my HRP which says "include GAME.CON" to allow the mainline game to actually run, but also allow DukePlus to load its EDUKE.CON file (since it uses that and not an -x switch), and also allow any custom EDUKE.CON files in the root to be used."
git-svn-id: https://svn.eduke32.com/eduke32@1909 1a8010ca-5511-0410-912e-c29ae57300e0
* Voxel tweaks: horizontally scale wall-aligned ones by 5/4, make them ignore per-tile yoffset in classic (i.e. emulate Polymost; I think this is more sensible since they're not clipped to floors/ceilings anyway), make Polymost know the voxel scale
* Always cull back-facing, one-sided, wall-aligned sprites (classic/Polymost), irrespective of whether it's a sprite, voxel or model. This can lead to falsely not drawing them in certain circumstances, but IMO that's preferable to visible hidden switches etc.
* Change defaults for r_novoxmips to 1 and lazytileselector to 0
git-svn-id: https://svn.eduke32.com/eduke32@1908 1a8010ca-5511-0410-912e-c29ae57300e0
* When TROR-joining and sectors reachable through former red walls could need displacement, ask the user; if something is wrong with the walls of the two components to join, jump to that place and print coordinates of offending wall and its point2 in the OSD
* Ctrl-TAB in 2D mode now toggles filling of the currently aimed-at sector; it's not very in sync with the rest of the controls though (e.g. some commands will potentially affect each sector that contains the crosshair)
* Fill sectors slightly different so that highlighted sectors above each other are easier to distinguish
* In the editor, always clear the screen to a 'rainbow' of the palette before each frame. This makes no-draw ('HOM') and accidental translucency glitches stand out more clearly
* a few misc. tweaks, consistency checks, and fixes
git-svn-id: https://svn.eduke32.com/eduke32@1901 1a8010ca-5511-0410-912e-c29ae57300e0
* Mapster32 now makes sandwiches, too: select all floors of a bunch and 'extend them below'. This will put a new sector between the highlighted ones and the their lower neighbors and displace the z's accordingly. Make sure you have enough headroom.
* To facilitate the above, RAlt now has two more modifier keys (checked at release time, as usual): for every sector that would be selected, END will select all sectors whose floor bunchnum equals the first (this is useful for sandwiching), and HOME will select all sectors whose ceiling bunchnum equals it (not very useful, but provided for completeness).
* Sloping extended sectors is now checked more rigorously
-- misc:
* When deleting highlighted sectors with DEL, pressing LShift will now always delete them irrespective whether the mouse pointer is over one of them. This is useful for the cleanup of corrupted maps.
* 2D drawing is slightly tweaked so that active walls always display over inactive ones
git-svn-id: https://svn.eduke32.com/eduke32@1900 1a8010ca-5511-0410-912e-c29ae57300e0
game: when entering/leaving water or slime, delay changing palette by one game tic to make it look right
git-svn-id: https://svn.eduke32.com/eduke32@1899 1a8010ca-5511-0410-912e-c29ae57300e0
* rudimentary TROR support
* free mixing of multi- and single-tile pskies
* Don't cull models behind you. That is, treat them like floor sprites in that respect. This way large models like corpses don't disappear from the view unexpectedly.
Classic:
* tweak the last row and column of the translucency table so that e.g. a transparent sprite against a FANSPRITE wall doesn't show up purple (only if Duke3D table is found)
Misc.:
* fixes TROR-nextwall corruption when deleting sectors
* tile selector 'goto' now has also completion
* I forgot a file for the non-OpenGL build last time
git-svn-id: https://svn.eduke32.com/eduke32@1892 1a8010ca-5511-0410-912e-c29ae57300e0
* make it possible to duplicate from extended sectors; all extensions are cleared from them
* lazy hightile loading in tile selector can now be disabled in mapster32.cfg
* fixes USE_OPENGL=0 build
git-svn-id: https://svn.eduke32.com/eduke32@1890 1a8010ca-5511-0410-912e-c29ae57300e0
* more useful auto-red wall feature: if no structure-changing operations have been applied after highlighting and duplicating, now also paste 'visual' fields of outer walls (this is one example of the use of a system that temporarily keeps track of nextwalls for former red lines)
* multi-pkies now have individual parallaxyscale
git-svn-id: https://svn.eduke32.com/eduke32@1886 1a8010ca-5511-0410-912e-c29ae57300e0
* support for free mixing of multi- and single-tile parallaxed skies in classic
* make visibility independent of yxaspect and viewingrange in OpenGL modes
-- editor:
* when dragging walls, restore pixel width after that (only for the left and right walls of pointhighlight, and its nextwalls, if any)
* pasting on walls and auto-aligning them now carries over a few more fields
-- fixes:
* visibility in OpenGL modes wasn't incremented gradually (regression due to making 'clamp' an inline function instead of a macro)
* memory corruption due to calling qlz_compress with less than the recommended surplus storage of 400 bytes
* decorative sprites in the mirror showing non-flipped
* make the subway SE message (much) more helpful by showing which sector the game considers to be the track sector
git-svn-id: https://svn.eduke32.com/eduke32@1882 1a8010ca-5511-0410-912e-c29ae57300e0
* Polymer light access to m32script (light[<lightidx>].<field>). As an application, provide a state 'insertlights' that takes the currently active lights and puts them into the map as SEs (e.g. for maphack recovery).
* Prototype of a mechanism to gray out certain portion of a map, making them inactive to various, but not all, editing operations. Highlighting a set of sectors and pressing Ctrl-R will make the Z bounds be [(least ceiling z), (greatest floor z)] of all selected ones, pressing Ctrl-R when no sectors are highlighted will reset them. Not sure if it's for production use at this stage...
* The 'align walls' feature [.] now has three independently toggleable behaviours: recurse nextwalls (toggled when Ctrl is pressed), iterate point2s (disabled when Shift is pressed), and also copy pixel width (toggled when Alt is pressed).
* Make shades clamp instead of overflowing in the editor
Fixes:
* crash when carrying out certain operations on walls with xrepeat 0
* the Pause key on linux. Also make demo recording start on Shift-ScrollLock because ScrollLock alone is too easily pressed when pausing
git-svn-id: https://svn.eduke32.com/eduke32@1877 1a8010ca-5511-0410-912e-c29ae57300e0
* Tag labeling system for 'link'-type tags, including saving and restoring the tag labels to a separate file '<mapname>.maptags'. Whether a tag is eligible for linking, is determined by a hardcoded (but extensible via m32script) function.
git-svn-id: https://svn.eduke32.com/eduke32@1867 1a8010ca-5511-0410-912e-c29ae57300e0
* Sprite cstat 2048 ('use own shade', [N]) now works more or less. (Issues may arise when combined with sector light effects.)
* Begin work on 'smart' tag labeling system for Mapster32. Right now, it only displays a '+' after tags with linking semantics.
*
git-svn-id: https://svn.eduke32.com/eduke32@1866 1a8010ca-5511-0410-912e-c29ae57300e0
* Consolidate the various, slightly different, methods of bounding a sprite between a sector's ceiling and floor into one common function
* Fixes for accumulated bugs: shade preview, r_shadescale_unbounded, and a couple of unreported ones
* Yaks, gnus, and bisons...
git-svn-id: https://svn.eduke32.com/eduke32@1854 1a8010ca-5511-0410-912e-c29ae57300e0
* Refactor two nearly identical chunks in polymost.c into one function in the hope of getting some more, but interestingly that did nothing at all. At least it's more readable this way...
* Commit, but don't enable, code for writing PNG screenshots (I'm tired of converting them every time). Requires libpng which in turn requires zlib.
git-svn-id: https://svn.eduke32.com/eduke32@1852 1a8010ca-5511-0410-912e-c29ae57300e0
Engine stuff:
* Add 'r_shadescale_unbounded' cvar. When set to 0, OpenGL renderers should never
draw completely black objects (currently only implemented for Polymost)
Mapster32:
* Add 'r_shadescale' to config
* In 3D mode, make SPACE behave the same as holding down a mose button: the
currently pointed-at object is locked. Required some modification of a.m32
to play well (i.e. not reset SPACE). This is useful by itself but more so
in conjunction with the next point
* make Alt behave as a modifier with PGUP/PGDN: when aiming at a 2-sided wall,
move the other side's sector's ceiling or floor (only this is new).
* Auto-alignment of walls can be controlled in a finer grained fashion now:
When pressing '.', only the immediate neighbors get aligned. Use Ctrl-. for
the old behaviour.
* When inserting a point in 2D mode, auto-align the neighboring wall
git-svn-id: https://svn.eduke32.com/eduke32@1848 1a8010ca-5511-0410-912e-c29ae57300e0
they happen to exactly go the the center of the screen, but not that big of a
deal.
git-svn-id: https://svn.eduke32.com/eduke32@1847 1a8010ca-5511-0410-912e-c29ae57300e0
not prompt you for shader paths, collapsed into a single file and to avoid
transforming normals. This might break for rotations, but I don't think such
transforms should happen with a straight import from ASE -> export to MD3.
git-svn-id: https://svn.eduke32.com/eduke32@1839 1a8010ca-5511-0410-912e-c29ae57300e0
* Have the corruption checker catch this case among a few other new ones. Rename OSD command 'autocorruptcheck' to simply 'corruptcheck' with options 'corruptcheck <seconds>', 'corruptcheck now' and 'corruptcheck tryfix'.
* When pasting sector selection into valid player space (releasing AltGr), ask whether a surrounding outer loop should be created since this is probably not always desired.
git-svn-id: https://svn.eduke32.com/eduke32@1790 1a8010ca-5511-0410-912e-c29ae57300e0
engine:
* sector-like sprite clipping now works with x- xor y-flipped actual sprites
mapster32:
* corruption checker has been hooked up to loading/saving routines to inform/warn the user
* also warn if mouse pointer is over corrupt wall which is shown in pink then: you should not move such a wall!
* faster map loading by deferring polymer_loadboard to 3d mode entrance (also removes some 'glGetTexLevelParameteriv returned GL_FALSE' warnings)
* more logical maphack light handling, the logic is still a bit dodgy though
* some menu and misc. function fixup
* redundancy elimination...
API:
* added consts various for 'char *filename' parameters
* loadboard() now accepts bit 4 for flags (formerly 'fromwhere')
git-svn-id: https://svn.eduke32.com/eduke32@1760 1a8010ca-5511-0410-912e-c29ae57300e0
First, there's a new script for the generation of highpalookup images. Python 2.6, NumPy and PIL are required.
Next, the map corruption checker has been ported to C. This is so that Mapster32 will be able to take decisions more cleverly based on the corruptness of the map. It also catches a few more issues like inconsistent nextwall/nextsector tags now.
Finally, link the executables with --large-address-aware on Windows. This gives a gig more private virtual memory on XP when booting with /3GB. YMMV, but I can play IW2 with Polymer now.
git-svn-id: https://svn.eduke32.com/eduke32@1751 1a8010ca-5511-0410-912e-c29ae57300e0
generate the highpalookup maps offline (only with a few incomplete pals right
now).
New DEF token: highpalookup [pal] [filename]
New cvar: r_pr_highpalookups
git-svn-id: https://svn.eduke32.com/eduke32@1748 1a8010ca-5511-0410-912e-c29ae57300e0
would remove write access to our code sections.
bugs 3086185 and 3104646
git-svn-id: https://svn.eduke32.com/eduke32@1724 1a8010ca-5511-0410-912e-c29ae57300e0
Add brightness/gamma/contrast cvars to Mapster32
Fix bug with WEAPON_SEMIAUTO flag for custom weapons
Fix VM error with starttrack when specifying an invalid music track
Fix detection of 0x1a EOF characters in CON files
Fix a couple of additional sound issues
Fix crash in pushmove()
Fix Mapster32 textured 2D mode display being a few pixels off from the actual lines drawn
Fix crash when clicking "cancel" in Mapster32 startup window
Add Makefile detection to build with -march=pentium3 -mtune=generic on i686
git-svn-id: https://svn.eduke32.com/eduke32@1665 1a8010ca-5511-0410-912e-c29ae57300e0
No, seriously. Adds widescreen aware rotatesprite and works out half a dozen huge problems in the sound system, among other things.
git-svn-id: https://svn.eduke32.com/eduke32@1658 1a8010ca-5511-0410-912e-c29ae57300e0
The bulk of this commit is "code rape"--or rather, caressing, rewritten for readability.
Actual changes/fixes:
- fixed "walking" in 2d mode
- fixed DELETE key in OSD in SDL build
- main loop in general (timeout for event wait after 200 ms so that highlights blink)
- access to some pr_override* variables in m32script (suggested by Roma Loom)
- API cleanup (added statics and consts here and there)
git-svn-id: https://svn.eduke32.com/eduke32@1644 1a8010ca-5511-0410-912e-c29ae57300e0
Mapster32: Helper feature -- pressing SHIFT on a 2-sided wall makes the PGUP/PGDN etc. commands operate on the sector at the other end of the wall; replaced searchstat numbers by #defined names and eliminated the worst cases of code duplication in astub.c
git-svn-id: https://svn.eduke32.com/eduke32@1598 1a8010ca-5511-0410-912e-c29ae57300e0
- pr_resetlights() was exported but polymer.c wasn't changed to reflect that. This also broke the gcc build so I'm not sure how this was missed.
- commented code was laying around in the middle of polymer.h
- savegame.c using a bunch of C99 non-constant initializers. Please keep in mind that MSVC is one of the supported compilers and doesn't know C99.
- savegame.c using localtime_r, which doesn't exist on Win32.
- demo playback calling resetlights and drawrooms without ever calling pr_loadboard().
- this change makes the game run very choppy here.
git-svn-id: https://svn.eduke32.com/eduke32@1596 1a8010ca-5511-0410-912e-c29ae57300e0
Features: * start recording in mid-game (ScrollLock)
* saves interleaved diffs for later sync correction
* supports fast-forward/rewind
Some work still needed to trace down remaining sync problems. Also be sure to check the demo* cvars.
git-svn-id: https://svn.eduke32.com/eduke32@1595 1a8010ca-5511-0410-912e-c29ae57300e0