#include "C4Include.h"#include "landscape/C4MapScript.h"#include "landscape/C4MapCreatorS2.h"#include "script/C4ScriptHost.h"#include "object/C4DefList.h"#include "object/C4Def.h"#include "script/C4Aul.h"#include "lib/StdMeshLoader.h"#include "mape/cpp-handles/material-handle.h"#include "mape/cpp-handles/texture-handle.h"#include "mape/cpp-handles/log-handle.h"#include "mape/cpp-handles/mapgen-handle.h"Go to the source code of this file.
Classes | |
| struct | _C4MapgenHandle |
Macros | |
| #define | HANDLE_TO_MATERIAL_MAP(handle) (reinterpret_cast<C4MaterialMap*>(handle)) |
| #define | HANDLE_TO_TEXTURE_MAP(handle) (reinterpret_cast<C4TextureMap*>(handle)) |
| #define | HANDLE_TO_GROUP(handle) (reinterpret_cast<C4Group*>(handle)) |
Functions | |
| void | c4_mapgen_handle_init_script_engine () |
| void | c4_mapgen_handle_deinit_script_engine () |
| void | c4_mapgen_handle_set_map_library (C4GroupHandle *group_handle) |
| C4MapgenHandle * | c4_mapgen_handle_new_script (const char *filename, const char *source, C4MaterialMapHandle *material_map, C4TextureMapHandle *texture_map, unsigned int map_width, unsigned int map_height) |
| C4MapgenHandle * | c4_mapgen_handle_new (const char *filename, const char *source, const char *script_path, C4MaterialMapHandle *material_map, C4TextureMapHandle *texture_map, unsigned int map_width, unsigned int map_height) |
| void | c4_mapgen_handle_free (C4MapgenHandle *mapgen) |
| const unsigned char * | c4_mapgen_handle_get_map (C4MapgenHandle *mapgen) |
| unsigned int | c4_mapgen_handle_get_width (C4MapgenHandle *mapgen) |
| unsigned int | c4_mapgen_handle_get_height (C4MapgenHandle *mapgen) |
| unsigned int | c4_mapgen_handle_get_rowstride (C4MapgenHandle *mapgen) |
| const char * | c4_mapgen_handle_get_error (C4MapgenHandle *mapgen) |
| struct _C4MapgenHandle |
Definition at line 57 of file mapgen-handle.cpp.
| Class Members | ||
|---|---|---|
| BYTE * | data | |
| StdCopyStrBuf | error_message | |
| unsigned int | height | |
| unsigned int | rowstride | |
| unsigned int | width | |
| #define HANDLE_TO_GROUP | ( | handle | ) | (reinterpret_cast<C4Group*>(handle)) |
Definition at line 32 of file mapgen-handle.cpp.
| #define HANDLE_TO_MATERIAL_MAP | ( | handle | ) | (reinterpret_cast<C4MaterialMap*>(handle)) |
Definition at line 30 of file mapgen-handle.cpp.
| #define HANDLE_TO_TEXTURE_MAP | ( | handle | ) | (reinterpret_cast<C4TextureMap*>(handle)) |
Definition at line 31 of file mapgen-handle.cpp.
| void c4_mapgen_handle_deinit_script_engine | ( | ) |
Definition at line 71 of file mapgen-handle.cpp.
References C4MapScriptHost::Clear(), C4AulScriptEngine::Clear(), C4GameScriptHost::Clear(), GameScript, MapScript, and ScriptEngine.
Referenced by c4_mapgen_handle_new(), c4_mapgen_handle_new_script(), and mape_mapgen_deinit().
| void c4_mapgen_handle_free | ( | C4MapgenHandle * | mapgen | ) |
Definition at line 289 of file mapgen-handle.cpp.
| const char* c4_mapgen_handle_get_error | ( | C4MapgenHandle * | mapgen | ) |
Definition at line 318 of file mapgen-handle.cpp.
Referenced by mape_mapgen_render().
| unsigned int c4_mapgen_handle_get_height | ( | C4MapgenHandle * | mapgen | ) |
Definition at line 306 of file mapgen-handle.cpp.
| const unsigned char* c4_mapgen_handle_get_map | ( | C4MapgenHandle * | mapgen | ) |
Definition at line 295 of file mapgen-handle.cpp.
| unsigned int c4_mapgen_handle_get_rowstride | ( | C4MapgenHandle * | mapgen | ) |
Definition at line 312 of file mapgen-handle.cpp.
| unsigned int c4_mapgen_handle_get_width | ( | C4MapgenHandle * | mapgen | ) |
Definition at line 300 of file mapgen-handle.cpp.
| void c4_mapgen_handle_init_script_engine | ( | ) |
Definition at line 65 of file mapgen-handle.cpp.
References InitCoreFunctionMap(), C4MapScriptHost::InitFunctionMap(), MapScript, and ScriptEngine.
Referenced by c4_mapgen_handle_new(), c4_mapgen_handle_new_script(), and mape_mapgen_init().
| C4MapgenHandle* c4_mapgen_handle_new | ( | const char * | filename, |
| const char * | source, | ||
| const char * | script_path, | ||
| C4MaterialMapHandle * | material_map, | ||
| C4TextureMapHandle * | texture_map, | ||
| unsigned int | map_width, | ||
| unsigned int | map_height | ||
| ) |
Definition at line 174 of file mapgen-handle.cpp.
References c4_log_handle_clear(), c4_log_handle_get_first_log_message(), c4_log_handle_get_n_log_messages(), c4_mapgen_handle_deinit_script_engine(), c4_mapgen_handle_init_script_engine(), C4SLandscape::Default(), Definitions, C4Group::FindNextEntry(), FormatString(), GameScript, StdStrBuf::getData(), C4Group::GetError(), C4MapCreatorS2::GetMap(), HANDLE_TO_MATERIAL_MAP, HANDLE_TO_TEXTURE_MAP, C4AulScriptEngine::Link(), C4GameScriptHost::Load(), C4SLandscape::MapHgt, C4SLandscape::MapPlayerExtend, C4SLandscape::MapWdt, C4MCParserErr::Msg, C4Group::Open(), C4MCParser::ParseMemFile(), C4MapCreatorS2::RenderBuf(), C4Group::ResetSearch(), ScriptEngine, C4SVal::Set(), and _C4MapgenHandle::width.
Referenced by mape_mapgen_render().
| C4MapgenHandle* c4_mapgen_handle_new_script | ( | const char * | filename, |
| const char * | source, | ||
| C4MaterialMapHandle * | material_map, | ||
| C4TextureMapHandle * | texture_map, | ||
| unsigned int | map_width, | ||
| unsigned int | map_height | ||
| ) |
Definition at line 98 of file mapgen-handle.cpp.
References c4_log_handle_clear(), c4_log_handle_get_first_log_message(), c4_log_handle_get_n_log_messages(), c4_mapgen_handle_deinit_script_engine(), c4_mapgen_handle_init_script_engine(), C4SLandscape::Default(), Definitions, GameScript, HANDLE_TO_MATERIAL_MAP, HANDLE_TO_TEXTURE_MAP, C4MapScriptHost::InitializeMap(), C4AulScriptEngine::Link(), C4MapScriptHost::LoadData(), C4GameScriptHost::LoadData(), C4SLandscape::MapHgt, C4SLandscape::MapPlayerExtend, MapScript, C4SLandscape::MapWdt, ScriptEngine, C4SVal::Set(), and _C4MapgenHandle::width.
Referenced by mape_mapgen_render().
| void c4_mapgen_handle_set_map_library | ( | C4GroupHandle * | group_handle | ) |
Definition at line 78 of file mapgen-handle.cpp.
References C4DefList::Add(), C4D_Load_Script, C4D_StaticBack, C4Def::Category, C4DefList::Clear(), Definitions, HANDLE_TO_GROUP, C4Def::id, C4Def::Load(), C4PropList::SetName(), and C4ID::ToString().
Referenced by mape_mapgen_set_root_group().