PS2 035702C : 035734B : 035746E : 035763E :
1 PS2Linux 2 Game_project/ps2/domino_game/domino_main 2.1 ( ) (y ) y x 1: xy 1
y A B x 2: A B y A B x 3: A B A B ( ) xml 2
example/collision_detection/main.c init_collision_face xml CollisionFace collision_face float (xyz) xyz ( ) ( ) (ps2_vu0_trans_matrix) x z 3
2.2 OBJECT *obj DominoObject *next DominoObject *back ROT_FLAG rotate_flag FVECTOR collision_fall_line[2] FVECTOR collision_catch_line[2] int another_domino_flag DominoObject *another_domino int object_type DominoObject 4: DominoObject OBJECT *obj DominoObject *next DominoObject *back ROT_FLAG rotate_flag FVECTOR collision_fall_line[2] FVECTOR collision_catch_line[2] int another_domino_flag DominoObject *another_domino int object_type 4
DominoObject DominoList DominoList 3 Game_project/ps2/domino_game/domino_scene 3 GIMP png PS2 3.1 3 1. 2. 3. 4. 5. 6. 5
main.c static char schedule() { state = OPENING; switch(state) { case OPENING: title_scene();... case MAIN: main_scene();... case ENDING: ending_scene();...... include include scene.h int title_scene() int ending_scene() main_scene.h int main_scene() 5: main.c schedule() ################################################ static char schedule( void ) { static SCENARIO scenario = OPENING_SCENE; switch(scenario) { case OPENING_SCENE: // if (title_scene() < 0) { scenario = MAIN_SCENE; break; case MAIN_SCENE: // if(main_scene() < 0) { scenario = ENDING_SCENE; break; case ENDING_SCENE: // 6
if(ending_scene() < 0) { scenario = OPENING_SCENE; break; default: break; return TRUE; ####################################### title_scene(),ending_scene(),main_scene() schedule() switch 3.2 title_scene(),ending_scene() ending_scene() PS2,ending_scene() ####################################### int ending_scene() { static SCENE_STATE ending_state = SCENE_INIT; int ending_pad; switch (ending_state) { case SCENE_INIT: ending_init(); ending_state = SCENE_MAIN; break; 7
case SCENE_MAIN: // ending_pad = sjoy_get_ps2_button( JOYPAD_1 ); if( ending_pad & SJOY_PS2_START ) { ending_state = SCENE_FINISH; else { ending_state = SCENE_MAIN; blink_sprite( Ending_Sprite ); break; case SCENE_FINISH: ending_finish(); ending_state = SCENE_INIT; return -1; break; default: break; return 0; ##################################### ending_init(),blink_sprite(),ending_finish() switch blink_sprite() ending_init() ending_finish() ending_init() ############################################## // png #define ENDING_IMG_FILE "ending_img.png" 8
static void ending_init() { //png TEXTURE *ending_img; // png ending_img = read_png_file( ENDING_IMG_FILE ); //ending_img ps2util_tex_set( ending_img ); // ps2util_sprite_create( &Ending_Sprite, ending_img ); // ps2util_sprite_set_basicattribute( &Ending_Sprite, 0, 48, 640, 256, 0, 0, 512, 256, SPRITE_PRIO_FOREGROUND ); ps2util_sprite_use_alpha( &Ending_Sprite ); // ps2util_sprite_request( &Ending_Sprite ); ############################################ ps2util_sprite_request() ps2util_sprite_draw() ps2util_enter_mainloop() 9
ending_finish() ############################################ static void ending_finish() { // ps2util_sprite_destroy( &Ending_Sprite ); // ending_img ps2util_tex_exclude( ending_img ); // free_texture( ending_img ); ############################################# png PS2 ps2util_tex_set() ending_finish() free_texture() 4 lwo2xml 1 blender 2 3 [File] -> [Export] -> Lightwave(.lwo) 4 [Export LWO] lwo.xml PS2Linux lwo2xml notepc 10
cvs 1 Game_project/tools %cvs-cr co -d lwo2xml Game_project/tools/lwo2xml 2 ~/lwo2xml %cd lwo2xml/ 3 lwo2xml.pl C make (lwo2xml.pl ) %cvs up -r version-c %make 4 ( path ~/bin ) %mv lwo2xml ~/bin/ %rehash lwo xml %lwo2xml hoge.lwo (hoge ) 5 x3d2xml blender( 2.37a) http://www.bitbucket.ca/~acheater/blender/ x3dexport.tar.gz blender blender %cd blender.app/contents/macos/ 11
%cp -r.blender hoge (hoge ) x3dexport.tar.gz x3d_export.py.blender scripts %cd (x3dexport.tar.gz ) %cd x3dexport %cp x3d_export.py hoge/.blender/scripts/ (hoge ) blender x3d Export Game_project/tools/x3d2xml/ %cvs-cr co Game_project/tools/x3d2xml x3d2xml x3d2xml make %make depend %make x3d2xml CVS bin rehash %cp x3d2xml hoge/bin/ (hoge ) %rehash x3d2xml %x3d2xml input.x3d output.xml (output.xml ) input.x3d x3d output.xml xml (output.xml input.xml ) 12
xml 6 UV 1 2 [F] UV face select 6: 13
3 [A] [Shift]+[ ] 7: 4 3Dview UV/image editor 3Dview UV/image editor 8: 5 UV/image editor image > open 14
6 UV/image editor 9: 7 Textured 3Dview [Alt]+[Z] Texface [F12] 10: 15
7 UV xml lwo 3DCG xml PS2 xml UV 3D lwo PS2Linux Linux png png 16 2 n 8 BONE 1. 2. add > armature 3. [E] Cntl +[P] Makeparentto > armature > createfromclosestbones 4. [Cntl]+[tab] pose mode 5. pose mode 6. 3Dview [Alt]+[A] ANIM PLAY 16
9 3 3 3 1 2 10 1 17