Commit Graph

62 Commits

Author SHA1 Message Date
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 420e61d0f8 a.m32: in collect_*_sectors from the 'F menu, start query with sector under mouse
git-svn-id: https://svn.eduke32.com/eduke32@2826 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:31 +00:00
helixhorned 6bafc7d176 a.m32: add some commented out example code for the screenshot functionality.
git-svn-id: https://svn.eduke32.com/eduke32@2820 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:49:31 +00:00
helixhorned 39e944dffe Add description for 'remap' to mapster32.cfg, add 'setstartpos' to a.m32.
The latter is commented out, since it has to be *compiled* with
script_expertmode enabled.

git-svn-id: https://svn.eduke32.com/eduke32@2808 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 11:27:52 +00:00
helixhorned d2e0909139 Add samples/r_usenewshading.map.
This is to the cvar of the same name as samples/aspect.map is to r_usenewaspect.

git-svn-id: https://svn.eduke32.com/eduke32@2769 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:53 +00:00
helixhorned ad908070a7 a.m32: new state "collect_ceilsky_sectors" collecting parallaxed ceilings.
git-svn-id: https://svn.eduke32.com/eduke32@2754 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:20 +00:00
helixhorned a03eadb22e Add samples/aspect.map for calibrating aspect-related settings and testing.
git-svn-id: https://svn.eduke32.com/eduke32@2602 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-09 19:22:15 +00:00
helixhorned c01109c483 m32script: fix some commands breaking too early in case of a failed validation.
If one next instruction happened to be interpreted, madness would ensue,
because the pointer wouldn't be aligned on the "opcode" part anymore.
Also, with "seti", set current sprite index only after a successful validation.

git-svn-id: https://svn.eduke32.com/eduke32@2591 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-05 19:49:30 +00:00
helixhorned 607774a982 New M32Script command "getspritelinktype" <spritenum> <<linktypevar>>.
This get into the writable variable the "linking type" of the sprite with index
<spritenum>.  The result is a bit field of ORed values:
 1: lotag has linking semantics
 2: hitag
 4: extra, 8: xvel, 16: yvel, 32: zvel, 64: owner  (custom only)

Custom setting about which sprites have what kind of linking can be programmed
via EVENT_LINKTAGS: it receives a sprite index as the 'current sprite' and is
supposed to return the bit field in RETURN.

An example which lists sprites and their linking hi- and lotags is provided in
the state 'listusedtags' in a.m32.

git-svn-id: https://svn.eduke32.com/eduke32@2590 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-05 19:49:12 +00:00
helixhorned 63b868cdde Update samples/trueror1.map with some tests of sprites lying on TROR floors.
Also, there's a "ladder" that passes through a TROR portal, and the mirror
in that map has been fixed for the classic renderer.

git-svn-id: https://svn.eduke32.com/eduke32@2351 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:25:56 +00:00
hendricks266 ff94311f13 weapons.con.sample:
- hud_orientation now uses proper bitwise operations
 - clean up whitespace

git-svn-id: https://svn.eduke32.com/eduke32@2263 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-17 04:31:23 +00:00
helixhorned 9a7bdfa76c a.m32 light hotkeys: clamp hitag (range) to 0..32767 instead of 0..16000
git-svn-id: https://svn.eduke32.com/eduke32@2227 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-30 22:17:29 +00:00
helixhorned b73b9cb732 a.m32: new state 'print_parallel_midpts'
git-svn-id: https://svn.eduke32.com/eduke32@2179 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-12 23:18:53 +00:00
helixhorned e6d1c9bd6a a.m32: New function save_restore_hlsectors, also accessible from the Quote-F
menu.  If some sectors are highlighted, save their indices.  The highlighting
of those particular sectors can then be restored at a later time (but careful
across structural modifications that tweak sector indices) by running the same
function.  Shares a 'gamearray' with function 'collect_teleporting_sectors',
so the latter will reset this one when run.

git-svn-id: https://svn.eduke32.com/eduke32@2155 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-04 21:21:01 +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 cc7110c18f - Add new trueror1.map that showcases the functionality and limitations of
the additional rendering pass
- Remove r_preview_mouseaim cvar from the game, since it's only for Mapster
- sdlmusic.c: (Failed) attempt to fix a call of waitpid() with a non-existent
  process ID in the external MIDI playing code. I think there's a race there...

git-svn-id: https://svn.eduke32.com/eduke32@2025 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:04:37 +00:00
helixhorned b3d3fd9a39 Better handling of tsprites that are duplicated through TROR portals.
Specifically, now also consider the sprite tile's yoffset, and fix an
issue when a tsprite got duplicated 'toward' the viewer. Also add a
couple of tests in trueror1.map.

git-svn-id: https://svn.eduke32.com/eduke32@2004 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 19:44:51 +00:00
helixhorned 8db922737a BACKSPACE key in 3D mode now deletes a red-wall link when aimed at a wall or mask.
With script_expertmode enabled, SHIFT-BACKSPACE clears the upwall link and CTRL-
BACKSPACE the downwall link. These functions are useful because the automatic
nextwall determination code sometimes gets it wrong (not corrupting anything) or
if you want to vertically displace a sector attached to a higher or lower level.
Also add the exploding ceiling example to the TROR test map.

git-svn-id: https://svn.eduke32.com/eduke32@1997 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 19:53:05 +00:00
helixhorned b72d351f20 * game and editor: emit a warning when a search-path directory specified
on the command-line isn't found (instead of saying nothing)
* editor: Move inconsistent (stat&2)/heinum detection into the corruption
  checker. This makes a lot of original maps spew countless 'errors', but
  it's preferable for new maps since such floors and ceilings could behave
  strangely with TROR.

git-svn-id: https://svn.eduke32.com/eduke32@1995 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 18:37:53 +00:00
hendricks266 304a2c9feb weapons.con.sample: fix a potential bug modders may encounter: use the special G_Draw temp variables in G_DrawWeaponTile(_crystal) instead of the ones intended for individual drawing states
git-svn-id: https://svn.eduke32.com/eduke32@1992 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-27 05:08:31 +00:00
hendricks266 a34f007fe2 add weapons.con.sample, a direct port of the HUD display code to CON
git-svn-id: https://svn.eduke32.com/eduke32@1988 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:19 +00:00
hendricks266 4f491342b2 gut and update enhance.con.sample
git-svn-id: https://svn.eduke32.com/eduke32@1985 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:02 +00:00
helixhorned b6d729a553 * skip grayed out sectors when changing tags in 2d mode
* make Ctrl-Alt-A (formerly 'toggle inner gray walls') now remove all gray walls entirely in 2d mode
* make r_usenewaspect enabled by default

git-svn-id: https://svn.eduke32.com/eduke32@1957 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-06 11:50:45 +00:00
helixhorned aa8b2e4e05 Lots of M32script tweaks:
* fix breaking out of 'switch' blocks and compilation of the 'default' case
* Have a way of assigning 'special function' menu [' F] entries to script states. Writing a string literal after the state name will register the state under that name. Menu names are limited to 24 characters and it's possible to have up to 16 of them.
* new branching command 'ifinteractive', true if a state runs from the menu mentioned above.
* new command: getnumberfromuser <<retvar>> "query_string" <maxnum> <flags>

See 'state collect_teleporting_sectors' in a.m32 for a combined usage of the new functionality.

git-svn-id: https://svn.eduke32.com/eduke32@1955 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-03 17:22:25 +00:00
helixhorned 0713c44219 * a.m32: new state 'correctslopes' which will check all ceilings and floors for a stat&2 and heinum mismatch and correct accordingly (the result isn't visible, but such an inconsistency can prevent planes from TROR-joining)
* helper feature: when shade preview is enabled, the ceilings and floors of highlighted sectors are shown in pal 6. This makes it possible to highlight the TROR-joining candidate sectors in 3D mode using e.g. 'sethighlightsector searchsector 1' while aiming at the respective ceilings and floors, and get visual feedback.
* when failing TROR-joining early ('no consistent joining combinations found'), print to the console why it failed.
* more Makefile.deps updating

git-svn-id: https://svn.eduke32.com/eduke32@1952 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-30 13:03:07 +00:00
hendricks266 e9b15edd25 move tiles.cfg out of eduke32/samples/ into eduke32/ and update synthesis.sh to reflect that
git-svn-id: https://svn.eduke32.com/eduke32@1948 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-28 21:12:02 +00:00
hendricks266 e64b1714d1 minor change in duke3d.def.sample to link to the wiki, but it still needs a major overhaul
git-svn-id: https://svn.eduke32.com/eduke32@1947 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-28 21:10:59 +00:00
helixhorned ee4d060b1f * New m32script commands:
- sethighlightsector <sectnum> <on?>
 - updatehighlightsector
 - collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>

The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).


* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,

corruptcheck tryfix 9-21 ?

would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.


* fix demo playback (tueidj figured this out)


git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-03 22:51:28 +00:00
helixhorned 6a713133cf * Fix usage of uninitialized array (\!), which could result in TROR connections being deleted at random when deleting sectors. I guess this is a sign of approaching senility :(
* When dragging highlighted sprites, do a setsprite() after each position update. This way, they won't end up on the wrong level
* TROR support for SE 31 and 32 in-game, example provided in test map
* some uncommited stuff for TROR: SE 6/14


git-svn-id: https://svn.eduke32.com/eduke32@1924 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-29 19:57:05 +00:00
helixhorned 21297f8bcf I now understand SE0's
git-svn-id: https://svn.eduke32.com/eduke32@1914 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-22 19:26:11 +00:00
helixhorned 5cb1132d56 Make certain sprites in rotating sectors impervious against diverging from their initial position due to roundoff error accumulation. The sprites affected are those with statnums 0, STANDABLE, FX, and FALLER (also SE lights, but that shouldn't be considered permanent) contained in sectors with SE 0, 6 or 14. Fix some interpolation issues with such sprites in passing, though they still jitter on occasion. For usage examples, take a look at the updated trueror1.map.
Implementation note: the so instrumented sprites use actor[].t_data[7] to hold a magic number (0x18190000 + pivot spr idx), and t_data[8] and [9] for the initial coords relative to the pivot point.

git-svn-id: https://svn.eduke32.com/eduke32@1913 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-22 19:12:47 +00:00
helixhorned b391bb8ad9 yay, I forgot the example and test map
git-svn-id: https://svn.eduke32.com/eduke32@1888 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-15 23:23:10 +00:00
helixhorned a0ca3ed041 fix a.m32 script, inserted light SEs now have nonzero repeat
git-svn-id: https://svn.eduke32.com/eduke32@1878 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-08 20:12:16 +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 46964b322b * Lazy hightile loading in Mapster32 tile selector (first display all as lowtiles, then load each one while allowing movement)
* Consolidate the various, slightly different, methods of bounding a sprite between a sector's ceiling and floor into one common function
* Fixes for accumulated bugs: shade preview, r_shadescale_unbounded, and a couple of unreported ones
* Yaks, gnus, and bisons...


git-svn-id: https://svn.eduke32.com/eduke32@1854 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-23 17:41:01 +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 b158521449 Besides catching a few more corner cases, there's better mouselook handling and a warning (but no fix) for a rare and bad corruption when splitting a sector in this revision.
git-svn-id: https://svn.eduke32.com/eduke32@1836 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-08 23:02:38 +00:00
helixhorned 148f3cadef mapster32: new command-line switch '-namesfile <filename>' for overriding NAMES.H; new 'drawlabel <quotenum> <x> <y> <z> <col> <backcol>' m32script command for drawing small labels, see end of a.m32 for an example; some special handling for sprites whose tile yoffset is greater or equal their pixel height.
git-svn-id: https://svn.eduke32.com/eduke32@1832 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-07 16:30:06 +00:00
helixhorned 71d5dc5e59 Selective auto-correction option for the corruption checker. 'corruptcheck now' will print numbered tags for each warning, which can then be used like this: 'corruptcheck tryfix 20 34-64'. General cleanup; make mapster32 not depend on enet objects.
git-svn-id: https://svn.eduke32.com/eduke32@1799 1a8010ca-5511-0410-912e-c29ae57300e0
2011-02-21 23:08:21 +00:00
helixhorned f4b4234ce1 fix some issues with compilation on mac osx; make B, N, M keys behave the same as KP1, KP2, KP3 when pointing at a polymer light (hack around keyboard strangeness)
git-svn-id: https://svn.eduke32.com/eduke32@1789 1a8010ca-5511-0410-912e-c29ae57300e0
2011-02-06 22:57:32 +00:00
helixhorned 51eb2c7cd3 Too much stuff for one commit.
engine:
* sector-like sprite clipping now works with x- xor y-flipped actual sprites

mapster32:
* corruption checker has been hooked up to loading/saving routines to inform/warn the user
* also warn if mouse pointer is over corrupt wall which is shown in pink then: you should not move such a wall!
* faster map loading by deferring polymer_loadboard to 3d mode entrance (also removes some 'glGetTexLevelParameteriv returned GL_FALSE' warnings)
* more logical maphack light handling, the logic is still a bit dodgy though
* some menu and misc. function fixup
* redundancy elimination...

API:
* added consts various for 'char *filename' parameters
* loadboard() now accepts bit 4 for flags (formerly 'fromwhere')

git-svn-id: https://svn.eduke32.com/eduke32@1760 1a8010ca-5511-0410-912e-c29ae57300e0
2011-01-16 00:23:39 +00:00
helixhorned e745f3abf9 A bunch of mutually unrelated updates.
First, there's a new script for the generation of highpalookup images. Python 2.6, NumPy and PIL are required.
Next, the map corruption checker has been ported to C. This is so that Mapster32 will be able to take decisions more cleverly based on the corruptness of the map. It also catches a few more issues like inconsistent nextwall/nextsector tags now.
Finally, link the executables with --large-address-aware on Windows. This gives a gig more private virtual memory on XP when booting with /3GB. YMMV, but I can play IW2 with Polymer now.

git-svn-id: https://svn.eduke32.com/eduke32@1751 1a8010ca-5511-0410-912e-c29ae57300e0
2011-01-03 22:04:20 +00:00
helixhorned 234ac1b9bb Adds chselshade (change selected shade) to a.m32
git-svn-id: https://svn.eduke32.com/eduke32@1731 1a8010ca-5511-0410-912e-c29ae57300e0
2010-12-01 22:07:46 +00:00
helixhorned 639cabc0e6 A week worth of Mapster hacking: first, there is an experimental side view mode toggled with [F3]. Nav keys are {QWAZ}, MMB and RMB. Use with care because it is still in construction. The sector selection routines have been rewritten -- it is now possible to paste the selection into a room and a new inner loop will be added automatically (MickyC's idea). Adds m32script commands drawline16z and drawcircle16z.
git-svn-id: https://svn.eduke32.com/eduke32@1730 1a8010ca-5511-0410-912e-c29ae57300e0
2010-11-27 22:12:24 +00:00
helixhorned 93c749f2de a.m32 corruption checker: also handle out-of-range picnum
git-svn-id: https://svn.eduke32.com/eduke32@1726 1a8010ca-5511-0410-912e-c29ae57300e0
2010-11-10 21:11:55 +00:00
helixhorned 8206978b8a Delete _clipshape_.map. Easy to forget if it's not on the file system anymore...
git-svn-id: https://svn.eduke32.com/eduke32@1723 1a8010ca-5511-0410-912e-c29ae57300e0
2010-10-31 19:59:13 +00:00
helixhorned a38307a54f Fixes quite a few nasty bugs with the new clipping code, including the crash. Clip shapes are now loaded from _clipshape0.map through _clipshape9.map (no break like when loading tiles, just see if each is present). Mapster32: insert some safety code for sprites with sectnum<0. Because this is still a bad thing, have the m32script corruption checker catch this and run it periodically from EVENT_DRAW2DSCREEN. Also draw such sprites in 2D mode with a blood-red color, and make them draggable. Remove set[sector,wall,sprite] commands.
git-svn-id: https://svn.eduke32.com/eduke32@1722 1a8010ca-5511-0410-912e-c29ae57300e0
2010-10-31 19:54:03 +00:00
helixhorned f1caa980d0 Sector-like sprite clipping. Check samples/spriteclip.txt.
git-svn-id: https://svn.eduke32.com/eduke32@1719 1a8010ca-5511-0410-912e-c29ae57300e0
2010-10-28 20:17:22 +00:00
helixhorned e0874390ff New aspect determination code for classic/Polymost, controlled with r_usenewaspect and r_screenaspect cvars; print stack traces with SDL/GCC; change signature of app_main in game.c to match declarations found in other places and return different positive values on init error.
git-svn-id: https://svn.eduke32.com/eduke32@1712 1a8010ca-5511-0410-912e-c29ae57300e0
2010-10-17 14:49:39 +00:00
helixhorned cb321a9d76 New CON command 'clipmovenoslide', doing the same as clipmove but stopping at collisions before sliding calculations. Fixes a problem with Mapster32 where names.h was tried to be read before setting up the search path.
git-svn-id: https://svn.eduke32.com/eduke32@1711 1a8010ca-5511-0410-912e-c29ae57300e0
2010-10-09 22:59:17 +00:00