view game.c @ 45:d7520785d8a6

*** empty log message ***
author gongo
date Wed, 08 Nov 2006 05:23:40 +0000
parents 3b71b39411b1
children abadcc080667
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() 1
#endif
extern void linda_update();

Game game;

extern void sche_game_init();
extern void set_schedule(void*);

void
game_main()
{
    Bool flg = TRUE;
    Bool linda_flg = TRUE;
    set_schedule(sche_game_init);

    game.play_id = linda_init();

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

#ifdef LINDA
	psx_sync_n();
#endif
    }
}