Mercurial > hg > old > magoroku_racing
view title_scene.c @ 91:cb6c6de125dc
halfway
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 May 2011 14:44:03 +0900 |
parents | 8edae89a3877 |
children | 0b65ca27f113 |
line wrap: on
line source
#include "libps2.h" #include "ps2util.h" #include "title_scene.h" typedef enum { TITLE_INIT, TITLE_MAIN, TITLE_FINISH } TITLE_STATE; static ps2utilSprite title_sprite; static TEXTURE *title_img; #define TITLE_IMG_FILE "img/title.png" static void title_init() { /* load texture */ // title_img = read_png_file( TITLE_IMG_FILE ); // ps2util_tex_Set( title_img ); /* create sprite object */ /* ps2util_sprite_Create( &title_sprite, title_img ); ps2util_sprite_Set_basicAttribute( &title_sprite, 0, 0, 650, 500, 0, 0, 512, 256, SPRITE_PRIO_FOREGROUND ); ps2util_sprite_Use_alpha( &title_sprite ); ps2util_sprite_Request( &title_sprite ); */ } void title_init_call() { title_init(); } static void title_finish() { ps2util_sprite_Destroy( &title_sprite ); ps2util_tex_Exclude( title_img ); free_texture( title_img ); } void title_finish_call() { title_finish(); } int title_scene() { static TITLE_STATE state = TITLE_INIT; //int pad; switch (state) { case TITLE_INIT: title_init(); state = TITLE_MAIN; break; case TITLE_MAIN: // pad = sjoy_get_ps2_button( JOYPAD_1 ); // state = (pad & SJOY_PS2_START) ? TITLE_FINISH : TITLE_MAIN; break; case TITLE_FINISH: title_finish(); return -1; default: break; } return 0; }