Modificado debug.txt

This commit is contained in:
2022-08-30 20:41:58 +02:00
parent a5c983df9d
commit 4674c3dab2
2 changed files with 107 additions and 106 deletions

View File

@@ -3,192 +3,192 @@
# box height # box height
5 5
# 32 espacio ( ) # 32 espacio ( )
5 3
# 33 ! # 33 !
5 1
# 34 " # 34 "
5 3
# 35 # # 35 #
5 3
# 36 $ # 36 $
5 3
# 37 % # 37 %
5 3
# 38 & # 38 &
5 3
# 39 ' # 39 '
5 1
# 40 ( # 40 (
5 2
# 41 ) # 41 )
5 2
# 42 * # 42 *
5 3
# 43 + # 43 +
5 3
# 44 , # 44 ,
5 1
# 45 - # 45 -
5 3
# 46 . # 46 .
5 1
# 47 / # 47 /
5 3
# 48 0 # 48 0
5 3
# 49 1 # 49 1
5 3
# 50 2 # 50 2
5 3
# 51 3 # 51 3
5 3
# 52 4 # 52 4
5 3
# 53 5 # 53 5
5 3
# 54 6 # 54 6
5 3
# 55 7 # 55 7
5 3
# 56 8 # 56 8
5 3
# 57 9 # 57 9
5 3
# 58 : # 58 :
5 1
# 59 ; # 59 ;
5 1
# 60 < # 60 <
5 3
# 61 = # 61 =
5 3
# 62 > # 62 >
5 3
# 63 ? # 63 ?
5 3
# 64 @ # 64 @
5 3
# 65 A # 65 A
5 3
# 66 B # 66 B
5 3
# 67 C # 67 C
5 3
# 68 D # 68 D
5 3
# 69 E # 69 E
5 3
# 70 F # 70 F
5 3
# 71 G # 71 G
5 3
# 72 H # 72 H
5 3
# 73 I # 73 I
5 3
# 74 J # 74 J
5 3
# 75 K # 75 K
5 3
# 76 L # 76 L
5 3
# 77 M # 77 M
5 3
# 78 N # 78 N
5 3
# 79 O # 79 O
5 3
# 80 P # 80 P
5 3
# 81 Q # 81 Q
5 3
# 82 R # 82 R
5 3
# 83 S # 83 S
5 3
# 84 T # 84 T
5 3
# 85 U # 85 U
5 3
# 86 V # 86 V
5 3
# 87 W # 87 W
5 3
# 88 X # 88 X
5 3
# 89 Y # 89 Y
5 3
# 90 Z # 90 Z
5 3
# 91 [ # 91 [
5 2
# 92 \ # 92 \
5 3
# 93 ] # 93 ]
5 2
# 94 ^ # 94 ^
5 3
# 95 _ # 95 _
5 3
# 96 ` # 96 `
5 2
# 97 a # 97 a
5 3
# 98 b # 98 b
5 3
# 99 c # 99 c
5 3
# 100 d # 100 d
5 3
# 101 e # 101 e
5 3
# 102 f # 102 f
5 3
# 103 g # 103 g
5 3
# 104 h # 104 h
5 3
# 105 i # 105 i
5 3
# 106 j # 106 j
5 3
# 107 k # 107 k
5 3
# 108 l # 108 l
5 3
# 109 m # 109 m
5 3
# 110 n # 110 n
5 3
# 111 o # 111 o
5 3
# 112 p # 112 p
5 3
# 113 q # 113 q
5 3
# 114 r # 114 r
5 3
# 115 s # 115 s
5 3
# 116 t # 116 t
5 3
# 117 u # 117 u
5 3
# 118 v # 118 v
5 3
# 119 w # 119 w
5 3
# 120 x # 120 x
5 3
# 121 y # 121 y
5 3
# 122 z # 122 z
5 3
# 123 { # 123 {
5 3
# 124 | # 124 |
5 3
# 125 } # 125 }
5 3
# 126 ~ # 126 ~
5 5

View File

@@ -184,47 +184,48 @@ void Game::renderDebugInfo()
} }
// Pinta el texto // Pinta el texto
const int inc = debugText->getCharacterWidth() + 1;
int line = 0; int line = 0;
std::string text = ""; std::string text = "";
text = "R - Reload player and map"; text = "R - Reload player and map";
debugText->write(1, 210, text, -1); debugText->write(1, 210, text);
text = "D - Toggle debug mode"; text = "D - Toggle debug mode";
debugText->write(1, 216, text, -1); debugText->write(1, 216, text);
text = std::to_string((int)player->sprite->getPosX()) + "," + std::to_string((int)player->sprite->getPosY()) + "," + std::to_string((int)player->sprite->getWidth()) + "," + std::to_string((int)player->sprite->getHeight()); text = std::to_string((int)player->sprite->getPosX()) + "," + std::to_string((int)player->sprite->getPosY()) + "," + std::to_string((int)player->sprite->getWidth()) + "," + std::to_string((int)player->sprite->getHeight());
debugText->write(0, line, text, -1); debugText->write(0, line, text);
text = "VY " + std::to_string(player->vy) + " " + std::to_string(player->jumpStrenght); text = "VY " + std::to_string(player->vy) + " " + std::to_string(player->jumpStrenght);
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = "VX " + std::to_string(player->vx); text = "VX " + std::to_string(player->vx);
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = "jump_pressed " + std::to_string(player->jumpPressed); text = "jump_pressed " + std::to_string(player->jumpPressed);
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = "isOnFloor " + std::to_string(player->isOnFloor()); text = "isOnFloor " + std::to_string(player->isOnFloor());
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
const std::string foot_x = std::to_string(player->underFeet[0].x); const std::string foot_x = std::to_string(player->underFeet[0].x);
const std::string foot_y = std::to_string(player->underFeet[0].y); const std::string foot_y = std::to_string(player->underFeet[0].y);
const std::string gettile = std::to_string(player->map->getTile(player->underFeet[0])); const std::string gettile = std::to_string(player->map->getTile(player->underFeet[0]));
text = "getTile(" + foot_x + "," + foot_y + ") = " + gettile; text = "getTile(" + foot_x + "," + foot_y + ") = " + gettile;
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = "state " + std::to_string(player->state); text = "state " + std::to_string(player->state);
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = map->getName() + " (" + map->getRoomFileName(b_top) + ", " + map->getRoomFileName(b_right) + ", " + map->getRoomFileName(b_bottom) + ", " + map->getRoomFileName(b_left) + ")"; text = map->getName() + " (" + map->getRoomFileName(b_top) + ", " + map->getRoomFileName(b_right) + ", " + map->getRoomFileName(b_bottom) + ", " + map->getRoomFileName(b_left) + ")";
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = "hookedOn = " + std::to_string(player->hookedOnMovingPlatform); text = "hookedOn = " + std::to_string(player->hookedOnMovingPlatform);
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
text = "DIAMONDS = " + std::to_string(player->diamonds); text = "DIAMONDS = " + std::to_string(player->diamonds);
debugText->write(0, line += 6, text, -1); debugText->write(0, line += inc, text);
// Pinta mascaras // Pinta mascaras
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 128); SDL_SetRenderDrawColor(renderer, 0, 255, 0, 128);