Subversion Repositories plumbers

Compare Revisions

No changes between revisions

Regard whitespace Rev 7 → Rev 8

/trunk/SceneEditor/Project1_Icon.ICO
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/SceneEditor/BinEdit.dproj
55,7 → 55,7
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<Icon_MainIcon>Project1_Icon.ico</Icon_MainIcon>
<Icon_MainIcon>BinEdit_Icon.ico</Icon_MainIcon>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
70,6 → 70,10
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppEnableHighDPI>true</AppEnableHighDPI>
<DCC_ExeOutput>E:\_test</DCC_ExeOutput>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<Version>7.0</Version>
/trunk/SceneEditor/BinEdit.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/SceneEditor/BinEdit_Icon.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/SceneEditor/Unit1.dfm
37,7 → 37,6
TabOrder = 0
OnClick = ListBox1Click
OnDblClick = ListBox1DblClick
ExplicitHeight = 466
end
object Button1: TButton
Left = 145
48,7 → 47,6
Caption = '+'
TabOrder = 3
OnClick = Button1Click
ExplicitTop = 488
end
object Button2: TButton
Left = 184
59,7 → 57,6
Caption = '-'
TabOrder = 4
OnClick = Button2Click
ExplicitTop = 488
end
object Button3: TButton
Left = 8
70,7 → 67,6
Caption = 'Save'
TabOrder = 6
OnClick = Button3Click
ExplicitTop = 534
end
object Button4: TButton
Left = 8
81,7 → 77,6
Caption = '^'
TabOrder = 1
OnClick = Button4Click
ExplicitTop = 488
end
object Button5: TButton
Left = 47
92,7 → 87,6
Caption = 'v'
TabOrder = 2
OnClick = Button5Click
ExplicitTop = 488
end
object Button10: TButton
Left = 112
103,7 → 97,6
Caption = 'Save + Test'
TabOrder = 7
OnClick = Button10Click
ExplicitTop = 534
end
object PageControl2: TPageControl
Left = 223
110,15 → 103,11
Top = 8
Width = 799
Height = 603
ActivePage = TabSheet5
ActivePage = TabSheet4
Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 8
ExplicitWidth = 812
ExplicitHeight = 572
object TabSheet4: TTabSheet
Caption = 'Pictures'
ExplicitWidth = 804
ExplicitHeight = 544
DesignSize = (
791
575)
242,7 → 231,6
Caption = '+'
TabOrder = 6
OnClick = Button6Click
ExplicitTop = 517
end
object Button7: TButton
Left = 216
253,7 → 241,6
Caption = '-'
TabOrder = 7
OnClick = Button7Click
ExplicitTop = 517
end
object Button8: TButton
Left = 11
264,7 → 251,6
Caption = '^'
TabOrder = 4
OnClick = Button8Click
ExplicitTop = 517
end
object Button9: TButton
Left = 50
275,7 → 261,6
Caption = 'v'
TabOrder = 5
OnClick = Button9Click
ExplicitTop = 517
end
object ListBox2: TListBox
Left = 10
287,7 → 272,6
TabOrder = 3
OnClick = ListBox2Click
OnDblClick = ListBox2DblClick
ExplicitHeight = 396
end
object Edit3: TEdit
Left = 368
424,6 → 408,7
ItemHeight = 13
PopupMenu = PopupMenu1
TabOrder = 11
OnClick = ListBox3Click
OnDblClick = ListBox3DblClick
OnMouseDown = ListBox3MouseDown
end
472,15 → 457,29
Width = 305
Height = 211
Stretch = True
OnMouseMove = Image1MouseMove
OnDblClick = Button12Click
end
end
object Panel3: TPanel
Left = 583
Top = 439
Width = 194
Height = 122
BevelOuter = bvNone
TabOrder = 17
object Image3: TImage
Left = 8
Top = 0
Width = 177
Height = 108
Stretch = True
OnDblClick = ListBox3DblClick
end
end
end
object TabSheet5: TTabSheet
Caption = 'Decision'
ImageIndex = 1
ExplicitWidth = 804
ExplicitHeight = 573
object Label3: TLabel
Left = 16
Top = 16
787,7 → 786,7
Height = 22
MaxValue = 0
MinValue = 0
TabOrder = 3
TabOrder = 4
Value = 0
OnChange = ActionSpinEditsChange
end
798,7 → 797,7
Height = 22
MaxValue = 0
MinValue = 0
TabOrder = 4
TabOrder = 3
Value = 0
OnChange = ActionSpinEditsChange
end
873,7 → 872,6
Caption = 'New'
TabOrder = 5
OnClick = Button14Click
ExplicitTop = 530
end
object Timer1: TTimer
Enabled = False
/trunk/SceneEditor/Unit1.pas
1,6 → 1,14
unit Unit1;
 
// Idea: create a small thumbnail for "unused files", too?
// BUG: deleting of pictures does not work! the editor becomes very confused, and the changes are not saved at all?
// TODO: when closing the editor: ask if the user wants to save (but only if they changed something)
// TODO: the "folder open" icons look like you can CHOOSE a file, not open it!
// - change the icon to something else
// - add open-dialogs for choosing the bmp and wav files
// Idea: When actions are deleted, remove the colorful marking on the picture?
// Idea: unused liste auch bei decision page anzeigen
// Idea: hotspots: netz ziehen anstelle linke und rechts maustaste. netz in jede beliebige richtung ziehen und topleft/bottomright automatisch bestimmen
// Idea: decision bitmap markings: anti moiree?
 
interface
 
115,6 → 123,8
Addtoscene1: TMenuItem;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Image3: TImage;
procedure ListBox1Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit2Change(Sender: TObject);
160,6 → 170,7
procedure Addtoscene1Click(Sender: TObject);
procedure ListBox3MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure ListBox3Click(Sender: TObject);
private
Game: TGameBinFile;
PlayStart: Cardinal;
166,6 → 177,7
MediaplayerOpened: boolean;
StopPlayRequest: boolean;
FirstTickCount: Cardinal;
procedure ShowSceneBmp;
function CurScene: PSceneDef;
procedure LoadScene;
procedure Load;
416,6 → 428,7
end
else
begin
TabSheet5.TabVisible := false;
DisableEnablePictureControls(false);
DisableEnableSceneControls(false);
DisableEnableFileControls(false);
513,6 → 526,7
DisableEnableFileControls(true);
DisableEnableSceneControls(true);
DisableEnablePictureControls(true);
TabSheet5.TabVisible := true;
Edit1.Enabled := true;
SpinEdit1.Enabled := true;
Edit3.Enabled := true;
523,6 → 537,22
end;
end;
 
procedure TForm1.ShowSceneBmp;
var
Filename: string;
begin
Filename := string(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurPicture^.szBitmapFile);
if FileExists(Filename) then
begin
Image2.Picture.LoadFromFile(Filename);
AspectRatio(Image2, Panel2);
end
else
begin
Image2.Picture := nil;
end;
end;
 
procedure TForm1.Button16Click(Sender: TObject);
begin
ListBox2.ItemIndex := 0; // go to the beginning
691,6 → 721,7
ListBox2.ItemIndex := bakIdx;
ListBox2Click(Listbox2);
end;
RecalcUnusedFiles;
end;
end;
 
765,6 → 796,7
begin
_WriteStringToFilename(@CurScene^.szDecisionBmp, Edit2.Text);
RecalcUnusedFiles;
RedrawDecisionBitmap;
Label27.Visible := not FileExists(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit2.Text) and not (Edit2.Text = '');
Button11.Visible := CurScene^.szDecisionBmp <> '';
end;
774,6 → 806,7
_WriteStringToFilename(@CurPicture^.szBitmapFile, Edit3.Text);
ListBox2.Items[ListBox2.ItemIndex] := Format('(%d) %s', [CurPicture^.duration, CurPicture^.szBitmapFile]);
RecalcUnusedFiles;
ShowSceneBmp;
Label26.Visible := not FileExists(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit3.Text);
Button12.Visible := CurPicture^.szBitmapFile <> '';
end;
864,22 → 897,11
end;
 
procedure TForm1.ListBox2Click(Sender: TObject);
var
Filename: string;
begin
SpinEdit13.Value := CurPicture^.duration;
Edit3.Text := string(CurPicture^.szBitmapFile);
 
Filename := string(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurPicture^.szBitmapFile);
if FileExists(Filename) then
begin
Image2.Picture.LoadFromFile(Filename);
AspectRatio(Image2, Panel2);
end
else
begin
Image2.Picture := nil;
end;
ShowSceneBmp;
 
Label18.Caption := _DecisecondToTime(CurPictureTimepos);
 
894,6 → 916,18
Button15Click(Button15);
end;
 
procedure TForm1.ListBox3Click(Sender: TObject);
var
fileName: string;
begin
if ListBox3.ItemIndex = -1 then exit;
fileName := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + ListBox3.Items[ListBox3.ItemIndex];
Image3.Visible := FileExists(FileName);
if not FileExists(FileName) then exit;
Image3.Picture.LoadFromFile(Filename);
AspectRatio(Image3, Panel3);
end;
 
procedure TForm1.ListBox3DblClick(Sender: TObject);
var
fileName: string;
1006,6 → 1040,8
try
ListBox3.Clear;
 
Image3.Visible := false;
 
if FindFirst(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + '*.*', faArchive, SR) = 0 then
begin
repeat
1231,7 → 1267,7
 
procedure TForm1.About1Click(Sender: TObject);
begin
ShowMessage('Plumbers Dont''t Wear Ties - GAME.BIN editor (can be also used to create new games based on the "ShowTime" engine!)'+#13#10#13#10+'Written by Daniel Marschall (www.daniel-marschall.de)'+#13#10#13#10+'Published by ViaThinkSoft (www.viathinksoft.com).'+#13#10#13#10+'Current version: ' + CUR_VER);
ShowMessage('Plumbers Dont''t Wear Ties - GAME.BIN editor (can be also used to create new games based on the "ShowTime" engine!)'+#13#10#13#10+'Written by Daniel Marschall (www.daniel-marschall.de)'+#13#10#13#10+'Published by ViaThinkSoft (www.viathinksoft.com)'+#13#10#13#10+'Current version: ' + CUR_VER);
end;
 
procedure TForm1.ActionSpinEditsChange(Sender: TObject);
1263,6 → 1299,9
Filename: string;
begin
FileName := string(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit2.Text);
 
Image1.Visible := FileExists(FileName);
 
if not FileExists(FileName) then exit;
 
Image1.Picture.Bitmap.LoadFromFile(FileName);