91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

策劃程序美工全是自己一人完成,用VS2010 和c++寫的,同學幫忙測試,畫面操作可玩性感覺很不錯,哈哈~而且自帶地圖編輯器哦~~ 想回顧經典游戲的朋友,或者新手想學windows游戲開發可以參考源碼,注釋很詳細,代碼基本是純C++加上STL容器和win32 API手工編寫的,邏輯不是很復雜,也適合初學者學習GDI圖形編程和windows編程入門。。

資源截圖

代碼片段和文件信息

#include?“baseTank.h“
#include?“tank.h“

baseTank::baseTank(
int?_id
int?_life
int?_armor
int?_face
int?_x
int?_y
int?_gun_face
bool?_gun_lock
int?_move
int?_speed
int?_fire_speed
int?_bullet_id
int?_bullet_max
int?_bullet_power
int?_bullet_speed):
id(_id)
life(_life)
armor(_armor)
face(_face)
x(_x)
y(_y)
gun_face(_gun_face)
gun_lock(_gun_lock)
gun_step(0)
move(_move)
move_step(0)
speed(_speed)
speed_real(speed)
fire_step(0)
fire_speed(_fire_speed)
bullet_id(_bullet_id)
bullet_num(0)
bullet_max(_bullet_max)
bullet_power(_bullet_power)
bullet_speed(_bullet_speed)
delay(0)
{
}


baseTank::~baseTank(void)
{
}

void?baseTank::Move()
{
if?(?face?==?DOWN?)?y+=speed_real;
else?if?(?face?==?LEFT?)?x-=speed_real;
else?if?(?face?==?UP?)?y-=speed_real;
else?x+=speed_real;
if?(++move_step>2)?move_step=0;
}

void?baseTank::Change(int?_face)
{
face=_face;
if(gun_lock==false)gun_face=face;
if?(++move_step>2)?move_step=0;
}

void?baseTank::Fire()
{
if(!gun_step)
{
gun_step=100;
fire_step=3;
}

}

void?baseTank::Death()
{
}

void?baseTank::Draw(HDC?&DC1HDC?&DC2bool?fire)
{
int?gun_x;
int?gun_y;
int?fire_x;
int?fire_y;
int?_gun_step;
_gun_step=gun_step/20;
switch(gun_face)
{
case?DOWN:
gun_x=x;
gun_y=y-_gun_step*(bullet_power/10);
fire_x=gun_x;
fire_y=gun_y+48;
break;
case?LEFT:
gun_x=x+_gun_step*(bullet_power/10);
gun_y=y;
fire_x=gun_x-48;
fire_y=gun_y;
break;
case?UP:
gun_x=x;
gun_y=y+_gun_step*(bullet_power/10);
fire_x=gun_x;
fire_y=gun_y-48;
break;
case?RIGHT:
gun_x=x-_gun_step*(bullet_power/10);
gun_y=y;
fire_x=gun_x+48;
fire_y=gun_y;
}
if(fire==false)
{
//坦克底盤
BitBlt(DC1xy6464DC2face*64id*1280+move_step*128+64SRCPAINT);
BitBlt(DC1xy6464DC2face*64id*1280+move_step*128SRCAND);
//坦克炮臺
BitBlt(DC1gun_xgun_y6464DC2gun_face*64id*1280+(5-_gun_step)*128+128*3+64SRCPAINT);
BitBlt(DC1gun_xgun_y6464DC2gun_face*64id*1280+(5-_gun_step)*128+128*3SRCAND);
}
else
{
//坦克火花
if(fire_step>0)
{
--fire_step;
BitBlt(DC1fire_xfire_y6464DC2gun_face*64id*1280+9*128+64SRCPAINT);
BitBlt(DC1fire_xfire_y6464DC2gun_face*64id*1280+9*128SRCAND);
}
if(gun_step>0)
{
gun_step-=fire_speed;
if(gun_step<0)gun_step=0;
}
}
}????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????556856??2010-12-15?10:54??坦克大戰源碼\background.bmp

?????文件???????3226??2010-12-23?20:32??坦克大戰源碼\baseTank.cpp

?????文件????????876??2010-12-21?10:08??坦克大戰源碼\baseTank.h

?????文件?????192056??2010-12-21?13:27??坦克大戰源碼\bullet.bmp

?????文件???????1040??2010-12-18?13:27??坦克大戰源碼\Bullet.cpp

?????文件????????435??2010-12-17?13:29??坦克大戰源碼\Bullet.h

?????文件??????16044??2010-12-18?14:55??坦克大戰源碼\death.wav

?????文件??????69840??2010-12-18?12:50??坦克大戰源碼\fire.bmp

?????文件????????328??2010-12-18?20:21??坦克大戰源碼\Fire.cpp

?????文件????????192??2010-12-18?13:37??坦克大戰源碼\Fire.h

?????文件???????7268??2010-12-17?18:37??坦克大戰源碼\hit.wav

?????文件?????688184??2010-12-21?19:22??坦克大戰源碼\map_block.bmp

?????文件??????12242??2010-12-17?18:37??坦克大戰源碼\motor.wav

?????文件????7864376??2010-12-21?15:40??坦克大戰源碼\player_tank.bmp

?????文件???????1976??2010-12-18?14:55??坦克大戰源碼\resource.h

?????文件???????9518??2010-12-17?18:37??坦克大戰源碼\shoot.wav

?????文件?????217990??2010-12-15?09:16??坦克大戰源碼\start.wav

?????文件??????61707??2012-03-20?18:26??坦克大戰源碼\tank.cpp

?????文件???????2356??2010-12-24?12:55??坦克大戰源碼\tank.h

?????文件?????115919??2010-12-13?08:42??坦克大戰源碼\tank.ico

?????文件???????6754??2010-12-18?14:55??坦克大戰源碼\TANK.rc

?????文件???????4266??2010-12-17?18:37??坦克大戰源碼\turret.wav

?????文件????9988096??2012-03-20?18:26??坦克大戰.exe

?????目錄??????????0??2012-03-20?18:30??坦克大戰源碼

-----------?---------??----------?-----??----

?????????????19821545????????????????????24


評論

共有 條評論