;-------------------------------------------------------------------------------- ;By John Kempen ; ;I haven't worked on this program for a long time, and I don't think I could finish ;it anytime soon. The original source code for Battle_d was lost, and this is the ;last version of battle I wrote. I don't remember what version of doors this will ;compile under, if any. It may need some fixing to work. ; ;If you can make a game out of this, please give me some credit for it. Also, I ;would appreciate if you e-mailed me the finished program. ; ;E-mail me if you have any comments: ;saywhat97@hotmail.com ;--------------------------------------------------------------------------------- include "doorsos.h" include "graphlib.h" include "userlib.h" include "hexlib.h" include "compat.h" xdef _main xdef _comment xdef _ti89 _main: lea game_status(pc),a6 move.b #1,(a6) lea y_add(pc),a6 move.w #74,(a6)+ move.w #-128,(a6) lea camera_coords(pc),a6 move.w #0,(a6)+ move.w #0,(a6)+ move.w #0,(a6)+ move.b #128,(a6)+ lea y_adjust(pc),a6 move.b #50,(a6) ;set up object table clr.l d7 lea max_object_num(pc),a6 move.b (a6),d7 muls.w #14,d7 move.l d7,-(a7) jsr tios::HeapAlloc lea 4(a7),a7 lea object_table_handle(pc),a6 move.w d0,(a6) ;set up Prev_pos_data_table clr.l d7 lea max_object_num(pc),a6 move.b (a6),d7 muls.w #14,d7 move.l d7,-(a7) jsr tios::HeapAlloc lea 4(a7),a7 lea Prev_pos_data_table_handle(pc),a6 move.w d0,(a6) ;set up object_type_table clr.l d7 lea object_type_number(pc),a6 move.b (a6),d7 muls.w #10,d7 move.l d7,-(a7) jsr tios::HeapAlloc lea 4(a7),a7 lea object_type_handle(pc),a6 move.w d0,(a6) doorsos::DEREF d0,a6 bsr make_object_type_table ;---- temporary lea object_table_handle(pc),a5 move.w (a5),d0 doorsos::DEREF d0,a5 bsr make_object_table ;-------------- move.w #$0700,d0 ;set bits 8,9 and 10 trap #1 ;put d0.w into SR lea sr(pc),a1 move.w d0,(a1) ;save old SR bsr player_status_strings_update game_loop lea game_status(pc),a6 cmpi.b #1,(a6) beq mode_1_control bra camera_control after_keypress_check lea shoot_timer(pc),a6 cmpi.w #0,(a6) beq object_update_setup subq.w #1,(a6) object_update_setup move.b #1,d7 lea current_object_number(pc),a6 move.b d7,(a6) lea object_num(pc),a6 cmpi.b #0,(a6) beq background_update object_update_loop lea object_type_handle(pc),a6 move.w (a6),d0 doorsos::DEREF d0,a4 lea object_type_address(pc),a6 move.l a4,(a6) lea object_table_handle(pc),a5 move.w (a5),d0 doorsos::DEREF d0,a5 bsr get_object_info lea current_object_type_num(pc),a6 cmpi.b #2,(a6) beq shell_position_update cmpi.b #1,(a6) beq ptank_position_update object_after_position_updates lea camera_coords(pc),a6 move.w (a6)+,d0 move.w (a6)+,d1 move.w (a6),d1 lea current_object_coords(pc),a6 move.l (a6),a5 move.w (a5)+,d2 move.w (a5)+,d3 move.w (a5),d3 add.w d2,d0 add.w d3,d1 cmpi.w #850,d0 bge offscreen_check_failed cmpi.w #-850,d0 ble offscreen_check_failed cmpi.w #850,d1 bge offscreen_check_failed cmpi.w #-850,d1 ble offscreen_check_failed bra after_offscreen_check offscreen_check_failed lea current_object_extra_info(pc),a6 move.l (a6),a5 addq.l #3,a5 move.b #1,(a5) bra object_check_repeat after_offscreen_check lea current_object_world_coords(pc),a0 move.l (a0),a5 lea current_object_verts(pc),a4 move.l (a4),a6 lea current_object_vert_num(pc),a4 move.b (a4),d7 bsr obj_copy_verts_to_world ;---------------- lea current_object_vert_num(pc),a6 move.b (a6),d6 lea current_object_angle(pc),a5 move.l (a5),a6 move.b (a6),d7 lea current_object_world_coords(pc),a0 move.l (a0),a6 bsr obj_rotate ;---------------- lea current_object_vert_num(pc),a6 move.b (a6),d7 lea current_object_world_coords(pc),a0 move.l (a0),a6 lea current_object_coords(pc),a0 move.l (a0),a5 bsr obj_translate ;---------------- lea current_object_vert_num(pc),a5 move.b (a5),d7 lea current_object_world_coords(pc),a0 move.l (a0),a6 bsr obj_camera_adjust ;---------------- object_convert_start lea current_object_lines(pc),a5 move.l (a5),a4 lea current_object_finished_lines(pc),a5 move.l (a5),a6 lea current_object_world_coords(pc),a0 move.l (a0),a5 lea current_object_line_num(pc),a3 clr.l d7 move.b (a3),d7 bsr obj_convert_world_to_screen ;---------------- object_check_repeat lea object_num(pc),a6 move.b (a6),d7 lea current_object_number(pc),a6 move.b (a6),d6 cmp.b d7,d6 beq background_update lea current_object_number(pc),a6 move.b (a6),d7 addq.b #1,d7 move.b d7,(a6) bra object_update_loop background_update jsr graphlib::clr_scr ;clears the screen move.b #1,d7 lea current_object_number(pc),a6 move.b d7,(a6) lea object_num(pc),a6 cmpi.b #0,(a6) beq draw_background draw_object_loop lea object_type_address(pc),a6 move.l (a6),a4 lea object_table_handle(pc),a5 move.w (a5),d0 doorsos::DEREF d0,a5 bsr get_object_info lea current_object_finished_lines(pc),a5 move.l (a5),a6 lea current_object_line_num(pc),a5 move.b (a5),d7 bsr draw_object_to_screen_start lea object_num(pc),a6 move.b (a6),d7 lea current_object_number(pc),a6 move.b (a6),d6 cmp.b d7,d6 beq draw_background lea current_object_number(pc),a6 move.b (a6),d7 addq.b #1,d7 move.b d7,(a6) bra draw_object_loop draw_background ;draw horizon move.l #2,d3 clr.l d1 lea y_adjust(pc),a6 move.b (a6),d1 move.l #0,d0 move.l #159,d2 jsr graphlib::horiz ;add stuff to draw bg lea game_status(pc),a6 move.b (a6),d7 cmpi.b #2,d7 beq draw_player_status cmpi.b #1,d7 beq game_loop lea press_2nd(pc),a0 move.b #255,d3 move.w #0,d0 move.w #0,d1 jsr graphlib::put_sprite_mask lea game_status(pc),a6 move.b (a6),d7 cmpi.b #4,d7 beq draw_game_over cmpi.b #0,d7 beq draw_f1_menu bra game_loop draw_f1_menu lea f1_menu(pc),a0 move.b #255,d3 move.w #0,d0 move.w #10,d1 jsr graphlib::put_sprite_mask bra game_loop draw_game_over lea game_over(pc),a0 move.w #37,d0 move.w #55,d1 jsr graphlib::put_sprite bra game_loop draw_player_status lea status_display(pc),a0 move.l #21826,a1 move.w #315,d7 draw_player_status_loop ;wrote for TI-89, needs modification if used on a TI-92 move.w (a0)+,(a1)+ subq.w #1,d7 cmpi.w #0,d7 bhi draw_player_status_loop ;from ti89.acz.org, modified to show scores lea player_score_start(pc),a1 move.l (a1),a0 move.w #1,-(a7) ;push string type move.l a0,-(a7) ;push a pointer to the string move.l #$00260051,-(a7) ;push coordinates 38,81 to display at ROM_CALL romfunc::DrawStrXY ;display the string lea 10(a7),a7 ;restore stack lea high_score_start(pc),a1 move.l (a1),a0 move.w #1,-(a7) ;push string type move.l a0,-(a7) ;push a pointer to the string move.l #$0026005a,-(a7) ;push coordinates 38,90 to display at ROM_CALL romfunc::DrawStrXY ;display the string lea 10(a7),a7 ;restore stack lea lives_left_start(pc),a1 move.l (a1),a0 move.w #1,-(a7) ;push string type move.l a0,-(a7) ;push a pointer to the string move.l #$00960056,-(a7) ;push coordinates 150,87 to display at ROM_CALL romfunc::DrawStrXY ;display the string lea 10(a7),a7 ;restore stack lea shoot_timer(pc),a6 cmpi.w #0,(a6) bne no_shoot_draw after_no_shoot_draw clr.l d7 lea player_health(pc),a6 move.b (a6),d7 move.w #96,d1 sub.w d7,d1 move.w #96,d3 move.l #$4c00,a0 move.w #96,d0 move.w #96,d2 jsr graphlib::line move.w #97,d0 move.w #97,d2 jsr graphlib::line move.w #98,d0 move.w #98,d2 jsr graphlib::line move.w #99,d0 move.w #99,d2 jsr graphlib::line ; ext.w d0 ; ext.w d1 ; ext.w d2 ; ext.w d3 ;96=y1 ;96=x1,x2 lea path_blocked(pc),a6 cmpi.b #1,(a6) beq stopped_draw after_stopped_draw bra game_loop stopped_draw lea stopped(pc),a0 move.b #255,d3 move.w #115,d0 move.w #86,d1 jsr graphlib::put_sprite_mask bra after_stopped_draw no_shoot_draw lea no_shoot_pic(pc),a0 move.b #0,d3 move.w #106,d0 move.w #88,d1 jsr graphlib::put_sprite_mask bra after_no_shoot_draw arrow_up_draw lea arrow_up(pc),a0 move.b #255,d3 move.w #115,d0 move.w #81,d1 jsr graphlib::put_sprite_mask bra game_loop arrow_down_draw lea arrow_down(pc),a0 move.b #255,d3 move.w #115,d0 move.w #81,d1 jsr graphlib::put_sprite_mask bra game_loop arrow_left_draw lea arrow_left(pc),a0 move.b #255,d3 move.w #115,d0 move.w #81,d1 jsr graphlib::put_sprite_mask bra game_loop arrow_right_draw lea arrow_right(pc),a0 move.b #255,d3 move.w #115,d0 move.w #81,d1 jsr graphlib::put_sprite_mask bra game_loop mode_1_control lea camera_angle(pc),a6 cmpi.b #0,(a6) beq mode_1_switch_to_2 sub.b #2,(a6) lea y_add(pc),a6 sub.w #1,(a6) lea z_add(pc),a6 add.w #2,(a6) bra after_keypress_check mode_1_switch_to_2 lea game_status(pc),a6 move.b #2,(a6) lea y_adjust(pc),a6 move.b #38,(a6) lea object_table_handle(pc),a6 move.w (a6),d0 doorsos::DEREF d0,a6 add.l #7,a6 move.b #1,(a6) bra after_keypress_check _exit quit del_another_object ;delete all the handles move.l #1,d7 bsr del_object_from_table lea object_num(pc),a6 move.b (a6),d6 cmpi.b #0,d6 bne del_another_object lea object_table_handle(pc),a6 move.w (a6),d0 move.w d0,-(a7) jsr tios::HeapFree ;restore the allocated memory lea 2(a7),a7 lea object_type_handle(pc),a6 move.w (a6),d0 move.w d0,-(a7) jsr tios::HeapFree ;restore the allocated memory lea 2(a7),a7 lea Prev_pos_data_table_handle(pc),a6 move.w (a6),d0 move.w d0,-(a7) jsr tios::HeapFree ;restore the allocated memory lea 2(a7),a7 lea sr(pc),a1 move.w (a1),d0 trap #1 ;put d0.w into SR rts shell_position_update lea current_object_extra_info(pc),a5 move.l (a5),a6 cmpi.w #300,(a6) bge shell_destroy addq.w #1,(a6) lea current_object_coords(pc),a6 move.l (a6),a5 move.l #5,d6 ;temporary speed bsr object_move_f bra object_after_position_updates shell_destroy lea current_object_number(pc),a6 clr.l d7 move.b (a6),d7 subq.b #1,(a6) bsr del_object_from_table bra object_check_repeat ptank_position_update lea current_object_coords(pc),a6 move.l (a6),a6 lea camera_coords(pc),a5 move.w (a5)+,(a6)+ move.w (a5)+,(a6)+ move.w (a5)+,(a6)+ move.b (a5),d0 neg d0 move.b d0,(a6) bra object_after_position_updates camera_control ;temporary controls for testing engine move.b #%1111110,($600019) ;set the row with 2nd in it nop nop nop nop move.b ($60001b),d0 ;read back keypress data btst.b #4,d0 beq player_shoot btst.b #1,d0 beq camera_turn_left btst.b #3,d0 beq camera_turn_right camera_control_1 btst.b #5,d0 beq cam_up btst.b #7,d0 beq cam_down camera_control_2 btst.b #0,d0 beq camera_move_forward btst.b #2,d0 beq camera_move_back camera_control_4 move.b #%0111111,($600019) nop nop nop nop nop nop nop nop nop nop nop move.b ($60001b),d0 btst.b #0,d0 beq quit move.b #%1111101,($600019) nop nop nop nop nop nop nop nop nop nop nop move.b ($60001b),d0 btst.b #1,d0 beq adjust_up btst.b #2,d0 beq adjust_down ;----- btst.b #4,d0 beq status_up btst.b #3,d0 beq status_down ;----- camera_control_5 bra after_keypress_check adjust_up lea y_adjust(pc),a6 sub.b #1,(a6) bra camera_control_5 adjust_down lea y_adjust(pc),a6 add.b #1,(a6) bra camera_control_5 status_up lea game_status(pc),a6 addq.b #1,(a6) bra camera_control_5 status_down lea game_status(pc),a6 subq.b #1,(a6) bra camera_control_5 player_shoot lea shoot_timer(pc),a6 cmpi.w #0,(a6) bne camera_control_4 lea camera_coords(pc),a6 move.w (a6)+,d0 ;x move.w (a6)+,d1 ;y move.w #0,d1 move.w (a6)+,d2 ;z move.b (a6),d3 ;angle neg.b d3 move.b #2,d4 ;type move.l #0,d5 ;extra bsr add_object_to_list lea shoot_timer(pc),a6 move.w #1,(a6) bra camera_control cam_up btst.b #7,d0 beq camera_control_2 lea camera_coords(pc),a5 addq #2,a5 addq.w #1,(a5) bra camera_control_2 cam_down lea camera_coords(pc),a5 addq #2,a5 subq.w #1,(a5) bra camera_control_2 camera_move_forward btst.b #2,d0 beq camera_control_4 lea camera_coords(pc),a5 move.l #1,d6 ;speed bsr cam_move_f bra after_keypress_check camera_move_back lea camera_coords(pc),a5 move.l #1,d6 ;speed bsr cam_move_b bra after_keypress_check camera_turn_right lea camera_angle(pc),a6 subq.b #1,(a6) bra camera_control_1 camera_turn_left btst.b #3,d0 beq camera_control_1 lea camera_angle(pc),a6 addq.b #1,(a6) bra camera_control_1 player_status_strings_update lea player_score(pc),a0 move.l (a0),d0 move.l #5,d1 lea player_score_string_buffer(pc),a0 ;point to last byte of buffer bsr ConvStr lea player_score_start(pc),a1 move.l a0,(a1) lea high_score(pc),a0 move.l (a0),d0 move.l #5,d1 lea high_score_string_buffer(pc),a0 ;point to last byte of buffer bsr ConvStr lea high_score_start(pc),a1 move.l a0,(a1) clr.l d0 lea lives_left(pc),a0 move.b (a0),d0 move.l #1,d1 lea lives_left_string_buffer(pc),a0 ;point to last byte of buffer bsr ConvStr lea lives_left_start(pc),a1 move.l a0,(a1) rts ;input: d0=x, d1=y, d2=z, d3=angle, d4=type, d5=extra data add_object_to_list clr.l d7 lea object_num(pc),a6 lea max_object_num(pc),a5 move.b (a5),d6 move.b (a6),d7 cmp.b d6,d7 beq add_object_to_list_end addq.b #1,(a6) muls.w #14,d7 lea object_table_handle(pc),a6 move.w (a6),d6 doorsos::DEREF d6,a6 add.l d7,a6 move.w d0,(a6)+ move.w d1,(a6)+ move.w d2,(a6)+ move.b d3,(a6)+ move.b d4,(a6)+ move.l #390,-(a7) jsr tios::HeapAlloc lea 4(a7),a7 move.w d0,(a6)+ move.l d5,(a6) add_object_to_list_end rts ;input: d7=object number del_object_from_table move.l d7,d6 subq.l #1,d7 muls.w #14,d7 ;move outside this routine later lea object_table_handle(pc),a6 move.w (a6),d0 doorsos::DEREF d0,a6 ;------------------------------- add.l d7,a6 lea object_num(pc),a5 clr.l d5 move.b (a5),d5 sub.l d6,d5 cmpi.b #0,d5 beq del_move_once del_move_once_end sub.b #1,(a5) move.l a6,a5 add.l #14,a5 move.l a6,a4 add.l #8,a4 move.w (a4),d4 move.l (a4),d3 del_move_loop move.l (a5)+,(a6)+ move.l (a5)+,(a6)+ move.w (a5)+,(a6)+ move.l (a5)+,(a6)+ subq.b #1,d5 cmpi.b #0,d5 bne del_move_loop move.w d4,-(a7) jsr tios::HeapFree ;restore the allocated memory lea 2(a7),a7 rts del_move_once move.l #1,d5 bra del_move_once_end make_object_table clr.l d7 ;----temporary ;------------- lea object_num(pc),a4 move.b #0,(a4) ;------------- ; move.w #0,d0 ;x ; move.w #0,d1 ;y ; move.w #0,d2 ;z ; move.b #0,d3 ;angle ; move.b #0,d4 ;type ; move.l #0,d5 ;extra ; bsr add_object_to_list ;------------- move.w #0,d0 ;x move.w #0,d1 ;y move.w #0,d2 ;z move.b #0,d3 ;angle move.b #0,d4 ;type move.l #0,d5 ;extra bsr add_object_to_list ;------------- move.w #0,d0 ;x move.w #0,d1 ;y move.w #29,d2 ;z move.b #0,d3 ;angle move.b #2,d4 ;type move.l #0,d5 ;extra bsr add_object_to_list ;------------- move.w #60,d0 ;x move.w #0,d1 ;y move.w #40,d2 ;z move.b #10,d3 ;angle move.b #3,d4 ;type move.l #0,d5 ;extra bsr add_object_to_list ;------------- move.w #-30,d0 ;x move.w #0,d1 ;y move.w #60,d2 ;z move.b #40,d3 ;angle move.b #4,d4 ;type move.l #0,d5 ;extra bsr add_object_to_list ;------------- ; move.w #-60,d0 ;x ; move.w #0,d1 ;y ; move.w #-80,d2 ;z ; move.b #0,d3 ;angle ; move.b #5,d4 ;type ; move.l #0,d5 ;extra ; bsr add_object_to_list ;------------- ; move.w #70,d0 ;x ; move.w #0,d1 ;y ; move.w #-30,d2 ;z ; move.b #0,d3 ;angle ; move.b #6,d4 ;type ; move.l #0,d5 ;extra ; bsr add_object_to_list ;------------- rts get_object_info clr.l d7 lea current_object_number(pc),a6 move.b (a6),d7 sub.l #1,d7 muls.w #14,d7 add.l a5,d7 move.l d7,a6 clr.l d7 lea current_object_coords(pc),a5 move.l a6,(a5) addq.l #6,a6 lea current_object_angle(pc),a5 move.l a6,(a5) addq.l #1,a6 move.b (a6)+,d7 lea current_object_type_num(pc),a5 move.b d7,(a5) ;------ muls.w #10,d7 add.l d7,a4 lea current_object_vert_num(pc),a3 clr.l d6 move.b (a4)+,d6 move.b d6,(a3) muls.w #6,d6 lea current_object_line_num(pc),a3 move.b (a4)+,(a3) lea current_object_verts(pc),a3 move.l (a4)+,(a3) lea current_object_lines(pc),a3 move.l (a4)+,(a3) ;---------- lea current_object_world_coords(pc),a5 move.w (a6),d7 doorsos::DEREF d7,a4 move.l a4,(a5) move.l a4,d7 add.l #2,a6 add.l d6,d7 lea current_object_finished_lines(pc),a5 move.l d7,(a5) lea current_object_extra_info(pc),a5 move.l a6,(a5) rts create_Prev_pos_data_table rts make_object_type_table lea obj_tank_vert_num(pc),a5 move.b (a5),(a6)+ lea obj_tank_line_num(pc),a5 move.b (a5),(a6)+ lea obj_tank_verts(pc),a5 move.l a5,(a6)+ lea obj_tank_lines(pc),a5 move.l a5,(a6)+ ;--------------- lea obj_ptank_vert_num(pc),a5 move.b (a5),(a6)+ lea obj_ptank_line_num(pc),a5 move.b (a5),(a6)+ lea obj_ptank_verts(pc),a5 move.l a5,(a6)+ lea obj_ptank_lines(pc),a5 move.l a5,(a6)+ ;----- lea obj_shell_vert_num(pc),a5 move.b (a5),(a6)+ lea obj_shell_line_num(pc),a5 move.b (a5),(a6)+ lea obj_shell_verts(pc),a5 move.l a5,(a6)+ lea obj_shell_lines(pc),a5 move.l a5,(a6)+ ;----- lea obj_obst1_vert_num(pc),a5 move.b (a5),(a6)+ lea obj_obst1_line_num(pc),a5 move.b (a5),(a6)+ lea obj_obst1_verts(pc),a5 move.l a5,(a6)+ lea obj_obst1_lines(pc),a5 move.l a5,(a6)+ ;----- lea obj_obst2_vert_num(pc),a5 move.b (a5),(a6)+ lea obj_obst2_line_num(pc),a5 move.b (a5),(a6)+ lea obj_obst2_verts(pc),a5 move.l a5,(a6)+ lea obj_obst2_lines(pc),a5 move.l a5,(a6)+ ;----- ; lea obj_obst3_vert_num(pc),a5 ; move.b (a5),(a6)+ ; ; lea obj_obst3_line_num(pc),a5 ; move.b (a5),(a6)+ ; ; lea obj_obst3_verts(pc),a5 ; move.l a5,(a6)+ ; ; lea obj_obst3_lines(pc),a5 ; move.l a5,(a6)+ ;----- lea obj_blast_vert_num(pc),a5 move.b (a5),(a6)+ lea obj_blast_line_num(pc),a5 move.b (a5),(a6)+ lea obj_blast_verts(pc),a5 move.l a5,(a6)+ lea obj_blast_lines(pc),a5 move.l a5,(a6)+ ;----- rts ;input: a6=world coord table, a5=location table location, d7=number of points in coord table; output: ;destroyed: obj_translate move.l a5,a3 obj_translate_loop move.l a3,a5 move.l a6,a4 move.w (a5)+,d0 move.w (a5)+,d1 move.w (a5)+,d2 move.w (a6)+,d3 move.w (a6)+,d4 move.w (a6)+,d5 add.w d0,d3 add.w d1,d4 add.w d2,d5 move.w d3,(a4)+ move.w d4,(a4)+ move.w d5,(a4)+ subq #1,d7 cmpi.b #0,d7 bhi obj_translate_loop rts ;input d7=angle, d6=number of points, a6=address of world coord table obj_rotate ;make matrix clr.l d5 move.b d7,d5 ;d4=cos, d3=sin move.l d5,d7 move.l a6,a5 jsr getcos move.w d7,d4 move.l d5,d7 jsr getsin move.w d7,d3 lea rotate_matrix(pc),a6 move.w d4,(a6)+ move.w #0,(a6)+ move.w d3,(a6)+ move.w #0,(a6)+ move.w #10000,(a6)+ move.w #0,(a6)+ neg.w d3 move.w d3,(a6)+ move.w #0,(a6)+ move.w d4,(a6) move.l d6,d7 move.l a5,a6 matrix_multiply ;a6=world coord table lea rotate_matrix(pc),a4 clr.l d3 clr.l d4 clr.l d5 move.w (a6)+,d3 move.w (a6)+,d4 ; muls #2,d4 move.w (a6)+,d5 ext.l d3 ext.l d4 ext.l d5 move.l #3,a2 matrix_multiply_row clr.l d0 clr.l d1 clr.l d2 move.w (a4)+,d0 move.w (a4)+,d1 move.w (a4)+,d2 ext.l d0 ext.l d1 ext.l d2 muls.w d3,d0 muls.w d4,d1 muls.w d5,d2 clr.l d6 add.l d0,d6 add.l d1,d6 add.l d2,d6 move.l d4,a3 move.w #10000,d4 divs d4,d6 move.l a3,d4 cmpi.l #$13880000,d6 bge object_rotate_round_up1 cmpi.l #$ec780000,d6 ble object_rotate_round_down1 object_rotate_round_up1_end: move.w d6,(a5)+ move.l a2,d6 subq #1,d6 move.l d6,a2 cmpi.b #0,d6 bgt matrix_multiply_row subq #1,d7 cmpi.b #0,d7 bgt matrix_multiply rts object_rotate_round_up1 addq #1,d6 bra object_rotate_round_up1_end object_rotate_round_down1 subq #1,d6 bra object_rotate_round_up1_end ;remove later ; move.l d4,d0 ; move.l #7,d4 ; move.l #1,d1 ; move.l #1,d2 ; jsr hexlib::put_hex ; move.l d5,d0 ; move.l #7,d4 ; move.l #2,d1 ; move.l #2,d2 ; jsr hexlib::put_hex ;end remove ;input: a6=vert table, a5=world coord table d7=number of points in vert table; output: ;destroyed: obj_copy_verts_to_world ; clr.l d4 ; clr.l d5 ; clr.l d6 move.b (a6)+,d4 move.b (a6)+,d5 move.b (a6)+,d6 ext.w d4 ext.w d5 ext.w d6 move.w d4,(a5)+ move.w d5,(a5)+ move.w d6,(a5)+ subq #1,d7 cmpi.b #0,d7 bgt obj_copy_verts_to_world rts ;input: a6=world coord table d7=number of points in coord table; output: ;destroyed: obj_camera_adjust move.l a6,a3 move.l d7,d6 obj_camera_adjust_loop lea camera_coords(pc),a5 move.l a6,a4 move.w (a5)+,d0 move.w (a5)+,d1 move.w (a5)+,d2 move.w (a6)+,d3 move.w (a6)+,d4 move.w (a6)+,d5 sub.w d0,d3 sub.w d1,d4 sub.w d2,d5 move.w d3,(a4)+ move.w d4,(a4)+ move.w d5,(a4)+ subq #1,d7 cmpi.b #0,d7 bhi obj_camera_adjust_loop ;add stuff to get it going ;input d7=angle, d6=number of points, a6=address of world coord table move.l a3,a6 lea camera_angle(pc),a5 move.b (a5),d7 bsr obj_rotate rts ;input: a6=xy coord line table, a5=world table, a4=line table, d7=number of lines; output: ; destroyed: obj_convert_world_to_screen obj_convert_world_to_screen_loop: ;free registers a0,a1,a2,a3,d6 clr.l d0 ;NOTE: this subroutine was wrote for a TI-89, it would need to be modified for a TI-92+ clr.l d1 clr.l d2 clr.l d3 clr.l d4 clr.l d5 move.b (a4)+,d0 move.b (a4)+,d1 muls #6,d0 muls #6,d1 add.l a5,d0 add.l a5,d1 move.l d0,a2 move.l d1,a3 move.w (a2)+,d0 move.w (a2)+,d1 move.w (a2),d2 move.w (a3)+,d3 move.w (a3)+,d4 move.w (a3),d5 lea x_add(pc),a1 sub.w (a1),d0 sub.w (a1),d3 lea y_add(pc),a1 sub.w (a1),d1 sub.w (a1),d4 lea z_add(pc),a1 sub.w (a1),d2 sub.w (a1),d5 cmpi.w #0,d2 ble obj_convert_world_zclip1 cmpi.w #0,d5 ble obj_convert_world_zclip2 after_obj_convert_world_zclip1_2 cmpi.w #750,d2 bge obj_convert_world_off_screen cmpi.w #750,d5 bge obj_convert_world_off_screen cmpi.w #450,d2 bge obj_convert_x_trim cmpi.w #450,d5 bge obj_convert_x_trim cmpi.w #408,d0 bge obj_convert_world_off_screen cmpi.w #408,d3 bge obj_convert_world_off_screen cmpi.w #-408,d0 ble obj_convert_world_off_screen cmpi.w #-408,d3 ble obj_convert_world_off_screen bra after_obj_convert_x_trim obj_convert_x_trim cmpi.w #818,d0 bge obj_convert_world_off_screen cmpi.w #818,d3 bge obj_convert_world_off_screen cmpi.w #-818,d0 ble obj_convert_world_off_screen cmpi.w #-818,d3 ble obj_convert_world_off_screen bra after_obj_convert_x_trim after_obj_convert_x_trim ;d0 = 250 if line is COMPLETELY off screen muls.w #80,d0 ; divs.w d2,d0 add.w #80,d0 muls.w #80,d1 ; divs.w d2,d1 clr.l d6 lea y_adjust(pc),a0 move.b (a0),d6 sub.w d1,d6 move.l d6,d1 muls.w #80,d3 ; divs.w d5,d3 add.w #80,d3 muls.w #80,d4 ; divs.w d5,d4 clr.l d6 lea y_adjust(pc),a0 move.b (a0),d6 sub.w d4,d6 move.l d6,d4 ;d2,d5,d6,a0,a1,a2,a3 are safe to use from here on cmpi.w #0,d0 blt obj_convert_world_xt1l cmpi.w #0,d3 blt obj_convert_world_xt2l after_obj_convert_world_xt1_2 cmpi.w #159,d0 bgt obj_convert_world_xt1r cmpi.w #159,d3 bgt obj_convert_world_xt2r after_obj_convert_world_xtr1_2 cmpi.w #0,d1 blt obj_convert_world_ytu1 cmpi.w #0,d4 blt obj_convert_world_ytu2 after_obj_convert_world_ytu1_2 lea game_status(pc),a0 move.b (a0),d2 cmpi.b #2,d2 beq other_mode_clip bra demo_mode_clip other_mode_clip cmpi.w #77,d1 bgt obj_convert_world_ytd1a cmpi.w #77,d4 bgt obj_convert_world_ytd2a bra after_obj_convert_world_ytd1_2 demo_mode_clip cmpi.w #99,d1 bgt obj_convert_world_ytd1 cmpi.w #99,d4 bgt obj_convert_world_ytd2 after_obj_convert_world_ytd1_2 obj_convert_world_off_screen_end move.b d0,(a6)+ move.b d1,(a6)+ move.b d3,(a6)+ move.b d4,(a6)+ subq #1,d7 cmpi.w #0,d7 bgt obj_convert_world_to_screen_loop rts ;clipping and culling routines obj_convert_world_off_screen: move.b #250,d0 bra obj_convert_world_off_screen_end obj_convert_world_zclip2 exg d0,d3 exg d1,d4 exg d2,d5 obj_convert_world_zclip1 cmp.w #0,d5 ble obj_convert_world_off_screen cmp.w d0,d3 beq object_convert_after_x move.l d7,a0 move.l d3,d6 sub.w d0,d6 ;a cmpi.w #0,d6 blt obj_convert_world_x_neg after_obj_convert_world_x_neg move.l d2,d7 neg.w d7 addq #1,d7 ;c move.l d7,a1 add.w d5,a1 ;b muls.w d7,d6 ;c*a move.l a1,d7 divs.w d7,d6 ;c/b move.l d0,d7 cmp.w d0,d3 bgt obj_convert_world_x_1 blt obj_convert_world_x obj_convert_world_x sub.w d6,d7 move.w d7,d0 move.l a0,d7 bra object_convert_after_x obj_convert_world_x_neg neg.w d6 bra after_obj_convert_world_x_neg obj_convert_world_x_1 add.w d6,d7 move.w d7,d0 move.l a0,d7 object_convert_after_x cmp.w d1,d4 beq object_convert_y_same bgt obj_convert_world_y_1 blt obj_convert_world_y bra obj_convert_world_off_screen object_convert_y_same move.l #1,d2 bra after_obj_convert_world_zclip1_2 obj_convert_world_y_neg neg.l d6 bra after_obj_convert_world_y_neg obj_convert_world_y_1 obj_convert_world_y move.l d7,a0 move.l d4,d6 sub.w d1,d6 ;a cmpi.w #0,d6 blt obj_convert_world_y_neg after_obj_convert_world_y_neg move.l d2,d7 neg.w d7 addq #1,d7 ;c add.w d5,d7 ;b muls.w d2,d6 divs.w d7,d6 move.l d1,d7 add.w d7,d6 move.w d6,d1 move.l a0,d7 move.l #1,d2 bra after_obj_convert_world_zclip1_2 obj_convert_world_xt2l exg d0,d3 exg d1,d4 obj_convert_world_xt1l cmpi.w #0,d3 ble obj_convert_world_off_screen cmp.w d1,d4 beq obj_convert_world_xt1l_e bra obj_convert_world_xt1l_l_g obj_convert_world_xt1l_e move.l #0,d0 bra after_obj_convert_world_xt1_2 obj_convert_world_xt1l_l_g move.l d4,d6 move.l d1,d2 sub.l d1,d6 ;a neg.l d0 ;c move.l d0,d5 add.l d3,d5 ;b muls.w d0,d6 divs.w d5,d6 add.l d2,d6 move.w d6,d1 move.w #0,d0 bra after_obj_convert_world_xt1_2 obj_convert_world_xt2r exg d0,d3 exg d1,d4 obj_convert_world_xt1r cmpi.w #159,d3 bge obj_convert_world_off_screen cmp.w d1,d4 beq obj_convert_world_xt1r_e bra obj_convert_world_xt1r_l_g obj_convert_world_xt1r_e move.l #159,d0 bra after_obj_convert_world_xt1_2 obj_convert_world_xt1r_l_g move.l d4,d6 move.l d1,d2 sub.l d1,d6 ;a sub.w #159,d0 ;c move.l d3,d5 sub.w #159,d5 neg d5 add.w d0,d5 ;b muls.w d0,d6 divs.w d5,d6 add.l d2,d6 move.w d6,d1 move.w #159,d0 bra after_obj_convert_world_xtr1_2 obj_convert_world_ytu2 exg d0,d3 exg d1,d4 obj_convert_world_ytu1 cmpi.w #0,d4 ble obj_convert_world_off_screen cmp.w d0,d3 beq obj_convert_world_ytu1l_e bra obj_convert_world_ytu1l_l_g obj_convert_world_ytu1l_e move.l #0,d1 bra after_obj_convert_world_ytu1_2 obj_convert_world_ytu1l_l_g move.l d3,d6 move.l d0,d2 sub.l d0,d6 ;a neg.l d1 ;c move.l d1,d5 add.l d4,d5 ;b muls.w d1,d6 divs.w d5,d6 add.l d2,d6 move.w d6,d0 move.w #0,d1 bra after_obj_convert_world_ytu1_2 obj_convert_world_ytd2a exg d0,d3 exg d1,d4 obj_convert_world_ytd1a cmpi.w #77,d4 bge obj_convert_world_off_screen cmp.w d0,d3 beq obj_convert_world_ytd1_ea bra obj_convert_world_ytd1_l_ga obj_convert_world_ytd1_ea move.l #77,d1 bra after_obj_convert_world_ytd1_2 obj_convert_world_ytd1_l_ga move.l d3,d6 move.l d0,d2 sub.l d0,d6 ;a sub.w #77,d1 ;c move.l d4,d5 sub.w #77,d5 neg d5 add.w d1,d5 ;b muls.w d1,d6 divs.w d5,d6 add.l d2,d6 move.w d6,d0 move.w #77,d1 bra after_obj_convert_world_ytd1_2 obj_convert_world_ytd2 exg d0,d3 exg d1,d4 obj_convert_world_ytd1 cmpi.w #99,d4 bge obj_convert_world_off_screen cmp.w d0,d3 beq obj_convert_world_ytd1_e bra obj_convert_world_ytd1_l_g obj_convert_world_ytd1_e move.l #99,d1 bra after_obj_convert_world_ytd1_2 obj_convert_world_ytd1_l_g move.l d3,d6 move.l d0,d2 sub.l d0,d6 ;a sub.w #99,d1 ;c move.l d4,d5 sub.w #99,d5 neg d5 add.w d1,d5 ;b muls.w d1,d6 divs.w d5,d6 add.l d2,d6 move.w d6,d0 move.w #99,d1 bra after_obj_convert_world_ytd1_2 ;end conversions (that was HUGE!) ;input: a6=xy line table, d7=number of lines, draw_object_to_screen_start lea current_object_extra_info(pc),a4 move.l (a4),a5 addq.l #3,a5 cmpi.b #1,(a5) beq draw_object_end clr.w d0 clr.w d1 clr.w d2 clr.w d3 move.b (a6)+,d0 move.b (a6)+,d1 move.b (a6)+,d2 move.b (a6)+,d3 cmpi.b #250,d0 beq draw_object_skip_line move.l #$4C00,A0 jsr graphlib::line draw_object_skip_line subq #1,d7 cmpi.b #0,d7 bgt draw_object_to_screen_start draw_object_end rts ;input: a5= address of position table, d6= distance object_move_f move.l a5,a4 clr.l d4 clr.l d5 clr.l d7 move.w (a5)+,d4 move.w (a5)+,d5 move.w (a5)+,d5 move.b (a5)+,d7 neg.b d7 bsr cam_move_f_or_b sub.w d3,d4 add.w d2,d5 move.w d4,(a4)+ move.w (a4)+,d4 move.w d5,(a4)+ rts ;input: a5= address of position table, d6= distance object_move_b: move.l a5,a4 clr.l d4 clr.l d5 clr.l d7 move.w (a5)+,d4 move.w (a5)+,d5 move.w (a5)+,d5 move.b (a5)+,d7 neg.b d7 bsr cam_move_f_or_b add.w d3,d4 sub.w d2,d5 move.w d4,(a4)+ move.w (a4)+,d4 move.w d5,(a4)+ rts ;input: a5= address of position table, d6= distance cam_move_f: move.l a5,a4 clr.l d4 clr.l d5 clr.l d7 move.w (a5)+,d4 move.w (a5)+,d5 move.w (a5)+,d5 move.b (a5)+,d7 bsr cam_move_f_or_b sub.w d3,d4 add.w d2,d5 move.w d4,(a4)+ move.w (a4)+,d4 move.w d5,(a4)+ rts ;input: a5= address of position table, d6= distance cam_move_b: move.l a5,a4 clr.l d4 clr.l d5 clr.l d7 move.w (a5)+,d4 move.w (a5)+,d5 move.w (a5)+,d5 move.b (a5)+,d7 bsr cam_move_f_or_b add.w d3,d4 sub.w d2,d5 move.w d4,(a4)+ move.w (a4)+,d4 move.w d5,(a4)+ rts ;input: d7=angle (256=360), d6=distance, d5=beginning z coord, d4=beginning x coord; output: d5=new z coord, d4=new x coord; destroyed: d0, d1, d2, d3, d7, a6 cam_move_f_or_b move.l d7,d3 jsr getsin muls.w d6,d7 move.l #10000,d0 divs d0,d7 cmpi.l #$13880000,d7 bge object_move_round_up1 cmpi.l #$ec780000,d7 ble object_move_round_down1 object_move_round_up1_end: move.l #0,a6 move.w d7,a6 move.l d3,d7 move.l a6,d3 jsr getcos muls.w d6,d7 move.l #10000,d0 divs d0,d7 cmpi.l #$13880000,d7 bge object_move_round_up2 cmpi.l #$ec780000,d7 ble object_move_round_down2 object_move_round_up2_end: move.l #0,a6 move.w d7,a6 move.l a6,d2 ext.w d2 ext.w d3 rts object_move_round_up1: addq #1,d7 bra object_move_round_up1_end object_move_round_up2: addq #1,d7 bra object_move_round_up2_end object_move_round_down1: subq #1,d7 bra object_move_round_up1_end object_move_round_down2: subq #1,d7 bra object_move_round_up2_end ;input: d7=angle (256=360); output: d7=sin of angle *10,000; destroyed: d0, d1, a6 getcos: add.b #64,d7 ;input: d7=angle (256=360); output: d7=sin of angle *10,000; destroyed: d0, d1, a6 getsin: move.l d7,d1 cmpi.b #128,d7 bhi getsin_minus128 getsin_after_minus_check: cmpi.b #64,d7 bhi getsin_over_90 getsin_after_over_90_check: clr.l d0 move.b #2,d0 muls.w d0,d7 lea sintable(pc),a6 add.l d7,a6 move.w (a6),d7 ext.l d7 cmpi.b #128,d1 bhi getsin_negate rts getsin_minus128: subi.b #128,d7 bra getsin_after_minus_check getsin_over_90: move.l #128,a6 sub.l d7,a6 move.l a6,d7 bra getsin_after_over_90_check getsin_negate: neg.l d7 rts ;this was written by Jimmy Mardell, modified by me ConvStr: adda.l d1,a0 clr.b (a0) subq.b #1,d1 RepConv: divu.w #10,d0 move.l d0,d2 lsr.l #8,d2 lsr.l #8,d2 add.b #48,d2 move.b d2,-(a0) and.l #$FFFF,d0 cmpi.l #0,d0 beq endconv dbra d1,RepConv endconv rts max_object_num dc.b 100 object_type_number dc.b 8 y_adjust dc.b 0 object_num dc.b 0 ;room 6 sr dc.l 0 object_type_handle ` dc.w 0 object_type_address dc.l 0 object_table_handle dc.w 0 Prev_pos_data_table_handle dc.w 0 Prev_pos_data_table_address dc.l 0 current_object_type_num dc.b 1 current_object_number dc.b 0 current_object_vert_num dc.b 0 current_object_line_num dc.b 0 current_object_verts dc.l 0 current_object_lines dc.l 0 current_object_finished_lines dc.l 0 current_object_world_coords dc.l 0 current_object_coords dc.l 0 current_object_angle dc.l 0 current_object_extra_info dc.l 0 game_status dc.b 1 dc.b 0 path_blocked dc.b 1 lives_left dc.b 3 x_add dc.w 0 y_add dc.w 74 z_add dc.w -128 player_score dc.l 10 high_score dc.l 10 player_score_string ds.b 9 player_score_string_buffer dc.b 0 high_score_string ds.b 9 high_score_string_buffer dc.b 0 lives_left_string ds.b 9 lives_left_string_buffer dc.b 0 player_score_start dc.l 0 high_score_start dc.l 0 lives_left_start dc.l 0 shoot_timer dc.w 0 player_health dc.b 13 ;out of 13 (just a coincidence!) dc.b 0 ;rotation matrix rotate_matrix dc.w 10000,0,0 dc.w 0,10000,0 dc.w 0,0,10000 ;camera data camera_coords dc.w 0 ;x coord dc.w 0 ;y coord dc.w 0 ;z coord camera_angle dc.b 0 ;angle, 256=360 degrees dc.b 0 sintable: dc.w 0 dc.w 245 dc.w 491 dc.w 736 dc.w 980 dc.w 1224 dc.w 1467 dc.w 1710 dc.w 1951 dc.w 2191 dc.w 2430 dc.w 2667 dc.w 2903 dc.w 3137 dc.w 3369 dc.w 3599 dc.w 3827 dc.w 4052 dc.w 4276 dc.w 4496 dc.w 4714 dc.w 4929 dc.w 5141 dc.w 5350 dc.w 5556 dc.w 5758 dc.w 5957 dc.w 6152 dc.w 6344 dc.w 6532 dc.w 6716 dc.w 6895 dc.w 7071 dc.w 7242 dc.w 7410 dc.w 7572 dc.w 7730 dc.w 7883 dc.w 8032 dc.w 8176 dc.w 8315 dc.w 8449 dc.w 8577 dc.w 8701 dc.w 8819 dc.w 8932 dc.w 9040 dc.w 9142 dc.w 9239 dc.w 9330 dc.w 9415 dc.w 9495 dc.w 9569 dc.w 9638 dc.w 9700 dc.w 9757 dc.w 9808 dc.w 9853 dc.w 9892 dc.w 9925 dc.w 9952 dc.w 9973 dc.w 9988 dc.w 9997 dc.w 10000 ;object data obj_ptank_vert_num dc.b 4 ;number of vertices obj_ptank_verts dc.b -10,0,28 dc.b -10,0,-28 dc.b 10,0,-28 dc.b 10,0,28 obj_ptank_line_num dc.b 4 ;number of lines obj_ptank_lines dc.b 0,1 dc.b 1,2 dc.b 2,3 dc.b 3,0 obj_tank_vert_num dc.b 24 ;number of vertices obj_tank_verts dc.b -10,0,20 ;x,y,z coords for vertices dc.b -10,0,-23 dc.b 10,0,-23 dc.b 10,0,20 dc.b -12,5,29 dc.b -12,5,-28 dc.b 12,5,-28 dc.b 12,5,29 dc.b -9,9,6 dc.b -9,9,-23 dc.b 9,9,-23 dc.b 9,9,6 dc.b -8,14,-2 dc.b -8,14,-20 dc.b 8,14,-20 dc.b 8,14,-2 dc.b -2,9,29 dc.b -2,13,29 dc.b 2,13,29 dc.b 2,9,29 dc.b -2,9,6 dc.b -2,13,-1 dc.b 2,13,-1 dc.b 2,9,6 obj_tank_line_num dc.b 40 ;number of lines obj_tank_lines dc.b 0,1 ;pt1 connects to pt 2 dc.b 1,2 dc.b 2,3 dc.b 3,0 dc.b 4,5 dc.b 5,6 dc.b 6,7 dc.b 7,4 dc.b 0,4 dc.b 1,5 dc.b 2,6 dc.b 3,7 dc.b 8,9 dc.b 9,10 dc.b 10,11 dc.b 11,8 dc.b 8,4 dc.b 9,5 dc.b 10,6 dc.b 11,7 dc.b 12,13 dc.b 13,14 dc.b 14,15 dc.b 15,12 dc.b 8,12 dc.b 9,13 dc.b 10,14 dc.b 11,15 dc.b 16,17 dc.b 17,18 dc.b 18,19 dc.b 19,16 dc.b 20,21 dc.b 21,22 dc.b 22,23 dc.b 23,20 dc.b 16,20 dc.b 17,21 dc.b 18,22 dc.b 19,23 obj_shell_vert_num dc.b 9 obj_shell_verts dc.b 2,9,0 dc.b -2,9,0 dc.b -2,13,0 dc.b 2,13,0 dc.b 2,9,5 dc.b -2,9,5 dc.b -2,13,5 dc.b 2,13,5 dc.b 0,11,9 dc.b 0 ;--prevent address error obj_shell_line_num dc.b 16 obj_shell_lines dc.b 0,1 dc.b 1,2 dc.b 2,3 dc.b 3,0 dc.b 4,5 dc.b 5,6 dc.b 6,7 dc.b 7,4 dc.b 0,4 dc.b 1,5 dc.b 2,6 dc.b 3,7 dc.b 8,4 dc.b 8,5 dc.b 8,6 dc.b 8,7 obj_blast_vert_num dc.b 8 obj_blast_verts dc.b 1,11,10 dc.b -1,11,10 dc.b -1,9,7 dc.b 1,9,7 dc.b 1,11,-7 dc.b -1,11,-7 dc.b -1,9,-10 dc.b 1,9,-10 obj_blast_line_num dc.b 12 obj_blast_lines dc.b 0,1 dc.b 1,2 dc.b 2,3 dc.b 3,0 dc.b 4,5 dc.b 5,6 dc.b 6,7 dc.b 7,4 dc.b 0,4 dc.b 1,5 dc.b 2,6 dc.b 3,7 obj_obst1_vert_num dc.b 8 obj_obst1_verts dc.b 28,0,5 dc.b 28,0,-5 dc.b -28,0,-5 dc.b -28,0,5 dc.b 27,16,2 dc.b 27,16,-2 dc.b -27,16,-2 dc.b -27,16,2 obj_obst1_line_num dc.b 12 obj_obst1_lines dc.b 0,1 dc.b 1,2 dc.b 2,3 dc.b 3,0 dc.b 4,5 dc.b 5,6 dc.b 6,7 dc.b 7,4 dc.b 0,4 dc.b 1,5 dc.b 2,6 dc.b 3,7 obj_obst2_vert_num dc.b 16 obj_obst2_verts dc.b 14,0,14 dc.b 14,0,-14 dc.b -14,0,-14 dc.b -14,0,14 dc.b 8,63,8 dc.b 8,63,-8 dc.b -8,63,-8 dc.b -8,63,8 dc.b 13,63,13 dc.b 13,63,-13 dc.b -13,63,-13 dc.b -13,63,13 dc.b 13,68,13 dc.b 13,68,-13 dc.b -13,68,-13 dc.b -13,68,13 obj_obst2_line_num dc.b 24 obj_obst2_lines dc.b 0,1 dc.b 1,2 dc.b 2,3 dc.b 3,0 dc.b 4,5 dc.b 5,6 dc.b 6,7 dc.b 7,4 dc.b 0,4 dc.b 1,5 dc.b 2,6 dc.b 3,7 dc.b 8,9 dc.b 9,10 dc.b 10,11 dc.b 11,8 dc.b 12,13 dc.b 13,14 dc.b 14,15 dc.b 15,12 dc.b 8,12 dc.b 9,13 dc.b 10,14 dc.b 11,15 ;obj_obst3_vert_num ; dc.b 29 ;obj_obst3_verts ; dc.b 34,0,34 ; dc.b 34,0,-34 ; dc.b -34,0,-34 ; dc.b -34,0,34 ; ; dc.b 20,0,34 ; dc.b -20,0,34 ; dc.b -34,0,20 ; dc.b -34,0,-20 ; dc.b -20,0,-34 ; dc.b 20,0,-34 ; dc.b 34,0,-20 ; dc.b 34,0,20 ; dc.b 12,9,24 ; dc.b -12,9,24 ; dc.b -24,9,12 ; dc.b -24,9,-12 ; dc.b -12,9,-24 ; dc.b 12,9,-24 ; dc.b 24,9,-12 ; dc.b 24,9,12 ; dc.b 5,-4,11 ; dc.b -5,-4,11 ; dc.b -11,-4,5 ; dc.b -11,-4,-5 ; dc.b -5,-4,-11 ; dc.b 5,-4,-11 ; dc.b 11,-4,-5 ; dc.b 11,-4,5 ; dc.b 0,-7,0 ; dc.b 0 ;obj_obst3_line_num ; dc.b 52;48 ;obj_obst3_lines ; dc.b 0,1 ; dc.b 1,2 ; dc.b 2,3 ; dc.b 3,0 ; ; ; ; dc.b 4,5 ; dc.b 5,6 ; dc.b 6,7 ; dc.b 7,8 ; dc.b 8,9 ; dc.b 9,10 ; dc.b 10,11 ; dc.b 11,4 ; dc.b 12,13 ; dc.b 13,14 ; dc.b 14,15 ; dc.b 15,16 ; dc.b 16,17 ; dc.b 17,18 ; dc.b 18,19 ; dc.b 19,12 ; dc.b 4,12 ; dc.b 5,13 ; dc.b 6,14 ; dc.b 7,15 ; dc.b 8,16 ; dc.b 9,17 ; dc.b 10,18 ; dc.b 11,19 ; dc.b 20,21 ; dc.b 21,22 ; dc.b 22,23 ; dc.b 23,24 ; dc.b 24,25 ; dc.b 25,26 ; dc.b 26,27 ; dc.b 27,20 ; dc.b 12,20 ; dc.b 13,21 ; dc.b 14,22 ; dc.b 15,23 ; dc.b 16,24 ; dc.b 17,25 ; dc.b 18,26 ; dc.b 19,27 ; dc.b 28,20 ; dc.b 28,21 ; dc.b 28,22 ; dc.b 28,23 ; dc.b 28,24 ; dc.b 28,25 ; dc.b 28,26 ; dc.b 28,27 ;background data ;graphics data arrow_up dc.w 7 dc.w 1 dc.b %00010000 dc.b %00111000 dc.b 124 dc.b %00010000 dc.b %00010000 dc.b %00010000 dc.b %00010000 dc.b 0 arrow_down dc.w 7 dc.w 1 dc.b %00010000 dc.b %00010000 dc.b %00010000 dc.b %00010000 dc.b 124 dc.b %00111000 dc.b %00010000 dc.b 0 arrow_left dc.w 7 dc.w 1 dc.b 0 dc.b %00100000 dc.b %01100000 dc.b 254 dc.b %01100000 dc.b %00100000 dc.b 0 dc.b 0 arrow_right dc.w 7 dc.w 1 dc.b 0 dc.b %00001000 dc.b %00001100 dc.b 254 dc.b %00001100 dc.b %00001000 dc.b 0 dc.b 0 stopped dc.w 7 dc.w 1 dc.b %00111000 dc.b %01000100 dc.b %10101010 dc.b %10010010 dc.b %10101010 dc.b %01000100 dc.b %00111000 dc.b 0 no_shoot_pic dc.w 3 dc.w 1 dc.b %10100000 dc.b %01000000 dc.b %10100000 dc.b 0 press_2nd dc.w 9 dc.w 6 dc.b %11110011,255,255,255,%00111111,254 dc.b %10001000,0,0,0,%01000000,1 dc.b %10001010,%11000111,%00011100,%01110000,%01011000,%00000101 dc.b %11110011,%00101000,%10100000,%10000000,%01000101,%10001101 dc.b %10000010,%00001111,%10011100,%01110000,%01001001,%01010101 dc.b %10000010,%00001000,%00000010,%00001000,%01010001,%01010101 dc.b %10000010,%00000111,%00111100,%01111000,%01011101,%01001101 dc.b 0,0,0,0,%01000000,1 dc.b 255,255,255,255,%00111111,254 f1_menu dc.w 9 dc.w 5 dc.b %10001011,255,255,%10011111,%11111100 dc.b %11011000,0,0,%00100000,%00000010 dc.b %10101001,%11001011,%00100010,%00100111,%00100010 dc.b %10101010,%00101100,%10100010,%00100100,%01100010 dc.b %10001011,%11101000,%10100010,%00100110,%00100010 dc.b %10001010,%00001000,%10100110,%00100100,%00100010 dc.b %10001001,%11001000,%10011010,%00100100,%01110010 dc.b 0,0,0,%00100000,%00000010 dc.b 255,255,255,%10011111,%11111100 dc.b 0 game_over dc.w 28 dc.w 11 ;graphic dc.b 0,0,0,0,0,0,0,0,0,0,0 dc.b 0,%00000111,%11111000,%00000111,%10000000,%11100000,1,%11101111,255,0,0 dc.b 0,%00111111,%11111100,%00001111,%11000000,%11110000,%00000011,%11100111,255,%10000000,0 dc.b 0,%01111000,%00111000,%00011111,%11000000,%11111100,%00000011,%11110111,%11000000,0,0 dc.b 0,%01111000,0,%00111101,%11100000,254,%00000111,%11110011,254,0,0 dc.b 0,%11110011,%11100000,%01111111,%11100000,255,%00001111,%11111011,255,0,0 dc.b 1,%11100111,%11110000,255,%11110001,%11110011,%10011110,%01111001,%11100000,0,0 dc.b 1,%11100001,%11110001,%11100000,%11110001,%11110001,254,%01111000,%11100000,0,0 dc.b %00000011,255,%11100011,%11000000,%01111001,%11110000,%11111100,%00111100,%01111111,%11111100,0 dc.b 1,255,%00000111,%10000000,%01111001,%11110000,%01111000,%00111100,%00111111,254,0 dc.b 0,0,0,0,0,0,0,0,0,0,0 dc.b 0,%00011111,%11100000,%01111000,%00000011,%11001111,255,%11000000,255,0,0 dc.b 0,%01111111,%11111000,%01111000,%00000111,%10001111,255,%11100011,255,%11000000,0 dc.b 1,255,%11111100,124,%00000111,%10001111,255,%11100111,255,%11110000,0 dc.b %00000011,%11111001,%11111100,%00111100,%00001111,%00001111,%10000000,%00000111,%11000000,%01111000,0 dc.b %00000011,%11100000,%11111000,%00111100,%00011111,%00001111,%10000000,%00000011,%11100000,124,0 dc.b %00000111,%10000000,%11111000,%00111100,%00011110,%00001111,255,%00000011,%11100000,%00111100,0 dc.b %00000111,%10000001,%11110000,%00111110,%00111100,%00001111,255,1,255,254,0 dc.b %00001111,1,%11110000,%00111110,124,%00000111,255,%10000001,255,%11111100,0 dc.b %00011111,%00000011,%11110000,%00011110,%01111000,%00000111,255,%10000000,255,%11111100,0 dc.b %00011110,%00000011,%11100000,%00011110,%11111000,%00000111,%11000000,0,255,%11111000,0 dc.b %00111111,%00001111,%11100000,%00011111,%11110000,%00000111,%11000000,0,124,%01111110,0 dc.b %00111111,%10111111,%11000000,%00011111,%11100000,%00000111,%11000000,0,124,%00111111,0 dc.b %01111111,255,%11000000,%00011111,%11100000,%00000111,255,%11111100,%00111110,%00011111,%10000000 dc.b %00111111,255,%10000000,%00001111,%11000000,%00000111,255,%11111100,%00111110,%00000111,%11100000 dc.b %00111111,254,0,%00001111,%11000000,%00000111,255,254,%00011111,%00000011,%11110000 dc.b %00011111,%11111000,0,%00001111,%10000000,%00000111,255,254,%00011111,1,%11111000 dc.b 0,0,0,0,0,0,0,0,0,0,0 ;mask dc.b 0,%00001111,%11111100,%00001111,%11000001,%11110000,%00000011,255,255,%10000000,0 dc.b 0,%01111111,%11111100,%00011111,%11100001,%11111000,%00000111,255,255,%11000000,0 dc.b 0,255,254,%00111111,%11100001,254,%00000111,255,255,%11000000,0 dc.b 0,255,%11111100,%01111111,%11110001,255,%00001111,255,255,%11000000,0 dc.b 1,255,%11111100,255,%11110001,255,%10011111,255,255,%10000000,0 dc.b %00000011,255,%11111001,255,%11111011,255,255,255,255,%10000000,0 dc.b %00000011,255,%11111011,255,%11111011,255,255,255,255,%10000000,0 dc.b %00000111,255,255,255,255,255,255,255,255,254,0 dc.b %00000111,255,255,%11110001,255,%11111011,255,255,255,255,0 dc.b %00000111,255,255,%11100000,255,%11111001,254,%01111110,255,255,0 dc.b %00000011,255,255,%11000000,255,255,255,255,255,255,0 dc.b 0,255,%11111100,%11111000,%00000011,255,255,%11110111,255,%11100000,0 dc.b %00000011,255,254,%11111000,%00000111,255,255,255,255,%11111000,0 dc.b %00000111,255,254,%11111100,%00000111,%11011111,255,255,255,%11111100,0 dc.b %00000111,255,254,%11111100,%00001111,%11011111,255,255,255,254,0 dc.b %00001111,255,254,124,%00011111,%10011111,255,%10001111,%11110000,254,0 dc.b %00001111,%11110011,%11111100,124,%00011111,%10011111,255,%10000111,255,255,0 dc.b %00011111,%11000011,%11111100,%01111110,%00111111,%00011111,255,%11000111,255,255,0 dc.b %00111111,%11000111,%11111000,%01111110,%01111110,%00011111,255,%11000011,255,255,0 dc.b %00111111,%10000111,%11111000,%01111110,%01111110,%00001111,255,%11000011,255,254,0 dc.b %01111111,%10011111,%11111000,%00111110,%11111100,%00001111,255,%11000001,255,255,0 dc.b %01111111,255,%11110000,%00111111,%11111100,%00001111,%11100000,1,255,255,%10000000 dc.b 255,255,%11110000,%00111111,%11111000,%00001111,255,254,255,255,%11000000 dc.b 255,255,%11100000,%00111111,%11110000,%00001111,255,254,255,%01111111,%11110000 dc.b 255,255,%11100000,%00111111,%11110000,%00001111,255,255,%01111111,%10111111,%11111000 dc.b %01111111,255,%11000000,%00011111,%11100000,%00001111,255,255,%01111111,%10001111,%11111100 dc.b %01111111,255,0,%00011111,%11100000,%00001111,255,255,%00111111,%10000111,%11111100 dc.b %00111111,%11111100,0,%00011111,%11000000,%00001111,255,255,%00111111,%10000011,%11111100 status_display ;for TI-89 dc.b 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0 dc.b 128,0,0,0,0,0,0,0,0,3,224,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b %10001111,0,0,0,0,0,0,0,0,%00001100,%00011000,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b %10010000,0,0,0,48,0,0,0,0,48,%00000110,1,248,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b %10010000,%00111000,%11100101,%10001110,48,0,0,0,0,%01100000,3,1,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b %10001110,65,%00010110,81,0,0,0,0,0,%01010000,%00000101,1,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 129,65,20,%00011111,48,0,0,0,0,%10001000,8,129,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 129,%01000101,20,%00010000,48,0,0,0,0,%10000100,%00010000,129,8,0,0,0,1,240,0,1,0,0,0,0,0,0,0,0,0,0 dc.b %10011110,%00111000,%11100100,%00001110,0,0,0,0,1,0,0,65,8,124,0,0,255,8,48,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,0,0,0,0,0,0,0,1,0,0,65,8,68,0,0,%10000010,%00000100,48,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,0,0,0,0,0,0,0,1,0,128,65,8,68,0,0,255,254,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,68,%01000000,%00010000,0,0,0,0,1,0,0,65,8,68,0,0,%01000000,1,48,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,68,0,%00010000,48,0,0,0,1,0,0,65,8,124,0,0,128,0,%10110000,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,68,%11000011,%11010110,48,0,0,0,0,128,0,129,8,0,0,0,%01111111,255,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,%001111100,68,%01011001,0,0,0,0,0,128,0,129,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,68,68,%01010001,48,0,0,0,0,%01010000,%00000101,1,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,68,%01000011,%11010001,48,0,0,0,0,%01100000,3,1,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,68,224,81,0,0,0,0,0,48,%00000110,1,248,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,0,3,128,0,0,0,0,0,%00001100,%00011000,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 128,0,0,0,0,0,0,0,0,3,224,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 dc.b 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0 _comment: dc.b "This is NOWHERE near finished",0 end .end .END