Build 4430
SVN-
General
Hack around HOM when passing through a masked wall, but only on Android because the solution isn't very good.
SVN handles and Git names are merged into one person.
Hack around HOM when passing through a masked wall, but only on Android because the solution isn't very good.
In ext. PALETTE.DAT, store log2 of last alpha table index. Handle alpha in classic.
The extended PALETTE.DAT format can now carry a trailing byte, called 'lognumalphatables'. If it is present, the engine assumes that alpha blending tables are loaded at blend indices 1 to 1<<lognumalphatables and handles rotatesprite's alpha and spriteext[].alpha accordingly. The ability to save this new byte is added to engine.lua:savePaletteDat() and the corresponding convenience functions in shadexfog.lua. Examples test/screentext.con and test/sprite_access.con are updated for demonstration purposes.
Mapster32/Lunatic: add descriptions to [;]+[F] menu entries shown in upper left.
BUILD_LUNATIC.
engine.c: for printext16(), make newlines do what you expect them to.
a.m32: for showpal==1, also show editor colors with printext16.
Mapster32/Lunatic: hook up shadexfog.save() and saveLookupDat() to [;]+[F] menu.
Mapster32/Lunatic: add functionality to connect Lua funcs to s.bar menu [;]+[F].
Hook up those from test/shadexfog.lua and some debugging ones from engine.lua.
factor out [']+[F] common code into "class" StatusBarMenu.
Rename sector[].filler member to '.fogpal'. From CON, keep the '.alignto' alias.
The overall situation is thus as follows: - in C and from Lua, that member is called 'fogpal' - In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias; 'filler' wasn't available before, either. - In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)
In non-lookup OpenGL modes, make sector[].filler (rename pending) override fogpal.
That is, if that member has a nonzero value, that one is taken for the color of the GL fog instead of (most of the time) sector[].floorpal. "Sky sectors", that is, skyboxes or simply parallaxed floors/ceilings are *not* handled.
a.m32: add state 'for_sprites_near_picnum'.
The state quries the user for four values: ref. picnum, target picnum, max. ldist and a lotag. Then, for all sprites i (of ref. picnum), for all sprites j (of target picnum), if ldist(i,j)<=maxldist, sprite j's lotag is changed to the provided one. Also add lunatic/test/maputil.lua, containing a similar function but allowing to customize the selection predicates of the ref. and target sprites, as well as the action to carry out.
engine.c: clean up code around wallmost(), owallmost() and grouscan().
Add a second DNCOORDS/cl_showcoords mode, showing some renderer settings.
Also, extend the documentation for r_usenewshading a little. Specifically, note when the different modes were introduced. BUILD_LUNATIC.
disable normal/parallax mapping in rotatesprite.
It was plainly noticeable in the editor's tile info display, for example.
Amend r4394: don't use full brightness (glColor() factor 1) with hightiles.
This is done by factoring out some polymer.c:polymer_getbuildmaterial() code into polymer_eligible_for_artmapping() and using that. The one in polymer.c can still determine to not use ART mapping on some ("rare"?) occasions, so it's not 100% in sync.
Minor Polymost code cleanup.
- factor out eligible_for_tileshades() - remove some rendmode 1 code - move some auto vars further down
add some shade/vis debugging functions.
engine.lua: linearizeBasePal(), mapster32 only test/shadexfog.lua: create_depth_shtab(), create_vismarker_shtab()
provide access to wall[].blend.
Polymer/rotatesprite: don't redundantly apply shade glColor() with ART mapping.
introduce r_usenewshading 3 and make it the default.
With this mode, the near distance of the linear fog is always 0, unlike being negative with r_usenewshading 2.
Factor out approaching val. to target val by half-difference steps into logapproach().
Fix a case in G_MovePlayers(), where the player sprite's shade is approached toward the ceiling/floor's shade. Before, it could stop at one above or below!
engine.c: check (non-)clipping over a floor curb of an upper TROR neighbor.
engine.c: factor out two functions from clipmove().
warn if a 'spriteflags' is issued after its actor definition...
... or another 'spriteflags' or 'sprite*' directive.
Add new actor flag and predefined CON label SFLAG_NODAMAGEPUSH.
This flag is set from C for some enemies that should not be pushed back when damaged, such as TANK. Both the tile flag and the per-sprite flag are used (i.e. the ultimate flag value is the XOR of the two). Add currently non-functional example to test.lua that attempts to set this bit for NEWBEAST.
extend map-VX walltype by 'blend' member. BUILD_LUNATIC.
Make Mapster32 save as map-text if there is a wall with non-zero 'blend'.
POLYMER=0 build fix. DONT_BUILD.
for wall alignment with [.]/[,], reverse meaning of Alt modifier.
when failing to paste selected sectors into loaded map, unhighlight.
DONT_BUILD.
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.
engine.c: in loadlookups(), allow pal 0.
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.
Give sprite cstat bit 2048 (NOSHADE, Mapster32 key [N]) a macro name.
include .blend in sprite display/edit/search (Shift+TAB/F8/Alt+F8).
don't save comments to mapster32.cfg's command-line history.
engine.c: in loadlookups(), error out if attempting to load at a reserved pal.
Introduce m32_settings.cfg, analogous to settings.cfg, so that you can save your cvars and aliases for the editor.
One potential use is to add r_togglecomposition "0" if you don't like Aero turning on and off every time you switch between 2D mode and 32-bit 3D mode.
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.
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).