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  */
13 #define N_COMMENT_TYPE 4
14
15 /**
16  * コメントの種類. 並びはframehook.hで定義している情報と関連があることに注意.
17  */
18 typedef enum {
19     COMMENT_USER_OPT, COMMENT_OWNER_OPT, COMMENT_USER, COMMENT_OWNER
20 } COMMENT_TYPE;
21
22 typedef enum {
23     OPAQUE_FALSE, OPAQUE_TRUE, OPAQUE_HALF
24 } OPAQUE;
25
26 struct COMMDATA {
27     int enable;
28     CHAT chat;
29     CHAT_SLOT slot;
30     OPAQUE opaque_comment;
31     DATA* common;
32 };
33
34 struct DATA{
35         FILE* log;
36         TTF_Font* font[CMD_FONT_MAX];
37         SDL_Surface* screen;
38 //      /*それぞれのコメントに応じたデータ*/
39 //      //ユーザコメント
40 //      int enable_user_comment;
41 //      CHAT chat;
42 //      CHAT_SLOT slot;
43 //      //投稿者コメント
44 //      int enable_owner_comment;
45     COMMDATA comment[N_COMMENT_TYPE];
46
47         //一般的なデータ
48         int shadow_kind;
49         int show_video;
50         int fontsize_fix;
51         int process_first_called;
52         int video_length;
53     int aspect_mode;
54 };
55
56 typedef struct {
57     const char* path;
58     int enable;
59 } SETTING_COMMENT;
60
61 typedef struct SETTING{
62     SETTING_COMMENT comment[N_COMMENT_TYPE];
63         const char* font_path;
64         int video_length;
65         int font_index;
66         int user_slot_max;
67         int shadow_kind;
68         /*TRUE OR FALSE*/
69         int show_video;
70         int fontsize_fix;
71         OPAQUE opaque_comment;
72     /**
73      * アスペクト比の指定. コメントのフォントサイズや速度に影響する.
74      * 0 - 4:3
75      * 1 - 16:9
76      */
77     int aspect_mode;
78 }SETTING;
79
80 int init(FILE* log);
81 int initData(DATA* data,FILE* log,const SETTING* setting);
82 int main_process(DATA* data,SDL_Surface* surf,const int now_vpos);
83 int closeData(DATA* data);
84 int close();
85
86 #endif /*MAIN_H_*/