//《青空格斗》扇奈赛高~(^_^)by:青空恋_Solaai(也就是现在的夏风,子怡我)
//Take risks. If you win, you will be happy; if you lose, you will be wise.
//如果爱情有颜色,一定是樱色吧~就这样绽放,等待与你相遇的时光~
//樱色恋空恋爱物语企划及后续更新敬请关注:青空恋的QQ空间 https://user.qzone.qq.com/1805159323
//夏风的 个人作品主页/樱空社网站: sola.pink
#include"acllib.h"
//感谢ACLLib~ 人物形象图片来自BBB格斗以及Mugen同人中的扇奈~作者最喜欢的角色~感谢原作画面
#include<time.h>
#include<windows.h>
#include< math.h >
const int winW = 1280, winH = 720;//窗口大小设置,#注意后部人物关联#
int dy = 001;//用于图片模拟动画生成编号,起始编号001(ACLLib不能直接插入视频到游戏,故采取高帧率图片模拟,配合配音形成动画大招)
ACL_Image qin,min,sce,qinj,qini,qinis, qinik,swin,mwin,mini,minj,hp0,hp1,hp2,hp3,senna,kunagi,senna0, kunagi0,Start,LovePage;
ACL_Image img[209];
ACL_Sound awsl, awysl, minball, minbk, minfk, minik, minjj, minjk, qinheal, qinjj, sennai, sennaik, sennaj,sennaja;
ACL_Sound YoRHa, Happy, Gift,Love,SolanoLove;
//命名规范:图片指针 = 名字 {加上} g字母{加上}技能代号j k l…
const char* qing = "senna.jpg";//主角: 京堂 扇奈 Senna
/*扇奈:被某人所托付的巫女装女剑士。
没有遇到狼牙之前的记忆,她的过去是个迷。
言谈举止优雅。平时是个有点超出常识的开朗少女,而在战斗时却变成一脸凛然,拥有卓越战技的战士。
(有时会一边微笑着一边做着骇人的事。)*/
const char* ming="min.jpg";//对手: 天楼 久那姬
/*天楼久那姬,原作游戏中为斩真狼牙的未婚妻。瞳色为黄色,头发为银白,长度齐肩。
初期为狼的样子,圣城学园篇从闇崎手上入手「学圣ボタン」后以人的姿态。
之所以兽化,原因是「堕天之苍穹」与其融合的缘故。也正因为如此,靠自身意志将「堕天之苍穹」与自己完全融合后,得到了一股新的力量。
近距离攻击,武器是爪。本作中偶尔在远处会召唤魔法球攻击*/
const char* sceg = "scene.jpg";//场景文件,背景设定在:最喜欢的看得到天空的屋顶上
const char* ghp0 = "fullof.jpg";
const char* ghp1 = "littlelacked.jpg";
const char* ghp2 = "lackblood.jpg";
const char* ghp3 = "danger.jpg";
const char*sennat = "SennaTitle.jpg";
const char* kunagit = "KunagiTitle.jpg";
const char* sennat0 = "SennaTitle0.jpg";
const char* kunagit0 = "KunagiTitle0.jpg";
const char* Startt = "StartPage.jpg";
const char* LovePages = "我想吃掉你的胰脏LoveSpecialPage.jpg";
//角色技能扇奈图片及名字如下:
const char* qingj = "sennaj.jpg";//扇奈的轻攻击技能j:流星剑∞
const char* qingis = "sennais.jpg";/*重攻击i飞闪剑*启(蓄力中)(1秒内暂停攻击来保持蓄力)*/
const char* qingik = "sennaik.jpg";/*重攻击i飞闪剑*胧(蓄力完成标志)(轻按i即可发动飞闪剑——*/
const char* qingi = "sennai.jpg";//*扇奈的蓄力重攻击i:飞闪剑*破——
const char* swing = "SennaWin.jpg";
//(原设:以下为对战者Mush图片,取材于冒险岛小蘑菇怪的同人拟人形象,感谢网友素材,某蘑菇也要加油月姬Remake啦(大雾))
//以下为对战者久那妓
const char* mwing = "KunagiWin.jpg";
const char* mingi = "mushi.jpg";
const char* mingj = "mushj.jpg";
//以下为声音素材,后缀k表示击中音效,aw(y)sl扇奈声音太好听了; 对于min:bk表示受击音效,fk表示嘲讽音效
const char* awsls = "awsl.mp3";
const char* awysls = "awysl.mp3";
const char* minballs = "minball.mp3";
const char* minbks = "minbk.mp3";
const char* minfks = "minfk.mp3";
const char* miniks = "minik.mp3";
const char* minjs = "minj.mp3";
const char* minjks = "minjk.mp3";
const char* qinheals = "qinheal.mp3";
const char* qinjs = "qinj.mp3";
const char* sennais = "sennai.mp3";
const char* sennaiks = "sennaik.mp3";
const char* sennajs = "sennaj.mp3";
const char* sennaoxs = "sennaox.mp3";
const char* sennajas = "sennaja.mp3";
const char* Happys = "Congratulations.wav";
const char* Gifts = "Congratulations.mp3";
const char* YoRHa_World= "BGM.mp3";//经过:原本想用尼尔机械纪元的曲子Weight of the World,很美的曲子但是有些沉重了,并且其他音乐都正常不知为何这首会出现未知的错误,所以还是使用原作天台的BGM,包内附带此音乐
const char* Lover = "一番の宝物 (Original Version) - karuta.mp3";
const char* SolanoLoves = "SolanoLoveSound.mp3";
char img_name[] = "电影 1 001.jpg";
const char* #加入特殊背景SpecialPage、背景音乐与结束音乐#
int m1 = 230;//角色初始生命值
int s1 = 0;//角色初始能量
int m2 = 230;//对方角色生命值
int s2 = 0;//对方初始能量
int w1 = 0, w2 = 0;//双方胜利场次
int i = 0,jsk=0,ikd=0;//主角蓄力技能计时器
int y = 2,u=1,r=0,us=0;//Mush's SkillTimer
int pau = 1, fk = 1,bgmp=1;//pau暂停控制,fk嘲讽控制
int aws = 1, awys = 1;//主角受击声音控制
int con = 0;//祝贺音控制器
void timerEvent(int id);
void keyEvent(int key, int e);
int id= 0, timeInterval = 10;
//*函数声明*
void paint();
void paintj();
void painti();
void paintis();
void paintik();
void paintswin();
void paintmwin();
struct ele
{
int w , h;
int x;
int y;
int s;
};
struct ele qi, mi,mii;
void move();
int Setup()
{
srand((unsigned)time(NULL));
initWindow("solano zero", DEFAULT, DEFAULT, winW, winH);
/*!!!LOAD Image!!!*///please DON'T Forget to Load the new image!
loadImage(qing, &qin);loadImage(ming, &min);
loadImage(sceg, &sce); loadImage(qingj, &qinj); loadImage(qingi, &qini);
loadImage(qingis, &qinis);loadImage(qingik, &qinik);loadImage(swing, &swin);
loadImage(mwing, &mwin);loadImage(mingi, &mini);loadImage(mingj, &minj);
loadImage(ghp0, &hp0); loadImage(ghp1, &hp1); loadImage(ghp2, &hp2); loadImage(ghp3, &hp3);
loadImage(sennat, &senna); loadImage(kunagit, &kunagi);
loadImage(sennat0, &senna0); loadImage(kunagit0, &kunagi0);
loadImage(Startt, &Start);
loadImage(LovePages, &LovePage);
/*加载声音*/
loadSound(awsls, &awsl);
loadSound(awysls, &awysl);
loadSound(minballs, &minball);
loadSound(minbks, &minbk);
loadSound(minfks, &minfk);
loadSound(miniks, &minik);
loadSound(minjs, &minjj);
loadSound(minjks, &minjk);
loadSound(qinheals, &qinheal);
loadSound(qinjs, &qinjj);
loadSound(sennais, &sennai);
loadSound(sennaiks, &sennaik);
loadSound(sennajs, &sennaj);
loadSound(sennajas, &sennaja);
loadSound(Happys, &Happy);
loadSound(YoRHa_World, &YoRHa);
loadSound(Gifts, &Gift);
loadSound(Lover, &Love);
loadSound(SolanoLoves, &SolanoLove);
qi.y = (winH - qi.h - 280);
qi.x = rand() % (winW / 2 - qi.w - 20);
qi.w = 170;
qi.h = 200;
qi.s = 40;//格斗游戏讲究快速,后续优化过渡~
mi.y = (winH - mi.h - 260);
mi.x = qi.x + qi.w +150+ rand() % (winW - qi.x - 150 - qi.w);//随机产生位置
mi.w = 170;
mi.h = 200;
mi.s = 14;//
registerTimerEvent(timerEvent);
registerKeyboardEvent(keyEvent);
startTimer(7, 0);//mush
startTimer(8, 100);
startTimer(9, 0
青空格斗SolanoBattle源代码分享(我的2020大一游戏作)
最新推荐文章于 2023-11-25 09:50:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)