aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo/prim.c
diff options
context:
space:
mode:
authornotaz2011-03-01 02:19:58 +0200
committernotaz2011-03-01 17:35:19 +0200
commite429fc6073077795431d8fecf18eab4c0c9218b3 (patch)
treefe8bdb64b3172640e268fcbe45f5ab0dfd547752 /plugins/dfxvideo/prim.c
parentfc42805bfb38d33e23b4eddb115cf9ab88a4345a (diff)
downloadpcsx_rearmed-e429fc6073077795431d8fecf18eab4c0c9218b3.tar.gz
pcsx_rearmed-e429fc6073077795431d8fecf18eab4c0c9218b3.tar.bz2
pcsx_rearmed-e429fc6073077795431d8fecf18eab4c0c9218b3.zip
dfxvideo: avoid division like plague
Diffstat (limited to 'plugins/dfxvideo/prim.c')
-rw-r--r--plugins/dfxvideo/prim.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/dfxvideo/prim.c b/plugins/dfxvideo/prim.c
index b36d556..cc98a8a 100644
--- a/plugins/dfxvideo/prim.c
+++ b/plugins/dfxvideo/prim.c
@@ -375,6 +375,7 @@ static void cmdTextureWindow(unsigned char *baseAddr)
TWin.Position.y1 = 128; // 10000
else
TWin.Position.y1 = 256; // 00000
+ TWin.ymask = TWin.Position.y1 - 1;
// Texture window size is determined by the least bit set of the relevant 5 bits
@@ -390,6 +391,7 @@ static void cmdTextureWindow(unsigned char *baseAddr)
TWin.Position.x1 = 128; // 10000
else
TWin.Position.x1 = 256; // 00000
+ TWin.xmask = TWin.Position.x1 - 1;
// Re-calculate the bit field, because we can't trust what is passed in the data