本文整理汇总了C++中_S_Plane::pfDraw方法的典型用法代码示例。如果您正苦于以下问题:C++ _S_Plane::pfDraw方法的具体用法?C++ _S_Plane::pfDraw怎么用?C++ _S_Plane::pfDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_S_Plane
的用法示例。
在下文中一共展示了_S_Plane::pfDraw方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
for(int i=0;i<2;i++)
{
map_init(&gScreenBuf[i]);
map_new(&gScreenBuf[i],35,16);
}
map_init(&gPlayerModel);
map_load(&gPlayerModel,"plane1.dat");
Plane_init(&gPlayerObject,&gPlayerModel,0,0);
system("clear");
set_conio_terminal_mode();
acc_tick=last_tick=0;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//실시간 입력
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("bye~ \r");
}
}
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
return 0;
}
示例2: main
int main()
{
system("clear");
for(int i=0;i<2;i++){
map_init(&gScreenBuffer[i]);
gScreenBuffer[i].fpnew(&gScreenBuffer[i],35,16);
//map_new(&gScreenBuffer[i],35,16);
}
map_init(&gPlayerModel);
map_load(&gPlayerModel,"plane.dat");
Plane_init(&gPlayerObject,&gPlayerModel,17,10);
bullet_init(&gBulletObject,0,0,0,&gPlayerModel);
map_init(&gBulletModel);
map_load(&gBulletModel,"plasma.dat");
bullet_init(&gBulletObject,0,0,0,&gBulletModel);
set_conio_terminal_mode();
acc_tick=last_tick=0;
acc_bullet_delay_tick=0;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//실시간 입력
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("bye~ \r");
}
else if(ch=='j'){
double bullet_posx=0;
double bullet_posy=0;
double target_posx=gPlayerObject.m_fXpos;
double target_posy=gPlayerObject.m_fYpos;
double vx=target_posx-bullet_posx;
double vy=target_posy-bullet_posy;
double dist=sqrt(vx*vx+vy*vy);
vx/=dist; vy/=dist;
gBulletObject.pfFire(&gBulletObject,bullet_posx,bullet_posy,10,vx,vy,10.0);
}
gPlayerObject.pfApply(&gPlayerObject,delta_tick,ch);
//Plane_Apply(&gPlayerObject,delta_tick,ch);
}
acc_bullet_delay_tick+=delta_tick;
if(acc_bullet_delay_tick>2.0){ //2초동안 방향설정
acc_bullet_delay_tick=0;
double bullet_posx=gBulletObject.m_fXpos;
double bullet_posy=gBulletObject.m_fYpos;
double target_posx=gPlayerObject.m_fXpos;
double target_posy=gPlayerObject.m_fYpos;
double vx=target_posx-bullet_posx;
double vy=target_posy-bullet_posy;
double dist=sqrt(vx*vx+vy*vy);
vx/=dist; vy/=dist;
gBulletObject.m_fvx=vx;
gBulletObject.m_fvy=vy;
}
//apply위치
gBulletObject.pfApply(&gBulletObject,delta_tick);
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
//puts("tick..\r");
gotoxy(0,0);
map_drawTile(&gScreenBuffer[0],0,0,&gScreenBuffer[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuffer[1]);
gBulletObject.pfDraw(&gBulletObject,&gScreenBuffer[1]);
//Plane_Draw(&gPlayerObject,&gScreenBuffer[1]);
map_dump(&gScreenBuffer[1],Default_Tilepalete);
acc_tick = 0;
}
//.........这里部分代码省略.........
示例3: main
/*=======================================================*/
int main()
{
set_conio_terminal_mode();
acc_tick = last_tick = 0;
while(bLoop) {
// time process
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
// input
if (nFSM == 0) {
gameStart_Title(delta_tick);
}
else if (nFSM == 1) {
gameStart_Play();
}
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("bye~ \r");
}
else if (ch =='p') { //laser
double bullet_pos_x = gTestBulletObject.m_fXpos;
double bullet_pos_y = gTestBulletObject.m_fYpos;
double target_pos_x = gPlaneObject.m_fXpos;
double target_pos_y = gPlaneObject.m_fYpos;
double vx = target_pos_x - bullet_pos_x;
double vy = target_pos_y - bullet_pos_y;
double dist = sqrt(vx*vx+vy*vy);
vx /= dist;
vy /= dist;
gLaserObject.pfFire(&gLaserObject,
gPlaneObject.m_fXpos,gPlaneObject.m_fYpos,
-1,0,gPlaneObject.m_fYpos,15);
}
gPlaneObject.pfApply(&gPlaneObject,delta_tick,ch);
}
gTestAlienObject.pfApply(&gTestAlienObject,delta_tick);
gTestBulletObject.pfApply(&gTestBulletObject,delta_tick);
gLaserObject.pfApply(&gLaserObject,delta_tick);
if (gTestBulletObject.m_nFSM != 0) {
double bullet_pos_x = gTestBulletObject.m_fXpos;
double bullet_pos_y = gTestBulletObject.m_fYpos;
double target_pos_x = gPlaneObject.m_fXpos;
double target_pos_y = gPlaneObject.m_fYpos;
double vx = target_pos_x + bullet_pos_x;
double vy = target_pos_y + bullet_pos_y;
double dist = sqrt(vx*vx+vy*vy);
if(dist < 2) {
gTestBulletObject.m_nFSM = 0;
gPlaneObject.m_nFSM = 0;
}
}
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
setColor(33,40);
gPlaneObject.pfDraw(&gPlaneObject,&gScreenBuf[1]);
gTestAlienObject.pfDraw(&gTestAlienObject,&gScreenBuf[1]);
gTestBulletObject.pfDraw(&gTestBulletObject,&gScreenBuf[1]);
gLaserObject.pfDraw(&gLaserObject,&gScreenBuf[1]);
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
return 0;
}
示例4: main
//.........这里部分代码省略.........
if(pObj->m_nFSM != 0) {
double dist = getDistance_1(pObj,&gPlayerObject);
if(dist < 0.25) {
pObj->m_nFSM = 0;
gPlayerObject.m_nFSM = 0;
printf("---------------GAME OVER----------------\r\n");
bLoop = 0;
}
}
}
//충돌-에일리언이 비행기 총알에 맞을때
for(int i=0;i< sizeof(gMissileObject)/sizeof(_S_BULLET_OBJECT) ;i++)
{
_S_BULLET_OBJECT *pObj = &gMissileObject[i];
if(pObj->m_nFSM != 0) {
double dist = getDistance_2(pObj,&gAlienObjects[i]);
if(dist < 4.0) {
gAlienObjects[i].m_nFSM = 0;
//printf("---------------GAME WIN----------------\r\n");
}
}
}
//충돌-물고기에 비행기가 맞을때
for(int i=0;i<2;i++)
{
_S_FISH_OBJECT *pObj = &gFishObject[i];
if(pObj->m_nFSM != 0) {
double dist = getDistance_3(pObj,&gPlayerObject);
if(dist < 1.0) {
//pObj->m_nFSM = 0;
gPlayerObject.m_nFSM = 0;
printf("---------------GAME OVER----------------\r\n");
bLoop = 0;
}
}
}
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
//비행기draw
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
//에일리언 draw
for(int i=0;i<4;i++)
{
_S_ALIEN_OBJECT *pObj = &gAlienObjects[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
//에일리언 총알 draw
for(int i=0;i< sizeof(gBulletObject)/sizeof(_S_BULLET_OBJECT) ;i++)
{
_S_BULLET_OBJECT *pObj = &gBulletObject[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
//비행기 총알 draw
for(int i=0;i<sizeof(gMissileObject)/sizeof(_S_BULLET_OBJECT);i++)
{
_S_BULLET_OBJECT *pObj = &gMissileObject[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
//물고기 draw
for(int i=0;i<3;i++)
{
_S_FISH_OBJECT *pObj = &gFishObject[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
map_dump(&gScreenBuf[1],Default_Tilepalete);
puts("move : w,a,s,d \r");
puts("quit : q \r");
acc_tick = 0;
}
}
return 0;
}
示例5: main
int main()
{
system("clear");
for(int i=0;i<2;i++) {
map_init(&gScreenBuf[i]);
map_new(&gScreenBuf[i],35,16);
}
map_init(&gPlayerModel);
map_load(&gPlayerModel,"plane1.dat");
map_init(&gBulletModel);
map_load(&gBulletModel,"plasma.dat");
Plane_init(&gPlayerObject,&gPlayerModel,17,10);
bullet_init(&gTestBullet,0,0,0,&gBulletModel);
set_conio_terminal_mode();
acc_tick = last_tick = 0;
//플레이상태로 만들기
gPlayerObject.m_nFSM = 1;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec + (double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//실시간입력
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("bye~\r");
}
else if(ch == 'j') {
double bullet_pos_x = 0;
double bullet_pos_y = 0;
double target_pos_x = gPlayerObject.m_fXpos;
double target_pos_y = gPlayerObject.m_fYpos;
double vx = target_pos_x - bullet_pos_x;
double vy = target_pos_y - bullet_pos_y;
double dist = sqrt(vx*vx+vy*vy);
vx /= dist;
vy /= dist;
gTestBullet.pfFire(&gTestBullet,bullet_pos_x,bullet_pos_y,10.0,vx,vy,10);
}
gPlayerObject.pfApply(&gPlayerObject,delta_tick,ch);
}
gTestBullet.pfApply(&gTestBullet,delta_tick);
if(gTestBullet.m_nFSM != 0) {
double bullet_pos_x = gTestBullet.m_fXpos;
double bullet_pos_y = gTestBullet.m_fYpos;
double target_pos_x = gPlayerObject.m_fXpos;
double target_pos_y = gPlayerObject.m_fYpos;
double vx = target_pos_x - bullet_pos_x;
double vy = target_pos_y - bullet_pos_y;
double dist = sqrt(vx*vx+vy*vy);
if(dist < 0.25) {
gTestBullet.m_nFSM = 0;
gPlayerObject.m_nFSM = 0;
}
}
//타이밍계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
//puts("tick...\r");
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
gTestBullet.pfDraw(&gTestBullet,&gScreenBuf[1]);
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
//.........这里部分代码省略.........
示例6: main
int main()
{
system("clear");
for(int i=0;i<2;i++)
{
map_init(&gScreenBuf[i]);
map_new(&gScreenBuf[i],35,30);
}
map_init(&gPlayerModel);
map_load(&gPlayerModel,"plane5.dat");
map_init(&gBulletModel);
map_load(&gBulletModel,"target5.dat");
Plane_init(&gPlayerObject,&gPlayerModel,17,24);
bullet_init(&gTestBullet,0,0,0,&gBulletModel);
set_conio_terminal_mode();
acc_tick=last_tick=0;
gPlayerObject.m_nFSM = 1;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//실시간입력
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("Good bye~ \r");
}
else if (ch == 'j') {
double vx,vy;
gTestBullet.m_fXpos = 0;
gTestBullet.m_fYpos = 0;
getDirection(&gTestBullet,&gPlayerObject,&vx,&vy);
gTestBullet.pfFire(&gTestBullet,
gTestBullet.m_fXpos,
gTestBullet.m_fYpos,
10,vx,vy,10);
}
gPlayerObject.pfApply(&gPlayerObject,delta_tick,ch);
}
gTestBullet.pfApply(&gTestBullet,delta_tick);
if(gTestBullet.m_nFSM != 0) {
double dist = getDistance(&gTestBullet,&gPlayerObject);
if(dist < 2.0) {
gTestBullet.m_nFSM = 0;
gPlayerObject.m_nFSM = 0;
}
}
//타이밍계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
gTestBullet.pfDraw(&gTestBullet,&gScreenBuf[1]);
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
return 0;
}
示例7: main
//.........这里部分代码省略.........
double bullet_posy=gPotalBulletObject.m_fYpos;
double target_posx=gPlayerObject.m_fXpos;
double target_posy=gPlayerObject.m_fYpos;
double vx=target_posx-bullet_posx;
double vy=target_posy-bullet_posy;
double dist=sqrt(vx*vx+vy*vy);
vx/=dist; vy/=dist;
gPotalBulletObject.m_fvx=vx;
gPotalBulletObject.m_fvy=vy;
}
//총알 맞았을때 게임오버
for(int i=0;i<sizeof(gBulletObjects)/sizeof(_S_BULLET_OBJECT);i++) {
if(gBulletObjects[i].m_nFSM!=0) {
double bullet_posx=gBulletObjects[i].m_fXpos;
double bullet_posy=gBulletObjects[i].m_fYpos;
double target_posx=gPlayerObject.m_fXpos;
double target_posy=gPlayerObject.m_fYpos;
double vx=target_posx-bullet_posx;
double vy=target_posy-bullet_posy;
double dist=sqrt(vx*vx+vy*vy);
if(dist<0.1) {
gBulletObjects[i].m_nFSM=0;
gPlayerObject.m_nFSM=0;
gAlienObjects[i].m_nFSM=0;
}
}
}
//alien 총알 맞았을때
for(int i=0;i<sizeof(gPlaneBulletObjects)/sizeof(_S_BULLET_OBJECT);i++) {
if(gPlaneBulletObjects[i].m_nFSM!=0) {
double bullet_posx=gPlaneBulletObjects[i].m_fXpos;
double bullet_posy=gPlaneBulletObjects[i].m_fYpos;
double target_posx= gAlienObjects[i].m_fXpos;
double target_posy= gAlienObjects[i].m_fYpos;
double vx=target_posx-bullet_posx;
double vy=target_posy-bullet_posy;
double dist=sqrt(vx*vx+vy*vy);
if(dist<5.0) {
gAlienObjects[i].m_nFSM=0;
}
}
}
for(int i=0;i<sizeof(gBulletObjects)/sizeof(_S_BULLET_OBJECT);i++) {
gBulletObjects[i].pfApply(&gBulletObjects[i],delta_tick);
}
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
Potal_Draw(&gPlayerPotal,&gScreenBuf[1]);
for(int i=0;i<5;i++) {
_S_ALIEN_OBJECT *pObj = &gAlienObjects[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
for(int i=0;i<sizeof(gBulletObjects)/sizeof(_S_BULLET_OBJECT);i++){
gBulletObjects[i].pfDraw(&gBulletObjects[i],&gScreenBuf[1]);
}
for(int i=0;i<sizeof(gPlaneBulletObjects)/sizeof(_S_BULLET_OBJECT);i++){
_S_BULLET_OBJECT *pObj = &gPlaneBulletObjects[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
puts("---------------------------------------------\r");
map_dump(&gScreenBuf[1],Default_Tilepalete);
puts("---------------------------------------------\r");
puts("move : w,a,s,d \r");
puts("quit : q \r");
acc_tick = 0;
}
}
return 0;
}
示例8: main
//.........这里部分代码省略.........
//bullet_init(&gBulletModel,0,0,0,&gBulletModel);
gPlayerObject.m_nFSM = 1;
double TablePosition[] = {0,8,16,24};
/* for(int i=0;i<2;i++)
{
_S_BULLET_OBJECT *pObj = &gBulletObject[i];
bullet_init(pObj,&gBulletObject[i];
pObj->m_nFSM = 1;
}
*/
for(int i=0;i<4;i++)
{
_S_ALIEN_OBJECT *pObj = &gAlienObjects[i];
alien_init(pObj,&gAlienModel);
pObj->m_fXpos = TablePosition[i];
pObj->m_fYpos = 2;
pObj->m_nFSM = 1;
}
/* set_conio_terminal_mode();
acc_tick=last_tick=0;
int targetx,targety;
int fire_x, fire_y;
*/
system("clear");
set_conio_terminal_mode();
acc_tick=last_tick=0;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//실시간 입력
/* fire_x = gAlienObjects.m_nXpos;
fire_y = gAlienObjects.m_nYpos;
targetx = gPlayerObject.m_nXpos;
targety = gPlayerObject.m_nypos;
*/
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("bye~ \r");
}
/* else if(ch == 'j') {
double vx,vy,c;
vx = targetx - fire_x;
vy = targety - fire_y;
c = sqrt(vx*vx+vy*vy);
vx /= c;
vy /= c;
bullet_fire(&gBulletObject,fire_x,fire_y,10.0,vx,vy,10.0);
}*/
gPlayerObject.pfApply(&gPlayerObject,delta_tick,ch);
// bullet_apply(&gBulletObject,delta_tick);
}
for(int i=0;i<4;i++ )
{
_S_ALIEN_OBJECT *pObj = &gAlienObjects[i];
pObj->pfApply(pObj,delta_tick);
}
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
// bullet_draw(&gBulletObjects, &gScreenBuf[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
for(int i=0;i<4;i++ )
{
_S_ALIEN_OBJECT *pObj = &gAlienObjects[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
return 0;
}
示例9: main
int main()
{
{
int err = pthread_create(&tid,NULL,&InputThread,NULL);
if(err != 0) {
printf("err : %s \r\n",strerror(err));
}
else {
printf("thread create success \r\n");
}
}
struct sockaddr_in server;
socket_desc = socket(AF_INET,SOCK_STREAM,0);
if(socket_desc == -1)
{
puts("err create socket");
}
server.sin_addr.s_addr = inet_addr("127.0.0.1");
server.sin_family = AF_INET;
server.sin_port = htons(8080);
if(connect(socket_desc,(struct sockaddr *)&server,sizeof(server)) < 0) {
puts("connect error");
return 1;
}
for(int i=0;i<2;i++)
{
map_init(&gScreenBuf[i]);
map_new(&gScreenBuf[i],35,16);
}
map_init(&gPlayerModel);
map_load(&gPlayerModel,"plane.dat");
Plane_init(&gPlayerObject,&gPlayerModel,15,10);
gPlayerObject.m_nFSM = 1;
system("clear");
set_conio_terminal_mode();
acc_tick=last_tick=0;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
gPlayerObject.pfDraw(&gPlayerObject,&gScreenBuf[1]);
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
return 0;
}
示例10: main
//.........这里部分代码省略.........
set_conio_terminal_mode();
acc_tick=last_tick=0;
while(bLoop) {
//타이밍처리
clock_gettime(CLOCK_MONOTONIC,&work_timer);
double cur_tick = work_timer.tv_sec +
(double)(work_timer.tv_nsec * 1e-9);
double delta_tick = cur_tick - last_tick;
last_tick = cur_tick;
//실시간 입력
if(kbhit() != 0) {
char ch = getch();
if(ch == 'q') {
bLoop = 0;
puts("bye~ \r");
}
if(ch == 'j') {
for(int i=0;i<sizeof(gTestBulletObject)/sizeof(_S_BULLET_OBJECT);i++) {
_S_BULLET_OBJECT *pObj = &gTestBulletObject[i];
if(pObj->m_nFSM == 0) { //슬립상태라면...
pObj->pfFire(pObj,
gTestPlaneObject.m_fXpos,
gTestPlaneObject.m_fYpos,5,0,-2,10);
break;
}
}
}
gTestPlaneObject.pfApply(&gTestPlaneObject,delta_tick,ch);
}
for(int i=0;i<sizeof(gTestBulletObject)/sizeof(_S_BULLET_OBJECT);i++) {
_S_BULLET_OBJECT *pObj = &gTestBulletObject[i];
pObj->pfApply(pObj,delta_tick);
}
for(int i=0;i<10;i++) {
_S_ALIEN_OBJECT *pObj = &gTestAlienObject[i];
pObj->pfApply(pObj,delta_tick);
}
for(int i=0;i<10;i++) {
gTestBulletObject2[i].pfApply(&gTestBulletObject2[i],delta_tick);
if(gTestBulletObject2[i].m_nFSM != 0) {
double dist = getDistance(&gTestBulletObject2[i],&gTestPlaneObject);
if(dist < 1.0) {
gTestBulletObject2[i].m_nFSM = 0;
gTestPlaneObject.m_nFSM = 0;
}
}
}
//타이밍 계산
acc_tick += delta_tick;
if(acc_tick > 0.1) {
gotoxy(0,0);
map_drawTile(&gScreenBuf[0],0,0,&gScreenBuf[1]);
gTestPlaneObject.pfDraw(&gTestPlaneObject,&gScreenBuf[1]);
for(int i=0;i<sizeof(gTestBulletObject)/sizeof(_S_BULLET_OBJECT);i++) {
_S_BULLET_OBJECT *pObj = &gTestBulletObject[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
for(int i=0;i<10;i++) {
_S_ALIEN_OBJECT *pObj = &gTestAlienObject[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
for(int i=0;i<4;i++) {
_S_BULLET_OBJECT *pObj = &gTestBulletObject2[i];
pObj->pfDraw(pObj,&gScreenBuf[1]);
}
map_dump(&gScreenBuf[1],Default_Tilepalete);
acc_tick = 0;
}
}
return 0;
}