From 99c1dddf65bcff20d744dfd82a0f1091037425d8 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 12 Mar 2010 23:28:10 +0000 Subject: [PATCH] Ups entering of sprite extra in 3d mode from 1024 to 65536. Also a toy for tinkering with tints in mapster. git-svn-id: https://svn.eduke32.com/eduke32@1613 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 43 +++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 33fbe51d8..1f083bf14 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -4837,7 +4837,7 @@ static void Keys3d(void) case SEARCH_SPRITE: // strcpy(buffer,"Sprite extra: "); // sprite[searchwall].extra = getnumber256(buffer,(int32_t)sprite[searchwall].extra,65536L,1); - getnumberptr256("Sprite extra: ",&sprite[searchwall].extra,sizeof(sprite[searchwall].extra),1024,1,NULL); + getnumberptr256("Sprite extra: ",&sprite[searchwall].extra,sizeof(sprite[searchwall].extra),65536,1,NULL); break; } asksave = 1; @@ -8539,6 +8539,44 @@ static int32_t osdcmd_vars_pk(const osdfuncparm_t *parm) return OSDCMD_OK; } +#ifdef POLYMOST +static int32_t osdcmd_tint(const osdfuncparm_t *parm) +{ + int32_t i; + palette_t *p; + + if (parm->numparms==1) + { + i = atoi(parm->parms[0]); + if (i>=0 && ir, p->g, p->b, p->f); + } + } + else if (parm->numparms==0) + { + OSD_Printf("Hightile tintings:\n"); + for (i=0,p=&hictinting[0]; ir, p->g, p->b, p->f); + } + else if (parm->numparms>=2) + { + i = atoi(parm->parms[0]); + if (i<0 || i>=MAXPALOOKUPS-RESERVEDPALS) + return OSDCMD_SHOWHELP; + + p = &hictinting[i]; + p->r = atoi(parm->parms[1]); + p->g = (parm->numparms>=3) ? atoi(parm->parms[2]) : 255; + p->b = (parm->numparms>=4) ? atoi(parm->parms[3]) : 255; + p->f = (parm->numparms>=5) ? atoi(parm->parms[4])&HICEFFECTMASK : 0; + } + return OSDCMD_OK; +} +#endif + // M32 script vvv static int32_t osdcmd_include(const osdfuncparm_t *parm) { @@ -8710,6 +8748,9 @@ static int32_t registerosdcommands(void) OSD_RegisterFunction("pk_quickmapcycling", "pk_quickmapcycling: allows cycling of maps with (Shift-)Ctrl-X", osdcmd_vars_pk); OSD_RegisterFunction("testplay_addparam", "testplay_addparam \"string\": set additional parameters for test playing", osdcmd_testplay_addparam); OSD_RegisterFunction("showheightindicators", "showheightindicators [012]: toggles height indicators in 2D mode", osdcmd_showheightindicators); +#ifdef POLYMOST + OSD_RegisterFunction("tint", "tint : queries or sets hightile tinting", osdcmd_tint); +#endif // M32 script OSD_RegisterFunction("include", "include : compiles one or more M32 script files", osdcmd_include);