diff --git a/programs/pokitto/My_settings.h b/programs/pokitto/My_settings.h index 179efc4..70f2aec 100644 --- a/programs/pokitto/My_settings.h +++ b/programs/pokitto/My_settings.h @@ -1,3 +1,4 @@ +#define _OSCT 2 // overclock //#define PROJ_SHOW_FPS_COUNTER #define PROJ_SCREENMODE 13 #define PROJ_MODE13 1 diff --git a/programs/pokitto/city.cpp b/programs/pokitto/city.cpp index 41de5f6..bc345ad 100644 --- a/programs/pokitto/city.cpp +++ b/programs/pokitto/city.cpp @@ -132,6 +132,7 @@ static inline void handleCollision(S3L_Vec4 *pos, S3L_Vec4 previousPos) int main() { pokitto.begin(); +// pokitto.display.persistence = 1; pokitto.setFrameRate(60); pokitto.display.load565Palette(cityPalette); diff --git a/programs/pokitto/city_overclock.bin b/programs/pokitto/city_overclock.bin new file mode 100755 index 0000000..8a08873 Binary files /dev/null and b/programs/pokitto/city_overclock.bin differ diff --git a/programs/pokitto/level.bin b/programs/pokitto/level.bin index a7d0d85..b36708e 100755 Binary files a/programs/pokitto/level.bin and b/programs/pokitto/level.bin differ diff --git a/programs/pokitto/level.cpp b/programs/pokitto/level.cpp index c250d06..8432cd1 100644 --- a/programs/pokitto/level.cpp +++ b/programs/pokitto/level.cpp @@ -63,25 +63,24 @@ S3L_ScreenCoord subsampleMap[BASE_W + SUBSAMPLE]; uint32_t previousTriangle = 100; -static inline uint8_t addIntensity(uint8_t color, int16_t intensity) +static inline uint8_t addIntensity(uint8_t color, uint8_t intensity) { - int16_t newValue = (color & 0b00001111) + intensity; // value as in HSV - // TODO: ^ this could be uint8? Would be faster! Also in the below function. + uint8_t newValue = color + intensity; // value as in HSV - if (newValue >= 16) - newValue = 15; + if (color >> 4 == newValue >> 4) + return newValue; - return (color & 0b11110000) | newValue; + return color | 0x0F; } -static inline uint8_t substractIntensity(uint8_t color, int16_t intensity) +static inline uint8_t substractIntensity(uint8_t color, uint8_t intensity) { - int16_t newValue = (color & 0b00001111) - intensity; // value as in HSV + uint8_t newValue = color - intensity; // value as in HSV - if (newValue <= 0) - return 0; + if (color >> 4 == newValue >> 4) + return newValue; - return (color & 0b11110000) | newValue; + return 0; } uint8_t c = 0; @@ -190,6 +189,7 @@ int main() pokitto.begin(); +// pokitto.display.persistence = 1; pokitto.setFrameRate(60); pokitto.display.load565Palette(level1Palette); diff --git a/programs/pokitto/level_overclock.bin b/programs/pokitto/level_overclock.bin new file mode 100755 index 0000000..f6fe176 Binary files /dev/null and b/programs/pokitto/level_overclock.bin differ diff --git a/programs/pokitto/modelViewer.cpp b/programs/pokitto/modelViewer.cpp index 25ef400..c81cdeb 100644 --- a/programs/pokitto/modelViewer.cpp +++ b/programs/pokitto/modelViewer.cpp @@ -7,7 +7,7 @@ #include "Pokitto.h" -/* Before including small3dlib, we need to define some values for it, such as +/* Before including small3dli, we need to define some values for it, such as the resolution, the name of the pixel drawing function etc.: */ #define S3L_PIXEL_FUNCTION pixelFunc diff --git a/programs/pokitto/modelviewer.bin b/programs/pokitto/modelviewer.bin new file mode 100755 index 0000000..a0b197e Binary files /dev/null and b/programs/pokitto/modelviewer.bin differ diff --git a/programs/pokitto/modelviewer_overclock.bin b/programs/pokitto/modelviewer_overclock.bin new file mode 100755 index 0000000..87bc2ef Binary files /dev/null and b/programs/pokitto/modelviewer_overclock.bin differ