1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-11-21 20:39:57 +01:00

Update pokitto

This commit is contained in:
Miloslav Číž 2019-07-10 11:10:00 +02:00
parent cadca6186e
commit f506607dab
9 changed files with 14 additions and 12 deletions

View file

@ -1,3 +1,4 @@
#define _OSCT 2 // overclock
//#define PROJ_SHOW_FPS_COUNTER
#define PROJ_SCREENMODE 13
#define PROJ_MODE13 1

View file

@ -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);

Binary file not shown.

Binary file not shown.

View file

@ -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);

Binary file not shown.

View file

@ -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

BIN
programs/pokitto/modelviewer.bin Executable file

Binary file not shown.

Binary file not shown.