Skip to content

Instantly share code, notes, and snippets.

View fodinabor's full-sized avatar

Joachim Meyer fodinabor

View GitHub Profile
#include <Polycode.h>
#include "polycode/ide/PolycodeIDEApp.h"
#include "polycode/ide/PolycodeWinIDEView.h"
#include "windows.h"
#include "resource.h"
#include <Shlobj.h>
#include <Shlwapi.h>
#include <shellapi.h>
#include <Pathcch.h>
@fodinabor
fodinabor / Makefile
Created June 6, 2016 17:43
Polycode Makefile
CC=g++
SRCDIR=../../src
ASSETDIR=../../assets
.SUFFIXES: .io .do .dio
SRCCORE = $(SRCDIR)/bindings/javascript/PolycodeJS.cpp $(SRCDIR)/bindings/lua/PolycodeLua.cpp $(SRCDIR)/core/lodepng.cpp $(SRCDIR)/core/PolyBasicFileProvider.cpp $(SRCDIR)/core/PolyBezierCurve.cpp $(SRCDIR)/core/PolyBone.cpp $(SRCDIR)/core/PolyCamera.cpp $(SRCDIR)/core/PolyClient.cpp $(SRCDIR)/core/PolyColor.cpp $(SRCDIR)/core/PolyConfig.cpp $(SRCDIR)/core/PolyCore.cpp $(SRCDIR)/core/PolyCoreFileProvider.cpp $(SRCDIR)/core/PolyCoreInput.cpp $(SRCDIR)/core/PolyCoreServices.cpp $(SRCDIR)/core/PolyCubemap.cpp $(SRCDIR)/core/PolyData.cpp $(SRCDIR)/core/PolyEntity.cpp $(SRCDIR)/core/PolyEvent.cpp $(SRCDIR)/core/PolyEventDispatcher.cpp $(SRCDIR)/core/PolyEventHandler.cpp $(SRCDIR)/core/PolyFont.cpp $(SRCDIR)/core/PolyFontGlyphSheet.cpp $(SRCDIR)/core/PolyFontManager.cpp $(SRCDIR)/core/PolyGPUDrawBuffer.cpp $(SRCDIR)/core/PolyImage.cpp $(SRCDIR)/core/PolyInputEvent.cpp $(SRCDIR)/core/PolyLabel.cpp $(SRCDIR)/core/PolyLogger.cpp $(SRCDIR)/core/Pol
#include <Polycode.h>
#include "HelloPolycodeApp.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 Example");
@fodinabor
fodinabor / UIExample.cpp
Last active August 29, 2015 14:06
Polycode UI Needed things
CoreServices::getInstance()->getResourceManager()->addArchive("default.pak");
CoreServices::getInstance()->getResourceManager()->addDirResource("default", false);
CoreServices::getInstance()->getResourceManager()->addArchive("UIThemes.pak");
CoreServices::getInstance()->getConfig()->loadConfig("Polycode", "UIThemes/dark/theme.xml");
//creating HUD
hud = new Scene(Scene::SCENE_2D_TOPLEFT);
fps = new UILabel("FPS: " + String::NumberToString(core->getFPS()), 16, "mono"); //fps is a UILabel declared in the header file
fps->setPosition(core->getXRes() - 75, 8);
@fodinabor
fodinabor / WinCore.cpp
Created September 13, 2014 21:19
If the OFN_ALLOWMULTISELECT flag is set and the user selects multiple files, the buffer contains the current directory followed by the file names of the selected files. For Explorer-style dialog boxes, the directory and file name strings are NULL separated, with an extra NULL character after the last file name. For old-style dialog boxes, the st…
std::vector<String> Win32Core::openFilePicker(std::vector<CoreFileExtension> extensions, bool allowMultiple) {
OPENFILENAME ofn;
wchar_t fBuffer[2048];
wchar_t filterString[2048];
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof ( ofn );
@fodinabor
fodinabor / WoU.plugin
Created September 12, 2014 17:53
Plugin file loaded.
<?xml version="1.0" ?>
<plugins version="1">
<plugin name="WoUSpaceShip" polystring:fileext="" type="0">
<sheet>
<props>
<prop type="11" name="name" />
<prop type="4" name="maxHitPoints" />
<prop type="4" name="maxWeapons1Slots" />
<prop type="4" name="maxWeapons2Slots" />
<prop type="4" name="maxEngines" />
@fodinabor
fodinabor / PolycodeExample.cpp
Created April 28, 2014 19:52
Debug Console
#include <Polycode.h>
#include "HelloPolycodeApp.h"
#include "PolycodeView.h"
#include "windows.h"
using namespace Polycode;
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
#if defined(_MSC_VER) && defined(_DEBUG)
@fodinabor
fodinabor / BuildPolycode13.bat
Last active August 29, 2015 13:58
Build Polycode using Visual Studio 13
@echo on
set poly=%cd%
mkdir Build
cd Build
cmake -G "Visual Studio 12" ..
C:
cd %programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\"
devenv.exe "%poly%\Dependencies\Build\PolycodeDependencies.sln" /build "Debug|Win32" /project "ALL_BUILD"
devenv.exe "%poly%\Dependencies\Build\PolycodeDependencies.sln" /build "Release|Win32" /project "ALL_BUILD"
devenv.exe "%poly%\Dependencies\Build\PolycodeDependencies.sln" /build "Debug|Win32" /project "wglext"
@fodinabor
fodinabor / BuildDependencies.bat
Last active August 29, 2015 13:57
Build Polycode on a x64 Windows machine with VC++ 2010 Express - You have to have CMake, Python 2.x & Python-Ply installed
@echo on
set poly=%cd%
mkdir Build
cd Build
cmake -G "Visual Studio 10" ..
C:
cd %programfiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\"
VCExpress.exe "%poly%\Dependencies\Build\PolycodeDependencies.sln" /build "Debug|Win32" /project "ALL_BUILD"
VCExpress.exe "%poly%\Dependencies\Build\PolycodeDependencies.sln" /build "Release|Win32" /project "ALL_BUILD"
VCExpress.exe "%poly%\Dependencies\Build\PolycodeDependencies.sln" /build "Debug|Win32" /project "wglext"