⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lutils.h

📁 ldraw_DOS游戏开发包
💻 H
字号:
#ifndef LGAME_H
#define LGAME_H
#include <ldraw.h>
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
struct TlgSpiritLink
{ short x,y,dist;
  char *img;
  TlgSpiritLink *next;
}; // for z-sort spirits
//////////////////////////////////////////////////////////////////////
void lg_insert_spirit(TlgSpiritLink **my_link,short x,short y,char *spr,short dist);
void lg_view_spirit(TlgSpiritLink **my_link);
void lg_delete_link(TlgSpiritLink **my_link);

void lg_dist_spirit(short x,short y,char *spr,short dist);
void lg_dist_spirit(short x,short y,short page,short num,short dist);
void lg_dist_show();
///////////////////////////////////////////////
void   lgSetHotxyMode(short mode,char *spr); // 0: at(0,0) 1:in the middle 2:at(len/2,wid-1)
void   lgPutSpirit(short x,short y,char *);  // use the hot point (len/2,wid-1)
void   lgPutImage(short x1,short y1,short x2,short y2,char *bitmap);
void   lgPutMapImage(short x,short y,char *bitmap,COLOR_MAP *map);
void   lgClearScr(short way);
//////////////////////////////////////////////////////////////////////
char   lg_input(char *string,short x1,short y1,short x2,short y2,uchar bcolor,short maxlen);
//////////////////////////////////////////////////////////////////////
#define LMAX_CHAR 2000
class  Tline
{protected:
 short list[LMAX_CHAR][2];
 char  *line, *fline, fileflag; 
 FILE  *lf;
 inline char CheckChar(char c);
 inline char getline(char *s);
 public: Tline(); ~Tline();
 char  **Word,*outline; short WordCount;
 short ArrangeStr(char *source);
 void  CharacterCase(char *string,short mode);
//////////////////////////////
 char  OpenFile(char *fname);
 void  CloseFile();
 char *GetLine(short mode);

 short GetPicIndex(short item,TLpcImage *lpc);
 void  GetString(char *str,short item);
};
//////////////////////////////////////////////////////////////////////
class  TMenu
{ public: TMenu(short max); ~TMenu();
  char **list, form, dy;
  short num, win[4], color[4], result;
  short choice();
};
///////////////////////////////
#define LMAP_MAX_LEN   400
#define LMAP_MAX_WID   400
struct game_map
{ short len, wid, x,y;
  uchar map[LMAP_MAX_LEN][LMAP_MAX_WID];
  short pic[LMAP_MAX_LEN][LMAP_MAX_WID];
  short event[LMAP_MAX_LEN][LMAP_MAX_WID];
  short actor[LMAP_MAX_LEN][LMAP_MAX_WID];
}; 
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -