OSDN Git Service

オプショナルコメントの引数定義を追加
[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 /**
11  * コメント中間ファイル数. つまりオーバレイするコメントの種類数.
12  * 並びはframehook.hで定義している情報に依存することに注意.
13  */
14 #define N_COMMENT_TYPE 4
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     SETTING_COMMENT comment[N_COMMENT_TYPE];
53         const char* font_path;
54         int video_length;
55         int font_index;
56         int user_slot_max;
57         int owner_slot_max;
58         int shadow_kind;
59         /*TRUE OR FALSE*/
60         int show_video;
61         int fontsize_fix;
62         int opaque_comment;
63     /**
64      * アスペクト比の指定. コメントのフォントサイズや速度に影響する.
65      * 0 - 4:3
66      * 1 - 16:9
67      */
68     int aspect_mode;
69 }SETTING;
70
71 int init(FILE* log);
72 int initData(DATA* data,FILE* log,const SETTING* setting);
73 int main_process(DATA* data,SDL_Surface* surf,const int now_vpos);
74 int closeData(DATA* data);
75 int close();
76
77 #endif /*MAIN_H_*/