Skip to content

Instantly share code, notes, and snippets.

@Nucleareal
Created October 5, 2013 08:17
Show Gist options
  • Save Nucleareal/6838253 to your computer and use it in GitHub Desktop.
Save Nucleareal/6838253 to your computer and use it in GitHub Desktop.
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