Navigation Menu

Skip to content

Commit

Permalink
libcommon|API: GL_DrawPatch() now assumes a [x:0, y:0] origin if not …
Browse files Browse the repository at this point in the history
…specified
  • Loading branch information
danij-deng committed Feb 26, 2012
1 parent d16d2c7 commit 9c70e13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doomsday/plugins/common/src/gl_drawpatch.c
Expand Up @@ -31,11 +31,11 @@ void GL_DrawPatch3(patchid_t id, const Point2Raw* origin, int alignFlags, int pa
RectRaw rect;
patchinfo_t info;

if(id == 0 || !origin || DD_GetInteger(DD_NOVIDEO) || DD_GetInteger(DD_DEDICATED)) return;
if(id == 0 || DD_GetInteger(DD_NOVIDEO) || DD_GetInteger(DD_DEDICATED)) return;
if(!R_GetPatchInfo(id, &info)) return;

rect.origin.x = origin->x;
rect.origin.y = origin->y;
rect.origin.x = origin? origin->x : 0;
rect.origin.y = origin? origin->y : 0;

if(alignFlags & ALIGN_RIGHT)
rect.origin.x -= info.geometry.size.width;
Expand Down

0 comments on commit 9c70e13

Please sign in to comment.