- [NEW] Módul "info"retocat
This commit is contained in:
11
prota.cpp
11
prota.cpp
@@ -3,8 +3,7 @@
|
||||
#include "jinput.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
Prota::Prota( JD8_Surface gfx, Info* info ) : Sprite( gfx ) {
|
||||
this->info = info;
|
||||
Prota::Prota( JD8_Surface gfx ) : Sprite( gfx ) {
|
||||
|
||||
this->entitat = (Entitat*)malloc( sizeof( Entitat ) );
|
||||
this->entitat->num_frames = 82;
|
||||
@@ -14,7 +13,7 @@ Prota::Prota( JD8_Surface gfx, Info* info ) : Sprite( gfx ) {
|
||||
for( int x = 0; x < 5; x++ ) {
|
||||
this->entitat->frames[frame].w = 15;
|
||||
this->entitat->frames[frame].h = 15;
|
||||
if( this->info->num_piramide == 4 ) this->entitat->frames[frame].h -= 5;
|
||||
if( info::num_piramide == 4 ) this->entitat->frames[frame].h -= 5;
|
||||
this->entitat->frames[frame].x = x*15;
|
||||
this->entitat->frames[frame].y = 20+(y*15);
|
||||
frame++;
|
||||
@@ -26,7 +25,7 @@ Prota::Prota( JD8_Surface gfx, Info* info ) : Sprite( gfx ) {
|
||||
if( x != 300 || y != 155 ) {
|
||||
this->entitat->frames[frame].w = 15;
|
||||
this->entitat->frames[frame].h = 30;
|
||||
if( this->info->num_piramide == 4 ) this->entitat->frames[frame].h -= 5;
|
||||
if( info::num_piramide == 4 ) this->entitat->frames[frame].h -= 5;
|
||||
this->entitat->frames[frame].x = x;
|
||||
this->entitat->frames[frame].y = y;
|
||||
frame++;
|
||||
@@ -37,7 +36,7 @@ Prota::Prota( JD8_Surface gfx, Info* info ) : Sprite( gfx ) {
|
||||
for( int x = 225; x < 315; x+=15 ) {
|
||||
this->entitat->frames[frame].w = 15;
|
||||
this->entitat->frames[frame].h = 15;
|
||||
if( this->info->num_piramide == 4 ) this->entitat->frames[frame].h -= 5;
|
||||
if( info::num_piramide == 4 ) this->entitat->frames[frame].h -= 5;
|
||||
this->entitat->frames[frame].x = x;
|
||||
this->entitat->frames[frame].y = y;
|
||||
frame++;
|
||||
@@ -80,7 +79,7 @@ void Prota::draw() {
|
||||
|
||||
Sprite::draw();
|
||||
|
||||
if( this->info->num_piramide == 4 && this->o != 4) {
|
||||
if( info::num_piramide == 4 && this->o != 4) {
|
||||
if( ( JG_GetCycleCounter() % 40 ) < 20 ) {
|
||||
JD8_BlitCK(this->x, this->y, this->gfx, 220, 80, 15, 15, 255 );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user