Commit graph

465 commits

Author SHA1 Message Date
helixhorned
4659b691e6 Some sound source cleanup, no functional changes.
- make a couple variables static in sounds_mapster32.c
- KHz --> Hz in initialization text

git-svn-id: https://svn.eduke32.com/eduke32@2439 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:21:42 +00:00
hendricks266
9f78a773f1 Add "OSX_STARTUPWINDOW" Makefile variable to toggle the OS X startup window. Off by default.
git-svn-id: https://svn.eduke32.com/eduke32@2426 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 06:07:10 +00:00
hendricks266
27b279a1ce JFDuke3D port: OS X Startup Window, copied almost verbatim
It needs to have the sound quality box removed and the Game directory box added, possibly among other things.

git-svn-id: https://svn.eduke32.com/eduke32@2396 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:30:27 +00:00
helixhorned
e14b2808ef Fix non-OpenGL build.
git-svn-id: https://svn.eduke32.com/eduke32@2357 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:26 +00:00
helixhorned
0ef1721955 Mapster32: Fix extended ceiling/floor picnums taking on picnum 0 in Polymer.
The reason was that drawmasks(), which was where the resetting of the fake
RoR textures happened under Polymer, can be called from polymer_displayrooms()
when mirrors are present. I was assuming that drawmasks() was only ever called
after the 'main' drawrooms and that hence the sequence of fake RoR tile tweaking
was set, reset, set, reset, ... which it was not.
Now, do the resetting explicitly after every drawmasks() in the editor.

git-svn-id: https://svn.eduke32.com/eduke32@2350 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:25:42 +00:00
helixhorned
17ba2664f9 Mapster32: don't use lazy tile loading with r_hightile=0.
git-svn-id: https://svn.eduke32.com/eduke32@2345 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:24:09 +00:00
helixhorned
103ee7a40b rotatesprite(..., windowx1,windowy1,windowx2,windowy2) --> rotatesprite_win
git-svn-id: https://svn.eduke32.com/eduke32@2318 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:35:00 +00:00
helixhorned
1d0cb07167 Factor out four instances of identical code into M32_DrawRoomsAndMasks().
git-svn-id: https://svn.eduke32.com/eduke32@2314 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:33:52 +00:00
helixhorned
99e08bf441 legibility improvements: rotatesprite(..., 0,0,xdim-1,ydim-1) -> rotatesprite_fs
git-svn-id: https://svn.eduke32.com/eduke32@2308 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-02 17:35:05 +00:00
helixhorned
7a4c9253c5 astub.c: remove some tabs in the code
git-svn-id: https://svn.eduke32.com/eduke32@2275 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 22:11:55 +00:00
helixhorned
cd89fce9aa less trivial stuff
- fix one bound-checking line
- rewrite two lines in astub.c to potentially not overflow an int16
- make tiletovox[] an array of int16's

git-svn-id: https://svn.eduke32.com/eduke32@2266 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 21:57:46 +00:00
helixhorned
260bbc1f92 cleanup:
- 'whitecol' was defined in the engine and in build.c, use only the engine one
 - make cachesize, artsize, artversion static in engine.c
 - undo some formatting havoc presumably done by astyle

git-svn-id: https://svn.eduke32.com/eduke32@2260 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-15 22:39:38 +00:00
helixhorned
e30ed58aa0 Fix parallaxed sector display in Mapster32 on Polymer.
git-svn-id: https://svn.eduke32.com/eduke32@2257 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-14 14:48:45 +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
84867ee620 Mapster32: Rudimentary support for auto-aligning along TROR nextwalls.
Usage: press the ['] (quote) modifier together with the PERIOD key.
Aligns only the immediate upper and lower neighbors of each wall that got
aligned by following point2s or nextwalls.  Doesn't play well with Alt
(carry over xrepeat) yet, might need two subsequent alignment passes.

git-svn-id: https://svn.eduke32.com/eduke32@2178 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-12 23:18:35 +00:00
helixhorned
4989c173bd Fix out-of-bounds access in tile selector code in astub.c
git-svn-id: https://svn.eduke32.com/eduke32@2177 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-12 23:18:15 +00:00
helixhorned
151287168c - Fix invalid polymer light array access originating from game's cleanup
callback 'G_Polymer_UnInit'.
- In astub.c, reset spritelightid to -1 when nulling the spritelightptr of
  a sprite  (no crashes observed, just precaution)
- In sdlayer.c, catch SIGILLs with our signal handler too, since illegal
  instructions are what the instrumented debug builds will execute when
  attempting to carry out an undefined (per C) operation.

git-svn-id: https://svn.eduke32.com/eduke32@2169 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-09 19:11:31 +00:00
helixhorned
c112cdde89 Fix a potential out-of-bounds read and write when loading the help file
in Mapster32.

git-svn-id: https://svn.eduke32.com/eduke32@2161 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-09 19:09:14 +00:00
helixhorned
6fc7e5b683 Remove some warnings with clang, code-side changes.
git-svn-id: https://svn.eduke32.com/eduke32@2158 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-09 19:08:29 +00:00
helixhorned
086dcf383d Mapster32: fix filling all sectors of a bunch with Ctrl-U. Previously, only
one sector was filled and the 'clear bunch' message was displayed even if the
operation was canceled.

git-svn-id: https://svn.eduke32.com/eduke32@2153 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-04 21:20:31 +00:00
helixhorned
f4703a596d Auto-correct the just mentioned inconsistency by clearing the respective TROR
nextwalls. (i.e. setting them to -1 on 'corruptcheck tryfix')

git-svn-id: https://svn.eduke32.com/eduke32@2134 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-26 14:12:44 +00:00
helixhorned
1402a6d70b corruption checker: catch TROR-nextwalls in non-extended sectors. These
can be caused by copying map parts from one map to another (or a new one).
The copying system is slightly broken right now....

git-svn-id: https://svn.eduke32.com/eduke32@2133 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-26 14:12:30 +00:00
helixhorned
9a8603d01e - Make old-nextwalls invalid on the following two occasions: ovh_whiteoutgrab
with no highlighted sectors; and when entering 3D mode, even if there are
  highlighted sectors. This should have almost no effect, but I find it cleaner
  that way.
- Check map for corruption every time an editing change is done. This was
  accidentally disabled when commenting out the undo code (which I've yet
  to debug).

git-svn-id: https://svn.eduke32.com/eduke32@2121 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-25 09:50:40 +00:00
helixhorned
57e132a044 Remove after_handleevents_hook and its only user, the keystatus-level clearing
of SPACE and C when in side-view mode. Now, this is accomplished by checking
directly in the overheadeditor code.

git-svn-id: https://svn.eduke32.com/eduke32@2119 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-25 09:50:07 +00:00
helixhorned
ac12a06de4 Fix calling glEnable() without checking for the rendering mode in the tile
selector. This could lead to a crash when OpenGL wasn't initialized before.

git-svn-id: https://svn.eduke32.com/eduke32@2117 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-25 09:49:22 +00:00
helixhorned
21274b317f Fix the flickering in the tile selector with lazy hightile loading on
(lazy_tileselector=1 in mapster32.cfg). We're drawing tiles one by one,
so glDrawBuffer(GL_FRONT_AND_BACK) is our friend.

git-svn-id: https://svn.eduke32.com/eduke32@2115 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-17 21:10:04 +00:00
helixhorned
5623334283 Correct thinko with the ceiling/floor movement code. When moving more than one
sector c/f and moving one of them would go beyond the other side (ceilingz >
floorz), don't move any sector c/f at all. When moving only one sector in that
case, move so that ceilingz == floorz.

git-svn-id: https://svn.eduke32.com/eduke32@2112 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-11 22:39:56 +00:00
helixhorned
b7834f21dd Tweak raising/lowering (groups of) ceilings or floors.
Now, if more than one sectors are affected, always move them by the same
amount. That is, if one of them would be sticking against the other side,
don't move the rest.  Another change consists of determining the z delta
first, and only then moving the sprites by that amount. This fixes the
problem where you'd e.g. raise a 'floor door' against the ceiling, and the
effector sprites would be raised one time too much, preventing them from
being lowered the next time.

git-svn-id: https://svn.eduke32.com/eduke32@2111 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-11 20:05:44 +00:00
helixhorned
b2d789731a A couple of Mapster changes related to saving.
- new mapster32.cfg and OSD variable 'fixmaponsave_sprites', telling the
  editor whether to 'fix' the sprite sectnums on saving and entering 3D
  mode. Note that a) sprite sectnums are never fixed when 'script_expertmode'
  is enabled, as before, and b) sprites that have out-of-bounds sectnums
  are still fixed if a proper sector is found
- if saving and some sprite sectnums have thus been tweaked, inform the
  mapper on the status line and print the changes in the OSD
- fix update issue similar to an earlier one: when 'saving as', the astub.c-
  based file name is now updated too, so saving with Ctrl-S now saves into
  the one save with 'save as' (and not the old one)
- don't attempt to recheck wall pointers from scratch (when saving and running
  with -check) if it's a TROR map

git-svn-id: https://svn.eduke32.com/eduke32@2110 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-11 20:05:29 +00:00
helixhorned
59670ed45e m32: Make a couple of often-used operations not spam messages to the log.
git-svn-id: https://svn.eduke32.com/eduke32@2103 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-03 23:08:35 +00:00
helixhorned
4322bae14c Oops. That last one wasn't supposed to be committed. Here's the log for the
last one + this one:

A couple of tweaks against accidental overwriting of maps.
- first, fix a bug where the map name wasn't reset to 'newboard.map' when starting a
  new map
- When saving with Ctrl-S, query the user for confirmation and also show the file name
  where the map will be written
- when going into the ESC-menu, print the file name where the map will be written
  on pressing 'S' above the '(S)ave' text

git-svn-id: https://svn.eduke32.com/eduke32@2096 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-31 19:50:06 +00:00
helixhorned
004b98e2b3 A couple of tweaks against accidental overwriting of maps.
- first, fix a bug where

git-svn-id: https://svn.eduke32.com/eduke32@2095 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-31 19:49:43 +00:00
helixhorned
48ac042ca4 Eliminate one malloc(0) when corrupt-checking an empty map, clean up
overheadeditor() by allocating temp variables in the blocks where they
are needed.

git-svn-id: https://svn.eduke32.com/eduke32@2088 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:47:26 +00:00
helixhorned
aae60f64c2 Eliminate all 'variable ... set but not used [-Wunused-but-set-variable]'
warnings with GCC 4.6 except one in kplib.c

git-svn-id: https://svn.eduke32.com/eduke32@2079 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-17 18:42:10 +00:00
helixhorned
50bc3a3fcb Two tweaks when keying in values directly in the editor's 3D mode.
First, when pressing 'S on signed members (like the shade), display
the real signed value instead of the value cast to an unsigned type.
Second, when aiming at an overwall and pressing G, affect the overwall
instead of the wall. Maybe these changes affect a few other queries too...

git-svn-id: https://svn.eduke32.com/eduke32@2077 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-17 18:41:17 +00:00
helixhorned
2a6a2d590a - protect stat bit 2 when pasting to ceilings or floors
- when pasting to walls or maskwalls, the following user bits are kept now:
  4 (top/bottom alignment [O])
  1+64 (blocking, hitscan)
  8+256 (x/y-flip)
- print '(one-sided)' when pressing Shift + ([B] or [H]) on a wall

git-svn-id: https://svn.eduke32.com/eduke32@2033 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-18 11:55:31 +00:00
helixhorned
b486f3aa0d More natural mouse picking in software mode, closer to "what's under the cursor
is picked" but still not perfect. In particular, sometimes a wrong wall is
selected, and sprites don't get picked through portals. As a rule of thumb,
don't be too far away from the objects you're modifying in 3D mode.

git-svn-id: https://svn.eduke32.com/eduke32@2030 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-17 14:26:02 +00:00
helixhorned
9b1d384723 Three-way clipping in Mapster32 (still toggled with 'N): on and off as
before, and additionally a mode that doesn't clip against masked walls
and sprites.

git-svn-id: https://svn.eduke32.com/eduke32@2028 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-16 19:17:48 +00:00
helixhorned
9fd471a56a Make uninitialization sequence more consistent across the editor code. It's
always like this now:
  ExtUninit -> (writesetup, misc.)
  uninitengine -> (uninitsystem -> (uninit timers, mouse, ...))
  exit()
Some paths still lead to a plain exit(), like failures in cache1d.c or mdsprite.c

git-svn-id: https://svn.eduke32.com/eduke32@2022 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:03:29 +00:00
helixhorned
009d405803 Mapster32: when changing screen palettes, pass flag 2 to setbrightness().
This will prevent it from calling gltexinvalidateall() when e.g. submerging
and resurfacing, mimicking the behavior of the game, where only
gltexinvalidate8() is called in such situations.

git-svn-id: https://svn.eduke32.com/eduke32@2013 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-10 15:44:31 +00:00
helixhorned
85b65c26d3 Mapster32: make the heinum&2 and stat inconsistency be displayed only once
with 'corruptcheck now', but still print each corrected one on tryfix.

git-svn-id: https://svn.eduke32.com/eduke32@2012 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-10 15:44:16 +00:00
helixhorned
a145cc93bc Make Polymer declare a callback function G_Polymer_UnInit() that is called
whenever we change to another renderer etc. and define it for the game and
editor.  The purpose of the function is to clean up references to Polymer
resources like lights.
This fixes 1) all lights becoming spot lights in the game and 2)
an issue with maphack lights in the editor (can't recall which exactly).

git-svn-id: https://svn.eduke32.com/eduke32@2006 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:45:21 +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
962910ce32 Move the fixspritesectors call and the start sector updating into ExtPreSaveMap().
This makes the latter also correct when testing a map from the editor.

git-svn-id: https://svn.eduke32.com/eduke32@2001 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 19:43:48 +00:00
helixhorned
b391f62ca5 Oops...
git-svn-id: https://svn.eduke32.com/eduke32@1998 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 19:58:40 +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
helixhorned
c8bf3682e0 disable undo/redo editor feature until I can debug the disappearing sprites
git-svn-id: https://svn.eduke32.com/eduke32@1973 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 11:54:16 +00:00
helixhorned
26a25bdce5 * Address http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__103306
by using setspritez() instead of setsprite() for the sectnum updating.
* Change 'yax-nextwall(0/1)' to 'upwall/downwall' in the corruption checker, makes it much nicer to read.

git-svn-id: https://svn.eduke32.com/eduke32@1959 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-09 16:03:56 +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