?? cbdraw.h
字號:
/////////////
// CBDraw.h : v0032
// Written by : Liu Gang
// Compiler : Microsoft Visual C++ 4.0 & DirectX
// Library : DDraw.Lib
// Copyright (C) : 1996 WayAhead Corporation
// v0010 : Sep.26.1996
// v0011 : Nov.16.1996
// v0020 : Dec.12.1996, changed the display method to MMX
// v0021 : Jan.22.1997, changed drawing border method
// v0030 : Mar.7.1997, Great changes since optimze display core functions
// Optimize display functions again, this time, compressed the file
// to one third, and the speed is faster 2-3 frames/second.
// Optimzed the border drawing functions too.
// v0031 : Mar.12.1997, add new MMX features in code
// v0032 : Mar.29.1997, change drawing method of special items
/////////////
// header file
// display core codes
#ifndef __CBDRAW_H__
#define __CBDRAW_H__
#define DRAW_ERROR_ID 1100
//////////////////
// 裝入所有戰場上需要的位圖和緩沖區
// load user defined surfaces
// TRUE if succeeded
// return : TRUE if successful
BOOL DRAW_LoadMaps();
// 釋放所有在戰場上裝入的緩沖區和位圖
// release user defined surfaces
void DRAW_ReleaseMaps();
//////////////////
//////////////////
// 顯示單元、陰影、水紋的效果、漢字、更新縮略圖等
// 每秒鐘要運行幾十次
// draw maps in every program cycle
void DRAW_DrawMaps();
// 檢測是否移動屏幕
// test if should move screen, if so move it
// return value : TRUE if moved
int DRAW_MoveScreen();
// 如果鼠標點擊縮略圖,或者游戲一開始時,使屏幕跳到相應位置
// if mouse hit minimap, should jump the screen to the point
// ptCenter : mouse hit point, in grid
// return value : TRUE if jumped
BOOL DRAW_JumpScreen( POINT ptCenter );
// draw all the user defined maps to screen
void DRAW_UpdateScreen( BOOL bFront = TRUE );
//////////////////
//////////////////
// 能夠覆蓋某點的所有點的相對坐標
#define DRAW_COVER_MAX 56
#define DRAW_LOCATION_MAX 4
// 讀取遮擋數據
struct DRAW_COVER_STRUCT
{
// stores the number of the last dimension in ptCover
int nCoveredMax[2][DRAW_LOCATION_MAX];
int nCoveringMax[2][DRAW_LOCATION_MAX];
// stores points
// First Dimension: Even or Odd
// Second Dimension: Locatoin Max, always 4
// Third Dimension: max cover itmes
// Covered
POINT ptCovered[2][DRAW_LOCATION_MAX][DRAW_COVER_MAX];
// Covering
POINT ptCovering[2][DRAW_LOCATION_MAX][DRAW_COVER_MAX];
};
extern struct DRAW_COVER_STRUCT DRAW_CoverLib;
// defined in CBFile.cpp
// 讀取遮擋數據
BOOL DRAW_ReadCoverFile( HWND hwnd, LPCTSTR filename, LPCTSTR path );
//////////////////
// for draw only
#define DRAW_SCREEN_ADJUST 2
//////////////////
// defined in CBDrawM.cpp
//////////////////
// for copy screen
// copy back buffer to a file named "ScreenXX.bmp"
// to make screen shots, advertising
// true if succeeded
BOOL DRAW_CopyScreen();
// draw blinking water, change palette to perform it
void DRAW_FlipWater();
//////////////////
//////////////////
// draw other maps
// prcCut : 剪切的矩形
// nFile : OTHER圖素的文件號
// nFrame : 當前幀
// nZ,nX,nY : 格子坐標
extern void DRAW_OTHER_Draw( const RECT *prcCut, int nFile, int nFrame, int nZ, int nX, int nY );
// 當資源狀態改變時(被砍伐,收割后),要更新該區域
// nZ,nX,nY : 格子坐標
extern void DRAW_OTHER_UpdateResource( int nZ, int nX, int nY );
//////////////////
//////////////////
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -