It would be something like "ProjectileData\[([^]]+)]\.([a-z_]+)".
git-svn-id: https://svn.eduke32.com/eduke32@3152 1a8010ca-5511-0410-912e-c29ae57300e0
This requires ripping out the .proj member of tiledata_t back into
ProjectileData[] again because it was the only one in g_tile[] that
changed during the course of a game. The g_tile[] array is now also
correctly flagged as "constant throughout a game" (DS_NOCHK).
Savegame version bumped.
git-svn-id: https://svn.eduke32.com/eduke32@3151 1a8010ca-5511-0410-912e-c29ae57300e0
It's still not pretty though since there's no interpolation from G_DrawRooms().
git-svn-id: https://svn.eduke32.com/eduke32@3149 1a8010ca-5511-0410-912e-c29ae57300e0
On the engine side (functions starting with L_), there are now the basic
parts like state creation and running code from strings and files.
The game and editor can add to that by e.g. loading whatever they please
into the state. Their functions start with El_ and Em_, respectively.
The Lua scripts still reside in source/lunatic, even for the common ones.
This is because they will be embedded into the binaries as bytecode or
compressed source eventually, so their location on disk will be irrelevant.
git-svn-id: https://svn.eduke32.com/eduke32@3148 1a8010ca-5511-0410-912e-c29ae57300e0
Also, enable showing sprites in Mapster32's overhead view again, since that
was one (the only?) use of that code path. The uninitialized read was
introduced in r2927.
git-svn-id: https://svn.eduke32.com/eduke32@3144 1a8010ca-5511-0410-912e-c29ae57300e0
Also, reorganize some G_DrawRooms() code a little without changing anything.
git-svn-id: https://svn.eduke32.com/eduke32@3143 1a8010ca-5511-0410-912e-c29ae57300e0
Instead of later in P_ProcessInput(). This fixes one drawrooms() call in
between where the sectnum is the camera's, but the position the player's,
which can lead to a slow "outer view" render in Polymer.
git-svn-id: https://svn.eduke32.com/eduke32@3142 1a8010ca-5511-0410-912e-c29ae57300e0
arrays; any write access to them will run the corresponding hook and write
to the [sector/wall/sprite/tsprite]clean array.
Note: tsprite and sprite use the same hook and require running a few more
instructions per access in order to disambiguiate; this could be made more
optimal (like the other arrays) by clearly separating the types in the game
code.
Note #2: taking a member's address currently marks it dirty because of tons
of helper functions across the editor code. I don't know how many read-only
accesses we have after taking a member address, but it could also be fixed
with some finessing of the code.
git-svn-id: https://svn.eduke32.com/eduke32@3138 1a8010ca-5511-0410-912e-c29ae57300e0
The command-line utility can query and set the frame rate of IVF files, since
apparently encoders don't care too much about setting proper values in the IVF
header. Also, add the utility to the synthesis build.
On the playback side in EDuke32, get rid of the 1/(2*fps) "correction" if the
FPS numerator is <1000 (presumably used in older encoders) and properly print
the frame rate's fractional part.
git-svn-id: https://svn.eduke32.com/eduke32@3131 1a8010ca-5511-0410-912e-c29ae57300e0
This means that the "Keyboard Setup" should now properly reflect the bindings,
except in the theoretical case of one gamefunc being bound more than two keys.
(What was fixed is the one key to many gamefuncs case.)
git-svn-id: https://svn.eduke32.com/eduke32@3126 1a8010ca-5511-0410-912e-c29ae57300e0
That section was only ever read in for little profit and never written
out! Keyboard input is actually dispatched as OSD commands for a good
while, so that old cruft has to go!
git-svn-id: https://svn.eduke32.com/eduke32@3125 1a8010ca-5511-0410-912e-c29ae57300e0
- Remove everything using CONTROL_KeyMapping, which was only written to.
- Remove unused functions, make local ones static.
- Remove private function declarations in _control.h.
git-svn-id: https://svn.eduke32.com/eduke32@3124 1a8010ca-5511-0410-912e-c29ae57300e0
separate tracker type by #defining __TRACKER_NAME and __TRACKER_GLOBAL_OFFSET.
eg.:
Then if you have a tracked value and a value of the same type at the given offset:
Tracker_1<int32_t> trackedInt;
int32_t trackedIntDirty = 0; // 4 bytes after
trackedIntDirty will become 1 everytime trackedInt changes.
git-svn-id: https://svn.eduke32.com/eduke32@3119 1a8010ca-5511-0410-912e-c29ae57300e0
Credit to Plagman for the idea and doing the work on the game side, which is included in this commit.
(Building as C++ will give us features with which we can make improvements and optimizations on the multiplayer code and Polymer.)
git-svn-id: https://svn.eduke32.com/eduke32@3116 1a8010ca-5511-0410-912e-c29ae57300e0
This is done by pressing LShift and
- holding down the left mouse button for scaling, or
- the right mouse button for rotating the highlighted walls/sprites
with respect to a pivot point determined as the center of the bounding box of
all highlighted points.
Note that scaling sectors isn't that easy and the current functionality is very
rudimentary: there's no z scaling, no xrepeat correction, and sprites aren't
touched expect for their position. The user is responsible to maintain map
consistency, for example to prevent wall-lines of the same sector crossing
each other.
git-svn-id: https://svn.eduke32.com/eduke32@3113 1a8010ca-5511-0410-912e-c29ae57300e0
We do this by messing with the GL texture that gets uploaded for CHAINGUN.
Since this is implemented on the engine side, the static value for CHAINGUN
(2536) is used, and the tile dimensions are compared to 211x55 to have a
little confidence that the tile wasn't overridden by a mod. Hack indeed.
git-svn-id: https://svn.eduke32.com/eduke32@3111 1a8010ca-5511-0410-912e-c29ae57300e0
Currently, the FPS determination is based on libvpx's vpxdec.c code, which uses
the FPS provided in the IVF file in one case, and simply sets it to 30 FPS in
the other. For the first case, a "correction" is carried out for something
which the comments suggest to originate from other (old?) VPX encoder versions.
git-svn-id: https://svn.eduke32.com/eduke32@3110 1a8010ca-5511-0410-912e-c29ae57300e0
When LShift is pressed and the mouse is over a linking sprite (as determined by
the tag labeling system), lines are drawn to all other sprites, and pressing
[ or ] will cycle these then. False positives and missed sprites are possible.
Additional changes:
- consider SE 31 and 32's lotag to NOT be linking, since the ACTIVATOR is what
matters. The original maps are inconsistent there.
- When pressing Alt+[ or Alt+] and there are no corruptions, say so instead of
doing [ or ].
git-svn-id: https://svn.eduke32.com/eduke32@3108 1a8010ca-5511-0410-912e-c29ae57300e0
This event is useful in certain circumstances where you want to skip a menu/screen value and the design of the monster switch statement would require the M_ChangeMenu() call to be intercepted or the unwanted screen will flash for a split second.
git-svn-id: https://svn.eduke32.com/eduke32@3101 1a8010ca-5511-0410-912e-c29ae57300e0
These control the maximum difference in height between two sectors that the player will automatically traverse without needing to jump.
The latter controls the special case when the player's sector's lotag is ST_1_ABOVE_WATER or p->spritebridge == 1.
BYTEVERSION bumped.
git-svn-id: https://svn.eduke32.com/eduke32@3100 1a8010ca-5511-0410-912e-c29ae57300e0
* Centralize optimization strategies in Makefile.common. This required moving detection of $(PLATFORM), which makes sense if we work on the paradigm that Makefile.common is for generic compiler setup and Makefile.shared works with libraries and things closer to the engine and game code itself.
* New Makefile variables OPTOPT (Optimization Options) and CUSTOMOPT (Custom Optimizations). OPTOPT by default contains -march, -mtune, etc. Setting this variable from Make invocation will blank these. CUSTOMOPT (Custom Optimizations) works the same but in an additive fashion, overwriting nothing. Technically CUSTOMOPT could stand for (Custom Options) and include any additional parameters sent to both linker and compiler.
* Factor out literal names of the main executables.
* The build process now prints assembler (if NOASM=0) and linker settings in addition to compiler settings.
git-svn-id: https://svn.eduke32.com/eduke32@3096 1a8010ca-5511-0410-912e-c29ae57300e0
This commit also adds the NOTELEPORT sprite flag, which of course prevents sprites from teleporting.
git-svn-id: https://svn.eduke32.com/eduke32@3094 1a8010ca-5511-0410-912e-c29ae57300e0
And hook it up to SE cstat 64 ('1' in mapster32). This disables both lightmaps
and shadow maps for the spotlight; please let me know if you have a usecase
where you want lightmaps but no shadow maps for specific lights.
git-svn-id: https://svn.eduke32.com/eduke32@3091 1a8010ca-5511-0410-912e-c29ae57300e0
The attribute is set per tile from DEF: either
texhitscanrange <begintile> <endtile>
or
tilefromtexture <tile> { ... texhitscan ... }
(As a special case, the list may only contain "texhitscan", in which case the
texture is not changed.)
In passing, do some cleanup for "tilefromtexture" DEF parsing: the list tokens
should now be accepted in any order, and errors don't appear in the middle of
the list parsing.
git-svn-id: https://svn.eduke32.com/eduke32@3078 1a8010ca-5511-0410-912e-c29ae57300e0
Submersion only happens when the upper sector has lotag 1 and its vertical
neighbor has lotag 2 (this can be useful to create non-submergible above-water
sectors). Currently, only the player is handled. On the implementation side,
the water handling code is split into P_Submerge() and P_Emerge() preparing the
"teleportation", and P_FinishWaterChange() for the finalization.
git-svn-id: https://svn.eduke32.com/eduke32@3072 1a8010ca-5511-0410-912e-c29ae57300e0
Initial determination is based purely on distance/volume, and if two qualifying sounds have the same distance/volume the one which started playback first is the one that gets the axe.
Feedback from other developers welcome.
git-svn-id: https://svn.eduke32.com/eduke32@3065 1a8010ca-5511-0410-912e-c29ae57300e0
Going to extremes to avoid code duplication like the plague, but at
least it's great to learn about the whole function environment business.
git-svn-id: https://svn.eduke32.com/eduke32@3060 1a8010ca-5511-0410-912e-c29ae57300e0
The Makefile now has separate {GAME,EDITOR}LDFLAGS, so the correct
dynamic symbol list can be specified.
git-svn-id: https://svn.eduke32.com/eduke32@3057 1a8010ca-5511-0410-912e-c29ae57300e0
sizeof(_prlight) differs across compilers, and besides, Polymer lights were
not loaded anyway (they're restored live in-game later). The savegame version
was not bumped, but only savegames made with builds where sizeof(_prlight)==261
(like synthesis) will stay compatible!
Report and helpful debugging information by LeoD.
git-svn-id: https://svn.eduke32.com/eduke32@3052 1a8010ca-5511-0410-912e-c29ae57300e0
... and displaying statistics afterwards. It was easier to do it this way
than porting stat.lua to C and especially adding more logic to the already
spaghetti-like demo playback code.
git-svn-id: https://svn.eduke32.com/eduke32@3049 1a8010ca-5511-0410-912e-c29ae57300e0
Instead of having 'noalreadyrefd' as a 'corruptcheck' subcommand.
This way, TAB completion can be had.
git-svn-id: https://svn.eduke32.com/eduke32@3047 1a8010ca-5511-0410-912e-c29ae57300e0
This means that loadoldboard() now should also initialize Polymer map
info after loading a v5/v6 map. Make the variables holding a file descriptor
an int32_t instead of int16_t.
git-svn-id: https://svn.eduke32.com/eduke32@3044 1a8010ca-5511-0410-912e-c29ae57300e0
- make inside_editor() static in build.c
- replace comparisons of inside()'s return values with 0 by ones with 1
(since a returned 0 can mean -1 or 1, i.e. oob sector or is really inside)
- prevent a theoretically possible oob access in correct_ornamented_sprite()
git-svn-id: https://svn.eduke32.com/eduke32@3038 1a8010ca-5511-0410-912e-c29ae57300e0
- factor out the "is inside" predicates
- rename updatesector_onlynextwalls() -> updatesectorbreadth()
- add ATTRIBUTE((nonnull(4))) to the bitmap arg of updatesectorexclude().
git-svn-id: https://svn.eduke32.com/eduke32@3037 1a8010ca-5511-0410-912e-c29ae57300e0
It's mostly taking over the NASM code, with a couple of changes:
- declarations for externals and globals are slightly different
- the masm seems to have e.g. "dword ptr [...]" where the nasm has only
"dword [...]", though the masm also has a couple of the latter. The "ptr"
modifier seems kinda redundant to me, but I added it to every indirection
anyway.
git-svn-id: https://svn.eduke32.com/eduke32@3033 1a8010ca-5511-0410-912e-c29ae57300e0
Previously, we used them in our builds for sprites, but MSVC builds don't have
the ASM ported to MASM, and thus the workaround of ignoring the linking errors
was not safe.
git-svn-id: https://svn.eduke32.com/eduke32@3031 1a8010ca-5511-0410-912e-c29ae57300e0
Also, add convenience wrapper script findmaps.sh for quickly searching for
sprites/walls/sectors satisfying a certain condition in all map files under
a given directory.
git-svn-id: https://svn.eduke32.com/eduke32@3030 1a8010ca-5511-0410-912e-c29ae57300e0
Requested auto-correction will place such sprites at their sector's first point.
git-svn-id: https://svn.eduke32.com/eduke32@3029 1a8010ca-5511-0410-912e-c29ae57300e0
Hendricks found a bug caused by that commit, so this one enables exprimentation
with setbrightness() bit 1 behavior.
git-svn-id: https://svn.eduke32.com/eduke32@3025 1a8010ca-5511-0410-912e-c29ae57300e0
See the comment in source/osdcmds.c for instructions on its usage.
git-svn-id: https://svn.eduke32.com/eduke32@3021 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the splitscreen mod not have a ridiculous view distortion.
Such scenes will have no correction for non-square pixels, though.
git-svn-id: https://svn.eduke32.com/eduke32@3020 1a8010ca-5511-0410-912e-c29ae57300e0
While we're at it, factor out duplicate code into P_ChangeWeapon().
git-svn-id: https://svn.eduke32.com/eduke32@3015 1a8010ca-5511-0410-912e-c29ae57300e0
Specifically, use the elevator's own ceiling z height instead of searching
nextsectors with nextsectorneighborz(). This makes maps like L9.map (Spaceport
from N64) or DEMOUNT.MAP work. [Note well: work at all, since if it happened
to work before, that was pure coincidence.]
git-svn-id: https://svn.eduke32.com/eduke32@3013 1a8010ca-5511-0410-912e-c29ae57300e0
- duke3d.h: comment the timing marcos a bit more
- factor out smoothratio calculation
- (TICRATE/TICSPERFRAME) --> REALGAMETICSPERSEC
git-svn-id: https://svn.eduke32.com/eduke32@3007 1a8010ca-5511-0410-912e-c29ae57300e0
Also, correct some comments made in the demo source made earlier. Oops.
git-svn-id: https://svn.eduke32.com/eduke32@3006 1a8010ca-5511-0410-912e-c29ae57300e0
A new function maybe_append_ext() is added to common.c and used in the handling
of the -d<demo.edm> cmdline parameter and the 'map' OSD command with one
non-wildcard arg. (It's slightly different from the way the extension was
maybe-appended previously.)
git-svn-id: https://svn.eduke32.com/eduke32@3004 1a8010ca-5511-0410-912e-c29ae57300e0
Also, don't stop playback cycling at the 10th demo and show the demo
number when beginning to record one.
git-svn-id: https://svn.eduke32.com/eduke32@3003 1a8010ca-5511-0410-912e-c29ae57300e0
This currently says that MP saving/loading isn't supported, but doesn't
really work correctly. Also, properly bound-check the immediate argument
to CON's 'save' command and one more ... -> G_HandleAsync().
git-svn-id: https://svn.eduke32.com/eduke32@2999 1a8010ca-5511-0410-912e-c29ae57300e0
... and use it in three places. In two of these uses,
1) CON {read,write}arrayfromfile and
2) G_SavePlayer,
display an error message if the file name such generated is too long.
In the CON commands of 1), also error out if the file couldn't be opened.
git-svn-id: https://svn.eduke32.com/eduke32@2997 1a8010ca-5511-0410-912e-c29ae57300e0
A macro MAYBE_FCLOSE_AND_NULL(fileptr) is introduced in compat.h that does
what it says.
git-svn-id: https://svn.eduke32.com/eduke32@2995 1a8010ca-5511-0410-912e-c29ae57300e0
This trims four 4k pages of code from the release EDuke32 build and
one page from Mapster32.
git-svn-id: https://svn.eduke32.com/eduke32@2991 1a8010ca-5511-0410-912e-c29ae57300e0
When this happens, parallaxmodes other than 0 will be unavailable and silently
draw as parallaxmode 0. This usually happens with extremely wide resolutions.
git-svn-id: https://svn.eduke32.com/eduke32@2990 1a8010ca-5511-0410-912e-c29ae57300e0
We're pulling stuff from math.h even in non-GL builds right now, so
adding libc's sin() and atan() doesn't seem like a big deal. In the
unlikely event that their accuracy is so bad that the calculated tables
don't match the original ones, a warning is issued on little-endian
platforms.
git-svn-id: https://svn.eduke32.com/eduke32@2988 1a8010ca-5511-0410-912e-c29ae57300e0
This is one of the cases where the duplicated code has minor modifications
at each site. These are handled by function args here.
git-svn-id: https://svn.eduke32.com/eduke32@2983 1a8010ca-5511-0410-912e-c29ae57300e0
For reference, they are the following:
- cache1d.c: suckcache()
- build.c: compare_wall_coords()
- make switch-invisible heuristic
- Mapster32: old sprite search
- Mapster32: manual z range
- m32script: read/writearray, qgetsysstr
- menus.c: savetemp()
git-svn-id: https://svn.eduke32.com/eduke32@2981 1a8010ca-5511-0410-912e-c29ae57300e0
Playing around with Coccinelle's semantic patches... be prepared for more.
git-svn-id: https://svn.eduke32.com/eduke32@2979 1a8010ca-5511-0410-912e-c29ae57300e0
Well, this never worked anyway, but invoking demons flying out of your
nose is never a good idea.
git-svn-id: https://svn.eduke32.com/eduke32@2977 1a8010ca-5511-0410-912e-c29ae57300e0
Note that since setting RETURN did nothing before, there is no backwards compatibility to uphold. Therefore, setting RETURN to 1 will cause the pistol to be selected, not disable the event. Set RETURN to -1 to cancel switching.
git-svn-id: https://svn.eduke32.com/eduke32@2976 1a8010ca-5511-0410-912e-c29ae57300e0
1. EVENT_PREGAME
2. hardcoded stuff
3. EVENT_GAME
One potential use is to examine values which are clobbered by commands such as ifhitweapon/ifwasweapon.
git-svn-id: https://svn.eduke32.com/eduke32@2973 1a8010ca-5511-0410-912e-c29ae57300e0
The spawn-time SE 17 setup uses nextsectorneighborz() which can fail
(return -1) on some circumstances and would cause an OOB sector[] access.
git-svn-id: https://svn.eduke32.com/eduke32@2971 1a8010ca-5511-0410-912e-c29ae57300e0
This is mostly for debugging, since currently, Mapster32 restores sprites
not in the same order as the original sprite index order. Also, expose
this option from map2text.lua and mapdiff.sh.
git-svn-id: https://svn.eduke32.com/eduke32@2968 1a8010ca-5511-0410-912e-c29ae57300e0
This is really an artifact of overloading the sector fields for different uses.
For copy-pasting TROR'd portions, the bug still persists.
git-svn-id: https://svn.eduke32.com/eduke32@2963 1a8010ca-5511-0410-912e-c29ae57300e0
Basically, base palettes with lower indices trump higher ones. For example,
when one player is underwater and the other above, the normal palette takes
precedence.
git-svn-id: https://svn.eduke32.com/eduke32@2955 1a8010ca-5511-0410-912e-c29ae57300e0
Currently, the only kinds of tint that can be applied simultaneously are
one "palfrom" per player, plus one loogie tint per player. Each palfrom
still overrides the preceding one. However, this is not a big problem IMO
since palfroms decrease at the same rate (loogie tint decreases at half the
speed). This change is especially good for the splitscreen mod, since now
the tints of the two players won't compete with each other. See the comment
in the source for some properties of the blending formula.
git-svn-id: https://svn.eduke32.com/eduke32@2954 1a8010ca-5511-0410-912e-c29ae57300e0
A debug macro to test tints being stuck at the least intense non-zero value
is provided in engine.c.
git-svn-id: https://svn.eduke32.com/eduke32@2952 1a8010ca-5511-0410-912e-c29ae57300e0