mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 23:27:49 +01:00
more cleanup
This commit is contained in:
@@ -460,15 +460,7 @@ public:
|
||||
for (int xx = 0; xx < 4; ++xx)
|
||||
if (cell_of(TET[nextIdx], 0, xx, yy))
|
||||
drawCellFullPreview(nx + xx * p, ny + yy * p, nextIdx + 1);
|
||||
// Performance text
|
||||
{
|
||||
char perf[40];
|
||||
int msInt = avgFrameMs10 / 10;
|
||||
int msDec = avgFrameMs10 % 10;
|
||||
snprintf(perf, sizeof(perf), "FPS:%d %d.%dMS", fps, msInt, msDec);
|
||||
int perfY = ny + 4 * p + 10;
|
||||
drawText(hudX, perfY, perf);
|
||||
}
|
||||
// (Removed on request) Previously displayed FPS / frame ms here.
|
||||
uint64_t t5 = tus();
|
||||
ps.rHUDUs += (t5 - t4);
|
||||
ps.lastRHUDUs = (t5 - t4);
|
||||
@@ -582,10 +574,23 @@ private:
|
||||
int offset = ((w - 1) % spacing) / 2; // distributes leftover space equally
|
||||
return ((xx - offset) % spacing) == 0;
|
||||
}
|
||||
case 2:
|
||||
return (yy < h / 2) || (xx == 0); // J
|
||||
case 3:
|
||||
return (yy >= h / 2) || (xx == w - 1); // L
|
||||
case 2: { // J — dense textured (≈75%) top half + solid left spine
|
||||
if (xx == 0)
|
||||
return true; // spine
|
||||
if (yy < h / 2) {
|
||||
// Omit only pixels where both coords are odd -> small isolated holes
|
||||
return !((xx & 1) && (yy & 1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case 3: { // L — dense textured (≈75%) bottom half + solid right spine
|
||||
if (xx == w - 1)
|
||||
return true; // spine
|
||||
if (yy >= h / 2) {
|
||||
return !((xx & 1) && (yy & 1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case 4:
|
||||
return (((xx + yy) & 1) == 0); // O
|
||||
case 5:
|
||||
|
||||
Reference in New Issue
Block a user