~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/mame/video/argus.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
751
751
  Screen refresh
752
752
***************************************************************************/
753
753
 
754
 
static void bg_setting(void)
 
754
static void bg_setting(running_machine *machine)
755
755
{
756
 
        tilemap_set_flip(ALL_TILEMAPS, argus_flipscreen ? TILEMAP_FLIPY|TILEMAP_FLIPX : 0);
 
756
        tilemap_set_flip_all(machine, argus_flipscreen ? TILEMAP_FLIPY|TILEMAP_FLIPX : 0);
757
757
 
758
758
        if (!argus_flipscreen)
759
759
        {
900
900
                        }
901
901
 
902
902
                        if (priority != pri)
903
 
                                jal_blend_drawgfx(machine,
904
 
                                                        bitmap,machine->gfx[0],
 
903
                                jal_blend_drawgfx(
 
904
                                                        bitmap,cliprect,machine->gfx[0],
905
905
                                                        tile,
906
906
                                                        color,
907
907
                                                        flipx, flipy,
908
908
                                                        sx, sy,
909
 
                                                        cliprect,
910
 
                                                        TRANSPARENCY_PEN, 15);
 
909
                                                        15);
911
910
                }
912
911
        }
913
912
}
1033
1032
                                flipy = !flipy;
1034
1033
                        }
1035
1034
 
1036
 
                        jal_blend_drawgfx(machine,
1037
 
                                                bitmap,machine->gfx[0],
 
1035
                        jal_blend_drawgfx(
 
1036
                                                bitmap,cliprect,machine->gfx[0],
1038
1037
                                                tile,
1039
1038
                                                color,
1040
1039
                                                flipx, flipy,
1041
1040
                                                sx, sy,
1042
 
                                                cliprect,
1043
 
                                                TRANSPARENCY_PEN, 15);
 
1041
                                                15);
1044
1042
                }
1045
1043
        }
1046
1044
}
1084
1082
 
1085
1083
                        if ((offs >= 0x100 && offs <= 0x2ff) || (offs >= 0x400 && offs <= 0x57f))
1086
1084
                        {
1087
 
                                jal_blend_drawgfx(machine,
1088
 
                                                        bitmap,machine->gfx[0],
 
1085
                                jal_blend_drawgfx(
 
1086
                                                        bitmap,cliprect,machine->gfx[0],
1089
1087
                                                        tile,
1090
1088
                                                        color,
1091
1089
                                                        flipx, flipy,
1092
1090
                                                        sx, sy,
1093
 
                                                        cliprect,
1094
 
                                                        TRANSPARENCY_PEN, 7);
 
1091
                                                        7);
1095
1092
                        }
1096
1093
                        else if ((offs >= 0x000 && offs <= 0x0ff) || (offs >= 0x300 && offs <= 0x3ff))
1097
1094
                        {
1099
1096
                                {
1100
1097
                                        td = (fx) ? (1 - i) : i;
1101
1098
 
1102
 
                                        jal_blend_drawgfx(machine,
1103
 
                                                                bitmap,machine->gfx[0],
 
1099
                                        jal_blend_drawgfx(
 
1100
                                                                bitmap,cliprect,machine->gfx[0],
1104
1101
                                                                tile + td,
1105
1102
                                                                color,
1106
1103
                                                                flipx, flipy,
1107
1104
                                                                sx + i * 16, sy,
1108
 
                                                                cliprect,
1109
 
                                                                TRANSPARENCY_PEN, 7);
 
1105
                                                                7);
1110
1106
                                }
1111
1107
                        }
1112
1108
                        else if (offs >= 0x580 && offs <= 0x61f)
1120
1116
                                                else
1121
1117
                                                        td = (fx) ? (i * 2) + 1 - j : i * 2 + j;
1122
1118
 
1123
 
                                                jal_blend_drawgfx(machine,
1124
 
                                                                        bitmap,machine->gfx[0],
 
1119
                                                jal_blend_drawgfx(
 
1120
                                                                        bitmap,cliprect,machine->gfx[0],
1125
1121
                                                                        tile + td,
1126
1122
                                                                        color,
1127
1123
                                                                        flipx, flipy,
1128
1124
                                                                        sx + j * 16, sy - i * 16,
1129
 
                                                                        cliprect,
1130
 
                                                                        TRANSPARENCY_PEN, 7);
 
1125
                                                                        7);
1131
1126
                                        }
1132
1127
                                }
1133
1128
                        }
1142
1137
                                                else
1143
1138
                                                        td = (fx) ? (i * 4) + 3 - j : i * 4 + j;
1144
1139
 
1145
 
                                                jal_blend_drawgfx(machine,
1146
 
                                                                        bitmap,machine->gfx[0],
 
1140
                                                jal_blend_drawgfx(
 
1141
                                                                        bitmap,cliprect,machine->gfx[0],
1147
1142
                                                                        tile + td,
1148
1143
                                                                        color,
1149
1144
                                                                        flipx, flipy,
1150
1145
                                                                        sx + j * 16, sy - i * 16,
1151
 
                                                                        cliprect,
1152
 
                                                                        TRANSPARENCY_PEN, 7);
 
1146
                                                                        7);
1153
1147
                                        }
1154
1148
                                }
1155
1149
                        }
1158
1152
}
1159
1153
 
1160
1154
 
 
1155
static void butasan_log_vram(running_machine *machine)
 
1156
{
1161
1157
#ifdef MAME_DEBUG
1162
 
static void butasan_log_vram(void)
1163
 
{
1164
1158
        int offs;
1165
1159
 
1166
 
        if (input_code_pressed(KEYCODE_M))
 
1160
        if (input_code_pressed(machine, KEYCODE_M))
1167
1161
        {
1168
1162
                int i;
1169
1163
                logerror("\nSprite RAM\n");
1207
1201
                        }
1208
1202
                }
1209
1203
        }
 
1204
#endif
1210
1205
}
1211
 
#endif
1212
1206
 
1213
1207
VIDEO_UPDATE( argus )
1214
1208
{
1215
 
        bg_setting();
 
1209
        bg_setting(screen->machine);
1216
1210
 
1217
1211
        /* scroll BG0 and render tile at proper position */
1218
1212
        argus_bg0_scroll_handle(screen->machine);
1228
1222
 
1229
1223
VIDEO_UPDATE( valtric )
1230
1224
{
1231
 
        bg_setting();
 
1225
        bg_setting(screen->machine);
1232
1226
 
1233
1227
        if (argus_bg_status & 1)        /* Backgound enable */
1234
1228
                valtric_draw_mosaic(screen, bitmap, cliprect);
1241
1235
 
1242
1236
VIDEO_UPDATE( butasan )
1243
1237
{
1244
 
        bg_setting();
 
1238
        bg_setting(screen->machine);
1245
1239
 
1246
1240
        if (argus_bg_status & 1)        /* Backgound enable */
1247
1241
                tilemap_draw(bitmap, cliprect, bg0_tilemap, 0, 0);
1251
1245
        butasan_draw_sprites(screen->machine, bitmap, cliprect);
1252
1246
        tilemap_draw(bitmap, cliprect, tx_tilemap,  0, 0);
1253
1247
 
1254
 
#ifdef MAME_DEBUG
1255
 
        butasan_log_vram();
1256
 
#endif
 
1248
        butasan_log_vram(screen->machine);
1257
1249
        return 0;
1258
1250
}