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

📄 gamedisplay.h

📁 是一个手机功能的模拟程序
💻 H
字号:
//6.19 chenjun add a function DrawCpointLine()
//Game_display.h
//author:chenjun
//date:2002.06.12
//purpose:define the struct used in game mode
#ifndef _GAME_DISPLAY
#define _GAME_DISPLAY
#include "typedefs.h"

#define scrX 119
#define scrY 159

typedef struct
{ 
  USHORT  x;
  USHORT  y;
} CPoint;

typedef struct
{ 
  int x;
  int y;
  int color;
} game_Point;//struct of point in game mode

typedef struct
{
  int x;
  int y;
  int radius;
  int fillcolor;
  int color;
} game_Circle;//struct of circle in game mode

typedef struct
{
  int x1;
  int y1;
  int x2;
  int y2;
  int fillcolor;
  int color;
} game_Rectangle;//struct of rect in game mode

typedef struct
{
  int x1;
  int y1;
  int x2;
  int y2;
  int color;
} game_Line;//struct of line in game mode

#if 1
typedef enum         
{               
 WHITE,//白色  ffffff 
 RED,//  红色  ff0000 
GREEN,//  绿色  00ff00 
BLUE,//  蓝色  0000ff 
MAGENTA,//  桃红色  ff00ff 
CYAN,//  浅蓝色  00ffff 
YELLOW,//  黄色  ffff00 
BLACK,//  黑色  000000 
AQUAMARINE,//  草绿色  70db93 
BRONZE,//  青铜色  8c7853 
COPPER,//  红铜色  b87333 
FELDSPAR,//  长石色  d19275 
GOLD,//  金色  cd7f32 
GRAY,//  灰色  c0c0c0 
KHAKI,//  卡其色  9f9f9f 
MAROON,//  紫蓝色  8e236b 
ORANGE,//  橙色  ff7f00 
ORCHID,//  淡紫色  db70db 
PINK,//  粉红色  bc8f8f 
PLUM,//  梅李色  eaadea
QUARTZ,//  石英色  d9d9f3 
SALMON,//  鮭肉色  6f4242 
SCARLET,//  鮮红色  8c1717 
SILVER,//  銀色  e6e8fa 
THISTLE,//  淡紫色  d8bfd8 
TURQUOISE,//  蓝绿色  adeaea 
VIOLET,//  紫色  4f2f4f 
WHEAT,//  小麦色  d8d8bf 
ALICEBLUE,// 爱丽丝蓝f0f8ff 
ANTIQUEWHITE,//  復古白 antiquewhite faebd7 
AZURE,//  天蓝色 azure f0ffff 
BEIGE,//  米色 beige f5f5dc 
BISQUE,//  淡黄色 bisque ffe4c4 
BLANCHEDALMOND,//  白杏仁 blanchedalmond ffebcd 
BLUEVIOLET,//  青紫色 blueviolet 8a2be2 
BROWN,//  棕色 brown a52a2a 
BURLYWOOD,//  硬木頭 burlywood deb887 
CADETBLUE,//  军队蓝 cadetblue 5f9ea0 
CHARTREUSE,//  淡黄绿色 chartreuse 7ff000 
CHOCOLATE,//  灰褐色 chocolate d2691e 
CORAL,//  珊瑚色 coral ff7f50 
CORNFLOWERBLUE,//  瞿麦蓝 cornflowerblue 6495ed 
CORNSILK,//  玉蜀黍穗 cornsilk fff8dc 
CRIMSON,//  鮮红色 crimson dc143c 
DARKBLUE,//  深蓝色 darkblue 00008b 
DARKCYAN,//  深蓝绿色 darkcyan 008b8b 
DARKGOLDENROD,//  深秋麒麟草 darkgoldenrod b8860b 
DARKGRAY,//  深灰色 darkgray a9a9a9 
DARKGREEN,//  墨绿色 darkgreen 006400 
DARKKHAKI,//  深卡其色 darkkhaki bdb76b 
DARKMAGENTA,//  暗紫红色 darkmagenta 8b008b 
DARKOLIVEGREEN,//  暗橄榄绿 darkolivegreen 556b2f 
DARKORANGE,//  暗橙色 darkorange ff8c00 
DARKORCHID,//  暗兰花 darkorchid 9932cc 
DARKRED,//  暗红色 darkred 8b0000 
DARKSALMON,//  暗橙红色 darksalmon e9967a 
DARKSEAGREEN,//  暗海绿色 darkseagreen 8fbc8f 
DARKSLATEBLUE,//  深灰蓝色 darkslateblue 483d8b 
DARKSLATEGRAY,//  深蓝灰色 darkslategray 2f4f4f 
DARKTURQUOISE,//    darkturquoise 00ced1 
DARKVIOLET,//  暗紫色 darkviolet 9400d3 
DEEPPINK,//  重粉红色 deeppink ff1493 
DEEPSKYBLUE,//  重天空蓝 deepskyblue 00bfff 
DIMGRAY,//  暗灰色 dimgray 696969 
DODGERBLUE,//  柔和蓝 dodgerblue 1e90ff 
FIREBRICK,//  耐火砖色 firebrick b22222 
   
 MaxGameColor             
} game_color ;   //struct of color index in game mode
#endif

//following os the prototype of draw function in game mode
 int  GetGameColor(game_color g_color);
 void DrawPoint(game_Point   param);
 void DrawCircle(game_Circle  param);
 void DrawRectagle(game_Rectangle  param);
void DrawLine(game_Line  param);
void  DrawCpointLine(CPoint point_start, CPoint point_end, USHORT ulinewidth, ULONG  ucolor);




#endif

⌨️ 快捷键说明

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