Previous 199869 Revisions Next

r20975 Tuesday 12th February, 2013 at 10:06:05 UTC by Miodrag Milanović
Modernization of drivers part 16 (no whatsnew)
[src/mame/drivers]qix.c
[src/mame/includes]qix.h quizdna.h
[src/mame/video]qix.c quizdna.c

trunk/src/mame/drivers/qix.c
r20974r20975
11951195   99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,11, 6,99,
11961196};
11971197
1198static int kram3_permut1(int idx, int value)
1198int qix_state::kram3_permut1(int idx, int value)
11991199{
12001200   switch (idx)
12011201   {
r20974r20975
12071207   }
12081208}
12091209
1210static int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
1210int qix_state::kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
12111211{
12121212   int xorval = 0;
12131213
r20974r20975
12281228   return xorval;
12291229}
12301230
1231static int kram3_decrypt(int address, int value)
1231int qix_state::kram3_decrypt(int address, int value)
12321232{
12331233   int indx1 = (BIT(address,1) << 1) | BIT(address,5);
12341234   int indx2 = (BIT(address,7) << 1) | BIT(address,3);
trunk/src/mame/video/quizdna.c
r20974r20975
130130   palette_set_color_rgb(machine(),offs/2,pal5bit(r),pal5bit(g),pal5bit(b));
131131}
132132
133static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
133void quizdna_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
134134{
135   quizdna_state *state = machine.driver_data<quizdna_state>();
136   UINT8 *spriteram = state->m_spriteram;
135//OBRISI.ME
136   UINT8 *spriteram = m_spriteram;
137137   int offs;
138138
139   for (offs = 0; offs<state->m_spriteram.bytes(); offs+=8)
139   for (offs = 0; offs<m_spriteram.bytes(); offs+=8)
140140   {
141141      int i;
142142
r20974r20975
150150      int dy = 0x10;
151151      col &= 0x1f;
152152
153      if (state->m_flipscreen)
153      if (m_flipscreen)
154154      {
155155         x -= 7;
156156         y += 1;
r20974r20975
173173      {
174174         y &= 0x1ff;
175175
176         drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
176         drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
177177               code ^ i,
178178               col,
179179               fx,fy,
r20974r20975
189189   if (m_video_enable)
190190   {
191191      m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
192      draw_sprites(machine(), bitmap, cliprect);
192      draw_sprites(bitmap, cliprect);
193193      m_fg_tilemap->draw(bitmap, cliprect, 0, 0);
194194   }
195195   else
trunk/src/mame/video/qix.c
r20974r20975
225225}
226226
227227
228static void get_pens(qix_state *state, pen_t *pens)
228void qix_state::get_pens( pen_t *pens)
229229{
230230   offs_t offs;
231231
r20974r20975
252252      0xff    /* value = 3, intensity = 3 */
253253   };
254254
255   for (offs = state->m_palette_bank << 8; offs < (state->m_palette_bank << 8) + NUM_PENS; offs++)
255   for (offs = m_palette_bank << 8; offs < (m_palette_bank << 8) + NUM_PENS; offs++)
256256   {
257257      int bits, intensity, r, g, b;
258258
259      UINT8 data = state->m_paletteram[offs];
259      UINT8 data = m_paletteram[offs];
260260
261261      /* compute R, G, B from the table */
262262      intensity = (data >> 0) & 0x03;
r20974r20975
291291#endif
292292
293293   /* create the pens */
294   get_pens(state, state->m_pens);
294   state->get_pens(state->m_pens);
295295
296296   return state->m_pens;
297297}
trunk/src/mame/includes/quizdna.h
r20974r20975
2525   TILE_GET_INFO_MEMBER(get_fg_tile_info);
2626   virtual void video_start();
2727   UINT32 screen_update_quizdna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
28   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
2829};
trunk/src/mame/includes/qix.h
r20974r20975
124124   DECLARE_WRITE8_MEMBER(slither_coinctl_w);
125125   DECLARE_WRITE_LINE_MEMBER(qix_pia_dint);
126126   DECLARE_WRITE_LINE_MEMBER(qix_pia_sint);
127   void get_pens(pen_t *pens);
128   int kram3_permut1(int idx, int value);
129   int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table);
130   int kram3_decrypt(int address, int value);
127131};
128132
129133

Previous 199869 Revisions Next


© 1997-2024 The MAME Team