ads-game:: adjust resource positioning to model

This commit is contained in:
Zeno Rogue 2022-09-17 16:47:35 +02:00
parent 22ef01964a
commit 75902e5fd3
1 changed files with 4 additions and 2 deletions

View File

@ -35,8 +35,10 @@ void display(int id, int y, ld val, ld maxv, ld tank, ld unit) {
auto& shape = rsrc_shape[id][0];
int N = isize(shape);
ld ctr = current_display->ycenter - current_display->radius + 20 * y;
ld sta = current_display->xcenter - current_display->radius + 20;
ld ctr = max<ld>(20*y+10, current_display->ycenter - current_display->radius + 20 * y);
ld sta = max<ld>(20, current_display->xcenter - current_display->radius + 20);
if(pmodel != mdDisk) ctr = 20*y+10, sta = 20;
for(int i=0; i<N; i+=2) curvepoint(atscreenpos(sta - 10 + shape[i+1] * 100, ctr - shape[i] * 100, 1) * C0);
curvedata.push_back(curvedata[curvestart]);