Skip to content

Commit

Permalink
Merge pull request #68 from jsmolina/fix/collision_bincat
Browse files Browse the repository at this point in the history
fix collision with bincat
  • Loading branch information
jsmolina committed Feb 24, 2019
2 parents 61e097d + 0c97d01 commit f53e448
Show file tree
Hide file tree
Showing 8 changed files with 1,351 additions and 1,318 deletions.
6 changes: 6 additions & 0 deletions build/intro.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SECTION BANK_6


PUBLIC _cartoon0
_cartoon0:
BINARY "intro.scr"
Binary file added build/intro.scr
Binary file not shown.
1 change: 1 addition & 0 deletions build/sprites.lst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dogr
bincat
protaswim
auxiliar
intro
2 changes: 1 addition & 1 deletion defines.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void loose_a_live() {
void reset_misifu_position() {
misifu.in_bin = NONE;
misifu.x = 0;
misifu.y = 18;
misifu.y = FLOOR_Y - 1;
misifu.initial_jump_y = 0;
misifu.draw_additional = NONE;
misifu.state = FALLING_FLOOR;
Expand Down
11 changes: 6 additions & 5 deletions int.asm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ _setup_int:
SECTION code_crt_common ;; place very low in memory, out of top 16k

PUBLIC isr
PUBLIC isr_skip

EXTERN _vt_play, _vt_play_isr_enabled
EXTERN _tick, _row1_moving
Expand Down Expand Up @@ -72,19 +73,19 @@ isr:
isr_skip:

; music

ld a,0x80
ld i,a ; point I at uncontended bank

ld a,6
call enable_bank_n ; bank 6 in top 16k, stack moved

ld hl,(_vt_play_isr_enabled)

ld a,h
or l
call nz, _vt_play

call restore_bank_0 ; bank 0 in top 16k, stack restored
ld a,0xd0
Expand Down
3 changes: 2 additions & 1 deletion level1.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ void print_background_lvl1() {
opened_window = UNDEF;

reset_misifu_position();
bincat_appears = NONE;
bincat_appears = 1;
bincat_in_bin = NONE;

level_x_max = 28;
level_x_min = 0;
Expand Down
24 changes: 24 additions & 0 deletions misifu.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,36 @@
#include "defines.h"


extern uint8_t cartoon0[];

void show_intro() {
__asm
extern enable_bank_n
di
ld a,0x80
ld i,a ; point I at uncontended bank

ld a,6
call enable_bank_n ; bank 6 in top 16k, stack moved
__endasm;
memcpy(16384, cartoon0, 6900);
__asm
extern restore_bank_0
call restore_bank_0
ei
__endasm;

}

int main()
{
show_intro();
in_wait_key();

// interrupt mode 2
setup_int();


add_sprites_for_all_levels();

reset_misifu_position();
Expand Down
2,622 changes: 1,311 additions & 1,311 deletions misifu.map

Large diffs are not rendered by default.

0 comments on commit f53e448

Please sign in to comment.