Skip to content

Commit

Permalink
Added R_GetPatchInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 13, 2003
1 parent 60f7a48 commit b3939ef
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions doomsday/Include/doomsday.h
Expand Up @@ -152,6 +152,7 @@ void R_RenderPlayerView(ddplayer_t *player);
void R_ViewWindow(int x, int y, int w, int h);
void R_SetBorderGfx(char *lumps[9]);
void R_GetSpriteInfo(int sprite, int frame, spriteinfo_t *sprinfo);
void R_GetPatchInfo(int lump, spriteinfo_t *info);
int R_FlatNumForName(char *name);
int R_CheckTextureNumForName(char *name);
int R_TextureNumForName(char *name);
Expand Down
1 change: 1 addition & 0 deletions doomsday/Include/r_things.h
Expand Up @@ -112,6 +112,7 @@ extern vissprite_t vispsprites[DDMAXPSPRITES];
extern vissprite_t vsprsortedhead;

void R_GetSpriteInfo(int sprite, int frame, spriteinfo_t *sprinfo);
void R_GetPatchInfo(int lump, spriteinfo_t *info);
int R_VisualRadius(mobj_t *mo);
fixed_t R_GetBobOffset(mobj_t *mo);
void R_ProjectSprite(mobj_t *thing);
Expand Down
3 changes: 2 additions & 1 deletion doomsday/Src/Doomsday.def
Expand Up @@ -2,7 +2,7 @@ NAME "DOOMSDAY"
DESCRIPTION "The Doomsday Engine"

; Highest ordinal is currently
; --> 236 <--
; --> 237 <--

; Other available ordinals: 158, 175

Expand Down Expand Up @@ -147,6 +147,7 @@ EXPORTS
R_ViewWindow @92 NONAME
R_SetBorderGfx @93 NONAME
R_GetSpriteInfo @94 NONAME
R_GetPatchInfo @237 NONAME
R_FlatNumForName @95 NONAME
R_CheckTextureNumForName @96 NONAME
R_TextureNumForName @97 NONAME
Expand Down
15 changes: 15 additions & 0 deletions doomsday/Src/r_things.c
Expand Up @@ -373,6 +373,21 @@ void R_GetSpriteInfo(int sprite, int frame, spriteinfo_t *sprinfo)
sprinfo->height = sprlump->height;
}

//===========================================================================
// R_GetPatchInfo
//===========================================================================
void R_GetPatchInfo(int lump, spriteinfo_t *info)
{
patch_t *patch = W_CacheLumpNum(lump, PU_CACHE);

memset(info, 0, sizeof(*info));
info->lump = info->realLump = lump;
info->width = patch->width;
info->height = patch->height;
info->topOffset = patch->topoffset;
info->offset = patch->leftoffset;
}

//===========================================================================
// R_VisualRadius
// Returns the radius of the mobj as it would visually appear to be.
Expand Down

0 comments on commit b3939ef

Please sign in to comment.