Skip to content

Commit

Permalink
Fog on PAL was still wrong, fix Igor sprite in Balcony
Browse files Browse the repository at this point in the history
  • Loading branch information
andwn committed Feb 25, 2017
1 parent 884c4c9 commit f22c3b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ai/balcony.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ void ai_igor_balcony(Entity *e) {
{
e->state = 1;
e->grounded = FALSE;
e->display_box.top += 8;
e->display_box.top += 4;
}
case 1:
{
ANIMATE(e, 20, 0,1);
ANIMATE(e, 20, STAND1,STAND2);

if ((PLAYER_DIST_X(112<<CSF) && PLAYER_DIST_Y2(48<<CSF, 112<<CSF)) || e->damage_time) {
e->state = 10;
Expand All @@ -118,7 +118,7 @@ void ai_igor_balcony(Entity *e) {
}
case 11:
{
ANIMATE(e, 8, 2,3,4,5);
ANIMATE(e, 8, WALK1,STAND1,WALK2,STAND1);
MOVE_X(SPEED(0x200));

if (blockr || blockl || PLAYER_DIST_X(64<<CSF)) {
Expand Down
12 changes: 11 additions & 1 deletion src/stage.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,23 @@ void stage_update() {
VDP_setVerticalScroll(PLAN_A, sub_to_pixel(camera.y) - SCREEN_HALF_H);
// Moon background has different spots scrolling horizontally at different speeds
backScrollTimer--;
#ifdef PAL
u8 y = 28;
for(;y >= 22; --y) backScrollTable[y] = backScrollTimer << 1;
for(;y >= 18; --y) backScrollTable[y] = backScrollTimer;
for(;y >= 15; --y) backScrollTable[y] = backScrollTimer >> 1;
for(;y >= 11; --y) backScrollTable[y] = backScrollTimer >> 2;
VDP_setHorizontalScrollTile(PLAN_B, 0, backScrollTable, 32, TRUE);
VDP_setVerticalScroll(PLAN_B, -8);
#else
u8 y = 27;
for(;y >= 21; --y) backScrollTable[y] = backScrollTimer << 1;
for(;y >= 17; --y) backScrollTable[y] = backScrollTimer;
for(;y >= 14; --y) backScrollTable[y] = backScrollTimer >> 1;
for(;y >= 10; --y) backScrollTable[y] = backScrollTimer >> 2;
VDP_setHorizontalScrollTile(PLAN_B, 0, backScrollTable, 32, TRUE);
VDP_setVerticalScroll(PLAN_B, 0);
#endif
} else if(stageBackgroundType == 3) {
// Lock camera at specific spot
camera.target = NULL;
Expand Down Expand Up @@ -418,7 +428,7 @@ void stage_draw_moonback() {
}
VDP_setTileMapDataRect(PLAN_B, mapBuffer, 0, 31, 40, 1);
// Duplicate bottom row in row 28
cursor = 32*17;
cursor = 32*17*2;
for(u16 x = 0; x < 32; x++) {
mapBuffer[x] = mapBuffer[x+32] = TILE_ATTR_FULL(PAL2,0,0,0,
TILE_MOONINDEX + (btmMap[cursor]<<8) + btmMap[cursor+1]);
Expand Down

0 comments on commit f22c3b8

Please sign in to comment.