DXGL r599 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r598
|
r599
|
r600
>
Date:
01:29, 23 February 2015
Author:
admin
Status:
new
Tags:
Comment:
Fix drawing non-indexed primitives.
Modified paths:
/ddraw/glRenderer.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glRenderer.cpp
—
—
@@ -958,6 +958,7 @@
959
959
float tmpfloats[16];
960
960
RECT *r1;
961
961
RECT *r2;
962
+ WORD *indexptr;
962
963
DDBLTFX *fxptr;
963
964
glRenderer__InitGL(This, (DWORD)This->inputs[0], (DWORD)This->inputs[1], (DWORD)This->inputs[2],
964
965
(BOOL)This->inputs[3],(DWORD)This->inputs[4], (HWND)This->inputs[5], (glDirectDraw7*)This->inputs[6]);
—
—
@@ -1084,10 +1085,11 @@
1085
1086
break;
1086
1087
case OP_DRAWPRIMITIVES:
1087
1088
if (This->queue[This->queue_read + 1] < 16) break;
1089
+ if (!This->queue[This->queue_read + 15 + (This->queue[This->queue_read + 14] / 4)]) indexptr = NULL;
1090
+ else indexptr = (WORD*)&This->queue[This->queue_read + 16 + (This->queue[This->queue_read + 14] / 4)];
1088
1091
glRenderer__DrawPrimitives(This, (glDirect3DDevice7*)This->queue[This->queue_read + 3], (GLenum)This->queue[This->queue_read+5],
1089
1092
(DWORD)This->queue[This->queue_read + 7], (BYTE*)&This->queue[This->queue_read+15], (DWORD)This->queue[This->queue_read + 9],
1090
- (DWORD)This->queue[This->queue_read + 11], (LPWORD)&This->queue[This->queue_read + 16+(This->queue[This->queue_read+14]/4)],
1091
- (DWORD)This->queue[This->queue_read + 13], 0);
1093
+ (DWORD)This->queue[This->queue_read + 11], indexptr, (DWORD)This->queue[This->queue_read + 13], 0);
1092
1094
break;
1093
1095
case OP_DELETEFBO:
1094
1096
if (This->queue[This->queue_read + 1] != 4) break;
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version