AdaVenture...

...using thin GL/SDL bindings,
Felix Krause's FreeTypeAda [MIT],
and Dmitry Kazakov's Tables, Strings_Edit [GNU GPL2].

Uses both ftex for TTF, utex for special glyphs.

1may18:
.) now more carefull about using gldisable(gl_blend);
	now do it only if it was disabled prior to enabling.

30apr18:
.) improved castle pool parms;
.) experimented using fixed water texture with
	riven-like micro-distortions...not bad...
	but disabled anyway.  Removed 6.3mb poolWater.png.

28apr18:
.) created w3trees with 6 wings, 3planes & alternating
	texture directions...looks great!  [w3treeobj.ad?]
	Wings drawn back to front;  this cannot be done 
	with a plain xtreeobj.
.) added fragshader micro distortions to tree branches,
	to simulate flutter;  and reduced sway magnitude.
	...see otexFog.fs, windtexFog.vs

27apr18:
.) Important Observation:  micro-distortions introduced
	using a frag shader does NOT require finer vertex
	resolution to get a similar effect!  Thus it is a
	cheap alternative.

27apr18:
.) See atree2_texid(0..3) [gametypes,setup_textures]
	to see how to setup a sequence of png texture
	files, if I ever find a way to generate them.

26apr18:
.) added slight vertical motion to outer tree
	branches in shader windtexFog.vs


21apr18:
.) Elliminated array "passthru"...
.) I checked function of
	(kgate,rgate,cgate,sgate)+(xgate,ygate,zgate)
	kgate=0 => gate on ground, kgate>0 => active
	where kgate=#KO
	The only remaining usage of the "passthru" array
	is to properly initialize the gate in scene#6,
	AFTER the KOs are defined.

18apr18:
.) improved & systematized the naming convention of 
	variables representing uniformIDs to prevent 
	inadvertent mixing or misuse.
.) elliminated last [unused] "MV" in a vertex shader
	rotexnew.vs

######################################################
16mar18: uploaded v1.3.1 to itch, github, indie, SF 
######################################################

15apr18:
.) Corrected some remaining misuses of "eyeCoords"
	for fog in shaders.
.) limited skybox fog angle to 30 deg. to reduce
	obscuration of skybox.

13apr18:
.) corrected & perfected setting of exterior fog
	see islandobjFog.fs, otexFog.fs.

12apr18
.) fixed misusage of eyeSpacePos (per AG):
	.) snakeFogHiHead.vs, snakeFog.fs (snakeeye)
		snaketexshadid
	.) [y]islandobjFog.?s (meye)
		pidterra
	.) windtexFog.vs, otexFog.fs (treeeye)
		treetexshadid
	.) use peye (eyePos)
	.) poolobjFog.vs, myBlueWaterFog.fs (pooleye)
		poolshadid

11apr18:
.) updated (perAG) fireball.?s shaders...
	that clearly explain usage of perlin noise.
.) improved explosion.png;

14mar18:
.) added gpr scripts;
.) simplified OSX compile using all statics;
.) elliminated booleans that prevented execution
	of setup code more than once.  Pretty sure
	they were not needed.


##########################################################
14mar18: uploaded v1.3.0 to itch, github, indie, SF   ####
##########################################################

13mar18:
.) a missing maze7 wall made solution too easy.  That is
	now replaced. Editted map of maze7 to better match.
.) cleaned up ftex to simplify its interface.
.) now using Dmitry Kazakov's "Tables" library to
	better organize and document the many transition 
	doorways within, and between scenes.  These 
	transitions are numerous and complex because of
	the several multiply connected mazes in this game.

12mar18:
.) refined, clarified selection screen geometry.

11mar18:
.) replaced large number of at* functions with an improved
	generalized ftn that accounts for velocity direction too.
	Caution:  threshold MUST now be accurately defined!
	Otherwise the fixed small tolerance will FAIL!
.) removed unused textures, variables

10mar18:
.) now show jupiter @ end of BOTH chapters...
	1=> sunny day;  2=> starry night.
.) added velocity restriction to exit maze 5 or 7
	so that proximity alone wont take us back outside.
.) added new texture for eXterior of outer maze walls:
	mazex_texid of special ferns.
.) Improved names in matutils;
.) moved many files into ./adautils/
.) changed compile scripts accordingly


##########################################################
9mar18: uploaded v1.2.9 to itch, github, indie, SF   ####
##########################################################

8mar18:
.) regression test Ok.  Ready.

7mar18:
.) added rolling magma ball in lab8 that blocks
	your return path!

7mar18:  Discovered OpenGL Perverse Cubemap semantics:
Cube Maps have been specified to follow the RenderMan specification 
(for whatever reason), and RenderMan assumes the images' origin being 
in the upper left, contrary to the usual OpenGL behaviour of having 
the image origin in the lower left. That's why things get swapped in 
the Y direction. It totally breaks with the usual OpenGL semantics 
and doesn't make sense at all. But now we're stuck with it.


6mar18:
.) un-inverted PNG texture files: trees, gate, 
	zoroaster, stonedoor, mural, pandit, lion, door,
	gnu, deadgnu, chalice, dbd,drd, minognu2,
	moorishWall, etc...But then I had to:
	a) invert my normal loadpng because most
		OGL textures have origin @ bottom[-left],
		while png images have origin @ top[-left].
	b) add defaulted parameter that allows non-inversion,
		which is needed by my glyph-dictionary [utex].
	c) Note that cubemap textures load upright, 
		i.e. w/o inverting the png file.
		But I don't understand why???  See above!
--------------------------------------------------------------
Note that Sanguine's png_io is similar to lodepng...

FAQ from Lode Vandevene:
Q: When using OpenGL and decoding textures with LodePNG, 
	the image is upside down.

A: LodePNG uses a pixel order where it goes in rows from 
top to bottom.  If your game engine uses a bottom to top 
representation for all textures, you can still go through 
the raw pixel buffer of LodePNG with a for loop and 
swap the rows to become upside down. 
--------------------------------------------------------------


4mar18:
.) remapped odd glyphs to first 32 chars in ascii table;
.) converted from avcharsOld.png to sansw.png, which has
	glyphs moved to first two rows of file.  Of course
	the mappings @ end of gametypes.ads are changed too.


##########################################################
3mar18: uploaded v1.2.8 to itch, github, indie, SF   ####
##########################################################



3mar18:
.) made corrections to movement of dragons, spider.

2mar18:
.) converted all print2d to use ftex rather than utex,
	except for splash-screen [adaventure.adb].
.) utex still used for odd glyph characters.

2mar18:
.) replaced unexpected glyph mappings with named
	constants [see gametypes] in preparation for
	possible remapping into the first 2 lines (32 chars)
	of my ascii-dicionary.  This would allow the normal
	showing of all standard characters, in addition to
	my special glyphs.
.) Added 2 access functions to utex for the case of a
	single character specified by ascii code, rather 
	than string.
.) in the process of creating procedure showWhatIsHeld
	I fixed a possible error that might not show the
	hand when a portable gate/bridge is near.
.) fixed utex.adb so avcharsOld.png no longer
	needs to be inverted.


25feb18:
.) removed redundancy in utex.adb


##########################################################
24feb18: uploaded v1.2.7 to itch, github, indie, SF   ####
##########################################################


23feb18:
.) added link from ~/Resources/ to ./data/.
.) added Jupiter in night sky @ end of ch 2...
	other skyboxes are too cloudy or foggy.
	Interesting facts:
	.) must use mv [ lookat(mv,0,0,0...) ]
	.) must set pos to represent skybox (inertial) coords;
		i.e. overhead = (0,Y,0)
	.) this skybox has radius 40.0;
	.) MUST disable planetary update code UNLESS
		specifically needing it.

19feb18:
.) added nice OldEnglish lettering;
	See avcharsOld.png
.) replaced "tropicalsun" with "thicksky" skybox.
	Removed fog from chapter 1 endgame to
	fully appreciate it.
.) added hiRes moon skybox to end chapter 2.

8feb18:
.) added arabrod32.png
.) editted, improved indi.png (indianaJones)
	and arabman2.png

6feb18:
.) fixed tree shaders to use proper darkness;
.) removed fog from start of chapter 1
	so as not to obscure most awesome skybox;
.) added white fog to end of chapter 1.  Nice.


1feb18:
.) updated avatarobj.adb (per xav) to use headOverlays:
	.) crowns, hats, helmets, hair
	.) avatarobj.fs (added DISCARD, pixelation)
	.) avatarobj.ad? (fixed asymmetries)
	.) changed all *.png to RGB mode (from indexed);
		editted some to work better with headOverlay.


###########################################################
29jan18: uploaded v1.2.6 to itch, github, indie, SF  ####
###########################################################

28jan18:
.) now using increased voffsetu in mazes.  This allows
	more flexibility in hoffsetu without camera being 
	blocked by maze walls.  Moreover, it adds much
	nicer perspective and allows seeing chalice hidden
	in secret room.
.) now using two nice camera options toggled with "L" key:
	.) lazy camera (new default)
	.) tight camera (previous method)
	.) tight version responds very quickly and seems 
		closer to the very precise control of 1st-person.
	.) lazy version allows more leisurely camera changes
		that permit better appreciation of the avatar, 
		and allows seeing avatar from the front while 
		against a wall.

27jan18:
.) upgraded movement per AG:
	.) used slewToAv rather than slewToAvLook in left/right
		arrow-key (avent.adb) and handle_gc/handle_mouse
		in gameutils.adb.
	.) changed action within updateCamera...
		To restore to previous see:
		gameutils_perfectlyGood.adb
		...now much more leisurely about reaction to
		reverse movement, both interior & exterior.
		TEST COMPLETELY TO SEE IF THIS IS ACCEPTABLE!

24jan18:
.) updated some names per AG:
	.) handle_mouse_move (was _drag)
	.) slewToAvLook (was setCamAng)
.) tested, seems Ok.


22jan18:
.) added mouse wheel zoom per AG.
.) added angrate1, angrate3 keyboard turn factors.

18jan18:
.) minor tweaks to updateCamera, setCamAng per AG.

15jan18:
.) improved camera logic, per AG.

11jan18:
.) darkness9 increased from 3 to 4.
	check again on MsWin, Mac. Very Good!
	Much Better! ? redeliver ? ... no, not essential.

.) also tried [in texobjShine.fs] increasing
	df from 0.8 to 0.9 when dark>3 but difficult
	to see on linux when monitor contrast was 50%.
	Ok @ 90%.  (restored monitor back to 60% fttb).
	Try MacBook...too dark, same as linux.  
	KEEP @ df=0.8 !!
	BTW, MacBook contrast has since been increased.


###########################################################
09jan18: uploaded v1.2.5 to itch, github, indie, SF  ####
###########################################################

9jan18:
.) fixed & improved camera positioning algorithm;
.) made micro-adjustments to avatar Ypos so that
	feet are mostly visible yet do not hover.
	Any exterior discrepancies are likely due to
	discretization errors in hilly surface.
.) cleaned up the code, somewhat.

8jan18:
.) updated lighting to Blinn-Phong.
.) increased height of avatar;
.) reduced hcup from 0.2 to 0.1
.) corrected door placement maze9.
.) added uniforms for fracMspc, fracMdif so that
	I can adjust down reflections of shrubs,
	or adjust up reflections in castle.
.) added exception-handler in one place to try to
	analyze the ada.numerics.argument_error problem,
	which occurred again today.
.) Found the argument_error problem was in arccos
	so I put a guard assuring abs(argument)<=1.0 !!!

6jan18:
.) restored proper 1-sided reflections in phong
	shaders.  Now prevent shine on distant maze 
	walls by a closeness test.
.) still had minor problem of diffuse & specular
	reflections on 1 of the 2 outer walls where
	it should not be.  So I now set the uniform
	fracMspc=0.0 (rather than 1.0) for shrubbery.  
	The remaining diffuse light is not very noticeable.


###########################################################
05jan18: uploaded v1.2.4 to itch, github, indie, SF  ####
###########################################################


4jan18:
.) fixed ada.numerics argument_error (I think);
	Any residual problems must be "branchnear".
.) now dumping errorQueue msgs in utex.printex
	to help find cause of that error.
.) Now play choir upon first gaze @ chalice,
	and stop after pickup.

3jan18:
.) final lighting refinements...the effects are awesome
	of specular lighting in the final scene.
.) maze7:  elliminated opening lab with black key
	near defunct phantom opening.
.) Now do NOT use any fog when drawing chalice.


2jan18:
.) closed easy path in M9 to force interconnect.
.) fixed matutils to provide correct NormalMatrix;
	Needed additional transpose.
.) generalized frag shaders to use Phong lighting,
	with ambient, diffuse, and specular light
	treatments including attenuation that correctly
	reflect a given changing ModelMatrix, even though
	the ModelMatrix in AdaVenture is unchanging.

1jan18:
.) perfected Phong lighting in texobjShine.fs.
.) replaced "texobjFog.fs" 	with "texobjShine.fs" in:
		.) pgmtexshadid
		.) cuptexshadid
.) replaced texobjHole.fs   with texnewHole.fs in:
		.) holetexshadid
.) then reduced 3 light positions to 1 in *.adb
.) then adjusted lighting, darkness everywhere.


30dec17:
.) now always draw chalice with slight golden glow.
.) found that fog inhibits shine of lab scum!
.) fiddled with texobjFog.fs ...


29dec17:
.) maze9:  sand floor, leafwalls, leafymaze.

28dec17:
.) In chapter 2, created self-contained orangeMaze #2,
	called maze9, with only 1 entrance/exit, with 
	a hidden room containing the chalice.  Removed 1 
	of 2 entrances to lab8 from maze 7;  then attached 
	maze9 to other exit of lab8.  This forces hero
	to pass thru lab8 to get to maze9 and chalice.
.) put bridge on floor near tree in lab8.


###########################################################
26dec17: uploaded v1.2.3 to itch, github, indie, SF  ####
###########################################################


25dec17:
.) fixed mamba texture;
.) simplified ztubeobj.adb;
.) approaching mamba looked bad before this fix.


24dec17:
.) Added draggable gateway to help create shortcuts
	in preparation for secret rooms and other mazes.
.) Gateways assume a new paradigm:  only one exists.
	It can be on floor, in a maze wall, or	carried.

23dec17:
.) note that there were 2, predefined
	passthrus in maze6;

19dec17:
.) new storyline...must carry sword when exitting Lab.
.) improved consistency & generality of shaders with fog 
	to have both level and color uniforms that are 
	defaulted to (0,1) => NO fog with color white.  
	Also added explicit programmatic settings for both.
.) added color=4 => dark gray.

###########################################################
18dec17: REuploaded v1.2.2 to itch, github, indie, SF  ####
###########################################################

17dec17:
.) adjusted tapestry;
.) restored pool sounds within castle;
.) perfected "jump" logic when debugging.

###########################################################
17dec17: uploaded v1.2.2 to itch, github, indie, SF  ######
###########################################################

16dec17:
.) complexified plot, chapter 2:
	.) BAT steals chalice @ exterior, hides it.
.) made important logic and sound corrections, including
	a sound when bat steals a key/chalice, then drops it.

15dec17:
.) added debug commandline parm 3..8.
.) added scream when snake bites.
.) added music loops to temple4, labyrinth8;
	Might need to adjust volume 
	(4)westfold.ogg@60
	(8)ceph.ogg@60, 
	but not too loud to overpower hissbeat.

13dec17:
.) awesome exterior fog, but only works if I can do
	something with lower skybox angles... Yes!  
	Awesome [exterior] skybox with Fog @ lower angles.
.) tests good!

13dec17:
.) simplified & improved realism for interior Fog...
	.) decreases [non-linearly] with height;
	.) increases non-linearly with distance;
.) wanted more curvature in snake...tried, failed,
	too complex & ugly to make near-vertical part.


###########################################################
4dec17: uploaded v1.2.1 to itch, github, indie, SF  ######
###########################################################


2dec17:
.) Restored reading of cfgfile using intrinsic Exists()
	function.

27nov17:
.) upgraded OSX-link to use sdl207x, 
	Windows, Linux use 207.
.) double check compilation/running on Windows. DONE.
.) rebuilt on OSX too.

20nov17:
.) Now, mamba has raised head.
.) Now, mamba might not kill you IF
	you are carrying a sword.

18nov17:
.) NOTE: as of 23nov17 I created Ada binding to sdl207;
	Now, sdl-v207x elliminates that OSX problem, 
	yet fixes a window-focus problem that is probably
	irrelevant to this app.  Thus, I COULD use it
	if I want.  Or I could wait until the
	official, stable release of v2.0.8,
	assuming they incorporate the OSX fix.


###########################################################
10nov17: uploaded v1.2.0 to itch, github, indie, SF  ######
###########################################################


4nov17:
.) !!! now compiles/runs on MSwin !!!
	...just need some dlls collocated w/exe.
	Also needed glext.lib (sourceforge glext-win32),
	and glfw, sfml libs for win32;
	and libz.a for win32.



19oct17:
.) elliminated freetype.framework, libjpeg.a
.) elliminated *.a from ./Frameworks directory.

15jul17:
.) adjusted ?ydra (?=b,r,m) to:
	.) 2*htobj (b2)
	.) 2*htobj - iymax (m8, r5, r6, r7)
	.) 2*htobj + land_alt (r1,b1)
	to ensure it remains visible.
.) reset "repeatroar" flag to enable sound @ reentry.
.) "roarbegun" replaces "repeatroar" flag (avent.adb).

###########################################################
14jul17: uploaded v1.1.2 to itch, github, indie, SF  ######
###########################################################


13jul17 (zeto):
.) implemented decending granite door to labyrinth
	that requires black key.  
.) added hiss-beat.wav when snake is near;


7jul17:
.) updated OSX libs to use SFML v2.4.2;
.) added script ocmpd.sh that utilize dylib's
	rather than statics;

4jul17:
.) modified *.sh to avoid saving large exe in ~/obj/


3jul17 (mini):
.) updated linux scripts to use AdaCore 2017 as well as
	updated SFML 2.4.2 libs.
.) revised lcmp16.sh script for linux;
.) put older linux libs into ~/libs/gnu16

2jul17 (mini):
.) added OGL version/profile query to startup messages.

29jun17:
.) Introduction now mentions that m-key toggles the Avatar.


###########################################################
19may17: REuploaded v1.1.1 to itch, github, indie, SF ######
###########################################################

14may17:
.) added Zoroastrian symbol above castle gate.

12may17:
.) now call sdl_getkeyboardstate after each sdl_pumpevents call.
	I think this is the correct way to handle the update
	of keyboard events.  

4may17:
.) gametypes::411 ... reduced maxnko from 900 to 335 !!!
	Need more testing.


###########################################################
30apr17: REuploaded v1.1.1 to itch, github, indie, SF ######
###########################################################

30apr17:  missing exes;  reupload.

27apr17:
.) Now, only draw castle interior if zme<-10.0
.) Using 10 rather than 20 for # terrain cuts.

25mar17:
.) slight edits in gameutils.adb::updateMVPs (top paragraph)

3mar17:
.) improved dragons heights when dead so they are higher than floor.


##########################################################
2mar17: uploaded v1.1.1 to itch, github, indie, SF ######
##########################################################

28feb17:
.) REPAIRED drawing error that failed to draw 
	dropped items (keys,sword) on lab floor.
.) removed deprecated glshademodel function that could cause
	GL errors and potential aborts.
.) added purple tree in lab-center...nice.
.) added dumpGLerrorQueue function

25feb17:
.) added emptyGLerrorQueue;
.) changed GL-exception-raising to mere remarks, 
	UNLESS dbug=true

24feb17:
.) Now using glEnable(gl_texture_cube_map_seamless) with no error,
	whereas glEnable(gl_texture_cube_map) is deprecated and
	generates glerror.  Just discovered this today.

21feb17:
.) improved directory layout:
	.) removed binding_to_sfml;
	.) added adabindings/sfmlAudio
	.) adjusted scripts *.sh

18feb17:
.) elliminated glactivetexture(gl_texture0) from
	.) pngloader.adb
	.) utex.adb
.) elliminated bad call in several places:
	glenable(gl_texture_cube_map); --causes glerror
.) added GL error checks to
	.) shader.adb
	.) utex.adb
	.) pngloader.adb
	.) avent.adb

11feb17:
.) added some uniform-initializations in *.vs, *.fs:
	.) uniform int lightFlag = 0; // 0=>no, 1=>yes
	.) also colr, level, darkness;
	so that the default is attained without definition;
	See rotexobj.vs texobjFog.vs texobjFog.fs texobjHole.fs

8feb17:
.) added directory ./data/avatars/, and put a few in there;
	made note of it in README.md.
.) noted poor execution on Intel-NUC, many random triangular
	texture fragments appear;  still mostly runnable, however.

7feb17:
.) fixed shaders with lighting (no normalMatrix required).

5feb17:
.) made lab-walls out of slime, like floor.  Nice!
.) fixed normals in droomobj.adb, pictobj, rectobj
.) copied twictobj.adb from adagate (only differs in commentary)


##########################################################
5feb17: uploaded v1.1.0 to itch, github, indie, SF ######
##########################################################


3feb17:
.) Corrected error using cuptexshadid...needed lighting
	flag=0.

2feb17:
.) fiddling with darkness...must check all scenes...seems Ok
.) made castle darker to showcase planned lighting;
.) initial attempt to use chalice lighting effect within castle
	Excellent! (after adjusting light-pos. & ambient level)
	todo:  check that final message is legible.

1feb17:
.) elliminated redundant checks in pickLeft
.) added necessary check for batHasChalice in updateGameState
.) improved nearness-test parameters (for picking).

31jan17:
.) corrected pick logic:  now, if hand appears
	.) object is pickable
	.) avatar is translucent

##########################################################
4jan17: uploaded v1.0.9 to itch, github, indie, SF ######
##########################################################

3jan17:
.) minor error message (libopenal.a) corrected by
	using shared lib.

1jan17:
.) Corrected programming logic to delete old context prior to
	creating new one.  This may not have been noticeable
	given fullscreen mode.
.) refined scripts.

##########################################################
29dec16: uploaded v1.0.8 to itch, github, SF, indie ######
##########################################################

26dec16:
.) improved opengl code to allow less capable graphics.
.) improved build system to make apps that run on
	more linux distros.

23dec16:
.) added WASD keys for movement.

21dec16:
.) Improved avatar utilizes any minecraft character!
	One need only download the desired minecraft skin.
.) added identifiers to all calls to myassert;
.) elliminated error in branchnear when looking at nadir.


##########################################################
20dec16: uploaded v1.0.7 to itch, github, SF, indie ######
##########################################################


19dec16:
.) fixed mouse/keyboard operation of avatar, even inside.
.) fixed game controller functions.
.) adjusted pick radius smaller for keys, sword.

18dec16:
.) Began efforts at vertex/frag shader based avatar...
.) finished setup of avatarobj.ad?, avatarobj.?s
	Uses uniforms:  MVP,mytime,wPos,horiAng,direction,fade
.) preliminary walking Ok; translucent when showing glyph.
.) developed suitable textures, and ability to apply them;
.) Requires both actual & ideal cam.pos + cam.look
	and a lazy camera policy to move part way 
	from current toward ideal pos/look.
.) Does not yet work inside mazes.
.) Saved prior camera policy under xavatar/bundle_17dec16.

8dec16:
.) elliminated unused *.png files in ./data/
.) created [new] av2dec16t.tar.gz (AVmedia).

1dec16:
.) changed lab8 to purple fog.

##########################################################
1dec16: uploaded v1.0.6 to itch, github, SF, indie #######
##########################################################

1dec16:
.) revised labyrinth, more spooky
.) created intro-screen where user selects chapter
	in the style of reliquarium.
.) improved red dragon trajectory.

30nov16:
.) added roar @ 1st red dragon encounter
.) now, only water sound stops when leaving castle


30nov16: uploaded to itch.io, github, SF, indieDB #######

29nov16:
.) now working under sfml v2.4.1
.) repaired OS-X bundling.


28nov16:
.) Now using generalized snd4ada.cpp with a more elegant interface.


8nov16:
.) corrected height of ychalice after bat drops it in maze7.

6nov16:
.) created 6 compile scripts to match adagate;
	lcmpd, lcmps, lcmpss, ocmpd, ocmps, ocmpss,
	Each one copies output to *_gnu or *_osx.

4nov16: uploaded to github, SF #####################

3nov16:
.) shrunk size of ./data/ files.
	.) used sox to convert wav to ogg format.
	.) elliminated unused png files.
	.) is 125Mb, was 212Mb.

3nov16: uploaded to IndieDB, itch.io, github, SF #####################

2nov16:
.) Both chapters now use alternate musical endings.
	Added rotating image of K.P. @ endgame.
.) Now allows commandline parm for level, but if not,
	asks user for level.
.) added water soundloop within castle.

1nov16:  initial development ch2.  
.) Storyline: Minoans took chalice and hid it in the
	labyrinth.  Gamers must navigate the Atari "orange"
	maze to get to the labyrinth, then face the Minotaur.
.) Ch2 uses alternate skybox, maze-ceilings;
.) Ch2: red dragon attacks twice;  runs away 1st time.
.) Ch2: bat steals chalice.

15oct16:
.) added a round skylight in center of castle ceiling
	with cylindrical adobe interior so that exterior
	skybox is visible.

11oct16: uploaded to IndieDB, itch.io, github #####################

10oct16:
.) added full sort to help draw forest of pillars, each with 4 arches.
	In addition to drawing back to front, we still need to draw twice, 
	(1st time without depthmask) in order to appear optically correct
	given that overlapping arches have significant transparent sections.

09oct16: uploaded to SF,IndieDB,itch.io,github #####################

9oct16:
.) added pillars, pool in castle.
.) exterior brightens when chalice is brought out of maze,
	and ground cover is more lush.
.) added chalice icon

6oct16:
.) fixed dragon behavior when trying to avoid them by
	running back into castle or out of maze.

5oct16:
.) saved, but dropped avatar efforts...see 4oct16bkup.
.) improved sword;
.) moved held objects to screen center;  hand lower.
.) working on cornice;  see av-setup_castle.adb::140


4oct16:
.) initial trial for avatar...basic functions working:
	.) separate pos values for camera/avatar;
	.) camera is fixed distance behind/above 
		avatar and looking in same direction, always.
	.) Except after hitting wall and turning around...
		then moves toward 1st person again;
	.) Press "m" to toggle mouselook=1stPerson view;
	.) cheap/dirty avatar...fixed texture top view


23sep16: v1.0.2 uploaded to SF,itch.io,github ######################

22sep16:
.) reinstated <i>-key for information/introduction
.) made spider move vertically.

22sep16: uploaded to SF,IndieDB,itch.io,github #####################

21sep16:
.) added spider to castle
.) improved clarity of various code parameters

20sep16:
.) modified pickLeft to refrain from playSnd(8)=putdown
	since the handling of dropping an item is done in main.
.) added bat to maze5 that steals black key (and puts it
	in a more obvious place).
.) added red dragon to maze5;
.) improved snake drawing to respect fog level.

19sep16:
.) added green mambas to maze5, maze6.
.) ...they are now deadly!  Keep your distance!
.) ...in order to perform collision calcs, I had to Xfer 
	trajectory calcs from shader (snake.vs) to Ada code.
	Then changed uniforms accordingly.
.) Now you get a warning on the first encounter,
	and killed on the 2nd.  But if you avoid the snake
	for a minute, then you'll still get a warning, first.

18sep16:
.) defined new multiply-interconnected maze to match
	original "blue" maze in Atari Adventure.
.) scene 3 is now defunct;  replaced by maze5, which connects
	to scene 1, and maze6.  Maze6 connects to maze5 and the
	temple (scene #4), and has a secret panel where the bridge was.

16sep16:
.) now has secret pass-thru maze panel, in preparation
	for new blue maze layout for level 3.

15sep16: uploaded to IndieDB,itch.io,SF,github ######################

15sep16:
.) ychalice is now cup vertical center
.) improved dragon trajectory.

14sep16:
.) created/used holeSurfObj to elliminate rolling hills
	surface from inside castle.
.) enlarged skybox so distant exterior objects dont get clipped.
.) more carefully define gkeynear, etc.

12sep16:
.) Improved transitions & doorway views to connecting scenes
	1&2, 3&4, so they now look very professional.  This
	requires drawing both scenes simultaneously, but with
	different MVP matrices.  This, in turn, requires 
	bifurcating any common variables.
	
	Set special dimensions inside castle (Yme differs slightly)
	so as to allow conformal views thru gate...

	Scenes 1 vs 2 illustrates how to connect outside skybox
	view with a mostly conformal inside room.  In this case
	only the vertical Y-coordinate needed adjustment.
	The biggest complication here was the rolling hills 
	terrain of the exterior view.
	
	Scenes 3 vs 4 illustrates the simpler connection between
	two inside rooms where, if the doorway is mid-wall, 
	only 1 coordinate must be offset prior to redefining 
	the MVP matrix.

.) it seems the castle interior (x,z) must be conformal with,
	and smaller than, its exterior so as not to intrude into 
	exterior scene.

to join maze & temple, I did this:

.) remove image textures @ doorway;
.) draw both scenes simultaneously when necessary,
	noting that zme for each differs by 20.  This means
	that procedure updateMVPs must allow input of
	(xme,zme,coordscene#), and current scene# that we are drawing.

	DONE!
	note:  one must carefully ensure textures never exceed
	the bounds of the room.  Otherwise the adjacent room
	will not draw correctly.




11sep16:
.) set nearkey=0.8;
.) added roar.wav to encounters with dragon, per OA.

9sep16:
.) renamed "dungeon" to "temple"
.) perfected timing of final sound sequence:
	.) put-down chalice
	.) fanfare
	.) music

08sep16: uploaded to IndieDB,itch.io,SF,github ######################

08sep16
.) cleaned up unused resources;
.) setup for joystick, gamepad;
.) created videos, screenshots;


07sep16
.) setup/run on OS-X
.) added trees, less manicured grass
.) added Introduction and ending verbage.

05sep16
.) initial version roughed out
.) navigation working
.) drops/pickups working
.) 4 scenes designed for first level
	.) initial exterior castle in hills with skybox
	.) 3 interior room scenes
		.) castle interior
		.) maze + fancy fragshader ceiling, heavy fog
		.) greek temple room, purple fog

