mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-12 17:28:22 +03:00
Remove global HINSTANCE
This commit is contained in:
@@ -2,13 +2,10 @@
|
||||
#include "sys/nact.h"
|
||||
|
||||
_TCHAR g_root[_MAX_PATH];
|
||||
HINSTANCE g_hinst;
|
||||
SDL_Window* g_window;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
g_hinst = (HINSTANCE)::GetModuleHandle(NULL);
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
|
||||
// ウィンドウ表示
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#include "ags.h"
|
||||
|
||||
extern HINSTANCE g_hinst;
|
||||
|
||||
void AGS::load_cursor(int page)
|
||||
{
|
||||
// カーソルCGをロードする
|
||||
@@ -28,6 +26,8 @@ void AGS::load_cursor(int page)
|
||||
cg_dest_y = j_y;
|
||||
dest_screen = dest;
|
||||
|
||||
HINSTANCE hinst = (HINSTANCE)GetModuleHandle(NULL);
|
||||
|
||||
// フォントの生成
|
||||
for(int i = 0; i < 10; i++) {
|
||||
// パターン読み込み
|
||||
@@ -78,7 +78,7 @@ void AGS::load_cursor(int page)
|
||||
if(hCursor[i]) {
|
||||
DestroyCursor(hCursor[i]);
|
||||
}
|
||||
hCursor[i] = CreateCursor(g_hinst, 2, 2, 32, 32, amask, xmask);
|
||||
hCursor[i] = CreateCursor(hinst, 2, 2, 32, 32, amask, xmask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -441,6 +441,7 @@ void NACT::select_sound(int dev)
|
||||
}
|
||||
|
||||
// デバッグコンソール
|
||||
HANDLE hConsole;
|
||||
|
||||
void NACT::initialize_console()
|
||||
{
|
||||
|
||||
@@ -226,7 +226,6 @@ private:
|
||||
// デバッグログ
|
||||
void initialize_console();
|
||||
void release_console();
|
||||
HANDLE hConsole;
|
||||
|
||||
public:
|
||||
NACT();
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#endif
|
||||
|
||||
extern SDL_Window* g_window;
|
||||
extern HINSTANCE g_hinst;
|
||||
|
||||
static BOOL CALLBACK TextDialogProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
@@ -74,7 +73,8 @@ static BOOL CALLBACK TextDialogProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
||||
|
||||
void NACT::text_dialog()
|
||||
{
|
||||
HINSTANCE hinst = (HINSTANCE)GetModuleHandle(NULL);
|
||||
SDL_SysWMinfo info;
|
||||
SDL_GetWindowWMInfo(g_window, &info);
|
||||
int r = DialogBoxParam(g_hinst, MAKEINTRESOURCE(IDD_DIALOG1), info.info.win.window, TextDialogProc, (LPARAM)this);
|
||||
int r = DialogBoxParam(hinst, MAKEINTRESOURCE(IDD_DIALOG1), info.info.win.window, TextDialogProc, (LPARAM)this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user