Last active
January 2, 2016 05:49
-
-
Save yashihei/8259257 to your computer and use it in GitHub Desktop.
オレオレ仕様Dxlibのmain.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Dxlib.h> | |
#pragma warning(disable:4996) | |
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ) { | |
//SetGraphMode();画面サイズ任意 | |
if (MessageBox(NULL,"フルスクリーンで起動しますか?","起動オプション",MB_YESNO) == IDYES) { | |
ChangeWindowMode(FALSE); | |
} else { | |
ChangeWindowMode(TRUE); | |
} | |
SetOutApplicationLogValidFlag(FALSE); | |
SetMainWindowText("HOGE"); | |
if (DxLib_Init() == -1) return -1; | |
SetDrawScreen(DX_SCREEN_BACK); | |
//フォント読み込み | |
//const char* font_path = "dat/hoge.ttf"; | |
//AddFontResourceEx(font_path, FR_PRIVATE, NULL); | |
//ChangeFont("BM mini", DX_CHARSET_DEFAULT); | |
//SetFontSize(18); | |
//デバグ用にコンソール出してやる | |
AllocConsole(); | |
freopen("CONOUT$", "w", stdout); | |
while (ProcessMessage() == 0) { | |
ClearDrawScreen(); | |
ScreenFlip(); | |
} | |
// RemoveFontResourceEx(font_path, FR_PRIVATE, NULL); | |
FreeConsole(); | |
DxLib_End(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment