aboutsummaryrefslogtreecommitdiff
path: root/project/dclib/lib-mkw.h
diff options
context:
space:
mode:
authorWiimm <wiimm@wiimm.de>2023-10-24 19:17:33 +0200
committerWiimm <wiimm@wiimm.de>2023-10-24 19:17:33 +0200
commit6acd361e1439ace91468735bd286d69d23fd86af (patch)
tree03604f4aca7a8f4ef939d4d548b1f32e132b1342 /project/dclib/lib-mkw.h
parent336da838ce43edae40dd708dd465f1f43a2c312d (diff)
SZS v2.39a
Diffstat (limited to '')
-rw-r--r--project/dclib/lib-mkw.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/project/dclib/lib-mkw.h b/project/dclib/lib-mkw.h
index 37ad862..605999d 100644
--- a/project/dclib/lib-mkw.h
+++ b/project/dclib/lib-mkw.h
@@ -142,7 +142,7 @@ static inline bool IsMkwTrack ( uint tid )
{ return tid < MKW_TRACK_END; }
static inline bool IsLecodeTrack ( uint tid )
- { return tid < MKW_TRACK_END || tid >= MKW_LE_SLOT_BEG; }
+ { return tid < MKW_TRACK_END || tid >= MKW_LE_SLOT_BEG && tid < MKW_LE_SLOT_END; }
static inline bool IsMkwArena ( uint tid )
{ return tid >= MKW_ARENA_BEG && tid < MKW_ARENA_END; }
@@ -169,6 +169,16 @@ static inline bool IsValidLecodeSlot ( uint tid )
|| tid >= MKW_LE_SLOT_BEG && tid < MKW_LE_SLOT_END
|| tid >= MKW_LE_RANDOM_BEG && tid < MKW_LE_RANDOM_END; }
+static inline bool IsUsableLecodeSlot ( uint tid )
+ { return tid < MKW_ARENA_END
+ || tid >= MKW_LE_SLOT_BEG && tid < MKW_LE_SLOT_END; }
+
+static inline bool IsUsableCtcodeSlot ( uint tid )
+ { return tid < 0x42 || tid >= 0x44 && tid < 0xff; }
+
+// if !is_ctcode, then use IsUsableLecodeSlot(), otherwise use IsUsableCtcodeSlot()
+bool IsUsableXcodeSlot ( uint tid, int is_ctcode );
+
static inline bool IsMkwSpecial ( uint tid )
{ return tid >= MKW_SPECIAL_BEG && tid < MKW_SPECIAL_END; }