//===========================================================



Based on the Outrage D3Editor by Gwar followed by the great modifications from Nirvana and 
Otherone, I began to modify D3Edit a bit so that it met my suggestions / imagination and  to fix some bugs. 


tested on Win XP only. 

Thx all testers

*** Use this version at your own risk. *** 



Still need to fix: 
AI-Nodes in Terrain...
Level Sound problems if RoomCenter outside any room.

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_35

DALLAS
added some search funktions


//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_34

Terrain
TerrainBar
Bugfix in deallocating memory


//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_33

Minor Bugfixes
Load Room: Ok message removed, error message only

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_31


Dialogs:
Object Bar:
New inserted object is the current object now

Views:
Level View:
Loaded mine center is calculated and centered at all rooms common center point now

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_30

Bugfixes

RoomView:
Sync all Grids by pressing a Gridsize key

Dialog:
Room Properties:
Added Flags for
Door (Checks for NoDoor Rooms, you are able ro delete the Door-flag to repair your level)
NoLight (not supported by D3)
Flicker
Strobe ( incl. Input for Time and Offset data )

RoomBar:
CutRooms inserts a Face at the cut if you want
(Don't use generating a face for complex rooms)

Editor:
Checks rooms during loading.

Removed Room Center Check for palette rooms



//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_25
Bugfixes
Quickedit Tab-Control
Visual C++ 6.0 Resource ID's are faulty sometimes.
Reworked  all Resources (one time  more...)
This should fixtooltips and some more problems  now. 


//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_24

Dialog:
Quicktest:
added: Button 'Extract WAVs To'
Usage: 
Create a new folder and name it like 'D3WAVS'
Open D3.hog with quicktest Editor, mark 1. File in list,
srcoll downwards and mark by pressing Shift the last file in list.
After a delay all files in list should be marked automaticly now.
By hitting 'Extract WAVs To' button you'll be asked for a target folder,
if choosed one (see above) all wavs out off the d3.hog will be extracted into that folder.
(587 files, ~ 70MB !!)
Inside Settings Dialog choose this folder as your Sound Directory.


//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_23

Perspektive View:
added: mark all with current face connected Faces by Hotkey 'Numpad0'

Dialogs:
SoundBar:
RoomProperties:
Dallas Script Editor:

added : Play Sound funktion.
To use this Feature all Sound-wavs must be extracted from the D3Hog
into a seperate WAV Folder.
Note: Not all ambiente sounds are working, they are empty inside the dat file... 


//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_20

WorldView:
Bugfix: Show Expanding faces now. 

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_19

WorldView:
RoomView:
Changed:
Message if RoomCenter outside it's Room
shown if 'ShowRoomCenter' activated only.

Windowsizes are changed automaticly.
(i.e. if DialogBars switched On/Off)
or window arragend to horizontal or vertical.

Dialoge:
MessageBar:
Shows Powerups counts if:
Verify Mine -> ShowObjektInfoDialog -> ToClipboard

TextureBar:
Bugfixes animated Textures
MessageBar:
Bugfixes animated Textures


//===========================================================
New Modifications in Version  A03 Beta 10 | Atan P.0_1_9

WorldView:
Bugfix

//===========================================================

New Modifications in Version  A03 Beta 10 | Atan P.0_1_8

GridView:
fixed a bug inside rotate vert function

Perspective View:
Fixed crash inside 'SelectFaceByNumber' function

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_5

Dialogs:
added: Contract/Expand marked faces Dialog
Contract/expand marked faces around:
facecenter, Roomcenter or all marked face united centerpoint

World View:
Show marked faces

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_4

Dialogs:
OpenFileDialog:
added showing Levels + Rooms (*.d3l;*.orf) together


//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_2

World View:
Room View:
PopupMenu:
Added: On/Off animated textures.
       State is saved inside Registry. 

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_1_0

Dialog:
added Resizing to:
ShowInfo, ScriptCompile, ShortCuts

Editor:
Delete temp hog files inside default TEMP folder at Editorstart.
Each crashed level leave ~20MB otherwise

//===========================================================

New Modifications in Version A03 Beta 10 | Atan P.0_0_8

World View:
Room View:
Objectbar:
Fix: Animated Object textures are correctly shown now.

ToolBar:
added:  Added Buttons to quickly maximize Grid Views to max size
	    and to restore all 4 Views again.	
	    Last Grid Views size are stored (Registry) and loaded during Editor-Start again
	
added:  Buttons to arrange World and Room Views. Horizontal. Vertical, Cascade.
	State is stored inside Registry and loaded during Editor start again.	

RoomDialogBar:
added: Generate a new room out of marked faces and open a new Room Window for it.

ExtrudeBar:
added: Extrude Steps input for automaticly Extrude x times.
added: generate the End-Cap to be a point (needle)
added: generate the End-Cap to be 'round# (rounded)

Level View:
added: Save and Restore View-Dist and View-Angle. (Registry)

Perspective View:
added: Save and Restore View-Dist and View-Angle. (Registry)

Room View:
added: Save and Restore size of the Window. (Registry)

Ortho View:
added: Save/Load ShowRoomCenters state. (Registry)
added: Save/Load ShowValidMineArea state. (Registry)
Fixed a Display bug  

Verify Mine:
added: Check for RoomCenters outside rooms

Dialogs:
Matcenters:
Name-Input is working now
Show Matcenters Room Nuber or Terrain Cell number
Hide Room/Object-ComboBox in Dialog if no Matcenter is assigned
Refresh ComboBox while cycling through Matcenters


//===========================================================

New Modifications in Version A03_3o

Ortho Views:
added: Select Gridsize by Keyboard keys 1-7
added: cycle Gridsize by Page Up/ PageDown 

Bugfix: Wireframe view

Views:
added support > 1024x768 (SoftwareRenderer)

TriggerBar:
added: 'MoveCameraToCurrentTrigger' -Button
Changed layout
Changed navigation by '<<' & '>>' (Room with triggers) buttons
'>>' will auto search next room with trigger(s) inside and focus to that room (if any)
'>>' will auto search next room with trigger(s) inside and focus to that room (if any)
'<' & '>' will switch through rooms triggers

Track the current trigger face in Ortho- and Perspective Views now

Textured-Views:
Fixed the 'trigger-mark'-display for faces. 
Fixed the 'trigger-mark'-display for floatingTriggers.

PopupMenu:
Ortho: Added 'SelectFaceByNumber'
Perspective: Added 'SelectFaceByNumber'

TerrainView:
fixed display bug if too much rooms

LevelView:
Track the current face in Ortho- and Perspective Views now

Perspective View:
Fixed display bug while Zoom- In/Out

ToolBar:
added: new ObjectInfo Button
added: FIX Button

Dialogs:
a)
ObjectDialogBar:
Added Prev- Next- Object Buttons

b)
DoorWayDialog:
Bugfix

c)
Added new ObjectInfo Dialog
Objects are listed with ID, Type, TypeName, ObjectName and Roomnum
View can be changed by Type, Location and 'sorted'
ObjectNames can be changed in List manually ot automaticly
Undo feature if Dialog not closed
Generates Enums and structs for Dallas
All Data can be copied to clipboard (MessageBar)
Clear MessageBar is possible. 

d)
New FIX Dialog
AINode- and Sound- calculation done by earlier D3Edit Versions
would not work properly. FIX changes Portaltextures to Palmleaf1
so calculation can be done through portals.
Compress will remove 'holes' in Roomnumbers
i.e. Room 1,2,4,6 will be changed to 1,2,3,4 
Use this one carefully.

e)
LightingBar:
Changed layout
Added: Presets
added: Save Inputs
Disable 'CLose-Button' during lighting process.

f)
SettingsDialog:
added : RenderFaceTrigger
minor fixes 

Group:
Objectnames are saved with the Group
Watch out for double name after inserting same group more than once!

//===========================================================

New Modifications in Version A03_3m
RoomView:
Menu:
added : ShowValidMultiplayerArea

Verify Mine:
added : ShowValidMultiplayerArea Errors

World View:
Fixed 'Move-Mine'
Fixed 'Scale-Mine'

EditorSettings:
Changed Layout

ScriptCompile:
Enlarged fix bugs

Camera Slewer:
Save position for World- and Room- View

//===========================================================

New Modifications in Version A03_3l
TextureBar:
added Show current Texture Flags

Tools:
Reworked
Added Customize Tools Dialog
Customize up to 20 tools, selectable by ToolsMenu

GeometrieBar:
Vertex:
Added: Set all marked verts to current vert Y position
helps to make faces planar (in Y) even if not on grid

TerrainBar:
a)
added: Display current SkyDome texture
added: Apply current texture button
b)
added: Display current Sat texture
added: Apply current texture button

ObjectBar:
added Link into marked Room Button

PathBar:
fix a bug, Terrain AI Nodes still buggy, be careful, don't use!

//===========================================================

New Modifications in Version A03_3k

Fixed a lot errors in Bnodes and Rendering

LevelView:
a)
Added: Check for duplicated rooms ( yes we had such bugs :)

Move Mine:
a)
BNodes and Edges are moved with the mine now
b)
PathNodes and Path are moved with the mine now


//===========================================================

New Modifications in Version A03_3j

SettingsDialog:
a)
Added: Render > 100 Rooms On/Off
Added: Autoselect Mode On/Off

TerrainBar:
a)
Added: Checkbox for Damage On/off
Removed Input for Damage value, this is not suported by D3.

PathDialogBar:
a)
Added: Check RadioButton AI Node at Init

b)
Added: Cycle BNode

c)
Added: Cycle current BNodes Edge

d)
Added: Show BNodeNr and Edge Nr.

e)
Added: Show Portal flags and modify flags (Needed for working with BNodes)

f)
Creating AINodes will set BNodes to Portals if they own the 'Flythrough flag only
or if the flag is set by hand (Needed for Dallas and Forcefields)


LevelView:
a)
Added: Show current AINode-Edge in yellow

b)
Added: Show Path On/Off

c)
Added: Show AI-Nodes On/Off

d)
Added: Show current room AI_Nodes only

e)
Portal Texture is set to Palmleaf1 during Add Room, Add Group.. now
(this was needed for BNodes, only texture with FlyThrough flag set)
Make sure you don't replace Palmleaf1 with other texture which has this flag not set!)

f)
added: Move camera to current AI-Node


RoomView:
a)
Bugfix: Fixed a AINode-edge displaying bug

b)
Show current AI_Node-Edge in yellow

c)
Added: Show Path On/Off

c)
Added: Show AI-Nodes On/Off

e)
Added: Show current room AI_Nodes only

f)
added: Move camera to current AI-Node

//===========================================================

New Modifications in Version A03_3i

TerrainBar:

a)
Inserting Terrain Sounds added (5 max) 
Added Add/Remove Sounds Buttons
Added Walkthrough TerrainSound Buttons
Added Soundselection Combobox
Added Input for Volume Bottom/Top
Added Input for Sound Height-position Bottom/Top

b)
Inserted changing Terrain-Fog RGB-Colors 

c)
If TerrainSky is not textured

Choosing Sky RGB-Color
Choosing Horizon RGB-Color

d)
Reset to Defaults for Fog-Scalar, Fog, Sky, Horizon Colors

e)
Bug fixes:
Matcenter Dialog update fixed

d)
added some new Shortcuts to SC

//===========================================================

New Modifications in Version A03_3h

DALLAS:

a)
Script_Export Dialog
Scriptname is added into ExportDialog automaticly.
Dallas Window enlarged.
Increased some Dallas-Variables


b)
SoundDialog:
Changed Layout.

Soundname is deleted during 'Insert Sound'.
Sound Object is placed at the middle of the selected Face.

c)
Waypoint Object is placed at RoomsHeights/2 above the selected Face..

d)
Editor Settings:
Added 'FaceConcavitychecklevels' ( 0.05 Default )
Small Data => better Check (searches Holes in Levels)

e)
EditorStatusBar:
Added display of Face-Concavity Checklevel.
 
f)
Ortho-Views:
Enhenced AI-Nodes display, selected AI-Node is better shown now.
(function not ready yet!)

g)
Bug fixes:
Game-Nodes und AI-Nodes:
Removed fault at 'N' / Shift+'N'
AI-Nodes: Removed selecting der AI-Nodes fault. 

h)
Perspektive-View:
Enhenced AI-Nodes display, selected AI-Node is better shown now.
(function not ready yet!)


//===============================================================================
The improvements are listed in the following sections: 
A) Pull-down bars 
 Menu Selections 
C) General improvements 
D) Bug Fixes 

********************************************************************* 
New improvements since Otherone's last beta 9 
********************************************************************* 

Section A) Pull-down bars......................................................... 


RoomBar, "R": 

(Modify section) 

Lathe: 
Lathe axes are selected automatically now. 


Bend: 
UNDO Bend Button added! 
Objects are moved during bending now. Mark Objects by Mouserubberband (lasso by holding 
the left mouse button down and dragging a box)or Key 'M'. UnMark by Alt+Rubberband or key 'U'. 
Bend axes are selected automatically now. 
Cursor shows where the bend target is. 
Numpad 5 centers Cursor and Reference Frame to 0.0 
Reference Frame position is computed in all 3 Ortho views automatically and set to this position. 
Bend is possible by marked distance or desired height. 
Bend is done circular left. Change sign to bend clockwise. (don't use) 
Added Room Move function, you can move the room to bend before bending to point 0.0 
Added some checks before bending. 


(Room section) 
New button: 'MoveRoomSplitFace' creates a 'CutFace' to cut the current room. This Face is 
marked and can be moved to desired cutting position before cutting. 
New button: 'SplitRoom' cuts current room by the 'CutFace'. Portals are not cut. 


(Edge section) 
New mouseover for 3rd button: "Find intersection of the current edge with the marked plane 
and insert a vertex". 


Terrain bar, "Tr": 
Deleted Objects are not displayed anymore. 
Added 'Select ALL' button for terrain cells. 
Added ability to "Deselect All" cells. 
Current Satellite slowly flashes to show it better. 
Exchanged left and right movement (< and >) to move in the proper direction now. 
The current satellite number is shown in the StatusBar. 
You can switch through existing satellites only. 
You can now LClick onto the satellite to select it. 
Added “View Satellites” function, chosen via Menu or Keystroke 'B' / 'Shift B' in World View. 
The sky texture is turned off automatically and the viewer is moved below the mine and looks up 
to the middle of the sky. 
...or... 
Keys “X” and "Shift+X" to cycle through satellites. 
View looks towards selected satellites to see how lighting / shadows would be placed. 


Texture bar, "Tx": 
Shows last_Current Texture at Editor Start. 
If no last_current texture is found in Registry, PaleWhiteRock001.TGA1 is shown as 
current texture. 
Shows light and color of choosen texture. 
Shows textures, including their animations, in the selection dialogue. 


Door bar, "D": 
UnplaceDoor Function in DoorWay Dialog added. 
Show Door Data soon as Attach new door. 
New attached Door becomes the current room. 


Vertex mode shortcut button added. 
Face mode shortcut button added. 
Object mode shortcut button added (or click on an object). 
Path mode shortcut button added. 
"SC" Shortcut menu added, explains all the quick keys. 

Section  Menu Selections......................................................... 

File / Editor settings: 
Lighting box, check to show lighting progress. 
Bend box, leave unchecked for old style, check for new style. 


Room: 
Added "Select Object by number" and "Select Portal by number". 


Tools: 
Removed the pop-ups for Mn3 Packager, OGF Tool and Music Tester selections. 
Added some tools entries to the Tool Menu (but you have to download these tools separately). 
The *.exe files can be placed in the D3 Main Directory or a folder of your choice. 
The folder can be specified in Editorsettings Dialog. 

Help / About D3Edit: 
Added new information. 

Section C) General Improvements....................................... 

Added Tool directory Inputbox. 
Tools are available in Room View. 
World View, Combine Rooms: Checks for too many faces as a result of combining. 
World View, Combine Rooms: Checks for too many portals, user can combine anyway if desired. 
Ortho View (Grid): Objects are not drawn as solids now, they are hatched so you can see 
through them. This makes movement and placement easier. 
Inserted switch for Bend 'new' or 'old' style and stored in Registry. 
New 'Lighting: ShowInfos'switch in Settings Dialog. Click this box to view the ongoing 
status of lighting (remember the old days when you didn't know if the editor had frozen? 
This will show you that it has not. If an internal check error pops up and can't be closed, 
simply uncheck this box and run normally). 
All new lighting info is shown in the main window bar only (World View). 
At lighting calculation end, text will be restored in the Bar. 
If your Room View room is not rendering with all of the new info added, go to File/Editor 
Settings and change "Display rooms to specified portal depth X" to "Display all rooms". 
Moving Objects by 0.1 on the terrain is possible now. 
During the input of the Terrain cell numbers, the first two marked cells - if available - 
are placed into the input fields. 
Added an 'intelligent' block selection of Terrain cells. With Alt+LClick 2 Cells 
around the desired region are marked. Key 'Select Block' marks the block, no matter what 
order the 2 cells were marked. 
Added key 'Force All Visible' (as opposed to 'Force marked Visible') ALL cells are made visible. 
RoomBar: Check > 64 Verts in CombineFace, AddVertstoFace, ClipFace and Lathe added. 
Lighting: removed auto close Lighting Dialog. 
Room View: Enhanced Grid zoom 
Menu enhanced, Level View: 
Select Room by number(zooms to Room) 
Select Face by number (zooms to Face) 
Select Object by number(zooms to Object) 
Select Portal by number(zooms to Portal) 
Right Mouse-key Menu enhanced: 
Select Room by number(zooms to Room) 
Select Face by number(zooms to Face) 
Select Object by number(zooms to Object) 
Select Portal by number(zooms to Portal) 
Current level room 
Remembers Grid preferences. 
Room View: Shortcut 'RAlt + c' centers the room in Null/Zero-position. 
Built in new XP Look, for those who need this.. 
Inserted Tooltips for new switches. 
Shortcut Window: New coded, Cursor, Picture up/down and Mousewheel support. 
Room View, Objects: Movement is restricted to current room only, no accidental loss. Together 
with Space you can move it through portals using Numpad 
2, 4, 6, 8. 
New buttons added on the Object Menu to rapidly move objects to new rooms. 
Now there are 3 new Buttons for this, but you must mark the target room in Room View before moving! 
1. Move to room center 
2. Move to marked face (onto that face!) 
3. Move to that face but with room height 
4. One step UNDO function for this all 
This movement to face works for current room too, but don't forget to mark the target face! As 
usual, you may have to finetune the position. 
Placing Objects to terrain room faces will work this way as well. 
Room View: Left Click onto any Object (from Face or Vertex mode) and Object mode is made active 
automatically. 
Room View: Inserted 4 new keys same as old menu points: Vertex, Face, Object & Path. 
Lighting Dialog: Result of "count lights" is automatically multiplied by 3. 
Level View: Switch to 'Current room' will center in the room view 
Added D3Edit Shortcuts dialog 'SC' (Shortcuts) in ToolBar. 

Section D) Bug Fixes...................................................... 

MatCenter: fixed a bug in dropdown view. 
Fixed bug during canceling Inputs. 
Terrain: Crash during mark Terrain Cells fixed. 
New Checkbox added for extended error messages. 
Added some more checks during Lighting Mine. 
Checks for Win XP or Win98, some version related functions are switched by result. 
Scrolling Textures and Objects are switched off in W98. 
If W98, checks for screen color less then 24k. This forces a warning message for voodoo 
card users. 
Fixed render by PortalDepth bug. 
Rendering Settings: Fixed and stored in Registry. 
Grid View mirroring-bug under W98 fixed. 
Fixed the unwanted auto-texturing of a terrain cell by scrolling the terrain with the mouse 
(release of the left mouse button would texture the cell under it). 
Level View: 'R'-key now works when Message window is opened. 'R'-key bug when room 0 is 
deleted, fixed. 
Shortcut window: Removed ESC-key-bug. Added some entrances. 
Room View: Fixed the presentation bug in Textured View 
Level View: Keystroke 'ALT + <-' moves mine now (was rotate). 
Fixed Win XP 'Freeze Bug' during BOA calculation. 

Look for more improvements in the future!