mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Compare commits
51 Commits
1.1.1
...
4182a1a107
Author | SHA1 | Date | |
---|---|---|---|
|
4182a1a107 | ||
|
5643f464cc | ||
|
a04c5f10df | ||
|
3e13877788 | ||
|
53ff18d337 | ||
|
e33c01cc40 | ||
|
0c891d3117 | ||
|
e4d2d9f9a4 | ||
|
41c0312921 | ||
|
e78b01a5f3 | ||
|
d470bb5eeb | ||
|
1fe94e4f06 | ||
|
5f2f73e176 | ||
|
7c5864d59b | ||
|
d698ff23db | ||
|
92cb961208 | ||
|
545798600e | ||
|
9ba15c6d78 | ||
|
0706640bc9 | ||
|
bdb7ddbdbb | ||
|
c5dee3ce9e | ||
|
7e3569500a | ||
|
376fdf16c4 | ||
|
40b38046b9 | ||
|
5b5fb15780 | ||
|
744b06796d | ||
|
7ba11df286 | ||
|
9f5699a61e | ||
|
5ab966ea98 | ||
|
42ec9e3646 | ||
|
83978d0397 | ||
|
82fe38dfc7 | ||
|
2c90110668 | ||
|
eac270670d | ||
|
c04aeeb962 | ||
|
f9109850a6 | ||
|
71955ac729 | ||
|
f36a8da95f | ||
|
0e3534d902 | ||
|
90943d945b | ||
|
00488c6fea | ||
|
f16ffa0c4c | ||
|
e098370249 | ||
|
c3eb23af4b | ||
|
a32b33ef1b | ||
|
b83fd1b28f | ||
|
ab6c447a2f | ||
|
e02919f1fc | ||
|
ccceec8b3c | ||
|
40c1a39c40 | ||
|
c27d78d329 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -21,6 +21,8 @@
|
||||
*.aps
|
||||
*.res
|
||||
*.a
|
||||
*.recipe
|
||||
*.FileListAbsolute.txt
|
||||
.vs/*
|
||||
Packaged/*
|
||||
DebugData/*
|
||||
@@ -50,6 +52,8 @@ SDL2-2.0.12/sdl2.pc
|
||||
SDL2-2.0.12/sdl2-config
|
||||
install_manifest.txt
|
||||
|
||||
## macOS
|
||||
.DS_Store
|
||||
|
||||
## Xcode projects
|
||||
AerofoilMac/xcuserdata/
|
||||
|
322
ASADTool/ASADTool.cpp
Normal file
322
ASADTool/ASADTool.cpp
Normal file
@@ -0,0 +1,322 @@
|
||||
#include "WindowsUnicodeToolShim.h"
|
||||
#include "PLBigEndian.h"
|
||||
#include "MacFileInfo.h"
|
||||
#include "CombinedTimestamp.h"
|
||||
#include "CFileStream.h"
|
||||
#include "PLCore.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// https://tools.ietf.org/rfc/rfc1740
|
||||
|
||||
int ProcessFork(FILE *f, uint32_t length, const char *basePath, const char *suffix)
|
||||
{
|
||||
const size_t kBufferSize = 4096;
|
||||
|
||||
uint8_t buffer[kBufferSize];
|
||||
|
||||
std::string combinedPath = std::string(basePath) + suffix;
|
||||
|
||||
FILE *outF = fopen_utf8(combinedPath.c_str(), "wb");
|
||||
if (!outF)
|
||||
{
|
||||
fprintf(stderr, "Failed to open output file '%s'", combinedPath.c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (length > 0)
|
||||
{
|
||||
const size_t amountToCopy = std::min<size_t>(length, kBufferSize);
|
||||
|
||||
if (fread(buffer, 1, amountToCopy, f) != amountToCopy)
|
||||
{
|
||||
fprintf(stderr, "Failed to copy data");
|
||||
fclose(outF);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fwrite(buffer, 1, amountToCopy, outF) != amountToCopy)
|
||||
{
|
||||
fprintf(stderr, "Failed to copy data");
|
||||
fclose(outF);
|
||||
return -1;
|
||||
}
|
||||
|
||||
length -= static_cast<uint32_t>(amountToCopy);
|
||||
}
|
||||
|
||||
fclose(outF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ProcessFileDatesInfo(FILE *f, uint32_t length, PortabilityLayer::MacFileProperties &mfp, PortabilityLayer::CombinedTimestamp &ts)
|
||||
{
|
||||
struct ASFileDates
|
||||
{
|
||||
BEInt32_t m_created;
|
||||
BEInt32_t m_modified;
|
||||
BEInt32_t m_backup;
|
||||
BEInt32_t m_access;
|
||||
};
|
||||
|
||||
ASFileDates fileDates;
|
||||
if (length < sizeof(fileDates))
|
||||
{
|
||||
fprintf(stderr, "File dates block was truncated");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fread(&fileDates, 1, sizeof(fileDates), f) != sizeof(fileDates))
|
||||
{
|
||||
fprintf(stderr, "Failed to read file dates");
|
||||
return -1;
|
||||
}
|
||||
|
||||
const int64_t asEpochToMacEpoch = -3029547600LL;
|
||||
|
||||
// Mac epoch in Unix time: -2082844800
|
||||
// ASAD epoch in Unix time: 946702800
|
||||
|
||||
mfp.m_createdTimeMacEpoch = static_cast<int64_t>(fileDates.m_created) + asEpochToMacEpoch;
|
||||
mfp.m_modifiedTimeMacEpoch = static_cast<int64_t>(fileDates.m_modified) + asEpochToMacEpoch;
|
||||
ts.SetMacEpochTime(mfp.m_modifiedTimeMacEpoch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ProcessFinderInfo(FILE *f, uint32_t length, PortabilityLayer::MacFileProperties &mfp)
|
||||
{
|
||||
struct ASFinderInfo
|
||||
{
|
||||
uint8_t m_type[4];
|
||||
uint8_t m_creator[4];
|
||||
BEUInt16_t m_finderFlags;
|
||||
BEPoint m_location;
|
||||
BEUInt16_t m_folder; // ???
|
||||
};
|
||||
|
||||
struct ASExtendedFinderInfo
|
||||
{
|
||||
BEUInt16_t m_iconID;
|
||||
uint8_t m_unused[6];
|
||||
uint8_t m_scriptCode;
|
||||
uint8_t m_xFlags;
|
||||
BEUInt16_t m_commentID;
|
||||
BEUInt32_t m_putAwayDirectoryID;
|
||||
};
|
||||
|
||||
ASFinderInfo finderInfo;
|
||||
if (length < sizeof(finderInfo))
|
||||
{
|
||||
fprintf(stderr, "Finder Info block was truncated");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fread(&finderInfo, 1, sizeof(finderInfo), f) != sizeof(finderInfo))
|
||||
{
|
||||
fprintf(stderr, "Failed to read Finder info");
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(mfp.m_fileCreator, finderInfo.m_creator, 4);
|
||||
memcpy(mfp.m_fileType, finderInfo.m_type, 4);
|
||||
mfp.m_finderFlags = finderInfo.m_finderFlags;
|
||||
mfp.m_xPos = finderInfo.m_location.h;
|
||||
mfp.m_yPos = finderInfo.m_location.v;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ProcessMacintoshFileInfo(FILE *f, uint32_t length, PortabilityLayer::MacFileProperties &mfp)
|
||||
{
|
||||
struct ASMacInfo
|
||||
{
|
||||
uint8_t m_filler[3];
|
||||
uint8_t m_protected;
|
||||
};
|
||||
|
||||
ASMacInfo macInfo;
|
||||
if (length < sizeof(macInfo))
|
||||
{
|
||||
fprintf(stderr, "File dates block was truncated");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fread(&macInfo, 1, sizeof(macInfo), f) != sizeof(macInfo))
|
||||
{
|
||||
fprintf(stderr, "Failed to read file dates");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mfp.m_protected = macInfo.m_protected;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ProcessFile(FILE *f, const char *outPath, PortabilityLayer::CombinedTimestamp ts, bool isDouble)
|
||||
{
|
||||
struct ASHeader
|
||||
{
|
||||
BEUInt32_t m_version;
|
||||
uint8_t m_filler[16];
|
||||
BEUInt16_t m_numEntries;
|
||||
};
|
||||
|
||||
struct ASEntry
|
||||
{
|
||||
BEUInt32_t m_entryID;
|
||||
BEUInt32_t m_offset;
|
||||
BEUInt32_t m_length;
|
||||
};
|
||||
|
||||
ASHeader header;
|
||||
if (fread(&header, 1, sizeof(header), f) != sizeof(header))
|
||||
{
|
||||
fprintf(stderr, "Failed to read header");
|
||||
return -1;
|
||||
}
|
||||
|
||||
const uint32_t numEntries = header.m_numEntries;
|
||||
|
||||
if (numEntries > 0xffff)
|
||||
{
|
||||
fprintf(stderr, "Too many entries");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (numEntries == 0)
|
||||
return 0;
|
||||
|
||||
std::vector<ASEntry> entries;
|
||||
entries.resize(static_cast<uint32_t>(numEntries));
|
||||
|
||||
PortabilityLayer::MacFileProperties mfp;
|
||||
|
||||
if (fread(&entries[0], 1, sizeof(ASEntry) * numEntries, f) != sizeof(ASEntry) * numEntries)
|
||||
{
|
||||
fprintf(stderr, "Failed to read entries");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (const ASEntry &asEntry : entries)
|
||||
{
|
||||
int fseekResult = fseek(f, asEntry.m_offset, SEEK_SET);
|
||||
if (fseekResult != 0)
|
||||
return fseekResult;
|
||||
|
||||
int rc = 0;
|
||||
switch (static_cast<uint32_t>(asEntry.m_entryID))
|
||||
{
|
||||
case 1:
|
||||
if (asEntry.m_length > 0)
|
||||
rc = ProcessFork(f, asEntry.m_length, outPath, ".gpd");
|
||||
break;
|
||||
case 2:
|
||||
if (asEntry.m_length > 0)
|
||||
rc = ProcessFork(f, asEntry.m_length, outPath, ".gpr");
|
||||
break;
|
||||
case 4:
|
||||
if (asEntry.m_length > 0)
|
||||
rc = ProcessFork(f, asEntry.m_length, outPath, ".gpc");
|
||||
break;
|
||||
case 8:
|
||||
rc = ProcessFileDatesInfo(f, asEntry.m_length, mfp, ts);
|
||||
break;
|
||||
case 9:
|
||||
rc = ProcessFinderInfo(f, asEntry.m_length, mfp);
|
||||
break;
|
||||
case 10:
|
||||
rc = ProcessMacintoshFileInfo(f, asEntry.m_length, mfp);
|
||||
break;
|
||||
case 3: // Real name
|
||||
case 5: // B&W icon
|
||||
case 6: // Color icon
|
||||
case 11: // ProDOS file info
|
||||
case 12: // MS-DOS file info
|
||||
case 13: // AFP short name
|
||||
case 14: // AFP file info
|
||||
case 15: // AFP directory ID
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unknown entry type %i", static_cast<int>(static_cast<uint32_t>(asEntry.m_entryID)));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
}
|
||||
|
||||
PortabilityLayer::MacFilePropertiesSerialized mfps;
|
||||
mfps.Serialize(mfp);
|
||||
|
||||
std::string gpfPath = std::string(outPath) + ".gpf";
|
||||
|
||||
FILE *gpfFile = fopen_utf8(gpfPath.c_str(), "wb");
|
||||
if (!gpfFile)
|
||||
{
|
||||
fprintf(stderr, "Failed to open output gpf");
|
||||
return -1;
|
||||
}
|
||||
|
||||
PortabilityLayer::CFileStream gpfStream(gpfFile);
|
||||
mfps.WriteAsPackage(gpfStream, ts);
|
||||
|
||||
gpfStream.Close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int toolMain(int argc, const char **argv)
|
||||
{
|
||||
BEUInt32_t magic;
|
||||
|
||||
if (argc != 4)
|
||||
{
|
||||
fprintf(stderr, "Usage: ASADTool <input> <timestamp.ts> <output>");
|
||||
return -1;
|
||||
}
|
||||
|
||||
PortabilityLayer::CombinedTimestamp ts;
|
||||
FILE *tsFile = fopen_utf8(argv[2], "rb");
|
||||
if (!tsFile)
|
||||
{
|
||||
fprintf(stderr, "Could not open timestamp file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fread(&ts, 1, sizeof(ts), tsFile) != sizeof(ts))
|
||||
{
|
||||
fprintf(stderr, "Could not read timestamp file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fclose(tsFile);
|
||||
|
||||
FILE *asadFile = fopen_utf8(argv[1], "rb");
|
||||
if (!asadFile)
|
||||
{
|
||||
fprintf(stderr, "Could not open input file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fread(&magic, 1, 4, asadFile) != 4)
|
||||
{
|
||||
fprintf(stderr, "Could not read file magic");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int returnCode = 0;
|
||||
if (magic == 0x00051607)
|
||||
returnCode = ProcessFile(asadFile, argv[3], ts, true);
|
||||
else if (magic == 0x00051600)
|
||||
returnCode = ProcessFile(asadFile, argv[3], ts, false);
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Unknown file type %x", static_cast<int>(magic));
|
||||
return -1;
|
||||
}
|
||||
|
||||
fclose(asadFile);
|
||||
|
||||
return returnCode;
|
||||
}
|
96
ASADTool/ASADTool.vcxproj
Normal file
96
ASADTool/ASADTool.vcxproj
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{DF692F94-3A11-40E1-8846-9815B4DBBDB0}</ProjectGuid>
|
||||
<RootNamespace>ASADTool</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Debug.props" />
|
||||
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||
<Import Project="..\PortabilityLayer.props" />
|
||||
<Import Project="..\GpCommon.props" />
|
||||
<Import Project="..\Common.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Release.props" />
|
||||
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||
<Import Project="..\PortabilityLayer.props" />
|
||||
<Import Project="..\GpCommon.props" />
|
||||
<Import Project="..\Common.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PortabilityLayer\PortabilityLayer.vcxproj">
|
||||
<Project>{6ec62b0f-9353-40a4-a510-3788f1368b33}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WindowsUnicodeToolShim\WindowsUnicodeToolShim.vcxproj">
|
||||
<Project>{15009625-1120-405e-8bba-69a16cd6713d}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ASADTool.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
22
ASADTool/ASADTool.vcxproj.filters
Normal file
22
ASADTool/ASADTool.vcxproj.filters
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ASADTool.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -71,6 +71,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin2h", "bin2h\bin2h.vcxpro
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HouseTool", "HouseTool\HouseTool.vcxproj", "{B31BFF9D-2D14-4B1A-A625-8348CC3D8D67}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASADTool", "ASADTool\ASADTool.vcxproj", "{DF692F94-3A11-40E1-8846-9815B4DBBDB0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@@ -195,6 +197,10 @@ Global
|
||||
{B31BFF9D-2D14-4B1A-A625-8348CC3D8D67}.Debug|x64.Build.0 = Debug|x64
|
||||
{B31BFF9D-2D14-4B1A-A625-8348CC3D8D67}.Release|x64.ActiveCfg = Release|x64
|
||||
{B31BFF9D-2D14-4B1A-A625-8348CC3D8D67}.Release|x64.Build.0 = Release|x64
|
||||
{DF692F94-3A11-40E1-8846-9815B4DBBDB0}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DF692F94-3A11-40E1-8846-9815B4DBBDB0}.Debug|x64.Build.0 = Debug|x64
|
||||
{DF692F94-3A11-40E1-8846-9815B4DBBDB0}.Release|x64.ActiveCfg = Release|x64
|
||||
{DF692F94-3A11-40E1-8846-9815B4DBBDB0}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{0E383EF0-CEF7-4733-87C6-5AC9844AA1EF}</ProjectGuid>
|
||||
<RootNamespace>Aerofoil</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -260,7 +260,7 @@ GpIOStream *GpFileSystem_Win32::OpenFileNested(PortabilityLayer::VirtualDirector
|
||||
wchar_t winPath[MAX_PATH + 1];
|
||||
|
||||
if (!ResolvePath(virtualDirectory, paths, numPaths, winPath))
|
||||
return false;
|
||||
return nullptr;
|
||||
|
||||
const DWORD desiredAccess = writeAccess ? (GENERIC_WRITE | GENERIC_READ) : GENERIC_READ;
|
||||
DWORD winCreationDisposition = 0;
|
||||
@@ -283,12 +283,12 @@ GpIOStream *GpFileSystem_Win32::OpenFileNested(PortabilityLayer::VirtualDirector
|
||||
winCreationDisposition = TRUNCATE_EXISTING;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
HANDLE h = CreateFileW(winPath, desiredAccess, FILE_SHARE_READ, nullptr, winCreationDisposition, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
return nullptr;
|
||||
|
||||
return GpFileStream_Win32::Create(m_alloc, h, true, writeAccess, true);
|
||||
}
|
||||
|
@@ -8,15 +8,15 @@ else {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
compileSdkVersion 30
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "org.thecodedeposit.aerofoil"
|
||||
}
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 15
|
||||
versionName "1.1.1"
|
||||
targetSdkVersion 30
|
||||
versionCode 17
|
||||
versionName "1.1.3"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-16"
|
||||
|
@@ -26,6 +26,7 @@ GpAndroidGlobals g_gpAndroidGlobals;
|
||||
|
||||
IGpDisplayDriver *GpDriver_CreateDisplayDriver_SDL_GL2(const GpDisplayDriverProperties &properties);
|
||||
IGpAudioDriver *GpDriver_CreateAudioDriver_SDL(const GpAudioDriverProperties &properties);
|
||||
IGpInputDriver *GpDriver_CreateInputDriver_SDL2_Gamepad(const GpInputDriverProperties &properties);
|
||||
|
||||
class GpLogDriver_Android final : public IGpLogDriver
|
||||
{
|
||||
@@ -75,7 +76,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_INFO);
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0)
|
||||
return -1;
|
||||
|
||||
SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
|
||||
@@ -94,8 +95,13 @@ int main(int argc, char* argv[])
|
||||
|
||||
g_gpGlobalConfig.m_fontHandlerType = EGpFontHandlerType_None;
|
||||
|
||||
g_gpGlobalConfig.m_inputDriverTypes = nullptr;
|
||||
g_gpGlobalConfig.m_numInputDrivers = 0;
|
||||
EGpInputDriverType inputDrivers[] =
|
||||
{
|
||||
EGpInputDriverType_SDL2_Gamepad
|
||||
};
|
||||
|
||||
g_gpGlobalConfig.m_inputDriverTypes = inputDrivers;
|
||||
g_gpGlobalConfig.m_numInputDrivers = sizeof(inputDrivers) / sizeof(inputDrivers[0]);
|
||||
|
||||
g_gpGlobalConfig.m_osGlobals = &g_gpAndroidGlobals;
|
||||
g_gpGlobalConfig.m_logger = GpLogDriver_Android::GetInstance();
|
||||
@@ -104,6 +110,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
GpDisplayDriverFactory::RegisterDisplayDriverFactory(EGpDisplayDriverType_SDL_GL2, GpDriver_CreateDisplayDriver_SDL_GL2);
|
||||
GpAudioDriverFactory::RegisterAudioDriverFactory(EGpAudioDriverType_SDL2, GpDriver_CreateAudioDriver_SDL);
|
||||
GpInputDriverFactory::RegisterInputDriverFactory(EGpInputDriverType_SDL2_Gamepad, GpDriver_CreateInputDriver_SDL2_Gamepad);
|
||||
|
||||
int returnCode = GpMain::Run();
|
||||
|
||||
@@ -118,8 +125,3 @@ int main(int argc, char* argv[])
|
||||
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
IGpInputDriverSDLGamepad *IGpInputDriverSDLGamepad::GetInstance()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@@ -7,8 +7,14 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4A04C5AC269AD58E009F5CA3 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4A04C59D269AD58E009F5CA3 /* MainMenu.xib */; };
|
||||
4A04C5AF269AD600009F5CA3 /* AerofoilAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A04C5AE269AD600009F5CA3 /* AerofoilAppDelegate.mm */; };
|
||||
4A04C5B6269AE945009F5CA3 /* AerofoilApplication.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A04C5B5269AE945009F5CA3 /* AerofoilApplication.mm */; };
|
||||
4A04C5B7269AE96B009F5CA3 /* MacInit.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A04C5B0269AE243009F5CA3 /* MacInit.mm */; };
|
||||
4A2818FE26BBDD35005A36C0 /* CompositeRenderedFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2818EF26BBDD35005A36C0 /* CompositeRenderedFont.cpp */; };
|
||||
4A2818FF26BBDD35005A36C0 /* CompositeRenderedFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A2818FD26BBDD35005A36C0 /* CompositeRenderedFont.h */; };
|
||||
4AA1EB5C26BF9556001D8CC6 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AA1EB4D26BF9399001D8CC6 /* Cocoa.framework */; };
|
||||
5C54D0A02629B42400AB55E0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C54D09F2629B42400AB55E0 /* Assets.xcassets */; };
|
||||
5C54D0A32629B42400AB55E0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5C54D0A12629B42400AB55E0 /* Main.storyboard */; };
|
||||
5C54D0BE2629B72000AB55E0 /* stb_image_write.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C54D0BC2629B72000AB55E0 /* stb_image_write.h */; };
|
||||
5C54D0BF2629B72000AB55E0 /* stb_image_write.c in Sources */ = {isa = PBXBuildFile; fileRef = 5C54D0BD2629B72000AB55E0 /* stb_image_write.c */; };
|
||||
5C54D26D2629B86700AB55E0 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 5C54D25E2629B86600AB55E0 /* adler32.c */; };
|
||||
@@ -589,9 +595,18 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4A04C59E269AD58E009F5CA3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4A04C5AD269AD600009F5CA3 /* AerofoilAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AerofoilAppDelegate.h; sourceTree = "<group>"; };
|
||||
4A04C5AE269AD600009F5CA3 /* AerofoilAppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AerofoilAppDelegate.mm; sourceTree = "<group>"; usesTabs = 1; };
|
||||
4A04C5B0269AE243009F5CA3 /* MacInit.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MacInit.mm; sourceTree = "<group>"; };
|
||||
4A04C5B2269AE368009F5CA3 /* MacInit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MacInit.h; sourceTree = "<group>"; };
|
||||
4A04C5B4269AE945009F5CA3 /* AerofoilApplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AerofoilApplication.h; sourceTree = "<group>"; };
|
||||
4A2818EF26BBDD35005A36C0 /* CompositeRenderedFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompositeRenderedFont.cpp; path = CompositeRenderedFont.cpp; sourceTree = "<group>"; };
|
||||
4A2818FD26BBDD35005A36C0 /* CompositeRenderedFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompositeRenderedFont.h; path = CompositeRenderedFont.h; sourceTree = "<group>"; };
|
||||
4A04C5B5269AE945009F5CA3 /* AerofoilApplication.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AerofoilApplication.mm; sourceTree = "<group>"; };
|
||||
4AA1EB4D26BF9399001D8CC6 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
5C54D0962629B42100AB55E0 /* Aerofoil.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Aerofoil.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5C54D09F2629B42400AB55E0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
5C54D0A22629B42400AB55E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
5C54D0A42629B42400AB55E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5C54D0A72629B42400AB55E0 /* AerofoilMac.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AerofoilMac.entitlements; sourceTree = "<group>"; };
|
||||
5C54D0B32629B5C600AB55E0 /* libAerofoilShared.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAerofoilShared.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -1019,6 +1034,7 @@
|
||||
files = (
|
||||
5C54D636262D7E4800AB55E0 /* SDL2.framework in Frameworks */,
|
||||
5C54D635262D7E4100AB55E0 /* libAerofoilShared.a in Frameworks */,
|
||||
4AA1EB5C26BF9556001D8CC6 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1042,6 +1058,7 @@
|
||||
5C54D687262D8AC400AB55E0 /* Resources */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
usesTabs = 1;
|
||||
};
|
||||
5C54D0972629B42100AB55E0 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -1064,10 +1081,16 @@
|
||||
5C54D656262D84A800AB55E0 /* GpLogDriver_X.cpp */,
|
||||
5C54D659262D84A900AB55E0 /* GpLogDriver_X.h */,
|
||||
5C54D654262D84A800AB55E0 /* GpMain_SDL_X.cpp */,
|
||||
4A04C5B0269AE243009F5CA3 /* MacInit.mm */,
|
||||
4A04C5B2269AE368009F5CA3 /* MacInit.h */,
|
||||
5C54D655262D84A800AB55E0 /* GpSystemServices_X.cpp */,
|
||||
5C54D658262D84A900AB55E0 /* GpSystemServices_X.h */,
|
||||
5C54D0A42629B42400AB55E0 /* Info.plist */,
|
||||
5C54D0A12629B42400AB55E0 /* Main.storyboard */,
|
||||
4A04C59D269AD58E009F5CA3 /* MainMenu.xib */,
|
||||
4A04C5B4269AE945009F5CA3 /* AerofoilApplication.h */,
|
||||
4A04C5B5269AE945009F5CA3 /* AerofoilApplication.mm */,
|
||||
4A04C5AD269AD600009F5CA3 /* AerofoilAppDelegate.h */,
|
||||
4A04C5AE269AD600009F5CA3 /* AerofoilAppDelegate.mm */,
|
||||
);
|
||||
path = AerofoilMac;
|
||||
sourceTree = "<group>";
|
||||
@@ -1150,6 +1173,8 @@
|
||||
5C54D2B12629BC6800AB55E0 /* CFileStream.cpp */,
|
||||
5C54D2AE2629BC6800AB55E0 /* CFileStream.h */,
|
||||
5C54D2B52629BC6800AB55E0 /* CombinedTimestamp.h */,
|
||||
4A2818EF26BBDD35005A36C0 /* CompositeRenderedFont.cpp */,
|
||||
4A2818FD26BBDD35005A36C0 /* CompositeRenderedFont.h */,
|
||||
5C54D2FC2629BC6800AB55E0 /* DataTypes.h */,
|
||||
5C54D2D62629BC6800AB55E0 /* DeflateCodec.cpp */,
|
||||
5C54D2EB2629BC6800AB55E0 /* DeflateCodec.h */,
|
||||
@@ -1490,6 +1515,7 @@
|
||||
5C54D5D5262D746E00AB55E0 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4AA1EB4D26BF9399001D8CC6 /* Cocoa.framework */,
|
||||
5C54D5D6262D759500AB55E0 /* SDL.xcodeproj */,
|
||||
);
|
||||
name = Frameworks;
|
||||
@@ -1614,6 +1640,7 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4A2818FF26BBDD35005A36C0 /* CompositeRenderedFont.h in Headers */,
|
||||
5C54D44B2629BC6D00AB55E0 /* FontFamilyID.h in Headers */,
|
||||
5CB787212639D1D800D8FDB6 /* GpAllocator_C.h in Headers */,
|
||||
5C54D38C2629BC6A00AB55E0 /* EllipsePlotter.h in Headers */,
|
||||
@@ -1980,7 +2007,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5C54D0A02629B42400AB55E0 /* Assets.xcassets in Resources */,
|
||||
5C54D0A32629B42400AB55E0 /* Main.storyboard in Resources */,
|
||||
4A04C5AC269AD58E009F5CA3 /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1996,8 +2023,10 @@
|
||||
5C54D67A262D889D00AB55E0 /* DrawQuad32P.cpp in Sources */,
|
||||
5C54D67B262D889D00AB55E0 /* CopyQuadP.cpp in Sources */,
|
||||
5C54D669262D886900AB55E0 /* GpThreadEvent_Cpp11.cpp in Sources */,
|
||||
4A04C5B6269AE945009F5CA3 /* AerofoilApplication.mm in Sources */,
|
||||
5C54D65B262D84A900AB55E0 /* GpMain_SDL_X.cpp in Sources */,
|
||||
5C54D67C262D889E00AB55E0 /* DrawQuadPaletteP.cpp in Sources */,
|
||||
4A04C5B7269AE96B009F5CA3 /* MacInit.mm in Sources */,
|
||||
5C54D679262D889D00AB55E0 /* GpDisplayDriver_SDL_GL2.cpp in Sources */,
|
||||
5C54D67F262D889E00AB55E0 /* GpAudioDriver_SDL2.cpp in Sources */,
|
||||
5C54D668262D886900AB55E0 /* GpSystemServices_POSIX.cpp in Sources */,
|
||||
@@ -2005,6 +2034,7 @@
|
||||
5C54D65C262D84A900AB55E0 /* GpSystemServices_X.cpp in Sources */,
|
||||
5C54D67D262D889E00AB55E0 /* ScaleQuadP.cpp in Sources */,
|
||||
5C54D678262D889D00AB55E0 /* GpInputDriver_SDL_Gamepad.cpp in Sources */,
|
||||
4A04C5AF269AD600009F5CA3 /* AerofoilAppDelegate.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -2183,6 +2213,7 @@
|
||||
5C54D4282629BC6C00AB55E0 /* RandomNumberGenerator.cpp in Sources */,
|
||||
5C54D550262B3C2E00AB55E0 /* DynamicMaps.cpp in Sources */,
|
||||
5C54D4502629BC6D00AB55E0 /* PLButtonWidget.cpp in Sources */,
|
||||
4A2818FE26BBDD35005A36C0 /* CompositeRenderedFont.cpp in Sources */,
|
||||
5C54D568262B3C2E00AB55E0 /* Scoreboard.cpp in Sources */,
|
||||
5C54D596262B3C2F00AB55E0 /* Link.cpp in Sources */,
|
||||
);
|
||||
@@ -2199,12 +2230,12 @@
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
5C54D0A12629B42400AB55E0 /* Main.storyboard */ = {
|
||||
4A04C59D269AD58E009F5CA3 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
5C54D0A22629B42400AB55E0 /* Base */,
|
||||
4A04C59E269AD58E009F5CA3 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
@@ -2348,7 +2379,6 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.madthijs.AerofoilMac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -2382,7 +2412,6 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.madthijs.AerofoilMac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
|
9
AerofoilMac/AerofoilMac/AerofoilAppDelegate.h
Normal file
9
AerofoilMac/AerofoilMac/AerofoilAppDelegate.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AerofoilAppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
43
AerofoilMac/AerofoilMac/AerofoilAppDelegate.mm
Normal file
43
AerofoilMac/AerofoilMac/AerofoilAppDelegate.mm
Normal file
@@ -0,0 +1,43 @@
|
||||
#import "AerofoilAppDelegate.h"
|
||||
#import "AerofoilApplication.h"
|
||||
#include "WindowManager.h"
|
||||
#include "GliderDefines.h" // kPlayMode
|
||||
|
||||
extern short theMode;
|
||||
|
||||
@interface AerofoilAppDelegate ()
|
||||
|
||||
@property (weak) IBOutlet NSMenuItem *aboutAerofoilMenuItem;
|
||||
@property (weak) IBOutlet NSMenuItem *aboutGliderPROMenuItem;
|
||||
@property (weak) IBOutlet NSMenuItem *preferencesMenuItem;
|
||||
|
||||
@end
|
||||
|
||||
@implementation AerofoilAppDelegate
|
||||
|
||||
- (IBAction)showAboutAerofoil:(id)sender {
|
||||
[NSApp sendMenuItemEvent:GpMenuItemSelectionEvents::kAboutAerofoil];
|
||||
}
|
||||
- (IBAction)showAboutGliderPRO:(id)sender {
|
||||
[NSApp sendMenuItemEvent:GpMenuItemSelectionEvents::kAboutGliderPRO];
|
||||
}
|
||||
- (IBAction)showPreferences:(id)sender {
|
||||
[NSApp sendMenuItemEvent:GpMenuItemSelectionEvents::kPreferences];
|
||||
}
|
||||
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
|
||||
if (menuItem == _aboutAerofoilMenuItem || menuItem == _aboutGliderPROMenuItem) {
|
||||
return ![self menuItemsDisabled];
|
||||
} else if (menuItem == _preferencesMenuItem) {
|
||||
return ![self menuItemsDisabled];
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)menuItemsDisabled {
|
||||
PortabilityLayer::WindowManager* wm = PortabilityLayer::WindowManager::GetInstance();
|
||||
return theMode == kPlayMode || wm->IsExclusiveWindowVisible();
|
||||
}
|
||||
|
||||
@end
|
12
AerofoilMac/AerofoilMac/AerofoilApplication.h
Normal file
12
AerofoilMac/AerofoilMac/AerofoilApplication.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include "GpVOSEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AerofoilApplication : NSApplication
|
||||
|
||||
- (void)sendMenuItemEvent:(GpMenuItemSelectionEvent_t)itemEvent;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
28
AerofoilMac/AerofoilMac/AerofoilApplication.mm
Normal file
28
AerofoilMac/AerofoilMac/AerofoilApplication.mm
Normal file
@@ -0,0 +1,28 @@
|
||||
#import "AerofoilApplication.h"
|
||||
#include "IGpVOSEventQueue.h"
|
||||
#include "GpAppInterface.h"
|
||||
#include "SDL.h"
|
||||
|
||||
@implementation AerofoilApplication
|
||||
|
||||
- (void)terminate:(id)sender {
|
||||
SDL_Event event;
|
||||
event.quit.type = SDL_QUIT;
|
||||
event.quit.timestamp = SDL_GetTicks();
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
- (void)sendMenuItemEvent:(GpMenuItemSelectionEvent_t)itemEvent {
|
||||
GpVOSEvent event;
|
||||
event.m_eventType = GpVOSEventTypes::kMenuItemSelected;
|
||||
event.m_event.m_menuItemSelectionEvent = itemEvent;
|
||||
[self sendVOSEvent:event];
|
||||
}
|
||||
|
||||
- (void)sendVOSEvent:(GpVOSEvent)event {
|
||||
IGpVOSEventQueue* queue = GpAppInterface_Get()->PL_GetDriverCollection()->GetDriver<GpDriverIDs::kEventQueue>();
|
||||
if (GpVOSEvent *evt = queue->QueueEvent())
|
||||
*evt = event;
|
||||
}
|
||||
|
||||
@end
|
@@ -1,717 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11134" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
<scene sceneID="JPo-4y-FX3">
|
||||
<objects>
|
||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="AerofoilMac" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="AerofoilMac" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About AerofoilMac" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide AerofoilMac" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit AerofoilMac" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="AerofoilMac Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
|
||||
</connections>
|
||||
</application>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider=""/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="0.0"/>
|
||||
</scene>
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="R2V-B0-nI4">
|
||||
<objects>
|
||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="250"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
|
||||
<view key="view" id="m2S-Jp-Qdl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="655"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
126
AerofoilMac/AerofoilMac/Base.lproj/MainMenu.xib
Normal file
126
AerofoilMac/AerofoilMac/Base.lproj/MainMenu.xib
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19115.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19115.3"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Rej-MO-9Vm" id="Gxm-Yh-n2y"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="SDLApplication"/>
|
||||
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="Aerofoil" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Aerofoil" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About Aerofoil" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="showAboutAerofoil:" target="Rej-MO-9Vm" id="bhL-jn-Mnf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="About Glider PRO" id="s5u-0T-8m0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="showAboutGliderPRO:" target="Rej-MO-9Vm" id="GmM-Kv-7Zh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW">
|
||||
<connections>
|
||||
<action selector="showPreferences:" target="Rej-MO-9Vm" id="eLk-ZW-NLG"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide Aerofoil" id="Olw-nP-bQN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit Aerofoil" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="Kyh-0n-SY2">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="-1" id="wEJ-jN-ABr"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="Aerofoil Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
<point key="canvasLocation" x="139" y="154"/>
|
||||
</menu>
|
||||
<customObject id="Rej-MO-9Vm" customClass="AerofoilAppDelegate">
|
||||
<connections>
|
||||
<outlet property="aboutAerofoilMenuItem" destination="5kV-Vb-QxS" id="Cd2-zP-auq"/>
|
||||
<outlet property="aboutGliderPROMenuItem" destination="s5u-0T-8m0" id="gQV-eb-cs2"/>
|
||||
<outlet property="preferencesMenuItem" destination="BOF-NM-1cW" id="oG4-1W-R0t"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
</objects>
|
||||
</document>
|
@@ -24,8 +24,8 @@
|
||||
<string>public.app-category.arcade-games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
3
AerofoilMac/AerofoilMac/MacInit.h
Normal file
3
AerofoilMac/AerofoilMac/MacInit.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
int MacInit(void);
|
22
AerofoilMac/AerofoilMac/MacInit.mm
Normal file
22
AerofoilMac/AerofoilMac/MacInit.mm
Normal file
@@ -0,0 +1,22 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "AerofoilApplication.h"
|
||||
#import "AerofoilAppDelegate.h"
|
||||
#import "MacInit.h"
|
||||
#include "SDL.h"
|
||||
|
||||
int MacInit(void) {
|
||||
// Instantiate NSApp and its delegate first, so SDL chooses those over its own implementation.
|
||||
[AerofoilApplication sharedApplication];
|
||||
[[NSBundle mainBundle] loadNibNamed:@"MainMenu" owner:NSApp topLevelObjects:nil];
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0)
|
||||
return -1;
|
||||
|
||||
// Gracefully activate app.
|
||||
//
|
||||
// (SDL forcefully does this via [NSApp activateIgnoringOtherApps:YES],
|
||||
// which isn't consistent with normal Mac apps).
|
||||
[NSApp finishLaunching];
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
#include "GpThreadEvent_Cpp11.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
GpThreadEvent_Cpp11::GpThreadEvent_Cpp11(bool autoReset, bool startSignaled)
|
||||
: m_flag(startSignaled)
|
||||
, m_autoReset(autoReset)
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{33542FF0-0473-4802-BC79-3B8261790F65}</ProjectGuid>
|
||||
<RootNamespace>AerofoilSDL</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -20,6 +20,7 @@ LOCAL_CFLAGS := -DGP_DEBUG_CONFIG=0
|
||||
LOCAL_SRC_FILES := \
|
||||
GpAudioDriver_SDL2.cpp \
|
||||
GpDisplayDriver_SDL_GL2.cpp \
|
||||
GpInputDriver_SDL_Gamepad.cpp \
|
||||
ShaderCode/CopyQuadP.cpp \
|
||||
ShaderCode/DrawQuadPaletteP.cpp \
|
||||
ShaderCode/DrawQuad32P.cpp \
|
||||
|
@@ -1637,6 +1637,14 @@ static bool IdentifyVKey(const SDL_KeyboardEvent *keyEvt, GpKeyIDSubset_t &outSu
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SDLK_LGUI:
|
||||
outSubset = GpKeyIDSubsets::kSpecial;
|
||||
outKey.m_specialKey = GpKeySpecials::kLeftCommand;
|
||||
break;
|
||||
case SDLK_RGUI:
|
||||
outSubset = GpKeyIDSubsets::kSpecial;
|
||||
outKey.m_specialKey = GpKeySpecials::kRightCommand;
|
||||
break;
|
||||
case SDLK_LCTRL:
|
||||
outSubset = GpKeyIDSubsets::kSpecial;
|
||||
outKey.m_specialKey = GpKeySpecials::kLeftCtrl;
|
||||
|
@@ -177,8 +177,6 @@ void GpInputDriverSDLGamepad::HandleDeviceRemoved(SDL_JoystickID joystickID)
|
||||
{
|
||||
m_playerButtonDown[playerNum][button] = false;
|
||||
|
||||
|
||||
|
||||
GpVOSEvent evt;
|
||||
evt.m_eventType = GpVOSEventTypes::kKeyboardInput;
|
||||
evt.m_event.m_keyboardInputEvent.m_eventType = GpKeyboardInputEventTypes::kUp;
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "GpApplicationName.h"
|
||||
#include "GpIOStream.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <cstring>
|
||||
|
||||
|
@@ -20,6 +20,9 @@
|
||||
#include "IGpVOSEventQueue.h"
|
||||
|
||||
#include <string>
|
||||
#ifdef __MACOS__
|
||||
#include "MacInit.h"
|
||||
#endif
|
||||
|
||||
GpXGlobals g_gpXGlobals;
|
||||
|
||||
@@ -40,7 +43,11 @@ SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[])
|
||||
enableLogging = true;
|
||||
}
|
||||
|
||||
#ifndef __MACOS__
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0)
|
||||
#else
|
||||
if (MacInit())
|
||||
#endif
|
||||
return -1;
|
||||
|
||||
GpFileSystem_X::GetInstance()->Init();
|
||||
|
@@ -107,7 +107,11 @@ bool GpSystemServices_X::HasNativeFileManager() const
|
||||
|
||||
GpOperatingSystem_t GpSystemServices_X::GetOperatingSystem() const
|
||||
{
|
||||
#ifdef __MACOS__
|
||||
return GpOperatingSystems::kMacOS;
|
||||
#else
|
||||
return GpOperatingSystems::kLinux;
|
||||
#endif
|
||||
}
|
||||
|
||||
GpOperatingSystemFlavor_t GpSystemServices_X::GetOperatingSystemFlavor() const
|
||||
|
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"name" : "Okay",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 376, 288 ],
|
||||
"pos" : [ 376, 300 ],
|
||||
"size" : [ 58, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"name" : "Third Party/Licensing Info...",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 176, 288 ],
|
||||
"pos" : [ 176, 300 ],
|
||||
"size" : [ 190, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
|
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"name" : "Okay",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 438, 292 ],
|
||||
"pos" : [ 438, 316 ],
|
||||
"size" : [ 58, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"name" : "Export Source Code to ZIP Archive...",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 205, 292 ],
|
||||
"pos" : [ 205, 316 ],
|
||||
"size" : [ 226, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : false
|
||||
@@ -98,7 +98,7 @@
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "LIBICONV ©1999-2001, 2016 Free Software Foundation, Inc.",
|
||||
"name" : "Inter font ©2016-2019 Rasmus Andersson + Inter Project Authors",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 149 ],
|
||||
"size" : [ 406, 20 ],
|
||||
@@ -114,25 +114,9 @@
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "RapidJSON ©2015 THL A29 Limited, a Tencent company, and Milo Yip",
|
||||
"name" : "LIBICONV ©1999-2001, 2016 Free Software Foundation, Inc.",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 172 ],
|
||||
"size" : [ 406, 28 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "License...",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 430, 172 ],
|
||||
"size" : [ 66, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "zlib ©1995-2017 Jean-loup Gailly and Mark Adler",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 205 ],
|
||||
"pos" : [ 16, 173 ],
|
||||
"size" : [ 406, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
@@ -140,13 +124,29 @@
|
||||
{
|
||||
"name" : "License...",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 430, 200 ],
|
||||
"pos" : [ 430, 168 ],
|
||||
"size" : [ 66, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "FreeType ©2020 The FreeType Project",
|
||||
"name" : "RapidJSON ©2015 THL A29 Limited, a Tencent company, and Milo Yip",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 194 ],
|
||||
"size" : [ 406, 28 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "License...",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 430, 196 ],
|
||||
"size" : [ 66, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "zlib ©1995-2017 Jean-loup Gailly and Mark Adler",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 229 ],
|
||||
"size" : [ 406, 20 ],
|
||||
@@ -162,7 +162,7 @@
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "Simple DirectMedia Layer ©1997-2020 Sam Lantinga",
|
||||
"name" : "FreeType ©2020 The FreeType Project",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 253 ],
|
||||
"size" : [ 406, 20 ],
|
||||
@@ -176,6 +176,22 @@
|
||||
"size" : [ 66, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "Simple DirectMedia Layer ©1997-2020 Sam Lantinga",
|
||||
"itemType" : "Label",
|
||||
"pos" : [ 16, 277 ],
|
||||
"size" : [ 406, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "License...",
|
||||
"itemType" : "Button",
|
||||
"pos" : [ 430, 272 ],
|
||||
"size" : [ 66, 20 ],
|
||||
"id" : 1,
|
||||
"enabled" : true
|
||||
}
|
||||
]
|
||||
}
|
574
CMakeLists.txt
574
CMakeLists.txt
@@ -1,275 +1,299 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project (Aerofoil)
|
||||
SET(PLATFORM "X" CACHE STRING "Defines the target platform")
|
||||
SET(EXECNAME "AerofoilX" CACHE STRING "Defines the exec name")
|
||||
|
||||
message(${CMAKE_BINARY_DIR})
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
if(PLATFORM STREQUAL "MAC")
|
||||
SET(EXECNAME "AerofoilMac" CACHE STRING "Defines the exec name" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
add_definitions(-D__MACOS__)
|
||||
endif()
|
||||
|
||||
message("Building ${EXECNAME} for: ${PLATFORM}")
|
||||
|
||||
add_definitions(-DGP_DEBUG_CONFIG=0)
|
||||
add_definitions(-DNDEBUG=1)
|
||||
|
||||
|
||||
add_library(stb STATIC
|
||||
stb/stb_image_write.c
|
||||
)
|
||||
|
||||
add_library(zlib STATIC
|
||||
zlib/adler32.c
|
||||
zlib/crc32.c
|
||||
zlib/deflate.c
|
||||
zlib/inffast.c
|
||||
zlib/inflate.c
|
||||
zlib/inftrees.c
|
||||
zlib/trees.c
|
||||
zlib/zutil.c
|
||||
)
|
||||
|
||||
add_library(MacRomanConversion STATIC
|
||||
MacRomanConversion/MacRomanConversion.cpp
|
||||
)
|
||||
|
||||
add_library(PortabilityLayer STATIC
|
||||
PortabilityLayer/AntiAliasTable.cpp
|
||||
PortabilityLayer/AppEventHandler.cpp
|
||||
PortabilityLayer/BinHex4.cpp
|
||||
PortabilityLayer/BitmapImage.cpp
|
||||
PortabilityLayer/ByteSwap.cpp
|
||||
PortabilityLayer/CFileStream.cpp
|
||||
PortabilityLayer/DeflateCodec.cpp
|
||||
PortabilityLayer/DialogManager.cpp
|
||||
PortabilityLayer/DisplayDeviceManager.cpp
|
||||
PortabilityLayer/EllipsePlotter.cpp
|
||||
PortabilityLayer/FileBrowserUI.cpp
|
||||
PortabilityLayer/FileManager.cpp
|
||||
PortabilityLayer/FileSectionStream.cpp
|
||||
PortabilityLayer/FontFamily.cpp
|
||||
PortabilityLayer/FontManager.cpp
|
||||
PortabilityLayer/FontRenderer.cpp
|
||||
PortabilityLayer/GPArchive.cpp
|
||||
PortabilityLayer/HostSuspendHook.cpp
|
||||
PortabilityLayer/IconLoader.cpp
|
||||
PortabilityLayer/InflateStream.cpp
|
||||
PortabilityLayer/InputManager.cpp
|
||||
PortabilityLayer/LinePlotter.cpp
|
||||
PortabilityLayer/MacBinary2.cpp
|
||||
PortabilityLayer/MacFileInfo.cpp
|
||||
PortabilityLayer/MacFileMem.cpp
|
||||
PortabilityLayer/MemoryManager.cpp
|
||||
PortabilityLayer/MemReaderStream.cpp
|
||||
PortabilityLayer/MenuManager.cpp
|
||||
PortabilityLayer/MMHandleBlock.cpp
|
||||
PortabilityLayer/PLApplication.cpp
|
||||
PortabilityLayer/PLButtonWidget.cpp
|
||||
PortabilityLayer/PLControlDefinitions.cpp
|
||||
PortabilityLayer/PLCore.cpp
|
||||
PortabilityLayer/PLCTabReducer.cpp
|
||||
PortabilityLayer/PLDialogs.cpp
|
||||
PortabilityLayer/PLDrivers.cpp
|
||||
PortabilityLayer/PLEditboxWidget.cpp
|
||||
PortabilityLayer/PLEventQueue.cpp
|
||||
PortabilityLayer/PLHacks.cpp
|
||||
PortabilityLayer/PLHandle.cpp
|
||||
PortabilityLayer/PLIconWidget.cpp
|
||||
PortabilityLayer/PLImageWidget.cpp
|
||||
PortabilityLayer/PLInvisibleWidget.cpp
|
||||
PortabilityLayer/PLKeyEncoding.cpp
|
||||
PortabilityLayer/PLLabelWidget.cpp
|
||||
PortabilityLayer/PLMenus.cpp
|
||||
PortabilityLayer/PLMovies.cpp
|
||||
PortabilityLayer/PLNumberFormatting.cpp
|
||||
PortabilityLayer/PLPopupMenuWidget.cpp
|
||||
PortabilityLayer/PLQDOffscreen.cpp
|
||||
PortabilityLayer/PLQDraw.cpp
|
||||
PortabilityLayer/PLResourceManager.cpp
|
||||
PortabilityLayer/PLResources.cpp
|
||||
PortabilityLayer/PLScrollBarWidget.cpp
|
||||
PortabilityLayer/PLSound.cpp
|
||||
PortabilityLayer/PLStandardColors.cpp
|
||||
PortabilityLayer/PLStringCompare.cpp
|
||||
PortabilityLayer/PLSysCalls.cpp
|
||||
PortabilityLayer/PLTimeTaggedVOSEvent.cpp
|
||||
PortabilityLayer/PLWidgets.cpp
|
||||
PortabilityLayer/QDGraf.cpp
|
||||
PortabilityLayer/QDManager.cpp
|
||||
PortabilityLayer/QDPictDecoder.cpp
|
||||
PortabilityLayer/QDPictEmitContext.cpp
|
||||
PortabilityLayer/QDPictHeader.cpp
|
||||
PortabilityLayer/QDPixMap.cpp
|
||||
PortabilityLayer/QDPort.cpp
|
||||
PortabilityLayer/QDStandardPalette.cpp
|
||||
PortabilityLayer/RandomNumberGenerator.cpp
|
||||
PortabilityLayer/ResolveCachingColor.cpp
|
||||
PortabilityLayer/ResourceCompiledRef.cpp
|
||||
PortabilityLayer/ResourceFile.cpp
|
||||
PortabilityLayer/ScanlineMask.cpp
|
||||
PortabilityLayer/ScanlineMaskBuilder.cpp
|
||||
PortabilityLayer/ScanlineMaskConverter.cpp
|
||||
PortabilityLayer/ScanlineMaskIterator.cpp
|
||||
PortabilityLayer/SimpleGraphic.cpp
|
||||
PortabilityLayer/TextPlacer.cpp
|
||||
PortabilityLayer/UTF8.cpp
|
||||
PortabilityLayer/WindowDef.cpp
|
||||
PortabilityLayer/WindowManager.cpp
|
||||
PortabilityLayer/WorkerThread.cpp
|
||||
PortabilityLayer/XModemCRC.cpp
|
||||
PortabilityLayer/ZipFileProxy.cpp
|
||||
)
|
||||
|
||||
target_include_directories(PortabilityLayer PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/zlib>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MacRomanConversion>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/stb>
|
||||
)
|
||||
|
||||
target_compile_options(PortabilityLayer PRIVATE -Wno-multichar)
|
||||
|
||||
target_link_libraries(PortabilityLayer zlib MacRomanConversion stb)
|
||||
|
||||
|
||||
add_library(GpShell STATIC
|
||||
GpShell/GpAppEnvironment.cpp
|
||||
GpShell/GpAudioDriverFactory.cpp
|
||||
GpShell/GpDisplayDriverFactory.cpp
|
||||
GpShell/GpFontHandlerFactory.cpp
|
||||
GpShell/GpGlobalConfig.cpp
|
||||
GpShell/GpInputDriverFactory.cpp
|
||||
GpShell/GpMain.cpp
|
||||
GpShell/GpVOSEventQueue.cpp
|
||||
)
|
||||
|
||||
target_include_directories(GpShell PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
)
|
||||
|
||||
add_library(GpApp STATIC
|
||||
GpApp/About.cpp
|
||||
GpApp/AnimCursor.cpp
|
||||
GpApp/AppleEvents.cpp
|
||||
GpApp/Banner.cpp
|
||||
GpApp/ColorUtils.cpp
|
||||
GpApp/Coordinates.cpp
|
||||
GpApp/DialogUtils.cpp
|
||||
GpApp/DynamicMaps.cpp
|
||||
GpApp/Dynamics.cpp
|
||||
GpApp/Dynamics2.cpp
|
||||
GpApp/Dynamics3.cpp
|
||||
GpApp/Environ.cpp
|
||||
GpApp/Events.cpp
|
||||
GpApp/FileError.cpp
|
||||
GpApp/GameOver.cpp
|
||||
GpApp/GpAppInterface.cpp
|
||||
GpApp/Grease.cpp
|
||||
GpApp/HighScores.cpp
|
||||
GpApp/House.cpp
|
||||
GpApp/HouseInfo.cpp
|
||||
GpApp/HouseIO.cpp
|
||||
GpApp/HouseLegal.cpp
|
||||
GpApp/Input.cpp
|
||||
GpApp/Interactions.cpp
|
||||
GpApp/InterfaceInit.cpp
|
||||
GpApp/Link.cpp
|
||||
GpApp/Main.cpp
|
||||
GpApp/MainMenuUI.cpp
|
||||
GpApp/MainWindow.cpp
|
||||
GpApp/Map.cpp
|
||||
GpApp/Marquee.cpp
|
||||
GpApp/Menu.cpp
|
||||
GpApp/Modes.cpp
|
||||
GpApp/Music.cpp
|
||||
GpApp/ObjectAdd.cpp
|
||||
GpApp/ObjectDraw.cpp
|
||||
GpApp/ObjectDraw2.cpp
|
||||
GpApp/ObjectDrawAll.cpp
|
||||
GpApp/ObjectEdit.cpp
|
||||
GpApp/ObjectInfo.cpp
|
||||
GpApp/ObjectRects.cpp
|
||||
GpApp/Objects.cpp
|
||||
GpApp/Play.cpp
|
||||
GpApp/Player.cpp
|
||||
GpApp/Prefs.cpp
|
||||
GpApp/RectUtils.cpp
|
||||
GpApp/Render.cpp
|
||||
GpApp/Room.cpp
|
||||
GpApp/RoomGraphics.cpp
|
||||
GpApp/RoomInfo.cpp
|
||||
GpApp/RubberBands.cpp
|
||||
GpApp/SavedGames.cpp
|
||||
GpApp/Scoreboard.cpp
|
||||
GpApp/Scrap.cpp
|
||||
GpApp/SelectHouse.cpp
|
||||
GpApp/Settings.cpp
|
||||
GpApp/Sound.cpp
|
||||
GpApp/SoundSync_Cpp11.cpp
|
||||
GpApp/SourceExport.cpp
|
||||
GpApp/StringUtils.cpp
|
||||
GpApp/StructuresInit.cpp
|
||||
GpApp/StructuresInit2.cpp
|
||||
GpApp/Tools.cpp
|
||||
GpApp/Transit.cpp
|
||||
GpApp/Transitions.cpp
|
||||
GpApp/Triggers.cpp
|
||||
GpApp/Trip.cpp
|
||||
GpApp/Utilities.cpp
|
||||
GpApp/WindowUtils.cpp
|
||||
)
|
||||
|
||||
target_compile_options(GpApp PRIVATE -Wno-multichar)
|
||||
|
||||
target_include_directories(GpApp PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
)
|
||||
|
||||
target_link_libraries(GpApp PortabilityLayer)
|
||||
|
||||
if(CMAKE_HOST_UNIX)
|
||||
add_executable(${EXECNAME}
|
||||
AerofoilPortable/GpSystemServices_POSIX.cpp
|
||||
AerofoilPortable/GpThreadEvent_Cpp11.cpp
|
||||
AerofoilPortable/GpAllocator_C.cpp
|
||||
AerofoilSDL/GpAudioDriver_SDL2.cpp
|
||||
AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp
|
||||
AerofoilSDL/GpInputDriver_SDL_Gamepad.cpp
|
||||
AerofoilSDL/ShaderCode/CopyQuadP.cpp
|
||||
AerofoilSDL/ShaderCode/DrawQuad32P.cpp
|
||||
AerofoilSDL/ShaderCode/DrawQuadPaletteP.cpp
|
||||
AerofoilSDL/ShaderCode/DrawQuadV.cpp
|
||||
AerofoilSDL/ShaderCode/ScaleQuadP.cpp
|
||||
AerofoilX/GpMain_SDL_X.cpp
|
||||
AerofoilX/GpLogDriver_X.cpp
|
||||
AerofoilX/GpSystemServices_X.cpp
|
||||
AerofoilX/GpFileSystem_X.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${EXECNAME} PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpShell>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AerofoilSDL>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AerofoilPortable>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(${EXECNAME} ${SDL2_LIBRARIES} GpApp GpShell)
|
||||
endif()
|
||||
|
||||
|
||||
install (TARGETS ${EXECNAME})
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project (Aerofoil)
|
||||
SET(PLATFORM "X" CACHE STRING "Defines the target platform")
|
||||
SET(EXECNAME "AerofoilX" CACHE STRING "Defines the exec name")
|
||||
|
||||
message(${CMAKE_BINARY_DIR})
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
if(PLATFORM STREQUAL "MAC")
|
||||
SET(EXECNAME "AerofoilMac" CACHE STRING "Defines the exec name" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
add_definitions(-D__MACOS__)
|
||||
endif()
|
||||
|
||||
message("Building ${EXECNAME} for: ${PLATFORM}")
|
||||
|
||||
add_definitions(-DGP_DEBUG_CONFIG=0)
|
||||
add_definitions(-DNDEBUG=1)
|
||||
|
||||
|
||||
add_library(stb STATIC
|
||||
stb/stb_image_write.c
|
||||
)
|
||||
|
||||
add_library(zlib STATIC
|
||||
zlib/adler32.c
|
||||
zlib/crc32.c
|
||||
zlib/deflate.c
|
||||
zlib/inffast.c
|
||||
zlib/inflate.c
|
||||
zlib/inftrees.c
|
||||
zlib/trees.c
|
||||
zlib/zutil.c
|
||||
)
|
||||
|
||||
add_library(MacRomanConversion STATIC
|
||||
MacRomanConversion/MacRomanConversion.cpp
|
||||
)
|
||||
|
||||
add_library(PortabilityLayer STATIC
|
||||
PortabilityLayer/AntiAliasTable.cpp
|
||||
PortabilityLayer/AppEventHandler.cpp
|
||||
PortabilityLayer/BinHex4.cpp
|
||||
PortabilityLayer/BitmapImage.cpp
|
||||
PortabilityLayer/ByteSwap.cpp
|
||||
PortabilityLayer/CFileStream.cpp
|
||||
PortabilityLayer/CompositeRenderedFont.cpp
|
||||
PortabilityLayer/DeflateCodec.cpp
|
||||
PortabilityLayer/DialogManager.cpp
|
||||
PortabilityLayer/DisplayDeviceManager.cpp
|
||||
PortabilityLayer/EllipsePlotter.cpp
|
||||
PortabilityLayer/FileBrowserUI.cpp
|
||||
PortabilityLayer/FileManager.cpp
|
||||
PortabilityLayer/FileSectionStream.cpp
|
||||
PortabilityLayer/FontFamily.cpp
|
||||
PortabilityLayer/FontManager.cpp
|
||||
PortabilityLayer/FontRenderer.cpp
|
||||
PortabilityLayer/GPArchive.cpp
|
||||
PortabilityLayer/HostSuspendHook.cpp
|
||||
PortabilityLayer/IconLoader.cpp
|
||||
PortabilityLayer/InflateStream.cpp
|
||||
PortabilityLayer/InputManager.cpp
|
||||
PortabilityLayer/LinePlotter.cpp
|
||||
PortabilityLayer/MacBinary2.cpp
|
||||
PortabilityLayer/MacFileInfo.cpp
|
||||
PortabilityLayer/MacFileMem.cpp
|
||||
PortabilityLayer/MemoryManager.cpp
|
||||
PortabilityLayer/MemReaderStream.cpp
|
||||
PortabilityLayer/MenuManager.cpp
|
||||
PortabilityLayer/MMHandleBlock.cpp
|
||||
PortabilityLayer/PLApplication.cpp
|
||||
PortabilityLayer/PLButtonWidget.cpp
|
||||
PortabilityLayer/PLControlDefinitions.cpp
|
||||
PortabilityLayer/PLCore.cpp
|
||||
PortabilityLayer/PLCTabReducer.cpp
|
||||
PortabilityLayer/PLDialogs.cpp
|
||||
PortabilityLayer/PLDrivers.cpp
|
||||
PortabilityLayer/PLEditboxWidget.cpp
|
||||
PortabilityLayer/PLEventQueue.cpp
|
||||
PortabilityLayer/PLHacks.cpp
|
||||
PortabilityLayer/PLHandle.cpp
|
||||
PortabilityLayer/PLIconWidget.cpp
|
||||
PortabilityLayer/PLImageWidget.cpp
|
||||
PortabilityLayer/PLInvisibleWidget.cpp
|
||||
PortabilityLayer/PLKeyEncoding.cpp
|
||||
PortabilityLayer/PLLabelWidget.cpp
|
||||
PortabilityLayer/PLMenus.cpp
|
||||
PortabilityLayer/PLMovies.cpp
|
||||
PortabilityLayer/PLNumberFormatting.cpp
|
||||
PortabilityLayer/PLPopupMenuWidget.cpp
|
||||
PortabilityLayer/PLQDOffscreen.cpp
|
||||
PortabilityLayer/PLQDraw.cpp
|
||||
PortabilityLayer/PLResourceManager.cpp
|
||||
PortabilityLayer/PLResources.cpp
|
||||
PortabilityLayer/PLScrollBarWidget.cpp
|
||||
PortabilityLayer/PLSound.cpp
|
||||
PortabilityLayer/PLStandardColors.cpp
|
||||
PortabilityLayer/PLStringCompare.cpp
|
||||
PortabilityLayer/PLSysCalls.cpp
|
||||
PortabilityLayer/PLTimeTaggedVOSEvent.cpp
|
||||
PortabilityLayer/PLWidgets.cpp
|
||||
PortabilityLayer/QDGraf.cpp
|
||||
PortabilityLayer/QDManager.cpp
|
||||
PortabilityLayer/QDPictDecoder.cpp
|
||||
PortabilityLayer/QDPictEmitContext.cpp
|
||||
PortabilityLayer/QDPictHeader.cpp
|
||||
PortabilityLayer/QDPixMap.cpp
|
||||
PortabilityLayer/QDPort.cpp
|
||||
PortabilityLayer/QDStandardPalette.cpp
|
||||
PortabilityLayer/RandomNumberGenerator.cpp
|
||||
PortabilityLayer/ResolveCachingColor.cpp
|
||||
PortabilityLayer/ResourceCompiledRef.cpp
|
||||
PortabilityLayer/ResourceFile.cpp
|
||||
PortabilityLayer/ScanlineMask.cpp
|
||||
PortabilityLayer/ScanlineMaskBuilder.cpp
|
||||
PortabilityLayer/ScanlineMaskConverter.cpp
|
||||
PortabilityLayer/ScanlineMaskIterator.cpp
|
||||
PortabilityLayer/SimpleGraphic.cpp
|
||||
PortabilityLayer/TextPlacer.cpp
|
||||
PortabilityLayer/UTF8.cpp
|
||||
PortabilityLayer/WindowDef.cpp
|
||||
PortabilityLayer/WindowManager.cpp
|
||||
PortabilityLayer/WorkerThread.cpp
|
||||
PortabilityLayer/XModemCRC.cpp
|
||||
PortabilityLayer/ZipFileProxy.cpp
|
||||
)
|
||||
|
||||
target_include_directories(PortabilityLayer PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/zlib>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MacRomanConversion>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/stb>
|
||||
)
|
||||
|
||||
target_compile_options(PortabilityLayer PRIVATE -Wno-multichar)
|
||||
|
||||
target_link_libraries(PortabilityLayer zlib MacRomanConversion stb)
|
||||
|
||||
|
||||
add_library(GpShell STATIC
|
||||
GpShell/GpAppEnvironment.cpp
|
||||
GpShell/GpAudioDriverFactory.cpp
|
||||
GpShell/GpDisplayDriverFactory.cpp
|
||||
GpShell/GpFontHandlerFactory.cpp
|
||||
GpShell/GpGlobalConfig.cpp
|
||||
GpShell/GpInputDriverFactory.cpp
|
||||
GpShell/GpMain.cpp
|
||||
GpShell/GpVOSEventQueue.cpp
|
||||
)
|
||||
|
||||
target_include_directories(GpShell PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
)
|
||||
|
||||
add_library(GpApp STATIC
|
||||
GpApp/About.cpp
|
||||
GpApp/AnimCursor.cpp
|
||||
GpApp/AppleEvents.cpp
|
||||
GpApp/Banner.cpp
|
||||
GpApp/ColorUtils.cpp
|
||||
GpApp/Coordinates.cpp
|
||||
GpApp/DialogUtils.cpp
|
||||
GpApp/DynamicMaps.cpp
|
||||
GpApp/Dynamics.cpp
|
||||
GpApp/Dynamics2.cpp
|
||||
GpApp/Dynamics3.cpp
|
||||
GpApp/Environ.cpp
|
||||
GpApp/Events.cpp
|
||||
GpApp/FileError.cpp
|
||||
GpApp/GameOver.cpp
|
||||
GpApp/GpAppInterface.cpp
|
||||
GpApp/Grease.cpp
|
||||
GpApp/HighScores.cpp
|
||||
GpApp/House.cpp
|
||||
GpApp/HouseInfo.cpp
|
||||
GpApp/HouseIO.cpp
|
||||
GpApp/HouseLegal.cpp
|
||||
GpApp/Input.cpp
|
||||
GpApp/Interactions.cpp
|
||||
GpApp/InterfaceInit.cpp
|
||||
GpApp/Link.cpp
|
||||
GpApp/Main.cpp
|
||||
GpApp/MainMenuUI.cpp
|
||||
GpApp/MainWindow.cpp
|
||||
GpApp/Map.cpp
|
||||
GpApp/Marquee.cpp
|
||||
GpApp/Menu.cpp
|
||||
GpApp/Modes.cpp
|
||||
GpApp/Music.cpp
|
||||
GpApp/ObjectAdd.cpp
|
||||
GpApp/ObjectDraw.cpp
|
||||
GpApp/ObjectDraw2.cpp
|
||||
GpApp/ObjectDrawAll.cpp
|
||||
GpApp/ObjectEdit.cpp
|
||||
GpApp/ObjectInfo.cpp
|
||||
GpApp/ObjectRects.cpp
|
||||
GpApp/Objects.cpp
|
||||
GpApp/Play.cpp
|
||||
GpApp/Player.cpp
|
||||
GpApp/Prefs.cpp
|
||||
GpApp/RectUtils.cpp
|
||||
GpApp/Render.cpp
|
||||
GpApp/Room.cpp
|
||||
GpApp/RoomGraphics.cpp
|
||||
GpApp/RoomInfo.cpp
|
||||
GpApp/RubberBands.cpp
|
||||
GpApp/SavedGames.cpp
|
||||
GpApp/Scoreboard.cpp
|
||||
GpApp/Scrap.cpp
|
||||
GpApp/SelectHouse.cpp
|
||||
GpApp/Settings.cpp
|
||||
GpApp/Sound.cpp
|
||||
GpApp/SoundSync_Cpp11.cpp
|
||||
GpApp/SourceExport.cpp
|
||||
GpApp/StringUtils.cpp
|
||||
GpApp/StructuresInit.cpp
|
||||
GpApp/StructuresInit2.cpp
|
||||
GpApp/Tools.cpp
|
||||
GpApp/Transit.cpp
|
||||
GpApp/Transitions.cpp
|
||||
GpApp/Triggers.cpp
|
||||
GpApp/Trip.cpp
|
||||
GpApp/Utilities.cpp
|
||||
GpApp/WindowUtils.cpp
|
||||
)
|
||||
|
||||
target_compile_options(GpApp PRIVATE -Wno-multichar)
|
||||
|
||||
target_include_directories(GpApp PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
)
|
||||
|
||||
target_link_libraries(GpApp PortabilityLayer)
|
||||
|
||||
if(CMAKE_HOST_UNIX)
|
||||
set(EXEC_SOURCES )
|
||||
list(APPEND EXEC_SOURCES
|
||||
AerofoilPortable/GpSystemServices_POSIX.cpp
|
||||
AerofoilPortable/GpThreadEvent_Cpp11.cpp
|
||||
AerofoilPortable/GpAllocator_C.cpp
|
||||
AerofoilSDL/GpAudioDriver_SDL2.cpp
|
||||
AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp
|
||||
AerofoilSDL/GpInputDriver_SDL_Gamepad.cpp
|
||||
AerofoilSDL/ShaderCode/CopyQuadP.cpp
|
||||
AerofoilSDL/ShaderCode/DrawQuad32P.cpp
|
||||
AerofoilSDL/ShaderCode/DrawQuadPaletteP.cpp
|
||||
AerofoilSDL/ShaderCode/DrawQuadV.cpp
|
||||
AerofoilSDL/ShaderCode/ScaleQuadP.cpp
|
||||
AerofoilX/GpMain_SDL_X.cpp
|
||||
AerofoilX/GpLogDriver_X.cpp
|
||||
AerofoilX/GpSystemServices_X.cpp
|
||||
AerofoilX/GpFileSystem_X.cpp
|
||||
)
|
||||
|
||||
set(EXEC_LIBS )
|
||||
list(APPEND EXEC_LIBS
|
||||
${SDL2_LIBRARIES}
|
||||
GpApp
|
||||
GpShell
|
||||
)
|
||||
|
||||
set(EXEC_INC_DIRS )
|
||||
list(APPEND EXEC_INC_DIRS
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpCommon>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GpShell>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AerofoilSDL>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AerofoilPortable>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PortabilityLayer>
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
)
|
||||
if(PLATFORM STREQUAL "MAC")
|
||||
list(APPEND EXEC_SOURCES
|
||||
AerofoilMac/AerofoilMac/AerofoilApplication.mm
|
||||
AerofoilMac/AerofoilMac/MacInit.mm
|
||||
)
|
||||
list(APPEND EXEC_INC_DIRS
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AerofoilMac/AerofoilMac>
|
||||
)
|
||||
list(APPEND EXEC_LIBS
|
||||
"-framework Cocoa"
|
||||
)
|
||||
endif(PLATFORM STREQUAL "MAC")
|
||||
|
||||
add_executable(${EXECNAME} ${EXEC_SOURCES})
|
||||
target_include_directories(${EXECNAME} PRIVATE ${EXEC_INC_DIRS})
|
||||
target_link_libraries(${EXECNAME} ${EXEC_LIBS})
|
||||
endif()
|
||||
|
||||
|
||||
install (TARGETS ${EXECNAME})
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{ED2F91E1-673A-4590-82B2-EB157927D3E3}</ProjectGuid>
|
||||
<RootNamespace>CompileShadersD3D11</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{B852D549-4020-4477-8BFB-E199FF78B047}</ProjectGuid>
|
||||
<RootNamespace>ConvertColorCursors</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -4,14 +4,14 @@ mkdir Packaged
|
||||
mkdir Packaged\Houses
|
||||
|
||||
x64\Release\MiniRez.exe "GliderProData\Glider PRO.r" Packaged\ApplicationResources.gpr
|
||||
x64\Release\gpr2gpa.exe "Packaged\ApplicationResources.gpr" "DefaultTimestamp.timestamp" "Packaged\ApplicationResources.gpa" "ApplicationResourcePatches\manifest.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\ApplicationResources.gpr" "DefaultTimestamp.timestamp" "Packaged\ApplicationResources.gpa" -patch "ApplicationResourcePatches\manifest.json"
|
||||
x64\Release\FTagData.exe "DefaultTimestamp.timestamp" "Packaged\ApplicationResources.gpf" data ozm5 0 0 locked
|
||||
x64\Release\MergeGPF.exe "Packaged\ApplicationResources.gpf"
|
||||
|
||||
x64\Release\GenerateFonts.exe
|
||||
|
||||
x64\Release\MiniRez.exe "Empty.r" Packaged\Fonts.gpr
|
||||
x64\Release\gpr2gpa.exe "Packaged\Fonts.gpr" "DefaultTimestamp.timestamp" "Packaged\Fonts.gpa" "Packaged\FontCacheManifest.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Fonts.gpr" "DefaultTimestamp.timestamp" "Packaged\Fonts.gpa" -patch "Packaged\FontCacheManifest.json"
|
||||
x64\Release\FTagData.exe "DefaultTimestamp.timestamp" "Packaged\Fonts.gpf" data ozm5 0 0 locked
|
||||
x64\Release\MergeGPF.exe "Packaged\Fonts.gpf"
|
||||
|
||||
@@ -54,14 +54,14 @@ x64\Release\gpr2gpa.exe "Packaged\Houses\CD Demo House.gpr" "DefaultTimestamp.ti
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Davis Station.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Davis Station.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Demo House.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Demo House.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Fun House.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Fun House.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Grand Prix.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Grand Prix.gpa" "HousePatches\GrandPrix.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\ImagineHouse PRO II.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\ImagineHouse PRO II.gpa" "HousePatches\ImagineHousePROII.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\In The Mirror.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\In The Mirror.gpa" "HousePatches\InTheMirror.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Grand Prix.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Grand Prix.gpa" -patch "HousePatches\GrandPrix.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\ImagineHouse PRO II.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\ImagineHouse PRO II.gpa" -patch "HousePatches\ImagineHousePROII.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\In The Mirror.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\In The Mirror.gpa" -patch "HousePatches\InTheMirror.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Land of Illusion.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Land of Illusion.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Leviathan.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Leviathan.gpa" "HousePatches\Leviathan.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Leviathan.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Leviathan.gpa" -patch "HousePatches\Leviathan.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Metropolis.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Metropolis.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Nemo's Market.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Nemo's Market.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Rainbow's End.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Rainbow's End.gpa" "HousePatches\RainbowsEnd.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Rainbow's End.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Rainbow's End.gpa" -patch "HousePatches\RainbowsEnd.json"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Slumberland.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Slumberland.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\SpacePods.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\SpacePods.gpa"
|
||||
x64\Release\gpr2gpa.exe "Packaged\Houses\Teddy World.gpr" "DefaultTimestamp.timestamp" "Packaged\Houses\Teddy World.gpa"
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{7EFF1E21-C375-45EA-A069-4E2232C8A72B}</ProjectGuid>
|
||||
<RootNamespace>EmitWiXVersion</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{A8FCDC5E-729C-4A80-BF9F-B669C52B2AE3}</ProjectGuid>
|
||||
<RootNamespace>FTagData</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -43,19 +43,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{487216D8-16BA-4B4C-B5BF-43FEEDFEE03A}</ProjectGuid>
|
||||
<RootNamespace>FreeType</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -286,6 +286,8 @@ int toolMain(int argc, const char **argv)
|
||||
fprintf(manifestF, "\t]\n");
|
||||
fprintf(manifestF, "}\n");
|
||||
|
||||
fclose(manifestF);
|
||||
|
||||
PortabilityLayer::RenderedFontCatalogHeader catHeader;
|
||||
|
||||
FILE *catF = fopen_utf8("Packaged/FontCacheCatalog.bin", "wb");
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{3B7FD18D-7A50-4DF5-AC25-543E539BFACE}</ProjectGuid>
|
||||
<RootNamespace>GenerateFonts</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -233,11 +233,12 @@ void DoAboutOpenSource(void)
|
||||
static const int kOpenSansLicenseButton = 8;
|
||||
static const int kRobotoMonoLicenseButton = 10;
|
||||
static const int kGochiHandLicenseButton = 12;
|
||||
static const int kLibIConvLicenseButton = 14;
|
||||
static const int kRapidJSONLicenseButton = 16;
|
||||
static const int kZLibLicenseButton = 18;
|
||||
static const int kFreeTypeLicenseButton = 20;
|
||||
static const int kSDLLicenseButton = 22;
|
||||
static const int kInterLicenseButton = 14;
|
||||
static const int kLibIConvLicenseButton = 16;
|
||||
static const int kRapidJSONLicenseButton = 18;
|
||||
static const int kZLibLicenseButton = 20;
|
||||
static const int kFreeTypeLicenseButton = 22;
|
||||
static const int kSDLLicenseButton = 24;
|
||||
|
||||
static const int kLicenseResourceApache = 1000;
|
||||
static const int kLicenseResourceGPLv2 = 1001;
|
||||
@@ -249,7 +250,7 @@ void DoAboutOpenSource(void)
|
||||
|
||||
static const int kAboutOpenSourceDialogTemplateID = 2005;
|
||||
|
||||
const Rect windowRect = Rect::Create(0, 0, 324, 512);
|
||||
const Rect windowRect = Rect::Create(0, 0, 348, 512);
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(windowRect, PortabilityLayer::WindowStyleFlags::kAlert, true, 0, 0, PSTR(""));
|
||||
|
||||
@@ -281,6 +282,7 @@ void DoAboutOpenSource(void)
|
||||
DoLicenseReader(kLicenseResourceApache);
|
||||
break;
|
||||
case kGochiHandLicenseButton:
|
||||
case kInterLicenseButton:
|
||||
DoLicenseReader(kLicenseResourceOFL);
|
||||
break;
|
||||
case kLibIConvLicenseButton:
|
||||
@@ -309,7 +311,7 @@ void DoAboutFramework (void)
|
||||
static const int kAboutFrameworkDialogTemplateID = 2000;
|
||||
static const int kAboutOpenSourceButton = 2;
|
||||
|
||||
const Rect windowRect = Rect::Create(0, 0, 320, 450);
|
||||
const Rect windowRect = Rect::Create(0, 0, 332, 450);
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(windowRect, PortabilityLayer::WindowStyleFlags::kAlert, true, 0, 0, PSTR(""));
|
||||
|
||||
@@ -340,7 +342,8 @@ void DoAboutFramework (void)
|
||||
(lineNum++);
|
||||
surface->DrawString(Point::Create(horizontalOffset, verticalPoint + spacing * (lineNum)), PSTR("Credits:"), blackColor, font);
|
||||
surface->DrawString(Point::Create(creditsHorizontalOffset, verticalPoint + spacing * (lineNum++)), PSTR("Eric Lasota - Programming, admin"), blackColor, font);
|
||||
surface->DrawString(Point::Create(creditsHorizontalOffset, verticalPoint + spacing * (lineNum++)), PSTR("Thijs Verboon - macOS version"), blackColor, font);
|
||||
surface->DrawString(Point::Create(creditsHorizontalOffset, verticalPoint + spacing * (lineNum++)), PSTR("Thijs Verboon - macOS programming"), blackColor, font);
|
||||
surface->DrawString(Point::Create(creditsHorizontalOffset, verticalPoint + spacing * (lineNum++)), PSTR("Phil Marell - macOS programming"), blackColor, font);
|
||||
(lineNum++);
|
||||
surface->DrawString(Point::Create(horizontalOffset, verticalPoint + spacing * (lineNum++)), PSTR(GP_APPLICATION_NAME " is an unoffical third-party port of Glider PRO."), blackColor, font);
|
||||
(lineNum++);
|
||||
|
@@ -6,5 +6,5 @@
|
||||
|
||||
|
||||
void DoAbout (void);
|
||||
|
||||
void DoAboutFramework (void);
|
||||
|
||||
|
@@ -336,7 +336,7 @@ void DisposCursors (void)
|
||||
|
||||
void IncrementCursor (void)
|
||||
{
|
||||
if (animCursorH == 0)
|
||||
if (animCursorH == nullptr)
|
||||
InitAnimatedCursor(nil);
|
||||
if (animCursorH)
|
||||
{
|
||||
@@ -356,7 +356,7 @@ void IncrementCursor (void)
|
||||
|
||||
void DecrementCursor (void)
|
||||
{
|
||||
if (animCursorH == 0)
|
||||
if (animCursorH == nullptr)
|
||||
InitAnimatedCursor(nil);
|
||||
if (animCursorH)
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ void HandleOSEvent (EventRecord *);
|
||||
void HandleHighLevelEvent (EventRecord *);
|
||||
void HandleIdleTask (void);
|
||||
void IncrementMode (void);
|
||||
|
||||
void DoEndGame (void);
|
||||
|
||||
|
||||
long lastUp, incrementModeTime;
|
||||
@@ -145,7 +145,7 @@ void HandleKeyEvent (const KeyDownStates &keyStates, const GpKeyboardInputEvent
|
||||
{
|
||||
const intptr_t theChar = PackVOSKeyCode(theEvent);
|
||||
const bool shiftDown = keyStates.IsSet(PL_KEY_EITHER_SPECIAL(kShift));
|
||||
const bool commandDown = keyStates.IsSet(PL_KEY_EITHER_SPECIAL(kControl));
|
||||
const bool commandDown = keyStates.IsSet(PL_KEY_SHORTCUT);
|
||||
const bool optionDown = keyStates.IsSet(PL_KEY_EITHER_SPECIAL(kAlt));
|
||||
|
||||
if ((commandDown) && (!optionDown))
|
||||
@@ -398,6 +398,17 @@ void HandleIdleTask (void)
|
||||
HandleSplashResolutionChange();
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef COMPILEDEMO
|
||||
if (quitting) {
|
||||
if (theMode == kEditMode) {
|
||||
if (!QuerySaveChanges()) {
|
||||
quitting = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
TickMainMenuUI();
|
||||
}
|
||||
@@ -413,7 +424,7 @@ void HandleEvent (void)
|
||||
bool itHappened = true;
|
||||
|
||||
const KeyDownStates *eventKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
if ((eventKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) &&
|
||||
if ((eventKeys->IsSet(PL_KEY_SHORTCUT)) &&
|
||||
(eventKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))))
|
||||
{
|
||||
HiliteAllObjects();
|
||||
@@ -455,6 +466,21 @@ void HandleEvent (void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (theEvent.m_vosEvent.m_eventType == GpVOSEventType_t::kMenuItemSelected)
|
||||
{
|
||||
switch (theEvent.m_vosEvent.m_event.m_menuItemSelectionEvent)
|
||||
{
|
||||
case GpMenuItemSelectionEvents::kAboutGliderPRO:
|
||||
DoAbout();
|
||||
break;
|
||||
case GpMenuItemSelectionEvents::kAboutAerofoil:
|
||||
DoAboutFramework();
|
||||
break;
|
||||
case GpMenuItemSelectionEvents::kPreferences:
|
||||
DoSettingsMain();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
HandleIdleTask();
|
||||
|
@@ -228,7 +228,7 @@ void DoGameOverStarAnimation (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if ((theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
if ((theKeys->IsSet(PL_KEY_SHORTCUT)) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
noInteruption = false;
|
||||
|
||||
if (PortabilityLayer::EventQueue::GetInstance()->Dequeue(&theEvent))
|
||||
@@ -475,7 +475,7 @@ void DoDiedGameOver (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if ((theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
if ((theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_SHORTCUT)) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
{
|
||||
pagesStuck = 8;
|
||||
userAborted = true;
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{6233C3F2-5781-488E-B190-4FA8836F5A77}</ProjectGuid>
|
||||
<RootNamespace>GpApp</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -2386,7 +2386,7 @@ static ExportHouseResult_t TryExportSound(GpVector<uint8_t> &resData, const THan
|
||||
{
|
||||
BEUInt32_t m_samplePtr;
|
||||
BEUInt32_t m_length;
|
||||
BEFixed32_t m_sampleRate;
|
||||
BEUFixed32_t m_sampleRate;
|
||||
BEUInt32_t m_loopStart;
|
||||
BEUInt32_t m_loopEnd;
|
||||
uint8_t m_encoding;
|
||||
@@ -2784,10 +2784,10 @@ static ExportHouseResult_t TryExportPictFromSurface(GpVector<uint8_t> &resData,
|
||||
BEUInt16_t m_headerOp;
|
||||
BEInt16_t m_v2Version;
|
||||
BEInt16_t m_reserved1;
|
||||
BEFixed32_t m_top;
|
||||
BEFixed32_t m_left;
|
||||
BEFixed32_t m_bottom;
|
||||
BEFixed32_t m_right;
|
||||
BESFixed32_t m_top;
|
||||
BESFixed32_t m_left;
|
||||
BESFixed32_t m_bottom;
|
||||
BESFixed32_t m_right;
|
||||
BEUInt32_t m_reserved2;
|
||||
};
|
||||
|
||||
@@ -3232,7 +3232,7 @@ static ExportHouseResult_t TryExportIcon(GpVector<uint8_t> &resData, const THand
|
||||
const PixMap *pixMap = *surface->m_port.GetPixMap();
|
||||
for (size_t row = 0; row < height; row++)
|
||||
{
|
||||
const PortabilityLayer::RGBAColor *srcColors = reinterpret_cast<const const PortabilityLayer::RGBAColor*>(static_cast<const uint8_t*>(pixMap->m_data) + pixMap->m_pitch * row);
|
||||
const PortabilityLayer::RGBAColor *srcColors = reinterpret_cast<const PortabilityLayer::RGBAColor*>(static_cast<const uint8_t*>(pixMap->m_data) + pixMap->m_pitch * row);
|
||||
|
||||
for (size_t col = 0; col < width; col++)
|
||||
{
|
||||
@@ -3257,7 +3257,11 @@ static ExportHouseResult_t TryExportIcon(GpVector<uint8_t> &resData, const THand
|
||||
for (uint8_t i = 0; i < 16; i++)
|
||||
{
|
||||
uint32_t error = 0;
|
||||
const int16_t deltas[3] = { palette[i].r - color.r, palette[i].g - color.g, palette[i].b - color.b };
|
||||
const int16_t deltas[3] = {
|
||||
static_cast<int16_t>(palette[i].r - color.r),
|
||||
static_cast<int16_t>(palette[i].g - color.g),
|
||||
static_cast<int16_t>(palette[i].b - color.b)
|
||||
};
|
||||
for (int ch = 0; ch < 3; ch++)
|
||||
error += static_cast<uint32_t>(deltas[ch] * deltas[ch]);
|
||||
|
||||
|
@@ -42,6 +42,7 @@ void DoPause (void);
|
||||
void DoTouchScreenMenu (void);
|
||||
void DoBatteryEngaged (gliderPtr);
|
||||
void DoHeliumEngaged (gliderPtr);
|
||||
void DoEndGame (void);
|
||||
void QuerySaveGame (Boolean &save, Boolean &cancel);
|
||||
|
||||
|
||||
@@ -72,27 +73,10 @@ void LogDemoKey (char keyIs)
|
||||
void DoCommandKey (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_ASCII('Q')))
|
||||
{
|
||||
Boolean wantCancel = false;
|
||||
playing = false;
|
||||
paused = false;
|
||||
if ((!twoPlayerGame) && (!demoGoing))
|
||||
{
|
||||
Boolean wantSave = false;
|
||||
QuerySaveGame(wantSave, wantCancel);
|
||||
|
||||
if (wantSave)
|
||||
{
|
||||
// New save game.
|
||||
if (!SaveGame2())
|
||||
wantCancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (wantCancel)
|
||||
playing = true;
|
||||
DoEndGame();
|
||||
}
|
||||
else if ((theKeys->IsSet(PL_KEY_ASCII('S'))) && (!twoPlayerGame))
|
||||
{
|
||||
@@ -337,24 +321,7 @@ void DoTouchScreenMenu(void)
|
||||
switch (highlightedItem)
|
||||
{
|
||||
case TouchScreenMenuItems::kQuit:
|
||||
{
|
||||
Boolean wantCancel = false;
|
||||
playing = false;
|
||||
paused = false;
|
||||
if ((!twoPlayerGame) && (!demoGoing))
|
||||
{
|
||||
Boolean wantSave = false;
|
||||
QuerySaveGame(wantSave, wantCancel);
|
||||
if (wantSave)
|
||||
{
|
||||
if (!SaveGame2()) // New save game.
|
||||
wantCancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (wantCancel)
|
||||
playing = true;
|
||||
}
|
||||
DoEndGame();
|
||||
break;
|
||||
case TouchScreenMenuItems::kSave:
|
||||
assert(!twoPlayerGame);
|
||||
@@ -403,7 +370,7 @@ void DoPause (void)
|
||||
if ((isEscPauseKey && theKeys->IsSet(PL_KEY_SPECIAL(kEscape))) ||
|
||||
(!isEscPauseKey && theKeys->IsSet(PL_KEY_SPECIAL(kTab))))
|
||||
paused = false;
|
||||
else if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)))
|
||||
else if (theKeys->IsSet(PL_KEY_SHORTCUT))
|
||||
DoCommandKey();
|
||||
|
||||
Delay(1, nullptr);
|
||||
@@ -513,7 +480,7 @@ void DoHeliumEngaged (gliderPtr thisGlider)
|
||||
|
||||
#else
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)))
|
||||
if (theKeys->IsSet(PL_KEY_SHORTCUT))
|
||||
DoCommandKey();
|
||||
|
||||
// Cheesy - Use touchscreen menu as quit
|
||||
@@ -601,7 +568,7 @@ void GetInput (gliderPtr thisGlider)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)))
|
||||
if (theKeys->IsSet(PL_KEY_SHORTCUT))
|
||||
DoCommandKey();
|
||||
}
|
||||
|
||||
@@ -813,6 +780,28 @@ void GetInput (gliderPtr thisGlider)
|
||||
}
|
||||
}
|
||||
|
||||
void DoEndGame() {
|
||||
Boolean wantCancel = false;
|
||||
playing = false;
|
||||
paused = false;
|
||||
quitting = false;
|
||||
if ((!twoPlayerGame) && (!demoGoing))
|
||||
{
|
||||
Boolean wantSave = false;
|
||||
QuerySaveGame(wantSave, wantCancel);
|
||||
if (wantSave)
|
||||
{
|
||||
if (!SaveGame2()) // New save game.
|
||||
wantCancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (wantCancel)
|
||||
{
|
||||
playing = true;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- QuerySaveGame
|
||||
|
||||
void QuerySaveGame (Boolean &save, Boolean &cancel)
|
||||
|
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#define kPrefsVersion 0x0039
|
||||
#define kPrefsVersion 0x003a
|
||||
|
||||
|
||||
void ReadInPrefs (void);
|
||||
@@ -537,9 +537,6 @@ int AppStartup()
|
||||
ToolBoxInit();
|
||||
CheckOurEnvirons();
|
||||
|
||||
if (thisMac.isTouchscreen)
|
||||
PortabilityLayer::MenuManager::GetInstance()->SetMenuTouchScreenStyle(true);
|
||||
|
||||
if (!thisMac.hasColor)
|
||||
RedAlert(kErrNeedColorQD);
|
||||
if (!thisMac.hasSystem7)
|
||||
@@ -686,4 +683,4 @@ int gpAppMain()
|
||||
HandleEvent();
|
||||
|
||||
return AppShutdown();
|
||||
}
|
||||
}
|
||||
|
@@ -2664,7 +2664,7 @@ void HiliteAllObjects (void)
|
||||
{
|
||||
Delay(1, nullptr);
|
||||
}
|
||||
while ((theseKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) &&
|
||||
while ((theseKeys->IsSet(PL_KEY_SHORTCUT)) &&
|
||||
(theseKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))));
|
||||
|
||||
for (i = 0; i < kMaxRoomObs; i++)
|
||||
|
@@ -46,7 +46,7 @@ void HandleRoomVisitation (void);
|
||||
void SetObjectsToDefaults (void);
|
||||
void InitTelephone (void);
|
||||
void HandleTelephone (void);
|
||||
|
||||
void DoEndGame (void);
|
||||
|
||||
phoneType thePhone, theChimes;
|
||||
Rect glidSrcRect, justRoomsRect;
|
||||
@@ -717,7 +717,11 @@ void PlayGame (void)
|
||||
HandleDynamicScoreboard();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (quitting) {
|
||||
DoEndGame();
|
||||
}
|
||||
|
||||
if (gameOver)
|
||||
{
|
||||
countDown--;
|
||||
|
@@ -470,7 +470,7 @@ Boolean WaitForInputEvent (short seconds)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt)) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift)))
|
||||
if (theKeys->IsSet(PL_KEY_SHORTCUT) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt)) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift)))
|
||||
waiting = false;
|
||||
|
||||
if (PortabilityLayer::EventQueue::GetInstance()->Dequeue(&theEvent))
|
||||
@@ -501,7 +501,7 @@ void WaitCommandQReleased (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if (!theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)) || !theKeys->IsSet(PL_KEY_ASCII('Q')))
|
||||
if (!theKeys->IsSet(PL_KEY_SHORTCUT) || !theKeys->IsSet(PL_KEY_ASCII('Q')))
|
||||
waiting = false;
|
||||
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
@@ -554,6 +554,8 @@ static const char *gs_specialKeyNames[GpKeySpecials::kCount] =
|
||||
"rt ctrl",
|
||||
"lf alt",
|
||||
"rt alt",
|
||||
"lf cmd",
|
||||
"rt cmd",
|
||||
"num lock",
|
||||
"lf arrow",
|
||||
"up arrow",
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{E3BDC783-8646-433E-ADF0-8B6390D36669}</ProjectGuid>
|
||||
<RootNamespace>GpAudioDriverXAudio2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
#define GP_BUILD_VERSION_MAJOR 1
|
||||
#define GP_BUILD_VERSION_MINOR 1
|
||||
#define GP_BUILD_VERSION_UPDATE 1
|
||||
#define GP_BUILD_VERSION_UPDATE 3
|
||||
|
||||
#define GP_APPLICATION_VERSION_STRING "1.1.1"
|
||||
#define GP_APPLICATION_COPYRIGHT_STRING "2019-2021 Gale Force Games LLC"
|
||||
#define GP_APPLICATION_VERSION_STRING "1.1.3"
|
||||
#define GP_APPLICATION_COPYRIGHT_STRING "2019-2022 Gale Force Games LLC"
|
||||
#define GP_APPLICATION_WEBSITE_STRING "https://github.com/elasota/Aerofoil"
|
||||
|
@@ -101,6 +101,8 @@ namespace GpKeySpecials
|
||||
kRightCtrl,
|
||||
kLeftAlt,
|
||||
kRightAlt,
|
||||
kLeftCommand,
|
||||
kRightCommand,
|
||||
kNumLock,
|
||||
kLeftArrow,
|
||||
kUpArrow,
|
||||
@@ -268,6 +270,17 @@ struct GpVideoResolutionChangedEvent
|
||||
uint32_t m_newHeight;
|
||||
};
|
||||
|
||||
namespace GpMenuItemSelectionEvents
|
||||
{
|
||||
enum GpMenuItemSelectionEvent {
|
||||
kAboutGliderPRO,
|
||||
kAboutAerofoil,
|
||||
kPreferences
|
||||
};
|
||||
}
|
||||
|
||||
typedef GpMenuItemSelectionEvents::GpMenuItemSelectionEvent GpMenuItemSelectionEvent_t;
|
||||
|
||||
namespace GpVOSEventTypes
|
||||
{
|
||||
enum GpVOSEventType
|
||||
@@ -277,6 +290,7 @@ namespace GpVOSEventTypes
|
||||
kTouchInput,
|
||||
kGamepadInput,
|
||||
kVideoResolutionChanged,
|
||||
kMenuItemSelected,
|
||||
kQuit
|
||||
};
|
||||
}
|
||||
@@ -292,6 +306,7 @@ struct GpVOSEvent
|
||||
GpTouchInputEvent m_touchInputEvent;
|
||||
GpGamepadInputEvent m_gamepadInputEvent;
|
||||
GpVideoResolutionChangedEvent m_resolutionChangedEvent;
|
||||
GpMenuItemSelectionEvent_t m_menuItemSelectionEvent;
|
||||
};
|
||||
|
||||
EventUnion m_event;
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{FFC961AC-55B4-4A38-A83E-06AE98F59ACC}</ProjectGuid>
|
||||
<RootNamespace>GpDisplayDriverD3D11</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{4B564030-8985-4975-91E1-E1B2C16AE2A1}</ProjectGuid>
|
||||
<RootNamespace>GpFontHandlerFreeType2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{17B96F07-EF92-47CD-95A5-8E6EE38AB564}</ProjectGuid>
|
||||
<RootNamespace>GpInputDriverXInput</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -88,10 +88,3 @@ void GpAppEnvironment::InitializeApplicationState()
|
||||
drivers->SetDriver<GpDriverIDs::kFont>(m_fontHandler);
|
||||
drivers->SetDriver<GpDriverIDs::kEventQueue>(m_vosEventQueue);
|
||||
}
|
||||
|
||||
void GpAppEnvironment::SynchronizeState()
|
||||
{
|
||||
const size_t numInputDrivers = m_numInputDrivers;
|
||||
for (size_t i = 0; i < numInputDrivers; i++)
|
||||
m_inputDrivers[i]->ProcessInput();
|
||||
}
|
||||
|
@@ -41,7 +41,6 @@ public:
|
||||
private:
|
||||
static void StaticAppThreadFunc(void *context);
|
||||
void InitializeApplicationState();
|
||||
void SynchronizeState();
|
||||
|
||||
IGpDisplayDriver *m_displayDriver;
|
||||
IGpAudioDriver *m_audioDriver;
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{10CF9B5F-61D0-4B5B-89F4-810B58FC053D}</ProjectGuid>
|
||||
<RootNamespace>GpShell</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{B31BFF9D-2D14-4B1A-A625-8348CC3D8D67}</ProjectGuid>
|
||||
<RootNamespace>HouseTool</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{07351A8E-1F79-42C9-BBAB-31F071EAA99E}</ProjectGuid>
|
||||
<RootNamespace>MacRomanConversion</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -4,7 +4,7 @@ mkdir ReleasePkg
|
||||
|
||||
mkdir ReleasePkg\Aerofoil
|
||||
mkdir ReleasePkg\Aerofoil\Packaged
|
||||
mkdir ReleasePkg\Aerofoil\Tools
|
||||
mkdir ReleasePkg\AerofoilTools
|
||||
|
||||
copy /Y x64\Release\Aerofoil.exe ReleasePkg\Aerofoil
|
||||
copy /Y x64\Release\GpAudioDriver_XAudio2.dll ReleasePkg\Aerofoil
|
||||
@@ -13,15 +13,15 @@ copy /Y x64\Release\GpDisplayDriver_D3D11.dll ReleasePkg\Aerofoil
|
||||
copy /Y x64\Release\GpInputDriver_XInput.dll ReleasePkg\Aerofoil
|
||||
copy /Y x64\Release\GpApp.dll ReleasePkg\Aerofoil
|
||||
|
||||
copy /Y x64\Release\flattenmov.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\bin2gp.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\hqx2bin.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\hqx2gp.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\MakeTimestamp.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\FTagData.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\gpr2gpa.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\unpacktool.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\MergeGPF.exe ReleasePkg\Aerofoil\Tools
|
||||
copy /Y x64\Release\flattenmov.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\bin2gp.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\hqx2bin.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\hqx2gp.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\MakeTimestamp.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\FTagData.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\gpr2gpa.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\unpacktool.exe ReleasePkg\AerofoilTools
|
||||
copy /Y x64\Release\MergeGPF.exe ReleasePkg\AerofoilTools
|
||||
|
||||
mkdir ReleasePkg\PDBs
|
||||
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{9023DF2F-A33D-485A-B13D-0973348B2F9B}</ProjectGuid>
|
||||
<RootNamespace>MakeTimestamp</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -227,8 +227,11 @@ int toolMain(int argc, const char **argv)
|
||||
std::vector<PortabilityLayer::ZipCentralDirectoryFileHeader> resCentralDir;
|
||||
std::vector<uint8_t> fileNameBytes;
|
||||
std::vector<size_t> fileNameSizes;
|
||||
std::vector<uint8_t> commentBytes;
|
||||
std::vector<size_t> commentSizes;
|
||||
|
||||
FILE *resF = fopen_utf8(resName.c_str(), "rb");
|
||||
if (resF)
|
||||
{
|
||||
PortabilityLayer::ZipEndOfCentralDirectoryRecord eocd;
|
||||
|
||||
@@ -265,7 +268,20 @@ int toolMain(int argc, const char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (!resStream.SeekCurrent(cdirFile.m_extraFieldLength + cdirFile.m_commentLength))
|
||||
size_t commentLength = cdirFile.m_commentLength;
|
||||
commentSizes.push_back(commentLength);
|
||||
|
||||
if (commentLength > 0)
|
||||
{
|
||||
commentBytes.resize(commentBytes.size() + commentLength);
|
||||
if (!resStream.Read(&commentBytes[commentBytes.size() - commentLength], commentLength))
|
||||
{
|
||||
fprintf(stderr, "Error reading cdir entry");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!resStream.SeekCurrent(cdirFile.m_extraFieldLength))
|
||||
{
|
||||
fprintf(stderr, "Error reading cdir entry");
|
||||
return -1;
|
||||
@@ -274,7 +290,7 @@ int toolMain(int argc, const char **argv)
|
||||
resCentralDir.push_back(cdirFile);
|
||||
|
||||
numFiles++;
|
||||
cdirSize += sizeof(PortabilityLayer::ZipCentralDirectoryFileHeader) + fileNameLength;
|
||||
cdirSize += sizeof(PortabilityLayer::ZipCentralDirectoryFileHeader) + fileNameLength + commentLength;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < resCentralDir.size(); i++)
|
||||
@@ -295,7 +311,6 @@ int toolMain(int argc, const char **argv)
|
||||
|
||||
cdirHeader.m_localHeaderOffset = mergedStream.Tell();
|
||||
cdirHeader.m_extraFieldLength = 0;
|
||||
cdirHeader.m_commentLength = 0;
|
||||
|
||||
if (!mergedStream.WriteExact(&resLH, sizeof(resLH)))
|
||||
{
|
||||
@@ -356,19 +371,22 @@ int toolMain(int argc, const char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
size_t commentBytesOffset = 0;
|
||||
size_t fnameBytesOffset = 0;
|
||||
for (size_t i = 0; i < resCentralDir.size(); i++)
|
||||
{
|
||||
size_t fnameSize = fileNameSizes[i];
|
||||
size_t commentSize = commentSizes[i];
|
||||
const PortabilityLayer::ZipCentralDirectoryFileHeader &cdir = resCentralDir[i];
|
||||
|
||||
if (!mergedStream.WriteExact(&cdir, sizeof(cdir)) || (fnameSize > 0 && !mergedStream.WriteExact(&fileNameBytes[fnameBytesOffset], fnameSize)))
|
||||
if (!mergedStream.WriteExact(&cdir, sizeof(cdir)) || (fnameSize > 0 && !mergedStream.WriteExact(&fileNameBytes[fnameBytesOffset], fnameSize)) || (commentSize > 0 && !mergedStream.WriteExact(&commentBytes[commentBytesOffset], commentSize)))
|
||||
{
|
||||
fprintf(stderr, "Error writing directory");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fnameBytesOffset += fnameSize;
|
||||
commentBytesOffset += commentSize;
|
||||
}
|
||||
|
||||
PortabilityLayer::ZipEndOfCentralDirectoryRecord eocd;
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{36DAF5FA-6ADB-4F20-9810-1610DE0AE653}</ProjectGuid>
|
||||
<RootNamespace>MergeGPF</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{2FF15659-5C72-48B8-B55B-3C658E4125B5}</ProjectGuid>
|
||||
<RootNamespace>MiniRez</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@@ -1,9 +1,11 @@
|
||||
move ReleasePkg\en-us\Aerofoil-installpkg.msi ReleasePkg\Aerofoil-installpkg.msi
|
||||
cd ReleasePkg
|
||||
..\Tools\7z.exe a -bd -r -mx=9 Aerofoil.zip Aerofoil
|
||||
..\Tools\7z.exe a -bd -r -mx=9 AerofoilTools.zip AerofoilTools
|
||||
..\Tools\7z.exe a -bd -r -mx=9 Aerofoil-PDBs.7z PDBs
|
||||
cd ..
|
||||
rmdir /S /Q ReleasePkg\Aerofoil
|
||||
rmdir /S /Q ReleasePkg\AerofoilTools
|
||||
rmdir /S /Q ReleasePkg\en-us
|
||||
rmdir /S /Q ReleasePkg\PDBs
|
||||
|
||||
|
64
PortabilityLayer/CompositeRenderedFont.cpp
Normal file
64
PortabilityLayer/CompositeRenderedFont.cpp
Normal file
@@ -0,0 +1,64 @@
|
||||
#include "CompositeRenderedFont.h"
|
||||
#include "GpRenderedFontMetrics.h"
|
||||
#include "GpRenderedGlyphMetrics.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
PortabilityLayer::CompositeRenderedFont::CompositeRenderedFont(RenderedFont *rfont, RenderedFont *fallbackFont)
|
||||
: m_font(rfont)
|
||||
, m_fallbackFont(fallbackFont)
|
||||
, m_metrics(rfont->GetMetrics())
|
||||
{
|
||||
assert(rfont->IsAntiAliased() == fallbackFont->IsAntiAliased());
|
||||
|
||||
const GpRenderedFontMetrics fallbackMetrics = fallbackFont->GetMetrics();
|
||||
|
||||
if (fallbackMetrics.m_ascent > m_metrics.m_ascent)
|
||||
m_metrics.m_ascent = fallbackMetrics.m_ascent;
|
||||
|
||||
if (fallbackMetrics.m_descent < m_metrics.m_descent)
|
||||
m_metrics.m_descent = fallbackMetrics.m_descent;
|
||||
|
||||
if (fallbackMetrics.m_linegap > m_metrics.m_linegap)
|
||||
m_metrics.m_linegap = fallbackMetrics.m_linegap;
|
||||
}
|
||||
|
||||
bool PortabilityLayer::CompositeRenderedFont::GetGlyph(unsigned int character, const GpRenderedGlyphMetrics *&outMetricsPtr, const void *&outData) const
|
||||
{
|
||||
if (m_font->GetGlyph(character, outMetricsPtr, outData))
|
||||
return true;
|
||||
|
||||
return m_fallbackFont->GetGlyph(character, outMetricsPtr, outData);
|
||||
}
|
||||
|
||||
const GpRenderedFontMetrics &PortabilityLayer::CompositeRenderedFont::GetMetrics() const
|
||||
{
|
||||
return m_metrics;
|
||||
}
|
||||
|
||||
size_t PortabilityLayer::CompositeRenderedFont::MeasureString(const uint8_t *chars, size_t len) const
|
||||
{
|
||||
int32_t measure = 0;
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
const uint8_t character = chars[i];
|
||||
const GpRenderedGlyphMetrics *metrics = nullptr;
|
||||
const void *data = nullptr;
|
||||
if (m_font->GetGlyph(chars[i], metrics, data))
|
||||
measure += metrics->m_advanceX;
|
||||
else if (m_fallbackFont->GetGlyph(chars[i], metrics, data))
|
||||
measure += metrics->m_advanceX;
|
||||
}
|
||||
|
||||
return static_cast<size_t>(measure);
|
||||
}
|
||||
|
||||
bool PortabilityLayer::CompositeRenderedFont::IsAntiAliased() const
|
||||
{
|
||||
return m_font->IsAntiAliased();
|
||||
}
|
||||
|
||||
void PortabilityLayer::CompositeRenderedFont::Destroy()
|
||||
{
|
||||
assert(false);
|
||||
}
|
28
PortabilityLayer/CompositeRenderedFont.h
Normal file
28
PortabilityLayer/CompositeRenderedFont.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "RenderedFont.h"
|
||||
#include "GpRenderedFontMetrics.h"
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class CompositeRenderedFont : public RenderedFont
|
||||
{
|
||||
public:
|
||||
CompositeRenderedFont(RenderedFont *rfont, RenderedFont *fallbackFont);
|
||||
|
||||
bool GetGlyph(unsigned int character, const GpRenderedGlyphMetrics *&outMetricsPtr, const void *&outData) const override;
|
||||
const GpRenderedFontMetrics &GetMetrics() const override;
|
||||
size_t MeasureString(const uint8_t *chars, size_t len) const override;
|
||||
bool IsAntiAliased() const override;
|
||||
|
||||
void Destroy() override;
|
||||
|
||||
size_t MeasureCharStr(const char *str, size_t len) const;
|
||||
size_t MeasurePStr(const PLPasStr &pstr) const;
|
||||
|
||||
private:
|
||||
GpRenderedFontMetrics m_metrics;
|
||||
RenderedFont *m_font;
|
||||
RenderedFont *m_fallbackFont;
|
||||
};
|
||||
}
|
@@ -6,6 +6,7 @@ namespace PortabilityLayer
|
||||
{
|
||||
enum FontFamilyID
|
||||
{
|
||||
kSystemSymbols,
|
||||
kSystem,
|
||||
kApplication,
|
||||
kMonospace,
|
||||
|
@@ -7,5 +7,6 @@ namespace PortabilityLayer
|
||||
FontHacks_None,
|
||||
FontHacks_Roboto,
|
||||
FontHacks_SyntheticBold_OpenSans,
|
||||
FontHacks_SystemSymbols,
|
||||
};
|
||||
}
|
||||
|
@@ -91,6 +91,9 @@ namespace PortabilityLayer
|
||||
for (int i = 0; i < FontFamilyIDs::kCount; i++)
|
||||
m_fontFamilies[static_cast<FontFamilyID_t>(i)] = FontFamily::Create(static_cast<FontFamilyID_t>(i));
|
||||
|
||||
if (m_fontFamilies[FontFamilyIDs::kSystemSymbols])
|
||||
m_fontFamilies[FontFamilyIDs::kSystemSymbols]->AddFont(FontFamilyFlag_None, VirtualDirectories::kFonts, "Fonts/Inter/Inter-SemiBold.ttf", 0, FontHacks_SystemSymbols);
|
||||
|
||||
if (m_fontFamilies[FontFamilyIDs::kSystem])
|
||||
m_fontFamilies[FontFamilyIDs::kSystem]->AddFont(FontFamilyFlag_None, VirtualDirectories::kFonts, "Fonts/OpenSans/OpenSans-ExtraBold.ttf", 0, FontHacks_None);
|
||||
|
||||
@@ -409,6 +412,8 @@ namespace PortabilityLayer
|
||||
|
||||
FontManagerImpl::FontPreset FontManagerImpl::ms_fontPresets[FontPresets::kCount] =
|
||||
{
|
||||
{ FontFamilyIDs::kSystemSymbols, 12, FontFamilyFlag_None, true },
|
||||
|
||||
{ FontFamilyIDs::kSystem, 12, FontFamilyFlag_None, true },
|
||||
{ FontFamilyIDs::kSystem, 12, FontFamilyFlag_Bold, true },
|
||||
|
||||
|
@@ -6,6 +6,8 @@ namespace PortabilityLayer
|
||||
{
|
||||
enum FontPreset
|
||||
{
|
||||
kSystemSymbols12,
|
||||
|
||||
kSystem12,
|
||||
kSystem12Bold,
|
||||
|
||||
|
@@ -105,6 +105,7 @@ namespace PortabilityLayer
|
||||
|
||||
private:
|
||||
static void SynthesizeBoldAA(IGpFontRenderedGlyph *&glyph, unsigned int xScale, unsigned int yScale, bool aa, uint8_t character, int size, FontHacks fontHacks);
|
||||
static uint16_t ResolveSystemSymbol(uint8_t character);
|
||||
|
||||
static FontRendererImpl ms_instance;
|
||||
};
|
||||
@@ -396,6 +397,10 @@ namespace PortabilityLayer
|
||||
for (unsigned int i = 0; i < numCharacters; i++)
|
||||
{
|
||||
uint16_t unicodeCodePoint = MacRoman::ToUnicode(i);
|
||||
|
||||
if (fontHacks == FontHacks_SystemSymbols)
|
||||
unicodeCodePoint = ResolveSystemSymbol(i);
|
||||
|
||||
if (unicodeCodePoint == 0xffff)
|
||||
continue;
|
||||
|
||||
@@ -668,6 +673,35 @@ namespace PortabilityLayer
|
||||
glyph = newGlyph;
|
||||
}
|
||||
|
||||
uint16_t FontRendererImpl::ResolveSystemSymbol(uint8_t character)
|
||||
{
|
||||
// This emulates Chicago system symbol mappings
|
||||
switch (character)
|
||||
{
|
||||
case 0x02: return 0x21e5;
|
||||
case 0x03: return 0x21e4;
|
||||
case 0x05: return 0x21e7;
|
||||
case 0x06: return 0x2303;
|
||||
case 0x07: return 0x2325;
|
||||
case 0x0a: return 0x2326;
|
||||
case 0x0b: return 0x21a9;
|
||||
case 0x0c: return 0x21aa;
|
||||
case 0x10: return 0x2193;
|
||||
case 0x11: return 0x2318;
|
||||
case 0x12: return 0x27a3;
|
||||
case 0x13: return 0x25c6;
|
||||
case 0x14: return 0x2764; // Supposed to be Apple logo but, uh yeah
|
||||
case 0x17: return 0x232b;
|
||||
case 0x18: return 0x2190;
|
||||
case 0x19: return 0x2191;
|
||||
case 0x1a: return 0x2192;
|
||||
case 0x1b: return 0x238b;
|
||||
case 0x1c: return 0x2327;
|
||||
default:
|
||||
return 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
FontRendererImpl *FontRendererImpl::GetInstance()
|
||||
{
|
||||
return &ms_instance;
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "PLDrivers.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpInputDriver.h"
|
||||
|
||||
|
||||
namespace PortabilityLayer
|
||||
@@ -13,5 +14,9 @@ namespace PortabilityLayer
|
||||
{
|
||||
PLDrivers::GetDisplayDriver()->ServeTicks(ticks);
|
||||
DisplayDeviceManager::GetInstance()->IncrementTickCount(ticks);
|
||||
|
||||
const size_t numInputDrivers = PLDrivers::GetNumInputDrivers();
|
||||
for (size_t i = 0; i < numInputDrivers; i++)
|
||||
PLDrivers::GetInputDriver(i)->ProcessInput();
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,11 @@
|
||||
#include "MenuManager.h"
|
||||
#include "CompositeRenderedFont.h"
|
||||
#include "DisplayDeviceManager.h"
|
||||
#include "FontFamily.h"
|
||||
#include "FontManager.h"
|
||||
#include "IGpFont.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpSystemServices.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "SimpleGraphic.h"
|
||||
@@ -119,6 +121,8 @@ struct Menu
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class CompositeRenderedFont;
|
||||
|
||||
class MenuManagerImpl final : public MenuManager
|
||||
{
|
||||
public:
|
||||
@@ -163,9 +167,6 @@ namespace PortabilityLayer
|
||||
|
||||
void RenderFrame(IGpDisplayDriver *displayDriver) override;
|
||||
|
||||
void SetMenuTouchScreenStyle(bool isTouchScreen) override;
|
||||
bool IsMenuTouchScreenStyle() const override;
|
||||
|
||||
static MenuManagerImpl *GetInstance();
|
||||
|
||||
private:
|
||||
@@ -213,9 +214,7 @@ namespace PortabilityLayer
|
||||
static const unsigned int kIconResID = 128;
|
||||
static const unsigned int kMenuBarIconYOffset = 2;
|
||||
static const unsigned int kMenuBarTextYOffset = 14;
|
||||
static const unsigned int kTouchScreenMenuBarTextYOffset = 40;
|
||||
static const unsigned int kMenuBarHeight = 20;
|
||||
static const unsigned int kTouchscreenMenuBarHeight = 54;
|
||||
static const unsigned int kMenuBarItemPadding = 6;
|
||||
static const unsigned int kMenuBarInitialPadding = 16;
|
||||
|
||||
@@ -233,10 +232,9 @@ namespace PortabilityLayer
|
||||
static const unsigned int kMenuItemLeftPadding = 16 + 2 + 2; // 2 for left border, 16 for icon, 2 for spacing
|
||||
|
||||
static const int kMenuFontFlags = PortabilityLayer::FontFamilyFlag_Bold;
|
||||
static const int kTouchScreenMenuFontFlags = PortabilityLayer::FontFamilyFlag_None;
|
||||
|
||||
static const FontPreset_t kMenuFontSymbolsPreset = FontPresets::kSystemSymbols12;
|
||||
static const FontPreset_t kMenuFontPreset = FontPresets::kSystem12Bold;
|
||||
static const FontPreset_t kTouchScreenMenuFontPreset = FontPresets::kApplication40;
|
||||
|
||||
DrawSurface *m_menuBarGraf;
|
||||
|
||||
@@ -245,7 +243,6 @@ namespace PortabilityLayer
|
||||
bool m_haveMenuBarLayout;
|
||||
bool m_haveIcon;
|
||||
bool m_menuBarVisible;
|
||||
bool m_isTouchScreen;
|
||||
|
||||
uint8_t m_iconColors[16 * 16];
|
||||
uint8_t m_iconMask[32];
|
||||
@@ -257,6 +254,7 @@ namespace PortabilityLayer
|
||||
static const int kHintTextCapacity = 6;
|
||||
|
||||
static size_t FormatHintText(uint8_t *buffer, uint8_t key);
|
||||
static CompositeRenderedFont GetMenuTextCompositeFont();
|
||||
|
||||
static MenuManagerImpl ms_instance;
|
||||
};
|
||||
@@ -267,7 +265,6 @@ namespace PortabilityLayer
|
||||
, m_haveIcon(false)
|
||||
, m_iconGraphic(nullptr)
|
||||
, m_menuBarVisible(false)
|
||||
, m_isTouchScreen(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -945,7 +942,7 @@ namespace PortabilityLayer
|
||||
|
||||
PortabilityLayer::QDManager *qdManager = PortabilityLayer::QDManager::GetInstance();
|
||||
|
||||
const int16_t menuHeight = m_isTouchScreen ? kTouchscreenMenuBarHeight : kMenuBarHeight;
|
||||
const int16_t menuHeight = kMenuBarHeight;
|
||||
|
||||
const Rect menuRect = Rect::Create(0, 0, menuHeight, width);
|
||||
|
||||
@@ -1048,18 +1045,9 @@ namespace PortabilityLayer
|
||||
|
||||
// Text items
|
||||
ResolveCachingColor barNormalTextColor = gs_barNormalTextColor;
|
||||
PortabilityLayer::RenderedFont *sysFont = nullptr;
|
||||
unsigned int textYOffset = 0;
|
||||
if (m_isTouchScreen)
|
||||
{
|
||||
sysFont = GetFont(kTouchScreenMenuFontPreset);
|
||||
textYOffset = kTouchScreenMenuBarTextYOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
sysFont = GetFont(kMenuFontPreset);
|
||||
textYOffset = kMenuBarTextYOffset;
|
||||
}
|
||||
PortabilityLayer::CompositeRenderedFont sysFont = GetMenuTextCompositeFont();
|
||||
|
||||
const unsigned int textYOffset = kMenuBarTextYOffset;
|
||||
|
||||
{
|
||||
Menu **menuHdl = m_firstMenu;
|
||||
@@ -1081,7 +1069,7 @@ namespace PortabilityLayer
|
||||
if (menuHdl != selectedMenuHdl)
|
||||
{
|
||||
const Point itemPos = Point::Create(static_cast<int16_t>(xCoordinate), textYOffset);
|
||||
graf->DrawString(itemPos, PLPasStr(static_cast<const uint8_t*>(menu->stringBlobHandle->m_contents)), barNormalTextColor, sysFont);
|
||||
graf->DrawString(itemPos, PLPasStr(static_cast<const uint8_t*>(menu->stringBlobHandle->m_contents)), barNormalTextColor, &sysFont);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1101,7 +1089,7 @@ namespace PortabilityLayer
|
||||
size_t xCoordinate = menu->cumulativeOffset + (menu->menuIndex * 2) * kMenuBarItemPadding + kMenuBarInitialPadding;
|
||||
|
||||
const Point itemPos = Point::Create(static_cast<int16_t>(xCoordinate), textYOffset);
|
||||
graf->DrawString(itemPos, PLPasStr(static_cast<const uint8_t*>(menu->stringBlobHandle->m_contents)), barHighlightTextColor, sysFont);
|
||||
graf->DrawString(itemPos, PLPasStr(static_cast<const uint8_t*>(menu->stringBlobHandle->m_contents)), barHighlightTextColor, &sysFont);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1130,15 +1118,8 @@ namespace PortabilityLayer
|
||||
const PixMap *pixMap = *m_menuBarGraf->m_port.GetPixMap();
|
||||
const size_t width = pixMap->m_rect.right - pixMap->m_rect.left;
|
||||
const size_t height = pixMap->m_rect.bottom - pixMap->m_rect.top;
|
||||
int32_t y = 0;
|
||||
|
||||
if (m_isTouchScreen)
|
||||
{
|
||||
unsigned int displayHeight = WindowManager::GetInstance()->GetDisplayResolution().m_y;
|
||||
y = static_cast<int32_t>(displayHeight) - kTouchscreenMenuBarHeight;
|
||||
}
|
||||
|
||||
displayDriver->DrawSurface(m_menuBarGraf->m_ddSurface, 0, y, width, height, nullptr);
|
||||
displayDriver->DrawSurface(m_menuBarGraf->m_ddSurface, 0, 0, width, height, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1167,16 +1148,6 @@ namespace PortabilityLayer
|
||||
}
|
||||
}
|
||||
|
||||
void MenuManagerImpl::SetMenuTouchScreenStyle(bool isTouchScreenStyle)
|
||||
{
|
||||
m_isTouchScreen = isTouchScreenStyle;
|
||||
}
|
||||
|
||||
bool MenuManagerImpl::IsMenuTouchScreenStyle() const
|
||||
{
|
||||
return m_isTouchScreen;
|
||||
}
|
||||
|
||||
void MenuManagerImpl::RefreshMenuBarLayout()
|
||||
{
|
||||
if (m_haveMenuBarLayout)
|
||||
@@ -1184,19 +1155,7 @@ namespace PortabilityLayer
|
||||
|
||||
PortabilityLayer::FontManager *fontManager = PortabilityLayer::FontManager::GetInstance();
|
||||
|
||||
PortabilityLayer::RenderedFont *rfont = nullptr;
|
||||
PortabilityLayer::FontFamily *fontFamily = nullptr;
|
||||
|
||||
unsigned int fontSize = 0;
|
||||
unsigned int fontFlags = 0;
|
||||
|
||||
if (m_isTouchScreen)
|
||||
rfont = GetFont(kTouchScreenMenuFontPreset);
|
||||
else
|
||||
rfont = GetFont(kMenuFontPreset);
|
||||
|
||||
if (!rfont)
|
||||
return;
|
||||
PortabilityLayer::CompositeRenderedFont sysFont = GetMenuTextCompositeFont();
|
||||
|
||||
unsigned int index = 0;
|
||||
size_t measuredWidth = 0;
|
||||
@@ -1217,7 +1176,7 @@ namespace PortabilityLayer
|
||||
menu->isIcon = true;
|
||||
}
|
||||
else
|
||||
menu->unpaddedTitleWidth = rfont->MeasureString(pascalStr.UChars(), pascalStr.Length());
|
||||
menu->unpaddedTitleWidth = sysFont.MeasureString(pascalStr.UChars(), pascalStr.Length());
|
||||
|
||||
measuredWidth += menu->unpaddedTitleWidth;
|
||||
|
||||
@@ -1234,9 +1193,7 @@ namespace PortabilityLayer
|
||||
|
||||
PortabilityLayer::FontManager *fontManager = PortabilityLayer::FontManager::GetInstance();
|
||||
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(kMenuFontPreset);
|
||||
if (!rfont)
|
||||
return;
|
||||
PortabilityLayer::CompositeRenderedFont rfont = GetMenuTextCompositeFont();
|
||||
|
||||
const uint8_t *strBlob = static_cast<const uint8_t*>(menu->stringBlobHandle->m_contents);
|
||||
|
||||
@@ -1258,7 +1215,7 @@ namespace PortabilityLayer
|
||||
const uint8_t *itemName = strBlob + item.nameOffsetInStringBlob;
|
||||
const PLPasStr itemNamePStr = PLPasStr(itemName);
|
||||
|
||||
const size_t nameWidth = rfont->MeasureString(itemNamePStr.UChars(), itemNamePStr.Length());
|
||||
const size_t nameWidth = rfont.MeasureString(itemNamePStr.UChars(), itemNamePStr.Length());
|
||||
|
||||
const size_t paddedWidth = nameWidth + kMenuItemLeftPadding + kMenuItemRightPadding;
|
||||
|
||||
@@ -1270,7 +1227,7 @@ namespace PortabilityLayer
|
||||
{
|
||||
uint8_t hintText[kHintTextCapacity];
|
||||
const size_t hintLength = FormatHintText(hintText, item.key);
|
||||
hintWidth = std::max<size_t>(rfont->MeasureString(hintText, hintLength) + kMenuItemRightPadding, hintWidth);
|
||||
hintWidth = std::max<size_t>(rfont.MeasureString(hintText, hintLength) + kMenuItemRightPadding, hintWidth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1386,13 +1343,7 @@ namespace PortabilityLayer
|
||||
|
||||
bool MenuManagerImpl::IsYInMenuBarRange(int32_t y) const
|
||||
{
|
||||
if (m_isTouchScreen)
|
||||
{
|
||||
unsigned int displayHeight = WindowManager::GetInstance()->GetDisplayResolution().m_y;
|
||||
return y >= (static_cast<int32_t>(displayHeight - kTouchscreenMenuBarHeight)) && y < static_cast<int32_t>(displayHeight);
|
||||
}
|
||||
else
|
||||
return y >= 0 && y < static_cast<int32_t>(kMenuBarHeight);
|
||||
return y >= 0 && y < static_cast<int32_t>(kMenuBarHeight);
|
||||
}
|
||||
|
||||
bool MenuManagerImpl::ItemIsSeparator(const Menu &menu, const MenuItem &item)
|
||||
@@ -1405,14 +1356,31 @@ namespace PortabilityLayer
|
||||
|
||||
size_t MenuManagerImpl::FormatHintText(uint8_t *buffer, uint8_t key)
|
||||
{
|
||||
buffer[0] = 'C';
|
||||
buffer[1] = 't';
|
||||
buffer[2] = 'r';
|
||||
buffer[3] = 'l';
|
||||
buffer[4] = '+';
|
||||
buffer[5] = key;
|
||||
if (PLDrivers::GetSystemServices()->GetOperatingSystem() == GpOperatingSystems::kMacOS)
|
||||
{
|
||||
buffer[0] = 0x11; // Command symbol
|
||||
buffer[1] = key;
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer[0] = 'C';
|
||||
buffer[1] = 't';
|
||||
buffer[2] = 'r';
|
||||
buffer[3] = 'l';
|
||||
buffer[4] = '+';
|
||||
buffer[5] = key;
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
|
||||
return 6;
|
||||
|
||||
CompositeRenderedFont MenuManagerImpl::GetMenuTextCompositeFont()
|
||||
{
|
||||
PortabilityLayer::RenderedFont *sysFont = GetFont(kMenuFontPreset);
|
||||
PortabilityLayer::RenderedFont *symbolsFont = GetFont(kMenuFontSymbolsPreset);
|
||||
|
||||
return CompositeRenderedFont(symbolsFont, sysFont);
|
||||
}
|
||||
|
||||
MenuManagerImpl *MenuManagerImpl::GetInstance()
|
||||
@@ -1580,7 +1548,7 @@ namespace PortabilityLayer
|
||||
surface->FillRect(Rect::Create(static_cast<int16_t>(menu->layoutFinalHeight - 1), 1, static_cast<int16_t>(menu->layoutFinalHeight), static_cast<int16_t>(menu->layoutWidth - 1)), darkGrayColor);
|
||||
}
|
||||
|
||||
PortabilityLayer::RenderedFont *sysFont = GetFont(kMenuFontPreset);
|
||||
PortabilityLayer::CompositeRenderedFont compositeFont = GetMenuTextCompositeFont();
|
||||
|
||||
const uint8_t *strBlob = static_cast<const uint8_t*>(menu->stringBlobHandle->m_contents);
|
||||
|
||||
@@ -1611,7 +1579,7 @@ namespace PortabilityLayer
|
||||
else
|
||||
itemTextAndCheckColor = gs_barDisabledTextColor;
|
||||
|
||||
surface->DrawString(itemPos, PLPasStr(strBlob + item.nameOffsetInStringBlob), itemTextAndCheckColor, sysFont);
|
||||
surface->DrawString(itemPos, PLPasStr(strBlob + item.nameOffsetInStringBlob), itemTextAndCheckColor, &compositeFont);
|
||||
|
||||
if (item.key)
|
||||
{
|
||||
@@ -1619,7 +1587,7 @@ namespace PortabilityLayer
|
||||
|
||||
uint8_t hintText[kHintTextCapacity];
|
||||
const size_t hintLength = FormatHintText(hintText, item.key);
|
||||
surface->DrawString(hintPos, PLPasStr(hintLength, reinterpret_cast<const char*>(hintText)), itemTextAndCheckColor, sysFont);
|
||||
surface->DrawString(hintPos, PLPasStr(hintLength, reinterpret_cast<const char*>(hintText)), itemTextAndCheckColor, &compositeFont);
|
||||
}
|
||||
|
||||
if (item.checked)
|
||||
@@ -1651,7 +1619,7 @@ namespace PortabilityLayer
|
||||
|
||||
itemPos.v = item.layoutYOffset + kMenuItemTextYOffset;
|
||||
|
||||
surface->DrawString(itemPos, PLPasStr(strBlob + item.nameOffsetInStringBlob), barHighlightTextColor, sysFont);
|
||||
surface->DrawString(itemPos, PLPasStr(strBlob + item.nameOffsetInStringBlob), barHighlightTextColor, &compositeFont);
|
||||
|
||||
if (item.key)
|
||||
{
|
||||
@@ -1659,7 +1627,7 @@ namespace PortabilityLayer
|
||||
|
||||
uint8_t hintText[kHintTextCapacity];
|
||||
const size_t hintLength = FormatHintText(hintText, item.key);
|
||||
surface->DrawString(hintPos, PLPasStr(hintLength, reinterpret_cast<const char*>(hintText)), barHighlightTextColor, sysFont);
|
||||
surface->DrawString(hintPos, PLPasStr(hintLength, reinterpret_cast<const char*>(hintText)), barHighlightTextColor, &compositeFont);
|
||||
|
||||
if (item.checked)
|
||||
surface->FillRect(Rect::Create(item.layoutYOffset + kMenuItemCheckTopOffset, kMenuItemCheckLeftOffset, item.layoutYOffset + kMenuItemCheckBottomOffset, kMenuItemCheckRightOffset), barHighlightTextColor);
|
||||
|
@@ -58,9 +58,6 @@ namespace PortabilityLayer
|
||||
|
||||
virtual void RenderFrame(IGpDisplayDriver *displayDriver) = 0;
|
||||
|
||||
virtual void SetMenuTouchScreenStyle(bool isTouchScreenStyle) = 0;
|
||||
virtual bool IsMenuTouchScreenStyle() const = 0;
|
||||
|
||||
static MenuManager *GetInstance();
|
||||
};
|
||||
}
|
||||
|
@@ -244,8 +244,26 @@ typedef BEInteger<int32_t> BEInt32_t;
|
||||
typedef BEInteger<uint16_t> BEUInt16_t;
|
||||
typedef BEInteger<uint32_t> BEUInt32_t;
|
||||
|
||||
struct BEFixed32_t
|
||||
struct BESFixed32_t
|
||||
{
|
||||
BEInt16_t m_intPart;
|
||||
BEUInt16_t m_fracPart;
|
||||
};
|
||||
|
||||
struct BEUFixed32_t
|
||||
{
|
||||
BEUInt16_t m_intPart;
|
||||
BEUInt16_t m_fracPart;
|
||||
};
|
||||
|
||||
struct BESFixed16_t
|
||||
{
|
||||
int8_t m_intPart;
|
||||
uint8_t m_fracPart;
|
||||
};
|
||||
|
||||
struct BEUFixed16_t
|
||||
{
|
||||
uint8_t m_intPart;
|
||||
uint8_t m_fracPart;
|
||||
};
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
struct MMHandleBlock;
|
||||
@@ -24,6 +26,7 @@ class THandle final : public THandleBase
|
||||
{
|
||||
public:
|
||||
THandle();
|
||||
THandle(std::nullptr_t);
|
||||
THandle(T **hdl);
|
||||
explicit THandle(PortabilityLayer::MMHandleBlock *hdl);
|
||||
THandle(const THandle<T> &other);
|
||||
@@ -46,6 +49,9 @@ public:
|
||||
bool operator==(T** other) const;
|
||||
bool operator!=(T** other) const;
|
||||
|
||||
bool operator==(std::nullptr_t) const;
|
||||
bool operator!=(std::nullptr_t) const;
|
||||
|
||||
static THandle<T> NullPtr();
|
||||
};
|
||||
|
||||
@@ -74,6 +80,12 @@ inline THandle<T>::THandle()
|
||||
{
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline THandle<T>::THandle(std::nullptr_t)
|
||||
: THandleBase(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline THandle<T>::THandle(T **hdl)
|
||||
: THandleBase(reinterpret_cast<PortabilityLayer::MMHandleBlock*>(hdl))
|
||||
@@ -107,17 +119,33 @@ inline bool THandle<T>::operator!=(const THandle<T> &other) const
|
||||
template<class T>
|
||||
inline bool THandle<T>::operator==(T** other) const
|
||||
{
|
||||
if (other == nullptr)
|
||||
return m_hdl == nullptr;
|
||||
return static_cast<void*>(&m_hdl->m_contents) == static_cast<void*>(other);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline bool THandle<T>::operator!=(T** other) const
|
||||
{
|
||||
if (other == nullptr)
|
||||
return m_hdl != nullptr;
|
||||
return static_cast<void*>(&m_hdl->m_contents) != static_cast<void*>(other);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
THandle<T> THandle<T>::NullPtr()
|
||||
inline bool THandle<T>::operator==(std::nullptr_t) const
|
||||
{
|
||||
return m_hdl == nullptr;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline bool THandle<T>::operator!=(std::nullptr_t) const
|
||||
{
|
||||
return m_hdl != nullptr;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline THandle<T> THandle<T>::NullPtr()
|
||||
{
|
||||
return THandle<T>(static_cast<PortabilityLayer::MMHandleBlock *>(nullptr));
|
||||
}
|
||||
|
@@ -12,6 +12,8 @@ static bool BitTestEitherSpecial(const KeyDownStates &keyMap, int eitherSpecial)
|
||||
return keyMap.m_special.Get(GpKeySpecials::kLeftShift) || keyMap.m_special.Get(GpKeySpecials::kRightShift);
|
||||
case KeyEventEitherSpecialCategories::kControl:
|
||||
return keyMap.m_special.Get(GpKeySpecials::kLeftCtrl) || keyMap.m_special.Get(GpKeySpecials::kRightCtrl);
|
||||
case KeyEventEitherSpecialCategories::kCommand:
|
||||
return keyMap.m_special.Get(GpKeySpecials::kLeftCommand) || keyMap.m_special.Get(GpKeySpecials::kRightCommand);
|
||||
default:
|
||||
assert(false);
|
||||
return false;
|
||||
|
@@ -26,6 +26,7 @@ namespace KeyEventEitherSpecialCategories
|
||||
kControl,
|
||||
kAlt,
|
||||
kShift,
|
||||
kCommand,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,6 +44,7 @@ namespace KeyEventEitherSpecialCategories
|
||||
#define PL_KEY_NUMPAD_SPECIAL_ENCODE(k) ((KeyEventType_NumPadSpecial) | ((k) << PL_INPUT_TYPE_CODE_BITS))
|
||||
#define PL_KEY_FKEY(k) ((KeyEventType_FKey) | ((k) << PL_INPUT_TYPE_CODE_BITS))
|
||||
#define PL_KEY_EITHER_SPECIAL(k) ((KeyEventType_EitherSpecial) | ((KeyEventEitherSpecialCategories::k) << PL_INPUT_TYPE_CODE_BITS))
|
||||
#define PL_KEY_SHORTCUT (GetShortcutKeySpecial())
|
||||
#define PL_KEY_GAMEPAD_BUTTON(k, pl) ((KeyEventType_GamepadButton) | (pl << PL_INPUT_TYPE_CODE_BITS) | ((GpGamepadButtons::k) << (PL_INPUT_TYPE_CODE_BITS + PL_INPUT_PLAYER_INDEX_BITS)))
|
||||
#define PL_KEY_GAMEPAD_BUTTON_ENCODE(k, pl) ((KeyEventType_GamepadButton) | (pl << PL_INPUT_TYPE_CODE_BITS) | ((k) << (PL_INPUT_TYPE_CODE_BITS + PL_INPUT_PLAYER_INDEX_BITS)))
|
||||
|
||||
@@ -50,6 +52,7 @@ namespace KeyEventEitherSpecialCategories
|
||||
#define PL_KEY_GET_VALUE(k) ((k) >> PL_INPUT_TYPE_CODE_BITS)
|
||||
|
||||
intptr_t PackVOSKeyCode(const GpKeyboardInputEvent &evt);
|
||||
intptr_t GetShortcutKeySpecial();
|
||||
|
||||
struct KeyDownStates
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "PLCore.h"
|
||||
#include "AppEventHandler.h"
|
||||
#include "PLDrivers.h"
|
||||
#include "PLEventQueue.h"
|
||||
#include "PLKeyEncoding.h"
|
||||
#include "PLMovies.h"
|
||||
@@ -9,6 +10,7 @@
|
||||
#include "GpVOSEvent.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpVOSEventQueue.h"
|
||||
#include "IGpSystemServices.h"
|
||||
#include "InputManager.h"
|
||||
#include "HostSuspendCallArgument.h"
|
||||
#include "HostSuspendHook.h"
|
||||
@@ -131,6 +133,15 @@ intptr_t PackVOSKeyCode(const GpKeyboardInputEvent &vosEvent)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
intptr_t GetShortcutKeySpecial()
|
||||
{
|
||||
if (PLDrivers::GetSystemServices()->GetOperatingSystem() == GpOperatingSystems::kMacOS)
|
||||
return PL_KEY_EITHER_SPECIAL(kCommand);
|
||||
else
|
||||
return PL_KEY_EITHER_SPECIAL(kControl);
|
||||
}
|
||||
|
||||
static void TranslateVOSEvent(const GpVOSEvent *vosEvent, uint32_t timestamp, PortabilityLayer::EventQueue *queue)
|
||||
{
|
||||
switch (vosEvent->m_eventType)
|
||||
@@ -158,6 +169,10 @@ static void TranslateVOSEvent(const GpVOSEvent *vosEvent, uint32_t timestamp, Po
|
||||
appHandler->OnQuit();
|
||||
|
||||
break;
|
||||
case GpVOSEventTypes::kMenuItemSelected:
|
||||
if (TimeTaggedVOSEvent *evt = queue->Enqueue())
|
||||
*evt = TimeTaggedVOSEvent::Create(*vosEvent, timestamp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -14,19 +14,19 @@
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{6EC62B0F-9353-40A4-A510-3788F1368B33}</ProjectGuid>
|
||||
<RootNamespace>PortabilityLayer</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -93,6 +93,7 @@
|
||||
<ClInclude Include="ByteUnpack.h" />
|
||||
<ClInclude Include="CFileStream.h" />
|
||||
<ClInclude Include="CombinedTimestamp.h" />
|
||||
<ClInclude Include="CompositeRenderedFont.h" />
|
||||
<ClInclude Include="DataTypes.h" />
|
||||
<ClInclude Include="DeflateCodec.h" />
|
||||
<ClInclude Include="DialogManager.h" />
|
||||
@@ -226,6 +227,7 @@
|
||||
<ClCompile Include="BitmapImage.cpp" />
|
||||
<ClCompile Include="ByteSwap.cpp" />
|
||||
<ClCompile Include="CFileStream.cpp" />
|
||||
<ClCompile Include="CompositeRenderedFont.cpp" />
|
||||
<ClCompile Include="DeflateCodec.cpp" />
|
||||
<ClCompile Include="DialogManager.cpp" />
|
||||
<ClCompile Include="DisplayDeviceManager.cpp" />
|
||||
|
@@ -426,6 +426,9 @@
|
||||
<ClInclude Include="FontPresets.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CompositeRenderedFont.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CFileStream.cpp">
|
||||
@@ -683,5 +686,8 @@
|
||||
<ClCompile Include="InflateStream.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CompositeRenderedFont.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -4,6 +4,7 @@
|
||||
#include "BitmapImage.cpp"
|
||||
#include "ByteSwap.cpp"
|
||||
#include "CFileStream.cpp"
|
||||
#include "CompositeRenderedFont.cpp"
|
||||
#include "DeflateCodec.cpp"
|
||||
#include "DialogManager.cpp"
|
||||
#include "DisplayDeviceManager.cpp"
|
||||
|
@@ -559,6 +559,7 @@ namespace PortabilityLayer
|
||||
}
|
||||
|
||||
const int componentSize = pixMapBE.m_componentSize;
|
||||
const int componentCount = pixMapBE.m_componentCount;
|
||||
|
||||
// We only support rect moves that are the same size
|
||||
if (srcRect.right - srcRect.left != destRect.right - destRect.left)
|
||||
@@ -685,7 +686,7 @@ namespace PortabilityLayer
|
||||
|
||||
if (!started)
|
||||
{
|
||||
context->Start(QDPictBlitSourceType_RGB15, params);
|
||||
context->Start(QDPictBlitSourceType_RGB15Native, params);
|
||||
started = true;
|
||||
}
|
||||
|
||||
@@ -758,8 +759,14 @@ namespace PortabilityLayer
|
||||
case 8:
|
||||
context->Start(QDPictBlitSourceType_Indexed8Bit, params);
|
||||
break;
|
||||
case 5:
|
||||
if (componentCount == 3)
|
||||
context->Start(QDPictBlitSourceType_RGB15BE, params);
|
||||
else
|
||||
return 52;
|
||||
break;
|
||||
default:
|
||||
return 52; // ???
|
||||
return 53; // ???
|
||||
}
|
||||
|
||||
started = true;
|
||||
@@ -768,14 +775,14 @@ namespace PortabilityLayer
|
||||
context->BlitScanlineAndAdvance(decompressedScanlineBuffer);
|
||||
}
|
||||
else
|
||||
return 53;
|
||||
return 54;
|
||||
}
|
||||
|
||||
// Either undocumented behavior or non-compliant PICT resources, not sure
|
||||
if (isPixMap && (stream->Tell() & 1) != 0)
|
||||
{
|
||||
if (!stream->SeekCurrent(1))
|
||||
return 54;
|
||||
return 55;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -18,7 +18,8 @@ namespace PortabilityLayer
|
||||
QDPictBlitSourceType_Indexed2Bit,
|
||||
QDPictBlitSourceType_Indexed4Bit,
|
||||
QDPictBlitSourceType_Indexed8Bit,
|
||||
QDPictBlitSourceType_RGB15,
|
||||
QDPictBlitSourceType_RGB15Native,
|
||||
QDPictBlitSourceType_RGB15BE,
|
||||
QDPictBlitSourceType_RGB24_Interleaved,
|
||||
QDPictBlitSourceType_RGB24_Multiplane,
|
||||
};
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
class PLPasStr;
|
||||
struct GpRenderedFontMetrics;
|
||||
|
@@ -20,6 +20,7 @@ namespace PortabilityLayer
|
||||
, m_numResources(0)
|
||||
, m_compiledTypeListBlob(nullptr)
|
||||
, m_numResourceTypes(0)
|
||||
, m_nameListOffset(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -343,6 +344,16 @@ namespace PortabilityLayer
|
||||
outCount = m_numResourceTypes;
|
||||
}
|
||||
|
||||
const uint8_t *ResourceFile::GetResNames() const
|
||||
{
|
||||
return m_resNameBlob;
|
||||
}
|
||||
|
||||
const size_t ResourceFile::GetResNamesSize() const
|
||||
{
|
||||
return m_resNameBlobSize;
|
||||
}
|
||||
|
||||
const ResourceCompiledTypeList *ResourceFile::GetResourceTypeList(const ResTypeID &resType)
|
||||
{
|
||||
const ResourceCompiledTypeList *tlStart = m_compiledTypeListBlob;
|
||||
|
@@ -21,6 +21,9 @@ namespace PortabilityLayer
|
||||
|
||||
void GetAllResourceTypeLists(ResourceCompiledTypeList *&outTypeLists, size_t &outCount) const;
|
||||
|
||||
const uint8_t *GetResNames() const;
|
||||
const size_t GetResNamesSize() const;
|
||||
|
||||
const ResourceCompiledTypeList *GetResourceTypeList(const ResTypeID &resType);
|
||||
THandle<void> LoadResource(const ResTypeID &resType, int id);
|
||||
|
||||
@@ -43,6 +46,8 @@ namespace PortabilityLayer
|
||||
ResourceCompiledTypeList *m_compiledTypeListBlob;
|
||||
size_t m_numResourceTypes;
|
||||
|
||||
uint32_t m_nameListOffset;
|
||||
|
||||
static bool CompiledRefSortPredicate(const ResourceCompiledRef &a, const ResourceCompiledRef &b);
|
||||
static bool CompiledTypeListSortPredicate(const ResourceCompiledTypeList &a, const ResourceCompiledTypeList &b);
|
||||
|
||||
|
@@ -186,6 +186,7 @@ namespace PortabilityLayer
|
||||
void SetWindowTitle(Window *window, const PLPasStr &title) override;
|
||||
Rect2i GetWindowFullRect(Window *window) const override;
|
||||
bool GetWindowChromeInteractionZone(Window *window, const Vec2i &point, RegionID_t &outRegion) const override;
|
||||
bool IsExclusiveWindowVisible() override;
|
||||
void SwapExclusiveWindow(Window *& windowRef) override;
|
||||
|
||||
void FlickerWindowIn(Window *window, int32_t velocity) GP_ASYNCIFY_PARANOID_OVERRIDE;
|
||||
@@ -1322,6 +1323,10 @@ namespace PortabilityLayer
|
||||
return static_cast<WindowImpl*>(window)->GetChromeInteractionZone(point, outRegion);
|
||||
}
|
||||
|
||||
bool WindowManagerImpl::IsExclusiveWindowVisible() {
|
||||
return m_exclusiveWindow != nullptr;
|
||||
}
|
||||
|
||||
void WindowManagerImpl::SwapExclusiveWindow(Window *& windowRef)
|
||||
{
|
||||
const bool hadExclusiveWindow = (m_exclusiveWindow != nullptr);
|
||||
@@ -1476,7 +1481,7 @@ namespace PortabilityLayer
|
||||
logger->Printf(IGpLogDriver::Category_Information, "WindowManagerImpl: Resizing from %ix%i to %ix%i", static_cast<int>(prevWidth), static_cast<int>(prevHeight), static_cast<int>(newWidth), static_cast<int>(newHeight));
|
||||
|
||||
const uint32_t menuBarHeight = PortabilityLayer::MenuManager::GetInstance()->GetMenuBarHeight();
|
||||
const bool menuIsTouchScreen = PortabilityLayer::MenuManager::GetInstance()->IsMenuTouchScreenStyle();
|
||||
const bool menuIsTouchScreen = false; //PortabilityLayer::MenuManager::GetInstance()->IsMenuTouchScreenStyle();
|
||||
|
||||
for (PortabilityLayer::WindowImpl *window = m_windowStackTop; window != nullptr; window = window->GetWindowBelow())
|
||||
{
|
||||
|
@@ -38,6 +38,7 @@ namespace PortabilityLayer
|
||||
virtual void SetWindowTitle(Window *window, const PLPasStr &title) = 0;
|
||||
virtual Rect2i GetWindowFullRect(Window *window) const = 0;
|
||||
virtual bool GetWindowChromeInteractionZone(Window *window, const Vec2i &point, RegionID_t &outRegion) const = 0;
|
||||
virtual bool IsExclusiveWindowVisible() = 0;
|
||||
virtual void SwapExclusiveWindow(Window *& windowRef) = 0;
|
||||
|
||||
GP_ASYNCIFY_PARANOID_VIRTUAL void FlickerWindowIn(Window *window, int32_t velocity) GP_ASYNCIFY_PARANOID_PURE;
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include "DeflateCodec.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -323,6 +324,11 @@ namespace PortabilityLayer
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (numFiles != 0)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool failed = false;
|
||||
|
||||
|
@@ -3,3 +3,12 @@
|
||||
Aerofoil is a port of John Calhoun's Glider PRO, the classic paper airplane game for Apple Macintosh computers released in 1994.
|
||||
|
||||
The port features a 90's-style GUI, gamepad support, high-quality upscaling and color correction, a full port of the level editor, a set of import tools for unpacking and converting the vast majority of existing community content, and a new touchscreen interface for mobile devices.
|
||||
|
||||
To play:
|
||||
|
||||
Windows, macOS:
|
||||
Download from the Releases page, or from https://galeforcegames.itch.io/aerofoil
|
||||
|
||||
Android: Download from Google Play Store: https://play.google.com/store/apps/details?id=org.thecodedeposit.aerofoil from itch.io: https://galeforcegames.itch.io/aerofoil, or from the Releases page
|
||||
|
||||
Browser (HTML5): Visit https://galeforcegames.itch.io/aerofoil
|
||||
|
@@ -38,7 +38,6 @@
|
||||
<Directory Id="AEROFOILHOUSESDIR" Name="Houses" />
|
||||
</Directory>
|
||||
<Directory Id="AEROFOILDOCUMENTATIONDIR" Name="Documentation" />
|
||||
<Directory Id="AEROFOILTOOLSDIR" Name="Tools" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
@@ -82,36 +81,6 @@
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="AEROFOILTOOLSDIR">
|
||||
<Component Id="bin2gp.exe" Guid="*">
|
||||
<File Id="bin2gp.exe" Source="$(var.bin2gp.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="flattenmov.exe" Guid="*">
|
||||
<File Id="flattenmov.exe" Source="$(var.flattenmov.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="FTagData.exe" Guid="*">
|
||||
<File Id="FTagData.exe" Source="$(var.FTagData.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="gpr2gpa.exe" Guid="*">
|
||||
<File Id="gpr2gpa.exe" Source="$(var.gpr2gpa.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="hqx2bin.exe" Guid="*">
|
||||
<File Id="hqx2bin.exe" Source="$(var.hqx2bin.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="hqx2gp.exe" Guid="*">
|
||||
<File Id="hqx2gp.exe" Source="$(var.hqx2gp.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="MakeTimestamp.exe" Guid="*">
|
||||
<File Id="MakeTimestamp.exe" Source="$(var.MakeTimestamp.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="unpacktool.exe" Guid="*">
|
||||
<File Id="unpacktool.exe" Source="$(var.unpacktool.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
<Component Id="MergeGPF.exe" Guid="*">
|
||||
<File Id="MergeGPF.exe" Source="$(var.MergeGPF.TargetPath)" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="AEROFOILDOCUMENTATIONDIR">
|
||||
<Component Id="readme.txt" Guid="*">
|
||||
<File Id="readme.txt" Source="$(var.DocumentationDataDir)\readme.txt" KeyPath="yes" Checksum="yes"/>
|
||||
@@ -170,18 +139,6 @@
|
||||
<Feature Id="HousePack1Feature" Title="Additional Houses" Level="1" Description="!(loc.HousePack1FeatureDescription)">
|
||||
<ComponentGroupRef Id="HousePack1ComponentGroup" />
|
||||
</Feature>
|
||||
|
||||
<Feature Id="ImportToolsFeature" Title="Data Import Utilities" Level="4" Description="!(loc.ImportToolsFeatureDescription)">
|
||||
<ComponentRef Id="bin2gp.exe" />
|
||||
<ComponentRef Id="flattenmov.exe" />
|
||||
<ComponentRef Id="FTagData.exe" />
|
||||
<ComponentRef Id="gpr2gpa.exe" />
|
||||
<ComponentRef Id="hqx2bin.exe" />
|
||||
<ComponentRef Id="hqx2gp.exe" />
|
||||
<ComponentRef Id="MakeTimestamp.exe" />
|
||||
<ComponentRef Id="unpacktool.exe" />
|
||||
<ComponentRef Id="MergeGPF.exe" />
|
||||
</Feature>
|
||||
</Feature>
|
||||
|
||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\LICENSE.rtf"/>
|
||||
@@ -189,10 +146,10 @@
|
||||
<WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)\TopBanner.bmp"/>
|
||||
|
||||
<DirectoryRef Id="TARGETDIR">
|
||||
<Merge Id="VCRedist" SourceFile="C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC140_CRT_x64.msm" DiskId="1" Language="0" />
|
||||
<Merge Id="VCRedist" SourceFile="$(var.VSInstallDir)\VC\Redist\MSVC\v142\MergeModules\Microsoft_VC142_CRT_x64.msm" DiskId="1" Language="0" />
|
||||
</DirectoryRef>
|
||||
|
||||
<Feature Id="VCRedist" Title="Microsoft Visual C++ 2017 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
|
||||
<Feature Id="VCRedist" Title="Microsoft Visual C++ 2019 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
|
||||
<MergeRef Id="VCRedist" />
|
||||
</Feature>
|
||||
|
||||
|
@@ -19,6 +19,10 @@
|
||||
<OutputPath>$(SolutionDir)ReleasePkg\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<Cultures>en-us</Cultures>
|
||||
<DefineConstants>DocumentationDataDir=$(SolutionDir)\Documentation;
|
||||
HousesDataDir=$(SolutionDir)\Packaged\Houses;
|
||||
PackagedDataDir=$(SolutionDir)\Packaged;
|
||||
VSInstallDir=$(VsInstallRoot)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Product.wxs" />
|
||||
@@ -179,6 +183,7 @@
|
||||
DocumentationDataDir=$(SolutionDir)\Documentation;
|
||||
HousesDataDir=$(SolutionDir)\Packaged\Houses;
|
||||
PackagedDataDir=$(SolutionDir)\Packaged;
|
||||
VSInstallDir=$(VsInstallRoot)
|
||||
</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Target Name="BeforeBuild">
|
||||
|
@@ -2,5 +2,4 @@
|
||||
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
<String Id="AerofoilApplicationFeatureDescription">Installs the base game and the main houses (Slumberland and Demo House)</String>
|
||||
<String Id="HousePack1FeatureDescription">Installs additional houses from the Glider PRO CD-ROM and the CD demo house from the open source release.</String>
|
||||
<String Id="ImportToolsFeatureDescription">Installs tools for importing houses created by the original Macintosh version of Glider PRO.</String>
|
||||
</WixLocalization>
|
||||
|
BIN
Resources/Fonts/Inter/Inter-Black.ttf
Normal file
BIN
Resources/Fonts/Inter/Inter-Black.ttf
Normal file
Binary file not shown.
BIN
Resources/Fonts/Inter/Inter-Bold.ttf
Normal file
BIN
Resources/Fonts/Inter/Inter-Bold.ttf
Normal file
Binary file not shown.
BIN
Resources/Fonts/Inter/Inter-ExtraBold.ttf
Normal file
BIN
Resources/Fonts/Inter/Inter-ExtraBold.ttf
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user