Subversion Repositories eduke32


Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
5046 2228d 5h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add EVENT_DISPLAYCAMERAOSD. Set RETURN to -1 to disable it.

From this event, if "getactor[THISACTOR].htg_t 0" is zero, then the camera is functional. Nonzero values indicate the camera has been destroyed, which is only possible when the CAMERASDESTRUCTABLE parameter of gamestartup has been enabled.
5045 2228d 5h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add EVENT_DISPLAYLEVELSTATS. Set RETURN to -1 to disable them.  
5039 2232d 10h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add "resetplayerflags". Flag 1 means "don't ask the user if they want to load".  
5036 2234d 22h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: add 'definevolumeflags' to keyword pattern, re-apply some changes of r5026.

5031 2241d 14h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Rename "cutscene" command to "startcutscene".  
5029 2241d 17h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Lunatic: update user_defs, CPLUSPLUS=0 in, disable 'cutscene' for now.

5008 2246d 20h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: add 'cutscene' and 'ifcutscene' as NYI commands. DONT_BUILD.  
5003 2253d 6h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua Replace erroneous use of EVENT_DISPLAYCROSSHAIR with new event EVENT_DISPLAYCURSOR.  
4977 2255d 7h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add undefinevolume, undefineskill, and undefinelevel.  
4972 2255d 18h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua CON: Amend retrieval of STR_*TIME for qgetsysstr, fixing LunaCON and possible oob.

- 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.
4970 2256d 5h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add read-only access to ud.config.MusicToggle through the "musictoggle" member.  
4969 2256d 5h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add STR_YOURTIME, STR_PARTIME, STR_DESIGNERTIME, and STR_BESTTIME to qgetsysstr.  
4968 2256d 5h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua Factor out generation of strings for time values in the bonus screen. This involves the creation of ud.playerbest.  
4956 2258d 20h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Add SFLAG_NOWATERDIP, unconditionally preventing actors from dipping into ST1 water.

By default, the following enemies have this flag set: OCTABRAIN, COMMANDER, DRONE.
4945 2270d 0h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua Add events EVENT_DISPLAYINACTIVEMENU and EVENT_DISPLAYINACTIVEMENUREST and userdef members m_origin_x and m_origin_y.

This allows for CON screen display code to use menu animations. The following is an example of how to adapt screen features that should animate.


ifvare current_menu 0 // main menu
setvar x 1
setvar y 1
rotatesprite x y zoom ang tilenum shade pal orientation 0 0 xdim ydim


state DisplayMenuCommon
ifvare RETURN 0 // main menu
getuserdef[THISACTOR].m_origin_x x
getuserdef[THISACTOR].m_origin_y y
addvar x 65536
addvar y 65536
rotatesprite16 x y zoom ang tilenum shade pal orientation 0 0 xdim ydim

onevent EVENT_DISPLAYMENUREST state DisplayMenuCommon endevent
onevent EVENT_DISPLAYINACTIVEMENUREST state DisplayMenuCommon endevent
4928 2278d 12h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua CON: Add new commands "getmusicposition" and "setmusicposition" that operate on the playback position of the current music track.

// Example: Switch between tracks like radio stations.
getmusicposition temp
starttrackvar next_music_track
setmusicposition temp

Only implemented for Ogg Vorbis, FLAC, and XA. Consult the devs before using these commands.
4814 2312d 14h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: expose more members, properly handle setting ud.screen_size.

4800 2319d 16h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua voxmodel.c: fix Polymost rendering of voxels.

This reverts/corrects two semantic changes of r4639 as far as what is now
voxmodel.c (formerly part of mdsprite.c) is concerned. One correction ends
up having no effect (m->bscale is always 1.f for voxel models, as far as I
can see), but is the proper rewrite.

Also, in osdcmds.c:registerosdcommands(), tweak two help strings.
4732 2348d 15h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: player[].loogcnt, userdef[].color, minor fixes.  
4570 2439d 17h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: properly initialize values of session (NODEFAULT) gamevars.  
4567 2445d 19h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua 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
4515 2492d 13h hendricks266 /polymer/eduke32/source/lunatic/con_lang.lua By request, implement EVENT_ACTIVATECHEAT.  
4475 2522d 3h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: add read-only variable 'Numsprites', r/w userdef member .mouseaiming.  
4448 2550d 14h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua CON: add getactor[]/sprite[] member 'movflags'.

This is exactly the same as the actor[].movflags member in the Lunatic build:
4416 2565d 1h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua 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)
4396 2575d 16h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: provide access to wall[].blend.  
4372 2585d 22h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: warn if using reserved bits in 'spriteflags'.

Reserved bits are those that have no predefined SFLAG_* label in CON.
4371 2585d 22h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua 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
4356 2600d 16h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: add and document option -ferror-negative-tag-write.  
4302 2620d 22h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Lunatic: rename sprite[].filler member to 'blend' on the Lua side.

From LunaCON, remove 'detail' as alias to that member.
4285 2628d 15h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: error on userdefs accesses with non-local current player.

Add lunatic/test/getuserdef.con.
4260 2644d 16h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Lunatic: make gv.current{Level,Episode} one-based and document them.

Also, in LunaCON, make player .palette member read-only. BUILD_LUNATIC.
4231 2660d 1h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Lunatic: run EVENT_INIT after initial Lua state creation.  
4230 2662d 20h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Lunatic: allow access to sprite[].yvel through set_yvel() member, document.

4206 2670d 18h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua Scripting: Add EVENT_DAMAGEHPLANE and document it in Lunatic doc Appendix B.

Also add test/damagehplane.lua with these demonstrations:
- custom breakable ceilings
- breakable TROR glass
4195 2679d 15h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: statically check some member assignments with literal numbers.

And issue warnings whenever the assignment would fail (error) at game time.
4179 2692d 15h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: disable some player members, tweak decls of others.

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
4177 2692d 15h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: fix assignment to projectile sound/bsound/isound.  
4150 2708d 16h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua LunaCON: add a couple of userdefs members, fix tsprite's sectnum for writing.  
4146 2709d 20h helixhorned /polymer/eduke32/source/lunatic/con_lang.lua CON: add sprite pseudo-member 'isvalid', getting 1 if the sprite is valid.

And 0 otherwise. Before accessing a sprite that is not not known to be
definitely valid (e.g. a loop over all sprites from 0 to MAXSPRITES-1),
one should check for validity before accessing it in any other fashion.