Commit Graph

342 Commits

Author SHA1 Message Date
hendricks266 164d9ccb41 Set up mouse cursor display in menus, with idle timeout fully implemented. No functionality yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4738 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-17 07:39:12 +00:00
terminx 633cb8764b Default map zoom to something a bit more useful on Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4706 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:47 +00:00
terminx ce210a9fd7 Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
terminx 8934226bb2 Another 5000 lines of pain and tears. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4680 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:36:34 +00:00
terminx 1c68e84e5a Hi-res security viewscreens
git-svn-id: https://svn.eduke32.com/eduke32@4679 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:35:21 +00:00
terminx 6c6b68d534 Various additional optimizations: add CLASSIC_SLICE_BY_4 mode to unroll some of the loops in a-c, replace integer divisions by a divisor unknown at compile time with usage of libdivide, clean up pragmas further by removing more old stuff that wasn't used anywhere. This is another one of those nasty commits that make people cry. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4658 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:29:21 +00:00
terminx 06a0350af0 Fix a bug where if you had a savegame with an active viewscreen, the tile in the world wouldn't update until totalclock > what totalclock was when the game was saved.
git-svn-id: https://svn.eduke32.com/eduke32@4655 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:13 +00:00
terminx 3eaf78da8b Tie a few random things previously hardcoded to p->curr_weapon == KNEE_WEAPON to curr_weapon being a weapon with a workslike of KNEE_WEAPON instead, and do the same with stuff hard coded for HANDREMOTE_WEAPON
git-svn-id: https://svn.eduke32.com/eduke32@4650 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:25:57 +00:00
terminx 144a4798ce More Polymost cleanup, also consolidate tilesizx and tilesizy into a single tilesiz vec2_t to ensure both x and y are always in the same cache line. I may add a new vec2_16t later. Still need to take care of emulating the old flat array for the sake of CON access.
git-svn-id: https://svn.eduke32.com/eduke32@4623 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:14:21 +00:00
terminx f4a8cdfa28 Don't display QUOTE_F1HELP on Android when starting a new game with the shareware version.
git-svn-id: https://svn.eduke32.com/eduke32@4612 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:08:10 +00:00
helixhorned 2713bc3d75 Get rid of EnvMusicFilename[] and use MapInfo[].musicfn for that.
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
2014-09-07 18:10:14 +00:00
helixhorned 73a252a73e More music-related cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4586 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:12 +00:00
helixhorned 5597f3faab Some cleanup around S_PlayMusic() and related functionality.
git-svn-id: https://svn.eduke32.com/eduke32@4585 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:09 +00:00
hendricks266 c1c01f0e0b Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4541 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-20 08:55:56 +00:00
hendricks266 f4becd06d5 Instead of displaying "Unknown GRP - EDuke32", simply display "EDuke32".
Much classier this way.

git-svn-id: https://svn.eduke32.com/eduke32@4516 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:17:11 +00:00
helixhorned 0900f4066c 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.

git-svn-id: https://svn.eduke32.com/eduke32@4491 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 00:02:19 +00:00
helixhorned 184653fc25 Keep displaying difficulty menu for as long as the *voice* plays.
Previously, the check was for the hard-coded sound number. This made it
impossible to change difficulty selection sounds via EVENT_SOUND.

git-svn-id: https://svn.eduke32.com/eduke32@4449 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:20 +00:00
helixhorned f346e46ed8 A few stylistic tweaks, like substituting missed SE_* enum constants.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4353 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:54 +00:00
helixhorned b8bd2069ea Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
git-svn-id: https://svn.eduke32.com/eduke32@4351 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:52 +00:00
helixhorned 21a8788b6b LunaCON: implement 'precache'.
git-svn-id: https://svn.eduke32.com/eduke32@4291 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 10:50:40 +00:00
helixhorned 4881a13f99 Engine-side per-map ART file support.
When a map named <filename>.map is loaded (<filename> may also contain directory
separators), the engine checks for existence of <filename>_XX.art in the virtual
file system, where XX is a 0-padded number from 00 to 19. It loads a consecutive
sequence of these ART files, i.e. aborts whenever a number in the sequence isn't
found (in contrast to normal ART loading).

Restrictions:
 - the per-map ART files must not reside in ZIP files
 - if a tile number is attempted to be overridden that has a dummytile or is
   cache1d-locked, per-map ART loading fails
On failure, the map is still loaded, but a diagnostic message is output to the
log/OSD.

Loaded per-map ART data are cleared whenever the map is "left". In particular:
 - whenever another map is loaded
 - in the editor: when a new map is started
 - in the game: after the bonus ending screen of a finished level, after going
   to the title screen via the menu

A final note: file names are supposed to be looked up and compared
case-sensitively. That is, <filename> must match EXACTLY between the map's and
per-map ART one; 'art' must be lowercase. Otherwise, the cookie monster will
come and eat you!

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4257 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:36 +00:00
hendricks266 1014af812f Allow the episode 4 cutscenes to be skipped in their entirety with one keypress, as in the original DOS game, instead of requiring input for each ANM file.
git-svn-id: https://svn.eduke32.com/eduke32@4243 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:02:30 +00:00
helixhorned 2dd9b7e495 Clean up legacy ROR code and introduce LEGACY_ROR define in game.h.
Also, bound-check two .yvel meant as sprite indices in actors.c.

git-svn-id: https://svn.eduke32.com/eduke32@4228 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:34 +00:00
helixhorned efdd31d5a9 Guard retrieval of player index (.yvel) from APLAYER sprite.
It is unacceptable that yvel is on one hand modifiable without restriction from
scripting, but can be used as an array index without prior bound check in the C
code. Because that member has an overloaded meaning and is also used for
innocuous purposes such as the green color intensity of an SE light, it's
infeasible to restrict access from scripting. Consequently, we must add bound
checks on the C side. This is the first part of the effort to make .yvel safe,
adding two functions P_Get() and P_GetP(). There are a couple of other uses as
some kind of index.

git-svn-id: https://svn.eduke32.com/eduke32@4226 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:27 +00:00
helixhorned 46ec5c4146 Clean up code related to forcefield player damage etc.
git-svn-id: https://svn.eduke32.com/eduke32@4221 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-26 19:45:14 +00:00
helixhorned d26ae58627 Rename 'camsprite' to 'g_curViewscreen', other related cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4220 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-26 19:45:12 +00:00
helixhorned 030f72d551 premap.c: stylistic cleanup in map loading code.
git-svn-id: https://svn.eduke32.com/eduke32@4214 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-24 09:44:25 +00:00
helixhorned 25edec9c0a LunaCON: very primitive gamevar handling logic for {save,load}mapstate.
git-svn-id: https://svn.eduke32.com/eduke32@4119 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:22 +00:00
helixhorned 6c88824792 LunaCON: in {save,load}mapstate, warn that saving/restoring gamevars is NYI.
git-svn-id: https://svn.eduke32.com/eduke32@4118 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:20 +00:00
hendricks266 db69800fd0 Split the handling of audio based on RENDERTYPE into a new variable named MIXERTYPE, allowing Windows builds to use SDL for input and rendering (RENDERTYPE=SDL) while using DirectSound and Windows' MIDI interface (MIXERTYPE=WIN [current default]) so that EMIDI works.
git-svn-id: https://svn.eduke32.com/eduke32@4084 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:03 +00:00
terminx d5b6496ddb Additional fix for the shareware version
git-svn-id: https://svn.eduke32.com/eduke32@4065 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-15 17:59:21 +00:00
terminx 95cf4ec90b Fix shareware version breakage introduced in r3913
git-svn-id: https://svn.eduke32.com/eduke32@4064 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-15 16:00:55 +00:00
helixhorned 7543ba7226 premap.c: delete GPSPEED/CYCLERs only after the loop with EVENT_LOADACTOR events
git-svn-id: https://svn.eduke32.com/eduke32@4045 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-05 17:37:38 +00:00
helixhorned a374a401be Clean up parallaxed sky functionality, part 2.
- 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
2013-08-04 20:37:48 +00:00
helixhorned 46e8549b5e Clean up parallaxed sky functionality, part 1.
- 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
2013-08-04 20:37:45 +00:00
helixhorned 36c03b8610 Lunatic: create game Lua state just before EVENT_NEWGAME, not in G_EnterLevel().
git-svn-id: https://svn.eduke32.com/eduke32@3951 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-13 21:04:53 +00:00
helixhorned d7e4d5afbf Factor out repeated few-liner into G_NewGame_EnterLevel(), misc. cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@3950 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-13 21:04:52 +00:00
helixhorned 7c3f7909cc Lunatic: various changes.
- swap 2d and 3rd args in xmath.rotate() -- now rotate(point, ang, pivot)
- add vec3 method 'rotate', calling xmath.rotate
- store game tic count in savegames

git-svn-id: https://svn.eduke32.com/eduke32@3929 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-04 19:38:46 +00:00
terminx e9a773a588 Add a few defined constants for commonly used weapon_pos values
git-svn-id: https://svn.eduke32.com/eduke32@3903 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-27 23:04:57 +00:00
helixhorned 5db04f585e Lunatic: player method fadecol(), an improved palfrom.
Also, an external 'minitext' with optional shade and pal. args and
documentation for ps:padecol().

git-svn-id: https://svn.eduke32.com/eduke32@3893 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-20 18:31:50 +00:00
helixhorned 560f88b022 Replace inline "qsetmode==200" checks with in3dmode().
Analogously for the negation; remove a couple of redundant decls of "qsetmode".

git-svn-id: https://svn.eduke32.com/eduke32@3823 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 09:13:32 +00:00
helixhorned f6ea669613 Lunatic: initialize SPRITE_HARDCODED_BADGUY on Lua state recreation, too.
git-svn-id: https://svn.eduke32.com/eduke32@3795 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-20 19:31:37 +00:00
helixhorned 4a6fc2b94f Remove redundant checks for some map state function uses.
Also, prettify G_FreeMapState(), remove some duplicate function decls and
resurrect 'savestate' and 'restorestate' OSD commands for the debug build.

git-svn-id: https://svn.eduke32.com/eduke32@3791 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-19 19:29:23 +00:00
helixhorned 4ed1eaa520 Lunatic: accept any number of *.lua modules on the command line.
There's no option letter for loading them, and the extension is checked
case sensitively. Lua modules are loaded after CON translated to Lua.
Also remove -testlua option.

git-svn-id: https://svn.eduke32.com/eduke32@3788 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-19 19:29:16 +00:00
helixhorned 9d858b9883 Lunatic: back up generated LunaCON code, recreate Lua state on map entering.
git-svn-id: https://svn.eduke32.com/eduke32@3787 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-19 19:29:13 +00:00
terminx f8cc394fa3 Sanitize hard coded render mode numbers... replace all references to rendmode 0, 3, 4, etc with proper REND_CLASSIC, REND_POLYMOST, REND_POLYMER labels.
git-svn-id: https://svn.eduke32.com/eduke32@3784 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 03:44:09 +00:00
helixhorned efa74c9cb8 premap.c: remove a missed unused variable.
git-svn-id: https://svn.eduke32.com/eduke32@3748 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-10 12:31:40 +00:00
helixhorned 82d6c2d5f7 Factor out four instances of duplicate code into append_ext_UNSAFE().
git-svn-id: https://svn.eduke32.com/eduke32@3735 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:38 +00:00
helixhorned c91363d7f9 Remove useless code setting show2dwall[] or show2dsprite[], as they're unused.
git-svn-id: https://svn.eduke32.com/eduke32@3649 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:24 +00:00
terminx 7f4185198c MSVC build fixes. The change to Makefile.deps is slightly questionable but it's not really an issue.
git-svn-id: https://svn.eduke32.com/eduke32@3613 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:38:21 +00:00