#ifndef BOOTPACK_H_
#define BOOTPACK_H_

extern"C" void BitNosMain(); /* Cの入り口 */
int BitNosMainCpp(); /* C++の入り口 */

typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned int dword;
typedef unsigned int size_t;

#define NULL 0

#define DEBUG_MESSAGE

// DRAG_FRAME  1:十字架  2:枠
#define DRAG_FRAME 2

// 定数定義
const dword ADR_BOOTINFO = 0x900;


extern "C" {
	// 半角フォント
	extern byte hankaku[256 * 16];
	// ミニフォント
	extern byte minifnt[256 * 12];
}

#include "naskfunc.h"
#include "std/deque.h"
#include "std/queue.h"
#include "driver/video/video.h"
#include "driver/video/vesa.h"
#include "driver/io/io.h"
#include "driver/io/eflags.h"
#include "driver/io/cr0.h"
#include "driver/io/gdtr.h"
#include "driver/io/tr.h"
#include "driver/pic/pic.h"
#include "driver/keyboard/keyboard.h"
#include "driver/mouse/mouse.h"
#include "driver/pit/pit.h"
#include "driver/rtc/rtc.h"
#include "system/arraylist.h"
#include "system/memory.h"
#include "system/bootinfo.h"
#include "system/desctable.h"
#include "system/font.h"
#include "system/graphic.h"
#include "system/int.h"
#include "system/message.h"
#include "system/sheet.h"
#include "system/timer.h"
#include "system/debugwindow.h"
#include "system/window.h"
#include "system/mtask.h"
#include "system/systemtask.h"
#include "system/time.h"
#include <string.h>
#include <stdio.h>


using namespace system;
using namespace driver;
using namespace std;

extern Font* font_hankaku;
extern Font* font_mini;
extern Screen* g_screen;
#ifndef DEBUG_MESSAGE
extern queue<Message*>* task1_fifo;
#else
extern queue<Message>* task1_fifo;
#endif
extern TimerController* g_timerctl;
extern SheetController* g_shtctl;
extern Sheet* g_sheet_back;
extern TaskController* g_taskctl;


extern DebugWindow* dbg;

void putstr_sht(Sheet* sht, int x, int y, const char* str, color_16 color,
	color_16 bgcolor, Font* font = font_hankaku);
void box_sht(Sheet* sht, int x0, int y0, int x1, int y1, color_16 color);

/*
 * デバッグ用関数
 */
//void dbg(const char* const msg);

#endif
