📄 cbprompt.h
字号:
/////////////
// CBPrompt.h : v0010
// Written by : Li Haijun
// Compiler : Microsoft Visual C++ 4.0 & DirectX
// Library : No .Lib
// Copyright (C) : 1997 WayAhead Corporation
// v0010 : Mar.16.1997
/////////////
// to define all struct and union for prompt area
//////////////////////////////
#ifndef __CBPROMPT_H__
#define __CBPROMPT_H__
#include "DDButton.h"
#define PROMPT_NONE 0
#define PROMPT_CONSTRUCTION_BUILDING 1
#define PROMPT_CONSTRUCTION_WORKING 2
#define PROMPT_CONSTRUCTION_IDLESS 3
#define PROMPT_UNIT 4
#define PROMPT_SOLDIER_SINGLE 5
#define PROMPT_SOLDIER_MORE 6
#define PROMPT_TRANSPORT_SHIP 7
// define process bar id
#define PROCESSBAR_STONE 1
#define PROCESSBAR_POWER 2
#define PROCESSBAR_BLOOD 3
#define PROCESSBAR_PROCESS 4
////////////////////////////////////////////////////////////
// to define the construction that have not complete finish
struct CONSTRUCTION_BUILDING
{
int ConstructionBitmapId;
char ConstructionName[50];
int ConstructionGrade;
int Stone;
};
/////////////////////////////////////////////////////////////
// to define the construction that are producting something
struct CONSTRUCTION_WORKING
{
int ConstructionBitmapId;
int ConstructionGrade;
int Stone;
int ProductBitmapId;
char ConstructionName[50];
int Percent;
};
///////////////////////////////////////////////////////////////
// to define the construction that are idless(空闲)
struct CONSTRUCTION_IDLESS
{
int ConstructionBitmapId;
char ConstructionName[50];
int ConstructionGrade;
int Stone;
};
////////////////////////////////////////////////////////////////
// to define the unit that been select
struct UNIT
{
int GeneralBitmapId;
int GeneralPower; //将领的武力
int GeneralBlood; //将领的体力
char GeneralName[50];
char Office[50];
int Experience;
int Ruse;
int UnitMorale;
int UnitLineUp;
int NumberOfSolider;
};
///////////////////////////////////////////////////////////////////
// to define the single soldier that have no master
struct SOLDIER_SINGLE
{
int SoldierBitmapId;
char SoldierKind[50]; // the kind of this soldier
int SoldierPower; // power -->体力 //对于
char SoldierAscroption[50]; // ascroption --> 归属
int SoldierAttack; // attack -->攻击力
int SoldierDefence; // defence -->防御力
int SoldierCarry; // carry -->射程
int SoldierEyesight; // eyesight -->视野
// int SoldierAmount; // amount -->人数
};
/////////////////////////////////////////////////////////////////////
// to define more soldier information
struct SOLDIER_MORE
{
int UnitNumber; // 一共有几个单位
int Amount; // 几个单位的总人数
};
////////////////////////////////////////////////////////////////
// to define the unit that been select
struct TRANSPORT_SHIP
{
int SoldierBitmapId;
char SoldierKind[50]; // the kind of this soldier
int SoldierPower; // power -->体力
int NumberOfUnit ;
int NumberOfSolider;
};
//////////////////////////////////////////////////////////////////////
// to define a union to include the above struct
union PROMPT_BLOCK_UNION
{
struct CONSTRUCTION_BUILDING Construction_Building;
struct CONSTRUCTION_WORKING Construction_Working;
struct CONSTRUCTION_IDLESS Construction_Idless;
struct UNIT Unit;
struct SOLDIER_SINGLE Soldier_Single;
struct SOLDIER_MORE Soldier_More;
struct TRANSPORT_SHIP Transport_Ship ;
};
//////////////////////////////////////////////////////////////////////
// to define the struct for all prompt informaiton
struct PROMPT_BLOCK
{
int PromptBlockId; // the id of one of above block
union PROMPT_BLOCK_UNION PromptBlockUnion; // to store all kind of prompt block, but only one kind in a just time
};
///////////////////////////////////////
// to show the four process bars
///////////////////////////////////////
BOOL FACE_ShowProcessBar( int BarID, int NewData );
///////////////////////////////////////////////////////////////////////////
// to show prompt block
void FACE_ShowPromptBlock( struct PROMPT_BLOCK PromptBlock );
// to set the prompt block to the global struct veriable FACE_PROMPT_BLOCK
void FACE_SetCurrentPromptBlock( struct PROMPT_BLOCK PromptBlock );
// to define the function to show the prompt block to the prompt area
BOOL FACE_ShowCurrentBlock(void);
//////////////////////////////////////////
// to fine the button by a command id
CDDButton * GetButtonPointer( int ID, int grade = 0 );
//////////////////////////////////////////////////////
// to get the office by a number
void GetOffice( int OfficeFlag );
// to get the line up by a number
void GetLineUp( int LineUpFlag );
////////////////////////////////////
// to updata the resource amount
BOOL FACE_UpdateGrade(int grade);
// to updata the value of experence
BOOL FACE_UpdateExperience(int experience) ;
// to updata the value of ruse
BOOL FACE_UpdateRuse(int ruse);
// to updata the value of morale
BOOL FACE_UpdateMorale(int morale) ;
// to updata the value of solider number
BOOL FACE_UpdateSoliderNumber(int solider);
// to updata the office of general
BOOL FACE_UpdateOffice(LPCTSTR office);
//////////////////////////////////////////////
// to define the unit that been select
struct GENERAL_UNIT
{
int UnitId ;
int GeneralBitmapId;
char GeneralName[50];
int GeneralPower; //武 力
int GeneralBlood; //体 力
};
//////////////////////////////////////////////
// to define the unit of general
struct SINGLE_UNIT
{
int Winner ; // 1-->if Genral_One win
// 2-->if Genral_Two win
// 3-->if two general equal
BOOL PlayerWant ; // TRUE-->the player want to fight
// FALSE--> the computer want to fight
struct GENERAL_UNIT General_One ;
struct GENERAL_UNIT General_Two ;
};
//////////////////////////////////////////////
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -