Build 4873
SVN-
Generale
engine.c: fix clipmove() against floor-aligned sprites.
Mostra dettagli
Introduced in r3207. Oops.
-
Generale
engine.c: prevent an oob read of spriteext[] in drawsprite_classic().
Nickname SVN e nomi Git sono unificati per persona.
engine.c: fix clipmove() against floor-aligned sprites.
Introduced in r3207. Oops.
engine.c: prevent an oob read of spriteext[] in drawsprite_classic().
sounds.c: don't crash S_PlayMusic() if passed null pointer for 'fn'.
This may happen if no title/end music is defined from CON. Thanks to Zaxtor for the bug report.
actors.c: replace hard-coded list with missing check for SFLAG_NODAMAGEPUSH.
In A_RadiusDamage(). The code snippet that is disabled for such actors increases the damaged actor's .xvel by (4 times the) damage amount and is responsible for the strange effect of enemies becoming faster TOWARDS the player on being hit with an RPG frontally. Thanks to Fox for a keen eye.
disable mouse pointer if CROSSHAIR is void. DONT_BUILD.
In G_HandleMirror(), consult g_mirrorCount instead of gotpic[] w/ MIRROR.
DONT_BUILD.
Lunatic translator: add stand-alone option -fnames, generating names.h file.
disable all loop checks as they spam the log too much. DONT_BUILD.
The one introduced with r4569.
Propagate 'smoothratio' to scenes drawn from the position of a camera.
That is, make interpolation work properly there -- both when 'using' a VIEWSCREEN and when rendering the scene onto a TILE_VIEWSCR. This makes a difference only if the camera is in a moving sector.
Minor cleanup, mostly in engine.c:drawalls().
Prettify viewscreen turned to STATIC in breakable cameras mode. DONT_BUILD.
fix 'writearraytofile' for 64-bit platforms.
Tweak the behavior of viewscreens to what is more logical IMO.
- At a given time, at most one viewscreen may display TILE_VIEWSCR, namely that one which is g_curViewscreen - sync kinds of distance to compare against VIEWSCREEN_ACTIVE_DISTANCE (was Manhattan vs. dist(), now both the latter) - fix resetting to VIEWSCREEN tile when player is greater from it than that distance. When the player is closer to it again, it is *not* reset to TILE_VIEWSCR. - more sync'd g_curViewscreen and sprite[i].yvel (for 'i' being the viewscreen sprite) Note: in a multiplayer context, this needs to be thought about once more.
engine.c: clamp all indices for distrecip[] access, as more OOBs were observed.
allow passing more than one flag to the 'spriteflags' directive.
These will be bitwise-OR'd.
gamedef.c: factor out some dup'd code into C_BitOrNextValue(), C_FinishBitOr().
include wall[].ypanning in wall invalidation logic.
Fixes bug reported here: http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__213759
menus.c: Reset next-viewscreen-redraw counter from M_CloseMenu().
Minor cleanup around security cameras / viewscreens. DONT_BUILD.
The only semantic change is that an out-of-sync instance of a distance to check (viewscreen sprite <-> player sprite) is changed in actors.c:G_MoveStandables(), from 2048 (as in Duke3D 1.5) to 8192, now represented by the define VIEWSCREEN_ACTIVE_DISTANCE. I have not yet observed any change in behavior regarding this change (but there ought to be one). Also, in DNCOORDS display, print 'totalclock' count, too.
don't draw masked walls with void tile. DONT_BUILD.
This prevents displaying W_FORCEFIELD+1 masks (as e.g. in front of viewscreens) completely black with ART mapping. The old behavior, which is inconsistent with classic, is kept for one-sided masked walls, though.
sync MAXJOYAXES, add lunatic/test/sprite_addtv.con. DONT_BUILD.
Makefile.common: in non-release builds, explicitly pass -fno-omit-frame-pointer.
So that stack traces can be gotten with optimized DEBUGANYWAY builds, e.g. for Linux's 'perf' --> flame graphs. DONT_BUILD.
for '(display)rand*', use math.floor(); correct create_additive_trans() help.
DONT_BUILD.
show on-screen errors even in passive menu; fix '(display)rand*' for large values.
Also, some minor style cleanup in game.c. DONT_BUILD.
expose more members, properly handle setting ud.screen_size.
BUILD_LUNATIC.
fix handling of 'remappal' attribute for 'makepalookup'.
Pull setting g_noFloorPal[] further down, into makepalookup().
Now passed as last arg 'noFloorPal' to makepalookup(). Used as follows: - from loadlookups(): *false*, i.e. do take over floor pal. - from generatefogpals() [default fog pals] and fillemptylookups(): *true*, i.e. don't take over floor pal - from DEF 'fogpal': true - from DEF 'makepalookup': take over flag from pal from which we are remapping, or set to true if remapping from pal 0 - (CROSSHAIR_PAL: true) This should make the issue reported in http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__197583 resolve in a natural manner.
Move g_noFloorPal[] to the engine side and adapt other stuff accordingly.
- 'nofloorpalrange' DEF token: now handled for both game and editor (for the latter, it's effective only for "shade preview" mode, [']+[X]). - in generatefogpals(), assign g_noFloorPal[] = 1 for every generated (default) fog pal; get rid of its return value / g_firstFogPal
engine.c: prevent an oob access of uwall[] in ceilspritescan().
voxmodel.c: fix Polymost rendering of voxels.
This reverts/corrects two semantic changes of r4639 as far as what is now voxmodel.c (formerly part of mdsprite.c) is concerned. One correction ends up having no effect (m->bscale is always 1.f for voxel models, as far as I can see), but is the proper rewrite. Also, in osdcmds.c:registerosdcommands(), tweak two help strings.
fix tilesizx[]/tilesizy[] access. Can also 'copy' from them.
M32Script cleanup. Fixes at least one non-minor and one minor bug.
engine.c: minor stylistic changes. DONT_BUILD.
Since we're targeting C99/C++ now, we can finally declare variables as close to their use as possible.
fix actor[] and player[] indexing after LuaJIT bugfix 66515a054c0826ce.
implement 'qstrncat' command.
a-c.c: eliminate narrowing int32_t -> uint32_t conversions. DONT_BUILD.
Fix build on platforms not magically #defining UNREFERENCED_PARAMETER. DONT_BUILD.
Fix POLYMER=0 build and a couple of unused-variable warnings with it. DONT_BUILD.
In Lunatic build, make krand() a proper function again, called from Lua/FFI.
DONT_BUILD.
a-c.c: Compile vlineasm4nlogy() only if CLASSIC_NONPOW2_YSIZE_WALLS is #defined.
Also make three file-scope variables static.
engine.c: in wallscan(), fix oob of umost[] and dmost[] when x2 == xdim-1.
Analogously treat maskwallscan() and transmaskwallscan(), although I could not get the respective accesses to be oob, too.
do '(very)clean' with a plain "rm -f some/obj/*.o".
Notes: - In the 'clean' target, the "core*" arg to 'rm' was removed as I find it too unspecific. (Someone could have an unrelated file with that prefix lying around.) - The targets 'clean' and 'veryclean' now echo the commands they are about to execute. Also, in Makefile.common, resurrect sanitized Clang builds if DEBUGANYWAY=2 is passed (previously, that was triggered with RELEASE=0 DEBUGANYWAY=1).
astub.c: fix warnings with CPLUSPLUS=1 related to forgotten TrackerCast().
Fix taking over floor pal in the unlikely event that no fog pals are defined.
This DOES NOT fix the more complex issue discussed at the forums.
on 'clean' target, unconditionally rm -f game Lunatic objects.
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.
add actor.move() static function and documentation stub.
For usermaps, save and restore currently playing music index with savegames.
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.
Fix USE_OPENGL=0 build.
implement 'qsubstr' command. Add source/lunatic/test/qsubstr.con.
In C-CON's qsubstr, error if <start> is not in [0 .. MAXQUOTELEN-1] or <length> is negative.
Fix crash using INTERNAL DEFAULTS after CON error when CON modules were given.
ignore internal flag in gamevar redef check; allow "Pals" member.
demote wall check "corruptions" introduced in r4569 to level 2.
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.
Amend r4378 to hopefully make "stuck in water" fix work properly.
NOTE: lizmen may walk on water. I don't yet know why.
Properly consider sprites with a clipshape as bridge (p->spritebridge).
fix a crash when m32_settings.cfg contains video setting.
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.
fix possible integer overflow in loopinside().
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.
game.c: fix -game_dir and -j by moving G_ExtInit() after G_CheckCommandLine().
properly initialize values of session (NODEFAULT) gamevars.
prototypical checker for wall loops, enabled partially.
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().
Clean up astub.c:CheckMapCorruption() and some build.c code a little.
There are no intended changes of functionality, it's readability tweaks only.
A couple of Lunatic updates. DONT_BUILD.
- LunaCON: support for setting userdef[].m_volume_number, getting .last_level - bump con_lang.MAXEVENTS - fix compilation of astub.c
lunatic/util/build.lua: in readdefs(), add option of requesting picnum->name mapping.
That is, the reverse of what is returned with the first outarg. Use that in lunatic/util/foreachmap.lua. DONT_BUILD.
r_npotwallmode, emulating 8-bit for walls w/ nonpow2 height textures.
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
when pasting onto the bottom part of a [2]-wall, take over y-flipping.
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.)
Replace two missed literal numbers with SE_* enum labels.
Bye, bye, B*alloc(), all hail X*alloc()! Replace large portion of the calls...
... 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.
Miscellaneous cleanup, still with the same suspects...
- 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
Factor out commonly occuring hictinting[]-accessing code into three functions.
Note: in polymer.c, this was buggy (but harmless) because .r is a char: if ((uint32_t)hictinting[MAXPALOOKUPS-1].r & 0xFFFFFF00) != 0xFFFFFF00)
Replace various GL rendering related literal flags with enum labels.
- pthtyp pth->flags bits - Flags of the <dameth> argument of various functions - hictinting[].f / gloadtile_hi() and daskinloader() <effect> arg bits - hicreplctyp hicr->flags bits - texcacheheader cachead.flags bits
polymost.c: stylistic cleanup in gloadtile_hi, uploadtexture, fixtransparency.
in NPOT wall ypanning "correction", behave like Polymer in one corner case.
Specifically, the handling of one-way walls ([1] in Mapster32) was slightly different.