annotate scn2k/test.cc @ 23:f94d28dcf7bc

No need for music2/config.h (which doesn't exist anymore)
author thib
date Sun, 02 Nov 2008 13:58:59 +0000
parents 223b71206888
children 6d1a5b7f0838
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
223b71206888 Initial import
thib
parents:
diff changeset
1 #include<stdio.h>
223b71206888 Initial import
thib
parents:
diff changeset
2 #include<stdlib.h>
223b71206888 Initial import
thib
parents:
diff changeset
3 #include<unistd.h>
223b71206888 Initial import
thib
parents:
diff changeset
4
223b71206888 Initial import
thib
parents:
diff changeset
5 #include<SDL.h>
223b71206888 Initial import
thib
parents:
diff changeset
6 #include<vector>
223b71206888 Initial import
thib
parents:
diff changeset
7
223b71206888 Initial import
thib
parents:
diff changeset
8 #include"system/file.h"
223b71206888 Initial import
thib
parents:
diff changeset
9 #include"system/system_config.h"
223b71206888 Initial import
thib
parents:
diff changeset
10 #include"window/widget.h"
223b71206888 Initial import
thib
parents:
diff changeset
11 #include"window/system.h"
223b71206888 Initial import
thib
parents:
diff changeset
12
223b71206888 Initial import
thib
parents:
diff changeset
13 #include"music2/music.h"
223b71206888 Initial import
thib
parents:
diff changeset
14
223b71206888 Initial import
thib
parents:
diff changeset
15 #include"scn2k.h"
223b71206888 Initial import
thib
parents:
diff changeset
16 #include"scn2k_impl.h"
223b71206888 Initial import
thib
parents:
diff changeset
17
223b71206888 Initial import
thib
parents:
diff changeset
18 using namespace std;
223b71206888 Initial import
thib
parents:
diff changeset
19
223b71206888 Initial import
thib
parents:
diff changeset
20 extern char* diag;
223b71206888 Initial import
thib
parents:
diff changeset
21 extern char* diag2;
223b71206888 Initial import
thib
parents:
diff changeset
22
223b71206888 Initial import
thib
parents:
diff changeset
23 int main(void) {
223b71206888 Initial import
thib
parents:
diff changeset
24 AyuSysConfig config;
223b71206888 Initial import
thib
parents:
diff changeset
25 printf("%s\n",setlocale(LC_ALL,""));
223b71206888 Initial import
thib
parents:
diff changeset
26 //file_searcher.InitRoot("/home/uenok/pb");
223b71206888 Initial import
thib
parents:
diff changeset
27 file_searcher.InitRoot("/mnt/KEY/CLANNAD");
223b71206888 Initial import
thib
parents:
diff changeset
28 config.LoadInitFile();
223b71206888 Initial import
thib
parents:
diff changeset
29
223b71206888 Initial import
thib
parents:
diff changeset
30 MuSys mu(config);
223b71206888 Initial import
thib
parents:
diff changeset
31 mu.InitMusic();
223b71206888 Initial import
thib
parents:
diff changeset
32 SetFont("msgothic.ttc");
223b71206888 Initial import
thib
parents:
diff changeset
33
223b71206888 Initial import
thib
parents:
diff changeset
34 SDL_Init(SDL_INIT_VIDEO);
223b71206888 Initial import
thib
parents:
diff changeset
35 SDL_SetVideoMode(640, 480, 0, SDL_HWSURFACE /*| SDL_FULLSCREEN */);
223b71206888 Initial import
thib
parents:
diff changeset
36 System::Main main;
223b71206888 Initial import
thib
parents:
diff changeset
37
223b71206888 Initial import
thib
parents:
diff changeset
38 PicContainer* main_panel = main.root.create_node(Rect(0, 0, main.root.width, main.root.height), 0);
223b71206888 Initial import
thib
parents:
diff changeset
39 main_panel->show();
223b71206888 Initial import
thib
parents:
diff changeset
40 Scn2k scn(main.event, *main_panel, mu, config);
223b71206888 Initial import
thib
parents:
diff changeset
41 // MouseCursor* cursor = new MouseCursor
223b71206888 Initial import
thib
parents:
diff changeset
42 // scn.OpenScript(1002, -19482); // ラブ生〜
223b71206888 Initial import
thib
parents:
diff changeset
43 //scn.OpenScript(1002, -18240); // ラブ生シーン開始
223b71206888 Initial import
thib
parents:
diff changeset
44 // scn.OpenScript(1002, -59528); // ラブ生シーン開始
223b71206888 Initial import
thib
parents:
diff changeset
45 // scn.OpenScript(2, 0);
223b71206888 Initial import
thib
parents:
diff changeset
46 // scn.OpenScript(320, 0);
223b71206888 Initial import
thib
parents:
diff changeset
47 //scn.OpenScript(320, -4269); // オープニング(Chap.2)
223b71206888 Initial import
thib
parents:
diff changeset
48 //scn.OpenScript(320, -2523);
223b71206888 Initial import
thib
parents:
diff changeset
49 //scn.OpenScript(320, -7549);
223b71206888 Initial import
thib
parents:
diff changeset
50 // scn.OpenScript(310, 0); // エンディング(Wed.day)
223b71206888 Initial import
thib
parents:
diff changeset
51 //scn.OpenScript(311, 0); // エンディング
223b71206888 Initial import
thib
parents:
diff changeset
52 // scn.OpenScript(100, -2244); // 選択肢
223b71206888 Initial import
thib
parents:
diff changeset
53 // scn.OpenScript(100, -9008); // 選択肢
223b71206888 Initial import
thib
parents:
diff changeset
54 //scn.OpenScript(1001, -118520 ); // 選択肢:葛城クン
223b71206888 Initial import
thib
parents:
diff changeset
55 // scn.OpenScript(1, 0); // 開始
223b71206888 Initial import
thib
parents:
diff changeset
56 // scn.OpenScript(414,380); // 開始
223b71206888 Initial import
thib
parents:
diff changeset
57 // scn.OpenScript(9142,0); // 開始
223b71206888 Initial import
thib
parents:
diff changeset
58 // config.SetParam("#SEEN_START", 1, 9140);
223b71206888 Initial import
thib
parents:
diff changeset
59 //scn.show_textwindow(0);
223b71206888 Initial import
thib
parents:
diff changeset
60
223b71206888 Initial import
thib
parents:
diff changeset
61 main.Mainloop();
223b71206888 Initial import
thib
parents:
diff changeset
62
223b71206888 Initial import
thib
parents:
diff changeset
63 mu.FinalizeMusic();
223b71206888 Initial import
thib
parents:
diff changeset
64
223b71206888 Initial import
thib
parents:
diff changeset
65 SDL_Quit();
223b71206888 Initial import
thib
parents:
diff changeset
66 }
223b71206888 Initial import
thib
parents:
diff changeset
67