src/mess/drivers/vboy.c
| r15970 | r15971 | |
| 113 | 113 | vip_regs_t m_vip_regs; |
| 114 | 114 | vboy_timer_t m_vboy_timer; |
| 115 | 115 | int *m_bg_map; |
| 116 | | bitmap_ind16 m_screen_output; |
| 117 | 116 | UINT16 m_frame_count; |
| 118 | 117 | UINT8 m_displayfb; |
| 119 | 118 | UINT8 m_display_count; |
| r15970 | r15971 | |
| 137 | 136 | // Allocate memory for temporary screens |
| 138 | 137 | state->m_bg_map = auto_alloc_array_clear(machine, int, 0x1000*0x1000); |
| 139 | 138 | |
| 140 | | state->m_screen_output.allocate(384, 224, BITMAP_FORMAT_IND16); |
| 141 | 139 | state->m_font = auto_alloc_array(machine, UINT16, 2048 * 8); |
| 142 | 140 | state->m_bgmap = auto_alloc_array(machine, UINT16, 0x20000 >> 1); |
| 143 | 141 | state->m_objects = state->m_bgmap + (0x1e000 >> 1); |
| r15970 | r15971 | |
| 417 | 415 | static SCREEN_UPDATE_IND16( vboy_left ) |
| 418 | 416 | { |
| 419 | 417 | vboy_state *state = screen.machine().driver_data<vboy_state>(); |
| 420 | | state->m_screen_output.fill(state->m_vip_regs.BKCOL, cliprect); |
| 418 | bitmap.fill(state->m_vip_regs.BKCOL, cliprect); |
| 421 | 419 | int cur_spt; |
| 422 | 420 | |
| 423 | 421 | cur_spt = 3; |
| 424 | 422 | for(int i=31; i>=0; i--) |
| 425 | | if (display_world(state, i, state->m_screen_output, 0,cur_spt)) break; |
| 423 | if (display_world(state, i, bitmap, 0, cur_spt)) break; |
| 426 | 424 | |
| 427 | | copybitmap(bitmap, state->m_screen_output, 0, 0, 0, 0, cliprect); |
| 428 | 425 | return 0; |
| 429 | 426 | } |
| 430 | 427 | |
| 431 | 428 | static SCREEN_UPDATE_IND16( vboy_right ) |
| 432 | 429 | { |
| 433 | 430 | vboy_state *state = screen.machine().driver_data<vboy_state>(); |
| 434 | | state->m_screen_output.fill(state->m_vip_regs.BKCOL, cliprect); |
| 431 | bitmap.fill(state->m_vip_regs.BKCOL, cliprect); |
| 435 | 432 | int cur_spt; |
| 436 | 433 | |
| 437 | 434 | cur_spt = 3; |
| 438 | 435 | for(int i=31; i>=0; i--) |
| 439 | | if (display_world(state, i, state->m_screen_output, 1,cur_spt)) break; |
| 436 | if (display_world(state, i, bitmap, 0, cur_spt)) break; |
| 440 | 437 | |
| 441 | | copybitmap(bitmap, state->m_screen_output, 0, 0, 0, 0, cliprect); |
| 442 | 438 | return 0; |
| 443 | 439 | } |
| 444 | 440 | |