trunk/src/mame/video/cischeat.c
r17971 | r17972 | |
1195 | 1195 | |
1196 | 1196 | #ifdef MAME_DEBUG |
1197 | 1197 | #define CISCHEAT_LAYERSCTRL \ |
1198 | | state->m_debugsprites = 0; \ |
1199 | | if ( screen.machine().input().code_pressed(KEYCODE_Z) || screen.machine().input().code_pressed(KEYCODE_X) ) \ |
| 1198 | m_debugsprites = 0; \ |
| 1199 | if ( machine().input().code_pressed(KEYCODE_Z) || machine().input().code_pressed(KEYCODE_X) ) \ |
1200 | 1200 | { \ |
1201 | 1201 | int msk = 0; \ |
1202 | | if (screen.machine().input().code_pressed(KEYCODE_Q)) { msk |= 0x01;} \ |
1203 | | if (screen.machine().input().code_pressed(KEYCODE_W)) { msk |= 0x02;} \ |
1204 | | if (screen.machine().input().code_pressed(KEYCODE_E)) { msk |= 0x04;} \ |
1205 | | if (screen.machine().input().code_pressed(KEYCODE_A)) { msk |= 0x08; state->m_debugsprites = 1;} \ |
1206 | | if (screen.machine().input().code_pressed(KEYCODE_S)) { msk |= 0x08; state->m_debugsprites = 2;} \ |
1207 | | if (screen.machine().input().code_pressed(KEYCODE_D)) { msk |= 0x08; state->m_debugsprites = 3;} \ |
1208 | | if (screen.machine().input().code_pressed(KEYCODE_F)) { msk |= 0x08; state->m_debugsprites = 4;} \ |
1209 | | if (screen.machine().input().code_pressed(KEYCODE_R)) { msk |= 0x10;} \ |
1210 | | if (screen.machine().input().code_pressed(KEYCODE_T)) { msk |= 0x20;} \ |
| 1202 | if (machine().input().code_pressed(KEYCODE_Q)) { msk |= 0x01;} \ |
| 1203 | if (machine().input().code_pressed(KEYCODE_W)) { msk |= 0x02;} \ |
| 1204 | if (machine().input().code_pressed(KEYCODE_E)) { msk |= 0x04;} \ |
| 1205 | if (machine().input().code_pressed(KEYCODE_A)) { msk |= 0x08; m_debugsprites = 1;} \ |
| 1206 | if (machine().input().code_pressed(KEYCODE_S)) { msk |= 0x08; m_debugsprites = 2;} \ |
| 1207 | if (machine().input().code_pressed(KEYCODE_D)) { msk |= 0x08; m_debugsprites = 3;} \ |
| 1208 | if (machine().input().code_pressed(KEYCODE_F)) { msk |= 0x08; m_debugsprites = 4;} \ |
| 1209 | if (machine().input().code_pressed(KEYCODE_R)) { msk |= 0x10;} \ |
| 1210 | if (machine().input().code_pressed(KEYCODE_T)) { msk |= 0x20;} \ |
1211 | 1211 | \ |
1212 | | if (msk != 0) state->m_active_layers &= msk; \ |
| 1212 | if (msk != 0) m_active_layers &= msk; \ |
1213 | 1213 | } \ |
1214 | 1214 | \ |
1215 | 1215 | { \ |
1216 | | if ( screen.machine().input().code_pressed(KEYCODE_Z) && screen.machine().input().code_pressed_once(KEYCODE_U) ) \ |
1217 | | state->m_show_unknown ^= 1; \ |
1218 | | if (state->m_show_unknown) \ |
| 1216 | if ( machine().input().code_pressed(KEYCODE_Z) && machine().input().code_pressed_once(KEYCODE_U) ) \ |
| 1217 | m_show_unknown ^= 1; \ |
| 1218 | if (m_show_unknown) \ |
1219 | 1219 | popmessage("0:%04X 2:%04X 4:%04X 6:%04X c:%04X", \ |
1220 | | state->m_vregs[0],state->m_vregs[1],state->m_vregs[2],state->m_vregs[3],state->m_vregs[0xc/2] ); \ |
| 1220 | m_vregs[0],m_vregs[1],m_vregs[2],m_vregs[3],m_vregs[0xc/2] ); \ |
1221 | 1221 | } |
1222 | 1222 | #else |
1223 | 1223 | #define CISCHEAT_LAYERSCTL |
r17971 | r17972 | |
1254 | 1254 | |
1255 | 1255 | for (i = 7; i >= 4; i--) |
1256 | 1256 | { /* bitmap, road, min_priority, max_priority, transparency */ |
1257 | | if (m_active_layers & 0x10) cischeat_draw_road(screen.machine(),bitmap,cliprect,0,i,i,FALSE); |
1258 | | if (m_active_layers & 0x20) cischeat_draw_road(screen.machine(),bitmap,cliprect,1,i,i,TRUE); |
| 1257 | if (m_active_layers & 0x10) cischeat_draw_road(machine(),bitmap,cliprect,0,i,i,FALSE); |
| 1258 | if (m_active_layers & 0x20) cischeat_draw_road(machine(),bitmap,cliprect,1,i,i,TRUE); |
1259 | 1259 | } |
1260 | 1260 | |
1261 | 1261 | flag = 0; |
r17971 | r17972 | |
1264 | 1264 | |
1265 | 1265 | for (i = 3; i >= 0; i--) |
1266 | 1266 | { /* bitmap, road, min_priority, max_priority, transparency */ |
1267 | | if (m_active_layers & 0x10) cischeat_draw_road(screen.machine(),bitmap,cliprect,0,i,i,TRUE); |
1268 | | if (m_active_layers & 0x20) cischeat_draw_road(screen.machine(),bitmap,cliprect,1,i,i,TRUE); |
| 1267 | if (m_active_layers & 0x10) cischeat_draw_road(machine(),bitmap,cliprect,0,i,i,TRUE); |
| 1268 | if (m_active_layers & 0x20) cischeat_draw_road(machine(),bitmap,cliprect,1,i,i,TRUE); |
1269 | 1269 | } |
1270 | 1270 | |
1271 | | if (m_active_layers & 0x08) bigrun_draw_sprites(screen.machine(),bitmap,cliprect,15,0); |
| 1271 | if (m_active_layers & 0x08) bigrun_draw_sprites(machine(),bitmap,cliprect,15,0); |
1272 | 1272 | |
1273 | 1273 | cischeat_tmap_DRAW(2) |
1274 | 1274 | |
r17971 | r17972 | |
1306 | 1306 | bitmap.fill(0, cliprect); |
1307 | 1307 | |
1308 | 1308 | /* bitmap, road, priority, transparency */ |
1309 | | if (m_active_layers & 0x10) cischeat_draw_road(screen.machine(),bitmap,cliprect,0,7,5,FALSE); |
1310 | | if (m_active_layers & 0x20) cischeat_draw_road(screen.machine(),bitmap,cliprect,1,7,5,TRUE); |
| 1309 | if (m_active_layers & 0x10) cischeat_draw_road(machine(),bitmap,cliprect,0,7,5,FALSE); |
| 1310 | if (m_active_layers & 0x20) cischeat_draw_road(machine(),bitmap,cliprect,1,7,5,TRUE); |
1311 | 1311 | |
1312 | 1312 | flag = 0; |
1313 | 1313 | cischeat_tmap_DRAW(0) |
1314 | 1314 | // else bitmap.fill(0, cliprect); |
1315 | 1315 | cischeat_tmap_DRAW(1) |
1316 | 1316 | |
1317 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,15,3); |
1318 | | if (m_active_layers & 0x10) cischeat_draw_road(screen.machine(),bitmap,cliprect,0,4,1,TRUE); |
1319 | | if (m_active_layers & 0x20) cischeat_draw_road(screen.machine(),bitmap,cliprect,1,4,1,TRUE); |
1320 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,2,2); |
1321 | | if (m_active_layers & 0x10) cischeat_draw_road(screen.machine(),bitmap,cliprect,0,0,0,TRUE); |
1322 | | if (m_active_layers & 0x20) cischeat_draw_road(screen.machine(),bitmap,cliprect,1,0,0,TRUE); |
1323 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,1,0); |
| 1317 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,15,3); |
| 1318 | if (m_active_layers & 0x10) cischeat_draw_road(machine(),bitmap,cliprect,0,4,1,TRUE); |
| 1319 | if (m_active_layers & 0x20) cischeat_draw_road(machine(),bitmap,cliprect,1,4,1,TRUE); |
| 1320 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,2,2); |
| 1321 | if (m_active_layers & 0x10) cischeat_draw_road(machine(),bitmap,cliprect,0,0,0,TRUE); |
| 1322 | if (m_active_layers & 0x20) cischeat_draw_road(machine(),bitmap,cliprect,1,0,0,TRUE); |
| 1323 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,1,0); |
1324 | 1324 | cischeat_tmap_DRAW(2) |
1325 | 1325 | |
1326 | 1326 | /* for the map screen */ |
1327 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,0+16,0+16); |
| 1327 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,0+16,0+16); |
1328 | 1328 | |
1329 | 1329 | |
1330 | 1330 | m_active_layers = active_layers1; |
r17971 | r17972 | |
1364 | 1364 | /* 1: clouds 5, grad 7, road 0 2: clouds 5, grad 7, road 0, tunnel roof 0 */ |
1365 | 1365 | |
1366 | 1366 | /* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */ |
1367 | | if (m_active_layers & 0x20) f1gpstar_draw_road(screen.machine(),bitmap,cliprect,1,6,7,TRUE); |
1368 | | if (m_active_layers & 0x10) f1gpstar_draw_road(screen.machine(),bitmap,cliprect,0,6,7,TRUE); |
| 1367 | if (m_active_layers & 0x20) f1gpstar_draw_road(machine(),bitmap,cliprect,1,6,7,TRUE); |
| 1368 | if (m_active_layers & 0x10) f1gpstar_draw_road(machine(),bitmap,cliprect,0,6,7,TRUE); |
1369 | 1369 | |
1370 | 1370 | flag = 0; |
1371 | 1371 | cischeat_tmap_DRAW(0) |
r17971 | r17972 | |
1373 | 1373 | cischeat_tmap_DRAW(1) |
1374 | 1374 | |
1375 | 1375 | /* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */ |
1376 | | if (m_active_layers & 0x20) f1gpstar_draw_road(screen.machine(),bitmap,cliprect,1,1,5,TRUE); |
1377 | | if (m_active_layers & 0x10) f1gpstar_draw_road(screen.machine(),bitmap,cliprect,0,1,5,TRUE); |
| 1376 | if (m_active_layers & 0x20) f1gpstar_draw_road(machine(),bitmap,cliprect,1,1,5,TRUE); |
| 1377 | if (m_active_layers & 0x10) f1gpstar_draw_road(machine(),bitmap,cliprect,0,1,5,TRUE); |
1378 | 1378 | |
1379 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,15,2); |
| 1379 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,15,2); |
1380 | 1380 | |
1381 | 1381 | /* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */ |
1382 | | if (m_active_layers & 0x20) f1gpstar_draw_road(screen.machine(),bitmap,cliprect,1,0,0,TRUE); |
1383 | | if (m_active_layers & 0x10) f1gpstar_draw_road(screen.machine(),bitmap,cliprect,0,0,0,TRUE); |
| 1382 | if (m_active_layers & 0x20) f1gpstar_draw_road(machine(),bitmap,cliprect,1,0,0,TRUE); |
| 1383 | if (m_active_layers & 0x10) f1gpstar_draw_road(machine(),bitmap,cliprect,0,0,0,TRUE); |
1384 | 1384 | |
1385 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,1,1); |
| 1385 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,1,1); |
1386 | 1386 | cischeat_tmap_DRAW(2) |
1387 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,0,0); |
| 1387 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,0,0); |
1388 | 1388 | |
1389 | 1389 | |
1390 | 1390 | m_active_layers = active_layers1; |
r17971 | r17972 | |
1405 | 1405 | |
1406 | 1406 | #ifdef MAME_DEBUG |
1407 | 1407 | m_debugsprites = 0; |
1408 | | if ( screen.machine().input().code_pressed(KEYCODE_Z) || screen.machine().input().code_pressed(KEYCODE_X) ) |
| 1408 | if ( machine().input().code_pressed(KEYCODE_Z) || machine().input().code_pressed(KEYCODE_X) ) |
1409 | 1409 | { |
1410 | 1410 | int msk = 0; |
1411 | | if (screen.machine().input().code_pressed(KEYCODE_Q)) { msk |= 0x1;} |
1412 | | if (screen.machine().input().code_pressed(KEYCODE_W)) { msk |= 0x2;} |
1413 | | if (screen.machine().input().code_pressed(KEYCODE_E)) { msk |= 0x4;} |
1414 | | if (screen.machine().input().code_pressed(KEYCODE_A)) { msk |= 0x8; m_debugsprites = 1;} |
1415 | | if (screen.machine().input().code_pressed(KEYCODE_S)) { msk |= 0x8; m_debugsprites = 2;} |
1416 | | if (screen.machine().input().code_pressed(KEYCODE_D)) { msk |= 0x8; m_debugsprites = 3;} |
1417 | | if (screen.machine().input().code_pressed(KEYCODE_F)) { msk |= 0x8; m_debugsprites = 4;} |
| 1411 | if (machine().input().code_pressed(KEYCODE_Q)) { msk |= 0x1;} |
| 1412 | if (machine().input().code_pressed(KEYCODE_W)) { msk |= 0x2;} |
| 1413 | if (machine().input().code_pressed(KEYCODE_E)) { msk |= 0x4;} |
| 1414 | if (machine().input().code_pressed(KEYCODE_A)) { msk |= 0x8; m_debugsprites = 1;} |
| 1415 | if (machine().input().code_pressed(KEYCODE_S)) { msk |= 0x8; m_debugsprites = 2;} |
| 1416 | if (machine().input().code_pressed(KEYCODE_D)) { msk |= 0x8; m_debugsprites = 3;} |
| 1417 | if (machine().input().code_pressed(KEYCODE_F)) { msk |= 0x8; m_debugsprites = 4;} |
1418 | 1418 | |
1419 | 1419 | if (msk != 0) m_active_layers &= msk; |
1420 | 1420 | #if 1 |
1421 | 1421 | { |
1422 | | address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 1422 | address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); |
1423 | 1423 | |
1424 | 1424 | popmessage("Cmd: %04X Pos:%04X Lim:%04X Inp:%04X", |
1425 | 1425 | m_scudhamm_motor_command, |
r17971 | r17972 | |
1440 | 1440 | flag = 0; |
1441 | 1441 | cischeat_tmap_DRAW(0) |
1442 | 1442 | // no layer 1 |
1443 | | if (m_active_layers & 0x08) cischeat_draw_sprites(screen.machine(),bitmap,cliprect,0,15); |
| 1443 | if (m_active_layers & 0x08) cischeat_draw_sprites(machine(),bitmap,cliprect,0,15); |
1444 | 1444 | cischeat_tmap_DRAW(2) |
1445 | 1445 | |
1446 | 1446 | m_active_layers = active_layers1; |