diff options
Diffstat (limited to 'project/src/lib-numeric.h')
| -rw-r--r-- | project/src/lib-numeric.h | 75 |
1 files changed, 59 insertions, 16 deletions
diff --git a/project/src/lib-numeric.h b/project/src/lib-numeric.h index b83658a..76df32f 100644 --- a/project/src/lib-numeric.h +++ b/project/src/lib-numeric.h @@ -102,27 +102,69 @@ enum #define LE_SLOT_RND_CUSTOM 0x40 #define LE_SLOT_RND_NEW 0x41 +#define LE_SLOT_RND_BEG 0x3e +#define LE_SLOT_RND_END 0x42 + //----------------------------------------------------------------------------- -// bits for [[le_flags_t]] +// bits for [[le_flags8_t]] [[le_flags_t]] + +typedef u8 le_flags8_t; // type of LE-CODE track flags (classic 8 bits) +typedef u16 le_flags_t; // type of LE-CODE track flags since build 35 -#define LETF_NEW 0x01 // new track -#define LETF_RND_HEAD 0x02 // first track of random group -#define LETF_RND_GROUP 0x04 // member of random group, but not first +#define LEFL_NEW 0x01 // new track +#define LEFL_RND_HEAD 0x02 // first track of random group +#define LEFL_RND_GROUP 0x04 // member of random group, but not first // members are not added to cups -#define LETF_ALIAS 0x08 // use TrackByAliasLE(prop,music) +#define LEFL_ALIAS 0x08 // use TrackByAliasLE(prop,music) // as alias for another track +#define LEFL_TEXTURE 0x10 // track is declared as texture hack of same property slot +#define LEFL_HIDDEN 0x20 // exclude a track from cups. + +#define LEFL__RND 0x06 // both random flags +#define LEFL__ALL 0x3f // all bits of above + +// flags calculated by CopyLecodeFlags() +#define LEFL_BATTLE 0x0100 // track is a battle arena +#define LEFL_VERSUS 0x0200 // track is a versus track +#define LEFL_CUP 0x0400 // track is refefrenced by a cup +#define LEFL_ORIG_CUP 0x0800 // track is refefrenced by a original cup +#define LEFL_CUSTOM_CUP 0x1000 // track is refefrenced by a custom cup +#define LEFL_RANDOM 0x2000 // slot id LE-CODE random +#define LEFL__XALL 0x3f3f // all bits of above + +static inline bool IsTitleLEFL ( uint flags ) + { return (flags&(LEFL_RND_HEAD|LEFL_RND_GROUP)) == LEFL_RND_HEAD; } + +static inline bool IsHiddenLEFL ( uint flags ) + { return (flags&LEFL_HIDDEN) + || (flags&(LEFL_RND_HEAD|LEFL_RND_GROUP)) == LEFL_RND_GROUP; } + +static inline bool IsRandomLEFL ( uint flags ) + { return (flags&(LEFL_RND_HEAD|LEFL_RND_GROUP)) != 0; } -#define LETF__RND 0x06 // both random flags -#define LETF__ALL 0x0f // all bits of above +ccp PrintLEFL8 ( le_flags_t flags, bool aligned ); +ccp PrintLEFL16 ( le_flags_t flags, bool aligned ); -static inline bool IsTitleLETF ( uint flags ) - { return (flags&(LETF_RND_HEAD|LETF_RND_GROUP)) == LETF_RND_HEAD; } +static inline ccp PrintLEFL ( uint flags_bits, le_flags_t flags, bool aligned ) + { return ( flags_bits == 16 ? PrintLEFL16 : PrintLEFL8 )(flags,aligned); } -static inline bool IsHiddenLETF ( uint flags ) - { return (flags&(LETF_RND_HEAD|LETF_RND_GROUP)) == LETF_RND_GROUP; } +typedef ccp (*PrintLEFL_func) ( le_flags_t flags, bool aligned ); +static inline PrintLEFL_func GetPrintLEFL ( uint flags_bits ) + { return flags_bits == 16 ? PrintLEFL16 : PrintLEFL8; } -static inline bool IsRandomLETF ( uint flags ) - { return (flags&(LETF_RND_HEAD|LETF_RND_GROUP)) != 0; } +//----------------------------------------------------------------------------- +// some more constants + +enum +{ + LE_DISABLED = 0, // setting is dsiabled + LE_ENABLED = 0x01, // setting is enabled + LE_ALTERABLE = 0x02, // setting can be altered by player + LE_EXCLUDED = 0x04, // exclude some features or objects + LE_INCLUDED = 0x08, // include some features or objects + + LE_M_TEXTURE = LE_ENABLED | LE_ALTERABLE | LE_EXCLUDED, +}; //----------------------------------------------------------------------------- // [[lpar_mode_t]] @@ -1032,9 +1074,10 @@ void MoveAllInitV ( Var_t *dest, Var_t * src ); typedef struct VarMap_t { - Var_t * list; // pointer to the item list - uint used; // number of used elements of 'list' - uint size; // number of allocated elements of 'list' + Var_t *list; // pointer to the item list + uint used; // number of used elements of 'list' + uint size; // number of allocated elements of 'list' + LowerUpper_t force_case; // change case if LOUP_UPPER | LOUP_LOWER } VarMap_t; |
