|
Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
|
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to find out how to add a resource to the game. More...
Classes | |
| class | ALAudioAsset |
| class | Asset |
| The base class for assets. More... | |
| class | AssetLoader |
| class | AssetManager |
| class | AssetOptions |
| class | AssetPrototype |
| class | AudioAsset |
| class | BinaryAsset |
| struct | Character |
| class | CubemapPrototype |
| class | Font |
| class | FontPrototype |
| class | HjsonAsset |
| class | ImagePrototype |
| class | IOStream |
| class | IOSystem |
| class | IVirtualDirectory |
| Meant to list all the files and sub files in the directory. This is sort of a replacement for directory iterator. If you want to cd a directory, just access it from the initial file system, I guess. More... | |
| class | IVirtualFile |
| class | IVirtualFileSystem |
| The main functionality for this is to read files, so writing to files will not really be supported. More... | |
| struct | Material |
| struct | MaterialPrototype |
| struct | MeshPrototype |
| struct | Model |
| struct | ModelLoader |
| struct | ModelMesh |
| struct | ModelPrototype |
| struct | ModelTexturePrototype |
| class | NativeDirectory |
| class | NativeFile |
| class | NativeFileSystem |
| class | Package |
| class | PackagePrototype |
| class | PathedTextAsset |
| Text asset which remembers what it's path is. More... | |
| class | QueueHolder |
| class | Shader |
| class | ShaderDefinition |
| class | ShaderProgram |
| A shader program. More... | |
| class | ShaderPrototype |
| class | TextAsset |
| class | TextDirectoryAsset |
| Asset to store a directory of text files, and remembers the path of the assets. More... | |
| class | Texture |
| struct | TextureLoadingOptions |
| struct | Vertex |
| class | VirtualMounter |
Typedefs | |
| typedef std::shared_ptr< IVirtualFile > | IVirtualFilePtr |
| typedef std::shared_ptr< IVirtualDirectory > | IVirtualDirectoryPtr |
| typedef std::shared_ptr< ModelMesh > | ModelMesh_t |
| typedef std::shared_ptr< ShaderProgram > | ShaderProgram_t |
| The preferred way of using a shader program. More... | |
Enumerations | |
| enum class | AssetType { NONE , TEXTURE , SHADER , HJSON , TEXT , MODEL , FONT , CUBEMAP , TEXT_ARRAY , AUDIO , SHADER_DEFINITION , SCRIPT , BINARY } |
| enum | PrototypeType { NONE = 0 , NONE , TEXTURE , TEXTURE , SHADER , SHADER , FONT , FONT , CUBEMAP , CUBEMAP , MODEL , MODEL } |
| enum | FileModes { Text = 0 , Binary = 1 << 0 } |
| enum class | Offset { Beg , End , Cur } |
| enum class | ShaderType { NONE , VERT , FRAG , GEOM } |
Functions | |
| AssetType | FromString (const std::string &name) |
| Converts asset type names to asset types More... | |
| std::string | ToString (AssetType type) |
| Converts asset type to asset type names for display More... | |
| bool | AssetIsVisual (AssetType type) |
| Checks whether the asset is needed for windowed mode or not. More... | |
| std::string | GetShaderCode (const std::string &identifier) |
| void | MakeShader (const Hjson::Value &hjson) |
| void | GenerateMesh (engine::Mesh &mesh, std::vector< Vertex > vertices, std::vector< unsigned int > indices) |
| void | LoadModelPrototype (ModelPrototype *prototype, Model *asset) |
| void | LoadModelData (engine::Mesh *mesh, std::vector< Vertex > &vertices, std::vector< unsigned int > &indices) |
| std::vector< uint8_t > | ReadAllFromVFile (IVirtualFile *) |
| Reads all the data from the virtual file. More... | |
| std::string | ReadAllFromVFileToString (IVirtualFile *file) |
| Don't really want this, but ah well, it cannot be helped. More... | |
| std::string | GetFilename (const std::string &path) |
| Gets filename from path. More... | |
| std::string | GetParentPath (const std::string &path) |
| std::unique_ptr< AudioAsset > | LoadOgg (std::ifstream &input) |
| std::unique_ptr< AudioAsset > | LoadOgg (uint8_t *buffer, int size) |
| unsigned int | LoadShaderData (const std::string &code, int type) |
| unsigned int | MakeShaderProgram (int vertex, int fragment, int geometry) |
| std::string | GetErrorLog (unsigned int shader) |
| Get the issues of the shader, up to 1024 characters of it. More... | |
| ShaderProgram_t | MakeShaderProgram (Shader &vert, Shader &frag) |
| Helper function to create a shader program. More... | |
| ShaderProgram_t | MakeShaderProgram (Shader &vert, Shader &frag, Shader &geom) |
| Helper function to create a shader program with a geometry shader. More... | |
| void | LoadFontData (Font &font, unsigned char *fontBuffer, uint64_t size) |
| void | RenderText (ShaderProgram &shader, Font &font, std::string text, float x, float y, float scale, glm::vec3 color) |
| unsigned int | CreateTexture (unsigned char *data, int width, int height, int components, const TextureLoadingOptions &options) |
| void | CreateTexture (Texture &texture, unsigned char *data, int width, int height, int components, const TextureLoadingOptions &options) |
| void | LoadCubemapData (Texture &texture, std::vector< unsigned char * > &faces, int width, int height, int components, TextureLoadingOptions &options) |
| bool | SaveImage (const char *path, int width, int height, int components, const unsigned char *data, bool flip) |
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to find out how to add a resource to the game.
When loading an asset from the game, read cqsp::asset::AssetLoader::GetAsset
| typedef std::shared_ptr<IVirtualDirectory> cqsp::asset::IVirtualDirectoryPtr |
| typedef std::shared_ptr<IVirtualFile> cqsp::asset::IVirtualFilePtr |
| typedef std::shared_ptr<ModelMesh> cqsp::asset::ModelMesh_t |
| typedef std::shared_ptr<ShaderProgram> cqsp::asset::ShaderProgram_t |
The preferred way of using a shader program.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| TEXTURE |
|
| SHADER |
|
| HJSON |
|
| TEXT |
|
| MODEL | Not supported yet. |
| FONT |
|
| CUBEMAP |
|
| TEXT_ARRAY |
|
| AUDIO |
|
| SHADER_DEFINITION |
|
| SCRIPT | |
| BINARY | |
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| NONE | |
| TEXTURE | texture prototype |
| TEXTURE |
|
| SHADER | shader prototype |
| SHADER |
|
| FONT | Font prototype. |
| FONT |
|
| CUBEMAP | cubemap prototype |
| CUBEMAP |
|
| MODEL | Model prototype. |
| MODEL | Not supported yet. |
|
strong |
| Enumerator | |
|---|---|
| NONE | Invalid shader. |
| VERT | Vertex shader. |
| FRAG | Fragment shader. |
| GEOM | Geometry shader. |
|
inline |
Checks whether the asset is needed for windowed mode or not.
| void cqsp::asset::CreateTexture | ( | Texture & | texture, |
| unsigned char * | data, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| const TextureLoadingOptions & | options | ||
| ) |
| unsigned int cqsp::asset::CreateTexture | ( | unsigned char * | data, |
| int | width, | ||
| int | height, | ||
| int | components, | ||
| const TextureLoadingOptions & | options | ||
| ) |
|
inline |
Converts asset type names to asset types
| name |
| void cqsp::asset::GenerateMesh | ( | engine::Mesh & | mesh, |
| std::vector< Vertex > | vertices, | ||
| std::vector< unsigned int > | indices | ||
| ) |
| std::string cqsp::asset::GetErrorLog | ( | unsigned int | shader | ) |
Get the issues of the shader, up to 1024 characters of it.
| shader | shader id |
|
inline |
Gets filename from path.
| path |
|
inline |
| std::string cqsp::asset::GetShaderCode | ( | const std::string & | identifier | ) |
| void cqsp::asset::LoadCubemapData | ( | Texture & | texture, |
| std::vector< unsigned char * > & | faces, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| TextureLoadingOptions & | options | ||
| ) |
| void cqsp::asset::LoadFontData | ( | Font & | font, |
| unsigned char * | fontBuffer, | ||
| uint64_t | size | ||
| ) |
| void cqsp::asset::LoadModelData | ( | engine::Mesh * | mesh, |
| std::vector< Vertex > & | vertices, | ||
| std::vector< unsigned int > & | indices | ||
| ) |
| void cqsp::asset::LoadModelPrototype | ( | ModelPrototype * | prototype, |
| Model * | asset | ||
| ) |
| std::unique_ptr< AudioAsset > cqsp::asset::LoadOgg | ( | std::ifstream & | input | ) |
| std::unique_ptr< AudioAsset > cqsp::asset::LoadOgg | ( | uint8_t * | buffer, |
| int | size | ||
| ) |
| unsigned int cqsp::asset::LoadShaderData | ( | const std::string & | code, |
| int | type | ||
| ) |
| void cqsp::asset::MakeShader | ( | const Hjson::Value & | hjson | ) |
| unsigned int cqsp::asset::MakeShaderProgram | ( | int | vertex, |
| int | fragment, | ||
| int | geometry | ||
| ) |
|
inline |
Helper function to create a shader program.
|
inline |
Helper function to create a shader program with a geometry shader.
| std::vector< uint8_t > cqsp::asset::ReadAllFromVFile | ( | IVirtualFile * | ) |
Reads all the data from the virtual file.
| std::string cqsp::asset::ReadAllFromVFileToString | ( | IVirtualFile * | file | ) |
Don't really want this, but ah well, it cannot be helped.
| void cqsp::asset::RenderText | ( | ShaderProgram & | shader, |
| Font & | font, | ||
| std::string | text, | ||
| float | x, | ||
| float | y, | ||
| float | scale, | ||
| glm::vec3 | color | ||
| ) |
| bool cqsp::asset::SaveImage | ( | const char * | path, |
| int | width, | ||
| int | height, | ||
| int | components, | ||
| const unsigned char * | data, | ||
| bool | flip | ||
| ) |
|
inline |
Converts asset type to asset type names for display
| name |