Created
October 5, 2013 08:17
-
-
Save Nucleareal/6838253 to your computer and use it in GitHub Desktop.
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
class DxLibProxy | |
{ | |
private static readonly int DX_SUCCESS = 0; | |
private static readonly int DX_FAILED = -1; | |
private static readonly int DX_ERROR = 1; | |
public static bool Init() | |
{ | |
return Process( | |
(() => DX.ChangeWindowMode(DX.TRUE) != DX_SUCCESS), | |
(() => DX.SetGraphMode(DXEnvironment.SX, DXEnvironment.SY, 32) != DX_SUCCESS), | |
(() => DX.DxLib_Init() != DX_SUCCESS) | |
); | |
} | |
private static bool Process(params Func<bool>[] funcs) | |
{ | |
foreach (var f in funcs) | |
if (f()) return false; | |
return true; | |
} | |
public static bool Fina() | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment