2020-06-22 17:49:02 +08:00
|
|
|
|
/************************/
|
|
|
|
|
/* sprdisp.h */
|
|
|
|
|
/************************/
|
|
|
|
|
#ifndef _SPRDISP_H_
|
|
|
|
|
#define _SPRDISP_H_
|
|
|
|
|
|
|
|
|
|
#include "version.h"
|
2020-06-23 15:27:59 +08:00
|
|
|
|
#define DISP_BUFFER_SIZE 4096 // <20><><EFBFBD><EFBFBD>???????
|
2020-06-22 17:49:02 +08:00
|
|
|
|
enum{
|
2020-06-23 15:27:59 +08:00
|
|
|
|
DISP_PRIO_BG = 0, //<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
DISP_PRIO_TILE = 1, //<2F>ر<EFBFBD>// ????????<3F><>????????
|
|
|
|
|
DISP_PRIO_CHAR = 10, //<2F><><EFBFBD><EFBFBD>// ???
|
|
|
|
|
DISP_PRIO_PARTS = 10, //<2F><><EFBFBD><EFBFBD>// ?????<3F><>??
|
|
|
|
|
DISP_PRIO_RESERVE = 20, //Ԥ<><D4A4>
|
|
|
|
|
DISP_PRIO_JIKI = 30, /* <20><>? */
|
2020-06-22 17:49:02 +08:00
|
|
|
|
DISP_PRIO_GRID = 100, // ????????
|
|
|
|
|
DISP_PRIO_BOX, /* ???? */
|
2020-06-23 15:27:59 +08:00
|
|
|
|
DISP_PRIO_IME1, /* ???????????? ?<3F><>? */
|
|
|
|
|
DISP_PRIO_IME2, /* ???????????? <20><><EFBFBD><EFBFBD>? */
|
2020-06-22 17:49:02 +08:00
|
|
|
|
/* ??????? */
|
2020-06-23 15:27:59 +08:00
|
|
|
|
DISP_PRIO_MENU, //ѡ<><D1A1>/* ???? */
|
|
|
|
|
DISP_PRIO_IME3, /* ????????????? ?<3F><>? */
|
|
|
|
|
DISP_PRIO_IME4, /* ????????????? <20><><EFBFBD><EFBFBD>? */
|
2020-06-22 17:49:02 +08:00
|
|
|
|
DISP_PRIO_BOX2, /* ????? */
|
|
|
|
|
DISP_PRIO_ITEM, /* ???? */
|
|
|
|
|
/* ???????? */
|
2020-06-23 15:27:59 +08:00
|
|
|
|
DISP_PRIO_YES_NO_WND, /* ?<3F>_????? */
|
|
|
|
|
DISP_PRIO_YES_NO_BTN, /* ?<3F>_??? */
|
2020-06-22 17:49:02 +08:00
|
|
|
|
DISP_PRIO_BOX3, /* ????? */
|
|
|
|
|
DISP_PRIO_DRAG, /* ????? */
|
|
|
|
|
DISP_PRIO_MOUSE, /* ??????? */
|
2020-06-23 15:27:59 +08:00
|
|
|
|
DISP_PRIO_TOP = 255 /* ??<3F>I */
|
2020-06-22 17:49:02 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2020-06-23 15:27:59 +08:00
|
|
|
|
int x, y; //<2F><>ͼʱ<CDBC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>// <20><><EFBFBD><EFBFBD>?<3F><>
|
|
|
|
|
int bmpNo; //ͼ<><CDBC><EFBFBD><EFBFBD>
|
|
|
|
|
ACTION *pAct; // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
BOOL hitFlag; // ʮλ<CAAE><CEBB>Ϊ 1:Ҫ<><D2AA>ʾalpha 2:<3A><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD> 3:ʯ<><CAAF> 4:<3A>ж<EFBFBD>
|
|
|
|
|
char DrawEffect; // 0:<3A><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD> 1:alpha 2:<3A><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD> 3:ʯ<><CAAF> 4:<3A>ж<EFBFBD>
|
2020-06-22 17:49:02 +08:00
|
|
|
|
#ifdef _READ16BITBMP
|
2020-06-23 15:27:59 +08:00
|
|
|
|
char DrawEffect; // 0:<3A><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD> 1:alpha 2:<3A><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD> 3:ʯ<><CAAF> 4:<3A>ж<EFBFBD>
|
2020-06-22 17:49:02 +08:00
|
|
|
|
#endif
|
|
|
|
|
#ifdef _SFUMATO
|
2020-06-23 15:27:59 +08:00
|
|
|
|
int sfumato; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦͼ<C8BE><CDBC>ɫ<EFBFBD><C9AB>
|
2020-06-22 17:49:02 +08:00
|
|
|
|
#endif
|
|
|
|
|
}DISP_INFO;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2020-06-23 15:27:59 +08:00
|
|
|
|
short no; //<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>DISP_INFO<46><4F>λ<EFBFBD><CEBB>// ?????<3F>t??<3F>k?
|
|
|
|
|
UCHAR dispPrio; //<2F><>ʾʱ<CABE><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>// <20><><EFBFBD><EFBFBD>??<3F>I??
|
2020-06-22 17:49:02 +08:00
|
|
|
|
}DISP_SORT;
|
|
|
|
|
|
|
|
|
|
typedef struct{
|
|
|
|
|
DISP_INFO DispInfo[ DISP_BUFFER_SIZE ];
|
|
|
|
|
DISP_SORT DispSort[ DISP_BUFFER_SIZE ];
|
2020-06-23 15:27:59 +08:00
|
|
|
|
short DispCnt; //Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>//
|
2020-06-22 17:49:02 +08:00
|
|
|
|
}DISP_BUFFER;
|
|
|
|
|
extern DISP_BUFFER DispBuffer;
|
|
|
|
|
|
|
|
|
|
extern char *pRealBinBits;
|
|
|
|
|
extern int RealBinWidth, RealBinHeight;
|
|
|
|
|
#ifdef _READ16BITBMP
|
|
|
|
|
extern BYTE *pRealBinAlpha;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void DrawAlpha32(
|
2020-06-23 15:27:59 +08:00
|
|
|
|
unsigned long* lpDst, // Ŀ<>껺<EFBFBD><EABBBA>
|
|
|
|
|
unsigned long iDstX, // Ŀ<><C4BF>λ<EFBFBD><CEBB>
|
|
|
|
|
unsigned long iDstY, // Ŀ<><C4BF>λ<EFBFBD><CEBB>
|
|
|
|
|
unsigned long iDstPitch, // Ŀ<>껺<EFBFBD><EABBBA><EFBFBD><EFBFBD>pitch
|
|
|
|
|
unsigned long* lpSrc, // ԭɫ<D4AD>ʻ<EFBFBD><CABB><EFBFBD>
|
|
|
|
|
unsigned long iSrcX, // ԭɫ<D4AD><C9AB>λ<EFBFBD><CEBB>
|
|
|
|
|
unsigned long iSrcY, // ԭɫ<D4AD><C9AB>λ<EFBFBD><CEBB>
|
|
|
|
|
unsigned long iSrcW, // ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD>ijߴ<C4B3>
|
|
|
|
|
unsigned long iSrcH, // ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD>ijߴ<C4B3>
|
|
|
|
|
unsigned long iSrcPitch // ԭɫ<D4AD><C9AB>pitch
|
2020-06-22 17:49:02 +08:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void ablend_565(unsigned char *lpAlpha, unsigned int iAlpPitch,
|
|
|
|
|
unsigned char *lpSrc, unsigned int iSrcX, unsigned int iSrcY,
|
|
|
|
|
unsigned int iSrcPitch, unsigned char *lpDst,
|
|
|
|
|
unsigned int iDstX, unsigned int iDstY,
|
|
|
|
|
unsigned int iDstW, unsigned int iDstH,
|
|
|
|
|
unsigned int iDstPitch);
|
|
|
|
|
extern int SurfaceBusyFlag;
|
|
|
|
|
void SortDispBuffer( void );
|
2020-06-23 15:27:59 +08:00
|
|
|
|
BOOL <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD>(ACTION* a0,short* wx,short* wy);
|
2020-06-22 17:49:02 +08:00
|
|
|
|
void PutBmp( void );
|
|
|
|
|
int StockDispBuffer( int x, int y, UCHAR prio, int bmpNo, BOOL hitFlag );
|
|
|
|
|
#ifdef _SFUMATO
|
|
|
|
|
int StockDispBuffer2( int x, int y, UCHAR dispPrio, int bmpNo, BOOL hitFlag, int sfumato/* = 0*/);
|
|
|
|
|
#else
|
|
|
|
|
int StockDispBuffer2( int x, int y, UCHAR dispPrio, int bmpNo, BOOL hitFlag );
|
|
|
|
|
#endif
|
|
|
|
|
void StockTaskDispBuffer( void );
|
|
|
|
|
void StockTaskDispBuffer2( int prio1, int prio2 );
|
|
|
|
|
void StockBoxDispBuffer( int x1, int y1, int x2, int y2, UCHAR dispPrio, int color, BOOL fill );
|
|
|
|
|
|
|
|
|
|
#endif
|