/*-----------------------------------------------------------------------------
	tim@epicgames.com: Old work notes
-----------------------------------------------------------------------------*/

///////////////////////////////////////////////////////////////////////////////
Prior to 5-1-96: Work notes were on paper

///////////////////////////////////////////////////////////////////////////////
5-1-96

+	QuadHand, AutoMagHand properties
+	Use weapon offsets
X	Move Weapon with its parent (Child actors now ticked after parent, can handle this themselves)
+	DestroyActor destroy all child actors
+	AWeapon implementation
+	Pawn maintain Bob, inventory utilize

+	Inventory messages
+		PickupQuery: Root implementation, Pawn implementation
+		PickupNotify
+		AddInventory
+		DeleteInventory
+		PreemptPickupQuery
+		Activate
+		DeActivate
+		Use
+	'0' - '9' switch weapons
+	Autoswitch inventory based on priority

+	Multiple weapons sharing number key
+	Arbitrary DestroyActor calls must preserve inventory chain
+	Pickup message strings, simple text messaging

+	Weapons
+		Weapon up & weapon down upon activate/deactivate
+		Use 'Fire' anim sequences
+		Instant-hit function via raytracer with optional spawn-explosion-at-wall-minus-delta
+		Dispersion function for random weapons like shotgun

X	Pickup implementation -> save all of this for scripting
X		PickupSound, RespawnSound stubs
X		RespawnTime
X		RespawnNetOnly
X		Respawn FX

+	Root: On PreBeginPlay, server pass play flags and destroy unwanted actors
+	LevelSetState include difficulty and network play flags

+	Detect Windows NT and skip DirectMouse
+	Fix sheet brush display order, now draws semisolid coplanars after solids
+	Cloudcast bug?
+	DispDib error mention Win95 requirement

///////////////////////////////////////////////////////////////////////////////
5-2-96

+	Kill unused cameras after load-for-play
+	UnrealEd: Sort mesh viewer list
+	UnrealEd: Strip quotes from strings, reappend during export
+	UnrealEd: F4 cycle through list of result messages (Next Error)
+	UnrealEd: Class browser, no Close button
+	UnrealEd: String properties are acting up
+	UnrealEd: Map save-as + cancel doesn't work.  Other save-as's also? Check it out.
+	Actors have ambient brightness property
+	Set player's starting yaw accoring to PlayerStart
+	Implemented UClass::IsKindOf
+	Test all CPT_String references
X	InstantHit projectile class - use a function instead
+	Pyrotechnics class with
+		Explosion, TeleportIn, TeleportOut, WallDamage, MonsterDamage, PickupRespawn, PlayerRespawn, PlayerDie

+	Property arrays
+		ImportActorProperties
+		Don't allow editable arrays except for strings
+		AActor::QueryReferences
+		AddParentProperties
+		ExportActorProperty
+		ExportMultipleActors - skip arrays except for strings
+		Export headers & actors
+		Import
+		Test ugly stuff, including array of names + array of resources
+		Export class, only fwd declare classes that are necessary

///////////////////////////////////////////////////////////////////////////////
5-3-96

+	Don't use DMouse movement when mouse not captured
+	Auto-activate upon pickup
+	Auto-activate and deactivate upon switch
+	Expand zone list to include name and all other new info
+	Way of specifying particular actor class as a CPT_

+	UnrealEd: Preferences/No-checks mode
+	UnrealEd: Treat intrinsic classes as read-only unless no-checks mode is on, note *'s
+	UnrealEd: Is PF_HURT tag visible?

+	UnrealScript
+		support classed actor references

X	bWantTextMsgs
+	ILevel::GetZoneZoneDescriptor(iZone)
+	ILevel::GetActorZone(iActor)
+	Zone builder handle ZoneDescriptors
+	Is bClassPureVirtual being copied from parent class?
+	FZoneFilter::MergeAdjacentZones: Invalid back cut
+	Never destroy bStatic actors
+	Export actor: if exported parent, only export non-identical properties

+	Zone transitions
+		Actor Zone byte
+		MoveActor,FarMoveActor,SetState: Message ZoneChange, send ZoneChange right after BeginPlay
+		BeginPlay
+	Delete cone tracer stuff, replace with line tracer
+	FClassProperty::Compare
+	Fix 'Bump' message - only send once per call to MoveActor.
+	Spawn send ZoneChange
+	Projectile move with MoveActor
+	MoveActor, etc - validate Class after all SendMessage calls.

X	Const properties which are stored only in class data but not individual actors
X		Use for advanced pawn properties (stored in class only)
X		inline FClassProperty::GetData(Class,RawActor) instead of offset for *all* gates
X		Rename PropertyOffset
X		Shared properties
X		This would cause a huge slow mess in accessing stuff from C

X	Ammo system -> Save for scripting
X		Slurp ammo, deactivate when exausted
X		When deactivate with no dest weapon, pick highest priority other weapon

+	Plan damage system mechanics
+	Plan kill credit mechanics

///////////////////////////////////////////////////////////////////////////////
5-4-96

+	5 armor classes, 5 damage classes
+	PHit message

+	Classes
+		KeyPoints: BlockAll, BlockMonsters
+		Pickups class: Shells, Bullets, Health
+		GunFlashSmoke
+		Projectile const brightness

X	PF_MONSTER_NO_GO, implement in sphere/rod routine, use collision hints instead
+	Logo, GGfx.Logo
+	Impart momentum

+	Actor->bJustDeleted, SpawnActor prevent recycling of actors during a frame

+	2 fire button support with Use, UseExtra Ctrl+Space
X	CMB Damage = k/Distance? I think not.
+	Root route UseExtra to Use
+	Teleporter = intrinsic

+	New light sampler
+		Sample around lattice center for better consistency
X		Do X-jittered oversampler to hide lightmesh wall aliasing -> Not useful with 4X oversampler

///////////////////////////////////////////////////////////////////////////////
5-5-96

+	Rewrote light mesh supersampler

///////////////////////////////////////////////////////////////////////////////
5-6-96

+	Volumetric lighting works. Very cool.

///////////////////////////////////////////////////////////////////////////////
5-7-96

+	Reimplement diffusion dithering
+	WallHit actor = puff of smoke
+	Caught up on email. Email sucks.

///////////////////////////////////////////////////////////////////////////////
5-8-96

+	BSP cone tracer
+	InstantHit weapons hit walls, spawn smoke
+	InstantHit weapon properties: +Dispersion (0-1.0), +NumShots
+		InstantMomentum
+	InstantHit weapons hit actors
+		transfer momentum according to mass
+		do damage
+	Hit messaging
+	Actor functions to get view coords & get draw coords
+	Math PerturbVector function
X	Pyrotech needs acceleration vector -> just gravity multiplier
+	Raytracer handle fake backdrops
X	Optimize diffusion dithering routine -> give to Mark or Ammon

+	Added AActor::GetViewCoords for finding an actor's view coordinate system
+	Added AActor::GetLocalVector to transform a vector into the actor's coordinate system

+	InstantHit weapons need MeleeDamage,RangeDamage,FireDamage,ElectricDamage
+	No macro save camera open
+	Projectiles need uneditable damage attributes
+	Weapons must set projectile's damage attributes

+	UnrealEd minor stuff
+		Zone portals editable
+		Macros use .mac ext, not .MAC
+		Init common dialog directories at start, then leave them alone

///////////////////////////////////////////////////////////////////////////////
5-9-96

+	Monster zone clipping
+	Monster bounding boxes
+	Use per frame bounding box

+	Jason Emery help files (cool!)

+	Rotations need to be int's for script accessibility? Ugh.

///////////////////////////////////////////////////////////////////////////////
5-10-96

+	Validate function for all actors, reverse-sent like Spawn

+	Moving brushes
+		Mover's spawn function: set default keyframe position to location & rotation -> Zeroes
+		KeyCurrent = name
+			Validate name
X		UnrealEd UI -> Can do all of this with existing property system!
X			Display keyframer when 1 actor is selected and it's a mover - IsKindOf
X			'KEY ADD NAME=' 'KEY DELETE NAME=' 'KEY SHOW NAME='
X			UnrealEd UI for moving keyframes
+		bAdded, MoverInitialKeyPos
+		Utilize saved location/rotation only, no scale no sheer
+		Isn't exporting positions/rotations associated with keyframes?
+		Eval byte, int, float actor properties
+		All PText messages include iSourceActor
+		UnrealScript handle CPF_EditInPlay
+		UnrealEd Vector & Rotation editing dialog
+		Indexed property import

///////////////////////////////////////////////////////////////////////////////
5-11-96

+	Optimize:
+		Shadow cache builder, use bitmask
+		Use 1 simple mipmap decision
+		Build mip-reference list + ptrs to all needed textures in advance

+	Updated square root precalc
+	Visible polylites stat

///////////////////////////////////////////////////////////////////////////////
5-12-96

+	Merged sound code
+	Answered 150 waiting emails.  Email still sucks.

///////////////////////////////////////////////////////////////////////////////
5-13-96

+	Actor textures fuzz in distance
+	Actor chunk highlighting weirdness
+	Don't highlight selected stuff during play -> Root deselects all in BeginPlay
+	'Posessed' messages are dead
+	Fixed & optimized box-clipper near-clipped cases -> cool outcode union trick
+	V-fog toggle

+	Moving brush prelims
+		Place, move, and set InitialKeyPos in UnrealEd
+		UnrealEd Brush - no '...', use current call Map DupeBrush
+		Copy current brush (make a duplicate)
+		Brush bounding sphere
+		Set location, rotation properly
+		Export, import with actors properly
+		AActor::GetPropertyPtr(iproperty,element)
+		Test multi-select with property array - must ignore
+		CPF_ExportResource for resources, use for single elements and arrays
+		Wire render

+	Movers: Sinusoid frequency, phase option

///////////////////////////////////////////////////////////////////////////////
5-14-96

+	E3 prep
X	To do: -> Denied!
X		Basic sporadics class with realtime EdPoly CSG (slow):
X			AddAllBrushes
X			RemoveAllBrushes
X			MoveBrush
X		Merge Mark Randell's code
X		Import Cliff's maps or give Cliff the new UnrealEd

///////////////////////////////////////////////////////////////////////////////
5-15-96 through 5-18-96

+	At E3
+	Demos went ok but certainly not great
+	We have a hell of a lot of work to do before Unreal is truly impressive

///////////////////////////////////////////////////////////////////////////////
5-19-96

+	E3 recovery

///////////////////////////////////////////////////////////////////////////////
5-20-96

+	Look into box occlusion span merge slowdown -> Code is ok
+	GClasses: TextureRes, SoundRes, AmbientRes, LevelRes, ResourceRes
+	Class startup routine
+	Bump res version
X	Purely generic actor class needs Class pointer? -> Doesn't matter
+	Check registry
+	VC++ 4.1

+	CPUID MMX, +Pentium
X	Must use DirectDraw display pitch, can't assume == SXR
+	Should lock DirectDraw only during texture mapping, not setup
X	Parallel Resource class -> Overly complex

X	Angles as integers -> Later
+	UnBuild.h: REQUIRE_MMX, REQUIRE_3D
+	Scrap MipLevel in UnMMX.cpp
X	Use level gravity vector -> Later
X	Use Zone gravity override vector -> Later

X	Need a damned password in Unreal (registry) -> Nah

///////////////////////////////////////////////////////////////////////////////
5-21-96

+	DirectDraw, DirectSound & WinDiff crap
?	Need AnimDef for animating texture animation sequences?
X	Class flag: includable in actors -> Lame

///////////////////////////////////////////////////////////////////////////////
5-22-96

+	How to pass strings around? String constants? -> Predefined length
+	Must implement property frames for handling of globals, locals, and params -> Reworked
+	FClassProperty: support Init token & error result
+	FClassProperty::IsTrue

+	GetToken handle allowable resources
+	Resource(Name)
+	Vector(X,Y,Z), Rotation (P,Y,R)
+	Name(Name)
+	Resource type script-referencable flag
+	hack for dumping class during compile
+	dump support const, etc.
+	True,False are now integer constants

+	All vectors & rotations import/export in new format
+	New sound code
+	Fixed can't delete lights bug
+	Reduce memory thrashing

///////////////////////////////////////////////////////////////////////////////
5-23-96

+	GPF's screw up focus somehow when mouse is captured
+	RendSpanOccludeBSP crashes at 168 660
X	No duplicate VB & C error messages -> This is ok
	Unload DirectDraw if locked at crash time
X	Fix UnrealEd startup instability -> This is a Microsoft bug
+	Crash in FGlobalUnreal::Exit keeps task alive
+	Crash doesn't always kill timer?
+	FGlobalUnreal::Init double crash from VB
	
+	Separate EdSrv from GameSrv
+	WM_CANCELMODE
X	Run players at 70 fps, AI at 35 fps? -> Revisit later
+	pEnable/pDisable don't work with cams anymore.

///////////////////////////////////////////////////////////////////////////////
5-24-96

+	Add DD 800x600 and 1024x768
+	ILevel::SendMessage added class parameter
+	Malloc gate for *all* Unreal memory, leak check at end
+	Resource leak check and display
+	Texture properties: Ground friction & hit sound & footstep sound
+	UnrealEd: Never ending slow task disables cameras

+	_set_new_handler
+	_set_new_mode
X	Adjust player-control mouse response: faster rotation, slower movement -> Configurable

X	Parameters via: Link topics? Class properties? New system entirely? -> Dumb
X		Need way of saving defaults like sound/music volume
X		Need way of running macros

X	Wall damage dynamics
X	Muchos cheats
X		All-health, all-ammo, all-weapons, move-z, no collision

+	Cleaned up memory leaks
+	Fixed killing UnrealEd doesn't kill UnrealServer if log window is open

+	Resource purge function to clean all resources not owned by root

+	Actor messages are now enum'd and attached to root

///////////////////////////////////////////////////////////////////////////////
5-25-96

+	Now use PlayerStart's PlayerSpawnClass
X	Check all FIND_EXISTING, FIND_OPTIONAL -> All is well
+	No resource purge ever in UnrealEd

+	Scripting warm-up
+		Accept default values if not editable, require if const
X		Export const's as C++ enums -> overly complex
X		Allow const's as array dims -> overly complex

+	Functions & Operators
+		Function <name> () [Intrinsic] [Fast]
+		Operator <symbol> () [Intrinsic] [Fast]
+		Parse all comma-separated parameters
+		Prevent bad overrides in parameters
+		Allow defaults in parameters
+		Handle 'as returntype'

+	B1umped res version to 7
+	Moved gameInit/gameExit to FGlobalUnreal

X	FGlobalClasses now includes AllClasses and IntrinsicClasses -> Rearranged
+	Added to FGlobalPlatform: LockName, LockPassword, LockEncryption, PasswordDialog
+	Added to FGlobalPlatform: OpenSettings,CloseSettings,GetSetting,SetSetting
+	Uses REGISTRY_KEY_BASE, REGISTRY_KEY_COMPANY, REGISTRY_KEY_PRODUCT

///////////////////////////////////////////////////////////////////////////////
5-26-96

+	Catchup
+	Visual C++ 4.1 = unstable slow ass compiler from hell, reverted back to 4.0

///////////////////////////////////////////////////////////////////////////////
5-27-96

+	Max Z-based subdivision decision -> This rules!
X	Transparent smoothing is awesome!  May want to cache previous frame's
X		spans and render in two phases (one blended union, one normal diff).
X		This looks so damn cool in 320x200. Requires maintaining 2 buffers
X		for consistent averaging -> Check out later
+	Temporal H&V antialiasing
+	Temporal 2-way mipmap transitions

///////////////////////////////////////////////////////////////////////////////
5-28-96

+	Email, Intel discussion, experimentation with temoral antialiasing

///////////////////////////////////////////////////////////////////////////////
5-29-96

+	FScopeLink

X	Action/EndAction, Repeat <n> -> Messy implementation

X	Generic add-parent-properties that takes an iTree as input -> Overly complex

+	Scripting infrastructure (pre code gen)
+		Maintain FStackTree entry 0 (global)
+		PushNest, PopNest be cognizant of FStackTree
+			Parse all stack tree types correctly
+				If-ElseIf-Else-EndIf
+				While/Do-Loop/Until
+				Select/EndSelect
+				Case/Default
+				For/Next
+			Handle local variable dims
+			Resolve length-aware string parameter passing
+		Script disassembler called at end-of-compile:
+			Display stack tree dump
+			Display global variable dims (implemented in FClassProperty, not UClass)
+			Display local variable dims
+			Display var intialization values when nondefault

+	Detect end of script with bad nesting level
+	#dumpnest directive
X	First conditional remake remakes all due to pointer relocation. Avoidable? -> No.
+	Assemble script from +stack tree, +properties, and +data
+	Script->Decompile work (very basic)
+	Decompile local and global variables
+	Prevent states etc. in an intrinsic class, provide useful error messages
+	Proper errpr overloading of parent global variables
+	No whens in intrinsic classes
+	No states in intrinsic classes

+	No editable local properties
+	FClassProperty::ExportTCX needs to handle default values!
+	Must use SNODE_ flags

+	Parse intrinsic functions
+	Functions in intrinsic classes must be intrinsic and not
+	Stack tree flags, such as intrinsic, auto, editable
+	ALLOW_Return

+	Local properties and initialized data.
+		When push nesting level, allocate a data buffer
+		When popping nesting level, copy data buffer over
+		When popping nesting level, release any allocated memory
+		Upon completing the script compile, move all properties to the script and reallocate all offsets

///////////////////////////////////////////////////////////////////////////////
5-31-96

+	Timings:
+	    * Can write 4 cached megs at full speed = 1/2 cycle per dword write
+		* Can write 4 uncached megs in 50 msec = 8 cyc/dword written
+		* Can insert 7 cycles of cached instructions in the loop for free
+		* Time rises to 90 msec if you add one uncached read in the middle (write buffer
+		  and read buffers colliding).
+	    * Can read 4 uncached megs in 112 msec = 18 cyc/dword read
+		* 8 c/p = 17 msec/frame at 166 mhz
+		* Traversing the entire actor list 100 times takes 40 msec, and half of the time
+		  is due to the lack of caching.

+	Conclusions:
+		* Drawing 4x4 blocks across the screen, then copying to vid memory will just cost
+		  an additional f-ing 8 cycles per pixel.
+		* There's no point to having a texture mapper that writes faster than one DWORD
+		  or one QWORD per 8 cycles.
+		* Don't write a lot of data - better to compute stuff on the fly.

+	Reduced frame setup work by using a better point/vector caching system (no huge memclears)


///////////////////////////////////////////////////////////////////////////////
Unreal 0.75: Testing info

What's in this version:
	* Unreal installation
	* Optional DirectX II installation
	* Support for all 8- and 24-bit color video modes
	  - In-a-window
	  - Fullscreen via DirectDraw II
	* DirectSound support
	* DirectMouse support

Requested feedback:
	* For bugs:
		- Send Unreal\System\Unreal.log to UnTest@epicgames.com
		- Send beta report describing problems
	* For game play suggestions (non-bugs):
		- Post to Unreal@epicgames.com

Known limitations of 0.75:
	* Begin game, end game, open, save aren't in place
	* Always playing; no non-game state
	* Only included 1 level for testing
	* Creatures are invisible in 24-bit color
	* DirectInput support is stubbed out in this version due to known major bugs
	* Configurable input isn't in
	* Help files are very outdated
	* Playability needs a whole lot of work
	* Not tested on Windows NT
	* Sound pauses when game window loses focus
	* Audio properties dialog isn't in (volume controls)
	* Install program doesn't detect or require presence of MMX
	* Unreal doesn't require presence of MMX
	* No hardware 3D acceleration

Planned limitations in Unreal OPSD gold:
	* No network play
	* US English text only in initial release

Developers to contact on UnTest@epicgames.com:
	* Unreal engine: Tim Sweeney, tim@epicgames.com
	* Input system: Mark Randell, randell@computan.on.ca
	* Audio: Ammon Campbell, ammon@teleport.com
	* Gameplay & level design: cliffyb@earthlink.net

Minimum requirements
	* Windows 95
	* 16 megs of RAM
	* For decent video performance, you'll really want 2 megs of VRAM

///////////////////////////////////////////////////////////////////////////////
Unreal 0.75 notes & requests

Mark and Ammon:

	1. New portability info: Please arrange all your code so that all platform
	specific code (anything that relies on Windows, DirectX, Galaxy, etc) goes into
	the Windows project, and all platform independent code goes into the Engine project.
	For modules which rely on both platform-specific and platform-independent code (such
	as the input system and audio system), please create two global classes - one that
	is platform independent, and one that is platform specific.  Then, porting will only
	require rewriting the platform specific code.

	2. Make sure your code doesn't internally refer to any classes that aren't referenced
	in the global resource tree, i.e. the following will fail:

	    MuzzleEffectClass = new("MuzzleFlash",FIND_EXISTING)UClass;

	3. Once new build is posted, please move all code that's only needed by UnrealEd over 
	to the new Editor project and make sure that you place sufficient #ifdef EDITOR
	checks in your source so that everything compiles and works as intended both with and
	without UnrealEd support.  My code is completely moved over.

	4. Malloc(size,str) now needs a description string parameter which is used by Unreal's 
	memory allocation tracker.

	5. I moved all of the global functions from UnrealWn.cpp over to the FGlobalPlatform
	class in the Windows project.  Mark, if you've put hooks into the old UnrealWn.cpp project
	for keyboard/mouse support, you'll have to put them in again.

	6. I changed the spelling/naming of several resource types in order to improve the
	consistency.  The best way to find the changed names is to compile your code and see what
	breaks.

	7. Here's how to hook your platform-specific code in the Windows project to the
	engine in UnEngine.dll: Encapsulate all of the platform-specific functionality
	into a class and call it something like FGlobalFruitManager.  Make all of your
	functions virtual (so that they can be called through their virtual function
	table -- necessary since the Windows project is not a DLL and it cannot export
	functions). Then insert it into the FGlobalPlatform class defined in UnPlatfm.h, 
	after the other hooks, like this:
		...
		// ----------------------------
		// Platform-specific subsystems
		// ----------------------------
		//
		class FGlobalRenderDevice   *RenDev;
		class FGlobalCameraManager  *CameraManager;
		class FGlobalFruitManager   *Fruit; // Your class
		// Other global platform-specific classes go here...
	Then insert some init code into Windows to set App.Platform.FruitManager to a
	pointer to your class (a global variable).

	8. Renamed some projects & directories to make them more descriptive.
		UnrealEd -> Editor
		UnWn -> Windows
		UnLaunch -> Launcher

	9. I chaned the AUTOREGISTER_RESOURCE macro; it now needs 4 DWORD parameters
	comprising an Ole GUID.  Ammon, you can just copy the two updated
	AUTOREGISTER_RESOURCE macros into your code.

	10. Changed the way resource classes are defined, because the old method
	confused the VC++ class browser.  A class previously defined as:

		RESOURCE_DB_CLASS(UPalette,FColor,RES_Palette)
			void Register				(FResourceType *Type);
			// Other functions...
		END_RESOURCE_CLASS;

	is now defined as:

		class UNREAL_API UPalette : public UDatabase
			{
			RESOURCE_DB_CLASS(UPalette,FColor,RES_Palette)
			void Register				(FResourceType *Type);
			// Other functions...
			};

	Note that resource classes defined with RESOURCE_CLASS should be derived
	from UResource, and classes defined with RESOURCE_DB_CLASS should be
	derived from UDatabase.

	This has zero effect on how the resource subsystem works; I just had to
	move some stuff out of the macro for VC++ to recognize it.

Ammon:

	When GAudio.Init() is called in UnrealEd, the editor crashes when
	exiting about 50% of the time. When GAudio.Init() and GAudio.Exit()
	are removed (from Unreal.cpp) the problem goes away.  Please look into
	this; this kind of bug is scary.

	In USound::Register & UAmbient::Register, add the line:

		Type->TypeFlags = RTF_ScriptReferencable;

	This flag indicates that scripts are allowed to make references to that type of
	resource.

	I still need you to add a sound and music volume dialog (and any other audio 
	options you feel are needed in the UI) in the Windows project.  I put a stub dialog
	there, but it doesn't do anything yet.

	Note that I renamed BrAmbient.frm to BrAmbi (need 8.3 filenames).  If you've updated
	your file, just copy it over top to the new name.

	Pause and Unpause need a fadeout option so that audio can be paused and unpaused 
	unharshly.

Mark Randell:

	If you root.tcx is later than mine, make sure the Mover class contains the
	default property..
		Begin DefaultProperties
			DrawType=3
			...etc

	Config code:

		Please generalize your configuration-file code so that there's a nice
		general interface for reading and writing config values by
		topic, key, and value.  This will be handy in a lot of places.

	Note the new "Dim Me as Actor" definition in Root.tcx (and also in AActor).  This is
	a way for actors to figure out their own index easily (use iMe in C++).  This is the
	only change I've made to Root.tcx.  I also removed iActor from all AActor::Process 
	functions since that is now redundent.

	I added a Class property to SendMessage.  Set this to the class you want the
	message sent to, i.e. AShotgun could call SendMessage with Class=AWeapon
	to invoke parent processing:

		int	SendMessage(INDEX iActor,FName Message,void *Params,UClass *Class=NULL);

	NULL indicates 'use the actor's regular class'.

	Note vitally important changes to ActorDLLStartup in my code. This new prevents
	actor message names from being purged by GRes.Purge().

	How this impacts the UnActors.dll code:

		These are all the changes I've made in the actor code.  You should be able to merge
		our sets of coding by making only the iMe/iActor changes to your code; I didn't have 
		to make any other modifications to your code other than deleting the 'INDEX iActor' 
		from all ::Process functions and replacing 'iActor' with 'iMe'.

	How this impacts the engine code:

		You can see all of my iMe changes by searching for 'iMe' in the main Unreal files.  
		The really important ones are in ILevel::SpawnActor (which initializes iMe) and
		after all calls to ILevel::ImportActor (which fix iMe in case it was messed up).

	Check monster sizing.  Some monsters seem to be embedded in the floor in the version
	of Unreal I have (Skaarj especially).  This might not be the case in your version.

	Documentation for input system.  We'll need a text file describing any important 
	end-user aspects of the input system, including troubleshooting information for
	all known and anticipated problems, such as bugs in DirectInput.  This will
	later be laid out by someone else and included in the Unreal 
	documentation (on-disk or printed). A plain text file is ok.

	When I moved the code from UnrealWn.cpp to the Windows project:
		* I removed StoredKeys from UCamera - wasn't being used.
		* I moved the DirectMouse handlers over the FWindowsCameraManager.
		* Moved StoredMove, StoredPitch etc from UCamera.  These values can now
		  be obtained and reset from GCameraManager->GetStoredMove.  This is a
		  lot cleaner internally.
	I know this going to be a pain for you to update your input code (sorry!), but the
	UnrealWn code was just too much of a mess to keep as-is.  See the code in my UnInput.cpp
	for an example of how to use this:
		//
		// Local mouse movement
		//
		FVector			StoredMove;
		FFloatRotation	StoredRot;
		//
		GCameraManager->GetStoredMove(Camera,&StoedMove,&StoredRot);
		// etc

///////////////////////////////////////////////////////////////////////////////
5-30-96

+	Texture mapping experimentation

///////////////////////////////////////////////////////////////////////////////
6-1-96

+	Adapt mip transitions based on slope
+	Proper V-clipping
+	As optimized skip-in as possible
X	Cache lines rather than sides? -> Not useful, performance losses == gains.

///////////////////////////////////////////////////////////////////////////////
6-2-96

+	Functions
+		Use CPF_Initialized throughout
+		Parse 'function' & 'when' parameters as variable properties
+		Parse optional function return value
+		Optional params (params with default initializers), require to be last
+		Display function parameters in decompiler
+		Display optional function return value
+		String initializers either don't work or don't decompile
+		Allow Enums as constants
X		If function has return type, require Return as the last command -> Don't want to be forced
X			to decode the execution path to validate this.  If return isn't used, the function
X			returns the default value of its return type (i.e. zero, "", ZeroVector, etc).

///////////////////////////////////////////////////////////////////////////////
6-4-96

+	Scripting fundamental questions:
+		Can UnrealScript operate without a message queue? -> Yes, a message queue is only
+			needed for SendMessageDelayed and Hold/Unhold, but not for regular script
+			operation.
+		What happens if variable-time code calls a function which changes the state? -> State
+			transitions are made to the actor's FState and marked 'pending' but the permanent
+           thread's instruction pointer isn't updated right away.  Permanent-thread IP update 
+           occurs before each new variable-time command is grabbed in the Tick routine.
+		How is recursion and reentrancy handled? -> Via on-stack execution contexts

X	Rendering method of the day -> Slow
X		Draw-across with precision masked G continuous update, UV reload
X		Rect Mip Subdivider and separate drawer, triggered iff #mips > 0

///////////////////////////////////////////////////////////////////////////////
6-4-96

+	Conference calls all day long.  This is pissing me off beyond belief.
+	Got ATI Rage version of Unreal up and running

///////////////////////////////////////////////////////////////////////////////
6-5-96

+	Exit from server console with camera open causes appError
+		Due to Windows reentrancy crap with mouse/keyboard polls
+	appErrors in DirectDraw exit without closing log (Win16Mutex problem?)

+	Support 16 bpp 5-5-5 format on hardware
X	Support 16 bpp software rendering with cached 32K lighting lookup table -> l8r
+	HiColor and TrueColor font remapping right
+	Scrap TEXT_ junk
+	FColor HiColor() member
+	Must use Back-to-front sort order for 3D hardware

+	Triangle strips rather than simple triangles
+	Rage texture caching
+	Perfect u,v->s,t,w texture mapping
+	Hardware texture caching with fast 16-bit color remapping
+	Texture cache maintainer
+	Repair regular DirectDraw code

X	Rage mipmaps transitions look like hell without trilerp -> Wait for Rage 2

///////////////////////////////////////////////////////////////////////////////
6-6-96

+	Parse operators, enforce unary/binary relation and return type
+		Can only operate on one data type - all params and return values must be that type
X	Stack node iParent -> track in FState instead
+	IdentifierToC to handle weird operator chars
+	Figure out string passing to C, how to pass lengths -> Length is function specified
X	Maintain proper StackNodes in the script itself while compiling? -> Not needed
+	Make sure parent script stack nodes are never screwed with
+	When define a class node, function node, or state node, link in the parent class script's 
+		corresponding child links into its tree so that overrides can be determined with a fast 
+		linear search.
+	Function and event overrides are searched in the current state (for the current
+		script then all parents) and then the next lower state, in a fast linear search.

///////////////////////////////////////////////////////////////////////////////
6-7-96

+	Verify function uniqueness
+	Force overriden functions/when's to be parent/child/self-multi consistent
+	No function overloading
+	Root needs "Dim Me as Actor" (index to self)
X	NumParamProperties? -> Ditched it
+	When compiling script, error out if parent script is invalid
+	Force script make before play!
+	Make only care about script text crc to prevent linking from foiling make logic

+	Prevent function/when/operator clashing
+	No optional params in operators
+	Allow correct operator overloading, overriding, and overloaded overriding (bleh)
+	Compile all Script.txt operator definitions properly
+	Make must check Parent ScriptTextCRC

+	Manage code offsets properly everywhere
+	PopNest emit SC_END
+	Bogus instructions TestCmd and TestEval to test compile/decompile

///////////////////////////////////////////////////////////////////////////////
6-8-96

+	iMe, remove from messages
+	Changed FClassProperty.  PropertyType from DWORD to EClassPropertyType

+	TestEval expression evaluator: compiler and decompiler
+		All allowable constant types
X		Resources need to be typed in expr's? -> Not needed at the binary level
+		Global variables
+		Local variables
+		Variables with and without array subscripts
+		Parenthesis
+		Check operator fast requirement
+		Don't allow fasts to be overridden ever
+		Names either directly or as string constants
+		Function calls with exact-match: FToken::GetFunction
+		Regular and prebound fast function calls, get all emits right
+		Function call decompiler: EX_Function, EX_FastFunction
+		Allow overriding fast functions -> if overridden, prebound to nearest function in context
+		Unary operators, FToken::GetOperator

///////////////////////////////////////////////////////////////////////////////
6-8-96:	 Demo prep
6-9-96:  Wraparound
6-10-96: Microsoft
6-11-96: Interplay
6-12-96: Xatrix
6-13-96: Raven
6-14-96: Catch up, clean up, reinstall, business

///////////////////////////////////////////////////////////////////////////////
6-15-96

+	Added FGlobalPlatform::CheckMachineState
+	Added FGlobalPlatform::DebugBoxf
+	Removed sphere from bound
+   Added bound to brush
+	bspValidateBrush accept number param for level import status
+	Expand UModel to include DWORD flags, bounding sphere
X	4-align actor properties? -> No, root class definition is already aligned, and
X       misalignment penalty script properties is insignificant compared to script
X		execution overhead.

+	UnrealEd
X		Actor props form and results form needs a control box -> No can do with tool wins
X		Results window open up centered along bottom of screen -> Complex
+		Tex import, no "brighten"
+		Fixed AutoSave "Couldn't open file" error when run via shortcut
+		Fixed truncateing compiler result text when receives 2 blank lines together
+		Must refresh all script editor windows after load/import class/map
+		Opening multiple script editor windows tanks on exit
+		Help is lost from VB but sometimes works from edcam windows (weird)
+		Fixed UnrealEd crashing upon exit (message pump reentrancy bug)
+		Fixed texture panning loss
+		Still have an UnrealEd crashing on exit bug -> Ammon's (*#$&(#*&$#$#$@ bug
+		Does Unreal kill the timer before the server has a chance to exit? -> Yes
+		UnrealEd brush-load shortcut key
+		Smooth grid fading during zoom
+		Somtimes moving mouse with Tab down makes brush vanish
+			Windows bug: Holding Tab then pressing Ctrl generates a Ctrl-I which
+			UnrealEd interprets as the Intersect shortcut. Changed Intersect to Ctrl-N.

+	Added ICamera::GetOrthoNormal for getting camera view normal in orthogonal views
+	Added UModel::BuildBound for building brush bounds
+	UCamera::ResetModes() resets all stored movemements; called when player controls
+		are toggled to prevent stored movements from accumulating.

///////////////////////////////////////////////////////////////////////////////
6-16-96

+	UnrealEd
+		Wireframe mode optimizations
+			Don't draw solid FPoly slivers if far
+			Generates untransformed brush bounds in bspValidateBrush
+			Generate transformed bounds when placing/moving brushes
+			Replace rendDrawBrushFPolys bounds hack?
+			Brush bound outcode reject (3D) + ortho reject (2D)
+			Bound = intrinsic property of untransformed brush
+		Wireframe views are now 300% faster on average
+		Draw active brush as semitransparent
+		Fixed player being teleported to random place after pressing 'P' bug
+		Arrow brushes are being rejected unnecessarily
+		Need script editor find
+			Select 'find' text on open
+			Find dialog
+			Find highlight found word
+			Find & Replace
+			Find next
+		Go to error or to src if no error after script compile
+		Place message cursor on last line after compile
X		Remember camera mode so windows can be totally customized and saved in UnrealEd -> troublesome
+		Temporarily restored old lighting/shadowing code
+		Fix backdrop
+		Do not dither mipmaps

X		Use #ifdef RELEASE -> Only adds extra confusion
+		Check !!'s
+		Hid all unimplemented game options
+		UnrealEd lLight brightnesses back on par with UnrealEd 0.65

///////////////////////////////////////////////////////////////////////////////
6-17-96

+	Intel architects meeting

///////////////////////////////////////////////////////////////////////////////
6-18-96

X	Assimilate Mark's code -> No Mark's code to assimilate
+	Assimilate Ammon's code
+	Install License.doc viewer?
+		Bad window title
+	DirectDraw/DirectSound upgrade bugs. What a mess.

///////////////////////////////////////////////////////////////////////////////
6-19-96

+		Met with Microprose guys -> quite cool
+		FGlobalTopicTable::Exit wigs out on NT
X		Damn MMX detection install stub -> Later
+		UnrealEd on Windows NT?
+			Busted NT 3.51 detection
+			Fixed all NT incompatibilities
+		Lost results window in NT
+		Windows NT vs. 95 compatiblilty problems
+		Query available DirectDraw modes and fill menu according to 8/16/32-bit color
+		Hide all DirectDraw modes if unavailable
+		Hide DispDib if NT

///////////////////////////////////////////////////////////////////////////////
6-20-96

+	Intel VX wish list. That thing will truly ROCK!
+	Fast mymemset() function - use this instead of memset() if performance is critical
+	Bilinear chroma/lumina texture mapper - very promising, needs speed
X	Player tick framerate at 70 fps?

///////////////////////////////////////////////////////////////////////////////
6-21-96

+	Check out BSP rebuild bugs - bounding bug? -> Fixed
+	Cut down 2D map view clutter
+	Duplicate actors add an X&Y offset
+	Mover drawtype default to DT_Brush
+	In UnrealEd, also draw sprite for DT_Brush things
+	Show movable brushes in 2D views
+	UnrealEd XYZ editor, Z is screwed up
+	UnrealEd rotation editor
+	Console->Log
+	Need map load NoRefresh=on
+	First alt keypress screws up
+	Set focus to camera window on startup
+	Fixed DispDib bugs
+	Log doesn't crash if not initialized
+	Way optimized line drawer in map view
+	Implemented FGlobalCameraManager

///////////////////////////////////////////////////////////////////////////////
6-22-96 + 6-23-96 (Marathon)

+	Removed all Windows code from UnEngine to UnWn
+	Unreal resources are now all IUnknown-derived component objects
+	Fixed up RESOURCE_CLASS macros so they don't hose the VC++ class browser
+	Mouse and keyboard responsiveness now rule

+	Clean up render class
+		Moved stuff to FGlobalRender
+		Changed BspPoly to BspSurf
+		Stuck CmdLine in FGlobalPlatform
+		Scrap global variables
+		All windows.h dependencies out of Unreal
+		All editor code out of Unreal to GEditor
+		All edcam stuff belongs in GEditor
+		All bsp stuff belongs in GEditor

+	Moving brushes
+		Show moving brushes in a special color in edit views
+		Display brushes wireframe
+		Associate brushes with actors properly

+	Unreal 0.75 goals
+		All windows code separated into Windows project
+		All windows/hardware support code ready for beta feedback
+			DirectDraw support
+			DirectSound & Galaxy support
+		Resource purge in place

///////////////////////////////////////////////////////////////////////////////
6-24-96

+	Rewrote all DirectDraw support
+	Moved all Windows-specific code over to new classes
+	Windows code is finally clean and easily sharable
+	Cleaned up DirectMouse support
+	Improved mouse responsiveness
+	Updated GRenDev code to be modular
+	Added 'PlayerEntered' message, sent to zone descriptor when player enter
+	DirectDraw palettes
+	Mesh view realtime controls
+	Line Case 2 crash

///////////////////////////////////////////////////////////////////////////////
6-25-96

+	DirectDraw mode recognition and menu update after set truecolor/not
+	DirectDraw crash handler
+	Changed iPoly to iSurf
+	Fixed awry Zone messages
+	Fixed major sidelink bug that showed up in Dark
+	All UnrealEd code is externalized
+	Camera is now a Pawn
+	All configuration goes into
+	Added FGlobalPlatform GetProfile, SetProfile
+	Password check
+	New DirectDraw support seems very stable

///////////////////////////////////////////////////////////////////////////////
6-26-96

+	Completely separated editor from game
+	Added Console.Messagef
+	Unreal now handles APM messages properly, a major breakthrough in gaming...NOT!
+	Game works consistently with NULL GEditor

///////////////////////////////////////////////////////////////////////////////
6-27-96

+	Unreal source 0.75 post and last-minute fixes

///////////////////////////////////////////////////////////////////////////////
6-28-96

+	Created virtual FGame class to enable moving all game-specific stuff to DLL
+	Moved all player console stuff to Actor DLL (UnPCon.cpp)
+	Renamed Unreal.cpp to UnEngine.cpp
+	Renamed Actors project to Game project for clarity
+	Renamed UnActors.dll to UnGame.dll
+	Renamed UnrealEd.dll to UnEditor.dll
+	Now use \Unreal\Src\Lib directory for link libraries
+	Separated game rendering from editor rendering
+	Unreal is now 100% portable; just rewrite the Windows-project code

///////////////////////////////////////////////////////////////////////////////
6-29-96

+	Moved global actor functions like playerTick to GGame::PlayerTick
+	Camera console
+		Bring up, put down - overlapping
+		Pre and post render camera for proper sizing
+		[ ] keys scale screen border

///////////////////////////////////////////////////////////////////////////////
6-30-96

+	Camera console
+		Two-piece status bar
+		Only draws status bar when changed
+		Resizable window with variable stride
+		Implemented FOutputDevice, cool generalization of text output device
+		Merged all CON_xxx messages with LOG_xxx, now they're all LOG_
+		Completed the camera console code

///////////////////////////////////////////////////////////////////////////////
7-1-96

+	Refined console controls
+	Command handlers

+	Ole exec handler calls proper exec sequence
+	Command line handlers:
+		FGlobalPlatform::Exec
+		FCameraManager::Exec
+		FGlobalServer::Exec 'levels','players'
+		ULevel::Exec: Must implement up, down
+		FGlobalRender: stats, toggle, gamma, dither modes
+		UCamera::Exec: Implemented possess
+		FEditor::Exec: Return values and response handlers all implemented
+		Moved general purpose stuff out of EdSrv, into proper places
+		GGfx.Printf now clips to screen
+		Added VARARGS define for portability
+		Added GGfx.WrappedPrintf,GGfx.WrappedStrLen
+		All console I/O now word wraps
+		Added in console background texture

///////////////////////////////////////////////////////////////////////////////
7-2-96

+	Viacomm

///////////////////////////////////////////////////////////////////////////////
7-3-96

+	Replaced FDot with operator|
+	Replaced FCross with operator^
+	ATI Rage support rocks once again
+	Polished DirectDraw support for weird resolutions

///////////////////////////////////////////////////////////////////////////////
7-4-96

+	Happy 4th of July
+	Added exec support and status functions to NManager
+	NManager is now polled, and it polls NDrivers
+	Implemented Task manager init and exit
+	Implemented camera manager task
+	Can now telnet into UnrealServer and access server console directly

///////////////////////////////////////////////////////////////////////////////
7-5-96

+	Login & optional password from ini file
+	Prioritizes multi camera updates
+	Standard console spawn message
+	Net game setup
+	UnrealServer task

///////////////////////////////////////////////////////////////////////////////
7-6-96

X	3D Studio exporter -> No time for this!

+	Highlight scaled sprites properly
+	Fix scaled sprite positioning
+	Fixed camera prekill bug exiting UnrealEd
+	No filtering stuff like status bar
+	Use blit type
+	Editor - show moving brushes option in 3D views
+	Renamed bClassPureVirtual to bTemplateClass
+	Fadein glitch
+	Changed actor 'TagName' to 'EventName'
+	Debug version now compiled with asm
+	Scaled sprite drawing bug in TRasterSetup::Generate
+	EdTopicHandler::Get crashed after selecting texture
+	Changed bSpriteRope to bEventSource
+		Actors who often trigger events corresponding to their EventName
+		tag should have their bEventSource flag so that event lines may
+		be drawn between event sources and event sinks in UnrealEd.
+	No 'show grid' thing
+	Hide default brush when in actor modes
+	TRasterSetupT::Generate crash (Start=373, End=3497) -> Fixed! (Interval error)
+	Show event lines in actor modes - better color
+	Texture rotate mode
+	Added 'Diagonalize' option to poly props for rotating 45 degrees while keeping
+		original tiling size (Inoxx request)
+	Scale textures - can now enter expressions in the poly properties thing
+	Added '@' square root operator - enter '@2' for the square root of 2

+	Moving brushes continued:
+		Update properties: BaseLocation, BaseRotation, ShadowKeyPos
+		When drawing mover in ed, draw both sprite and brush
+		Added REND BRUSHWIRES command
+		Select brushes by actor or brush
+		Wire render with proper location and rotation
+		Mover has default brush
+		Brush set from current set location & rotation upon draw
+		All wireframe brush movement code + trigger interactions

///////////////////////////////////////////////////////////////////////////////
7-7-96

+	Odd bugs that seem to have disappeared
?		Log window fills up after a while and doesn't clear itself
?		Snapscale doesn't snap when scaling down, only up
?		Actors are disappearing in unzoned texture views for no reason
?		Unreal.exe sometimes forgets to shut down after UnrealEd exits -> Fixed?
?		texGetOriginalData 56 Basicw2a, 128x128: Error -> Fixed symptom, why problem??

+	Observations
+		High temporal resolution makes up for low screen resolution
+		Nyquist-limit is irrelevant in light of high temporal resolution
+		Computers are still slow

+	Fixed actor QueryReferences bug
+	Added Editable(Category) override to UnrealScript
+	Actor properties are now categorized to reduce clutter
X	Remember actor props to edit between sessions -> Not very useful
X	Sort actor properties in list? -> Too much work
X	Duplicate actor - create duplicate brush -> Want brush defs to be shared
X	Scaled sprites wrap slightly, ugh -> Art problem

+	Fixed mesh viewer movement
+	Fix key delay in realtime views
X	Show moving brushes regardless of 'show actors' setting
+	Fixed can't scroll down to last 1.5 elements in UnrealEd actor props bug

+	Fixed switching to camera mode doesn't clear snapscale mode
+	Tex browser trivial Y reject - shouldn't be so damn slow
+	Tex browser sorting optimization, now uses qsort -> *big* speedup
+	24-bit color editor backdrop is only 1/4 drawn
+	Are actor rotations lost on export/import? -> No

+	"Use current brush" - make a duplicate with a unique name
+	Reduced bilinear filter aliasing by 50%!

///////////////////////////////////////////////////////////////////////////////
7-9-96

+	Microprose Unreal license discussions
+	These are really cool guys

///////////////////////////////////////////////////////////////////////////////
7-10-96

+	Caught up on sleep. Aaaaaaaaah.
+	Scaled sprites are now just textures
+	No networking 'n stuff in UnrealEd
X	Task always needs an exec function?
+	Still tries to draw screen when SYR=0, when status thing is down

+	Net
+		Fixed telnet tasks aren't killed when they exit bug

+	Texture improvement and fixing:
+		Implemented ITexture for locking/unlocking textures
+			Can call GRenDev for hardware-specific locking features
+			This replaces and obsoletes UTexture::GetData

+	More moving brush logistics

///////////////////////////////////////////////////////////////////////////////
7-11-96

+	Actors need:
+		AActor->IsBrush()
+		AActor->IsMovingBrush()
+		Added ACTOR_PostEditMove message

+	Mo' moving brushes
+		edactMoveSelected be cognizant of moving brushes
+		Moving actor must move the associated brush with grid snapping
+		Fix gridsnapping
+		Moving brush around must update keypos delta from pos 0
+		Select pivot must update actor
+		Mover KeyPos and KeyRot are now uneditable

+	Freeform texture rotation
+	Arbitrary angle texture rotation mode + entry thing -> No entry thing

///////////////////////////////////////////////////////////////////////////////
7-12-96

+	Separated rendering code into separate DLL

///////////////////////////////////////////////////////////////////////////////
7-13-96

+	Optimization

+	General
X		Duplicate actor must duplicate brush -> Use same brush
X		Adding actor of Mover type must duplicate its default brush -> Use same brush
X		Clicker for nice editing of brush frames? -> Key position selector instead
+		When add mover, its default brush is in siberia
+		Mover actor sprites aren't sorted right in 3D views
+		Mover color should be green!

+	UnrealEd
+		Right-click on mover show Keyframe -> 1/2/3/4 popup
+		Add as moving brush icon!
+		Adding actor imm after UnrealEd starts doesn't set class!

+	Add as moving brush
+	Map edit copy to/from brush copy everything and update bounds
+	Add as moving brush copy brush rotation to actor
+	Perfect moving brush editing
+	Fixed dynamic lights are immensely brighter than lights with shadow maps
+	Stats to Render project
+	Stat grabbers on
+		Raster setup
+		ASM texture code
+		Lattice setup
+		SpanOccludeBSP
+	Fix stats

+	Optimizations
+		mymemeq -> memcmp
+		ftoi
+		timer funcs

///////////////////////////////////////////////////////////////////////////////
7-14-96

+	Rewrote moving brush code

+	AddBrush
+		Build transformation coordsys
+		Set surface vectors
+		Perform fpoly filter
+		Add sporadic node
+		VertPool logic
+		Permanent base point logic
+		UniquePlane logic
+		NF_IsNew logic set & cleanup
+		Why is brush being split by nonexistant stuff? -> fixed ftoi bug

+	Rover optimization

///////////////////////////////////////////////////////////////////////////////
Requests

Art crue:	
	Tweak both status bar graphics in game (need \Unreal\Graphics stuff)
		Brightness (is too bright as is)
		Appearance in 320x200 and 640x480
	Overlay sprites for status bar
	Number font
	Border texture for screen
	Background texture for console
	Need a great font (see \Unreal\Graphics\Medfont.pcx for format)
	Need Unreal icon (use VC++'s icon editing tools), needs to be *awesome*
	Logo???
	Need moving brush textures
		Buttons/Switches
		Doors

Level mappers:
	Use the 'unlit' tag on all big polygons that the player isn't supposed to
		see (such as the polys in the big cube you subtract your level from).
		The shadow maps on these polys are eating up over 200K in some levels.
	Really, really cut down on the number of lights hitting each polygon; this 
		is hurting performance dramatically in wide open areas.
	Use the NoLook tag a lot to prevent crazy view tilting.
	Use zones and portals! Big big speedup.
	Set bDirectional to false for all of your lights to get rid of the red arrows.
	For best performance, divide your levels up into 63 or fewer zones.  The more,
		the better, up to 63.  After 63, more zones = slower.
	Please report all crashes...trying to get everything 100% stable now.
	Moving brushes eat up CPU time whenever they move, so design them to only move
		when the player sees/affects them.  Moving brushes that are moving all
		the time are going to slow big levels down.
	Suggest useful moving brush options to build into Unreal.
	When dividing levels up into zones, it's a good idea to place portals 
	    in places where they'll be covered up by moving-brush doorways.
		This does two things: it improves performance when the doors are closed,
		and it will later enable sounds to be diminished when they occur behind
		closed doors (the flow of sound will be computed between zones based on
		whether the zones are physically connected or blocked off).
	Comment on Unreal 0.76 lighting brightnesses -- to bright? too dark?

How to place movable brushes: 

	Build a brush, or load one.  Click on the
	add-movable-brush icon on the top right side of the toolbar.  This adds
	to movable brush to the level.  Moving brushes consist of two
	separate things - the actor that controls it, and the brush you see.
	
	Now, you need to define its positions. Movable brushes can contain up
	to four positions, but only positions 0 and 1 are useful until
	scripting is complete.  Position 0 is "closed" and position 1 is "open".
	
	Select the moving brush's actor and select the move-actor icon on the
	toolbar.  Now place it where you want it to appear in the level in its
	"closed" position.

	Next, right-click on the moving brush's actor and set its to position
	1 (the second choice in the popup menu).  Now move the brush into its
	"open" position.  To see that the brush is placed properly, set it back
	to position 0 and verify that it moves back to where you originally
	placed it.

	Now, you need to say how the moving brush should respond to events
	that occur in the world.  Right-click on the moving brush's actor,
	select "Mover properties", and navigate to the "Mover" category.
	The interesting properties are:

	- MoverBumpType: Says what the moving brush should do when it's
	  moving and it's blocked by an actor.

	- MoverTriggerType: Says what events cause the mover to open and close.
	  The "proximity" options activate the mover when the player gets near
	  it (you'll need to go to the "Collision" category and set the mover's
	  collision radius to specify the exact proximity). The "trigger" options
	  cause the over to be activated by one or more external "Trigger" actors
	  with a matching "EventName" property.  For trigger options to work, 
	  you'll need to place one or more trigger actors in the level and adjust
	  their collision radius and EventName.

	- MoverGlideType: Says whether the mover should move abruptly, or
	  smoothly accelerate as it moves.

	- KeyNum: The current keyframe position you're editing.  Changing this
	  is equivalant to right-clicking on the actor and setting its keyframe.
	  Only positions 0-3 are valid.

	- MoverTime: The amount of time in ticks (1/35ths of seconds) that the
	  mover should take to move between its open and closed positions.

	- RemainOpenTime: How long the mover should remain open before
	  automatically closing.  Only has an effect if MoverTriggerType is
	  "ProximityOpenTimed" or "TriggerOpenTimed".

	- bCanInterruptMove: Says whether the mover can be interrupted and
	  ordered to reverse its motion while it's moving.

	- OpenSound: The sound effect that should be played when the mover
	  is sent to its open position. (No effect yet).

	- CloseSound: The sound effect that should be played when the mover
	  is sent to its closed position. (No effect yet).

	- MoveAmbient: The ambient sound to play while the mover is in motion.

	- FreeRotation: No effect yet.
	
	Position 0 is also the master keyframe; when in position 0, you can move
	and rotate the brush freely.  All other keyframe positions are relative
	to position 0.  When you want to place the moving brush somewhere in the
	level, make sure it's set to position 0.  When you want to set its other
	keyframes, go to the other positions.

How to easily replace your existing brushes with moving brushes: Go into map
	edit mode.  Select the static brush that you want to turn into a moving
	brush and make sure no other brushes are selected.  Click on the
	"Copy to brush" button, then the "Delete" button.  Now press the
	add-movable-brush icon on the toolbar.

Mark Randell:
		I moved a bunch more game-specific code over to the actors DLL:
			- The camera console (UnPCon.cpp) is now UnCon.cpp.

		The game-specific code now is called by the Unreal engine via several
		functions defined in FVirtualGame (the generic, virtual base class defined
		in the engine) and FGame (the specific class defined in the DLL), rather
		than via the ActorDllStartup routine.

		I renamed UnActDll.cpp and UnActDll.h to UnGame.cpp and UnGame.h for clarity.

		The GGame object (of class FGame) is now accessible throughout the Actors Dll.

		I moved global actor functions like playerTick to GGame::PlayerTick for clarity.
		This has no effect on their implementation.

	All CON_ enums were changed to LOG_ enums. Use LOG_Play instead of CON_Play.

	Need settable options (similar to keyboard/joystick/mouse options) for:
	 - Whether the player's view should automatically tilt when the player is
	   standing near an upward slope (such as stairs).

	For PlayerStart actors, bDirectional should be True.

	Can we have a bunch of useful game cheats?  These would go somewhere in the
	game DLL.  A few I can think of are...

		Health
		Gain weapon by name
		Morph into by name
		Ammo cheats
		Health
		Invincibility
		No collision
		Morph <pawn name>, freemove, hideme, showme, trigger, untrigger

	Discuss fractional player view movement.

	Note that I replaced the dot product function FDot with the | operator.
	So FDot(A,B) becomes (A|B). FCross is now ^.

	I made the following changes to your Root.tcx:

		* Changed EDamageType to:

			EnumDef ETextMsgType = LOG_None

		* Added "property editing categories" to all editable root properties. For
		  example, I changed

			Dim Class as Editable(Main) Class

		  to

			Dim Class as Editable Class

		  The "Editable(CategoryName)" says which category tab the property should
		  appear in in UnrealEd.  This affects editing display only and has no effect on
		  operation.

		* Removed the "editable" override from all properties that don't need to
		  be edited in UnrealEd, such as AnimBase.

		* Changed unused bSpriteRope to bEventSource to indicate which actors are
		  sources of events (for UnrealEd's display of event affector lines).

		* Added spaces ad blank lines for readability

		* Changed bClassPureVirtual to bTemplateClass for readability

		* Made numerous changes to Mover

	Changed UNACTOR_API to UNGAME_API

Ammon:

	Need volume controls

	In your sound browser's DoNext(), change "Hide Me" to "Unload Me" - otherwise
	UnrealEd refuses to unload because a hidden form is still active (that explains
	why Unreal wasn't unloading for you eh).

///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
7-15-96

+	Moving brush code cleanup & enhancement

///////////////////////////////////////////////////////////////////////////////
7-16-96

+	Moving brush optimizations

+	FlushBrush
+		Remove all sporadic stuff
+		Remove iFront, iBack, iPlane references
+		Debug fully
+	Fast SplitPolyWithPlane

+	Fixed nasty massive collision CPU overhead bug in SphereLeafFilter

///////////////////////////////////////////////////////////////////////////////
7-17-96

+	Fixed hairy bug preventing ACTOR_Touch from being recognized

+	Added NF_Bounded
+	Fixed flush all
+	Multibrush coordinated move
+	Fixed moving brush coplanar collision bugs
+	Check moving brush BeginPlay for position 0 forcing
+	Fix actor-actor collision near moving brushes
+	Build list of dynamic actor refs removed, then readd those actors

+	NF_UniquePlane
+	Scrap dynamic iUniquePlane tracking
+	Fix brush startup errors

+	Note: You can't spawn moving brush actors during gameplay. This is as intended.

+	Optimize finding actor nodes
+	Fixed opposing coplanars bug
+	NewVertPoolIndex: TopThing inconsistency
+	No max changing
+	Fixed bizarre overflow bugs
+	Precompute filter (standard UnPhys function) 
+	Debug precompute filter problems
+	Optimize precompute filter
+	Faster FPoly/FBspSurf traversal via edpoly refs

+	Import map with moving brushes overwrites level brushes with movable actor brushes.

///////////////////////////////////////////////////////////////////////////////
7-18-96

+	Added these actor messages and their root handlers:
+		SetParent			Sets this actors parent to the specified actor
+		GainedChild			Sent to a parent actor when another actor attaches to it
+		LostChild			Sent to a parent actor when another actor detaches from it
+		QueryChildActors	Causes kernel to call QueryActorCallback for all child actors
+		QueryEventActors	Causes kernel to call QueryActorCallback for all actors using an event
+		QueryNameActors		Causes kernel to call QueryActorCallback for all actors using a name
+		QueryCallback		Called by kernel in response to query messages

+	Standardized torture test, SLOW_GUARD
+	Handle server slowdown to <35 fps gracefully
+	Fixed console up/down is hosed
+	Mover bounding sphere prefiltering

+	Wasted huge amounts of time incorporating code changes
+	Nevermore

+	Note: Now using the __cdecl calling convention rather than __fastcall.

+	Cleanup directories
+	Cleanup headers
+	Cleanup source
+	CreateDibSection failures show out of memory error

+	Fixed mem overwrite in UnActLst.cpp
+	Fixed mem overwrite in UnWnCap.cpp
+	ActorList PostLoad snubs out NoSaveResource entries
+	Get Unreal working in the VC++ debugger again

///////////////////////////////////////////////////////////////////////////////
7-19-96

+	Remove UnRender.dll dependence from Game
+	Fix rendering msec
+	24-bit color status bar (hopefully) or force disable it
+	Player control in UnrealEd shouldn't call moving brush update
+	Running two copies of Unreal causes shared DibSection bug
+	Disable networking
+	Delete netplay menu if no networking!
+	DD install doesn't reboot if it should
+		Worked around the buggy Intel example install code that was meant to
+		work around the buggy Microsoft example install code.
+	Equalize brightnesses with 0.65!

+	Cleanup tcx
+	Cleanup log

+	Can now reference sounds in actor properties
+	DD choices disappeared - fixed

+	Tim Chalmers "Can't find Buffer Sinc" bug
+		Not a bug, was due to installing over top of outdated Unreal.gfx

///////////////////////////////////////////////////////////////////////////////
7-20-96

+	Slept

///////////////////////////////////////////////////////////////////////////////
7-21-96

+	Texture mapping optimizations & experimentation

///////////////////////////////////////////////////////////////////////////////
7-22-96

+	Overwrite (or overread) UBuffer "Shade"

+	UnrealEd
+		Polygon properties are now Surface properties
+		If load map and then try to get help, can't find UnrealEd.hlp
+		Rebuild installation

+	Consolidate all setup/rel files into one place

+	fix odl

+	.tcx & actor changes (Search for !!TIM for changes)
+		Added "Dim Floor as actor" to denote the moving-brush floor the player is on.
+		Expanded IModel::ZCollision to find moving brush actors are standing on
+		Added ACTOR_StandMover, ACTOR_UnStandMover for actors on moving brushes.
+		Added ACTOR_SteppedOn, ACTOR_UnSteppedOn for moving brushes.
+		Support MT_StandOpenTimed

///////////////////////////////////////////////////////////////////////////////
7-23-96

+	Lock level should lock moving brush tracker?
+	Crap

///////////////////////////////////////////////////////////////////////////////
7-24-96

+	More crap

///////////////////////////////////////////////////////////////////////////////
7-25-96

+	Note: Texture U and V "vectors" are actually planes, not vectors

+	Moving brush raytracing
+		ACTOR_PreRaytrace, ACTOR_PostRaytrace
+		ACTOR_RaytraceBrush, ACTOR_RaytraceWorld
+		If WorldRaytracePos=-1, raytrace world without brush
+		Raytrace world with brushes in their specified places
+		If BrushRaytracePos=-1, treat brush as unlit
+		Generate brush shadow maps

+	Need a USE key and USE triggers.
+	"Unreal maps (*.unr) | *.unr; All Files (*.*) | *.* ||"
+	"Unreal maps (*.unr) | *.unr; All Files (*.*) | *.* ||"
+	The semicolons should be vertical bars. Cheers ... Mark
+	FBspSurf: Changed Reserved to iActor

///////////////////////////////////////////////////////////////////////////////
7-26-96

+	Fixed those AScript::Process bugs James found

+	Now:
+	   Name = This actor's name
+	   EventName = Name of actors to send Trigger message to when event occurs

+	Split UnThings.cpp into UnThings.cpp and UnTrigs.cpp
+	Deleted bEventSource (not needed anymore)
+	bTriggerOnceOnly
+	Trigger messages include original triggering actor as PTouch param
+	Counter messages

+	Bigman is full of holes! Obey what meshmap data says.
+	Fixed mesh ambient brightness

X	Mover sounds -> damned sound system is broken again

///////////////////////////////////////////////////////////////////////////////
7-27-96

+	Took a day off and watched the Olympics...Cool stuff!

///////////////////////////////////////////////////////////////////////////////
7-28-96

+	Screwed up dlls, not an Unreal bug:
+		>More often than not Manual Texture Panning locks up.  Only response from
+		>While scrolling texture browser UnrealED crashes with a Run Time error: Ole
+		>Divide Overflow.  Followed by system wide crash.  Only recourse, Hard Boot.
+		>Log posted on FTP.
+	Fixed curved staircase window screwed up
+	Ctrl + left-mouse is brush movement!
+		>"Ctrl + L-Mouse" is camera eye movement.  No crash just annoying.

+	Just don't do this, why would you ever want to do this?	
+		>When I export a level from 0.65 into a .t3d file and then import it into 
+		>.76, rebuilding the geometry somehow joins together certain coplanar 
+		>polygons.  This normally wouldn't be a problem, except that these 
+		>polygons have differently oriented texture maps.  When joining them 
+		>together into a single polygons one of the textures become hopelessly 
+		>misaligned.  Since there is now a single polygon instead of two, it is 
+		>impossible to ever realign the polygons without cutting out the 
+		>offending pieces and readding them to the world so that they are 
+		>separate polygons. This error is 100% repeatable.

+	I don't see this problem, is it fixed?
+		I sent the original seti.t3d freshly converted from .75 to let you see the
+		original problem.

+	Fixed mipmap generation bug visible in IRON_F_1
+	Defuzz shadows
+	Logo misalignment on mode switch (centers?)
+	Fixed shadow alignment bugs on Inoxx levels (panning bug)

+	UnrealEd
+		If >1 mover is selected, still allow set keynum
+		Help Web -> Launch Web

///////////////////////////////////////////////////////////////////////////////
7-29-96

+	UnrealEd
?		Import brush bugs with active brush disappearing?
?		Eric Reuter saving brush hangs
X		Deintersect memory leak? -> Definitely not.
+		Ambient brightness overflows
+		Fixed Danc coplanar merging bug
+		Don't merge polys with disoriented textures or flags
+		Fixed UnrealEd not remembering last directories
+		Fixed major import-level memory leak (UActorList::Import)

+	Deleted bWorldShadows

///////////////////////////////////////////////////////////////////////////////
7-30-96

+	Optimization
+		Fixed dynamic lighting slowdown bug
+		Test Unreal 0.76 flatshade pipe & stats against 0.65
+		Copied player lighting settings from 0.65
+		Optimize bound rejection

+	UnrealEd
+		Light props got Invalid Row Value

///////////////////////////////////////////////////////////////////////////////
7-31-96

+	Don't check touch etc for bStatic things
+	BeginPlay turn off actor collision for all non-colliding movers
+	Fixed new mover box rejection bugs due to bounding boxes not reflecting hulls

///////////////////////////////////////////////////////////////////////////////
8-1-96

+	Optimization
X		Dynamic lighting per mesh not lattice -> Augh, much too slow!
+		Rasterizer setup
+	Reenergized

///////////////////////////////////////////////////////////////////////////////
8-2-96

+	Import textures merge with existing palettes
+	Check out collision for all classes
+	Stat for counting dynamic lights active
+	Asm lattice setup -> Way faster
+	512-byte mipmap table

+	Timing: Thrashing 64K takes approximately 1 msec

+	VC++ bug: Allows meaningless declarations like static const X[2]={0.1,0.2};
+	VC++ returns floating point result in st(0) with all other registers cleared

///////////////////////////////////////////////////////////////////////////////
8-3-96

+	Work around retarded C assymetric float rounding
+	Fast ftoi
+	Need /QIfdiv- switch
+	Test without GUARD & Stats
+	Subdivision error threshold - more sensitive to large stuff, less to tiny
+	Look at generated code

///////////////////////////////////////////////////////////////////////////////
8-4-96

+	Lighting optimization
+	First generate subrect span buffer and sublattice span buffer
+	Then generate rect spanbuffer and lattice span buffer from subrect

+	Notes
+		Note that fxch is virtual and does not stall even if source or dest are piped
+		FP and int instructions do not pair ever
+		fxch stalls 1 cycle if followed by int
+		Pentium caches are only 2-way associative, 128*2 sets (Pentium), 256*2 (MMX)
+		BTB only changes prediction if it misses two times in a row!
+		The deal with uncached write buffering:
+			Pentium has two write buffers, one for each pipeline.
+			* Therefore it makes sense to do consecutive writes in opposing pipes.
+			* Writes always are written out sequentially.
+			* Uncached reads wait till the write buffers are depleted before occuring.

///////////////////////////////////////////////////////////////////////////////
8-5-96

+	Generate & cache bogus power-of-two floating light meshes for testing
+	Do lattice setup for light mesh
+	Damned fast C descention texture mapper

///////////////////////////////////////////////////////////////////////////////
8-6-96

+	New *perfect* alias-free lighting method works
+	Sinc filter interpolator

+	Fixed:
+	>I was trying to figure out why my projectiles bounced oddly: they would
+	>bounce okay when they struck a wall with a particular orientation (normal
+	>along the x-axis) but they would stick to the wall with another
+	>orientation (normal along the y-axis). This behaviour has been in unreal
+	>for a longggg time (I remember when the floating eyeball would get stuck
+	>on walls). I traced the problem to FVector::Mirror, where a local
+	>OutFactor is defined as 2*x*normalx + y*normaly + z*normalz when it should
+	>be 2*(x*normalx y*normaly + z*normalz). Cheers ... Mark

///////////////////////////////////////////////////////////////////////////////
8-7-96

+	Hellish optimization
+	Properly Y-traverse sublattice including top skip-in
+	Update vertical properly as draw-across
+	High level optimize LightGen
+	Bilerp light mesh sampling in rendDrawAcross (C)
+	High-level optimize rendDrawAcross and prepare for asm port
+	Further optimize for clip -> draw many -> clip

+	Caveat: VC++ inline assembler assumes that registers aren't modified 
+	unless you explicitly reference them - wreaks havoc when calling masm
+	functions that modify unexpected registers.

///////////////////////////////////////////////////////////////////////////////
8-8-96

+	Asm inner loop
+	Major caveat: shr reg,32 and shl reg,32 don't affect reg (shifters are mod 32)
+	Fixed major bug in shadow smoothing which ridiculously oversmoothed shadows (oops!)
+	Optimized tmapper inner loop
+	Devised new CV clipper rendering scheme with 100% optimal rejection characteristics!

///////////////////////////////////////////////////////////////////////////////
8-9-96

+	Schedule wrap-around
+	Travelled to Waterloo

///////////////////////////////////////////////////////////////////////////////
8-10-96

+	Fixed UnrealEd not recognizing PF_Hurt
+	Reinstated adaptive dithering
+	Added TouchPlayerDamange to mover class - if nonzero, mover radius-damages 
+		player when they touch.
+	Clean up dithering setup
+	Fix Nonasm

///////////////////////////////////////////////////////////////////////////////
8-11-96

+	Statistical trilinear interpolation approximation
+	Properly handle textures >256 wide
+	Reduce trilerp overhead via only transitioning 1/2 of the time
+	Only setup referenced mipmaps
+	Brush origin is now highlighted if the brush is stretched or scaled
+	Use PRoutine for draw-across
+	Fix lighting undergen
+	Light presetup
+	rendDrawAcross skip-in
+	rendDrawAcross post effects via separate buffer
+		Blit
+		Masked
+		Blend
+		Masked blend
+		Fire

///////////////////////////////////////////////////////////////////////////////
8-12-96

+	TMapper optimization
+		Asm span loop
+	John Romero

///////////////////////////////////////////////////////////////////////////////
8-13-96

+	Slept

///////////////////////////////////////////////////////////////////////////////
8-14-96

+	Fixed line bug
+	Typing blank name in ed should change to none
+	Fixed small sprite bug
+	Fixed John/Inoxx FlushActorBrush bug
+	Refixed DirectDraw bugs
+	Added bTriggerOnceOnly to Mover
+	Jeremy War overflow bug
+	Goddamned DirectDraw mess

+	Fixed crashes in complex maps
+	Unlit stuff died
+	Asm trilerp
+	Lighting assymmetry?
+	Better smoothing to reduce aliasing

///////////////////////////////////////////////////////////////////////////////
8-15-96

+	Fixed moving brush triggers bTriggerOnce bug (War)
+	Lattice optimization

///////////////////////////////////////////////////////////////////////////////
8-16-96

+	Returned to USA
+	Travelling sucks

///////////////////////////////////////////////////////////////////////////////
8-17-96

+	Set up dual P6, installed new network

///////////////////////////////////////////////////////////////////////////////
8-18-96 to 9-8-96

+	Hardcore optimizing texture mapper, logs disabled.

///////////////////////////////////////////////////////////////////////////////
9-9-96

+	Merge textures to improve L2 cache performance and reduce code cache dumping
+	Investigated Java as an UnrealScript replacement - not commercially worthwhile

+	To display a message when compile with _DEBUG only, use debug(LOG_Debug,...) or debugf(LOG_Debug,...);
+		Mark, specifically see that I changed the code in UnPlatfm.cpp to reflect this.
+	Deleted bug() macro (use debug() instead)

+	Switched back to __fastcall calling convention (rather than __cdecl) for speed.  It's 2-3% faster.

+	Fixed GRend.Toggle bug in editor

X	Only 2 lines not 4, use 4 horizontal ditherbases
+	Optimize selfmod setup
+	PF_LowShadowDetail, PF_Dirty
+	Generate correct static light meshes

+	Light mesh alignment problems on large polys -> Stupid programmer!
+	Creature clipping bugs
+	Fix high shadow detail

+	Fix >400x300 bug
+	Added Camera->Caps and CC_ enums (CC_Hardware3D, CC_RGB565)
+	RGB 555 and 565 color detection and support with DirectDraw
+	32-bit color support
+	24-bit color support
+	Cut ASM selfmod overhead with 4 routines and minimal writes
+	Fast start and end clipping with conditional byte writes jump-in

X	Doing lighting incs before looking? Aliasing looks as if this is the case -> Looks ok

///////////////////////////////////////////////////////////////////////////////
9-10-96

+	Optimize setup
+	Organize, cleanup & comment, real subsystem init/exit
+	Asm light 4-averaging code (faster)

///////////////////////////////////////////////////////////////////////////////
9-11-96

+	Add special brush "invisible" option for collision-only brushes
+	Registering a new ShellExecute verb as the handler for a particular protocol
+	Cleanup & optimization

///////////////////////////////////////////////////////////////////////////////
9-12-96

+	All tasks are now timed, and stats are available in 'ps' command
+	Server tick time is shown when 'STATS' are on
+	Upgraded angles to DWORD's in anticipation of UnrealScript (typedef ANGLE_TYPE)
+	Posted prelim 0.82 build for MWR.

+	Can now select moving brushes by brush in addition to actor
X	Moving brushes desnapped upon reimport? -> Can't duplicate
X	All brushes are force aligned to grid when map editing mode is turned on? -> Can't duplicate, but fixed probable cause
+	Transact moving brushes before modifying them to prevent undo lapse
+	Rotation components as dwords
+	Prep for merge

X	Hide tex family names beginning with underscore, and have Mark hide all fx families
+	Parse Unreal.exe URL=...
+	Textures now have lock count

+	Import/merging bugs. Fixed split face problem.
+	Added ACTOR_PreEditMove

+	Chris Clark bug: Specially aligned textures don't work on moving brushes.

///////////////////////////////////////////////////////////////////////////////
9-13-96 to 9-15-96

+	Meeting in Europe
+	Made a $100,000,000 deal
+	'Nuff distractions, now back to work :)

///////////////////////////////////////////////////////////////////////////////
9-16-96

+	Integrated Robert's 2d editor fixes
+	Fixed UnrealEd help bugs

+	Left-clip dither bugs
+	Fix backdrop
+	Jorus mipmap bugs

+	Removed DispDib support.  DispDib was a holdover from ancient Unreal under Windows 3.1 and
+	it is made obsolete by DirectDraw.
+	Hide unavailable mode x modes in NT

///////////////////////////////////////////////////////////////////////////////
9-17-96

+	Fixed bizarre SetCooperativeLevel bug with NT 4.0
+	Light map wraparound bugs
+	Resource browser in god mode only
+	Must gen light meshes for polys that aren't hit by any light

+	Jorus mipmap bugs
+	Properly handle mipmapless textures
+	Crash upon add bug

///////////////////////////////////////////////////////////////////////////////
9-18-96

+	Fix cdepth change from within DirectDraw (hwnd already set)
+	Fix cdepth change within DirectDraw palette bug
+	Cdepth focus bug
+	Alt-Enter goes into and out of fullscreen (stolen from Age of Wonders)
+	Now force camera window aspect ratio to be in the range of 1.25 to 1.6
+	Fix show log select problems
+	Position camera windows somewhere nice upon startup
+	Tweaked wording of all Windows menus
+	ps msec timings are messed up
?	2 game camera windows open causes trouble -> Ask Mark if this is input sys problem

///////////////////////////////////////////////////////////////////////////////
9-19-96

+	Fix fonts in rgb555/rgb565
+	Dropped 24-bit color support in favor of 8/16/32
+	My next engine will be 32-bit color only!
+	Fixed tiled texture block code in all color depths	
+	Implemented 32-bit color asm draw-across code

///////////////////////////////////////////////////////////////////////////////
9-20-96

X	Use screen's color depth on startup, don't offer option when not fullscreen -> Default to 256-color
+	Added vector <-> color conversion routines for easier color manipulation
+	Can press ctrl-enter to switch in/out of fullscreen
+	Fixed flat polys in all cdepths
+	640x400 screen size option in menu
X	Should I support screen aspect ratios? -> Messy
+	Remember screen size changes and save them
+	Fixed net game detection error
+	Replaced my outdated profile code with MWR's
+	16-bit color line drawing, rect drawing
X	Delete FPalettePrecalc stuff?
+	Clean up UnGfx.h outdated stuff

+	Going into DDraw in UnrealEd 2nd time crashes
+	Totally fix DirectDraw support within UnrealEd!
+	Fixed far parallax is broken

+	Force window to have a reasonable aspect ratio range, prevent win size > supported 1024
+	When show/switchto log window, must clear selection
+	Log fills up and doesn't erase top stuff
+	Why does log window show up in task bar when hidden?

+	Params like -net shouldn't be case sensitive
X	Is there a 2X performance difference between game and editor rendering?

///////////////////////////////////////////////////////////////////////////////
9-22-96

+	Stat: Show # actor collision fragments and lots of useful level tick time stats
+	Clean up camera menus

+	8/16/32-bit color depth options in menu
+	Show color depth options in editor

+	16 & 32-bit color lines are messed up
+	Rect colors are wrong

+	Skip scaled sprites in unsupported cdepths

+	Fix UnrealEd show-actor modes

+	Show radii (collision & light) option in 2D views

X	Numeric "rotater" or values like 30 and 60 -> no time

+	C post fx - 256 & 16-bit

+	All moving brush view options in UnrealEd views
+	Show moving brushes wire display or hidden

X	Clicking on player controls icon doesn't turn it off -> MWR look into
X	Fix player control slowdown when not moving
X	Player controls in map edit mode crashing bug?

X	Use screen's color depth on startup

+	Torture test camera window user interface
+	Finalize camera window user interface elements

+	Fix mesh viewer disappearance problems
+	Actor properties/Display/Brush/Use Current now works nicely
+	Fixed terrible bug" using "save" option in UnrealEd and pressing escape still saved!
+	Texture browser now hides special textures by default

+	Scrapped UnrealEd sphere button in texture viewer, replace with show-all-families thing
+	SelectObject in ::SetPalette fails going out of DirectDraw

+	Texture browser gave overflow in 'All' group when tons of textures

///////////////////////////////////////////////////////////////////////////////
9-23-96

+	Learned how to indent code like a real man

+	Dynamic lighting
+		Fix dynamic lighting backface problem
+		Properly cache and pool light meshes and intermediaries
+		Work with bTempDynamicLight in editor!

+		Global lighting effects support
+		Fixed major light smoothing mipmap bug
+		New lighting looks AWESOME!

///////////////////////////////////////////////////////////////////////////////
9-24-96

+		Only compute global effects once per frame
+		Zero brightness lights cause major slowdown for some reason
+		Implement global lighting effects generically for point and mesh usage
+		Zero-radius light weirdness
+		Lights with large radii sometimes have darker area near them (SqrtOfs problem?)

+		Actor->bTempLightChanged force cache rebuild
+		Not all meshes are composited together (Kootch)?
+		Mesh gen stats

///////////////////////////////////////////////////////////////////////////////
9-25-96

+	GT, Cliff & James mtg

///////////////////////////////////////////////////////////////////////////////
9-26-96

+		Finish all hardcoded simple effects.
+		Start spatial effects code.
+		Separate all effects and clean them up.

+		Spatial bool.
+		All spatial lighting effects routines.
+		CloudCast effects are now unbelievably smooth!

+		Fix bSpecialLit
+		GServer now tracks time/date

+		Daylight, nightlight.
+		Make sure nothing crashes.

+		Cyllinder lightsources
+		Totally cool searchlight effect!

+		Clean up GLightManager external refs!

///////////////////////////////////////////////////////////////////////////////
9-27-96

+		Texture lattice effects: BigWavy, SmallWavy, all light effects
+		Adapt texture lattice to reasonable minimum size

+		Fix asm lattice xyz compute

+		Write all light-based texture warping routines

+		DoDynamicLighting optimization (don't go down nodes with no invisible polys).
+		Optimize SetupRectSampling, ComputeFromActor

+		DoDynamicLighting integration
+		Now only process dynamic lights as they apply to visible polys

///////////////////////////////////////////////////////////////////////////////
9-28-96

+	16&32-bit colored lights

+	Cached zone palette scalers

+	HSV -> RGB functions in palettized and nonpaletized varieties
+	Color scaling and ambient offset functions

+	Properly cache palettes in multiple zones in all color depths
+	Fix ambient algorithm; is fogging rather than scaling...

+	Double number of ramp entries
+	Fine-tune multicolored lighting

///////////////////////////////////////////////////////////////////////////////
9-29-96

+	Merging bugs
+	Must distribute NF_NoMerge to all affected nodes

+	Modify all palette table generators to support new ramps
+	All hicolor modes
+	Time litegen
+	Count meshes gen

+	iZone=0 loses lighting
X	Use zone 0 in textures mode -> looks better as is
X	Equalize 8-bit brightness -> will hack in later if 8-bit survives

+	start out in hicolor when appropriate
+	don't merge polys in different zones
+	ack! Was only using 40% of lighting table??
+	never show selection during gameplay!

+	textures mode is now ridiculously bright
+	fix fake backdrop and enviromap in editor

X	slightly dirty shadows always -> creates temporal problems
+	optimized dirty shadows always

+	Need hicolor/truecolor gamma correction support
+	totally prepare for assembly optimization
+	rendDrawHighlight crashes in non 8bit color depths
+	Zone ambient lights

+	Lattice texture fx
+	Lattice light fx

+	Allow light meshes over 256 on a side, as long as less than 64K overall
+	Raytrace extent bug (isn't using brush polys?)

+	Zone ambient lighting (R,G,B,White)
X	Zone portal bEnclosed flag and bound optimization! -> outdated

+	Fix broken effects and enforce minimum lattice size per effect (proutine,minx,miny)
+	textures mode is funny when starting new level

///////////////////////////////////////////////////////////////////////////////
Notes for others (10/1/96):

Mark:
	Many changes... I've been saving these up for the past 2 months.
	Please diff the .tcx's when merging; I made many changes the day I integrated
		with your 82z merge.

	Changed: KeyPoints.tcx (modified ZoneDescriptor, added LevelDescriptor, more).
	Changed: Root.tcx (Added SoundRadius, radius of the ambient sound, added
		ambient sound support code to ACTOR_PostBeginPlay, Dim Brush as ...Const...,
		added DefaultEdCategory).
	Changed: All calls to PlaySfxOrigined and PlaySfxLocated, to include the
		SoundRadius value.  The SoundRadius should apply only to true ambient sounds
		(played due to the AmbientSound property) such as the sound of a torch
		burning, and not to regular sound effects like gun shots.
	Changed: UnCon.cpp (Brightness level code, removal of fade in/out code).
	Changed: UnActor.h (AActorDraw::SoundRadius, AActorDraw::WorldSoundRadius)
	Changed: UnEngine.cpp (Order of calls to GAudio.Init and Level->SetState so
		that ambient sounds are inited properly).
	Changed: AmbientBrightness in Root to InherentBrightness to prevent naming conflict.
	Changed: Added FGame::CheckState to perform structure size checking. This enables
		the Root.ucx rebuild to succeed even if the contents of Root.h is outdated, avoiding
		a chicken-and-egg problem.
	Changed: ILevel::GetZoneDescriptor to fix bug.
	Changed: Separated ZoneDescriptor into its own root class and file, modified the
		associated Classes.mac.
	Added: ILevel::GetZoneGravityVector().  Use this for figuring out the gravity acceleration
		vector rather than the deleted GMath.GravityAcceleration.  This will enable us to change
		the gravity level per zone and per level.

	Requests:

	When DirectMouse is disabled, Unreal is run for gameplay, and multiple camera windows
		are opened up, controls in the non-focus window still go nuts. I think this is
		an input system bug...
	Move flame class into a subclass of Light and rename it into something more descriptive
		appropriate like TorchFlame...
	Avoid all unnecessary calls to ZCollision and other IModel physics functions; these eat up
		a lot of CPU time.  For example, the pickup class calls it every tick.  I recommend 
		adding in ALWAYS_BEGINTIME and ALWAYS_ENDTIME macros to check out the performance 
		impact of key pieces of code in levels populated with a lot of actors.
	Please go with the Un*.cpp and Un*.h file naming convention (not DArray.h, etc).

Ammon:

	Changed: FGlobalAudio::InitLevel to: int InitLevel(int MaxIndices), where MaxIndices is
		the maximum number of actor indices that are valid; all calls to the sound updating.
		routines will use indices where 0<=Index<MaxIndices.
	Changed: All actors now have a 'sound radius' property for their ambient sounds.  This is useful
		for reducing the number of sounds that are active at a time, since it allows level
		designers to explicitly set the sound radii while considering their level layouts,
		and it also enables far-away sound effects to be culled more efficiently.
		As a result, I added a FLOAT SoundRadius property to PlaySfxOrigined and
		PlaySfxLocated.  The SoundRadius value is in the same 'world units' as the Location vector.
		A value of 0 means "no radius" so that the existing sound-diminishing code should be
		used.  If SoundRadius is nonzero, then the sound effect volume should smoothly range from
		its maximum (at the sound location) to zero (at SoundRadius units away from the sound
		location). For performance, when updating sounds for a viewer, you may want to remember 
		SoundRadius*SoundRadius, and compare it to the value of (PlayerLocation-SoundLocation).SizeSquared()
		to avoid the penalty of a sqrt().
	Changed: Directory management code in all UnrealEd forms, user interface, some other tweaking to
		make the UI consistent with the other browsers.  When merging the VB source, please diff 
		the source and merge your code into mine to preserve the new form layout.

	To-do notes in order of importance...

	1. Panning seems to be exaggerated; unless a sound effect is directly in front of the 
		player, the sound seems to come out entirely through the left or right speaker.
		Panning should be more evenly distributed.
	2. As the player gets really close to an ambient sound, the sound's directionality should be
		diminished and the sound should be panned closer to the center.  Let's say that in
		the interval (1.0*Radius, 0.2*Radius) the panning is as-is (full panning), and in
		(0.2*Radius,0.1*Radius), the panning is smoothly adjusted between as it is and
		full-center, and in (0.1*Radius,0.0) the panning is full center.  This will give level
		designers control over volume sound sources, like roaring water etc.
	3. In the properties dialog, music/sound volumes need to take effect immediately as sliders 
		are adjusted, and the sampling rate combo should be fixed (or removed if no longer
		relevant); an interpolation on/off option would be good.
	4. Still need audio to work within UnrealEd so that level designers can hear the sound effects
		and ambient sounds from the sound browser while they are editing levels. Otherwise, adding
		sounds to levels is extremely tedious. This should be pretty easy (just check the hacked-in 
		calls that disables sound whenever the editor is running).
	5. The functions which play sound effects and which update a sound effects' positions should also 
		take an additional parameter, a scaling factor (from 0.0=inaudible to 1.0=full volume) which
		scale the sound effect's volume.  Passing a value of 1.0 should have the same effect as
		calling the function has now; values smaller than 1.0 should scale the volume down
		proportionally.  This is so that I can easily modulate ambient sound effects via script,
		for example ramping a torchlight's sound in proportion to the light's brightness.
	6. Sound property editing needs to happen natively in UnrealEd rather than through an external utility.
	7. The general sound system really needs to be finished and fully debugged/tested asap so that we can
		all move on.

Carlo/Ammon:
	Sound quality is still unstable (pops/clicking) on NT 4.0 with both DirectSound and WinMM
		in Unreal as well as the Galaxy player. This is not related to the known problem
		with IDirectDraw::Lock.  Mod4Win doesn't have this kind of problem on NT 4.0.
	Sound effects are really noisy when played at low volume.  Try placing an ambient sound then
	    walking up to it and away from it, and you can hear static noise increase as you walk
		away.  Very low-volume sounds are particularly bad.

Rebellious programmers: please use the following style for your file headings.
It's not any better/worse than other styles, but this is something we should keep
consistent for everyone working with the Unreal code base.

/*==============================================================================
UnAction.h: Player input actions
Used by: Player processing code

Copyright 1996 Epic MegaGames, Inc. This software is a trade secret.
Compiled with Visual C++ 4.0.

Description:

Revision history:
    * 05/30/96, Created by Mark
==============================================================================*/

#ifndef _INC_UnAction
#define _INC_UnAction
..etc...

///////////////////////////////////////////////////////////////////////////////
10/1/96

+	UnEngine.cpp: Now init Audio before ULevel::SetState so that actors
+		with ambient sounds are now properly inited.

+	Remove fadein code from UnCon.cpp
+	Gamma: No fullsc req, GCache.Flush();

+	Old notes:
X		KeyPos and KeyRot noneditable -> better to be editable
X		ACTOR_PostEditMove/ACTOR_PostEditMove -> ACTOR_EditPosChange -> ok as is
+		Clean up and rearrange root properties
+		Must upgrade FRotation components to 32-bit, needed for scripting
+		Import/export upgraded angles

+	Added SoundRadius to Root
+	Mesh viewer is dead again

+	Added ProductRequired to Teleporter to support teleporters that require a certain
+		product, such as the registered version of Unreal

+	Need a LevelDescriptor class, create in InitLevel
+	Need AmbientSound class
+	Text message actor class
+	Const Brush
+	DefaultCategory
+	LT_Strobe
+	Added GClasses.LevelDescriptor
+	My poor little actors are disappearing!

+	Killed bLightIsAmbient
+	LevelDescriptor, ZoneDescriptor lightning (added to ambient)

+	Set all DefaultEdCategory properties
+	Only cache MeshVoid if pure static

+	Sound browser import looks in wrong directory
+	UnrealEd Cliff DefaultEdCategory support
+	Texture family gets lost bug

+	ZoneDescriptor base class
+	Cliff: Added bUnlit property to prevent meshes from being affected by lighting.

X	Not showing actors in wire views before map rebuilt -> Doofus! You're in 16-bit color.

+	Added INDEX ILevel::GetLevelDescriptor(int iZone);
+	Added FVector ILevel::GetZoneVelocity(INDEX iActor);
+	Added FVector ILevel::GetZoneGravityAcceleration(INDEX iActor);

///////////////////////////////////////////////////////////////////////////////
10/2/96

+	Show span occlude time
+	Support bGravityZone, bVelocityZone

///////////////////////////////////////////////////////////////////////////////
10/3/96 - 10/5/96

+	Business stuff

///////////////////////////////////////////////////////////////////////////////
10/6/96

+	Slept

///////////////////////////////////////////////////////////////////////////////
10-7-96

+	Right-click poly show # polys selected & # lights affecting them
+	Autosave directory screwed up? Critical: FEditor::Exec(MAP SAVE FILE="u:\Unreal\Maps)

X	Right-click wire brush show options (copy to brush in place, copy to brush with move) -> Can live without it

+	Undoing past light rebuild -> Fixed transaction tracking reset bug
X	Lower shadow detail options? -> Can live without
X	esc abort slow rebuilds and imports if possible -> no
+	default per class prop tab
+	sheet brush tab order
+	texture browser starts up with empty family

X	Are my mesh texture coordinates off by +/- 0.5 or 1.0 from James' mesh editor??? -> James' textures need borders

+	lighting not autorebuilt when propchange sometimes
+	UnLine case 4 bugs

+	Fixed major coplanar portal bug
+	Improved numerical stability of geometry optimizer

X	Clipper crack bugs -> Were geometry optimizer precision problems

+	side linker still doesn't work with really cut up coplanars

+	"apply selected lights only" should apply all lights in zone of selected zonedescriptors,
+		update UnrealEd text

+	UnrealEd multiple instance problems! Fixed via SINGLEUSE_IMPLEMENT_OLECREATE
+	fix light updating in UnrealEd
+	If I undo to/beyond the point of my last lighting rebuild, the editor crashes.

X	>Also, if I have brushes snapped to say a grid unit
X	>of 4, if I go into map edit mode -- and forget to set the grid to 4 -- all
X	>of my brushes are snapped out of whack. This is all extremely
X	>time-consuming resetting brushes and what not. Any chance of a fix so that
X	>brushes stay put?

+	Freeing 64K aligned items crashes in debug ver
+	fake backdrop broken? -> No, only shows up when player controls are on

+		Counter
+			Displays optional text message
+			Optional countdown value
+			Separate trigger-in and trigger-out

+	make 8-bit color 15% darker 

///////////////////////////////////////////////////////////////////////////////
10-8-96

+	TFBS

///////////////////////////////////////////////////////////////////////////////
10-9-96

+	Support bNoSmooth when rendering actor sprites and meshes, now things like
+		guns can be set to be not smoothed.
+	UnrealEd prop cat thing needs < and > buttons

+	>An option that would give us the best of both worlds is a dialog box
+	>similar to the one used when importing brushes that has a check box for
+	>'merge coplanar' and 'don't merge coplanars'
+	I think this works as desired in all cases now. Let me know if otherwise.
+	However, this method of map design is not going to work well; it results in way more
+	polygons than Unreal can handle quickly.

+	Rewrote portal code to be far more robust and general. Volumetric solids may be 
+	added to the world as portals now, enabling easy creation of things like water zones
+	and in the future (if custom rendering support is added) clipping zones for volumetric
+	lighting and fog effects.

+	Any empty world is now classified as solid space rather than vacant space. Therefore,
+	you begin level design by subtracting stuff rather than adding it.  This is a significant
+	speed optimization.  As a result, you should delete all of the gigantic solid brushes
+	you're subtracting your world out of.  This will require level designers to rework
+	areas which are designed as outdoors.  One easy solution is to subtract a gigantic
+	cube surrounding the world, go into map edit mode, select just the gigantic cube,
+	and hit the 'to front' button to make it subtract first.  *Only* do this if you have
+	to; it's much better for performance to design levels subtractively.

+	All collision problems near semisolids should be fixed now...

+	Fix hull bounds overflowing bugs

+	Force palette rebuild if ZoneDescriptor temp change
+	Generate zones even if no portals so ZoneDescriptor works always

///////////////////////////////////////////////////////////////////////////////
10-10-96

+	Rename 'rectangle' to 'cube'
+	All brush builders default to solid

X	Support zone/level lightning ambient offset support for lightning etc (Lightning).

X	Z-collision code needs support for complex gravity vectors; use Raytrace
X		instead, add iActorHit support, and call special-case Z-collision where
X		possible. Also support underwater. -> Overly complex!

+	It seems as if moving brushes with their bTrigger property set to True
+	trigger the event that they are assigned, but the brush is not animated
+	(does not move).  I've called Cliff about this new UnEd 0.83 bug and it
+	appears that he is also experiencing the same problem. -> Works fine here, send example.

+	The only problem I have seen is when you create a moving brush or 2, then 
+	rebuild the map WITHOUT first setting the key 0 and 1 positions. If you do 
+	this, then the brush returns to its orientation it had when you first 
+	loaded it. I noticed this particularly with my large doors. The brush 
+	when loaded comes up laying flat, I have to roll and yaw the sucker to get 
+	it into position. If I forget to set the Key0 and 1 positions, after 
+	a rebuild, its laying flat again.

+	Note on zones with bWaterZone:
+	* Tiny wavy effect is applied to everything in water
X	* Watery shimmer light effect is applied to everything -> must be done explicitly

+	Implement PlayerEntered, PlayerLeaving
+	SetActorZone called upon initial entry?

+	Are node bounding spheres used/needed?
+	Reduce size of palette resource
+	Get rid of all diffusion dithering remnants
+		UPalette::BuildBrightnessTable
+		Bidirectional traversal when remapping
+	Import texture highlight texture family name, def to Untitled.

+	Fixed the awful boolean import bug. It occured whenever a boolean value had trailing tabs.
+	Ortho bounding rect rejection is now totally screwed up

X	There's an annoying bug that's been in the editor forever now, and dammit,
X	it's got to be fixed.
X	-Go into the 2d shape editor.
X	-Make a square (large enough to make a hallway you can walk through)
X	-Revolve it. (sides per 360= 12, number of sides = 6) This makes a "C"
X	shaped hallway. (viewed from above)
X	-Subtract this cool hallway from a solid cube.
X	-Walk through the hallway. The surfaces at the ends of the hall (that you'd
X	walk through) are screwed up 90% of the time. (either showing the grid
X	through them, or a warped texture...)
X
X	-> I can duplicate this.  It's a 2D editor numerical precision problem due to
X	roundoff error accumulating.  Robert.

+	Force ZoneDescriptor always to exist!

///////////////////////////////////////////////////////////////////////////////
10-11-96

+	Met with Legend Design.  Cool guys; hope we can do something together.

///////////////////////////////////////////////////////////////////////////////
10-12-96

+	Fixed texture blurring and slow import bug
+	Kill texture 'diffusion' in UnrealEd, fix importing-to-no-family bug
+	Delete GGfx.TrueColors etc

+	Need standard 16/32-bit palette cache routines; eliminate GGfx.TrueColorPalette and
+		terribly inefficient calls to HiColor565() in routines like DrawDepthLine.

X	Save-intrinsic-classes-only option for saving classes, to fully eliminate root.h/actor.h redundency? -> Later maybe.

///////////////////////////////////////////////////////////////////////////////
10-13-96

+	UnrealEd level 'View Links' work using results window, ACTOR_GetLink PString
+	UnrealEd resource browser is still broken -> Don't need it

+	UnrealEd Level properties use level descriptor, make actor props browser multi-instance 
+		embeddable with fixed size and hidden props tab.
+	Faster meshsprite qsort

+	In UnrealEd, log/new camera crashes

+	LevelDescriptor needs good default gravity; no hardcoded anything.
+	Kill GGfx.BackdropTexture.

///////////////////////////////////////////////////////////////////////////////
10-14-96

+	Class browser quicksort doesn't sort counts (oops!)

///////////////////////////////////////////////////////////////////////////////
10-15-96

+	Fix radius 0 lighting problems.

X	LevelDescriptor needs ramp/ambient info, background texture -> Just background palette.
+	Select-all don't select level descriptor

///////////////////////////////////////////////////////////////////////////////
10-16-96

+	Actor properties are now 4-aligned with #pragma pack (push,4). Justification: Portability
+	Endian hooks for Mac byte order
+	Add UResource::Flip(), byte swapper required for all resources.
+	Full postload and presave hooks

X	No-shadow, no-incidence-effects lights, i.e. for SpecialLit situations -> No
+	Expand querying functions for non-iMe callback

///////////////////////////////////////////////////////////////////////////////
10-17-96

X	Change backdrop colasecing to reflect inside-out world.

///////////////////////////////////////////////////////////////////////////////
10-18-96

+	Directional lighting works
+	Use cloud noise for dirty shadows!

+	Min, max, diff

+	Allow start grid for cloud noise and parameters to prevent full size clouding

+	All necessary class and Root.tcx changes for backdrops & satellites
+	Added 'AActor *Descriptor' to ILevel, points to level descriptor on NULL.
+	ULevel::Lock now grabs LevelDescriptor
+	Exporting enumeration to C++ header now includes tag_MAX

+	Finally bit the bullet and eliminated the AActor.h/Root.h redundency (sorry, Mark,
+	you were right all along!)  This required significant changes in AActor.h, but it doesn't
+	have much impact on any of the code.  From now on, everyone has to be careful not to
+	intermix game-specific code with the engine...

+	Deleted unused FActorAIStatus

+	Renamed math functions & templates Min, Max, etc and made global for consistency.
+	Removed FActorServerInfo, merged into ARoot.
+	LevelDescriptor time info is filled in each tick

+	Moved all AActor:: functions to the Game project for replaceability.
+	Renamed Root.tcx to Actor.tcx
+	The ARoot class no longer exists; it has been replaced directly with AActor.
+	Renamed Root.ucx to Unreal.ucx
X	Are there now circular dependencies?

+	New/restructured files:
+		UnActor.cpp: Implementation of the AActor class.
+		UnActor.h:   Definition of AActor class, includes Root.h etc.
+		UnActLst.h:  Definition of UActorList.
+		UnClass.h:   Definition of UClass.
+		UnClsPrp.h:  Definition of FClassProperty.
+		UnMsgPar.h:  Definitions of all actor actor message parameter structures.

///////////////////////////////////////////////////////////////////////////////
Supplement 10-19-96: Actor class hierarchy notes

I rearranged the class hierarchies to eliminate the duplicate definitions of
ARoot and AActor that were in Unreal prior to 0.84.  Now, each actor class
contains two C++ support classes:

	ClassnameHelper: A helper class derived from its parent's helper class,
	which contains only the actor's raw data.

	Classname: A class whose size is guaranteed to be sizeof(AActor).

Here is the derivation hierarchy:

	AActorHelper
		AActor
		ARootHelper
			ARoot
			AWomanHelper
				AWoman
			...etc
		ALightHelper
			ALight
		...etc

When referring to actors generically, use AActor.  You can always safely convert from
an actor class to a class above it in the derivation tree via typecast, and you can
convert an actor of class A to an arbitrary class B if B.IsKindOf(A).

Though the ClassnameHelper classes are of variable size, the Classname classes are of
fixed size = sizeof(AActor).

Files required:

	UnActor.h			-	Definitions of all actor related stuff. Includes 
							the following:
		Root.h			-	Definition of all actor classes, exported from UnrealEd 
							based on the scripts.  The scripts are contained in 
							Classes\*.tcx.  They are rebuild by running the UnrealEd 
							macro Classes\Classes.mac.
			UnRoot.h	-	Supplement to Root.h which enables you to add class 
							functions to the AActor class
		UnActLst.h		-	UActorList definition.
		UnClsPrp.h		-	FClassProperty definition.
		UnClass.h		-	UClass definition.

The reason I decided to go with this system and all its complexity is to enable
actor logic to be written in both UnrealScript and C++ and intermixed freely.
This necessitates defining all actor properties in the .ucx scripts, and making
UnrealEd generate C++ code based on them.  If all actor logic were written in C++,
the process would be much simpler, but my primary design goal in the actor system
is to enable designers and users to greatly extend the world via a flexible scripting
system.

In a ground-up redesign, it would be smarter to allocate actors from a dynamic
pool rather than using a fixed-length array, and it would be cleaner to do
away with the Actor indices and simply use pointers, but that chaging that
would mess up too much existing code.

-Tim

///////////////////////////////////////////////////////////////////////////////
10-19-96

+	Expanded CLASS_PROP_EXTRA.
+	Cleanup the headers.
+	Camera actor is now APawn.
+	Scapped FActorCameraStatus and stuck its stuff directly in APawn instead.
+	FActorPrivate class encapsulates all internal actor info.
+	Documented actor class derivation layout and file layout above

+	Moved Camera variable from ARoot to APawn.
X	Class default actor should be AActorHelper only -> Would require a lot of changes
X	without gaining much.

+	Note: You can now include an optional class parameter to ILevel::SendMessage
+	Which is useful for routing messages to a parent class.

+	SpawnActor handle Location=NULL
+	Kill GMath.DefaultCameraStart, build into Camera def props
+	ZoneDescriptor needs ZoneBreadth, ZoneReflectivity. Kill GetSoundProperties.

+	Now compiling with maximum warnings

///////////////////////////////////////////////////////////////////////////////
10-20-96

+	Better equalized 8-bit brightnesses.
+	Mipmapping now accounts for FOV (zoom fix).

+	Backdrop:
+		Get scaling and panning speeds completely settable via LevelDescriptors.
+		Specifiable backdrop texture via LevelDescriptor.
+		Tune scaling and panning to liking.
X		Scrapped interpolated daytime palette (lookup table slowdowns/discontinuities)
+		Specifiable sky palette via level descriptor.
+		Implement Satellite class for sun/moon
+		Proper day/night timing and scaling.

+		Make random number code available to all UnRender.

X		Cloud mesh, proper alpha mixing of sky and clouds -> Doesn't look that good.
X		Depth diminishing of cloud layer

///////////////////////////////////////////////////////////////////////////////
10-21-96

+		Backdrop diminish with 1/(Dist) not 1/Z
+		Delete cloud parameters in leveldescriptor
+		DayFraction, NightFraction
+		Set wavyness magnitude in LevelDescriptor
+		Added LT_Spotlight class
+		Sky fog for sky shading
X		Special alpha palette for sky brightening with ambients -> Fog shader works cool enough

///////////////////////////////////////////////////////////////////////////////
10-23-96 (schedule wraparound)

+		DrawForward alignment bug? Thanks for the fix Mark.
+		Scrapped unused 256-color glow, ghost and average effects.
+		Replaced unused far-ceiling effect.

+		Fog is now depth based - this is beyond cool!
+		ZoneDescriptor/LevelDescriptor bTempLightingChange cleared on 1st tex pal?

+		Awesome sun/moon lighting effects via rect sampled lighting
+			All PolyFlags effect and backdrop wavyness effect via ApplyLatticeEffects
+			Light list lighting via ApplyLatticeEffects
+			Consolidate water wavy, cloud wavy, and all that stuff PF_WaterWavy, PF_CloudWavy
+			With Backdrop SetupForPoly, still build fast light list of backdrop lights
+			CalcRectSample use fast light list
+			Simple positional effect
+			LE_Sattelite
+			Fine tune backdrop radial lighting
+			Satellite rotation

///////////////////////////////////////////////////////////////////////////////

>>Mark: [old]
	Opening multiple cameras during gameplay still acts funny.
	We'd be more memory-efficient if SpawnActor allocated actors from the begining
		of the list (i.e. starting with 0) rather than the top of the list. In
		the future, I can shorten the size of the actor lists on small levels, but
		that requires that the active actors be on the bottom of the list.
	Let's hold off on significant AI changes till scripting is done...
	In UnrealEd with player controls on, pause works but unpause doesn't.
	Could your actor lists seem to be leaking memory?  You could just allocate them to the
		size of Level->ActorList->Max so that they never need to be resized (I was 
		hoping to avoid all memory allocation during gameplay, so that once a level is up
		and running, there are no possible allocation/deallocation problems).
	Is bBehindView somewhat broken? Looking up/down seems to tilt the player mesh rather than just 
		the view as it was.
	Note that zoneDescriptor is once again a child class of Keypoint.
	New player control handling needed: When the player is in a zone whose zone descriptor
		has bWaterZone=1, the controls should function a bit differently:
		* Player's maximum speed should be reduced to 60% of its normal value.
		* 'friction' damping when moving should be cut in half so that the player
		  slides longer when he/she stops moving.
		* Player momentum should be tracked in all 3 axes (X, Y, Z) rather than just (X, Y)
		  as when the player is standing on the floor.  This enables the player to gain/lose
		  momentum vertically while swimming.
		* The look up and look down keys should not snap back.
		* When the player presses the forward/backward keys, she should be moved in the
		  full (X, Y, Z) direction vector generated by ViewRot rather than just (X, Y),
		  enabling you to swim in whatever direction you're looking.
		* The A & Z keys should enable the player to swim up and down (as happens in fly mode now).
	Note that INDEX_NONE is now MAXINT instead of 65535
	Note several replacements of MAXWORD with INDEX_NONE I made in the actor code
	Note minor changes to: Root.tcx
	All weapon classes need bNoSmooth=1 (to prevent dithering the weapon textures)
	Screenshot key needs to go altogether; it doesn't 't work in new color depths, and isn't worth fixing.
	UnMsgs changes:
		* Deleted LevelClosing, SetPlayMode, GetProp, SetProp, Day, Night,
		  Weapon, UnWeapon
		* Added new comments
		* Corresponding Root.cpp changes (minor).
	Added EnumDef EClientUpdateType to Root.tcx
	AWoman metrics: (1) Mesh needs to appear to stand exactly on the ground when added in
		a level, and (2) when you walk up to another AWoman, you should see exactly
		eye-to-eye.
	Exporting enumeration to C++ header now includes tag_MAX, so please use different
		enum prefixes on different enums (EAI_Task and EAI_Move both use EAI_...)
	Do you have any insight into how to create automatic conversion functions that could
		convert, for example, APawn's directly to AActor's without a cast?  I had to
		set up the inheretance chart this way so that the actor list can be traversed via
		AActor pointer walking:
		AActorHelper
			AActor
			APawnHelper
				APawn
				...etc
		The problem with this approach is that APawnHelper's aren't descendents of AActor's.
		This is messy but I wanted to assure that sizeof(APawn)==sizeof(AActor) etc.
	Note addition to Camera class in Pawn.utx default properties:
		Location=(-500.0,-300.0,300.0)
		DrawRot=(0,16384,0)

///////////////////////////////////////////////////////////////////////////////

>>Old: Mark & Ammon:
	Make sure all of your code compiles with no warnings at level 4.  If you need
		to use #pragma warning (disable : ####) that's fine.
	The only info that should appear in the log is info that will be useful to us
		in tracking down the cause of crashes.  Please remove any log messages that
		aren't directly useful, like the GetProfileInteger stuff, and add any in which
		will be useful, like major subsystem init/exit events.

>>Old: Mark:
	When playing in a window and mouse look is set to "always on", the view shouldn't
		snap back to looking forward when the mouse buttons are released.
	When gravity is reversed (i.e. GravityVector.Z >= 0.0), you should skip the
		ZCollision check and treat the player as if he is always falling. To test,
		go into "Level Properties" and set the level gravity's Z component to a
		positive number.
	New player control problems:
		* Yawing with the keyboard suddenly got really slippery. It should be the way it was...
		* All cheets lock up hard.
		* Mouse looking up/down should move 2X faster (mouse moving forward/backward is fine as is).
		* A lot of stairs which I could climb up previously are now unclimbable because they're too
		  high.  All stairs climbable in previous versions should still be climbable.

>>Old: Ammon:
	Stuff that includes <windows.h> needs to go in the Windows project.  If you need
		only a trivial function from Windows (GetTickCount? - this didn't seem to
		be referenced...) then let Mark or I know and we can add it to FGlobalPlatform
		so that you don't have to include the evil <windows.h>. :)
	Music needs to be loadable/savable/browsable by resource so that I can finish off the 
		new 'level properties' dialog.  You could either cram it into a UAmbient, or create
		a new resource type and browser for it.  I guess it might as well be a UAmbient, since
		that will simplify things.
	Note that I added a new stub function USound::Flip to the sound resource type. Thiss
		will be for byte order conversion.
	Can you make all of the audio parameters in the "audio properties" dialog take effect
		instantly? This is really needed for all options except for enabling/disabling
		DirectSound. Players need to get instant feedback on the effect of these settings.
	Need a selectable sampling rate (11K/22K/44K) since this will have a big impact
		on performance. People with slower machines may want to turn this down (or they may
		want to leave it up)...but either way, they need the option.
	Panning is still messed up.  The panning of a gunshot which I'm firing depends on the
		direction which I'm facing!  Obviously sounds emmanating from the player should not
		be panned.  I think you need to handle this as with ambients, when sounds fade towards
		center as they get really near to the player.

>>Lion Entertainment:
	* Let's start going with the "master source/platform-specific source" setup so that we're
	  working with a common version of all of the main Unreal source.
	* I hope your Mac compiler supports QWORD's (__int64's).  If not, make life easy and
	  create a C++ class called __int64 with all of the needed operators and conversions.
	  The rendering code makes heavy use of QWORD's.
	* Let's hope that our compiler allocate bitfields the same way...

///////////////////////////////////////////////////////////////////////////////
10-24-96

+			Unzoned polys are drawing with backdrop shading
+			DaySkyBrightness, NightSkyBrightness
+			Scale backdrop lights by brightness, use effects
+		Backdrop lights zero effect on surfaces
+		Finish up any remaining needed parametrization (level entry text)
+		Change BT_'s to remove ghost, glow.
+		Bumped MAX_CLASS_PROPERTIES=384.

+	Kill UnrealEd farceiling.
+	Rearranged UnrealEd surface flags
+	Mirror sky option
X	UnrealEd NoteClassChange leaves unwanted slider visible -> Gone?
+	No GServer refs in rendering code!

+	Merged Mark's latest code. Piece o' cake!
+	Added all .tcx files to a new 'Classes' project in project for convenience.

+	Better solution to requiring power of two textures in fonts -> now they don't show up in browser
+	Renamed bStaticActor to bStatic
+	Added bNoDelete to inhibit actor deletion
+	LevelDescriptor = non-static, nodelete

+	Pawn needs editable 'Camera' properties tab for fov and other cool params.
+	Changed unused bInactive to bSleeping, will be used to indicate that an actor need not be
+		ticked.
+	Changed bPegged to bUnused4.

+	Added ScriptRate, which defaults to 1. This is the number of ticks between script updating for
+	each actor, so that actor scripts don't have to continually execute for low priority actors.

+	Added ASpotlight to ALight

///////////////////////////////////////////////////////////////////////////////
10-25-96

+	Implemented volumetric lighting.  Unbelievably cool!
+	It is unlikely that anybody will accuse the volumetric lighting code of being too fast.
X	Only get 640x400x16 on 2meg cards? -> Must be your DirectDraw driver

///////////////////////////////////////////////////////////////////////////////
10-26-96

+	V-lighting improvements:
+		Sphere fast intersect rejection at the point level.
+		What's up with the random artifacts?
+		Adjust smoothly to avoid interior and edge aliasing of volumetric regions.
+		Any more inner loop optimizations

+		Separate volumetric and regular lighting via zone, systemize the code.

>	That virtual memory bug is on your list, right?
>	The bug where, if you scroll through the texture browser too much by holding
>	the slider bar, the editor crashes.
+	Fixed, I think. Send log if anyone sees this again.

+	Wavy bug in unshaded mode.

+	SIOBHAN26a.ZIP in my directory under /maps has this problem with the
+	rotating bridge... You'll see it as soon as you walk through the door and
+	come to the top of the ramp. (Doors and simple lifts aren't a problem. ) 

+	Fake Backdrop etc should equate to unlit.

+	no alt enter in camera children

+	Lessen ambient scaling, 0.5 or 0.3 (is this nonlinear?)

>	I get a 'Error 13 Type Mismatch' and a massive crash when I type two
>	periods (as in 1..0 instead of 1.0) in the custom scaling number fields
>	on the Polygon Properties request and then select 'apply' 
>	This is 100% reproducible. 
>	I attached the log if you need it.
+	Fixed

>	BTW An autosave with number will be cool : auto01 , auto02 ... (One more
>	Barracuda please :-)) - as an *option*.
+	One barracuda implemented, see preferences for option.

+	dbg ver fails link

///////////////////////////////////////////////////////////////////////////////
10-27-96

+	Renamed all FVirtualXyz classes to FXyzBase for better class browsing.
+	Renamed all AXyzHelper classes to AXyzBase for consistency.
+	Had to change UNGAME_API to DLL_EXPORT in Root.h to prevent linker errors.

+	Rewrote creature rendering code adding good support for 16/32-bit.
+	16/32-bit texture viewer works!

+	16/32-bit texture viewer and span drawing code (q&d)

///////////////////////////////////////////////////////////////////////////////
10-28-96

+	Changed cheetah to cheat. Quirky != fun.
+	Added FVector::Normalize.
+	Fix flatshaded drawing code.
+	Fix highlighting in high color modes.
+	Icons.

+	Creature optimization.
+		Build and save out span buffers, skipping empty span buffers.
+		Sped up creature rendering in the game by a factor of 2, with a
+			brilliant optimization -- stop drawing them twice per frame. :-P
X		Chunk pool, reuse nonleaf chunks as filter new ones down.
+		Prepare rasterization cutter for optimization.
+		Span clipped flat shaded.
+		Separate span rendering loop into two passes for better MMX support.

///////////////////////////////////////////////////////////////////////////////
10-29-96

+	Common sense optimizations:
+		MeshesGen!=0 with all static lighting! -> No player lightsource.
+		Eliminated stupid iUniquePlane usage.
+		Discovered and fixed many zone-related moving brush bugs. :-P
+		Fixed moving brushes
+		Fixed moving brush coplanar bug (Kootch et al)
+		Gack!!! Actor lighting code was performing O(n^3*log n) line of sight logic! I'm an idiot!
+		Optimize all physics code using PlaneDot!

+	Quick test: Rebuild bsp heuristic that tries hard to minimize the number of
+		zones that are shared between front and back. -> Bizarre unbalanced performance,
+		why???

///////////////////////////////////////////////////////////////////////////////

New rendering technique:

L1 cache thrashing due to span buffering and bsp traversal in the occlusion 
phase of Unreal is now the main performance bottleneck, and will become a 
larger and larger bottleneck as levels grow in complexity.  As a result, I am
trying to switch to a new, non-bsp portal rendering mechanism which has the 
following characteristics:

 - Generates seamless, not necessarily convex, zones bounded by occluding 
   polygons and by portals.

 - For game rendering, zones contain only linked sidelists, in no special order.

 - Begins by active-edge-table rendering the edges in the viewer's zone and 
   adding edges from adjacent zones as visible portals are encountered using
   seh.

 - Zoning process generates fewer zones than Bsp leaves, opting to merge adjacent
   convex volumes when generating portals would be wasteful.

 - Rebuilds the Bsp with the intent of minimizing portal area and balancing the tree.

 - Maybe perform interpenetration checking between world polys and moving brush polys so
   that moving brushes need not be added to the Bsp.

 - Eliminates redudent sides (sides which have the same surface on both sides).

 - Generates merged spans, as do the current routines.

 - Processes creatures using the same technique, by placing cutout feelers in the
   aet and using seh to generate creature polys on demand.

 - The resulting solid world spans are drawn in order of texture than light mesh,
   while masked spans are drawn in order of polygon z-sort.

Note that this requires no Bsp traversal, is entirely L1 cacheable, and can
be designed with o(n log n) sorting throughout.

On 3D hardware, the same setup can be used with a vertical intersection
algorithm to compute the numerically exact list of visible polys to render
without resorting to any rasterization or discretization.  Note that vertical
intersection can be ordered with o(n log n) sorting which requires only floating
point multiplies.  This is awesome for exploiting concurrency between the rendering
hardware and the processor.

On multiprocessor PC's, and on 3D accelerated PC's, one processor can be set to do 
all dynamic lighting calculations for the previous frame's set of visible polys 
(using a locked caching mechanism) and v-lighting, while the other performs 
visibility computations and texture mapping.

///////////////////////////////////////////////////////////////////////////////
10-30-96

+	Fixed way off msec timer
+	Edge list experimentation

///////////////////////////////////////////////////////////////////////////////
10-31-96 Halloween

+	Fixed sidelink crack bug.
+	Edge renderer work.
+	Note: 1000 polygons @ 640x480 = 300  pixels each, 25 scanlines each = 300K span buffer mem.
+	Note: 200 polygons  @ 640x480 = 1500 pixels each, 60 scanlines each = 150K span buffer mem.

///////////////////////////////////////////////////////////////////////////////
11-1-96 & 11-2-96 & 11-3-96

+	Optimized transformation cache.

	+	Worst case occlusion performance in Jorus at starting point =
	+	33.0 msec to begin with.
	+	25.0 with removal of intrasurface edges.
	+	23.0 with duplicate division removal.
	+	22.0 with assembly language clipper and outcode generator.
	+	21.0 with some FGlobalRender statics.
	+	20.5 with some branch minimization.
	+	19.5 with some lameass VC++ workarounds.
	+	19.0 with better cache alignment of FTransforms and extraneous edge removal.
	+	20.0 after implementing surface cache.
	+	18.5 after backface rejection.
	+	16.7 by changing backface order.
	+	20.5 after fixing bug preventing all vertices from being recognized. :-P
	+	20.4 after full, proper cosidal merge.
	+	19.9 by customizing optimization options (shouldn't have effect!) Augh.
	+	17.3 by disabling guard mechanism. Aha!
	+	17.2 with minor GetPoint optimization.
	+	15.4 after previous-frame coherent pretransformation outcode reject.
	+	14.4 with some simple reorg to appease the VC++ optimizer.
	+	14.3 by padding FTransform and performing memset optimizations.
	+	14.2 by merging duplicate surfs (should be a huge rendertime improvement though!).
	+	14.0 after merging duplicate points (expected more).
	+	13.9 by fixing broken merging code.
	+	13.8 by eliminating collapsed polygon fragments.
	+	11.5 by removing semisolids and reoptimizing Bsp. Wow!
	+	11.0 by hellishly optimizing Bsp.
	+	10.9 by modifying point cache code to improve branch prediction.
	+	10.8 by minor improving conditional branching.
	+	11.1 with surface cleanup routine (will be faster on average).
	+	Overall: 3X speedup, not bad.

	+	PentiumPro has some strange alignment<->performance characteristics. It often
	+		favors 8-aligned stuff for no apparent reason.
	X	Early backface reject based on side's last-frame backfacing. -> Complexity slowdown.
	+	Fast bitvector code (asm get/set).
	X	Optimize backface removal for caching with surface plane table -> Slowdown due to L2 usage.
	X	Optimize GetPoint. -> Slower for some reason.

+	Properly-clipped convex volume renderer:
+		Flatshade routine.
+		Properly set LeftSurf, RightSurf according to up/down facing.
+		Perfect unclipped convex volume rendering.

///////////////////////////////////////////////////////////////////////////////
11-4-96, 11-5-96

+	Active edge list x-clipper.
+	Struggling with active edge list clipping logistics.

///////////////////////////////////////////////////////////////////////////////
11-6-96

+	Phase 1.
+		Build list of all edges in the world excluding duplicates, pass to code.
+		Draw edges as 3D lines.
+		Clip edges as 3D lines.
+		Proper start bucket and active edge tracking and line rendering.

///////////////////////////////////////////////////////////////////////////////
11-7-96

+	Created IUnrealServer Ole interface to UnrealServer.

///////////////////////////////////////////////////////////////////////////////
11-8-96

+	Full UnrealGate user interface prototype.

///////////////////////////////////////////////////////////////////////////////
11-9-96

+	UnrealGate protocol design.
+	UnrealGate basic server implementation.

///////////////////////////////////////////////////////////////////////////////
11-10-96

+	UnrealGate client design.
+	UnrealGate client & server communication.

///////////////////////////////////////////////////////////////////////////////
11-11-96

+	Research RFC1459

+	Notes:
+		Spanning tree master server architecture or peer master servers?
+		Operator class users = server admins or dm's? Figure out hierarchy.
+		Freeform client channel creation? Reserved channels?
+		#channelname
+		invite & kick
+		topic

+		Names:
+		#Channel
+		*Server
+		@Operator
+		!Admin

+	Morn:
+	>  Well, we could have a basic rfc1459-like message format like this
+	>
+	>[:<nick>!<username>@<hostname>] <command> [<par1> [<par2> [...]]]
+	>[:<trailing>]
+	>
+	>  This is basically how IRC works... ok, now let's say someone enters a
+	>level/chatroom/whatever, the message would be
+	>
+	>  :Tim!tim@timpentium.epicgames.com JOIN 2
+	>
+	>  ..."2" being the level number on the server. Now every player on that
+	>level would get a message "Tim has joined the game. Feel his wrath". :)
+	>
+	>  A message would be this:
+	>
+	>  :Tim!tim@timpentium.epicgames.com SAY 2 :Hey guys... you will die now!
+	>
+	>  ...and everyone on that level (2) would get the message "Tim says: Hey
+	>guys... you will die now!".
+	>
+	>  A message to an "external" channel would work like this:
+	>
+	>  :Tim!tim@timpentium.epicgames.com INVITE Morn unreal.epicgames.com 12999
+	>
+	>  ...this would invite "Morn" to join the game running at
+	>unreal.epicgames.com port 12999... a message would pop up in Morn's client
+	>saying "Tim has invited you to join his game at unreal.epicgames.com. What
+	>would you like to do? Join/Get level info/Deny"... etc, I think you get the
+	>idea.

+	Neutral zones?
+	Cult homeworlds?
+	Cult skin accumulators?

+	UnrealGate testing & experimentation

///////////////////////////////////////////////////////////////////////////////
11-12-96 & 11-13-96

+	Speedup geometry rebuild while keeping exactness of bsp rebuild.

X	Reduce ULevel locks per frame to 1 (collision locking is very very slow).
X	Only perform collision and moving brush work when locking level for tick.
X	Don't lock collision stuff for rendering. -> Eliminated speed impact.

X	>Engine limitations may prevent this, but what would be truly 
X	>awesome and realistic, IMHO, is for light to flood a room
X	>when opening a door to a bright room, from say a very dark room.
X	>It would be truly incredible to do, to see a beam of light illuiminate
X	>a section of floor (fanning out) and perhaps cast a bright light on 
X	>an opposing wall in the room, perhaps revealing a secret etc....
X	>When the door closes, the light is gone, just as would happen in 
X	>a real situation. Is there any way to accomplish this?
X	-> Maybe later.

+	>>If I try to select "INVISIBLE COLLISION HULL" from the "ADD SPECIAL"
+	>>dialogue box, I get a RTE 380- Invalid Property Value.
+	Fixed invisible collision hulls.
	
+	Moving brush coplanar bug: Kootch entryway.
+	Fixed all known moving brush bugs.

///////////////////////////////////////////////////////////////////////////////
11-14-96

+	The CyberLore team are experiencing an UnrealEd crash when entering numbers
+	in the primitives properties boxes. This is on a fairly regular but random
+	basis. I've sent their log files (2) to the /bugs directory.
+	Line(4) bug, fixed.  What the heck is this about Windows font smoothing???

+	>>The other thing we're doing now is to save it as a T3D, and then import it
+	>>in the current map. What we need to do then is to select all brushes in this
+	>>sub-map, and move the whole selection around.
+	>When you import a new map into the current map, the new brushes should all
+	>be selected.  Are they not?
+	They're not selected when you import them into an existing map.

+	debugf (LOG_Info,"Error opening %s",DataFile);
+	where data file is of type FILE *.  -> Thanx Mike

///////////////////////////////////////////////////////////////////////////////
11-15-96

+	Gatekeeper protocol definition.
+	Gatekeeper experimentation.

///////////////////////////////////////////////////////////////////////////////
11-16-96

+	Gatekeeper Ole interface.

///////////////////////////////////////////////////////////////////////////////
11-17-96

+	Gatekeeper remote property editing and browsing.
+	Scrapped Ole interface in favor of cleaner TCP interface.

///////////////////////////////////////////////////////////////////////////////
11-18-96

+	Rewrote Gatekeeper using database/subscriber paradigm.

///////////////////////////////////////////////////////////////////////////////
11-19-96

+	Silhoette edge occluded experimentation
+	Integrated Eric's new spanbuffer code

///////////////////////////////////////////////////////////////////////////////
11-20-96

+	Gatekeeper database grid updating

///////////////////////////////////////////////////////////////////////////////
11-21-96

+	Researched HTTP protocol.
+	Researched FTP protocol.
+	Revised Gatekeeper protocol.

///////////////////////////////////////////////////////////////////////////////
11-22-96

+	Gatekeeper docs overhaul
+	Started gatekeeper discussion group
+	Experimented with edge rendering code some more

///////////////////////////////////////////////////////////////////////////////
11-23-96

+	Next generation gaming interview - cool!
+	Played a bunch of new games.
+		Sorry but Tomb Raiders looks and plays awful.
+		Amok is extremely cool - I think this team will go on to produce major hits.

///////////////////////////////////////////////////////////////////////////////
11-24-96

+	Worked on Gatekeeper stuff.

///////////////////////////////////////////////////////////////////////////////
11-25-96

+	Gatekeeper level launching and crash detection
+	Unreal 0.85 cleanup

///////////////////////////////////////////////////////////////////////////////
11-26-96

+	Can't click on menu-down in add-actors mode.
+	Highlight meshes in 3d views.

+	jschreiber bug indicates that 24-bit (or some weird colordepth?) crashes. -> Fixed it.
	
X	Texture browser needs Find filter (checkbox, goes to all). -> No it doesnt get out of
X	the DOS ages my friend.

X	>I can't select individual verticies of moving brushes in order to make them
X	>pivot on a particular vertex. (used to be able to)
X	-> You HAVE to select your pivot before you add it as a moving brush.

+	We used to be able to replace a moving brush in MapEdit mode by loading the
+	desired brush, going to Display on the moving brush properties, and then
+	hitting Use Current under Brush. This isn't working anymore, in case no one
+	else noticed (or did I miss an earlier post). -> Fixed

+	UnrealEd fixes
+		After load tex fam, try to go to that family
+		New Level while actor props dialog is up crashes

+	Rotating brushes need to move the player according to their rotation: Kootch.

X	Make copy-to-brush work w/ moving brushes. -> No way to select them.

+	Invisible polys: cast no shadows.
+	Eliminate unused special brush types.

+	Pawn:
+		Player-name=string
+		Player-team=string
+		Renamed Woman to Human.

+	ZoneDescriptor:
X		NoBot zones.
+		Team-only zones.

+	Zone color and volumetry screwed when not in a zone

+	Root:
X		MeshSkin1 & MeshSkin2 -> handle via team name associations (separate system).
+		SoundRadius, SoundVolume

+	Major actor class overhaul.

X	FName -> FName pointer! -> It's faster not to, since names can be hashed consistently.

+	Show actor selection with meshes by highlighting them.

///////////////////////////////////////////////////////////////////////////////
11-27-96

+	Gatekeeper level launching and management

///////////////////////////////////////////////////////////////////////////////
11-28-96

+	Scripting experimentation.
+	Played Tomb Raiders.
+	Played Amok.

///////////////////////////////////////////////////////////////////////////////
11-29-96

+	Thanksgiving and stuff.

///////////////////////////////////////////////////////////////////////////////
11-30-96

+	Pawn needs buttons & axes

+	FovAngle
+	Bump ResFile version
+	PF_Gouraud for Gouraud surfaces? This is getting messy...

+	Lighting fixes
X		Dynamic lights should have no incidence effects. -> Looks weird.

+	Test unguardf
+	Eliminate #ifdef PARANOID
+	Added string array support
+	Fixed alignment problem with class inheretance.

+	NameAddHardcoded "None!"
+	No purge hardcoded names.

+	Internal fixes
+		UnBuild version

+	Use IsPerActor! No AActorBase::EPropertyBins directly.
+	Remove (void)s
+	FClassProperty::IsTrue -> Deleted.
+	FClassProperty::Compare

+	Event lines are drawn with NAME_NONE!
+	Fix header exporting.

///////////////////////////////////////////////////////////////////////////////
12-1-96 & 12-2-96

+	Rewrote FMemoryCache
+		This is an example of the kind of subsystem implementation that is
+			appropriate for Unreal:
+			- Simple design.
+			- Algorithmically fast implementation.
+			- Minimal use of weird advanced C++ features.
+			- No extraneous class definitions, typedefs, etc.
+		Get is >4X faster!
+		Create is >50% faster.
+		Can see what's happening with the cache graphically.
+		Half as much code.
+		Time to implement and debug, 11 hours.

+	Importing maps needs to remap actor indices (right now to account for
+		leveldescriptors and for merge imports). Test carefully.
+	Sensible cache stats: Num gets, num creates, create time.

+	Load texture family is broken!
+	ExportActorProperty: Unknown name in light class.

+	Static variables - SCRAP THEM! AUGH!

X	Astoundingly bizarre frame of reference bug with moving brushes! -> Fixed.

///////////////////////////////////////////////////////////////////////////////
12-3-96

+	Flush: Unhashed item after rebuild.
+	After full flush assure that there's only one item.
+	Changing zone properties doesn't always cause relight.
+	No Actor Index=, just use Me=...
+	Weird new node disappearing rendering problem. Seems to have disappeared (great).
+	Delete old tmapping code.

+	Consolidated Cache ID's.
+	Now have a global system for assigning cache id's (no overwrites anymore).

+	Totally moronic bug found: The reason 8-bit color thrashes so horribly is because
+	I was allocating >10 times the amount of space that's actually required. 
+	(Stupid programmer!)

+	Full proper cache locking everywhere in highcolor.
+	Proper cache locking in 256-color (gets each texture 8 times).
+	16-bit palette scalers are busted.
+	Tex remapping allocating more space than needed for each mip?
+	Must allow for multiple locks properly - one unlock per lock. Underflow check.

+	Standard zone palette lookup table functions for actor shading.
+	UnrealEd with cache locking.

+	Is TexSetup doing unnecessary cache lookups?
+	FGlobalSpanTextureMapper::SetupForPoly needs to hold lock.

+	Get rid of GBlit.Setup stuff, use ITexture instead (somehow).
+	Get proper zone lighting table for actors.
+	Check !!
+	Compute and show fps even if stats not defined.

+	UnrealEd
+		PF_Gouraud
+		Version
+		Results window - move down.
+		curved stair text
+		Isn't going to default category on select anymore?

X	Add more noise to mips to hide shadow flaws.

X		AllowEdit, PreventEdit in scripts to retract/publish parent properties
X		Use saved last-CacheIDs
+		Proper cache item locking/unlocking
X		Need 'update zones' button
X		Semisolid -> 'detail' brush, allow subtractive?
+		Build and merge creature clipping span buffer as filter through BSP
+		Draw polys clipped to span, with 2-pass setup

+		Zone fog enabling, use existing ambient and nonambient parameters.
+	Fix player standing on moving brushes that rotate
+		Test touch/untouch carefully
+		The moving brushes sometimes disappear (when frame 0)?
+		The moving brushes disapppear when in same plane of Zone Portal?
+		Compute all light brightnesses once per frame, and share them
+	Implement NF_SEE_THROUGH, NF_SHOOT_THROUGH
+		Pause key & menu option FUnreal.Pause, IsPaused() (Mark did this)
+		Collision exclusion (blocks monsters, only triggered by players, only hit by projectiles)
+			(Mark did this)
+		Touch detection bugs - fixed a while ago
+		Object cache size impact on performance -> if working set exceeds cache size
+			then thrashing is the least of your problems.

+		Actor variables
+			ScriptCountdown for slow script execution
+			TimerCountdown for the user timer
X		Preload fire/alpha palettes.

X		Tasks -> No multitasking
X			Separate server task for each level?
X			Separate task for each remote player?
X			Proper player/camera associations in
X				Local server, local client
X				Local server, remote client
X				Remote server, local client
X			No server task in UnrealEd

X		UnrealEd External tools interface -> not very useful
X			Tools interface
X			Example tool
X			Tools documentation

+	Lighting fixes
+		Stat for palette and texture regens
+		Synchronize CloudCast, CloudReflect to backdrop.
+		Fixed cylinder lighting.
+		Make sure not rebuilding meshes unnecessarily.
X		CloudReflect? -> Killed it, didn't work out, new effect coming soon.
+		Cyllinder is static unless otherwise tagged dynamic.
+		Fine tune spotlight class -> Use LightCone! Very cool!
+		Static spotlights & dynamic spotlights.
X		Update brightness via tick, from day & night bright.
+		Count palette regenerates. Is this slowing things down? -> No.

///////////////////////////////////////////////////////////////////////////////
12-4-96

+		New properties: VolumetricRadius, VolumetricBrightness.
X		Investigate overwriting shadow meshes with lighting when possible.
+		New zone inconsistencies.
X		Move LightSqrt to GRender for speed.
+		Investigate second degree interpolation instead of SizeSquared() -> Done!
+		Good default light volumetric properties.
+		All lights act volumetric in fog zones, no special type.
+		Adaptive subdivision criteria in fog zones based on projected light v-radius.
+		Fix fog and ambients not coexisting.
+		WorldRaytraceKey works.

+	>I don't know exactly how to use the brushRaytrace key but it seems to be
+	>broken in 0.83, the brushes always have the lighting of the key "0"
+	Fixed all of this stuff.

+	Efficiency of RLE light mesh encoding vs. bitmask:
+		Timstros: 142K Meshpts, 12K Changes
+		SPQR: 142K/41K
+		Aug: 515K/135K
+		Conclusion: Bitmasks are fine.

///////////////////////////////////////////////////////////////////////////////
12-5-96

+	UnrealEd: When switching actors from zone descriptor to other, doesn't set
+		default category.

+	Subtracting huge brush gives error on EdcamMove - easily repeatable.

+	Sine fx use sine table.

X	Tag moving brush surfaces for relighting when they move (PF_DynamicLight).
X		-> This just exacerbases the lack of dynamic shadows.

+	Fix enviro map water.

+	UnrealEd command line for ignoring registry settings.

+	Rotate actor in UnrealEd set bTempLightingChange for static spotlights but
+		not bTempDynamicLight.

+	Test new .ucx.

+	Don't require .UCX for play.
+	Builtin classes referenced in FGlobalClasses:
+		Actor:				Must be in memory.
+		Camera:				Must be in memory.
+		LevelDescriptor:	Is required.
+		Light:				Editor only.
+		Projectile:			Not needed.
+		Pawn:				Not needed.
+		Human:				Not needed.
+		PlayerStart:		Not needed.
+		Inventory:			Not needed.
+		Weapon:				Not needed.
+		Pickup:				Not needed.
+		Mover:				Not needed.
+		ZoneDescriptor:		Not needed.
+		Ammo:				Not needed.
+		PowerUp:			Not needed.
+	Need: UClass.IsKindOfNamed, UClass.IsNamed (same for AActorBase).

+	Test possession.
+	Test basic gameplay.
+	Fix player scaling.
+	New KillMonsters bug.

+	Documented console commands in Console.txt.

///////////////////////////////////////////////////////////////////////////////
12-6-96

+	Meetings

///////////////////////////////////////////////////////////////////////////////
12-7-96

+	UnBlastC.cpp is overly bright without ASM.
+	Zone building code still isn't quite right (6) -> Fixed it!

+	Legend map:
+		I broke Unlit again.
X		Light numbers are mapped wrong! -> They are ok.
+		Fix spotlight class!
+		New disappearing polys problem is with bounds -> Fixed, was zoning bug.
+		Make Legend map work in 0.84 properly!
+		Panning >256? No. Keep textures <256x256 if you want to pan them. That's final.

///////////////////////////////////////////////////////////////////////////////
12-8-96

+	Mult shared sides = due to microslivers!
+	Opt geom after zoning?
+	Fixed that awful light edge bug.

+	MergeZonePortals should be redundent.

///////////////////////////////////////////////////////////////////////////////
12-9-96

X	Handle bTempLightChange for non-visible cached surfs (flush surf from cache!)
X	Lighting change propagation:
X		Set bTempLightChange in:
X			UnActLst.cpp (editing actor)
X		MakeCacheID(CID_ResultantMap,iLightMesh); <- How to change?
X		MakeCacheID(CID_StaticMap,iLightMesh); <- How to change?
X		MakeCacheID(CID_IlluminationMap,iLightMesh,Info-FirstLight); <- Could replace w/ iActor.
X		Zone palettes & zone scalers <- Easy enough.
X	Can do all of this later via update tagging.

X	Reintegrate creature dithering -> Later, will rewrite.

X	Wielding process often misses lots of sides. -> Expand later in gameopt rebuilder.

+	Internal fixes
+		Crashes with stats on when you make the window really small.
+		Resource services: Purge & display output, memory used by resource type & total.
+		Figure out Unreal and UnrealEd working set sizes.

+	Count items in cache.

+	Fixed Legend mesh import bug (was an overflow).
+	Fix busted timer in Win95.
+	Flush when change cdepth.

+	Unreal 0.84 prerelease.
+		Test import & rebuild.
+		UnrealEd sanity check.

///////////////////////////////////////////////////////////////////////////////
12-10-96

+	No .htm file, launch URL directly.
+	Kill screenshot key.

+	One cannot import a .3d file (from James' tool) into UnrealEd  if the .3d file 
+	is read-only. Makes storing .3d files in SourceSafe inconvenient. meshImport() 
+	opens the file with "r+b" permission which fails, though I don't think the .3d 
+	is ever modified. You might want to change it in the original source. -> Fixed.
+	Kill launch web.

+	Flame:
+	Light steady
+	Effect Fire Waver
+	Light Brightness 40
+	Light Radius 32

+	Fix ver - says 0.85.
+	VB remove unneeded control associations.
X	Set version number to autoincrement -> Couldn't find an option for this.
+	Downgrade to VC++ 4.0. :(
+	UNREAL.EXE
+	Make comprehensive file list.

X	Legend mesh backfacing problem -> This is not a bug, there's nothing
X	texture mapped on his back. Just texture map his back.

///////////////////////////////////////////////////////////////////////////////
12-11-96
+	ddExit no fail if crashing.
+	Mesh viewer contents has zone or backdrop tint.

+	Unreal 0.84 release
+		UnrealEd installation & test on clean system.
+		Unreal installation.
+		Graphics directory.
+		Models directory.
+		Classes directory.
+		UnSrc installation (include Gate).

///////////////////////////////////////////////////////////////////////////////
Major changes from 0.83 to 0.84:

Actor properties:
	* Setting bNoSmoth=True turns off dithering of the actor's mesh.

Rendering:
	* Creatures and sprites now render in 8, 16, and 32-bit color.
	* Volumetric fog now works. This is somewhat limited in its current incarnation
	  and only works decently in small levels. On non-MMX machines, fog and shadows
	  won't coexist so use for zone sparingly.
	* Cool new backdrop code: go into "Level Properties" to fool around with the sky
	  properties. Everything is very versatile now.
	* Static and dynamic spotlights are now supported, with adjustable beam width.
	* Fixed all known portal bugs.
	* New Cylinder lights - great for placing near light textures on walls.

Optimizations:
	* Rewrote and optimized caching.
	* Optimized a lot of the dynamic lighting code, but many more optimizations remain.
	* Fixed major problem that caused 8-bit color to be extremely slow.

UnrealEd:
	* Check out the cool new "Level Properties" options!
     	* In the 'surface properties' popup, 'editor' tab, you can see how many static and dynamic lights are incident on the surfaces you have selected, as well as the amount of memory 
     	  occupied by the light meshes.
	* The world now starts out "filled" and you begin level building by subtracting
	  rather than adding. This shouldn't impact any existing maps (you can just
	  delete your world cubes now).
	* New "Level Properties" dialog.
	* Run UnrealEd with the parameter "Reset", i.e. "UnrealEd RESET", to
	  reset all of your settings to their defaults. Useful if your settings
	  get corrupted somehow.
	* Show-radii modes now shows collision and light radii.
     	* Fixed major bug in portals that are flush with other surfaces in the world. Coplanar portals are now ok, and more efficient than non-flush portals.

Level design recommendations:
	* Don't cut holes in the floor, ceiling, and walls for your moving brushes to
	  go into. This adds a lot of polygons and messes up collision. The better
	  approach is to design your moving brushes so that they never go completely
	  through the wall. That way, they look physically realistic, and they don't
	  require extra polygons.
	Use low shadow detail everywhere you can, especially in large areas.
	    Shadowing/lighting time is killing performance in a lot of our levels.

Limitations:
	* Fog zones don't mix properly with:
	  - Portals to non-fog zones.
	  - The sky.
	  - Environment mapped water.
	  This is a general limitation with the fogging method on non-MMX machines and
	  this is not going to change, so restrict levels accordingly.

Known problems:
	* When you reimport maps in 0.84, you will need to manually reset the "Event"
	  properties of all of your triggers and moving brushes which trigger other
	  properties. Alternatively: If you have a lot of triggers, that would be a
	  pain, so you can update your .t3d file manually. Just:
	  1. Edit your *.t3d file with Notepad or Wordpad.
	  2. Replace all occurances of "EventName=" with "Event=".
      3. Save it.
	  4. Import it.
	* Player collision is still sloppy.
	* The player jumping and rotation controls aren't scaled well.
	* Texture mapping and visibility code needs major optimizations.
	* I haven't integrated with the new version of the sound system, so sound
	  support is the same (still limited) as 0.83. I'll have an update soon
	  once I've merged Ammon's latest code into 0.84.
	* Creature drawing code needs major optimizations.
	* UnrealEd is still quite the memory hog. If you get messages like
	  "Unreal has run out of virtual memory; you need to free up more hard disk space"
	  then that means, surprise! Unreal has run out of memory; you need to free up
	  more hard disk space. This is not a bug.
	* Creatures are always unlit. Creature lighting will be back later.
	* Transparent and masked textures don't display in most video modes. They will be 
	  back much later.

I will attend to the above once scripting is done.  I want to get the engine 
feature complete first, and then work on perfecting it, so that we can all get the 
most work done in parallel. Otherwise we'll be 6 months down the road and have the 
fastest rendering and physics engine around but no game elements and scripting 
language.  The current approach is the lesser of the two evils...

///////////////////////////////////////////////////////////////////////////////

>>Mark & Ammon:
	Anything that includes <windows.h> or relies on any of the Windows DLL's (winmm.dll,
		etc) needs to go in the Windows project.

>>Ammon:
	Can you always include a debug version of SoundEng.lib along with the release
		version in the future? Just name it dSound.lib.
	The sound system has been acting quite stably since the last merge, good job
		Ammon & Carlo!

>>Mark:
	It's not worthwhile merging any of the stuff in the Game project at the moment.
		As I prepare for scripting, this is going to undergo so many changes that the
		best strategy is to reconcile all of the code after my work on scripting
		is done. In the meantime the code in the Game project is a warzone.

	I'm not sure that I merged your Delta84 properly, because I found that most of the files
		I'd checked were unchanged changed (relative to the original I posted)...

	I merged some of my debugging code into your UnChecks.h, and now that's available 
		everywhere for convenience.

	Note the new "#if defined(_DEBUG) || defined(CHECK_ALL)" in UnChecks.h - CHECK_ALL is
		useful for enabling checks in individual files during development.

	You have some memory leaks. See the "Unfreed:" entries in the log upon exit for a 
		list of them.

	And now we need a "Video" tab with these options...
		Texture smoothing (note: no performance impact)
			Full texture smoothing
			Adaptive texture smoothing (high-res only) <- default
			No texture smoothing
		Default color depth
			8-bit color
			16-bit color (recommended on Pentiums)
			32-bit color (recommended on PentiumPro's)
			Always use current Windows color depth <- default
		Use MMX Multimedia Extensions (a checkbox; default is checked, but must 
			be greyed when no MMX support is available. You can detect this with GApp->MMX).
		Use Direct3D Hardware Acceleration (a checkbox; default is checked, but must be 
			greyed when no Direct3D support is available. This isn't detectable yet.)

///////////////////////////////////////////////////////////////////////////////

>>Changes to be wary of for error symptoms

	Transaction tracking changes
	Infinitely resizable resources
	New fast actor list code
	Resource alignment and realignment
	UModel-ULevel merging
	IModel, ILevel, ICamera deletion
	Property bin changes.
	INDEX_NONE = MAXDWORD
	ARoot/AActor reorg
	FClassProperty::AddToFrame change
	Actor properties are now 4-aligned with #pragma pack (push,4)
	Actors.Num != Actors.Max
	GClasses.Associate,GGame.Init order
	UnEngine.cpp game init order
	Debugger says overreading/overwriting ShadeData
	NF_Bounded
	Unres.cpp: UnclaimedNames->Element(i).Kill();

///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
12-12-96

+	Cleaned up the installers.
+	Installer icons.
+	Installer launch links.
+	Palettes and backdrops fixes.

///////////////////////////////////////////////////////////////////////////////
12-13-96

+	Refuse to play level if scripts aren't up-to-date (no recompile in play).
+	Added stub FRoutingNode, FReachSpec, URoutingTable, UReachSpecTable for Steven.
+	Extra ULevel additions - did this break the level format?
+	ULevel::Lock & Unlock.

///////////////////////////////////////////////////////////////////////////////
12-14-96

+	Removed
+		AiAnimat.cpp
+		UnActPro.cpp
+		UnFActor.h
+		UnCheat.h
+		UnCheat.cpp
+		UnFActor.cpp
+		UnDecora.cpp
+		UnExplos.cpp
+		UnGCheat.cpp
+		ai struct
+		UnPawns.cpp
+		UnRandom.cpp
+		UnRandom.h
+		UnInv.cpp
+		GLevel
+		CollidingActors

+	Classes
+		Cleanup Actor
+		Cleanup Pawn
+		Make most stuff nonintrinsic.

+	Cleanup
+		Recompile Root.tcx.
+		Delete PBeginPlay.
+		Update PPlayerTick to include time delta.
+		PlayerTick and Tick TimeDelta.
+		No special PlayerTick - just use Tick.		
+		GAudio.SfxMoveActor(iMe,&Location) out of Tick
+		Check location of all GAudio calls.
+		GAudio.SetOrigin in UnrealEd for current window only.
+		GAudio.SfxStopActor when kill.
+		GAudio.PlaySfxLocated for ambients.
+		Cleanup SourceSafe files.

+	LevelDescriptor
+		BeginPlay parameters

+	Classes & Messages
+		LevelDescriptor: GameTickRate, RestartLevel, JumpToLevel
+		Pawn: bLocalMovement, bLocalRotation
+		Messages: Sound playing messages
+			PlaySound(USound,Radius,Scale)
+			PlaySoundFar(USound,FVector,Radius,Scale)
+			PlaySoundNowhere(USound,Scale)
+		const Parent, Target, Me, Class, touching actors, bStatic, bCollideActors, etc.
+		ACTOR_Spawned, ACTOR_Destroyed, ACTOR_SetCollision
+		Spawn actor message for spawning actors.
+		Can't spawn actors of template classes.
+		Actors spawned during play cannot be static.
+		Remove movement stuff from Tick, go back to PlayerTick.
+		Remove movement stuff from pawn class.
+		Design new movement packet: boolean array and float array.
+		Early GDefaults init.
+		Variable tickrate via command line.
+		ACTOR_Spawn
+		ACTOR_Damage, PDamage
+		ACTOR_InternetSend(IpStr,NameStr,Text)
+		ACTOR_InternetReceive(IpStr,Text)
+		ACTOR_StateExists, ACTOR_LabelExists, ACTOR_StateAndLevelExist
+		ACTOR_Goto, ACTOR_BreakTo

+	Todo
+		Cleanup AActor::Process mess
+		BeginPlay killing.
+		Check todo's.
+		PHit?
+		EDamageType? Figure out damage stuff.
+		Cleanup UnMsgPar.h
+		Cleanup UnMsgs.h

+	Special support:
+		ChanceOfExistence, RandomDivider, RandomRemainder

///////////////////////////////////////////////////////////////////////////////

Status report
-------------

I'm making fast progress on UnrealScript. The following items are done.

	Script Compiler:
	- Global, local, and static variables of the following types:
	  Byte, Integer, Boolean, Real, Actor (of any class), Resource (of
	  any type including textures, actor classes, sound effects, etc),
	  Names, Strings, Vectors, Rotations.
	- Functions with parameters and return values.
	- Planned the remaining details out.
	- Built-in functions.

	Preparation work:
	- Set up some basic facilities so that Steven's work can begin soon.

	Script executor:
	- Planned how everything will fit together.

I'm at the point now where I know what most of the language's final capabilities 
will be. And the future is bright! Here are some of the cool UnrealScript
possibilities:

	- You'll be able to script AI, moving brushes, triggers, player movement, and
	  just about anything else you can think up.

	- Everything that's accessible in the "Actor Properties" window is accessible
	  via script code, so you can use scripts to modify just about anything about
	  an actor.

	- Once Steven's routing code is complete, you'll be able to write AI scripts
	  at an extraordinarily high level: For example, in one command, you could tell
	  an actor to go find its way to a certain switch in a level, then in one more
	  command tell him to press the switch, and the actor will find its way through
	  the level and go do what you asked. This will be awesome for prescripting actors
	  to occur in levels -- it now looks like that will be *very* possible, whereas 
	  before it seemed prohibitively difficult and time consuming to program.

	- The scripting language will be object oriented with single inheretance, so you'll
	  be able to write new scripts that expand on existing scripts very easily.
	  This also means that properly-written user patches will be able to coexist with
	  one another.

	- Programming complex sequences of animations and sound effects is a breeze.

	- There will be a function for sending data over the Internet to other levels, and
	  for receiving data. This will enable UnrealServers to actually communicate with
	  other UnrealServers, for coordinating multi-level events.

Unreal long-term outlook
------------------------

	After Unreal 1 is finished, my next project will be, surprise! More Unreal.
	In designing the engine, a major priority has been designing it to be
	very expandable and component-based. On future projects, I plan to rip
	out and rewrite several core parts of the engine, leaving the rest
	intact. While Unreal will eventually become outdated technology, I don't
	forsee that happening in the next 30 months: Until CPUs and 3D hardware
	become >10 times faster, 3d games will continue to revolve around drawing
	relatively low-detail (in absolute standards) polygon environments.

	Some technologies I'll be exploring after Unreal 1:

	- NURBS creatures with skin-and-bones interpolated rendering (20X the
	  visible creature detail in the same RAM!)
	- Truecolor radiosity preprocessing.
	- Fractal objects.
	- Bump mapping. -> Note on 1/5/96: Already added this to Unreal 1!
	- Solid volume surface-differential dynamic volumetric lighting.
	- Dynamic moving brush shadows.
	- Dynamic actor shadows.
	- Fourier synthesis texture mapping.
	- Level of detail support in UnrealEd for greater scalability.
	- Analytic edge antialiasing and postprocess sinc antialiasing.
	- Persistent multiplayer stats support.
	- Jpeg style texture compression to enable levels to have 5X more textures in same space.
	- Stoichastic motion oversampling.
	- Microtexturing.
	- Microfaceting.
	- Inverse kinematics.

///////////////////////////////////////////////////////////////////////////////
12-15-96

+	Class changes.
+
+		LevelDescriptor: LevelState, ELevelState, bInternet
+		Actor: State

+	AActor::IsParentOf(iTestActor)

+	SpawnXActor return AActor, not iActor.
+	Level dynamics should refer directly to AActors, not iActors.
+	iTouchActors
+	TempActors
+	AddActorSphere
+	DestroyActor
+	Retest moving brushes
+	Camera->Actor, not iActor
+	SetBinPointers optional parms.
+	BeginTouch, EndTouch.
+	Possession
+	GetLevelStateDescription
+	XMoveActor
+	iActiveActor
+	All ILevel functions use AActors, not iActors.
+	Why is APawn* -> AActor* not working?
+	Eliminate all unnecessary actor casts.

+	Implement:
+		ACTOR_QueryActors(UClass,DynamicOnly) for iterating through actors.
+		ACTOR_QueryTouchActors
X		ACTOR_QueryTrace, PQueryTrace -> Replace with Trace.
+		ACTOR_Trace, PTrace
+		ACTOR_QueryRadial, PQueryRadial
+		Check that all crucial messages are implemented in UnRoot.cpp.
+		UnrealScript now supports boolean arrays. They are not packed but that's ok.

+	Cleanup:
+		IModel remove redundent junk.
+		Nice element operator.
+		Now using smart pointers throughout.
+		No UModel::Kill.
+		UVertPool -> UVerts

///////////////////////////////////////////////////////////////////////////////
12-16-96 & 12-17-96

+		Finish Editor files
+		Eliminate redundent IModel and UModel.
+		Eliminate redundent Trans and LockType.
+		Added UnModel.h
+		Test undo/redo
+		Use UActors smart pointers.
+		Use smart pointers throughout resource headers.
+		Actors.
+		UResource::Kill as private?
+		Eliminate ILevel
+		Eliminate ILevel.
+		Camera->Level pointer.
+		Eliminate duplicity in ULevel::Lock.
+		Actor process functions take ULevel&
+		GServer.SetLevel, GServer.GetLevel encapsulation.
+		Eliminate ICamera.
+			Locked
+			CameraInfo
+			ModelInfo

+		When finding zone descriptors, ignore actor 0.
+		Assign LevelDescriptor to all ZoneDescriptorless zones.

+		Rebuild root.

+		Options/level crash!
+		Retest zone gravity and zone handling.

X		GetActorZone() performance? -> Eliminated it.
+		LevelDescriptor expands ZoneDescriptor, so GetZoneDescriptor never fails.

+		Make ULevel a child class of UModel to flatten the unnecessary hierarchy.
+			Make sure everything works with resource inheretance.
+			Remove ULevel::Model, set up constructors, init/exit, and resource functions.
+			Gravity is messed up.

+		Class changes.
+			DrawRot -> Rotation
+			Placed crucial actor properties in top 32 bytes of struct.
+			ViewRot -> ViewRotation (Pawn)
+			Retest Undo
			Retest moving brushes

+		Always 32-align all resource data.
+		Realloc needs to reshuffle aligned data properly.
+		FGlobalPlatform, reallocaligned and fixed bug allocaligned overallocation problem.
+		Actor++, Actors->Element(0) elimination.

X		Stick a ULevel* in actors so that ::Process funcs are context free?
X		-> No, this doesn't add anything useful.

+		::Process take PMessageParms *
+		SendMessage funcs take PMessageParms *

///////////////////////////////////////////////////////////////////////////////
12-18-96

+	Decided to stick with actor indices rather than convert to actor pointers.
+		Avoids a can of worms conversion attempt.
+		Makes actors fully relocatable.

+		QueryTouchingActors serious bug
+		Hardcoded 16 slaves
+		ULevel::DestroyActor touching actors notify bug
+		Check all GetPropertyPtr

+	Stick crucial stuff at top of actor structure for cache coherence

+	Level
+		Make the global moving brush class a class, remove redundency, cleanup Actors.
+		Undo selecting a poly crash: TestLev is already locked
+		Zone as actor reference.
+		SetActorZone bForce parm

+	StatusDescriptor chain!
+	bOnlyParentCanSee flag for rendering weapons etc, rather than current hack.

+	UCamera, ULevel, UModel, FGlobalServer inlines where needed, cleanup lock and init,
+		comment stuff.
+	Alloc reachspec and routing table in ULevel code.

+	Better def tex, don't remap.

+	Deal with 8-bit palettes as 5-6-5 palettes, with a 64K lookup table!
+	No special 8-bit color shader resource.
+	No preremapping of textures, remap on the fly with the shader.
+	->	Did it, looks kinda weird. Have the guys check it out and comment on whether
+		this is an improvement (go into 8bit and type REND EXTRA4).

+	Check all FirstActive
+	Handle just deleted actors
+	Script editor tabs=4
+	Paranoid

+	UnArray.h
+	Quick actor lists:
+		Replaced admin lists with doubly linked list for speed & simplicity.
+		SpawnActor, DestroyActor, just-deleted code.
+		Wherever we copy actor default properties.
+		No import, export PrevID, NextID.
+		After import, relist.

+	PlayerTick in UnrealEd crashes in Timstro due to iZone -1.

X	Expanded property bin support.
X		UClass needs UBuffer *StaticData.
X		New Global property bin, ULevel *GlobalData, can later be used by global code modules?
X		Need static variables, init once per class. Can be edited, but only in default props.
X		Need static const's.
X		Variable size static consts, just cram into a class-attached buffer of variable size.
X		-> Don't need statics at all.

+	Engine
+		Always set actor's iLevel=0.
+		AddParentProperties, modify actor's iMe class type.

///////////////////////////////////////////////////////////////////////////////
12-19-96

+	Replace IDD_UNWN_DIALOG with IDD_LOG
+	Renamed SoundEng.lib to UnSound.lib for consistency.
+	Remove debug .libs from source.
+	Misses default category on LevelDescriptor because the category was retracted!
+	Renamed Purge to GarbageCollect.
+	Kill all ancient QueryRes stuff
+		UnRes.cpp
+		UnClass.cpp
+		Add class
+		Res browser and class browser initial expansion
+		Script ed selection
+		LaunchScriptEd figure out if editable
+		If not god mode, allow edit script in read-only mode.
+	Kill all remaining global link query variables.
+	Killed UnTexEd
+	AudioCmdLine -> FGlobalAudio::EditorExec
+	FTopic char *Topic is unnecessary?
+	Fix UnrealEd res browser.
+	Check all resource kills.

X	Non-class code modules? -> Not needed, Java gets along without them.
X	State-local variables?
X	Resource purge after destroying cameras.

+	Split RTF_ScriptReferenceable to RTF_ScriptReadable and RTF_ScriptWritable
X	Element as Template ResPtr<>? -> Fixed TArray instead

+	Compression test: PKZIP
+		Unreal.ucx 48%
+		Unreal.unr 87%
+		Mine.utx   46%

+	Camera PreKill don't try to lock level if we're exiting/purging - how to handle this well?
+		RTF_PreKill denotes resources that have a nondefault PreKill routine.
+		GarbageCollect destroys all RTF_PreKill resources before all other resources.
+		This solves all order-of-destruction problems except for RTF_PreKill circular references.
+		The engine in its current incarnation has no RTF_PreKill circular references though.
+	Clean up exit GarbageCollect.

///////////////////////////////////////////////////////////////////////////////
12-20-97

+	Bump resfile version.
+	UTextBuffer now implements FOutputDevice.

+	int  RefCount(UResource *Res); // Count references to UResource.
+	int  AttempPurge(UResource *&Res); // Purge iff unreferenced, not counting the one reference at *Res.
+	Clean up any dangling allocs - malloc? new?
+	Logf(CONSOLE_SPAWN_1);
+	Logf(CONSOLE_SPAWN_2);

+	Export stuff using UTextBuffer rather than fixed length strings.
+	FPoly::Finalize no longer sets base.
+	All FOutputDevice methods must use Write.
+	Link topic return value should be a FOutputDevice.
+	Retest import/export
+	Retest 2D editor, complex brush builders.
+	Retest texture alignment.
+	Retest scripting.

+	ExportActor.
+	Test imports and exports.

+	strhash case insensitivity.
+	Check MAXSWORD

+	Why use private variables: No I'm not becoming a C++ freak. Variables declared
+	private are done so for one of the following reasons:
+	-	The stuff there is likely to change.
+	-	The stuff there is fragile and changing it directly rather than through the
+		class's interface is dangerous.

+	UDatabase::IsValidIndex
+	Better resource and name mapping.
+		UArray:		Maps indices to resources.
+		UEnum:		Maps indices to names.
+		ULinker:	Links and delinks resources.

+	Int resindex

+	appMessageBox,appMessageBoxf

+	Implement resource linker.
+	::QueryHeaderReferences must call parent class QueryHeaderReferences.

+	Kill RegisterType
+	ULinker::PreKill, close file (if any).
+	Eliminate UResource::Flip

+	The reason 0.84 was so slow going around corners was the anal debugging code
+	in the new caching code, which is now disabled.

+	UResource needs recordsize 0
+	Cleanup AUTOREGISTER_TYPE
+	Call GRes.Tick.

+	ULinker::Link, Delink: int DoHeader, int DoData.
+	Eliminate UResource::Register

+	Use linker class for load-linking
+	Fix new camera PreKill(?) bug.

+	ULevel::Unlock cleanup actor list.
+	Eliminated bJustDeleted.

+	Fix busted Actor->Next() logic:
+		No bJustDeleted list: Keep Deleted actors in ActiveActors.
+		Move bJustDeleted actors over at end of tick.

+	Sort surfs by zone->palette->texture for greater coherence.

+	Saver use ULinker, optionally return the ULinker.
+	UDatabase needs:
+		Empty()
+		Shrink()
+		Add(int Num=1) that performs conditional realloc.
+		AddItem
+		AddUniqueItem
+		Delete
+		DeleteItem

+	Properly encapsulate resource linker and its query routines.
+	Privatize all of the necessary UResource info.
+		Type  -> GetType()
+		Name  -> GetName()
+		Data  -> pre-existing GetData()
+		Index -> GetIndex()
+		Flags -> GetFlags()
+		Version -> GetVersion()
+	Check overhead of Element(), Ptr() -> No overhead. VC++ rules!
+	Res ArrayAdd
+	Kill UTexture::Class
+	Kill UTexture junk.
+	Increase UTexture MaxMips to 12 so D3D will have a full set.
+	UTexture -> Database
+	Deleted texture family name

///////////////////////////////////////////////////////////////////////////////

+	Mesh view is broken too.

+	While I'm about fixing the mesh viewer, may as well add editing
+	capability...
+		New mesh resouce variables
+			CurPoly (or INDEX_NONE)
+			CurVertex (or INDEX_NONE)
		Polygons mode
			Show texture associations as colors
		Mesh viewer
			Highlight on/off toggle
			Highlight current polygon
			Allow selecting polygons
			Show all vertices
			Allow selecting vertices
		Move around modes
			Rotate around
			Freeform move
		Texture view
			New texture view act as slave to mesh view.
			Show current texture
		Buttons
?			Show Selection
?			View It/Texture It
?			Browse textures
			Apply texture
			Add texture
			Remove texture
			Pan button
?		Menu
			File
				Load meshmap
				Save meshmap
				Clone new meshmap (warn of texture associations)
				Import meshmap from directory (origin X/Y/Z/P/Y/R)
			Edit
				Add animation sequence
				Edit animation sequence
				Delete animation sequence
				Origin/Scaling
		Advanced
?			Home
?			Set scale X/Y/Z
?			Add/Edit sequences (seqname, startframe, nframes, rate)

1. Basic UI hooks.
2. Resource changes and improvements.

	Sky fog start later
///////////////////////////////////////////////////////////////////////////////
12-21-96

+	UMeshMap texture array
+	Unlimited nodes
+	Unlimited surfs
+	Unlimited points and vectors
+	Unlimited verts, ubounds

+	Empty model shrink tables
+	Empty resource shrink tables
+	SlowTask reentrancy problem?

+	BspRefresh only refresh
+	Fixed undo buffer overflow bug.

X	Improve Bsp speed in huge levels. -> Difficult.
+	ULevel::Shrink (call before saving) fixup, UModel.shrink
+	BrushArray shrinkable

+	Note that resource ctor calls InitHeader upon creation.

+	New optgeom bug?
+	Fixed transaction buffer NoteSingleChange crash.
+	Fixed optgeom bug with portals

+	Polys->Num

+	Unlimited polys
+	Cleanup editor Poly refs

+	Retest goddamn asc importer
+	->Add() -> AddItem where circular

///////////////////////////////////////////////////////////////////////////////
12-22-96 & 12-23-96

+	Intersect/deintersect fail
+	Better manage TempModel

+	Fix all new unlimited poly bugs
+	Moving brush code fails

+	Test rebuild classes

+	Encapsulate FFont:
+	void Cout(UTexture *DestTexture,int X, int Y, int XSpace, UFont *Font, int Color, char C,RAINBOW_PTR Palette);
+	UFont *MakeFontFromTexture (UTexture *Texture);
+	void StrLen(int *XL, int *YL, int XSpace, int YSpace, UFont *Font, const char *Text);
+	void WrappedStrLen(int *XL, int *YL, int XSpace, int YSpace, UFont *Font, int Width, const char *Text);
+	void VARARGS Printf(UTexture *DestTexture,int X, int Y, int XSpace, UFont *Font, int Color, const char *Fmt,...);
+	void VARARGS WrappedPrintf(UTexture *DestTexture,int X, int Y, int XSpace, int YSpace, UFont *Font, int Color, int Width, int Center, const char *Fmt,...);
+	Retest font code

+	Kill UActorList::Trans
+	::InitHeader *always* call parent.

+	UResource::InitHeader set LockType=LOCK_None.
+	UDatabase::InitHeader set Num, Max

====0.84e

+	UnLevAct don't use GTrans explicitly
+	Fixed new actor undo bugs

+	UDatabase::Modify(Index)
+	Get rid of UActors::Lock
+	UResource::Modify
+	UResource::Lock, UResource::Unlock.
+	UModel::Lock, ULevel::Lock, UCamera::Lock lock the appropriate subresources.
+	Get rid of spurious SetLockType calls

====0.84f
+	UDatabase::ModifyAll
+	UActorList::ModifyAll
+	UBspSurfs::ModifySelected
+	Eliminated CPT_NoSave
+	FGlobalResourceManager saver automatically handles RTF_NoSave
+	RTF_NoSave: Camera, ULinker, UTransBuffer

+	Always fixup max

+	Fix Bsp undo bug.

====0.84g
+	Remove old NoteXX functions from UnEdTranc.cpp
+	UDatabase::PostLoadItem
+	Transaction tracking handle reallocated resources
+	Encapsulate resource transactionality?

+	UActors: PostLoadItem, PostLoadHeader
+	UClass: PostLoadHeader
+	UDatabase::PostLoadData

+	Shrink TempModel after bsp ops.
+	Shrink everything after bsp or geometry rebuild, bap er

====0.84h
X	UResource::InitData automatic
+	Eliminated UResource::InitData
+	UClass ctor
+	Check all appMallocs
+	Replaced redundent AllocData with ReallocData
+	Shorten memory pools in Unreal and UnrealEd

====0.84i
+	UTransBuffer ctor instead of init
+	Intersect and deintersect and screwed up
+	ResNames - 320K = excessive, now dynamically allocate.

+	Automatic UDatabase::QuerySize, QueryMinSize
+	No hardcoded UArray sizes.
X	Autoexpandable UActors.
+	Undo/redo isn't affecting brush array
+	Auto-transact Delete
+	Adding/removing points/vectors needs to modify?

+	UModel::PostLoadHeader
+	UBspNodes::PostLoadItem
+	UnLevel.cpp, UnModel.cpp: No need to postmodify stuff.
+	UResource::Lock error if LOCK_Trans and not GTrans; not GTrans checking elsewhere.

====0.84j
X	NoSave UBounds, just create on postload -> Shaky.

///////////////////////////////////////////////////////////////////////////////
12-24-96

+	Watch out for Actors->Max trap!

====0.84k
+	Cleanup FResourceCallback args
+	FResourceCallback -> FArchive
+	Eliminate ParentRes from resource query

====0.84l
+	Cleaned up FArchive calling.

+	RESOURCE_DB_CLASS() creates automatic SerializeData.
+	UClass::SerializeData    -> Can use FClassProperty <<
+	UEnum::SerializeData     -> Can use UEnum <<
+	UArray::SerializeData    -> Can use UResource <<
+	UPolys::SerializeData    -> Can use FPoly <<
+	UBspSurfs::SerializeData -> Can use FBspSurf <<
+	UActors::SerializeData   -> Can use IsEmptyItem()
+	Class rebuild

====0.84m
+	UMesh separate header.

///////////////////////////////////////////////////////////////////////////////
12-25-96

+	Merry Christmas.

///////////////////////////////////////////////////////////////////////////////
12-26-96

+	Cleaned up resource declarations:
+		Replaced RESOURCE_CLASS with DECLARE_CLASS
+		Replaced RESOURCE_DB_CLASS with DECLARE_DB_CLASS
+		Replaced AUTOREGISTER_RESOURCE with IMPLEMENT_CLASS
+		Replaced AUTOREGISTER_DB_RESOURCE with IMPLEMENT_DB_RESOURCE
+		Motivation for this: To make it easier to create and modify Unreal 
+			resource classes.

+	Note:
+		The two recent changes I've made to the Unreal architecture, the
+		new resource class declaration method and the serialization system,
+		are designed to make it easier to create new resource classes and
+		modify existing ones without breaking binary file compatibility.
+		Though this has not been necessary in early Unreal development, 
+		it will become increasingly important as the technology evolves.
+		This has resulted in more sweeping engine-level changes than I would
+		have liked, but the end result is worth it.

+	Separated FMeshVerts into a subresource.

====0.84n
+	Separated UMeshTris into a subresource.

====0.84m
+	Separated UMeshAnimSeqs into a subresource.

====0.84o
+	AnimFrames
+	Separated UMeshVertConnects into a subresource.

====0.84p
+	Separated UBounds into a subresource.
+	Created UWords, separated FVertLink into subresource.

====0.84q
+	Eliminate IMesh, IMeshMap.
+	Mesh lock, unlock properly.

====0.84r
+	Merge UMesh and UMeshMap.
+	Init texture array.
+	Rebuild classes.
+	Kill RES_MeshMap.
+	meshImport, meshBuildBounds -> GEditor
+	new(name,base,DUPLICATE_Unique/DUPLICATE_Replace)

+	Eliminate CopyHeaderFrom since Duplicate does the job.
+	DECLARE_DB_CLASS use DECLARE_CLASS for standard initialization.
+	All resources are now IUnknown derivative and expose an OleRefCount.

+	The engine is now set up so that it would be very easy to make all
+	Unreal resources into Component Object Model objects. However I don't
+	plan to do that unless there is a compelling reason.

+	UResource no longer tracks MaxFiles.
+	Make global resource table infinitely expandable.
+	Rebuild out of virtual memory bug -> Was CleanupNodes side link bug
+	ULinker::LoadHeader, SaveHeader
+	ULinker::LoadData, SaveData
+	Separate FUnknown into its own class.
+	Cleanup UnResTyp.h.
+	UMesh ctor for allocation.

====0.84s
+	Kill GDefaults.MaxRes, MaxFiles.
+	Res list type show detailed summary of the type's resources.

====0.84p
+	Improved memory pool logic by adding FMemMarker for marking the current 
+		position in the pool. This will make it possible to merge the GMem,
+		GDynMem, and GCache memory into one big pool without any engine changes,
+		while will both greatly reduce memory allocations and increase the
+		maximum size of each pool.

====0.84r
+	Fixed raytrace bug with moving brush tracker overflowing.
+	VC++ _alloca doesn't seem very stable, get rid of it.

///////////////////////////////////////////////////////////////////////////////
12-27-96

+	Break out resource headers so they are individually loadable.

====0.84t
+	Stick file summary at top of file.
+	Random access order loading of data.
+	Random access loading of headers.

====0.84u
+	GetActualResource -> GetActualResource, PreloadHeader, PreloadData
+	No special casing of actual resource getting.
+		Resources must not preload other resources circularly in their
+		serializers, because this makes it impossible to load a resource
+		file. Note that none of the existing Unreal resources exhibit 
+		circularity. Don't create circular preload dependencies in serializers.

====0.84v
+	Wrote all resource and data item serializers.
+	String serialization function.
+	AActor serializer.

///////////////////////////////////////////////////////////////////////////////
12-28-96

====0.84w
+	Got rid of buggy ASM mymemset, mymemeq.

====0.84x
+	Set up Unreal.cpp as a precompiled header (full rebuilds are now 5X faster!)

====0.84y
+	Now generate debug info for release build so it's easily debuggable.

====0.84z
+	Modularize linker's saver code.
+	Cleanup saver code.

====0.842a
+	Serialize names, misc records.

====0.842b
+	Note: UClass *Class must be the first variable in AActor.
+	Fixed actor serializer.

====0.842c
+	Serialize resource data on load/save.

///////////////////////////////////////////////////////////////////////////////
12-29-96

====0.842d
+	Eliminate GSave

====0.842e
+	Replaced FResFileEntry with new UResourceBase.
+	Serialize resource headers.
+	Thank God that's done with.

====0.842h
+	Eliminate GetActualResource.
+	Fixup res flags when saving.

+	Move file data offset and size into UResourceBase.
+	Eliminate that TempRes stuff.
+	Postload fixup level state
+	Eliminate ParentRes in PreLoaders

====0.842i
+	Separated ULinker into ULinkerLoad, ULinkerSave.

====0.842j
+	Cleaned up ULinkerLoad, ULinkerSave.

====0.842k
+	Merged ULinkerLoad and FArchiveLoadLink.

====0.842l
+	Merged ULinkerSave with FArchiveSaveDelink.
+	Loading and saving are now extremely clean concepts.

====0.842m
+	ULinkerLoad subclasses FArchiveFileLoad.

====0.842n
+	ULinkerSave subclasses FArchiveFileSave.
+	AddFile must have the try{} since ctor may throw.

====0.842o
+	Write and verify FileHeaderSize, FileDataSize during load.
+	Serializers must never serialize internal vars (would cause CRC problems).
+	Test byte order reversing.

+	Postloaders & remove:
+		Bsp: iDynamic
+		ULightMesh DB class

====0.842p
+	Way optimized serializer for db's with element size 1 (byte).

///////////////////////////////////////////////////////////////////////////////
Summary of the resource code changes:

Unreal resource files are no longer a binary dump of Unreal's internal
structures. The improvements are:
    - It's now easy to support backwards file format compatibility.
	- Byte order conversion for N64/Mac is now automatic.
	- Resource file loading/saving is not tied to the file system, so
	  it will be easier to move the code over to other platforms.
	- Much greater support for garbage collection is in place, a requirement
	  for UnrealScript.

///////////////////////////////////////////////////////////////////////////////
>> What is true though is that the techno frenzy of the gaming industry is 
coming to an end. We went through CGA, EGA, VGA, SVGA, 3D VGA, 3D SVGA, 
now 3D SVGA HiColor. Whats next? There is nothing, end of it, more performance, 
so what? 20 frames/sec or 30, doesn't matter really. <<

Sounds reasonable, yet that's what people were saying that back when 320x200, 
256-color VGA games were the great new thing - "who will ever need more than 
256 colors?"  It's like in the 1940's after the equation governing the motion 
of the electron had been discovered - it was widely believe that physics 
would be "over" in a few months - once the proton's equation was found.

There are more innovations coming in the future for realtime computer graphics 
than there have been in sum in the past.  Here we are in 640x480, 16-bit color 
looking forward to 800x600, 24-bit color, but there is so much cool stuff 
coming to enhance the realism of 3D in addition to higher res that our current 
technology seems almost pitiful: edge antialiasing, specular bump mapping, 
NURBS objects, fractal objects, volume rendering, radiosity rendered 
environments - we'll see all of these things in commercial use in realtime 
by the end of the century.  I can't begin to envision what's after that, 
but it's certainly not "nothing".

We are so far away from photorealism that a 100X improvement in processing 
powerful wouldn't be enough to get us there. To do the coolest special 
effects from movies in realtime would require more like a 10,000X performance 
improvement. Even with that, current state of the art algorithms fall very short 
of being able to model truly realistic experiences in many areas, like human 
interaction.

The major thing which is cool about the current development environment is that 
the leading edge and the mainstream are surprisingly near each other.  Ten 
years ago, the top of the line graphics hardware was 6+ years ahead of what 
consumers had. Now it's more like 2-3 years, and the gap is shrinking.  In 
a few years, I don't think there will be any gap.  Right now the world's 
fastest supercomputer is a tightly coupled network of 5000 PentiumPro's, 
the same computer most of us are using to develop stuff on.

The future is bright.
-Tim

///////////////////////////////////////////////////////////////////////////////
12-30-96

+	Email.

///////////////////////////////////////////////////////////////////////////////
12-31-96

====0.842q
+	Clicking stops working.
+	UnrealEd new map & camera opening bugs.
+	UnrealEd plyr ctrl icon is wacked

+	TextureSets.
+	(All)
+	Kill & purge.
+	Finish all texture stuff in UnrealEd.
+	FGlobalEditor::Cleanse

///////////////////////////////////////////////////////////////////////////////
1-1-97: Happy New Year.

+	ECreateResource    CREATE_MakeUnique
+	EImportResource    IMPORT_MakeUnique
+	EDuplicateResource DUPLICATE_MakeUnique

+	Load Classes.ucx and keep the linker around.

====0.844a
+	UnrealEd garbage collection - auto flush/gc/redraw
+	Eliminated all remaining old GUARD code.
+	Properly purge classes and textures without killing undo.

====0.844b
+	FArchive serialization flags and version padding.
+		int Ver        The version of the parent resource we're serializing, =current version unless loading.
+		int FileVer    The version of the resource file, =current version unless loading.
+		int IsLoading  Whether we're loading.
+		int IsSaving   Whether we're saving.
+		int ForEdit    Loading/saving for editing.
+		int ForClient  Loading for client playing.
+		int ForServer  Loading for server playing.

+	ULinker set FArchive version from file.
+	Fixed Make a macro file with a CLASS LOAD FILE= pointing to a path that is invalid

+	Load cache flushing problem.
+	Delete-texture-set button.
+	Rebuilder stats are wacked.
+	Test UTexture::Export.
	
X	Experiment with random variation in SincData -> Can I use this for
X	zero cpu time microtexturing? -> No silly rabbit you're just 
X	distorting the bilinear alpha values.

+	UnrealEd Garbage collection safe
+		Texture family = UTexture array.
+		Enable purge at proper times (after load, etc).

====0.844c
+	Replaced PARANOID with CHECK_ALL
+	RTF_Swappable
+	In debug ver, fail Element() and GetData() calls for swappable 
+		non-locked resources!
+	Test rebuild.

///////////////////////////////////////////////////////////////////////////////
1-2-97

+	Critical error flushing problem.
+	CRC archiver archives ucase res/names as ucase text.
+	Doesn't autosave light in levels for intrinsic classes
+	Ed: No poly set item names

///////////////////////////////////////////////////////////////////////////////
1-3-97

====0.844d
+	snap, grid & rotgrid broken?
+	dupe actors is screwed up.
+	Major UnMath.cpp, UnMath.h cleanup.

====0.844e
+	Got rid of obsolete FFloatRotation
+	Found that bounding box rejection problem.

	Memory pool strategy: I'm modifying the FMemPool code so that it will
	allocate large chunks of memory from GCache and then divy up the chunks
	for small allocations.  This will enable all of the temporary
	memory allocations to come out of a single buffer, greatly reducing
	overall memory usage.

====0.844f
+	New color model in 256-colors is much more precise!
+	PostLoad UMesh check that all sizes are correct.
+	Killed RF_NoReplace, RK_64KAligned
+	Killed all aligned malloc functions.
+	Make all of the allocation tracking optional via CHECK_ALLOCS
+	Simplified mesh rendering code.
+	New typesafe pool memory allocation: new(GMem,align).
+	Renamed FMemPool to FMemStack because, surprise! It acts like a stack
+		rather than a pool.

	Note: Much of my recent work has been oriented towards making Unreal
	far more scalable to low-memory systems, and portable to other architectures
	like Mac and N64.  Though this has required some significant architectural
	changes to the engine, the result is a much more robust, scalable engine.

====0.844g
+	Removed old pool calls from rendering code.

====0.844h
+	Removed all remaining old pool calls.

====0.84i
+	New spqr & timstro poly dropouts? -> Assume no aliasing across functions bug.
+	Kill GMem.Get(0)'s.

///////////////////////////////////////////////////////////////////////////////
1-4-97

====0.844j
+	Memory pools.
+		FMemoryCache now takes a MaxCreateSize parm.
+		Tick memory pools for overflow checking - no gettop stuff.

====0.844k
+	Merge mem pools and GCache
+	Tick verify steadystate.
+	That reduced in-game memory usage by 40%!

====0.844l
+	Eliminate FVF_Cached
+	Why is GMem usage so high in game? -> Huge FTransform cache. Eliminated it.
+	Use two new memory stacks for transformed points/vectors.

====0.844m
+	Stamped array for FVector/FPoint transform cache.
+	New lightmesh bit compression is great! Sky8 only takes up 200K!

///////////////////////////////////////////////////////////////////////////////
1-5-97

====0.844n
+	Resource manager
+		RF_ForClient, RF_ForServer, RF_ForEdit - presave set these.
+			Brush array: NotForClient,NotForServer
+			Individual brushes: NotForClient,NotForServer
+			Individual brush polys: NotForClient,NotForServer
+			ScriptText: NotForClient,NotForServer

====0.844o
+	Expanded resource load-context flags so that context flag
+		filtering is exact and names are properly filtered too.
+		This is now very versatile.

+	Eliminated LevelLockType.
+	FUnrealEngine no longer creates the level.

====0.844p
+	Get rid of MF_PostScale
+	New struct IMip.
+	Replaced FreeData with UnloadData.
X	Properly RF_Modified tag everything, CRC verifier on tick. -> Later on.
X	Resource caching via GCache! -> Later on.
X	Merge PreKill, Kill into overridable Kill. -> Need PreKill as is.
X	Resize actors in editor somehow? -> Shaky due to camera double links.
X	Set Res->Linker when load, NULL when RF_Modify, reload, new. -> Later on.
X	PostRealloc for realloc and trans? -> Maybe, later on.
X	Swap the 256-color buffers (remap etc). -> Maybe, later on.

+	Sound system is temporarily hosed (reports CSound errors?)

+	Open new level via Windows UI.
+	Fix any loading/saving memory leaks.

///////////////////////////////////////////////////////////////////////////////
1-6-97

====0.844q
Gary @ 3dfx: Suggests using a 16x16x1 palette for multiple colored,
intermixed non-local lightsource bump mapping. Interestingly enough, I was 
experimenting with this technique in 1993 after finishing up Jill of the
Jungle, for applying 2D lighting effects to tile maps, but abandoned it for
lack of a practical use in a 2D game.

Problems to work around:
	- Bump map lighting wouldn't be properly attenuated by shadow maps.
	  Solution: Clip all bump palettes to the overall shadow attenudation.
    - Specular lighting won't be apparent, because the bump map palette
	  isn't shifted as a function of space.

New tricks discovered: 

You can combine two unlit 16-color palettized textures 
into one resultant texture and freely constant alpha blend between the two
just by modifying the palette.

By building a palette lookup table and using the lighting interpolator as 
an alpha blend interpolator, you can freely variable alpha blend between
the two.

Initial bump map research conclusions: 

1. It looks quite cool, though the effect is only convincing when textures 
are minified - the pixelization destroys the effect under magnification, 
even with dithering. I don't think that bilinear filtering of mipmaps would 
help much either, it would just blur everything. Conclusion: Until hardware 
is such that we can get away with extremely high res textures, bump mapping 
is mainly useful for microtexture detail.

2. Discretizing bumpmaps down to a fixed 16x16 normal palette results in
major, visible discretization problems (large areas of constant gradient).
Bilinear filtering won't help with this.  This especially highlights the
method's lack of directional variance.  Conclision: Use standard palette
quantization techniques to quantize a custom bump map normal palette for
each microtexture.

A result that's immediately usable:

* Very limited-case 1D-normal bump mapping: For walking along a platform
  above a fiery pit. There is flickering orange light below

+	Wrote adaprive binary quantization template and bump map
+		normal quantizer. Works like a charm, can be extended
+		to palettes very easily.

+	Changed the dither code and added a super-cool enhancement. Unreal
+		software-rendered textures in 16-bit color look 100% as smooth
+		as Rendition bilinear-filtered textures in 16-bit color!

+	The Unreal engine now supports intermixed, multicolored specular
+		highlight bumpmapping using non-local lightsources! This
+		looks totally cool!

///////////////////////////////////////////////////////////////////////////////
1-7-97

====0.844r
+	Bump mapping research continues.
+	Bump mapping looks *awesome* for:
+		Cracks.pcx: Highlighting cracks in a wall.
+		Curtains.pcx: Wavy curtains. Bump texture could be animated.
+		Carvings.pcx, crucfxn1.pcx: Highlighting carved hyroglyphics or sculptures on the wall.
+		SandFlor.pcx: Sandy or muddy ground.
+		LimeSton.pcx: Water damaged limestone walls with drip patterns.
+		FloorTil.pcx: Highlighting floor tiles.
+		Lava.pcx: Cracked hardened lava.
+		Solder.pcx, Unknown.pcx: Whatever the hell it is, it sure looks cool!
+	Cool bump mapping situations:
+		Lava on the ground below illuminates walls of a chasm.

+	Bump mapping generalization.
+		Don't bother building full palette table if unlit?

+	Texture Bump Source=tim2 dest=Tim Set=BumpMaps

====0.844s
+	Added new "Detail high/medium/low" command, helps performance a bit.
+	Eliminate GBlit.Mips
+	New texture mipmapping system.

====0.844t
+	New texture locking code.
+	PostLockTexture, PreUnlockTexture
+	PostLoadTexture, PreKillTexture

+	After import or create new texture, must postload it.
+	Bumpmap texture sets.
+	UnrealEd bump map import ui.
X	Store mips in smallest to largest order for easier low-res dropping. -> Already doing it!

+	I have discovered a new law of physics: Conservation of stuff left to program. :)

///////////////////////////////////////////////////////////////////////////////
Work to do later:

	Load/save:
		Open saved game via Windows UI.
		Save game via Windows UI.
		Don't use FName's for players and cameras.

	Resource manager:
		Multiple resource lock/unlock stack via GCache ICacheItem, IResource?
		Hold classes via a list (from Root.ucx and any other explicitly loaded files),
			and let non-explicitly-loaded classes get gc'd.
		Don't do that Kill() thing all over the place!
		Be very suspicious of calls to Kill.
		Delete texture, class: Remove it from holding table and collect 
			garbage; if it still exists then it's in use (cool!)
		Still need to torture test UnrealEd intersect/add/trans, there is at
			least one transaction tracking system bug left.

///////////////////////////////////////////////////////////////////////////////
1-8-97
+	Email, etc.

///////////////////////////////////////////////////////////////////////////////
Todo:
	Get a pager.
	Get an 8meg video card.
	Get a 3dfx.
	Figure out when Gary McT is coming to Epic.
	Talk to Steven Polge.
///////////////////////////////////////////////////////////////////////////////
N64 Porting Note:

DMA has opted to rewrite the engine from the ground up for N64, with the
exception of the AI code and script interpretter.  While this is going to be
a lot of work, it's unfortunately necessary given the N64's relative 
limitations compared to the PC: Only 1 meg available for code, and a direct 
mapped cache which places a premium on careful code layout. Unreal code currently
compiles to 4 megs on the PC, and would probably be 4 megs on a RISC chip even
if all of the nonvital code were stripped out.  This situation highlights
the disadvantage of an architecture like Unreal which highly integrates
an editor and extended platform-specific functionality with a game engine.
But, the coolness on the PC platform helps compensate for that.

///////////////////////////////////////////////////////////////////////////////
1-9-97

====0.845a
+	Getting medieval on UnrealScript.
+	Rewrote class property system to support multiple bins.
+	Guard the script compiler.
+	Rebuild the classes with the new script compiler.

///////////////////////////////////////////////////////////////////////////////
1-10-97

====0.845b
+	UnrealScript
+		Class property list now grows on demand.

+	Stack trees
+		Implement UStackTree resource.
+		Scripts don't reference a class.
+		Shrink script related resources after compile.
+		Eliminated hardcoded maxima.

====0.0845c

+	Classes
+		GetLastProperty(Bin) properly support multiple bins.
+		Repair FClassProperty::IsPerActor
+		FindParams cleaned up.
+		Modernized FindStackNode.

+	Met with Gary@3dfx.
+	Worked on 3dfx support code.

///////////////////////////////////////////////////////////////////////////////
1-11-96

	Things which Unreal software rendering can do that Quake can't:
	1.	Software bilinear filtering.
	2.	Software trilinear filtering.
	3.	Bump mapping.
	4.	Translucent and transparent polygons.
	5.	Dithered lighting.
	6.	Hicolor and truecolor for greater texture variety.
	7.	Ambient lighting.
	8.	Colored lighting.
	9.	Volumetric lighting and volumetric fog.

	Things which Unreal software rendering can do that Rendition can't:
	1.	Software trilinear filtering.
	2.	Texture size limited only my RAM.

	Things which Unreal software rendering can do that 3dfx can't:
	1.	Truecolor rendering.
	2.	Trilinear filtering.

	Where Unreal is behind.
	1.	Quake: Speed.
	2.	Rendition: Edge antialiasing.
	3.	3dfx: Speed.

====0.845d
+	Scripting.
+		Fix copying parent stack nodes.
+		Fix code top.
+		I now serialize most enums as bytes to save space.
+		UScript scrap Emit* and use operator<< instead.

====0.845e
+	Decisions:
+		Do support state-local variables.
+			State-local variables are inhereted.
+			Requires initializing/serializing multiple class property spans on state switches.
+			Requires searching multiple class property spans for vars during compile.
+		Labels are fully inhereted and overridable.

+	Class property bins.
+		Created new UProperties resource.
+		Use UClass::SerializeBin for serializing actor properties.

====0.845f
+	Class property bins.
+		Replace DefaultActor with a bin.
+		UClass::AddProperty expand the UProperties.
+		AddParentProperties expand the UProperties.
+		Compiler verify that peractor size < sizeof(AActorBase + extra)
+		UClass::Shrink.
+		Eliminated AActorBase::Init.
+		Allow overriding UDatabase StandardSerializeData.
+		UScript is now derived from UBuffer.
+		Fixed script CRC bug.
+		UProperties is now derived from UBuffer.
+		UClass::AllocBins

====0.845g
+	Statics.
+		PerActor -> Bins[PROPBIN_MAX].
+		Always assure non-NULL class PerActor, PerClass, PerFunction.
+		UnrealScript terminology: PerActor, PerClass, PerFunction, PerWorld.

====0.845h
+		AddParentProperties must duplicate PerClass bin.
+		SetBinPointers work, check all uses to verify proper loading.
X		UnrealScript explicit overrides using the above terminology -> Dim, Static only.
+		UClass::GetBins.
+		ExportActor, ExportMultipleActors heed WhichBins.
+		Actor properties & default actor properties: Statics.
+		Import T3D: Statics.
+		Export T3D: Statics.
+		Load UCX: Statics.
+		Save UCX: Statics.
+		Export H: Statics.
+		Recompile class: Keep statics.

+	CPF_Private
+	Don't export privates: NextID,PrevID.

///////////////////////////////////////////////////////////////////////////////
1-12-97

+	Tried Gouraud-shaded polygon terrain - ok speed, looks *great*, easy
	to integrate with the rest of the engine. A cinch to use with hardware
	acceleration.
+	Tried raycasted Comanche-style terrain - slow, looks gross. Very hard
	to integrate with the rest of the engine. Difficult for hardware
	acceleration.
+	Tried bilinear-interpolated Comanche-style terrain - slower, looks ok.
+	Tried raycaster with a vertical span texture mapper. Looks just like poly
	terrain, only slower and not 6D0F.

Terrain conclusions:
*	An all-polygon terrain is the way to go.
*	Need to investigate C1-continuous adaptive subdivision for level of 
	detail control - can get more detail on average without bogging down.
*	Think about how to integrate terrain system with active edge code without
	increasing sorting overhead since terrain sorting order is preknown.
*	Can't do depth cutoff, because the backdrop exposes the cheat. Must
	adaptively subdivide.

Terrain thoughts:
*	Need to do adaptive polygon subdivision with fractal subheightmap detail.
*	Polygon budget based subdivision routine with error threshold.
*	Scanline-oriented approach, not polygon coherent approach.

Raycast mip descention with chunk postrenderer for pitch/roll correction?
*	Upclose: Gouraud shaded microtexture.
*	Medium:  Oversampled macrotexture.
*	Far:     Mipmapped macrotextures.

Terrain things needed:
*	Terrain resource type in level.
*	Bsp terrain cutter. NF_Terrabound, terrain CSG operation.
*	Terrain exporter (.pcx heightmap, .pcx tmap, text association list).
*	Stick textures on the terrain in UnrealEd.
*	Raytrace terrain WRT terrain and world using satellite settings, just
	like a normal lightmesh.
*	Terrain utilize normal lightmeshes.
*	Up to 3 layers of terrain (one = water), water anim.

//oversample!!
+	Temporal oversampling:
+		Texture coordinate for better bilinear approximation.
+		Shading.
X		Stochaistic anisotropic filtering? -> Not possible.
+		Do 4-way.
+		Horizontal edge[4]?
X		Vertical edge[4]? -> Ugly!
X		Far surface space delta based temporal oversampling. -> Ugly!
+		Trilinear interpolation.

///////////////////////////////////////////////////////////////////////////////
1-13-97

====0.845i
+	FClassProperty::Compare.
X	ImportActor, ExportActor, ImportMultipleActors: int Statics.
X	DefaultProperties transactionally save statics, too -> DefaultProperties
X		cannot be transactional.
+	UResource::Lock multilock support.
+	UResource::Unlock.
+	Resource browser locking problem.
+	Lock return success int.
+	Unlock no return value.
?	UResource::Unlock - does it need to modifyheader??

+	GRes.Tick check locks.
+	Render: Temporal needs to be an option.
+	LOCK_CanFail ::Lock, ::Unlock handle it. UCamera::Lock.
X	Private NoteResHeader?

+	Torture test transaction system.
+	Fixed transaction overflow bug.

+	Realloc, Kill, UnloadData fail if locked.

X	Intersect transacts a gigantic number of polys - is it saving each item
X		that's added? That is not necessary. -> Saving header on each ::Add call.

+	Test level: 4 copies of Sky8 intersected:
+		17 meg filesize.
+		53K nodes.
+		66K points.
+		19K sides.
+		1682 surfaces(???)
+		29K brush polys.
+		Rebuild worked flawlessly (slow as hell, as would be expected).

///////////////////////////////////////////////////////////////////////////////
Schedule thing

tues gt
Feb 10th-11th ms tech ovrebiew.
Feb 11-13th hw testing thing at MSoft.

///////////////////////////////////////////////////////////////////////////////
1-14-97

+	Input system
+		UnBuild.h bindings fname.
+		UCamera Input member.
+		UCamera::ExecMacro.
+		UCamera::Exec <macrofilename> command.
+		Exec to globalinput on camera contexts.
+		Bind command work.
+		Free bindings on exit
X		Save bindings -> Later.
+		Don't crash on keys out of bounds.

+	Command chaining via '|'.

	Input system notes:

	Why I rewrote the input system:
	*	System was overly abstract, to the extent that I couldn't figure out
		how to extract keys and mouse movements from the system.
	*	System was overly configurable, resulting in a set of configuration
		menus that was much harder to figure out and use than Quake or Duke Nukum.
	*	Too much code tied into too many different places in the engine.
	*	Timed input combo system idea wasn't applicable in general to Unreal.

	The new input subsystem resides in FInput. One instance of FInput exists for each
	UCamera resource (UCameras correspond to game windows on the screen). That instance
	of FInput is notified of input from the platform-specific code, and the game code
	grabs the input out as it's needed.  The current relationship is:

	How input gets into the input system: The platform-specific code captures
	keypresses, mouse movement, joystick movement, and any other motion and sends
	it to the input subsystem solely via SetInputState() and Exec().
		When a key/button is initially pressed:
			The input subsystem's InputState enum is set to IST_Press and the command 
			line is executed on the specified camera. The input system intercepts the 
			following commands; any other commands are executed according to their
			existing Exec handler.
				Button: Sets the specified button value to on.
				Toggle: Toggles the specified button value.
		When a key/button is held:
			The InputState enum is set to IST_Hold and the command line is selectively
			executed once per tick; only the following commands are interpretted:
				Axis: Applies the specified axis movement.
		When a key/button is released:
			The InputState enum is set to IST_Release and the command line is selectively
			executed; only the following commands are interpretted:
				Button: Sets the specified button value to off.
		When the mouse or joystick is moved:
			The InputState enum is set to IST_Axis and the command line is selectively
			executed; only the following commands are interpretted:
				Axis: Applies the specified axis movement.
		At all other times, the Action enum is set to IST_None.

	How input gets out of the input system: The engine's ULevel::Tick function calls the 
		game code's input reading routine, which calls the input system's ReadInput, which
		fills in the specified list of buttons and axis movements.  At this point,
		the game code postprocesses the input.  This is where raw axis movements
		are turned into meaningful axis movements, for example translating mouse movements
		into turning or strafing depending on the state of the strafe button.

	Design notes:
		*	The goal of this redesign is to simplify the input system.
		*	This design does not support fighting-game style movement combos like
			Up-Up-Punch at the input system level. That kind of thing is very
			game-specific (and not needed for Unreal) so it can best be
			supported at either the FGame level, or at the UnrealScript level.

///////////////////////////////////////////////////////////////////////////////
1-15-97

+	Decisions to make:
+		How to optionally short-circuit rotation? -> Selective flagged ReadInput.
+		How to optionally short-circuit movement? -> Selective flagged ReadInput.
+		How to OR multiple button feeds -> Button hold count.
+		XOR multiple toggle feeds -> Button hold count & 1.
+		How to selectively pass input to game console before input system? -> Game
+			console prefilters the input.

====0.845j
+	Decisions:
+		How to handle one shots vs held buttons -> OneShot command.
+		How to accumulate axis movements -> button holds plus mouse/joystick movements.
+		How to distinguish between absolute mouse movements and time-variant joystick movements? ->
+			Direction command vs. Axis command.
+		How/whether to handle button macros with built-in delays? -> "|>" separator and
+			non-interruptable tick-based execution queue.
+		Whether to allow quake-style bind-simple-command-to-string? -> yes, via expandable bindings list.
+		How to reset the input system? -> ResetInput.

///////////////////////////////////////////////////////////////////////////////
1-16-97

+	Input system implementation:
+		Replace UCamera::Key with new input system equivalant.
+		Enter.
+		Cleaned up LOG_ enums.
+		Replaced K_ enums with better IK_ enums.
+		Updated PPlayerTick.
+		Keypresses/releases properly call FInput.

///////////////////////////////////////////////////////////////////////////////
1-17-97

====0.845k
+	Input system
+		Cleanse old input code.

///////////////////////////////////////////////////////////////////////////////
1-18-97

+	The pixel is alive and well.

+	ULevel now implements FOutputDevice, for sending text to all players in
+		the level!

+	UCamera now implements FOutputDevice.
+	UCamera ReadInput, FGame PostReadInput.

+	KeyDown, KeyPressed now go into FInput.

+	Input system.
+		UnCon.cpp: ConsoleFull, ConsoleHalf, Type, Chat.
+		Fix history.
+		Type no echo 't', don't get interrupted by 't' - only exec bindings when CK_None.
+		Shift~ fullconsole
+		No input processing when when CK_Type.
+		Simple buttons.
+		Simple toggles.
+		Simple oneshots.
+		Bind.mac reset bindings.

+	Game console bindings?
+		F11: Brightness.
+		Esc -> "Cancel" command, end fullscreen and up the console.
+		Tilde: Console up.
+		Alt-Enter: Toggle fullscreen.
+		ViewUp, ViewDown.

///////////////////////////////////////////////////////////////////////////////
1-19-97

	Short-circuit input reading:

	The new input system is set up so that one can read certain categories
	of input (rotation, movement, and buttons) without affecting the state
	of the other inputs. This enables certain inputs to be processed ahead
	of others, to reduce latency. For example, I update the player's rotation
	immediately before rendering, while player movement only occurs during
	level updates.  This special handling is necessary because there are three 
	very different kinds of input in the engine:

	* Key/button presses, which come in asynchronously. When mapped to axis
	  motions, the magnitudes time variant.
	* Mouse movements, which come in either asynchronously or synchronously
	  depending on DirectMouse usage, whose magnitudes are time invariant.
	* Joystick movements, which come in synchronously, whose magnitudes are
	  time variant.

	At the same time, inputs can be adjusted nonlinearly (via a Gamma correction
	exponent). However, it is the input *velocity* that is adjusted nonlinear,
	rather than input magnitude, because magnitude is sometimes time variant.

///////////////////////////////////////////////////////////////////////////////
1-20-97

====0.845l
+	Input system
+		Elimintated KnownButtons hack.
+		Support Direction command as well as Axis.
+		Eliminate KeyPressedTable
+		Fixed that dag blasted ongoing focus bug!
+		Fix UnrealEd key forwarding.

///////////////////////////////////////////////////////////////////////////////
Physics notes

	Here is a list of the Unreal physics modes, and the special
	messages that the physics system generates in each mode. We don't
	list messages which are generated by the physics system
	in all modes.

	PHYS_None: No automatic physics.
		- Physics system doesn't perform any movement.
		- Moving brushes move through the actor freely.
		- Scripts may perform any kind of movement manually.

	PHYS_Walking: Walking around on the ground.
		- Collision logic if bCollideWorld, bCollideActors.
		- Moving brush logic with actual base velocity for consistent jumping.
		- Falling detection.
		- Stairclimbing logic.
		- Gravity logic.
		- Actors properly move with moving brushes they are standing on.
		* If actor hits wall, sends ACTOR_HitWall.
		* If actor walks off ledge:
		*	If bAvoidLedges and actor can avoid ledge, sends ACTOR_HitLedge and doesn't fall.
		*	Otherwise, sends ACTOR_Fall and sets PHYS_Falling.
		* Sends ACTOR_StandMover when actor stands on moving brush (moving brush gets ACTOR_SteppedOn).
		* Sends ACTOR_UnStandMover when actor stands on moving brush (moving brush getd ACTOR_UnSteppedOn).

	PHYS_Falling: Jumping up or falling down.
		- Collision logic.
		- Gravity logic.
		- Landing detection.
		* If actor lands:
		*    If bBounces and actor is moving fast, sends ACTOR_Bounce and bounces up.
		*    Otherwise, sends ACTOR_Land and sets PHYS_Walking.

	PHYS_Swimming: Swimming through water.
		- Collision logic.
		- Buoyancy logic.
		- OnSurface logic.
		- ACTOR_Falling if actor starts to fall.
		* If actor starts walking, sends ACTOR_Walk and sets PHYS_Walking.
		* If actor starts falling, sends ACTOR_Fall and sets PHYS_Falling.

	PHYS_Flying
		- Collision logic.
		- Banked movement etc.

	PHYS_Interpolating
		- Smooth alpha-motion between two locations and rotations.
		- Handles collision.
		* When arrives at destination, sends ACTOR_Arrived.

	Flags that affect physics:

	bAvoidLedges - actor refuses to walk off ledges.
	bBounces     - actor bounces when it hits the ground going fast.
	bPitches     - lets actor pitch in response to physics.
	bYaws        - lets actor yaw in response to physics.
	bRolls       - lets actor roll in response to physics.
	bMomentum    - enables momentum transfer during collisions, explosions.

///////////////////////////////////////////////////////////////////////////////
1-21-97

+	UnrealEd
+		Fixed focus bug.
+		DeleteTrackedAllocation problem!
+		Window/NewCamera/Close crashes hard
+		Actor props window opens up in zimbabwe

+	It'd be awfully nice if, when I go into MAP EDIT MODE, any brushes that I
+	have selected the previous time would be deselected so I don't inadvertently
+	move or manipulate innocent brushes.
+	The reason I took this feature OUT was because so many people were
+	complaining about going into map edit mode losing their selection, 
+	just hit the damn deselect button if you don't want your frigging
+	brushes selected!

+	Input system.
+		Mouse produce axis movements.
+		Proper PostReadInput.
+		Doubled number of angles to improve precision.
+		Redouble angle table, cut size in 1/16th.

+	Full edge antialiasing: WORKS!

///////////////////////////////////////////////////////////////////////////////
1-22-97 & 1-23-97

+	Edge aa optimizations:
+		Fix the occasional overflow problems.
X		Is 2-way cross convolving necessary? -> Fortunately, no.
+		8/16/32-bit color edge aa.

====0.845m
+	Research:
+		Added FPoly::SplitWithNode.
+		Check # portals vs # nodes in Sky8.
+			4206 surfs, 5682 portals, 9357 nodes - yeesh!
+		Portal building code.
+		Conclusion: Explicit portal rendering would add an awful lot of
+			polygons to process in realtime. Better to just go the Quake 
+			route and precompute the visibilty.
+		Computing leaf-to-leaf visibility is also useful for: Creature
+			visibility reject, dynamic light possible extent, rendering
+			early rejection, network visibility.

///////////////////////////////////////////////////////////////////////////////
1-24-97

	Interesting but useless trick:
		You can design a square n*n array so that elements can be addressed without
		actually knowning the dimension n by using a binomal trick:
		template<class T> class BinomialArray
		{
			T* Data;
			T& operator()( int i, int j )
				{return i<=j ? Data[2*i+j*(j+1)] : Data[2*j+i*(i+1)+1];}
			void Alloc( int n )
				{Data = new T[n*(n+1)];}
		}

	Fourier subdivision texture mapping, based on the thought that
	only a few components need to be computed at the pixel level, and
	the others can be computed per several pixels. YUV space, Y high res,
	UV low res.

	Feasibility of rendering 3d fractals into framebuffer using fif fine
	structure transform? A bit like shade bobs.

///////////////////////////////////////////////////////////////////////////////
1-25-97

	Visibility precomputation preliminaries.

	Problem 1: Plane view convolution. Given a convex m-sided source polygon 
		and a convex n-sided clipping polygon, describe the exact planar-bounded 
		volume on the far side of the clipping polygon in which the source polygon 
		is visible through the clipping polygon.

	Solution 1: The volume is the volume on the far half-space of the clipping
		polygon which is in the union formed by all of the following volumes:
		1.	For each of the m source points, the intersection of the n
			half-spaces bounded by a plane passing through the source point
			and each of the n sides of the clipping polygon.
			Problem 2: What is the sign convention?
		2.	For each of the m source sides, the intersection of the n
			half-spaces bounded by a plane passing through the source side
			and each of the n points of the clipping polygon.
			Problem 3: What is the sign convention?
		Assertion: The above volume is convex.
		Problem 4: How do we eliminate redundent information and describe the
			volume by its minimum convex hull?
		Problem 5: How to implement the above as a numerically stable algorithm?

	Solution 2: It's consistently one or the other, figure out manually.
	Solution 3: It's consistently one or the other, figure out manually.
	Solution 4: This is the maximal sheet wrapping solution below.
	Solution 5: Can't avoid numerical precision errors, so consider always slightly
	    underclipping portals, so that the stored visibility is always a slight
		overestimate, rather than a random overestimate/underestimate.

	Definition: Sheet wrapping volume.  Define a sheet wrapping volume as
		the intersection of all half-planes created by moving a sheet around the source
		polygon and the clipping polygon such that the sheet always touches one
		side of the source or clipping polygon, and one vertex of the other polygon,
		without penetrating either polygon. Define a maximal sheet wrapping as that 
		formed by a sheet in partitioning the source and clipping polygon, and a minimal 
		sheet wrapping as that formed by a sheet not partitioning the source and 
		clipping polygon. The volume enclosed by a maximal sheet wrapping and behind 
		the clipping polygon is the complete volume in which the source polygon is 
		all or partially visible, and the volume enclosed by a minimal sheet wrapping 
		and behind the clipping polygon is the complete volume in which the source 
		polygon is fully visibile. The difference between the minimal and maximal 
		volumes is the visibility penumbra volume of the source polygon.

	Three-polygon visibility associativity: Given three polygons A, B, and C, and
		maximal sheet wrapping volumes AB and BC, C intersects with AB <-> A 
		intersects with BC.

+	Visibility check (source leaf L, source portal S, clipping leaf M, clipping portal C):
+	Let SEES(L,M)=True.
+	For each noncoplanar outward-facing portal C' in leaf M except C:
+		If C' and S face in the same direction:
+			Let S' = S clipped to maximal sheet wrapping CC'
+			If S' is nonempty:
+				Let M' = leaf on opposite side of portal C'
+				Assert: M'<>M, M'<>L
+				Visibility check( L, S', M', C')
+			EndIf
+		EndIf
+	Next
+	Return

+	Portal visibility floodfill:
+	For each leaf L:
+		Let Sees(L,L) = True (each leaf sees itself)
+		For each outward-pointing portal S in L:
+			Let B = leaf on opposite side of S:
+			Assert: B<>L
+			Let SEES(L,B) = True (all neighbors see each other)
+			For each noncoplanar outward-pointing portal C in leaf B except S:
+				If C and L face in the same direction:
+					Let M = leaf on opposite side of portal T
+					Assert: M<>L, M<>B
+					Visibility check(L, S, M, C)
+				EndIf
+			Next
+		Next
+	Next
+	Return

+	Portal IsTesting flag to avoid portal recursion.

+	Count # leaves whose visibility status is identical to another leaf:
+		There are very few (0.1~) redundent leaves.
+	NormalOf.

+	50%-60% of the clip tests clip to nil.

?	Is it worth implementing a fast trivial clip accept?
+		Yes, if a partitioning plane between A and B|C can be found quickly!

///////////////////////////////////////////////////////////////////////////////
1-26-97

+	Edge rendering experimentation.
+	Moved edge code to UnVisi.cpp

+	Modified ambient lighting to add more of an overcast, well, "ambient" effect
+		that brightens dark areas better. The new effect is far less dependent on
+		texture color.

+	Created StatusInfo, UnrealStatusInfo.

+	CPF_Client, CPF_ClientSelf.

	Leaf visibility rules:
	0.	Init: By default, a leaf sees no other leaves.
	1.	Self: Leaf A always sees itself.
	2.  Connectivity: Leaf A sees leaf B if there exist a portal connecting A and B.
	3.	Transitivity: A sees B implies B sees A.
	4.	Portals: If a portal P of A sees a portal Q of B, then A sees B.

	Notes on this algorithm:
	1.	This is going to do a gigantic amount of in areas that aren't tightly occluded.
	2.	Investigate: is this how Quake does its visibility precomputation?3
	3.	This is worst case O(2^n) in unoccluded areas, typical O(n) in highly occluded areas.

	Other visibility thoughts:
	1.	To reduce size of visibility list, can merge physical leaves into
	    their parent nodes, based on minimizing the # of potentially visibile 
		edges. It looks like typical levels will have many leaves which can be
		merged up the tree without any increase in visible edges.
	2.	In a connected world, Portals >= Leaves always.
	3.	Any leaf that has no portals is disjoint.
	4.	A level may have multiple disjoint volumes.
	5.	I could exclude semisolid brushes when computing visibility, to save time.
		Small, complex Bsp'd objects like Eric's Sky8 chairs add little value to the
		visibility computations.

///////////////////////////////////////////////////////////////////////////////
1-27-97

Note: 30-40% of edges are interleaf in occluded maps, 60% in unoccluded.

====0.845o
+	Actually use ZoneFog in fog zones.
+	Implemented leaf edge filtering.
+	Added UModel::PointLeaf.

+	To do:
+		Filter Bsp surfaces down front (+back if two-sided) for edge refs.
+		Figure out and display which leaf # the player is in.

+	There are some purely overestimated edge refs.
+	Plus some purely underestimated edge refs. Coplanar related bug?
+		This was a bug in the debugging code! Note to self: Don't let bugs creep
+		into the debugging code you fool!

+	TestG.unr: Problem with perpendicular surfaces, still rejecting them?
+		This was a dumb error in IsCoplanar.

+	Starship still has major underestimates -> Fixed them all!
+	Rebuilding with minimum cuts is a big speedup.

///////////////////////////////////////////////////////////////////////////////
1-28-97

+	balzar without multiclip:  375.418173 seconds
+	balzar with multiclip: 232.412631 seconds
+	balzar with proper signing: 180.302004 seconds
+	balzar after precision adjustment: 292.0 seconds

+	Tons of visibility experiments.

+ Info: Visibility: 257 portals, 93 leaves, 717 nodes
+ Info: Visibility: 42 avg vis, 67 max vis, 0K (11.141615% ratio)
+ Info: Visibility: 21,289,516 clip tests (82% passed, 58% unclipped), 226,484 per leaf
+ Info: Visibility: 1657 edges, 2665 leaf edges

///////////////////////////////////////////////////////////////////////////////
1-29-97

	Sky8:
		Full visibility:
			Info: Visibility: 5292 portals, 2239 leaves, 9144 nodes
			Info: Visibility: 122 avg vis, 369 max vis, 50K (2.077139% ratio)
			Info: Visibility: 131051356 clip tests (9% passed, 9% unclipped), 58505 per leaf
			Info: Visibility: 14673.844189 seconds <- !!!!!!
		Zone visibility:
			Info: Testing visibility
			Info: Visibility: 5292 portals (144 sources), 2239 leaves (22 logical), 9144 nodes
			Info: Visibility: 272 avg vis, 550 max vis, 51K (2.121921% ratio)
			Info: Visibility: 1005455 clip tests (68% passed, 68% unclipped), 43715 per leaf
			Info: Visibility: 75.312272 seconds

+	Now have logical + physical leaves to enable leaf merging.
+	After done, merge logical visibility into physical visibility.

///////////////////////////////////////////////////////////////////////////////
1-30-97

====0.845p
+	Figured out a totally cool winged edge / multiply linked list data structure.
+	Rewrote visibility code using new structures.
+	Generalized ClipToMaximalSheetWrapping.

	Balzar before bsp visibility:
		 Info: Visibility: 495 portals (990 sources), 196 leaves (196 logical), 798 nodes
		 Info: Visibility: 92 avg vis, 151 max vis, 2K (12.654097% ratio)
		 Info: Visibility: 5005948 clip tests (73% passed, 73% unclipped), 25410 per leaf
		 Info: Visibility: 268.050164 seconds
		 Info: Visibility: 1899 edges, 4118 leaf edges
	Balzar after bsp visibility:
		 Info: Visibility: 495 portals (0 sources), 196 leaves (196 logical), 798 nodes
		 Info: Visibility: 94 avg vis, 151 max vis, 2K (12.705895% ratio)
		 Info: Visibility: 2571297 clip tests (75% passed, 75% unclipped), 13052 per leaf
		 Info: Visibility: 145.337169 seconds
		 Info: Visibility: 1899 edges, 4118 leaf edges
	Balzar after bsp visibility reordering:
		 Info: Visibility: 495 portals (0 sources), 196 leaves (196 logical), 798 nodes
		 Info: Visibility: 94 avg vis, 151 max vis, 2K (12.705895% ratio)
		 Info: Visibility: 2567110 clip tests (75% passed, 75% unclipped), 13031 per leaf
		 Info: Visibility: 142.978974 seconds
		 Info: Visibility: 1899 edges, 4118 leaf edges
		 Info: Begin transaction Poly Click
	Balzar after rejection improvements:
		 Info: Visibility: 495 portals (0 sources), 196 leaves (196 logical), 798 nodes
		 Info: Visibility: 93 avg vis, 151 max vis, 2K (12.799130% ratio)
		 Info: Visibility: 2528242 clip tests (76% passed, 76% unclipped), 12833 per leaf
		 Info: Visibility: 140.681775 seconds
		 Info: Visibility: 1899 edges, 4118 leaf edges

====0.845q
+	Totally cool new hierarchical bsp based visibility algorithm:

+	Old faces convention: >>source>> >>clip>> >>test>>
+	New faces convetion:  >>back>> >>clip>> >>front>>

+	BspCrossVisibility(FrontLeaf, BackLeaf, FrontPoly, ClipPoly, BackPoly)
+		Let SEES(BackLeaf, FrontLeaf) = True
+		If Reverse(BackPoly) faces Reverse(FrontPoly):
+			If ClipAllToMaximalSheetWrapping(BackPoly, ClipPoly, FrontPoly)
+				For each new portal FrontPortal of FrontLeaf
+					Let NewFrontPoly = PolyOf(FrontPortal,FrontLeaf)
+					If NewFrontPoly faces Clip:
+						Let NewFrontLeaf = LeafOnOtherSideOf(FrontPortal,FrontLeaf)
+						BspCrossVisibility(NewFrontLeaf,BackLeaf, NewFrontPoly, FrontPoly, BackPoly)
+					EndIf
+				Next
+				For each new portal BackPortal of BackLeaf which faces(??) Clip:
+					Let NewBackPoly = PolyOf(BackPortal)
+					If BackPoly faces Reverse(Clip):
+						Let NewBackLeaf = LeafOnOtherSideOf(BackPortal,BackLeaf)
+						BspCrossVisibility(FrontLeaf,NewBackLeaf,FrontPoly,BackPoly,NewBackPoly)
+					EndIf
+				Next
+			EndIf
+		EndIf
+	Return

+	BspVisibility(Node Node) =
+		For each portal Clip at this node (in plane and confined to node's volume):
+			Let FrontLeaf = FrontLeafOf(Clip)
+			Let BackLeaf  = BackLeafOf (Clip)
+			For each new portal FrontPortal of FrontLeaf:
+				Let FrontPoly = PolyOf(FrontPortal)
+				If Reverse(FrontPoly) faces Clip:
+					For each new portal BackPortal of BackLeaf:
+						Let BackPoly  = PolyOf(BackPortal)
+						If BackPoly faces Reverse(Clip):
+							BspCrossVisibility(FrontLeaf, BackLeaf, FrontPoly, Clip, BackPoly )
+						EndIf
+					Next
+			Next
+		Next
+		BspSubVisibility(Front)
+		BspSubVisibility(Back)
+	Return

+	FullVisibility =
+		For each leaf Leaf
+			Let SEES(Leaf, Leaf) = True
+		Next 
+		BspVisibility(Root)
+	Return

+	Doing everything 2X as a result of ValidPolys logic.
+	Restrict visibility propagation to proper subtree!

///////////////////////////////////////////////////////////////////////////////
1-31-97

	New rebuild pass:
	* Csg the main brushes.
	* Rebuild Bsp to minimize cuts.
	* Assign leaves.
	* Portalize the bsp.
	* Build visibility.
	* Csg the detail brushes.
	* Optimize the sub bsp's.

	* Can we substructure the above calculations to avoid duplicate faces tests, by
	  recursing through the Bsp? Note that portals ARE strongly ordered as a result
	  of the hierarchical tree traversal! This implies that a full visibility clip

	* Clip portals *can* be merged globally, but not locally. This would eliminate
	  the worst-case factorial running time!

	* Count node portals to make sure bsp is ok.

	* Could use 2d bsp for node portal structure to further speed up the running time.

	Investigate p.:
		Bsp based visibility precomputation.
		Hierarchical lattice subdivision rendering.

	Note that this algorithm is typically over 1000 times faster than Quake's Vis
	utility.  While id boasts of having a 300 mHz 4-processor DEC Alpha dedicated to 
	visibility computation, we could get the same performance on an Apple ][+.

	Can get 2x speedup per node traversed by figuring out a unidirectional start order.
		Is this true? Test it out.
	Option to only visibility test zone portals.
	UBspNodes::KillPrecomputes
	UModel::KillPrecomputes
	bsp balancer, give credit to axial nodes and nodes w/ many coplanars.

leaf->zone visibility: more efficient than zone->zone and no extra cost, but asymmetric.

test visibility in bsp order only, avoiding redundent tests??
NodePortals[per iNode] for bsp order traversal??
Planar zone portals are rebuilding wrong: See TimLight.unr.

* Could even merge this algorithm with portal building for ridiculous speed.

can easily get 2x speedup by only start-testing forward portals.

Info: Visibility: 140 portals (280 tested), 65 leaves, 466 nodes

	Visibility ShouldTest flags:

Stats
	balzar:
	 latest code
	  Info: Visibility: 495 portals, 196 leaves, 798 nodes
	  Info: Visibility: 123 avg vis, 182 max vis, 2K (13.503574% ratio)
	  Info: Visibility: 11308729 clip tests (76% passed, 54% unclipped), 57404 per leaf
	  Info: Visibility: 1899 edges, 4118 leaf edges
	sky8
	 bsp minimum cuts:
	  Info: Visibility: 5123 portals, 2094 leaves, 8759 nodes
	  Info: Visibility: 77 avg vis, 290 max vis, 38K (1.785366% ratio)
	  Info: Visibility: 5966711 clip tests, 2849 per leaf
	  Info: Visibility: 5708 portals, 2320 leaves, 9357 nodes
	 as is:
	  Info: Visibility: 87 avg vis, 264 max vis, 47K (1.817588% ratio)
      Info: Visibility: 11917276 clip tests (68% passed, 46% unclipped), 5134 per leaf
      Info: Coplanar leaf edge
      Info: Coplanar leaf edge
	spqr
	  Info: Visibility: 1459 portals, 546 leaves, 2166 nodes
	  Info: Visibility: 173 avg vis, 302 max vis, 7K (5.341155% ratio)
	  Info: Visibility: 36922017 clip tests (-51% passed, -51% unclipped), 67499 per leaf
	  Info: Visibility: 2340.546190 seconds
	spqr 
	  Info: Visibility: 1459 portals (0 sources), 546 leaves (546 logical), 2166 nodes
	  Info: Visibility: 177 avg vis, 312 max vis, 7K (5.106107% ratio)
	  Info: Visibility: 20639616 clip tests (66% passed, 66% unclipped), 37732 per leaf
	  Info: Visibility: 671093 max fragments, 1048.977777 seconds
	  Info: Visibility: 8602 edges, 11217 leaf edges

		4200 surfs
		5682 portals
		2320 leaves
		9357 nodes
		>50% of vertices are non-primitive (tee-points)

///////////////////////////////////////////////////////////////////////////////
	Visibility precomputation thoughts.

2d revolver portal hints!

That routine was a bitch to write and get working flawlessly.

Overall, I'm not too happy with visibility precomputation.  The CPU time 
required to get a complete, theoretically minimal convex volume visibility 
information is insane.  Though my code could be optimized by a factor of
10 with some straightforward algorithmic improvements, obtaining a significant
speed increase, i.e. factor of 100, is out of reach without resorting to
terribly difficult 5d geometry, and imposing a 2-3 hour waiting period
between modeling a level and playtesting it will put a damper on 
creativity.

The other major drawback to convex volume visibility precomputation is that
it overestimates the number of polygons visible to a given viewpoint by on average 
2X-3X, and it typically overestimates the number of polygons visible to a given view 
frustrum by 12X.

Zones and manually placed portals aren't so bad after all.

The existing portal system can be integrated with Unreal's new edge rendering
code pretty easily, so that new zones are introduced into the active edge 
table as soon as the first span of their portal becomes visible.

Benefits:
 * No need to wait hours for visibility preprocessing.
 * 

Drawbacks:
 * No visibility table available for fast line-of-sight rejection, and
   fast network play visibility.

Knowledge/ideas gained:
 * How to perform 3D portal-based view convolution.
 * Portals can be used in a straightforward way to determine which leaves
   a light affects, for light-leaf association.

///////////////////////////////////////////////////////////////////////////////

	Edge elimination.
		Eliminate intrasurface, intraleaf edges in preprocessing stage.
		Eliminate intrasurface, purely visibile interleaf edges at coalescing stage.
		Confine edges to leaves.

///////////////////////////////////////////////////////////////////////////////
Thoughts

====0.845n
	// Only a partitioning plane.
	FBspNode: Can be 8 bytes (a nice savings over the current 64!)
		word iPlane     : index into plane table of node's plane
		word iFront     : front node, or front leaf, or none
		word iBack      : back node, or back leaf, or none
		word Flags      : front_is_leaf, back_is_leaf

	// An interior Bsp leaf.
	FBspLeaf:
		word  Flags     : flags for the leaf
		word  NumSides  : number of sides
		dword iSidePool : index of first side in this leaf

	// A side.
	// Using this representation you don't need to mess with t-point removal since
	// t-points can be accounted for exactly.
	FSide:
		word iVertex0   : first vertex of side
		word iVertex1   : second vertex of side
		word Alpha0     : alpha of first vertex
		word Alpha1     : alpha of second vertex
		word iSurf0     : first surface
		word iSurf1     : second surface

	Edge code.
		Only antialias intersurface edges, only once per edge.
		Mesh edge aa, silhoette and intertexture edges only.

	Node info:
		Visible nodes per node (symmertric).
		Volume lightsources per node.

		Properly nonlinear time invariant scale mouse movements.
		Proper time based exponential decay.

///////////////////////////////////////////////////////////////////////////////
2-1-97: Back to the input and physics code.

+	Replace OneShot with server-side commands.
+	Redesigned server messaging system.

///////////////////////////////////////////////////////////////////////////////
2-2-97: Server messaging and input.

+	Implemented UBitArray, UBitMatrix.
+	Server MsgName I=# S=Str N=?? -> Func(I as Integer, S as String[32], N as Name)

+	Added messages:
+		ACTOR_ServerFire
+		ACTOR_ServerAltFire
+		ACTOR_ServerNextWeapon
+		ACTOR_ServerPrevWeapon
+		ACTOR_ServerWeapon #
+		ACTOR_ServerPause
+		ACTOR_ServerJump

///////////////////////////////////////////////////////////////////////////////
2-3-97

+	All-day UnrealEd bug roast.

///////////////////////////////////////////////////////////////////////////////
2-4-97

+	Rebuild classes.

' Input buttons.
Dim bZoom     as Boolean, bRun     as Boolean
Dim bLook     as Boolean, bDuck    as Boolean
Dim bStrafe   as Boolean, bExtra6  as Boolean
Dim bExtra5   as Boolean, bExtra4  as Boolean
Dim bExtra3   as Boolean, bExtra2  as Boolean
Dim bExtra1   as Boolean, bExtra0  as Boolean

' Input axes.
Dim aForward as Real,     aTurn    as Real
Dim aStrafe  as Real,     aUp      as Real
Dim aLookUp  as Real,     aExtra4  as Real
Dim aExtra3  as Real,     aExtra2  as Real
Dim aExtra1  as Real,     aExtra0  as Real

+	3dfx basic rendering - awesome!

///////////////////////////////////////////////////////////////////////////////
2-5-97

====0.845q
+	3dfx extended support:
+		Basic texture rendering.
+		Added segmentation support to memory cache.
+		Upload actual palette as needed.
+		Upload actual textures.
+		Cache the textures with an FMemoryCache (8-aligned, 2meg segmentation).
+		Proper mip alignment for first 4 mips.
+		Cram all other mips in there.
+		Tick the 3dfx cache.
+		With 3d hardware, sort textures by palette|texture.
+		Support panning.
+		3dfx texture scaling is weird.

///////////////////////////////////////////////////////////////////////////////
2-6-97

+	3dfx lightmap support:
+		3dfx bump palettes.
+		Download lightmaps.
+		Post float -> luminance support.
+		Cache the light maps.
+		Properly render/scale them.
+		Properly pan and clamp them.
+		Eliminate blink.
+		No clear screen.

///////////////////////////////////////////////////////////////////////////////
2-7-97

====0.846a
+	3dfx
+		Handle dynamic and static light maps.
+		Texture palette normalization.
+		Render light maps with normal scaling and offset.
+		Normalize lightmeshes.
+		Rescale lightmeshes.
+		Blowout texture max via precomputed texture scaling factor!

///////////////////////////////////////////////////////////////////////////////
2-8-97

+	Go to DE

///////////////////////////////////////////////////////////////////////////////
2-9-97, 2-10-96, 2-11-97

+	At DE

+	Optimized dynamic lighting by a factor of 2 using the Arjan Brussee supergenius optimization technique* :)
+	Optimized raytracing code by a factor of 2.
+	Optimized collision code by a factor of 2.

///////////////////////////////////////////////////////////////////////////////
2-12-97

+	Unreal files:
+		FNAME_SIZE in UnLinker.h.
+		ULinker needs filename.
+		ULinker needs ULinker dependency array.
+		Absolutely no circular dependencies.

+	Unreal resource directories are:
+		Brushes
+		Cache
+		Classes
+		Maps
+		Models
+		Music
+		Sounds
+		Textures

+	Obsolete:
+		Is PlayerExec called?
+		Do NOT add actor collision refs to inside leaves! Duh!
+		Resource file dependencies and getters.

+	Unrealfiles:
+		Need enough info in resource files that they can be fully operated on my external utils.
+		Resource file -> Unrealfile.

+	Wrote UnrInfo.exe utility for getting info about Unrealfiles.
+	Documented the Unrealfile format, see UnrInfo.h.

	Unrealfile dependencies.

		A dependency string in a source Unrealfile identifies another Unrealfile that
		must be loaded before the source file may be loaded.  Unrealfile dependencies are 
		analogous to DLL dependencies, i.e. WinWord.exe has Kernel32.dll as a dependency.

		A dependency string specifies a pathless filename, such as "Ancient.utx", and
		an optional source site on the net to download it from, such as 
		"unreal://unreal.epicgames.com/", and some other optional parameters.

		When a dependency must be loaded, the following places are searched, in order:

		1. The standard Unreal hard disk directories, i.e. \unreal\textures, \unreal\maps\, etc.
		2. The cache on your hard disk, \unreal\cache.
		3. Downloading from the specified source site on the net, into your \unreal\cache\ 
		   directory, and then using the just-downloaded file in \unreal\cache as the source.
		4. If the dependency can't be loaded, or download is aborted, the entire operation fails,
		   and the user is sent back where he came from.

		A dependency string contains these parts, separated by spaces:

		name=levelname
			Required base name of the dependent Unrealfile (no path).
			When we load an Unrealfile, we first attempt to load all of its dependent files.
		source=[unreal://]unreal.epicgames.com:port/
			Optional UnrealServer [??or any Gatekeeper?] to obtain it from, otherwise assume local.
			Filename on the UnrealServer is exactly the same as 'name'.
			[?? Do we need to support UnrealServer directories?]
		signup=[http://]www.epicgames.com:port/dir/page
			If the user doesn't already have the dependency on his hard disk, lets the user
			navigate to the signup web page for information about the file. This could provide
			a link to a buy-and-download system, for example. The signup line may specify any
			valid URL, which is passed to Netscape or Internet Explorer.
		required=packagename
			Requires that the user have a particular software package installed (i.e. Unreal 
			registered version) in order to use the dependency. There may be multiple
			required= lines in a dependency string, and all requirements must be met.
			If a dependency is not met, the user is given the option to go to the signup
			site for more information about it (and possibly a buy-and-download service).
			Storing requirements in the dependency string enables us to put
			teleporters to the registered version of Unreal, and to upcoming level packs, 
			in the shareware version, as a teaser.
		message="text"
			An optional message to display if not all requirements are met. This could
			be a teaser like "You need to buy the full version of Unreal to enter here".

		To give a more concrete example, consider an Unreal level named "Starship.unr".
		This is a typical level for the registered version of Unreal which is not available
		for downloading.  It might contain the following dependency entries:

		   name=General.utx  signup=www.epicgames.com/unreal/register.htm required=unreal_shareware
		   name=Starship.utx signup=www.epicgames.com/unreal/register.htm required=unreal_registered
		   name=Root.ucx     signup=www.epicgames.com/unreal/register.htm required=unreal_shareware
		   name=RootReg.ucx  signup=www.epicgames.com/unreal/register.htm required=unreal_registered
		   name=Isotoxin.uax signup=www.epicgames.com/unreal/register.htm required=unreal_registered

		Now consider a level available on the net, which is dependent on a texture set available
		on the net, as well as some shareware Unreal stuff:

		   name=General.utx  signup=www.epicgames.com/unreal/register.htm required=unreal_shareware
		   name=Root.ucx     signup=www.epicgames.com/unreal/register.htm required=unreal_shareware
		   name=Mysong.uax   source=un-reality.com
		   name=MyTextures.utx source=un-reality.com
		   name=OtherTextures.utx source=unreal.epicgames.com

		Dependencies need to be handled in three main places in the Unreal 
		[?? and Gatekeeper?] codebase:

		1. First of all, the Unreal resource manager's Unrealfile loading code needs logic
		   to find and load dependent Unrealfiles when loading a source Unrealfile.  This code
		   will *only* handle dependencies which are on the local hard disk, not net-based
		   dependencies.  As a result, trying to load a file with dependencies that aren't
		   available locally will fail (gracefully), with the engine in a clean state upon
		   failure. Todo: Tim.

		2. The Unreal file saving code needs to save dependency information, and this needs
		   to be coupled with an option to view and edit level dependencies explicitly.
		   Todo: Tim.

		3. The networking client code needs a high-level master routine for loading a level,
		   which may be local (via filename) or remote (via URL), which does everything needed
		   to start a session on a remote server, including:

		   A. If remote, contacting the remote server via the net, and getting the level's
			  dependency list.

		   B. Recursing through the level's dependency list, and making sure that all dependencies
			  are available.  This would continually build up a list of active Gatekeeper
			  connections, and handle all special cases, such as:
			  * A dependency isn't immediately available, in which case the user is given the
				option of visiting the signup Web page to get more info.  If the user opts to
				abort, the entire load files. If the user visits the signup site, the Web browser
				is launched and sent to the site, and back in Unreal the user has the option to
				retry the dependency (in case the dependency's accessibility has changed, as would
				be the case in a buy-and-download system), or abort.
			  * The client times out trying to contact the server associated with a dependency, 
				or the dependency is downright unavailable or inaccessible.

		   C. Downloading each of the dependencies which are remote, spooling the info from the
			  server to the \unreal\cache directory.
			  * Files need to be downloaded to a temp file (i.e. Temp1.$$$) and then renamed, so
				that rebooting during download doesn't leave a corrupt file in the cache which
				Unreal will later try to load.
			  * Disconnections have to be handled gracefully.
			  * The user needs the ability to abort a download, canceling everything gracefully.

		   D. Finally, once all downloads are complete, calling the resource manager to load
			  the actual file (at this point, all dependencies are on the hard disk).

		[??Am I overcomplicating this?  This sounds like a mess, but it's the simplest way I can
		think of to do the job.]

		[??Should Unrealfiles contain a dependency string referring to themselves, i.e. to
		describe the package and signup information for itself?]

///////////////////////////////////////////////////////////////////////////////
Where 3d graphics is going in 1997, 1998, and 1999.

* Fill rate will be the limiting factor in rendering 1997, but will lose 
  significance in 1998 as fill rates reach 100 Mpix where visibility
  algorithms and fill rates come into check.  In 1998, per-polygon 
  overhead will be the limitor.  In early 1999, the transition to NURBS
  will make temporary table/texture overhead associated with dynamic
  shadowing and bump mapping the limitor.  In the *very* long term, 2000+,
  after photorealism has been achieved in properly limited scenes and special
  effects are maxed out to visually acceptable levels, artistic and design 
  content will dominate over rendering power as the limiting factor.

* Polygon counts will increase to somewhere in the 15,000 - 30,000 polygon per
  scene range, and max out there due to bandwidth limitations (sending the 
  polygon info over AGP) and CPU limitations (transforming them all). At around
  15,000 polygons per scene, apps will stop dealing with polygon representations
  for non-flat surfaces and switch to NURBS, because:

  - NURBS are a *much* more compact representation for curved surfaces, compared
    to explicitly storing polygon lists.  A NURBS object will be 90% more space
	efficient than an equivalant quality polygon mesh.

  - Hardware will perform NURBS transformation, tesselation to triangles, and
    clipping.

* Software will still perform visible surface determination (via precomputation,
  portalization, and depth cueing).

* Software will still perform high-level lighting and shadowing, though hardware assist
  may come into play for shadow z-buffering or shadow occlusion techniques.

* Texture mapping will move to multipass or multiple simultaneous texture rendering.
  4 simultaneous textures per pass is a good number to aim for, because than enables
  one to combine:
   - A trilinear filtered texture (2 textures).
   - A light map (1 texture).
   - A microtexture, macrotexture, or bump map (1 texture).
  More than 4 will not prove to be generally useful for texture mapping, because there's
  not much to gain by exceeding reality.

* Textures will be stored in a jpeg-style regionalized compressed form or a wavelet
  style generliazed compressed form, and decompressed on the fly, because texture memory 
  will still be a scarce resource.

* Photorealistic indoors environments will be the norm by the end of 199.

* Photorealistic outdoors environments like forests are still very far off.

* Consumer PC 3d performance will kick the 1996 SGI Infinite Reality's ass.

* Art and design will be the largest factor in the success of 3d games rather than
  core technology.  Extraordinary graphics processing power doesn't mean dick when
  combined with ugly environments and boring gameplay.

* Internet based 3d will be sorely bandwidth limited and those who pioneer the
  base global dataset compression schemes will get the most playtime.

* 3d API popularity and 3d hardware market share will be determined by top tier
  game support more than any other factor.

What will not happen:

* Talisman 2d chicanery will not be useful in the most demanding 3d apps
  anymore than using cardboard cutouts has furthered the motion picture industry.

* Hardware will not take over the scene management and high level rendering
  aspects.  These limit versatility, and increase hardware cost, without gaining 
  much real performance.

* VRML will not be the way 3d is done on the Internet in the mainstream. There 
  will be cooler looking 3d stuff which makes more intelligent tradeoffs 
  between generality and graphical detail.

* People won't be buying $2500 PC's that hook up to their television.  If people
  wanted this stuff there would already be demand for it.

///////////////////////////////////////////////////////////////////////////////
D3D

HRESULT EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback,
    LPVOID lpUserArg);

lpDirectDraw->QueryInterface(
    IID_IDirect3D,  // IDirect3D interface ID
    lpD3D);         // Address of a Direct3D object

	Direct3D:
		Enum DirectDraw devices and present a menu of them in camera window.
		Allow selecting a DirectDraw device.
		Use Hardware 3D toggle.

// do get d3d interface
lpDirectDraw->QueryInterface(
    IID_IDirect3D,  // IDirect3D interface ID
    lpD3D);         // Address of a Direct3D object

lpDirectDraw->CreateSurface(
    lpDDSurfDesc,   // Address of a DDSURFACEDESC structure
    lpFrontBuffer,  // Address of a DIRECTDRAWSURFACE structure
    pUnkOuter);     // NULL
lpFrontBuffer->GetAttachedSurface(
    &ddscaps,         // Address of a DDSCAPS structure
    &lpBackBuffer);   // Address of a DIRECTDRAWSURFACE structure
lpBackBuffer->QueryInterface(
    GUIDforID3DDevice,   // ID for IDirect3DDevice interface
    lpD3DDevice);        // Address of a DIRECT3DDEVICE object

HRESULT EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback,
    LPVOID lpUserArg);

///////////////////////////////////////////////////////////////////////////////
2-13-97

+	Eliminate obsolete stuff:
+		GGfx.GammaCorrectPalette -> UPalette
+		GGfx.SetPalette  -> FCameraManager
+		GGfx.FixPalette  -> UPalette
+		GGfx.RGBtoHSV    -> FVector HSV constructor
+		GGfx.BurnRect    -> UTexture
+		GGfx.Clearscreen -> UTexture

+	D3D prep.

///////////////////////////////////////////////////////////////////////////////
2-14-96

+	Auugh! Opportunities from hell, yet so much work to do...
+	Init3D needs camera, needs success/fail return code.
+	Proper 3d hardware shutdown/startup.

+	D3D:
+		Use Hardware 3D option.
+		Pick list of D3D drivers.
+		Caps.
+			Device.
+			Surface.
+			Texture.
+		Create a viewport.
+		Create a temporary material.

====0.846b
+		BeginScene/EndScene.

Direct3D notes
--------------

* What on earth is D3DDEVCAPS_FLOATTLVERTEX - "Device accepts floating point for post-transform 
  vertex data". What does it mean when this cap bit is clear?

* What's the maximum execute buffer size that's safe on all hardware?  A minimum size 
  NEEDS to be defined. Is it 256 bytes? Is it 64K? Is it 256K?  Developers need to make
  major design decisions based on this kind of info! Without it, writing to Direct3D 
  is a total hack job.

* If I'm rendering straight from TLVERTICES do I need to use D3D matrixes? Do I need a
  material? Do I need a light? Do I need a background material? This stuff needs
  documenting.

* Execute errors are nearly impossible to track down because there's only one error
  return value from Execute.  There need to be error codes for each opcode type 
  and the codes need to be indicative of the problem.

* IDirect3DViewport::Clear does nothing when owner device's DirectDraw surface
  is locked, it should either perform the clear, or fail with an error result.

* The lack of explicit management of texture memory could be a performance bottleneck.
  For example, Unreal has about 20 megs of textures + light maps per level, and at any
  time about 1 meg is visible.  Without an efficient way to manage a texture cache,
  this creates a performance problem.  It's essential for D3D either to expose the
  texture memory layout, or provide a texture cache enabling the user to operate on
  what appear to be read-only system-memory textures, while D3D manages caching for
  the various levels of memory:

    - video memory
	- agp memory
	- system memory

  A caching scheme's priorities need to be weighted on two factors, LRU and the
  texture size (=performance cost of moving the texture around).

  ...If D3D already has a texture caching mechanism in place, that should be
  mentioned in the docs, and its performance characteristics described.

* Most of the D3D sample in-a-window apps in the SDK make the mouse cursor behave 
  erratically.  A demo app should demonstrate good programming practices for 
  an API, so this really needs to be fixed.

* Supporting 3dfx-style w-buffering would be nice. "w" is a 16-bit floating point 
  representation of 1/z. It eliminates the z-aliasing problems associated with 16-bit z buffers 
  and improves the range considerably.  No matter what the z buffer depth is (16/24/32)
  w-buffering is the best general representation, so it would be nice to push
  hardware vendors in this direction.

* For improving DrawPrimitive performance, it would be nice to have something like
  D3DPRIMITIVETYPE_PLANARPOLYGON which works like D3DPRIMITIVETYPE_TRIANGLEFAN, but
  only computes the triangles deltas once, and assumes that the specified triangles
  are planar and their texture deltas and lighting deltas are constant over the
  entire polygon.

* If future 3d hardware starts accelerating lighting calculations (using untransformed,
  unlit vertices), then it's vital to have a vertex' Gouraud color components still work.
  In this case, the vertex colors should be modulated by the hardware-calculated lighting!
  This enables some work, such as shadowing and overall coloring, do be done in software,
  while hardware performs lighting calculations. If the user doesn't want to do any
  software lighting at all, he could just set the vertex RGB components all to 255.

DirectDraw thoughts
-------------------

* It would be nice if the exclusive mode owner could adjust the monitor's
  gamma correction.  Most gfx cards like ATI and 3dfx provide custom control
  panels and proprietary API's for adjusting gamma and it would be helpful to
  standardize this. Realistic 3d games are far more gamma sensitive than
  regular windows UI apps due to scene dynamic ranges and to user expectations
  of what an environment actually looks like.

SUCKS
-----

* Documentation fails to address major design issues like viewport properties, TLVERTEX usage, 
  texture caching, materials, meaning of capability bits, execute buffers. For comparison 3dfx 
  Glide docs describe the API in complete detail.

* D3D error handling is lousy.  I'm spending >95% of my D3D programming time chasing down problems 
  (versus <20% with Glide), and all I see are these 3 cases:

 - DDERR_UNSUPPORTED (this is NOT a useful error message when trying to track 
   down subtle problems in the relationships between D3D objects and execute buffers, on 
   top of the lack of documentation of which objects are valid in which contexts).

 - GPF's which often require a reboot.

 - No error reported, but nothing visible is output.

* DrawPrimitive simply does not work in DX5 build 42.  <--- Maybe there's some other problem
  but all I can see is DDERR_UNSUPPORTED in my code, a GPF in D3DEX1, and random garbage in the 
  new D3DEX3.

* Execute buffers are terribly klunky for low-level polygon rendering.  You end up with tons 
  more convoluted code than Glide or GL because you have to figure out the execute buffer contents 
  twice, and either go through pointer hell or deal with those macros, carefully avoiding hidden 
  problems like the OP_NOP bug.

* Overall the amount of work that must be done, and objects that must be dealt with to just open 
  up a window and render some polygons, is extreme.  My 3dfx Glide library in Unreal is 1500 lines 
  of C++ code, for *full* support of all Unreal's features.  My Direct3D library is approaching 
  1600 lines of C++ code just for flatshading (not counting DirectDraw buffer management code), 
  and I can easily see it growing into 6000+ lines of convoluted mess when it comes time to deal 
  with capability bits, supported texture formats, palettes, etc.

3dfx thoughts
-------------

* DirectDraw driver keeps switching the passthrough on and off when it's queried.
  It should only touch the passthrough when the 3dfx is used for display.

* On install, SST_*GAMMA is being set to 1.7, which is a *terrible* gamma value
  to use. The gamma, if hardcoded, needs to match standard video cards, i.e.
  somewhere in the 1.0 - 1.25 range. When using Direct3D, there is no way to 
  adjust the gamma directly, so D3D stuff tends to look awful, and most people
  aren't hardcore enough to mess with their config.sys to fix this problem.

///////////////////////////////////////////////////////////////////////////////
2-15-97

+	3dfx
+		last palette color bug!

+	D3D continued.
+		Build execute buffer.
+		D3D execute buffer helpers.
+		Direct3D immediate mode SUCKS CRAP!
+		Fill background.
+		I can't believe that Microsoft would create such a shitty library.

///////////////////////////////////////////////////////////////////////////////
2-16-97 - 2-19-97

+	Microsoft, GT meetings.

///////////////////////////////////////////////////////////////////////////////
2-20-97

+	Fonts
+		Fixed f_huge, f_num

+	Implement PHYS_Interpolation in root class? Yes, using Target and Instigator.

+	UnrealEd
+		Blur tex on import ui option.
+		Script Edit/Copy doesn't seem to work but ^C does.

///////////////////////////////////////////////////////////////////////////////
2-21-97

+	UnrealScript issues to (re)ponder:
X		Allow state-local variables? -> DEFINITELY NOT
X			- SetState within a function would be impossible to manage with a simple stack.
X			- Would require a separate function and state stack.
X			- Even separate stacks wouldn't work because a function's stack would just disappear.
+		Global function f() overrides don't take precedence over parent state function f() overrides.

+	UnrealScript: check compile/decompile:
+		Simple State/EndState.
+		All state overrides.
+		Init all types.
+		TestEval all constant types.
+		Parameterless functions.
+		Parametered functions.
+		No variable declarations in states.
+		Functions with default parameters.
+		No var decls after functions.
+		Initialized local variables.
+		Proper state overriding.
+		Proper function overriding.

+		Order enforcement (Class:Vars/Funcs/States, State:Vars/Funcs/Code)
+		Don't allow overriding fast functions.
+		State/Class/Both function override parameter verification.
+		Fix operators.
+		Operator precedence.
+		Fast -> Final.

+	UnrealScript function overrides.
+		Allow function overrides.
+		Allow function overrides.
+		Don't allow function overrides which differ only by return type.
+		Allow mismatch of operator parameters from override.
+		Must work with arrays via FClassProperty::CompareTypes.

///////////////////////////////////////////////////////////////////////////////
UnrealScript test

>>ustest
'ok
final operator.1 add(a as integer, b as integer) as integer
	endoperator
final operator.1 add(a as real, b as real) as real
	endoperator
final operator.1 mul(a as real, b as vector) as vector
	endoperator
final operator.1 mul(a as vector, b as real) as vector
	endoperator

'error: redefinition
final operator.1 add(a as integer, b as integer) as integer
	endoperator

state st
	' ok
	final operator.1 add(a as integer, b as integer) as integer
		endoperator
	final operator.1 add(a as real, b as real) as real
		endoperator

	' error: differs only by return type
	final operator.1 mul(a as vector, b as real) as boolean
		endoperator
endstate

///////////////////////////////////////////////////////////////////////////////
continued

====0.847a
+	UnrealScript class context.
+		GetExpr
+		GetVariable

+	UnrealScript functions.
+		GetExpr include a Class context and be completely separate from compiler internals.
+		GetExpr handle actor variables plus "." as context setter.
+		Handle context expressions with arrays.

+	Optimizations.
+		EX_ByteConst
+		EX_One
+		EX_Zero

+	Added CPF_OutParm for "ByRef" parameters copied out of functions.

+	Let
+		Let variable = typed expr.
+		Let work with arrays.
+		Let work with class contexts.

+	True, False = boolean constants.

+	SC_Return: Function return statement with type checking.
+	SC_Assert.

+	Built-in constants:
+		Pi
+		MAXINT

///////////////////////////////////////////////////////////////////////////////
UnrealScript test

>>ustest
' Test functions.
Function TestEnum(A as EDrawType)
EndFunction

Function TestByte(A as Byte)
EndFunction

Function TestTexture(T as Texture)
EndFunction

Function TestActor(A as Actor)
EndFunction

Function TestPawn(P as Pawn)
EndFunction

' Bug test.
Function f()

	' Create some local variables.
	Dim A as EDrawType
	Dim B as Byte
	Dim T as Texture
	Dim M as Sound
	Dim R as Actor
	Dim P as Pawn
	Dim V1(10) as Vector
	Dim V2(10) as Vector
	Dim V3(20) as Vector
	Dim Boo as Boolean
	Dim Test as EDrawType=DT_Brush
	
	' Ok assignments.
	Let B=A
	Let A=A
	Let T=T
	Let M=M
	Let R=R
	Let P=P
	Let R=P
	Let V1=V1
	Let V1=V2
	Let V1(5)=V3(6)
	Let Boo=True
	'Let B=123
	Let A=DT_None
	Let A=DT_Mesh
	'Eval TestEnum(A)
	'Eval TestByte(A)
	'Eval TestByte(B)
	'Eval TestTexture(T)
	'Eval TestActor(R)
	'Eval TestActor(P)
	'Eval TestPawn(P)

	' Bad assignments.
	Let A=B
	Let T=M
	Let P=R
	Let V2=V3
	Let V1(1)=V2
	Let B=4934
	Let A=0
	'Eval TestEnum(B)
	'Eval TestTexture(M)
	'Eval TestPawn(A)

	' Ok casts.
	'Let A=EDrawType(B)
	'Let P=Pawn(A)

	' Bad casts.
	'Let M=Model(Texture)
EndFunction

///////////////////////////////////////////////////////////////////////////////
2-22-97

====0.847b
+	Allow const local variables.
+	GetExpr extensions:
+		Cleaned up GetExpr calling.

+	Expand type checking:
+		GetVariableExpr
+		GetFunctionExpr
+		GetExpr
+		Added PROPBIN_NonLValue to indicate non-actor properties

+	GetExpr:
+		Get typed enum expressions properly, only searching relevant enum.
+		Get typed resource expressions properly.
+		Get typed actor expressions properly.
+		GetConstExpr.

+	Class A is assignable to B if A is a NULL or A is a child of B.

+	GetConstExpr.
+		NoActor (special nil), Level constant actor type.
+		None (special nil) resource type.

====0.847c
+	Cleanup and rebuild UCX.
+	Cleanup old token code.

====0.847e
+	Constant token mapping.
+		Derive FToken from FClassProeprty and have only one TOKEN_Const.
+		Cleanup token constant mapping.

====0.847f
+	Constant cleanup.
+		EmitConstant always called properly?
+		EmitConstant handles all property types?
+		GetToken automatically handle MaxInt, Pi, True, False, etc.
+		Eliminated GetConstExpr.
+		Handle enums in GetToken.
+		Need CPF_Initialized?
+		Token type setting gates.

	The engine plan.
		For now:
			Tim continues working on UnrealScript.
			Steven continues setting up C++ AI code and soon doing early UnrealScript work.
			Mark continues network play.

		Steven/Tim get together at Epic once UnrealScript is running decently:
			Integrate the new AI code in the engine.
			Set up the major scripts: inventory, damage, physics, etc.

		Mark/Steven/Tim meet and coordinate how the network code, AI, and UnrealScript interface together,
		once the network code is nearing completion.
			Make whatever changes are needed to the engine.
			Make whatever changes are needed to the network code.
			Figure out the plan for future work.

		Mark/Tim fully integrate networking with the newest version of the engine.
			Get everything back up and running smoothly.
			Teleporting from server to server.
			Finalize the plan for the Web style navigational interface.
			Figure out the Gatekeeper plan.

		From then on:
			We all continue with our stuff.
			Set up an Internet-based (NFS) Visual SourceSafe database so that we're all working from
			the same codebase as we move towards finishing and fine tuning the engine.

		(I haven't forgotten about Ammon, but his code pretty separate and easy to merge compared to everyone else's).

====0.847g
+	Clean up FToken getters and accessors.
+		FToken::GetIntegerConst
+		FToken::GetRealConst
+		Check TOKEN_Const references.
+		FClassProperty::InitPropertyData
+		Fix variable initializer parsing problems.

>>ustest
Dim Q as Actor=None
Dim R as Actor=Level
Dim S as Pawn=None
Dim T as Pawn=Level ' error

Dim TT as Texture=None ' incorrect error
Dim QQ as Texture
Dim RR as Sound

Dim EE as EDrawType=DT_Sprite
Dim XX as EDrawType=23 ' error

Function f()
	Let TT=TT
	Let QQ=TT
	Let RR=None
	Let TT=RR ' error
	Let EE=DT_Brush
	Let EE=None ' error
EndFunction

---

>>ustest
Dim Q as Actor=None
Dim R as Actor=Level
Dim S as Pawn=None
Dim T as Pawn

Dim TT as Texture
Dim QQ as Texture
Dim RR as Sound

Dim EE as EDrawType=DT_Sprite
Dim XX as EDrawType

Enum ETim = One,Very,Cool,Dude

Function f()
	Eval Q
	Eval R
	Eval S
	EVal T
	EVal TT
	Eval QQ
	Eval RR
	Eval EE
	EVal XX
EndFunction
#decompile

---

>>ustest
Enum ETim = TIM_Is, TIM_A, TIM_Cool, TIM_Guy
Enum ETest = TEST_1, TEST_2, TEST_3

Dim Z as Integer
Dim A as ETim
Dim B(5) as ETest

Function f()
	Enum ELocalEnum = LE_ABC, LE_DEF
	Dim XX as ELocalEnum = LE_Abc
	Dim YY as ETim

	Let A=TIM_Cool
	Let A=A
	Let B(1)=B(4)
	Let XX=LE_DEF
	Let A=YY

	Let B(1)=A 'err
	Let B=B(4) 'err
EndFunction

Function g()
	Dim Q as ETim
	Dim R as ETest
    Dim S as ELocalEnum ' err
EndFunction

---

>>ustest
Dim a as integer
dim b as byte
dim xx as boolean
dim yy as boolean
dim z as string(20)
dim qq(12) as byte

Enum ETim=TIM_Rulz

Function f()
	eval EnumCount(ETim)
	eval EnumCount(EDrawType)
	eval EnumCount(ELightType)
endfunction
#decompile

====0.847h
+	GetPropertyTypeName -> Use global names instead.
X	FClassProperty::SetType needs EnumDef handler? -> No.
+	Rewrite Enum declaration logic.
+	ExportH and ExportTCX handle EnumDef's.
+	Only recognize Enum types in scope.
+	Full UCX rebuild.
+	Fix enum tags.
+	Clean up PushNest.
+	Built-in SizeOf(var), ArrayCount(var), EnumCount(Tag) which compile to integer constants.
+	Generalized actor class types.
+	Deleted CPF_Initialized.
+	Need CPF_Array? It simplifies the code, so, it's good to have around.
+	Function to find a named variable in scope, use for enums.
+	Run all UnrealScript test suites again.

///////////////////////////////////////////////////////////////////////////////

====0.847i
+	UScript CodeSwaperoo insert function, use for retrys.
+	Swaperoo variable processing.

>>ustest
function f()
	eval Me
	eval Parent
	eval DrawType
'	eval Parent.DrawType
'	eval Zone.Zone
	eval Zone.bWaterZone
	eval Target.Target
'	eval Me.Me.Me
'	eval Me.Parent.Zone.bWaterZone
endfunction
#decompile

+	Variables.
+		Only store variable types in Let.
+		CPF_Const means scripts can't use "Let".
+		CPF_Private means scripts can't access the variable at all.
+		Variable decompiler must reverse-map the variable name.
+		Property reverse-map booleans by bit.

///////////////////////////////////////////////////////////////////////////////
2/23/96

>>ustest

Dim GA as Integer
Dim GB as Actor
Dim GC as Light

Dim a,b,c,d,e,f as Boolean

function f()
	Dim LA as Integer
	Dim LB as Actor
	Dim LC as Light

	Let a=b
	Let c=d
	Let e=f

	Let GA=LA
	Let GB=LB
	Let GB.DrawType=LB.DrawType
	Let GC.GA=LC.GA

	Let LA=GA
	Let LB=GB
	Let LB.DrawType=GB.DrawType
	Let LC.GA=GC.GA

endfunction
#decompile

====0.847j
+	Variables.
+		Eliminated LastProperty, PropertyEndOffset hacks.
+		Must handle local property bin offsets relative to tree's start.
+		Handle decompiling through multiple class's context variables via iTree.

====0.847k
+	Expression typing.
+		CompileExpr must always have an expression type.
+		Handle Let with new typing logic.
+		Handle booleans with new typing logic.

>>ustest

' Testing constant conversions.
Dim a as integer
Dim b as byte
dim c as real

Function f()
	Dim r(5) as integer
	Dim s(5.0) as byte
	dim t(5.5) as byte 'error

	Let a=1
	Let b=2
	Let c=3

	Let a=1.0
	Let b=2.0
	Let c=3.0

	Let b=12345 'error
	Let a=2.4 'error
EndFunction

' Autoconversion arrow.
Function F()
	Dim I as Integer
	Dim B as Boolean
	Dim C as Boolean
	Dim D as Boolean
	Dim T as Texture

	Let I=Integer(B)
	Let I=Integer(C)
	Let I=Integer(D)
	Let B=Boolean(I)
	Let T=Resource(I)'err
	Let B=Boolean(T)'err

	'Let 213=435'err
EndFunction
#decompile

====0.847m
+	Conversions.
+		Automatic const conversions.
+		Test autoconversion arrow.
+		Automatic conversions via insert.
+		Explicit conversions via insert.

>>ustest

function fii_b(a as integer, b as integer) as boolean
	return True
endfunction

function fvv_i(v as vector, w as vector) as integer=123
endfunction

function TestCalls()
	Dim b as boolean
	Dim i as integer
	Dim v as Vector

	Let b=fii_b(123,456)
	let i=fvv_i(v,Vector(1,2,Pi))
endfunction

#decompile

====0.847n
+	No copying of stack nodes when creating a class, to eliminate redundency.
+	Stack nodes need a WORD iFunction which is an idenfifier that is unique (within a class) to 
+		a base function and its overloads. iFunc's are inhereted by child classes, so
+		they are not necessarily unique among functions declared in sibling classes.
	
///////////////////////////////////////////////////////////////////////////////
2-24-97

>>ustest

'ok
operator.1 add(a as integer, b as integer) as integer
	endoperator
operator.1 add(a as real, b as real) as real
	endoperator
operator.1 mul(a as real, b as vector) as vector
	endoperator
operator.1 mul(a as vector, b as real) as vector
	endoperator

'error: redefinition
operator.1 add(a as integer, b as integer) as integer
	endoperator

engine function f()
endfunction

final function g()
endfunction

private function h()
endfunction

function i()
endfunction

state st
	' ok
	private operator.1 add(a as integer, b as integer) as integer
		endoperator
	final operator.1 add(a as real, b as real) as real
		endoperator

	function f() ' error: needs Engine specifier.
	endfunction

	Engine function f()
	endfunction

	function g() ' error: final
	endfunction

	function h() ' error: needs private.
	endfunction

	private function h()
	endfunction

	function i()
	endfunction

	' error: differs only by return type
	operator.1 mul(a as vector, b as real) as boolean
		endoperator
endstate

====0.847p
+	SNODE_FuncOverrideMatch contains flags that must match in an override.
+	Put function affectors like "Final" in front of word "Function", not after.
+	Allow overriding non-Final functions with Final functions.
+	Engine functions are overridable, non-overloadable functions called by the engine.
+		These use SNODE_Engine, and optionally SNODE_Private.
+		Prevent overloading engine functions.
+		This is how built-in messages are type checked. For example:
+			Declare [Private] [Engine] Function FuncName(parms) as Type

///////////////////////////////////////////////////////////////////////////////

>>ustest

declare function f()
declare final function g(a as integer)
'declare intrinsic function eirj(v as vector) as boolean

function hwf(a as integer, b as real) as texture
endfunction

function sqrt(a as integer) as integer: return 123

function wefok()
	return 777
endfunction

====0.847q
+	Function declaration.
+		SNODE_Defined indicates that a function has actually been defined.
+		Allow Basic style ':' for combining lines.
+		Stick SC_Return at end of function codestream, not "End".
+		Allow function forward declaration. 
+		PopNest must balk at declared functions that weren't defined but should have been.
+		Intrinsic functions may only be declared, not defined.
+		Engine functions may either be declared or defined.
+		All other functions must be defined.

+	Function definition.
+		Recognize definition after declaration, and remove prior definitions.

+	Fix iFunctions with definitions.
+	Functions in state blocks must properly override.

>>ustest

Declare Function f(a as integer, b as integer) as boolean
Declare Function g(a as vector, b as vector) as rotation
Declare Final Function h()

'Declare Function g(a as vector, b as vector) as rotation 'err: dupe

Function g(a as vector, b as vector) as rotation
	'return vector(1,2,3)
	return rotation(1,2,3)
EndFunction

Final Function h()
EndFunction

Function f(a as integer, b as integer) as boolean
EndFunction

Function Test()
	'Eval f(1,2)
	'Eval g(vector(1,2,3),Location)
	'Eval h()
EndFunction

State st
	Function g(a as vector, b as vector) as rotation
		'return vector(1,2,3)
		return rotation(1,2,3)
	EndFunction
EndState
#decompileall

///////////////////////////////////////////////////////////////////////////////

====0.847r
+	Generalized function overloading and comparing.
+		Easy overload determination via:
+			int CompareFunctions(FClassProperty *List1,int Num1,FClassProperty *List2,int Num2).
+		Returns:
+			-1 = incompatible functions.
+			 0 = exact match.
+			 1 = promotions + string length conversions.
+			 2 = truncations.

>>ustest

function f(i as integer)
endfunction

function Test
	Dim a as integer
	Dim b as byte
	Dim c as real
	Dim d as vector
	Eval f(a) ' identity
	Eval f(b) ' truncation
	eval f(c) ' promotion
endfunction

>>ustest

function f(b as byte) as integer
endfunction

function g(i as integer) as integer
endfunction

function h(v as vector) as integer
endfunction

function i(r as rotation) as integer
endfunction

function j(r as real) as integer
endfunction

function k(a as pawn) as integer
endfunction

function l(fwef as edrawtype) as integer
endfunction

function m(fwef as texture) as integer
endfunction

function test()
	Dim actor1 as pawn
	Dim actor2 as actor
	Dim actor3 as brute

	Eval f(1)
	Eval g(1)
	Eval j(1.0)
	Eval h(Vector(1,2,3))
	Eval i(Rotation(1,2,3)) ' ???
	Eval m(None)
	Eval k(NoActor)
	Eval k(actor1)
	Eval k(actor3)
	eval l(DT_None)
	Eval m(Texture(Default)) ' error
	eval a(LE_None) ' error
	Eval k(actor2) ' error
	Eval f(Rotatation(1,2,3)) ' ???
	Eval rth(byte(1),vector(1,2,3),0,NoActor)
endfunction

+	Returning arrays isn't allowed.
X		Can't use this mechanism -> Fails when type sensitive expressions are
X		required like enum tags, so reverted to old (slower) parsing all function
X		calls approach.
X			Determining whether new functions are overloads or overrides of existing functions.
X			Finding the best matching function to call.
X			Matching functions with their forward declarations.

///////////////////////////////////////////////////////////////////////////////

>>ustest
function owfek(a as integer)
endfunction

function testout(a as Out real)
endfunction

function testout(a as real) ' bad
endfunction

function testout(a as Out real=123)
endfunction

declare final operator.1 add(a as integer, b as integer) as boolean
declare final operator.1 add(a as real, b as real) as real
declare final operator.1 add(a as integer, b as integer) as vector ' err
' req final

' incorrect err
Dim r as real=123
function testout(a as Out real=123)
endfunction

' private enforcement test.
private function f(a as integer) as real
endfunction

function g(a as integer) as boolean
endfunction

function test()
	eval f(1)
	eval g(2)
endfunction

+	Operator parameters must have no regular flags.
X	Function calling.
X		Balk when calling if multiple functions declarad at the same scope 
X			have the same rank.
+	Added LocalsSize indicating size of per-function local data.
+   No function overloading, just operator overloading. Too many added complexities.
+	Therefore, I don't need iFunction.
+	Kill iFunction, NumUniqueFunctions.
+	Operators must be Final.
+	Make sure CPF_Array, CPF_OutParm are matched for overrides/overloads.
+	No optional out parms.
+	Function calls must properly deduce arrays and strings.
+	Enforce SNODE_Private.
+	Engine functions may not be Final :-P
X	Prevent defined-but-not-declared engine functions from being called -> Must be done at exec calltime.
+	Func return values are nonlvalues.

function a(s as string(32)) as integer
endfunction

function test()
	Dim s as string(32)
	Dim t(3) as string(32)
	Dim u as string(15)

	Let s=t(1) ' no conv
	Let s=u ' conv

	Eval a(s)
	Eval a(t(1))
	Eval a(u) ' ok, requires length conversion
    'Eval a(t) ' error
	'Eval String(123)
endfunction
#decompile

+	Function calling.
X		Only evaluate and emit parms twice, not once per overload tested.
+		Built-in EX_ResizeString conversion function to modify length of nonarray string.
+		Must EX_ResizeString casts to String type to the proper type.
+		Eliminate CPT_Array junk.

///////////////////////////////////////////////////////////////////////////////

>>ustest
Function OurTest(A as Out Integer) as Boolean
EndFunction

Function Tester()
	Dim a as Integer
	Dim b as Real
	Dim c as String(5)
	Dim d as Byte
	Dim e(10) as Integer

	Eval OurTest(a)
	Eval OurTest(b)
	Eval OurTest(c)
	Eval OurTest(d)
	Eval OurTest(e(2))
	Eval OurTest(123) 'bad
	Eval OurTest(234.23) 'bad
	Eval OurTest(e) 'bad
EndFunction

+	Out parms.
+		Force "Out" parameters to be l-values by adding l-value support to CompileExpr.

>>ustest
DIM GA as INTEGER

Function Shistol(a as integer) as boolean
EndFunction

Function Pit(b as real) as real
EndFunction

Function MyTest()
	Eval Shistol(123)
	Eval Pit(5.0)
	Eval Me.DrawType
	Eval Me.Parent.Zone.bWaterZone
	Eval Me.GA
	Eval Parent.GA 'error
	Eval Me.Shistol(123)
	Eval Me.Me.Me.Pit(1233.42)
	Eval Parent.Pit(666) 'error
	Eval Zone.miewciwrf(666) 'error
	Eval Me.ijerg(2342) 'error
EndFunction

Function SomeOtherActorTest()
	Dim E as Light
	Eval E.GA
	Eval E.Shistol(123)
	Eval Me.GA ' err
	Eval Shistol(123) 'err
	Eval Me.Shistol(123) 'err
EndFunction

+	Context function calls.
+		Properly support context function calls, and clean up context logic - CompileExpr?
+		CompileFunctionExpr needs logic to reach into other contexts.
+		Test cross class context function calls.

///////////////////////////////////////////////////////////////////////////////

>>ustest
Dim GA as Integer
Function BindTest()
	Eval GA
	Eval Me.GA
	Eval DrawType
	Eval Parent.Me.Zone.bFogZone
EndFunction
#decompile

>>ustest
Dim SomeGlobal as Integer

Function Test(a as real=1.23,b as vector=vector(1,2,3),r as integer=123) as integer
EndFunction

Function BindTest()
	Dim Tesrg(5) as integer
	Eval 123
	'Eval TestNormal()
	Eval Test(123,,666)
	Eval 456
EndFunction
#decompile

====0.847t
+	Don't add empty expression to end of function calls.
+	Function call decompiling.
+		EX_Function.
+		EX_FinalFunction.
+		Final function parms.
+		Track down the proper normal function call parms.
+		Decompile optional parms.

+	An overridden function to call is chosen by the following criteria, which is
+	guaranteed to produce one single best matching function without redundency.
+	1.	State functions residing in the current state in the current class are chosen before
+	    functions residing in the current state in the parent class.
+	2.	Global functions in the current class are chosen before global functions in the parent
+	    class.

+	Self-calls (calls from an actor to itself) are bound as follows.
+	Context-calls (calls from an actor through an actor variable) are bound identically.
+	*	Final functions are prebound to (ClassWhereFinalFuncIsDefined,iStackNode) in this class.
+	*	All other functions are calltime bound to their (FName) in this class, therefore
+	    operators (which may be overridden) must be Final to be uniquely bound.

///////////////////////////////////////////////////////////////////////////////
2-25-97

>>ustest

function PyrotechnicsTest(PawnA as integer, PawnB as Rotation) as Boolean
EndFunction

function LightTest(LightA as integer, LightB as Real) as Boolean
EndFunction

function Test()
	Dim XLight as Light
	Dim XPyrotechnics as Pyrotechnics

	' context calls.
	Eval XLight.LightTest(123,1.0)
	Eval XPyrotechnics.PyrotechnicsTest(456,rotation(1,2,3))
EndFunction
#decompile

====0.847u
+	Advanced functions.
+		Context function call decompiling.
+			EX_ContextFunction.
X		When declaring any function which uses the same name as a
X			previously-defined state-only function in a class's inheretance tree,
X			make sure the new one matches exactly. Otherwise you can end up with
X			incompatible functions called in derived classes. -> Caveat UnrealScriptor

+	Test three-class context traveral.
+	Verify state / class override order.
+	Verify self Final calls.
+	Verify self latebound calls.
+	Verify context Final calls.
+	Verify context latebound calls.
+	Retry all the test suites.

Declare Function f(a as integer) as integer
Declare Function g(b as boolean) as boolean
Declare Function h(c as real) as real

Function Test()
	Eval f(1)
	Eval g(True)
	Eval h(1.0)
EndFunction

Function f(a as integer) as integer
EndFunction

Function g(b as boolean) as boolean
EndFunction

Function h(c as real) as real
EndFunction

+	Test function declaration

+	Syntax changes.
+		[] denotes array.


///////////////////////////////////////////////////////////////////////////////

+	Operators
+		Operator precedence (highest to lowest) -- all operators are left to right.
10		++ -- (?Support these?)
12		Not BitNot ^
14		+ - (unary)
16		* / Dot Cross
18		Mod
20		+ -
22		<< >>
24		< <= > >= ==
26		<>
28		BitAnd BitXor BitOr
30		And Xor
32		Or
34		*= /= %= += -= (?Support these?)

+	All UnrealScript operator defs.
+	Allow intrinsic functions to be declared anywhere.
+	Fixed major realloc-the-rug-out-from-under-your-feet bug.

+	Intrinsic(internal id) syntax.
+	New, faster calling types.

>>ustest
Function f(a as integer) as boolean
endfunction

state st
	Function f(a as integer) as boolean
	endfunction
endstate

>>ustest

final operator(2) + (a as integer, b as integer) as integer
endoperator

final operator(1) * (a as integer, b as integer) as integer
endoperator

final operator(3) += (a as out integer, b as integer) as integer
endoperator

'final operator(1) +(a as integer, b as integer) as boolean 'error, obvious duplicate.
'endoperator

'final operator(1) +(a as real, b as real) as boolean
'endoperator

function test()
	Dim a as integer
	Dim b as byte
	a = 1+2+3+4
	Eval a += 1+2
	Eval 1 += 1+2 '!!
	'eval a+b
	'eval 1+b
endfunction
#decompile

====0.847v
+	Operators.
X		First parm type of a given operator overload must be unique.
+		Recognize operator calls.
+		Handle binary operators (no precedence).
+		Compile operator calls.
+		Properly manage operator precedence.
+		Write Unreal operator declarations.
+		Support += and the like? Yes, via OutParm's.

+	Need forward function declarations.
X	Need post-compile state and label insertion.

Function f(a as integer) as boolean
endfunction

state st
	Function f(a as integer) as boolean
	endfunction
endstate

+	Cleanup and rearrange script compiler by function.
+	Fix all outdated commands.


>>ustest
final operator(2) + (a as integer, b as integer) as integer
endoperator

final operator(1) * (a as integer, b as integer) as integer
endoperator

final operator(3) += (a as out integer, b as integer) as integer
endoperator

'final operator(1) +(a as integer, b as integer) as boolean 'error, obvious duplicate.
'endoperator

final operator(2) +(a as real, b as real) as boolean
endoperator

function test()
	Eval 1+2
	Eval 1+2.0
	Eval 2.0+1
	Eval 1.0+2.0
	Eval 1+vector(1,2,3)
	Eval vector(1,2,3)+1
	'Dim a as integer
	'Dim b as byte
	'a = 1+2+3+4
	'Eval a += 1+2
	'Eval 1 += 1+2 '!!
	'eval a+b
	'eval 1+b
endfunction
#decompile

>>ustest

final operator(2) + (a as integer, b as byte) as integer
endoperator

final operator(2) + (a as byte, b as integer) as integer
endoperator

final operator(2) += (a as out byte, b as byte) as byte
endoperator

function test()
	Dim a as byte, b as byte
	Eval 1+2
	Eval a+b
	Eval a+=b
	Eval a+=DrawType
	Eval 1 += b
	Eval DrawType+=a'error
endfunction
#decompile

====0.847w
+	ConversionCost (Dest, Source):
+		0 if types are identical.
+		1 if dest is more precise than source
+		2 if converting to float from integral type.
+		3 if dest is less precise than source, or a generalization of source
+		MAXINT if the types are incompatible

+	Operators continued.
+		Properly deduce operator overloads.
+		Verify OutParms, i.e. prevent 1+=2
+		Balk at multiple identical weight conversions.

///////////////////////////////////////////////////////////////////////////////
2-26-97 & 2-27-97

====0.847x
+	PopNest shouldn't emit code end (SC_ReturnFinal, SC_End).
+	No stack nodes for tempoarary stack things like While.
+	Decompiler option to show start addresses of commands.
+	UnrealScript state machines and code generation.
+		If-ElseIf-Else state machine.
+		While/Do-Until/Loop
+			CheckAllow LoopCmd.
+			Loop Break.
+		For-Next.
+		Select/Case state machine.
+	Switch, Let must not allow arrays.

+	Address fixup prep:
+		Fixup typedefs.
+		Proper evaluation of For condition at end of loop.

Function TestIf()
	If True then
		Eval 1
	ElseIf False then
		Eval 2
	ElseIf False then
		Eval 3
	Else
		Eval 4
	EndIf
EndFunction
#decompile

Function TestWhile()
	Do
		Eval 1
	Loop
	While True
		Eval 2
	Loop
	Do	
		Eval 3
	Until False
	While False
		Eval 3
		Break
		Eval 4
		Break
	Until False
EndFunction
#decompile

Function TestFor()
	Dim a as integer, q as integer
	next
	for( a=1; True; 123 )
		Eval 567
		break
		Eval 789
	next
EndFunction
#decompile

Function TestSwitch()
	Dim r as EDrawType
	Switch r
		Case DT_None:
			Eval 123
		Case DT_Brush:
			Eval 456
		Default:
			Eval 789
		'Default:
			'Eval 123
	EndSwitch
EndFunction
#decompile

' Name evaluator test.
Function NameTest()
	Dim MyTest as Name
	Eval Name(LE_None)
	Eval LE_None
	Let MyTest=Name(LE_None)
	Let MyTest=LE_None
EndFunction
#decompile

====0.847y
+	Address fixup:
+		PopNest perform the fixup list and detect inconsistencies.
+		Linked list of fixup offsets and types.
+		For-Next, Break.
+		For needs to support Break.
+		Do/While-Until/Loop, Break.

+	Conditionals fixup.
+		If-ElseIf-Else.
+		Formalize chaining system for if's.
+		Switch-Case-Default.

====0.847z
+	Compiler automatically recognizes name constants in name context.

+	States.
+		No nesting of states.
+		No variable declarations after code or functions.
+		No functions after code.
+		States must begin with a label (any label).
+		Require all state functions before all state code.
+		State code start is messed up by code stored in per-state functions.
+		Proper state inheretance.
+		Handle 'Auto', 'Editable' state keywords.

///////////////////////////////////////////////////////////////////////////////
2-28-97 Fri

+	UnrealScript probe support.
+		Hardcoded actor messages in the range X to X+63 can be tagged as probes.

+	Trip to prospective licensee.

///////////////////////////////////////////////////////////////////////////////
3-1-97

' State example.
Function f()
EndFunction

State st
	Ignores GainedChild, Spawned, Trigger, All

	Function h(a as integer) as Boolean
	EndFunction

	Function f()
	EndFunction

Begin:
	Eval h(777)
	Eval 123

Doophyz:
	Eval 456

Testholio:
	'Goto Begin
	'Goto Doophyz
	'Goto Testholio

EndState
#decompile

+	Probes.
+		FStackNode state probe bits (QWORD mask).
+		Added AActor::WantsProbe function to determine whether a particular probe
+			message is desired.
+		Allow 'Ignores' specifier in class, state to specify ignored probes.
+		Recursively build after compile for *defined* functions only.
+		Optional, hardcoded Sub BeginState/Sub EndState to assure state-change cleanup.
+		Per-actor disable-mask with special 'all' field.
+		Functions starting with "Server" must use special parm format.

>>ustest
' Boolean test
Function f()
	Dim a as integer
	Dim r as real
	Dim s[20] as integer
	dim b as boolean
	dim ba[20] as boolean

	eval a
	eval r
	eval s
	eval s[1]
	eval b
	eval ba[1]
EndFunction

>>ustest
' Function emit test.
Declare Intrinsic(1) Function A()
Declare Intrinsic(2) Final Function B()
Declare Intrinsic(1234) Function C()
Declare Intrinsic(1235) Final Function D()
Function E()
EndFunction
Final Function F()
EndFunction

State St
Begin:
	eval A()
	eval B()
	eval C()
	eval D()
	eval E()
	eval F()
EndState
#decompile

====0.848a
+	Advanced labels.
+		Actor.GotoState State.Label ' execution time bound, callable direct or via context, deferred execution
+			Where the names can be name const's or name variables.
+		Actor.IsEnabledFunction(<engine_function_name>)
+		Actor.IsLabel(<label_name>)
+		Actor.IsState(<label_name>)
+		Allow defining labels with LabelName:

+	Auto-emit EX_EndFunctionParms as last function call parm, so function calls
+		need not traverse the function parms (operators too).
+	Remove DecompileExpr's need to know about type (boolean violation).

+	EX_IntinsicFinal(0x80) for intrinsics 1-127.
+	EX_IntrinsicFinalEx(0x40) for intrinsics 128-16383.

X	Decisions:
X		Use standard expression list syntax so there are only intrinsic functions, not commands,
X			and intrinsic parm parsing is identical to script parm parsing?
X		Commands and functions should be equivalant? -> Instead, I'm keeping the number
X		of commands to a minimum, opting to implement as much as possible as
X		intrinsic functions.

+	Goto & labels.
+		Build and maintain per-state label list (SC_LabelTable), align with SC_NOP.

>>ustest
' Actor cast test.
function f()
	Dim A as Actor
	Dim P as Pawn
	Dim S as Skaarj
	Dim I as Inventory
	Dim W as Weapon

	' Compatible assignments.
	Let A=P
	Let A=S
	Let P=S
	Let A=I
	Let A=W
	Let I=W

	' Ok casts.
	Let P=Pawn(A)
	Let S=Skaarj(P)
	Let S=Skaarj(A)
	Let W=Weapon(I)
	Let W=Weapon(A)
	Let I=Inventory(A)

	' Never useful casts.
	'Let P=Pawn(I)
	'Let P=Pawn(W)
	'Let S=Skaarj(W)
	'Let I=Inventory(P)
	'Let W=Weapon(S)
endfunction
#decompile

====0.848b
+	EX_ActorCast dynamic actor casting function.

====0.848c
+	Decisions:
+		Support final labels and normal (virtual) labels.
+		Final labels are compile-time bound and not overridable.
+		Virtual labels are runtime bound and overridable.

+	'Enable'/'Disable' function to enable/disable probes/all individually per state.

>>ustest
function test()
	Dim v as vector
	Dim r as rotation
	Eval v
	Eval r
	Eval v.x
	Eval v.y
	Eval v.z
	Eval v.d
	Eval r.pitch
	Eval r.yaw
	Eval r.roll
endfunction
#decompile

+	Handle vector and rotation members, decompile them properly.
+	Separate out compiler-only code from UnScrEng.h into UnScrCom.h.

>>ustest

final postoperator ++ (a as out integer) as integer
endoperator

final preoperator ++ (a as out integer) as integer
endoperator

'final operator(10) * (a as integer, b as integer) as integer
'endoperator

function f()
	Dim r as integer
	Dim b as byte

	eval r++
	eval ++r
	eval b++
	eval ++b
endfunction
#decompile

====0.848d
+	Operators continued.
+		Unary postfix operators with "Operator/PreOperator/PostOperator".
+		Require oper parms match with declared type.
+		Defined pre and post ++, --
+		Define +=, -= etc for all types, not just integer.
+		Opers must check for OutParms.
+		Compile unary postfix operators calls.
+		Compile unary prefix operators calls.
+		Torture test unary and binary operators.

>>ustest
Intrinsic(014) Final PreOperator  +     (A as Integer               ) as Integer
Intrinsic(018) Final Operator(20) +     (A as Integer, B as Integer ) as Integer
Intrinsic(040) Final PreOperator  +     (A as Real                  ) as Real
Intrinsic(068) Final Operator(20) +     (A as String[256], B as String[256]    ) as String[256]
Intrinsic(082) Final PreOperator  +     (A as Vector                 ) as Vector
Intrinsic(099) Final Operator(20) +     (A as Rotation, B as Rotation) as Rotation

Intrinsic(007) Final Operator(34) +=    (A as Out Byte, B as Byte ) as Byte
Intrinsic(033) Final Operator(34) +=    (A as Out Integer, B as Integer ) as Integer
Intrinsic(056) Final Operator(34) +=    (A as Out Real, B as Real   ) as Real
Intrinsic(075) Final Operator(34) +=    (A as Out String[256], B as String[256]) as String[256]
Intrinsic(095) Final Operator(34) +=    (A as Out Vector, B as Vector) as Vector

function f()
	Dim a as integer
	Dim b as byte
	Dim c as real

	'eval 1+2*3^4
	'eval a++ + ++a
	'eval a + b
	eval a += b
	'eval b += a
endfunction
#decompile

>>ustest
' Real-number operators.
Intrinsic(040) Final PreOperator  +     (A as Real                  ) as Real
Intrinsic(041) Final PreOperator  -     (A as Real                  ) as Real
Intrinsic(042) Final Operator(12) ^     (A as Real, B as Real       ) as Real
Intrinsic(043) Final Operator(16) *     (A as Real, B as Real       ) as Real
Intrinsic(044) Final Operator(16) /     (A as Real, B as Real       ) as Real
Intrinsic(045) Final Operator(18) Mod   (A as Real, B as Real       ) as Real
Intrinsic(046) Final Operator(20) +     (A as Real, B as Real       ) as Real
Intrinsic(047) Final Operator(20) -     (A as Real, B as Real       ) as Real
Intrinsic(048) Final Operator(24) <     (A as Real, B as Real       ) as Boolean
Intrinsic(049) Final Operator(24) >     (A as Real, B as Real       ) as Boolean
Intrinsic(050) Final Operator(24) <=    (A as Real, B as Real       ) as Boolean
Intrinsic(051) Final Operator(24) >=    (A as Real, B as Real       ) as Boolean
Intrinsic(052) Final Operator(24) =     (A as Real, B as Real       ) as Boolean
Intrinsic(053) Final Operator(26) <>    (A as Real, B as Real       ) as Boolean
Intrinsic(054) Final Operator(34) *=    (A as Out Real, B as Real   ) as Real
Intrinsic(055) Final Operator(34) /=    (A as Out Real, B as Real   ) as Real
Intrinsic(056) Final Operator(34) +=    (A as Out Real, B as Real   ) as Real
Intrinsic(057) Final Operator(34) -=    (A as Out Real, B as Real   ) as Real

' Real-number functions.
Intrinsic(058) Final Function     Abs   (A as Real                  ) as Real
Intrinsic(059) Final Function     Sin   (A as Real                  ) as Real
Intrinsic(060) Final Function     Cos   (A as Real                  ) as Real
Intrinsic(061) Final Function     Tan   (A as Real                  ) as Real
Intrinsic(062) Final Function     Atn   (A as Real                  ) as Real
Intrinsic(063) Final Function     Exp   (A as Real                  ) as Real
Intrinsic(064) Final Function     Log   (A as Real                  ) as Real
Intrinsic(065) Final Function     FRand (                           ) as Real
Intrinsic(066) Final Function     Sqrt  (R as Real                  ) as Real
Intrinsic(067) Final Function     Square(R as Real                  ) as Real

+	Operator torture test
+		Decompile has a context bug with +=.
+		EX_EndFunctionParms problem?

///////////////////////////////////////////////////////////////////////////////

>>ustest
Function f()
	Goto HisLabel
MyLabel:
	eval 123
YourLabel:
	Eval 234
HisLabel:
	Eval 345
	Goto MyLabel
	Goto YourLabel
	'Goto YourMama
EndFunction

>>ustest
State st
Begin:
	eval 123
TestLabel:
	eval 234
Frank:
	eval 345

	' Goto test.
	Goto Begin
	Goto TestLabel
	Goto Frank
EndState
#decompile

State st
TestLabel: ' override
NewLabel:
	Goto Begin     ' inheret
	Goto TestLabel ' override
	Goto NewLabel  ' new
EndState
#decompile
///////////////////////////////////////////////////////////////////////////////
3-3-97

====0.848e
+	Goto & labels.
+		Allow final labels and Goto in functions.
+		SC_GotoNearCode wOffset ' compile time bound.
+		Require states to have a Begin label, GotoState default to it.
+		State goto codec.
+		Virtual labels in states.
+		Note duplicate labels in functions and states.
+		Inheret labels, including Begin.

+	Make sure script stream is easily decompilable.

>>ustest
function f()
endfunction
function g()
endfunction

state st
	function f()
	endfunction
	function h()
	endfunction
begin:
	eval callclass(wefj) f()
	eval callclass(light) f()
	eval callclass(actor) f()
	eval callglobal f()
	eval callglobal g()
	eval callglobal h() 'err
endstate
#decompile

function f()
	Dim a[11] as integer
	Eval a[1]
endfunction

SCRIPT DECOMPILE CLASS=Light

====0.848h
+	Need a way of calling a specific, prebound stack node for a function:
X		Possibility 1:
X			ClassName::FuncName   - function as stored in class.
X			::ClassName::FuncName - function as stored in class but not state.
+		Possibility 2:
+			CallGlobal Func(parms) ' Calls nonstate version of function
+			CallClass(ClassName) Func(parms) ' Calls version in parent class
+			I like this the best because it's readable and easily parseable.
+		These are called as final functions (normal or intrinsic).
+		CallGlobal.
+		CallClass.

====0.848h
+	File code.
+		Stack node serializer.
+		Can reduce code size or stack node size anywhere? Unionize?
+		Script serializer.

+	Serialize rotations as WORD's internally.

+	Properly recognize resource names in their context.

///////////////////////////////////////////////////////////////////////////////
3-4-97

>>ustest
function f()
{
	dim A as real, B as real, C as real, D as real
	eval a + b
	eval a * b
	eval a + b * c
	eval a + b * c ^ d
MyLabel:
	goto MyLabel
}

state st
{
	Function f()
	{
		let LightType=LT_None
	}
Begin:
	eval 123
	eval 1
	eval True
	eval 1.0
	eval Vector(1,2,3)
	eval Rotation(1,2,3)
	eval Texture(Default)
	eval Name(Eigen)
MyLabel:
	goto MyLabel
}
#decompile

>>ustest
class Light expands Actor;

enum ETest
{
	TEST_123,
	TEST_456,
	TEST_567
};

function f()
{
	Dim a as int;
	Dim b as bool;
	Dim c[2] as float;
	Eval a;
	Eval "123/**/";
	Eval "*/";
}

state st
{
begin:
	switch 123
	{
		case 1:
		case 2:
			eval 1;
			break;
		case 2:
			eval 2;
		default:
			eval 3;
	}
	eval 4
}
#decompile

>>ustest
class Light expands Actor;

====0.848i
+	Fix saving and restoring of class upon error.

+	Use Java syntax.
+	Java // comments.
+	Java semicolons.
+	functions require {}
+	Java enum syntax.
+	Java /* */ comments.
+	float, int, bool.
+	State/EndState.

====0.848j
+	Switch/EndSwitch.
+	Switch like C, with Break required otherwise fall through.
+	Case/Default.

====0.848k
+	For/Next.
+	While/Do.
+	Until/Loop.
+	Move all end-thing logic to PopNest.

+	If/ElseIf/Else.

+	Nest // comments in /* */ comments.

class Light expands Actor;
dim editable(yamada) string[20] x[2];
function f()
{
	Dim int a;
	while( True )
	{
		eval 1;
		break;
		eval 2;
	} until( False );
	eval 3;
	for( a=0; True; 123 )
	{
		eval 1;
		break;
		eval 2;
	}
	eval 3;
	if( True )
	{
		Eval 1;
		Eval 1;
	}
	Else If( True )
	{
		Eval 2;
		Eval 2;
	}
	Else If( False )
	{
		Eval 3;
		Eval 3;
	}
	Else
	{
		Eval 4;
		Eval 4;
	}
}
#decompile

>>ustest
class Light expands Actor;

dim int        Tim[2];
dim string[20] Bob;
dim float      MyFloat=3.14;

function vector f( int a, out byte b )
{
	return vector(1,2,3);
}
#decompile

>>ustest
class Light expands Actor;

function f()
{
}

function g()
{
	//Broadcast.f();
	Broadcast(NoName,Light).g();
}

====0.848m
+	SetPropertyFlags
+	SetPropertyType

+	How to broadcast messages.
+		Broadcast(Name=None,Class=Actor).funccall()
+		SC_Broadcast <name_expr> <class_expr> <class func_call_expr - final or virtual>
+		Properly recognize broadcast class's context.
+		Properly decompile broadcast class's context.
+		Properly load/save broadcasts.

X	Merge enum defs with enum variable decls.
+	Decompile string sizes.

+	Update decompiler.
+	Clean all error messages.

+	GetVarType.
+		Replace GetVarDecl with GetVarType, GetVarNameAndDim.

class Light expands Actor;

var Rotation R=Rotation(1,2,3);

function h(string[16] b)
{
}

function Bool f(Vector v, Out Rotation Rot)
{
}

state st
{
Begin:
	eval h("Hello!");
	eval f(vector(1,2,3),R);
}
#decompile

====0.848n
+	Merge enum declaration with variable declaration.
+	Allow declaring multiple variables in one dim.
+	Improved constant initializer handling.

+	Merge function return types with function specifiers.

X	Vars.
X		GetVarType accumulate function overrides, too.
X		Dim: Use GetVarType, error if func overrides.
X		Function: use GetVarType for parameters, error if illegal overrides.
X		Function: use GetVarType for return value, error if illegal overrides.

X	Figure out evaluation scheme.
X		Java variable declaration syntax.
X		Java function declaration syntax.
X		Assign variables straight from code.
X		Call functions straight from code.

X	var_overrides...  var_type  var_overrides...  varname [,varname...];
X	func_overrides... func_type func_overrides... funcname(parms) {}
X	varname = expr;
X	funcname(parms);

X	func overrides:
X		intrinsic(#)
X		final
X		engine
X		private
X		declare
X		operator(#)
X		preoperator
X		postoperator

X	if not a recognized standard cmd:
X		init retry
X		skip overrides until we get type name
X		if got type name
X			get instance name
X			get ( or not.
X				got it -> function def, so retry and parse func.
X				not -> variable def, so retry and parse var.
X		not got type name
X			is it [let] name= -> variable
X			is it [callglobal] [callclass] name( -> func call
X			else unrecognized

+	Statics with new syntax.
X	New operator syntax.
+	Update all classes.
+	Rebuild root.

+	Fixed panning bug - was a base dislocation problem.

//////////////////////////////////////////////////////////////////////////////
3-5-97

====0.848o

	How intrinsic functions are handled in a way that's fully backwards-
	compatible with the old AActor::Process functions:

	Intrinsics are defined like:
	int AActorDerivedClass::FuncName
	(
		ULevel						*Level,
		FName						Message,
		PMessageParmsDerivedClass	*Parms 
	);

	For an intrinsic function, Message is redundent -- it's always set to the
	name of the intrinsic function.  For a ::Process function, Message is the name
	of the message to be processed and you can do a switch() on it.

+	Defined execution runtime classes.
+	Added script exec info to actor class.
+	FExecStackMain PostLoad init vfcache.
+	FExecStackMain InitForExecution.

+	Initial level load:
+		Do InitForExecution for all, then BeginExecution.
+		Later level loads must skip this.

+	AScript::Process.
+		Look up function and succeed or fail.
+		Human PlayerTick test.
+		FStackNode needs ParmsSize.
+		Code executor.

+	Implement commands.
+		Return.
+		Nop.
+		Local goto.

// PlayerTick.
engine function PlayerTick( float DeltaTime )
{
	eval 123;
	eval 12345;
	eval 0;
	eval 1;
	eval vector(1,2,3);
	eval rotation(1,2,3);
	eval 3.14;
	eval name(TimmyTimTim);
	eval texture(Default);
	eval NoActor;
	eval Level;
}

// PlayerTick.
engine function PlayerTick( float DeltaTime )
{
	eval "Test";
	eval vector(string(vect(1.5,2.5,3.5)));
	eval rotation(string(rotation(3,4,5)));
}
#decompile

+	Implement expression evaluation.
+		Integer consts.
+		All remaining consts.
+		String consts.
+		Bool consts.

+	Implement type conversions.
+		Int to other types.
+		Byte to other types.
+		Real to other types.
+		Bool to other types.
+		Actor.
+		Resource.
+		Name.
+		Vector to other types.
+		Rotation to other types.
+		String.
+		Check twowayness of all string conversions: int, byte, bool, vector, rotation.

///////////////////////////////////////////////////////////////////////////////

class TestDescriptor expands ZoneDescriptor;

// PlayerTick.
engine function PlayerTick( float DeltaTime )
{
	eval 123;
	eval LevelDescriptor(Zone); // ok
	eval TestDescriptor(Zone);  // not ok
}
#decompile

====0.848p
+	Variables.
+		Globals.
+		Locals.
+			Set locals bin when recurse / unrecurse into function.
+			Copy initialized locals data.
+		Statics.
+		Arrays with bounds checking.
+		Boolean vars.
+		Context variables (Level).
+	String initializers don't work: var string[64] GS="String";
+	Actor cast.

///////////////////////////////////////////////////////////////////////////////

// PlayerTick.
var out int a;
engine function PlayerTick( float DeltaTime )
{
	eval callparent.sin(1.0);
	eval callglobal.sin(1.0);
	eval callclass(Pawn).sin(1.0);
}
#decompile

====0.848q
+	Basics.
+		CallParent.
+		Decompile dims properly.
+		Translate return value into let + return for generality.

+	Engine to script calls.
+		Simple calls work.
+		Return value use outparm.

///////////////////////////////////////////////////////////////////////////////
3-6-97

function bool q(int a, out int b) {}

// PlayerTick.
engine function float PlayerTick( float DeltaTime )
{
	local int a;
	local byte b;
	local vector v;

	eval 123;
	eval Byte(123);
	eval Int("132");
	eval q(b,b);

	eval v;
	eval v.x;

	for( a=0; True; 123 )
	{
	}

	switch( "123" )
	{
		case "Boo!":
		case "Hello!":
		default:
	}

	let drawtype=dt_none;
	let Zone.Title="MyZone";
	let location=vect(1,2,3);

	return 1.0;
}
#decompile

#decompile
	
====0.848r
+	For.
+	Let.
+	Return type.
+	eval size not type.
+	Eval.
+	Switch size not type.

+	Eval func ret vals.
+	Conversions must set ElementSize.
+	Autoconversions must set ElementSize.
+	Constants must set ElementSize.

function string[40] st(string[10] a, string[20] b)
{
	let a=b;
	let b=a;
	let a="tim";
	let a="this const string is way too long!";
	return a;
}

function f()
{
	local string[20] a;
	local string[30] b;
	
	eval a;
	eval b;
	eval st(a,b);

	switch(a)
	{
		case a:
		case b:
		case st(a,b):
		case "test":
	}
}
#decompile

+	Changed "var editable(cat)" syntax to "var(cat)" for brevity.

+	Pondering:
+		How to handle variable assignments?
+			Use SC_Let, not an assignment operator.
+			Need to prepend length (in bytes) in SC_Let, but not type!
+			Let doesn't need type.
+			Conclusion: Assignment must be primitive, otherwise it's infinitely recursive.
		How to handle OutParms?
			Regular OutParms.
				Copy after call.
			Array OutParms.
				Copy after call.
			String OutParms.
				Copy after call.
			Bool OutParms.
				Copy after call, with masking.
		How to handle return values?
			When called in an assignment situation.
			When called in a useage situation.
			When called without wanting return values.

+	Strings.
+		EX_TruncString only needs dest size.
+		ResizeString -> EX_TruncString only.
+		Must set const string ElementSize so that truncing occurs when needed.
+		Autotrunc const strings.
+		Don't allow string[256];
+		String return values.

// PlayerTick.
engine function float PlayerTick( float DeltaTime )
{
	local bool a=false, b=true, c=true, d=true, e=false;

	let c=false;

	eval "Dump:";
	eval a;
	eval b;
	eval c;
	eval d;
	eval e;
}
#decompile

// PlayerTick.
engine function float PlayerTick( float DeltaTime )
{
	local byte a=1, b=2, c=3, d=4;

	let a=10;
	let b=20;
	let c=30;
	let d=40;

	eval "Dump:";
	eval a;
	eval b;
	eval c;
	eval d;
	eval e;
}
#decompile

====0.848s
+	Integrated Ammon's BMP import code.
+	Eval needs type tagging.
+	Assignments.
+		Assert func parm size != 0.
+		Implement SC_Let.
+		Let class enforce hierarchy.
+		Let string seems not to work.
+		Let arrays should work.
+		EmitLet.
+		Let bool work safely.
+			Let, LetBool.
+		Properly compile bool return.
+		Prohibit bool arrays.
+			Let1, Let4, LetString.

engine function float PlayerTick( float DeltaTime )
{
	local   int a;
	local 	int b=1;
//	local   int r={1};
	local 	int c[3];
//	local   int w[4]=1;
	local 	int e[3]={1};
	local 	int f[3]={1,2,3};
	local 	int g[3]={1,2,3,4};//err

	eval f[0];
	eval f[1];
	eval f[2];
}
#decompile

====0.848t
+	Array initializers (may be partial, but may not overflow).
+		InitPropertyData.
X		Decompile initializers -> don't need it.
X		Decompile semis -> don't care.

///////////////////////////////////////////////////////////////////////////////

final function f( int a=10, int b=20, int c=30 )
{
	eval a;
	eval b;
	eval c;
}

// PlayerTick.
engine function float PlayerTick( float DeltaTime )
{
	eval "begin";
	eval f(1);
	eval "end";
}

+	New OutParms code.
+		Make sure casts and actor casts can't be used as outparms.
+		Make sure OutParms can't violate class hierarchy.

X		Can direct-map return values, rather than double copying?
+		Final functions now use stack node links.

+		Script to script function calling.

///////////////////////////////////////////////////////////////////////////////

+	New ExecuteExpression approach.
+	AddParentProperties should not add per function properties!
+	PerFunction booleans are forced to be unpacked, simplifying function call logic.
+	Eliminated EX_Nothing.
+	Default properties work.
+	No boolean outparms (boolean return values are allowed, though).
+	Variables passed to functions aren't right.
+	Copyback outparms test.

///////////////////////////////////////////////////////////////////////////////

final function vector f( int a=10, int b=20, int c=30 )
{
	return vect(1,2,3);
}

final function float xtest(float a)
{
	return pi;
}

// PlayerTick.
engine function float PlayerTick( float DeltaTime )
{
	eval f(1);
	eval xtest(1.2);
}
#decompile

====0.848u
+	Full copyback outparms.
+	Handle return values.

///////////////////////////////////////////////////////////////////////////////
3-8-97

+	Process functions:
+		GLevel or Actor->Level.
X		No return val; must explicitly default to call parent -> return int.
+		MAX_INTRINSICS
+		REGISTER_INTRINSIC(Num,FuncName);

+	Copyroot.

+	Script to engine calls (intrinsics).
+		Patch stack node with precomputed intrinsic function pointers.

// PlayerTick.
engine function PlayerTick( float DeltaTime )
{
	eval "Test:"
	eval True || False;
	eval True && False;
}
#decompile

====0.848v
+	Prepend sizes to func parms. Solves:
+		Copying back outparms and return values.
+		End tagging (zero).
+		Avoiding property traversal.
+	Retest operators.
+	Fix unary prefix operators.
+	Interscript function calls must not perform property traversal.
+	Handle engine to script return values and outparms.

+	Prepend 255 to outparms.
+	Append return offset!

====0.848w
+	Use CodeLabelOffset for return value offset.
	Intrinsic finals aren't allowed to have default values?
	Stuff parms for intrinsic calls.
	Update OutParms for intrinsic calls.

	Force intrinsic existance on compile.
	!!

+	Basic intrinsic rtl.
+		Boolean operators - && || ^^
+		Bytes ops.
+		Int ops.
+		Float ops.
+		Float funcs.
+		Vector ops.
+		Rotation ops.
+		Need bool compare ops.
+		String ops.
+	Verify intrinsic presence.
+	Rebuild root.

///////////////////////////////////////////////////////////////////////////////

====0.848x
X	ExecuteExpression cleanup.
X		Separate result (dest of copy) and var ptr -> don't always know size for copy.
	
+	Intrinsic finals:
X		Option 1.
X			No default parms.
X			Prepend total parm size = word.
X			Append return ofs = word.
X		Option 2.
X			Can have default parms.
X			Prepend class and stack node.
+		Option 3.
+			No default parms.
+			Store total parm size and return offset in intrinsics table.

+	New intrinsics registry.
+	FStackNode point to GIntrinsic -> no need.
+	New intrinsic calling.

+	Verify boolean equals.
+	Implement assert.

+	Functionality.
+		Jumps.
+		Conditional jumps.

+	Add:
+		Float approximately equal to operator ~=
+		Min(i,f)
+		Max(i,f)
+		Clamp(i,f)
+		Lerp(a,b,alpha)
+		Smerp(a,b,alpha) 
+		vrand() - random vector
+		Dist.

+	Build UnrealScript test suite.
+		Boolean ops.
+		Byte ops.
+		Int ops.
+		For.
+		Break.
+		Do/While - Until.
+		Conversions.
+		Float ops.
+		The newly added functions.
+		Vector ops.
+		Rotation funcs.

///////////////////////////////////////////////////////////////////////////////

====0.848y
+	Jump table based execution.
+	Optimize FExecStack: include actor pointer to reduce parm passing.
+	FExecStack ctor.

====0.848z
+	If a class doesn't process a message, it is now responsible for calling
+		its own parent, therefore all process functions have have no return value.
+	Special reverse-call messages like Spawn must be coded explicitly.
+	new class syntax: class name intrinsic(intrinsicprocess)
+	Intrinsic #0 = AScript::Process!
+	Switch to RegisterIntrinsic system for existing actor ::Process functions.

+	This is a very cool improvement -- it generalizes the relationship between
+	intrinsic and scripted classes, and it simplifies the code quite a lot.

+	If full rebuild, critical error on script throwf errors.
+	New #call directive for execing macros during rebuilds.
+	GEditor->Bootstrapping.
+	Eliminated Models.mac.
+	New #exec directive for executing command lines.

currently unused models:
#call ..\Models\DrkAngel.mac // Mesh "DarkAngel"
#call ..\Models\Sconce.mac   // Mesh "Sconce"
#call ..\Models\Branch.mac   // Mesh "Branch"
#call ..\Models\Firehand.mac // Mesh "Fireball"
#call ..\Models\Shark.mac    // Mesh "Shark"
#call ..\Models\Blob.mac     // Mesh "Blob"
#call ..\Models\Tentspik.mac // Mesh "TentacleSpike"

; Pawn sounds:
Audio Import File="..\Sounds\Pawns\BIGMAN1.ufx"  Name="BIGMAN1"  Family="Pawns"
Audio Import File="..\Sounds\Pawns\BIGMAN2.ufx"  Name="BIGMAN2"  Family="Pawns"
Audio Import File="..\Sounds\Pawns\BIGMAN3.ufx"  Name="BIGMAN3"  Family="Pawns"
Audio Import File="..\Sounds\Pawns\BIGMANH.ufx"  Name="BIGMANH"  Family="Pawns"
Audio Import File="..\Sounds\Pawns\BIGMANH2.ufx" Name="BIGMANH2" Family="Pawns"
Audio Import File="..\Sounds\Pawns\FGRUNT2.ufx"  Name="FGRUNT2"  Family="Pawns"
Audio Import File="..\Sounds\Pawns\FGRUNT3.ufx"  Name="FGRUNT3"  Family="Pawns"
Audio Import File="..\Sounds\Pawns\FSCRM1.ufx"   Name="FSCRM1"   Family="Pawns"
Audio Import File="..\Sounds\Pawns\FYELL1.ufx"   Name="FYELL1"   Family="Pawns"
Audio Import File="..\Sounds\Pawns\GROWL.ufx"    Name="GROWL"    Family="Pawns"
Audio Import File="..\Sounds\Pawns\MANTA2.ufx"   Name="MANTA2"   Family="Pawns"
Audio Import File="..\Sounds\Pawns\WHOOSH.ufx"   Name="WHOOSH"   Family="Pawns"
; Weapon sounds:
Audio Import File="..\Sounds\Weapons\AUTOMAG.ufx" Name="AUTOMAG" Family="Weapons"
Audio Import File="..\Sounds\Weapons\NAILGUN.ufx" Name="NAILGUN" Family="Weapons"
Audio Import File="..\Sounds\Weapons\NEWQUAD.ufx" Name="NEWQUAD" Family="Weapons"
Audio Import File="..\Sounds\Weapons\QUADRLN.ufx" Name="QUADRLN" Family="Weapons"

; Status bar Textures:
Texture Import File="..\Textures\StatBar\shell.pcx"     Name="StatShel" Family="!StatusBar" MIPS=off FLAGS=2
Texture Import File="..\Textures\StatBar\clip.pcx"      Name="StatClip" Family="!StatusBar" MIPS=off FLAGS=2
Texture Import File="..\Textures\StatBar\tarydium.pcx"  Name="StatTary" Family="!StatusBar" MIPS=off FLAGS=2
; Wall hit Textures:
Texture Import File="..\Textures\WallHits\bllt0001.pcx"  Name="bllt0001" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0002.pcx"  Name="bllt0002" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0003.pcx"  Name="bllt0003" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0004.pcx"  Name="bllt0004" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0005.pcx"  Name="bllt0005" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0006.pcx"  Name="bllt0006" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0007.pcx"  Name="bllt0007" Family="!WallHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\WallHits\bllt0008.pcx"  Name="bllt0008" Family="!WallHits" MIPS=off FLAGS=2
; Pawn hit Textures:
Texture Import File="..\Textures\PawnHits\blud0001.pcx"  Name="blud0001" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0002.pcx"  Name="blud0002" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0003.pcx"  Name="blud0003" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0004.pcx"  Name="blud0004" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0005.pcx"  Name="blud0005" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0006.pcx"  Name="blud0006" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0007.pcx"  Name="blud0007" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0008.pcx"  Name="blud0008" Family="!PawnHits" MIPS=off FLAGS=2
Texture Import File="..\Textures\PawnHits\blud0009.pcx"  Name="blud0009" Family="!PawnHits" MIPS=off FLAGS=2
; Explosion Textures:
Texture Import File="..\Textures\Explode\ex0.pcx"  Name="ex0" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex1.pcx"  Name="ex1" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex2.pcx"  Name="ex2" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex3.pcx"  Name="ex3" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex4.pcx"  Name="ex4" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex5.pcx"  Name="ex5" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex6.pcx"  Name="ex6" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\ex7.pcx"  Name="ex7" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp1.pcx"  Name="exp1" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp2.pcx"  Name="exp2" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp3.pcx"  Name="exp3" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp4.pcx"  Name="exp4" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp5.pcx"  Name="exp5" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp6.pcx"  Name="exp6" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp7.pcx"  Name="exp7" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\exp8.pcx"  Name="exp8" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0000.pcx"  Name="expl0000" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0001.pcx"  Name="expl0001" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0002.pcx"  Name="expl0002" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0003.pcx"  Name="expl0003" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0004.pcx"  Name="expl0004" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0005.pcx"  Name="expl0005" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0006.pcx"  Name="expl0006" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0007.pcx"  Name="expl0007" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0008.pcx"  Name="expl0008" Family="!Explosions" MIPS=off FLAGS=2
Texture Import File="..\Textures\Explode\expl0009.pcx"  Name="expl0009" Family="!Explosions" MIPS=off FLAGS=2
; Miscellaneous Textures:
Texture Import File="..\Textures\Misc\frbl0000.pcx"  Name="frbl0000" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0001.pcx"  Name="frbl0001" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0002.pcx"  Name="frbl0002" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0003.pcx"  Name="frbl0003" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0004.pcx"  Name="frbl0004" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0005.pcx"  Name="frbl0005" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0006.pcx"  Name="frbl0006" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0007.pcx"  Name="frbl0007" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0008.pcx"  Name="frbl0008" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0009.pcx"  Name="frbl0009" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0010.pcx"  Name="frbl0010" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0011.pcx"  Name="frbl0011" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0012.pcx"  Name="frbl0012" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0013.pcx"  Name="frbl0013" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0014.pcx"  Name="frbl0014" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0015.pcx"  Name="frbl0015" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0016.pcx"  Name="frbl0016" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0017.pcx"  Name="frbl0017" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0018.pcx"  Name="frbl0018" Family="!FireBall" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\frbl0019.pcx"  Name="frbl0019" Family="!FireBall" MIPS=off FLAGS=2
;
Texture Import File="..\Textures\Misc\flsh0001.pcx"  Name="flsh0001" Family="!MuzzleFlashes" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\flsh0002.pcx"  Name="flsh0002" Family="!MuzzleFlashes" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\flsh0003.pcx"  Name="flsh0003" Family="!MuzzleFlashes" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\flsh0004.pcx"  Name="flsh0004" Family="!MuzzleFlashes" MIPS=off FLAGS=2
Texture Import File="..\Textures\Misc\flsh0005.pcx"  Name="flsh0005" Family="!MuzzleFlashes" MIPS=off FLAGS=2
; Backdrop Texture:
Texture Import File="..\Textures\Backdrop\BlueSky.pcx"  Name="BlueSky" Family="Backdrops"

///////////////////////////////////////////////////////////////////////////////
3-9-97

====0.849a
+	Incode function calls.
+	Include preoperators.
+	Incode variable assignments, ==, ++, and +=
+		Any postoperator or binary operator with first outparm.
+	Clean, quiet validation execing.
+	Good error message when reffing undefed var.
X	Good error message when using assignment in expr.

///////////////////////////////////////////////////////////////////////////////

function f()
{
	me.f();
	parent.f();
	parent.zone.f();
}

+	Retest for assignment expr.
+	Improved compiler context handling.
+	Separate LevelResource and Level.
+	Handle "Level" context, actor cast context, actor returned from function context.
+	RequireSizeOfParm work with context, backout.
+	Check returntypeless context function calls.
+	Check return type checking.
X	Handle trivial constant context, like vect(1,2,3).x? Requires EX_AddOffset + byte?

X	Properly scoped static variables in functions and states?

function int f()
{
	eval level.zone;
	eval level.time;
	eval sizeof(123);
	eval sizeof(level);
	eval sizeof(level.location);
	eval sizeof(f());
	f();
	drawtype=f(); //err
	if( drawtype == f() ) // ok
	 ;
}
#decompile

///////////////////////////////////////////////////////////////////////////////
====0.849b
+	Merge sc's and ex's.
+	Fully decouple ExecuteExpression.
+	Jump table for expression tokens 0-255.
+	Merge code tokens with expression tokens.
+	Make exec code into one big expression evaluator.
+	Eliminate old SC_QuietEval, etc.

+	10M instructions, 5 sec = 2.0 mips = Twice as fast as the Apple ][+. :)
+	Redesigned intrinsic handling system.

+	Script loop optimizations.
+		Use code function pointer table.
+		Use expression function pointer table.
+		Inline the expression execution code.
+		Quiet eval parms needed?
X		Decompile binary dump and analyze it.

+	Give actors a level variable for optimization?

///////////////////////////////////////////////////////////////////////////////

function TestMips()
{
	local int i, j;
	for( i=0; i<3333333; i++ )
		j++;
	eval Level.Seconds;
}

====0.849c
+	GExecuters.
+		Rewrite all existing intrinsics.
+		New intrinsics registry.
+		Get everything working once again.

///////////////////////////////////////////////////////////////////////////////
3-10-97

====0.849d
+	Faster intrinsics.
X		Intrinsic finals: No prepend length.
+		New Executers registry.
+		Globalize intrinsic parm grabbing macros.
+		Register all intrinsics via macro.
+		Example code for registering an intrinsic.
+		Cleanup intrinsics code.
+		Actor - no level.
+		FExecStack - no level.
+		Process - yes level.

====0.849e
+	Graceful peractor overflow checking.
+	String ~= caps insensitive compare.
+	When an intrinsic wants to get a string, have it stack alloc temporary space for it.
+	Left, Right, Mid.
+	Caps
+	LetString perform automatic truncation?

====0.849f
+	Fix decompiler.
+	String concat.

====0.849g
+	Server script exec time GServer.ScriptExecTime.
+	Support resource semantics.
+	Actor, name, and resource operators.
+	Casting actors to integers.

+	Test suites.
+		bool vars
+		actor casts
+		string throughness conversions
+		all conversions
+		resources
+		goto

+	Need rotation ==, rotation !=

====0.849h
+	Better calling.
+		EX_BeginFunction.
+		EX_BeginFunction
+		EX_EndFunctionParms
+		Don't need EX_OutParm, don't need to prepend length.
+		Function calling via encoding parms in the function codestream.
X		Patch outparms in the return statement?
+		Retest the suites.
+		Allow default parms in intrinsics; must insert EX_Nothing there.

+	LevelDescriptor def prop cat.
+	Exec engine function calls.

///////////////////////////////////////////////////////////////////////////////
3-11-97

// Test short circuit logic.
final function bool TestShort( bool a, bool NeverCall )
{
	// If NeverCall, then we shouldn't be called due to short-circuiting.
	if( NeverCall )
		assert False;
	return a;
}

engine function PlayerTick( float DeltaTime )
{
	eval "Ok";

	// Test our function.
	assert TestShort(true,false)==true;
	assert TestShort(false,false)==false;

	// Test logic.
	assert (TestShort(false,false) && TestShort(true, false) ) == false;
	assert (TestShort(true,false)  || TestShort(false,false) ) == true;

	// Test short circuit logic.
	assert (TestShort(false,false) && TestShort(true, true) ) == false;
	assert (TestShort(true,false)  || TestShort(false,true) ) == true;
}
#decompile

====0.849i
+	Improved calling model.
+		Renamed ULevel::SendMessage to ULevel::Send because it conflicted with stupid Windows macro.
+		Inline ULevel::Send.
+		EX_Nothing for optional parms.
+		Cleaned up PTick, PPlayerTick.
+		AActor SlowAction property.
+		SNODE_SlowFunc: must be intrinsic w/ no outparms.
+		CPF_ShortParm allowed in intrinsics only.

+		EX_Skip + word relative offset.
+		P_GET_SKIP_OFFSET
+		&&, ||: Skip parm compiling, decompiling, loading, execing.
+		Functions returning booleans don't clamp to mask -> was locals 4-alignment problem.
+		Test recursion.

+		Mid: optional last parm.
+		Test optional parms in the suites, intrinsic and scripted.
+		Optimize engine calls to script functions.

///////////////////////////////////////////////////////////////////////////////

====0.849j
+	Select-case.
+	Select-case with strings (size=0).

====0.849k
+	Implement variable tick rate: one tick between rendering each camera.
+	Tasks need last absolute time.
+	Task tick routines need time deltas.
+	Base actor timers on seconds not moons or whatever stupid scale they're at now.
+	Level track delta time, clamp to reasonable max of 0.25 sec.
+	Clean up all timing variables.
+	Eliminated all use of Windows timers (except for Galaxy's of course).

//////////////////////////////////////////////////////////////////////////////

====0.849m
+	Execution context handling.
+		EX_Context + word skip_offset + byte bSize + byte initmask.
+		Handle EnumType==EnumTag matching via hint token.
+		Just need relative branch pointer to end of context expression, and a return
+			value snub: result data size, initbyte (0 or 255).
+		Use null context: warning.
+		LOG_ScriptWarn, LOG_ScriptLog
+		Test: Pass enum tags to function.
+		Test: Resource to string, name to string.
X		bStatic assignments & outparms: warning -> adds too much inefficiency.

====0.849n
+	Logging and string messages.
+		Intrinsic Log, Warn, Error, Fatal.
X		CR = const string -> never need to deal with cr's in this environ.
+		Concatenation $ operator, which forces autoconversion to string.
+		Functions support coersion.
+		Operators support coersion.

+	Kill EX_Eval
+	Kill string + operator.
+	Don't allocate locals bin for declared functions.
+	Don't allocate locals for intrinsic functions.
+	Added CPF_UninitParms for nonserializable parms.

///////////////////////////////////////////////////////////////////////////////
3-12-97

====0.849o
+	No "Declare" - recognize from context.

+	Function definitions.
+		All probe function definitions.
+		All engine function definitions.
+		Tick and PlayerTick should be probes? Or eliminate tick paradigm altogether?

+	Cleanup UnMsgPar.h.

+	Function calling.
+		Make sure intrinsics >256 work!
+		Test C++ calling unimplemented engine functions.

====0.849p
+	Engine function calling.
X		Script calling unimplemented engine functions: prepend bSize, bInit?
+		Or, just emit dummy code for engine function (but no probe mask).

+	Unify and cleanup Script/C++ -> Script/C++ calling.
+	Initializers provide type hint to GetToken.

+	intrinsic(256) final slow function Sleep( float Seconds );
+		Enforce calling slow functions only when ALLOW_SlowCmd.

+	SlowAction needs to be an integer intrinsic index.
+	Verify compile-time intrinsic existance.

====0.849q
+	Implement:
+		IsA
+		ClassIsA

///////////////////////////////////////////////////////////////////////////////
3-13-97 c0ded00d

+	Added REND SET MIPMULT=##

====0.849r
+	Probes:
+		IsProbing
+		State Ignores
+		Class Ignores.

+	Implement:
+		Enable
+		Disable

+		IsState with labels.

+	Let override an engine function without specing engine.
+	States: Only require a Begin: label in root states.
+	Clean up error compiling IsState(Name(goodname),badname).

====0.849r
+	States and labels.
+		Separated SC_Stop and SC_EndCode.
+		Make initial goto-state work for editable State name.
+		Implement virtual goto.
+		IsLabel
+		Goto (virtual)
+		GotoState
+		Rebuild classes.

+	Virtual functions.
+		Proper state scoping of functions.
+		Proper state transitions - single state gate.
+		Exec virtual function calls.
+		Exec virtual intrinsic function calls.
+		Test calling undefined engine functions.
+		Merge EX_Nothing and EX_NOP into EX_Nothing.

====0.849s
+	Virtuals.
+		EX_SlowFunctionResult.
+		Proper virtual function cache - with a slow debug mode.
+		Ponder slow function return hooks -- just a slow mode and return value *variable* ptr.
X		Optional, final function BeginState, function EndState per state.
X			This is not generally useful; can custom program state setting gate functions
X			in UnrealScript code and get more versatility.
X		Virtual label cache? -> Not needed.

+	Exec code problems to beware of:
+		PROPBIN_PerFunction management.
+		Handle calling Engine functions that have been declared but not defined.
+		Size of a given actor is constant; locals can be allocated on GMem.
+		Note And/Or operators are *NOT* short circuited.
+		ActorCast.
X	    Handle intrinsics just like Process() calls.
+		How to match up virtual functions really fast at execution call time -> VfCache.
+	    Safe string handling.
+		When setting state, must update probe mask and flush VfCache.
X		Must check for destroyed actor in all recursion entries and exits.
+	    100% safe reentrant FExec'ing among multiple actors.

///////////////////////////////////////////////////////////////////////////////
3-14-97

====0.849t
+	Slow execution.
+	State execution.
+		Special function to perform slow execution on actors, called immediately
+			after Tick/PlayerTick.

+	States Inheret SNODE_AutoState.
+	Startup, if no state name specified, use auto state.
X	Compile slow action calls with return values.
X	Slow action return value hook EX_SlowExecReturnValue for things like
X		switch/let/if based on slow function return value (however, slow functions
X		must not be nested.
X	Slow actions can't return values, unless someone provides a compelling reason
X		why they should be able to. To simulate, use a global variable for the result.

auto state Test
{
Begin:
	log("Timtim 1!");
	sleep(10);
	log("TimTim2!");
	sleep(10);
	log("TimTim3!");
	goto Begin;
}

///////////////////////////////////////////////////////////////////////////////
====0.849u
+	Cleanup classes & engine.
+		Rename Descriptor to Info.
+		New anim properties.
+		Eliminate GServer.Ticks.
+		GServer.TimeSeconds
+		Add UClass::AllPropertyFlags.
		Standardize indenting in the source.

///////////////////////////////////////////////////////////////////////////////

====0.849v
+	UnrealEd
+		Fix mesh viewer.
+		Syntax highlighting.
+		Syn #preprocessor things.
+		Create class below initial text needs fixing.
+		No deceptive file/save.

///////////////////////////////////////////////////////////////////////////////
3-15-97

====0.849w
+	Fixed whopping bug in "Retract" command!

====0.849x
+	UnrealEd
X		Shift uparrow/downarrow scroll in ed.
+		Script find: need goto-line-number button with current line shown.
+		Maximizing script editor window, then resizing the main form, causes error.
X		Ctrl right on text like "|Bool; abc" fix.
X		Results window hotkey.
+		Initial dble click on class name should move focus to the script window.
+		Proper syntax highlight timing.

+	More UnrealEd
+		DisableRedraw to prevent ugly updates.
+		CR carry the indent properly.
+		Bad start RTF
+		Script editor copy/paste is broken.
+		Multiple Undo.
X		Click recognition dies after a while -> can't duplicate.
+		Window placement: Compiler results, rebuilder, actor properties (everything after reload).

+	Changed class types:
+		Intrinsic class: A class which is built into the engine; dependencies exist in the engine code.
+		Standard class: A class which is shipped with an official product; should not be user modified.
+		User class: A class which a user has created and is distributing.
+		Standard(package) semantics: Engine, Unreal.

====0.849y
+	UnrealEd continued
X		Click on actor prop field should highlight its textbox.
+		Actor property rebel slider bug.
+		Rt click on actor popup, if single class, needs 'script' option.
+		Text buffer length inconsistency.
+		Added unguardres macro, info dumping unguard for UResource-derived class.

====0.849z
+	UnrealEd fixes.

///////////////////////////////////////////////////////////////////////////////
3-16-97

====0.850a
+		UnrealEd now is MDI.
+		Fixed user-interface snag.
+		Don't change focus to results window?
+		Fix stupid focus shifting when recompiling.
X		Always scroll bottom line of results window into view.
+		'subclass' popup option.
X		NextError / previousError / compile keys should work the same in result
X			windows as camera windows -> Paradigm is one-error-at-a-time.

+		Un-MDI-ize the script editing options.
+		Play level option.
+		Ctrl-P play.
+		Horizontal sliders are too wide.
X		Color picker for Mark?

var vector Original;

function BeginPlay()
{
	// Remember original location.
	Original = Location;
}

auto state FunkyAnimate
{
Begin:
	Location.x = Original.x + 96.0*sin(3.0*Level.TimeSeconds);	
	Location.y = Original.y + 96.0*cos(3.0*Level.TimeSeconds);
	bLightChanged=true;
	sleep(10);
	goto Begin;
}

+	UnrealEd
+		Level validation phase:
+			Critical: PlayerStart exists and is outside.
+			Critical: BSP is valid.
+			Critical: Scripts are compiled and linked.
X		Validate level before play.
+		Autoindent scans backward too far when 1 char on line.

====0.850b
+	UnrealEd C++ code.
+		Text msgs should disappear after a few seconds in UnrealEd.
+		Resync WateryShimmer timing.
+		UnrealEd dynlight timing bugs.
+		Backdrop.
+		Dithering should be position invariant - seems to have pan effect.
+		Typing 'rend bilinear' in UnrealEd loses focus!
X		Save classes below saves all classes instead.
X		Save "just class X and classes below it" needs a way of not traversing other
X			classes for save-tagging. However, it needs to import all of those classes
X			rather than null them out.
X		Work on this with UnrealFiles.

//////////////////////////////////////////////////////////////////////////////
UnrealEd alpha (version 0.85a) notes.

Major UnrealEd components which aren't finished:
* Online help: will be expanded and rewritten for the beta version.
* Terrain editing: aiming for April/May.
* Only run UnrealEd.exe (the editor). This version of game, Unreal.exe, 
  has unfunctioning player controls.

Minor problems:
* Installation program is temporary and will be cleaned up.
* Dynamic lighting timing is inconsistent with the game.
* Player controls don't work from within the editor; this will be fixed.

//////////////////////////////////////////////////////////////////////////////
3-17-96

====0.850c
+	Compile const at beginning of line problem.
+	UnrealEd delete: no 't' identifier.
+	indent bug??
+	Play needs command line camera-parent-window parm.
+	Rebuild root.
+	Don't allow actor references as per-class variables, to avoid linking problems.
+	Fixed unlink-actor bug which illegally traversed locals.
+	Implement Broadcast.
+	Class context broadcast.

+	UnrealEd needs restore-focus-window.
+	Rebuild classes.

//////////////////////////////////////////////////////////////////////////////
Tim audio merge notes:
+	Major changes to the semantics of resource class definitions, implementations.
+	Note that a "Serialize" function is now used for loading/saving.
+	There is no longer any need to pad the structures, since Serialize lets you load
    and save files with compatibility checking.
+	guard()/unguard changes.
+	Eliminated unnecessary resource functions QueryMinSize, InitData, etc.
+	Filled in the ???'s.
+	Eliminated SpecifySong(int).
	Renamed "family" to "set".

Notes:
+	Renamed SoundEng.lib to UnSound.lib, UfxEdit.lib to UnUfxEd.lib for consistency.
+	Making the sound playing code in UnrealEd a separate .exe was a good idea, since it
+	prevents UnrealEd from hogging the sound card.

Issues:
+	Hmm... Now I get a GPF on exit in the MFC code.

UnrealEd audio:
+	Spiffed up the menus.
+	Double clicking on sound effect plays it.
+	Music dialogs default to music dir.
	Hold sounds in memory as with textures.

Requests for Ammon:

Needed soon
-----------
* Can you make the sound effect "Test" button take effect immediately, so the user doesn't have to press the "Play" button on the dialog?
* How about preventing multiple copies of the test program from running? If a second copy is run, it could set focus to the first, WM_COPYDATA it its command line, and exit.
* I'm hearing a pitch shift that's proportional to my distance from a sound source (even when I'm standing still). Could something be wrong with your doppler code?
* Sound effect volume scaling 1.0 seem to be too quiet. What's the maximum allowable volume (is it 1.0)? It would be nice if the maximum volume were 1.0 and it were a lot louder than it is now.
* When playing sounds from UnrealEd, the ufx's echo and reverb. Can you turn off those effects in the editor? They also need to be disabled when the ReverbDepth(?) property is set to zero.
* As I stand and rotate around in Unreal, the sounds stereo-pan smoothly for a while, then when I reach a certain angle, the sound positioning switches abruptly from all-left to all-right. Stereo panning always needs to be smooth.

Needed later
------------
* Function to jump to a new track in the music, so we can do dynamic music.
* Can we get a new parameter for PlaySfxOrigined, PlaySfxPrimitive, and PlaySfxLocated which takes a frequency multiplier as a paramter, i.e. 1.0=normal speed, 2.0=twice the speed, 0.5=half speed?
* Need a volume parameter in PlaySfxPrimitive.

//////////////////////////////////////////////////////////////////////////////
3-18-97

====0.850d
+	Merged new sound code with engine.
+	Per-level music support.
+	Const ambient sound with AmbientSoundSet.
+	Make log window child of cmdline hwnd=

+	GT alpha ed 3/15.

//////////////////////////////////////////////////////////////////////////////
Unreal technology status

	* Definite, + Very likely, ? Maybe

	Epic teams:
	*	Epic/DE: Unreal
	+	Eclipse: The Circle
	+	Legend: Wheel of Time
	+	Digital Dimensions: Core
	?	Lion Entertainment: No immunity.
	?	?DMA?: Jazz II

	Spectrum/Microprose:
	*	Star Trek: Klingons
	*	Star Trek: Borg
	+	Unknown strategy game

	GTIS:
	*	Cyberlore: Emissary.
	?	Raven:
	?	A??: ??
	?	??: ??
	?	??: ??

	DMA:
	?	??

//////////////////////////////////////////////////////////////////////////////
3-19-97

// Light.
function f( satellite Other )
{
	rSuck();
	me.rSuck();
	other.rsuck();
	Other.Suck();
}
function rSuck()
{
}

// Satellite.
function Suck()
{
}

====0.850e
+	CLASS_Linked
+	UClass::Dependencies
+	Forward declaration of classes.
+		Class is either: Out of date, compiled, or linked.
+		Class dependency list with source code CRC's.
+		Proper f6 handling.
+		Decompile show dependencies.
+		Refuse to decompile *code* if unlinked.
+		Replace ScriptTextCRC, ParentTextCRC with natural dependencies.
+		UnrealEd when hit compile buttons, must save all scripts.
+		Before any compile, hierarchically downgrade all dependency info.
+		Update Make code.

====0.850f
+	Tossed out defined but not declared functions -- no such thing anymore.
+	Don't require forward declarations of functions anymore.
+	Retest the suites.

+	Two-pass compilation.
+		CLASS_Parsed
+		CLASS_Finished
+		Update initial class importer to perform postmake.
+		Compile current class balk if parent is uncompiled.

+	Clean up compiler error messages.

====0.850g
X	Screwed up.

//////////////////////////////////////////////////////////////////////////////
3-20-97

====0.850h
+	Fixed

====0.850i
+	Two-pass compilation setup.

====0.850j
+	Cleaned up compiler.

====0.850k
+	Split up CompileDecl and CompileStatement.
+	Completely skip CompileStatement during first-pass.
+	Make sure generated code size is zero after first-pass.
+	No dependency on parent actor (hardcode this).
+	Prep for second pass selective recompile.

====0.850m
+	Scrutinize and minimize FNestInfo.

====0.850n
+	Store line #, text position per stack node in place of.
+	iCode = line, Extra = char

//////////////////////////////////////////////////////////////////////////////
3-21-97

engine function wiojfwef();

function f()
{
	log("Hi!");
}

function g()
{
	log("Hi!");
}

var int g;
function int fq()
{
	local int a;
	a=DrawType;
	return g;
}

state emptyst
{
Begin:
}

state mystate
{
	function mystate_f()
	{
		log("mystate_f");
	}
	function mystate_g()
	{
		log("mystate_g");
	}
Begin:
	Log("mystate_code");
}

state codelessst
{
	function codelessst_f()
	{
		log ("Tim!");
	}
Begin:
}

state st
{
Begin:
	log("Hello!");
}

====0.850o
+	Second pass iterate through stack nodes.
+	Second pass selective recompile without affecting nesting info.
+	Fix allow flags
+	Handle empty functions.
+	Handle empty states.

====0.850p
+	State scoped funcs.
+	Clean up TWO_PASS defines.
+	IsProbing with declared-but-not-defined engine functions is broken.
+	Retest the suites.
+	No forward declarations.
+	Rebuild root.
+	Fixed Root.h generation problems.

====0.850q
+	Error saving trigger script -> was broadcast compilation problem.
+	Compiled line count is wacked.
+	Added Move, Teleport intrinsics.
+	Actor location is const.
+	Passing variables as name consts doesn't work -- it's intercepted as a name.
+	Message() function.
+	Fully implemented counter.
+	Eliminated UnTrig.cpp.
+	Stick name and event together.
+	Eliminated UnThings.cpp.
+	DistanceTo, CanSee.

+	Variable tick rate.
+		Pass DeltaTime to ACTOR_Tick and ACTOR_PlayerTick.
+		Implement variable tick rate support.
+		Implement timer and ACTOR_Timer.

//////////////////////////////////////////////////////////////////////////////
3-22-97

====0.850r
+	Extended and fixed the dxf importer for inoxx.

+	Rewrite Root in UnrealScript.
+		SetParent/SetTarget.
+		GainedChild, LostChild, GainedTarget, LostTarget.
+		InternetSend
+		InternetReceive
+		vector >> rotation = forward transformation of vector by rotation -> cool!
+		vector << rotation = reverse transformation of vector by rotation.
+		Use PCalcView.
+		Quickie behind-view.

//////////////////////////////////////////////////////////////////////////////
3-23-97

====0.850s
+	UnrealScript intrinsics
+		Spawn compiler hardcoding to return proper class.
+		Trace must ignore this actor and its parents.
+		Trace.
+		Trace behind-view.
+		Trace ignore-actors option.
+		Give actors a GroupName, to handle grouping.
+		Rearranged root.

// Fire button.
engine function ServerFire( int I, name N, string[255] S )
{
	local TentacleProjectile Proj;
	Proj = spawn(class(TentacleProjectile));
	if( Proj != NoActor )
	{
		log("Fire succeeded!");
	}
	else log("Fire failed!");
}

function Spawned( actor Spawner )
{
	Log( Class $ " spawned by " $ Spawner.Class );
	Velocity = vector(Rotation) * 16.0;
	LifeSpan = 20.0;
}

function Tick( float DeltaTime )
{
	Move(Velocity);
	if( (LifeSpan -= DeltaTime) <= 0 )
		Destroy();
}

function f()
{
	log(Location);
	Location = vect(0,0,0);
	Location += vect(0,0,0);
}

====0.850u
+	Test ZoneDescriptor messaging.
+	Compile spawn.
+	Intrinsic Spawn func.
+	Spawn set rotation.
X	Balk at spawning bTemplateClasses -> runtime checked.
+	ULevel::SpawnActor needs rotation property, must be set before Spawned message sent.
+	Spawned message needs Spawner parm.
+	Intrinsic Destroy func.
+	Proper Destroyed messaging.
+	Don't allow passing const variables as outparms.
+	AInventory Use/UseExtra.
+	Ultra cleanup UnMsgPar.h.
+	Eliminate pawn InitInput.
+	Ultra cleanup UnMsgs.h.
+	Rearranged inventory relationships.
+	Fix redefinition-of-function error msg.

//////////////////////////////////////////////////////////////////////////////
3-24-97

====0.850v
+	Use bIsPlayer instead of Player!=NULL for decision making and bBlocksPlayers.
+	Fix actor-actor blocking.

+	Note that CLASS_Parsed and CLASS_Compiled are mutually exclusive, due to shared vars.
+		StackTree=NULL means unparsed, Script=NULL means uncompiled? A cleaner solution.

+	Save parsed but not compiled classes properly.	

//////////////////////////////////////////////////////////////////////////////

====0.851a
+	SP: FarMoveActor - no drop to floor func.
+	UnrealEd import .tcx fix.

function BeginPlay()
{
	CallParent.BeginPlay();
	SetTimer(1.0,true);
}

function Timer( int Count )
{
	Log("Timer: " $ Count);
}

// Fire button.
engine function ServerFire( int I, name N, string[255] S )
{
	local TentacleProjectile Proj;
	Proj = spawn(class(TentacleProjectile),NoName,Location,ViewRotation);
	if( Proj != NoActor )
	{
	}
}

+	Next.
+		Changed "slow" to "latent".
+		Optional variable tick rate (0=always, -1.0=never).
+		Timer.
+		SetTimer, SetTickRate.
+		Bug: Probe UnrealScript functions aren't called from AScript::Process when you're in a state.
+			Track ProbeMask, IgnoreMask.
+			Enable/Disable properly handle IgnoreMask.
X		"Ignores All" specifier.
+		Support bTimerLoop.

+	LatentInt
+	LatentFloat
+	LatentActor
+	LatentBool

====0.851c
+	Retest enum compiling and duplicate detection.
+	Latent "Sleep" command (sleep counter).
+	Fix klunky goto(Name(Begin)) syntax.
+	Anim wraparound boundary conditions.
+	Store frame rate per anim seq outside of sprite code.
+	bAnimFinished.
+	Make Actor class non-intrinsic.
+	bAnimLoop.
+	StopAnim.
+	All animation commands!

====0.851d
+	Broadcast res casting automatically.
+	No crash when try to play empty level.
+	Trigger PlayerProximity, AnyProximity (bIsPlayer).
+	Dispatcher.
+	Const LifeSpan auto update, Expired message

//////////////////////////////////////////////////////////////////////////////

====0.851e
+	Build Bsp node leaf hulls along with bounds, NF_SolidLeaf
+	Collision convolution...nah. Bsp manifold trace instead.

// Fire button.
engine function ServerFire( int I, name N, string[255] S )
{
	local vector HitLocation,HitNormal;
	if( Trace(Target,HitLocation,HitNormal,Location+100*Vector(ViewRotation))==TRACE_Surface )
		spawn(StingerProjectile,NoName,HitLocation,ViewRotation);
}

//////////////////////////////////////////////////////////////////////////////
3-30-97

====0.851f
+	Collision.
+	Pawn move up/down hack.

//////////////////////////////////////////////////////////////////////////////
4-1-97 4-2-97

> Cons are extremely poor frame rate even in 320x200

Fixed! 30 fps at 640x480 on a P-166 with a 3dfx!
Software rendering optimizations in the works.

> Sloppy player controls.

Fixed.

> Poor collision code.

Fixed.

> And the extreme speed-hit on the engine from the lighting effects.

4X faster, can squeeze another 2X with some heavy optimizations!

//////////////////////////////////////////////////////////////////////////////

+	Optimized collision
+	Renamed UnPhys.cpp to UnTrace.cpp.
+	Removed obsolete functions from UnTrace.cpp.
+	Editor player collision.

+	Optimized FMemoryCache::Create by 4X.
+	3dfx only reupload dynamic light meshes once per frame.

+	Optimized shadow filter convolver from 5.0 msec to 0.5 msec.
+	Spatial lighting code, 2.5X faster.
+	Power-of-two copy optmimized from 3.0 msec to 2.4 msec.
+	Merge IlluminationMapGen setup into spatial lighting functions.
+	Lighting code is trucking!

//////////////////////////////////////////////////////////////////////////////
4-3-97

+	3dfx code support.

//////////////////////////////////////////////////////////////////////////////
4-4-97

+	Fixed PF_NotSolid bug.
+	Fixed map rebuild bugs.
+	Improved geometry robustness by rebasing, but the long term strategy is to
+		move to double-precision, shared-vertex brushes for much better robustness.

+	Fixed undo toasting LevelState
+	POSTLOAD_File
+	POSTLOAD_Trans

====0.851h
+	Portal problem is due to coplanar facing flip?
+	Runtime regular/3dfx switch.
+	Optimized colored lighting code 500%.
+	Implemented detail texturing.

//////////////////////////////////////////////////////////////////////////////

+	3dfx gen minimal set of light map, huge speedup, 4X best case.
+	3dfx pulsing lights don't pulse. Scaling factor?
+	3dfx transparency.
+	Proper transparency depth sorting.
+	3dfx creatures.
+	RGB FTransTex.

//////////////////////////////////////////////////////////////////////////////
4-5-96

+	Classes: Dreaded changes.
+		Changed Parent to Owner, to avoid confusion with parent *class*.
+		Changed Me to Self for familiarity (all remnants of Visual Basic are now GONE).

+	Export enums as tags not numbers, import as either.
+	Fixed script decompiler.
+	UnrealScript only allow CallXX in self.

+	Global name improvements.
+		Use global names for resource names, for space/speed improvements.

====0.851h
+		FName(char*,NAME_Add);
+		FName(char*,NAME_Find);
+		No klunky FName.Find, FName.Add.

====0.851i
+		FNameEntry table array of pointers.
+		FNameEntry allocator.

====0.851j
+		Variable-sized FNameEntry.
+		FNameEntry: Variable length, contain hash next pointer?
+		No inline crc/hash.
+		UnrealScript CallXXX refuse with virtual functions.

====0.851k
+		Global name hash.
X		Eliminate global name table altogether? Rely solely on hash? -> Need for mapping indices to names.
X		Save 4 bytes in FName by keeping name-compatible flags in low word.

====0.851m
+		Replace AddHardcoded with real name registry, variable-length malloc'd names, hash.
+		Free individual names in gc, exit

====0.851n
+		Replace REGISTER_MESSAGE with REGISTER_NAME.
+		Eliminate FName::AddHardcoded.
+		All names now begin with NAME_ instead of ACTOR_.

+		InitResource.
+		PrivateLookup
+		InitResource

====0.851o
+	Compiler use hardcoded names instead of tons of stricmp's.
+	Rebuild root.
+	Integrated Erik's aa line code.
+	AA code to vss.
+	unguardexec, unguardexecSlow for displaying exec stack info upon crash.
+	FMemoryCache GetEx allow traversing multiple matches.
+	Retest the suites.

+	Eliminate unaligned reads in script exec.
+	Fix decompiler handling of class vars.

+	Cleaned up loading of unnecessary resources for client and server.

//////////////////////////////////////////////////////////////////////////////

Big plan:
	Animation sequences.
	Player view and collision sizing.
	Actor collision.

	Player controls.

	Inventory.

//////////////////////////////////////////////////////////////////////////////
4-7-97

====0.851p
+	AActorBase: GetHashLink.
X	AActorBase::SetCollideActors (use from UnScript).

+	Properly init and set all actor collision hashes in collisionInit.
+	SpawnActor/DestroyActor must do collision stuff.

//////////////////////////////////////////////////////////////////////////////
4-9-97

X	Properly cleanup hash links in tick.
+	Simply linked hash list with cached ColLocation.
X	UnrealScript BeginMove/EndMove/bBegunMove -> No!
+	DestroyActor perform UnTouch.

+	Recompile loses enums!

+	Fixed shadow map alignment problems - finally!

+	Myscha requests.
+		Set these values for the class Human:
+		CollisionRadius=22.0 -> Set to 18, looks better with new collision code.
+		CollisionHeight=55.0 -> Translates into 32.0 using new system.
+		BaseEyeHeight=17.9   -> Ok.

+	Make collision props constant, add SetCollision which can succeed or fail.

+	Optimizations:
X		Real line trace, not bbox trace.
X		32-aligned FActorLink pools to draw from quickly.
+		FActorLink pool management.
+		Work on global efficiency of actor and world collision.

//////////////////////////////////////////////////////////////////////////////
4-10-97

+	Collision.
+		Cyllinder collision time.
+	Checks is unreasonably high: fixed hashing.
+	Proper collision repulsion.
+	Actor-actor collision cyllinders, time-based.

====0.852a
+	UType.
+		FResourceTypeInfo -> UType ResTypes concurrently.
+		Resolve chicking and egg initialization problem.
+		Eliminate FResourceTypeInfo.
+		Update GetTypeName.
+		Find Type dependencies.

+	UType continued.
+		Mirror resource enums with hardcoded names.
+		FOR_ALL_TYPED_RES cleanup.
+		DECLARE_CLASS and DECLARE_DB_CLASS take type-name parm.

====0.852c
+	UType continued.
+		Cleanup FindResource.

====0.852d
+	Static type registry.
+		UResource::BaseType auto-register UType constructor and static instantiation.
+		UType InitHeader.
+		RF_NoFreeHeader
+		UType proper InitResource, InitHeader, then add in-place.
+		Move InitResource to UResource.
+		Support permanent resources.

====0.852e
+	UType implementation.
+		Update LookupType.
+		GetRESTYPE.
+		GetRES.

====0.852f
+		Update PrivateAlloc for types.
+		Update Find for types.
+		RF_HardcodedRes

====0.852g
+		FClassPropertyType use UType.
+		static GetBaseType, hide BaseType.
+		Renamed .tcx to .u

====0.852h
+	Types.
+		Replace UResource::ResType with UResource::Type.
+		Serialization hack using EResourceType.
X		Eliminate GetTypeName.
+		Eliminate LookupType.
+		Eliminate GetRESTYPE.

====0.852i
+		ResEnum
+		BaseXXX for all hidden/const stuff
+		Eliminate EResourceType
+		UnMsgs.h -> UnNames.h

//////////////////////////////////////////////////////////////////////////////
4-10-97

====0.852j
+	Types.
X		Smart pointers use klunky Microsoft pUResource notation instead of klunky x::Ptr? -> Can't.
X		FGlobalResourceManager::Types as unordered UArray<UType*>.
X		FGlobalResourceManager::ResList as a UEnum (not gc'd).
X		FGlobalResourceManager::Names as a UNameTable (not gc'd).

	AActors as UResources immediate implications:
		Transacton tracking system will need to track added/deleted AActor resources.
		Fast actor list code will need updating.
		All actors will need globally unique names.
		Import code needs to create unique names.
		Spawning an actor will have to create a new globally unique name.
		Net code will have to gracefully handle new names.

	Later implications:
		Can merge UType and UClass.

	Benefits:
		Variable unlimited size AActors.
		Unified actor and resource editing.
		Scriptable and script-accessible resources.
		Less memory usage.
		Simpler faster code since dealing with pointers rather than indices.

	Drawbacks:
		Introduces new resources at runtime.
		Unique name requirements messes up all events, again.
		Requires allocating memory during play.

====0.852k

+	Transition plan:
+		Replace UActors Element with function returning a pointer.

====0.852m
+	Transition.
+		Special logic to archive actor pointers in AActor's.
+		Root.h build logic use actor pointers instead of indices.
+		PActor
+		IsParentOf -> IsOwnerOf
+		UnSprite PreScan/PostScan.
+		PlayerExec

====0.852n
+	Cleanup.
+		AActorBase::SetOwner
+		LostTarget->LosingTarget
+		IsOwnerOf.

//////////////////////////////////////////////////////////////////////////////
4-12-97

+		P_GET_ACTOR now gets an AActor*, not an INDEX.
+		Actor constants in script...
+		Rebuild and retest the suites.
+			Note: Actor comparisons are broken since CPT_Actor's are not yet pointers.
+		FToken iActor?
+		FToken AttemptToConvertConstant.
+		FToken SetConstActor.

====0.852m
+	FToken GetConstActor.
+	Check iSelf==SelfIndex always.

+	How to deal with Level actor in default and static properties?
+		Don't allow level actor in default and static properties.
+		Level actor must be set at spawn time.

//////////////////////////////////////////////////////////////////////////////
4-13-97

====0.852o
+	Actor pointer transition.
+		FToken::InitPropertyData
+		New Root.h.
+		CPT_Actor.
+		UnMover.cpp.
+		UClass::SerializeBin
+		FArchive& operator<<( FArchive &Ar, AActor &Actor ) broken
+		NAME_Self, NAME_SelfIndex?
+		ULevel::UnlinkActor
+		(INDEX*) (INDEX *)
+		Get steady state working again with actor pointers.
+		Check all SelfIndex refs.

====0.852p
+	PActor change.
+	MakeUniqueName generalize.
+	UnrealEd load/reload fix.
+	Load/save.

====0.852q
+	Import map with actor pointers.
+	Over-import map with actor pointers.
+		UActorsX::Import fix remapping
+		ImportActorProperty needs actor list address
+		UActors::Import screwed.
+		ExportU.

====0.852r
+	Reimport classes with actor pointers.

====0.852s
+	Transition.
+		Script bFill is no longer needed?
+		Detect empty actors if Element(i)==NULL, not if Element(i)->Class==NULL.
+		FirstActive
+		Retest the suites.

====0.852t
+	Cleanup.
+		Make NextID,HashID into plain old actor pointers!

====0.853a
+	Cleanup.
+		RelistAll always RemoveFromList.

//////////////////////////////////////////////////////////////////////////////
4-14-97

+	UType, UClass unification.
+		Merge UType, UClass.
+		Renamed ACamera to AView to avoid conflict with UCamera.
+		Dynamically created UType's and loadable/saveable UType's.
+		FClassProperty.
+		UResourceBase.
+		GetType, GetTypeName, BaseType
+		ClassFlags.

====0.853b
+		GetClassFlags()
+		Actually create abstract UTypes: UResource, UDatabase (bTemplateClass style mechanism).
+		All name stuff before all resource stuff.

====0.853c
+		No array of classes.
+		UResource -> UObject.
+		Eliminate NextID/PrevID thing.
+		FGlobalObjectManager
+		NAME_Resource -> NAME_Object.
+		Retest the suites.

====0.853d
+		Update.
+			Resource -> Object
+			GRes -> GObj
+		Whew!
+		Get rid of optimization lists; not needed for cache reasons anymore.

//////////////////////////////////////////////////////////////////////////////
4-15-97

====0.853e
+		Properly set resource class parent classes for everything except UObject, AActor.
+		UClass::IsKindOf work equally with actor classes and resource classes.
+		Properly set AActor base class to UResource.
+			Fix class rebuild.
+			AddParentProperties.
+			Clean up UClass constructors.
+			AllocBins.
+			Need to prevent actor spawn from touching the first sizeof(UResource) bytes.

+		Implicit Self in actors rather than explicitly stored.
+		EX_Self
+		Retest the suites

====0.853f
+	Pre unification.
+		Merge XClass and objClass into Class.
+		Spawn set class.

====0.853g
+	Move actor Private stuff to top of actor.

====0.853h
+	Move FExecStackMain into UObject.
+	Important: Changed structure member alignment to 4 bytes!

//////////////////////////////////////////////////////////////////////////////
4-17-97

====0.853i
+	FExecStackMain generalization to all UObjects.
+		AActorBase::SetBinPointers.
+		AActorBase::PostLoad.
+		Serialize it.

+	Merge AActor name and UResource name, spawn don't guarantee name matching.
+		This screws up all of that Event / Name stuff! Make old Name into Tag.

====0.853j
+	The big plunge.
+		UActors -> derived from UArray.
+		Actor list as sparse, ordered array (actor indices are still valid).
+		Make unique *resource* names for spawned actors.
+		Ditch the funny AxxxBase setup.
+		IsA is now a method of UObject rather than AActor.

//////////////////////////////////////////////////////////////////////////////
4-18-97

====0.853k
+		UFont::Cout fix use palette.
+		PROPBIN_PerActor -> PROPBIN_PerObject
+		UnrealEd DestroyActor crashes because vtable=null.
+		UnrealEd import and rebuild level.

X		InitHeader of an actor should perform copying of defaults.
+		Camera reconciliation.

====0.853m
+		NoteActorMovement bombs.
+		Initial rebuild hoses brush.

//////////////////////////////////////////////////////////////////////////////

====0.853n

+		Creating/loading new actors must must set resource class info (ResHeaderSize) as well.
+		Smart load context flags for resource type names
+		Must handle loading Unrealfiles with ResHeaderSize not known in advance.
+		Resolve chicken and egg ULinkerLoad import problem (type as FName).

+		Unreal play level.
+		Retest the suites.
		
//////////////////////////////////////////////////////////////////////////////

====0.853p
+	Generally replace AActor&'s with AActor*'s.
+	Fix moving brush tracker error on exit.

//////////////////////////////////////////////////////////////////////////////
4-19-97

====0.853q
+	Move generalized AActor functions to UObject.
	
====0.853r
+	FPropertyIterator simple implementation.

====0.853s
+	FClassProperty -> FProperty.
+	Use FPropertyIterator always instead of direct iteration.

//////////////////////////////////////////////////////////////////////////////

	Note:

	You can no longer iterate through class properties directly by doing something like:

	for( int i=0; i<Class->Num; i++ )
		FClassProperty &Prop = Class->Element(i);
		...

	This is no longer supported because child classes now store a list of only the properties
	which they define; child classes don't store properties defined by their parent classes.
	This is done to save memory. Otherwise tons of redundent property definitions must be
	stored.

	Now, to iterate through all properties in a class (including those defined in its parents),
	use a FClassPropertyIterator like:

	for( FPropertyIterator It(Class); It; ++It )
		FClassProperty &Prop = It();
		...

	See the definition of FClassPropertyIterator to see how it does its job. Simply stated,
	its constructor sets up iterator, operator BOOL returns whether the iterator is at the
	end of the list, operator++ increments it, and operator() returns the property the
	iterator points to. This encapsulates iterating through the property definitions
	stored in the current class plus its parents.

//////////////////////////////////////////////////////////////////////////////

+	FindVariable
+	FindParm must return index into proper class
+	iFirstProperty etc must point to right place
+	Scrutinize all GetPropertyPtr's because they might ref the wrong class.
+	FPropertyIterator::GetClass
+	FPropertyIterator::GetIndex
+	void ExportActor
+	void ExportMultipleActors
+	Test rebuild.
+	Retest the suites.

====0.853t
+	Test rebuild with backwards FPropertyIterator.
+	Retest the suites.

====0.853u
+	Cleanup AddParentProperties.
+	Update FPropertyIterator.
+	No CPF_FromParent.
+	Test rebuild.
+	Iterate in forward order.
+	Retest the suites.
+	Retest decompiler.
+	Retest editing.

//////////////////////////////////////////////////////////////////////////////

====0.853v
+	Get rid of FGlobalClasses GClasses.
+	Cleaned up FPropertyIterator.

//////////////////////////////////////////////////////////////////////////////

====0.854a
+	Investigate merging CPT_Actor and CPT_Resource into CPT_Object?
+		To do:
+			Eliminate EX_Level, create EX_NoObject.
+			Expose Level as member variable of all actors.

====0.854b
+			FToken contain actor pointer, not index.
+			Script compiler needs to disallow non-null actor constants.
+				SetConstActor gate.

+			Merge EX_NoActor and EX_NoObject.
+			EX_ResourceConst -> EX_ObjectConst
+			Eliminate CLASS_ScriptReadable; everything is CLASS_ScriptReadable.
+			GC after compile fails due to manually killed resources.
+			Retest the suites.
+			Retest rebuild.

+			FProperty UClass constructor to CPT_Actor, CPT_Resource in script compiler.
+			No redundent FProperty size setting.
+			Retest rebuild.
+			Retest the suites.

====0.854c
+		Cleaned up CPT_Actor and CPT_Resource usage.

====0.854d
+		Merged CPT_Actor and CPT_Resource into CPT_Object.
+		Updated conversion tables.
+		Exporting by index vs. name.
+			This is easy to fix by changing format.
+			ExportActor, ExportMultipleActors.
+		Importing by index vs. name.
+			This is easy to fix, but we need custom old-version support.
+			ImportActorProperties, UActors::Import.
+		Exporting to C++ header.
+			Can easily hardcode this.
+		CPT_Object.
+		Eliminate NAME_NoActor.
+		Update conversion routines.
+			EX_ResourceToBool
+			EX_ResourceToString
+			EX_ActorToInt
+			EX_ActorToBool
+		Updated hardcoded type names.
+		Test "None=123;"
+		Retest rebuild.
+		Retest the suites.
+		Don't duplicate actor comparison operators.
+		Do support casting objects to ints.

+		Had to rename "NoActor" to "None".

//////////////////////////////////////////////////////////////////////////////

	Unreal 2 and beyond:
		Major engine features.
			IK skeletal animation system with physics - much cooler possibilities
				for character interaction, third person views, and ultra-realistic
				animation.
		UnrealEd infrastructure.
			Texture application tools (not mesh painting, just really good aligning).
			Non-animating mesh-based editing tools.
			Maybe Visual SourceSafe integration.
		Engine.
			Open COM object approach to engine.
			Open-ended replaceable rendering engine.
			Open-ended expandable editing engine.
			Maybe an ActiveX document.
		Rendering.
			Subdivision surface support (if not in Unreal 1).
			Maybe NURBS support.
			Volumetric fog and lighting (if not in Unreal 1).
			LOD support in the models.
		Networking.
			Evolution towards a global persistent inventory system.

//////////////////////////////////////////////////////////////////////////////
4-20-97

====0.854e
+	Handle property retraction: CLASS_NoEditParent, and flags mask in iterator.
+	Decrease realloc threshold for better UnrealEd performance (excessive reallocs).

====0.854f
+	Cleanup FindParms usage in script compiler. Needed?
+	Cleanup all ObjectPropertyPtr. Needed?

+	Test resource hierarchy type checking.
+	Test actor/resource dynamic casts.
+	Test bad actor and resource initializers.
+	Test constant and dynamic casts.
+	Test hierarchical resource and actor casting.
X	Test trigger import.

+	Script execution functions take UObject as context.
+	Objects other than actors cannot contain states or perform latent execution.

//////////////////////////////////////////////////////////////////////////////

====0.854f
+	Script execution stack use UObject as base rather than AActor.
+	Cleanup UnScript.cpp

//////////////////////////////////////////////////////////////////////////////

====0.854g
+	Eliminate ProcessMain, move to UnLevTic loop.
+	Eliminate AScript, move all AScript logic to UObject.

====0.854h
+	All includes from Unreal.h, no sub-includes.

+	Rename the Res includes.
+		UnRes.h    -> UnObj.h
+		UnResTyp.h -> UnObjBas.h
+		UnResVer.h -> UnObjVer.h
+		UnClsPrp.h -> UnProp.h

+	Eliminate as many ANSI C includes as possible.

====0.854i
X	Clean up global actor import/export functions. -> Fine as it is for now, and the
X		long term UObject implications aren't clear yet.
+	Process function don't take ULevel; get that from the object/actor itself.

	Note:
	
		UObject::Process is now the one and only gate between C++ and script code.
		This is the only place where C++ code calls into script code and returns.

+	Cleaned up execution stack code.

====0.854j
+	Replace Process function pointers with Vtable pointer and regular method.
+	FindActorFunc, set vtable pointer are identical.
+	Update outdated script exec -> You absolutely can't subclass intrinsic classes.

//////////////////////////////////////////////////////////////////////////////

	Ponder future strategy.
		How to support class evolution - loading of old files into classes when
			implementation has changed compatibly.
			Generate member and function offsets at like time, not compile time.
			This eliminates the "fragile base class" problem.
		Package approach to give access to namespace things like structs and classes
			which don't necessarily belong in the hierarchy?
		Globally distributed objects.
			Serialize across process boundaries.
			This is easy using existing serialization methods.
			The only open questions are:
				Whether to introduce names dynamically, and which names.
				Whether to introduce referenced objects dynamically, and which objects.
					Transient objects would never be distributed.
					Distribution may be specified relative to ownership, i.e. only
						distribute owned objects.
					Distribution may be enabled/disabled on a per-class basis.
					Distribution may be enabled/disabled on a per-object basis.
					These rules need to be made as simple and clear as possible.
				Whether to allow referencing remote objects directly using a lease,
					time, and expire mechanism.
				Whether to allow referencing remote object data or just their functions.
				How to handle such a lease mechanism.
					This is easy, the server just maintains a leased-object list per client
						and prevents them from being GC'd. This would have timers attached
						to each object.
				Stub/skeleton classes.
		Whether to support abstract interfaces and an "implements" keyword.
			Whether these abstract interfaces can be like structs and contain data
				members and non-abstract functions.
		How and whether to support exceptions and exception handling.
			Whether we have to support actual C++ throw/catch, which is going to
				introduce potential problems in that whenever the potential exists to
				call into script code, the state has to be exception-safe.

	Investiage Java "Package" thing.

//////////////////////////////////////////////////////////////////////////////
4-21-97

====0.854k
+	New Root.h generation.
+		New features.
+			Support 0x hex constants.

====0.854m
+	Renamed:
+		UnRoot.h   -> AActor.h
+		UnPawn.h   -> APawn.h
+		UNREAL_API -> UNENGINE_API (So that the API def can be automatically generated in Root.h)

+	Packages:
+		UnEngine - All Unreal engine classes for use by engine licensees.
+		UnGame   - Classes specific to the game.

+		New class specifiers:
+			Package(pkgname), replaces Standard: Eliminate CLASS_Standard; use package to get this info instead.
+				Also specifies DLL root name where intrinsics are implemented.
+			CPlusPlus: specifies that a C++ header should be included.
+			Guid(Hex1,Hex2,Hex3,Hex4): specifies Ole GUID.
+			Transient (CLASS_Transient): Not saveable (inheret from parent).
+			ScriptConst (CLASS_ScriptWritable): Scripts can only contain const references to objects of the class.
+				Is this needed at all?

+		Get new generated Root.h generated perfectly.

====0.854n
+	Get Object class compiled in UnrealScript successfully.

====0.854o
+	RF_HardcodedRes persist via RF_Keep.
+	Move object-general intrinsics from Actor to Object.
+	CLASS_Abstract, abstract keyword, instead of bTemplateClass.
+	Use name table for syn highlighting.
+	Prevent creating CLASS_Abstract objects in general, not just actors.

====0.854p
+	Fix problem serializing UObject locals (weird) - was assuming Actor was top class rather than Object.
+		TOP_CLASS_NAME in UnBuild.h now specifies top level class for Make-All.
+	Object class defined in UnrealScript.
+	Rebuild classes.
+	Retest the suites.

====0.854q
+	Mark all intrinsic classes CLASS_Intrinsic.
+	Eliminate GAME_DLL.
+	Bug, can't assign None to misc classes like Pawn, etc.

+	Allow DECLARE_CLASS with NAME_None, since auxillary DLL's cannot hardcode names.
+	Root generator include:
+		DECLARE_CLASS(AMover,AActor,NAME_None)

====0.854r
+	Update Root.h generator
+		No CPlusPlus directive, only Intrinsic.
+			AMover.h
		Export GUID if nonzero.
+	Proper package definition.
X		All intrinsic classes need enum {BasePackage = NAME_UnEngine} -> Not 
X			useful, since only the engine DLL can define hardcoded names.
X		DECLARE_CLASS, DECLARE_DB_CLASS define package -> Need to be defined in script
X			rather than in C++ code.
X	UClass ctor take BasePackage.
+	IMPLEMENT_CLASS should expose actual class instantiation.

+	Figure out proper actor-object boundaries.

//////////////////////////////////////////////////////////////////////////////

	Summary of what I've been doing:

	I've been evolving Unreal's object architecture in order to expose far more
	of the engine's functionality to scripts written in UnrealScript and
	external game DLL's. This will enable licensees as well as gamers to
	extend the engine and the game in major interesting ways.

	The first step was merging the UResource and AActor class trees into
	one more general class tree rooted by UObject. This does several things.
	First of all, it makes it possible to expose the properties of resources
	to scripts in a very clean, object-oriented fashion. Second, it makes
	resources scriptable. Third, it makes both resources and actors completely
	extendable in an UnrealEd-driver, dynamically bound environment. In other
	words, available extension DLL's, and available extension scripts, can be
	loaded dynamically at any time.

	The resulting extensability and open architecture are far ahead of other
	game technologies including the Quake engine, and it's a major step towards
	redefining what gamers perceive as a game.

	We aren't in Kansas anymore.

//////////////////////////////////////////////////////////////////////////////

====0.854s
+	Use ?autoclassUObject@@3VUClass@@A rather than exposed vtable pointer.

====0.854t
+	Replace Send with Process. This was outdated naturally.
+	Move Send from level to UObject, and override it in AActor.
+	Support class flag inheretance of CLASS_Inheret flags.

+	Rebuild.
+	Retest the suites.
+	Texture.u start.

//////////////////////////////////////////////////////////////////////////////
4-22-97

====0.854u
X	IMPLEMENT_INTRINSIC work in DLL's just like IMPLEMENT_CLASS.
X		Do this at file load time.
X		Bind by index and package.
X		Coerce script to call C++ __stdcall funcs, i.e. COM?
X	Later, maybe.

+	Enforce intrinsicness.
X		Intrinsic classes absolutely must map onto hardcoded classes.
X		Non-intrinsic classes absolutely cannot map onto hardcoded classes.
X		Recompile when get intrinsic specifier, find intrinsic and refuse to modify
X			CLASS_Intrinsic if not found.
X		Recompile when don't get intrinsic specifier...

X	UClass:
X		Expose UClass class flags as bitfields in script.
X		UClass needs DefaultEdCategory (move out of actor props).
X		ClassIsA intrinsic.

//////////////////////////////////////////////////////////////////////////////

X	Reverse the star notation.
+	Retest class creation in UnrealEd.
+	Object class show up in UnrealEd class browser optionally. 
+	Check GetDefaultActor / GetDefaultObject usage.

+	Support:
+		Load/save handle transient properties including transient UObject properties.
+			Transients variables in non-intrinsic classes are zero-filled at load time.

//////////////////////////////////////////////////////////////////////////////

+	New syntax.
+		You can now access the spawn-default properties of an object; they are treated
+			as const so they are read-only:
+		var = [context.]Default.peractorvariable.
+		EX_DefaultVariable
+		Properly works with arrays.

function BeginPlay()
{
	assert( Default.LightBrightness == 64);
	assert( LightBrightness == 64);
	
	LightBrightness = 96;

	assert( Default.LightBrightness == 64);
	assert( LightBrightness == 96);

	log( Class $ "Ok!" );
}

//////////////////////////////////////////////////////////////////////////////

====0.854v
X	Make actor list expandable at spawn time; teensy hardcoded default size.
X		No longer relevant, since pointers take up 4 bytes each.

+	Default Light Properties broken.
+	Fix UnrealEd "Subclass" option and make it undoable.

//////////////////////////////////////////////////////////////////////////////

====0.854w
+	Eliminated SetTarget and made Target non-const. Since an actor is
+	responsible for managing its own target, this was unnecessary. Also
+	eliminated LostTarget and GainedTarget messages; these were unnecessary
+	for the same reason. There is only one case where you would want such a
+	notification and it's now covered by the cooler and more general
+	LostReference notification, which notifies you of any kind of actor
+	reference that was destroyed!

+	Eliminated UnlinkActor. No longer needed.

	So you can do stuff like:

	function LostReference( name VarName, int ArrayIndex )
	{
		if( VarName == Target )
		{
			// Handle losing our target...
		}
		else CallParent.LostReference( VarName, ArrayIndex );
	}

+	GainedChild, LostChild - sent to owner actors when children attach to them.

+	Linked list!
+	Must collision unhash deleted actors.
+	Latent actor destruction in ULevel::Unlock via bDeleteMe.
+	Don't tick deleted actors.

+	UnrealEd new transaction tracking including adding/deleting/readding actors.
+		Mostly works.

+	Fix Inventory script.

+	Torture test actor deletion.

+	Test collision brush collision and raytracing.

+	Cleanup the gfx.

//////////////////////////////////////////////////////////////////////////////
4-23-97

====0.854x
+	Collision
+		Collision exclusion? -> Hand off to Steven.
+		Collision code is now nice and isolated from the rest of the engine. -> Hand to Steven?
+		Proper Bump messaging.

====0.854y
+		inline BOOL IsOverlapping( const AActor *Other ) const;
+		BeginTouch must be reflexive.
+		EndTouch must be reflexive.
+		Proper Touch/UnTouch.

+		Handle Touch/UnTouch under extreme situations like teleporting.

====0.854z
+		Can I get rid of FExecStack::Level?
+		Do GotoState, GotoLabel need a level? -> Eliminated.
+		Does SetOwner need a level? -> Eliminated.

====0.855a
+		Can I get rid of FExecStackMain::Level and move it to Actor? -> Eliminated it.
+		Do InitExecution, BeginExecution need a level? Set at spawn time instead.
+		VERIFY_CLASS_OFFSET macro to track down alignment errors.

====0.855b
+		Scrutinize actor, level, and object headers.
+		ULevel::KillAll?
+		ULevel::PreReconcileActors?
+		RememberedActor!
+		Broadcast and SendEx redundent?
+		Move BeginTouch to Actor.

====0.855c
+		IsBlockedBy must be reflexive.
+		Use IsBlockedBy.
+		Eliminate BlockedClasses, PassedClasses.

+		Standing on top of actor cyllinder isn't working right.

//////////////////////////////////////////////////////////////////////////////

====0.855d
	Inventory code.

//////////////////////////////////////////////////////////////////////////////

====0.855d
+		Fixed UnrealScript null context crash which occurs on Let code like:
+			Pawn(Other).Weapon = Self;
+		I no longer allow UnrealScript locals to be initialized. This saves a lot of space
+			and clears up some hairy linking problems.
+			Actually this is a really good approach, because it opens up the possibility
+				of on-call initialization with non-constants.
+		Eliminated CPF_UninitParm.

//////////////////////////////////////////////////////////////////////////////

	Note: As a result of this change, functions with optional parameters are declared like:

		function f( optional int A )

	Rather than:

		function f( int a=0 )

	Optional parameters are always initialized to zero, null, false, none (zero-filled).

//////////////////////////////////////////////////////////////////////////////

====0.855e
+		Only allow "optional" specifier for func parms.
+		CPF_Optional

+		Compiler fixup after removing locals initialization.
+			Fix decompiling locals.

+		StackNode iFirstProperty, NumProperties: Must be cognizant of class!
+		Fixed UnrealScript IgnoreMask overwriting bug due to LocalsSize write.

====0.860a
+		Calling functions with null context outparms is inherently safe because they are
+		copied back to the same spot where they reside.

+		Fix intrinsic functions with null outparms are dangerous, like operator++.
+		Fixed all cases, at some performance cost (drat!)
+		Fixed major script parm count bug.

+		Wire view of creatures problem.

//////////////////////////////////////////////////////////////////////////////
4-24-97

====0.860b
+	Rendering support:
+		Console is broken.
+		Engine Function InventoryCalcView: First and third person views.
+			InvCalcView1( viewer location, viewer rotation )
+			InvCalcView3( owner location, owner rotation )
+		CollideActorsSet needs collideactors, collideworld, collideplayers parms.
+		intrinsic(262) final function SetCollision( bool NewColActors, bool NewBlockActors, bool NewBlockPlayers );
+		Eliminate IsA, which is redundent.
+		Need rotation operator *, operator /. 285, 286
+		Test the new FRotation operators.
+		bOnlyOwnerSee generalization work.

+		Exec first scripts before render first frame, so killing is done.
+		Pawn bIsPlayer needs to get set in possess.
+		Scripts get initial PossessActor.

====0.860c
+	Actor bugs:
+		Importing Zone= crashes.
+		DestroyActor should destroy and unlink immediately in UnrealEd.
+		EmptyLevel doesn't clear out actor list.
+		Importing level (core after coollt) doesn't clear out actors.

function Phlegm( optional out int a, optional out int b, optional out int c)
{
	Phlegm();
	Phlegm(1);
	Phlegm(1,2);
	Phlegm(1,2,3);
	Phlegm(,2);
	Phlegm(,,3);
	Phlegm(,,,);
}

====0.860d
+	UnrealScript:
+		Allow separating optional parms by commas.
+		Is there any need for EX_Nothing at end of optional parms? -> No.
X		Let outparms be optional, since the bytecode executor now supports that?
X			This would be a bad thing for future optimizations, so I don't allow it.

//////////////////////////////////////////////////////////////////////////////

====0.860e
+	Inventory!

+		Problem with calling virtual functions across contexts?
+		Fixed a major problem in which recursive calls across actor contexts
+		wouldn't always restore the proper stack frames, causing properties to
+		become corrupted. This is probably the cause of the mystery bool problem.

====0.860f
+		InvCalcView1, InvCalcView3 work lame implementation.
+		Implement AutoMag as inventory testbed.
+		Weapon is rendered twice.

====0.860g
+		UnrealScript object constants are now specified like:
+			Sound 'NailGun'
+		Instead of
+			Sound(Nailgun)
+		To avoid confusion with casts.

//////////////////////////////////////////////////////////////////////////////

====0.860h
+		Reimport the textures.
+		Test source release.
+			Galaxy-S.lib
+			DxGuid.lib
+		Test debug build.
+		Test Unreal release on a clean machine.
+		Test UnrealEd release on a clean machine.
+		Submit UnrealEd to GT.
+		Message to Steven and Mark and Ammon.

//////////////////////////////////////////////////////////////////////////////
4-27-97

====0.860i
+	Cleanup and fix.

+		Fix importing triggers and stuff for maps like Hal.
+			Name/Event mapping: Map Name to Tag.
+		Vortex Rikers 3dfx shows light discontinuities across cuts of same polys with strobe fx.

//////////////////////////////////////////////////////////////////////////////
4-28-97

+	Player controls.
+		Pass ServerXXX to all actors owned by player.

+	Eliminated UCamera::GetStoredMove
+	Autosave crashes if no level? Not any more.

====0.860j
+	Support all ServerXX messages.
+		ServerJump, BUT_Jump
+		ServerFire, BUT_Fire
+		Server Weapon N=#
+		Server NextWeapon
+		Server PrevSeapon

+	Handle transient bools?

====0.860k
+	Test "toggle" (CapsLock = bRun): Works fully.
+	Test "Button" (Ctrl = bFire): Works fully.

+	Note to Steven:
+		Moved "CopyInputTo" to APawn::inputCopyTo in UnPawn.cpp. This routine is now yours.

+	Tick nonplayers before players.

	Input system note
	-----------------

	There is no longer a short-circuiting of client rotation. Now all player
	controls are performed in the regular ULevel::Tick loop, with players updated
	last to reduce latency. This reflects the new variable-tick-rate approach where
	there is exactly one tick between rendering each frame. There is no longer any
	advantage to updating players at the last minute, because nothing substantial is
	done between ULevel::Tick and FGlobalUnreal::RenderWorld.

	Right now the loop looks like:
		ULevel::Tick
		FGlobalUnreal::RenderWorld

	When the network code is added in the client loop should look like:
		Assimilate actor updates from the server
		ULevel::Tick (update local players only)
		FGlobalUnreal::RenderWorld

	In other words, ULevel::Tick should occur immediately before rendering, so that
	local player latency is reduced to a minimum.

====0.860m
+	Translate mouse movement into bona fide velocities.
X	Correct mouse dediscretization for frame rate.
X		Scrapped all of the stupid nonlinear adjustment.
X		Controls are easier without it.

====0.860n
+	Implement IST_Hold input state.
+	Implement bRun.
+	ReadInput take an output device as a parm.
+	FGame input postprocessing code.

====0.860o
+	Mouse movement sucks in Win95 in 3dfx on K6 - stupid Win95 QPC limitation. :(
+	Circle strafe key.
+	Need more angles?
+	Mouse needs to be done as velocity, not position.
+	Fix or cut DirectMouse -> Works fine without it for now.

====0.860p
X	Support keyword bindings. -> Don't need em.
X	Some kind of support for delays in the bindings? -> Can script.

+	I've been bitten by this several times.  After I compile, if I get an
+		error in a line number above 1024, if I double click in the results
+		window the editor crashes with the message "overflow error 6"

//////////////////////////////////////////////////////////////////////////////
4-29-97

====0.860q
+	>1.  It seems that now re-defined functions must have exactly the same
+	>set of local variables as the global function they supercede.  Is this
+	>supposed to be this way?
+	Fixed new dynamic cast bug.

+	UnShadow.cpp

====0.860r
+	Install msvcirt.dll
+	AddTask
+	TaskTick
+	Kill Telnet
+	Kill FGlobalTaskManager and FTask stuff.
+	GServer.Tick
+	GCameraManager.Tick

	Note:

	The task manager code in Unreal is gone. Having a task manager in the engine was a dumb
	idea and an unnecessary overkill and complication. Now there is one hardcoded
	function, CUnrealWnApp::MessagePump, which updates all of the main global subsystems (which
	can then update any of their own sub-subsystems). This keeps everything nice and
	predictable.

+	Kill NetTeln.cpp
+	UnTask.cpp -> UnMsgPmp.cpp
+	Kill UnWnTime.cpp

====0.860s
+	Console one-liner text.
+	Software rendering DDraw vortex rikers FMemoryCache assertion.
+	Lethe bizarre lighting errors at start, cache overwrite bug.
+		Major sprite bug.
+	EvrSmk2 lighting flashing - dynamic lighting problems with low shadow detail.
+		This explains the weird light blips. Was a roundoff problem in spatial_None.
X	Add PF_NaturalAlign -> Later.
+	Bizarre dynamic light flashing errors on Nali.unr.

//////////////////////////////////////////////////////////////////////////////

====0.860t
+	BeginExecution in Actor class only.
+	Eliminate InitExecution, do per object.
+	When in unlit mode, do simple depthshade.
+	Eliminate redundent Unrealfile serialization.
+		MainStack.Object.
X		MainStack.Script -> Keeping it is a major convenience.
+	Changed PrivateAlloc to CreateObject.
+	Clean up actor list importing.

====0.860u
+	Optimize handling of local variables. PROPBIN_PerActor.
+	Clean up FExecStackMain, FExecStack, FStackNodeLink constructors.
+	Retest the suites.

====0.860v
+	Eliminate Bin pointers altogether.
+		GetPropertyPtr.
	Script compiler name consts and resource consts in 'quotes' always.

	Note:
	
	The method of specifying name constants and resource constants has changed!
	
	Name constants are now defined like:
		'SomeNameConst' // If name type is implied by context
		SomeNameConst   // If name type is not implied by context
	Instead of
		Name(SomeNameConst)

	Resource constants now must be defined like:
		Texture 'TextureName' // If object type "texture" not implied by context
		TextureName // If not implied by context

//////////////////////////////////////////////////////////////////////////////
4-30-97

====0.860w
+	AActor sound functions.
+	Fix moving brush frame rate variance.

====0.860x
+	Fixed major export bug.
+	UnClsPrp.cpp -> UnProp.cpp
+	UnRes.cpp    -> UnObj.cpp

====0.860y
+	Must distribute Ammon's dll's with the src
+	Cleaned up world collision code.

//////////////////////////////////////////////////////////////////////////////

====0.861a
+	Export tentacle crashes.
+	Cleaned up vector transformation routines.

+	Fixed geometry optimization bug - longest running bug in Unreal history.

//////////////////////////////////////////////////////////////////////////////

====0.861b
+	Encapsulate FBspNode::ROOT_OUTSIDE into FBspNode.
+	Created UnPrim.h

+	UPrimitive interface.
+		BoxLineCheck
+		BoxPointCheck
+		PointCheck
+		LineCheck

+	UPrimitive classes.
+		UModel
+		UTerrain (later)

//////////////////////////////////////////////////////////////////////////////

====0.861c
+	Primitivise.
+		UMesh
+			USkeletonMesh (do later)

+	FCheckResult standardization.
+		LineCheck.

+	Merge Raytrace and LineClass.
+	Update ULevel::Trace.

//////////////////////////////////////////////////////////////////////////////

	Note: What collision is all about
	---------------------------------

	Unreal's new collision detection system is entirely about actors colliding with other 
	actors. A "collision" is an event in which two actors mutually touch each other.
	As in real physics, there is absolutely no distinction between which actor "did the 
	touching" and which actor "was touched". They both collided with each other.

	But what about actor-world collision, you ask? The answer is, "there is no world".
	The "Level" actor contains the world as a UModel primitive, which is known in actor land 
	as the "Level" actor, always actor #0 in the actor list, an actor of class ALevelInfo. 
	So actor-world collision is just like any other ordinary actor-actor collision.

	In other words, the world is just a big moving brush (a UModel) owned by the Level actor
	(an ALevelInfo), which happens not to move, because all actors in the world reside in its
	reference frame.

	In order to clean up and generalize several important areas of the engine, I've set up
	a new base class "UPrimitive", which is the parent class of all abstract objects which 
	are able to be rendered or collided with. An AActor in Unreal can have one (and only one)
	UPrimitive which defines its form, shape, and appearance.
	
	The class hierarchy looks like:

	UObject            - Parent of all classes
		UPrimitive     - Parent of all abstract renderable, collidable objects
			UModel     - An abstract solid model - a level or a moving brush.
				ULevel - A special level model
			UMesh      - An animated creature mesh
		AActor         - Parent of all actor classes

	A UPrimitive is abstract, in that it defines a shape, brush, mesh, or other object
	without regard to its position, rotation, and other transformation properties in an
	environment. A UPrimitive does not represent a physical thing which exists in the
	world. However, a UPrimitive can be owned by an actor. Actors represent physical things
	which exist in the world. The AActor supplies the position, rotation, and other
	information regarding its primitive. When a primitive is rendered, it has access to
	the actor which owns it, so the primitive can use some of that actor's properties.
	For example, USprite primitives use the Texture property of their owning actor.

	You can probably see from the above where this is headed (partly for Unreal, and more so
	for Unreal 2):
	
	* Subdivision-surface based and fractal height maps will become UPrimitive's so that they
	  can be integrated into the engine easily.

	* By adding a few new functions, we'd gain automatic support for exact collision checking
	  with monsters (useful for determining if gunshots *really* hit them).

	* Once UPrimitives are fully encapsulated, new kinds of UPrimitives will be definable
	  via plug-in DLL's. So, for example, it would be a reasonable task to integrate voxel 
	  objects this way.

	* Skeletal models will become UPrimitives, probably a subclass of UMesh. A skeletal model
	  is really just a UModel with some extra info stored: bone-bone connectivity and
	  movement constraints, bone-polygon connectivity, and bone animation frames.

	* With things like moving brushes defined by a UPrimitive and controlled by an AActor,
	  a complex reference frame system is established. The current, oversimplified moving brush
	  Floor "reference frame" hack will be extended to more complex moving frames of reference.

	* Other wild primitive ideas: Level-of-detail objects like rope/chain with detailed
	  physics support, specialized terrain like water and lava with detailed physics,
	  fractally generated objects like trees.

	Note:

	In practice, there are several hacks in the engine which will be cleaned up which are
	violations of the UPrimitive line of thinking. For example, the level object hierarchy is 
	still not quite right, and moving brush are in fact instanced and contain their their 
	location and rotation info.

	Decisions:

	Whether to make UActors a primitive itself, creating a general purpose framework
	in which primitives can aggregate other primitives -> No. Instead, UActors is a 
	special non-primitive object which exposes collision functions that deal with 
	aggregations of primitives. Otherwise collision hashing becomes a huge mess.

//////////////////////////////////////////////////////////////////////////////

	Note: Surfaces with tags like PF_Hurt, which are detected at player
	collision time, are not going to be detected when the player is standing
	on edges or apexes, only on flat or sloped floors!

//////////////////////////////////////////////////////////////////////////////
5-2-97

====0.861d
+	UPrimitive::bCheckCollision.
+	ULevel::Trace use FCheckInfo.
+	UModel::LineCheck perform proper iHit detection..

====0.861e
+	Move actor collision structures to UActors.
+	UnLevCol.cpp -> UnActCol.cpp.

====0.861f
+	Eliminated obsolete SphereLeafFilter.
+	Merge FActorHit and FCheckResult.

+	All collision functions must set all FCheckResult members!
+		UnTrace.cpp
+	BoxLineCheck return int, rather than time.

+	Check bump notification: Need Hit.Actor.
+	Check touch notification.

//////////////////////////////////////////////////////////////////////////////

====0.861g
+	Use CollisionTag to improve actor collision test performance.
+	All primitive collision functions need to take owner actor parm.

====0.861h
+	AActor collision checking functions.
+		PointCheck
+		LineCheck
+		BoxLineCheck
+		BoxPointCheck

+	UnrealEd
+		Import moving brushes perform proper rebuild prep.
+		When add/set moving brush.
+			Build and keep an untransformed, outside-in Bsp for the brush.

+	Bsp build no empty fpolys

//////////////////////////////////////////////////////////////////////////////

Problems with the math routines in general:

*	Coordinate systems (FCoords) don't consistently deal with their origin
	properly, making it difficult to transform points generically.

*	The camera view coordinate system is based on Y-up while the world
	coordinate system is based on Z-up. This is a mess. The standard
	representation is X-left, Y-up, Z-forward.

//////////////////////////////////////////////////////////////////////////////

====0.861i
+	OrthogonalInverse.

	Point -= Origin
	Point (rotate it)

====0.861k
+	Must clean up the vector math.
+		Redefined FCoords funcs as operators.
+		Retest all scaling features.
+		InvertVectors->InvertCoords.

====0.861m
+		Merge new sound code.
X		Sound code is a mess.

====0.861n
+	Try that once more
+		ufxtest.dll ufxtest.lib ufxtest.exp
+		ufxedit.dll ufxedit.lib ufxedit.exp
+		kill utils.mak unsound prj

+	Script editor is word wrapping??
+	UnrealScript support for new sound parms.

//////////////////////////////////////////////////////////////////////////////
5-3-97

+	Support ambient pitch scale byte in actors (64.0=full).
+	Fix validate.

====0.861o
+	Ambient sounds are broken again. #()*$&#*()$&#*()&$#(*&$
+	Update actor ambient sound info.
+	Fixed.

+	Movers not triggered by plyr carrying weapon.

//////////////////////////////////////////////////////////////////////////////

====0.861p
+	Eliminate actor SelfIndex: for simplicity.
+		ULevel::FindActorIndex( AActor* )
+		Pawn FovAngle is now 95 degrees! NOTE: Must update when merging
+			with Steven!
+		GBrushTracker.Update( SelfIndex );
+		Fix possess, no self-index thing.
+		Should be able to possess classes like Skaarj successfully.

====0.861q
+	SelfIndex removal.
+		UnDynBsp: ActorBrushes -> bAssimilated

====0.861r
+		UnLevTic: bTicked pingpong updates.
+		Eliminate CachedBrightness

====0.861t
+		Created new ABrush class: parent of AMover.
+			This class is currently unused, but I wanted to put it in now
+			to ease the transition later. The idea is to eventually replace
+			the level's static brush array with brush actors, in order to gain
+			the better editing user interface and simpler selection/editing
+			capabilities. This will be a pretty straightforward change, though,
+			so I am saving it for later.

+		FBspSurf iActor -> Actor*

===0.861u
+		iZoneActor, bNoDelete... How to handle this kind of cached AActor*
+			problem generally, without serializing? Remove from actor list
+			but don't kill so that GC will hold it. Solved.

		Audio SelfIndex reliance -> use resource index for now.
		Need to address this more efficiently later.

		Note: Moving brushes which span more than one zone assume the properties
		of the zone nearest to the player (which changes as the player
		moves around...) This problem is temporary and will go away when the
		moving brush rendering code is optimized, but it's not worth working
		on till then.

===0.861v
+		DoDynamicLighting
+		Remove audio SelfIndex references.
X		Sound code radius handling is screwed up.

===0.861w
+		FLightMeshIndex update.

===0.861x
+		Import code
+			ImportActorProperties return imported selfindex
+		Export code

+	Specially import me=

===0.861y
+	New import/export code based on names and remapping.
+	ExportActor.
+	Test export then import-add, etc.

//////////////////////////////////////////////////////////////////////////////

	Note:

	Unreal is now compiled with a structure alignment setting of 4 (it was
	previously 8). If anything, like MMX values, need to be 8-aligned, structs
	must be padded manually. This approach saves space.

//////////////////////////////////////////////////////////////////////////////

===0.861z
+	Math cleanup.
+	Eliminated VectFlags code from FPoly::SplitWithPlane.

+	Define FPlane.

+	FPlane things:
+		FBspNode plane.
+		FBoxPointCheckInfo clipto hulls.
+		UCamera ViewPlanes

+	Move out FPlane constructors.

===0.862a
+	FBoundingVolume IsValid flag.
+	Moved PlaneDot to FPlane.
+	Move plane properties out of FVector.
+	FPlane serializer.

+	Rebuild root.
+	Retest the suites.

+	Reimport all textures.
+	Test reimporting maps.

//////////////////////////////////////////////////////////////////////////////

	Searchlight revolution is now controlled by LightPhase and LightPeriod.
	If LightPeriod=0, the searchlight does not automatically rotate, and
	you can manually rotate it by modifying its LightPeriod.

//////////////////////////////////////////////////////////////////////////////

	New animation commands
	----------------------

	The animation commands have been extended to support new features for
	animation interpolation. Interpolation makes the animation far smoother
	and allows animations to be stored in half to a third as much memory, without
	any loss in visual quality. However, interpolation adds a bit of
	complication in handling looping animations.

	PlayAnim:

	Plays from frame 0 to frame n; note that this requires only (n-1) frame
	intervals, because PlayAnim has to skip the final looping interval from 
	frame n-1 to frame 0.

	LoopAnim:
	Plays an animation over and over, looping.
	The AnimEnd message is sent as soon as frame (n-1) is reached, as opposed to
	when the animation sequence has complete one full revolution (i.e. one
	interval before the animation loops back to frame 0).

	StopAnim:
	Stops the current animation sequence immediately. The sequence stops
	animating, but stands still in its current pose.

	FinishAnim:
	This is a latent function, executable in state code only, which returns as
	soon as the current animation has completed, in other words as soon as
	frame (n-1) is reached.

	MorphAnim:
	Asynchronously morphs from the current animation to the starting frame of
	the specified new animation sequence. This is used for tweening smoothly
	between animation sequences that don't naturally line fit together. You can
	test for completion either with the latent FinishAnim() function, or the
	AnimDone notification function.

//////////////////////////////////////////////////////////////////////////////

	Note: component states

	A component state is a special kind of state declaration.
	Like a normal state, a component state can contain state-scoped
	functions. Unlike a normal state, a component state can not
	contain labels and !!

//////////////////////////////////////////////////////////////////////////////
5-5-97

+	Fixed DeclareClass not declaring all required classes.
+	Only display fps stats in 3d nonwire views in editor.
+	Updated Searchlight.
+	Merge.

//////////////////////////////////////////////////////////////////////////////
5-6-97

+	Pop up a dialog box when any resource file loads/saves fail.
+	Fix UnEdSrv.cpp SaveBelow with .unr's.

===0.862c
+	UnrealEd.
+		Script ed windows disappear when minimized.
+		Class browser window sizing.
+		Superclean importing of actors by index or name (backwards compatible).
+		Import-add must support full renaming.
+		Tex import show both .pcx and .bmp

+		Don't autoindent if write-protected.

+		Don't autoindent when prev line is blank.

+		Autoindent sometimes stops working.
+		File / new level crash.
+		Brush import dialog no resize.

+		Autoindent doesn't handle spaces and tabs evenly.
+		Autoindent is s-l-o-w.

+		PolyFlags default to fx.
X		Enter: If there is non-blank text after the cursor, don't autoindent.

+		ExportActor DeltaBins problem.
+		Problem importing map after rebuild.

X		God mode upd script ed windows readonly status.

///////////////////////////////////////////////////////////////////
5-7-97

+	Use animation sequence by name
+		Retest mesh brws
+		Retest ingame anims
+	UMesh::GetFrame
+	Retest 2D and 3D rendering.

===0.862d
+	UnmapViewOfFile
+	Loading/saving is now 5x faster.
+	Test saving and overwriting.

///////////////////////////////////////////////////////////////////
5-8-97

===0.862e
+	FinishAnim Broke

===0.862f
X	Multiple timers.
X	Animation sequence pegged timer.
X	SetTimer.
X	AnimNotify.
X	The better approach is to defined in-animation-sequence events.

///////////////////////////////////////////////////////////////////

+	Animation sequence events: UMeshAnimNotifys, FMeshAnimNotify.
+	MESH NOTIFY MESH=.. SEQ=.. TIME=.. FUNCTION=..

///////////////////////////////////////////////////////////////////

	New metrics
	-----------

	12 Unreal units = 1 foot
	Player is 60 units high.
		* 64 high ceilings are safe.
		* 48 high ceilings are unpassable.
	Player radius is 18 units.
		* 40 wide passages are safe.
		* 32 wide passages are unpassable.
	Player can climb steps 26 units high.
		* 24 high steps are safe.
		* 32 high steps can't be climbed.
	Player can jump about 35 units high (with regular gravity setting).
		* 32 units is jumpable.
		* 48 units is unjumpable.

///////////////////////////////////////////////////////////////////
5-9-97

//=============================================================================
// FakeSkaarj.
//=============================================================================
class FakeSkaarj expands Decoration;

#alwayscall ..\Models\Skaarj.mac

#alwaysexec MESH NOTIFY MESH=Skaarj SEQ=Looking TIME=0.2 FUNCTION=AnimSkaarjJog1
#alwaysexec MESH NOTIFY MESH=Skaarj SEQ=Looking TIME=0.7 FUNCTION=AnimSkaarjJog2

auto state Test
{
function SkaarjJog1()
{
	log( "SkaarjJog1" );
}
function SkaarjJog2()
{
	log( "SkaarjJog2" );
}
Begin:
	log( "Beginning!" );
	Mesh = mesh 'Skaarj';
	LoopAnim( Looking, 0.2 );
}

+	Softwate mesh ordering problem.
+	Setup mesh notify code.

===0.862g
+	Normalize animation frames to 0.0-1.0 range.
+	AnimRate.
+	Implement mesh notifys.
+	bAnimNotify
+	AnimEnd

===0.862h
+	Handle non looping animations at end-1.
+	Handle multiple animation sequences per frame.
+	Handle one-frame animations without choking -> Don't loop them!

===0.862i
+	Do animation tweening.
+		CID_TweenAnim
+		Tween uses AnimTween, AnimRate(1.0/TweenTime), MinAnimRate(Alpha).
+		Show radii now shows actor collision volumes!

///////////////////////////////////////////////////////////////////
5-14-97

+	Lost 2 days' source in crash. Ugh.
+	Upgrade to VC++ 5.0
+	UnAudio.lib
+	Full warnings
+	UnrealEd recompile

///////////////////////////////////////////////////////////////////
5-15-97

+	Unreal.exe
+	New sourcesafe directories.
+	*(UObject**)&obj -> AR_OBJECT(obj)
+	Utils
+	Get on F:

+	Fix new UnrealEd VB 5.0 weirdness
+		Mouse movement
+		Clicking on camera window grid is broken.
+		Bind.mac.
+		Bizarre new texture alignment problem -> VC++ 5.0 code generator bug.

===0.863a
+	Speed up the CString-bound FSimpleArchive code.
+	GateSrc.

+	Kill macro dlgs.
+	Need way of getting list of zone infos for point -> PointZone.

+	Must get read-only multi-use file mappings working, so that
+	multiple unrealeds can be run.

+	When in act prp dialog and press delete, deletes the actor!

+	Backup.

///////////////////////////////////////////////////////////////////
5-16-97

+	GateSrv: Can duplicate login.

+	Installers
+		Source
+			Direct from VSS to WinZip.
+			UfxEdit.dll, UfxTest.dll

+	Verify rebuild from just the sourcesafe files.

===0.863b
+		UnrealEd
+			Setup license
+			Source control the InstallShield files.
+			Shapes
+			Help
+			Textures

===0.863c
+	Merge Steven's new code.

///////////////////////////////////////////////////////////////////

===0.863d
+	Actors.
+		LevelInfo sky needs no-smooth option: bNoSmoothSky
+		AActor Fatness
X		Add SkyShader to LevelInfo sky, use in UnLight.

+	UnrealEd.
+		Import after rebuild crash?
+		Closing the mesh browser still sucks away CPU cycles. Close its window.

===0.863e
+		Make sure all dlgs support long filenames's including multiselect ones.
+		Fixed all common dialogs to support long filenames.
+		Can't load read-only files in load-actor-class (.u).
+		Test all the loaders with read-only files.

+		Retest the suites.

///////////////////////////////////////////////////////////////////

===0.863f
+	UnrealEd script editor.
+		Find must highlight word.
+		Find and replace.
+		Save and restore cursor position between recompiles.
+		^C/^V and edit-copy/edit-paste use different clipboard? Use Clipboard.Clear.

+		Undo/redo cursor and top positioning.
+		Torture test undo/redo.

+		Shift-tab autoindent doesn't indent last line.
+		Autoindent misses last line.

+		Enter mark undo point.

+		Remember script window pos and top.
+		Remember script window pos and top for undos.
+		Tweak undo/redo usability.

+		Save ALL scripts when press F6/F7 or when focus changes.
+		Remove UnrealEd "save class" - now there is only "savebelow".

+		Enter conserve cursor position if before last tab.
X		Autosave no setfocus; kills DirectDraw.

+		Fix message loop time sucker when we don't have focus.

+	Importing more than one map messes up the texture browser window.

///////////////////////////////////////////////////////////////////
5-17-97

===0.863g
+	Generalize mesh rendering code to hardware and software.
+	Mesh phong shading.

===0.863h
+	Clean up FTransform.

===0.863i
+	Made FScreenBounds floating point.
+	Eliminated FTemp.

===0.863j
+	Added Normal to FTransSample.
+	Phong shading.
+	Subdivision with t-junction removal.

===0.863k
+	Fatness.
+	Backfacing.
+	Colors not being clipped?
+	Alpha interpolate in.
X	Teleport-in effect

///////////////////////////////////////////////////////////////////

===0.863m
+	Animation tweening setup.
+		UMesh::GetFrame return a cached set of FVector's; no UCamera parm.

===0.863n
+	Tweening setup.
+		Looped and one-shot animations now both generate AnimEnd messages at frame n-1,
+			even though looped animations loop at frame n.
+		FinishAnim from a loop finishes with frame n-1.
+		ULevel::Tick update.

	Animation system variables.
		AnimSequence  = Animation sequence to play or tween to.
		AnimRate      = Normalized animation rate, or (Tweening Rate / NumFrames).
		AnimFrame     = Current position in animation, 0.0-1.0, negative indicates tweening-to.
		AnimEnd       = Sequence end for PlayAnim.

		bAnimFinished = Indicates animation or tweening has finished.
		bAnimLoop     = Indicates animation should loop.
		bAnimNotify   = Whether the animation sequence has any notifies.

	Tweening caveats:

		To support tweening perfectly would require too much memory and network bandwidth, so I
		use a frame-cache approximation to tweening which works well nearly all of the time.
		The case where it may look strange is when an actor first comes into view when
		it's in the middle of a tween. In this case, the tween source may not be the correct
		frame, so the actor's animation may look strange. This is always safe and won't cause
		any harm, but it may look strange in some infrequent cases.

///////////////////////////////////////////////////////////////////
5-17-97

===0.863o
+		Backup.
+		TweenAnim work.
+			Proper FinishAnim() handling.
+			Proper AnimEnd handling.

===0.863p
+		Frame tweening.
+			Test tweening with random interruptions.
+			Tweening is now continuous.

+		Tweening must be able to lead into a PlayAnim/LoopAnim smoothly.
+		PlayAnim's must morph together.
+		execTweenAnim.
+		UMesh::GetFrame update.
+		Playing single frame animations must work (tween only).

///////////////////////////////////////////////////////////////////

===0.863q
+		SpawnActor needs an owner.
+		Remove ETrace.

+		Fix ULevel::Trace.

===0.863r
+		Updated the scripts.

///////////////////////////////////////////////////////////////////

	Move towards the new "primitive tree" rendering architecture:
	1. Separate UModel and ULevel.
	2. Merge ULevel and UActors.
	3. Eliminate the ALevelInfo actor class (now use ULevel directly).

///////////////////////////////////////////////////////////////////

===0.864a
+	Separate UModel and ULevel.

===0.864b
+	Separate collision hash table into FCollisionHash.

===0.864c
+	Merge ULevel and UActors.
+	Level->Max problem.
+	ULevel::Lock is complicated which is bad for StandardSerializeData.
+	Update import/export code to handle this new approach.
+	Torture test importing/exporting/playing.

///////////////////////////////////////////////////////////////////
5-20-97

	Force feedback: There are three kinds of force feedback support coming
	in Unreal:

	* Ambient forces, which are directly related to ambient sounds
	  (ambient forces share paramters with ambient sounds); these are
	  emitted by one actor at a specific location, and they affect all
	  actors in their ambient radius.

	* Surface forces, which are generated by the texture the player is
	  standing on; one of these surface forces can be set for
	  a player representing the force feedback related to his moving over
	  a blumpy surface, or through water.

	* Impulse forces, instantaneous force feedback responses that are
	  generated by PlayForce script calls, and affect a certain player.

	All actors variables:
		enum AmbientForceType.
			AFT_None
			AFT_Machinery.
			AFT_Rumble.
			AFT_Shake.

	Pawn variables:
		enum SurfaceForceType.
			SFT_None: No surface force feedback.
			SFT_StillWater: Still water.
			SFT_FlowingWater: Flowing water.
			SFT_Rocky: Walking over a rocky surface.
			SFT_Grate: Walking over a grate.
		byte SurfaceForcePeriod: Period of the surface force, negative means scale
			it by the player's velocity.
		byte SurfaceForceMagnitude: Magnitude of the surface force.

	Pawn commands:
		enum EPlayForceType
			PFT_SquareWave: Stay at full impulse for entire time.
			PFT_RampUp:     Ramp up to full impulse then stop.
			PFT_RampDown:   Start at full impulse then ramp down.
			PFT_Smooth:     Smoothly ramp up then back down.
			PFT_Decay:      Start at full force then decay exponentially.
		PlayForce( PlayForceType Type, vector Direction, float Time );

///////////////////////////////////////////////////////////////////
5-22-97

===0.864f
+	Test exporting!
+	Fix the ugly sky.
+	Separate cloudcast texture.

+	intrinsic(295) final function PlayForce( EPlayForceType Type, vector Direction, float Time );
+	intrinsic(296) final operator(16) vector *     ( vector A, vector B );
+	intrinsic(297) final operator(34) vector *=    ( out vector A, vector B );

+	Componentwise vector*vector(296).

===0.864g
+	Cleaned up UnrealFile format.

===0.864h
+	Eliminated object-header-size fragility in UnrealFiles.
+		This solves the "fragile base class" problem for class loading and saving,
+		though is still remains in script variable references.

===0.864i
+	RF_Import.
+	Merge exports and imports, NumImports+NumExports->NumObjects.

===0.864j
+	Clean up imports and exports.
+	Mesh no-curve flag.
+		bMeshCurvy.

===0.864k
+	int FGlobalPlatform::FindFile( const char *InFilename, char *OutFilename );
+	FIND_PATHS
+	Proper map loading from paths, command line operation.

+	Retest game loading/saving.
+		Saving is fine.
+		Fixed load spawning an extra player.
+	Retest the suites.

+	3dfx.
+		Now properly handles fullscreen 3dfx mode (two monitors not required!)
+		New GoHard console command (can place in bind.mac).

===0.864m
+	UnrealEd
+		When add new class below and highlight the new class, need to select it
+			in the edserver.
+		Fixed bug adding actor to the world immediately after adding new class.

+		Merge imports and exports together, imports need RF_Import, so that resources
+			can be exported/imported in proper order.
+		Hardcoding Export.FileLoadHeaderSize exposes the fragile base class problem; this should
+			only represent the properties defined in the particular class, and be relevant to
+			the parent class.
+		Eliminate the remaining class-loading hacks.

///////////////////////////////////////////////////////////////////

==== CONFIDENTIAL ====

New features / changes.
* To bring up the command line, press Tab or '~' (was 'T' in previous versions).
* To fly, type Tab + "Server Fly" + Enter. To walk, use "Server Walk".
* New status bar rendering is not in this version.
* Loading and saving single player games works. The savegame files are huge at the moment, but they will later be reduced from a few megs each to a few hunded K each (storing only the changed objects).
* We now support both 256-color .pcx files and 256-color .bmp files, so you can use whichever format is most convenient.
* Geomtry size is now unlimited; there are no more overflow errors.
* Great actor/world and actor/actor collision.
* Great player controls.
* Invisible collision brushes are now supported (but HighLedgeBlock is no longer supported).

UnrealScript:
* Java/C++ style object oriented scripting language.
* Full range of standard C++/Java datatypes and operators, including advanced types like vector, rotation, object, actor, etc.
* Latent, time-based execution.
* Large documentation file coming soon.
* Four-way calling interface (U->U, U->C, C->U, C->C).
* Support for automatic runtime loading of the appropriate game DLL's.

Rendering features:
* Curved surface rendering for meshes (supports phong shading). bCurvy turns curved surface rendering on/off for particular actors (only affects meshes, not level geometry).
* 3dfx support with colored lighting.

Gotchas:
* Textures with extreme aspect ratios (like 1x8 or 8x1) don't display yet on 3dfx.
* Moving brushes and actors don't collide; actors can walk through moving brushes. This is the next major thing I'm working on but everyone wanted 0.86 now rather than waiting for the brush fix.
* 3dfx gamma correction isn't quite right.
* Dynamic lighting sometimes "sticks" to surfaces.

What I'm working on next:
* Fixing moving brush collision.
* New status bar rendering code.
* UnrealScript docs.
* 3dfx rendering improvements (fixing the sky, speed).

///////////////////////////////////////////////////////////////////

===0.864n
+	Prep for release.
+	Graphics.zip
+	Models.zip

///////////////////////////////////////////////////////////////////

===0.864o
+	3dfx.
+		Fix the status bar!
+		Automatic texture aspect ratio adjustment.
+		Fix the border.
+		Fixed transparency (was broken).
+		Test 3dfx masked textures.
+		rgba masked textures.

===0.864p
+	Merged with Steven.
+	msvcrt.dll.
+	comdlg32.ocx.
+	oleaut32.dll

///////////////////////////////////////////////////////////////////
5-23-97

+	Fix 2d shaper (input but no dlgs).
+	Fix Delete.

+	Brightened actors in 3dfx.
+	Fixed bug causing a crash when selecting a brush vertex.
+	Fixed adding a moving brush is undoable.

+	Actor collision bug in Unreal.unr -> this bug was caused by Steven's workaround
+		to my old actor collision bug.

+	//  It is illegal to call out while inside message filter.
+	#define RPC_E_CANTCALLOUT_INEXTERNALCALL _HRESULT_TYPEDEF_(0x80010005L)
+	Fixed this! It was an RPC limitation: you can't make recursive RPC calls. 
+	Though this can be avoided, it really underscores some of the reasons why
+	OLE is a crappy framework to build applications on.

===0.864q
+	Test release to Inoxx and Jeremy.

///////////////////////////////////////////////////////////////////

Fixed since initial 0.86:

* Fixed problem with some (but not all) 3dfx boards seeing random colored
  incorrect textures all over the place.
* 3dfx now uses the same meaning of hue, saturation, and brightness as 
  software rendering (was inverted).
* The file-load and file-import dialogs were broken on some machines (the
  installer now includes COMDLG32.OCX).
* 3dfx masking and transparency weren't working (fixed).
* Fixed broken 2d editor.
* Fixed amazingly annoying "Runtime : 2147418107 (80010005)" problem.
* Fixed problem: Player got stuck when standing on an actor.
* Note: The texture format hasn't changed since the previous 0.86 so you can
  keep your old textures. However, you will need to reimport your maps from .t3d.

Notes for this version of 0.86:

* AutoUPan, AutoVPan and wavy effects don't work with 3dfx yet.

* When clicking on an actor, don't use the "Subclass and edit script": it's broken.

* If you have any ZoneDescriptors in your level which you want to reimport
  into 0.86 (such as Inoxx), you need to do this: Load your old .t3d file from 0.84
  into Notepad.exe, and do a search-and-replace: replace all occurances of
  the text "ZoneDescriptor" with "ZoneInfo". Then import it into 0.84.

* When using masked textures (where color 0 is transparent), you also
  need to make color 0 black. If color 0 is not black, you will get a
  weird colored transparency effect on 3dfx.

* Spotlights work, but I've extended them and maps imported from previous
  versions might not contain all of the new properties. Make sure the following
  properties are set for spotlight actors:

  LightType = LT_StaticSpot (for static spotlights), or LT_Spotlight (for dynamic spotlights).
      Most spotlights should be static. The only case where you need to make a spotlight
	  dynamic is when you're going to write a script to rotate it.
  bDirectional = True
  LightCone = 128 (or some other value indicating the spotlight cone angle but NOT 0!)

* The shadows on polygons with aspect ratios outside of the range 1:8 to 8:1 will
  render incorrectly on 3dfx (possibly as weird blobby incorrect colored shadows).
  I'll be working on this shortly.

* 3dfx gamma correction is strange. To adjust gamma, type something like the following 
  while in fullscreen 3dfx mode:
  RENDEV SET GAMMA=2.0
  RENDEV SET GAMMA=1.5
  RENDEV SET GAMMA=1.0

* Coplanar sheet brushes (made using the 'build sheet brush' and 'add special'
  dialogs) aren't going to work anymore for decorations placed on walls. That
  technique creates some major inefficiencies with hardware rendering and with
  the new software rendering optimizations I'm planning. The problem is due to two
  polygons overlapping. To get the same visual effect, now you need to add a cube 
  (or some other brush) flush with the wall. This creates more polygons, but there
  is no overlap. Sorry!

Other notes:

	The meaning of Hue (color wheel):
		0     = red
		27    = orange
		39    = yellow
		85    = green
		123   = aqua
		137   = light blue
		170   = deep blue
		194   = purple
		255   = back to red again

///////////////////////////////////////////////////////////////////

ascention texture mapping
-------------------------

;
; Pass 0: Init chunk table.
;
;-Init TexAddr
;-Init FogAddr

;
; Pass 1: Texture and shader address setup. 6 c/p.
;
; eax = Temp address.
; ebx = [g|vl].
; ecx = [texel|loop counter]
; edx = Texture base address.
; esi = [vh|ul|uh].
; edi = Chunk setup table.
; ebp = [dg|dvl].
; esp = [dvh|dvl|duh].
;
; Always works on 4-pixel wide aligned stripes.
;
; Variations:
;   4 trilinears.
;   12 usize.
;
mov eax,[mask]      ; Load texture address mask.
and eax,esi         ; Get masked texture address.
add ebx,ebp         ; Update g,vl.
adc esi,esp         ; Update vh,ul,uh.
add ebx,const       ; Dither const.
adc esi,const       ; Dither const.
mov [edi+5],bh      ; Store shader.
rol eax,const       ; Maneuver address around.
mov cl,[eax+edx]    ; Get texel.
mov [edi+1],cl      ; Store in table.

;
; Pass 2: Fog and mapping = 8 c/p.
;
; eax = Texture address.
; ebx = Fog address.
; ecx = Texel.
; edx = 
; esi = Chunk setup table.
; edi = Screen destination.
; ebp = 
; esp = 
;
; Variations:
;   Pentium and MMX.
;   8, 16, 32-bit color.
;   Masked, transparent, fire.
;   1 & 4 pixel spans.
;
mov eax,[esi]       ; Get address of shader + texel + light.
mov ebx,[esi+4]     ; Get address of fogger.
mov cx, [eax*2]     ; Get 16-bit color texel.
mov dx, [ebx*4]     ; Get fog value.
add cx,dx           ; Merge em.
mov [edi],cx        ; Write to screen.

Pentium:
 256-color palettized texture + single component ramp color + ?fog?

MMX:
 256-color palettized texture + single component ?? color + rgb light + rgb fog.

;
; Lighting bilerp pass = 24c / 8 pixels = 3 c/p.
;
; eax =
; ebx = 
; ecx = 
; edx = 
; esi = 
; edi = 
; esp = 
; ebp = 
;
add al,bl
adc cl,dl
add ah,bh
adc ch,dh
mov [temp+0],cl
mov [temp+1],ch
mov [fdu+0],al
mov [fdv+1],ah

mov eax,[temp]

fld  [eax*4 + 0x001]
fsub [eax*4 + 0x000]
fmul [fdu]
fadd [eax*4 + 0x000]

fld  [eax*4 + 0x101]
fsub [eax*4 + 0x100]
fmul [fdu]
fadd [eax*4 + 0x100]

fsub st(1)
fmul [fdv]
faddp st(1),st

fstp [edi]

Things to keep in mind:
 - Handle both creature polys and world polys.
 - Handle all fx.

///////////////////////////////////////////////////////////////////
5-24-97

===0.864r
+	threed32.ocx, grid32.ocx, msoutl32.ocx require mfc40.dll.
+		Can eliminate 1 meg distribution size later.

===0.864s
+	Cleaned up UnrealEd files.
+	Light Hue for 3DFX is strange , 0 is blue , 170 is red the numbers are different than the ramphue settings.

===0.864t
+	Fixed 3dfx problem on some cards with random textures being drawn.

===0.864u
+	Merged with Steven's code.

===0.864v
+	Merged Robert's code.
+	Posted for testing.

===0.864w
+	Fixed compiler ambiguity James discovered:
+		function f(inventory inv) {ActivateWeapon( weapon(inv) );}

+	StandMover   -> StepOn
+	UnStandMover -> StepOff
+	SteppedOn    -> SteppedOnBy
+	UnSteppedOn  -> SteppedOffBy
+	Added StandingCount: Count of other actors standing on this actor.

///////////////////////////////////////////////////////////////////
5-25-97

===0.864x
+	Added stubs for all new floor related code.
+	physWalking handling of standing on other actors.
+	Jump must clear out Floor.

====0.864y
+	Merged StepOn and StepOff into FloorChange.
+	engine function FloorChange();
+	SetFloor intrinsic with notifications.
+	SetRotation intrinsic.

