@@ -52,7 +52,7 @@ namespace {
// Branqueja segons use_new_logo perquè la mateixa sub-escena es
// reutilitza des de IntroScene (logo vell) i IntroNewLogoScene (logo
// nou) amb arxius diferents però mateix layout de sprites.
void drawWordmark ( JD8_Surface gfx ) {
void drawWordmark ( const Uint8 * gfx ) {
if ( Options : : game . use_new_logo ) {
// Centrat: (320 − 188) / 2 = 66 (IntroNewLogoScene usa la mateixa x).
JD8_Blit ( 66 , 78 , gfx , 60 , 158 , 188 , 28 ) ;
@@ -61,7 +61,7 @@ namespace {
}
}
using RenderFn = void ( * ) ( JD8_Surface , int ) ;
using RenderFn = void ( * ) ( const Uint8 * , int ) ;
// Una fase — rang [start_i..end_i] inclusive (direcció implícita per
// signe), funció de render, i flag d'skippable. Totes les fases actuals
@@ -78,38 +78,38 @@ namespace {
// Variant 0 — Interrogant / Momia
// =========================================================================
void v0_walk_right ( JD8_Surface gfx , int i ) {
void v0_walk_right ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( i , 150 , gfx , fr1 [ ( i / 5 ) % 13 ] , 0 , 15 , 15 , 0 ) ;
}
void v0_pull_map_right ( JD8_Surface gfx , int i ) {
void v0_pull_map_right ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 150 , gfx , fr3 [ std : : min ( i / 5 , 10 ) ] , 30 , 15 , 15 , 0 ) ;
}
void v0_walk_left_to_80 ( JD8_Surface gfx , int i ) {
void v0_walk_left_to_80 ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( i , 150 , gfx , fr2 [ ( i / 5 ) % 13 ] , 15 , 15 , 15 , 0 ) ;
}
void v0_pull_map_left ( JD8_Surface gfx , int i ) {
void v0_pull_map_left ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 80 , 150 , gfx , fr4 [ std : : min ( i / 5 , 10 ) ] , 45 , 15 , 15 , 0 ) ;
}
void v0_momia_left ( JD8_Surface gfx , int i ) {
void v0_momia_left ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( i , 150 , gfx , fr6 [ ( i / 5 ) % 8 ] , 60 , 15 , 15 , 0 ) ;
JD8_BlitCK ( 80 , 150 , gfx , fr4 [ 10 ] , 45 , 15 , 15 , 0 ) ;
}
void v0_turn ( JD8_Surface gfx , int /*i*/ ) {
void v0_turn ( const Uint8 * gfx , int /*i*/ ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 80 , 150 , gfx , fr1 [ 1 ] , 0 , 15 , 15 , 0 ) ;
@@ -117,28 +117,28 @@ namespace {
JD8_BlitCK ( 80 , 133 , gfx , 0 , INTERROGANT , 15 , 15 , 0 ) ;
}
void v0_jump1 ( JD8_Surface gfx , int i ) {
void v0_jump1 ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 80 , 150 - ( ( i % 50 ) / 5 ) , gfx , fr5 [ std : : min ( i / 5 , 19 ) ] , 45 , 15 , 15 , 0 ) ;
JD8_BlitCK ( 95 , 150 , gfx , fr6 [ 4 ] , 60 , 15 , 15 , 0 ) ;
}
void v0_jump2 ( JD8_Surface gfx , int i ) {
void v0_jump2 ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 80 , 140 + ( ( i % 50 ) / 5 ) , gfx , fr5 [ std : : min ( i / 5 , 19 ) ] , 45 , 15 , 15 , 0 ) ;
JD8_BlitCK ( 95 , 150 , gfx , fr6 [ 4 ] , 60 , 15 , 15 , 0 ) ;
}
void v0_walk_final ( JD8_Surface gfx , int i ) {
void v0_walk_final ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( i , 150 , gfx , fr2 [ ( i / 5 ) % 13 ] , 15 , 15 , 15 , 0 ) ;
JD8_BlitCK ( 95 , 150 , gfx , fr6 [ 4 ] , 60 , 15 , 15 , 0 ) ;
}
void v0_final ( JD8_Surface gfx , int /*i*/ ) {
void v0_final ( const Uint8 * gfx , int /*i*/ ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 95 , 150 , gfx , fr6 [ 4 ] , 60 , 15 , 15 , 0 ) ;
@@ -163,21 +163,21 @@ namespace {
// Variant 1 — Creu / Pedra
// =========================================================================
void v1_walk_right ( JD8_Surface gfx , int i ) {
void v1_walk_right ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
JD8_BlitCK ( i , 150 , gfx , fr1 [ ( i / 5 ) % 13 ] , 0 , 15 , 15 , 255 ) ;
}
void v1_pull_map ( JD8_Surface gfx , int i ) {
void v1_pull_map ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
JD8_BlitCK ( 200 , 150 , gfx , fr3 [ std : : min ( i / 5 , 10 ) ] , 30 , 15 , 15 , 255 ) ;
}
void v1_interrogant ( JD8_Surface gfx , int /*i*/ ) {
void v1_interrogant ( const Uint8 * gfx , int /*i*/ ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
@@ -185,7 +185,7 @@ namespace {
JD8_BlitCK ( 200 , 150 , gfx , fr3 [ 10 ] , 30 , 15 , 15 , 255 ) ;
}
void v1_drop_map ( JD8_Surface gfx , int i ) {
void v1_drop_map ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
@@ -199,7 +199,7 @@ namespace {
}
}
void v1_stone_fall ( JD8_Surface gfx , int i ) {
void v1_stone_fall ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
@@ -207,14 +207,14 @@ namespace {
JD8_BlitCK ( 200 , i * 2 , gfx , fr8 [ 0 ] , 75 , 15 , 15 , 255 ) ;
}
void v1_stone_break ( JD8_Surface gfx , int i ) {
void v1_stone_break ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
JD8_BlitCK ( 200 , 150 , gfx , fr8 [ i / 10 ] , 75 , 15 , 15 , 255 ) ;
}
void v1_final ( JD8_Surface gfx , int /*i*/ ) {
void v1_final ( const Uint8 * gfx , int /*i*/ ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 200 , 155 , gfx , 0 , CREU , 15 , 15 , 255 ) ;
@@ -237,21 +237,21 @@ namespace {
// Variant 2 — Ball de carnaval
// =========================================================================
void v2_approach ( JD8_Surface gfx , int i ) {
void v2_approach ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( i , 150 , gfx , fr1 [ ( i / 5 ) % 13 ] , 0 , 15 , 15 , 255 ) ;
JD8_BlitCK ( 304 - i , 150 , gfx , fr6 [ ( i / 10 ) % 8 ] , 60 , 15 , 15 , 255 ) ;
}
void v2_still ( JD8_Surface gfx , int /*i*/ ) {
void v2_still ( const Uint8 * gfx , int /*i*/ ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 145 , 150 , gfx , fr1 [ 1 ] , 0 , 15 , 15 , 255 ) ;
JD8_BlitCK ( 160 , 150 , gfx , fr6 [ 1 ] , 60 , 15 , 15 , 255 ) ;
}
void v2_horn ( JD8_Surface gfx , int i ) {
void v2_horn ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 125 , 150 , gfx , fr11 [ ( i / 10 ) % 2 ] , 90 , 15 , 15 , 255 ) ;
@@ -259,7 +259,7 @@ namespace {
JD8_BlitCK ( 160 , 150 , gfx , fr6 [ 1 ] , 60 , 15 , 15 , 255 ) ;
}
void v2_ball ( JD8_Surface gfx , int i ) {
void v2_ball ( const Uint8 * gfx , int i ) {
JD8_ClearScreen ( 0 ) ;
drawWordmark ( gfx ) ;
JD8_BlitCK ( 145 , 150 , gfx , fr9 [ ( i / 10 ) % 16 ] , 120 , 15 , 15 , 255 ) ;