Add car tint
This commit is contained in:
parent
8fda53cb35
commit
9a431f72de
3 changed files with 31 additions and 2 deletions
5
TODO.txt
5
TODO.txt
|
@ -4,8 +4,8 @@
|
||||||
- use 332 in SDL with potato?
|
- use 332 in SDL with potato?
|
||||||
- option to turn on simple 332 colors?
|
- option to turn on simple 332 colors?
|
||||||
- c99 may impose limit 4095 chars on str literal, gives warning on internal
|
- c99 may impose limit 4095 chars on str literal, gives warning on internal
|
||||||
data file, try to somehow hack around it
|
data file, try to somehow hack around it (maybe just convert it to an array in
|
||||||
- add ifdefs that change car color?
|
the end?)
|
||||||
- add indicator that menu can be scrolled down
|
- add indicator that menu can be scrolled down
|
||||||
- car deglitch idea: deglitch only if the middle joint collided this frame?
|
- car deglitch idea: deglitch only if the middle joint collided this frame?
|
||||||
- some kinda easteregg in menu or smt
|
- some kinda easteregg in menu or smt
|
||||||
|
@ -67,6 +67,7 @@
|
||||||
|
|
||||||
=========== HANDLED ==============
|
=========== HANDLED ==============
|
||||||
|
|
||||||
|
- add ifdefs that change car color?
|
||||||
- sometimes getting a SLIGHTLY slower time counts as beating it (prolly
|
- sometimes getting a SLIGHTLY slower time counts as beating it (prolly
|
||||||
conversion fail) (SEEMS FIXED NOW)
|
conversion fail) (SEEMS FIXED NOW)
|
||||||
- make a small txt game manual
|
- make a small txt game manual
|
||||||
|
|
21
renderer.h
21
renderer.h
|
@ -340,6 +340,27 @@ void _LCR_pixelFunc3D(S3L_PixelInfo *pixel)
|
||||||
for (int i = 0; i < 6; ++i)
|
for (int i = 0; i < 6; ++i)
|
||||||
LCR_renderer.triUVs[i] = (LCR_carUvs[2 * LCR_carTriangleUvs[3 *
|
LCR_renderer.triUVs[i] = (LCR_carUvs[2 * LCR_carTriangleUvs[3 *
|
||||||
pixel->triangleIndex + i / 2] + i % 2] * (LCR_IMAGE_SIZE + 1)) / 512;
|
pixel->triangleIndex + i / 2] + i % 2] * (LCR_IMAGE_SIZE + 1)) / 512;
|
||||||
|
|
||||||
|
#if (LCR_SETTING_CAR_TINT & 0x7) != 0x07
|
||||||
|
for (int i = 0; i < 256; ++i)
|
||||||
|
LCR_currentImage.palette[i] &=
|
||||||
|
#if LCR_SETTING_CAR_TINT & 0x01
|
||||||
|
0x001f |
|
||||||
|
#else
|
||||||
|
0x0003 |
|
||||||
|
#endif
|
||||||
|
#if LCR_SETTING_CAR_TINT & 0x02
|
||||||
|
0x07e0 |
|
||||||
|
#else
|
||||||
|
0x00e0 |
|
||||||
|
#endif
|
||||||
|
#if LCR_SETTING_CAR_TINT & 0x04
|
||||||
|
0xf800
|
||||||
|
#else
|
||||||
|
0x1800
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -233,4 +233,11 @@
|
||||||
#define LCR_SETTING_POPUP_DURATION 2500
|
#define LCR_SETTING_POPUP_DURATION 2500
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef LCR_SETTING_CAR_TINT
|
||||||
|
/** Tints the car's texture, in lowest 3 bits says which of the RGB
|
||||||
|
components should be retained (1) and which diminished (0). Value 0x07
|
||||||
|
leaves the car untinted (car have slightly better performance). */
|
||||||
|
#define LCR_SETTING_CAR_TINT 0x07
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|
Loading…
Reference in a new issue