亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bullets.cpp

?? After decades of war one company, who had gained powerful supplying both sides with weaponary, steps
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*Copyright (C) 2003 Parallel RealitiesThis program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/#include "bullets.h"void addBullet(object *theWeapon, object *attacker, int y, int dy){	object *bullet;	signed char imageIndex;	int tempX, tempY, steps;	bullet = new object;	if (attacker == &player)		currentGame.shots++;	bullet->next = NULL;	bullet->active = 1;	bullet->x = attacker->x - ((attacker->image[0]->w / 2) * attacker->face);	bullet->y = attacker->y + y;	bullet->flags = theWeapon->flags;	bullet->shield = 300; // bullets live for (approximately) 5 seconds	// Timed explosions live between 1 and 3 seconds	if (bullet->flags & WF_TIMEDEXPLOSION)		bullet->shield = 60 + ((rand() % 3) * 60);	if (attacker->face == 0)	{		bullet->dx = theWeapon->speed;		if ((currentGame.area == 18) || (currentGame.area == 24))			bullet->dx += fabs(engine.ssx);	}	else	{		bullet->dx = (0 - theWeapon->speed);	}	if (bullet->flags & WF_VARIABLE_SPEED)	{		bullet->dx = Math::rrand(100, 200);		bullet->dx /= 10;		if (attacker->face == 1)			bullet->dx = 0 - bullet->dx;	}	bullet->dy = dy;	if (bullet->flags & WF_SCATTER)	{		bullet->dy = Math::rrand(-200, 200);		if (bullet->dy != 0)			bullet->dy /= 200;	}	if (attacker->flags & FL_WEAPCO)		bullet->flags += WF_WEAPCO;	else		bullet->flags += WF_FRIEND;	bullet->owner = attacker->owner;	bullet->id = theWeapon->id;	bullet->damage = theWeapon->damage;	if (bullet->id == WT_CHARGER)	{		bullet->damage = attacker->ammo[1];		if (bullet->damage < 50)		{			bullet->damage = 1;			bullet->id = WT_PLASMA;		}	}	bullet->target = NULL;	if (attacker->flags & FL_FRIEND)		imageIndex = 0;	else		imageIndex = 1;	// Use the enemy's images if applicable	if (bullet->id != WT_ROCKET)		bullet->image[0] = theWeapon->image[imageIndex];	else		bullet->image[0] = theWeapon->image[attacker->face];	if (bullet->flags & WF_AIMED)	{		tempX = (int)fabs(attacker->target->x - attacker->x);		tempY = (int)fabs(attacker->target->y - attacker->y);		steps = max(tempX, tempY);		if (steps == 0)			steps = 12;		if (!(bullet->flags & WF_TIMEDEXPLOSION))			steps /= 8;		else			steps /= 6 + (rand() % 6);		tempX = (int)(attacker->target->x - attacker->x);		tempY = (int)(attacker->target->y - attacker->y);		bullet->dx = tempX / steps;		bullet->dy = tempY / steps;	}	if (attacker->classDef == CD_ASTEROID)	{		bullet->dx = Math::rrand(-20, 20);		bullet->dy = Math::rrand(-20, 20);		bullet->image[0] = graphics.shape[4];	}	engine.bulletTail->next = bullet;	engine.bulletTail = bullet;}/*Fill in later...*/void fireBullet(object *attacker, int weaponType){	if (attacker->reload[weaponType] > 0)		return;	int y = (attacker->image[0]->h) / 5;	// Remove some ammo from the player	if ((attacker == &player) && (weaponType == 1) && (!engine.cheatAmmo))		player.ammo[1]--;	object *theWeapon = &weapon[attacker->weaponType[weaponType]];	switch(theWeapon->id)	{		case WT_PLASMA:		case WT_SPREAD:		case WT_DIRECTIONAL:			playSound(SFX_PLASMA);			break;		case WT_ROCKET:			playSound(SFX_MISSILE);			break;		case WT_LASER:			playSound(SFX_LASER);			break;		case WT_CHARGER:			playSound(SFX_PLASMA3);			break;	}	if (theWeapon->flags & WF_STRAIGHT)	{		switch (theWeapon->ammo[0])		{			case 1:				addBullet(theWeapon, attacker, y * 3, 0);				break;			case 2:				addBullet(theWeapon, attacker, y * 2, 0);				addBullet(theWeapon, attacker, y * 4, 0);				break;			case 3:				addBullet(theWeapon, attacker, y * 2, 0);				addBullet(theWeapon, attacker, y * 3, 0);				addBullet(theWeapon, attacker, y * 4, 0);				break;			case 4:				addBullet(theWeapon, attacker, y, 0);				addBullet(theWeapon, attacker, y * 2, 0);				addBullet(theWeapon, attacker, y * 4, 0);				addBullet(theWeapon, attacker, y * 5, 0);				break;			case 5:				for (int i = 1 ; i < 6; i++)					addBullet(theWeapon, attacker, y * i, 0);				break;		}	}	else if (theWeapon->flags & WF_THIN_SPREAD)	{		addBullet(theWeapon, attacker, y * 2, -1);		if (theWeapon->ammo[0] == 3)		{			addBullet(theWeapon, attacker, y * 3, 0);		}		else		{			addBullet(theWeapon, attacker, y * 2, 0);			addBullet(theWeapon, attacker, y * 4, 0);		}		addBullet(theWeapon, attacker, y * 4, 1);	}	else if (theWeapon->flags & WF_WIDE_SPREAD)	{		addBullet(theWeapon, attacker, y * 1, -2);		addBullet(theWeapon, attacker, y * 2, -1);		addBullet(theWeapon, attacker, y * 3, 0);		addBullet(theWeapon, attacker, y * 4, 1);		addBullet(theWeapon, attacker, y * 5, 2);	}	// Reset the weapon reload time. Double it if it is not friendly or a boss or Kline	attacker->reload[weaponType] = theWeapon->reload[0];	if ((attacker->flags & FL_WEAPCO) && (attacker != &enemy[WC_BOSS]) && (attacker != &enemy[WC_KLINE]) && (theWeapon->id != W_LASER))		attacker->reload[weaponType] *= 2;	if ((engine.cheatAmmo) || (theWeapon->id == WT_LASER))		return;	if ((attacker == &player) && (weaponType == 0))	{		if (player.ammo[0] > 0)		{			player.ammo[0]--;			if (player.ammo[0] == 0)			{				player.weaponType[0] = W_PLAYER_WEAPON;				weapon[W_PLAYER_WEAPON2] = weapon[W_PLAYER_WEAPON]; // reset to weapon 1 defaults			}		}	}}/*Used for homing missiles. When a missile is active and it is told to home inon an enemy, it will attempt to randomly grab one every frame if it does notalready have a target. If the target it is currently chasing is killed, it willbegin to look for a new one (done in doBullets()). The homing missile will makeone attempt per call (one call per frame) to find a suitable target. If the targetit picks is dead or outside the screen range, then it returns NULL. A suitabletarget will be returned as the object address.*/object *getRandomEnemy(object *bullet){	int i;	if (bullet->owner->flags & FL_WEAPCO)	{		i = (rand() % 10);		if (i < 1)			return &player;	}	i = rand() % MAX_ALIENS;	if ((enemy[i].shield < 1) || (!enemy[i].active))		return NULL;	if ((bullet->owner->flags & FL_WEAPCO) && (enemy[i].flags & FL_WEAPCO))		return NULL;	if ((bullet->owner->flags & FL_FRIEND) && (enemy[i].flags & FL_FRIEND))		return NULL;	if (abs((int)bullet->x - (int)enemy[i].target->x) > 800)		return NULL;	if (abs((int)bullet->y - (int)enemy[i].target->y) > 200)		return NULL;	return &enemy[i];}/*Fill in later...*/void destroyAlien(object *bullet, object *theEnemy){	playSound(SFX_EXPLOSION);	// Chain reaction destruction if needed	if (theEnemy->flags & FL_DAMAGEOWNER)	{		theEnemy->owner->shield -= theEnemy->maxShield;		if (theEnemy->owner->shield < 1)			destroyAlien(bullet, theEnemy->owner);	}	if (theEnemy->flags & FL_FRIEND)	{		if (theEnemy->classDef == CD_PHOEBE)			currentGame.wingMate1Ejects++;		else if (theEnemy->classDef == CD_URSULA)			currentGame.wingMate2Ejects++;		// Phoebe cannot eject on the rescue mission		if (currentGame.area != 7)		{			if ((theEnemy->classDef == CD_PHOEBE) || (theEnemy->classDef == CD_URSULA))				setInfoLine(">> Ally has ejected! <<\n", FONT_RED);			else				setInfoLine(">> Friendly craft has been destroy!! <<\n", FONT_RED);		}	}	if (bullet->owner == &player)	{		// Once again, stop point leeching		if (currentGame.area != MAX_MISSIONS - 1)			currentGame.cash += theEnemy->score;		currentGame.cashEarned += theEnemy->score;		currentGame.totalKills++;	}	else if (bullet->owner->classDef == CD_PHOEBE)	{		currentGame.wingMate1Kills++;	}	else if (bullet->owner->classDef == CD_URSULA)	{		currentGame.wingMate2Kills++;	}	else	{		currentGame.totalOtherKills++;	}	if ((bullet->owner->classDef == CD_PHOEBE) || (bullet->owner->classDef == CD_URSULA))	{		if ((rand() % 8) == 0)		{			getKillMessage(bullet->owner);		}	}	updateMissionRequirements(M_DESTROY_TARGET_TYPE, theEnemy->classDef, 1);	updateMissionRequirements(M_PROTECT_TARGET, theEnemy->classDef, 1);	if (rand() % 100 <= theEnemy->collectChance)	{		unsigned char value;		if ((rand() % 10) == 0)			theEnemy->collectValue *= 2;		while (theEnemy->collectValue > 0)		{			value = (10 + (rand() % theEnemy->collectValue));			if (value > theEnemy->collectValue)				value =theEnemy->collectValue;			addCollectable(theEnemy->x, theEnemy->y, theEnemy->collectType, value, 600);			theEnemy->collectValue -= value;		}	}	// Make it explode immediately	if (theEnemy->classDef == CD_ASTEROID)	{		theEnemy->shield = -999;		if ((currentGame.area == 10) && (theEnemy != &enemy[0]) && (currentMission.completed1[0] == 0) && (currentMission.targetValue1[1] == 1))			engine.targetArrowTimer = 120;	}	if ((theEnemy->classDef == CD_KRASS) && (bullet->owner == &player))		setRadioMessage(FACE_CHRIS, "My NAME is CHRIS!!!!!!!!", 1);	if (theEnemy->classDef == CD_KLINE)	{		setRadioMessage(FACE_KLINE, "It was an honor... to have fought you...", 1);		theEnemy->dx = theEnemy->dy = 0;		theEnemy->maxShield = 1500;		theEnemy->shield = -200;	}}char checkPlayerShockDamage(float x, float y, int radius){	// Don't let the player be hurt by an explosion after they have completed	// all the mission objectives. That would be *really* annoying!	if ((engine.cheatShield) || (engine.missionCompleteTimer != 0))		return 0;	float distX = fabs(x - player.x);	float distY = fabs(y - player.y);	if ((distX <= 50) && (distY <= 50))	{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲伊人色欲综合网| 粗大黑人巨茎大战欧美成人| 国产在线看一区| 91浏览器打开| 国产亚洲午夜高清国产拍精品| 一区二区三区在线视频播放| 国内外成人在线| 欧美男人的天堂一二区| 中文字幕一区二区三| 精品一区二区三区日韩| 在线视频观看一区| 中文字幕一区二区三区av| 韩国毛片一区二区三区| 6080yy午夜一二三区久久| 国产精品黄色在线观看| 国产麻豆91精品| 91精品久久久久久蜜臀| 亚洲国产日韩精品| 91浏览器打开| 18成人在线视频| 懂色av一区二区三区蜜臀| 亚洲精品一区二区三区影院| 午夜久久久久久久久久一区二区| 91片黄在线观看| 亚洲三级理论片| 91在线你懂得| 亚洲精品国产无套在线观| 成人动漫av在线| 中文字幕 久热精品 视频在线| 国产精品综合久久| 久久久美女艺术照精彩视频福利播放| 日本免费新一区视频| 3751色影院一区二区三区| 亚洲成人av在线电影| 精品视频999| 亚洲成人在线免费| 欧美精品日日鲁夜夜添| 午夜精品视频在线观看| 777午夜精品免费视频| 日韩av电影免费观看高清完整版在线观看 | 色八戒一区二区三区| 国产精品久久久久久久久免费相片| 国产成人免费在线观看不卡| 久久精品欧美一区二区三区麻豆| 国产91富婆露脸刺激对白| 亚洲国产激情av| 91在线观看污| 亚洲精品免费播放| 91超碰这里只有精品国产| 麻豆精品久久精品色综合| 26uuu成人网一区二区三区| 国产在线精品一区二区不卡了| 久久综合色一综合色88| 成人精品高清在线| 亚洲男人的天堂在线aⅴ视频| 色综合久久久久久久| 视频一区视频二区中文字幕| 精品国产自在久精品国产| 成人黄页在线观看| 亚洲一区二区不卡免费| 日韩精品资源二区在线| 国产+成+人+亚洲欧洲自线| 亚洲免费av网站| 欧美日韩精品二区第二页| 久久91精品久久久久久秒播| 国产精品久久国产精麻豆99网站| 欧美图区在线视频| 国产一区二区三区日韩| 国产麻豆一精品一av一免费| 亚洲欧洲成人自拍| 91麻豆精品91久久久久同性| 国产精品18久久久久久久网站| 中文字幕一区二区三| 欧美一区日韩一区| 成人av动漫在线| 日本网站在线观看一区二区三区| 国产欧美日韩不卡| 5月丁香婷婷综合| 99在线视频精品| 久久国产生活片100| 亚洲精品中文字幕在线观看| 91精品国产综合久久久蜜臀粉嫩| 成人免费观看视频| 蜜臀va亚洲va欧美va天堂| 中文字幕一区二区三区蜜月| 欧美va在线播放| 在线亚洲人成电影网站色www| 国产精品一区二区在线观看网站| 亚洲一线二线三线视频| 国产精品久久777777| 精品国精品国产尤物美女| 欧美视频一区二区三区在线观看| 国产一区二区福利| 美女诱惑一区二区| 亚洲成av人片一区二区三区| 亚洲视频一二三区| 国产亚洲成年网址在线观看| 欧美一区二区福利在线| 在线精品视频一区二区| 成人免费av网站| 国产毛片精品视频| 国产精一区二区三区| 久久99精品一区二区三区三区| 午夜精品福利久久久| 亚洲综合小说图片| 亚洲人成伊人成综合网小说| 中日韩免费视频中文字幕| 久久人人超碰精品| 精品国产乱码久久久久久1区2区| 欧美日本视频在线| 91麻豆精品国产91久久久久久久久| 91色在线porny| 色先锋资源久久综合| 91美女片黄在线观看| 99久久夜色精品国产网站| 不卡一区中文字幕| 波多野结衣在线一区| 成人成人成人在线视频| 成人不卡免费av| 成人高清伦理免费影院在线观看| 粉嫩av一区二区三区| 成人少妇影院yyyy| 91亚洲国产成人精品一区二三| eeuss鲁片一区二区三区在线看| 不卡的av网站| 色婷婷综合久久久中文一区二区| 色先锋资源久久综合| 欧美亚洲禁片免费| 91精品国产色综合久久| 欧美xxxxx裸体时装秀| 国产午夜精品在线观看| 欧美国产精品中文字幕| 中文字幕日本不卡| 亚洲一区二区在线免费观看视频| 调教+趴+乳夹+国产+精品| 青青草91视频| 国产另类ts人妖一区二区| 99精品久久只有精品| 色婷婷久久久亚洲一区二区三区| 欧美体内she精视频| 日韩一级片网站| 国产欧美精品区一区二区三区| 亚洲欧洲一区二区在线播放| 亚洲一区二区三区国产| 色呦呦网站一区| 欧美精品18+| 久久久久99精品一区| 亚洲免费在线视频一区 二区| 亚洲大片免费看| 国产精品1区2区3区| 欧美午夜精品电影| 久久影院视频免费| 一区二区高清视频在线观看| 麻豆国产精品官网| 94色蜜桃网一区二区三区| 欧美一区二区精美| 亚洲三级免费观看| 激情小说欧美图片| 欧美午夜在线观看| 欧美国产日本韩| 全国精品久久少妇| 色又黄又爽网站www久久| 日韩精品一区二区三区在线播放| 1区2区3区精品视频| 久久99久久99小草精品免视看| 91色.com| 中文字幕精品—区二区四季| 日韩成人一级片| 91女神在线视频| 久久久久久影视| 日本在线不卡视频一二三区| 91色视频在线| 国产欧美日韩综合精品一区二区| 丝袜美腿亚洲综合| 91蝌蚪porny成人天涯| 2022国产精品视频| 日本女优在线视频一区二区| 在线亚洲一区二区| 成人欧美一区二区三区白人| 国产一区二区三区香蕉| 在线不卡中文字幕| 国产成a人亚洲精| 日韩欧美成人一区| 日本亚洲三级在线| 欧美色图在线观看| 亚洲最大成人网4388xx| 成人高清视频在线| 国产精品美女视频| 国产a区久久久| 国产婷婷色一区二区三区在线| 蜜桃视频一区二区三区在线观看 | 九九**精品视频免费播放| 欧美人与禽zozo性伦| 亚洲最新在线观看| 一本高清dvd不卡在线观看| 最新中文字幕一区二区三区| 丁香亚洲综合激情啪啪综合| 欧美经典一区二区| 国产91精品一区二区麻豆亚洲| 久久老女人爱爱|