mirror of
https://github.com/open-goal/jak-project
synced 2026-06-13 14:07:02 -04:00
614c5a663c
This adds some new JSON entries to custom levels so they can support vanilla sky textures and the texture remapping tables, allowing for proper textures on objects that use `generic`, like dark eco pools or dying enemies. The comments explain it in more detail, but the gist is: For skies: - `sky` needs to be a vanilla level that has sky textures. - The alpha tpage (fourth entry in `tpages`) needs to be that vanilla level's alpha tpage (if `tex_remap` is the same level as `sky`, this will be handled automatically). - The tpage needs to be added to the custom level `.gd` and to `textures` in the JSON. - In `level-info.gc`, `sky` needs to be `#t`, your level's mood needs to call `update-mood-sky-texture` (the default mood, `update-mood-default`, handles this as an example) and `sun-fade` needs to be nonzero for the sun to show up. For `generic` textures: - `tex_remap` needs to be the name of a vanilla level. - When using a vanilla level's remap table, you need to adhere to the order of the files in that level's `.gd` in your own level. - Code files are first. - Then the tpages (in the order `tfrag`, `pris`, `shrub`, `alpha`, `water`). - Then the art groups. - Lastly, the level file. - The tpages need to be added to the `textures` in the JSON.
33 lines
1.3 KiB
C++
33 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "common_formats.h"
|
|
|
|
#include "common/math/Vector.h"
|
|
|
|
#include "decompiler/ObjectFile/ObjectFileDB.h"
|
|
|
|
namespace decompiler {
|
|
|
|
// extract everything
|
|
void extract_all_levels(const ObjectFileDB& db,
|
|
const TextureDB& tex_db,
|
|
const std::vector<std::string>& dgo_names,
|
|
const std::string& common_name,
|
|
const Config& config,
|
|
const fs::path& path);
|
|
void add_all_textures_from_level(tfrag3::Level& lev,
|
|
const std::string& level_name,
|
|
const TextureDB& tex_db);
|
|
tfrag3::Texture make_texture(u32 id,
|
|
const TextureDB::TextureData& tex,
|
|
const std::string& tpage_name,
|
|
bool pool_load);
|
|
std::vector<level_tools::TextureRemap> extract_tex_remap(const ObjectFileDB& db,
|
|
const std::string& dgo_name);
|
|
std::optional<ObjectFileRecord> get_bsp_file(const std::vector<ObjectFileRecord>& records,
|
|
const std::string& dgo_name);
|
|
bool is_valid_bsp(const LinkedObjectFile& file);
|
|
} // namespace decompiler
|