Priority
--------
FIXME: Try to fix flicker when using fists (like the already-fixed dual wield flicker) - happens in WH2.EXE too
FIXME: If player dies to a spike, restarts level, and dies to spike again, the spike does not animate correctly the second time
FIXME: Re-check keyboard-controlled turning and fix if necessary
TODO: permanentwritesprite and overwritesprite are wrapper functions for rotatesprite and could probably
      be got rid of.  Probably worth referring to BUILD.TXT regarding this. (overwrite sprite is done now).
TODO: Make sure FIX_FLAKY_RANDOMIZER is implemented everywhere relevant, and that randomization values are corrected.
TODO: Make a custom SETUP utility.  Unfortunately the code to the Witchaven II one wasn't released, but one does
         come with the original Witchaven code.  The config format seems as if it may be different, though.


Stuff to do when upgrading BUILD version
----------------------------------------
TODO: Boost visible sprite limit if possible (internal to BUILD)


Modding feature TODOs (lower priority)
--------------------------------------
TODO: Add MAPCOMPAT switch to disable some fixes that might interfere with maps designed for the vanilla engine?
TODO: GAME parameter, things that need to be updated:
      - WHNET.C > MAXARGS (to make arg be found)          Done
      - WHNET.C > argparm (for parameter name)            Done
      - WHNET.C > netcheckargs (to handle parameter)      Done
      - WHMENU.C > startnewgame (for the .MAP files)      Done
      - WHPLR.C > loadnewlevel (for the .MAP files)       Done
      - WHAVEN.C > STUFF.DAT (for packed data)            Done
      - WHSNDMOD.C > JOESND, F_SONGS, W_SONGS (Audio)     Done
      - WHAVEN.C > LOOKUP.DAT                             Done (Might have problems as other .DATs are not done)
      - WHMENU.C > loadgame (for save games)              TODO
      - WHMENU.C > savedgamename (for save games)         TODO
	  - WHSMK.C > Smacker videos                          TODO (Modder might want custom intro/outro vids)
      - WHAVEN.C > .ART files                             Problematic (Attempting this made game crash, pack
                                                             them in a STUFF.DAT instead)
      - Wherever game behavior def loading is done        TODO
      - PALETTE.DAT, etc.                                 SHOULD BE LOADING IN BUILD INTERNAL. SOMETHING IS EFFED UP.
                                                          (Possibly the version of BUILD used for WH2 did not have
                                                           finished STUFF.DAT support yet?)
TODO: Externalize map titles to a configurable file (Currently in WHSMK.C)
         Tried this, but the program would sometimes not be able to access the file.
         Could it be as simple as having forgotten to fclose?
         Filed for later at any rate.
TODO: Game behavior mod patches.  [WH1-as-mod plans have been cancelled in favor of making it a separate EXE at some point]
TODO: Make automatic health configurable according to skill level in mod configuration file
TODO: WHSMK.C function smkplayseq might be retooled to accept a file name directly instead of an index into
       a filename array.  Possibly do something about the end-of-level stat part too.
TODO: Possibly look into adding more door types to the Open Doors spell (WHPLR.C, look for case 7 KNOCKSPELL)


Other stuff to check/consider
-----------------------------
TODO: Make a debug run of the engine that will output all results of the broken krand functions so we can
         better know how the game is misbehaving in these circumstances.
TODO: Make an alternate intermission screen for when the STAIRS.SMK isn't found?
CHECK: Should Guardian be freezable with Ice Razor?
FIXED?: Enchanted weapons lose their sound before enchantment is gone
CHECK: Generally more fully investigate the special WHOBJ.C functions
CONSIDER: Don't give XP when freezing monsters, give xp when breaking frozen monsters? (Default behavior is exploitable to gain excess XP)


Fixed, but keep an eye on them for possible tweaking:
-----------------------------------------------------
- Knockback from melee attacks can make the player spin like crazy (e.g. Argothonian sword)
    (Introduced because of player movement changes)


Notes:
------
- Look into ALLOWSCREENCAPTURE/screencapture function -- ALLOWSCREENCAPTURE is not by default defined.
      Only relevant to Smacker playback; otherwise screencapture is allowed anyway.
- Purpose of playsound_loc (WHSNDMOD.C)?
      Also unused it seems.
- What does checkheat do?
      It's never called in WH2; possibly a WH1 thing?
- What's STARMAP tile for? -- Apparently nothing; the name's defined but not used in the code.
- Is SNDNAMES.H used? -- No.
- spr->clipdist values for various beings, especially skeletons (pass through wall bug)?
      It's 64, and given << 2 when passed to clipmove (so 256).  Not too small, but maybe too big? (Ken recommends 128 in the build docs)
      It might also be well to check if there's any point where the size passed to clipmove suddenly changes (something Ken explicitly warns
      not to do).
      Clipmove is called once in WHINP.C (processinput) to move the player, and once in WHOBJ.C (movesprite; also actormovesprite but that is unused.)
- Check if enchanted sound handle is getting mangled in sound priority code?
      No.  Priority specifically ignores "loop forever" sounds when deciding on a sound to kill.
- swingdapunch function in WHPLR.C could probably be expanded to make walls that do something when hit with a weapon (like certain triggers in
  other games) if such a function were desired.


Weird stuff that I don't understand the cause of, so can't fix currently (but may at my leisure):
-------------------------------------------------------------------------
- Ambient sound loops don't work despite my efforts to re-enable them.
- See if anything can be done about "die when hit wall" bug (probably not for now)
- Hard to take leather armor in level 1 (the one in the skull's nose)
- Archers not hitting player (only in The Horror Back?  Something with the maps?) -- may be an unrepeatable glitch
- Can sometimes walk through a monster (related also to missed hits??)
- Argothonian with sword hit detection (in a test map he's completely normal, in actual play it sometimes
     seems like his hitbox is displaced vertically so you have to hit his face to hurt him... I also
     didn't find anything different about how they're placed in maps where there can be issues).
     Starting as KURTKNEE doesn't seem to have anything to do with it, either.
- Strange autoaim selection (aims to the sides) - based on cansee which seems to be a BUILD internal?
- How does lava fiend get into the skull eye socket on level 1?
- CapsLock works or doesn't with no rhyme or reason I can see.  A change to the code initially seemed promising, but still produces issues.
     Fixing might call for ASM code
