Skip to content

Commit

Permalink
Give R_RegisterPic2() more descriptive name.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet committed Oct 28, 2023
1 parent 98d51fd commit 3538367
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion inc/refresh/refresh.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void R_SetSky(const char *name, float rotate, bool autorotate, const vec3_t a
void R_EndRegistration(void);

#define R_RegisterPic(name) R_RegisterImage(name, IT_PIC, IF_PERMANENT)
#define R_RegisterPic2(name) R_RegisterImage(name, IT_PIC, IF_NONE)
#define R_RegisterTempPic(name) R_RegisterImage(name, IT_PIC, IF_NONE)
#define R_RegisterFont(name) R_RegisterImage(name, IT_FONT, IF_PERMANENT)
#define R_RegisterSkin(name) R_RegisterImage(name, IT_SKIN, IF_NONE)
#define R_RegisterSprite(name) R_RegisterImage(name, IT_SPRITE, IF_NONE)
Expand Down
4 changes: 2 additions & 2 deletions src/client/cin.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ void SCR_ReloadCinematic(void)
if (cin.pic) {
R_UpdateRawPic(cin.width, cin.height, cin.pic);
} else if (cl.mapname[0]) {
cin.static_pic = R_RegisterPic2(cl.mapname);
cin.static_pic = R_RegisterTempPic(cl.mapname);
R_GetPicSize(&cin.width, &cin.height, cin.static_pic);
}
}
Expand All @@ -460,7 +460,7 @@ void SCR_PlayCinematic(const char *name)
OGG_Stop();

if (!COM_CompareExtension(name, ".pcx")) {
cin.static_pic = R_RegisterPic2(name);
cin.static_pic = R_RegisterTempPic(name);
if (!cin.static_pic)
goto finish;
R_GetPicSize(&cin.width, &cin.height, cin.static_pic);
Expand Down
4 changes: 2 additions & 2 deletions src/client/precache.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void CL_LoadClientinfo(clientinfo_t *ci, const char *s)
// icon file
Q_concat(icon_filename, sizeof(icon_filename),
"/players/", model_name, "/", skin_name, "_i.pcx");
ci->icon = R_RegisterPic2(icon_filename);
ci->icon = R_RegisterTempPic(icon_filename);

strcpy(ci->model_name, model_name);
strcpy(ci->skin_name, skin_name);
Expand Down Expand Up @@ -334,7 +334,7 @@ static qhandle_t CL_RegisterImage(const char *s)
return R_RegisterSkin(s);
}

return R_RegisterPic2(s);
return R_RegisterTempPic(s);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/client/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ static void SCR_ExecuteLayoutString(const char *s)
if (!strcmp(token, "picn")) {
// draw a pic from a name
token = COM_Parse(&s);
R_DrawPic(x, y, R_RegisterPic2(token));
R_DrawPic(x, y, R_RegisterTempPic(token));
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static void Com_TestImages_f(void)
R_EndRegistration();
R_BeginRegistration(NULL);
}
if (!R_RegisterPic2(va("/%s", (char *)list[i]))) {
if (!R_RegisterTempPic(va("/%s", (char *)list[i]))) {
errors++;
continue;
}
Expand Down

0 comments on commit 3538367

Please sign in to comment.