Skip to content

Commit

Permalink
fix ui flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Oct 30, 2023
1 parent 78546ae commit b8ad3f0
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 91 deletions.
61 changes: 31 additions & 30 deletions src/game_api/flags.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const char* themes[]{

std::array themes{
"1: Dwelling",
"2: Jungle",
"2: Volcana",
Expand All @@ -18,7 +19,7 @@ const char* themes[]{
"0: Base camp",
};

const char* themes_short[]{
std::array themes_short{
"Dwelling",
"Jungle",
"Volcana",
Expand All @@ -38,7 +39,7 @@ const char* themes_short[]{
"Base camp",
};

const char* entity_flags[]{
std::array entity_flags{
"1: Invisible",
"2: Indestructable/special floor",
"3: Solid (wall)",
Expand Down Expand Up @@ -73,7 +74,7 @@ const char* entity_flags[]{
"32: Use overlay draw depth",
};

const char* more_flags[]{
std::array more_flags{
"1: Take damage on collision after throw",
"2: Revived (HH)",
"3: Blocks shield",
Expand Down Expand Up @@ -108,7 +109,7 @@ const char* more_flags[]{
"32: ",
};

const char* entity_type_properties_flags[]{
std::array entity_type_properties_flags{
"1: Apply solid block beautification",
"2: Treat as FLOORSTYLED",
"3: ",
Expand Down Expand Up @@ -143,7 +144,7 @@ const char* entity_type_properties_flags[]{
"32: Unused",
};

const char* level_flags[]{
std::array level_flags{
"1: Upbeat dwelling intro music played",
"2: ",
"3: Running tutorial speedrun",
Expand Down Expand Up @@ -178,7 +179,7 @@ const char* level_flags[]{
"32: ",
};

const char* journal_flags[]{
std::array journal_flags{
"1: I was a pacifist",
"2: I was a vegan",
"3: I was a vegetarian",
Expand Down Expand Up @@ -213,7 +214,7 @@ const char* journal_flags[]{
"32: ",
};

const char* quest_flags[]{
std::array quest_flags{
"1: Reset",
"2: Dark level spawned in world",
"3: Vault spawned in world",
Expand Down Expand Up @@ -248,7 +249,7 @@ const char* quest_flags[]{
"32: ",
};

const char* presence_flags[]{
std::array presence_flags{
"1: Udjat eye",
"2: Black market",
"3: Vlad's castle/drill",
Expand Down Expand Up @@ -283,7 +284,7 @@ const char* presence_flags[]{
"32: ",
};

const char* illumination_flags[]{
std::array illumination_flags{
"1: Disable light1",
"2: Enable light2",
"3: Enable light3",
Expand All @@ -294,7 +295,7 @@ const char* illumination_flags[]{
"8: Unknown",
};

const char* special_visibility_flags[]{
std::array special_visibility_flags{
"1: Crust embedded items shown",
"2: Crust embedded items shown (level transition)",
"3: ",
Expand All @@ -321,7 +322,7 @@ const char* special_visibility_flags[]{
"24: ",
};

const char* basecamp_dialogue_win_flags[]{
std::array basecamp_dialogue_win_flags{
"1: Ana Spelunky saved",
"2: Margaret Tunnel saved",
"3: Colin Northward saved",
Expand Down Expand Up @@ -356,7 +357,7 @@ const char* basecamp_dialogue_win_flags[]{
"32: ",
};

const char* places_flags[]{
std::array places_flags{
"Dwelling",
"Jungle",
"Volcana",
Expand All @@ -375,7 +376,7 @@ const char* places_flags[]{
"Cosmic Ocean",
};

const char* people_flags[]{
std::array people_flags{
"Ana Spelunky",
"Margaret Tunnel",
"Colin Northward",
Expand Down Expand Up @@ -416,7 +417,7 @@ const char* people_flags[]{
"Eggplant King",
};

const char* bestiary_flags[]{
std::array bestiary_flags{
"Snake",
"Spider",
"Bat",
Expand Down Expand Up @@ -497,7 +498,7 @@ const char* bestiary_flags[]{
"Mech Rider",
};

const char* items_flags[]{
std::array items_flags{
"Rope Pile",
"Bomb Bag",
"Bomb Box",
Expand Down Expand Up @@ -554,7 +555,7 @@ const char* items_flags[]{
"Four-Leaf Clover",
};

const char* traps_flags[]{
std::array traps_flags{
"Spikes",
"Arrow Trap",
"Totem Trap",
Expand All @@ -581,7 +582,7 @@ const char* traps_flags[]{
"Egg Sac",
};

const char* shortcut_flags[]{
std::array shortcut_flags{
"None",
"Met Terra",
"1-4: $2,000",
Expand All @@ -595,7 +596,7 @@ const char* shortcut_flags[]{
"5-1: Golden Key (Unlocked)",
};

/*const char *empty_flags[]{
/*std::array empty_flags{
"1: ",
"2: ",
"3: ",
Expand Down Expand Up @@ -629,30 +630,30 @@ const char* shortcut_flags[]{
"31: ",
"32: ",};*/

const char* button_flags[]{
std::array button_flags{
"Jp",
"Wp",
"Bm",
"Rp",
"Rn",
"Dr",
};
const char* direction_flags[]{
std::array direction_flags{
"Left",
"Down",
"Up",
"Right",
};

const char* liquid_pool_names[]{
std::array liquid_pool_names{
"Water",
"Coarse Water",
"Lava",
"Coarse Lava",
"Stagnant Lava",
};

const char* mask_names[]{
std::array mask_names{
"Player",
"Mount",
"Monster",
Expand All @@ -670,7 +671,7 @@ const char* mask_names[]{
"Lava",
};

const char* char_states[]{
std::array char_states{
"Flailing",
"Standing",
"Sitting",
Expand All @@ -696,7 +697,7 @@ const char* char_states[]{
"Dying",
};

const char* screen_names[]{
std::array screen_names{
"Logo",
"Intro",
"Prologue",
Expand Down Expand Up @@ -729,7 +730,7 @@ const char* screen_names[]{
"Online Lobby",
};

const char* pause_types[]{
std::array pause_types{
"1: Menu",
"2: Fade (janky camera, default)",
"4: Cutscene",
Expand All @@ -739,7 +740,7 @@ const char* pause_types[]{
"Freeze on PRE_UPDATE", // this is not a real state.pause flag, it's only used by ui.cpp for magic
};

const char* levelgen_flags[]{
std::array levelgen_flags{
"1: Should generate path",
"2: Can spawn vault",
"3: Can spawn shops",
Expand All @@ -750,7 +751,7 @@ const char* levelgen_flags[]{
"8: unknown",
};

const char* levelgen_flags2[]{
std::array levelgen_flags2{
"1: Spawns background decorations on ground (ceiling if false)",
"2: Spawns fake ladder/chain midbg?",
"3: Spawn entrance door background (Ignored in 7-1 to 7-2 transition)",
Expand All @@ -761,7 +762,7 @@ const char* levelgen_flags2[]{
"8: Has ghost",
};

const char* levelgen_flags3[]{
std::array levelgen_flags3{
"1: Can spawn angry NPCs",
"2: Can echo",
"3: Can spawn Dead are Restless",
Expand All @@ -772,7 +773,7 @@ const char* levelgen_flags3[]{
"8: unknown",
};

const char* level_chances[]{
std::array level_chances{
"backroom",
"backroom interconnect",
"backroom hidden door",
Expand Down
6 changes: 3 additions & 3 deletions src/game_api/render_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void render_loading(size_t param_1)
}

std::optional<TEXTURE> g_forced_lut_textures[2]{};
float g_layer_zoom_offset[2];
float g_layer_zoom_offset[2]{0};

using RenderLayer = void(const std::vector<Illumination*>&, uint8_t, const Camera&, const char**, const char**);
RenderLayer* g_render_layer_trampoline{nullptr};
Expand Down Expand Up @@ -110,9 +110,9 @@ void render_game(StateMemory* state)
trigger_vanilla_render_callbacks(ON::RENDER_POST_GAME);
}

float get_layer_transition_zoom_offset(uint8_t l)
float get_layer_transition_zoom_offset(uint8_t layer)
{
return g_layer_zoom_offset[l];
return g_layer_zoom_offset[layer];
}

void RenderAPI::set_lut(TEXTURE texture_id, uint8_t layer)
Expand Down
Loading

0 comments on commit b8ad3f0

Please sign in to comment.