Ticket #4870: bomp_fix.patch

File bomp_fix.patch, 2.0 KB (added by lordhoto, 14 years ago)
  • engines/scumm/akos.cpp

    diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
    index 403fe72..d5d6b61 100644
    a b byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) {  
    10651065        bdd.shadowMode = _shadow_mode;
    10661066        bdd.shadowPalette = _vm->_shadowPalette;
    10671067
    1068         bdd.actorPalette = 0;
    1069         if (_useBompPalette) {
    1070                 for (uint i = 0; i < 256; i++)
    1071                         bdd.actorPalette[i] = _palette[i];
    1072         }
     1068        bdd.actorPalette = _useBompPalette ? _palette : 0;
    10731069
    10741070        bdd.mirror = !_mirror;
    10751071
  • engines/scumm/bomp.cpp

    diff --git a/engines/scumm/bomp.cpp b/engines/scumm/bomp.cpp
    index ddb6264..18db89b 100644
    a b static void bompScaleFuncX(byte *line_buffer, byte *scaling_x_ptr, byte skip, in  
    3838static void bompApplyShadow0(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency, bool HE7Check);
    3939static void bompApplyShadow1(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);
    4040static void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);
    41 static void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size);
     41static void bompApplyActorPalette(uint16 *actorPalette, byte *line_buffer, int32 size);
    4242
    4343
    4444
    void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *  
    172172        }
    173173}
    174174
    175 void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size) {
     175void bompApplyActorPalette(uint16 *actorPalette, byte *line_buffer, int32 size) {
    176176        actorPalette[255] = 255;
    177177        while (size-- > 0) {
    178178                *line_buffer = actorPalette[*line_buffer];
  • engines/scumm/bomp.h

    diff --git a/engines/scumm/bomp.h b/engines/scumm/bomp.h
    index 0d76c37..8f64b54 100644
    a b struct BompDrawData {  
    5454        uint16 shadowMode;
    5555        byte *shadowPalette;
    5656
    57         byte *actorPalette;
     57        uint16 *actorPalette;
    5858
    5959        bool mirror;
    6060};