view game.c @ 19:8ab79a86aa73

*** empty log message ***
author gongo
date Sat, 04 Nov 2006 09:13:06 +0000
parents b405fe1a6920
children 447281fe6845
line wrap: on
line source

/*
 * $Id$
 */

#include <stdio.h>
#include <stdlib.h>
#include "libps2.h"
#include "ps2util.h"

#include "camera.h"
#include "controler.h"
#include "lindaapi.h"
#include "col.h"
#include "field.h"
#include "car.h"
#include "game.h"
#include "gSprite.h"
#include "gFont.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_sche(void*);

void
game_main()
{
    Bool flg = TRUE;
    set_sche(sche_game_init);

    game.play_id = linda_init();

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

#ifdef LINDA
	linda_update();
	psx_sync_n();
#endif
    }
}