Ejemplo n.º 1
0
GLCLDraw::GLCLDraw()
{
   int i;
   pixelBuffer = NULL;
   AG_MutexInit(&mutex_buffer);
   AG_MutexInit(&mutex_palette);
   TransferBuffer = NULL;
   nkernels = 0;
   using_device = 0;
   for(i = 0; i < 8; i++) device_type[i] = 0;
   for(i = 0; i < 8; i++) local_memsize[i] = 0;
}
Ejemplo n.º 2
0
static void
Init(void)
{
	AG_CondInit(&agCondBeginRender);
	AG_CondInit(&agCondEndRender);
	AG_MutexInit(&agCondRenderLock);
	gettimeofday(&t0, NULL);
}
Ejemplo n.º 3
0
static void
RENDERER_Init(void)
{
	if (!inited) {
		AG_CondInit(&agCondBeginRender);
		AG_CondInit(&agCondEndRender);
		AG_MutexInit(&agCondRenderLock);
		inited = 1;
	}
	clock_gettime(CLOCK_MONOTONIC, &t0);
}
Ejemplo n.º 4
0
//
// InitLogFile
//
int Xbox::InitLogFile()
{
	AG_MutexInit(&XBLogMutex);

	AG_MutexLock(&XBLogMutex);

	XBLogFile.open("T:\\ag-odalaunch.log");
	if(XBLogFile.fail())
	{
		AG_MutexUnlock(&XBLogMutex);
		return -1;
	}

	AG_MutexUnlock(&XBLogMutex);

	return 0;
}
Ejemplo n.º 5
0
DumpObject::DumpObject()
{
    ConsoleBuf = NULL;
    BackupConsoleBuf = NULL;
    Changed = FALSE;
    X = 0;
    Y = 0;
    W = 0;
    H = 0;
    CHRW = 0;
    CHRH = 0;
    fgColor.r = 255;
    fgColor.g = 255;
    fgColor.b = 255;
    fgColor.a = 255;
    bgColor.r = 0;
    bgColor.g = 0;
    bgColor.b = 0;
    bgColor.a = 255;

    Screen = NULL;
    AG_MutexInit(&mutex);
    InitFont();
}
Ejemplo n.º 6
0
    /*
     *  ウインドウ作成
     */
void OnCreate(AG_Widget *parent)
{
        BOOL        flag;
/*
 * ワークエリア初期化
 */
        nErrorCode = 0;
        bMenuLoop = FALSE;
        bCloseReq = FALSE;
        bSync = TRUE;
        bSyncDisasm[0] = TRUE;
        bSyncDisasm[1] = TRUE;
        bActivate = FALSE;
        AG_MutexInit(&VMMutex);
/*
 * コンポーネント初期化
 */
        LoadCfg();
        InitDraw();
#ifdef _USE_OPENCL
        if(AG_UsingGL(NULL) != 0) {
	   do {
	       SDL_Delay(1);
	   } while(bInitCL);
	}
#endif   
        InitSnd();
        InitKbd();
        InitJoy();
        InitSch();
//        CreateStatus();

/*
 * 仮想マシン初期化
 */
        if (!system_init()) {
                nErrorCode = 1;
                return;
        }
/*
 * 直後、リセット
 */
        ApplyCfg();
        system_reset();

/*
 * コンポーネントセレクト
 */
        flag = TRUE;
        if (!SelectDraw()) {
                flag = FALSE;
        }
        if (!SelectSnd()) {
                flag = FALSE;
        }
        if (!SelectKbd()) {
                flag = FALSE;
        }
        if (!SelectSch()) {
                flag = FALSE;
        }
        PaintStatus();

/*
 * エラーコードをセットさせ、スタート
 */
        if (!flag) {
                nErrorCode = 2;
        }
}