Commit Graph

2539 Commits

Author SHA1 Message Date
hendricks266 9d74cd700e Add "specularpower" and "specularfactor" as synonyms of "specpower" and "specfactor" respectively.
git-svn-id: https://svn.eduke32.com/eduke32@2539 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:06:31 +00:00
hendricks266 9f61e6e2d5 Superficial text changes:
- Help window text cleaned and made more consistent between game and editor
 - Added help entry for "-clipmap"
 - Log text for using CON, DEF, and RTS files has been made consistent
 - All instances of '%s' have been replaced with \"%s\" because ' is a valid filename character. (At least on Windows.)

git-svn-id: https://svn.eduke32.com/eduke32@2538 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:05:57 +00:00
hendricks266 3929d60744 OS X: Fix more warnings.
git-svn-id: https://svn.eduke32.com/eduke32@2537 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:04:21 +00:00
plagman 90e410cf47 polymer: cull sprite lights after computing sprite geometry
This was broken ever since updatesprite() had been forked off drawsprite() and
would cause static lights to never hit static sprites until one or the other
changed, after which the light would always get culled against outdated sprite
geometry.

git-svn-id: https://svn.eduke32.com/eduke32@2536 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 00:55:53 +00:00
plagman 3818282811 polymer: don't shadow-optimize light culling in cached sprites
Since updatesprite() only happens once for static sprites, avoiding
light culling if we hit it in a shadow pass means that sprite will
never be lit as long as that happens.

git-svn-id: https://svn.eduke32.com/eduke32@2535 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 00:55:41 +00:00
helixhorned ef7ad7b554 Lunatic: more complex gamevar-decl code.
git-svn-id: https://svn.eduke32.com/eduke32@2534 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:01:36 +00:00
helixhorned b897a59d82 Bound-check the 'picnum' argument to rotatesprite; tweak CON digitalnumber check.
There are instances where oob picnums may propagate to that function, so
protect it.  The digitanumber[z] bound check is actually made more permissive,
but could also just as well be removed now.

git-svn-id: https://svn.eduke32.com/eduke32@2533 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:01:21 +00:00
helixhorned 6cd11d0468 Accumulated trivia.
- engine.c: move some variables into a lower block
- premap.c: clearbufbyte --> Bmemset

git-svn-id: https://svn.eduke32.com/eduke32@2532 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:01:03 +00:00
helixhorned c4efd9b1fa Take over more correct G_AddGroup from game.c to astub.c.
The code in the editor was potentially doing a strcat on a strdup'd string.
Also, rename AddGamePath to G_AddPath in astub.c and add CODEDUP markers
because shared stuff like this ought to be factored out into a separate
source file some time.

git-svn-id: https://svn.eduke32.com/eduke32@2531 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:00:42 +00:00
helixhorned 694acef9fe Allow up to 7 skills, coded by M210 and taken over with modifications.
Skill names are defined via 'defineskillname' as before, but the index
of the last non-empty skill name (plus one) is taken as the skill count.
So, if you only define the 6th, there will be no effect.
Note that currently, there is no way to specify less than four skills
because the CON parser doesn't allow the empty string for the name (it'll
go beyond the line) and because the default skill names are initialized in
EDuke32 too, in addition to the CONs.

git-svn-id: https://svn.eduke32.com/eduke32@2530 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:00:27 +00:00
helixhorned e706258c43 Fix an assertion failure with dorotatesprite 4-pixels vline drawing.
See http://forums.duke4.net/topic/5362-crash-with-current-svn/

git-svn-id: https://svn.eduke32.com/eduke32@2529 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:55:03 +00:00
helixhorned 386d34e3b4 Fix static-main-arrays debug build, which is without the clipshape feature.
git-svn-id: https://svn.eduke32.com/eduke32@2528 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:54:46 +00:00
helixhorned adc8b302ea Factor out two practically identical instances of ceiling/floor setup code.
git-svn-id: https://svn.eduke32.com/eduke32@2527 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:54:31 +00:00
helixhorned 102e97659d Factor out assignment of various globals in 4 instances of wall drawing code.
This makes the differences in these codes stand out much more clearly.

git-svn-id: https://svn.eduke32.com/eduke32@2526 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:54:14 +00:00
helixhorned 549e9f6216 Make "LIBS+= $(L_SSP) -Wl,--enable-auto-import" conditional to Windows.
git-svn-id: https://svn.eduke32.com/eduke32@2525 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 15:59:53 +00:00
helixhorned cd3947f3f4 Correct 'nofloorpalrange' range clamping, move one get_hud_pal() farther down.
The nofloorpalrange beginning and end indices are silently clamped to 1 .. 255.

git-svn-id: https://svn.eduke32.com/eduke32@2524 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 15:59:39 +00:00
hendricks266 0122764017 - Makefiles:
- Fix typo, correctly adding SDL libs to the tools on OS X so that makesdlkeytrans builds.
  - Move all mention of $(LIBS) out of build/Makefile into build/Makefile.shared because no linking takes place in the engine itself so LIBS additions were lost. This should fix USE_LIBPNG=1 on Windows at least.
- Other assorted cleanup.

git-svn-id: https://svn.eduke32.com/eduke32@2523 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 08:30:28 +00:00
hendricks266 62dd05a2e5 Update credits in menus.c with people from the Credits wiki page. Also, fix the text and order of other entries.
git-svn-id: https://svn.eduke32.com/eduke32@2522 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:24:30 +00:00
hendricks266 fd71c5ef4c Build tools:
- Fix up and add building instructions for kmd2tool, getdxdidf, and makesdlkeytrans.
 - Add kmd2tool to "utils" build job.
 - Fix warning in and cross-platform building of generateicon.
 - Source and text cleanup!

git-svn-id: https://svn.eduke32.com/eduke32@2521 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:23:46 +00:00
hendricks266 64595adfb2 Makefiles:
- Properly handle the architecture definition when BUILD32_ON_64=1
 - Add proper $(*LDFLAGS) to which LTO and ARCH are correctly passed.
 - Cleanup of compiler flag variables.

This should fix to some degree building of the Build tools on OS X, and it may possibly fix the crashing of the OS X x86 32-bit build.

git-svn-id: https://svn.eduke32.com/eduke32@2520 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:22:10 +00:00
helixhorned d51d9a0fb8 Rather trivial changes in engine.c and crc32.c.
git-svn-id: https://svn.eduke32.com/eduke32@2519 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:48:06 +00:00
helixhorned b5894eb7e0 Make 'nofloorpalrange' def token affect HUD weapons.
git-svn-id: https://svn.eduke32.com/eduke32@2518 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:47:47 +00:00
helixhorned 5944a9ab0f New game def token "nofloorpal <pbeg> <pend>", disabling sprites taking on floor pals.
It has always annoyed me how floors with "shirt-color" type palookups like 21
affected the color of its containing sprites and HUD-drawn stuff.  This commit
allows one to specify an inclusive range of pals for which this should be
disabled for sprites (but not for HUD stuff, yet).

git-svn-id: https://svn.eduke32.com/eduke32@2517 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:47:29 +00:00
helixhorned 85ab7d2e39 Remove global 'uint8_t *anim_pal' which was only used once as a temporary.
git-svn-id: https://svn.eduke32.com/eduke32@2516 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:47:13 +00:00
helixhorned 3e1a8c523d In Mapster32, remove ReadGamePalette() and GAMEpalette[] and use engine's palette[].
git-svn-id: https://svn.eduke32.com/eduke32@2515 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:56 +00:00
helixhorned 55dc8fee40 Make engine.c's loadpalette return -1 if palette.dat is not found.
... and initengine now returns 1 if loadpalette() fails.

git-svn-id: https://svn.eduke32.com/eduke32@2514 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:39 +00:00
helixhorned 993b971107 editor: Factor out 'rainbow' drawing code and use bytesperline instead of xdimen.
git-svn-id: https://svn.eduke32.com/eduke32@2513 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:23 +00:00
helixhorned 46246b8ab7 Comment out computergetinput() and children, which are unused since ng netcode.
git-svn-id: https://svn.eduke32.com/eduke32@2512 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:07 +00:00
helixhorned 23bb14f8aa In in-game overhead map, don't draw invisible extended floors.
git-svn-id: https://svn.eduke32.com/eduke32@2511 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:45:41 +00:00
hendricks266 2c27c33da8 Makefile: Link to libz on OS X like on Windows.
git-svn-id: https://svn.eduke32.com/eduke32@2510 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:33:24 +00:00
hendricks266 5564537510 Makefile: Update/fix treatment of libpng libraries and headers under Windows and OS X.
git-svn-id: https://svn.eduke32.com/eduke32@2509 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:30:50 +00:00
hendricks266 dbbfb2d73b osxbuild.sh: Partial solution for non-building tools: remove "-j 3" parameter. (The -k [--keep-going] parameter has been added just to the tools for a small bit of good measure.)
git-svn-id: https://svn.eduke32.com/eduke32@2508 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:29:46 +00:00
hendricks266 a35dc578e0 Makefiles: Add $(STATICSTDCPP) variable which the user can set to 0 or 1 to explicitly set C++ standard library linking to static or shared respectively. By default it is transparently left blank.
An effect is only really seen in the buildtools written in C++, currently just arttool.
This is mainly of interest to distributors of the buildtools to avoid missing DLL errors.

git-svn-id: https://svn.eduke32.com/eduke32@2507 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:29:11 +00:00
hendricks266 270342463f More "malloc + strlen + strcpy --> strdup" in module parameter code.
git-svn-id: https://svn.eduke32.com/eduke32@2506 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:28:22 +00:00
helixhorned ea9abc58c9 Probably fix sheared PNG screenshots.
We shouldn't assume a particular bytes-per-line value and use ylookup[] instead.
Specifically, windowed modes on Windows use a frame buffer that always has odd
x dimension.

git-svn-id: https://svn.eduke32.com/eduke32@2505 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 18:32:16 +00:00
helixhorned 51398ca749 Rename 'numpalookups' to 'numshades' internally.
git-svn-id: https://svn.eduke32.com/eduke32@2504 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 18:32:00 +00:00
helixhorned 8a50b75de2 Weirdness removal in G_LoadExtraPalettes (which reads lookup.dat).
- replace bit tweaking for big endian archs with clear code
- allow palette lookups >= 128, previously we read into a signed byte

git-svn-id: https://svn.eduke32.com/eduke32@2503 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 18:31:37 +00:00
helixhorned 97020caf73 Clear up after r2495. (Because I'm a pedantic asshole.)
- in Mapster, pre-form the default 10 clip map names before returning from
  G_CheckCommandLine() so it gets loaded even if we passed no cmdline args.
- malloc + strlen + strcpy --> strdup
- don't need to spank dead variables ;)
- we may call calloc with zero size, which isn't bad by itself, but asserting
  for non-null afterwards is.  Allocs of 0 are implementation-defined, and may
  well return a null pointer (C99 7.20.3).

git-svn-id: https://svn.eduke32.com/eduke32@2502 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:18:32 +00:00
helixhorned 9628041766 Assorted trivia.
Make some computer Duke opponent variables in player.c static.

git-svn-id: https://svn.eduke32.com/eduke32@2501 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:18:12 +00:00
helixhorned 359614df70 Input validation: guard makepalookup 'pal', 2dcol 'col'. Add one const.
git-svn-id: https://svn.eduke32.com/eduke32@2500 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:17:51 +00:00
helixhorned eb52100654 Use vlineasm4 for the upright-oriented rotatesprite in C-replacements build.
Gives a couple more fps for scenes where much screen estate is covered by
stuff, like when holding the devastator.

git-svn-id: https://svn.eduke32.com/eduke32@2499 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:17:32 +00:00
helixhorned 020c60feec Port tvlineasm2 to C and enable transmaskvline2 code also for all-C builds.
With the same setup as before, a screen-filling translucent wall (with nothing
drawn behind it) renders at about 7 fps faster (from 60-something fps initially)

git-svn-id: https://svn.eduke32.com/eduke32@2498 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:17:17 +00:00
helixhorned e191a915f7 Port [m]vlineasm4 to C replacements and enable for solid and masked walls.
These two functions draw a vertical line 4 neighboring pixels at a time.
This gives a significant speed boost for a full screen solid and masked wall
scene for x86_64 (where we have plenty of registers), about 60 --> 76 fps.

git-svn-id: https://svn.eduke32.com/eduke32@2497 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:16:57 +00:00
helixhorned 68603b0a28 Mapster32 tag-label system: don't consider 'switch' walls with an upwall as linking.
git-svn-id: https://svn.eduke32.com/eduke32@2496 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 23:16:37 +00:00
hendricks266 cf2b9ec940 New "-clipmap" command-line switch to specify sector collision clip maps. This switch works in an additive fashion like -mx and -mh. _clipshape0.map through _clipshape9.map remain loaded by default.
Also, a very minor change in the con/def module code. (int --> int32_t)

git-svn-id: https://svn.eduke32.com/eduke32@2495 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 08:50:41 +00:00
hendricks266 d03ec12e92 osxbuild.sh: Potential fix for the $commonargs bash variable.
git-svn-id: https://svn.eduke32.com/eduke32@2494 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 08:49:22 +00:00
hendricks266 3503a42a9a Buildtools: Add "unpackssi" and "Build Customization Suite" [Palette Importer/Extractor] (bsuite), both by JonoF. I have rewritten bsuite to use command-line arguments rather than a 16-bit real mode DOS UI. Both programs have had all warnings fixed and whitespace corrected.
git-svn-id: https://svn.eduke32.com/eduke32@2493 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-18 08:48:32 +00:00
helixhorned 0f7615daf7 Remix undo/redo system, fixing potential access of freed memory.
A run of consecutive mapstates may share sector/wall/sprite blocks, but
the code was deciding whether to free them solely on local properties.
Now, save a reference count at the beginning of each such allocated block
and free it only if it reaches zero.

git-svn-id: https://svn.eduke32.com/eduke32@2492 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-17 11:35:35 +00:00
helixhorned 4412d5729e In undo/redo, always print the revision that got _restored_.
git-svn-id: https://svn.eduke32.com/eduke32@2491 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-17 11:35:16 +00:00
helixhorned 5246f17169 "Promote" oob sectnum/statnum sprites to corruption level 4.
Also, always print at least level 5 corruptions (that is, have no instances
of completely silent corruptcheck).

git-svn-id: https://svn.eduke32.com/eduke32@2490 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-17 11:34:54 +00:00