Subversion Repositories pentevo

Rev

Rev 796 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #include "std.h"
  2.  
  3. #include "emul.h"
  4. #include "vars.h"
  5. #include "draw.h"
  6. #include "profi.h"
  7.  
  8. static u8 profi_pal[0x10] = { };
  9.  
  10. void profi_writepal(u8 val)
  11. {
  12.     unsigned ProfiPalIdx = (~comp.pFE) & 0xF;
  13.     assert(ProfiPalIdx < 0x10);
  14.     profi_pal[ProfiPalIdx] = val; // Gg0Rr0Bb
  15.  
  16.     // ╧ЁхюсЁрчютрэшх ярышЄЁ√ т ЇюЁьрЄ ULA+
  17.     u8 PalIdx = ((ProfiPalIdx & 8) << 1) | (ProfiPalIdx & 7);
  18.     comp.comp_pal[PalIdx + 0 * 8] =
  19.     comp.comp_pal[PalIdx + 1 * 8] =
  20.     comp.comp_pal[PalIdx + 3 * 8] =
  21.     comp.comp_pal[PalIdx + 5 * 8] = u8(t.profi_pal_map[val]);
  22.     temp.comp_pal_changed = 1;
  23. }
  24.