Build 4368
SVN-
extend map-VX walltype by 'blend' member. BUILD_LUNATIC.
Show details
Make Mapster32 save as map-text if there is a wall with non-zero 'blend'.
SVN handles and Git names are merged into one person.
extend map-VX walltype by 'blend' member. BUILD_LUNATIC.
Make Mapster32 save as map-text if there is a wall with non-zero 'blend'.
implement screen tilting by 180 degrees without quality loss.
BUILD_LUNATIC.
Adapt x86 GCC assembly copybufreverse() to x86_64 and enable unconditionally.
For a 1680x1050 scene standing directly in front of a mirror, this increases FPS from ~90 to ~95 for me.
fix 'getincangle'.
for wall alignment with [.]/[,], reverse meaning of Alt modifier.
Propagate 'blend' to rotatesprite_(), but don't hook it up to scripting yet.
a.m32: add states 'uniformceiling' and 'uniformfloor'.
Given highlighted sectors, these take the arithmetic mean of their ceiling's or floor's (respectively) z, removing the slope bit from all, and setting the new z to the mean one, rounded down to 1024 Build z units (one PGUP/PGDN). BUILD_LUNATIC.
add and document option -ferror-negative-tag-write.
engine.c: in loadlookups(), allow pal 0.
BUILD_LUNATIC.
Fix crosshair color.
A few stylistic tweaks, like substituting missed SE_* enum constants.
BUILD_LUNATIC.
Amend r3822 ("Make deletion of an amb. sound MUSICANDSFX stop its sound again.")
We shouldn't be using its actor[].t_data[8] because that one is used by the sprite rotation-fixing system (which fixes STAT_FX sprites to the positions relative to the pivot, too). Test case source/lunatic/test/delmusicsfx.lua still passes with this modification.
Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
Give sprite cstat bit 2048 (NOSHADE, Mapster32 key [N]) a macro name.
include .blend in sprite display/edit/search (Shift+TAB/F8/Alt+F8).
engine.c: always setup blending table whenever drawing translucent objects.
BUILD_LUNATIC.
engine.setupDebugBasePal(), auto-detect 2nd+ shadexfog.translate().
engine.setupDebugBasePal() set up the water base palette such each of the first 15 "ramps" of 16 consecutive colors has a single, "representative" color. For example, color indices 0-15 and black, 16-31 are dark gray. In shadexfog.lua, list remappings from LOOKUP.DAT that are expressible as remappings of 16-tuples.
add engine.saveLookupDat() and document, related tweaks.
- Mapster32: before loading LOOKUP.DAT, set palookup[0][239]=239 to make an identity map of the base shade table's shade 0 - Rewrite color index remapping case of makepalookup() for clarity BUILD_LUNATIC.
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.)
Factor out common parts of loading LOOKUP.DAT into engine.c:loadlookups().
Also, error if didn't read enough data and account for TITLE and REALMS swap between basepal number and on-disk order (sigh).
rewrite shadexfog.create_128_trans to allow creating fewer tables.
It must be a power of two in [2 .. 128]. Rewrite test/sprite_access.con's liztroop example to account for that. Also, add function shadexfog.create_trans() which aceepts a function (r,g,b,R,G,B) -> blended (r,g,b) and rewrite shadexfog.create_additive_trans() in terms of it.
in shade table 'remap16' method, allow sparse table, document it.
Add shadexfog.createremap() convenience function.
in engine.savePaletteDat(), open file in binary mode. BUILD_LUNATIC.
disallow saving map-text files in Mapster32 for now.
Amend r4318: Lunatic doesn't need the safety check.
add *actor[].blend as an alias to .detail, *tspr[].tsprblend analogously.
See lunatic/test/sprite_access.con for a LIZTROOP that periodically smoothly alpha-fades in and out. (Assuming that the 128 alpha blending tables from shadexfog.create_128_trans(1) are installed.) BUILD_LUNATIC.
Extend PALETTE.DAT format to allow carrying additional blending tables.
Lunatic: also, add an additional argument 'moreblends' to engine.savePaletteDat() and document that function. See test/shadexfog.lua for a "user-friendly" wrapper shadexfog.save() which prints success or errors.
move code in test/shadexfog.lua to engine.savePaletteDat() and complete it.
The function now writes out a full PALETTE.DAT: base balette, shade table and translucency table.
update dynsymlists. Move blendtable[] from build.h to engine.c.
BUILD_LUNATIC.
add a 'lastokcol' argument to engine.nearcolor() and document it.
On the C side, slightly rewrite (now) getclosestcol_lim() for clarity.
document engine.*blendtab() and engine.getrgb() functions.
remove sprite members 'detail' and 'filler', add 'blend', make r/w.
In the C code, rename sprite[].filler to 'blend'.
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*.
gloadtex() cleanup, make some vars in kplib.c static, add source/valgrind_errors.log.
BUILD_LUNATIC.
sounds.c: exit S_PlayMusic() early if length of file is <4 bytes, clean up mem mgmt.
engine.c: amend r4292, which introduced an even worse oob for NPOT xsize texs.
engine.c: in calc_bufplc(), cope with negative lwall[] values.
This should fix the crash encountered here: http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__184069 a-c.c also gets a new switch macro, DEBUG_WITH_VALGRIND.
implement 'precache'.
add option -ferror-nonlocal-userdef, on by default.
BUILD_LUNATIC.
sounds.c: do S_MusicVolume() in S_SoundStartup().
This fixes this initialization issue: http://forums.duke4.net/topic/7144-midi-volume-weirdness/
Some functionality-conserving cleanup of jaudiolib code.
accept empty square brackets for {g,s}etuserdef optional index part.
Fix compilation of C++ build, but not starting up yet.
BUILD_LUNATIC.
error on userdefs accesses with non-local current player.
Add lunatic/test/getuserdef.con.
Get rid of neartag* global variables. LunaCON: fix 'operate'.
sector.c: factor out goto soup in P_CheckSectors() into function.
sector.c: cleanup round 3, P_ActivateSwitch() refactoring.
Follow-up to RTS cleanup: factor out 2x almost-same code into G_StartRTS().
Reincarnate RTS sound functionality together with cleaning up related code.
- 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
Fix USE_OPENGL=0 build... again. DONT_BUILD.
Fix respawn operation with monsters off, rewriting G_OperateRespawns().
BUILD_LUNATIC.
when clearing bunch number of c/f with yax_setbunch(), don't reset xpanning.
In the non-Lunatic build naturally, since the Lunatic one uses its own member.
add codegen option -fbad-getactorvar-use-pli for C-CON compatibility.
Also, improve -Wnumber-conversion warning by printing the resulting number. BUILD_LUNATIC.
make wall texture alignment [.]/[,] work with bottom-swapped walls.
In simple cases, it should be added. Combinations of alignment across TROR boundaries and bottom-swapping will probably not work right.
Improve determination of when a sprite should be drawn before a masked wall.
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.
don't attempt audio format auto-detection for less than 12 bytes.
document engine.*shadetab() functions. DONT_BUILD.