1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

new player shape: spaceship

This commit is contained in:
Zeno Rogue 2024-10-04 15:35:54 +02:00
parent 02ad45c6e6
commit b6b4755309
5 changed files with 45 additions and 4 deletions

View File

@ -985,6 +985,7 @@ EX string csnameid(int id) {
if(id == 4 || id == 5) return XLAT("cat"); if(id == 4 || id == 5) return XLAT("cat");
if(id == 6 || id == 7) return XLAT("dog"); if(id == 6 || id == 7) return XLAT("dog");
if(id == 8 || id == 9) return XLATN("Familiar"); if(id == 8 || id == 9) return XLATN("Familiar");
if(id == 10 || id == 11) return XLATN("spaceship");
return XLAT("none"); return XLAT("none");
} }
@ -3557,7 +3558,7 @@ EX void showCustomizeChar() {
else if(uni == 'g') { else if(uni == 'g') {
cs.charid++; cs.charid++;
if(cs.charid == 2 && !princess::everSaved && !autocheat) cs.charid = 4; if(cs.charid == 2 && !princess::everSaved && !autocheat) cs.charid = 4;
cs.charid %= 10; cs.charid %= 12;
} }
else if(uni == 'p') vid.samegender = !vid.samegender; else if(uni == 'p') vid.samegender = !vid.samegender;
else if(uni == 's') switchcolor(cs.skincolor, cat ? haircolors : skincolors); else if(uni == 's') switchcolor(cs.skincolor, cat ? haircolors : skincolors);

View File

@ -362,7 +362,9 @@ hpcshape
hpcshape shCrossbow, shCrossbowBolt, shCrossbowstringLoaded, shCrossbowstringUnloaded, shCrossbowstringSemiloaded, shCrossbowIcon, shCrossbowstringIcon; hpcshape shCrossbow, shCrossbowBolt, shCrossbowstringLoaded, shCrossbowstringUnloaded, shCrossbowstringSemiloaded, shCrossbowIcon, shCrossbowstringIcon;
hpcshape shReserved[16]; hpcshape shSpaceship, shMissile, shSpaceshipBase, shSpaceshipCockpit, shSpaceshipGun, shSpaceshipEngine;
hpcshape shReserved[10];
int orb_inner_ring; //< for shDisk* shapes, the number of vertices in the inner ring int orb_inner_ring; //< for shDisk* shapes, the number of vertices in the inner ring
int res1, res2; int res1, res2;

View File

@ -1324,7 +1324,16 @@ EX void drawPlayer(eMonster m, cell *where, const shiftmatrix& V, color_t col, d
if(mapeditor::drawplayer && !mapeditor::drawUserShape(V, mapeditor::sgPlayer, cs.charid, cs.skincolor, where)) { if(mapeditor::drawplayer && !mapeditor::drawUserShape(V, mapeditor::sgPlayer, cs.charid, cs.skincolor, where)) {
if(cs.charid >= 8) { if(cs.charid >= 10) {
ShadowV(V, cgi.shSpaceship);
queuepoly(VBODY, cgi.shSpaceshipBase, fc(150, cs.skincolor, 4));
queuepoly(VBODY, cgi.shSpaceshipCockpit, fc(150, cs.eyecolor, 4));
queuepoly(VBODY, cgi.shSpaceshipGun, fc(150, cs.dresscolor, 4));
queuepoly(VBODY, cgi.shSpaceshipEngine, fc(150, cs.haircolor, 4));
queuepoly(VBODY * lmirror(), cgi.shSpaceshipGun, fc(150, cs.dresscolor, 4));
queuepoly(VBODY * lmirror(), cgi.shSpaceshipEngine, fc(150, cs.haircolor, 4));
}
else if(cs.charid >= 8) {
/* famililar */ /* famililar */
if(!mmspatial && !footphase) { if(!mmspatial && !footphase) {
if(stop) return; if(stop) return;

View File

@ -1337,6 +1337,13 @@ void geometry_information::prepare_shapes() {
bshape(shCrossbowIcon, PPR::ITEM, scalefactor, 426); bshape(shCrossbowIcon, PPR::ITEM, scalefactor, 426);
bshape(shCrossbowstringIcon, PPR::ITEM, scalefactor, 427); bshape(shCrossbowstringIcon, PPR::ITEM, scalefactor, 427);
bshape(shMissile, PPR::MONSTER_LEG, scalefactor * 3, 428);
bshape(shSpaceshipBase, PPR::MONSTER_BODY, scalefactor * 3, 429);
bshape(shSpaceshipCockpit, PPR::MONSTER_HEAD, scalefactor * 3, 430);
bshape(shSpaceshipGun, PPR::MONSTER_WPN, scalefactor * 3, 431);
bshape(shSpaceshipEngine, PPR::MONSTER_ARMOR0, scalefactor * 3, 432);
bshape(shSpaceship, PPR::MONSTER_BODY, scalefactor * 3, 433);
wormscale = WDIM == 3 ? 3 : 1; wormscale = WDIM == 3 ? 3 : 1;
// first layer monsters // first layer monsters
@ -2531,6 +2538,24 @@ NEWSHAPE, 426, 1, 1, -0.161593, 0.0201991, 0.0669713, 0.0200914, 0.0669893, 0.03
// shCrossbowstringIcon, // shCrossbowstringIcon,
NEWSHAPE, 427, 1, 1, -0.102273, 0.00502984, -0.0369432, 0.124264, -0.0218299, 0.127621, -0.00838927, 0.115772, -0.00670825, 0.107332, -0.077039, 0.0100486, -0.077039, -0.0100486, -0.00670825, -0.107332, -0.00838927, -0.115772, -0.0218299, -0.127621, -0.0369432, -0.124264, -0.102273, -0.00502984, NEWSHAPE, 427, 1, 1, -0.102273, 0.00502984, -0.0369432, 0.124264, -0.0218299, 0.127621, -0.00838927, 0.115772, -0.00670825, 0.107332, -0.077039, 0.0100486, -0.077039, -0.0100486, -0.00670825, -0.107332, -0.00838927, -0.115772, -0.0218299, -0.127621, -0.0369432, -0.124264, -0.102273, -0.00502984,
// shMissile
NEWSHAPE, 428, 1, 1, 0.04, 0, 0.01, -0.02, -0.02, -0.02, -0.02, 0.02, 0.01, 0.02,
// shSpaceshipBase
NEWSHAPE, 429, 1, 1, 0.0699706, 0, 0.0509304, 0.019032, 0.0056909, 0.023788, 0.00331668, 0.0380512, -0.0630665, 0.0699568, -0.0619577, 0.041535, -0.0572505, 0.0237463, -0.0572505, -0.0237463, -0.0619577, -0.041535, -0.0630665, -0.0699568, 0.00331668, -0.0380512, 0.0056909, -0.023788, 0.0509304, -0.019032, 0.0699706, 0, 0.0699706, 0,
// shSpaceshipCockpit
NEWSHAPE, 430, 1, 2, 0.0651425, -0.000368037, 0.0491134, -0.0154514, 0.0299719, -0.0159973,
// shSpaceshipGun
NEWSHAPE, 431, 1, 1, 0.0321848, 0.0303457, 0.0336611, 0.0375238, -0.00441346, 0.0389856, -0.00367705, 0.0248201, 0.00128693, 0.0224293, 0.0321848, 0.0303457,
// shSpaceshipEngine
NEWSHAPE, 432, 1, 1, -0.0498532, 0.0220752, -0.0675516, 0.0261371, -0.0684933, 0.0425321, -0.0495047, 0.0458241, -0.0459549, 0.0455172, -0.0422296, 0.0437612, -0.0395991, 0.0404742, -0.0389396, 0.0369707, -0.0391553, 0.0321554, -0.0395915, 0.0295296, -0.0419969, 0.0247169, -0.0457175, 0.0216557,
// shSpaceship
NEWSHAPE, 433, 1, 1, 0.0699706, 0, 0.0509304, 0.019032, 0.0056909, 0.023788, 0.0318813, 0.0309258, 0.0330715, 0.0368693, 0.00331668, 0.0380512, -0.0630665, 0.0699568, -0.0619577, 0.041535, -0.0678691, 0.0415233, -0.0678946, 0.0261072, -0.0572505, 0.0237463, -0.0572505, -0.0237463, -0.0678946, -0.0261072, -0.0678691, -0.0415233, -0.0619577, -0.041535, -0.0630665, -0.0699568, 0.00331668, -0.0380512, 0.0330715, -0.0368693, 0.0318813, -0.0309258, 0.0056909, -0.023788, 0.0509304, -0.019032,
NEWSHAPE, NEWSHAPE NEWSHAPE, NEWSHAPE
}; };

View File

@ -3121,7 +3121,11 @@ bool celldrawer::draw_shmup_monster() {
col = (mirrorcolor(det(view.T) < 0) << 8) | 0xFF; col = (mirrorcolor(det(view.T) < 0) << 8) | 0xFF;
else else
col = (minf[m->get_parenttype()].color << 8) | 0xFF; col = (minf[m->get_parenttype()].color << 8) | 0xFF;
if(getcs().charid >= 4) { if(getcs().charid >= 10) {
queuepoly(at_missile_level(view), cgi.shMissile, col);
ShadowV(view, cgi.shMissile);
}
else if(getcs().charid >= 4) {
queuepoly(at_missile_level(view), cgi.shPHead, col); queuepoly(at_missile_level(view), cgi.shPHead, col);
ShadowV(view, cgi.shPHead); ShadowV(view, cgi.shPHead);
} }