root/scn2k/test.cc

Revision 65:4416cfac86ae, 3.2 KB (checked in by Thibaut Girka <thib@…>, 18 months ago)
Convert EUC-JP files to UTF8
Line 
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
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
45using namespace std;
46
47extern char* diag;
48extern char* diag2;
49
50int 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
69        // scn.OpenScript(1002, -19482); // ラブ生〜
70        //scn.OpenScript(1002, -18240); // ラブ生シヌン開始
71        // scn.OpenScript(1002, -59528); // ラブ生シヌン開始
72        // scn.OpenScript(2, 0);
73        // scn.OpenScript(320, 0);
74        //scn.OpenScript(320, -4269); // オヌプニング(Chap.2)
75        //scn.OpenScript(320, -2523);
76        //scn.OpenScript(320, -7549);
77        // scn.OpenScript(310, 0); // ゚ンディング(Wed.day)
78        //scn.OpenScript(311, 0); // ゚ンディング
79        // scn.OpenScript(100, -2244); // 遞択肢
80        // scn.OpenScript(100, -9008); // 遞択肢
81        //scn.OpenScript(1001, -118520 ); // 遞択肢葛城クン
82        // scn.OpenScript(1, 0); // 開始
83        // scn.OpenScript(414,380); // 開始
84        // scn.OpenScript(9142,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
Note: See TracBrowser for help on using the browser.