- Llevats els colors roig i blau, queden rarunos
- Reajustat el pintat dels comptadors. - Els comptadors canvien de color segón el color de l'habitació - [FIX] print2 pintava mal el número
This commit is contained in:
@@ -2,7 +2,7 @@ width: 2
|
|||||||
height: 1
|
height: 1
|
||||||
door-height-xn: 4
|
door-height-xn: 4
|
||||||
door-height-yp: 0
|
door-height-yp: 0
|
||||||
color: BLUE
|
color: PURPLE
|
||||||
floor-texture: 1
|
floor-texture: 1
|
||||||
wall-texture: 2
|
wall-texture: 2
|
||||||
door-texture: 0
|
door-texture: 0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
width: 3
|
width: 3
|
||||||
height: 3
|
height: 3
|
||||||
color: CYAN
|
color: PURPLE
|
||||||
floor-texture: 0
|
floor-texture: 0
|
||||||
wall-texture: 0
|
wall-texture: 0
|
||||||
door-texture: 0
|
door-texture: 0
|
||||||
|
|||||||
@@ -1090,8 +1090,8 @@ namespace actor
|
|||||||
if (act->next) act->next->prev = act->prev;
|
if (act->next) act->next->prev = act->prev;
|
||||||
if (act==selected) selected = nullptr;
|
if (act==selected) selected = nullptr;
|
||||||
picked = act;
|
picked = act;
|
||||||
picked->pos.x=36;
|
picked->pos.x=26;
|
||||||
picked->pos.y=82;
|
picked->pos.y=84;
|
||||||
picked->inner_x = 148-act->bmp_offset.x + act->pos.x*2 - act->pos.y*2;
|
picked->inner_x = 148-act->bmp_offset.x + act->pos.x*2 - act->pos.y*2;
|
||||||
picked->inner_y = 91-act->bmp_offset.y + act->pos.x + act->pos.y - act->pos.z*2;
|
picked->inner_y = 91-act->bmp_offset.y + act->pos.x + act->pos.y - act->pos.z*2;
|
||||||
|
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ namespace draw
|
|||||||
|
|
||||||
void print2(const int num, const int positions, const int x, const int y, const uint8_t color, const int zoom)
|
void print2(const int num, const int positions, const int x, const int y, const uint8_t color, const int zoom)
|
||||||
{
|
{
|
||||||
char buffer[positions];
|
char buffer[positions+1];
|
||||||
int digit = positions-1;
|
int digit = positions-1;
|
||||||
int value = num;
|
int value = num;
|
||||||
while (digit>=0)
|
while (digit>=0)
|
||||||
@@ -411,6 +411,7 @@ namespace draw
|
|||||||
value = value/10;
|
value = value/10;
|
||||||
digit--;
|
digit--;
|
||||||
}
|
}
|
||||||
|
buffer[positions]=0;
|
||||||
print2(buffer, x, y, color, zoom);
|
print2(buffer, x, y, color, zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -372,13 +372,17 @@ bool game::loop()
|
|||||||
room::draw2();
|
room::draw2();
|
||||||
draw::swapcol(1, WHITE+LIGHT);
|
draw::swapcol(1, WHITE+LIGHT);
|
||||||
actor::draw(actor::getPicked(), false);
|
actor::draw(actor::getPicked(), false);
|
||||||
draw::print2("a", 4, 24, YELLOW, FONT_ZOOM_NONE);
|
|
||||||
draw::print2("b", 7, 24, LIGHT+TEAL, FONT_ZOOM_NONE);
|
|
||||||
draw::print2("c", 10, 24, LIGHT+PURPLE, FONT_ZOOM_NONE);
|
|
||||||
|
|
||||||
draw::print2(actor::hero::getBoostJump(), 2, 3, 26, LIGHT+PURPLE, FONT_ZOOM_NONE);
|
const int col1 = 7+(room::getColor()-6)%5;
|
||||||
draw::print2(actor::hero::getBoostGod()/2, 2, 6, 26, YELLOW, FONT_ZOOM_NONE);
|
const int col2 = 7+(room::getColor()-5)%5;
|
||||||
draw::print2(actor::hero::getBoostRun()/2, 2, 9, 26, LIGHT+TEAL, FONT_ZOOM_NONE);
|
const int col3 = 7+(room::getColor()-4)%5;
|
||||||
|
draw::print2("a", 4, 26, col1, FONT_ZOOM_NONE);
|
||||||
|
draw::print2("b", 7, 26, col2, FONT_ZOOM_NONE);
|
||||||
|
draw::print2("c", 10, 26, col3, FONT_ZOOM_NONE);
|
||||||
|
|
||||||
|
draw::print2(actor::hero::getBoostJump(), 2, 3, 28, col3, FONT_ZOOM_NONE);
|
||||||
|
draw::print2(actor::hero::getBoostGod()/2, 2, 6, 28, col1, FONT_ZOOM_NONE);
|
||||||
|
draw::print2(actor::hero::getBoostRun()/2, 2, 9, 28, col2, FONT_ZOOM_NONE);
|
||||||
|
|
||||||
//print(10, 200, actor::hero::getBoostJump());
|
//print(10, 200, actor::hero::getBoostJump());
|
||||||
//print(30, 200, actor::hero::getBoostGod()/2);
|
//print(30, 200, actor::hero::getBoostGod()/2);
|
||||||
@@ -579,7 +583,7 @@ switch (section)
|
|||||||
|
|
||||||
ui::label("TEXTURES", 2, line, 96, 11, GRAY); line+=10;
|
ui::label("TEXTURES", 2, line, 96, 11, GRAY); line+=10;
|
||||||
|
|
||||||
changed |= btn_opt("COLOR", 2, line, room::editor::refColor(), {5, 6, 7, 8, 9, 10, 11}, {"BLUE", "RED", "PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"}, 47); //ui::label("COLOR", 2, line, 64, 11);
|
changed |= btn_opt("COLOR", 2, line, room::editor::refColor(), {7, 8, 9, 10, 11}, {"PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"}, 47); //ui::label("COLOR", 2, line, 64, 11);
|
||||||
//changed |= btn_small(64, line, room::editor::refColor(), 5, 11);
|
//changed |= btn_small(64, line, room::editor::refColor(), 5, 11);
|
||||||
line += 10;
|
line += 10;
|
||||||
ui::label("FLOOR", 2, line, 48, 11);
|
ui::label("FLOOR", 2, line, 48, 11);
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace room
|
|||||||
door_height[YN] = SDL_clamp(val, -1, 5);
|
door_height[YN] = SDL_clamp(val, -1, 5);
|
||||||
|
|
||||||
} else if (util::strcomp(key, "color:")) {
|
} else if (util::strcomp(key, "color:")) {
|
||||||
color = util::stringToInt(file::readString(&buffer), {"blue", "red", "purple", "green", "cyan", "yellow", "white"}, {5, 6, 7, 8, 9, 10, 11});
|
color = util::stringToInt(file::readString(&buffer), {"purple", "green", "cyan", "yellow", "white"}, {7, 8, 9, 10, 11});
|
||||||
|
|
||||||
} else if (util::strcomp(key, "floor-texture:")) {
|
} else if (util::strcomp(key, "floor-texture:")) {
|
||||||
floor_type = file::readInt(&buffer);
|
floor_type = file::readInt(&buffer);
|
||||||
@@ -446,8 +446,8 @@ namespace room
|
|||||||
|
|
||||||
const char *numToColor(uint8_t value)
|
const char *numToColor(uint8_t value)
|
||||||
{
|
{
|
||||||
const char* colors[7] = {"BLUE", "RED", "PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"};
|
const char* colors[5] = {"PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"};
|
||||||
return colors[value-5];
|
return colors[value-7];
|
||||||
}
|
}
|
||||||
|
|
||||||
void modify() { modified = true; }
|
void modify() { modified = true; }
|
||||||
|
|||||||
Reference in New Issue
Block a user