- [NEW] Módul "info"retocat

This commit is contained in:
2025-07-02 17:15:49 +02:00
parent d7c965ff0b
commit 83cf446c37
17 changed files with 134 additions and 136 deletions

View File

@@ -1,11 +1,9 @@
#include "marcador.h"
Marcador::Marcador( JD8_Surface gfx, Info* info, Prota* sam ) {
Marcador::Marcador( JD8_Surface gfx, Prota* sam ) {
this->gfx = gfx;
this->info = info;
this->sam = sam;
}
Marcador::~Marcador(void) {
@@ -13,19 +11,19 @@ Marcador::~Marcador(void) {
void Marcador::draw() {
if (this->info->num_piramide < 6) {
this->pintaNumero(55, 2, this->info->num_piramide);
this->pintaNumero(80, 2, this->info->num_habitacio);
if (info::num_piramide < 6) {
this->pintaNumero(55, 2, info::num_piramide);
this->pintaNumero(80, 2, info::num_habitacio);
}
this->pintaNumero( 149, 2, this->info->diners / 100 );
this->pintaNumero( 156, 2, ( this->info->diners % 100 ) / 10 );
this->pintaNumero( 163, 2, this->info->diners % 10 );
this->pintaNumero( 149, 2, info::diners / 100 );
this->pintaNumero( 156, 2, ( info::diners % 100 ) / 10 );
this->pintaNumero( 163, 2, info::diners % 10 );
if( this->sam->pergami ) JD8_BlitCK( 190, 1, this->gfx, 209, 185, 15, 14, 255 );
JD8_BlitCK( 271, 1, this->gfx, 0, 20, 15, this->info->vida*3, 255 );
if( this->info->vida < 5 ) JD8_BlitCK( 271, 1+(this->info->vida*3), this->gfx, 75, 20, 15, 15-(this->info->vida*3), 255 );
JD8_BlitCK( 271, 1, this->gfx, 0, 20, 15, info::vida*3, 255 );
if( info::vida < 5 ) JD8_BlitCK( 271, 1+(info::vida*3), this->gfx, 75, 20, 15, 15-(info::vida*3), 255 );
}
void Marcador::pintaNumero( Uint16 x, Uint16 y, Uint8 num ) {