first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,75 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NPROJECTSCENEINSTANCE__
#define __NPROJECTSCENEINSTANCE__
#include "nstring/nstring.h"
namespace GS {
namespace S2D { class Scene; }
namespace S3D { class Scene; }
namespace Core {
// Project scene instance.
class ProjectSceneInstance
{
friend class Project;
public:
enum Type
{
Type_Scene3d = 0,
Type_Scene2d
};
protected:
bool active;
Type type;
public:
union
{
void *instance;
S2D::Scene *instance_2d;
S3D::Scene *instance_3d;
};
String GetPath() const;
Type GetType() const { return type; }
bool IsActive() const { return active; }
void Free();
~ProjectSceneInstance();
protected:
ProjectSceneInstance(S3D::Scene *inst)
{
active = true;
type = Type_Scene3d;
instance_3d = inst;
}
ProjectSceneInstance(S2D::Scene *inst)
{
active = true;
type = Type_Scene2d;
instance_2d = inst;
}
};
} // Core
} // GS
#endif // __NPROJECTSCENEINSTANCE__