This commit is contained in:
Christoph Oelckers 2020-10-19 00:04:02 +02:00
parent 7f7a576961
commit a23839b8e8
3 changed files with 73 additions and 69 deletions

View file

@ -34,4 +34,77 @@ void showVictoryScreen()
//game.changeScreen(gVictoryScreen);
}
#if 0
void orbpic(PLAYER& plr, int currentorb) {
if (plr.orbammo[currentorb] < 0)
plr.orbammo[currentorb] = 0;
#pragma message("fix orbpic")
#if 0
itoa(plr->orbammo[currentorb],tempbuf,10);
int y = 382;// was 389 originally.
if (currentorb == 2)
y = 381;
if (currentorb == 3)
y = 383;
if (currentorb == 6)
y = 383;
if (currentorb == 7)
y = 380;
int spellbookpage = sspellbookanim[currentorb][8].daweaponframe;
overwritesprite(121 << 1, y, spellbookpage, 0, 0, 0);
fancyfont(126<<1,439,SSCOREFONT-26,tempbuf,0);
#endif
}
void potionpic(PLAYER& plr, int currentpotion, int x, int y, int scale) {
int tilenum = SFLASKBLUE;
if( netgame )
return;
#pragma message("fix potionpic")
#if 0
x = x + mulscale(200, scale, 16);
y = y - mulscale(94, scale, 16);
engine.rotatesprite(x<<16,y<<16,scale,0,SPOTIONBACKPIC,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
engine.rotatesprite((x - mulscale(4, scale, 16))<<16,(y - mulscale(7, scale, 16))<<16,scale,0,SPOTIONARROW+currentpotion,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
x += mulscale(4, scale, 16);
for(int i = 0; i < MAXPOTIONS; i++) {
if(plr.potion[i] < 0)
plr.potion[i] = 0;
if(plr.potion[i] > 0) {
switch(i) {
case 1:
tilenum=SFLASKGREEN;
break;
case 2:
tilenum=SFLASKOCHRE;
break;
case 3:
tilenum=SFLASKRED;
break;
case 4:
tilenum=SFLASKTAN;
break;
}
potiontilenum=tilenum;
engine.rotatesprite((x + mulscale(i*20, scale, 16))<<16,(y + mulscale(19, scale, 16))<<16,scale,0,potiontilenum,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
char potionbuf[50];
Bitoa(plr.potion[i],potionbuf);
fancyfont((266<<1)+(i*20),394,SPOTIONFONT-26,potionbuf,0);
//game.getFont(3).drawText(x + mulscale(7 +(i*20), scale, 16),y+mulscale(7, scale, 16), potionbuf, scale, 0, 0, TextAlign.Left, 0, false);
}
else
engine.rotatesprite((x + mulscale(i*20, scale, 16))<<16,(y + mulscale(19, scale, 16))<<16,scale,0,SFLASKBLACK,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
}
#endif
}
#endif
END_WH_NS

View file

@ -130,51 +130,6 @@ void updatepotion(PLAYER& plr, int vial) {
}
}
void potionpic(PLAYER& plr, int currentpotion, int x, int y, int scale) {
int tilenum = SFLASKBLUE;
if( netgame )
return;
#pragma message("fix potionpic")
#if 0
x = x + mulscale(200, scale, 16);
y = y - mulscale(94, scale, 16);
engine.rotatesprite(x<<16,y<<16,scale,0,SPOTIONBACKPIC,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
engine.rotatesprite((x - mulscale(4, scale, 16))<<16,(y - mulscale(7, scale, 16))<<16,scale,0,SPOTIONARROW+currentpotion,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
x += mulscale(4, scale, 16);
for(int i = 0; i < MAXPOTIONS; i++) {
if(plr.potion[i] < 0)
plr.potion[i] = 0;
if(plr.potion[i] > 0) {
switch(i) {
case 1:
tilenum=SFLASKGREEN;
break;
case 2:
tilenum=SFLASKOCHRE;
break;
case 3:
tilenum=SFLASKRED;
break;
case 4:
tilenum=SFLASKTAN;
break;
}
potiontilenum=tilenum;
engine.rotatesprite((x + mulscale(i*20, scale, 16))<<16,(y + mulscale(19, scale, 16))<<16,scale,0,potiontilenum,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
char potionbuf[50];
Bitoa(plr.potion[i],potionbuf);
game.getFont(3).drawText(x + mulscale(7 +(i*20), scale, 16),y+mulscale(7, scale, 16), potionbuf, scale, 0, 0, TextAlign.Left, 0, false);
}
else
engine.rotatesprite((x + mulscale(i*20, scale, 16))<<16,(y + mulscale(19, scale, 16))<<16,scale,0,SFLASKBLACK,0, 0, 8 | 16, 0, 0, xdim, ydim-1);
}
#endif
}
void randompotion(int i) {
if ((krand() % 100) > 20)
return;

View file

@ -454,28 +454,4 @@ void displayspelltext(PLAYER& plr) {
}
}
void orbpic(PLAYER& plr, int currentorb) {
if (plr.orbammo[currentorb] < 0)
plr.orbammo[currentorb] = 0;
#pragma message("fix orbpic")
#if 0
Bitoa(plr.orbammo[currentorb], tempchar);
int y = 382;
if (currentorb == 2)
y = 381;
if (currentorb == 3)
y = 383;
if (currentorb == 6)
y = 383;
if (currentorb == 7)
y = 380;
int spellbookpage = sspellbookanim[currentorb][8].daweaponframe;
overwritesprite(121 << 1, y, spellbookpage, 0, 0, 0);
game.getFont(4).drawText(126 << 1,439, tempchar, 0, 0, TextAlign.Left, 0, false);
#endif
}
END_WH_NS