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

vector graphics of Frogs and Pikes

This commit is contained in:
Zeno Rogue 2020-02-26 01:19:49 +01:00
parent 40dc80df9c
commit 513750a028
3 changed files with 76 additions and 1 deletions

View File

@ -243,12 +243,16 @@ hpcshape
shTerraArmor1, shTerraArmor2, shTerraArmor3, shTerraHead, shTerraFace,
shJiangShi, shJiangShiDress, shJiangShiCap1, shJiangShiCap2,
shPikeBody, shPikeEye,
shAsymmetric,
shPBodyOnly, shPBodyArm, shPBodyHand, shPHeadOnly,
shDodeca;
hpcshape shFrogRearFoot, shFrogFrontFoot, shFrogRearLeg, shFrogFrontLeg, shFrogRearLeg2, shFrogBody, shFrogEye, shFrogStripe, shFrogJumping;
hpcshape_animated
shAnimatedEagle, shAnimatedTinyEagle, shAnimatedGadfly, shAnimatedHawk, shAnimatedButterfly,
shAnimatedGargoyle, shAnimatedGargoyle2, shAnimatedBat, shAnimatedBat2;

View File

@ -1423,6 +1423,34 @@ EX bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t
return false;
}
case moFrog: case moPhaser: case moVaulter: {
ShadowV(V, cgi.shFrogBody);
const transmatrix VL = mmscale(V, cgi.ALEG0);
color_t xcolor = darkena(0xFF0000, 1, 0xFF);
int alpha = (m == moPhaser ? 0xC0 : 0xFF);
if(footphase) {
queuepoly(VALEGS, cgi.shFrogJumping, darkena(col, 0, alpha));
queuepoly(VALEGS * Mirror, cgi.shFrogJumping, darkena(col, 0, alpha));
}
else {
queuepoly(VL, cgi.shFrogRearFoot, darkena(col, 0, alpha));
queuepoly(VL * Mirror, cgi.shFrogRearFoot, darkena(col, 0, alpha));
queuepoly(VALEGS, cgi.shFrogRearLeg, xcolor);
queuepoly(VALEGS * Mirror, cgi.shFrogRearLeg, xcolor);
queuepoly(VALEGS, cgi.shFrogRearLeg2, xcolor);
queuepoly(VALEGS * Mirror, cgi.shFrogRearLeg2, xcolor);
}
queuepoly(VL, cgi.shFrogFrontFoot, darkena(col, 0, alpha));
queuepoly(VL * Mirror, cgi.shFrogFrontFoot, darkena(col, 0, alpha));
queuepoly(VALEGS, cgi.shFrogFrontLeg, xcolor);
queuepoly(VALEGS * Mirror, cgi.shFrogFrontLeg, xcolor);
queuepoly(VABODY, cgi.shFrogBody, darkena(col, 0, alpha));
queuepoly(VABODY, cgi.shFrogEye, darkena(col, 3, alpha));
queuepoly(VABODY * Mirror, cgi.shFrogEye, darkena(col, 3, alpha));
queuepoly(VABODY, cgi.shFrogStripe, xcolor);
return false;
}
case moVineBeast: {
ShadowV(V, cgi.shWolfBody);
if(mmspatial || footphase)
@ -1485,9 +1513,15 @@ EX bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t
return false;
}
case moShark: case moGreaterShark: case moCShark:
case moShark: case moGreaterShark: case moCShark: case moYellowSkipper:
queuepoly(VFISH, cgi.shShark, darkena(col, 0, 0xFF));
return false;
case moPike:
queuepoly(VFISH, cgi.shPikeBody, darkena(col, 0, 0xFF));
queuepoly(VFISH, cgi.shPikeEye, darkena(col, 2, 0xFF));
queuepoly(VFISH * Mirror, cgi.shPikeEye, darkena(col, 2, 0xFF));
return false;
case moEagle: case moParrot: case moBomberbird: case moAlbatross:
case moTameBomberbird: case moWindCrow: case moTameBomberbirdMoved:

View File

@ -214,6 +214,8 @@ void geometry_information::bshape(hpcshape& sh, PPR prio, double shzoom, int sha
double shzoomx = shzoom;
double shzoomy = shzoom;
if(shzoom == WOLF) shzoomx = 1.5 * (!BITRUNCATED && !arcm::in() ? scalefactor : 1), shzoomy = 1.6 * (!BITRUNCATED && !arcm::in() ? scalefactor : 1);
if(&sh == &cgi.shPikeBody) shzoomx *= 1.1, shzoomy *= 1.5;
if(&sh == &cgi.shPikeEye) shzoomx *= 1.1, shzoomy *= 1.5;
int rots2 = rots;
// shapes 368..370 are specially designed
if(!(shapeid >= 368 && shapeid <= 370)) {
@ -1438,6 +1440,16 @@ void geometry_information::prepare_shapes() {
bshape(shJiangShiDress, PPR::MONSTER_BODY, scalefactor, 356);
bshape(shJiangShiCap1, PPR::MONSTER_HAT0, scalefactor, 357);
bshape(shJiangShiCap2, PPR::MONSTER_HAT1, scalefactor, 358);
bshape(shFrogRearFoot, PPR::MONSTER_FOOT, scalefactor, 393);
bshape(shFrogFrontFoot, PPR::MONSTER_FOOT, scalefactor, 394);
bshape(shFrogRearLeg, PPR::MONSTER_LEG, scalefactor, 395);
bshape(shFrogFrontLeg, PPR::MONSTER_LEG, scalefactor, 396);
bshape(shFrogRearLeg2, PPR::MONSTER_LEG, scalefactor, 397);
bshape(shFrogBody, PPR::MONSTER_BODY, scalefactor, 398);
bshape(shFrogEye, PPR::MONSTER_EYE0, scalefactor, 399);
bshape(shFrogStripe, PPR::MONSTER_BODY, scalefactor, 400);
bshape(shFrogJumping, PPR::MONSTER_FOOT, scalefactor, 401);
bshape(shPBody, PPR::MONSTER_BODY, scalefactor, 85);
bshape(shYeti, PPR::MONSTER_BODY, scalefactor, 86);
@ -1570,6 +1582,9 @@ void geometry_information::prepare_shapes() {
bshape(shWolfFrontLeg, PPR::MONSTER_LEG, scalefactor, 274);
bshape(shWolfRearLeg, PPR::MONSTER_LEG, scalefactor, 275);
bshape(shPikeBody, PPR::MONSTER_BODY, scalefactor, 402);
bshape(shPikeEye, PPR::MONSTER_BODY, scalefactor, 403);
// missiles
bshape(shKnife, PPR::MISSILE, scalefactor, 87);
bshape(shTrapArrow, PPR::MISSILE, scalefactor, 354);
@ -2390,6 +2405,28 @@ NEWSHAPE, 390, 1, 1, -0.079664,0.100183, -0.087015,0.156872, -0.090442,0.188317,
NEWSHAPE, 391, 1, 1, -0.063645,0.226806, -0.078296,0.241201, -0.070101,0.263835, -0.062700,0.273833, -0.053763,0.276497, -0.030638,0.274461, -0.015319,0.275737, 0.001277,0.277150, 0.020384,0.271369, 0.038101,0.262896, 0.045596,0.255842, 0.062388,0.263558, 0.085371,0.258660, 0.084235,0.228817, 0.071073,0.213220, 0.048603,0.218088, 0.042541,0.228972, 0.028749,0.228742, 0.011222,0.224439, -0.012498,0.229969, -0.026261,0.230095,
NEWSHAPE, 392, 1, 2, 0.060794,0.001192, 0.058426,0.023847, 0.050054,0.030986, 0.042896,0.038130, 0.044109,0.042917, 0.032180,0.050058, 0.017884,0.059612, 0.005963,0.064401, -0.009546,0.068015, -0.022689,0.070455, -0.053753,0.053753, -0.065710,0.040621, -0.074098,0.028683, -0.088611,0.020357, -0.087387,0.017956,
// FrogRearFoot
NEWSHAPE, 393, 1, 1, -0.153552, -0.291733, -0.182381, -0.248007, -0.21539, -0.287441, -0.202761, -0.185644, -0.215295, -0.148076, -0.220924, -0.0409655, -0.212791, -0.0216833, -0.192738, -0.0258954, -0.174086, -0.0523655, -0.179767, -0.118183, -0.185019, -0.150481, -0.143293, -0.200743, -0.128381, -0.231049, -0.157494, -0.219685, -0.162297, -0.225301,
// FrogFrontFoot
NEWSHAPE, 394, 1, 1, 0.0880089, -0.162887, 0.132464, -0.169371, 0.175178, -0.200417, 0.150432, -0.159494, 0.209778, -0.137656, 0.15337, -0.134652, 0.177748, -0.105633, 0.123218, -0.127977, 0.112511, -0.0935079, 0.101133, -0.130199, 0.0895591, -0.12884, 0.080111, -0.135979, 0.0796627, -0.148271,
// FrogRearLeg
NEWSHAPE, 395, 1, 1, -0.0750212, -0.173011, -0.0927416, -0.187576, -0.112203, -0.187777, -0.152132, -0.151971, -0.21666, -0.0700989, -0.218259, -0.0371688, -0.213467, -0.0224516, -0.191079, -0.0286323, -0.166987, -0.0603945, -0.0723384, -0.128759,
// FrogFrontLeg
NEWSHAPE, 396, 1, 1, 0.101576, -0.161964, 0.0197865, -0.130984, 0.0213932, -0.0957754, 0.0278432, -0.0589599, 0.0897968, -0.0686735, 0.0715826, -0.0821116, 0.0671421, -0.107452, 0.107662, -0.139848, 0.112244, -0.143149, 0.108846, -0.154228,
// FrogRearLeg2
NEWSHAPE, 397, 1, 1, -0.073741, -0.17073, -0.0904504, -0.189569, -0.111925, -0.192131, -0.158094, -0.149586, -0.170946, -0.0556971, -0.168778, -0.00622117, -0.159569, 0.00588146, -0.134923, 0.013396, -0.0983033, -0.00665601, -0.0793462, -0.0507176, -0.0735377, -0.0916057,
// FrogBody
NEWSHAPE, 398, 1, 2, 0.235269, -0.0219059, 0.2179, -0.0439611, 0.184616, -0.057014, 0.161424, -0.075092, 0.107813, -0.0795282, 0.0871785, -0.0717144, 0.00496069, -0.104147, -0.0304024, -0.106835, -0.0896684, -0.0757375, -0.150028, -0.0447732, -0.1631, -0.0143641, -0.163208, 0.0156084,
// FrogEye
NEWSHAPE, 399, 1, 1, 0.177618, -0.0331534, 0.168996, -0.0523637, 0.152309, -0.0606822, 0.132728, -0.0499149, 0.149854, -0.0479865, 0.163994, -0.0441294,
// FrogStripe
NEWSHAPE, 400, 1, 1, 0.112683, 0.00559909, 0.11402, -0.0120863, 0.0547058, -0.000867709, -0.0150383, -0.00750922, -0.0719331, -0.0160414, -0.116638, -0.0101638, -0.150076, 0.00444075, -0.103649, -0.00207948, -0.0672217, -0.0029079, -0.0157604, 0.0115838, 0.0556112, 0.0155224,
// FrogJump
NEWSHAPE, 401, 1, 1, -0.115189, -0.0126931, -0.0904924, -0.0376147, -0.0799303, -0.0595469, -0.0782363, -0.0830113, -0.124375, -0.101375, -0.223649, -0.148568, -0.336201, -0.0960414, -0.40962, -0.111762, -0.373842, -0.0766156, -0.42371, -0.0630189, -0.364367, -0.0456951, -0.404889, 0.00247159, -0.337346, -0.0402599, -0.23663, -0.0900897, -0.182658, -0.0242999, -0.155726, -0.00841261,
// PikeBody
NEWSHAPE, 402, 1, 2, 0.350118, -0.00051488, 0.337085, 0.0154155, 0.321993, 0.0271746, 0.305376, 0.0317141, 0.284117, 0.0397866, 0.246749, 0.0421402, 0.213985, 0.0419876, 0.190278, 0.0434056, 0.142804, 0.0487746, 0.135815, 0.0764588, 0.122182, 0.0874884, 0.108588, 0.100545, 0.0798656, 0.110004, 0.0907803, 0.0646998, 0.0892314, 0.0496287, 0.054068, 0.0460579, 0.00800464, 0.0475276, -0.0190107, 0.0435245, -0.0325538, 0.0746232, -0.0496332, 0.0912448, -0.0682478, 0.0998626, -0.0702617, 0.100374, -0.062138, 0.0711581, -0.0590898, 0.0510777, -0.0721162, 0.0355573, -0.119958, 0.0316207, -0.191758, 0.0242221, -0.237792, 0.0197737, -0.3075, 0.0281406, -0.316055, 0.0215143, -0.250835, 0.0121863, -0.316053, 0.0210019, -0.318716, 0.0112729, -0.260266, 0.00508332, -0.318716, 0.0112729, -0.320322, 0.00512516,
// PikeEye
NEWSHAPE, 403, 1, 1, 0.26453, 0.0305227, 0.274541, 0.0290331, 0.280348, 0.0265056, 0.271875, 0.0213835,
NEWSHAPE
};