GoodPraxis / lunch-break

A Sega Mega Drive/Genesis game
https://goodpraxis.coop
GNU General Public License v3.0
7 stars 0 forks source link

Error when make #1

Open AbimaelCosta opened 3 years ago

AbimaelCosta commented 3 years ago

Hi, i get these errors when i try to make the bin:

src/main.c: In function 'main': src/main.c:162:21: error: 'PLAN_B' undeclared (first use in this function) 162 | VDP_drawImageEx(PLAN_B, &start_image, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE); | ^~~~~~ src/main.c:162:21: note: each undeclared identifier is reported only once for each function it appears in src/main.c:190:21: error: 'PLAN_A' undeclared (first use in this function) 190 | VDP_drawImageEx(PLAN_A, &bga_image, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE); | ^~~~~~ src/main.c: In function 'updateScroll': src/main.c:510:33: error: 'PLAN_A' undeclared (first use in this function) 510 | VDP_setHorizontalScroll(PLAN_A, fix32ToInt(-camposx)); | ^~~~~~ src/main.c:512:33: error: 'PLAN_B' undeclared (first use in this function) 512 | VDP_setHorizontalScroll(PLAN_B, fix32ToInt(-camposx) >> 2);

MaciekBaron commented 3 years ago

Hi AbimaelCosta,

It looks like the new version of SGDK introduced some breaking changes. PLAN_A is a constant that should be provided by SGDK. In the changelog I can see that PLAN_A was renamed to BG_A, and PLAN_B to BG_B.

I'm 99% sure this code was written using SGDK 1.40 from 2019. Could you try compiling using that version? I'm worried there may have been other changes requiring refactoring. You can also try renaming those constants and hope for the best :)

Cheers