int system_init(void){ Psysinit(); memset(consolecharbuf,0x00,sizeof(consolecharbuf)); memset(consolecolorbuf,0x00,sizeof(consolecolorbuf)); srand((unsigned) time(NULL)); // 描画する文字列の文字セットを変更します ChangeFont("プチコン"); SetFontSize(8); SetFontThickness(5); return 0; }
Scene* SceneTitleInit::Update() { int t; switch (state) { case 0: if (Bright::Instance()->ChangeBright(255, 30)) ++state; break; case 1: // データロード t = GetNowCount(); Image::Instance()->Init("data/image/image.csv"); Sound::Instance()->Init(); //ショットデータ読み込み PlayerBullet::Load(); //セーブデータ読み込み Save::Instance()->LoadSaveData(); //フォントデータ読み込み ChangeFont("MS ゴシック"); SetFontThickness(3); SetFontSize(16); ChangeFontType(1); fonts.push_back(std::make_shared<Font>("梅PゴシックC5", 24, 4, "data/font/ume-pgc5.ttf")); fonts.push_back(std::make_shared<Font>("梅PゴシックC5", 16, 3, "data/font/ume-pgc5.ttf", DX_FONTTYPE_ANTIALIASING_EDGE)); //ロードにかかった時間 t = GetNowCount() - t; // ロードが1000ms以下なら1000msまで待機 if (t < 1000) Sleep(1000 - t); ++state; break; case 2: if (Bright::Instance()->ChangeBright(0, 30)) return new SceneTitle(); } DrawBox(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, 0xffffff, TRUE); DrawGraph(60, 40, images[0], TRUE); return this; }