Luglio 2012
-
fix glitches where stuff would be drawn transiently on sect change.
Mostra dettagli
This was introduced with r2771, which fixed e.g. AMC TC city_si's mirrors, but instructed the base drawrooms inside yax_drawrooms to not correct the passed sectnum. Therefore, stuff would get drawn wrongly when passing sector boundaries, like from the platform to the rails in trueror1.map.
-
fix drawing mirrors, introduced by nonpow2-ysize wall/mask drawing.
Mostra dettagli
Some more drawing glitches remain.
-
Generale
Add description for 'remap' to mapster32.cfg, add 'setstartpos' to a.m32.
Mostra dettagli
The latter is commented out, since it has to be *compiled* with script_expertmode enabled.
-
hook up non-power-of-two ysize wall/mask drawing in asm builds, too.
-
add {,m,t}vlineasm1nonpow2, currently unreferenced from high-level drawing.
-
fix drawing of walls and maskwalls with non-pow2 y size tiles.
Mostra dettagli
Related to that, it looks like out-of-bounds accesses when drawing such walls/ maskwalls or *sprites* are fixed, too. Sprites still show a stray lines on some occasions, but Valgrind doesn't complain then.
-
Minor adjustments to the joystick defaults for the Classic Controller.
-
Generale
Fix disabling EVENT_DISPLAYCROSSHAIR by setting RETURN to 1. SECTOREFFECTOR is not a useful crosshair.
-
Generale
Remove BUTTON(gamefunc_Jump) and KB_KeyPressed(sc_Space) from AdvanceTrigger so you can type spaces in savegame names.
-
Generale
Fix for "undefined reference to `clock_gettime'" linking error on some Linux systems
-
don't try to factor textures from fallback skins
-
enable the texture factoring code for all palettes
-
Generale
Fix MinGW build.
-
Generale
Makefile.common: add a couple of C warning flags.
Mostra dettagli
Most notably, -Wdeclaration-after-statement. This and -Wpointer-arith give some warning on linux, but this is "harmless" as it's assumed that we'll be always compiling with GCC or Clang there. Also, erratum in the "Make ksqrt take uint32_t ..." commit: hypotenuse -> squared length of the hypotenuse
-
Generale
Constify various char* vars, parameters, etc. for more -Wwrite-strings cleanness
Mostra dettagli
-Wwrite-strings is useful to detect code where string literals and e.g. alloc'd strings are used side-by-side, potentially creating dangerous situations, or to find uses of old, non-constified APIs. However, enabling it would still flood the log with too many warnings. Also, GCC wrongly warns for initializations of char arrays.
-
const char *scripthist -> char *, since it's alloc'd/freed
-
Generale
actors.c: factor out 4 almost identical code instances into proj_spawn_and_sound
Mostra dettagli
Most differences are handled with function parameters, except that one instance checked SpriteProjectile[i].spawns for being >0 instead of >=0. The factored function always checks for >=0.
-
Generale
Make nsqrtasm return int32_t (instead of uint32_t) when compiled with GCC/x86.
-
Generale
Lunatic translator: a first codegen ansatz.
-
Generale
Make ksqrt take uint32_t, add helper function uint32_t uhypsq(int32_t,int32_t).
Mostra dettagli
uhypsq calculates the hypotenuse using unsigned multiplication. This is permissible since for arbitrary int32s a and b, the following holds in two's complement arithmetic: (int32_t)((uint32_t)a * b) == (int32_t)((int64_t)a * b) ("Signed and unsigned multiplication is the same on the bit level.") This fixes various overflows where wall lengths for walls of length > 46340 are calculated, but does not rid us of other overflows in the same vein (usually dot products between vectors where one point is a wall vertex and the other a position in a sector).
-
ksqrt, with timing and value test.
Mostra dettagli
The latter shows that "int32_t ksqrt(int32_t)" also copes with values in the range INT32_MIN..-1, effectively interpreting them as uint32_t (i.e. adding 2**32). However, this should not be relied on from CON.
Giugno 2012
-
Generale
Fix the overlooking of EDUKE.CON in the absence of DUKE3D.GRP caused by r2726. Also, tweak a few string literals' use of quotation marks.
-
Generale
Fix actors at action 0 executing the action C code protion in gameexec.c.
Mostra dettagli
The bug was introduced with SAMESIZE_ACTOR_T enabling in r2208. This fixes being unable to read the messages in A.Dream* by zykov eddy.
-
Generale
some trivial mapster tweaks
-
safety tweaks, expose more stuff
Mostra dettagli
Arrays inside structs must not be accessible, since they're not bound-checked by the FFI. Therefore, we flatten them into repeated scalar fields and need to write accessor functions later.
-
Generale
When teleporting silently, also set g_player[].ps->bobposx/y to the new position
Mostra dettagli
This fixes an integer overflow when a distance is calculated later.
-
Generale
Integer Overflow Offensive continued: first round of -ftrapv - cleanness.
Mostra dettagli
That is, "clang -ftrapv" builds don't abort almost immediately after entering a level. There are various classes of overflow bugs, needing different handling: - Some texture mapping code was written with signed integer wrapping semantics in mind. In some places, we're able to get away with unsigned casts. - sometimes, we really need a wider range, like when calculating distances or dot products - negating INT_MIN. Here, we cast to int64_t temporarily. Note that if the result is 32-bit wide, no 64-bit code may actually need to be generated. - shifting into a signed integer's sign bit. We cast to uint32 here. - in hitscan(), at the "abyss crash prevention code" comment, it's clearly the other code that is better... This is not merely done for pedantry, but rather makes it easier to track down overflow bugs having a real impact on the game.
-
Generale
Fix a thinko in a comment (about commenting) in build/Makefile.
-
Generale
engine.c: factor out two instances of dup code into setup_globals_sprite1()
-
Generale
premap.c: make P_RandomSpawnPoint more readable by factoring out g_player[snum].ps
-
Generale
Fix being unable to hit ENTER on VIDEO SETTINS -> RENDERER SETUP with classic.
-
various stuff
Mostra dettagli
- hitscan & related types and constants - profiling with gethitickms - translator: eval the opening parts of block commands early - fix getbunch
-
Generale
SDL layer: tweak high-resolution timers for profiling, add gethitickms().
Mostra dettagli
For SDL 1.2 and when building on linux, the code using clock_gettime(CLOCK_MONOTINIC, ...) is taken over from SDL HG. gethitickms() is a convenience function that return milliseconds as doubles and isn't exposed in any header file, yet.
-
Generale
Add prototypical SDL 2.X support.
Mostra dettagli
Doesn't work: indexed-color modes, gamma (at least for X11), mouse wheel, special keys like ENTER or BACKSPACE in the OSD, probably more... In build/Makefile.shared, we now have logic to autodetect an SDL2 installed in /usr/local, however OS X and Wii builds follow other Makefile code paths, it seems. Note that the matching SDL2_mixer must be used then, too. In source/jaudiolib/src/driver_sdl.c, change the #includes from <SDL/SDL_xxx.h> to "SDL_xxx.h". SDL wiki says this is the most portable way, hopefully this doesn't break builds for anyone.
-
Generale
Fix a single usage of S_IREAD instead of our BS_IREAD compatibility version
-
Generale
Fix useless "No error" message when loading palette.dat fails, change file casing in error message for failing to load tables.dat to reflect the filename actually passed to kopen4load().
-
Generale
Relative-aligned non-flipped ceiling/floor texture alignment ([;]+[ENTER])
Mostra dettagli
Flipped reference ceilings/floors aren't handled correctly yet.
-
Fix tweaking TROR wall links when flipping sectors ([X], [Y]).
Mostra dettagli
This was actually broken all the time except when ALL sectors were selected (which was what I tested incidentally when I wrote the first "fix"). D'oh!
-
Generale
Fix a drawing glitch with mirrors and TROR in classic.
-
offset displayed quotes a bit from the top of the screen to deal with overscan
-
Generale
Allow fogpal DEF command to fogify pal 0.
-
Generale
Add samples/r_usenewshading.map.
Mostra dettagli
This is to the cvar of the same name as samples/aspect.map is to r_usenewaspect.
-
Generale
polymost.c: make polymost_checkcoordinates() static
-
display zero-length walls as level-3 corruptions.
-
Generale
gamedef.c: some bound tweaks
-
Generale
Lunatic translator: ai/move/action.
Mostra dettagli
This exposes some problems in the default/in-the-wild CONs. As usual, we'll have to retrofit sensible semantics :rolleyes:.
-
Generale
Lunatic translator: define* et al
-
Generale
Lunatic t.: handle prefix-problematic commands for real, definelevelname, ...
-
Generale
Lunatic/LT: provide the predefined labels in con_lang, add "strict" from luajit.
Mostra dettagli
The latter is only for development, since the embedded version already has a undeclared-var-reference handling similar to that. Also fix parm2memberpat.
-
Generale
Integer Overflow Offensive, First Act: rintersect, hitscan, neartag.
Mostra dettagli
It's time to replace some int32s with 64-bit ints in core engine functions. The problem is that for example, the dot product is taken between vectors that may be the difference between two arbitrary points in a sector, so even if one sticks to the "no blue walls" rule, that doesn't guarantee freedom from overflows.