Also, note a place that is the real cause for "what makes the player slide off
enemies", as far as I can see.
git-svn-id: https://svn.eduke32.com/eduke32@5016 1a8010ca-5511-0410-912e-c29ae57300e0
- Add declarations of C functions to defs.ilua, names to dynsymlist,
fix typo in con_lang.lua, ffi.string() calls in control.lua
- Assert that G_LastMapInfoIndex() is always called with ud.last_level >= 1.
(A stricter requirement than necessary to prevent follow-up oob accesses, but
logically the most meaningful.)
- In G_PrintParTime() and G_PrintDesignerTime(), return "<invalid>" if the above
does not hold. This can happen from EVENT_NEWGAME, for example. Add a test to
lunatic/test/qgetsysstr.con. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4972 1a8010ca-5511-0410-912e-c29ae57300e0
Previously, the C function clipmove() returned negative values when hit a
wall (32768+wallnum) or sprite (49152+spritenum) because internally,
these values were encoded into a *signed* 16-bit integer. This made no
difference to C code using it, since it always proceeded by bit checks,
but was inconsistent with documentation on CON 'clipmove' on the wiki.
The following commands are affected too, since they use the value returned
by clipmove(): 'clipmovenoslide', 'movesprite'. Also, the value of
actor[].movflag ('htmovflag' from CON).
Also, fix 'clipmove*' in LunaCON and add lunatic/test/checknearwall.con
as an example of how to implement a being-close-to-a-wall checker as
requested in
http://forums.duke4.net/topic/7869-determining-closeness-to-a-wall/
git-svn-id: https://svn.eduke32.com/eduke32@4874 1a8010ca-5511-0410-912e-c29ae57300e0
In C-CON's qsubstr, error if <start> is not in [0 .. MAXQUOTELEN-1]
or <length> is negative.
git-svn-id: https://svn.eduke32.com/eduke32@4583 1a8010ca-5511-0410-912e-c29ae57300e0
Concretely, for all 1 <= i <= 255, make graypalookup[31][i] := graypalookup[31][0].
Also document 'fogpal' in the Lunatic doc.
git-svn-id: https://svn.eduke32.com/eduke32@4456 1a8010ca-5511-0410-912e-c29ae57300e0
For convenience, orientation gets bit 1 (translucency) set automatically.
Again, test/screentext.con is updated to show off this functionality (the
code there assumes that additive blending tables are loaded at blend
numbers 101 -- 132).
BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4428 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4426 1a8010ca-5511-0410-912e-c29ae57300e0
Hook up those from test/shadexfog.lua and some debugging ones from engine.lua.
git-svn-id: https://svn.eduke32.com/eduke32@4419 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4414 1a8010ca-5511-0410-912e-c29ae57300e0
It now accepts a number of tables to create as 3rd arg. The function that
create_trans() takes as the 2nd argument is now being passed
(r,g,b, R,G,B, tablei, numtables).
Rewrite create_additive_trans() in terms of it.
Rename create_128_trans() -> create_alpha_trans().
git-svn-id: https://svn.eduke32.com/eduke32@4347 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4337 1a8010ca-5511-0410-912e-c29ae57300e0
- 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.
git-svn-id: https://svn.eduke32.com/eduke32@4336 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4333 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4313 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4312 1a8010ca-5511-0410-912e-c29ae57300e0
The function now writes out a full PALETTE.DAT: base balette, shade table and
translucency table.
git-svn-id: https://svn.eduke32.com/eduke32@4311 1a8010ca-5511-0410-912e-c29ae57300e0
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
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
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
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
Each scene is disabled in its entirety, there's no way to disable only a
particular part. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4109 1a8010ca-5511-0410-912e-c29ae57300e0