Skip to content

Commit

Permalink
v0.77.2 | 2023/12/02 23:21 | Fixed minor bugs and things, also found …
Browse files Browse the repository at this point in the history
…out the timing funcction I used had milisecond precision instead of nanosecond precision, but now it's fixed. Started to write new and improved code, as I have learnt a lot more about C/C++ from coding ABS-Fractal-Explorer
  • Loading branch information
ZERICO2005 committed Dec 3, 2023
1 parent 78fa12f commit aef9205
Show file tree
Hide file tree
Showing 11 changed files with 429 additions and 77 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
obj/
src/gfx/*.c
src/gfx/*.h
.DS_Store
Expand Down
2 changes: 0 additions & 2 deletions lib/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions makefile

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ uint24_t cursorAllow = 0;
/* Legacy */
const uint8_t hiddenText[43] = { //SuperSweeper V:X.XX.X ZERICO2005 YYYY/MM/DD
82,110,105,94,107,82,112,94,94,105,94,107,32,85,39, /* Text */
0,34,7,7,34,1, /* Version */
0,34,7,7,34,2, /* Version */
32,89,68,81,72,66,78,2,0,0,5,32, /* Text */
2,0,2,3,36, /* Year */
0,6,36,0,3, /* Month Day */
1,2,36,0,2, /* Month Day */
};
const uint8_t hiddenTextLength = 43;

Expand Down
14 changes: 10 additions & 4 deletions src/mineSweeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,20 @@ void expression(unsigned char e) { //Updates the smiley face
}

void flash() { //uint8_t x
for (uint8_t j = 0; j < 32; j++) {
for (uint8_t j = 0; j <= 32; j++) {
uint32_t flashTime = timer_Get(1);
uint8_t i = 0;
for (uint16_t *f = paletteRAM; f < paletteRAM + 0x100; f++) {
*f = (linear0((initialPalette[i] >> 10) & 31, 31, 31, j) << 10) + (linear0((initialPalette[i] >> 5) & 31, 31, 31, j) << 5) + (linear0(initialPalette[i] & 31, 31, 31, j));
#define flashLinear(y0,x) ((((y0) * (32 - (x))) + (31 * (x))) >> 5)
*f = (
(flashLinear((initialPalette[i] >> 10) & 31,j) << 10) +
(flashLinear((initialPalette[i] >> 5) & 31,j) << 5) +
flashLinear(initialPalette[i] & 31,j)
);
i++;
#undef flashLinear
}
while (deltaTime(timer_Get(1),flashTime) < 1536);
while (deltaTime(timer_Get(1),flashTime) < 1472);
}
}

Expand Down Expand Up @@ -796,7 +802,7 @@ void drawGame() {
horiz((disX * 2) + posX, i + disY - 2, disX * (sizeX) - 1);
}
if (!(disX & 1)) { //% 2
gColor = *videoMode & 2 ? 0x07 : 0x00; //Inverted Colors
gColor = (darkMode != 0) ? 0x07 : 0x00; //Inverted Colors
vert(319, 0, 240);
}
//Border Lines
Expand Down
Loading

0 comments on commit aef9205

Please sign in to comment.