Commit Graph

29 Commits

Author SHA1 Message Date
helixhorned 1ee43d5a6e LunaCON: Add -Wall option and sector[].*bunch, warn on some NYI gamevar flags.
git-svn-id: https://svn.eduke32.com/eduke32@3804 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-24 13:54:25 +00:00
helixhorned f1f84beeda a.m32: Implement a Polymer "head light" emanating from your position in 3D mode.
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
2013-04-05 17:53:31 +00:00
helixhorned 9103d4987c CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.
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
2013-01-20 21:17:15 +00:00
hendricks266 6f2fa332dd Port system gamearray access from M32Script to CON. Expose tilesizx and tilesizy.
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
2012-12-13 02:33:53 +00:00
helixhorned 8f61b72ca2 Mapster32: add "extend all highlighted sectors" func to 'F menu via a.m32.
git-svn-id: https://svn.eduke32.com/eduke32@2866 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-06 20:00:35 +00:00
helixhorned e02843b133 m32script: EVENT_DRAW3DSCREEN, screenshot functonality.
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
2012-07-08 21:47:23 +00:00
helixhorned af2f862c85 Remove YES and NO #defines from duke3d.h since they're giving warnings on OS X.
git-svn-id: https://svn.eduke32.com/eduke32@2450 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:37:25 +00:00
helixhorned 39314586ac Somewhat largish commit with various keyboard tinkering for Mapster.
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
2011-11-25 09:51:06 +00:00
helixhorned 873375025f * Include file cleanup by dragging most declarations into editor.h
* 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
2011-05-15 22:37:24 +00:00
helixhorned 203cf0b7b1 A crapload of random stuff.
* 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
2011-05-07 18:23:34 +00:00
helixhorned 64e22b9c6f * Support for entering names instead of numbers in various contexts (TAB-autocompletion included): first, when querying for a tile number, and second:
* 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
2011-04-17 17:01:20 +00:00
helixhorned 4dba12a5d3 Tweakery in various places.
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
2011-03-17 23:37:38 +00:00
helixhorned 16557ff1bb fixes: various ones accumulated in the forum (falling into infinity, stuck in doors), crash in polymer mouse picker when in void space, creation of surplus loops on sector split when sector has weird geometry.
addition: disable sprite sectnum checking with m32script expert mode enabled.

git-svn-id: https://svn.eduke32.com/eduke32@1843 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-13 11:59:32 +00:00
helixhorned 92223c2c85 Atrributify various function declarations. Right now the attributes used are noreturn, nonnull and format, the latter allowing us to catch silly printf errors. Again, these range from relatively benign to disastrous.
git-svn-id: https://svn.eduke32.com/eduke32@1740 1a8010ca-5511-0410-912e-c29ae57300e0
2010-12-19 22:47:10 +00:00
helixhorned 6185aedded Fixes compilation for now. Now if my executable would start...
git-svn-id: https://svn.eduke32.com/eduke32@1692 1a8010ca-5511-0410-912e-c29ae57300e0
2010-08-12 13:38:37 +00:00
helixhorned 71e59a5502 A bunch of m32script additions, fixes and general stuff, among them: local vars/arrays, inline quotes and prettier error messages.
git-svn-id: https://svn.eduke32.com/eduke32@1691 1a8010ca-5511-0410-912e-c29ae57300e0
2010-08-11 22:37:45 +00:00
helixhorned 02379ee1d2 More of them. Includes the possiblity of typing m32script commands directly into the OSD (without "do", see osdtryscript in mapster32.cfg) and improved diagnostics.
git-svn-id: https://svn.eduke32.com/eduke32@1649 1a8010ca-5511-0410-912e-c29ae57300e0
2010-05-22 23:41:18 +00:00
helixhorned 8077dcd633 Mapster32 maintenance pack #1
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
2010-05-18 05:14:17 +00:00
terminx 45d93544a6 Source code "cleanup," herein referred to as "rape"
git-svn-id: https://svn.eduke32.com/eduke32@1625 1a8010ca-5511-0410-912e-c29ae57300e0
2010-05-02 23:27:30 +00:00
plagman ce20870e21 Fix the build with POLYMER=0 or USE_OPENGL=0.
git-svn-id: https://svn.eduke32.com/eduke32@1564 1a8010ca-5511-0410-912e-c29ae57300e0
2009-12-13 01:23:44 +00:00
helixhorned 256c729910 relocated some key events
git-svn-id: https://svn.eduke32.com/eduke32@1530 1a8010ca-5511-0410-912e-c29ae57300e0
2009-10-11 20:13:16 +00:00
terminx 20c028b2e9 Memory cleanups, use Bm/c/realloc/free everywhere (configured as nedmalloc version in compat.h), add large page support for Vista/7, tweak nedmalloc settings, add support for projecting textures from SE50 spotlights placed in maps via sprite owner member (manipulated through CONs via sprite htpicnum member), fix building Mapster32 with MSVC, increase PR_MAXLIGHTS to 1024
git-svn-id: https://svn.eduke32.com/eduke32@1527 1a8010ca-5511-0410-912e-c29ae57300e0
2009-10-07 06:47:35 +00:00
helixhorned 40d655100c m32script: stuff for fiddling with polymer lights
git-svn-id: https://svn.eduke32.com/eduke32@1521 1a8010ca-5511-0410-912e-c29ae57300e0
2009-10-03 13:20:31 +00:00
helixhorned 1d6058ecef small additions and fixes
git-svn-id: https://svn.eduke32.com/eduke32@1501 1a8010ca-5511-0410-912e-c29ae57300e0
2009-09-20 15:43:09 +00:00
helixhorned 293367e844 mapster-script stuff
git-svn-id: https://svn.eduke32.com/eduke32@1500 1a8010ca-5511-0410-912e-c29ae57300e0
2009-09-18 21:44:46 +00:00
helixhorned e7acafc9e7 some more functions for m32-script
git-svn-id: https://svn.eduke32.com/eduke32@1499 1a8010ca-5511-0410-912e-c29ae57300e0
2009-09-17 22:08:37 +00:00
helixhorned 198ac24152 drawing functions and key access for m32-script; misc. fixes
git-svn-id: https://svn.eduke32.com/eduke32@1497 1a8010ca-5511-0410-912e-c29ae57300e0
2009-09-16 22:24:24 +00:00
helixhorned 3be58d63d0 indirect constants for m32-script alongside with other changes
git-svn-id: https://svn.eduke32.com/eduke32@1496 1a8010ca-5511-0410-912e-c29ae57300e0
2009-09-14 22:11:37 +00:00
helixhorned ea0e088da5 Initial checkin of m32-script.
git-svn-id: https://svn.eduke32.com/eduke32@1493 1a8010ca-5511-0410-912e-c29ae57300e0
2009-09-12 23:03:15 +00:00