#include <vector>
#include <msp/core/noncopyable.h>
#include <msp/debug/demangle.h>
+#include "mspgame_api.h"
namespace Msp::Game {
-class invalid_access: public std::logic_error
+class MSPGAME_API invalid_access: public std::logic_error
{
public:
invalid_access(const std::string &w): logic_error(w) { }
};
-class AccessGuard
+class MSPGAME_API AccessGuard
{
public:
struct Create { static std::string describe() { return "create"; } };
#include <msp/geometry/angle.h>
#include <msp/linal/vector.h>
#include "component.h"
+#include "mspgame_api.h"
namespace Msp::Game {
float get_aspect() const { return size.x/size.y; }
};
-class Camera: public BufferedComponent<CameraData>
+class MSPGAME_API Camera: public BufferedComponent<CameraData>
{
public:
using Setup = CameraSetup;
#include <msp/time/timedelta.h>
#include "accessguard.h"
#include "handle.h"
+#include "mspgame_api.h"
namespace Msp::Game {
class Entity;
-class Component
+class MSPGAME_API Component
{
protected:
Handle<Entity> entity;
#include "eventbus.h"
#include "events.h"
#include "eventsource.h"
+#include "mspgame_api.h"
#include "reflection.h"
namespace Msp::Game {
class Stage;
-class Director
+class MSPGAME_API Director
{
public:
using EventSource = Game::EventSource<Events::StageCreated, Events::StageActivated, Events::StageDeactivated>;
#define MSP_GAME_ENTITY_H_
#include "handle.h"
+#include "mspgame_api.h"
#include "owned.h"
namespace Msp::Game {
class Transform;
struct TransformValues;
-class hierarchy_error: public std::logic_error
+class MSPGAME_API hierarchy_error: public std::logic_error
{
public:
hierarchy_error(): std::logic_error("hierarchy error") { }
};
-class Entity
+class MSPGAME_API Entity
{
public:
enum TransformTag { NO_TRANSFORM };
#include <functional>
#include <vector>
#include <msp/core/noncopyable.h>
+#include "mspgame_api.h"
namespace Msp::Game {
};
-class EventBus: public NonCopyable
+class MSPGAME_API EventBus: public NonCopyable
{
private:
using DeleteFunc = void(void *);
#include <msp/core/algorithm.h>
#include <msp/core/noncopyable.h>
#include "eventbus.h"
+#include "mspgame_api.h"
namespace Msp::Game {
class EventSourceBase;
-class EventObserver: public NonCopyable
+class MSPGAME_API EventObserver: public NonCopyable
{
private:
EventBus &bus;
#include <msp/datafile/objectloader.h>
#include "component.h"
+#include "mspgame_api.h"
namespace Msp::Game {
std::string object_name;
};
-class MeshSource: public Component
+class MSPGAME_API MeshSource: public Component
{
public:
using Setup = MeshSourceSetup;
--- /dev/null
+#ifndef MSP_GAME_API_H_
+#define MSP_GAME_API_H_
+
+#if defined(_WIN32)
+#if defined(MSPGAME_BUILD)
+#define MSPGAME_API __declspec(dllexport)
+#elif defined(MSPGAME_IMPORT)
+#define MSPGAME_API __declspec(dllimport)
+#else
+#define MSPGAME_API
+#endif
+#elif defined(__GNUC__)
+#define MSPGAME_API __attribute__((visibility("default")))
+#else
+#define MSPGAME_API
+#endif
+
+#endif
#include <memory>
#include <vector>
#include <msp/core/noncopyable.h>
+#include "mspgame_api.h"
namespace Msp::Game {
template<typename T>
class Pool;
-class PoolPool: public NonCopyable
+class MSPGAME_API PoolPool: public NonCopyable
{
private:
std::vector<std::unique_ptr<PoolBase>> pools;
};
-class PoolBase: public NonCopyable
+class MSPGAME_API PoolBase: public NonCopyable
{
private:
using DeleteFunc = void(void *);
#include <string>
#include <typeindex>
#include <vector>
+#include "mspgame_api.h"
namespace Msp::Game {
namespace Reflection {
};
-class ClassBase
+class MSPGAME_API ClassBase
{
protected:
Reflector &reflector;
};
-class Reflector
+class MSPGAME_API Reflector
{
private:
std::vector<std::unique_ptr<ClassBase>> classes;
#include <msp/datafile/directorysource.h>
#include <msp/datafile/packsource.h>
#include <msp/fs/path.h>
+#include "mspgame_api.h"
namespace Msp::Game {
-class Resources: virtual public DataFile::Collection
+class MSPGAME_API Resources: virtual public DataFile::Collection
{
public:
};
-class ApplicationResources: public Resources
+class MSPGAME_API ApplicationResources: public Resources
{
private:
DataFile::DirectorySource dir_src;
#define MSP_GAME_ROOT_H_
#include "entity.h"
+#include "mspgame_api.h"
namespace Msp::Game {
class Stage;
-class Root: public Entity
+class MSPGAME_API Root: public Entity
{
private:
Stage &stage;
#include "events.h"
#include "eventsource.h"
#include "handle.h"
+#include "mspgame_api.h"
#include "reflection.h"
#include "systemscheduler.h"
class Root;
class System;
-class Stage
+class MSPGAME_API Stage
{
public:
using EventSource = Game::EventSource<Events::EntityCreated, Events::EntityDestroyed,
#include <msp/time/timedelta.h>
#include "accessguard.h"
#include "component.h"
+#include "mspgame_api.h"
#include "reflection.h"
#include "stage.h"
namespace Msp::Game {
-class System
+class MSPGAME_API System
{
public:
enum DependencyFlags
#define MSP_GAME_SYSTEMSCHEDULER_H_
#include <vector>
+#include "mspgame_api.h"
#include "reflection.h"
namespace Msp::Game {
class System;
-class scheduling_error: public std::logic_error
+class MSPGAME_API scheduling_error: public std::logic_error
{
public:
scheduling_error(const std::string &w): logic_error(w) { }
};
-class SystemScheduler
+class MSPGAME_API SystemScheduler
{
public:
struct Group
#include <msp/linal/matrix.h>
#include <msp/linal/vector.h>
#include "component.h"
+#include "mspgame_api.h"
namespace Msp::Game {
LinAl::Matrix<float, 4, 4> world_matrix = LinAl::Matrix<float, 4, 4>::identity();
};
-class Transform: public BufferedComponent<TransformData>
+class MSPGAME_API Transform: public BufferedComponent<TransformData>
{
public:
Transform(Handle<Entity>);
#include "eventobserver.h"
#include "handle.h"
+#include "mspgame_api.h"
#include "system.h"
namespace Msp::Game {
class Entity;
class Transform;
-class TransformPropagator: public System
+class MSPGAME_API TransformPropagator: public System
{
private:
struct ParentedTransform
#include <msp/game/component.h>
#include <msp/game/meshsource.h>
#include <msp/gl/objectinstance.h>
+#include "mspgameview_api.h"
namespace Msp::GameView {
-class MeshRenderer: public Game::Component
+class MSPGAMEVIEW_API MeshRenderer: public Game::Component
{
private:
Game::Handle<Game::MeshSource> source;
--- /dev/null
+#ifndef MSP_GAMEVIEW_API_H_
+#define MSP_GAMEVIEW_API_H_
+
+#if defined(_WIN32)
+#if defined(MSPGAMEVIEW_BUILD)
+#define MSPGAMEVIEW_API __declspec(dllexport)
+#elif defined(MSPGAMEVIEW_IMPORT)
+#define MSPGAMEVIEW_API __declspec(dllimport)
+#else
+#define MSPGAMEVIEW_API
+#endif
+#elif defined(__GNUC__)
+#define MSPGAMEVIEW_API __attribute__((visibility("default")))
+#else
+#define MSPGAMEVIEW_API
+#endif
+
+#endif
#include <msp/input/mouse.h>
#include <msp/game/director.h>
#include "events.h"
+#include "mspgameview_api.h"
namespace Msp::GameView {
-class PlayerInput: public NonCopyable
+class MSPGAMEVIEW_API PlayerInput: public NonCopyable
{
public:
using EventSource = Game::EventSource<Events::PlayerArrived, Events::PlayerDeparted>;
#include <msp/game/director.h>
#include <msp/game/eventobserver.h>
#include <msp/gl/view.h>
+#include "mspgameview_api.h"
namespace Msp::GameView {
class Renderer;
-class Presenter
+class MSPGAMEVIEW_API Presenter
{
private:
Game::Director &director;
#include <msp/gl/sequence.h>
#include <msp/gl/simplescene.h>
#include <msp/gl/view.h>
+#include "mspgameview_api.h"
namespace Msp::GameView {
class MeshRenderer;
-class Renderer: public Game::System
+class MSPGAMEVIEW_API Renderer: public Game::System
{
private:
struct RenderedEntity
#define MSP_GAMEVIEW_RESOURCES_H_
#include <msp/gl/resources.h>
+#include "mspgameview_api.h"
namespace Msp::GameView {
-class Resources: public GL::Resources
+class MSPGAMEVIEW_API Resources: public GL::Resources
{
public:
Resources();