From 265f3e6cae05aa23521b2339d7a062b3fd14095e Mon Sep 17 00:00:00 2001 From: TheIndra55 Date: Mon, 19 Aug 2024 23:01:27 +0200 Subject: [PATCH] Fix markup flags for Underworld --- src/level/Markup.h | 27 +++++++++++++++++++++++---- src/modules/Draw.cpp | 29 +++++++++++++++++++---------- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/level/Markup.h b/src/level/Markup.h index 84f8339..e78a0cf 100644 --- a/src/level/Markup.h +++ b/src/level/Markup.h @@ -37,6 +37,7 @@ enum MUD_FLAGS : unsigned int MUD_FLAG_NONE, MUD_FLAG_DISABLED = 0x80000000, +#ifndef TR8 MUD_FLAG_LEDGEGRAB = 1 << 30, MUD_FLAG_JUMPLANDING = 1 << 29, MUD_FLAG_ENEMYDROPDOWN = 1 << 28, @@ -55,12 +56,30 @@ enum MUD_FLAGS : unsigned int MUD_FLAG_ENEMY_JUMP_DOWN = 1 << 15, MUD_FLAG_ENEMY_JUMP_ACROSS = 1 << 14, MUD_FLAG_PATTERN_INTERACT = 1 << 13, +#else + MUD_FLAG_LEDGEGRAB = 1 << 30, + MUD_FLAG_JUMPLANDING = 1 << 29, + MUD_FLAG_ENEMYDROPDOWN = 1 << 28, + MUD_FLAG_POLE = 1 << 27, + MUD_FLAG_VERTPOLE = 1 << 26, + MUD_FLAG_HORIZPOLE = 1 << 25, + MUD_FLAG_ZIPLINE = 1 << 24, + MUD_FLAG_RAILSLIDE = 1 << 23, + MUD_FLAG_LADDER = 1 << 22, + MUD_FLAG_CLOSEJUMPTARGET = 1 << 21, + MUD_FLAG_WATER = 1 << 20, + MUD_FLAG_ROPE = 1 << 19, + MUD_FLAG_COVER = 1 << 18, + MUD_FLAG_PERCH = 1 << 17, + MUD_FLAG_BALANCEBEAM = 1 << 16, + MUD_FLAG_CONSTRAINEDGROUND = 1 << 15, + MUD_FLAG_PILLAR = 1 << 4, +#endif - MUD_FLAG_WRAPS = 1 << 2, - MUD_FLAG_INSTANCE = 1 << 1, - MUD_FLAG_POLYLINE = 1 << 0, + MUD_FLAG_WRAPS = 1 << 2, + MUD_FLAG_INSTANCE = 1 << 1, + MUD_FLAG_POLYLINE = 1 << 0, - MUD_FLAG_ALL_TYPES = MUD_FLAG_ENEMY_JUMP_ACROSS | MUD_FLAG_ENEMY_JUMP_DOWN | MUD_FLAG_ENEMY_JUMP_UP | MUD_FLAG_PERCH | MUD_FLAG_ROPE | MUD_FLAG_WATER | MUD_FLAG_CLOSEJUMPTARGET | MUD_FLAG_LADDER | MUD_FLAG_MANTLEDOWN | MUD_FLAG_ZIPLINE | MUD_FLAG_HORIZPOLE | MUD_FLAG_VERTPOLE | MUD_FLAG_WALLVERTPOLE | MUD_FLAG_ENEMYDROPDOWN | MUD_FLAG_JUMPLANDING | MUD_FLAG_LEDGEGRAB | MUD_FLAG_DISABLED, MUD_FLAG_ALL = 0xFFFFFFFF, }; diff --git a/src/modules/Draw.cpp b/src/modules/Draw.cpp index 5a5f316..fb30c5b 100644 --- a/src/modules/Draw.cpp +++ b/src/modules/Draw.cpp @@ -32,27 +32,36 @@ static inline cdc::Vector3 GetVertice(unsigned int vertice, Mesh* mesh, cdc::Vec static std::pair s_mudFlags[] { - { MUD_FLAG_INSTANCE, "INSTANCE | " }, - { MUD_FLAG_WRAPS, "WRAPS | " }, - { MUD_FLAG_PATTERN_INTERACT, "PATTERN_INTERACT | " }, - { MUD_FLAG_ENEMY_JUMP_ACROSS, "ENEMY_JUMP_ACROSS | " }, - { MUD_FLAG_ENEMY_JUMP_DOWN, "ENEMY_JUMP_DOWN | " }, - { MUD_FLAG_ENEMY_JUMP_UP, "ENEMY_JUMP_UP | " }, - { MUD_FLAG_ATTACHPOINTS, "ATTACHPOINTS | " }, { MUD_FLAG_PERCH, "PERCH | " }, { MUD_FLAG_ROPE, "ROPE | " }, { MUD_FLAG_WATER, "WATER | " }, { MUD_FLAG_CLOSEJUMPTARGET, "CLOSEJUMPTARGET | " }, { MUD_FLAG_LADDER, "LADDER | " }, - { MUD_FLAG_MANTLEDOWN, "MANTLEDOWN | " }, { MUD_FLAG_ZIPLINE, "ZIPLINE | " }, { MUD_FLAG_HORIZPOLE, "HORIZPOLE | " }, { MUD_FLAG_VERTPOLE, "VERTPOLE | " }, - { MUD_FLAG_WALLVERTPOLE, "WALLVERTPOLE | " }, { MUD_FLAG_ENEMYDROPDOWN, "ENEMYDROPDOWN | " }, { MUD_FLAG_JUMPLANDING, "JUMPLANDING | " }, { MUD_FLAG_LEDGEGRAB, "LEDGEGRAB | " }, - { MUD_FLAG_DISABLED, "DISABLED | " } +#ifndef TR8 + { MUD_FLAG_PATTERN_INTERACT, "PATTERN_INTERACT | " }, + { MUD_FLAG_ENEMY_JUMP_ACROSS, "ENEMY_JUMP_ACROSS | " }, + { MUD_FLAG_ENEMY_JUMP_DOWN, "ENEMY_JUMP_DOWN | " }, + { MUD_FLAG_ENEMY_JUMP_UP, "ENEMY_JUMP_UP | " }, + { MUD_FLAG_ATTACHPOINTS, "ATTACHPOINTS | " }, + { MUD_FLAG_MANTLEDOWN, "MANTLEDOWN | " }, + { MUD_FLAG_WALLVERTPOLE, "WALLVERTPOLE | " }, +#else + { MUD_FLAG_POLE, "POLE | " }, + { MUD_FLAG_RAILSLIDE, "RAILSLIDE | " }, + { MUD_FLAG_COVER, "COVER | " }, + { MUD_FLAG_BALANCEBEAM, "BALANCEBEAM | " }, + { MUD_FLAG_CONSTRAINEDGROUND, "CONSTRAINEDGROUND | " }, + { MUD_FLAG_PILLAR, "PILLAR | " }, +#endif + { MUD_FLAG_DISABLED, "DISABLED | " }, + { MUD_FLAG_INSTANCE, "INSTANCE | " }, + { MUD_FLAG_WRAPS, "WRAPS | " } }; void Draw::OnMenu()