suoha_dspl.h

来自「是一个手机功能的模拟程序」· C头文件 代码 · 共 212 行

H
212
字号
/********************************************************************************
 $History: Suoha_dspl.h
    Date .................. Modification ......................................
    08/14/2002    version 1.1.0 zhangzg 
 $End

*******************************************************************************/

//#include "Mmigame.h"


/********************************************************************

   maco definition 

**********************************************************************/

//color of backgroud
#define BKCOLOR 0x008000 //green

//area of text of opp select and main play window
#define LEFT_OPPTXT 48
#define TOP_OPPTXT  3
#define RIGHT_OPPTXT 118
#define BOTTOM_OPPTXT 157

#define LEFT_MAINWINTXT 1
#define TOP_MAINWINTXT  51
#define RIGHT_MAINWINTXT 83
#define BOTTOM_MAINWINTXT 85

//area of dialog
#define LEFT_DIALOG  10
#define TOP_DIALOG   50

//////////////////////////////////////
//interface of selection
#define WIDTH_CARD    38 //the width of one card
#define HEIGHT_CARD   50 //the height of one card
#define BACKCARD      10

#define WIDTH_PPMM 30
#define HEIGHT_PPMM 30

#define LEFT_WIDTH_PPMM  5  //the width between the ppmm1 and the left side of screen of mobile 
#define TOP_PPMM 8 //
#define INTERVAL_PPMM  14 //HEIGHT_PPMM*3+INTERVAL_PPMM*2+TOP_PPMM*2 = 160!

//definitions of name information of ppmm
#define LEFT_NAME 12
#define TOP_NAME  48

//
#define LEFT_SELECT_BUTTON 5
#define TOP_SELECT_BUTTON 80

#define LEFT_ENTER_BUTTON 5
#define TOP_ENTER_BUTTON 130

#define LEFT_BACK_BUTTON 100
#define TOP_BACK_BUTTON 130

#define WIDTH_BUTTON 32
#define HEIGHT_BUTTON 18
////////////////////////////////////////////////////
//interface of play card
#define LEFT_WIDTH_CARD    1  //the width between the first card and left edge of the dialog
#define TOP_WIDTH_CARD      1  //the width between the first card and top edge .....
#define EXPOSED_WIDTH_CARD   20 //the width of exposed card
//one card is composed of three parts, which are some small bitmaps
//when draw one card, these small bitmap are drawn.
#define LEFT_C1  1    
#define TOP_C1   1
#define WIDTH_C12 9
#define HEIGHT_C12 19

#define LEFT_C2  28
#define TOP_C2   30

#define LEFT_C0   10
#define TOP_C0    15
#define WIDTH_C0 18
#define HEIGHT_C0 25
///////////////////////////////////////////////////
//definition of displaying area of main window
#define LEFT_ZONE1    1
#define TOP_ZONE1     TOP_WIDTH_CARD+HEIGHT_CARD+1
#define RIGHT_ZONE1   82 //120-38

#define LEFT_ZONE2    1
#define TOP_ZONE2     TOP_ZONE1+17
#define RIGHT_ZONE2   72 //120-30

#define LEFT_ZONE3    1
#define TOP_ZONE3      TOP_ZONE2+21
#define RIGHT_ZONE3   34 //16*2+2

#define LEFT_ZONE4    87  //120- 2*width_font-3
#define TOP_ZONE4    TOP_WIDTH_CARD+HEIGHT_CARD+1
#define RIGHT_ZONE4   119 //120

#define LEFT_ZONE5      87
#define TOP_ZONE5       TOP_ZONE4+16+3
#define RIGHT_ZONE5   119

#define LEFT_ZONE6   87
#define TOP_ZONE6    TOP_ZONE5+16+3
#define RIGHT_ZONE6  119

//#define BOTTOM_ZONE4   108 //160-52

#define LEFT_ZONE7   46
#define TOP_ZONE7    TOP_ZONE2+21
#define RIGHT_ZONE7  82

#define HEIGHT_ZONE   18

// define relative position of hand shape in one card
#define LEFT_HAND 3
#define TOP_HAND  32
/********************************************************************************

    data definition

*********************************************************************************/
///////////////////////////////////////////
//interface of play card
/*
enum ThingType
{
   CARD,
   ACTIONS,
    STAKE;
};

typedef struct FocusThings
{
    THINGTYPE thingType;
   short num_Thing;
};
*/
typedef struct 
{
   short firstNum;
   short secondNum;
}CardStruct;

/*
typedef struct
{
    const unsigned char* p1;
     const unsigned char* p0;
}CardDisplayStruct;
*/

/*
typedef struct
{
//  numopp nopp;
  char* opp;
}oppstr;
*/
/*
typedef struct
{
    unsigned short left;
    unsigned short top;
    unsigned short right;
    unsigned short bottom;
}RECT;
*/

/********************************************************************************



*********************************************************************************/

/********************************************************************************

    function definition 

*********************************************************************************/
void PaintBackground(MfwRect rect, U32 color);
void DrawFigure(MfwRect focus_rect, ULONG color); //draw the profiles of focus things of main window
void DrawHand(USHORT x, USHORT y);

void DisplayMMFigure(UBYTE num_MM, UBYTE num_preMM); //draw the profile of focus mm
//void DisplayMM(UBYTE num_MM, USHORT x, USHORT y);
void DisplayName(UBYTE num_MM, USHORT x, USHORT y);
//void DisplayMMIntro(UBYTE num_MM); //display info of introduction of focus mm
//void StartupAnimation(RECT rect, const char info_MM[...][...]);//Display the background info of MM

void DisplayOneCard(UBYTE whoturned, USHORT numcard, USHORT card);
void DisplayCard(UBYTE numcard);
void DisplayText(USHORT X, USHORT y); //display the info about the situation of playing

void MoveCard(UBYTE who, UBYTE whichCard);
void DisplayZone(UBYTE numzone, char* txt,  UBYTE attr);
void ClearZone(UBYTE numzone);
void DisplayMainWinTxtZone();
void DrawSelectedButton(USHORT i);
void DisplayDialog(BOOL yesorno);
/*************************************************************************

   These functions are provided to suoha_main.c to display the interface

**************************************************************************/
void Suoha_Display_Start_Picture();
void Suoha_Display_Opponent();
void Suoha_Display_End();

⌨️ 快捷键说明

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