
=======================================================================

	EDIT MODE - first introduced in RISEN3D 1.5.31 Dec 2003

============================ T E X E D I T ============================ 


 Risen3D allows the editing of texture offsets whilst walking a
 map.

 Using the Launcher tick the Edit box and select the map in the right
 hand pane.

 If using a shortcut put -texedit and -warp XX on the command line
 where XX is the map number you want to start in.  For DOOM this
 would be X X (episode number, level number) or EXMX.

 Texture offset editing can, however, be done (as has always been
 the case) using Risen3D's native edit mode.  The only issue has been
 the problem of transferring the revised information from the edit.out
 file to the map itself.  This has been made much easier thanks to
 a special version of XWE which supports the import of the info from
 the edit.out file. For further details visit the Risen3D site.

 v220-6 and on

 Changes made to texture offsets in edit mode can now be directly
 stored to the pwad on exit as long as the following rules are
 met (if not changes are stored to edit.out as before);
 
       a)    Sides must not be packed.
       b)    The pwad must be in a udir
       c)    Only one pwad can be loaded.
 
 A backup of the wad is created before changes are stored
 with the extension .previous. Note only the last one is
 copied as any same named wad backup with a .previous
 extension present will be overwritten.


 NOTE ---------------------------------------------------------------

 If using the DeePSea editor then this uses its own modified version
 of Risen3D called R3Dedit.exe.  This was developed independently
 by sbsoftware for use with their editor and the use of that portion
 of the code developed by myself and proprietary to Risen3D (i.e. the
 edit mode code) was provided, at the time, in exchange for help with
 other aspects of the Risen3D code. The help given was invaluable and
 is noted with thanks.

 Following the first code release in June 2006 there has been no
 further communication between myself and Sbsoftware and I have not
 received, at any time, a copy of the R3Dedit.exe source. As such
 any queries regarding R3Dedit.exe should be directed to;
 http://www.sbsoftware.com/


============================== S E T U P ===============================

 In the following MB1 means mouse button 1, MB2 means mouse button 2.

 The functionality has been designed to work with the standard .cfg.
 This means that all the normal bindings are active (so movement will
 work as expected).  Items that are suppressed for editing mode will
 not affect the .cfg settings which are restored on exit.

 PROVISO: The only mandatory binding is that 'fire' is bound to MB1.

 Enabling the crosshair will make life easier especially if using
 mouselook to select a texture.


======================= T E X E D I T   S T A T E =======================

 When launched with the -texedit switch then;

 Risen3D will launch a map where the player's weapon is not drawn and
 all sound and music is disabled.  A crosshair will be visible. This
 is a special mode which allows texture offsets to be adjusted from
 within Risen3D.

       ===== Editing is limited to texture offsets only =====

 The viewer is spawned in flying and noclip mode.  These can, however,
 be changed from the console once launched.  If changed they are not
 stored.  They are always enabled on starting.  To walk a map with
 linedef triggered sectors then just enable noclip.

 Teleports, buttons and lifts etc. will still be active allowing these
 to be checked.  Scrollers, pushers and animations (other than buttons)
 are suppressed.  Sky scrolling will still be active, however.

 Friction is still spawned so that ice or mud settings can still be
 checked (if taken out of fly and noclip).

 Dehacked lumps will still be read and any changes enabled.

 Other functions that are inactive in edit mode are;
   saving and loading games, recording or playing demos and networking. 

============================== A C T I O N S ============================

 If you want to adjust texture offsets for a particular line then place
 the cursor on the texture and hit MB1.  This also works in mouselook
 mode.  The details of the line are then displayed in the top right
 hand box.  To go into edit mode ON hit MB2.

 Before entering 'edit ON mode', deselection following pressing MB1 can
 be made simply by pressing MB1 again.

 In edit mode ON moving the mouse will adjust the texture's position.

 When satisfied with the texture's position then hit MB1 again.  This
 will commit the new value(s).

 While edit mode's ON you can reset the values by hitting ESC or MB2.
 Once committed, though, they can't be reset other than by going into
 edit mode again and manually adjusting them back to their previous
 values.

 Whilst moving a texture in edit mode the offset values are continually
 updated and displayed in the upper right hand box.

 If a line only having a midtex has its x off value changed and the line
 has the same sector each side then this will be applied to the line's
 other side as well.  This will create two changes in edit.out (see
 further down) even where only one side of the line has been edited.

 The type of texture is displayed with its name.  TRANS means it has
 been designated as transparent and MASKED means it has alpha pixels.

 If a masked texture is on the same line as an upper or lower texture
 then only it's 'y' offset can be adjusted.  This state is shown in
 the end line of the status window by the word 'masked'.

 The granularity is one map unit - this currently cannot be increased
 as this limit is imposed by the doom/doom2 import code.

 NOTE: one map unit is the smallest resolution allowed for defining
 offsets as the stored values have to be rounded to an integer when a
 map is saved in an editor (as a result of the original DOOM spec
 limiting the transfer of these values).  Finer adjustments are
 allowed in the game itself (1/65536) which are necessary for the smooth
 rendering of moving platforms etc.

 Editing flats uses the same method - just point the cursor at the floor
 or ceiling you want to adjust.  This functionality is only for future
 possible updates.  It has no other benefit.

 The changes made are not permanent - the wad used on entry is unaffected.
 Changes are held only within the game and then printed out on exit.  To
 make the changes permanent then use an editor and transfer the values.

 On exiting the map the new values are printed to a file named "edit.out"
 which will be found in the Risen3D base directory.  If nothing has been
 changed then the file is still generated - it will just be empty.  Any
 existing file named "edit.out" will be overwritten.

 NOTE: If R3D found incorrect offsets when analysing the map which it then
 corrected these will also be included in edit.out even if the lines were
 not edited. (E.g. COD MAP09).


==================== I S S U E S when E D I T I N G =====================

 The cursor position is not 100% accurate which is why the line or
 sector is printed out so you can confirm your selection.  Although tex
 lumpnames are displayed (and the texture selected on a given line)
 currently there is no facility to alter the texture itself.

 Since there are only one set of x and y values on each line side,
 adjusting one texture will alter the position of any others on the same
 side.  The fact that the texture can be selected and is displayed is for
 the possible future addition of texture change editing.

 The distance limit for selection is limited.  So if pointing and
 clicking MB1 into the distance fails to select anything then the
 distance to the line is too great.  Sky flats are also ignored.

 If called from within an editor then the nodes will have to be built
 before launching (both normal and gl) where changes have been made.

==============================================================================

Overview

MB1	No selection	- Selects texture pointed to by mouse (Selection only)
MB1	Selection only	- Deselects
MB1	Edit mode ON	- Commits any changes
MB2	No selection	- Does whatever action (if any) is bound to it
MB2	Selection only	- Enters EDIT mode ON (move mouse to change offsets)
MB2	Edit mode ON	- Resets any changes and goes to No selection
ESC	Edit mode ON	- Ditto



GMJ - July 2010
