2015-10-18 09:45:29 +08:00
|
|
|
|
#include "DxLib.h"
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
void loadg();
|
|
|
|
|
|
|
|
|
|
//String 使用
|
|
|
|
|
|
|
|
|
|
//プログラム中
|
|
|
|
|
//main-10
|
|
|
|
|
//タイトル-100
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int main = 100, maintm = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//ステージ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int stagecolor = 0;
|
|
|
|
|
int sta = 1, stb = 4, stc = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//クイック
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int fast = 1;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//トラップ表示
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int trap = 1;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//中間ゲート
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int tyuukan = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//スタッフロール
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int ending = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//ステージ読み込みループ(いじらない)
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int stagerr, stagepoint;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
//オーバーフローさせる
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int over = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//ステージスイッチ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int stageonoff = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//メインプログラム
|
|
|
|
|
void Mainprogram();
|
|
|
|
|
void rpaint();
|
|
|
|
|
int maint;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//サブクラス
|
|
|
|
|
//(ウエイト系
|
|
|
|
|
void wait(int interval);
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void wait2(long stime, long etime, int FLAME_TIME);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
int rand(int Rand);
|
|
|
|
|
void end();
|
|
|
|
|
|
|
|
|
|
//描画
|
|
|
|
|
int color;
|
|
|
|
|
void setfont(int a);
|
|
|
|
|
void setcolor(int red, int green, int blue);
|
|
|
|
|
void setc0();
|
|
|
|
|
void setc1();
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void drawpixel(int a, int b);
|
|
|
|
|
void drawline(int a, int b, int c, int d);
|
|
|
|
|
void drawrect(int a, int b, int c, int d);
|
|
|
|
|
void fillrect(int a, int b, int c, int d);
|
|
|
|
|
void drawarc(int a, int b, int c, int d);
|
|
|
|
|
void fillarc(int a, int b, int c, int d);
|
|
|
|
|
int grap[161][8], mgrap[51];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
int loadimage(string b);
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int loadimage(int a, int x, int y, int r, int z);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
int mirror;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void drawimage(int mx, int a, int b);
|
|
|
|
|
void drawimage(int mx, int a, int b, int c, int d, int e, int f);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
void setre();
|
|
|
|
|
void setre2();
|
|
|
|
|
void setno();
|
|
|
|
|
int oto[151];
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void ot(int x); void bgmchange(int x);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//文字
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void str(string c, int a, int b);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//)
|
|
|
|
|
|
|
|
|
|
void stagecls();
|
|
|
|
|
void stage();
|
|
|
|
|
void stagep();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//1-ステージ
|
|
|
|
|
//10-ステージ前
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//ループ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int t, tt, t1, t2, t3, t4;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//初期化
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int zxon, zzxon;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//キーコンフィグ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int key, keytm;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//三角関数
|
2015-10-18 10:48:46 +08:00
|
|
|
|
double pai = 3.1415926535;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//地面
|
|
|
|
|
#define smax 31
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int sx, sco;
|
|
|
|
|
int sa[smax], sb[smax], sc[smax], sd[smax], stype[smax], sxtype[smax], sr[smax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
int sgtype[smax];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//プレイヤー
|
|
|
|
|
int mainmsgtype;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int ma, mb, mnobia, mnobib, mhp;
|
|
|
|
|
int mc, md, macttype, atkon, atktm, mactsok, msstar, nokori = 2, mactp, mact;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int mtype, mxtype, mtm, mzz;
|
|
|
|
|
int mzimen, mrzimen, mkasok, mmuki, mmukitm, mjumptm, mkeytm, mcleartm;
|
|
|
|
|
int mmutekitm, mmutekion;
|
|
|
|
|
int mztm, mztype;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
int actaon[7];
|
|
|
|
|
//メッセージ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int mmsgtm, mmsgtype;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int mascrollmax = 21000; //9000
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//ブロック
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void tyobi(int x, int y, int type);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
void brockbreak(int t);
|
|
|
|
|
#define tmax 641
|
|
|
|
|
int tco;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int ta[tmax], tb[tmax], tc[tmax], td[tmax], thp[tmax], ttype[tmax];
|
|
|
|
|
int titem[tmax], txtype[tmax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//メッセージブロック
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int tmsgtm, tmsgtype, tmsgx, tmsgy, tmsgnobix, tmsgnobiy, tmsg;
|
|
|
|
|
void ttmsg(); void txmsg(string x, int a);
|
|
|
|
|
void setfont(int x, int y);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//効果を持たないグラ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void eyobi(int xa, int xb, int xc, int xd, int xe, int xf, int xnobia, int xnobib, int xgtype, int xtm);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
#define emax 201
|
|
|
|
|
int eco;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int ea[emax], eb[emax], enobia[emax], enobib[emax], ec[emax], ed[emax];
|
|
|
|
|
int ee[emax], ef[emax], etm[emax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
int egtype[emax];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//敵キャラ
|
2015-10-18 10:48:46 +08:00
|
|
|
|
void ayobi(int xa, int xb, int xc, int xd, int xnotm, int xtype, int xxtype);
|
2015-10-18 09:45:29 +08:00
|
|
|
|
void tekizimen();
|
|
|
|
|
#define amax 24
|
|
|
|
|
int aco;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int aa[amax], ab[amax], anobia[amax], anobib[amax], ac[amax], ad[amax];
|
|
|
|
|
int ae[amax], af[amax], abrocktm[amax];
|
|
|
|
|
int aacta[amax], aactb[amax], azimentype[amax], axzimen[amax];
|
|
|
|
|
int atype[amax], axtype[amax], amuki[amax], ahp[amax];
|
|
|
|
|
int anotm[amax], anx[160], any[160];
|
|
|
|
|
int atm[amax], a2tm[amax];
|
|
|
|
|
int amsgtm[amax], amsgtype[amax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
//敵出現
|
|
|
|
|
#define bmax 81
|
|
|
|
|
int bco;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int ba[bmax], bb[bmax], btm[bmax];
|
|
|
|
|
int btype[bmax], bxtype[bmax], bz[bmax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//背景
|
|
|
|
|
#define nmax 41
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int nxxmax, nco;
|
|
|
|
|
int na[nmax], nb[nmax], nc[nmax], nd[nmax], ntype[nmax];
|
|
|
|
|
int ne[nmax], nf[nmax], ng[nmax], nx[nmax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//リフト
|
|
|
|
|
#define srmax 21
|
|
|
|
|
int srco;
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int sra[srmax], srb[srmax], src[srmax], srd[srmax], sre[srmax], srf[srmax];
|
|
|
|
|
int srtype[srmax], srgtype[srmax], sracttype[srmax], srsp[srmax];
|
|
|
|
|
int srmuki[srmax], sron[srmax], sree[srmax];
|
|
|
|
|
int srsok[srmax], srmovep[srmax], srmove[srmax];
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//スクロール範囲
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int fx = 0, fy = 0, fzx, fzy, scrollx, scrolly;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
//全体のポイント
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int fma = 0, fmb = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
//強制スクロール
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int kscroll = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
//画面サイズ(ファミコンサイズ×2)(256-224)
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int fxmax = 48000, fymax = 42000;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//ステージ
|
|
|
|
|
byte stagedate[17][2001];
|
|
|
|
|
|
|
|
|
|
//画面黒
|
2015-10-18 10:48:46 +08:00
|
|
|
|
int blacktm = 1, blackx = 0;
|
2015-10-18 09:45:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//自由な値
|
|
|
|
|
int xx[91];
|
|
|
|
|
double xd[11];
|
|
|
|
|
string xs[31];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//タイマー測定
|
|
|
|
|
long stime;
|