runtime: CMake-ify
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
project(gxruntime)
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC
|
||||
"asmcoder.hpp"
|
||||
"asmcoder.cpp"
|
||||
"ddutil.hpp"
|
||||
"ddutil.cpp"
|
||||
"graphicsruntime.hpp"
|
||||
"gxaudio.hpp"
|
||||
"gxaudio.cpp"
|
||||
"gxcanvas.hpp"
|
||||
"gxcanvas.cpp"
|
||||
"gxchannel.hpp"
|
||||
"gxchannel.cpp"
|
||||
"gxdevice.hpp"
|
||||
"gxdevice.cpp"
|
||||
"gxdir.hpp"
|
||||
"gxdir.cpp"
|
||||
"gxfilesystem.hpp"
|
||||
"gxfilesystem.cpp"
|
||||
"gxfont.hpp"
|
||||
"gxfont.cpp"
|
||||
"gxgraphics.hpp"
|
||||
"gxgraphics.cpp"
|
||||
"gxinput.hpp"
|
||||
"gxinput.cpp"
|
||||
"gxlight.hpp"
|
||||
"gxlight.cpp"
|
||||
"gxmesh.hpp"
|
||||
"gxmesh.cpp"
|
||||
"gxmovie.hpp"
|
||||
"gxmovie.cpp"
|
||||
"gxmusic.hpp"
|
||||
"gxmusic.cpp"
|
||||
"gxruntime.hpp"
|
||||
"gxruntime.cpp"
|
||||
"gxscene.hpp"
|
||||
"gxscene.cpp"
|
||||
"gxsound.hpp"
|
||||
"gxsound.cpp"
|
||||
"gxtimer.hpp"
|
||||
"gxtimer.cpp"
|
||||
"std.hpp"
|
||||
"std.cpp"
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
stdutil
|
||||
PUBLIC
|
||||
shell32
|
||||
winmm
|
||||
${fmod_LIBRARIES}
|
||||
${FreeImage_LIBRARIES}
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
"${fmod_INCLUDE_DIRS}"
|
||||
"${FreeImage_INCLUDE_DIRS}"
|
||||
PUBLIC
|
||||
${PROJECT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
# windows.hpp
|
||||
WIN32_LEAN_AND_MEAN
|
||||
NOGPICAPMASKS
|
||||
#NOVIRTUALKEYCODES
|
||||
#NOWINMESSAGES
|
||||
#NOWINSTYLES
|
||||
#NOSYSMETRICS
|
||||
NOMENUS
|
||||
NOICONS
|
||||
#NOKEYSTATES
|
||||
NOSYSCOMMANDS
|
||||
NORASTEROPS
|
||||
#NOSHOWWINDOW
|
||||
NOATOM
|
||||
NOCLIPBOARD
|
||||
NOCOLOR
|
||||
NOCTLMGR
|
||||
NODRAWTEXT
|
||||
#NOGDI
|
||||
NOKERNEL
|
||||
#NOUSER
|
||||
NONLS
|
||||
#NOMB
|
||||
NOMEMMGR
|
||||
NOMETAFILE
|
||||
#NOMSG
|
||||
NOOPENFILE
|
||||
NOSCROLL
|
||||
NOSERVICE
|
||||
NOSOUND
|
||||
#NOTEXTMETRIC
|
||||
NOWH
|
||||
#NOWINOFFSETS
|
||||
NOCOMM
|
||||
NOKANJI
|
||||
NOHELP
|
||||
NOPROFILER
|
||||
NODEFERWINDOWPOS
|
||||
NOMCX
|
||||
NOIME
|
||||
NOMDI
|
||||
NOMINMAX
|
||||
NOINOUT
|
||||
)
|
||||
endif()
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "asmcoder.h"
|
||||
#include "asmcoder.hpp"
|
||||
|
||||
void (__fastcall *plot)(void *s,int argb);
|
||||
int (__fastcall *point)(void*s);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "std.h"
|
||||
#include "ddutil.h"
|
||||
#include "asmcoder.h"
|
||||
#include "gxcanvas.h"
|
||||
#include "gxruntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
#include "std.hpp"
|
||||
#include "ddutil.hpp"
|
||||
#include "asmcoder.hpp"
|
||||
#include "gxcanvas.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
#define FREEIMAGE_LIB
|
||||
#include "..\#ThirdParty\FreeImage\Dist\x32\freeimage.h"
|
||||
#include <freeimage.h>
|
||||
|
||||
extern gxRuntime *gx_runtime;
|
||||
static AsmCoder asm_coder;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef DDUTIL_H
|
||||
#define DDUTIL_H
|
||||
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
|
||||
class gxGraphics;
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
// Direct Draw
|
||||
#define DIRECTDRAW_VERSION 0x0700
|
||||
#include <ddraw.h>
|
||||
|
||||
// Direct3D
|
||||
#define DIRECT3D_VERSION 0x0700
|
||||
#include <d3d.h>
|
||||
|
||||
// Direct Input
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
|
||||
// Redefine GUIDs
|
||||
DEFINE_GUID(CLSID_DirectDraw, 0xD7B70EE0, 0x4340, 0x11CF, 0xB0, 0x63, 0x00, 0x20, 0xAF, 0xC2, 0xCD, 0x35);
|
||||
DEFINE_GUID(CLSID_DirectDraw7, 0x3c305196, 0x50db, 0x11d3, 0x9c, 0xfe, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc5);
|
||||
DEFINE_GUID(CLSID_DirectDrawClipper, 0x593817A0, 0x7DB3, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xb9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirectDraw, 0x6C14DB80, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirectDraw4, 0x9c59509a, 0x39bd, 0x11d1, 0x8c, 0x4a, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc5);
|
||||
DEFINE_GUID(IID_IDirectDraw7, 0x15e65ec0, 0x3b9c, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface, 0x6C14DB81, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface2, 0x57805885, 0x6eec, 0x11cf, 0x94, 0x41, 0xa8, 0x23, 0x03, 0xc1, 0x0e, 0x27);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface3, 0xDA044E00, 0x69B2, 0x11D0, 0xA1, 0xD5, 0x00, 0xAA, 0x00, 0xB8, 0xDF, 0xBB);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface4, 0x0B2B8630, 0xAD35, 0x11D0, 0x8E, 0xA6, 0x00, 0x60, 0x97, 0x97, 0xEA, 0x5B);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface7, 0x06675a80, 0x3b9b, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b);
|
||||
DEFINE_GUID(IID_IDirectDrawPalette, 0x6C14DB84, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDrawClipper, 0x6C14DB85, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDrawColorControl, 0x4B9F0EE0, 0x0D7E, 0x11D0, 0x9B, 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8);
|
||||
DEFINE_GUID(IID_IDirectDrawGammaControl, 0x69C11C3E, 0xB46B, 0x11D1, 0xAD, 0x7A, 0x00, 0xC0, 0x4F, 0xC2, 0x9B, 0x4E);
|
||||
DEFINE_GUID(CLSID_AMMultiMediaStream, 0x49c47ce5, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0xd, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
DEFINE_GUID(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
DEFINE_GUID(MSPID_PrimaryAudio, 0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
DEFINE_GUID(IID_IDirect3D7, 0xf5049e77, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20, 0x259F, 0x11CF, 0xA3, 0x1A, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60, 0x2673, 0x11CF, 0xA3, 0x1A, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0, 0x46AA, 0x11CF, 0x81, 0x6F, 0x00, 0x00, 0xC0, 0x20, 0x15, 0x6E);
|
||||
DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1, 0xd6f3, 0x11d0, 0x89, 0xab, 0x00, 0xa0, 0xc9, 0x05, 0x41, 0x29);
|
||||
DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
|
||||
DEFINE_GUID(IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
// Direct Draw
|
||||
#define DIRECTDRAW_VERSION 0x0700
|
||||
#include <ddraw.h>
|
||||
|
||||
// Direct3D
|
||||
#define DIRECT3D_VERSION 0x0700
|
||||
#include <d3d.h>
|
||||
|
||||
// Direct Input
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
|
||||
// Redefine GUIDs
|
||||
DEFINE_GUID(CLSID_DirectDraw, 0xD7B70EE0, 0x4340, 0x11CF, 0xB0, 0x63, 0x00, 0x20, 0xAF, 0xC2, 0xCD, 0x35);
|
||||
DEFINE_GUID(CLSID_DirectDraw7, 0x3c305196, 0x50db, 0x11d3, 0x9c, 0xfe, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc5);
|
||||
DEFINE_GUID(CLSID_DirectDrawClipper, 0x593817A0, 0x7DB3, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xb9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirectDraw, 0x6C14DB80, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirectDraw4, 0x9c59509a, 0x39bd, 0x11d1, 0x8c, 0x4a, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc5);
|
||||
DEFINE_GUID(IID_IDirectDraw7, 0x15e65ec0, 0x3b9c, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface, 0x6C14DB81, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface2, 0x57805885, 0x6eec, 0x11cf, 0x94, 0x41, 0xa8, 0x23, 0x03, 0xc1, 0x0e, 0x27);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface3, 0xDA044E00, 0x69B2, 0x11D0, 0xA1, 0xD5, 0x00, 0xAA, 0x00, 0xB8, 0xDF, 0xBB);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface4, 0x0B2B8630, 0xAD35, 0x11D0, 0x8E, 0xA6, 0x00, 0x60, 0x97, 0x97, 0xEA, 0x5B);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface7, 0x06675a80, 0x3b9b, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b);
|
||||
DEFINE_GUID(IID_IDirectDrawPalette, 0x6C14DB84, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDrawClipper, 0x6C14DB85, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
DEFINE_GUID(IID_IDirectDrawColorControl, 0x4B9F0EE0, 0x0D7E, 0x11D0, 0x9B, 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8);
|
||||
DEFINE_GUID(IID_IDirectDrawGammaControl, 0x69C11C3E, 0xB46B, 0x11D1, 0xAD, 0x7A, 0x00, 0xC0, 0x4F, 0xC2, 0x9B, 0x4E);
|
||||
DEFINE_GUID(CLSID_AMMultiMediaStream, 0x49c47ce5, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
|
||||
DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0xd, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
DEFINE_GUID(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
DEFINE_GUID(MSPID_PrimaryAudio, 0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
DEFINE_GUID(IID_IDirect3D7, 0xf5049e77, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20, 0x259F, 0x11CF, 0xA3, 0x1A, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60, 0x2673, 0x11CF, 0xA3, 0x1A, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56);
|
||||
DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0, 0x46AA, 0x11CF, 0x81, 0x6F, 0x00, 0x00, 0xC0, 0x20, 0x15, 0x6E);
|
||||
DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1, 0xd6f3, 0x11d0, 0x89, 0xab, 0x00, 0xa0, 0xc9, 0x05, 0x41, 0x29);
|
||||
DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
|
||||
DEFINE_GUID(IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxaudio.h"
|
||||
#include "std.hpp"
|
||||
#include "gxaudio.hpp"
|
||||
#include <fmod.h>
|
||||
|
||||
struct StaticChannel : public gxChannel{
|
||||
virtual void play()=0;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "gxsound.h"
|
||||
#include "gxsound.hpp"
|
||||
|
||||
class gxRuntime;
|
||||
struct FSOUND_SAMPLE;
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxcanvas.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "gxruntime.h"
|
||||
#include "asmcoder.h"
|
||||
#include "std.hpp"
|
||||
#include "gxcanvas.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
#include "asmcoder.hpp"
|
||||
|
||||
#define DEBUG_BITMASK
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef GXCANVAS_H
|
||||
#define GXCANVAS_H
|
||||
|
||||
#include "ddutil.h"
|
||||
#include "ddutil.hpp"
|
||||
|
||||
class gxFont;
|
||||
class gxGraphics;
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxchannel.h"
|
||||
#include "std.hpp"
|
||||
#include "gxchannel.hpp"
|
||||
|
||||
gxChannel::~gxChannel(){
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxdevice.h"
|
||||
#include "gxruntime.h"
|
||||
#include "std.hpp"
|
||||
#include "gxdevice.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
gxDevice::gxDevice(){
|
||||
reset();
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxdir.h"
|
||||
#include "std.hpp"
|
||||
#include "gxdir.hpp"
|
||||
|
||||
gxDir::gxDir( HANDLE h,const WIN32_FIND_DATA &f ):handle(h),findData(f){
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxfilesystem.h"
|
||||
#include "std.hpp"
|
||||
#include "gxfilesystem.hpp"
|
||||
|
||||
static set<gxDir*> dir_set;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "gxdir.h"
|
||||
#include "gxdir.hpp"
|
||||
|
||||
class gxFileSystem{
|
||||
public:
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxfont.h"
|
||||
#include "gxcanvas.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "std.hpp"
|
||||
#include "gxfont.hpp"
|
||||
#include "gxcanvas.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
|
||||
gxFont::gxFont( gxGraphics *g,gxCanvas *c,int w,int h,int b,int e,int d,int *os,int *ws ):
|
||||
graphics(g),canvas(c),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "gxruntime.h"
|
||||
#include "std.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
extern gxRuntime *gx_runtime;
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
#include <windows.h>
|
||||
#include <d3d.h>
|
||||
|
||||
#include "ddutil.h"
|
||||
#include "ddutil.hpp"
|
||||
|
||||
#include "gxfont.h"
|
||||
#include "gxcanvas.h"
|
||||
#include "gxscene.h"
|
||||
#include "gxmesh.h"
|
||||
#include "gxmovie.h"
|
||||
#include "gxfont.hpp"
|
||||
#include "gxcanvas.hpp"
|
||||
#include "gxscene.hpp"
|
||||
#include "gxmesh.hpp"
|
||||
#include "gxmovie.hpp"
|
||||
|
||||
class gxRuntime;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "std.h"
|
||||
#include "gxinput.h"
|
||||
#include "gxruntime.h"
|
||||
#include "std.hpp"
|
||||
#include "gxinput.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
static const int QUE_SIZE = 32;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "std.h"
|
||||
#include "gxdevice.h"
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "std.hpp"
|
||||
#include "gxdevice.hpp"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
|
||||
class gxRuntime;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxlight.h"
|
||||
#include "gxscene.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "std.hpp"
|
||||
#include "gxlight.hpp"
|
||||
#include "gxscene.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
|
||||
const float PI=3.14159265359f; //180 degrees
|
||||
const float TWOPI=PI*2.0f; //360 degrees
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
|
||||
#ifndef GXLIGHT_H
|
||||
#define GXLIGHT_H
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxmesh.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "std.hpp"
|
||||
#include "gxmesh.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
|
||||
#include "gxruntime.h"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
extern gxRuntime *gx_runtime;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define GXMESH_H
|
||||
|
||||
#include <windows.h>
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
#include <d3d.h>
|
||||
|
||||
class gxGraphics;
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxmovie.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "std.hpp"
|
||||
#include "gxmovie.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
|
||||
gxMovie::gxMovie(gxGraphics *g, IMultiMediaStream *mm)
|
||||
:gfx(g), mm_stream(mm), playing(true) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "amstream.h" // DirectShow multimedia stream interfaces
|
||||
#include "ddstream.h" // DirectDraw multimedia stream interfaces
|
||||
|
||||
#include "gxcanvas.h"
|
||||
#include "gxcanvas.hpp"
|
||||
|
||||
class gxGraphics;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxmusic.h"
|
||||
#include "std.hpp"
|
||||
#include "gxmusic.hpp"
|
||||
#include <fmod.h>
|
||||
|
||||
gxMusic::gxMusic( gxAudio *a,FMUSIC_MODULE *m,FSOUND_STREAM *s ):
|
||||
audio(a),module(m),stream(s),stream_channel(-1){
|
||||
|
||||
+23
-21
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "std.h"
|
||||
#include "gxruntime.h"
|
||||
#include "zmouse.h"
|
||||
#include "windows.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
#include "std.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
#include <zmouse.h>
|
||||
#include <windows.h>
|
||||
#include <fmod.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
struct gxRuntime::GfxMode {
|
||||
DDSURFACEDESC2 desc;
|
||||
@@ -53,7 +55,7 @@ static int mod_cnt;
|
||||
static MMRESULT timerID;
|
||||
static IDirectDrawClipper *clipper;
|
||||
static IDirectDrawSurface7 *primSurf;
|
||||
static Debugger *debugger;
|
||||
//static Debugger *debugger;
|
||||
|
||||
static set<gxTimer*> timers;
|
||||
|
||||
@@ -64,11 +66,11 @@ enum {
|
||||
////////////////////
|
||||
// STATIC STARTUP //
|
||||
////////////////////
|
||||
gxRuntime *gxRuntime::openRuntime(HINSTANCE hinst, const string &cmd_line, Debugger *d) {
|
||||
gxRuntime *gxRuntime::openRuntime(HINSTANCE hinst, const string &cmd_line, void* d) {
|
||||
if (runtime) return 0;
|
||||
|
||||
//create debugger
|
||||
debugger = d;
|
||||
//debugger = d;
|
||||
|
||||
//create WNDCLASS
|
||||
WNDCLASS wndclass;
|
||||
@@ -204,7 +206,7 @@ void gxRuntime::suspend() {
|
||||
|
||||
if (gfx_mode == 3) ShowCursor(1);
|
||||
|
||||
if (debugger) debugger->debugStop();
|
||||
//if (debugger) debugger->debugStop();
|
||||
}
|
||||
|
||||
////////////
|
||||
@@ -219,7 +221,7 @@ void gxRuntime::resume() {
|
||||
suspended = false;
|
||||
busy = false;
|
||||
|
||||
if (debugger) debugger->debugRun();
|
||||
//if (debugger) debugger->debugRun();
|
||||
}
|
||||
|
||||
///////////////////
|
||||
@@ -505,7 +507,7 @@ bool gxRuntime::idle() {
|
||||
if (suspended) forceResume();
|
||||
break;
|
||||
case WM_END:
|
||||
debugger = 0;
|
||||
//debugger = 0;
|
||||
run_flag = false;
|
||||
break;
|
||||
default:
|
||||
@@ -533,61 +535,61 @@ bool gxRuntime::delay(int ms) {
|
||||
// DEBUGSTMT //
|
||||
///////////////
|
||||
void gxRuntime::debugStmt(int pos, const char *file) {
|
||||
if (debugger) debugger->debugStmt(pos, file);
|
||||
//if (debugger) debugger->debugStmt(pos, file);
|
||||
}
|
||||
|
||||
///////////////
|
||||
// DEBUGSTOP //
|
||||
///////////////
|
||||
void gxRuntime::debugStop() {
|
||||
if (!suspended) forceSuspend();
|
||||
//if (!suspended) forceSuspend();
|
||||
}
|
||||
|
||||
////////////////
|
||||
// DEBUGENTER //
|
||||
////////////////
|
||||
void gxRuntime::debugEnter(void *frame, void *env, const char *func) {
|
||||
if (debugger) debugger->debugEnter(frame, env, func);
|
||||
//if (debugger) debugger->debugEnter(frame, env, func);
|
||||
}
|
||||
|
||||
////////////////
|
||||
// DEBUGLEAVE //
|
||||
////////////////
|
||||
void gxRuntime::debugLeave() {
|
||||
if (debugger) debugger->debugLeave();
|
||||
//if (debugger) debugger->debugLeave();
|
||||
}
|
||||
|
||||
////////////////
|
||||
// DEBUGERROR //
|
||||
////////////////
|
||||
void gxRuntime::debugError(const char *t) {
|
||||
if (!debugger) return;
|
||||
Debugger *d = debugger;
|
||||
/*if (!debugger) return;
|
||||
void*d = debugger;
|
||||
asyncEnd();
|
||||
if (!suspended) {
|
||||
forceSuspend();
|
||||
}
|
||||
d->debugMsg(t, true);
|
||||
d->debugMsg(t, true);*/
|
||||
}
|
||||
|
||||
///////////////
|
||||
// DEBUGINFO //
|
||||
///////////////
|
||||
void gxRuntime::debugInfo(const char *t) {
|
||||
if (!debugger) return;
|
||||
/*if (!debugger) return;
|
||||
Debugger *d = debugger;
|
||||
asyncEnd();
|
||||
if (!suspended) {
|
||||
forceSuspend();
|
||||
}
|
||||
d->debugMsg(t, false);
|
||||
d->debugMsg(t, false);*/
|
||||
}
|
||||
|
||||
//////////////
|
||||
// DEBUGLOG //
|
||||
//////////////
|
||||
void gxRuntime::debugLog(const char *t) {
|
||||
if (debugger) debugger->debugLog(t);
|
||||
//if (debugger) debugger->debugLog(t);
|
||||
}
|
||||
|
||||
/////////////////////////
|
||||
|
||||
@@ -6,13 +6,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "gxaudio.h"
|
||||
#include "gxinput.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "gxfilesystem.h"
|
||||
#include "gxtimer.h"
|
||||
|
||||
#include "../debugger/debugger.h"
|
||||
#include "gxaudio.hpp"
|
||||
#include "gxinput.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
#include "gxfilesystem.hpp"
|
||||
#include "gxtimer.hpp"
|
||||
|
||||
class gxRuntime{
|
||||
/***** INTERNAL INTERFACE *****/
|
||||
@@ -75,7 +73,7 @@ private:
|
||||
|
||||
/***** APP INTERFACE *****/
|
||||
public:
|
||||
static gxRuntime *openRuntime( HINSTANCE hinst,const std::string &cmd_line,Debugger *debugger );
|
||||
static gxRuntime *openRuntime( HINSTANCE hinst,const std::string &cmd_line, void* d );
|
||||
static void closeRuntime( gxRuntime *runtime );
|
||||
|
||||
void asyncStop();
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxscene.h"
|
||||
#include "gxgraphics.h"
|
||||
#include "gxruntime.h"
|
||||
#include "std.hpp"
|
||||
#include "gxscene.hpp"
|
||||
#include "gxgraphics.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
static bool can_wb;
|
||||
static int hw_tex_stages,tex_stages;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
#define GXSCENE_H
|
||||
|
||||
#include <map>
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
#include <windows.h>
|
||||
#include <d3d.h>
|
||||
|
||||
#include "gxlight.h"
|
||||
#include "gxlight.hpp"
|
||||
|
||||
class gxCanvas;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxsound.h"
|
||||
#include "gxaudio.h"
|
||||
#include "std.hpp"
|
||||
#include "gxsound.hpp"
|
||||
#include "gxaudio.hpp"
|
||||
#include <fmod.h>
|
||||
|
||||
gxSound::gxSound( gxAudio *a,FSOUND_SAMPLE *s ):
|
||||
audio(a),sample(s),defs_valid(true){
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef GXSOUND_H
|
||||
#define GXSOUND_H
|
||||
|
||||
#include "gxchannel.h"
|
||||
#include "gxchannel.hpp"
|
||||
|
||||
class gxAudio;
|
||||
struct FSOUND_SAMPLE;
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "gxtimer.h"
|
||||
#include "gxruntime.h"
|
||||
#include "std.hpp"
|
||||
#include "gxtimer.hpp"
|
||||
#include "gxruntime.hpp"
|
||||
|
||||
gxTimer::gxTimer( gxRuntime *rt,int hertz ):
|
||||
runtime(rt),ticks_get(0),ticks_put(0){
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#ifndef GXTIMER_H
|
||||
#define GXTIMER_H
|
||||
|
||||
#include <mmsyscom.h>
|
||||
|
||||
class gxRuntime;
|
||||
|
||||
class gxTimer{
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "std.hpp"
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
#ifndef STD_H
|
||||
#define STD_H
|
||||
|
||||
#include "../#ThirdParty/fmodapi375win/api/inc/fmod.h"
|
||||
|
||||
#include "../config/config.h"
|
||||
#include "../stdutil/stdutil.h"
|
||||
#include "stdutil.hpp"
|
||||
|
||||
#pragma warning( disable:4786 )
|
||||
|
||||
@@ -21,7 +18,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <windows.h>
|
||||
#include "GraphicsRuntime.h"
|
||||
#include "GraphicsRuntime.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Reference in New Issue
Block a user