OSDN Git Service

e1de37c8abb3adcbe1991e5c499b5ae09bb4ea07
[coroid/inqubus.git] / vhook / main.h
1 #ifndef MAIN_H_
2 #define MAIN_H_
3 #include <SDL/SDL.h>
4 #include <SDL/SDL_ttf.h>
5 #include "nicodef.h"
6 #include "struct_define.h"
7 #include "chat/chat.h"
8 #include "chat/chat_slot.h"
9
10 //typedef enum {
11 //    USER, OWNER, USER_OPT, OWNER_OPT
12 //} COMMENT_TYPE;
13
14 #define N_COMMENT_TYPE 2
15
16 struct COMMDATA {
17     int enable;
18     CHAT chat;
19     CHAT_SLOT slot;
20     int opaque_comment;
21     DATA* common;
22 };
23
24 struct DATA{
25         FILE* log;
26         TTF_Font* font[CMD_FONT_MAX];
27         SDL_Surface* screen;
28 //      /*それぞれのコメントに応じたデータ*/
29 //      //ユーザコメント
30 //      int enable_user_comment;
31 //      CHAT chat;
32 //      CHAT_SLOT slot;
33 //      //投稿者コメント
34 //      int enable_owner_comment;
35     COMMDATA comment[N_COMMENT_TYPE];
36
37         //一般的なデータ
38         int shadow_kind;
39         int show_video;
40         int fontsize_fix;
41         int process_first_called;
42         int video_length;
43     int aspect_mode;
44 };
45
46 typedef struct {
47     const char* path;
48     int enable;
49 } SETTING_COMMENT;
50
51 typedef struct SETTING{
52     // CommentType数分。
53     SETTING_COMMENT comment[N_COMMENT_TYPE];
54         const char* font_path;
55         int video_length;
56         int font_index;
57         int user_slot_max;
58         int owner_slot_max;
59         int shadow_kind;
60         /*TRUE OR FALSE*/
61         int show_video;
62         int fontsize_fix;
63         int opaque_comment;
64     /**
65      * アスペクト比の指定. コメントのフォントサイズや速度に影響する.
66      * 0 - 4:3
67      * 1 - 16:9
68      */
69     int aspect_mode;
70 }SETTING;
71
72 int init(FILE* log);
73 int initData(DATA* data,FILE* log,const SETTING* setting);
74 int main_process(DATA* data,SDL_Surface* surf,const int now_vpos);
75 int closeData(DATA* data);
76 int close();
77
78 #endif /*MAIN_H_*/