Polyphase Game Engine
Loading...
Searching...
No Matches
Asset.h File Reference
#include "PolyphaseAPI.h"
#include "EngineTypes.h"
#include "EmbeddedFile.h"
#include "Factory.h"
#include "Object.h"
#include "Maths.h"
#include <string>
#include <vector>
#include <unordered_map>

Go to the source code of this file.

Classes

struct  AssetHeader
 
struct  AssetStub
 
class  ImportOptions
 
class  Asset
 

Macros

#define ASSET_MAGIC_NUMBER   0x4f435421
 
#define ASSET_VERSION_BASE   1
 
#define ASSET_VERSION_SCENE_EXTRA_DATA   2
 
#define ASSET_VERSION_PARTICLE_RADIAL_SPAWN   3
 
#define ASSET_VERSION_PROPERTY_EXTRA   4
 
#define ASSET_VERSION_SCENE_SUB_SCENE_OVERRIDE   5
 
#define ASSET_VERSION_FONT_TTF_FLAG   6
 
#define ASSET_VERSION_TEXTURE_COOKED_PROPERTIES   7
 
#define ASSET_VERSION_TEXTURE_LOW_QUALITY   8
 
#define ASSET_VERSION_MATERIAL_LITE_TEXTURE_COUNT   9
 
#define ASSET_VERSION_STATIC_MESH_3D_HAS_BAKED_LIGHTING   10
 
#define ASSET_VERSION_SCENE_SUBSCENE_INSTANCE_COLORS   11
 
#define ASSET_VERSION_UUID_SUPPORT   12
 
#define ASSET_VERSION_UUID_WITH_NAME_FALLBACK   13
 
#define ASSET_VERSION_NODE_PERSISTENT_UUID   14
 
#define ASSET_VERSION_MATERIAL_LITE_NODE_GRAPH   15
 
#define ASSET_VERSION_NODE_GRAPH_FUNCTIONS   16
 
#define ASSET_VERSION_NODE_GRAPH_VARIABLES   17
 
#define ASSET_VERSION_SCENE_ICON_OVERRIDE   18
 
#define ASSET_VERSION_SCENE_MENU_OVERRIDE   19
 
#define ASSET_VERSION_VOXEL3D   20
 
#define ASSET_VERSION_VOXEL3D_ATLAS   21
 
#define ASSET_VERSION_VOXEL3D_ATLAS_INT32   22
 
#define ASSET_VERSION_TERRAIN3D   23
 
#define ASSET_VERSION_TERRAIN3D_MATSLOTS   24
 
#define ASSET_VERSION_TERRAIN3D_ATLAS   25
 
#define ASSET_VERSION_TERRAIN3D_BAKE   26
 
#define ASSET_VERSION_TERRAIN3D_BAKEDMAP   27
 
#define ASSET_VERSION_TILESET_BASE   28
 
#define ASSET_VERSION_TILEMAP_BASE   29
 
#define ASSET_VERSION_TILESET_METADATA   30
 
#define ASSET_VERSION_TILESET_AUTOTILE   31
 
#define ASSET_VERSION_CURRENT   31
 
#define DECLARE_ASSET(Base, Parent)   DECLARE_FACTORY(Base, Asset); DECLARE_OBJECT(Base, Parent);
 
#define DEFINE_ASSET(Base)   DEFINE_FACTORY(Base, Asset); DEFINE_OBJECT(Base);
 

Enumerations

enum class  AssetLoadState {
  Unloaded , AwaitBegin , AwaitEnd , Loaded ,
  Count
}
 

Functions

POLYPHASE_API bool HandleAssetPropChange (Datum *datum, uint32_t index, const void *newValue)
 

Macro Definition Documentation

◆ ASSET_MAGIC_NUMBER

#define ASSET_MAGIC_NUMBER   0x4f435421

◆ ASSET_VERSION_BASE

#define ASSET_VERSION_BASE   1

◆ ASSET_VERSION_CURRENT

#define ASSET_VERSION_CURRENT   31

◆ ASSET_VERSION_FONT_TTF_FLAG

#define ASSET_VERSION_FONT_TTF_FLAG   6

◆ ASSET_VERSION_MATERIAL_LITE_NODE_GRAPH

#define ASSET_VERSION_MATERIAL_LITE_NODE_GRAPH   15

◆ ASSET_VERSION_MATERIAL_LITE_TEXTURE_COUNT

#define ASSET_VERSION_MATERIAL_LITE_TEXTURE_COUNT   9

◆ ASSET_VERSION_NODE_GRAPH_FUNCTIONS

#define ASSET_VERSION_NODE_GRAPH_FUNCTIONS   16

◆ ASSET_VERSION_NODE_GRAPH_VARIABLES

#define ASSET_VERSION_NODE_GRAPH_VARIABLES   17

◆ ASSET_VERSION_NODE_PERSISTENT_UUID

#define ASSET_VERSION_NODE_PERSISTENT_UUID   14

◆ ASSET_VERSION_PARTICLE_RADIAL_SPAWN

#define ASSET_VERSION_PARTICLE_RADIAL_SPAWN   3

◆ ASSET_VERSION_PROPERTY_EXTRA

#define ASSET_VERSION_PROPERTY_EXTRA   4

◆ ASSET_VERSION_SCENE_EXTRA_DATA

#define ASSET_VERSION_SCENE_EXTRA_DATA   2

◆ ASSET_VERSION_SCENE_ICON_OVERRIDE

#define ASSET_VERSION_SCENE_ICON_OVERRIDE   18

◆ ASSET_VERSION_SCENE_MENU_OVERRIDE

#define ASSET_VERSION_SCENE_MENU_OVERRIDE   19

◆ ASSET_VERSION_SCENE_SUB_SCENE_OVERRIDE

#define ASSET_VERSION_SCENE_SUB_SCENE_OVERRIDE   5

◆ ASSET_VERSION_SCENE_SUBSCENE_INSTANCE_COLORS

#define ASSET_VERSION_SCENE_SUBSCENE_INSTANCE_COLORS   11

◆ ASSET_VERSION_STATIC_MESH_3D_HAS_BAKED_LIGHTING

#define ASSET_VERSION_STATIC_MESH_3D_HAS_BAKED_LIGHTING   10

◆ ASSET_VERSION_TERRAIN3D

#define ASSET_VERSION_TERRAIN3D   23

◆ ASSET_VERSION_TERRAIN3D_ATLAS

#define ASSET_VERSION_TERRAIN3D_ATLAS   25

◆ ASSET_VERSION_TERRAIN3D_BAKE

#define ASSET_VERSION_TERRAIN3D_BAKE   26

◆ ASSET_VERSION_TERRAIN3D_BAKEDMAP

#define ASSET_VERSION_TERRAIN3D_BAKEDMAP   27

◆ ASSET_VERSION_TERRAIN3D_MATSLOTS

#define ASSET_VERSION_TERRAIN3D_MATSLOTS   24

◆ ASSET_VERSION_TEXTURE_COOKED_PROPERTIES

#define ASSET_VERSION_TEXTURE_COOKED_PROPERTIES   7

◆ ASSET_VERSION_TEXTURE_LOW_QUALITY

#define ASSET_VERSION_TEXTURE_LOW_QUALITY   8

◆ ASSET_VERSION_TILEMAP_BASE

#define ASSET_VERSION_TILEMAP_BASE   29

◆ ASSET_VERSION_TILESET_AUTOTILE

#define ASSET_VERSION_TILESET_AUTOTILE   31

◆ ASSET_VERSION_TILESET_BASE

#define ASSET_VERSION_TILESET_BASE   28

◆ ASSET_VERSION_TILESET_METADATA

#define ASSET_VERSION_TILESET_METADATA   30

◆ ASSET_VERSION_UUID_SUPPORT

#define ASSET_VERSION_UUID_SUPPORT   12

◆ ASSET_VERSION_UUID_WITH_NAME_FALLBACK

#define ASSET_VERSION_UUID_WITH_NAME_FALLBACK   13

◆ ASSET_VERSION_VOXEL3D

#define ASSET_VERSION_VOXEL3D   20

◆ ASSET_VERSION_VOXEL3D_ATLAS

#define ASSET_VERSION_VOXEL3D_ATLAS   21

◆ ASSET_VERSION_VOXEL3D_ATLAS_INT32

#define ASSET_VERSION_VOXEL3D_ATLAS_INT32   22

◆ DECLARE_ASSET

#define DECLARE_ASSET (   Base,
  Parent 
)    DECLARE_FACTORY(Base, Asset); DECLARE_OBJECT(Base, Parent);

◆ DEFINE_ASSET

#define DEFINE_ASSET (   Base)    DEFINE_FACTORY(Base, Asset); DEFINE_OBJECT(Base);

Enumeration Type Documentation

◆ AssetLoadState

enum class AssetLoadState
strong
Enumerator
Unloaded 
AwaitBegin 
AwaitEnd 
Loaded 
Count 

Function Documentation

◆ HandleAssetPropChange()

POLYPHASE_API bool HandleAssetPropChange ( Datum datum,
uint32_t  index,
const void *  newValue 
)
extern