home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 2 / FreeSoftwareCollection2pd199x-jp.img / demo / demo.h < prev    next >
Text File  |  1990-06-14  |  3KB  |  194 lines

  1. #include <stdio.h>
  2. #include <egb.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <spr.h>
  6. #include <snd.h>
  7.  
  8. #define MES_FRAME    15
  9. #define MES_BACK    11
  10.  
  11. #define UP        0
  12. #define DOWN    1
  13. #define LEFT    2
  14. #define RIGHT    3
  15. #define TR_A    4
  16. #define TR_B    5
  17. #define RUN        6
  18. #define SELECT    7
  19.  
  20. #define DIR_RIGHT    0
  21. #define DIR_LEFT    1
  22. #define WALK1        0
  23. #define WALK2        1
  24. #define WALK3        2
  25. #define WALK4        3
  26. #define JUMP        4
  27. #define LOW            5
  28.  
  29. #define JUMP_HIGHT    1
  30. #define STAGEMAX    40
  31. #define LEVELMAX    20
  32. #define OBJMAX        50
  33. #define PARTS_MAX    21
  34. #define PALMAX        40
  35.  
  36. #define HIGH_TALL    4
  37. #define LOW_TALL    2
  38.  
  39. #define MANSPR 1020
  40. #define Gwork 1536 /* EGBワークサイズ */
  41. #define GbufSize 153600 /* 16色1画面の領域 */
  42. #define Windowbuf 30000 /* windowのバッファ */
  43.  
  44. #define MUS_OPEN 2
  45. #define MUS_TOWN 1
  46. #define MUS_CAVE 1
  47. #define MUS_END  3
  48.  
  49. extern char GWork[];
  50.  
  51. extern char para[];
  52.  
  53. extern int Myx;
  54. extern int Myy;
  55. extern int SpriteCnt;
  56.  
  57. extern short int PartsBuf[][16*2];
  58.  
  59. extern short int Palette[];
  60.  
  61. extern short int PalBuf[][16];
  62.  
  63. typedef struct {
  64.     int LeftRegion;
  65.     int RightRegion;
  66. } MAP;
  67.  
  68. extern MAP regionmap[];
  69.  
  70. /*************** EGB用構造体型宣言 ***************/
  71.  
  72. typedef struct {
  73.     short int x1;
  74.     short int y1;
  75.     short int x2;
  76.     short int y2;
  77. } BOX;
  78.  
  79. typedef struct {
  80.     short int x;
  81.     short int y;
  82.     short int r;
  83. } CIRCLE;
  84.  
  85. typedef struct {
  86.     short int no;
  87.     short int x1;
  88.     short int y1;
  89.     short int x2;
  90.     short int y2;
  91. } LINE;
  92.  
  93. typedef struct {
  94.     short int x;
  95.     short int y;
  96.     short int x1;
  97.     short int y1;
  98.     short int x2;
  99.     short int y2;
  100.     short int r;
  101. } ARC;
  102.  
  103. typedef struct {
  104.     char *addr;
  105.     short int select;
  106.     short int x1;
  107.     short int y1;
  108.     short int x2;
  109.     short int y2;
  110. } GETPUT;
  111.  
  112. typedef struct {
  113.     int seqno;
  114.     char blue;
  115.     char red;
  116.     char green;
  117.     char dummy;
  118. } COL;
  119.  
  120. typedef struct {
  121.     int no;
  122.     COL color[16];
  123. } PALETTE;
  124.  
  125. typedef struct {
  126.     short int x;
  127.     short int y;
  128.     short int len;
  129.     char str[80];
  130. } STRING;
  131.  
  132. typedef struct {
  133.     short int x1;
  134.     short int y1;
  135.     short int x2;
  136.     short int y2;
  137. } SCROLL;
  138.  
  139. typedef struct {
  140.     int pattern; /* スプライトのpターン番号 */
  141.     int sprite; /* スプライト番号 */
  142.     int xsize; /* 横のスプライト数 */
  143.     int ysize; /* 縦のスプライト数 */
  144. } INFO;
  145.  
  146. extern INFO CharInfo[][6];
  147.  
  148. typedef struct {
  149.         int x,y; /* そのオブジェクトが存在するX座標,Y座標 */
  150.         int region; /* どのリージョンに存在するか */
  151.         int ptn_no; /* パターンナンバー */
  152.         int reg_chg; /* そこから移れるリージョンナンバー 99なら移動不可 */
  153.         int level_up; /* レベルアップするか */
  154.         int mes_no; /* メッセージ出力の回数 */
  155.         int mes_col[10]; /* メッセージ出力時の色 */
  156.         char *message[10]; /* そのオブジェクトが発するメッセージ */
  157.         int phase;
  158. } OBJECT;
  159.  
  160. extern OBJECT objlist[LEVELMAX][OBJMAX];
  161.  
  162. typedef struct {
  163.     char *fname;
  164.     int xsize;
  165.     int ysize;
  166.     int ptn_no;
  167.     int pal;
  168. } PTNINFO;
  169.  
  170.  
  171. extern PTNINFO PtnInfo[];
  172.  
  173.  
  174.  
  175. extern int region;
  176. extern int level;
  177.  
  178. extern char *ScreenMap[STAGEMAX];
  179.  
  180. extern int WaitCnt;
  181.  
  182. extern int MusicFlag;
  183. extern int NowMusic;
  184. extern int MusicTable[];
  185.  
  186. extern void mesinit1();
  187. extern void mesinit2();
  188. extern void mesinit3();
  189. extern void mesinit4();
  190. extern void mapset1();
  191. extern void mapset2();
  192. extern void TransData();
  193. extern int  Help();
  194.