Commit graph

2396 commits

Author SHA1 Message Date
helixhorned
5119b135d1 More utils tweaks.
- remove the objects too on 'clean'
- fix warning with 'transpal' on x64
  (generates translucency and shade tables)

git-svn-id: https://svn.eduke32.com/eduke32@2404 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:12:15 +00:00
helixhorned
147a41d296 Makefile tweaks for the utilities.
- print compilation status for building the final executable
- add 'cleanutils' target in build/Makefile
- don't link against pthread, seems unnecessary
- don't build nedmalloc.o when not requested in Makefile.common

git-svn-id: https://svn.eduke32.com/eduke32@2403 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:11:49 +00:00
hendricks266
60a27d6bb0 synthesis.sh:
- Exclude "Apple/lib" rather than "Apple" so that required files are not left out of the tarball.
 - Add one to $lastrevision before generating the ChangeLog so that it only includes what is new to an update.
osxbuild.sh:
 - Add stronger detection of the SVN revision by adding support for 1.7 (no longer relying on an ".svn" directory) and having a specific fallback in case the build location is neither svn nor git.
 - Echo the SVN revision to source/rev.h before the build processes and revert it afterwards.

git-svn-id: https://svn.eduke32.com/eduke32@2402 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:33:23 +00:00
hendricks266
d1a780bd40 Under Mac OS X, look for libvpx in /usr/local to add support for Homebrew in addition to MacPorts.
git-svn-id: https://svn.eduke32.com/eduke32@2401 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:32:57 +00:00
hendricks266
0d4e066e12 Under Mac OS X, override libsupc++ with libstdc++.
git-svn-id: https://svn.eduke32.com/eduke32@2400 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:32:33 +00:00
hendricks266
2eb11cc2e6 Add an explicit declaration so that Mac OS X binaries look for the Frameworks inside the app bundle before anywhere else.
git-svn-id: https://svn.eduke32.com/eduke32@2399 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:32:06 +00:00
hendricks266
56c002d3a1 Add APPLE_FRAMEWORKS Makefile variable which can be passed to the make invocation.
ex: make APPLE_FRAMEWORKS=~/Library/Frameworks

git-svn-id: https://svn.eduke32.com/eduke32@2398 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:31:37 +00:00
hendricks266
1927df852d Remove four self-assignments in backtrace.c that were added to avoid an unused parameter warning and add ATTRIBUTE((unused)) to the implicated parameters so they will not trigger the warning because they could not be removed.
git-svn-id: https://svn.eduke32.com/eduke32@2397 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:31:02 +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
hendricks266
56b40e233e JFDuke3D port: Display DUKETEAM.ANM at the end of episode 3 under v1.3D.
Fix for end-of-game sequence with 1.3D data, by Turrican.

git-svn-id: https://svn.eduke32.com/eduke32@2395 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:29:05 +00:00
helixhorned
ef02682c94 Define strtoll to _strtoi64 on MSVC.
Usage of a search machine by Hendricks.

git-svn-id: https://svn.eduke32.com/eduke32@2394 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-01 23:36:11 +00:00
helixhorned
e5a133db8b When failing to open a savegame file for writing, print the reason to the log.
git-svn-id: https://svn.eduke32.com/eduke32@2393 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-01 23:35:53 +00:00
helixhorned
edb110b692 More rebust (and "correct"/expected) decimal number parsing in CON.
The replacement of atoi with strtol in r2374 had the side-effect that numbers
out of the range of a 32-bit integer were being returned as LONG_MAX/LONG_MIN
instead of being converted by taking the bits and re-interpreting them (note
that it was a coincidence that atoi behaved that way; to be strict, the
behavior was undefined and there is no regression).

Now, we implement parsing decimal integers using strtoll (with assuming
"long long" being the same as int64_t) and check in which range the number
falls.  If it's in the range (INT32_MAX <= x <= UINT32_MAX), issue a warning;
if it's not in (INT32_MIN <= x <= UINT32_MAX), warn too (though this better
ought to be an error?).  In each case, the bit representation is converted to
the CON number type (int32 to assume maximum portability) by re-interpreting
the bits [this is the same as an int/int cast, with GCC at least; more
generally, it's implementation-defined per C99].

git-svn-id: https://svn.eduke32.com/eduke32@2392 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-29 15:27:40 +00:00
helixhorned
fc9609928f Make 'dommxoverlay' and 'beforedrawrooms' static in engine.c.
git-svn-id: https://svn.eduke32.com/eduke32@2391 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-27 19:40:28 +00:00
helixhorned
95324450fa Significantly speed up non-power-of-two floor sprite texture mapping functions.
(Classic renderer). We don't need 64-bit integers; also use the nice
asm version of divscale32() if possible.

git-svn-id: https://svn.eduke32.com/eduke32@2390 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-27 19:40:01 +00:00
helixhorned
4f4ca00231 osxbuild: zip -r
git-svn-id: https://svn.eduke32.com/eduke32@2389 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-26 17:38:17 +00:00
helixhorned
75ea167ce2 Fix osxbuild.sh on my setup.
git-svn-id: https://svn.eduke32.com/eduke32@2388 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-26 17:32:53 +00:00
helixhorned
925b27e3cd Try to find another mirror wall if the assigned one breaks.
This fixes mirrors consisting of more than one walls not drawing when the
first assigned mirror wall breaks. It still does not let you have more
than one mirror (i.e. mirror sectors) showing up at the same time in
the scene.  Affects classic and Polymost only.

git-svn-id: https://svn.eduke32.com/eduke32@2387 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 15:59:44 +00:00
hendricks266
f524f8f98c Update "osxbuild.sh" to reflect implementation of .app bundles on Mac OS X.
git-svn-id: https://svn.eduke32.com/eduke32@2386 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 03:31:20 +00:00
hendricks266
c24049fe2a The Mac OS X build process will now automatically copy the .app bundles to "./" and move the binaries into them.
git-svn-id: https://svn.eduke32.com/eduke32@2385 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:59:51 +00:00
hendricks266
35f18cb39b add Mac OS X .app bundles to repository
git-svn-id: https://svn.eduke32.com/eduke32@2384 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:59:13 +00:00
hendricks266
cdd1da39a8 Add the source .psd files for the EDuke32 logo and program icon to the repository. Though they are .psd, they are effectively vector because they utilize paths.
git-svn-id: https://svn.eduke32.com/eduke32@2383 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:57:59 +00:00
hendricks266
e786700212 cosmetic:
* update Windows icons to include 64x64, 128x128, and 256x256 sizes
* add "orange_icon.ico" (unused; classic orange color of logo)
* remove unused 32x32 "build_icon.bmp" file

git-svn-id: https://svn.eduke32.com/eduke32@2382 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:57:25 +00:00
helixhorned
0175562e1f Do bound check for "quick" sector/wall accesses from CON, i.e. in getvarvar.
This was causing oob sector accesses with code like this:
    getwall[hitwall].nextsector temp
    ifvarvare sector[temp].floorz sector[temp].ceilingz setvar tempb 1
(from DT's HYPERCORE).

Also validate quote indices passed to CON's quote and userquote commands at
runtime.

git-svn-id: https://svn.eduke32.com/eduke32@2381 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-24 19:51:54 +00:00
helixhorned
668774c12e Fix user quotes colored with a 2-digit number being wrongly x-aligned.
Such game text was shown starting from about the center of the screen.
The reason for the bug was this code:
  t += 1 + isdigit(*(t+2));
The sequence points here are at the beginning and end of this assignment
expression, and the updating of t may happen anywhere between these (C99
6.5.16 #3).  Please don't write such code.  When in doubt, and assignment
and reference to the same object should be split!

git-svn-id: https://svn.eduke32.com/eduke32@2380 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-24 19:51:37 +00:00
helixhorned
0919c186ba Pull the 'for (' ... ')' out of the TRAVERSE_{CONNECT,SPRITE_*} macros.
This plays more nicely with automatic formatters.  Also indent accordingly.

git-svn-id: https://svn.eduke32.com/eduke32@2379 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:33:33 +00:00
helixhorned
0309ba3141 QUOTE_NVG_OFF-p->heat_on --> QUOTE_NVG_OFF-!!p->heat_on in sector.c.
Because: 1) It used to be like this; 2) guard against bad CON input.

git-svn-id: https://svn.eduke32.com/eduke32@2378 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:33:09 +00:00
helixhorned
0f933a8522 Fix potential (certain?) oob access with ST28/SE21.
Encountered with Scent.map.  Since the SE21 are deleted after they have
been used, the search for them in the ST28 code in sector.c may come up
empty, in which case sector[-1] would be accessed.

git-svn-id: https://svn.eduke32.com/eduke32@2377 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:32:55 +00:00
helixhorned
e18063beb8 Fix sprites with picnums >= MAXSPRITES not drawing in classic.
This was discovered because viewscreens (TILE_VIEWSCR) ceased being drawn
with the MAXTILES increase (reported by Hank, who also did the bisect).

git-svn-id: https://svn.eduke32.com/eduke32@2376 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 18:24:36 +00:00
helixhorned
cf9e0490a2 Uncomment "CrosshairColor" parsing code in config.c.
Untested, but LeoD says it works.

git-svn-id: https://svn.eduke32.com/eduke32@2375 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 21:18:57 +00:00
helixhorned
8b7a4dab9b Define Batoi/Batol to strtol(...) in compat.h and use these when necessary.
That is, everyplace a user input is to be converted.  The only remaining
instance of atoi() is now atoi(s_buildDate).

git-svn-id: https://svn.eduke32.com/eduke32@2374 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 21:17:39 +00:00
helixhorned
80bd1bb4e4 engine: make neartag accept a sprite-blacklist function and use it in sector.c.
Internally, the last argument to neartag is now a pointer to a function
  int32_t (*blacklist_sprite_func)(int32_t i),
which is supposed to return 1 if sprite[i] should NOT be considered for hitting.

This is now used in the hard-coded neartag() calls in sector.c, but not in any
way in CON (there's neither a C blacklist function provided, nor is there a
possibility to define one in CON).  There, all sprites with picnums >=1 and <=10
(i.e. the effectors) will be blacklisted.  This remedies problems where such
sprites would get in the way of switches.

Note that a whitelist approach (only consider a predefined set, namely those
picnums which will be checked afterwards) has back-compatibility implications
since people may have used e.g. lotagged window sprites to cover a switch.

Also, the >=1 to <=10 range is [sic] (the static, not dynamic values are used),
since anyone redefining effector picnums is clearly out of their mind.

git-svn-id: https://svn.eduke32.com/eduke32@2373 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:54:24 +00:00
helixhorned
1ec1e3e45c Make neartag() return void instead of always 0.
git-svn-id: https://svn.eduke32.com/eduke32@2372 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:53:42 +00:00
helixhorned
1ebdcf6443 polymost.c: More informative failure message for gloadtile_cached().
git-svn-id: https://svn.eduke32.com/eduke32@2371 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:53:23 +00:00
helixhorned
be0d5a7885 Use maps selector: draw files found in ZIPs with pal 8.
git-svn-id: https://svn.eduke32.com/eduke32@2370 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:53:07 +00:00
helixhorned
24c4364e3d cache1d.c: more meaning-preserving transformations, patch up one oob access.
lzwcompress can access one byte after lzwrawbuf[LZWSIZE] when provided with
an uncompleng of LZWSIZE, so we increase that array's size by one.

git-svn-id: https://svn.eduke32.com/eduke32@2369 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:52:53 +00:00
helixhorned
3dfb04d343 cache1d.c: formatting and trivial changes.
Remove dfread and kdfwrite, only leave a recipe how to get their
source from the respective used functions.

git-svn-id: https://svn.eduke32.com/eduke32@2368 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:52:38 +00:00
helixhorned
e45e969d89 cache1d.c: rename three variables, put commented out code at the end.
git-svn-id: https://svn.eduke32.com/eduke32@2367 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:52:22 +00:00
helixhorned
c88854b770 cache1d.c: allocate internal LZW buffers statically instead of with allocache.
git-svn-id: https://svn.eduke32.com/eduke32@2366 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:52:04 +00:00
terminx
b305b31b1f Rebuild nedmalloc.dll using newest git sources
git-svn-id: https://svn.eduke32.com/eduke32@2365 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-19 04:07:14 +00:00
helixhorned
97ebb029d6 Make compiler happy: remove 'may be used uninitialized' warning in multivoc.c.
I'm not getting this warning (synthesis is) but I think it's justified because
the VOC block parsing code isn't terribly validating...

git-svn-id: https://svn.eduke32.com/eduke32@2364 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:15:35 +00:00
helixhorned
2d6f24a3f2 Fix a potential free() of stack memory in screenshot code. Ouch!
git-svn-id: https://svn.eduke32.com/eduke32@2363 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:15:19 +00:00
helixhorned
165d291a48 Comment out unused dfread and kdfwrite functions in cache1d.c.
git-svn-id: https://svn.eduke32.com/eduke32@2362 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:15:04 +00:00
helixhorned
103a6e76f9 constify various cache1d and pragmas functions, some copybuf* -> memcpy/move.
The following functions have const qualifiers attached for the 'destination'
arguments: kdfwrite, dfwrite in cache1d.c and copybuf{byte,reverse,} in the
pragmas source or headers.  A couple uses of the latter ones were replaced
with calls to standard library functions.

git-svn-id: https://svn.eduke32.com/eduke32@2361 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:14:45 +00:00
helixhorned
b51a3d91a3 cache1d.c: debugging feature routing all allocache requests to malloc.
This is useful to debug out-of-bound violations for memory allocated
with that function.

git-svn-id: https://svn.eduke32.com/eduke32@2360 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:57:07 +00:00
helixhorned
1ad110ff6a menus.c: rename _bar to sliderbar.
git-svn-id: https://svn.eduke32.com/eduke32@2359 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:52 +00:00
helixhorned
079056df67 Menus: make aspect ratio also control r_usenewaspect.
- RENDERER SETUP is now also accessible from classic, with only 2 options:
  'aspect ratio' and 'ambient light level'
- remove the latter option from the VIDEO SETUP menu
- When compiled with OpenGL, the aspect ratio option cycles between 3 states:
  r_usenewaspect=1 (the modern way), and r_usenewaspect=0 but r_widescreen=0/1.
  In non-GL builds, there are only 2 states.
- don't display black translucent overlay in COLOR CORRECTION menu

git-svn-id: https://svn.eduke32.com/eduke32@2358 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:39 +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
60020d2dd4 In the user map selector, sort file names case-insensitively on Unix'y systems.
This makes more sense because the game selector draws the names with uppercase
letters and the hotkeys to jump to a map starting with a particualar letter
aren't case sensitive, either.  Mapster32's selector will still display maps
starting with upper case first.

git-svn-id: https://svn.eduke32.com/eduke32@2356 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:13 +00:00
helixhorned
b4f63547c4 Fix non-asm build, I forgot a line with the preceding change.
git-svn-id: https://svn.eduke32.com/eduke32@2355 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:55:59 +00:00