portalSky infrastructure 1.2
				
--------------------------------
to test this:
 
¡CAUTION! 
IN LINUX:
BEFORE ANYTHING, MAKE A COPY OF YOU ENGINE BINARY 
FILE, AS THIS MOD IMPLEMENTS IT'S OWN ENGINE BINARY FILE.

ON ANY OPERATING SYSTEM:
IF YOU HAPPEN TO HAVE A "portalsky" FOLDER IN THE DOOM3 FOLDER EITHER RENAME IT
OR ERASE IT.
¡/CAUTION!

 
decopress the 7z file in doom3 folder a "portalsky" folder should appear now.

enter the mod with:
windows "doom +set fs_game portalsky +set com_allowconsole 1"
Linux: "./doom.x86 +set fs_game portalsky +set com_allowconsole 1"

once in the mod call the console and enter this:
"testmap skies"

enjoy the test map!

--------------------------------
for mappers:

	 - create your map with the material "smf/portal_sky" covering the sky

	 - create a skyBox outside of the map with the long view scenery

	 - include in the skyBox any of the portalSkies provided:
		 - info_portalSky: it's the classic portalSky, it's static.
		 - info_portalSky_local: follows the player when triggered.
		 - info_portalSky_global: keeps following the player 
		from the begginning.

	 - you have to trigger via scripting or via an entity the portalSky, 
	in order to make it active to see through it.

	 - if you don't trigger any of them and you have a global portalSky 
	in the map, doom will default it as the portalSky active.
				
	 - you can set a "scale" keyarg to define by what ammount does the player
	movement get divided by. default is 16, this means all geometry 
	in the skybox should be 16 times smaller if the default number is used.

the idea behind local and global is:
while you can always return to a globlal portalSky with correct match within a
global skyBox, if you teleport you could call a local portalSky to show a more 
specified sky, also since you will start the local portalsky from a it's origin 
when triggered you can always be sure the local skyportal will match 
the info_teleport that the player teleports in.

you can do some creative things like changeing the sky at will from skyBox to 
skyBox, and lots of other strange stuff like change to several portalSkies in 
the same skyBox making the sky produce weird jumps form one place to the other.
  
--------------------------------
src:

do whatever you want with this within the GPL limits, give me credit if you want. 
on using this code you're as free as the GPL in doom3 code states.

--------------------------------
new binary:

I've implemented a new material where the portal sky it's not inside "smf" 
but inside "editor", this is normally implemented in the engine, that's the 
reason that there is a new binary for the engine in linux, I don't know how to
compile for Windows, so i can't do the new binary with this new material 
definition.

in the current map I'm using the "editor/portal_sky" in one wall as well as 
"smf/portal_sky" for all other walls, in windows this wall with the new material
should be rendered black 

--------------------------------
versions:

v1.2
	- unoptimized the code... yeah it sucks, 
	but I had to do in order for it to work correctly.

	- (only in Linux) added a doom3 engine binary in order to play with the 
	corrected material definition for portal skies 

	solved issue

		- if the player goes outside the map,
		or changes the state of g_enablePortalSky, global and 
		local portalSkies won't go mad.

	known issues

		 - no engine binary for windows, part of the map will not
		play correctly as vanilla doom3 will prove unable to detect that 
		texture as "portalSky", the code to compile an engine with this 
		corrected it's added in the src.

v1.1
	 - optimized the code in the situations where no portalsky exists.
	
	 - corrected a last time issue in player.cpp (now it should compile correctly)
	
	 - added proper credits and read.me

	solved issue

		- if there is more than one global portalsky 
		Doom announces the error. 

	known issues

		 - the win *.dll is form version 1.0, so watch out 
		the global portalskies as doom won't give any error when they fail.

v1.0

	 - implemented a global portalSky.

	 - implemented a local portalSky.

	 - implemented a "scale" keyarg for all portal skies.

	known issues
		- there can't be more than one global portalSky entity per map.
		- if the player noclips out of the map the global portalSky
		goes crazy.

--------------------------------
last words:

feel free to inform from any issue you might encounter, 
I might probably slopily oversight something.

I hope this mod proves useful to you.


				   	7318
