Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support for Buffy The Vampire Slayer: Chaos Bleeds #32

Open
joshbarrass opened this issue Apr 9, 2024 · 3 comments
Open

Feature: Support for Buffy The Vampire Slayer: Chaos Bleeds #32

joshbarrass opened this issue Apr 9, 2024 · 3 comments

Comments

@joshbarrass
Copy link
Contributor

joshbarrass commented Apr 9, 2024

As discussed briefly in #31, support for the Xbox/GC version(s) of this game would be great.

EDB version for this game is known to be 170.

I've done some brief testing with the Xbox version of the game as starting point for this.

What works:

  • Filelist.bin extraction seems to work perfectly.
  • Entities/meshes seems to work perfectly when using the same mesh type as Hero's Tail (EDB version 240).
  • Texture extraction is working, but (for the Xbox version at least) does not work if the data_size field is used in EXGeoTexture. An additional condition was added for this.

What doesn't work:

  • Map extraction. The entities for the map can be extracted, but at this point the program crashes. This is presumably the same as the two Sphinx games.

What hasn't been tested:

  • Spreadsheet extraction.
@joshbarrass
Copy link
Contributor Author

I've pushed the changes I made to get it this far to my fork, in case this helps (though there are no substantial changes so far).

@joshbarrass
Copy link
Contributor Author

joshbarrass commented Apr 9, 2024

I've managed to make some progress on fixing the texture extraction. Every file I've tried reports a data size of 88, which is not correct, so the calculated data size must be used instead. This allows the correct amount of data to be read, but produces a corrupted texture. By comparing with copies of the texture I already have, I've found that the frame offsets are all out by 84. Changing this line from

edb.seek(std::io::SeekFrom::Start(frame_offset.offset_absolute()))?;

to

edb.seek(std::io::SeekFrom::Start(frame_offset.offset_absolute() + 84))?;

(see the full changes in my fork) will allow textures to be extracted correctly for every EDB file I have tried in this game.

Every data size coming out as 88 and the modification to the frame offset being +84 seems quite close. It would be interesting to try a few more files and see if any of them have data sizes that aren't 88, and whether this affects the frame offset. Maybe this is another offset parameter? I'm not too versed in the structure of these files, so it would be good to get some input from someone else.

@joshbarrass
Copy link
Contributor Author

Ah, I added another case to texture.rs to not create the data_size field (as is already done for PC and PS2) when working with Chaos Bleeds (version == 170 && platform == Platform::Xbox). This removes the need to manually correct the offset, and the textures can be extracted properly with little additional modification.

@joshbarrass joshbarrass changed the title Support for Buffy The Vampire Slayer: Chaos Bleeds Feature: Support for Buffy The Vampire Slayer: Chaos Bleeds Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant