From 772b0585c2bf86d83086e3394d97432aaa12c143 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 13 Apr 2024 16:15:17 +1000 Subject: [PATCH] deduplicate const CollisionBlock sets when i dumped the symbols, these two and their initializers had over 150 duplicates --- source/game/StarCollisionBlock.cpp | 3 +++ source/game/StarCollisionBlock.hpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/game/StarCollisionBlock.cpp b/source/game/StarCollisionBlock.cpp index dfe3204..cbcba54 100644 --- a/source/game/StarCollisionBlock.cpp +++ b/source/game/StarCollisionBlock.cpp @@ -2,6 +2,9 @@ namespace Star { +CollisionSet const DefaultCollisionSet({CollisionKind::Null, CollisionKind::Slippery, CollisionKind::Dynamic, CollisionKind::Block}); +CollisionSet const BlockCollisionSet({CollisionKind::Block, CollisionKind::Slippery}); + EnumMap const TileCollisionOverrideNames = { {TileCollisionOverride::None, "None"}, {TileCollisionOverride::Empty, "Empty"}, diff --git a/source/game/StarCollisionBlock.hpp b/source/game/StarCollisionBlock.hpp index b24f650..bce745d 100644 --- a/source/game/StarCollisionBlock.hpp +++ b/source/game/StarCollisionBlock.hpp @@ -53,10 +53,10 @@ private: }; // The default CollisionSet consists of Null, Slippery, Dynamic and Block -CollisionSet const DefaultCollisionSet({CollisionKind::Null, CollisionKind::Slippery, CollisionKind::Dynamic, CollisionKind::Block}); +extern CollisionSet const DefaultCollisionSet; // Defines what can be "blocks" e.g. for tile rendering: Block and Slippery -CollisionSet const BlockCollisionSet({CollisionKind::Block, CollisionKind::Slippery}); +extern CollisionSet const BlockCollisionSet; extern EnumMap const TileCollisionOverrideNames;