view game.c @ 58:1cccf6d964b7

*** empty log message ***
author gongo
date Thu, 09 Nov 2006 01:43:07 +0000
parents 8cef655f3bf9
children 3e7db5ef4691
line wrap: on
line source

/*
 * $Id$
 */

#include <stdio.h>
#include <stdlib.h>
#include "libps2.h"
#include "ps2util.h"
#include "controler.h"
#include "lindaapi.h"
#include "car.h"
#include "game.h"

/* schedule.c */
extern void schedule();
/* controler.c */
extern Bool padCheck();
/* linda.c */
#ifdef LINDA
extern int linda_init();
#else
#define linda_init linda_init0
#endif

Game game;

static Bool
ret()
{
    return TRUE;
}

static int
linda_init0()
{
    game.linda_exec = &ret;
    return 1;
}

void
game_main()
{
    Bool flg = TRUE;

    game.play_id = linda_init();

    while (1) {
	flg = padCheck();
	if (flg == FALSE) {
	    break;
	}
	schedule();

#ifdef LINDA
	psx_sync_n();
#endif
    }
}