STATIC_ASSERT for sizeof(struct ListMenu)

This commit is contained in:
Martin Griffin
2025-11-08 14:54:18 +00:00
committed by Philipp AUER
parent f8e7a2db5f
commit c5bbaeab5d

View File

@@ -13,6 +13,10 @@
#include "sound.h"
#include "constants/songs.h"
// GF cast Task data to ListMenu in many places, which effectively puts
// an upper bound on sizeof(struct ListMenu).
STATIC_ASSERT(sizeof(struct ListMenu) <= sizeof(((struct Task *)NULL)->data), ListMenuTooLargeForTaskData);
// Cursors after this point are created using a sprite with their own task.
// This allows them to have idle animations. Cursors prior to this are simply printed text.
#define CURSOR_OBJECT_START CURSOR_RED_OUTLINE