Kohi Game Engine
resource_types.h File Reference

This file contains the types for common resources the engine uses. More...

Go to the source code of this file.

Data Structures

struct  resource_header
 The header data for binary resource types. More...
 
struct  resource
 A generic structure for a resource. All resource loaders load data into these. More...
 

Macros

#define TERRAIN_MAX_MATERIAL_COUNT   4
 
#define RESOURCE_MAGIC   0xcafebabe
 A magic number indicating the file as a kohi binary file. More...
 

Typedefs

typedef enum resource_type resource_type
 Pre-defined resource types. More...
 
typedef struct resource_header resource_header
 The header data for binary resource types. More...
 
typedef struct resource resource
 A generic structure for a resource. All resource loaders load data into these. More...
 

Enumerations

enum  resource_type {
  RESOURCE_TYPE_TEXT , RESOURCE_TYPE_BINARY , RESOURCE_TYPE_IMAGE , RESOURCE_TYPE_MATERIAL ,
  RESOURCE_TYPE_SHADER , RESOURCE_TYPE_MESH , RESOURCE_TYPE_BITMAP_FONT , RESOURCE_TYPE_SYSTEM_FONT ,
  RESOURCE_TYPE_scene , RESOURCE_TYPE_TERRAIN , RESOURCE_TYPE_AUDIO , RESOURCE_TYPE_CUSTOM
}
 Pre-defined resource types. More...
 

Detailed Description

This file contains the types for common resources the engine uses.

Author
Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
Version
1.0
Date
2022-01-11

Macro Definition Documentation

◆ RESOURCE_MAGIC

#define RESOURCE_MAGIC   0xcafebabe

A magic number indicating the file as a kohi binary file.

◆ TERRAIN_MAX_MATERIAL_COUNT

#define TERRAIN_MAX_MATERIAL_COUNT   4

Typedef Documentation

◆ resource

typedef struct resource resource

A generic structure for a resource. All resource loaders load data into these.

◆ resource_header

The header data for binary resource types.

◆ resource_type

Pre-defined resource types.

Enumeration Type Documentation

◆ resource_type

Pre-defined resource types.

Enumerator
RESOURCE_TYPE_TEXT 

Text resource type.

RESOURCE_TYPE_BINARY 

Binary resource type.

RESOURCE_TYPE_IMAGE 

Image resource type.

RESOURCE_TYPE_MATERIAL 

Material resource type.

RESOURCE_TYPE_SHADER 

Shader resource type (or more accurately shader config).

RESOURCE_TYPE_MESH 

Mesh resource type (collection of geometry configs).

RESOURCE_TYPE_BITMAP_FONT 

Bitmap font resource type.

RESOURCE_TYPE_SYSTEM_FONT 

System font resource type.

RESOURCE_TYPE_scene 

Simple scene resource type.

RESOURCE_TYPE_TERRAIN 

Terrain resource type.

RESOURCE_TYPE_AUDIO 

Audio resource type.

RESOURCE_TYPE_CUSTOM 

Custom resource type. Used by loaders outside the core engine.