Assumptes #1 al #6 finiquitats. Piràmide secreta funcionant, amb la seua intro.

This commit is contained in:
2016-02-22 17:52:49 +01:00
parent f00afcf9a2
commit de9bac2b2c
12 changed files with 188 additions and 34 deletions

View File

@@ -80,6 +80,7 @@ JD8_Palette JD8_LoadPalette(const char *file) {
}
void JD8_SetScreenPalette(JD8_Palette palette) {
if (main_palette == palette) return;
if( main_palette != NULL) free( main_palette );
main_palette = palette;
}
@@ -158,6 +159,12 @@ void JD8_PutPixel( JD8_Surface surface, int x, int y, Uint8 pixel ) {
surface[x + (y*320)] = pixel;
}
void JD8_SetPaletteColor(Uint8 index, Uint8 r, Uint8 g, Uint8 b) {
main_palette[index].r = r << 2;
main_palette[index].g = g << 2;
main_palette[index].b = b << 2;
}
void JD8_FadeOut() {
for( int j = 0; j < 32; j++ ) {
for( int i = 0; i < 256; i++ ) {