mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
choice of the magic sword graphics now depends on the scale; in shmup, the tip is now set automatically based on the graphics
This commit is contained in:
parent
d9b90d8a8e
commit
14ea73be06
@ -25,6 +25,8 @@ transmatrix invheptmove[MAX_EDGE], invhexmove[MAX_EDGE];
|
||||
|
||||
ld hexshift;
|
||||
|
||||
ld sword_size = 0;
|
||||
|
||||
// the results are:
|
||||
// hexf = 0.378077 hcrossf = 0.620672 tessf = 1.090550
|
||||
// hexhexdist = 0.566256
|
||||
|
1
hyper.h
1
hyper.h
@ -3434,6 +3434,7 @@ void queuereset(eModel m, PPR prio);
|
||||
|
||||
|
||||
extern ld tessf, crossf, hexf, hcrossf, hexhexdist, hexvdist, hepvdist, rhexf;
|
||||
extern ld sword_size;
|
||||
|
||||
extern ld scalefactor, orbsize, floorrad0, floorrad1, zhexf;
|
||||
|
||||
|
11
polygons.cpp
11
polygons.cpp
@ -2924,11 +2924,14 @@ void buildpolys() {
|
||||
for(int v=0; v<13; v++) for(int z=0; z<2; z++)
|
||||
copyshape(shTortoise[v][4+z], shTortoise[v][2+z], PPR(shTortoise[v][2+z].prio + (PPR::CARRIED-PPR::ITEM)));
|
||||
|
||||
if(!BITRUNCATED) bshape(shMagicSword, PPR::MAGICSWORD, scalefactor, 243);
|
||||
else bshape(shMagicSword, PPR::MAGICSWORD, 1, 244);
|
||||
if(scalefactor > 1.5) bshape(shMagicSword, PPR::MAGICSWORD, scalefactor / 1.7570466583108084, 243);
|
||||
else bshape(shMagicSword, PPR::MAGICSWORD, scalefactor, 244);
|
||||
|
||||
sword_size = 0;
|
||||
for(int i=shMagicSword.s; i<shMagicSword.e; i++)
|
||||
sword_size = max(sword_size, hdist0(hpc[i]));
|
||||
|
||||
if(!BITRUNCATED) bshape(shMagicShovel, PPR::MAGICSWORD, scalefactor, 333);
|
||||
else bshape(shMagicShovel, PPR::MAGICSWORD, 1, 333);
|
||||
bshape(shMagicShovel, PPR::MAGICSWORD, scalefactor, 333);
|
||||
|
||||
bshape(shBead0, PPR(20), 1, 250);
|
||||
bshape(shBead1, PPR(20), 1, 251);
|
||||
|
@ -1460,8 +1460,8 @@ hyperpoint keytarget(int i) {
|
||||
return 0;
|
||||
} */
|
||||
|
||||
double getSwordSize() { return 0.7255; }
|
||||
double getHornsSize() { return 0.33; }
|
||||
double getSwordSize() { return sword_size; }
|
||||
double getHornsSize() { return scalefactor * 0.33; }
|
||||
|
||||
hyperpoint swordpos(int id, bool rev, double frac) {
|
||||
return pc[id]->pat * xspinpush0(pc[id]->swordangle, (rev?-frac:frac) * getSwordSize());
|
||||
|
Loading…
Reference in New Issue
Block a user