mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
racing:: trophies
This commit is contained in:
parent
a989214a46
commit
8d588cbdab
@ -929,7 +929,11 @@ bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, color_t col,
|
|||||||
|
|
||||||
transmatrix VWPN = cs.lefthanded ? VBS * Mirror : VBS;
|
transmatrix VWPN = cs.lefthanded ? VBS * Mirror : VBS;
|
||||||
|
|
||||||
if(peace::on || racing::on) ;
|
if(peace::on) ;
|
||||||
|
else if(racing::on) {
|
||||||
|
if(racing::trophy[multi::cpid])
|
||||||
|
queuepoly(VWPN, shTrophy, racing::trophy[multi::cpid]);
|
||||||
|
}
|
||||||
else if(items[itOrbThorns])
|
else if(items[itOrbThorns])
|
||||||
queuepoly(VWPN, shHedgehogBladePlayer, items[itOrbDiscord] ? watercolor(0) : 0x00FF00FF);
|
queuepoly(VWPN, shHedgehogBladePlayer, items[itOrbDiscord] ? watercolor(0) : 0x00FF00FF);
|
||||||
else if(!shmup::on && items[itOrbDiscord])
|
else if(!shmup::on && items[itOrbDiscord])
|
||||||
|
@ -1555,7 +1555,7 @@ hpcshape
|
|||||||
shWolfBody, shWolfHead, shWolfLegs, shWolfEyes,
|
shWolfBody, shWolfHead, shWolfLegs, shWolfEyes,
|
||||||
shWolfFrontLeg, shWolfRearLeg, shWolfFrontPaw, shWolfRearPaw,
|
shWolfFrontLeg, shWolfRearLeg, shWolfFrontPaw, shWolfRearPaw,
|
||||||
shFemaleBody, shFemaleHair, shFemaleDress, shWitchDress,
|
shFemaleBody, shFemaleHair, shFemaleDress, shWitchDress,
|
||||||
shWitchHair, shBeautyHair, shFlowerHair, shFlowerHand, shSuspenders,
|
shWitchHair, shBeautyHair, shFlowerHair, shFlowerHand, shSuspenders, shTrophy,
|
||||||
shBugBody, shBugArmor, shBugLeg, shBugAntenna,
|
shBugBody, shBugArmor, shBugLeg, shBugAntenna,
|
||||||
shPickAxe, shPike, shFlailBall, shFlailTrunk, shFlailChain, shHammerHead,
|
shPickAxe, shPike, shFlailBall, shFlailTrunk, shFlailChain, shHammerHead,
|
||||||
shBook, shBookCover, shGrail,
|
shBook, shBookCover, shGrail,
|
||||||
@ -2519,6 +2519,7 @@ void buildpolys() {
|
|||||||
bshape(shWitchHair, PPR::MONSTER_HAIR, scalefactor, 129);
|
bshape(shWitchHair, PPR::MONSTER_HAIR, scalefactor, 129);
|
||||||
bshape(shBeautyHair, PPR::MONSTER_HAIR, scalefactor, 130);
|
bshape(shBeautyHair, PPR::MONSTER_HAIR, scalefactor, 130);
|
||||||
bshape(shFlowerHair, PPR::MONSTER_HAT0, scalefactor, 131);
|
bshape(shFlowerHair, PPR::MONSTER_HAT0, scalefactor, 131);
|
||||||
|
bshape(shTrophy, PPR::MONSTER_WPN, scalefactor, 388);
|
||||||
bshape(shSuspenders, PPR::MONSTER_ARMOR1, scalefactor, 132);
|
bshape(shSuspenders, PPR::MONSTER_ARMOR1, scalefactor, 132);
|
||||||
bshape(shFlowerHand, PPR::MONSTER_WPN, scalefactor, 133);
|
bshape(shFlowerHand, PPR::MONSTER_WPN, scalefactor, 133);
|
||||||
bshape(shPFace, PPR::MONSTER_FACE, scalefactor, 134);
|
bshape(shPFace, PPR::MONSTER_FACE, scalefactor, 134);
|
||||||
@ -3608,6 +3609,7 @@ NEWSHAPE, 385, 7, 1, 0.354675,0,
|
|||||||
|
|
||||||
NEWSHAPE, 386, 3, 1, 0.173768,0.275379, 0.340287,0.116342, 0.229291,-0.115277,
|
NEWSHAPE, 386, 3, 1, 0.173768,0.275379, 0.340287,0.116342, 0.229291,-0.115277,
|
||||||
NEWSHAPE, 387, 7, 1, 0.315263,-0.310217, 0.085056,-0.287538,
|
NEWSHAPE, 387, 7, 1, 0.315263,-0.310217, 0.085056,-0.287538,
|
||||||
|
NEWSHAPE, 388, 1, 1, 0.046590,0.284199, 0.028110,0.325611, 0.098711,0.333738, 0.088761,0.294314, 0.090351,0.227036, 0.092387,0.196322, 0.129546,0.192006, 0.168982,0.166667, 0.173088,0.117700, 0.022882,0.091527, 0.004586,0.133004, 0.022981,0.160866, 0.052990,0.184313, 0.085413,0.193910, 0.055297,0.184324,
|
||||||
|
|
||||||
NEWSHAPE
|
NEWSHAPE
|
||||||
};
|
};
|
||||||
|
15
racing.cpp
15
racing.cpp
@ -36,6 +36,8 @@ vector<race_cellinfo> rti;
|
|||||||
vector<cell*> track;
|
vector<cell*> track;
|
||||||
map<cell*, int> rti_id;
|
map<cell*, int> rti_id;
|
||||||
|
|
||||||
|
int trophy[MAXPLAYER];
|
||||||
|
|
||||||
string track_code = "OFFICIAL";
|
string track_code = "OFFICIAL";
|
||||||
|
|
||||||
transmatrix straight;
|
transmatrix straight;
|
||||||
@ -433,6 +435,8 @@ void generate_track() {
|
|||||||
|
|
||||||
for(int i=0; i<motypes; i++) kills[i] = 0;
|
for(int i=0; i<motypes; i++) kills[i] = 0;
|
||||||
|
|
||||||
|
for(int i=0; i<multi::players; i++) trophy[i] = 0;
|
||||||
|
|
||||||
for(int i=0; i<multi::players; i++) {
|
for(int i=0; i<multi::players; i++) {
|
||||||
auto who = shmup::pc[i];
|
auto who = shmup::pc[i];
|
||||||
// this is intentionally not hrand
|
// this is intentionally not hrand
|
||||||
@ -992,6 +996,17 @@ void prepare_subscreens() {
|
|||||||
|
|
||||||
void race_won() {
|
void race_won() {
|
||||||
if(!race_finish_tick[current_player]) {
|
if(!race_finish_tick[current_player]) {
|
||||||
|
int result = ticks - race_start_tick;
|
||||||
|
int losers = 0;
|
||||||
|
int place = 1;
|
||||||
|
for(int i=0; i<multi::players; i++) if(race_finish_tick[i]) place++; else losers = 0;
|
||||||
|
for(auto& ghost: ghostset()[specialland]) if(ghost.result < result) place++; else losers++;
|
||||||
|
for(auto& ghost: oghostset()[specialland]) if(ghost.result < result) place++; else losers++;
|
||||||
|
|
||||||
|
if(place == 1 && losers) trophy[current_player] = 0xFFD500FF;
|
||||||
|
if(place == 2) trophy[current_player] = 0xFFFFC0FF;
|
||||||
|
if(place == 3) trophy[current_player] = 0x967444FF;
|
||||||
|
|
||||||
race_finish_tick[current_player] = ticks;
|
race_finish_tick[current_player] = ticks;
|
||||||
charstyle gcs = getcs();
|
charstyle gcs = getcs();
|
||||||
for(color_t *x: {&gcs.skincolor, &gcs.haircolor, &gcs.dresscolor, &gcs.swordcolor, &gcs.dresscolor2}) {
|
for(color_t *x: {&gcs.skincolor, &gcs.haircolor, &gcs.dresscolor, &gcs.swordcolor, &gcs.dresscolor2}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user