- Merged Source Code from MP branch Revision 3021

. clip surface coordinates before blitting
. track surface data pointer, to identify the surface's clip rectangle
. editor : test if item index is smaller than the number of items 
. other minor updates
. update png loader to work with new appdata.xml structure
. VFS updates
. fix radar maps : write to <userprofile>\RADARMAPS

* New Map Editor Release (Build: 3023)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3023 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-06-19 15:19:49 +00:00
parent 1d3313182d
commit 46cd01e366
21 changed files with 639 additions and 263 deletions
+26 -1
View File
@@ -11,6 +11,32 @@ extern "C" {
#endif
*/
class ClipRectangle
{
public:
enum ClipType
{
NoClip, PartialClip, FullClip,
};
public:
ClipRectangle();
void SetRect(SGPRect const& rect);
void SetRect(unsigned int w, unsigned int h, int x=0, int y=0);
void Set(int x1, int y1, int x2, int y2);
/**
* @returns:
* NoClip : value references are not modified
* FullClip : value references are not modified, as the values lie completely outside. Why bother doing the extra work.
* PartialClip : value references are modified
*/
ClipType Clip(int& x, int& y, unsigned int& w, unsigned int& h);
ClipType Clip(int& x1, int& y1, int& x2, int& y2);
private:
SGPRect cr;
};
extern SGPRect ClippingRect;
extern UINT32 guiTranslucentMask;
extern UINT16 White16BPPPalette[ 256 ];
@@ -18,7 +44,6 @@ extern UINT16 White16BPPPalette[ 256 ];
extern void SetClippingRect(SGPRect *clip);
void GetClippingRect(SGPRect *clip);
BOOLEAN BltIsClipped(HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
CHAR8 BltIsClippedOrOffScreen( HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion );