📄 cbshadow.h
字号:
/////////////////////
// CBShadow.h : v0012
// Written by : Liu Gang
// Compiler : Microsoft Visual C++ 4.0 & DirectX
// Library : DDraw.Lib
// Copyright : WayAhead Software Co.Ltd. 1996-1997
// v0010 : Feb.10.1997
// v0011 : Mar.28.1997, changed SHADOW_sItem to SHADOW_psItem
// v0012 : May.2.1997, make Drawall() faster if need not to draw the whole screen
/////////////////////
// header file
// shadow functions
// 包括对阴影和雨雪等特殊效果的操作
#ifndef __CBSHADOW_H__
#define __CBSHADOW_H__
/////////////////////
// 错误代码,出错时使用以此作为基准的错误代码,便于找错。
#define SHADOW_ERROR_ID 1300
/////////////////////
/////////////////////
// 装入阴影背景面和数据面(保存阴影显示图像)
// load shadow surfaces
// return : TRUE if successful
BOOL SHADOW_Load();
// 释放阴影背景面和数据面
// release shadow surfaces
void SHADOW_Release();
// 清空影子附加数组cMap_shadowEx
void SHADOW_Clear();
/////////////////////
//存在//lwc
void SHADOW_existent(int nX,int nY,int nRange);
//死亡//lwc
void SHADOW_death (int nX,int nY,int nRange);
/////////////////////
// 显示更新一个区域的阴影
// nX, nY : 中心位置,以格子为单位
// nXLast, nYLast: 上一次的坐标
// nRange : 单元的视野大小,以格子为单位
void SHADOW_Draw( int nX, int nY, int nXLast, int nYLast, int nRange );
// 显示更新一个区域的阴影,只显示第一层
// nX, nY : 中心位置,以格子为单位
// nXLast, nYLast: 上一次的坐标
// nRange : 单元的视野大小,以格子为单位
void SHADOW_Draw0( int nX, int nY, int nXLast, int nYLast, int nRange );
// 把阴影的背景面拷贝到游戏的背景面上
void SHADOW_Update2Back( CONST RECT *prcCut = NULL, BOOL bFront=FALSE );
// redraw all the shadows in client area
// 重画战场区域的所有阴影,在游戏一开始或移动屏幕时用
void SHADOW_DrawAll( LPRECT prcCut = NULL );
// 拷贝阴影背景面上保留的区域到新的位置
extern void SHADOW_MoveBack( POINT ptDest, LPRECT prcSrc );
/////////////////////
/////////////////////
// 开关阴影效果
// enable or disable shadow
// bEnable : enable or disable shadow
void SHADOW_Enable( BOOL bEnable = TRUE );
// 检测阴影效果是开是关
// test if shadow is enabled
// return : TRUE if enabled
BOOL SHADOW_IfEnabled();
// 检测该点是否被阴影覆盖
// test if this point is under the shadow
// nX, nY : point to test
// return : MAP_SHADOW_NONE if it is blanked
// else returns the content of stctR.nShadow
extern int SHADOW_IfBlanked( int nX, int nY );
/////////////////////
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -