#ifndef _COMM_H_
#define _COMM_H_

#include "common_type.h"
#include "CFTTMem.h"
#include "global_func.h"
#include "fpoint.h"
#include "str_conv.h"
#include "xsnprintf.h"

enum ECommType {
  ECommType_Err = -1,
  ECommType_0 = 0,
  ECommType_1 = 1,
  ECommType_2 = 2,
  ECommType_3 = 3,
  ECommType_4 = 4,
  ECommType_5 = 5,
  ECommType_6 = 6,
  ECommType_7 = 7,
  ECommType_8 = 8,
  ECommType_9 = 9,
  ECommType_10 = 10,
  ECommType_11 = 11,
  ECommType_12 = 12,
  ECommType_13 = 13,
  ECommType_14 = 14,
  ECommType_15 = 15,
  ECommType_16 = 16,
  ECommType_17 = 17,
  ECommType_18 = 18,
  ECommType_19 = 19,
  ECommType_20 = 20,
  ECommType_21 = 21,
  ECommType_22 = 22,
  ECommType_23 = 23,
  ECommType_24 = 24,
  ECommType_25 = 25,
  ECommType_26 = 26,
  ECommType_27 = 27,
  ECommType_28 = 28,
  ECommType_29 = 29,
  ECommType_30 = 30,
  ECommType_31 = 31,
  ECommType_32 = 32,
  ECommType_33 = 33,
  ECommType_34 = 34,
  ECommType_35 = 35,
  ECommType_69 = 69
};

/*
001d25ac COMM_CheckCommentaryTime 11
001d26cc COMM_FindFile 47
001d243c COMM_PlayCommentary 96
001d2564 COMM_PlayCommentaryDelay 18
001d2558 COMM_PlayCommentaryID 4
001d2430 COMM_PlayCommentaryKeeper 2
001d2598 COMM_PlayCommentaryKick 9
001d242c COMM_PlayCommentaryName 2
001d2658 COMM_Process 28
001d2608 COMM_Reset 15
001d2638 COMM_ResetAfterRewind 11
001d2438 COMM_StopCommentary 1
*/

struct COMM_Info_S0_14 {
  int dword_0;
  int dword_4;
  int dword_8;
  int dword_C;
  char char_10;
};

struct COMM_Info {
  int info[71];
  COMM_Info_S0_14 struct_11C[4];
  int byte_16C[0x804];
};

int COMM_CheckCommentaryTime(ECommType, int);                   // 001d25ac
uint COMM_FindFile(const char *);                               // 001d26cc
void COMM_PlayCommentary(ECommType, int, int);                  // 001d243c
void COMM_PlayCommentaryDelay(int, ECommType, int, int, bool);  // 001d2564
void COMM_PlayCommentaryID(int, int);                           // 001d2558
int COMM_PlayCommentaryKeeper(int, int);                        // 001d2430
void COMM_PlayCommentaryKick(ECommType, int, int);              // 001d2598
int COMM_PlayCommentaryName(int, int, int);                     // 001d242c
void COMM_Process();                                            // 001d2658
void COMM_Reset();                                              // 001d2608
void COMM_ResetAfterRewind();                                   // 001d2638
void COMM_StopCommentary();                                     // 001d2438

extern short *X_iCommXRef[70];
#endif  //_COMMON_H_