Commit Graph

532 Commits

Author SHA1 Message Date
helixhorned 8605285f7f compat.h: pedantic whitespace formatting. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4708 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-30 04:59:23 +00:00
helixhorned 40c2fc7d07 Lunatic: add actor.move() static function and documentation stub.
git-svn-id: https://svn.eduke32.com/eduke32@4590 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:16 +00:00
helixhorned 2713bc3d75 Get rid of EnvMusicFilename[] and use MapInfo[].musicfn for that.
The additional space was there all the time, so it's not understandable why
another array was necessary.
CON: for 'music', error if volume number is outside [0 .. MAXVOLUMES+1], and
in LunaCON, additionally warn if it's MAXVOLUMES+1 (0 is preferred for that).

git-svn-id: https://svn.eduke32.com/eduke32@4588 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:14 +00:00
helixhorned 3493302e6c LunaCON: implement 'qsubstr' command. Add source/lunatic/test/qsubstr.con.
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
2014-08-31 11:15:22 +00:00
helixhorned fea848c486 LunaCON: ignore internal flag in gamevar redef check; allow "Pals" member.
git-svn-id: https://svn.eduke32.com/eduke32@4581 1a8010ca-5511-0410-912e-c29ae57300e0
2014-08-31 11:15:20 +00:00
helixhorned 757dbe9d6b LunaCON: properly initialize values of session (NODEFAULT) gamevars.
git-svn-id: https://svn.eduke32.com/eduke32@4570 1a8010ca-5511-0410-912e-c29ae57300e0
2014-08-08 20:02:55 +00:00
helixhorned 1486a2937b A couple of Lunatic updates. DONT_BUILD.
- LunaCON: support for setting userdef[].m_volume_number, getting .last_level
- bump con_lang.MAXEVENTS
- fix compilation of astub.c

git-svn-id: https://svn.eduke32.com/eduke32@4567 1a8010ca-5511-0410-912e-c29ae57300e0
2014-08-02 17:24:39 +00:00
hendricks266 af28013f39 Lunatic fixes:
1 compiler error.
2 compiler warnings.
1 runtime warning.

Note that at this time, CPLUSPLUS=1 LUNATIC=1 fails to build due to C++ function mangling, and Win64 Lunatic crashes.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4540 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-10 09:01:48 +00:00
hendricks266 0352b4ad11 Windows: Update libraries.
- libpng to 1.6.12
- LuaJIT to Git HEAD >= 2.0.3
- instructions.txt

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4539 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-10 09:01:15 +00:00
hendricks266 fd78e9f954 By request, implement EVENT_ACTIVATECHEAT.
git-svn-id: https://svn.eduke32.com/eduke32@4515 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:16:55 +00:00
helixhorned 4780912b40 lunatic/util/build.lua: in readdefs(), add option of requesting picnum->name mapping.
That is, the reverse of what is returned with the first outarg. Use that in
lunatic/util/foreachmap.lua. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4499 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-01 20:50:14 +00:00
helixhorned 0900f4066c Bye, bye, B*alloc(), all hail X*alloc()! Replace large portion of the calls...
... and cull code that is dead with the X*alloc() versions since they never
return NULL on requesting memory.

Use something like
 git grep '[^Xx]\(m\|c\|re\)alloc *('
and
 git grep '[^Xx]strdup *('
to see places where I left the B*alloc() calls intact.

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4491 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 00:02:19 +00:00
helixhorned 1fab90da10 lunatic/util/mapypan.lua: omit MIRROR, don't print maps w/o problematic tiles.
git-svn-id: https://svn.eduke32.com/eduke32@4483 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:12 +00:00
helixhorned 123906a9d7 shadexfog.lua: in menu, move creation of debugging shade tables below DEBUG line.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4480 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 11:17:52 +00:00
helixhorned b9b0b3f79b lunatic/test/shadexfog.lua: add function create_brightpass_trans().
Also hook it up in the [;]+[F] menu.

git-svn-id: https://svn.eduke32.com/eduke32@4479 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 11:17:51 +00:00
helixhorned e810071cfc LunaCON: add read-only variable 'Numsprites', r/w userdef member .mouseaiming.
git-svn-id: https://svn.eduke32.com/eduke32@4475 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-18 09:55:42 +00:00
helixhorned 4b3bfc6424 LunaCON: allow '.' as non-first identifer character.
git-svn-id: https://svn.eduke32.com/eduke32@4473 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-18 09:55:39 +00:00
hendricks266 a755e95c2c Replace some constants with preprocessor macros.
git-svn-id: https://svn.eduke32.com/eduke32@4472 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:36:40 +00:00
helixhorned fc77a8aa3d engine.c: after creating gray fog palookup, make its greatest shade map to same color.
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
2014-04-29 19:34:25 +00:00
helixhorned fb05cf5b7e CON: add getactor[]/sprite[] member 'movflags'.
This is exactly the same as the actor[].movflags member in the Lunatic build:
http://lunatic.eduke32.com/lunatic.html#actor

git-svn-id: https://svn.eduke32.com/eduke32@4448 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:18 +00:00
helixhorned e9f7b5d09a shadexfog.lua: in "Save lookups DAT file" entry, allow to save additional lookups.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4438 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-13 14:26:18 +00:00
helixhorned 9de8ec9ed8 Lunatic: (better) document sector[].visibility, sprite[].clipdist, player[].weapon.
git-svn-id: https://svn.eduke32.com/eduke32@4437 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-13 14:26:16 +00:00
helixhorned a7cc0741ae Fix minor help text formatting issues in shadexfog.lua.
Also, fix saving PALETTE.DAT tables without lognumalphatabs byte. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4429 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-10 18:44:31 +00:00
helixhorned 63fee16ca5 CON: in rotatespritea and screentext, if alpha < 0, make -alpha denote blend.
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
2014-04-09 18:51:35 +00:00
helixhorned 2aa608af27 LunaCON: fix 'screentext' command.
git-svn-id: https://svn.eduke32.com/eduke32@4427 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-09 18:51:33 +00:00
helixhorned e1845c8d05 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.

git-svn-id: https://svn.eduke32.com/eduke32@4426 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-09 18:51:31 +00:00
helixhorned 966fa90f7a Mapster32/Lunatic: add descriptions to [;]+[F] menu entries shown in upper left.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4423 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:20 +00:00
helixhorned 5fd9d1d7a9 Mapster32/Lunatic: hook up shadexfog.save() and saveLookupDat() to [;]+[F] menu.
git-svn-id: https://svn.eduke32.com/eduke32@4420 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:17 +00:00
helixhorned 494c00713b 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.

git-svn-id: https://svn.eduke32.com/eduke32@4419 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:14 +00:00
helixhorned 7603f432df 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)

git-svn-id: https://svn.eduke32.com/eduke32@4416 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:10 +00:00
helixhorned 6458c0ba34 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.

git-svn-id: https://svn.eduke32.com/eduke32@4414 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:08 +00:00
helixhorned 0ae00ba860 Lunatic: add some shade/vis debugging functions.
engine.lua: linearizeBasePal(), mapster32 only
test/shadexfog.lua: create_depth_shtab(), create_vismarker_shtab()

git-svn-id: https://svn.eduke32.com/eduke32@4404 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 13:53:05 +00:00
helixhorned d656171777 LunaCON: provide access to wall[].blend.
git-svn-id: https://svn.eduke32.com/eduke32@4396 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-25 21:04:37 +00:00
helixhorned 2d35d93f38 LunaCON: patch up off-by-one line numbering problem. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4381 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 15:06:20 +00:00
helixhorned c797298b6a C-CON: add safety checks for qgetsysstr/STR_{,MAP,PLAYER,VOLUME}NAME.
Add test/qgetsysstr.con. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4380 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:54 +00:00
helixhorned 5be1c322b2 LunaCON: qgetsysstr/STR_MAP*NAME: add informative err. msg. for void vol/lev.
git-svn-id: https://svn.eduke32.com/eduke32@4379 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:53 +00:00
helixhorned 10a0e82736 Fix the "fix for flying/jumping monsters getting stuck in water".
In C and Lunatic, split 'jumptoplayer' of enum amoveflags_t / action.MOVFLAGS
into 'jumptoplayer_bits' and 'jumptoplayer_only' (see updated Lunatic doc).

git-svn-id: https://svn.eduke32.com/eduke32@4378 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:52 +00:00
helixhorned 6e891eabd1 Lunatic: fix 'spawn' OSD command when running with -Lopts=strict.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4376 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:51 +00:00
helixhorned 246d589f46 Lunatic: fix DBG_.testmembread after r4290.
git-svn-id: https://svn.eduke32.com/eduke32@4375 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:50 +00:00
helixhorned 86d985620c Lunatic: for gameactor(), deprecate AF.replace_hard, make AF.replace default.
That is, always bitwise-OR the per-tile actor flags with the existing ones.

git-svn-id: https://svn.eduke32.com/eduke32@4374 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:50 +00:00
helixhorned c3ff173553 LunaCON: warn if a 'spriteflags' is issued after its actor definition...
... or another 'spriteflags' or 'sprite*' directive.

git-svn-id: https://svn.eduke32.com/eduke32@4373 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:49 +00:00
helixhorned 6908ce6be7 LunaCON: warn if using reserved bits in 'spriteflags'.
Reserved bits are those that have no predefined SFLAG_* label in CON.

git-svn-id: https://svn.eduke32.com/eduke32@4372 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:48 +00:00
helixhorned 5cb6e20c63 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.

git-svn-id: https://svn.eduke32.com/eduke32@4371 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:47 +00:00
helixhorned 55d6b9c5c7 Lunatic: implement passing string label to 'spawn' OSD command.
Unlike in C-CON, it only tries an exact match with the given and uppercased
label, not "full" case-insensitive search.

git-svn-id: https://svn.eduke32.com/eduke32@4370 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:45 +00:00
helixhorned 802650048d Lunatic: extend map-VX walltype by 'blend' member. BUILD_LUNATIC.
Make Mapster32 save as map-text if there is a wall with non-zero 'blend'.

git-svn-id: https://svn.eduke32.com/eduke32@4368 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-10 20:08:27 +00:00
helixhorned acc4d12f4b LunaCON: fix 'getincangle'.
git-svn-id: https://svn.eduke32.com/eduke32@4362 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:57 +00:00
helixhorned 689a8aef1d Propagate 'blend' to rotatesprite_(), but don't hook it up to scripting yet.
git-svn-id: https://svn.eduke32.com/eduke32@4360 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:54 +00:00
helixhorned ea8c081084 LunaCON: add and document option -ferror-negative-tag-write.
git-svn-id: https://svn.eduke32.com/eduke32@4356 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-28 20:33:46 +00:00
helixhorned b02aa43036 Lunatic: generalize shadexfog.create_trans() further.
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
2014-02-22 19:38:48 +00:00
helixhorned caed55e9a4 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.

git-svn-id: https://svn.eduke32.com/eduke32@4337 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-19 19:47:25 +00:00