mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-24 21:09:57 +01:00
Update pokitto
This commit is contained in:
parent
cadca6186e
commit
f506607dab
9 changed files with 14 additions and 12 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#define _OSCT 2 // overclock
|
||||||
//#define PROJ_SHOW_FPS_COUNTER
|
//#define PROJ_SHOW_FPS_COUNTER
|
||||||
#define PROJ_SCREENMODE 13
|
#define PROJ_SCREENMODE 13
|
||||||
#define PROJ_MODE13 1
|
#define PROJ_MODE13 1
|
||||||
|
|
|
@ -132,6 +132,7 @@ static inline void handleCollision(S3L_Vec4 *pos, S3L_Vec4 previousPos)
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
pokitto.begin();
|
pokitto.begin();
|
||||||
|
// pokitto.display.persistence = 1;
|
||||||
pokitto.setFrameRate(60);
|
pokitto.setFrameRate(60);
|
||||||
pokitto.display.load565Palette(cityPalette);
|
pokitto.display.load565Palette(cityPalette);
|
||||||
|
|
||||||
|
|
BIN
programs/pokitto/city_overclock.bin
Executable file
BIN
programs/pokitto/city_overclock.bin
Executable file
Binary file not shown.
Binary file not shown.
|
@ -63,25 +63,24 @@ S3L_ScreenCoord subsampleMap[BASE_W + SUBSAMPLE];
|
||||||
|
|
||||||
uint32_t previousTriangle = 100;
|
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
|
uint8_t newValue = color + intensity; // value as in HSV
|
||||||
// TODO: ^ this could be uint8? Would be faster! Also in the below function.
|
|
||||||
|
|
||||||
if (newValue >= 16)
|
if (color >> 4 == newValue >> 4)
|
||||||
newValue = 15;
|
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)
|
if (color >> 4 == newValue >> 4)
|
||||||
return 0;
|
return newValue;
|
||||||
|
|
||||||
return (color & 0b11110000) | newValue;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t c = 0;
|
uint8_t c = 0;
|
||||||
|
@ -190,6 +189,7 @@ int main()
|
||||||
|
|
||||||
pokitto.begin();
|
pokitto.begin();
|
||||||
|
|
||||||
|
// pokitto.display.persistence = 1;
|
||||||
pokitto.setFrameRate(60);
|
pokitto.setFrameRate(60);
|
||||||
|
|
||||||
pokitto.display.load565Palette(level1Palette);
|
pokitto.display.load565Palette(level1Palette);
|
||||||
|
|
BIN
programs/pokitto/level_overclock.bin
Executable file
BIN
programs/pokitto/level_overclock.bin
Executable file
Binary file not shown.
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "Pokitto.h"
|
#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.: */
|
the resolution, the name of the pixel drawing function etc.: */
|
||||||
|
|
||||||
#define S3L_PIXEL_FUNCTION pixelFunc
|
#define S3L_PIXEL_FUNCTION pixelFunc
|
||||||
|
|
BIN
programs/pokitto/modelviewer.bin
Executable file
BIN
programs/pokitto/modelviewer.bin
Executable file
Binary file not shown.
BIN
programs/pokitto/modelviewer_overclock.bin
Executable file
BIN
programs/pokitto/modelviewer_overclock.bin
Executable file
Binary file not shown.
Loading…
Reference in a new issue