/trunk/FileFormat/C/plumbers.h |
---|
0,0 → 1,48 |
#ifndef PLUMBERS_GAMESTRUCT_HEADER |
#define PLUMBERS_GAMESTRUCT_HEADER |
#include <stdint.h> |
#define SCENEID_PREVDECISION 32767 |
#define SCENEID_ENDGAME -1 |
struct _coord { |
int16_t x; |
int16_t y; |
}; |
struct _actionDef { |
int32_t scoreDelta; |
int16_t nextSceneID; // will jump to the scene with the name "SC<nextSceneID>" |
// 7FFF (32767) = end game |
// FFFF ( -1) = go back to the last decision |
int16_t sceneSegment; // 0 = scene from beginning, 1 = decision page |
_coord cHotspotTopLeft; |
_coord cHotspotBottomRigh; |
}; |
struct _sceneDef { |
int16_t numPics; |
int16_t pictureIndex; |
int16_t numActions; |
char szSceneFolder[14]; // Foldername *must* be "SCxx" (case sensitive) where xx stands for a 2 digit ID |
char szDialogWav[14]; |
char szDecisionBmp[14]; |
_actionDef actions[3]; |
}; |
struct _pictureDef { |
int16_t duration; // deciseconds |
char szBitmapFile[14]; |
}; |
struct _gameBinFile { |
int16_t unknown1[7]; |
int16_t numScenes; |
int16_t numPics; |
int16_t unknown2[2]; |
_sceneDef scenes[100]; // Scenes start at file position 0x0016 |
_pictureDef pictures[2000]; // Pictures start at file position 0x2596 |
}; |
#endif // PLUMBERS_GAMESTRUCT_HEADER |
/trunk/FileFormat/C |
---|
Property changes: |
Added: svn:ignore |
+*.dcu |
+*.~* |
+__history |
+*.local |
+*.identcache |
+*.stat |
/trunk/FileFormat/Delphi/GameBinStruct.pas |
---|
0,0 → 1,174 |
unit GameBinStruct; |
{$A-} |
interface |
const |
SCENEID_PREVDECISION = -1; |
SCENEID_ENDGAME = 32767; |
type |
PCoord = ^TCoord; |
TCoord = packed record |
x: Word; |
y: Word; |
end; |
PActionDef = ^TActionDef; |
TActionDef = packed record |
scoreDelta: Integer; |
nextSceneID: SmallInt; // will jump to the scene with the name "SC<nextSceneID>" |
// 7FFF (32767) = end game |
// FFFF ( -1) = go back to the last decision |
sceneSegment: SmallInt; // 0 = scene from beginning, 1 = decision page |
cHotspotTopLeft: TCoord; |
cHotspotBottomRight: TCoord; |
end; |
PAnsiFileName = ^TAnsiFileName; |
TAnsiFileName = array[0..13] of AnsiChar; |
PSceneDef = ^TSceneDef; |
TSceneDef = packed record |
numPics: Word; |
pictureIndex: Word; |
numActions: Word; |
szSceneFolder: TAnsiFileName; // Foldername *must* be "SCxx" (case sensitive) where xx stands for a 2 digit ID |
szDialogWav: TAnsiFileName; |
szDecisionBmp: TAnsiFileName; |
actions: array[0..2] of TActionDef; |
end; |
PPictureDef = ^TPictureDef; |
TPictureDef = packed record |
duration: Word; // deciseconds |
szBitmapFile: TAnsiFileName; |
end; |
PGameBinFile = ^TGameBinFile; |
TGameBinFile = packed record |
unknown1: array[0..6] of Word; |
numScenes: Word; |
numPics: Word; |
unknown2: array[0..1] of Word; |
scenes: array[0..99] of TSceneDef; // Scenes start at 0x0016 |
pictures: array[0..1999] of TPictureDef; // Pictures start at 0x2596 |
function AddSceneAtEnd(SceneID: integer): PSceneDef; |
procedure DeleteScene(SceneIndex: integer); |
procedure SwapScene(IndexA, IndexB: integer); |
procedure DeletePicture(PictureIndex: integer); |
procedure SwapPicture(IndexA, IndexB: integer); |
function AddPictureBetween(Index: integer): PPictureDef; |
end; |
procedure _WriteStringToFilename(x: PAnsiFileName; s: AnsiString); |
implementation |
uses |
Windows, SysUtils, Math; |
procedure _WriteStringToFilename(x: PAnsiFileName; s: AnsiString); |
begin |
ZeroMemory(x, Length(x^)); |
StrPLCopy(x^, s, Length(x^)); |
end; |
function TGameBinFile.AddSceneAtEnd(SceneID: integer): PSceneDef; |
begin |
if Self.numScenes >= Length(Self.scenes) then raise Exception.Create('No more space for another scene'); |
if sceneID >= Length(Self.scenes) then raise Exception.Create('SceneID is too large.'); |
result := @Self.scenes[Self.numScenes]; |
ZeroMemory(result, SizeOf(TSceneDef)); |
_WriteStringToFilename(@result.szSceneFolder, AnsiString(Format('SC%.2d', [sceneID]))); |
Inc(Self.numScenes); |
end; |
procedure TGameBinFile.DeleteScene(SceneIndex: integer); |
begin |
if ((SceneIndex < 0) or (SceneIndex >= Length(Self.scenes))) then raise Exception.Create('Invalid scene index'); |
If SceneIndex < Length(Self.scenes)-1 then |
begin |
CopyMemory(@Self.scenes[SceneIndex], @Self.scenes[SceneIndex+1], (Length(Self.scenes)-SceneIndex-1)*SizeOf(TSceneDef)); |
end; |
ZeroMemory(@Self.scenes[Length(Self.scenes)-1], SizeOf(TSceneDef)); |
end; |
procedure TGameBinFile.SwapScene(IndexA, IndexB: integer); |
var |
bakScene: TSceneDef; |
begin |
if IndexA = IndexB then exit; |
if ((Min(IndexA, IndexB) < 0) or (Max(IndexA, IndexB) >= Length(Self.scenes))) then raise Exception.Create('Invalid scene index'); |
CopyMemory(@bakScene, @Self.scenes[IndexA], SizeOf(TSceneDef)); |
CopyMemory(@Self.scenes[IndexA], @Self.scenes[IndexB], SizeOf(TSceneDef)); |
CopyMemory(@Self.scenes[IndexB], @bakScene, SizeOf(TSceneDef)); |
end; |
procedure TGameBinFile.DeletePicture(PictureIndex: integer); |
var |
iScene: integer; |
begin |
if (PictureIndex < 0) or (PictureIndex >= Length(Self.pictures)) then raise Exception.Create('Invalid picture index'); |
for iScene := 0 to Self.numScenes-1 do |
begin |
if (PictureIndex >= Self.scenes[iScene].pictureIndex) and |
(PictureIndex <= Self.scenes[iScene].pictureIndex + Self.scenes[iScene].numPics - 1) then |
begin |
Dec(Self.scenes[iScene].numPics); |
end |
else if (PictureIndex < Self.scenes[iScene].pictureIndex) then |
begin |
Dec(Self.scenes[iScene].pictureIndex); |
end; |
end; |
If PictureIndex < Length(Self.pictures)-1 then |
begin |
CopyMemory(@Self.pictures[PictureIndex], @Self.pictures[PictureIndex+1], (Length(Self.pictures)-PictureIndex-1)*SizeOf(TPictureDef)); |
end; |
ZeroMemory(@Self.pictures[Length(Self.pictures)-1], SizeOf(TPictureDef)); |
end; |
procedure TGameBinFile.SwapPicture(IndexA, IndexB: integer); |
var |
bakPicture: TPictureDef; |
begin |
// QUE: should we forbid that a picture between "scene borders" are swapped? |
if IndexA = IndexB then exit; |
if ((Min(IndexA, IndexB) < 0) or (Max(IndexA, IndexB) >= Length(Self.pictures))) then raise Exception.Create('Invalid picture index'); |
CopyMemory(@bakPicture, @Self.pictures[IndexA], SizeOf(TPictureDef)); |
CopyMemory(@Self.pictures[IndexA], @Self.pictures[IndexB], SizeOf(TPictureDef)); |
CopyMemory(@Self.pictures[IndexB], @bakPicture, SizeOf(TPictureDef)); |
end; |
function TGameBinFile.AddPictureBetween(Index: integer): PPictureDef; |
var |
iScene: integer; |
begin |
if Self.numPics >= Length(Self.pictures) then raise Exception.Create('No more space for another picture'); |
if ((Index < 0) or (Index >= Length(Self.pictures))) then raise Exception.Create('Invalid picture index'); |
for iScene := 0 to Self.numScenes-1 do |
begin |
if (Index >= Self.scenes[iScene].pictureIndex) and |
(index <= Self.scenes[iScene].pictureIndex + Max(0,Self.scenes[iScene].numPics - 1)) then |
begin |
Inc(Self.scenes[iScene].numPics); |
end |
else if (index < Self.scenes[iScene].pictureIndex) then |
begin |
Inc(Self.scenes[iScene].pictureIndex); |
end; |
end; |
result := @Self.pictures[Index]; |
CopyMemory(@Self.pictures[Index+1], result, (Length(Self.pictures)-Index-1)*SizeOf(TPictureDef)); |
ZeroMemory(result, SizeOf(TPictureDef)); |
end; |
end. |
/trunk/FileFormat/Delphi |
---|
Property changes: |
Added: svn:ignore |
+*.dcu |
+*.~* |
+__history |
+*.local |
+*.identcache |
+*.stat |
/trunk/FileFormat |
---|
Property changes: |
Added: svn:ignore |
+*.dcu |
+*.~* |
+__history |
+*.local |
+*.identcache |
+*.stat |
/trunk/PlumbersDelphi.bdsgroup |
---|
0,0 → 1,20 |
<?xml version="1.0" encoding="utf-8"?> |
<BorlandProject> |
<PersonalityInfo> |
<Option> |
<Option Name="Personality">Default.Personality</Option> |
<Option Name="ProjectType"></Option> |
<Option Name="Version">1.0</Option> |
<Option Name="GUID">{30296230-5E30-4EE6-889A-1C56710848E0}</Option> |
</Option> |
</PersonalityInfo> |
<Default.Personality> |
<Projects> |
<Projects Name="Showtime32.exe">Win32_Player\Showtime32.bdsproj</Projects> |
<Projects Name="BinEdit.exe">SceneEditor\BinEdit.bdsproj</Projects> |
<Projects Name="Targets">Showtime32.exe BinEdit.exe</Projects> |
</Projects> |
<Dependencies/> |
</Default.Personality> |
</BorlandProject> |
/trunk/PlumbersDelphi.groupproj |
---|
0,0 → 1,48 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<PropertyGroup> |
<ProjectGuid>{E35917DE-9457-4626-8568-7A178ACC64FA}</ProjectGuid> |
</PropertyGroup> |
<ItemGroup> |
<Projects Include="SceneEditor\BinEdit.dproj"> |
<Dependencies/> |
</Projects> |
<Projects Include="Win32_Player\Showtime32.dproj"> |
<Dependencies/> |
</Projects> |
</ItemGroup> |
<ProjectExtensions> |
<Borland.Personality>Default.Personality.12</Borland.Personality> |
<Borland.ProjectType/> |
<BorlandProject> |
<Default.Personality/> |
</BorlandProject> |
</ProjectExtensions> |
<Target Name="BinEdit"> |
<MSBuild Projects="SceneEditor\BinEdit.dproj"/> |
</Target> |
<Target Name="BinEdit:Clean"> |
<MSBuild Projects="SceneEditor\BinEdit.dproj" Targets="Clean"/> |
</Target> |
<Target Name="BinEdit:Make"> |
<MSBuild Projects="SceneEditor\BinEdit.dproj" Targets="Make"/> |
</Target> |
<Target Name="Showtime32"> |
<MSBuild Projects="Win32_Player\Showtime32.dproj"/> |
</Target> |
<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> |
<Target Name="Build"> |
<CallTarget Targets="BinEdit;Showtime32"/> |
</Target> |
<Target Name="Clean"> |
<CallTarget Targets="BinEdit:Clean;Showtime32:Clean"/> |
</Target> |
<Target Name="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/BinEdit.bdsproj |
---|
0,0 → 1,176 |
<?xml version="1.0" encoding="utf-8"?> |
<BorlandProject> |
<PersonalityInfo> |
<Option> |
<Option Name="Personality">Delphi.Personality</Option> |
<Option Name="ProjectType">VCLApplication</Option> |
<Option Name="Version">1.0</Option> |
<Option Name="GUID">{2A7F5591-8CEE-4652-94AD-D458264F5CD0}</Option> |
</Option> |
</PersonalityInfo> |
<Delphi.Personality> |
<Source> |
<Source Name="MainSource">BinEdit.dpr</Source> |
</Source> |
<FileVersion> |
<FileVersion Name="Version">7.0</FileVersion> |
</FileVersion> |
<Compiler> |
<Compiler Name="A">8</Compiler> |
<Compiler Name="B">0</Compiler> |
<Compiler Name="C">1</Compiler> |
<Compiler Name="D">1</Compiler> |
<Compiler Name="E">0</Compiler> |
<Compiler Name="F">0</Compiler> |
<Compiler Name="G">1</Compiler> |
<Compiler Name="H">1</Compiler> |
<Compiler Name="I">1</Compiler> |
<Compiler Name="J">0</Compiler> |
<Compiler Name="K">0</Compiler> |
<Compiler Name="L">1</Compiler> |
<Compiler Name="M">0</Compiler> |
<Compiler Name="N">1</Compiler> |
<Compiler Name="O">1</Compiler> |
<Compiler Name="P">1</Compiler> |
<Compiler Name="Q">0</Compiler> |
<Compiler Name="R">0</Compiler> |
<Compiler Name="S">0</Compiler> |
<Compiler Name="T">0</Compiler> |
<Compiler Name="U">0</Compiler> |
<Compiler Name="V">1</Compiler> |
<Compiler Name="W">0</Compiler> |
<Compiler Name="X">1</Compiler> |
<Compiler Name="Y">1</Compiler> |
<Compiler Name="Z">1</Compiler> |
<Compiler Name="ShowHints">True</Compiler> |
<Compiler Name="ShowWarnings">True</Compiler> |
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> |
<Compiler Name="NamespacePrefix"></Compiler> |
<Compiler Name="GenerateDocumentation">False</Compiler> |
<Compiler Name="DefaultNamespace"></Compiler> |
<Compiler Name="SymbolDeprecated">True</Compiler> |
<Compiler Name="SymbolLibrary">True</Compiler> |
<Compiler Name="SymbolPlatform">True</Compiler> |
<Compiler Name="SymbolExperimental">True</Compiler> |
<Compiler Name="UnitLibrary">True</Compiler> |
<Compiler Name="UnitPlatform">True</Compiler> |
<Compiler Name="UnitDeprecated">True</Compiler> |
<Compiler Name="UnitExperimental">True</Compiler> |
<Compiler Name="HResultCompat">True</Compiler> |
<Compiler Name="HidingMember">True</Compiler> |
<Compiler Name="HiddenVirtual">True</Compiler> |
<Compiler Name="Garbage">True</Compiler> |
<Compiler Name="BoundsError">True</Compiler> |
<Compiler Name="ZeroNilCompat">True</Compiler> |
<Compiler Name="StringConstTruncated">True</Compiler> |
<Compiler Name="ForLoopVarVarPar">True</Compiler> |
<Compiler Name="TypedConstVarPar">True</Compiler> |
<Compiler Name="AsgToTypedConst">True</Compiler> |
<Compiler Name="CaseLabelRange">True</Compiler> |
<Compiler Name="ForVariable">True</Compiler> |
<Compiler Name="ConstructingAbstract">True</Compiler> |
<Compiler Name="ComparisonFalse">True</Compiler> |
<Compiler Name="ComparisonTrue">True</Compiler> |
<Compiler Name="ComparingSignedUnsigned">True</Compiler> |
<Compiler Name="CombiningSignedUnsigned">True</Compiler> |
<Compiler Name="UnsupportedConstruct">True</Compiler> |
<Compiler Name="FileOpen">True</Compiler> |
<Compiler Name="FileOpenUnitSrc">True</Compiler> |
<Compiler Name="BadGlobalSymbol">True</Compiler> |
<Compiler Name="DuplicateConstructorDestructor">True</Compiler> |
<Compiler Name="InvalidDirective">True</Compiler> |
<Compiler Name="PackageNoLink">True</Compiler> |
<Compiler Name="PackageThreadVar">True</Compiler> |
<Compiler Name="ImplicitImport">True</Compiler> |
<Compiler Name="HPPEMITIgnored">True</Compiler> |
<Compiler Name="NoRetVal">True</Compiler> |
<Compiler Name="UseBeforeDef">True</Compiler> |
<Compiler Name="ForLoopVarUndef">True</Compiler> |
<Compiler Name="UnitNameMismatch">True</Compiler> |
<Compiler Name="NoCFGFileFound">True</Compiler> |
<Compiler Name="ImplicitVariants">True</Compiler> |
<Compiler Name="UnicodeToLocale">True</Compiler> |
<Compiler Name="LocaleToUnicode">True</Compiler> |
<Compiler Name="ImagebaseMultiple">True</Compiler> |
<Compiler Name="SuspiciousTypecast">True</Compiler> |
<Compiler Name="PrivatePropAccessor">True</Compiler> |
<Compiler Name="UnsafeType">False</Compiler> |
<Compiler Name="UnsafeCode">False</Compiler> |
<Compiler Name="UnsafeCast">False</Compiler> |
<Compiler Name="OptionTruncated">True</Compiler> |
<Compiler Name="WideCharReduced">True</Compiler> |
<Compiler Name="DuplicatesIgnored">True</Compiler> |
<Compiler Name="UnitInitSeq">True</Compiler> |
<Compiler Name="LocalPInvoke">True</Compiler> |
<Compiler Name="MessageDirective">True</Compiler> |
<Compiler Name="CodePage"></Compiler> |
</Compiler> |
<Linker> |
<Linker Name="MapFile">0</Linker> |
<Linker Name="OutputObjs">0</Linker> |
<Linker Name="GenerateHpps">False</Linker> |
<Linker Name="ConsoleApp">1</Linker> |
<Linker Name="DebugInfo">False</Linker> |
<Linker Name="RemoteSymbols">False</Linker> |
<Linker Name="GenerateDRC">False</Linker> |
<Linker Name="MinStackSize">16384</Linker> |
<Linker Name="MaxStackSize">1048576</Linker> |
<Linker Name="ImageBase">4194304</Linker> |
<Linker Name="ExeDescription"></Linker> |
</Linker> |
<Directories> |
<Directories Name="OutputDir">E:\_test</Directories> |
<Directories Name="UnitOutputDir"></Directories> |
<Directories Name="PackageDLLOutputDir"></Directories> |
<Directories Name="PackageDCPOutputDir"></Directories> |
<Directories Name="SearchPath"></Directories> |
<Directories Name="Packages"></Directories> |
<Directories Name="Conditionals"></Directories> |
<Directories Name="DebugSourceDirs"></Directories> |
<Directories Name="UsePackages">False</Directories> |
</Directories> |
<Parameters> |
<Parameters Name="RunParams"></Parameters> |
<Parameters Name="HostApplication"></Parameters> |
<Parameters Name="Launcher"></Parameters> |
<Parameters Name="UseLauncher">False</Parameters> |
<Parameters Name="DebugCWD"></Parameters> |
<Parameters Name="Debug Symbols Search Path"></Parameters> |
<Parameters Name="LoadAllSymbols">True</Parameters> |
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters> |
</Parameters> |
<Language> |
<Language Name="ActiveLang"></Language> |
<Language Name="ProjectLang">$00000000</Language> |
<Language Name="RootDir"></Language> |
</Language> |
<VersionInfo> |
<VersionInfo Name="IncludeVerInfo">True</VersionInfo> |
<VersionInfo Name="AutoIncBuild">False</VersionInfo> |
<VersionInfo Name="MajorVer">1</VersionInfo> |
<VersionInfo Name="MinorVer">0</VersionInfo> |
<VersionInfo Name="Release">0</VersionInfo> |
<VersionInfo Name="Build">0</VersionInfo> |
<VersionInfo Name="Debug">False</VersionInfo> |
<VersionInfo Name="PreRelease">False</VersionInfo> |
<VersionInfo Name="Special">False</VersionInfo> |
<VersionInfo Name="Private">False</VersionInfo> |
<VersionInfo Name="DLL">False</VersionInfo> |
<VersionInfo Name="Locale">1033</VersionInfo> |
<VersionInfo Name="CodePage">1252</VersionInfo> |
</VersionInfo> |
<VersionInfoKeys> |
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys> |
<VersionInfoKeys Name="FileDescription">BinEdit</VersionInfoKeys> |
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="InternalName"></VersionInfoKeys> |
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys> |
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys> |
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys> |
<VersionInfoKeys Name="ProductName">BinEdit</VersionInfoKeys> |
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="Comments"></VersionInfoKeys> |
<VersionInfoKeys Name="ProgramID">com.embarcadero.BinEdit</VersionInfoKeys> |
</VersionInfoKeys> |
</Delphi.Personality> |
</BorlandProject> |
/trunk/SceneEditor/BinEdit.cfg |
---|
0,0 → 1,39 |
-$A8 |
-$B- |
-$C+ |
-$D+ |
-$E- |
-$F- |
-$G+ |
-$H+ |
-$I+ |
-$J- |
-$K- |
-$L+ |
-$M- |
-$N+ |
-$O+ |
-$P+ |
-$Q- |
-$R- |
-$S- |
-$T- |
-$U- |
-$V+ |
-$W- |
-$X+ |
-$YD |
-$Z1 |
-cg |
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
-H+ |
-W+ |
-M |
-$M16384,1048576 |
-K$00400000 |
-E"E:\_test" |
-LE"C:\Users\DELL User\Documents\Borland Studio-Projekte\Bpl" |
-LN"C:\Users\DELL User\Documents\Borland Studio-Projekte\Bpl" |
-w-UNSAFE_TYPE |
-w-UNSAFE_CODE |
-w-UNSAFE_CAST |
/trunk/SceneEditor/BinEdit.dpr |
---|
0,0 → 1,15 |
program BinEdit; |
uses |
Forms, |
Unit1 in 'Unit1.pas' {Form1}, |
GameBinStruct in '..\FileFormat\Delphi\GameBinStruct.pas'; |
{$R *.res} |
begin |
Application.Initialize; |
Application.MainFormOnTaskbar := True; |
Application.CreateForm(TForm1, Form1); |
Application.Run; |
end. |
/trunk/SceneEditor/BinEdit.dproj |
---|
0,0 → 1,158 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<PropertyGroup> |
<ProjectGuid>{40387ff3-9ff3-46e2-8801-c20b86dff7c4}</ProjectGuid> |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler> |
<DCC_DependencyCheckOutputName>Project1.exe</DCC_DependencyCheckOutputName> |
<MainSource>BinEdit.dpr</MainSource> |
<FrameworkType>VCL</FrameworkType> |
<ProjectVersion>18.2</ProjectVersion> |
<Base>True</Base> |
<Config Condition="'$(Config)'==''">Debug</Config> |
<Platform Condition="'$(Platform)'==''">Win32</Platform> |
<TargetedPlatforms>1</TargetedPlatforms> |
<AppType>Application</AppType> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''"> |
<Base_Win32>true</Base_Win32> |
<CfgParent>Base</CfgParent> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> |
<Cfg_1>true</Cfg_1> |
<CfgParent>Base</CfgParent> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''"> |
<Cfg_1_Win32>true</Cfg_1_Win32> |
<CfgParent>Cfg_1</CfgParent> |
<Cfg_1>true</Cfg_1> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''"> |
<Cfg_2>true</Cfg_2> |
<CfgParent>Base</CfgParent> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''"> |
<Cfg_2_Win32>true</Cfg_2_Win32> |
<CfgParent>Cfg_2</CfgParent> |
<Cfg_2>true</Cfg_2> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Base)'!=''"> |
<SanitizedProjectName>BinEdit</SanitizedProjectName> |
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace> |
<VerInfo_Locale>1031</VerInfo_Locale> |
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Base_Win32)'!=''"> |
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace> |
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> |
<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> |
<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> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_1)'!=''"> |
<Version>7.0</Version> |
<DCC_DebugInformation>0</DCC_DebugInformation> |
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> |
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> |
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''"> |
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> |
<AppEnableHighDPI>true</AppEnableHighDPI> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_2)'!=''"> |
<Version>7.0</Version> |
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_2_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> |
<Debugger_CWD>C:\Users\DELL User\Desktop\Daten ohne Cloud\Plumbers Dont Wear Ties\PC Contents\C\PLUMBER</Debugger_CWD> |
</PropertyGroup> |
<ProjectExtensions> |
<Borland.Personality>Delphi.Personality.12</Borland.Personality> |
<Borland.ProjectType/> |
<BorlandProject> |
<Delphi.Personality> |
<Parameters> |
<Parameters Name="UseLauncher">False</Parameters> |
<Parameters Name="LoadAllSymbols">True</Parameters> |
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters> |
</Parameters> |
<VersionInfo> |
<VersionInfo Name="IncludeVerInfo">False</VersionInfo> |
<VersionInfo Name="AutoIncBuild">False</VersionInfo> |
<VersionInfo Name="MajorVer">1</VersionInfo> |
<VersionInfo Name="MinorVer">0</VersionInfo> |
<VersionInfo Name="Release">0</VersionInfo> |
<VersionInfo Name="Build">0</VersionInfo> |
<VersionInfo Name="Debug">False</VersionInfo> |
<VersionInfo Name="PreRelease">False</VersionInfo> |
<VersionInfo Name="Special">False</VersionInfo> |
<VersionInfo Name="Private">False</VersionInfo> |
<VersionInfo Name="DLL">False</VersionInfo> |
<VersionInfo Name="Locale">1031</VersionInfo> |
<VersionInfo Name="CodePage">1252</VersionInfo> |
</VersionInfo> |
<VersionInfoKeys> |
<VersionInfoKeys Name="CompanyName"/> |
<VersionInfoKeys Name="FileDescription"/> |
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="InternalName"/> |
<VersionInfoKeys Name="LegalCopyright"/> |
<VersionInfoKeys Name="LegalTrademarks"/> |
<VersionInfoKeys Name="OriginalFilename"/> |
<VersionInfoKeys Name="ProductName"/> |
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="Comments"/> |
</VersionInfoKeys> |
<Source> |
<Source Name="MainSource">BinEdit.dpr</Source> |
</Source> |
</Delphi.Personality> |
<Platforms> |
<Platform value="Win32">True</Platform> |
</Platforms> |
</BorlandProject> |
<ProjectFileVersion>12</ProjectFileVersion> |
</ProjectExtensions> |
<ItemGroup> |
<DelphiCompile Include="$(MainSource)"> |
<MainSource>MainSource</MainSource> |
</DelphiCompile> |
<DCCReference Include="Unit1.pas"> |
<Form>Form1</Form> |
</DCCReference> |
<DCCReference Include="..\FileFormat\Delphi\GameBinStruct.pas"/> |
<BuildConfiguration Include="Debug"> |
<Key>Cfg_2</Key> |
<CfgParent>Base</CfgParent> |
</BuildConfiguration> |
<BuildConfiguration Include="Base"> |
<Key>Base</Key> |
</BuildConfiguration> |
<BuildConfiguration Include="Release"> |
<Key>Cfg_1</Key> |
<CfgParent>Base</CfgParent> |
</BuildConfiguration> |
</ItemGroup> |
<ItemGroup/> |
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/> |
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> |
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/> |
</Project> |
/trunk/SceneEditor/BinEdit.res |
---|
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/Project1_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 |
---|
0,0 → 1,886 |
object Form1: TForm1 |
Left = 0 |
Top = 0 |
BorderIcons = [biSystemMenu, biMinimize] |
BorderStyle = bsSingle |
Caption = 'ShowTime Editor' |
ClientHeight = 628 |
ClientWidth = 1043 |
Color = clBtnFace |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
Menu = MainMenu1 |
OldCreateOrder = False |
Position = poScreenCenter |
OnCreate = FormCreate |
OnShow = FormShow |
DesignSize = ( |
1043 |
628) |
PixelsPerInch = 96 |
TextHeight = 13 |
object ListBox1: TListBox |
Left = 8 |
Top = 8 |
Width = 209 |
Height = 466 |
ItemHeight = 13 |
Items.Strings = ( |
'SC99' |
'SC00' |
'SC01' |
'SC02') |
TabOrder = 0 |
OnClick = ListBox1Click |
OnDblClick = ListBox1DblClick |
end |
object Button1: TButton |
Left = 97 |
Top = 485 |
Width = 33 |
Height = 25 |
Caption = '+' |
TabOrder = 3 |
OnClick = Button1Click |
end |
object Button2: TButton |
Left = 136 |
Top = 485 |
Width = 33 |
Height = 25 |
Caption = '-' |
TabOrder = 4 |
OnClick = Button2Click |
end |
object Button3: TButton |
Left = 8 |
Top = 574 |
Width = 105 |
Height = 46 |
Anchors = [akLeft, akBottom] |
Caption = 'Save' |
TabOrder = 6 |
OnClick = Button3Click |
end |
object Button4: TButton |
Left = 8 |
Top = 485 |
Width = 33 |
Height = 25 |
Caption = '^' |
TabOrder = 1 |
OnClick = Button4Click |
end |
object Button5: TButton |
Left = 47 |
Top = 485 |
Width = 33 |
Height = 25 |
Caption = 'v' |
TabOrder = 2 |
OnClick = Button5Click |
end |
object Button10: TButton |
Left = 112 |
Top = 574 |
Width = 105 |
Height = 46 |
Anchors = [akLeft, akBottom] |
Caption = 'Save + Test' |
TabOrder = 7 |
OnClick = Button10Click |
end |
object PageControl2: TPageControl |
Left = 223 |
Top = 8 |
Width = 812 |
Height = 612 |
ActivePage = TabSheet4 |
Anchors = [akLeft, akTop, akRight, akBottom] |
TabOrder = 8 |
object TabSheet4: TTabSheet |
Caption = 'Pictures' |
DesignSize = ( |
804 |
584) |
object Label1: TLabel |
Left = 16 |
Top = 24 |
Width = 77 |
Height = 13 |
Caption = 'SceneID (0-99):' |
end |
object Label2: TLabel |
Left = 15 |
Top = 63 |
Width = 79 |
Height = 13 |
Caption = 'Sound playback:' |
end |
object Image2: TImage |
Left = 272 |
Top = 190 |
Width = 305 |
Height = 211 |
Stretch = True |
OnMouseMove = Image1MouseMove |
end |
object Label12: TLabel |
Left = 272 |
Top = 127 |
Width = 67 |
Height = 13 |
Caption = 'Duration [ds]:' |
end |
object Label16: TLabel |
Left = 368 |
Top = 124 |
Width = 46 |
Height = 13 |
Caption = 'Filename:' |
end |
object Label17: TLabel |
Left = 162 |
Top = 24 |
Width = 126 |
Height = 13 |
Caption = 'Attention: ID exists twice!' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clRed |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
ParentFont = False |
Visible = False |
end |
object Label19: TLabel |
Left = 272 |
Top = 432 |
Width = 62 |
Height = 13 |
Caption = 'Unused files:' |
end |
object Label24: TLabel |
Left = 247 |
Top = 63 |
Width = 118 |
Height = 13 |
Caption = 'Attention: File not found' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clRed |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
ParentFont = False |
Visible = False |
end |
object Label25: TLabel |
Left = 247 |
Top = 82 |
Width = 222 |
Height = 13 |
Caption = 'Attention: Low Quality file (E*.wav) not found' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clRed |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
ParentFont = False |
Visible = False |
end |
object Label26: TLabel |
Left = 368 |
Top = 170 |
Width = 118 |
Height = 13 |
Caption = 'Attention: File not found' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clRed |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
ParentFont = False |
Visible = False |
end |
object SpinEdit1: TSpinEdit |
Left = 99 |
Top = 21 |
Width = 57 |
Height = 22 |
MaxValue = 99 |
MinValue = 0 |
TabOrder = 0 |
Value = 0 |
OnChange = SpinEdit1Change |
end |
object Edit1: TEdit |
Left = 100 |
Top = 60 |
Width = 104 |
Height = 21 |
MaxLength = 13 |
TabOrder = 1 |
OnChange = Edit1Change |
end |
object Button6: TButton |
Left = 100 |
Top = 453 |
Width = 33 |
Height = 25 |
Caption = '+' |
TabOrder = 6 |
OnClick = Button6Click |
end |
object Button7: TButton |
Left = 139 |
Top = 453 |
Width = 33 |
Height = 25 |
Caption = '-' |
TabOrder = 7 |
OnClick = Button7Click |
end |
object Button8: TButton |
Left = 11 |
Top = 453 |
Width = 33 |
Height = 25 |
Caption = '^' |
TabOrder = 4 |
OnClick = Button8Click |
end |
object Button9: TButton |
Left = 50 |
Top = 453 |
Width = 33 |
Height = 25 |
Caption = 'v' |
TabOrder = 5 |
OnClick = Button9Click |
end |
object ListBox2: TListBox |
Left = 10 |
Top = 127 |
Width = 239 |
Height = 306 |
ItemHeight = 13 |
TabOrder = 3 |
OnClick = ListBox2Click |
OnDblClick = ListBox2DblClick |
end |
object Edit3: TEdit |
Left = 368 |
Top = 143 |
Width = 137 |
Height = 21 |
TabOrder = 9 |
OnChange = Edit3Change |
end |
object SpinEdit13: TSpinEdit |
Left = 272 |
Top = 143 |
Width = 65 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 8 |
Value = 0 |
OnChange = SpinEdit13Change |
end |
object Button13: TButton |
Left = 664 |
Top = 19 |
Width = 120 |
Height = 25 |
Anchors = [akTop, akRight] |
Caption = 'Open scene folder' |
TabOrder = 12 |
OnClick = Button13Click |
end |
object MediaPlayer1: TMediaPlayer |
Left = 684 |
Top = 371 |
Width = 29 |
Height = 30 |
ColoredButtons = [] |
VisibleButtons = [btPlay] |
DoubleBuffered = True |
Visible = False |
ParentDoubleBuffered = False |
TabOrder = 14 |
end |
object GroupBox1: TGroupBox |
Left = 591 |
Top = 63 |
Width = 185 |
Height = 121 |
Caption = 'Scene length' |
TabOrder = 15 |
object Label20: TLabel |
Left = 16 |
Top = 24 |
Width = 119 |
Height = 13 |
Caption = 'Picture sequence length:' |
end |
object Label21: TLabel |
Left = 16 |
Top = 43 |
Width = 37 |
Height = 13 |
Caption = 'Label21' |
end |
object Label22: TLabel |
Left = 16 |
Top = 72 |
Width = 91 |
Height = 13 |
Caption = 'Soundtrack length:' |
end |
object Label23: TLabel |
Left = 16 |
Top = 91 |
Width = 37 |
Height = 13 |
Caption = 'Label23' |
end |
end |
object GroupBox2: TGroupBox |
Left = 591 |
Top = 190 |
Width = 185 |
Height = 167 |
Caption = 'Playback' |
TabOrder = 13 |
object Label18: TLabel |
Left = 14 |
Top = 128 |
Width = 153 |
Height = 24 |
Alignment = taCenter |
AutoSize = False |
Caption = 'Label18' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -20 |
Font.Name = 'Tahoma' |
Font.Style = [] |
ParentFont = False |
end |
object Button15: TButton |
Left = 23 |
Top = 27 |
Width = 137 |
Height = 25 |
Caption = 'Start from here' |
TabOrder = 0 |
OnClick = Button15Click |
end |
object Button17: TButton |
Left = 22 |
Top = 89 |
Width = 137 |
Height = 25 |
Caption = 'Stop' |
TabOrder = 2 |
OnClick = Button17Click |
end |
object Button16: TButton |
Left = 23 |
Top = 58 |
Width = 137 |
Height = 25 |
Caption = 'Start from beginning' |
TabOrder = 1 |
OnClick = Button16Click |
end |
end |
object ListBox3: TListBox |
Left = 272 |
Top = 453 |
Width = 225 |
Height = 97 |
ItemHeight = 13 |
PopupMenu = PopupMenu1 |
TabOrder = 11 |
OnDblClick = ListBox3DblClick |
OnMouseDown = ListBox3MouseDown |
end |
object Button12: TButton |
Left = 511 |
Top = 143 |
Width = 26 |
Height = 21 |
Caption = '1' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -15 |
Font.Name = 'Wingdings' |
Font.Style = [] |
ParentFont = False |
TabOrder = 10 |
Visible = False |
OnClick = Button12Click |
end |
object Button18: TButton |
Left = 210 |
Top = 60 |
Width = 31 |
Height = 21 |
Caption = '1' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -15 |
Font.Name = 'Wingdings' |
Font.Style = [] |
ParentFont = False |
TabOrder = 2 |
Visible = False |
OnClick = Button18Click |
end |
end |
object TabSheet5: TTabSheet |
Caption = 'Decision' |
ImageIndex = 1 |
object Label3: TLabel |
Left = 16 |
Top = 16 |
Width = 80 |
Height = 13 |
Caption = 'Decision-Picture:' |
end |
object Image1: TImage |
Left = 12 |
Top = 255 |
Width = 409 |
Height = 290 |
Cursor = crCross |
Stretch = True |
OnMouseDown = Image1MouseDown |
OnMouseEnter = Image1MouseEnter |
OnMouseLeave = Image1MouseLeave |
OnMouseMove = Image1MouseMove |
end |
object Label10: TLabel |
Left = 12 |
Top = 552 |
Width = 37 |
Height = 13 |
Caption = 'Label10' |
end |
object Label11: TLabel |
Left = 320 |
Top = 17 |
Width = 39 |
Height = 13 |
Caption = 'Actions:' |
end |
object Label27: TLabel |
Left = 183 |
Top = 38 |
Width = 118 |
Height = 13 |
Caption = 'Attention: File not found' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clRed |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
ParentFont = False |
Visible = False |
end |
object Label28: TLabel |
Left = 427 |
Top = 509 |
Width = 180 |
Height = 13 |
Caption = 'Left mouse button: Set top-left coord' |
Visible = False |
end |
object Label29: TLabel |
Left = 427 |
Top = 528 |
Width = 210 |
Height = 13 |
Caption = 'Right mouse button: Set bottom-right coord' |
Visible = False |
end |
object Edit2: TEdit |
Left = 12 |
Top = 35 |
Width = 134 |
Height = 21 |
MaxLength = 13 |
TabOrder = 0 |
OnChange = Edit2Change |
end |
object PageControl1: TPageControl |
Left = 12 |
Top = 64 |
Width = 365 |
Height = 185 |
ActivePage = TabSheet3 |
TabOrder = 3 |
object TabSheet1: TTabSheet |
Caption = 'Action 1 (Red)' |
ExplicitWidth = 333 |
object Label5: TLabel |
Left = 171 |
Top = 72 |
Width = 29 |
Height = 13 |
Caption = 'Points' |
end |
object Label4: TLabel |
Left = 16 |
Top = 72 |
Width = 116 |
Height = 13 |
Caption = 'Grid corner coordinates:' |
end |
object Label6: TLabel |
Left = 16 |
Top = 16 |
Width = 36 |
Height = 13 |
Caption = 'Target:' |
end |
object SpinEdit6: TSpinEdit |
Left = 171 |
Top = 94 |
Width = 126 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 5 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit2: TSpinEdit |
Left = 79 |
Top = 91 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 2 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit3: TSpinEdit |
Left = 16 |
Top = 91 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 1 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit4: TSpinEdit |
Left = 16 |
Top = 119 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 3 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit5: TSpinEdit |
Left = 79 |
Top = 119 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 4 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object ComboBox1: TComboBox |
Left = 16 |
Top = 35 |
Width = 145 |
Height = 21 |
Style = csDropDownList |
TabOrder = 0 |
OnChange = ActionTargetChange |
end |
end |
object TabSheet2: TTabSheet |
Caption = 'Action 2 (Green)' |
ImageIndex = 1 |
ExplicitWidth = 333 |
object Label13: TLabel |
Left = 16 |
Top = 16 |
Width = 36 |
Height = 13 |
Caption = 'Target:' |
end |
object Label14: TLabel |
Left = 16 |
Top = 72 |
Width = 116 |
Height = 13 |
Caption = 'Grid corner coordinates:' |
end |
object Label15: TLabel |
Left = 171 |
Top = 72 |
Width = 29 |
Height = 13 |
Caption = 'Points' |
end |
object ComboBox2: TComboBox |
Left = 16 |
Top = 35 |
Width = 145 |
Height = 21 |
Style = csDropDownList |
TabOrder = 0 |
OnChange = ActionTargetChange |
end |
object SpinEdit17: TSpinEdit |
Left = 16 |
Top = 91 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 1 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit18: TSpinEdit |
Left = 79 |
Top = 91 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 2 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit19: TSpinEdit |
Left = 16 |
Top = 119 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 3 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit20: TSpinEdit |
Left = 79 |
Top = 119 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 4 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit21: TSpinEdit |
Left = 171 |
Top = 94 |
Width = 126 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 5 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
end |
object TabSheet3: TTabSheet |
Caption = 'Action 3 (Blue)' |
ImageIndex = 2 |
ExplicitWidth = 333 |
object Label7: TLabel |
Left = 16 |
Top = 16 |
Width = 36 |
Height = 13 |
Caption = 'Target:' |
end |
object Label8: TLabel |
Left = 16 |
Top = 72 |
Width = 116 |
Height = 13 |
Caption = 'Grid corner coordinates:' |
end |
object Label9: TLabel |
Left = 171 |
Top = 72 |
Width = 29 |
Height = 13 |
Caption = 'Points' |
end |
object ComboBox3: TComboBox |
Left = 16 |
Top = 35 |
Width = 145 |
Height = 21 |
Style = csDropDownList |
TabOrder = 0 |
OnChange = ActionTargetChange |
end |
object SpinEdit7: TSpinEdit |
Left = 16 |
Top = 91 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 1 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit8: TSpinEdit |
Left = 79 |
Top = 91 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 2 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit9: TSpinEdit |
Left = 79 |
Top = 119 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 3 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit10: TSpinEdit |
Left = 16 |
Top = 119 |
Width = 57 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 4 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
object SpinEdit11: TSpinEdit |
Left = 171 |
Top = 94 |
Width = 126 |
Height = 22 |
MaxValue = 0 |
MinValue = 0 |
TabOrder = 5 |
Value = 0 |
OnChange = ActionSpinEditsChange |
end |
end |
end |
object SpinEdit12: TSpinEdit |
Left = 320 |
Top = 36 |
Width = 57 |
Height = 22 |
MaxValue = 3 |
MinValue = 1 |
TabOrder = 2 |
Value = 1 |
OnChange = SpinEdit12Change |
end |
object Button11: TButton |
Left = 147 |
Top = 35 |
Width = 30 |
Height = 21 |
Caption = '1' |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -15 |
Font.Name = 'Wingdings' |
Font.Style = [] |
ParentFont = False |
TabOrder = 1 |
Visible = False |
OnClick = Button11Click |
end |
end |
end |
object Button14: TButton |
Left = 8 |
Top = 529 |
Width = 75 |
Height = 25 |
Caption = 'New' |
TabOrder = 5 |
OnClick = Button14Click |
end |
object Timer1: TTimer |
Enabled = False |
Interval = 100 |
OnTimer = Timer1Timer |
Left = 955 |
Top = 408 |
end |
object MainMenu1: TMainMenu |
Left = 963 |
Top = 496 |
object File1: TMenuItem |
Caption = 'File' |
object Newfile1: TMenuItem |
Caption = 'New file' |
OnClick = Button14Click |
end |
object N2: TMenuItem |
Caption = '-' |
end |
object Savetogamebin1: TMenuItem |
Caption = 'Save to GAME.BIN' |
OnClick = Button3Click |
end |
object Saveandtest1: TMenuItem |
Caption = 'Save to GAME.BIN and Test' |
OnClick = Button10Click |
end |
object N1: TMenuItem |
Caption = '-' |
end |
object Close1: TMenuItem |
Caption = 'Terminate program' |
OnClick = Close1Click |
end |
end |
object Help1: TMenuItem |
Caption = 'Help' |
object About1: TMenuItem |
Caption = 'About' |
OnClick = About1Click |
end |
end |
end |
object PopupMenu1: TPopupMenu |
Left = 763 |
Top = 496 |
object Addtoscene1: TMenuItem |
Caption = 'Add to scene' |
OnClick = Addtoscene1Click |
end |
end |
end |
/trunk/SceneEditor/Unit1.pas |
---|
0,0 → 1,1244 |
unit Unit1; |
// TODO: create for "unused files" box a small thumbnail, too? |
interface |
uses |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
Dialogs, StdCtrls, Spin, Grids, GameBinStruct, ComCtrls, ExtCtrls, Vcl.MPlayer, |
Vcl.Menus; |
const |
CUR_VER = '2017-08-09'; |
type |
TForm1 = class(TForm) |
ListBox1: TListBox; |
Button1: TButton; |
Button2: TButton; |
Button3: TButton; |
Button4: TButton; |
Button5: TButton; |
Button10: TButton; |
PageControl2: TPageControl; |
TabSheet4: TTabSheet; |
Label1: TLabel; |
Label2: TLabel; |
SpinEdit1: TSpinEdit; |
Edit1: TEdit; |
Button6: TButton; |
Button7: TButton; |
Button8: TButton; |
Button9: TButton; |
ListBox2: TListBox; |
TabSheet5: TTabSheet; |
Label3: TLabel; |
Image1: TImage; |
Label10: TLabel; |
Label11: TLabel; |
Edit2: TEdit; |
PageControl1: TPageControl; |
TabSheet1: TTabSheet; |
Label5: TLabel; |
Label4: TLabel; |
Label6: TLabel; |
SpinEdit6: TSpinEdit; |
SpinEdit2: TSpinEdit; |
SpinEdit3: TSpinEdit; |
SpinEdit4: TSpinEdit; |
SpinEdit5: TSpinEdit; |
ComboBox1: TComboBox; |
TabSheet2: TTabSheet; |
Label13: TLabel; |
Label14: TLabel; |
Label15: TLabel; |
ComboBox2: TComboBox; |
SpinEdit17: TSpinEdit; |
SpinEdit18: TSpinEdit; |
SpinEdit19: TSpinEdit; |
SpinEdit20: TSpinEdit; |
SpinEdit21: TSpinEdit; |
TabSheet3: TTabSheet; |
Label7: TLabel; |
Label8: TLabel; |
Label9: TLabel; |
ComboBox3: TComboBox; |
SpinEdit7: TSpinEdit; |
SpinEdit8: TSpinEdit; |
SpinEdit9: TSpinEdit; |
SpinEdit10: TSpinEdit; |
SpinEdit11: TSpinEdit; |
SpinEdit12: TSpinEdit; |
Image2: TImage; |
Edit3: TEdit; |
SpinEdit13: TSpinEdit; |
Label12: TLabel; |
Label16: TLabel; |
Button13: TButton; |
Button14: TButton; |
MediaPlayer1: TMediaPlayer; |
Timer1: TTimer; |
GroupBox1: TGroupBox; |
Label20: TLabel; |
Label21: TLabel; |
Label22: TLabel; |
Label23: TLabel; |
GroupBox2: TGroupBox; |
Button15: TButton; |
Button17: TButton; |
Button16: TButton; |
Label18: TLabel; |
Label17: TLabel; |
ListBox3: TListBox; |
Label19: TLabel; |
Label24: TLabel; |
Label25: TLabel; |
Label26: TLabel; |
Label27: TLabel; |
Label28: TLabel; |
Label29: TLabel; |
Button11: TButton; |
Button12: TButton; |
Button18: TButton; |
MainMenu1: TMainMenu; |
File1: TMenuItem; |
Close1: TMenuItem; |
Newfile1: TMenuItem; |
Savetogamebin1: TMenuItem; |
Saveandtest1: TMenuItem; |
N1: TMenuItem; |
N2: TMenuItem; |
Help1: TMenuItem; |
About1: TMenuItem; |
PopupMenu1: TPopupMenu; |
Addtoscene1: TMenuItem; |
procedure ListBox1Click(Sender: TObject); |
procedure Edit1Change(Sender: TObject); |
procedure Edit2Change(Sender: TObject); |
procedure SpinEdit1Change(Sender: TObject); |
procedure Button3Click(Sender: TObject); |
procedure FormShow(Sender: TObject); |
procedure SpinEdit12Change(Sender: TObject); |
procedure ActionTargetChange(Sender: TObject); |
procedure ActionSpinEditsChange(Sender: TObject); |
procedure Button1Click(Sender: TObject); |
procedure Button10Click(Sender: TObject); |
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X, |
Y: Integer); |
procedure ListBox2Click(Sender: TObject); |
procedure SpinEdit13Change(Sender: TObject); |
procedure Edit3Change(Sender: TObject); |
procedure FormCreate(Sender: TObject); |
procedure Button13Click(Sender: TObject); |
procedure Button14Click(Sender: TObject); |
procedure Button2Click(Sender: TObject); |
procedure Timer1Timer(Sender: TObject); |
procedure Button17Click(Sender: TObject); |
procedure Button15Click(Sender: TObject); |
procedure Button16Click(Sender: TObject); |
procedure ListBox1DblClick(Sender: TObject); |
procedure ListBox2DblClick(Sender: TObject); |
procedure Button4Click(Sender: TObject); |
procedure Button5Click(Sender: TObject); |
procedure Button6Click(Sender: TObject); |
procedure Button7Click(Sender: TObject); |
procedure Button8Click(Sender: TObject); |
procedure Button9Click(Sender: TObject); |
procedure Image1MouseLeave(Sender: TObject); |
procedure ListBox3DblClick(Sender: TObject); |
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton; |
Shift: TShiftState; X, Y: Integer); |
procedure Button11Click(Sender: TObject); |
procedure Button12Click(Sender: TObject); |
procedure Button18Click(Sender: TObject); |
procedure Image1MouseEnter(Sender: TObject); |
procedure About1Click(Sender: TObject); |
procedure Close1Click(Sender: TObject); |
procedure Addtoscene1Click(Sender: TObject); |
procedure ListBox3MouseDown(Sender: TObject; Button: TMouseButton; |
Shift: TShiftState; X, Y: Integer); |
private |
Game: TGameBinFile; |
PlayStart: Cardinal; |
MediaplayerOpened: boolean; |
StopPlayRequest: boolean; |
FirstTickCount: Cardinal; |
function CurScene: PSceneDef; |
procedure LoadScene; |
procedure Load; |
procedure Save; |
procedure ReloadActionSceneLists; |
function FindSceneIndex(sceneID: integer): integer; |
function GetGreatestSceneID: integer; |
function SearchSceneIDGapFromTop: integer; |
procedure RedrawDecisionBitmap; |
function CurPicture: PPictureDef; |
function CurPictureTimepos: Cardinal; |
procedure New; |
procedure NewScene; |
procedure SetupGUIAfterLoad; |
procedure RecalcSlideshowLength; |
procedure RecalcSoundtrackLength; |
procedure RecalcUnusedFiles; |
procedure HandlePossibleEmptySceneList; |
procedure DisableEnableSceneControls(enable: boolean); |
procedure DisableEnablePictureControls(enable: boolean); |
procedure DisableEnableFileControls(enable: boolean); |
end; |
var |
Form1: TForm1; |
implementation |
{$R *.dfm} |
uses |
Math, MMSystem, ShellAPI; |
function GetSceneIDFromName(sceneName: string): Integer; |
var |
sSceneID: string; |
begin |
if Copy(sceneName, 1, 2) <> 'SC' then raise Exception.Create('Scene name invalid'); |
sSceneID := Copy(sceneName, 3, 2); |
if not TryStrToInt(sSceneID, result) then raise Exception.Create('Scene name invalid'); |
end; |
function _DecisecondToTime(ds: integer): string; |
begin |
result := FormatDatetime('hh:nn:ss', ds / 10 / (24*60*60))+','+IntToStr(ds mod 10); |
end; |
{ TForm1 } |
function TForm1.GetGreatestSceneID: integer; |
var |
i: integer; |
begin |
result := -1; |
for i := 0 to ListBox1.Items.Count - 1 do |
begin |
result := Max(result, GetSceneIDFromName(ListBox1.Items.Strings[i])); |
end; |
end; |
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; |
Shift: TShiftState; X, Y: Integer); |
var |
sE1, sE2, sE3, sE4: TSpinEdit; |
procedure _Go; |
begin |
if Button = mbLeft then |
begin |
sE1.Value := Round(Image1.Picture.Width*(X/Image1.Width)); |
sE2.Value := Round(Image1.Picture.Height*(Y/Image1.Height)); |
end |
else if Button = mbRight then |
begin |
sE3.Value := Round(Image1.Picture.Width*(X/Image1.Width)); |
sE4.Value := Round(Image1.Picture.Height*(Y/Image1.Height)); |
end; |
end; |
begin |
if PageControl1.ActivePage = TabSheet1 then |
begin |
sE1 := SpinEdit3; |
sE2 := SpinEdit2; |
sE3 := SpinEdit4; |
sE4 := SpinEdit5; |
_Go; |
end |
else if PageControl1.ActivePage = TabSheet2 then |
begin |
sE1 := SpinEdit17; |
sE2 := SpinEdit18; |
sE3 := SpinEdit19; |
sE4 := SpinEdit20; |
_Go; |
end |
else if PageControl1.ActivePage = TabSheet3 then |
begin |
sE1 := SpinEdit7; |
sE2 := SpinEdit8; |
sE3 := SpinEdit10; |
sE4 := SpinEdit9; |
_Go; |
end; |
end; |
procedure TForm1.Image1MouseEnter(Sender: TObject); |
begin |
Label28.Visible := true; |
Label29.Visible := true; |
end; |
procedure TForm1.Image1MouseLeave(Sender: TObject); |
begin |
Label10.Caption := ''; |
Label28.Visible := false; |
Label29.Visible := false; |
end; |
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, |
Y: Integer); |
begin |
label10.Caption := Format('Coords: [%d, %d]', [Round(Image1.Picture.Width*(X/Image1.Width)), |
Round(Image1.Picture.Height*(Y/Image1.Height))]); |
end; |
function TForm1.SearchSceneIDGapFromTop: integer; |
var |
i: integer; |
begin |
result := -1; |
for i := 99 downto 0 do |
begin |
if ListBox1.Items.IndexOf(Format('SC%.2d', [i])) = -1 then |
begin |
result := i; |
exit; |
end; |
end; |
end; |
procedure TForm1.Button10Click(Sender: TObject); |
begin |
Save; |
if not FileExists('ShowTime32.exe') then raise Exception.Create('ShowTime32.exe not found.'); |
ShellExecute(Application.Handle, 'open', 'ShowTime32.exe', '', '', SW_NORMAL); |
end; |
procedure TForm1.Button11Click(Sender: TObject); |
var |
fileName: string; |
begin |
fileName := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurScene^.szDecisionBmp; |
if not FileExists(fileName) then exit; |
ShellExecute(Application.Handle, 'open', PChar(fileName), '', '', SW_NORMAL); |
end; |
procedure TForm1.Button12Click(Sender: TObject); |
var |
fileName: string; |
begin |
fileName := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurPicture^.szBitmapFile; |
if not FileExists(fileName) then exit; |
ShellExecute(Application.Handle, 'open', Pchar(fileName), '', '', SW_NORMAL); |
end; |
procedure TForm1.Button13Click(Sender: TObject); |
var |
fileName: string; |
begin |
fileName := CurScene^.szSceneFolder; |
if not DirectoryExists(fileName) then MkDir(fileName); |
ShellExecute(Application.Handle, 'open', 'explorer.exe', PChar(fileName), '', SW_NORMAL); |
end; |
procedure TForm1.HandlePossibleEmptySceneList; |
begin |
if Game.numScenes = 0 then |
begin |
PageControl2.ActivePage := nil; |
PageControl2.Pages[0].TabVisible := false; |
PageControl2.Pages[1].TabVisible := false; |
end |
else |
begin |
if PageControl2.ActivePage = nil then PageControl2.ActivePageIndex := 0; |
PageControl2.Pages[0].TabVisible := true; |
PageControl2.Pages[1].TabVisible := true; |
end; |
end; |
procedure TForm1.Button14Click(Sender: TObject); |
begin |
New; |
HandlePossibleEmptySceneList; |
end; |
procedure TForm1.DisableEnableSceneControls(enable: boolean); |
begin |
ListBox1.Enabled := enable; |
Button1.Enabled := enable; |
Button2.Enabled := enable; |
Button4.Enabled := enable; |
Button5.Enabled := enable; |
end; |
procedure TForm1.DisableEnablePictureControls(enable: boolean); |
begin |
Button8.Enabled := enable; |
Button9.Enabled := enable; |
Button6.Enabled := enable; |
Button7.Enabled := enable; |
end; |
procedure TForm1.DisableEnableFileControls(enable: boolean); |
begin |
Button3.Enabled := enable; |
Button10.Enabled := enable; |
Button14.Enabled := enable; |
end; |
procedure TForm1.Button15Click(Sender: TObject); |
var |
decisionBMP: string; |
PictureLastFrame: Cardinal; |
i: integer; |
DecisionPicSet: boolean; |
begin |
if PlayStart <> 0 then |
begin |
if MediaplayerOpened then |
begin |
if MediaPlayer1.Mode = mpPlaying then MediaPlayer1.Stop; |
Mediaplayer1.TimeFormat := tfMilliseconds; |
if CurPictureTimepos*100 < Cardinal(MediaPlayer1.Length) then |
begin |
MediaPlayer1.Position := CurPictureTimepos * 100; |
MediaPlayer1.Play; |
end; |
end; |
FirstTickCount := GetTickCount; |
PlayStart := GetTickCount - CurPictureTimepos * 100; |
end |
else |
begin |
DisableEnablePictureControls(false); |
DisableEnableSceneControls(false); |
DisableEnableFileControls(false); |
Edit1.Enabled := false; |
Edit3.Enabled := false; |
SpinEdit1.Enabled := false; |
SpinEdit13.Enabled := false; |
Label18.Font.Color := clGreen; |
try |
Timer1.Enabled := false; |
RecalcSoundtrackLength; // optional |
Mediaplayer1.FileName := Format('%s\%s', [CurScene^.szSceneFolder, CurScene^.szDialogWav]); |
if FileExists(Mediaplayer1.FileName) then |
begin |
Mediaplayer1.TimeFormat := tfMilliseconds; |
Mediaplayer1.Open; |
MediaplayerOpened := true; |
if CurPictureTimepos*100 < Cardinal(MediaPlayer1.Length) then |
begin |
MediaPlayer1.Position := CurPictureTimepos * 100; |
MediaPlayer1.Play; |
end; |
end |
else |
begin |
MediaplayerOpened := false; |
MediaPlayer1.FileName := ''; |
end; |
PlayStart := GetTickCount - CurPictureTimepos * 100; |
Timer1.Enabled := true; |
{$REGION 'Calculate PictureLastFrame'} |
PictureLastFrame := 0; |
for i := 0 to CurScene^.numPics-1 do |
begin |
Inc(PictureLastFrame, Game.pictures[CurScene^.pictureIndex + i].duration); |
end; |
PictureLastFrame := PictureLastFrame * 100; |
{$ENDREGION} |
DecisionPicSet := false; |
while not Application.Terminated and |
not StopPlayRequest and |
( |
(MediaPlayer1.Mode = mpPlaying) or |
(GetTickCount - PlayStart <= PictureLastFrame) |
) do |
begin |
if GetTickCount - PlayStart <= PictureLastFrame then |
begin |
DecisionPicSet := false; |
FirstTickCount := GetTickCount; |
while not Application.Terminated and ((GetTickCount - FirstTickCount) < CurPicture^.duration * 100) and not StopPlayRequest do |
begin |
Application.ProcessMessages; |
Sleep(0); |
end; |
if not Application.Terminated and (ListBox2.ItemIndex < ListBox2.Count-1) and not StopPlayRequest then |
begin |
ListBox2.ItemIndex := ListBox2.ItemIndex + 1; |
ListBox2Click(ListBox2); |
end; |
end |
else |
begin |
if not DecisionPicSet then |
begin |
decisionBMP := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurScene^.szDecisionBmp; |
if (CurScene^.szDecisionBmp <> '') and FileExists(decisionBMP) then |
begin |
Image2.Picture.LoadFromFile(decisionBMP); |
end |
else |
begin |
Image2.Picture := nil; |
end; |
DecisionPicSet := true; |
end; |
Application.ProcessMessages; |
Sleep(0); |
end; |
end; |
finally |
PlayStart := 0; |
if MediaPlayer1.Mode = mpPlaying then MediaPlayer1.Stop; |
if MediaplayerOpened then MediaPlayer1.Close; |
StopPlayRequest := false; |
Label18.Font.Color := clWindowText; |
Timer1.Enabled := false; |
DisableEnableFileControls(true); |
DisableEnableSceneControls(true); |
DisableEnablePictureControls(true); |
Edit1.Enabled := true; |
SpinEdit1.Enabled := true; |
Edit3.Enabled := true; |
SpinEdit13.Enabled := true; |
Label18.Caption := _DecisecondToTime(CurPictureTimepos); |
ListBox2Click(ListBox2); |
end; |
end; |
end; |
procedure TForm1.Button16Click(Sender: TObject); |
begin |
ListBox2.ItemIndex := 0; // go to the beginning |
ListBox2Click(ListBox2); // load picture data |
Button15Click(Button15); // play |
end; |
procedure TForm1.Button17Click(Sender: TObject); |
begin |
if PlayStart <> 0 then |
begin |
Timer1.Enabled := false; |
if MediaplayerOpened then MediaPlayer1.Stop; |
StopPlayRequest := true; |
end; |
end; |
procedure TForm1.Button18Click(Sender: TObject); |
var |
fileName: string; |
begin |
fileName := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurScene^.szDialogWav; |
if not FileExists(fileName) then exit; |
ShellExecute(Application.Handle, 'open', PChar(fileName), '', '', SW_NORMAL); |
end; |
procedure TForm1.NewScene; |
var |
sceneID: integer; |
newScene: PSceneDef; |
begin |
if ListBox1.Items.Count = 100 then |
begin |
raise Exception.Create('No more space for another scene'); |
end; |
sceneID := GetGreatestSceneID+1; |
if sceneID >= Length(Game.scenes) then sceneID := SearchSceneIDGapFromTop; |
newScene := Game.AddSceneAtEnd(sceneID); |
newScene.actions[0].nextSceneID := SCENEID_ENDGAME; |
ListBox1.Items.Add(newScene.szSceneFolder); |
ReloadActionSceneLists; |
HandlePossibleEmptySceneList; |
ListBox1.ItemIndex := ListBox1.Items.Count - 1; |
ListBox1Click(ListBox1); |
end; |
procedure TForm1.Button1Click(Sender: TObject); |
begin |
NewScene; |
end; |
procedure TForm1.Button2Click(Sender: TObject); |
var |
iScene, iAction, sceneID: integer; |
conflicts: TStringList; |
sWarning: string; |
bakItemindex: integer; |
begin |
if ListBox1.Count = 0 then exit; |
(* |
if ListBox1.Count = 1 then |
begin |
raise Exception.Create('Can''t delete the scene if there is only one.'); |
end; |
*) |
conflicts := TStringList.Create; |
try |
sceneID := GetSceneIDFromName(CurScene^.szSceneFolder); |
for iScene := 0 to Game.numScenes-1 do |
begin |
for iAction := 0 to Game.scenes[iScene].numActions-1 do |
begin |
if Game.scenes[iScene].actions[iAction].nextSceneID = sceneID then |
begin |
conflicts.Add(Format('Scene %s, action #%d', [Game.scenes[iScene].szSceneFolder, iAction+1])); |
end; |
end; |
end; |
if conflicts.Count > 0 then |
begin |
raise Exception.Create('Can''t delete this scene. There are following dependencies:'+#13#10#13#10+conflicts.Text); |
end; |
finally |
FreeAndNil(conflicts); |
end; |
sWarning := Format('Do you really want to delete scene %s?', [CurScene^.szSceneFolder]); |
if (ListBox1.ItemIndex = 0) and (ListBox1.Count >= 2) then |
sWarning := Format('Attention: This will make %s to your new intro sequence. Is that OK?', [ListBox1.Items[ListBox1.ItemIndex+1]]); |
if (MessageDlg(sWarning, mtConfirmation, mbYesNoCancel, 0) <> mrYes) then |
begin |
Exit; |
end; |
Game.DeleteScene(ListBox1.ItemIndex); |
Dec(Game.numScenes); |
bakItemindex := ListBox1.ItemIndex; |
ListBox1.Items.Delete(bakItemindex); |
ReloadActionSceneLists; |
HandlePossibleEmptySceneList; |
if ListBox1.Count > 0 then |
begin |
if bakItemindex = ListBox1.Count then Dec(bakItemindex); |
Listbox1.ItemIndex := bakItemindex; |
ListBox1Click(ListBox1); |
end; |
end; |
procedure TForm1.Button3Click(Sender: TObject); |
begin |
Save; |
end; |
procedure TForm1.Button4Click(Sender: TObject); |
begin |
if ListBox1.ItemIndex <= 0 then exit; |
Game.SwapScene(ListBox1.ItemIndex, ListBox1.ItemIndex-1); |
ListBox1.Items.Exchange(ListBox1.ItemIndex, ListBox1.ItemIndex-1); |
ReloadActionSceneLists; |
end; |
procedure TForm1.Button5Click(Sender: TObject); |
begin |
if ListBox1.ItemIndex = ListBox1.Count-1 then exit; |
Game.SwapScene(ListBox1.ItemIndex, ListBox1.ItemIndex+1); |
ListBox1.Items.Exchange(ListBox1.ItemIndex, ListBox1.ItemIndex+1); |
ReloadActionSceneLists; |
end; |
procedure TForm1.Button6Click(Sender: TObject); |
var |
pic: PPictureDef; |
begin |
pic := Game.AddPictureBetween(CurScene^.pictureIndex + Max(ListBox2.ItemIndex,0)); |
pic.duration := 0; |
pic.szBitmapFile := 'DUMMY.BMP'; |
ListBox2.Items.Insert(ListBox2.ItemIndex, '(0) DUMMY.BMP'); |
if ListBox2.ItemIndex = -1 then |
begin |
ListBox2.ItemIndex := ListBox2.Count - 1; |
end |
else |
begin |
ListBox2.ItemIndex := ListBox2.ItemIndex - 1; |
end; |
ListBox2Click(Listbox2); |
end; |
procedure TForm1.Button7Click(Sender: TObject); |
var |
bakIdx: integer; |
begin |
if Listbox2.Count > 0 then |
begin |
bakIdx := ListBox2.ItemIndex; |
Game.DeletePicture(bakIdx); |
ListBox2.Items.Delete(bakIdx); |
if ListBox2.Count > 0 then |
begin |
if bakIdx = ListBox2.Count then Dec(bakIdx); |
ListBox2.ItemIndex := bakIdx; |
ListBox2Click(Listbox2); |
end; |
end; |
end; |
procedure TForm1.Button8Click(Sender: TObject); |
begin |
if ListBox2.ItemIndex <= 0 then exit; |
Game.SwapPicture(CurScene^.pictureIndex+ListBox2.ItemIndex, CurScene^.pictureIndex+ListBox2.ItemIndex-1); |
ListBox2.Items.Exchange(ListBox2.ItemIndex, ListBox2.ItemIndex-1); |
end; |
procedure TForm1.Button9Click(Sender: TObject); |
begin |
if ListBox2.ItemIndex = ListBox2.Count-1 then exit; |
Game.SwapPicture(CurScene^.pictureIndex+ListBox2.ItemIndex, CurScene^.pictureIndex+ListBox2.ItemIndex+1); |
ListBox2.Items.Exchange(ListBox2.ItemIndex, ListBox2.ItemIndex+1); |
end; |
procedure TForm1.Save; |
var |
fs: TFileStream; |
begin |
fs := TFileStream.Create('GAME.BIN', fmOpenWrite or fmCreate); |
try |
fs.WriteBuffer(Game, SizeOf(Game)); |
finally |
FreeAndNil(fs); |
end; |
end; |
procedure TForm1.ActionTargetChange(Sender: TObject); |
var |
actionIdx: integer; |
itemIdx: Integer; |
begin |
if Sender = ComboBox1 then actionIdx := 0 |
else if Sender = ComboBox2 then actionIdx := 1 |
else if Sender = ComboBox3 then actionIdx := 2 |
else raise Exception.Create('Unexpected sender for ActionTargetChange()'); |
itemIdx := TComboBox(Sender).ItemIndex; |
if itemIdx = 0 then |
CurScene^.actions[actionIdx].nextSceneID := SCENEID_ENDGAME |
else if itemIdx = 1 then |
CurScene^.actions[actionIdx].nextSceneID := SCENEID_PREVDECISION |
else |
CurScene^.actions[actionIdx].nextSceneID := GetSceneIDFromName(ListBox1.Items[itemIdx - 2]); |
end; |
procedure TForm1.Addtoscene1Click(Sender: TObject); |
var |
fil: string; |
begin |
if ListBox3.ItemIndex = -1 then exit; |
fil := ListBox3.Items[ListBox3.ItemIndex]; |
Button6.Click; |
Edit3.Text := fil; |
end; |
procedure TForm1.Edit1Change(Sender: TObject); |
begin |
_WriteStringToFilename(@CurScene^.szDialogWav, Edit1.Text); |
RecalcSoundtrackLength; |
RecalcUnusedFiles; |
Label24.Visible := not FileExists(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit1.Text); |
Label25.Visible := not FileExists(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + 'E' + Edit1.Text); |
Button18.Visible := CurScene^.szDialogWav <> ''; |
end; |
procedure TForm1.Edit2Change(Sender: TObject); |
begin |
_WriteStringToFilename(@CurScene^.szDecisionBmp, Edit2.Text); |
RecalcUnusedFiles; |
Label27.Visible := not FileExists(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit2.Text) and not (Edit2.Text = ''); |
Button11.Visible := CurScene^.szDecisionBmp <> ''; |
end; |
procedure TForm1.Edit3Change(Sender: TObject); |
begin |
_WriteStringToFilename(@CurPicture^.szBitmapFile, Edit3.Text); |
ListBox2.Items[ListBox2.ItemIndex] := Format('(%d) %s', [CurPicture^.duration, CurPicture^.szBitmapFile]); |
RecalcUnusedFiles; |
Label26.Visible := not FileExists(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit3.Text); |
Button12.Visible := CurPicture^.szBitmapFile <> ''; |
end; |
procedure TForm1.FormCreate(Sender: TObject); |
begin |
PageControl1.ActivePageIndex := 0; |
PageControl2.ActivePageIndex := 0; |
Label10.Caption := ''; |
Label21.Caption := ''; |
Label23.Caption := ''; |
end; |
procedure TForm1.FormShow(Sender: TObject); |
begin |
if FileExists('GAME.BIN') then |
Load |
else |
New; |
end; |
function TForm1.CurScene: PSceneDef; |
begin |
if ListBox1.Count = 0 then raise Exception.Create('No scene available. Please create one.'); |
if ListBox1.ItemIndex = -1 then raise Exception.Create('No scene selected. Please select one.'); |
result := @Game.scenes[ListBox1.ItemIndex]; |
end; |
procedure TForm1.ListBox1Click(Sender: TObject); |
begin |
LoadScene; |
end; |
procedure TForm1.ListBox1DblClick(Sender: TObject); |
begin |
Button16Click(Button16); |
end; |
procedure TForm1.Close1Click(Sender: TObject); |
begin |
Close; |
end; |
function TForm1.CurPicture: PPictureDef; |
begin |
if ListBox2.Count = 0 then raise Exception.Create('No pictures available. Please create one.'); |
if ListBox2.ItemIndex = -1 then raise Exception.Create('No pictures selected. Please select one.'); |
result := @Game.pictures[CurScene^.pictureIndex + ListBox2.ItemIndex] |
end; |
function TForm1.CurPictureTimepos: Cardinal; |
var |
i: integer; |
begin |
result := 0; |
for i := curScene^.pictureIndex to curScene^.pictureIndex + ListBox2.ItemIndex - 1 do |
begin |
Inc(result, Game.pictures[i].duration); |
end; |
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 |
Image2.Picture.LoadFromFile(Filename) // TODO: keep aspect ratio |
else |
Image2.Picture := nil; |
Label18.Caption := _DecisecondToTime(CurPictureTimepos); |
if PlayStart <> 0 then |
begin |
Button15Click(Button15); |
end; |
end; |
procedure TForm1.ListBox2DblClick(Sender: TObject); |
begin |
Button15Click(Button15); |
end; |
procedure TForm1.ListBox3DblClick(Sender: TObject); |
var |
fileName: string; |
begin |
if ListBox3.ItemIndex = -1 then exit; |
fileName := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + ListBox3.Items[ListBox3.ItemIndex]; |
if not FileExists(FileName) then exit; |
ShellExecute(Application.Handle, 'open', PChar(fileName), '', '', SW_NORMAL); |
end; |
procedure TForm1.ListBox3MouseDown(Sender: TObject; Button: TMouseButton; |
Shift: TShiftState; X, Y: Integer); |
var |
APoint: TPoint; |
Index: integer; |
begin |
if Button = mbRight then |
begin |
APoint.X := X; |
APoint.Y := Y; |
Index := TListbox(Sender).ItemAtPos(APoint, True); |
if Index > -1 then TListbox(Sender).Selected[Index] := True; |
end; |
end; |
procedure TForm1.SetupGUIAfterLoad; |
var |
i: integer; |
begin |
ListBox1.Clear; |
for i := 0 to Game.numScenes - 1 do |
begin |
ListBox1.Items.Add(string(Game.scenes[i].szSceneFolder)); |
end; |
(* |
if ListBox1.Items.Count = 0 then |
begin |
NewScene; |
end; |
*) |
ReloadActionSceneLists; |
HandlePossibleEmptySceneList; |
if ListBox1.Count > 0 then |
begin |
ListBox1.ItemIndex := 0; |
ListBox1Click(Listbox1); |
end; |
end; |
procedure TForm1.New; |
begin |
ZeroMemory(@Game, SizeOf(Game)); |
SetupGUIAfterLoad; |
end; |
procedure TForm1.Load; |
var |
fs: TFileStream; |
begin |
fs := TFileStream.Create('GAME.BIN', fmOpenRead); |
try |
fs.ReadBuffer(Game, SizeOf(Game)); |
finally |
FreeAndNil(fs); |
end; |
SetupGUIAfterLoad; |
end; |
function TForm1.FindSceneIndex(sceneID: integer): integer; |
var |
i: Integer; |
sSceneID: string; |
begin |
sSceneID := Format('SC%.2d', [sceneID]); |
for i := 0 to ListBox1.Count - 1 do |
begin |
if ListBox1.Items.Strings[i] = sSceneID then |
begin |
result := i; |
exit; |
end; |
end; |
result := -1; |
end; |
procedure TForm1.RecalcSlideshowLength; |
var |
i: integer; |
Sum: integer; |
begin |
Sum := 0; |
for i := CurScene^.pictureIndex to CurScene^.pictureIndex + CurScene^.numPics - 1 do |
begin |
Inc(Sum, Game.pictures[i].duration); |
end; |
Label21.Caption := _DecisecondToTime(Sum); |
end; |
procedure TForm1.RecalcUnusedFiles; |
var |
i, idx: integer; |
SR: TSearchRec; |
begin |
ListBox3.Clear; |
if FindFirst(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + '*.*', faArchive, SR) = 0 then |
begin |
repeat |
ListBox3.Items.Add(SR.Name); //Fill the list |
until FindNext(SR) <> 0; |
FindClose(SR); |
end; |
for i := CurScene^.pictureIndex to CurScene^.pictureIndex+CurScene^.numPics-1 do |
begin |
idx := ListBox3.Items.IndexOf(Game.pictures[i].szBitmapFile); |
if idx <> -1 then ListBox3.Items.Delete(idx); |
end; |
idx := ListBox3.Items.IndexOf(Edit1.Text); |
if idx <> -1 then ListBox3.Items.Delete(idx); |
idx := ListBox3.Items.IndexOf('E'+Edit1.Text); |
if idx <> -1 then ListBox3.Items.Delete(idx); |
idx := ListBox3.Items.IndexOf(Edit2.Text); |
if idx <> -1 then ListBox3.Items.Delete(idx); |
idx := ListBox3.Items.IndexOf(Edit3.Text); |
if idx <> -1 then ListBox3.Items.Delete(idx); |
end; |
procedure TForm1.RecalcSoundtrackLength; |
var |
FileName: string; |
begin |
if MediaPlayer1.Mode = mpPlaying then exit; |
FileName := IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + CurScene^.szDialogWav; |
if not FileExists(FileName) then |
begin |
Label23.Caption := 'n/a'; |
exit; |
end; |
MediaPlayer1.FileName := FileName; |
MediaPlayer1.TimeFormat := tfMilliseconds; |
MediaPlayer1.Open; |
Label23.Caption := _DecisecondToTime(MediaPlayer1.Length div 100); |
MediaPlayer1.Close; |
end; |
procedure TForm1.LoadScene; |
procedure _SelectActionComboBox(ComboBox: TComboBox; sceneID: SmallInt); |
var |
idx: Integer; |
begin |
if sceneID = SCENEID_ENDGAME then |
ComboBox.ItemIndex := 0 |
else if sceneID = SCENEID_PREVDECISION then |
ComboBox.ItemIndex := 1 |
else |
begin |
idx := FindSceneIndex(sceneID); |
if idx = -1 then |
ComboBox.ItemIndex := -1 |
else |
ComboBox.ItemIndex := 2 + idx; |
end; |
end; |
procedure _PreparePictureList; |
var |
i: integer; |
pic: PPictureDef; |
begin |
ListBox2.Clear; |
if CurScene^.numPics = 0 then |
begin |
pic := Game.AddPictureBetween(CurScene^.pictureIndex + Max(ListBox2.ItemIndex,0)); |
pic.duration := 0; |
pic.szBitmapFile := 'DUMMY.BMP'; |
end; |
for i := CurScene^.pictureIndex to CurScene^.pictureIndex + CurScene^.numPics - 1 do |
begin |
Listbox2.Items.Add(Format('(%d) %s', [Game.pictures[i].duration, Game.pictures[i].szBitmapFile])); |
end; |
end; |
begin |
SpinEdit1.Value := GetSceneIDFromName(CurScene^.szSceneFolder); |
Edit1.Text := string(CurScene^.szDialogWav); |
Edit2.Text := string(CurScene^.szDecisionBmp); |
_PreparePictureList; |
ListBox2.ItemIndex := 0; |
ListBox2Click(Listbox2); |
_SelectActionComboBox(ComboBox1, CurScene^.actions[0].nextSceneID); |
_SelectActionComboBox(ComboBox2, CurScene^.actions[1].nextSceneID); |
_SelectActionComboBox(ComboBox3, CurScene^.actions[2].nextSceneID); |
SpinEdit12.Value := CurScene^.numActions; |
SpinEdit12Change(SpinEdit12); |
PageControl1.ActivePageIndex := 0; |
SpinEdit3.Value := CurScene^.actions[0].cHotspotTopLeft.X; |
SpinEdit17.Value := CurScene^.actions[1].cHotspotTopLeft.X; |
SpinEdit7.Value := CurScene^.actions[2].cHotspotTopLeft.X; |
SpinEdit2.Value := CurScene^.actions[0].cHotspotTopLeft.Y; |
SpinEdit18.Value := CurScene^.actions[1].cHotspotTopLeft.Y; |
SpinEdit8.Value := CurScene^.actions[2].cHotspotTopLeft.Y; |
SpinEdit4.Value := CurScene^.actions[0].cHotspotBottomRight.X; |
SpinEdit19.Value := CurScene^.actions[1].cHotspotBottomRight.X; |
SpinEdit10.Value := CurScene^.actions[2].cHotspotBottomRight.X; |
SpinEdit5.Value := CurScene^.actions[0].cHotspotBottomRight.Y; |
SpinEdit20.Value := CurScene^.actions[1].cHotspotBottomRight.Y; |
SpinEdit9.Value := CurScene^.actions[2].cHotspotBottomRight.Y; |
SpinEdit6.Value := CurScene^.actions[0].scoreDelta; |
SpinEdit21.Value := CurScene^.actions[1].scoreDelta; |
SpinEdit11.Value := CurScene^.actions[2].scoreDelta; |
RedrawDecisionBitmap; |
RecalcSlideshowLength; |
RecalcSoundtrackLength; |
RecalcUnusedFiles; |
end; |
procedure TForm1.ReloadActionSceneLists; |
procedure _ReloadActionSceneLists(ComboBox: TComboBox); |
var |
prevSelection: string; |
i: Integer; |
begin |
prevSelection := ComboBox.Text; |
try |
ComboBox.Items.Clear; |
ComboBox.Items.Add('Terminate program'); |
ComboBox.Items.Add('Previous decision'); |
ComboBox.Items.AddStrings(ListBox1.Items); |
finally |
ComboBox.ItemIndex := 0; |
for i := ComboBox.Items.Count - 1 downto 0 do |
begin |
if ComboBox.Items.Strings[i] = prevSelection then |
begin |
ComboBox.ItemIndex := i; |
end; |
end; |
end; |
end; |
begin |
_ReloadActionSceneLists(ComboBox1); |
_ReloadActionSceneLists(ComboBox2); |
_ReloadActionSceneLists(ComboBox3); |
end; |
procedure TForm1.SpinEdit12Change(Sender: TObject); |
begin |
TabSheet3.TabVisible := SpinEdit12.Value >= 3; |
if PageControl1.ActivePage = TabSheet3 then PageControl1.ActivePage := TabSheet2; |
TabSheet2.TabVisible := SpinEdit12.Value >= 2; |
if PageControl1.ActivePage = TabSheet2 then PageControl1.ActivePage := TabSheet1; |
// TabSheet1.TabVisible := SpinEdit12.Value >= 1; |
CurScene^.numActions := SpinEdit12.Value; |
// QUE: zero data of actions which are inactive (numActions<action)? |
end; |
procedure TForm1.SpinEdit13Change(Sender: TObject); |
begin |
if SpinEdit13.Text = '' then exit; |
CurPicture^.duration := SpinEdit13.Value; |
ListBox2.Items[ListBox2.ItemIndex] := Format('(%d) %s', [CurPicture^.duration, CurPicture^.szBitmapFile]); |
RecalcSlideshowLength; |
end; |
procedure TForm1.SpinEdit1Change(Sender: TObject); |
function _CountNumScenes(str: string): integer; |
var |
i: integer; |
begin |
result := 0; |
for i := 0 to ListBox1.Count-1 do |
begin |
if ListBox1.Items[i] = str then Inc(result); |
end; |
end; |
var |
sNew: string; |
begin |
// TODO: warn if dependencies are broken |
if SpinEdit1.Text = '' then exit; |
CurScene; // verify that a scene exists and is selected |
sNew := Format('SC%.2d', [SpinEdit1.Value]); |
ListBox1.Items[ListBox1.ItemIndex] := sNew; |
Label17.Visible := _CountNumScenes(sNew) > 1; |
ReloadActionSceneLists; |
_WriteStringToFilename(@CurScene^.szSceneFolder, ListBox1.Items[ListBox1.ItemIndex]); |
end; |
procedure TForm1.Timer1Timer(Sender: TObject); |
var |
ms: Cardinal; |
begin |
ms := GetTickCount - PlayStart; |
Label18.Caption := FormatDatetime('hh:nn:ss', ms / 1000 / (24*60*60)) + ',' + IntToStr(ms mod 1000 div 100); |
end; |
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); |
end; |
procedure TForm1.ActionSpinEditsChange(Sender: TObject); |
begin |
if TSpinEdit(Sender).Text = '' then exit; // user is about to enter a negative value |
if TSpinEdit(Sender).Text = '-' then exit; // user is about to enter a negative value |
if Sender = SpinEdit3 then CurScene^.actions[0].cHotspotTopLeft.X := TSpinEdit(Sender).Value |
else if Sender = SpinEdit17 then CurScene^.actions[1].cHotspotTopLeft.X := TSpinEdit(Sender).Value |
else if Sender = SpinEdit7 then CurScene^.actions[2].cHotspotTopLeft.X := TSpinEdit(Sender).Value |
else if Sender = SpinEdit2 then CurScene^.actions[0].cHotspotTopLeft.Y := TSpinEdit(Sender).Value |
else if Sender = SpinEdit18 then CurScene^.actions[1].cHotspotTopLeft.Y := TSpinEdit(Sender).Value |
else if Sender = SpinEdit8 then CurScene^.actions[2].cHotspotTopLeft.Y := TSpinEdit(Sender).Value |
else if Sender = SpinEdit4 then CurScene^.actions[0].cHotspotBottomRight.X := TSpinEdit(Sender).Value |
else if Sender = SpinEdit19 then CurScene^.actions[1].cHotspotBottomRight.X := TSpinEdit(Sender).Value |
else if Sender = SpinEdit10 then CurScene^.actions[2].cHotspotBottomRight.X := TSpinEdit(Sender).Value |
else if Sender = SpinEdit5 then CurScene^.actions[0].cHotspotBottomRight.Y := TSpinEdit(Sender).Value |
else if Sender = SpinEdit20 then CurScene^.actions[1].cHotspotBottomRight.Y := TSpinEdit(Sender).Value |
else if Sender = SpinEdit9 then CurScene^.actions[2].cHotspotBottomRight.Y := TSpinEdit(Sender).Value |
else if Sender = SpinEdit6 then CurScene^.actions[0].scoreDelta := TSpinEdit(Sender).Value |
else if Sender = SpinEdit21 then CurScene^.actions[1].scoreDelta := TSpinEdit(Sender).Value |
else if Sender = SpinEdit11 then CurScene^.actions[2].scoreDelta := TSpinEdit(Sender).Value; |
RedrawDecisionBitmap; |
end; |
procedure TForm1.RedrawDecisionBitmap; |
var |
Filename: string; |
begin |
FileName := string(IncludeTrailingPathDelimiter(CurScene^.szSceneFolder) + Edit2.Text); |
if FileExists(FileName) then |
Image1.Picture.Bitmap.LoadFromFile(FileName) // TODO: keep aspect ratio |
else |
Image1.Picture := nil; |
Image1.Picture.Bitmap.PixelFormat := pf24bit; // Extend the palette, so we have red, green and blue guaranteed. |
Image1.Canvas.Brush.Style := bsDiagCross; |
if (SpinEdit3.Value < SpinEdit4.Value) and (SpinEdit2.Value < SpinEdit5.Value) then |
begin |
Image1.Canvas.Pen.Color := clRed; |
Image1.Canvas.Brush.Color := clRed; |
Image1.Canvas.Rectangle(SpinEdit3.Value, SpinEdit2.Value, SpinEdit4.Value, SpinEdit5.Value); |
end; |
if (SpinEdit17.Value < SpinEdit19.Value) and (SpinEdit18.Value < SpinEdit20.Value) then |
begin |
Image1.Canvas.Pen.Color := clLime; |
Image1.Canvas.Brush.Color := clLime; |
Image1.Canvas.Rectangle(SpinEdit17.Value, SpinEdit18.Value, SpinEdit19.Value, SpinEdit20.Value); |
end; |
if (SpinEdit7.Value < SpinEdit10.Value) and (SpinEdit8.Value < SpinEdit9.Value) then |
begin |
Image1.Canvas.Pen.Color := clBlue; |
Image1.Canvas.Brush.Color := clBlue; |
Image1.Canvas.Rectangle(SpinEdit7.Value, SpinEdit8.Value, SpinEdit10.Value, SpinEdit9.Value); |
end; |
end; |
end. |
/trunk/SceneEditor |
---|
Property changes: |
Added: svn:ignore |
+*.dcu |
+*.~* |
+__history |
+*.local |
+*.identcache |
+*.stat |
/trunk/Win32_Player/AutoRun.inf |
---|
0,0 → 1,4 |
[AutoRun] |
open=ShowTime32.exe |
icon=ShowTime32.exe,0 |
action=Spielen |
/trunk/Win32_Player/Game.pas |
---|
0,0 → 1,202 |
unit Game; |
interface |
uses |
SysUtils, Classes, Forms, GameBinStruct; |
type |
TPictureType = (ptDia, ptDecision); |
THotspotIndex = 0..2; |
TGame = class; |
PHotspot = ^THotspot; |
THotspot = record |
game: TGame; |
lpAction: PActionDef; |
cHotspotTopLeft: TCoord; |
cHotspotBottomRight: TCoord; |
end; |
TShowPictureCallback = procedure(Game: TGame; AFilename: string; AType: TPictureType) of object; |
TPlaySoundCallback = procedure(Game: TGame; AFilename: string) of object; |
TSimpleCallback = procedure(Game: TGame) of object; |
TWaitCallback = procedure(Game: TGame; AMilliseconds: integer) of object; |
TSetHotspotCallback = procedure(Game: TGame; AIndex: THotspotIndex; AHotspot: THotspot) of object; |
TClearHotspotsCallback = procedure(Game: TGame) of object; |
TGame = class(TObject) |
private |
FPictureShowCallback: TShowPictureCallback; |
FAsyncSoundCallback: TPlaySoundCallback; |
FExitCallback: TSimpleCallback; |
FWaitCallback: TWaitCallback; |
FSetHotspotCallback: TSetHotspotCallback; |
FClearHotspotsCallback: TClearHotspotsCallback; |
FDirectory: string; |
FScore: integer; |
CurDecisionScene, LastDecisionScene: PSceneDef; |
procedure TryExit; |
procedure PrevDecisionScene; |
protected |
GameData: TGameBinFile; |
function FindScene(ASceneID: integer): PSceneDef; |
procedure Wait(AMilliseconds: integer); |
procedure PlayScene(scene: PSceneDef; goToDecision: boolean); |
public |
procedure PerformAction(action: PActionDef); |
property PictureShowCallback: TShowPictureCallback read FPictureShowCallback write FPictureShowCallback; |
property AsyncSoundCallback: TPlaySoundCallback read FAsyncSoundCallback write FAsyncSoundCallback; |
property ExitCallback: TSimpleCallback read FExitCallback write FExitCallback; |
property WaitCallback: TWaitCallback read FWaitCallback write FWaitCallback; |
property SetHotspotCallback: TSetHotspotCallback read FSetHotspotCallback write FSetHotspotCallback; |
property ClearHotspotsCallback: TClearHotspotsCallback read FClearHotspotsCallback write FClearHotspotsCallback; |
property Directory: string read FDirectory; |
property Score: integer read FScore; |
constructor Create(ADirectory: string); |
procedure Run; |
end; |
implementation |
{ TGame } |
constructor TGame.Create(ADirectory: string); |
var |
fs: TFileStream; |
gameBinFilename: string; |
begin |
FDirectory := ADirectory; |
gameBinFilename := IncludeTrailingPathDelimiter(ADirectory) + 'GAME.BIN'; |
if not FileExists(gameBinFilename) then |
begin |
raise Exception.Create('Cannot find GAME.BIN'); |
end; |
fs := TFileStream.Create(gameBinFilename, fmOpenRead); |
try |
fs.ReadBuffer(GameData, SizeOf(GameData)); |
finally |
FreeAndNil(fs); |
end; |
end; |
function TGame.FindScene(ASceneID: integer): PSceneDef; |
var |
i: integer; |
begin |
for i := 0 to GameData.numScenes - 1 do |
begin |
if GameData.scenes[i].szSceneFolder = Format('SC%.2d', [ASceneID]) then |
begin |
result := @GameData.scenes[i]; |
exit; |
end; |
end; |
result := nil; |
end; |
procedure TGame.TryExit; |
begin |
if Assigned(ExitCallback) then ExitCallback(Self); |
end; |
procedure TGame.PrevDecisionScene; |
begin |
if Assigned(LastDecisionScene) then PlayScene(LastDecisionScene, true) |
end; |
procedure TGame.PerformAction(action: PActionDef); |
var |
nextScene: PSceneDef; |
begin |
Inc(FScore, action^.scoreDelta); |
if action^.nextSceneID = SCENEID_PREVDECISION then |
PrevDecisionScene |
else if action^.nextSceneID = SCENEID_ENDGAME then |
TryExit |
else |
begin |
nextScene := FindScene(action^.nextSceneID); |
if Assigned(nextScene) then |
PlayScene(nextScene, action^.sceneSegment=1) |
(* |
else |
raise Exception.CreateFmt('Scene %d was not found in GAME.BIN', [action^.nextSceneID]); |
*) |
end; |
end; |
procedure TGame.Wait(AMilliseconds: integer); |
begin |
if Assigned(WaitCallback) then |
WaitCallback(Self, AMilliseconds) |
else |
Sleep(AMilliseconds); |
end; |
procedure TGame.PlayScene(scene: PSceneDef; goToDecision: boolean); |
var |
i: integer; |
hotspot: THotspot; |
begin |
if Assigned(ClearHotspotsCallback) then |
begin |
ClearHotspotsCallback(Self); |
end; |
if not goToDecision then |
begin |
if Assigned(AsyncSoundCallback) then |
begin |
AsyncSoundCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
scene^.szSceneFolder + PathDelim + scene^.szDialogWav); |
end; |
for i := scene^.pictureIndex to scene^.pictureIndex + scene^.numPics - 1 do |
begin |
if Assigned(PictureShowCallback) then |
begin |
PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
scene^.szSceneFolder + PathDelim + GameData.pictures[i].szBitmapFile, ptDia); |
end; |
Wait(GameData.pictures[i].duration * 100); |
if Application.Terminated then Abort; |
end; |
end; |
if scene^.szDecisionBmp <> '' then |
begin |
LastDecisionScene := CurDecisionScene; |
CurDecisionScene := scene; |
if Assigned(PictureShowCallback) then |
begin |
PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
scene^.szSceneFolder + PathDelim + scene^.szDecisionBmp, ptDecision); |
end; |
if Assigned(SetHotspotCallback) then |
begin |
for i := 0 to scene^.numActions - 1 do |
begin |
hotspot.Game := Self; |
hotspot.lpAction := @scene^.actions[i]; |
hotspot.cHotspotTopLeft.X := scene^.actions[i].cHotspotTopLeft.X; |
hotspot.cHotspotTopLeft.Y := scene^.actions[i].cHotspotTopLeft.Y; |
hotspot.cHotspotBottomRight.X := scene^.actions[i].cHotspotBottomRight.X; |
hotspot.cHotspotBottomRight.Y := scene^.actions[i].cHotspotBottomRight.Y; |
SetHotspotCallback(Self, i, hotspot); |
end; |
end; |
end |
else |
begin |
if scene^.numActions > 0 then PerformAction(@scene^.actions[0]); |
end; |
end; |
procedure TGame.Run; |
begin |
if GameData.numScenes = 0 then exit; |
PlayScene(@GameData.Scenes[0], false); |
end; |
end. |
/trunk/Win32_Player/MOVIE.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/Win32_Player/Main.dfm |
---|
0,0 → 1,50 |
object MainForm: TMainForm |
Left = 0 |
Top = 0 |
BorderIcons = [biSystemMenu, biMinimize] |
BorderStyle = bsSingle |
ClientHeight = 72 |
ClientWidth = 255 |
Color = clBlack |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
KeyPreview = True |
OldCreateOrder = False |
Position = poScreenCenter |
OnCreate = FormCreate |
OnDestroy = FormDestroy |
OnKeyDown = FormKeyDown |
PixelsPerInch = 96 |
TextHeight = 13 |
object Image1: TImage |
Left = 159 |
Top = 8 |
Width = 41 |
Height = 33 |
OnMouseUp = ControlClick |
end |
object Panel1: TPanel |
Left = 24 |
Top = 32 |
Width = 176 |
Height = 25 |
BevelOuter = bvSpace |
Color = clWhite |
Ctl3D = False |
ParentBackground = False |
ParentCtl3D = False |
TabOrder = 0 |
Visible = False |
OnMouseUp = ControlClick |
end |
object StartupTimer: TTimer |
Enabled = False |
Interval = 10 |
OnTimer = StartupTimerTimer |
Left = 216 |
Top = 16 |
end |
end |
/trunk/Win32_Player/Main.pas |
---|
0,0 → 1,261 |
unit Main; |
// 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. |
interface |
uses |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
Dialogs, ExtCtrls, StdCtrls, Game; |
type |
TMainForm = class(TForm) |
Image1: TImage; |
Panel1: TPanel; |
StartupTimer: TTimer; |
procedure FormCreate(Sender: TObject); |
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); |
procedure StartupTimerTimer(Sender: TObject); |
procedure ControlClick(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
procedure FormDestroy(Sender: TObject); |
private |
FHotspots: array[0..2] of THotspot; |
FullscreenMode: boolean; |
procedure cbPictureShow(ASender: TGame; AFilename: string; AType: TPictureType); |
procedure cbAsyncSound(ASender: TGame; AFilename: string); |
procedure cbExit(ASender: TGame); |
procedure cbWait(ASender: TGame; AMilliseconds: integer); |
procedure cbSetHotspot(ASender: TGame; AIndex: THotspotIndex; AHotspot: THotspot); |
procedure cbClearHotspots(ASender: TGame); |
procedure ClickEvent(X, Y: Integer); |
public |
game: TGame; |
end; |
var |
MainForm: TMainForm; |
implementation |
{$R *.dfm} |
uses |
MMSystem, IniFiles, Math; |
procedure Delay(const Milliseconds: DWord); |
var |
FirstTickCount: DWord; |
begin |
FirstTickCount := GetTickCount; // TODO: Attention, GetTickCount can overflow |
while not Application.Terminated and ((GetTickCount - FirstTickCount) < Milliseconds) do |
begin |
Application.ProcessMessages; |
Sleep(0); |
end; |
end; |
function AddThouSeps(const S: string): string; |
var |
LS, L2, I, N: Integer; |
Temp: string; |
begin |
// http://www.delphigroups.info/2/11/471892.html |
result := S ; |
LS := Length(S); |
N := 1 ; |
if LS > 1 then |
begin |
if S [1] = '-' then // check for negative value |
begin |
N := 2; |
LS := LS - 1; |
end; |
end; |
if LS <= 3 then exit; |
L2 := (LS - 1) div 3; |
Temp := ''; |
for I := 1 to L2 do |
begin |
Temp := ThousandSeparator + Copy (S, LS - 3 * I + 1, 3) + Temp; |
end; |
Result := Copy (S, N, (LS - 1) mod 3 + 1) + Temp; |
if N > 1 then Result := '-' + Result; |
end; |
{ TMainForm } |
procedure TMainForm.cbPictureShow(ASender: TGame; AFilename: string; AType: TPictureType); |
begin |
if FileExists(AFilename) then |
begin |
Image1.Visible := false; |
try |
Image1.Picture.LoadFromFile(AFilename); |
Image1.Autosize := true; |
finally |
// This speeds up the picture loading on very old computers |
Image1.Visible := true; |
end; |
// Make form bigger if necessary |
if Image1.Width > ClientWidth then |
begin |
ClientWidth := Image1.Width; |
if (ClientWidth >= Screen.Width) then FullscreenMode := true; |
Position := poScreenCenter; |
end; |
if Image1.Height > ClientHeight then |
begin |
ClientHeight := Image1.Height; |
if (ClientHeight >= Screen.Height) then FullscreenMode := true; |
Position := poScreenCenter; |
end; |
// Center image |
Image1.Left := ClientWidth div 2 - Image1.Width div 2; |
Image1.Top := ClientHeight div 2 - Image1.Height div 2; |
end |
else |
begin |
Image1.Picture := nil; |
end; |
if FullScreenMode then |
begin |
BorderStyle := bsNone; |
FormStyle := fsStayOnTop; |
Case AType of |
ptDia: Screen.Cursor := -1; |
ptDecision: Screen.Cursor := 0; |
End; |
end; |
Panel1.Caption := Format('Your score is: %s', [AddThouSeps(IntToStr(ASender.Score))]); |
Panel1.Left := 8; |
Panel1.Top := Min(ClientHeight, Screen.Height) - Panel1.Height - 8; |
Panel1.Visible := AType = ptDecision; |
end; |
procedure TMainForm.cbAsyncSound(ASender: TGame; AFilename: string); |
begin |
PlaySound(nil, hinstance, 0); |
if FileExists(AFilename) then |
begin |
PlaySound(PChar(AFilename), hinstance, SND_FILENAME or SND_ASYNC); |
end; |
end; |
procedure TMainForm.cbSetHotspot(ASender: TGame; AIndex: THotspotIndex; AHotspot: THotspot); |
begin |
FHotspots[AIndex] := AHotspot; |
end; |
procedure TMainForm.cbClearHotspots(ASender: TGame); |
var |
i: Integer; |
begin |
for i := Low(FHotspots) to High(FHotspots) - 1 do |
begin |
FHotspots[i].lpAction := nil; |
end; |
end; |
procedure TMainForm.cbExit(ASender: TGame); |
begin |
Application.Terminate; |
end; |
procedure TMainForm.cbWait(ASender: TGame; AMilliseconds: integer); |
begin |
//Cursor := crHourglass; |
try |
Delay(AMilliseconds); |
finally |
//Cursor := crDefault; |
end; |
end; |
procedure TMainForm.FormCreate(Sender: TObject); |
var |
ini: TMemIniFile; |
iniFilename: string; |
begin |
iniFilename := ChangeFileExt(ExtractFileName(ParamStr(0)), '.ini'); |
DoubleBuffered := true; |
if FileExists(iniFilename) then |
begin |
ini := TMemIniFile.Create(iniFilename); |
try |
Caption := ini.ReadString('Config', 'Title', ''); |
finally |
FreeAndNil(ini); |
end; |
end; |
try |
Game := TGame.Create('.'); |
Game.PictureShowCallback := cbPictureShow; |
Game.AsyncSoundCallback := cbAsyncSound; |
Game.ExitCallback := cbExit; |
Game.WaitCallback := cbWait; |
Game.SetHotspotCallback := cbSetHotspot; |
Game.ClearHotspotsCallback := cbClearHotspots; |
StartupTimer.Enabled := true; |
except |
Application.Terminate; |
end; |
end; |
procedure TMainForm.FormDestroy(Sender: TObject); |
begin |
// Without this, some audio drivers could crash if you press ESC to end the game. |
// (VPC 2007 with Win95; cpsman.dll crashes sometimes) |
PlaySound(nil, hinstance, 0); |
end; |
procedure TMainForm.FormKeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
begin |
if Key = VK_ESCAPE then Close; |
end; |
procedure TMainForm.ClickEvent(X, Y: Integer); |
var |
i: integer; |
begin |
// TODO: if hotspots are overlaying; which hotspot will be prefered? the top ones? check out the original game. |
for i := Low(FHotspots) to High(FHotspots) do |
begin |
if Assigned(FHotspots[i].lpAction) and |
(X >= FHotspots[i].cHotspotTopLeft.X) and |
(Y >= FHotspots[i].cHotspotTopLeft.Y) and |
(X <= FHotspots[i].cHotspotBottomRight.X) and |
(Y <= FHotspots[i].cHotspotBottomRight.Y) then |
begin |
FHotspots[i].Game.PerformAction(FHotspots[i].lpAction); |
Exit; |
end; |
end; |
end; |
procedure TMainForm.ControlClick(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
begin |
ClickEvent(X+TControl(Sender).Left, Y+TControl(Sender).Top); |
end; |
procedure TMainForm.StartupTimerTimer(Sender: TObject); |
begin |
StartupTimer.Enabled := false; |
Game.Run; |
end; |
end. |
/trunk/Win32_Player/ORIGINAL.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/Win32_Player/Showtime.cfg |
---|
0,0 → 1,39 |
-$A8 |
-$B- |
-$C+ |
-$D+ |
-$E- |
-$F- |
-$G+ |
-$H+ |
-$I+ |
-$J- |
-$K- |
-$L+ |
-$M- |
-$N+ |
-$O+ |
-$P+ |
-$Q- |
-$R- |
-$S- |
-$T- |
-$U- |
-$V+ |
-$W- |
-$X+ |
-$YD |
-$Z1 |
-cg |
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
-H+ |
-W+ |
-M |
-$M16384,1048576 |
-K$00400000 |
-E"e:\_test" |
-LE"C:\Users\DELL User\Documents\Borland Studio-Projekte\Bpl" |
-LN"C:\Users\DELL User\Documents\Borland Studio-Projekte\Bpl" |
-w-UNSAFE_TYPE |
-w-UNSAFE_CODE |
-w-UNSAFE_CAST |
/trunk/Win32_Player/Showtime32.bdsproj |
---|
0,0 → 1,175 |
<?xml version="1.0" encoding="utf-8"?> |
<BorlandProject> |
<PersonalityInfo> |
<Option> |
<Option Name="Personality">Delphi.Personality</Option> |
<Option Name="ProjectType"></Option> |
<Option Name="Version">1.0</Option> |
<Option Name="GUID">{F68EE1AF-C815-4B78-9228-27C1D5A58382}</Option> |
</Option> |
</PersonalityInfo> |
<Delphi.Personality> |
<Source> |
<Source Name="MainSource">Showtime32.dpr</Source> |
</Source> |
<FileVersion> |
<FileVersion Name="Version">7.0</FileVersion> |
</FileVersion> |
<Compiler> |
<Compiler Name="A">8</Compiler> |
<Compiler Name="B">0</Compiler> |
<Compiler Name="C">1</Compiler> |
<Compiler Name="D">1</Compiler> |
<Compiler Name="E">0</Compiler> |
<Compiler Name="F">0</Compiler> |
<Compiler Name="G">1</Compiler> |
<Compiler Name="H">1</Compiler> |
<Compiler Name="I">1</Compiler> |
<Compiler Name="J">0</Compiler> |
<Compiler Name="K">0</Compiler> |
<Compiler Name="L">1</Compiler> |
<Compiler Name="M">0</Compiler> |
<Compiler Name="N">1</Compiler> |
<Compiler Name="O">1</Compiler> |
<Compiler Name="P">1</Compiler> |
<Compiler Name="Q">0</Compiler> |
<Compiler Name="R">0</Compiler> |
<Compiler Name="S">0</Compiler> |
<Compiler Name="T">0</Compiler> |
<Compiler Name="U">0</Compiler> |
<Compiler Name="V">1</Compiler> |
<Compiler Name="W">0</Compiler> |
<Compiler Name="X">1</Compiler> |
<Compiler Name="Y">1</Compiler> |
<Compiler Name="Z">1</Compiler> |
<Compiler Name="ShowHints">True</Compiler> |
<Compiler Name="ShowWarnings">True</Compiler> |
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> |
<Compiler Name="NamespacePrefix"></Compiler> |
<Compiler Name="GenerateDocumentation">False</Compiler> |
<Compiler Name="DefaultNamespace"></Compiler> |
<Compiler Name="SymbolDeprecated">True</Compiler> |
<Compiler Name="SymbolLibrary">True</Compiler> |
<Compiler Name="SymbolPlatform">True</Compiler> |
<Compiler Name="SymbolExperimental">True</Compiler> |
<Compiler Name="UnitLibrary">True</Compiler> |
<Compiler Name="UnitPlatform">True</Compiler> |
<Compiler Name="UnitDeprecated">True</Compiler> |
<Compiler Name="UnitExperimental">True</Compiler> |
<Compiler Name="HResultCompat">True</Compiler> |
<Compiler Name="HidingMember">True</Compiler> |
<Compiler Name="HiddenVirtual">True</Compiler> |
<Compiler Name="Garbage">True</Compiler> |
<Compiler Name="BoundsError">True</Compiler> |
<Compiler Name="ZeroNilCompat">True</Compiler> |
<Compiler Name="StringConstTruncated">True</Compiler> |
<Compiler Name="ForLoopVarVarPar">True</Compiler> |
<Compiler Name="TypedConstVarPar">True</Compiler> |
<Compiler Name="AsgToTypedConst">True</Compiler> |
<Compiler Name="CaseLabelRange">True</Compiler> |
<Compiler Name="ForVariable">True</Compiler> |
<Compiler Name="ConstructingAbstract">True</Compiler> |
<Compiler Name="ComparisonFalse">True</Compiler> |
<Compiler Name="ComparisonTrue">True</Compiler> |
<Compiler Name="ComparingSignedUnsigned">True</Compiler> |
<Compiler Name="CombiningSignedUnsigned">True</Compiler> |
<Compiler Name="UnsupportedConstruct">True</Compiler> |
<Compiler Name="FileOpen">True</Compiler> |
<Compiler Name="FileOpenUnitSrc">True</Compiler> |
<Compiler Name="BadGlobalSymbol">True</Compiler> |
<Compiler Name="DuplicateConstructorDestructor">True</Compiler> |
<Compiler Name="InvalidDirective">True</Compiler> |
<Compiler Name="PackageNoLink">True</Compiler> |
<Compiler Name="PackageThreadVar">True</Compiler> |
<Compiler Name="ImplicitImport">True</Compiler> |
<Compiler Name="HPPEMITIgnored">True</Compiler> |
<Compiler Name="NoRetVal">True</Compiler> |
<Compiler Name="UseBeforeDef">True</Compiler> |
<Compiler Name="ForLoopVarUndef">True</Compiler> |
<Compiler Name="UnitNameMismatch">True</Compiler> |
<Compiler Name="NoCFGFileFound">True</Compiler> |
<Compiler Name="ImplicitVariants">True</Compiler> |
<Compiler Name="UnicodeToLocale">True</Compiler> |
<Compiler Name="LocaleToUnicode">True</Compiler> |
<Compiler Name="ImagebaseMultiple">True</Compiler> |
<Compiler Name="SuspiciousTypecast">True</Compiler> |
<Compiler Name="PrivatePropAccessor">True</Compiler> |
<Compiler Name="UnsafeType">False</Compiler> |
<Compiler Name="UnsafeCode">False</Compiler> |
<Compiler Name="UnsafeCast">False</Compiler> |
<Compiler Name="OptionTruncated">True</Compiler> |
<Compiler Name="WideCharReduced">True</Compiler> |
<Compiler Name="DuplicatesIgnored">True</Compiler> |
<Compiler Name="UnitInitSeq">True</Compiler> |
<Compiler Name="LocalPInvoke">True</Compiler> |
<Compiler Name="MessageDirective">True</Compiler> |
<Compiler Name="CodePage"></Compiler> |
</Compiler> |
<Linker> |
<Linker Name="MapFile">0</Linker> |
<Linker Name="OutputObjs">0</Linker> |
<Linker Name="GenerateHpps">False</Linker> |
<Linker Name="ConsoleApp">1</Linker> |
<Linker Name="DebugInfo">False</Linker> |
<Linker Name="RemoteSymbols">False</Linker> |
<Linker Name="GenerateDRC">False</Linker> |
<Linker Name="MinStackSize">16384</Linker> |
<Linker Name="MaxStackSize">1048576</Linker> |
<Linker Name="ImageBase">4194304</Linker> |
<Linker Name="ExeDescription"></Linker> |
</Linker> |
<Directories> |
<Directories Name="OutputDir">E:\_test</Directories> |
<Directories Name="UnitOutputDir"></Directories> |
<Directories Name="PackageDLLOutputDir"></Directories> |
<Directories Name="PackageDCPOutputDir"></Directories> |
<Directories Name="SearchPath"></Directories> |
<Directories Name="Packages"></Directories> |
<Directories Name="Conditionals"></Directories> |
<Directories Name="DebugSourceDirs"></Directories> |
<Directories Name="UsePackages">False</Directories> |
</Directories> |
<Parameters> |
<Parameters Name="RunParams"></Parameters> |
<Parameters Name="HostApplication"></Parameters> |
<Parameters Name="Launcher"></Parameters> |
<Parameters Name="UseLauncher">False</Parameters> |
<Parameters Name="DebugCWD">C:\Users\DELL User\Desktop\Daten ohne Cloud\Plumbers Dont Wear Ties\PC Contents\C\PLUMBER</Parameters> |
<Parameters Name="Debug Symbols Search Path"></Parameters> |
<Parameters Name="LoadAllSymbols">True</Parameters> |
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters> |
</Parameters> |
<Language> |
<Language Name="ActiveLang"></Language> |
<Language Name="ProjectLang">$00000000</Language> |
<Language Name="RootDir"></Language> |
</Language> |
<VersionInfo> |
<VersionInfo Name="IncludeVerInfo">True</VersionInfo> |
<VersionInfo Name="AutoIncBuild">False</VersionInfo> |
<VersionInfo Name="MajorVer">1</VersionInfo> |
<VersionInfo Name="MinorVer">0</VersionInfo> |
<VersionInfo Name="Release">0</VersionInfo> |
<VersionInfo Name="Build">0</VersionInfo> |
<VersionInfo Name="Debug">False</VersionInfo> |
<VersionInfo Name="PreRelease">False</VersionInfo> |
<VersionInfo Name="Special">False</VersionInfo> |
<VersionInfo Name="Private">False</VersionInfo> |
<VersionInfo Name="DLL">False</VersionInfo> |
<VersionInfo Name="Locale">1033</VersionInfo> |
<VersionInfo Name="CodePage">1252</VersionInfo> |
</VersionInfo> |
<VersionInfoKeys> |
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys> |
<VersionInfoKeys Name="FileDescription">Showtime32</VersionInfoKeys> |
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="InternalName"></VersionInfoKeys> |
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys> |
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys> |
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys> |
<VersionInfoKeys Name="ProductName">Showtime32</VersionInfoKeys> |
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="Comments"></VersionInfoKeys> <VersionInfoKeys Name="ProgramID">com.embarcadero.Showtime32</VersionInfoKeys> |
</VersionInfoKeys> |
</Delphi.Personality> |
</BorlandProject> |
/trunk/Win32_Player/Showtime32.cfg |
---|
0,0 → 1,39 |
-$A8 |
-$B- |
-$C+ |
-$D+ |
-$E- |
-$F- |
-$G+ |
-$H+ |
-$I+ |
-$J- |
-$K- |
-$L+ |
-$M- |
-$N+ |
-$O+ |
-$P+ |
-$Q- |
-$R- |
-$S- |
-$T- |
-$U- |
-$V+ |
-$W- |
-$X+ |
-$YD |
-$Z1 |
-cg |
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
-H+ |
-W+ |
-M |
-$M16384,1048576 |
-K$00400000 |
-E"E:\_test" |
-LE"C:\Users\DELL User\Documents\Borland Studio-Projekte\Bpl" |
-LN"C:\Users\DELL User\Documents\Borland Studio-Projekte\Bpl" |
-w-UNSAFE_TYPE |
-w-UNSAFE_CODE |
-w-UNSAFE_CAST |
/trunk/Win32_Player/Showtime32.dpr |
---|
0,0 → 1,15 |
program Showtime32; |
uses |
Forms, |
Main in 'Main.pas' {MainForm}, |
Game in 'Game.pas', |
GameBinStruct in '..\FileFormat\Delphi\GameBinStruct.pas'; |
{$R *.res} |
begin |
Application.Initialize; |
Application.CreateForm(TMainForm, MainForm); |
Application.Run; |
end. |
/trunk/Win32_Player/Showtime32.dproj |
---|
0,0 → 1,130 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<PropertyGroup> |
<ProjectGuid>{F68EE1AF-C815-4B78-9228-27C1D5A58382}</ProjectGuid> |
<MainSource>Showtime32.dpr</MainSource> |
<Base>True</Base> |
<Config Condition="'$(Config)'==''">Debug</Config> |
<TargetedPlatforms>1</TargetedPlatforms> |
<AppType>Application</AppType> |
<FrameworkType>VCL</FrameworkType> |
<ProjectVersion>18.2</ProjectVersion> |
<Platform Condition="'$(Platform)'==''">Win32</Platform> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''"> |
<Base_Win32>true</Base_Win32> |
<CfgParent>Base</CfgParent> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> |
<Cfg_1>true</Cfg_1> |
<CfgParent>Base</CfgParent> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''"> |
<Cfg_1_Win32>true</Cfg_1_Win32> |
<CfgParent>Cfg_1</CfgParent> |
<Cfg_1>true</Cfg_1> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''"> |
<Cfg_2>true</Cfg_2> |
<CfgParent>Base</CfgParent> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''"> |
<Cfg_2_Win32>true</Cfg_2_Win32> |
<CfgParent>Cfg_2</CfgParent> |
<Cfg_2>true</Cfg_2> |
<Base>true</Base> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Base)'!=''"> |
<DCC_DebugInformation>1</DCC_DebugInformation> |
<DCC_E>false</DCC_E> |
<DCC_F>false</DCC_F> |
<DCC_K>false</DCC_K> |
<DCC_N>true</DCC_N> |
<DCC_S>false</DCC_S> |
<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> |
<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> |
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=Showtime32;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Base_Win32)'!=''"> |
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace> |
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> |
<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>Showtime32_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> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_1)'!=''"> |
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> |
<DCC_DebugInformation>0</DCC_DebugInformation> |
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> |
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''"> |
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> |
<AppEnableHighDPI>true</AppEnableHighDPI> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_2)'!=''"> |
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> |
<DCC_Optimize>false</DCC_Optimize> |
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames> |
</PropertyGroup> |
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''"> |
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> |
<AppEnableHighDPI>true</AppEnableHighDPI> |
<DCC_ExeOutput>E:\_test</DCC_ExeOutput> |
<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> |
<ItemGroup> |
<DelphiCompile Include="$(MainSource)"> |
<MainSource>MainSource</MainSource> |
</DelphiCompile> |
<DCCReference Include="Main.pas"> |
<Form>MainForm</Form> |
</DCCReference> |
<DCCReference Include="Game.pas"/> |
<DCCReference Include="..\FileFormat\Delphi\GameBinStruct.pas"/> |
<BuildConfiguration Include="Debug"> |
<Key>Cfg_2</Key> |
<CfgParent>Base</CfgParent> |
</BuildConfiguration> |
<BuildConfiguration Include="Base"> |
<Key>Base</Key> |
</BuildConfiguration> |
<BuildConfiguration Include="Release"> |
<Key>Cfg_1</Key> |
<CfgParent>Base</CfgParent> |
</BuildConfiguration> |
</ItemGroup> |
<ProjectExtensions> |
<Borland.Personality>Delphi.Personality.12</Borland.Personality> |
<Borland.ProjectType/> |
<BorlandProject> |
<Delphi.Personality> |
<Source> |
<Source Name="MainSource">Showtime32.dpr</Source> |
</Source> |
</Delphi.Personality> |
<Platforms> |
<Platform value="Win32">True</Platform> |
</Platforms> |
</BorlandProject> |
<ProjectFileVersion>12</ProjectFileVersion> |
</ProjectExtensions> |
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> |
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/> |
</Project> |
/trunk/Win32_Player/Showtime32.ini |
---|
0,0 → 1,2 |
[Config] |
Title=Plumbers Don't Wear Ties |
/trunk/Win32_Player/Showtime32.res |
---|
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/Win32_Player/Showtime32_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/Win32_Player |
---|
Property changes: |
Added: svn:ignore |
+*.dcu |
+*.~* |
+__history |
+*.local |
+*.identcache |
+*.stat |
/trunk/. |
---|
Property changes: |
Added: svn:ignore |
+*.dcu |
+*.~* |
+__history |
+*.local |
+*.identcache |
+*.stat |