Add "aborted" messages for special function menu options

git-svn-id: https://svn.eduke32.com/eduke32@227 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-07-20 20:52:18 +00:00
parent f752e9a873
commit 17f698c991

View file

@ -40,7 +40,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
#include "types.h" #include "types.h"
#include "keyboard.h" #include "keyboard.h"
#define VERSION " 1.0.5" #define VERSION " 1.0.6"
short floor_over_floor; short floor_over_floor;
@ -5557,7 +5557,7 @@ void FuncMenu(void)
if(sprite[j].picnum == i) if(sprite[j].picnum == i)
deletesprite(j); deletesprite(j);
printmessage16("Sprites deleted."); printmessage16("Sprites deleted.");
} } else printmessage16("Aborted");
} }
} }
else if (row == 2) else if (row == 2)
@ -5565,14 +5565,12 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Global sky shade"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Global sky shade"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
signed char shade; j=getnumber16("Global sky shade: ",0,127,1);
shade=getnumber16("Global sky shade: ",0,128,1);
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
{ {
if(sector[i].ceilingstat&1) if(sector[i].ceilingstat&1)
sector[i].ceilingshade = shade; sector[i].ceilingshade = j;
} }
printmessage16("Parallaxed skies adjusted"); printmessage16("Parallaxed skies adjusted");
} }
@ -5582,15 +5580,16 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Global sky height"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Global sky height"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
long height; j=getnumber16("Global sky height: ",0,16777216,1);
if(j != 0)
height=getnumber16("Global sky height: ",0,16777216,1); {
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
{ {
if(sector[i].ceilingstat&1) if(sector[i].ceilingstat&1)
sector[i].ceilingz = height; sector[i].ceilingz = j;
} }
printmessage16("Parallaxed skies adjusted"); printmessage16("Parallaxed skies adjusted");
} else printmessage16("Aborted");
} }
} }
else if (row == 4) else if (row == 4)
@ -5598,18 +5597,18 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Global Z coord shift"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Global Z coord shift"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
long scale; j=getnumber16("Z offset: ",0,16777216,1);
if(j!=0)
scale=getnumber16("Z offset: ",0,16777216,1); {
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
{ {
sector[i].ceilingz += scale; sector[i].ceilingz += j;
sector[i].floorz += scale; sector[i].floorz += j;
} }
for(i=0;i<MAXSPRITES;i++) for(i=0;i<MAXSPRITES;i++)
sprite[i].z += scale; sprite[i].z += j;
printmessage16("Map adjusted"); printmessage16("Map adjusted");
} else printmessage16("Aborted");
} }
} }
else if (row == 5) else if (row == 5)
@ -5617,29 +5616,30 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Scale map up"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Scale map up"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
signed char scale; j=getnumber16("Map size multiplier: ",1,8,0);
if(j!=1)
scale=getnumber16("Map size multiplier: ",1,8,0); {
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
{ {
sector[i].ceilingz *= scale; sector[i].ceilingz *= j;
sector[i].floorz *= scale; sector[i].floorz *= j;
} }
for(i=0;i<numwalls;i++) for(i=0;i<numwalls;i++)
{ {
wall[i].x *= scale; wall[i].x *= j;
wall[i].y *= scale; wall[i].y *= j;
wall[i].yrepeat = min(wall[i].yrepeat/scale,255); wall[i].yrepeat = min(wall[i].yrepeat/j,255);
} }
for(i=0;i<MAXSPRITES;i++) for(i=0;i<MAXSPRITES;i++)
{ {
sprite[i].x *= scale; sprite[i].x *= j;
sprite[i].y *= scale; sprite[i].y *= j;
sprite[i].z *= scale; sprite[i].z *= j;
sprite[i].xrepeat = max(sprite[i].xrepeat*scale,1); sprite[i].xrepeat = max(sprite[i].xrepeat*j,1);
sprite[i].yrepeat = max(sprite[i].yrepeat*scale,1); sprite[i].yrepeat = max(sprite[i].yrepeat*j,1);
} }
printmessage16("Map scaled"); printmessage16("Map scaled");
} else printmessage16("Aborted");
} }
} }
else if (row == 6) else if (row == 6)
@ -5647,29 +5647,30 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Scale map down"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Scale map down"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
signed char scale; j=getnumber16("Map size divisor: ",1,8,0);
if(j!=1)
scale=getnumber16("Map size divisor: ",1,8,0); {
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
{ {
sector[i].ceilingz /= scale; sector[i].ceilingz /= j;
sector[i].floorz /= scale; sector[i].floorz /= j;
} }
for(i=0;i<numwalls;i++) for(i=0;i<numwalls;i++)
{ {
wall[i].x /= scale; wall[i].x /= j;
wall[i].y /= scale; wall[i].y /= j;
wall[i].yrepeat = min(wall[i].yrepeat*scale,255); wall[i].yrepeat = min(wall[i].yrepeat*j,255);
} }
for(i=0;i<MAXSPRITES;i++) for(i=0;i<MAXSPRITES;i++)
{ {
sprite[i].x /= scale; sprite[i].x /= j;
sprite[i].y /= scale; sprite[i].y /= j;
sprite[i].z /= scale; sprite[i].z /= j;
sprite[i].xrepeat = max(sprite[i].xrepeat/scale,1); sprite[i].xrepeat = max(sprite[i].xrepeat/j,1);
sprite[i].yrepeat = max(sprite[i].yrepeat/scale,1); sprite[i].yrepeat = max(sprite[i].yrepeat/j,1);
} }
printmessage16("Map scaled"); printmessage16("Map scaled");
} else printmessage16("Aborted");
} }
} }
else if (row == 7) else if (row == 7)
@ -5677,19 +5678,20 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Global shade divide"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Global shade divide"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
signed char shade; j=getnumber16("Shade divisor: ",1,127,1);
if(j!=1)
shade=getnumber16("Shade divisor: ",1,127,1); {
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
{ {
sector[i].ceilingshade /= shade; sector[i].ceilingshade /= j;
sector[i].floorshade /= shade; sector[i].floorshade /= j;
} }
for(i=0;i<numwalls;i++) for(i=0;i<numwalls;i++)
wall[i].shade /= shade; wall[i].shade /= j;
for(i=0;i<MAXSPRITES;i++) for(i=0;i<MAXSPRITES;i++)
sprite[i].shade /= shade; sprite[i].shade /= j;
printmessage16("Shades adjusted"); printmessage16("Shades adjusted");
} else printmessage16("Aborted");
} }
} }
break; break;
@ -5699,12 +5701,13 @@ void FuncMenu(void)
for (i=Bsprintf(disptext,"Global vis divide"); i < dispwidth; i++) disptext[i] = ' '; for (i=Bsprintf(disptext,"Global vis divide"); i < dispwidth; i++) disptext[i] = ' ';
if (editval) if (editval)
{ {
signed char vis; j=getnumber16("Visibility divisor: ",1,127,0);
if(j!=1)
vis=getnumber16("Visibility divisor: ",1,127,0); {
for(i=0;i<numsectors;i++) for(i=0;i<numsectors;i++)
sector[i].visibility /= vis; sector[i].visibility /= j;
printmessage16("Visibility adjusted"); printmessage16("Visibility adjusted");
} else printmessage16("Aborted");
} }
} }
break; break;