Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Trunk] TES5LODGen update, LODGen options form
git-svn-id: http://skyrim-plugin-decoding-project.googlecode.com/svn@1879 bdfc8fb3-84cf-a68a-e902-ed0415cf5604
- Loading branch information
Showing
7 changed files
with
566 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
object frmLODGen: TfrmLODGen | ||
Left = 0 | ||
Top = 0 | ||
BorderStyle = bsDialog | ||
Caption = 'LODGen Options' | ||
ClientHeight = 410 | ||
ClientWidth = 791 | ||
Color = clBtnFace | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -11 | ||
Font.Name = 'Tahoma' | ||
Font.Style = [] | ||
KeyPreview = True | ||
OldCreateOrder = False | ||
Position = poMainFormCenter | ||
OnKeyDown = FormKeyDown | ||
OnShow = FormShow | ||
PixelsPerInch = 96 | ||
TextHeight = 13 | ||
object Label1: TLabel | ||
Left = 8 | ||
Top = 327 | ||
Width = 769 | ||
Height = 39 | ||
AutoSize = False | ||
Caption = | ||
'Only worldspaces that have existing lodsettings file "LODSetting' + | ||
's\<Worldspace>.lod" are shown either in the Data folder, or in B' + | ||
'SA archives. Archives are loaded similar to the game itself - th' + | ||
'e ones specified in Skyrim.ini and those that match loaded plugi' + | ||
'ns names.' | ||
WordWrap = True | ||
end | ||
object Label2: TLabel | ||
Left = 8 | ||
Top = 8 | ||
Width = 232 | ||
Height = 13 | ||
Caption = 'Select worldspace(s) to generate LOD for' | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -11 | ||
Font.Name = 'Tahoma' | ||
Font.Style = [fsBold] | ||
ParentFont = False | ||
end | ||
object Label3: TLabel | ||
Left = 376 | ||
Top = 46 | ||
Width = 401 | ||
Height = 33 | ||
AutoSize = False | ||
Caption = | ||
'Create distant LOD for static objects like mountains, rocks, hou' + | ||
'ses, castles and the like. Requires lowpoly LOD mesh resources t' + | ||
'o be present in the Data folder.' | ||
WordWrap = True | ||
end | ||
object Label4: TLabel | ||
Left = 376 | ||
Top = 198 | ||
Width = 401 | ||
Height = 50 | ||
AutoSize = False | ||
Caption = | ||
'Create distant LOD for trees. Requires 2D billboard images to be' + | ||
' present in the Data folder or in BSA archives. Those are not in' + | ||
'cluded with the game and must be installed separately.' | ||
WordWrap = True | ||
end | ||
object clbWorldspace: TCheckListBox | ||
Left = 8 | ||
Top = 24 | ||
Width = 329 | ||
Height = 297 | ||
ItemHeight = 13 | ||
PopupMenu = PopupMenu1 | ||
TabOrder = 1 | ||
end | ||
object pnlBottom: TPanel | ||
Left = 0 | ||
Top = 369 | ||
Width = 791 | ||
Height = 41 | ||
Align = alBottom | ||
BevelOuter = bvNone | ||
ParentColor = True | ||
TabOrder = 0 | ||
ExplicitLeft = -135 | ||
ExplicitTop = 407 | ||
ExplicitWidth = 935 | ||
DesignSize = ( | ||
791 | ||
41) | ||
object btnOk: TButton | ||
Left = 593 | ||
Top = 10 | ||
Width = 91 | ||
Height = 25 | ||
Anchors = [akTop, akRight] | ||
Caption = 'Generate' | ||
ModalResult = 1 | ||
TabOrder = 0 | ||
ExplicitLeft = 737 | ||
end | ||
object btnCancel: TButton | ||
Left = 690 | ||
Top = 10 | ||
Width = 91 | ||
Height = 25 | ||
Anchors = [akTop, akRight] | ||
Caption = 'Cancel' | ||
ModalResult = 2 | ||
TabOrder = 1 | ||
ExplicitLeft = 834 | ||
end | ||
object pnlBevel: TPanel | ||
AlignWithMargins = True | ||
Left = 4 | ||
Top = 0 | ||
Width = 783 | ||
Height = 1 | ||
Margins.Left = 4 | ||
Margins.Top = 0 | ||
Margins.Right = 4 | ||
Margins.Bottom = 0 | ||
Align = alTop | ||
TabOrder = 2 | ||
ExplicitWidth = 927 | ||
end | ||
end | ||
object cbObjectsLOD: TCheckBox | ||
Left = 360 | ||
Top = 24 | ||
Width = 97 | ||
Height = 17 | ||
Caption = 'Objects LOD' | ||
Checked = True | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -11 | ||
Font.Name = 'Tahoma' | ||
Font.Style = [fsBold] | ||
ParentFont = False | ||
State = cbChecked | ||
TabOrder = 2 | ||
OnClick = cbObjectsLODClick | ||
end | ||
object cbTreesLOD: TCheckBox | ||
Left = 360 | ||
Top = 176 | ||
Width = 97 | ||
Height = 17 | ||
Caption = 'Trees LOD' | ||
Checked = True | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -11 | ||
Font.Name = 'Tahoma' | ||
Font.Style = [fsBold] | ||
ParentFont = False | ||
State = cbChecked | ||
TabOrder = 3 | ||
end | ||
object cbNoTangents: TCheckBox | ||
Left = 376 | ||
Top = 87 | ||
Width = 145 | ||
Height = 17 | ||
Hint = | ||
'Reduces size of generated LOD and frees memory for the game at t' + | ||
'he expense of LOD quality' | ||
Caption = 'No tangents' | ||
ParentShowHint = False | ||
ShowHint = True | ||
TabOrder = 4 | ||
end | ||
object cbNoVertexColors: TCheckBox | ||
Left = 376 | ||
Top = 110 | ||
Width = 145 | ||
Height = 17 | ||
Hint = | ||
'Reduces size of generated LOD and frees memory for the game at t' + | ||
'he expense of LOD quality' | ||
Caption = 'No vertex colors' | ||
ParentShowHint = False | ||
ShowHint = True | ||
TabOrder = 5 | ||
end | ||
object btnSplitTreesLOD: TButton | ||
Left = 672 | ||
Top = 255 | ||
Width = 105 | ||
Height = 25 | ||
Caption = 'Split LOD Atlas' | ||
TabOrder = 6 | ||
Visible = False | ||
OnClick = btnSplitTreesLODClick | ||
end | ||
object PopupMenu1: TPopupMenu | ||
Left = 168 | ||
Top = 104 | ||
object SelectAll1: TMenuItem | ||
Caption = 'Select All' | ||
OnClick = SelectAll1Click | ||
end | ||
object SelectNone1: TMenuItem | ||
Caption = 'Select None' | ||
OnClick = SelectNone1Click | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
unit frmLODGenForm; | ||
|
||
interface | ||
|
||
uses | ||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | ||
Dialogs, StdCtrls, ExtCtrls, CheckLst, Menus, wbInterface; | ||
|
||
type | ||
TfrmLODGen = class(TForm) | ||
clbWorldspace: TCheckListBox; | ||
pnlBottom: TPanel; | ||
btnOk: TButton; | ||
btnCancel: TButton; | ||
pnlBevel: TPanel; | ||
Label1: TLabel; | ||
cbObjectsLOD: TCheckBox; | ||
Label2: TLabel; | ||
cbTreesLOD: TCheckBox; | ||
Label3: TLabel; | ||
cbNoTangents: TCheckBox; | ||
cbNoVertexColors: TCheckBox; | ||
Label4: TLabel; | ||
btnSplitTreesLOD: TButton; | ||
PopupMenu1: TPopupMenu; | ||
SelectAll1: TMenuItem; | ||
SelectNone1: TMenuItem; | ||
procedure cbObjectsLODClick(Sender: TObject); | ||
procedure FormShow(Sender: TObject); | ||
procedure btnSplitTreesLODClick(Sender: TObject); | ||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); | ||
procedure SelectAll1Click(Sender: TObject); | ||
procedure SelectNone1Click(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
SplitTreesLOD: procedure (const aWorldspace: IwbMainRecord) of object; | ||
end; | ||
|
||
var | ||
frmLODGen: TfrmLODGen; | ||
|
||
implementation | ||
|
||
{$R *.dfm} | ||
|
||
procedure TfrmLODGen.btnSplitTreesLODClick(Sender: TObject); | ||
var | ||
i: integer; | ||
begin | ||
if not Assigned(SplitTreesLOD) then | ||
Exit; | ||
|
||
for i := 0 to Pred(clbWorldspace.Count) do | ||
if clbWorldspace.Checked[i] then | ||
SplitTreesLOD(IwbMainRecord(Integer(clbWorldspace.Items.Objects[i]))); | ||
end; | ||
|
||
procedure TfrmLODGen.cbObjectsLODClick(Sender: TObject); | ||
begin | ||
cbNoTangents.Enabled := cbObjectsLOD.Checked; | ||
cbNoVertexColors.Enabled := cbObjectsLOD.Checked; | ||
end; | ||
|
||
procedure TfrmLODGen.FormKeyDown(Sender: TObject; var Key: Word; | ||
Shift: TShiftState); | ||
begin | ||
if Key = VK_ESCAPE then | ||
ModalResult := mrCancel; | ||
end; | ||
|
||
procedure TfrmLODGen.FormShow(Sender: TObject); | ||
begin | ||
cbObjectsLODClick(nil); | ||
end; | ||
|
||
procedure TfrmLODGen.SelectAll1Click(Sender: TObject); | ||
var | ||
i: Integer; | ||
begin | ||
clbWorldspace.Items.BeginUpdate; | ||
try | ||
for i := 0 to Pred(clbWorldspace.Items.Count) do | ||
if clbWorldspace.ItemEnabled[i] then | ||
clbWorldspace.Checked[i] := True; | ||
finally | ||
clbWorldspace.Items.EndUpdate; | ||
end; | ||
end; | ||
|
||
procedure TfrmLODGen.SelectNone1Click(Sender: TObject); | ||
var | ||
i: Integer; | ||
begin | ||
clbWorldspace.Items.BeginUpdate; | ||
try | ||
for i := 0 to Pred(clbWorldspace.Items.Count) do | ||
if clbWorldspace.ItemEnabled[i] then | ||
clbWorldspace.Checked[i] := False; | ||
finally | ||
clbWorldspace.Items.EndUpdate; | ||
end; | ||
end; | ||
|
||
end. |
Binary file not shown.
Oops, something went wrong.