This DOES NOT fix the more complex issue discussed at the forums.
git-svn-id: https://svn.eduke32.com/eduke32@4592 1a8010ca-5511-0410-912e-c29ae57300e0
The 'clean' and 'veryclean' targets are usually run without environment options.
It is preferable if they clean out all object files that are possible with any.
git-svn-id: https://svn.eduke32.com/eduke32@4591 1a8010ca-5511-0410-912e-c29ae57300e0
The volume and level number for the music are stored in the last two bytes
of the board file name array. No version bump is required.
git-svn-id: https://svn.eduke32.com/eduke32@4589 1a8010ca-5511-0410-912e-c29ae57300e0
The additional space was there all the time, so it's not understandable why
another array was necessary.
CON: for 'music', error if volume number is outside [0 .. MAXVOLUMES+1], and
in LunaCON, additionally warn if it's MAXVOLUMES+1 (0 is preferred for that).
git-svn-id: https://svn.eduke32.com/eduke32@4588 1a8010ca-5511-0410-912e-c29ae57300e0
The OSD command is invoked like "music E5L3" (case insensitively).
git-svn-id: https://svn.eduke32.com/eduke32@4587 1a8010ca-5511-0410-912e-c29ae57300e0
In C-CON's qsubstr, error if <start> is not in [0 .. MAXQUOTELEN-1]
or <length> is negative.
git-svn-id: https://svn.eduke32.com/eduke32@4583 1a8010ca-5511-0410-912e-c29ae57300e0
The winding of a loop -- with clockdir() -- is determined by examining the
two line segments spanned between the points following a leftmost point of
the loop. If the loop contains a leftmost point that belongs to the "right"
side (as can happen with sliding door constructions), there's a chance that
an outer loop is misclassified.
git-svn-id: https://svn.eduke32.com/eduke32@4580 1a8010ca-5511-0410-912e-c29ae57300e0
And use these in jmact/mathutil.c's FindDistance2D()/FindDistance3D().
The main use is to allow passing dx/dy instead of sprite positions; the code
that actually uses this is not committed.
git-svn-id: https://svn.eduke32.com/eduke32@4579 1a8010ca-5511-0410-912e-c29ae57300e0
They classify former uses of int64_t into two classes:
- coord_t: those that represent coordinates and need 64-bit precision for
proper functioning with large values
- inthi_t: those that were added for e.g. casts merely to prevent undefined
behavior on overflow
DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4578 1a8010ca-5511-0410-912e-c29ae57300e0
Such as "vid_gamma". In that case, setbrightness() would have been
called without basepaltableptr having been initialized.
The fix is by moving the preparational setbasepaltable() call from
ExtPostStartupWindow() to ExtInit(), just before the OSD command
dispatching.
git-svn-id: https://svn.eduke32.com/eduke32@4573 1a8010ca-5511-0410-912e-c29ae57300e0
This could happen when building outside the "classic" grid limits and would
then lead to e.g. incorrect loop assignment on sector splitting. Bug reported
by MetHy.
git-svn-id: https://svn.eduke32.com/eduke32@4572 1a8010ca-5511-0410-912e-c29ae57300e0
Inspired by
http://forums.duke4.net/topic/7506-tror-question/page__view__findpost__p__199151
the corruption checker now checks for certain conditions of the loops of each
sector. Recall that CW loops are outer and CCW loops are inner.
- If a sector has no or more than one outer loop, count that as corruption
(level 4 and 3, respectively).
- (Disabled) For sectors with exactly one outer loop, check that all inner
ones are inside it. This is currently not compiled due to an asymmetry of
loopinside() for degenerate cases, similar to pre-r3898 inside().
git-svn-id: https://svn.eduke32.com/eduke32@4569 1a8010ca-5511-0410-912e-c29ae57300e0
There are no intended changes of functionality, it's readability tweaks only.
git-svn-id: https://svn.eduke32.com/eduke32@4568 1a8010ca-5511-0410-912e-c29ae57300e0
Note to MSVC users: You can get the revision number if you run `make rev o=obj` with MinGW before you build.
DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4565 1a8010ca-5511-0410-912e-c29ae57300e0
-sdlayer: Apple and GTK are not mutually exclusive.
-Makefile.common: Specify WITHOUT_GTK?=1 by default.
-Makefile: Limit linking with the QuickTime framework to OS X 10.6 and below.
One fix from me:
-osxbuild.sh: Fix building tools.
git-svn-id: https://svn.eduke32.com/eduke32@4548 1a8010ca-5511-0410-912e-c29ae57300e0
-Respect CC and CXX if already set in the environment.
-Respect CFLAGS, CXXFLAGS, and LDFLAGS if set or specified.
-Give packagers the setting "PACKAGE_REPOSITORY=1" to prevent us from adding our own optimization parameters.
git-svn-id: https://svn.eduke32.com/eduke32@4547 1a8010ca-5511-0410-912e-c29ae57300e0
1 compiler error.
2 compiler warnings.
1 runtime warning.
Note that at this time, CPLUSPLUS=1 LUNATIC=1 fails to build due to C++ function mangling, and Win64 Lunatic crashes.
DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4540 1a8010ca-5511-0410-912e-c29ae57300e0
1. The application must specify its proper name and technical name. Instead of eduke32_or_mapster32.crash.log, we now have eduke32.crash.log and mapster32.crash.log.
2. The exception handler will display a message box informing the user of a crash and requesting they send in the crash log. The box has three options: "Quit", the DLL's current behavior, "Continue", which passes the exception to the next handler, and "Ignore", which resumes execution immediately. These should allow the user to skip bogus exceptions picked up by ebacktrace, such as one I get with my laptop that causes EDuke32 no issues.
git-svn-id: https://svn.eduke32.com/eduke32@4538 1a8010ca-5511-0410-912e-c29ae57300e0
Note that the user map function still overwrites everything in slot E1L8 for the time being, which is a deeper problem I need to address.
git-svn-id: https://svn.eduke32.com/eduke32@4525 1a8010ca-5511-0410-912e-c29ae57300e0
LOGO_NOE1ENDSCREEN
LOGO_NOE2ENDSCREEN
LOGO_NOE3RADLOGO
LOGO_NODUKETEAMTEXT
LOGO_NODUKETEAMPIC
As part of this, the LOGO_NOE*BONUSSCENE flags no longer remove the entire end sequence in one go. They now only remove the primary cinematic. If you want their previous effect, you'll have to add these additional bits.
git-svn-id: https://svn.eduke32.com/eduke32@4514 1a8010ca-5511-0410-912e-c29ae57300e0
That is, the reverse of what is returned with the first outarg. Use that in
lunatic/util/foreachmap.lua. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4499 1a8010ca-5511-0410-912e-c29ae57300e0
When that mode is enabled (see below for caveats), wall textures that have a
non-power-of-two height (call it 'h') will be modified to look like in classic:
Let 'H' be the next power of two greater than 'h'. The texture will be uploaded
with height 'H', made up from 'h' hlines of the original texture, followed by
'H'-'h' first hlines of the same.
No panning "corrections" will take place. The mode is disabled by default.
Caveats/notes:
* the mode requires that r_hightile is disabled
* it is not implemented in Polymer
* in the Lunatic build, it is ineffective when a VX map is loaded, as those
display walls with NPOT height textures correctly
git-svn-id: https://svn.eduke32.com/eduke32@4498 1a8010ca-5511-0410-912e-c29ae57300e0
Mouse/touch/pointer support is yet to come. #SOON.
Exposure to scripting is a LONG way off. Months. The spec and data structure needs time for comment and revision. The eventual scripting access will be Lua-only.
git-svn-id: https://svn.eduke32.com/eduke32@4496 1a8010ca-5511-0410-912e-c29ae57300e0
Note that x-flipping is determined by the cstat of the upper part of the wall
(that is, the wall facing the player, not the nextwall, from which the picnum
for the bottom part is taken.)
git-svn-id: https://svn.eduke32.com/eduke32@4493 1a8010ca-5511-0410-912e-c29ae57300e0
... and cull code that is dead with the X*alloc() versions since they never
return NULL on requesting memory.
Use something like
git grep '[^Xx]\(m\|c\|re\)alloc *('
and
git grep '[^Xx]strdup *('
to see places where I left the B*alloc() calls intact.
BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4491 1a8010ca-5511-0410-912e-c29ae57300e0
These wrap the x*alloc or xstrdup functions in compat.c. The handler gets passed
__FILE__, __LINE__ and __func__ (if available) in debugging builds.
Terminating the application process immediately in case of allocation failure
will let us prune many error handling paths and simplify a good portion of code.
git-svn-id: https://svn.eduke32.com/eduke32@4490 1a8010ca-5511-0410-912e-c29ae57300e0
- in mdloadskin() and gloadtile_hi(), use new function check_nonpow2()
(bit-twiddling) instead of loop
- Replace a couple of missed literals with CACHEAD_* enum labels
git-svn-id: https://svn.eduke32.com/eduke32@4488 1a8010ca-5511-0410-912e-c29ae57300e0
Note: in polymer.c, this was buggy (but harmless) because .r is a char:
if ((uint32_t)hictinting[MAXPALOOKUPS-1].r & 0xFFFFFF00) != 0xFFFFFF00)
git-svn-id: https://svn.eduke32.com/eduke32@4487 1a8010ca-5511-0410-912e-c29ae57300e0
Specifically, the handling of one-way walls ([1] in Mapster32) was slightly
different.
git-svn-id: https://svn.eduke32.com/eduke32@4484 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the subway sound not played once on map initialization.
git-svn-id: https://svn.eduke32.com/eduke32@4481 1a8010ca-5511-0410-912e-c29ae57300e0
This only affects zombie actors in a sector with a parallaxed ceiling. If they
have SFLAG_NOSHADE clear, their shade is taken from the ceiling upon
changing the statnum. Previously, A_CheckSpriteFlags() received a value that
could only be 0 or 1 for the sprite index (typo).
git-svn-id: https://svn.eduke32.com/eduke32@4477 1a8010ca-5511-0410-912e-c29ae57300e0
Mostly, these are rendering-related variables. We keep *writing* them to
mapster32.cfg so that older Mapster32 versions can be used side-by-side
for now.
git-svn-id: https://svn.eduke32.com/eduke32@4462 1a8010ca-5511-0410-912e-c29ae57300e0
This mode does not take a sector's visibility values into account for uniform
darkening of a texture. It is more faithful to classic with respect to
fog/visibility *distances*, but may be less so as far as the "tint" of the
texture due to visibility attenuation is concerned.
git-svn-id: https://svn.eduke32.com/eduke32@4459 1a8010ca-5511-0410-912e-c29ae57300e0
That is, for every for palette (now, even ones created by the user) the last
shade is the (or rather, a color close to the) full fog color by construction.
In loadpalette(), reject a PALETTE.DAT with only one shade level.
git-svn-id: https://svn.eduke32.com/eduke32@4458 1a8010ca-5511-0410-912e-c29ae57300e0
Concretely, for all 1 <= i <= 255, make graypalookup[31][i] := graypalookup[31][0].
Also document 'fogpal' in the Lunatic doc.
git-svn-id: https://svn.eduke32.com/eduke32@4456 1a8010ca-5511-0410-912e-c29ae57300e0
Also,
- add a static assertion to engine.c
- gameexec.c: compile out an unused function in Lunatic builds
git-svn-id: https://svn.eduke32.com/eduke32@4451 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the game not process as many ticks as have elapsed during the saving
afterwards.
git-svn-id: https://svn.eduke32.com/eduke32@4450 1a8010ca-5511-0410-912e-c29ae57300e0
Previously, the check was for the hard-coded sound number. This made it
impossible to change difficulty selection sounds via EVENT_SOUND.
git-svn-id: https://svn.eduke32.com/eduke32@4449 1a8010ca-5511-0410-912e-c29ae57300e0
For convenience, orientation gets bit 1 (translucency) set automatically.
Again, test/screentext.con is updated to show off this functionality (the
code there assumes that additive blending tables are loaded at blend
numbers 101 -- 132).
BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4428 1a8010ca-5511-0410-912e-c29ae57300e0
The extended PALETTE.DAT format can now carry a trailing byte, called
'lognumalphatables'. If it is present, the engine assumes that alpha blending
tables are loaded at blend indices 1 to 1<<lognumalphatables and handles
rotatesprite's alpha and spriteext[].alpha accordingly.
The ability to save this new byte is added to engine.lua:savePaletteDat()
and the corresponding convenience functions in shadexfog.lua.
Examples test/screentext.con and test/sprite_access.con are updated for
demonstration purposes.
git-svn-id: https://svn.eduke32.com/eduke32@4426 1a8010ca-5511-0410-912e-c29ae57300e0
Hook up those from test/shadexfog.lua and some debugging ones from engine.lua.
git-svn-id: https://svn.eduke32.com/eduke32@4419 1a8010ca-5511-0410-912e-c29ae57300e0
The overall situation is thus as follows:
- in C and from Lua, that member is called 'fogpal'
- In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias;
'filler' wasn't available before, either.
- In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)
git-svn-id: https://svn.eduke32.com/eduke32@4416 1a8010ca-5511-0410-912e-c29ae57300e0
That is, if that member has a nonzero value, that one is taken for the color of
the GL fog instead of (most of the time) sector[].floorpal. "Sky sectors", that
is, skyboxes or simply parallaxed floors/ceilings are *not* handled.
git-svn-id: https://svn.eduke32.com/eduke32@4415 1a8010ca-5511-0410-912e-c29ae57300e0
The state quries the user for four values: ref. picnum, target picnum, max.
ldist and a lotag. Then, for all sprites i (of ref. picnum), for all sprites j
(of target picnum), if ldist(i,j)<=maxldist, sprite j's lotag is changed to the
provided one.
Also add lunatic/test/maputil.lua, containing a similar function but allowing
to customize the selection predicates of the ref. and target sprites, as well
as the action to carry out.
git-svn-id: https://svn.eduke32.com/eduke32@4414 1a8010ca-5511-0410-912e-c29ae57300e0
Also, extend the documentation for r_usenewshading a little. Specifically,
note when the different modes were introduced. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4410 1a8010ca-5511-0410-912e-c29ae57300e0
It was plainly noticeable in the editor's tile info display, for
example.
git-svn-id: https://svn.eduke32.com/eduke32@4409 1a8010ca-5511-0410-912e-c29ae57300e0
This is done by factoring out some polymer.c:polymer_getbuildmaterial() code
into polymer_eligible_for_artmapping() and using that. The one in polymer.c
can still determine to not use ART mapping on some ("rare"?) occasions, so
it's not 100% in sync.
git-svn-id: https://svn.eduke32.com/eduke32@4407 1a8010ca-5511-0410-912e-c29ae57300e0
- factor out eligible_for_tileshades()
- remove some rendmode 1 code
- move some auto vars further down
git-svn-id: https://svn.eduke32.com/eduke32@4406 1a8010ca-5511-0410-912e-c29ae57300e0