On the C side, slightly rewrite (now) getclosestcol_lim() for clarity.
git-svn-id: https://svn.eduke32.com/eduke32@4308 1a8010ca-5511-0410-912e-c29ae57300e0
Also, fix a missed .filler -> g_ambiencePlaying[] rewrite in the editor.
In C-CON, 'detail' is kept as alias to C-side (former) .filler / now .blend,
but that name is *deprecated*.
git-svn-id: https://svn.eduke32.com/eduke32@4305 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes updating the viewscreen in Polymer's ART mapping mode.
git-svn-id: https://svn.eduke32.com/eduke32@4304 1a8010ca-5511-0410-912e-c29ae57300e0
Currently, sprite[].filler (to be renamed) selects a blending table. If none
is installed with that index, the blending table at index 0 is taken (which is
read from PALETTE.DAT on engine startup). Thus, for now, the non-Lunatic build
will never use a custom blending table because there's no way to register one!
But the functionality is there.
git-svn-id: https://svn.eduke32.com/eduke32@4301 1a8010ca-5511-0410-912e-c29ae57300e0
- use SPRITES_OF* iterator macros
- new function: E_SpriteIsValid(); add some safety checks
(e.g. hitag used as sprite index)
- the rest is mostly "the usual code transformations"
git-svn-id: https://svn.eduke32.com/eduke32@4281 1a8010ca-5511-0410-912e-c29ae57300e0
- Make Win+F* also make play and RTS sound, since modern OS's window managers
like to eat Alt-F*. (Some Win+F* may be inaccessible too, but together all
10 should hopefully be covered.)
- Fix an issue where keys other than F1-F10 were considered as starting an RTS
sound and crashing EDuke32 in the process
git-svn-id: https://svn.eduke32.com/eduke32@4278 1a8010ca-5511-0410-912e-c29ae57300e0
In the non-Lunatic build naturally, since the Lunatic one uses its own member.
git-svn-id: https://svn.eduke32.com/eduke32@4275 1a8010ca-5511-0410-912e-c29ae57300e0
It's functional, but due to the odd 37.8 KHz nature of the format, I will need to add a resampler to the audiolib to prevent the aliasing artifacts that occur at present. I also hear clicks/pops every so often, but I do not know if a resampler would fix these as well or if they are a separate problem.
Note that you cannot directly use the four XA files on the Total Meltdown disc because they each contain eight songs. They would need to be split using a utility I wrote that is outside the scope of this SVN.
git-svn-id: https://svn.eduke32.com/eduke32@4268 1a8010ca-5511-0410-912e-c29ae57300e0
EDuke32 has me so accustomed to straight C... using a template and pass-by-reference makes my day.
git-svn-id: https://svn.eduke32.com/eduke32@4267 1a8010ca-5511-0410-912e-c29ae57300e0
In simple cases, it should be added. Combinations of alignment across TROR
boundaries and bottom-swapping will probably not work right.
git-svn-id: https://svn.eduke32.com/eduke32@4265 1a8010ca-5511-0410-912e-c29ae57300e0
Concretely, in the "behind, outside" case, draw the sprite early if any of its
2 or 4 corner points are behind the masked wall, and inside the cone or on the
other outside.
git-svn-id: https://svn.eduke32.com/eduke32@4264 1a8010ca-5511-0410-912e-c29ae57300e0
Also, in LunaCON, make player .palette member read-only. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4260 1a8010ca-5511-0410-912e-c29ae57300e0
This prevents a crash and maybe other badnesses when e.g. loading a map
with ART tiles, doing something that allocates a reserved tile (such as
looking into a viewscreen), then loading another map where the tilesiz*
of TILE_VIEWSCR is restored to 0.
git-svn-id: https://svn.eduke32.com/eduke32@4259 1a8010ca-5511-0410-912e-c29ae57300e0
Actually, right now, any first arg starting with '-' will show the usage.
git-svn-id: https://svn.eduke32.com/eduke32@4258 1a8010ca-5511-0410-912e-c29ae57300e0
When a map named <filename>.map is loaded (<filename> may also contain directory
separators), the engine checks for existence of <filename>_XX.art in the virtual
file system, where XX is a 0-padded number from 00 to 19. It loads a consecutive
sequence of these ART files, i.e. aborts whenever a number in the sequence isn't
found (in contrast to normal ART loading).
Restrictions:
- the per-map ART files must not reside in ZIP files
- if a tile number is attempted to be overridden that has a dummytile or is
cache1d-locked, per-map ART loading fails
On failure, the map is still loaded, but a diagnostic message is output to the
log/OSD.
Loaded per-map ART data are cleared whenever the map is "left". In particular:
- whenever another map is loaded
- in the editor: when a new map is started
- in the game: after the bonus ending screen of a finished level, after going
to the title screen via the menu
A final note: file names are supposed to be looked up and compared
case-sensitively. That is, <filename> must match EXACTLY between the map's and
per-map ART one; 'art' must be lowercase. Otherwise, the cookie monster will
come and eat you!
BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4257 1a8010ca-5511-0410-912e-c29ae57300e0
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development.
I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.
git-svn-id: https://svn.eduke32.com/eduke32@4249 1a8010ca-5511-0410-912e-c29ae57300e0
You can:
-Cycle your position through all DM or coop spawn points.
-Jump to the primary spawn point.
-Dump full spawn point information to the log file.
git-svn-id: https://svn.eduke32.com/eduke32@4245 1a8010ca-5511-0410-912e-c29ae57300e0
Available in the game and editor. Provide test/shadexfog.lua, containing a
function to creating a set of 32 shade tables corresponding to different shades
of the same fog palookup table, together with some tests and convenience
functions.
Also,
- Add gv.LUNATIC_CLIENT{,_EDUKE32,_MAPSTER32}
- Add LUNATIC_FIRST_TIME in the global env for the game
- defs_m32.lua: add reload() convenience function
- Failed attempt at recreating the base shade table. It is NOT a linear ramp
of the base palette colors to (0,0,0). That is, it's not created by
build/util/transpal.exe!
git-svn-id: https://svn.eduke32.com/eduke32@4236 1a8010ca-5511-0410-912e-c29ae57300e0
It is unacceptable that yvel is on one hand modifiable without restriction from
scripting, but can be used as an array index without prior bound check in the C
code. Because that member has an overloaded meaning and is also used for
innocuous purposes such as the green color intensity of an SE light, it's
infeasible to restrict access from scripting. Consequently, we must add bound
checks on the C side. This is the first part of the effort to make .yvel safe,
adding two functions P_Get() and P_GetP(). There are a couple of other uses as
some kind of index.
git-svn-id: https://svn.eduke32.com/eduke32@4226 1a8010ca-5511-0410-912e-c29ae57300e0
- in the function itself: for floor, currently, do nothing (but this commit
is in preparation of the next one, again)
- In Proj_MaybeDamageCF(), Proj_MaybeDamageCF2() and the A_RadiusDamage() use
if the function, generalize to floors, but with the special case that
parallaxed floors keep blocking projectiles, as before (in constrast to
parallaxed ceilings). However, Sect_DamageCeilingOrFloor() is only
called for non-parallaxed ceilings *and* floors.
git-svn-id: https://svn.eduke32.com/eduke32@4205 1a8010ca-5511-0410-912e-c29ae57300e0
- factor out: G_WallSpriteDist()
- factor out: Proj_MaybeDamageCF() and Proj_MaybeDamageCF2()
in preparation for the next commit
- Make PROJ_DECAYVELOCITY macro take an arg for readability's sake
git-svn-id: https://svn.eduke32.com/eduke32@4204 1a8010ca-5511-0410-912e-c29ae57300e0
The scrollwheel is unique among PC input because it has no innate "hold length". Previously, the layers gave the mousewheel a fake hold length to allow the not-necessarily-synchronous game/editor code to pick up the input before the layers marked it as "no longer pressed". This passed under Windows, but it didn't slide under SDL.
Besides the two problems listed above, it also potentially limited the rate of weapon selection, where scrolling too fast would not register every clicks. [Unrelatedly, this is still the case when you scroll faster than the game's own tickrate, but addressing that would require rewriting input handling to go through a list of "events" for each tic instead of looking at overall pressed/unpressed states.]
git-svn-id: https://svn.eduke32.com/eduke32@4200 1a8010ca-5511-0410-912e-c29ae57300e0
- Move ARRAY_SIZE() macro to compat.h, add another one ARRAY_SSIZE()
- In A_RadiusDamage(): note maybe-unaligned access issue, prevent unlikely oob
- sector.c: use SPRITES_OF* macros where appropriate
git-svn-id: https://svn.eduke32.com/eduke32@4199 1a8010ca-5511-0410-912e-c29ae57300e0
Exposed by this snippet from a.m32:
getnumber256 .owner "OWNER (projection picnum): " -MAXTILES
Now, Alt+KP2 works as expected in 3D mode.
git-svn-id: https://svn.eduke32.com/eduke32@4196 1a8010ca-5511-0410-912e-c29ae57300e0
And issue warnings whenever the assignment would fail (error) at game time.
git-svn-id: https://svn.eduke32.com/eduke32@4195 1a8010ca-5511-0410-912e-c29ae57300e0
This requires enabling the same workaround as for Linux. Maybe it's not
system-dependent at all.
git-svn-id: https://svn.eduke32.com/eduke32@4193 1a8010ca-5511-0410-912e-c29ae57300e0
This generally fixes demo playback. Before, tilesizx[]/tilesizy[] were written
into twice as many bytes as needed. Now, don't do that at all.
git-svn-id: https://svn.eduke32.com/eduke32@4191 1a8010ca-5511-0410-912e-c29ae57300e0
Important because in Lua, a value of zero yields true in a boolean context.
BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4184 1a8010ca-5511-0410-912e-c29ae57300e0
I was checking for GCC >= 4.7, while Clangs pretends to be GCC 4.2. Use a
feature test macro instead. The comment I made in r4161 regarding GCC vs.
Clang code was wrong. Now, Clang generates slightly faster code for these cases
(solid and masked 4-pixel wide vlines).
git-svn-id: https://svn.eduke32.com/eduke32@4182 1a8010ca-5511-0410-912e-c29ae57300e0
In particular, (int32_t)j != -1 is replaced by (uint32_t)j < MAX_WEAPONS
to prevent a value >= MAX_WEAPONS to be assigned to p->wantweaponfire (it's
used as a weapon index in P_CheckWeapon().
git-svn-id: https://svn.eduke32.com/eduke32@4181 1a8010ca-5511-0410-912e-c29ae57300e0
Because p->scream_voice is an int8_t.
This is an unlikely situation (126 voices ought to be playing simultaneously
while starting the "scream" sound), but still...
git-svn-id: https://svn.eduke32.com/eduke32@4180 1a8010ca-5511-0410-912e-c29ae57300e0
The ones disabled are because they were found to not be used in any mod I
tested. Exposing members directly is rarely good API.
- bool toggle_key_flag -> const uint8_t ... (because value 2 is used)
- make scream_voice, cheat_phase read-only
git-svn-id: https://svn.eduke32.com/eduke32@4179 1a8010ca-5511-0410-912e-c29ae57300e0
Which was especially noticeable in the Lunatic build. Also, use
glPushAttrib/glPopAttrib there.
git-svn-id: https://svn.eduke32.com/eduke32@4176 1a8010ca-5511-0410-912e-c29ae57300e0
This "simply" requires an appropriate factor in the projection matrix.
Also, get rid of a special-case factor for >=1.6 aspects (making HUD models
wider then, I think).
git-svn-id: https://svn.eduke32.com/eduke32@4172 1a8010ca-5511-0410-912e-c29ae57300e0
Known as getactor/sprite[].xpanning from CON, values are 0-255. It should be
assumed that this is only valid for wall-aligned sprites (currently, face
sprites also pan).
A test is provided in lunatic/test/animatesprites.con. It should be run in E1L2
and only with the Lunatic build.
git-svn-id: https://svn.eduke32.com/eduke32@4170 1a8010ca-5511-0410-912e-c29ae57300e0
For sanitizing underwater sections, see r4166.
Also, don't print "Menu function executed successfully" when the function
printed something itself.
git-svn-id: https://svn.eduke32.com/eduke32@4169 1a8010ca-5511-0410-912e-c29ae57300e0
Also, if it were to be reenabled again, use execv() instead of execvp(),
i.e. don't look up $PATH for the executable.
git-svn-id: https://svn.eduke32.com/eduke32@4167 1a8010ca-5511-0410-912e-c29ae57300e0
Likewise for blocking wall sprites. This makes it possible to construct
underwater sections containing complex spritework without losing the
"underwater-ness" when over such sprites, in a backward-compatible way.
Actually, the check is for bit 1 being set, but all other bits should be
considered reserved.
git-svn-id: https://svn.eduke32.com/eduke32@4166 1a8010ca-5511-0410-912e-c29ae57300e0
Add an example searching for all maps containing blocking floor-aligned
sprites in underwater sectors.
git-svn-id: https://svn.eduke32.com/eduke32@4165 1a8010ca-5511-0410-912e-c29ae57300e0
By detecting them in the SDL_KEYDOWN events. This list is getting a bit
ridiculous...
git-svn-id: https://svn.eduke32.com/eduke32@4163 1a8010ca-5511-0410-912e-c29ae57300e0
Compiling a 32-bit NOASM build resulted in code containing a MOVAPS instruction
that accessed a memory location not aligned to 16 bytes (MinGW, GCC 4.8).
git-svn-id: https://svn.eduke32.com/eduke32@4162 1a8010ca-5511-0410-912e-c29ae57300e0
The functions mvlineasm1, mvlineasm4 and tvlineasm2 can now be set to clamp
the vertical texture coordinate (vplc), preventing the unsightly stray lines
on the bottom of non-y-flipped sprites. (The first part of this effort, r3483,
handled their top).
However, this is only enabled for the mvlineasm ones: the vectorized variants
suffered almost no slowdown (even though a PADDUSD SSE instruction would be a
nice thing to have), while it was pretty significant for the sequential
translucent ones.
Summarizing, this leaves two cases where stray lines may appear in the non-ASM
build (the saturation is NYI for a.nasm):
- at the bottom of y-flipped sprites
- at the bottom of translucent sprites (can be toggled by #define)
Another observation is that recent GCC generates much faster code for this
stuff than Clang from SVN.
git-svn-id: https://svn.eduke32.com/eduke32@4161 1a8010ca-5511-0410-912e-c29ae57300e0
For a full 1680x1050 screen drawing a solid/masked wall, the FPS increases
from 118 to 133 and from 114 to 116 (respectively) for me.
Guarded by the macro USE_VECTOR_EXT in the source.
git-svn-id: https://svn.eduke32.com/eduke32@4160 1a8010ca-5511-0410-912e-c29ae57300e0