Skip to content

Commit

Permalink
solved the problem where a solution with diagonal ships was accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinezTorres committed Aug 25, 2020
1 parent dc751a9 commit fad7e5a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ CCFLAGS_LINUX += -DID=1012002253UL -DPSEED=27633UL
ADDR_DATA = 0xC000

CCZ80 = sdcc_msx/bin/sdcc-3.9.0/bin/sdcc
ASM = sdcc_msx/bin/sdcc-3.9.0/bin/sdasz80

MAX_ALLOCS = 20000

Expand Down
3 changes: 3 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ USING_MODULE(psg, PAGE_C);

#include <resources.h>

#define SOTANO_EDITION 0


////////////////////////////////////////////////////////////////////////
// SOUND
USING_MODULE(test_afb,PAGE_D);
Expand Down
1 change: 1 addition & 0 deletions src/level.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ static bool update_legend_counts() {
for (uint8_t j=1; j<11; j++) {
uint8_t c = map_display[i][j];
if (c<=WATER) continue;
if (map_correctness[i][j]==false) continue;
if (c==SHIP_SUB) {
countShipsFound[0]++;
continue;
Expand Down
7 changes: 5 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ int main(void) {
paged_isr.f = nullptr;
msxhal_install_isr(main_isr);

language = ENGLISH;
language = SPANISH;
if (SOTANO_EDITION) {
language = SPANISH;
} else {
language = ENGLISH;
}

while (true) {
CALL_B(opening, start_opening);
Expand Down
27 changes: 15 additions & 12 deletions src/opening.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,18 +330,21 @@ static bool draw_opening() {

draw_title();

textProperties.font_segment = MODULE_SEGMENT(font_tiny,PAGE_D);
textProperties.font_pts = font_tiny_pts;
textProperties.font_pos = font_tiny_pos;
textProperties.font_len = font_tiny_len;
textProperties.faster = true;
textProperties.x = 0;
textProperties.y = 186;
textProperties.sz = 1;
writeText(TEXT_SOTANO[language]);
rectangle(0,185,textProperties.x-1,191,0x00,FWhite+BBlack);
textProperties.x = 0;
writeText(TEXT_SOTANO[language]);
if (SOTANO_EDITION) {

textProperties.font_segment = MODULE_SEGMENT(font_tiny,PAGE_D);
textProperties.font_pts = font_tiny_pts;
textProperties.font_pos = font_tiny_pos;
textProperties.font_len = font_tiny_len;
textProperties.faster = true;
textProperties.x = 0;
textProperties.y = 186;
textProperties.sz = 1;
writeText(TEXT_SOTANO[language]);
rectangle(0,185,textProperties.x-1,191,0x00,FWhite+BBlack);
textProperties.x = 0;
writeText(TEXT_SOTANO[language]);
}



Expand Down

0 comments on commit fad7e5a

Please sign in to comment.