mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-07 14:27:56 +03:00
Move console functions to platform dir
This commit is contained in:
@@ -23,7 +23,7 @@ OBJS = src/fileio.o \
|
||||
src/sys/nact_crc32.o \
|
||||
src/sys/nact_input.o \
|
||||
src/sys/nact_sys3.o \
|
||||
src/win/nact_dialog.o \
|
||||
src/win/nact_win.o \
|
||||
src/win/unicode.o \
|
||||
src/res3/Script1.o
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
[ NACT ]
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "nact.h"
|
||||
#include "ags.h"
|
||||
#include "mako.h"
|
||||
@@ -439,36 +438,3 @@ void NACT::select_sound(int dev)
|
||||
mako->play_music(page);
|
||||
}
|
||||
}
|
||||
|
||||
// デバッグコンソール
|
||||
HANDLE hConsole;
|
||||
|
||||
void NACT::initialize_console()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
AllocConsole();
|
||||
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
#if defined(_SYSTEM1)
|
||||
SetConsoleTitle("SYSTEM1 NACT Tracer");
|
||||
#elif defined(_SYSTEM2)
|
||||
SetConsoleTitle("SYSTEM2 NACT Tracer");
|
||||
#else
|
||||
SetConsoleTitle("SYSTEM3 NACT Tracer");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::release_console()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
FreeConsole();
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::output_console(char log[])
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
DWORD dwWritten;
|
||||
WriteConsole(hConsole, log, strlen(log), &dwWritten, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -78,3 +78,36 @@ void NACT::text_dialog()
|
||||
SDL_GetWindowWMInfo(g_window, &info);
|
||||
int r = DialogBoxParam(hinst, MAKEINTRESOURCE(IDD_DIALOG1), info.info.win.window, TextDialogProc, (LPARAM)this);
|
||||
}
|
||||
|
||||
// ƒfƒoƒbƒOƒRƒ“ƒ\�[ƒ‹
|
||||
HANDLE hConsole;
|
||||
|
||||
void NACT::initialize_console()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
AllocConsole();
|
||||
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
#if defined(_SYSTEM1)
|
||||
SetConsoleTitle("SYSTEM1 NACT Tracer");
|
||||
#elif defined(_SYSTEM2)
|
||||
SetConsoleTitle("SYSTEM2 NACT Tracer");
|
||||
#else
|
||||
SetConsoleTitle("SYSTEM3 NACT Tracer");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::release_console()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
FreeConsole();
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::output_console(char log[])
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
DWORD dwWritten;
|
||||
WriteConsole(hConsole, log, strlen(log), &dwWritten, NULL);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user