home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FreeWare Collection 2
/
FreeSoftwareCollection2pd199x-jp.img
/
demo
/
demo.h
< prev
next >
Wrap
Text File
|
1990-06-14
|
3KB
|
194 lines
#include <stdio.h>
#include <egb.h>
#include <stdlib.h>
#include <string.h>
#include <spr.h>
#include <snd.h>
#define MES_FRAME 15
#define MES_BACK 11
#define UP 0
#define DOWN 1
#define LEFT 2
#define RIGHT 3
#define TR_A 4
#define TR_B 5
#define RUN 6
#define SELECT 7
#define DIR_RIGHT 0
#define DIR_LEFT 1
#define WALK1 0
#define WALK2 1
#define WALK3 2
#define WALK4 3
#define JUMP 4
#define LOW 5
#define JUMP_HIGHT 1
#define STAGEMAX 40
#define LEVELMAX 20
#define OBJMAX 50
#define PARTS_MAX 21
#define PALMAX 40
#define HIGH_TALL 4
#define LOW_TALL 2
#define MANSPR 1020
#define Gwork 1536 /* EGBワークサイズ */
#define GbufSize 153600 /* 16色1画面の領域 */
#define Windowbuf 30000 /* windowのバッファ */
#define MUS_OPEN 2
#define MUS_TOWN 1
#define MUS_CAVE 1
#define MUS_END 3
extern char GWork[];
extern char para[];
extern int Myx;
extern int Myy;
extern int SpriteCnt;
extern short int PartsBuf[][16*2];
extern short int Palette[];
extern short int PalBuf[][16];
typedef struct {
int LeftRegion;
int RightRegion;
} MAP;
extern MAP regionmap[];
/*************** EGB用構造体型宣言 ***************/
typedef struct {
short int x1;
short int y1;
short int x2;
short int y2;
} BOX;
typedef struct {
short int x;
short int y;
short int r;
} CIRCLE;
typedef struct {
short int no;
short int x1;
short int y1;
short int x2;
short int y2;
} LINE;
typedef struct {
short int x;
short int y;
short int x1;
short int y1;
short int x2;
short int y2;
short int r;
} ARC;
typedef struct {
char *addr;
short int select;
short int x1;
short int y1;
short int x2;
short int y2;
} GETPUT;
typedef struct {
int seqno;
char blue;
char red;
char green;
char dummy;
} COL;
typedef struct {
int no;
COL color[16];
} PALETTE;
typedef struct {
short int x;
short int y;
short int len;
char str[80];
} STRING;
typedef struct {
short int x1;
short int y1;
short int x2;
short int y2;
} SCROLL;
typedef struct {
int pattern; /* スプライトのpターン番号 */
int sprite; /* スプライト番号 */
int xsize; /* 横のスプライト数 */
int ysize; /* 縦のスプライト数 */
} INFO;
extern INFO CharInfo[][6];
typedef struct {
int x,y; /* そのオブジェクトが存在するX座標,Y座標 */
int region; /* どのリージョンに存在するか */
int ptn_no; /* パターンナンバー */
int reg_chg; /* そこから移れるリージョンナンバー 99なら移動不可 */
int level_up; /* レベルアップするか */
int mes_no; /* メッセージ出力の回数 */
int mes_col[10]; /* メッセージ出力時の色 */
char *message[10]; /* そのオブジェクトが発するメッセージ */
int phase;
} OBJECT;
extern OBJECT objlist[LEVELMAX][OBJMAX];
typedef struct {
char *fname;
int xsize;
int ysize;
int ptn_no;
int pal;
} PTNINFO;
extern PTNINFO PtnInfo[];
extern int region;
extern int level;
extern char *ScreenMap[STAGEMAX];
extern int WaitCnt;
extern int MusicFlag;
extern int NowMusic;
extern int MusicTable[];
extern void mesinit1();
extern void mesinit2();
extern void mesinit3();
extern void mesinit4();
extern void mapset1();
extern void mapset2();
extern void TransData();
extern int Help();