Move console functions to platform dir

This commit is contained in:
kichikuou
2016-04-02 23:25:26 +09:00
parent cace9fd804
commit 55bded3395
3 changed files with 34 additions and 35 deletions
+1 -1
View File
@@ -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
-34
View File
@@ -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
}