annotate scn2k/test.cc @ 72:f9eb96a4cce0

Register all (?) commands, to help finding non-implemented ones in game.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 02 Apr 2011 02:05:27 +0200
parents 4416cfac86ae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
1 /*
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
2 * Copyright (c) 2004-2006 Kazunori "jagarl" Ueno
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
3 * All rights reserved.
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
4 *
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
5 * Redistribution and use in source and binary forms, with or without
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
6 * modification, are permitted provided that the following conditions
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
7 * are met:
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
8 * 1. Redistributions of source code must retain the above copyright
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
9 * notice, this list of conditions and the following disclaimer.
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
12 * documentation and/or other materials provided with the distribution.
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
13 * 3. The name of the author may not be used to endorse or promote products
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
14 * derived from this software without specific prior written permission.
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
15 *
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
26 */
6d1a5b7f0838 * Updated copyright/license information
thib
parents: 0
diff changeset
27
0
223b71206888 Initial import
thib
parents:
diff changeset
28 #include<stdio.h>
223b71206888 Initial import
thib
parents:
diff changeset
29 #include<stdlib.h>
223b71206888 Initial import
thib
parents:
diff changeset
30 #include<unistd.h>
223b71206888 Initial import
thib
parents:
diff changeset
31
223b71206888 Initial import
thib
parents:
diff changeset
32 #include<SDL.h>
223b71206888 Initial import
thib
parents:
diff changeset
33 #include<vector>
223b71206888 Initial import
thib
parents:
diff changeset
34
223b71206888 Initial import
thib
parents:
diff changeset
35 #include"system/file.h"
223b71206888 Initial import
thib
parents:
diff changeset
36 #include"system/system_config.h"
223b71206888 Initial import
thib
parents:
diff changeset
37 #include"window/widget.h"
223b71206888 Initial import
thib
parents:
diff changeset
38 #include"window/system.h"
223b71206888 Initial import
thib
parents:
diff changeset
39
223b71206888 Initial import
thib
parents:
diff changeset
40 #include"music2/music.h"
223b71206888 Initial import
thib
parents:
diff changeset
41
223b71206888 Initial import
thib
parents:
diff changeset
42 #include"scn2k.h"
223b71206888 Initial import
thib
parents:
diff changeset
43 #include"scn2k_impl.h"
223b71206888 Initial import
thib
parents:
diff changeset
44
223b71206888 Initial import
thib
parents:
diff changeset
45 using namespace std;
223b71206888 Initial import
thib
parents:
diff changeset
46
223b71206888 Initial import
thib
parents:
diff changeset
47 extern char* diag;
223b71206888 Initial import
thib
parents:
diff changeset
48 extern char* diag2;
223b71206888 Initial import
thib
parents:
diff changeset
49
223b71206888 Initial import
thib
parents:
diff changeset
50 int main(void) {
223b71206888 Initial import
thib
parents:
diff changeset
51 AyuSysConfig config;
223b71206888 Initial import
thib
parents:
diff changeset
52 printf("%s\n",setlocale(LC_ALL,""));
223b71206888 Initial import
thib
parents:
diff changeset
53 //file_searcher.InitRoot("/home/uenok/pb");
223b71206888 Initial import
thib
parents:
diff changeset
54 file_searcher.InitRoot("/mnt/KEY/CLANNAD");
223b71206888 Initial import
thib
parents:
diff changeset
55 config.LoadInitFile();
223b71206888 Initial import
thib
parents:
diff changeset
56
223b71206888 Initial import
thib
parents:
diff changeset
57 MuSys mu(config);
223b71206888 Initial import
thib
parents:
diff changeset
58 mu.InitMusic();
223b71206888 Initial import
thib
parents:
diff changeset
59 SetFont("msgothic.ttc");
223b71206888 Initial import
thib
parents:
diff changeset
60
223b71206888 Initial import
thib
parents:
diff changeset
61 SDL_Init(SDL_INIT_VIDEO);
223b71206888 Initial import
thib
parents:
diff changeset
62 SDL_SetVideoMode(640, 480, 0, SDL_HWSURFACE /*| SDL_FULLSCREEN */);
223b71206888 Initial import
thib
parents:
diff changeset
63 System::Main main;
223b71206888 Initial import
thib
parents:
diff changeset
64
223b71206888 Initial import
thib
parents:
diff changeset
65 PicContainer* main_panel = main.root.create_node(Rect(0, 0, main.root.width, main.root.height), 0);
223b71206888 Initial import
thib
parents:
diff changeset
66 main_panel->show();
223b71206888 Initial import
thib
parents:
diff changeset
67 Scn2k scn(main.event, *main_panel, mu, config);
223b71206888 Initial import
thib
parents:
diff changeset
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
223b71206888 Initial import
thib
parents:
diff changeset
72 // scn.OpenScript(2, 0);
223b71206888 Initial import
thib
parents:
diff changeset
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
223b71206888 Initial import
thib
parents:
diff changeset
75 //scn.OpenScript(320, -2523);
223b71206888 Initial import
thib
parents:
diff changeset
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
223b71206888 Initial import
thib
parents:
diff changeset
85 // config.SetParam("#SEEN_START", 1, 9140);
223b71206888 Initial import
thib
parents:
diff changeset
86 //scn.show_textwindow(0);
223b71206888 Initial import
thib
parents:
diff changeset
87
223b71206888 Initial import
thib
parents:
diff changeset
88 main.Mainloop();
223b71206888 Initial import
thib
parents:
diff changeset
89
223b71206888 Initial import
thib
parents:
diff changeset
90 mu.FinalizeMusic();
223b71206888 Initial import
thib
parents:
diff changeset
91
223b71206888 Initial import
thib
parents:
diff changeset
92 SDL_Quit();
223b71206888 Initial import
thib
parents:
diff changeset
93 }
223b71206888 Initial import
thib
parents:
diff changeset
94