Search
lxdream.org :: lxdream/src/pvr2/pvr2.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.h
changeset 337:cdd757aa8e8c
prev335:fb890e1814c0
next338:8c68d9097846
author nkeynes
date Sun Jan 28 11:36:00 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Invalidate palette textures when the palette changes (fixes a few texture
bugs)
Fix odd/even selection in pvr2_display_frame
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.h Sat Jan 27 12:03:53 2007 +0000
1.2 +++ b/src/pvr2/pvr2.h Sun Jan 28 11:36:00 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.h,v 1.31 2007-01-27 12:03:53 nkeynes Exp $
1.6 + * $Id: pvr2.h,v 1.32 2007-01-28 11:36:00 nkeynes Exp $
1.7 *
1.8 * PVR2 (video chip) functions and macros.
1.9 *
1.10 @@ -84,6 +84,12 @@
1.11 #define PVR2_POLY_MODE_CLAMP_S 0x00010000
1.12 #define PVR2_POLY_MODE_CLAMP_T 0x00008000
1.13
1.14 +#define PVR2_POLY_FOG_LOOKUP 0x00000000
1.15 +#define PVR2_POLY_FOG_VERTEX 0x00400000
1.16 +#define PVR2_POLY_FOG_DISABLED 0x00800000
1.17 +#define PVR2_POLY_FOG_LOOKUP2 0x00C00000
1.18 +
1.19 +
1.20 #define PVR2_TEX_FORMAT_ARGB1555 0x00000000
1.21 #define PVR2_TEX_FORMAT_RGB565 0x08000000
1.22 #define PVR2_TEX_FORMAT_ARGB4444 0x10000000
1.23 @@ -97,6 +103,8 @@
1.24 #define PVR2_TEX_FORMAT_MASK 0x38000000
1.25 #define PVR2_TEX_UNTWIDDLED 0x04000000
1.26 #define PVR2_TEX_STRIDE 0x02000000
1.27 +#define PVR2_TEX_IS_PALETTE(mode) ( (mode & PVR2_TEX_FORMAT_MASK) == PVR2_TEX_FORMAT_IDX4 || (mode&PVR2_TEX_FORMAT_MASK) == PVR2_TEX_FORMAT_IDX8 )
1.28 +
1.29
1.30 #define PVR2_TEX_ADDR(x) ( ((x)&0x01FFFFF)<<3 );
1.31 #define PVR2_TEX_IS_MIPMAPPED(x) ( (x) & PVR2_TEX_MIPMAP )
1.32 @@ -337,6 +345,7 @@
1.33 #define POLY2_DEST_BLEND(poly2) ( pvr2_poly_dstblend[((poly2)>>26)&0x07] )
1.34 #define POLY2_SRC_BLEND_TARGET(poly2) ((poly2)&0x02000000)
1.35 #define POLY2_DEST_BLEND_TARGET(poly2) ((poly2)&0x01000000)
1.36 +#define POLY2_FOG_MODE(poly2) ((poly2)&0x00C00000)
1.37 #define POLY2_COLOUR_CLAMP_ENABLE(poly2) ((poly2)&0x00200000)
1.38 #define POLY2_ALPHA_ENABLE(poly2) ((poly2)&0x00100000)
1.39 #define POLY2_TEX_ALPHA_ENABLE(poly2) (((poly2)&0x00080000) == 0 )
.