From 1889e9151bbb2d6382e8fb10cc7897d7845009b0 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 15 Apr 2009 05:58:38 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1327 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 9 ++-- polymer/eduke32/source/gamedef.c | 3 +- polymer/eduke32/source/misc/gameres.rc | 18 ++++---- polymer/eduke32/source/premap.c | 24 +++------- polymer/eduke32/source/startwin.game.c | 62 ++++++++++++++++++++++++++ polymer/eduke32/source/startwin.game.h | 6 +-- 6 files changed, 88 insertions(+), 34 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 3e7421d08..1bfc9d5fe 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -2731,16 +2731,17 @@ static void G_MoveWeapons(void) break; case COOLEXPLOSION1__STATIC: - G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 3072, 128+(0<<8)+(255<<16),1); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 128+(0<<8)+(255<<16),1); break; case SHRINKSPARK__STATIC: G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),1); break; - - case RPG__STATIC: case FIRELASER__STATIC: - G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 32 * s->yrepeat, 255+(80<<8),2); + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),2); + break; + case RPG__STATIC: + G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),2); if (DynamicTileMap[s->picnum] == RPG__STATIC && ActorExtra[i].picnum != BOSS2 && s->xrepeat >= 10 && sector[s->sectnum].lotag != 2) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 3fd6f8e6a..613dbd8d9 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -5108,7 +5108,7 @@ repeatcase: struct stat st; int32_t fullscreen = ud.config.ScreenMode; int32_t xdim = ud.config.ScreenWidth, ydim = ud.config.ScreenHeight, bpp = ud.config.ScreenBPP; - int32_t usemouse = ud.config.UseMouse, usejoy = ud.config.UseJoystick; + int32_t usemouse = ud.config.UseMouse, usejoy = ud.config.UseJoystick, glrm = glrendmode; if (stat(mod_dir, &st) < 0) { @@ -5150,6 +5150,7 @@ repeatcase: ud.config.ScreenBPP = bpp; ud.config.UseMouse = usemouse; ud.config.UseJoystick = usejoy; + glrendmode = glrm; } } return 0; diff --git a/polymer/eduke32/source/misc/gameres.rc b/polymer/eduke32/source/misc/gameres.rc index 538d3ff3e..1c4055c4b 100644 --- a/polymer/eduke32/source/misc/gameres.rc +++ b/polymer/eduke32/source/misc/gameres.rc @@ -22,17 +22,19 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD CAPTION "Dialog" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "&Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 8, 50, 8 - CONTROL "", IDCVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 6, 80, 56 - CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 148, 8, 46, 10 - CONTROL "&Polymer", IDCPOLYMER, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 197, 8, 40, 10 + CONTROL "&Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 6, 50, 8 + CONTROL "", IDCVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 4, 86, 56 + CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 154, 6, 46, 10 + CONTROL "&Polymer", IDCPOLYMER, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 203, 6, 40, 10 - CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 22, 50, 8 + CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 20, 50, 8 +#if 0 CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 22, 49, 8 CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 22, 49, 8 - - CONTROL "&Game:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 35, 100, 8 - CONTROL "", IDCDATA, "LISTBOX", LBS_NOINTEGRALHEIGHT | LBS_USETABSTOPS | LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 45, 226, 43 +#endif + CONTROL "", IDCINPUT, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 19, 86, 56 + CONTROL "&Game:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 35, 100, 8 + CONTROL "", IDCDATA, "LISTBOX", LBS_NOINTEGRALHEIGHT | LBS_USETABSTOPS | LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 45, 226, 43 CONTROL "Custom game content &directory:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 90, 160, 8 CONTROL "", IDCGAMEDIR, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 10, 99, 226, 156 diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index f2d9b11b1..878fdbaa2 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -370,25 +370,13 @@ static void G_DoLoadScreen(char *statustext, int32_t percent) } if (statustext) gametext(160,180,statustext,0,2+8+16); - /* j = usehightile; - usehightile = 0; - rotatesprite(34<<16,144<<16,65536,0,LASERLINE,0,0,2+8+16,0,0,scale(scale(xdim-1,288,320),percent,100),ydim-1); - rotatesprite(154<<16,144<<16,65536,0,LASERLINE,0,0,2+8+16,0,0,scale(scale(xdim-1,288,320),percent,100),ydim-1); - usehightile = j; */ { - int32_t ii = scale(288,percent,100); - int32_t x = 32; - /* - j = usehightile; - usehightile = 0; - */ - do - { - rotatesprite(x<<16,140<<16,49152,0,NOTCHON,0,2,2+8+16,0,0,xdim-1,ydim-1); - x++; - } - while (x < ii); - /* usehightile = j;*/ + int32_t ii = scale(scale(xdim-1,288,320),percent,100); + + rotatesprite(31<<16,145<<16,65536,0,929,15,0,2+8+16,0,0,ii,ydim-1); + rotatesprite(159<<16,145<<16,65536,0,929,15,0,2+8+16,0,0,ii,ydim-1); + rotatesprite(30<<16,144<<16,65536,0,929,0,0,2+8+16,0,0,ii,ydim-1); + rotatesprite(158<<16,144<<16,65536,0,929,0,0,2+8+16,0,0,ii,ydim-1); } X_OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1); nextpage(); diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index 61396c700..f50c0faa7 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -79,6 +79,11 @@ extern char TEXCACHEFILE[]; extern int32_t g_noSetup; +#define INPUT_KB 0 +#define INPUT_MOUSE 1 +#define INPUT_JOYSTICK 2 +#define INPUT_ALL 3 + static void PopulateForm(int32_t pgs) { HWND hwnd; @@ -158,8 +163,31 @@ static void PopulateForm(int32_t pgs) Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCAUTOLOAD), (!(settings.flags & 4) ? BST_CHECKED : BST_UNCHECKED)); +/* Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), (settings.usemouse ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), (settings.usejoy ? BST_CHECKED : BST_UNCHECKED)); +*/ + + { + char *s[] = { "Keyboard only", "Keyboard and mouse", "Keyboard and joystick", "All devices" }; + + hwnd = GetDlgItem(pages[TAB_CONFIG], IDCINPUT); + + (void)ComboBox_ResetContent(hwnd); + j = ComboBox_AddString(hwnd, s[INPUT_KB]); + (void)ComboBox_SetItemData(hwnd, j, INPUT_KB); + (void)ComboBox_SetCurSel(hwnd, j); + for (i=1;i<4;i++) + { + j = ComboBox_AddString(hwnd, s[i]); + (void)ComboBox_SetItemData(hwnd, j, i); + if ((settings.usemouse && !settings.usejoy && i == INPUT_MOUSE) || + (!settings.usemouse && settings.usejoy && i == INPUT_JOYSTICK) || + (settings.usemouse && settings.usejoy && i == INPUT_ALL)) + (void)ComboBox_SetCurSel(hwnd, j); + } + } + } if (pgs & POPULATE_GAME) @@ -245,12 +273,43 @@ static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L settings.flags &= ~4; else settings.flags |= 4; return TRUE; +/* case IDCINPUTMOUSE: settings.usemouse = IsDlgButtonChecked(hwndDlg, IDCINPUTMOUSE) == BST_CHECKED; return TRUE; case IDCINPUTJOY: settings.usejoy = IsDlgButtonChecked(hwndDlg, IDCINPUTJOY) == BST_CHECKED; return TRUE; +*/ + case IDCINPUT: + if (HIWORD(wParam) == CBN_SELCHANGE) + { + int32_t i; + i = ComboBox_GetCurSel((HWND)lParam); + if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i); + if (i != CB_ERR) + { + switch (i) + { + case 0: + settings.usemouse = settings.usejoy = 0; + break; + case 1: + settings.usemouse = 1; + settings.usejoy = 0; + break; + case 2: + settings.usemouse = 0; + settings.usejoy = 1; + break; + case 3: + settings.usemouse = settings.usejoy = 1; + break; + } + } + } + return TRUE; + case IDCGAMEDIR: if (HIWORD(wParam) == CBN_SELCHANGE) { @@ -320,8 +379,11 @@ static void EnableConfig(int32_t n) EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCPOLYMER), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCVMODE), n); +/* EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), n); +*/ + EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUT), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCDATA), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCGAMEDIR), n); diff --git a/polymer/eduke32/source/startwin.game.h b/polymer/eduke32/source/startwin.game.h index 125f3fbc6..522d2605c 100644 --- a/polymer/eduke32/source/startwin.game.h +++ b/polymer/eduke32/source/startwin.game.h @@ -17,11 +17,11 @@ #define IDCSOUNDDRV 102 #define IDCMIDIDEV 103 #define IDCCDADEV 104 -#define IDCINPUTMOUSE 105 -#define IDCINPUTJOY 106 +// #define IDCINPUTMOUSE 105 +// #define IDCINPUTJOY 106 #define IDCALWAYSSHOW 107 #define IDCDATA 108 #define IDCGAMEDIR 109 #define IDCPOLYMER 110 #define IDCAUTOLOAD 111 - +#define IDCINPUT 112