Mercurial > otakunoraifu
annotate scn2k/test.cc @ 67:419761c8d9b9
Add configure option to build scn2kdump.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 23 Feb 2011 01:48:51 +0100 |
parents | 4416cfac86ae |
children |
rev | line source |
---|---|
36 | 1 /* |
2 * Copyright (c) 2004-2006 Kazunori "jagarl" Ueno | |
3 * All rights reserved. | |
4 * | |
5 * Redistribution and use in source and binary forms, with or without | |
6 * modification, are permitted provided that the following conditions | |
7 * are met: | |
8 * 1. Redistributions of source code must retain the above copyright | |
9 * notice, this list of conditions and the following disclaimer. | |
10 * 2. Redistributions in binary form must reproduce the above copyright | |
11 * notice, this list of conditions and the following disclaimer in the | |
12 * documentation and/or other materials provided with the distribution. | |
13 * 3. The name of the author may not be used to endorse or promote products | |
14 * derived from this software without specific prior written permission. | |
15 * | |
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
26 */ | |
27 | |
0 | 28 #include<stdio.h> |
29 #include<stdlib.h> | |
30 #include<unistd.h> | |
31 | |
32 #include<SDL.h> | |
33 #include<vector> | |
34 | |
35 #include"system/file.h" | |
36 #include"system/system_config.h" | |
37 #include"window/widget.h" | |
38 #include"window/system.h" | |
39 | |
40 #include"music2/music.h" | |
41 | |
42 #include"scn2k.h" | |
43 #include"scn2k_impl.h" | |
44 | |
45 using namespace std; | |
46 | |
47 extern char* diag; | |
48 extern char* diag2; | |
49 | |
50 int main(void) { | |
51 AyuSysConfig config; | |
52 printf("%s\n",setlocale(LC_ALL,"")); | |
53 //file_searcher.InitRoot("/home/uenok/pb"); | |
54 file_searcher.InitRoot("/mnt/KEY/CLANNAD"); | |
55 config.LoadInitFile(); | |
56 | |
57 MuSys mu(config); | |
58 mu.InitMusic(); | |
59 SetFont("msgothic.ttc"); | |
60 | |
61 SDL_Init(SDL_INIT_VIDEO); | |
62 SDL_SetVideoMode(640, 480, 0, SDL_HWSURFACE /*| SDL_FULLSCREEN */); | |
63 System::Main main; | |
64 | |
65 PicContainer* main_panel = main.root.create_node(Rect(0, 0, main.root.width, main.root.height), 0); | |
66 main_panel->show(); | |
67 Scn2k scn(main.event, *main_panel, mu, config); | |
68 // MouseCursor* cursor = new MouseCursor | |
65
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
69 // scn.OpenScript(1002, -19482); // ラブ生〜 |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
70 //scn.OpenScript(1002, -18240); // ラブ生シーン開始 |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
71 // scn.OpenScript(1002, -59528); // ラブ生シーン開始 |
0 | 72 // scn.OpenScript(2, 0); |
73 // scn.OpenScript(320, 0); | |
65
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
74 //scn.OpenScript(320, -4269); // オープニング(Chap.2) |
0 | 75 //scn.OpenScript(320, -2523); |
76 //scn.OpenScript(320, -7549); | |
65
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
77 // scn.OpenScript(310, 0); // エンディング(Wed.day) |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
78 //scn.OpenScript(311, 0); // エンディング |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
79 // scn.OpenScript(100, -2244); // 選択肢 |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
80 // scn.OpenScript(100, -9008); // 選択肢 |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
81 //scn.OpenScript(1001, -118520 ); // 選択肢:葛城クン |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
82 // scn.OpenScript(1, 0); // 開始 |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
83 // scn.OpenScript(414,380); // 開始 |
4416cfac86ae
Convert EUC-JP files to UTF8
Thibaut Girka <thib@sitedethib.com>
parents:
36
diff
changeset
|
84 // scn.OpenScript(9142,0); // 開始 |
0 | 85 // config.SetParam("#SEEN_START", 1, 9140); |
86 //scn.show_textwindow(0); | |
87 | |
88 main.Mainloop(); | |
89 | |
90 mu.FinalizeMusic(); | |
91 | |
92 SDL_Quit(); | |
93 } | |
94 |