Skip to content

Commit

Permalink
Enable 1024x768 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Jul 3, 2013
1 parent 8769796 commit d137d06
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/cdogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ void *MakeBkg(void)
SetupMission(0, 1, &gCampaign);
SetupMap();
SetDstScreen(bkg);
SetBuffer(512, 384, buffer, X_TILES);
SetBuffer(1024, 768, buffer, X_TILES);
FixBuffer(buffer, 255);
DrawBuffer(buffer, 0);
CFREE(buffer);
Expand Down
3 changes: 0 additions & 3 deletions src/cdogs/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ SetBuffer(int x_origin, int y_origin, struct Buffer *buffer, int width)
int x, y;
TTile *bufTile;

//memset(buffer, 0, sizeof(struct Buffer));
ClearBuffer(buffer);

buffer->width = width;

buffer->xTop = x_origin - TILE_WIDTH * width / 2;
Expand Down
3 changes: 2 additions & 1 deletion src/cdogs/grafx.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ GFX_Mode gfx_modelist[] = {
{ 400, 300 },
{ 640, 480 },
{ 800, 600 }, /* things go strange above this... */
{ 1024, 768 },
{ 0, 0 },
};
#define MODE_MAX 3
#define MODE_MAX 4


static int mode_idx = 1;
Expand Down
15 changes: 0 additions & 15 deletions src/cdogs/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,6 @@ struct Buffer * NewBuffer(void)
return b;
}

void ClearBuffer(struct Buffer *b)
{
if (!b) {
printf("!!! Buffer nonexistent?\n");
return;
}

// TTile *tmp = b->tiles;

// memset(b, 0, sizeof(struct Buffer));
// memset(tmp, 0, sizeof(TTile) * X_TILES * Y_TILES);

// b->tiles = tmp;
}

static void AddItemToTile(TTileItem * t, TTile * tile)
{
t->next = tile->things;
Expand Down
5 changes: 2 additions & 3 deletions src/cdogs/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#ifndef __MAP
#define __MAP

#define YMAX 64
#define XMAX 64
#define YMAX 128
#define XMAX 128

#define TILE_WIDTH 16
#define TILE_HEIGHT 12
Expand Down Expand Up @@ -92,7 +92,6 @@ struct Buffer {
};

struct Buffer * NewBuffer(void);
void ClearBuffer(struct Buffer *b);

extern TTile gMap[YMAX][XMAX];
#define Map( x, y) gMap[y][x]
Expand Down

0 comments on commit d137d06

Please sign in to comment.