summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-03-16 18:20:17 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2011-03-16 19:09:12 (GMT)
commita6dabf20722250c7f4cc254eb2cbf264149306e5 (patch)
treeac6049aed20d1867b67f189fdd36af1876483c5b /src
parent02084109524239a2b57b5eb8d699bd6c1fbe1597 (diff)
downloadpowder-a6dabf20722250c7f4cc254eb2cbf264149306e5.zip
powder-a6dabf20722250c7f4cc254eb2cbf264149306e5.tar.gz
Visual Studio
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c2
-rw-r--r--src/interface.c3
-rw-r--r--src/main.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/graphics.c b/src/graphics.c
index ddb8368..fb3d384 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -2927,9 +2927,9 @@ void draw_parts(pixel *vid)
void draw_wavelengths(pixel *vid, int x, int y, int h, int wl)
{
- fillrect(vid,x-1,y-1,30+1,h+1,64,64,64,255); // coords -1 size +1 to work around bug in fillrect - TODO: fix fillrect
int i,cr,cg,cb,j;
int tmp;
+ fillrect(vid,x-1,y-1,30+1,h+1,64,64,64,255); // coords -1 size +1 to work around bug in fillrect - TODO: fix fillrect
for (i=0;i<30;i++)
{
if ((wl>>i)&1)
diff --git a/src/interface.c b/src/interface.c
index 72d7107..45cc839 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2840,11 +2840,12 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
data = http_async_req_stop(http, &status, &data_size);
if (status == 200)
{
+ pixel *full_save;
if (!data||!data_size) {
error_ui(vid_buf, 0, "Save data is empty (may be corrupt)");
break;
}
- pixel *full_save = prerender_save(data, data_size, &imgw, &imgh);
+ full_save = prerender_save(data, data_size, &imgw, &imgh);
if (full_save!=NULL) {
save_pic = rescale_img(full_save, imgw, imgh, &thumb_w, &thumb_h, 2);
data_ready = 1;
diff --git a/src/main.c b/src/main.c
index b06693c..f8ea58f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1195,7 +1195,6 @@ int main(int argc, char *argv[])
int pastFPS = 0;
int past = 0;
pixel *vid_buf=calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE);
- pers_bg = calloc((XRES+BARSIZE)*YRES, PIXELSIZE);
void *http_ver_check;
void *http_session_check = NULL;
char *ver_data=NULL, *check_data=NULL, *tmp;
@@ -1214,6 +1213,7 @@ int main(int argc, char *argv[])
int save_mode=0, save_x=0, save_y=0, save_w=0, save_h=0, copy_mode=0;
SDL_AudioSpec fmt;
int username_flash = 0, username_flash_t = 1;
+ pers_bg = calloc((XRES+BARSIZE)*YRES, PIXELSIZE);
GSPEED = 1;
/* Set 16-bit stereo audio at 22Khz */