Skip to content

Error when parsing UFO 50 data #5

@jh05013

Description

@jh05013

parse_file panics while trying to read data.win from the game UFO 50:

use libgm::prelude::GMData;

fn main() {
	let path = "/home/jh/.steam/debian-installation/steamapps/common/UFO 50/data.win";
	let game: GMData = libgm::parse_file(path).unwrap();
    println!("Loaded {}", game.general_info.display_name);
}

Error reformatted for convenience:

thread 'main' (15535) panicked at src/main.rs:5:48:
called `Result::unwrap()` on an `Err`
value: Error { message: "Expected Unknown Always Zero to be 0 but it is actually 3 (0x00000003)",
context: [
    "deserializing element 0/17 of aligned GMBackground pointer list",
    "deserializing chunk 'BGND'",
    "parsing GameMaker data file /home/jh/.steam/debian-installation/steamapps/common/UFO 50/data.win"
] }

In fact, this "unknown always zero" value seems to grow quite a bit:

bg03_UFO_tileset
3
bg06_Golfania_tileset
6
bg07_GravGuns_tileset
14
bg09_FistHell_tileset
32
bg11_Mooncat_tileset
43
bg12_Cowboys_tileset
44
bg25_AntWar_tileset
69
bg26_Soccer_tileset
76
bg28_Ufoparty_tileset
80
bg30_Overbold_tileset
83
bg31_Elfazar_tileset
84
bg35b_Godsblood_tileset
117
bg37_Incremental_tileset
118
bg38_UFO_II_tileset
126
bg45_CyberOwls_tileset
147
bg51_UfoTower_tileset
160
bg51_UfoTowerGames_tileset_1
163

libgm detects the GameMaker version as 2024.13 (PostLTS), WAD 17.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions