forked from ivansafrin/Polycode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b92961b
commit d362e3d
Showing
26 changed files
with
847 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <Polycode.h> | ||
#include "PolycodeTemplateApp.h" | ||
#include "PolycodeView.h" | ||
#include "windows.h" | ||
|
||
using namespace Polycode; | ||
|
||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) | ||
{ | ||
PolycodeView *view = new PolycodeView(hInstance, nCmdShow, L"Polycode Template"); | ||
PolycodeTemplateApp *app = new PolycodeTemplateApp(view); | ||
|
||
MSG Msg; | ||
do { | ||
if(PeekMessage(&Msg, NULL, 0,0,PM_REMOVE)) { | ||
TranslateMessage(&Msg); | ||
DispatchMessage(&Msg); | ||
} | ||
} while(app->Update()); | ||
return Msg.wParam; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual C++ Express 2010 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PolycodeTemplate", "PolycodeTemplate.vcxproj", "{D6C2171B-9167-4FB6-851A-DC1CEDCFC43D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Win32 = Debug|Win32 | ||
Release|Win32 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D6C2171B-9167-4FB6-851A-DC1CEDCFC43D}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{D6C2171B-9167-4FB6-851A-DC1CEDCFC43D}.Debug|Win32.Build.0 = Debug|Win32 | ||
{D6C2171B-9167-4FB6-851A-DC1CEDCFC43D}.Release|Win32.ActiveCfg = Release|Win32 | ||
{D6C2171B-9167-4FB6-851A-DC1CEDCFC43D}.Release|Win32.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{D6C2171B-9167-4FB6-851A-DC1CEDCFC43D}</ProjectGuid> | ||
<Keyword>Win32Proj</Keyword> | ||
<RootNamespace>PolycodeTemplate</RootNamespace> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<LinkIncremental>true</LinkIncremental> | ||
<IncludePath>$(SolutionDir)..\..\Core\include;$(SolutionDir)..\..\Core\Dependencies\include;$(SolutionDir)..\..\Core\PolycodeView;$(SolutionDir)..\..\Core\Dependencies\include\AL;$(IncludePath)</IncludePath> | ||
<LibraryPath>$(SolutionDir)..\..\Core\lib;$(SolutionDir)..\..\Core\Dependencies\lib;$(LibraryPath)</LibraryPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<LinkIncremental>false</LinkIncremental> | ||
<IncludePath>$(SolutionDir)..\..\Core\Include;$(SolutionDir)..\..\Core\Dependencies\Include;$(SolutionDir)..\..\Core\Dependencies\Include\AL;$(IncludePath)</IncludePath> | ||
<LibraryPath>$(SolutionDir)..\..\Core\lib;$(SolutionDir)..\..\Core\Dependencies\lib;$(LibraryPath)</LibraryPath> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<ClCompile> | ||
<PrecompiledHeader> | ||
</PrecompiledHeader> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>Disabled</Optimization> | ||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
<AdditionalDependencies>opengl32.lib;glu32.lib;Polycore_d.lib;zlibd.lib;freetype_d.lib;liboggd.lib;libvorbisd.lib;libvorbisfiled.lib;OpenAL32d.lib;kernel32.lib;physfsd.lib;libpng15_staticd.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<PrecompiledHeader> | ||
</PrecompiledHeader> | ||
<Optimization>MaxSpeed</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<AdditionalDependencies>opengl32.lib;glu32.lib;Polycore.lib;zlib.lib;freetype.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;OpenAL32.lib;kernel32.lib;physfs.lib;libpng15_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ClCompile Include="PolycodeTemplate.cpp" /> | ||
<ClCompile Include="PolycodeTemplateApp.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="PolycodeTemplateApp.h" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "PolycodeTemplateApp.h" | ||
|
||
PolycodeTemplateApp::PolycodeTemplateApp(PolycodeView *view) { | ||
core = new Win32Core(view, 640,480,false, false, 0, 0,60); | ||
CoreServices::getInstance()->getResourceManager()->addArchive("default.pak"); | ||
CoreServices::getInstance()->getResourceManager()->addDirResource("default", false); | ||
|
||
// Write your code here | ||
} | ||
PolycodeTemplateApp::~PolycodeTemplateApp() { | ||
|
||
} | ||
|
||
bool PolycodeTemplateApp::Update() { | ||
return core->Update(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "PolycodeView.h" | ||
#include "Polycode.h" | ||
|
||
using namespace Polycode; | ||
|
||
class PolycodeTemplateApp { | ||
public: | ||
PolycodeTemplateApp(PolycodeView *view); | ||
~PolycodeTemplateApp(); | ||
|
||
bool Update(); | ||
|
||
private: | ||
Core *core; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
set(PNG_FIND_DEBUG TRUE CACHE BOOL "Also search for the debug version of the PNG library") | ||
|
||
SET(LUA_SEARCH_PATHS | ||
${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/lib | ||
${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/include | ||
${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/include/libpng15 | ||
${POLYCODE_RELEASE_DIR}/Framework/Modules/Dependencies/lib | ||
${POLYCODE_RELEASE_DIR}/Framework/Tools/Dependencies/lib | ||
) | ||
|
||
if(PNG_FIND_DEBUG) | ||
if(PNG_INCLUDE_DIR AND PNG_LIBRARY AND PNG_LIBRARY_DEBUG) | ||
set(PNG_FIND_QUIETLY TRUE) | ||
endif(PNG_INCLUDE_DIR AND PNG_LIBRARY AND PNG_LIBRARY_DEBUG) | ||
else(PNG_FIND_DEBUG) | ||
if(PNG_INCLUDE_DIR AND PNG_LIBRARY) | ||
set(PNG_FIND_QUIETLY TRUE) | ||
endif(PNG_INCLUDE_DIR AND PNG_LIBRARY) | ||
endif(PNG_FIND_DEBUG) | ||
|
||
find_path(PNG_INCLUDE_DIR png.h DOC "Directory containing png.h") | ||
|
||
find_library(PNG_LIBRARY NAMES png libpng png15 libpng15 libpng15_static DOC "Path to PNG library") | ||
if(PNG_FIND_DEBUG) | ||
find_library(PNG_LIBRARY_DEBUG NAMES pngd libpngd png15d libpng15d libpng15_staticd DOC "Path to PNG debug library") | ||
endif(PNG_FIND_DEBUG) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(PNG DEFAULT_MSG PNG_LIBRARY PNG_INCLUDE_DIR) | ||
|
||
if(PNG_FOUND) | ||
if(PNG_FIND_DEBUG) | ||
if(NOT PNG_LIBRARY_DEBUG) | ||
set(PNG_LIBRARY_DEBUG ${PNG_LIBRARY}) | ||
endif(NOT PNG_LIBRARY_DEBUG) | ||
set(PNG_LIBRARIES debug ${PNG_LIBRARY_DEBUG} optimized ${PNG_LIBRARY}) | ||
else(PNG_FIND_DEBUG) | ||
set(PNG_LIBRARIES ${PNG_LIBRARY}) | ||
endif(PNG_FIND_DEBUG) | ||
else(PNG_FOUND) | ||
SET(PNG_LIBRARIES ) | ||
endif(PNG_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.