From 012b620caea30ea940046e7b112af05991622b32 Mon Sep 17 00:00:00 2001 From: plagman Date: Fri, 4 Mar 2011 07:04:42 +0000 Subject: [PATCH] Move hardcoded windowed resolution list to baselayer (based off winlayer ones + 1366x768). git-svn-id: https://svn.eduke32.com/eduke32@1819 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/baselayer.h | 2 ++ polymer/eduke32/build/src/baselayer.c | 8 ++++++++ polymer/eduke32/build/src/build.c | 2 +- polymer/eduke32/build/src/sdlayer.c | 6 ------ polymer/eduke32/build/src/winlayer.c | 5 ----- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/polymer/eduke32/build/include/baselayer.h b/polymer/eduke32/build/include/baselayer.h index ee3d8a9ad..5e29c59e8 100644 --- a/polymer/eduke32/build/include/baselayer.h +++ b/polymer/eduke32/build/include/baselayer.h @@ -81,6 +81,8 @@ extern char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend; extern char scantoasc[128], remap[256], key_names[256][24]; extern int32_t remapinit; +extern int32_t defaultres[][2]; + extern void SetKey(int32_t key, int32_t state); // mouse diff --git a/polymer/eduke32/build/src/baselayer.c b/polymer/eduke32/build/src/baselayer.c index 3fc0f925e..19135c063 100644 --- a/polymer/eduke32/build/src/baselayer.c +++ b/polymer/eduke32/build/src/baselayer.c @@ -47,6 +47,14 @@ char scantoasc[128] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; +int32_t defaultres[][2] = +{ + {1920,1440},{1920,1200},{1600,1200},{1366,768},{1280,1024},{1280,960}, + {1152,864},{1024,768},{1024,600},{800,600},{640,480},{640,400}, + {512,384},{480,360},{400,300},{320,240},{320,200},{0,0} +}; + + void SetKey(int32_t key, int32_t state) { keystatus[remap[key]] = state; diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index e3ac87c03..6731236f9 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -6419,7 +6419,7 @@ static int32_t menuselect(void) int32_t fillsector(int16_t sectnum, char fillcolor) { - int32_t x1, x2, y1, y2, sy, y, tempint; + int32_t x1, x2, y1, y2, sy, y; int32_t lborder, rborder, uborder, dborder, miny, maxy, dax; int16_t z, zz, startwall, endwall, fillcnt; diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 816f85bf3..3313484c9 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -794,12 +794,6 @@ void getvalidmodes(void) #endif 0 }; - static int32_t defaultres[][2] = - { - {1280,1024} - ,{1280,960},{1152,864},{1024,768},{800,600},{640,480}, - {640,400},{512,384},{480,360},{400,300},{320,240},{320,200},{0,0} - }; SDL_Rect **modes; #if (SDL_MAJOR_VERSION > 1 || SDL_MINOR_VERSION > 2) SDL_PixelFormat pf = { NULL, 8, 1, 0,0,0,0, 0,0,0,0, 0,0,0,0 }; diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index 27288b469..ab1125d25 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -1857,11 +1857,6 @@ static int32_t sortmodes(const struct validmode_t *a, const struct validmode_t * } void getvalidmodes(void) { - static int32_t defaultres[][2] = - { - {1920,1440},{1920,1200},{1600,1200},{1280,1024},{1280,960},{1152,864},{1024,768},{1024,600},{800,600},{640,480}, - {640,400},{512,384},{480,360},{400,300},{320,240},{320,200},{0,0} - }; int32_t cdepths[2] = { 8, 0 }; int32_t i, j, maxx=0, maxy=0; HRESULT result;