// // BG処理 // #include //プレステライブラリのヘッダ #include "pad.h" //パッド入力関連のdefine定義ヘッダ #include "adr.h" //データアドレスヘッダ #include "gamemain.h" //define定義ヘッダ extern int bg_tpage,bg_no; extern GsF_LIGHT pslt[3]; //平行光源構造体(p25) int BgTbl[] = { 0, 2, 2, 3, 4, 1, 1, 1, 2, 3, 4, }; int YukaTbl[] = { 1, 2, 0, 1, 2, 0, 1, 1, 0, 1, 0, }; void SetLight( int no ) { static deg; //SELECT if( no == -1 ) { #define TURN 4 deg++; if( deg < 128*TURN ) deg++; if( deg > 255*TURN ) deg = 0; pslt[0].r=0xa0; pslt[0].g=0xa0; pslt[0].b=0x60; //光源色設定 pslt[0].vx = 100*COS(deg/TURN)/256; pslt[0].vy= 30; pslt[0].vz= 100*SIN(deg/TURN)/256; //光源方向ベクトル設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0x8f,AMBIENT*pslt[0].g/0x8f,AMBIENT*pslt[0].b/0x6f); //アンビエントの設定 return; } switch( BgTbl[no] ) { //壁紙 case 0: pslt[0].r=0xd0; pslt[0].g=0x80; pslt[0].b=0x60; //光源色設定 pslt[0].vx = -30; pslt[0].vy= 70; pslt[0].vz= -60; //光源方向ベクトル設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0xff,AMBIENT*pslt[0].g/0xff,AMBIENT*pslt[0].b/0xff); //アンビエントの設定 break; //女神 case 1: pslt[0].r=0xb0; pslt[0].g=0x90; pslt[0].b=0x58; //光源色設定 pslt[0].vx = -90; pslt[0].vy=100; pslt[0].vz= -60; //光源方向ベクトル設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0xff,AMBIENT*pslt[0].g/0xff,AMBIENT*pslt[0].b/0xff); //アンビエントの設定 break; //海 case 2: pslt[0].r=0xff; pslt[0].g=0x90; pslt[0].b=0x80; //光源色設定 pslt[0].vx = 80; pslt[0].vy= 40; pslt[0].vz= 80; //光源方向ベクトル設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0xff,AMBIENT*pslt[0].g/0x80,AMBIENT*pslt[0].b/0xb0); //アンビエントの設定 break; //違和きりし case 3: pslt[0].r=0x50; pslt[0].g=0x50; pslt[0].b=0x88; //光源色設定 pslt[0].vx = 60; pslt[0].vy= 90; pslt[0].vz= -50; //光源方向ベクトル設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0xff,AMBIENT*pslt[0].g/0xff,AMBIENT*pslt[0].b/0xff); //アンビエントの設定 break; //雲 case 4: pslt[0].r=0xf0; pslt[0].g=0xe0; pslt[0].b=0x60; //光源色設定 pslt[0].vx = -90; pslt[0].vy= 60; pslt[0].vz= 110; //光源方向ベクトル設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0xff,AMBIENT*pslt[0].g/0xff,AMBIENT*pslt[0].b/0xff); //アンビエントの設定 break; /*//没 case 5: pslt[0].r=0x80; pslt[0].g=0x90; pslt[0].b=0x60; //光源色設定 GsSetFlatLight(0,&pslt[0]); //平行光源の設定(p129) GsSetAmbient(AMBIENT*pslt[0].r/0xff,AMBIENT*pslt[0].g/0xff,AMBIENT*pslt[0].b/0xff); //アンビエントの設定 break; */ } } void SetBGVram( int no ) { GsIMAGE tim; SetLight( no ); switch( BgTbl[no] ) { case 0: bg_tpage = load_texture( (u_long *)BG0_ADDR, &tim); break; case 1: bg_tpage = load_texture( (u_long *)BG1_ADDR, &tim); break; case 2: bg_tpage = load_texture( (u_long *)BG2_ADDR, &tim); break; case 3: bg_tpage = load_texture( (u_long *)BG3_ADDR, &tim); break; case 4: bg_tpage = load_texture( (u_long *)BG2_ADDR, &tim); break; } switch( YukaTbl[no] ) { case 0: load_texture( (u_long *)GRA2_0ADDR, &tim);//yukatex break; case 1: load_texture( (u_long *)GRA2_1ADDR, &tim);//yukatex break; case 2: load_texture( (u_long *)GRA2_2ADDR, &tim);//yukatex break; } } void InitBG0Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 4000-2000; man[1].pl.vx = -4000-2000; SetBGVram( 0 ); bg.width = 28; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); //bg.pt[i].op.obj.attribute |= GsDIV5; } //SetOther( 0, Random(45000,-45000),-30000,0, 0,0,0, 0,0,0,0,0); //SetOther( 0,Random(45000,15000),-40000,0, 0,0,0, 0,0,0,0,0); //SetOther( 0,Random(-10000,-25000),-50000,0, 0,0,0, 0,0,0,0,0); SetOther( 3, 10000,-10000,0, 100,0,0, -1,0,0,0,-1); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 2, Random(15000,-15000),-10000,0, 100,0,0, -1,0,0,0,0); SetOther( 2, Random(35000,-35000),-10000,0, 100,0,0, -1,0,0,0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); } int bg1tbl[] = { -5800, -5800, -4200, -3400, 1000, 1000, -2400, -2400, -2400,-9200, -9200, -6000, -5200, -5200, -5200, 00,-2600, -2600, -4200,-13200, -13200, }; int bg1ptn[] = { 0,0,3,1,5, 5,0,0,0,0, 0,0,1,0,0, 5,0,4,4,0, 0 }; void InitBG1Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 4000-2000; man[1].pl.vx = -4000-4000; SetBGVram( 1 ); bg.width = 21; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(15500,-15500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); // SetOther( 0,Random(55000,15000),-10000,0, 0,0,0, 0,0,0,0,0); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 2, Random(8500,-2500),-50000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(10500,-10500),-10000,0, 100,0,0, -1,0,0,0,-1); } void InitBG2Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 3000-2000; man[1].pl.vx = -3000-2000; SetBGVram( 2 ); bg.width = 8; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 0,Random(-15000,-35000),-20000,0, 0,0,0, 0,0,0,0,0); SetOther( 1,Random(10500,-10500),-20000,0, 0,0,0, -1,-300,Random(250,-250),0,0); SetOther( 2, Random(10500,-10500),-10000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(15500,-15500),-10000,0, 100,0,0, -1,0,0,0,-1); } int bg3ptn[] = { 0,3,1,1,0, 0,0,2,2,4, 0 }; int bg3tbl[] = { -6000, -4400, -3600, -2800,-2800 , -2800, -2800, -2800, -3600,-4400 , -6000, }; void InitBG3Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 5000-2000; man[1].pl.vx = -5000-2000; SetBGVram( 3 ); bg.width = 11; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 2, Random(10500,-10500),-10000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(10500,-10500),-10000,0, 100,0,0, -1,0,0,0,-1); } int bg4ptn[] = { 4,4,2,2,2, 0,0,0,1,1, 1,3,3 }; int bg4tbl[] = { -200, -1800, -3400, -4200, -5000, -5800 ,-5800, -5800, -5000, -4200, -3400 ,-1800, -200, }; void InitBG4Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 5000-2000; man[1].pl.vx = -5000-2000; SetBGVram( 4 ); bg.width = 13; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 2, Random(10500,-10500),-15000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(10500,-10500),-10000,0, 100,0,0, -1,0,0,0,-1); } int bg5tbl[] = { -6800, -6800, -5200, -4400,-1200, -1200, 2200, -1200, -1200,-4400, -4400, -4400, -4400, -5200, -4400+800, 1800, 1800, -1400, -3000,-3000, -3000, }; int bg5ptn[] = { 0,0,3,1,0, 0,5,0,0,0, 0,0,2,0,3, 5,5,4,0,0, 0 }; void InitBG5Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 4000-4000; man[1].pl.vx = -4000-4000; SetBGVram( 5 ); bg.width = 21; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } // SetOther( 0,Random(55000,15000),-10000,0, 0,0,0, 0,0,0,0,0); SetOther( 4,Random(5500,-9500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(9500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 2,Random(8500,-8500),-10000,0, 100,0,0, -1,0,0,0,0); SetOther( 1,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 3, Random(12500,-12500),-10000,0, 100,0,0, -1,0,0,0,-1); } int bg6ptn[] = { 0, 0, 2, 4, 0,1,3,0,3, 1,0,1,0,4, 0, 0, 0, 0, }; int bg6tbl[] = { -9600, -1200, -1200, -5400, -7000, -6200, -4600, -4600,-3000 , -2200, -6200, -5400, -5400,-5400 , -7000, -7000, -7000, -7000, }; void InitBG6Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 8000-2000; man[1].pl.vx = -8000-2000; SetBGVram( 6 ); bg.width = 18; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 2, Random(5500,-5500),-25000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(10500,-10500),-10000,0, 100,0,0, -1,0,0,0,-1); } int bg7ptn[] = { 0,0,1,3,//4 5,5,4,2,//8 0,0,0,1,3,//12 5,5,4,2,//16 0,0, //20 }; int bg7tbl[] = { -3400,-3400,-2600,-1000, 600, 600,-1000,-2600, -3400,-3400,-3400,-2600,-1000, 600, 600,-1000,-2600, -3400,-3400,-2600,-1000, 600, 600, }; void InitBG7Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 8000-6000; man[1].pl.vx = -8000-6000; SetBGVram( 7 ); bg.width = 19; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 2, Random(14500,-14500),-25000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(12500,-12500),-10000,0, 100,0,0, -1,0,0,0,-1); } int bg8ptn[] = { 0,0,1,3,//4 0,5,2,0,//8 0,0,0,4,//12 4,0,0,2,//16 0,0, //20 }; int bg8tbl[] = { -10800,-10800,-10000,-8400, 2600, 2600,-7600,-8400, -600,-600,-8400,-10000, -11600,-13200,-13200,-13200, -14000,-14000, }; void InitBG8Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 8000-2000; man[1].pl.vx = -8000-2000; SetBGVram( 7 ); bg.width = 18; for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 2, Random(15500,-15500),-25000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(20500,-20500),-10000,0, 100,0,0, -1,0,0,0,-1); } //パーツ int bg9ptn[] = { 0,5,0,4,//4 0,4,0,0,//8 0,0,0,0,//12 3,0,3,0,//16 5,0, //20 }; //高さ int bg9tbl[] = { -6400,-1600,-3200,-3200, -4800,-4800, -6400,-6400, -6400,-6400,-6400,-6400, -4800,-4800,-3200,-3200, -1600,-6400, }; void InitBG9Coord() { int i,no; GsIMAGE tim; man[0].pl.vx = 8000-2000; man[1].pl.vx = -8000-2000; SetBGVram( 7 ); bg.width = 18; //横幅 for(i=0; i OBJ_BG0_0+5 ) no=OBJ_BG0_0+5; GsLinkObject4((unsigned long)dop[no],&bg.pt[i].op.obj,0); GsInitCoordinate2(WORLD,&bg.pt[i].op.co); // bg.pt[i].op.obj.attribute |= GsDIV5; } //爆弾 SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); SetOther( 4,Random(3500,-3500),-20000,0, 0,0,0, -1,-800,-Random(250,-250),0,0); //十 SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(9500,-9500),-20000,0, 0,0,0, -1,-100,-Random(50,-50),0,0); SetOther( 1,Random(5500,-5500),-20000,0, 0,0,0, -1,-200,-Random(150,-150),0,0); //箱とブーメラン SetOther( 2, Random(15500,-15500),-25000,0, 100,0,0, -1,0,0,0,0); SetOther( 3, Random(20500,-20500),-10000,0, 100,0,0, -1,0,0,0,-1); } void InitBGCoord() { StopBGM(); switch( bg_no ) { //BG設定(数は適当) case 0: InitBG0Coord(); StartBGM(1); break; case 1: InitBG1Coord(); StartBGM(2); break; case 2: InitBG2Coord(); StartBGM(1); break; case 3: InitBG3Coord(); StartBGM(2); break; case 4: InitBG4Coord(); StartBGM(1); break; case 5: InitBG5Coord(); StartBGM(2); break; case 6: InitBG6Coord(); StartBGM(1); break; case 7: InitBG7Coord(); StartBGM(2); break; case 8: InitBG8Coord(); StartBGM(1); break; case 9: InitBG9Coord(); StartBGM(2); break; case 10: InitBG7Coord(); StartBGM(1); break; } } MOJI moji[MOJI_MAX]; #define HIT_Y -60 #define NUMBER_MAX 6 MOJI num[NUMBER_MAX]; int hx1=-160,hx2=200,num1,num2,cnt1,cnt2,size1,size2; TXDAT tx_ko = { // attribute, w, h,tpage, u, v, cx, cy, mx, my 0x00000000, 119, 47, 0,128,128, 0,490, 60, 24, }; TXDAT tx_moji[] = { // attribute, w, h,tpage, u, v, cx, cy, mx, my 0x00000000, 120, 24, 0, 0,128+ 0, 0,494, 60, 12, //0:round 0x00000000, 88, 32, 0, 0,128+24, 0,494, 44, 16, //1:fight 0x00000000, 72, 16, 0, 0,128+56, 0,494, 36, 8, //2:double 0x00000000, 120, 32, 0, 0,128+72, 0,494, 60, 12, //3:RingOut 0x00000000, 16, 16, 0, 88,128+32, 0,494, 8, 8, //4:1 0x00000000, 16, 16, 0,104,128+32, 0,494, 8, 8, //5:2 0x00000000, 40, 16, 0, 72,128+56, 0,494, 20, 8, //6:P Win 0x00000000, 48, 32, 0, 0, 56, 0,497, 24, 16, //7:GAMEOVER }; extern TXDAT tx_hitmark0; TXDAT tx_number[] = { // attribute, w, h,tpage, u, v, cx, cy, mx, my { 0x00000000, 16, 20, 0,128, 64, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,144, 64, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,160, 64, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,176, 64, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,192, 64, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,128, 84, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,144, 84, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,160, 84, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,176, 84, 0,484, 6, 11, }, { 0x00000000, 16, 20, 0,192, 84, 0,484, 6, 11, }, { 0x00000000, 48, 20, 0,128,104, 0,484, 8, 9, } }; void SetNumber( int i, int n, int x,int y,int size ) { GsSPRITE *sp; num[i].flg = TRUE; num[i].syu = n; num[i].cnt = 30; sp = &num[i].sp; sp->x = x; sp->y = y; sp->scalex = size; sp->scaley = size; SetTxDat( sp, &tx_number[n] ); // SetTxDat( sp, &tx_ko ); } void DelNumber( int i ) { num[i].flg = FALSE; } void SetHitNum( int pn, int num ) { int i,j,size,sz; if( num > 99 ) num = 99; if( pn == 0 ) { if( num < 2 ) { cnt2--; if( cnt2 < 0 ) { cnt2 = 0; hx2 += 8; } if( hx2 > 220 ) { hx2 = 220; num2 = num; } //return; } else { cnt2 = 40; if( num2 != num) { size2 = 0; num2 = num; } hx2 -= 16; if( hx2 < 100 ) hx2 = 100; } i = num2; j = num2 / 10; size =( (num2+16)*(4096/16) )+1000; if( size > 32000) size = 32000; sz = 18*size/4096; if( size2 < size ) size2 += (size-size2)/4; else size2 = size; if( j != 0 ) { SetNumber(3,j,hx2-sz*2+sz/4-8,HIT_Y,size2) ; } else DelNumber(3); j = num2 % 10; SetNumber(4,j,hx2-sz-sz/16+sz/32,HIT_Y, size2); SetNumber(5,10,hx2,HIT_Y, 4096); } if( pn == 1 ) { if( num < 2 ) { cnt1--; if( cnt1 < 0 ) { cnt1 = 0; hx1 -= 8; } if( hx1 < -150-120 ) { hx1 = -150-120; num1 = num; } //return; } else { cnt1 = 40; if( num1 != num) { size1 = 0; num1 = num; } hx1 += 16; if( hx1 > -150 ) hx1 = -150; } i = num1; j = num1 / 10; size =( (num1+8)*(4096/8) )+1000; if( size > 32000) size = 32000; sz = 18*size/4096; if( size1 < size ) size1 += (size-size1)/4; else size1 = size; if( j != 0 ) { SetNumber(0,j,hx1,HIT_Y,size1) ; } else DelNumber(0); j = num1 % 10; SetNumber(1,j,hx1+sz-sz/16-sz/32,HIT_Y, size1); SetNumber(2,10,hx1+sz*2-sz/4+8,HIT_Y, 4096); } } void PutNumber() { int i,j; GsSPRITE *sp; for( i=0; ir = sp->g = sp->b = 0x80; sp->rotate = 0; PutSPRITE( sp ); } } } void ClearNumber() { int i,j; hx1=-150-120; hx2=220; num1 = num2 = cnt1 = cnt2 = size1 = size2 = 0; for( i=0; ix = x; sp->y = y; switch( syu ) { case 0: SetTxDat( sp, &tx_ko ); sp->scalex = 4096*4; sp->scaley = 4096*4; anten_flg = ANTEN_ON; anten_cnt = 60; break; case 1: SetTxDat( sp, &tx_moji[0] ); sp->scalex = 4596; sp->scaley = 4596; break; case 2: SetTxDat( sp, &tx_moji[1] ); sp->scalex = 16596; sp->scaley = 16596; break; case 3: SetTxDat( sp, &tx_moji[2] ); sp->scalex = 4596; sp->scaley = 4596; break; case 4: SetTxDat( sp, &tx_moji[3] ); sp->scalex = 4596; sp->scaley = 4596; break; case 5: SetTxDat( sp, &tx_moji[4] ); sp->scalex = 4596; sp->scaley = 4596; break; case 6: SetTxDat( sp, &tx_moji[5] ); sp->scalex = 4596; sp->scaley = 4596; break; case 7: SetTxDat( sp, &tx_moji[6] ); sp->scalex = 4596; sp->scaley = 4596; break; case 8: SetTxDat( sp, &tx_number[1] ); sp->scalex = 5096; sp->scaley = 5096; break; case 9: SetTxDat( sp, &tx_number[2] ); sp->scalex = 5096; sp->scaley = 5096; break; case 10:SetTxDat( sp, &tx_number[3] ); sp->scalex = 5096; sp->scaley = 5096; break; case 11: SetTxDat( sp, &tx_number[4] ); sp->scalex = 5096; sp->scaley = 5096; break; case 12: SetTxDat( sp, &tx_number[5] ); sp->scalex = 5096; sp->scaley = 5096; break; case 13:SetTxDat( sp, &tx_number[6] ); sp->scalex = 5096; sp->scaley = 5096; break; case 14: SetTxDat( sp, &tx_number[7] ); sp->scalex = 5096; sp->scaley = 5096; break; case 15: SetTxDat( sp, &tx_number[8] ); sp->scalex = 5096; sp->scaley = 5096; break; case 16:SetTxDat( sp, &tx_number[9] ); sp->scalex = 5096; sp->scaley = 5096; break; case 17: SetTxDat( sp, &tx_moji[7] ); sp->scalex = 8596; sp->scaley = 8596; break; } break; } } } void PutMoji() { int i,j; GsSPRITE *sp; for( i=0; ir = sp->g = sp->b = 0x80; sp->rotate = 0; if( moji[i].syu == 0 ) { if( moji[i].cnt > 55 ) VSync(0); //VSync待ち(p59) if( moji[i].cnt > 98 ) continue; //VSync待ち(p59) if( sp->scalex > 4096 ) sp->scalex -= sp->scalex/6; if( sp->scaley > 4096 ) sp->scaley -= sp->scaley/6; } if( moji[i].syu == 2 ) { if( sp->scalex > 4096 ) sp->scalex -= sp->scalex/8; if( sp->scaley > 4096 ) sp->scaley -= sp->scaley/8; } PutSPRITE( sp ); } } } //176.128