pub struct GMData {Show 34 fields
pub meta: Metadata,
pub animation_curves: GMAnimationCurves,
pub audio_groups: GMAudioGroups,
pub audios: GMAudios,
pub backgrounds: GMBackgrounds,
pub codes: GMCodes,
pub embedded_images: GMEmbeddedImages,
pub extensions: GMExtensions,
pub feature_flags: GMFeatureFlags,
pub filter_effects: GMFilterEffects,
pub fonts: GMFonts,
pub functions: GMFunctions,
pub game_end_scripts: GMGameEndScripts,
pub game_objects: GMGameObjects,
pub general_info: GMGeneralInfo,
pub global_init_scripts: GMGlobalInitScripts,
pub language_info: GMLanguageInfo,
pub options: GMOptions,
pub particle_emitters: GMParticleEmitters,
pub particle_systems: GMParticleSystems,
pub paths: GMPaths,
pub rooms: GMRooms,
pub ui_nodes: GMRootUINodes,
pub scripts: GMScripts,
pub sequences: GMSequences,
pub shaders: GMShaders,
pub sounds: GMSounds,
pub sprites: GMSprites,
pub tags: GMTags,
pub texture_group_infos: GMTextureGroupInfos,
pub texture_page_items: GMTexturePageItems,
pub texture_pages: GMTexturePages,
pub timelines: GMTimelines,
pub variables: GMVariables,
}Expand description
The full GameMaker data struct, containing all information from a data file.
Fields§
§meta: MetadataSome metadata about the GameMaker data file.
This is purposefully stored in another struct to make it distinct
from chunk elements in GMData and not clutter the namespace.
animation_curves: GMAnimationCurves§audio_groups: GMAudioGroups§audios: GMAudios§backgrounds: GMBackgrounds§codes: GMCodes§embedded_images: GMEmbeddedImages§extensions: GMExtensions§feature_flags: GMFeatureFlags§filter_effects: GMFilterEffects§fonts: GMFonts§functions: GMFunctions§game_end_scripts: GMGameEndScripts§game_objects: GMGameObjects§general_info: GMGeneralInfo§global_init_scripts: GMGlobalInitScripts§language_info: GMLanguageInfo§options: GMOptions§particle_emitters: GMParticleEmitters§particle_systems: GMParticleSystems§paths: GMPaths§rooms: GMRooms§ui_nodes: GMRootUINodes§scripts: GMScripts§sequences: GMSequences§shaders: GMShaders§sounds: GMSounds§sprites: GMSprites§texture_group_infos: GMTextureGroupInfos§texture_page_items: GMTexturePageItems§texture_pages: GMTexturePages§timelines: GMTimelines§variables: GMVariablesImplementations§
Source§impl GMData
impl GMData
Sourcepub fn toggle_debug(&mut self, enable: bool) -> Result<()>
pub fn toggle_debug(&mut self, enable: bool) -> Result<()>
Tries to enable or disable debug mode, based on the argument.
This function currently supports:
- Undertale
- NXTALE
- Deltarune Chapter 1 (aka.
SURVEY_PROGRAM) - Deltarune Chapter 1&2 Demo (Old)
- Deltarune Chapter 1&2 LTS Demo (New)
- Deltarune Chapters 1-4 (paid game)
Sourcepub fn enable_debug(&mut self) -> Result<()>
pub fn enable_debug(&mut self) -> Result<()>
Enables debug mode.
For more information, see Self::toggle_debug.
Sourcepub fn disable_debug(&mut self) -> Result<()>
pub fn disable_debug(&mut self) -> Result<()>
Disables debug mode.
For more information, see Self::toggle_debug.
Source§impl GMData
impl GMData
Sourcepub fn analyze_code(&self) -> CodeAnalysis
pub fn analyze_code(&self) -> CodeAnalysis
Analyzes some information about the bytecode used in this game.
For more information, see the analyze function in
crate::gml::analysis.
Source§impl GMData
impl GMData
Sourcepub fn optimize_memory(&mut self)
pub fn optimize_memory(&mut self)
Tries to reduce memory footprint by shrinking Vecs and HashMaps so
they don’t take up unneeded space.
This function may be useful to call once after data deserialization in a
long-lived application (such as a GUI/TUI where the GMData is
stored indefinitely). It is also useful to call this function after
changing formats of lots of texture pages.
You should probably not call this function frequently, as it consumes CPU power and will not meaningfully shrink your memory footprint by much if called repeatedly.
Note: This function logs a message at the end.
If you do not want this, use GMData::optimize_memory_silent instead.
Sourcepub fn optimize_memory_silent(&mut self)
pub fn optimize_memory_silent(&mut self)
Tries to reduce memory footprint by shrinking Vecs and HashMaps so
they don’t take up unneeded space.
This is GMData::optimize_memory except it does not log anything.
Source§impl GMData
impl GMData
Sourcepub fn validate_names(&self) -> Result<()>
pub fn validate_names(&self) -> Result<()>
Validates all names of all named root elements. This checks for duplicates as well as name charset.
Sourcepub fn deserialize_all_textures(&mut self) -> Result<()>
pub fn deserialize_all_textures(&mut self) -> Result<()>
Deserializes all embedded texture pages, turning their underlying image
data into DynamicImage.
This single-threaded implementation may take quite a while.
If you care about performance, I would recommend making a custom
multithreaded implementation (perhaps using the rayon crate).
Sourcepub fn post_deserialize(&mut self) -> Result<()>
pub fn post_deserialize(&mut self) -> Result<()>
Runs some actions to fully verify integrity and to prepare the data file for editing.