There is no need to cache the result of a function called only once for each input.
git-svn-id: https://svn.eduke32.com/eduke32@5447 1a8010ca-5511-0410-912e-c29ae57300e0
First, it will try the local path (as previously).
Second, it will check to see if the filename originally requested exists inside a GRP or SSI file (its parent), and if it does, it will check in "music/<parent's name sans extension>/".
Third, it will check in "music/".
Do not rely on this when distributing mods: These checks are hacks and may potentially be removed.
git-svn-id: https://svn.eduke32.com/eduke32@5445 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes DUKETEAM playing grabbag.ogg instead of grabbag_voc.ogg when Megaton paths have been detected.
git-svn-id: https://svn.eduke32.com/eduke32@5251 1a8010ca-5511-0410-912e-c29ae57300e0
This should prevent Lunar Apocalypse from becoming Nuclear Winter with Megaton on Linux and Mac.
git-svn-id: https://svn.eduke32.com/eduke32@4886 1a8010ca-5511-0410-912e-c29ae57300e0
- '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
git-svn-id: https://svn.eduke32.com/eduke32@4811 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
I updated the help windows to prefer these variants because they are superior to the -xSquished versions.
Also, factor out the command-line processing code for the above, plus con/def modules and clipmaps.
git-svn-id: https://svn.eduke32.com/eduke32@4128 1a8010ca-5511-0410-912e-c29ae57300e0
DONT_BUILD, because there have been no significant changes of the non-Lua build.
git-svn-id: https://svn.eduke32.com/eduke32@4006 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