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.)
git-svn-id: https://svn.eduke32.com/eduke32@4335 1a8010ca-5511-0410-912e-c29ae57300e0
Toggled with Ctrl+Shift+[KP-]. Variable 'headlight_range' controls its range.
For the implementation, a new event EVENT_PREDRAW3DSCREEN was added.
git-svn-id: https://svn.eduke32.com/eduke32@3648 1a8010ca-5511-0410-912e-c29ae57300e0
In CON, the bit is still always cleared for user-defined gamevars.
git-svn-id: https://svn.eduke32.com/eduke32@3417 1a8010ca-5511-0410-912e-c29ae57300e0
Also, fix deficient logic in Gv_Free and Gv_Clear (both M32 and CON) so that gamevar and gamearray erasure results are (closer to) correct, and so that the game does not crash when system arrays are accessed from CON because they all have been nulled.
git-svn-id: https://svn.eduke32.com/eduke32@3274 1a8010ca-5511-0410-912e-c29ae57300e0
The event is run after drawing the scene, but before the overlays. To
make a screenshot from a script, set DOSCRSHOT to non-zero. It will then
be scheduled to run once after the drawing but before the above-mentioned
event. The screenshots will be called mcapXXXX.{png,tga}.
git-svn-id: https://svn.eduke32.com/eduke32@2818 1a8010ca-5511-0410-912e-c29ae57300e0
The main change consist of adding a key press (and release) callback
whose only purpose is to be used from m32script as EVENT_KEYPRESS.
When entering that event, the RETURN variable will be set to the
keystatus code of the key, and whether it was pressed or released can
be checked by looking at keystatus[] at that code (ifholdkey and
ifhitkey do this). The purpose of this, then, is to be able to remap
keys in a more general (and complicated) fashion than is possible with
the mapster32.cfg 'remap' option. Various other additions build around
this central one:
- add an example EVENT_KEYPRESS to a.m32, among other things emulating
the keypad arrows with Alt-<normal arrows> for notebook convenience;
disabled initially
- a.m32: set 'owner' with Alt-KP2: now Alt-Shift-KP2, because of
collision with the above
- new m32script command: setkey <keycode>, setting keystatus[<keycode>]
to 1 (note: may be restricted to use in EVENT_KEYPRESS only in the
future)
- fix indexing an m32script array with a defined label, there used to
be a 'not a gamevar' error instead
- add the following constant labels for some key codes:
KEY_SCROLL, KEY_F1 .. KEY_F12
git-svn-id: https://svn.eduke32.com/eduke32@2122 1a8010ca-5511-0410-912e-c29ae57300e0
* more useful auto-red wall feature: if no structure-changing operations have been applied after highlighting and duplicating, now also paste 'visual' fields of outer walls (this is one example of the use of a system that temporarily keeps track of nextwalls for former red lines)
* multi-pkies now have individual parallaxyscale
git-svn-id: https://svn.eduke32.com/eduke32@1886 1a8010ca-5511-0410-912e-c29ae57300e0
* Polymer light access to m32script (light[<lightidx>].<field>). As an application, provide a state 'insertlights' that takes the currently active lights and puts them into the map as SEs (e.g. for maphack recovery).
* Prototype of a mechanism to gray out certain portion of a map, making them inactive to various, but not all, editing operations. Highlighting a set of sectors and pressing Ctrl-R will make the Z bounds be [(least ceiling z), (greatest floor z)] of all selected ones, pressing Ctrl-R when no sectors are highlighted will reset them. Not sure if it's for production use at this stage...
* The 'align walls' feature [.] now has three independently toggleable behaviours: recurse nextwalls (toggled when Ctrl is pressed), iterate point2s (disabled when Shift is pressed), and also copy pixel width (toggled when Alt is pressed).
* Make shades clamp instead of overflowing in the editor
Fixes:
* crash when carrying out certain operations on walls with xrepeat 0
* the Pause key on linux. Also make demo recording start on Shift-ScrollLock because ScrollLock alone is too easily pressed when pausing
git-svn-id: https://svn.eduke32.com/eduke32@1877 1a8010ca-5511-0410-912e-c29ae57300e0
* Tag labeling system for 'link'-type tags, including saving and restoring the tag labels to a separate file '<mapname>.maptags'. Whether a tag is eligible for linking, is determined by a hardcoded (but extensible via m32script) function.
git-svn-id: https://svn.eduke32.com/eduke32@1867 1a8010ca-5511-0410-912e-c29ae57300e0
Engine stuff:
* Add 'r_shadescale_unbounded' cvar. When set to 0, OpenGL renderers should never
draw completely black objects (currently only implemented for Polymost)
Mapster32:
* Add 'r_shadescale' to config
* In 3D mode, make SPACE behave the same as holding down a mose button: the
currently pointed-at object is locked. Required some modification of a.m32
to play well (i.e. not reset SPACE). This is useful by itself but more so
in conjunction with the next point
* make Alt behave as a modifier with PGUP/PGDN: when aiming at a 2-sided wall,
move the other side's sector's ceiling or floor (only this is new).
* Auto-alignment of walls can be controlled in a finer grained fashion now:
When pressing '.', only the immediate neighbors get aligned. Use Ctrl-. for
the old behaviour.
* When inserting a point in 2D mode, auto-align the neighboring wall
git-svn-id: https://svn.eduke32.com/eduke32@1848 1a8010ca-5511-0410-912e-c29ae57300e0
The bulk of this commit is "code rape"--or rather, caressing, rewritten for readability.
Actual changes/fixes:
- fixed "walking" in 2d mode
- fixed DELETE key in OSD in SDL build
- main loop in general (timeout for event wait after 200 ms so that highlights blink)
- access to some pr_override* variables in m32script (suggested by Roma Loom)
- API cleanup (added statics and consts here and there)
git-svn-id: https://svn.eduke32.com/eduke32@1644 1a8010ca-5511-0410-912e-c29ae57300e0