runtime: CMake-ify
This commit is contained in:
@@ -0,0 +1,72 @@
|
|||||||
|
project(runtime)
|
||||||
|
|
||||||
|
add_subdirectory(lib)
|
||||||
|
add_subdirectory(blitz3d)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME} MODULE
|
||||||
|
"bbruntime_dll.hpp"
|
||||||
|
"bbruntime_dll.cpp"
|
||||||
|
"resource.hpp"
|
||||||
|
"bbruntime_dll.rc"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
runtime_lib
|
||||||
|
gxruntime
|
||||||
|
stdutil
|
||||||
|
)
|
||||||
|
|
||||||
|
#target_include_directories(${PROJECT_NAME}
|
||||||
|
#
|
||||||
|
#)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
_CRT_SECURE_NO_WARNINGS
|
||||||
|
# windows.h
|
||||||
|
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
|
||||||
|
NOMINMAX
|
||||||
|
#NOMSG
|
||||||
|
NOOPENFILE
|
||||||
|
NOSCROLL
|
||||||
|
NOSERVICE
|
||||||
|
NOSOUND
|
||||||
|
NOTEXTMETRIC
|
||||||
|
NOWH
|
||||||
|
NOWINOFFSETS
|
||||||
|
NOCOMM
|
||||||
|
NOKANJI
|
||||||
|
NOHELP
|
||||||
|
NOPROFILER
|
||||||
|
NODEFERWINDOWPOS
|
||||||
|
NOMCX
|
||||||
|
NOIME
|
||||||
|
NOMDI
|
||||||
|
NOINOUT
|
||||||
|
)
|
||||||
|
endif()
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
#pragma warning( disable:4786 )
|
#pragma warning( disable:4786 )
|
||||||
|
|
||||||
#include "bbruntime_dll.h"
|
#include "bbruntime_dll.hpp"
|
||||||
#include "../debugger/debugger.h"
|
#include "../debugger/debugger.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -11,7 +11,7 @@ using namespace std;
|
|||||||
#include <eh.h>
|
#include <eh.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#include "../RuntimeLib/bbruntime.h"
|
#include "bbruntime.hpp"
|
||||||
|
|
||||||
class DummyDebugger : public Debugger{
|
class DummyDebugger : public Debugger{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "../stdutil/stdutil.h"
|
#include "stdutil.hpp"
|
||||||
|
|
||||||
class Debugger;
|
class Debugger;
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
//Microsoft Developer Studio generated resource script.
|
//Microsoft Developer Studio generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.hpp"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#include "afxres.h"
|
#include "afxres.hpp"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
@@ -34,7 +34,7 @@ END
|
|||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\n"
|
"#include ""afxres.hpp""\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,138 @@
|
|||||||
|
project(runtime_blitz3d)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME} STATIC
|
||||||
|
"animation.cpp"
|
||||||
|
"animation.hpp"
|
||||||
|
"animator.cpp"
|
||||||
|
"animator.hpp"
|
||||||
|
"blitz3d.hpp"
|
||||||
|
"brush.cpp"
|
||||||
|
"brush.hpp"
|
||||||
|
"cachedtexture.cpp"
|
||||||
|
"cachedtexture.hpp"
|
||||||
|
"camera.cpp"
|
||||||
|
"camera.hpp"
|
||||||
|
"collision.cpp"
|
||||||
|
"collision.hpp"
|
||||||
|
"entity.cpp"
|
||||||
|
"entity.hpp"
|
||||||
|
"frustum.cpp"
|
||||||
|
"frustum.hpp"
|
||||||
|
"geom.cpp"
|
||||||
|
"geom.hpp"
|
||||||
|
"light.cpp"
|
||||||
|
"light.hpp"
|
||||||
|
"listener.cpp"
|
||||||
|
"listener.hpp"
|
||||||
|
"loader_3ds.cpp"
|
||||||
|
"loader_3ds.hpp"
|
||||||
|
"loader_b3d.cpp"
|
||||||
|
"loader_b3d.hpp"
|
||||||
|
# "loader_x.cpp"
|
||||||
|
# "loader_x.hpp"
|
||||||
|
"md2model.cpp"
|
||||||
|
"md2model.hpp"
|
||||||
|
"md2norms.cpp"
|
||||||
|
"md2norms.hpp"
|
||||||
|
"md2rep.cpp"
|
||||||
|
"md2rep.hpp"
|
||||||
|
"meshcollider.cpp"
|
||||||
|
"meshcollider.hpp"
|
||||||
|
"meshloader.cpp"
|
||||||
|
"meshloader.hpp"
|
||||||
|
"meshmodel.cpp"
|
||||||
|
"meshmodel.hpp"
|
||||||
|
"meshutil.cpp"
|
||||||
|
"meshutil.hpp"
|
||||||
|
"mirror.cpp"
|
||||||
|
"mirror.hpp"
|
||||||
|
"model.cpp"
|
||||||
|
"model.hpp"
|
||||||
|
"object.cpp"
|
||||||
|
"object.hpp"
|
||||||
|
"pivot.cpp"
|
||||||
|
"pivot.hpp"
|
||||||
|
"planemodel.cpp"
|
||||||
|
"planemodel.hpp"
|
||||||
|
"q3bspmodel.cpp"
|
||||||
|
"q3bspmodel.hpp"
|
||||||
|
"q3bsprep.cpp"
|
||||||
|
"q3bsprep.hpp"
|
||||||
|
"rendercontext.hpp"
|
||||||
|
"sprite.cpp"
|
||||||
|
"sprite.hpp"
|
||||||
|
"std.cpp"
|
||||||
|
"std.hpp"
|
||||||
|
"surface.cpp"
|
||||||
|
"surface.hpp"
|
||||||
|
"terrain.cpp"
|
||||||
|
"terrain.hpp"
|
||||||
|
"terrainrep.cpp"
|
||||||
|
"terrainrep.hpp"
|
||||||
|
"texture.cpp"
|
||||||
|
"texture.hpp"
|
||||||
|
"world.cpp"
|
||||||
|
"world.hpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
config
|
||||||
|
gxruntime
|
||||||
|
stdutil
|
||||||
|
PUBLIC
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC ${PROJECT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
_CRT_SECURE_NO_WARNINGS
|
||||||
|
# windows.h
|
||||||
|
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
|
||||||
|
NOMINMAX
|
||||||
|
#NOMSG
|
||||||
|
NOOPENFILE
|
||||||
|
NOSCROLL
|
||||||
|
NOSERVICE
|
||||||
|
NOSOUND
|
||||||
|
NOTEXTMETRIC
|
||||||
|
NOWH
|
||||||
|
NOWINOFFSETS
|
||||||
|
NOCOMM
|
||||||
|
NOKANJI
|
||||||
|
NOHELP
|
||||||
|
NOPROFILER
|
||||||
|
NODEFERWINDOWPOS
|
||||||
|
NOMCX
|
||||||
|
NOIME
|
||||||
|
NOMDI
|
||||||
|
NOINOUT
|
||||||
|
)
|
||||||
|
endif()
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "animation.h"
|
#include "animation.hpp"
|
||||||
|
|
||||||
struct Animation::Rep{
|
struct Animation::Rep{
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
|
|
||||||
class Animation{
|
class Animation{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "animator.h"
|
#include "animator.hpp"
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
|
|
||||||
Animator::Animator( Animator *t ):_seqs( t->_seqs ){
|
Animator::Animator( Animator *t ):_seqs( t->_seqs ){
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef ANIMATOR_H
|
#ifndef ANIMATOR_H
|
||||||
#define ANIMATOR_H
|
#define ANIMATOR_H
|
||||||
|
|
||||||
#include "animation.h"
|
#include "animation.hpp"
|
||||||
|
|
||||||
class Object;
|
class Object;
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
#include "bd2model.h"
|
#include "bd2model.hpp"
|
||||||
|
|
||||||
struct BD2Vert{
|
struct BD2Vert{
|
||||||
unsigned char x,y,z,n,u,v;
|
unsigned char x,y,z,n,u,v;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "world.h"
|
#include "world.hpp"
|
||||||
|
#include <cfloat>
|
||||||
|
|
||||||
static World *w;
|
static World *w;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "brush.h"
|
#include "brush.hpp"
|
||||||
|
|
||||||
#include "../gxruntime/gxgraphics.h"
|
#include "../gxruntime/gxgraphics.hpp"
|
||||||
|
|
||||||
struct Brush::Rep{
|
struct Brush::Rep{
|
||||||
union{ int ref_cnt;Rep *next; };
|
union{ int ref_cnt;Rep *next; };
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef BRUSH_H
|
#ifndef BRUSH_H
|
||||||
#define BRUSH_H
|
#define BRUSH_H
|
||||||
|
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
#include "texture.h"
|
#include "texture.hpp"
|
||||||
|
|
||||||
class Brush{
|
class Brush{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "cachedtexture.h"
|
#include "cachedtexture.hpp"
|
||||||
|
|
||||||
int active_texs;
|
int active_texs;
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef CACHEDTEXTURE_H
|
#ifndef CACHEDTEXTURE_H
|
||||||
#define CACHEDTEXTURE_H
|
#define CACHEDTEXTURE_H
|
||||||
|
|
||||||
#include "../gxruntime/gxcanvas.h"
|
#include "../gxruntime/gxcanvas.hpp"
|
||||||
|
|
||||||
class CachedTextureFactory{
|
class CachedTextureFactory{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "camera.h"
|
#include "camera.hpp"
|
||||||
|
|
||||||
extern gxScene *gx_scene;
|
extern gxScene *gx_scene;
|
||||||
|
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
#ifndef CAMERA_H
|
#ifndef CAMERA_H
|
||||||
#define CAMERA_H
|
#define CAMERA_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "frustum.h"
|
#include "frustum.hpp"
|
||||||
#include "mirror.h"
|
#include "mirror.hpp"
|
||||||
|
|
||||||
class Camera : public Object{
|
class Camera : public Object{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "collision.h"
|
#include "collision.hpp"
|
||||||
|
|
||||||
const float COLLISION_FLT_EPSILON=.001f;
|
const float COLLISION_FLT_EPSILON=.001f;
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef COLLISION_H
|
#ifndef COLLISION_H
|
||||||
#define COLLISION_H
|
#define COLLISION_H
|
||||||
|
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
|
|
||||||
extern const float COLLISION_FLT_EPSILON;
|
extern const float COLLISION_FLT_EPSILON;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "emitter.h"
|
#include "emitter.hpp"
|
||||||
|
|
||||||
Emitter::Emitter(){
|
Emitter::Emitter(){
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef EMITTER_H
|
#ifndef EMITTER_H
|
||||||
#define EMITTER_H
|
#define EMITTER_H
|
||||||
|
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
|
|
||||||
class gxSound;
|
class gxSound;
|
||||||
class gxChannel;
|
class gxChannel;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "entity.h"
|
#include "entity.hpp"
|
||||||
|
|
||||||
//#include "stats.h"
|
//#include "stats.hpp"
|
||||||
|
|
||||||
Entity *Entity::_orphans, *Entity::_last_orphan;
|
Entity *Entity::_orphans, *Entity::_last_orphan;
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
|
|
||||||
class Entity;
|
class Entity;
|
||||||
class Object;
|
class Object;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "frustum.h"
|
#include "frustum.hpp"
|
||||||
|
|
||||||
Frustum::Frustum(){
|
Frustum::Frustum(){
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef FRUSTUM_H
|
#ifndef FRUSTUM_H
|
||||||
#define FRUSTUM_H
|
#define FRUSTUM_H
|
||||||
|
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
|
|
||||||
class Frustum{
|
class Frustum{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
|
|
||||||
Matrix Matrix::tmps[64];
|
Matrix Matrix::tmps[64];
|
||||||
Transform Transform::tmps[64];
|
Transform Transform::tmps[64];
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "light.h"
|
#include "light.hpp"
|
||||||
#include "../gxruntime/gxscene.h"
|
#include "../gxruntime/gxscene.hpp"
|
||||||
|
|
||||||
extern gxScene *gx_scene;
|
extern gxScene *gx_scene;
|
||||||
|
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
#ifndef LIGHT_H
|
#ifndef LIGHT_H
|
||||||
#define LIGHT_H
|
#define LIGHT_H
|
||||||
|
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
#include "../gxruntime/gxlight.h"
|
#include "../gxruntime/gxlight.hpp"
|
||||||
|
|
||||||
class World;
|
class World;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "listener.h"
|
#include "listener.hpp"
|
||||||
|
|
||||||
extern gxAudio *gx_audio;
|
extern gxAudio *gx_audio;
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef LISTENER_H
|
#ifndef LISTENER_H
|
||||||
#define LISTENER_H
|
#define LISTENER_H
|
||||||
|
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
|
|
||||||
class Listener : public Object{
|
class Listener : public Object{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "meshloader.h"
|
#include "meshloader.hpp"
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
|
|
||||||
struct Surf{
|
struct Surf{
|
||||||
vector<Surface::Triangle> tris;
|
vector<Surface::Triangle> tris;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "loader_3ds.h"
|
#include "loader_3ds.hpp"
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
#include "animation.h"
|
#include "animation.hpp"
|
||||||
|
|
||||||
extern gxRuntime *gx_runtime;
|
extern gxRuntime *gx_runtime;
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef LOADER_3DS_H
|
#ifndef LOADER_3DS_H
|
||||||
#define LOADER_3DS_H
|
#define LOADER_3DS_H
|
||||||
|
|
||||||
#include "meshloader.h"
|
#include "meshloader.hpp"
|
||||||
|
|
||||||
class Loader_3DS : public MeshLoader{
|
class Loader_3DS : public MeshLoader{
|
||||||
public:
|
public:
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "loader_b3d.h"
|
#include "loader_b3d.hpp"
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
#include "pivot.h"
|
#include "pivot.hpp"
|
||||||
#include "meshutil.h"
|
#include "meshutil.hpp"
|
||||||
|
|
||||||
//#define SHOW_BONES
|
//#define SHOW_BONES
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef LOADER_B3D_H
|
#ifndef LOADER_B3D_H
|
||||||
#define LOADER_B3D_H
|
#define LOADER_B3D_H
|
||||||
|
|
||||||
#include "meshloader.h"
|
#include "meshloader.hpp"
|
||||||
|
|
||||||
class Loader_B3D : public MeshLoader{
|
class Loader_B3D : public MeshLoader{
|
||||||
public:
|
public:
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "loader_x.h"
|
#include "loader_x.hpp"
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
#include "animation.h"
|
#include "animation.hpp"
|
||||||
#include "pivot.h"
|
#include "pivot.hpp"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
//#include <dxfile.h>
|
//#include <dxfile.h>
|
||||||
#include "../gxruntime/GraphicsRuntime.h"
|
#include "../gxruntime/GraphicsRuntime.hpp"
|
||||||
#include <d3d9types.h>
|
#include <d3d9types.h>
|
||||||
#include <d3dx9xof.h>
|
#include <d3dx9xof.h>
|
||||||
#include <rmxfguid.h>
|
#include <rmxfguid.h>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef LOADER_X_H
|
#ifndef LOADER_X_H
|
||||||
#define LOADER_X_H
|
#define LOADER_X_H
|
||||||
|
|
||||||
#include "meshloader.h"
|
#include "meshloader.hpp"
|
||||||
|
|
||||||
class Loader_X : public MeshLoader{
|
class Loader_X : public MeshLoader{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "md2rep.h"
|
#include "md2rep.hpp"
|
||||||
#include "md2model.h"
|
#include "md2model.hpp"
|
||||||
|
|
||||||
struct MD2Model::Rep : public MD2Rep{
|
struct MD2Model::Rep : public MD2Rep{
|
||||||
int ref_cnt;
|
int ref_cnt;
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef MD2MODEL_H
|
#ifndef MD2MODEL_H
|
||||||
#define MD2MODEL_H
|
#define MD2MODEL_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "md2rep.h"
|
#include "md2rep.hpp"
|
||||||
|
|
||||||
class MD2Model : public Model{
|
class MD2Model : public Model{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "md2norms.h"
|
#include "md2norms.hpp"
|
||||||
|
|
||||||
float md2norms[162][3]={
|
float md2norms[162][3]={
|
||||||
{-0.525731f, 0.000000f, 0.850651f},
|
{-0.525731f, 0.000000f, 0.850651f},
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "md2rep.h"
|
#include "md2rep.hpp"
|
||||||
#include "md2norms.h"
|
#include "md2norms.hpp"
|
||||||
|
|
||||||
extern gxRuntime *gx_runtime;
|
extern gxRuntime *gx_runtime;
|
||||||
extern gxGraphics *gx_graphics;
|
extern gxGraphics *gx_graphics;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef MD2REP_H
|
#ifndef MD2REP_H
|
||||||
#define MD2REP_H
|
#define MD2REP_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
class MD2Rep{
|
class MD2Rep{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "meshcollider.h"
|
#include "meshcollider.hpp"
|
||||||
|
|
||||||
static const int MAX_COLL_TRIS=16;
|
static const int MAX_COLL_TRIS=16;
|
||||||
static vector<Vector> tri_centres;
|
static vector<Vector> tri_centres;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef MESHCOLLIDER_H
|
#ifndef MESHCOLLIDER_H
|
||||||
#define MESHCOLLIDER_H
|
#define MESHCOLLIDER_H
|
||||||
|
|
||||||
#include "collision.h"
|
#include "collision.hpp"
|
||||||
|
|
||||||
class MeshCollider{
|
class MeshCollider{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "meshloader.h"
|
#include "meshloader.hpp"
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
|
|
||||||
struct Tri{
|
struct Tri{
|
||||||
int verts[3];
|
int verts[3];
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef MESHLOADER_H
|
#ifndef MESHLOADER_H
|
||||||
#define MESHLOADER_H
|
#define MESHLOADER_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "surface.h"
|
#include "surface.hpp"
|
||||||
|
|
||||||
class MeshLoader{
|
class MeshLoader{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
#include "meshcollider.h"
|
#include "meshcollider.hpp"
|
||||||
|
|
||||||
extern gxGraphics *gx_graphics;
|
extern gxGraphics *gx_graphics;
|
||||||
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef MESHMODEL_H
|
#ifndef MESHMODEL_H
|
||||||
#define MESHMODEL_H
|
#define MESHMODEL_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "surface.h"
|
#include "surface.hpp"
|
||||||
|
|
||||||
class MeshCollider;
|
class MeshCollider;
|
||||||
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef MESHRENDERER_H
|
#ifndef MESHRENDERER_H
|
||||||
#define MESHRENDERER_H
|
#define MESHRENDERER_H
|
||||||
|
|
||||||
#include "mesh.h"
|
#include "mesh.hpp"
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
class MeshRenderer{
|
class MeshRenderer{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "meshutil.h"
|
#include "meshutil.hpp"
|
||||||
|
|
||||||
MeshModel *MeshUtil::createCube( const Brush &b ){
|
MeshModel *MeshUtil::createCube( const Brush &b ){
|
||||||
static Vector norms[]={
|
static Vector norms[]={
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef MESHUTIL_H
|
#ifndef MESHUTIL_H
|
||||||
#define MESHUTIL_H
|
#define MESHUTIL_H
|
||||||
|
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
|
|
||||||
struct MeshUtil{
|
struct MeshUtil{
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "mirror.h"
|
#include "mirror.hpp"
|
||||||
|
|
||||||
Mirror::Mirror(){
|
Mirror::Mirror(){
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef MIRROR_H
|
#ifndef MIRROR_H
|
||||||
#define MIRROR_H
|
#define MIRROR_H
|
||||||
|
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
|
|
||||||
class Mirror : public Object{
|
class Mirror : public Object{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
extern gxScene *gx_scene;
|
extern gxScene *gx_scene;
|
||||||
|
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
#ifndef MODEL_H
|
#ifndef MODEL_H
|
||||||
#define MODEL_H
|
#define MODEL_H
|
||||||
|
|
||||||
#include "brush.h"
|
#include "brush.hpp"
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
#include "rendercontext.h"
|
#include "rendercontext.hpp"
|
||||||
|
|
||||||
class Sprite;
|
class Sprite;
|
||||||
class Terrain;
|
class Terrain;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
|
|
||||||
extern gxRuntime *gx_runtime;
|
extern gxRuntime *gx_runtime;
|
||||||
|
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "entity.h"
|
#include "entity.hpp"
|
||||||
#include "animator.h"
|
#include "animator.hpp"
|
||||||
#include "collision.h"
|
#include "collision.hpp"
|
||||||
|
|
||||||
class gxSound;
|
class gxSound;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "pivot.h"
|
#include "pivot.hpp"
|
||||||
|
|
||||||
Pivot::Pivot(){
|
Pivot::Pivot(){
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef PIVOT_H
|
#ifndef PIVOT_H
|
||||||
#define PIVOT_H
|
#define PIVOT_H
|
||||||
|
|
||||||
#include "object.h"
|
#include "object.hpp"
|
||||||
|
|
||||||
class Pivot : public Object{
|
class Pivot : public Object{
|
||||||
public:
|
public:
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "planemodel.h"
|
#include "planemodel.hpp"
|
||||||
#include "frustum.h"
|
#include "frustum.hpp"
|
||||||
#include "camera.h"
|
#include "camera.hpp"
|
||||||
|
|
||||||
static Vector vts[17][17];
|
static Vector vts[17][17];
|
||||||
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef PLANEMODEL_H
|
#ifndef PLANEMODEL_H
|
||||||
#define PLANEMODEL_H
|
#define PLANEMODEL_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "brush.h"
|
#include "brush.hpp"
|
||||||
|
|
||||||
class PlaneModel : public Model{
|
class PlaneModel : public Model{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "q3bspmodel.h"
|
#include "q3bspmodel.hpp"
|
||||||
#include "q3bsprep.h"
|
#include "q3bsprep.hpp"
|
||||||
|
|
||||||
struct Q3BSPModel::Rep : public Q3BSPRep{
|
struct Q3BSPModel::Rep : public Q3BSPRep{
|
||||||
int ref_cnt;
|
int ref_cnt;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef Q3BSPMODEL_H
|
#ifndef Q3BSPMODEL_H
|
||||||
#define Q3BSPMODEL_H
|
#define Q3BSPMODEL_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
class Q3BSPModel : public Model{
|
class Q3BSPModel : public Model{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "q3bsprep.h"
|
#include "q3bsprep.hpp"
|
||||||
|
|
||||||
/* Quake3 File format types */
|
/* Quake3 File format types */
|
||||||
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#ifndef Q3BSPREP_H
|
#ifndef Q3BSPREP_H
|
||||||
#define Q3BSPREP_H
|
#define Q3BSPREP_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "meshcollider.h"
|
#include "meshcollider.hpp"
|
||||||
|
|
||||||
struct Q3BSPSurf;
|
struct Q3BSPSurf;
|
||||||
struct Q3BSPFace;
|
struct Q3BSPFace;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef RENDERCONTEXT_H
|
#ifndef RENDERCONTEXT_H
|
||||||
#define RENDERCONTEXT_H
|
#define RENDERCONTEXT_H
|
||||||
|
|
||||||
#include "frustum.h"
|
#include "frustum.hpp"
|
||||||
|
|
||||||
class RenderContext{
|
class RenderContext{
|
||||||
public:
|
public:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "skinmodel.h"
|
#include "skinmodel.hpp"
|
||||||
|
|
||||||
SkinModel::SkinModel(){
|
SkinModel::SkinModel(){
|
||||||
setRenderSpace( RENDER_SPACE_WORLD );
|
setRenderSpace( RENDER_SPACE_WORLD );
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef SKINMODEL_H
|
#ifndef SKINMODEL_H
|
||||||
#define SKINMODEL_H
|
#define SKINMODEL_H
|
||||||
|
|
||||||
#include "meshmodel.h"
|
#include "meshmodel.hpp"
|
||||||
|
|
||||||
class SkinModel : public MeshModel{
|
class SkinModel : public MeshModel{
|
||||||
vector<Object*> _bones;
|
vector<Object*> _bones;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "sprite.h"
|
#include "sprite.hpp"
|
||||||
|
|
||||||
extern float stats3d[];
|
extern float stats3d[];
|
||||||
|
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
#ifndef SPRITE_H
|
#ifndef SPRITE_H
|
||||||
#define SPRITE_H
|
#define SPRITE_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "brush.h"
|
#include "brush.hpp"
|
||||||
#include "../gxruntime/gxmesh.h"
|
#include "../gxruntime/gxmesh.hpp"
|
||||||
|
|
||||||
class Sprite : public Model{
|
class Sprite : public Model{
|
||||||
public:
|
public:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
#include "std.hpp"
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
#pragma warning( disable:4786 )
|
#pragma warning( disable:4786 )
|
||||||
|
|
||||||
#include "../config/config.h"
|
#include "config.hpp"
|
||||||
#include "../stdutil/stdutil.h"
|
#include "stdutil.hpp"
|
||||||
#include "../gxruntime/gxruntime.h"
|
#include "gxruntime.hpp"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "surface.h"
|
#include "surface.hpp"
|
||||||
|
|
||||||
extern gxGraphics *gx_graphics;
|
extern gxGraphics *gx_graphics;
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef SURFACE_H
|
#ifndef SURFACE_H
|
||||||
#define SURFACE_H
|
#define SURFACE_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
#define MAX_SURFACE_BONES 4
|
#define MAX_SURFACE_BONES 4
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "terrain.h"
|
#include "terrain.hpp"
|
||||||
#include "terrainrep.h"
|
#include "terrainrep.hpp"
|
||||||
|
|
||||||
Terrain::Terrain( int size_shift ):
|
Terrain::Terrain( int size_shift ):
|
||||||
rep( new TerrainRep( size_shift ) ){
|
rep( new TerrainRep( size_shift ) ){
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef TERRAIN_H
|
#ifndef TERRAIN_H
|
||||||
#define TERRAIN_H
|
#define TERRAIN_H
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
struct TerrainRep;
|
struct TerrainRep;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "terrainrep.h"
|
#include "terrainrep.hpp"
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
extern gxRuntime *gx_runtime;
|
extern gxRuntime *gx_runtime;
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
|
|
||||||
struct TerrainRep{
|
struct TerrainRep{
|
||||||
public:
|
public:
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include "geom.h"
|
#include "geom.hpp"
|
||||||
#include "texture.h"
|
#include "texture.hpp"
|
||||||
#include "cachedtexture.h"
|
#include "cachedtexture.hpp"
|
||||||
|
|
||||||
#include "../gxruntime/gxgraphics.h"
|
#include "../gxruntime/gxgraphics.hpp"
|
||||||
|
|
||||||
extern gxScene *gx_scene;
|
extern gxScene *gx_scene;
|
||||||
extern gxGraphics *gx_graphics;
|
extern gxGraphics *gx_graphics;
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "cachedtexture.h"
|
#include "cachedtexture.hpp"
|
||||||
|
|
||||||
#include "../gxruntime/gxcanvas.h"
|
#include "../gxruntime/gxcanvas.hpp"
|
||||||
|
|
||||||
class Texture{
|
class Texture{
|
||||||
public:
|
public:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.hpp"
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include "world.h"
|
#include "world.hpp"
|
||||||
|
|
||||||
//0=tris compared for collision
|
//0=tris compared for collision
|
||||||
//1=max proj err of terrain
|
//1=max proj err of terrain
|
||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.hpp"
|
||||||
#include "camera.h"
|
#include "camera.hpp"
|
||||||
#include "light.h"
|
#include "light.hpp"
|
||||||
#include "mirror.h"
|
#include "mirror.hpp"
|
||||||
#include "listener.h"
|
#include "listener.hpp"
|
||||||
|
|
||||||
#define WORLD_COLLISION_TYPES 16
|
#define WORLD_COLLISION_TYPES 16
|
||||||
#define WORLD_COLLISION_HITS 4
|
#define WORLD_COLLISION_HITS 4
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
project(runtime_lib)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME} STATIC
|
||||||
|
"basic.cpp"
|
||||||
|
"basic.hpp"
|
||||||
|
"bb_basic.hpp"
|
||||||
|
"bbaudio.cpp"
|
||||||
|
"bbaudio.hpp"
|
||||||
|
"bbbank.cpp"
|
||||||
|
"bbbank.hpp"
|
||||||
|
"bbblitz3d.cpp"
|
||||||
|
"bbblitz3d.hpp"
|
||||||
|
"bbfilesystem.cpp"
|
||||||
|
"bbfilesystem.hpp"
|
||||||
|
"bbgraphics.cpp"
|
||||||
|
"bbgraphics.hpp"
|
||||||
|
"bbinput.cpp"
|
||||||
|
"bbinput.hpp"
|
||||||
|
"bbmath.cpp"
|
||||||
|
"bbmath.hpp"
|
||||||
|
"bbruntime.cpp"
|
||||||
|
"bbruntime.hpp"
|
||||||
|
"bbstring.cpp"
|
||||||
|
"bbstring.hpp"
|
||||||
|
"bbsys.cpp"
|
||||||
|
"bbsys.hpp"
|
||||||
|
# "multiplay.cpp"
|
||||||
|
# "multiplay.hpp"
|
||||||
|
# "multiplay_setup.cpp"
|
||||||
|
# "multiplay_setup.hpp"
|
||||||
|
# "multiplay_setup.rc"
|
||||||
|
"resource.hpp"
|
||||||
|
"runtime.cpp"
|
||||||
|
"std.cpp"
|
||||||
|
"std.hpp"
|
||||||
|
"userlib.cpp"
|
||||||
|
"userlib.hpp"
|
||||||
|
"userlibs.cpp"
|
||||||
|
"userlibs.hpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
stdutil
|
||||||
|
gxruntime
|
||||||
|
ddraw
|
||||||
|
dsound
|
||||||
|
dxguid
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC ${PROJECT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
_CRT_SECURE_NO_WARNINGS
|
||||||
|
# windows.h
|
||||||
|
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
|
||||||
|
NOMINMAX
|
||||||
|
#NOMSG
|
||||||
|
NOOPENFILE
|
||||||
|
NOSCROLL
|
||||||
|
NOSERVICE
|
||||||
|
NOSOUND
|
||||||
|
#NOTEXTMETRIC
|
||||||
|
NOWH
|
||||||
|
NOWINOFFSETS
|
||||||
|
NOCOMM
|
||||||
|
NOKANJI
|
||||||
|
NOHELP
|
||||||
|
NOPROFILER
|
||||||
|
NODEFERWINDOWPOS
|
||||||
|
NOMCX
|
||||||
|
NOIME
|
||||||
|
NOMDI
|
||||||
|
NOINOUT
|
||||||
|
)
|
||||||
|
endif()
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,150 +1,150 @@
|
|||||||
|
|
||||||
#ifndef BASIC_H
|
#ifndef BASIC_H
|
||||||
#define BASIC_H
|
#define BASIC_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
BBTYPE_END = 0,
|
BBTYPE_END = 0,
|
||||||
BBTYPE_INT = 1, BBTYPE_FLT = 2,
|
BBTYPE_INT = 1, BBTYPE_FLT = 2,
|
||||||
BBTYPE_STR = 3, BBTYPE_CSTR = 4,
|
BBTYPE_STR = 3, BBTYPE_CSTR = 4,
|
||||||
BBTYPE_OBJ = 5, BBTYPE_VEC = 6
|
BBTYPE_OBJ = 5, BBTYPE_VEC = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack( push,1 )
|
#pragma pack( push,1 )
|
||||||
|
|
||||||
struct BBObj;
|
struct BBObj;
|
||||||
struct BBStr;
|
struct BBStr;
|
||||||
struct BBType;
|
struct BBType;
|
||||||
struct BBObjType;
|
struct BBObjType;
|
||||||
struct BBVecType;
|
struct BBVecType;
|
||||||
union BBField;
|
union BBField;
|
||||||
struct BBArray;
|
struct BBArray;
|
||||||
|
|
||||||
struct BBObj {
|
struct BBObj {
|
||||||
BBField *fields;
|
BBField *fields;
|
||||||
BBObj *next, *prev;
|
BBObj *next, *prev;
|
||||||
BBObjType *type;
|
BBObjType *type;
|
||||||
int ref_cnt;
|
int ref_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBType {
|
struct BBType {
|
||||||
int type;
|
int type;
|
||||||
BBType(int n) :type(n) {}
|
BBType(int n) :type(n) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBObjType : public BBType {
|
struct BBObjType : public BBType {
|
||||||
BBObj used, free;
|
BBObj used, free;
|
||||||
int fieldCnt;
|
int fieldCnt;
|
||||||
BBType *fieldTypes[1];
|
BBType *fieldTypes[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBVecType : public BBType {
|
struct BBVecType : public BBType {
|
||||||
int size;
|
int size;
|
||||||
BBType *elementType;
|
BBType *elementType;
|
||||||
};
|
};
|
||||||
|
|
||||||
union BBField {
|
union BBField {
|
||||||
int INT;
|
int INT;
|
||||||
float FLT;
|
float FLT;
|
||||||
BBStr *STR;
|
BBStr *STR;
|
||||||
char *CSTR;
|
char *CSTR;
|
||||||
BBObj *OBJ;
|
BBObj *OBJ;
|
||||||
void *VEC;
|
void *VEC;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBArray {
|
struct BBArray {
|
||||||
void *data;
|
void *data;
|
||||||
int elementType, dims, scales[1];
|
int elementType, dims, scales[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBStr : public std::string {
|
struct BBStr : public std::string {
|
||||||
BBStr *next, *prev;
|
BBStr *next, *prev;
|
||||||
|
|
||||||
BBStr();
|
BBStr();
|
||||||
BBStr(const char *s);
|
BBStr(const char *s);
|
||||||
BBStr(const char *s, int n);
|
BBStr(const char *s, int n);
|
||||||
BBStr(const BBStr &s);
|
BBStr(const BBStr &s);
|
||||||
BBStr(const std::string &s);
|
BBStr(const std::string &s);
|
||||||
BBStr &operator=(const char *s);
|
BBStr &operator=(const char *s);
|
||||||
BBStr &operator=(const BBStr &s);
|
BBStr &operator=(const BBStr &s);
|
||||||
BBStr &operator=(const std::string &s);
|
BBStr &operator=(const std::string &s);
|
||||||
~BBStr();
|
~BBStr();
|
||||||
|
|
||||||
void *operator new(size_t size);
|
void *operator new(size_t size);
|
||||||
void operator delete(void *q);
|
void operator delete(void *q);
|
||||||
|
|
||||||
void *operator new(size_t size, const char *file, int line) { return operator new(size); }
|
void *operator new(size_t size, const char *file, int line) { return operator new(size); }
|
||||||
void operator delete(void *q, const char *file, int line) { operator delete(q); }
|
void operator delete(void *q, const char *file, int line) { operator delete(q); }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBData {
|
struct BBData {
|
||||||
int fieldType;
|
int fieldType;
|
||||||
BBField field;
|
BBField field;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack( pop )
|
#pragma pack( pop )
|
||||||
|
|
||||||
void basic_link();
|
void basic_link();
|
||||||
|
|
||||||
extern BBType _bbIntType;
|
extern BBType _bbIntType;
|
||||||
extern BBType _bbFltType;
|
extern BBType _bbFltType;
|
||||||
extern BBType _bbStrType;
|
extern BBType _bbStrType;
|
||||||
extern BBType _bbCStrType;
|
extern BBType _bbCStrType;
|
||||||
|
|
||||||
BBStr * _bbStrLoad(BBStr **var);
|
BBStr * _bbStrLoad(BBStr **var);
|
||||||
void _bbStrRelease(BBStr *str);
|
void _bbStrRelease(BBStr *str);
|
||||||
void _bbStrStore(BBStr **var, BBStr *str);
|
void _bbStrStore(BBStr **var, BBStr *str);
|
||||||
int _bbStrCompare(BBStr *lhs, BBStr *rhs);
|
int _bbStrCompare(BBStr *lhs, BBStr *rhs);
|
||||||
|
|
||||||
BBStr * _bbStrConcat(BBStr *s1, BBStr *s2);
|
BBStr * _bbStrConcat(BBStr *s1, BBStr *s2);
|
||||||
int _bbStrToInt(BBStr *s);
|
int _bbStrToInt(BBStr *s);
|
||||||
BBStr * _bbStrFromInt(int n);
|
BBStr * _bbStrFromInt(int n);
|
||||||
float _bbStrToFloat(BBStr *s);
|
float _bbStrToFloat(BBStr *s);
|
||||||
BBStr * _bbStrFromFloat(float n);
|
BBStr * _bbStrFromFloat(float n);
|
||||||
BBStr * _bbStrConst(const char *s);
|
BBStr * _bbStrConst(const char *s);
|
||||||
|
|
||||||
void _bbDimArray(BBArray *array);
|
void _bbDimArray(BBArray *array);
|
||||||
void _bbUndimArray(BBArray *array);
|
void _bbUndimArray(BBArray *array);
|
||||||
void _bbArrayBoundsEx();
|
void _bbArrayBoundsEx();
|
||||||
|
|
||||||
void * _bbVecAlloc(BBVecType *type);
|
void * _bbVecAlloc(BBVecType *type);
|
||||||
void _bbVecFree(void *vec, BBVecType *type);
|
void _bbVecFree(void *vec, BBVecType *type);
|
||||||
void _bbVecBoundsEx();
|
void _bbVecBoundsEx();
|
||||||
|
|
||||||
BBObj * _bbObjNew(BBObjType *t);
|
BBObj * _bbObjNew(BBObjType *t);
|
||||||
void _bbObjDelete(BBObj *obj);
|
void _bbObjDelete(BBObj *obj);
|
||||||
void _bbObjDeleteEach(BBObjType *type);
|
void _bbObjDeleteEach(BBObjType *type);
|
||||||
void _bbObjRelease(BBObj *obj);
|
void _bbObjRelease(BBObj *obj);
|
||||||
void _bbObjStore(BBObj **var, BBObj *obj);
|
void _bbObjStore(BBObj **var, BBObj *obj);
|
||||||
BBObj * _bbObjNext(BBObj *obj);
|
BBObj * _bbObjNext(BBObj *obj);
|
||||||
BBObj * _bbObjPrev(BBObj *obj);
|
BBObj * _bbObjPrev(BBObj *obj);
|
||||||
BBObj * _bbObjFirst(BBObjType *t);
|
BBObj * _bbObjFirst(BBObjType *t);
|
||||||
BBObj * _bbObjLast(BBObjType *t);
|
BBObj * _bbObjLast(BBObjType *t);
|
||||||
void _bbObjInsBefore(BBObj *o1, BBObj *o2);
|
void _bbObjInsBefore(BBObj *o1, BBObj *o2);
|
||||||
void _bbObjInsAfter(BBObj *o1, BBObj *o2);
|
void _bbObjInsAfter(BBObj *o1, BBObj *o2);
|
||||||
int _bbObjEachFirst(BBObj **var, BBObjType *type);
|
int _bbObjEachFirst(BBObj **var, BBObjType *type);
|
||||||
int _bbObjEachNext(BBObj **var);
|
int _bbObjEachNext(BBObj **var);
|
||||||
int _bbObjCompare(BBObj *o1, BBObj *o2);
|
int _bbObjCompare(BBObj *o1, BBObj *o2);
|
||||||
BBStr * _bbObjToStr(BBObj *obj);
|
BBStr * _bbObjToStr(BBObj *obj);
|
||||||
int _bbObjToHandle(BBObj *obj);
|
int _bbObjToHandle(BBObj *obj);
|
||||||
BBObj * _bbObjFromHandle(int handle, BBObjType *type);
|
BBObj * _bbObjFromHandle(int handle, BBObjType *type);
|
||||||
void _bbNullObjEx();
|
void _bbNullObjEx();
|
||||||
|
|
||||||
void _bbRestore(BBData *data);
|
void _bbRestore(BBData *data);
|
||||||
int _bbReadInt();
|
int _bbReadInt();
|
||||||
float _bbReadFloat();
|
float _bbReadFloat();
|
||||||
BBStr * _bbReadStr();
|
BBStr * _bbReadStr();
|
||||||
|
|
||||||
int _bbAbs(int n);
|
int _bbAbs(int n);
|
||||||
int _bbSgn(int n);
|
int _bbSgn(int n);
|
||||||
int _bbMod(int x, int y);
|
int _bbMod(int x, int y);
|
||||||
float _bbFAbs(float n);
|
float _bbFAbs(float n);
|
||||||
float _bbFSgn(float n);
|
float _bbFSgn(float n);
|
||||||
float _bbFMod(float x, float y);
|
float _bbFMod(float x, float y);
|
||||||
float _bbFPow(float x, float y);
|
float _bbFPow(float x, float y);
|
||||||
|
|
||||||
void bbRuntimeStats();
|
void bbRuntimeStats();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user