Codechange: Use EnumBitSet for SpriteFlags.

This commit is contained in:
Peter Nelson
2025-03-22 21:07:24 +00:00
committed by Peter Nelson
parent 5abe7c1386
commit 234c9fb3bd
4 changed files with 21 additions and 22 deletions

View File

@@ -128,10 +128,10 @@ Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::SpriteCollection &spri
}
/* Store sprite flags. */
sd.flags = SF_NONE;
if (has_translucency) sd.flags |= SF_TRANSLUCENT;
if (!has_remap) sd.flags |= SF_NO_REMAP;
if (!has_anim) sd.flags |= SF_NO_ANIM;
sd.flags = {};
if (has_translucency) sd.flags.Set(SpriteFlag::Translucent);
if (!has_remap) sd.flags.Set(SpriteFlag::NoRemap);
if (!has_anim) sd.flags.Set(SpriteFlag::NoAnim);
memcpy(dst_sprite->data, &sd, sizeof(SpriteData));
return dst_sprite;