/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ** File: yxm.h ** Date: 08.03.99 ** Ver: 1.0 */ #define EFF_KEY_OFF (0x14) // KEY OFF #define EFF_VOLUME (0x0C) // VOLUME #define EFF_PATBREAK (0x0D) // PATTERN BREAK #define EFF_TEMPO (0x0F) // SET TEMPO #define EFF_GLOBAL_VOLUME (0x10) // GLOBAL VOLUME SET #define EFF_E_EFFECT (0x0E) // SEVERAL EFFECTS #define EFF_E_PATLOOP (0x60) // Pattern loop typedef struct { short i_volume; short i_finetune; } YXM_INSTRUMENT; typedef struct { char yxm_id[4]; // "YXM!" unsigned short yxm_flags; // flags unsigned short yxm_songlength; // song length in patternOT unsigned short yxm_restartpos; // restart position unsigned short yxm_channels; // channels (0-15) unsigned short yxm_patterns; // patterns (0-255) unsigned short yxm_instruments; // instruments (0-127) unsigned short yxm_tempo; // tempo unsigned short yxm_BPM; // BPM unsigned long yxm_duration; // Module Duration unsigned long yxm_patternOT[256]; // song pattern ordeting table YXM_INSTRUMENT yxm_instrumentinfo[16]; // infos about samples } YXM_HEADER; typedef struct { unsigned short yxmpat_size; // pattern size unsigned short yxmpat_rows; // pattern rows } YXM_PATTERN_HEADER; typedef struct { unsigned short note; // 0 unsigned short vag; // 2 unsigned short volcol; // 4 unsigned short effect; // 6 unsigned short effpar; // 8 unsigned short vol_l; // 10 unsigned short vol_r; // 12 short voice; // 14 } YXM_CHANNEL; typedef struct { unsigned short yxmd_tempo; // 0 unsigned short yxmd_songlength; // 2 unsigned short yxmd_restartpos; // 4 unsigned short yxmd_channels; // 6 short yxmd_vabid; // 8 unsigned short yxmd_globvolL; // 10 unsigned short yxmd_globvolR; // 12 unsigned long *yxmd_patternOT; // 16 short *yxmd_instrumentdata; // 20 short yxmd_count; // 24 unsigned short yxmd_songpos; // 26 unsigned short yxmd_row; // 28 unsigned short yxmd_rows; // 30 unsigned char *yxmd_patternpos; // 32 unsigned char *yxmd_patternlooppos; // 36 short yxmd_patternloopflag; // 40 short yxmd_patternloopcount; // 42 short yxmd_playflag; // 44 YXM_CHANNEL yxmd_channel[16]; // 48 } YXM_MODDATA; extern short InitYXM(unsigned char *VH, unsigned char *VB, unsigned char *YXM, YXM_MODDATA *yxmdata); extern void RemoveYXM(YXM_MODDATA *yxmdata); extern inline PlayYXM(YXM_MODDATA *mod); extern unsigned short StopYXM(YXM_MODDATA *yxmdata); extern void ResetYXM(YXM_MODDATA *yxmdata, unsigned short songpos); extern void SetYXMVolume(YXM_MODDATA *yxmdata);