trunk/src/mame/video/midzeus2.c
r249088 | r249089 | |
90 | 90 | * |
91 | 91 | *************************************/ |
92 | 92 | |
93 | | static midzeus2_renderer* polyNew; |
| 93 | static midzeus2_renderer* poly; |
94 | 94 | static UINT8 log_fifo; |
95 | 95 | |
96 | 96 | static UINT32 zeus_fifo[20]; |
r249088 | r249089 | |
283 | 283 | waveram[1] = auto_alloc_array(machine(), UINT32, WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12/4); |
284 | 284 | |
285 | 285 | /* initialize polygon engine */ |
286 | | polyNew = auto_alloc(machine(), midzeus2_renderer(*this)); |
| 286 | poly = auto_alloc(machine(), midzeus2_renderer(*this)); |
287 | 287 | |
288 | 288 | /* we need to cleanup on exit */ |
289 | 289 | machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(midzeus2_state::exit_handler2), this)); |
r249088 | r249089 | |
374 | 374 | { |
375 | 375 | int x, y; |
376 | 376 | |
377 | | polyNew->wait(); |
| 377 | poly->wait(); |
378 | 378 | |
379 | 379 | if (machine().input().code_pressed(KEYCODE_UP)) { zbase += 1.0f; popmessage("Zbase = %f", (double) zbase); } |
380 | 380 | if (machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmessage("Zbase = %f", (double) zbase); } |
r249088 | r249089 | |
1031 | 1031 | break; |
1032 | 1032 | |
1033 | 1033 | case 0x38: /* crusnexo/thegrid */ |
1034 | | polyNew->zeus2_draw_quad(databuffer, texoffs, logit); |
| 1034 | poly->zeus2_draw_quad(databuffer, texoffs, logit); |
1035 | 1035 | break; |
1036 | 1036 | |
1037 | 1037 | default: |
r249088 | r249089 | |
1199 | 1199 | } |
1200 | 1200 | } |
1201 | 1201 | |
1202 | | numverts = polyNew->zclip_if_less(4, &vert[0], &clipvert[0], 4, 1.0f / 512.0f / 4.0f); |
| 1202 | numverts = poly->zclip_if_less(4, &vert[0], &clipvert[0], 4, 1.0f / 512.0f / 4.0f); |
1203 | 1203 | if (numverts < 3) |
1204 | 1204 | return; |
1205 | 1205 | |
r249088 | r249089 | |
1230 | 1230 | clipvert[i].y += 0.0005f; |
1231 | 1231 | } |
1232 | 1232 | |
1233 | | mz2_poly_extra_data& extra = polyNew->object_data_alloc(); |
| 1233 | mz2_poly_extra_data& extra = poly->object_data_alloc(); |
1234 | 1234 | switch (texmode) |
1235 | 1235 | { |
1236 | 1236 | case 0x01d: /* crusnexo: RHS of score bar */ |