Permalink
Browse files

Cleanup backdrop display code.

  • Loading branch information...
1 parent 9cee3b5 commit 9ef70b7b8f6cf390c3c85ce619d239fa9dcbdd91 @perim perim committed Feb 10, 2013
@@ -345,13 +345,6 @@ void iV_DrawImageScaled(IMAGEFILE *ImageFile, UWORD ID, int x, int y, int w, int
pie_DrawImage(ImageFile, ID, pieImage, &dest);
}
-/* FIXME: WTF is this supposed to do? Looks like some other functionality
- * was retrofitted onto something else. - Per */
-void pie_UploadDisplayBuffer()
-{
- screen_Upload(NULL, false);
-}
-
bool pie_InitRadar(void)
{
glGenTextures(1, &radarTexture);
@@ -80,8 +80,6 @@ extern bool pie_ShutdownRadar(void);
extern void pie_DownLoadRadar(UDWORD *buffer, int width, int height, bool filter);
extern void pie_RenderRadar(int x, int y, int width, int height);
-extern void pie_UploadDisplayBuffer(void);
-
enum SCREENTYPE
{
SCREEN_RANDOMBDROP,
@@ -57,7 +57,6 @@ static GLuint backDropTexture = 0;
static int preview_width = 0, preview_height = 0;
static Vector2i player_pos[MAX_PLAYERS];
static bool mappreview = false;
-static char mapname[256];
OPENGL_DATA opengl;
extern bool writeGameInfo(const char *pFileName); // Used to help debug issues when we have fatal errors.
@@ -428,13 +427,12 @@ void screen_Upload(const char *newBackDropBmp, bool preview)
pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON);
}
-void screen_enableMapPreview(char *name, int width, int height, Vector2i *playerpositions)
+void screen_enableMapPreview(int width, int height, Vector2i *playerpositions)
{
int i;
mappreview = true;
preview_width = width;
preview_height = height;
- sstrcpy(mapname, name);
for (i = 0; i < MAX_PLAYERS; i++)
{
player_pos[i].x = playerpositions[i].x;
@@ -445,7 +443,6 @@ void screen_enableMapPreview(char *name, int width, int height, Vector2i *player
void screen_disableMapPreview(void)
{
mappreview = false;
- sstrcpy(mapname, "none");
}
bool screen_getMapPreview(void)
View
@@ -59,7 +59,7 @@ extern int wz_texture_compression;
extern void screenDoDumpToDiskIfRequired(void);
-void screen_enableMapPreview(char *name, int width, int height, Vector2i *playerpositions);
+void screen_enableMapPreview(int width, int height, Vector2i *playerpositions);
void screen_disableMapPreview(void);
bool screen_getMapPreview(void);
void screen_EnableMissingFunctions();
View
@@ -392,8 +392,6 @@ static bool _intAddDesign(bool bShowCentreScreen)
radarOnScreen = false;
// Just display the 3d, no interface
displayWorld();
- // Upload the current display back buffer into system memory.
- pie_UploadDisplayBuffer();
radarOnScreen = radOnScreen;
bRender3DOnly = false;
}
View
@@ -5210,9 +5210,6 @@ void addIntelScreen(void)
// Just display the 3d, no interface
displayWorld();
- // Upload the current display back buffer into system memory.
- pie_UploadDisplayBuffer();
-
radarOnScreen = radOnScreen;
bRender3DOnly = false;
}
View
@@ -175,8 +175,6 @@ bool addLoadSave(LOADSAVE_MODE savemode, const char *title)
displayWorld(); // Just display the 3d, no interface
- pie_UploadDisplayBuffer(); // Upload the current display back buffer into system memory.
-
radarOnScreen = radOnScreen;
bRender3DOnly = false;
}
View
@@ -431,7 +431,7 @@ static void loadEmptyMapPreview()
Vector2i playerpos[MAX_PLAYERS];
memset(playerpos, 0x77, sizeof(playerpos));
- screen_enableMapPreview((char *)"This string is written somewhere and then ignored.", ex, ey, playerpos);
+ screen_enableMapPreview(ex, ey, playerpos);
screen_Upload(imageData, true);
free(imageData);
@@ -593,7 +593,7 @@ void loadMapPreview(bool hideInterface)
// color our texture with clancolors @ correct position
plotStructurePreview16(imageData, playerpos);
- screen_enableMapPreview(aFileName, mapWidth, mapHeight, playerpos);
+ screen_enableMapPreview(mapWidth, mapHeight, playerpos);
screen_Upload(imageData, true);

0 comments on commit 9ef70b7

Please sign in to comment.