Specifically, we must make sure that dasizeof <= LZWSIZE (or so) in
c1d_{read,write}_compressed() (what the assertion in the last commit was about,
and is now redundant). This fixes saving of e.g. large gamearrays with the C-CON
build. Bump BYTEVERSION.
An alternative for setting dasizeof to 1 would be to factor it and keep dividing
as long as it's > LZWSIZE.
git-svn-id: https://svn.eduke32.com/eduke32@4838 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
This generally fixes demo playback. Before, tilesizx[]/tilesizy[] were written
into twice as many bytes as needed. Now, don't do that at all.
git-svn-id: https://svn.eduke32.com/eduke32@4191 1a8010ca-5511-0410-912e-c29ae57300e0
This was caused by mismatched for types mapstate_t's animateptr[] and the global
one (int32_t vs. int32_t *).
Bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@4125 1a8010ca-5511-0410-912e-c29ae57300e0
- Rename sky_t members: yscale -> horizfrac, bits -> lognumtiles.
- Add default sky (8 tiles, horizfrac=32768 (i.e. 1/2 the scene horiz), offsets
all zero) and CLOUDYOCEAN sky (8 tiles, horizfrac=65536, offsets all zero)
to multipsky[].
- Get rid of "psky_t g_psky", merely maintaining a g_pskyidx instead. Set it up
at map load time so as to keep the behavior of the legacy per-map psky:
the last sector index with a matching psky ceiling wins.
- In mapstate_t, save g_pskyidx too, not (former) pskybits and pskyoffs[].
- Make on-map-load global psky setup consistent for the game and editor by
factoring it out into common.c: G_SetupGlobalPsky().
- Remove a couple of useless initializations, add some static assertions.
This commit is more likely to introduce subtle differences in behavior.
Specifically, getpsky() now always returns the default sky properties instead of
the global sky ones (but with all-zero offsets) when no match for a suiting
multi-psky is found. This is only likely to affect the yscale/horizfrac of
non-multi-pskies when a global non-default multi-psky has been set up.
Bump BYTEVERSION again.
git-svn-id: https://svn.eduke32.com/eduke32@3976 1a8010ca-5511-0410-912e-c29ae57300e0
- Consolidate psky* arrays into a "typedef struct psky_t" "g_psky" and
"multipsky[]".
- Factor out getting parallaxed sky properties into getpsky().
- Condense initial multi-psky setup by memcpy'ing from multipsky[].
- New function: MultiPsky_TileToIdx().
- Add new define PSKYOFF_MAX and related consistency-checking assertions.
- Lower MAXPSKYTILES to 8 to reflect current usage (was 256).
- Game: make multi-pskies consider dynamically-remapped MOONSKY1, BIGORBIT1
and LA. (Not very useful as the editor will still only act for the static
values -- 80, 84 and 89, respectively.)
An attempt has been made to preserve behavior even in strange cases, so this
commit is unlikely to introduce regressions. Because of point 6, BYTEVERSION
had to be bumped.
git-svn-id: https://svn.eduke32.com/eduke32@3975 1a8010ca-5511-0410-912e-c29ae57300e0
Smoothed using an exponential moving average... with a time constant of 1 sec
if I didn't miscalculate things. Also, split BYTEVERSION_JF into Lunatic and
non-Lua.
git-svn-id: https://svn.eduke32.com/eduke32@3947 1a8010ca-5511-0410-912e-c29ae57300e0
Having to tag these few variables and functions as ATTRIBUTE((used))
seems sensible, but what follows is just strange. OSD_Printf? headspritesect?
git-svn-id: https://svn.eduke32.com/eduke32@3932 1a8010ca-5511-0410-912e-c29ae57300e0
actors.h: remove 'packed' from projectile_t, tiledata_t. In tiledata_t,
make .cacherange member an int32_t so that the following member
"projectile_t defproj" is aligned on a 4-byte boundary.
player.h: remove 'packed' from playerspawn_t, DukeStatus_t, input_t.
In Lunatic, correct packing attribute of the base type of the unrestricted
actor_t and DukePlayer_t pointer types (the declaration was used without
Bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@3458 1a8010ca-5511-0410-912e-c29ae57300e0
Rotation-fixing happens for a couple of hard-coded statnums that presumably
never move (DEFAULT, STANDABLE, FX, FALLER, LIGHT), but for actors it wouldn't
make sense since the common case is that they do move. For this reason, bit 4
was introduced in r1934. The position of such useractors will not diverge
due to error roundoff accumulation in rotating sectors (SE0, train).
git-svn-id: https://svn.eduke32.com/eduke32@3316 1a8010ca-5511-0410-912e-c29ae57300e0
... instead of switch/case-ing them in A_CheckEnemyTile().
Because this requires bumping BYTEVERSION, we also get rid of the
excess trailing bytes in the save game's "rest" data. (See r3052.)
git-svn-id: https://svn.eduke32.com/eduke32@3257 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
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
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
- 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
This was narrowed to int8_t in r1625, breaking CON code that wanted
to lock the player for a longer time than 127 game tics.
git-svn-id: https://svn.eduke32.com/eduke32@2847 1a8010ca-5511-0410-912e-c29ae57300e0
r2727 made old savegames incompatible, as an array with MAXVOLUMES*MAXLEVELS
is saved in Gv_WriteSave().
git-svn-id: https://svn.eduke32.com/eduke32@2730 1a8010ca-5511-0410-912e-c29ae57300e0
NAM and Napalm can now share their con, def, and rts files if the one for their respective game is not present because the con and rts files are identical.
Also, decapitalize two string literals missed in r2540.
git-svn-id: https://svn.eduke32.com/eduke32@2726 1a8010ca-5511-0410-912e-c29ae57300e0
The primary reason for doing this is that handing of moving sectors is
significantly simplified. Because moving sectors usually don't move containing
SEs/effector-statnum sprites, no special handing code is needed to move light
SEs with them. Thus, this commit sets light SEs to a new statnum when they're
spawned *from premap*, and a new G_Move*-like function (called G_DoPolymerLights)
is added to process every sprite in that status list.
This should "fix" light SEs moving together with a variety of moving sectors,
but CON programs expecting the old behavior may break, therefore this commit is
marked as experimental.
Additionally, a problem with the old implementation is identified: it seems like
the correct functioning is dependent upon the order of processing between the
sector movement effector and the light SE, so this makes it another good reason
for the change. (A third one is that all lights can be processed with a per-
statnum loop, but CON coders should not do this until the change is considered
final).
git-svn-id: https://svn.eduke32.com/eduke32@2646 1a8010ca-5511-0410-912e-c29ae57300e0
We've been running with same-sized actor_t for a while without problems now.
In the unlikely event (famous last words) that an issue should pop up later,
this revision should be consulted for the differences between the two versions.
git-svn-id: https://svn.eduke32.com/eduke32@2451 1a8010ca-5511-0410-912e-c29ae57300e0