/trunk/PlumbersDelphi.groupproj |
---|
6,7 → 6,7 |
<Projects Include="SceneEditor\BinEdit.dproj"> |
<Dependencies/> |
</Projects> |
<Projects Include="Win32_Player\Showtime32.dproj"> |
<Projects Include="Win32_Player\ShowTime32.dproj"> |
<Dependencies/> |
</Projects> |
</ItemGroup> |
26,23 → 26,23 |
<Target Name="BinEdit:Make"> |
<MSBuild Projects="SceneEditor\BinEdit.dproj" Targets="Make"/> |
</Target> |
<Target Name="Showtime32"> |
<MSBuild Projects="Win32_Player\Showtime32.dproj"/> |
<Target Name="ShowTime32"> |
<MSBuild Projects="Win32_Player\ShowTime32.dproj"/> |
</Target> |
<Target Name="Showtime32:Clean"> |
<MSBuild Projects="Win32_Player\Showtime32.dproj" Targets="Clean"/> |
<Target Name="ShowTime32:Clean"> |
<MSBuild Projects="Win32_Player\ShowTime32.dproj" Targets="Clean"/> |
</Target> |
<Target Name="Showtime32:Make"> |
<MSBuild Projects="Win32_Player\Showtime32.dproj" Targets="Make"/> |
<Target Name="ShowTime32:Make"> |
<MSBuild Projects="Win32_Player\ShowTime32.dproj" Targets="Make"/> |
</Target> |
<Target Name="Build"> |
<CallTarget Targets="BinEdit;Showtime32"/> |
<CallTarget Targets="BinEdit;ShowTime32"/> |
</Target> |
<Target Name="Clean"> |
<CallTarget Targets="BinEdit:Clean;Showtime32:Clean"/> |
<CallTarget Targets="BinEdit:Clean;ShowTime32:Clean"/> |
</Target> |
<Target Name="Make"> |
<CallTarget Targets="BinEdit:Make;Showtime32:Make"/> |
<CallTarget Targets="BinEdit:Make;ShowTime32:Make"/> |
</Target> |
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/> |
</Project> |
/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); |
/trunk/Win32_Player/Main.pas |
---|
1,14 → 1,23 |
unit Main; |
// BUG: If you drag the window, the dia show will stop playing, but the sound continues! This makes everything out of sync. |
// TODO: When the windows is only resized a little bit (A few pixels), the window should not centered |
// Idea: Calc the width and height of ALL pictures, and then size the form to the biggest value? |
// BUG: if bitmap is not existing, then the error "ReadBitmapFile(): Unable to open bitmap file" appears. Not good. |
// BUG: If you drag the window, the dia show will stop playing, but the sound continues! This makes everything out of sync. |
// TODO: Ini Parameter if fullscreen is applied or not |
// TODO: Check out if hotspot coords should have their origin at the picture or the form position. |
// Idea: Savestates. Speedup. Pause. |
// Idea: Use Space bar to go to the next decision point. |
// ... Calc the width and height of ALL pictures, and then size the form to the biggest value? |
// ... or hard code the resolution in the INI file? |
// Idea: Ini Parameter if fullscreen is applied or not |
// Idea: Savestates, speedup, pause, Use Space bar to go to the next decision point. |
// ----------------------------------------------------------------------------- |
// HOTSPOT_RELATIVE_ORIGIN is a new behavior which is not compatible with the original engine. |
// With HOTSPOT_RELATIVE_ORIGIN enabled, the coordinates will be relative to the picture |
// The original game has the origin at the top left corner of the screen. |
// This is a problem because the game as well as the scene editor does not know the |
// desired resolution, as it is automatically determined. |
// If we would hardcode the desired canvas (640x480) in <ExeName>.ini, then |
// it would work, but then, the scene Editor can not know the desired resolution... |
{$DEFINE HOTSPOT_RELATIVE_ORIGIN} |
interface |
uses |
107,13 → 116,13 |
// Make form bigger if necessary |
if Image1.Width > ClientWidth then |
begin |
ClientWidth := Image1.Width; |
ClientWidth := Min(Image1.Width, Screen.Width); |
if (ClientWidth >= Screen.Width) then FullscreenMode := true; |
Position := poScreenCenter; |
end; |
if Image1.Height > ClientHeight then |
begin |
ClientHeight := Image1.Height; |
ClientHeight := Min(Image1.Height, Screen.Height); |
if (ClientHeight >= Screen.Height) then FullscreenMode := true; |
Position := poScreenCenter; |
end; |
232,7 → 241,7 |
var |
i: integer; |
begin |
// TODO: if hotspots are overlaying; which hotspot will be prefered? the top ones? check out the original game. |
// If hotspots are overlaying, the lowest action will be chosen (same behavior as original game) |
for i := Low(FHotspots) to High(FHotspots) do |
begin |
if Assigned(FHotspots[i].lpAction) and |
249,7 → 258,11 |
procedure TMainForm.ControlClick(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
begin |
{$IFDEF HOTSPOT_RELATIVE_ORIGIN} |
ClickEvent(X, Y); |
{$ELSE} |
ClickEvent(X+TControl(Sender).Left, Y+TControl(Sender).Top); |
{$ENDIF} |
end; |
procedure TMainForm.StartupTimerTimer(Sender: TObject); |
/trunk/Win32_Player/Showtime32.dpr |
---|
1,4 → 1,4 |
program Showtime32; |
program ShowTime32; |
uses |
Forms, |
/trunk/Win32_Player/Showtime32.dproj |
---|
1,7 → 1,7 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<PropertyGroup> |
<ProjectGuid>{F68EE1AF-C815-4B78-9228-27C1D5A58382}</ProjectGuid> |
<MainSource>Showtime32.dpr</MainSource> |
<MainSource>ShowTime32.dpr</MainSource> |
<Base>True</Base> |
<Config Condition="'$(Config)'==''">Debug</Config> |
<TargetedPlatforms>1</TargetedPlatforms> |
50,7 → 50,7 |
<DCC_SymbolReferenceInfo>1</DCC_SymbolReferenceInfo> |
<DCC_ImageBase>00400000</DCC_ImageBase> |
<DCC_ExeOutput>C:\Users\DELL User\Downloads\Plumbers\PC Contents\C\PLUMBER\</DCC_ExeOutput> |
<SanitizedProjectName>Showtime32</SanitizedProjectName> |
<SanitizedProjectName>ShowTime32</SanitizedProjectName> |
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace> |
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> |
<VerInfo_Locale>1031</VerInfo_Locale> |
116,7 → 116,7 |
<BorlandProject> |
<Delphi.Personality> |
<Source> |
<Source Name="MainSource">Showtime32.dpr</Source> |
<Source Name="MainSource">ShowTime32.dpr</Source> |
</Source> |
</Delphi.Personality> |
<Platforms> |