mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 22:38:17 +00:00
AGS: Fix antialiased stretch of sprite
This fixes missing actors in some games, such as Blackwell Deception (on the boat deck where the actors are scaled to 90% or their original size). The issue was that Allegro has defines to indicate which color depth are available, and we removed those. But they are used in the antialiasing code.
This commit is contained in:
parent
a2ed9906e4
commit
d0ce475e06
@ -37,6 +37,7 @@
|
||||
|
||||
#include "ags/lib/aastr-0.1.1/aautil.h"
|
||||
#include "ags/globals.h"
|
||||
#include "ags/lib/allegro/color.h"
|
||||
|
||||
namespace AGS3 {
|
||||
|
||||
|
@ -25,6 +25,11 @@
|
||||
|
||||
namespace AGS3 {
|
||||
|
||||
/* which color depths to include? */
|
||||
#define ALLEGRO_COLOR8
|
||||
#define ALLEGRO_COLOR16
|
||||
#define ALLEGRO_COLOR24
|
||||
#define ALLEGRO_COLOR32
|
||||
|
||||
#ifndef INLINE
|
||||
#define INLINE
|
||||
|
@ -139,6 +139,9 @@ extern int getb15(int c);
|
||||
extern int getr16(int c);
|
||||
extern int getg16(int c);
|
||||
extern int getb16(int c);
|
||||
extern int getr24(int c);
|
||||
extern int getg24(int c);
|
||||
extern int getb24(int c);
|
||||
extern int getr32(int c);
|
||||
extern int getg32(int c);
|
||||
extern int getb32(int c);
|
||||
|
@ -216,6 +216,24 @@ void bmp_write8(byte *addr, int color) {
|
||||
*addr = color;
|
||||
}
|
||||
|
||||
void bmp_write15(byte *addr, int color) {
|
||||
*((uint16 *)addr) = color;
|
||||
}
|
||||
|
||||
void bmp_write16(byte *addr, int color) {
|
||||
*((uint16 *)addr) = color;
|
||||
}
|
||||
|
||||
void bmp_write24(byte *addr, int color) {
|
||||
*addr = (color & 0xff);
|
||||
*(addr+1) = ((color >> 8) & 0xff);
|
||||
*(addr+2) = ((color >> 16) & 0xff);
|
||||
}
|
||||
|
||||
void bmp_write32(byte *addr, int color) {
|
||||
*((uint32 *)addr) = color;
|
||||
}
|
||||
|
||||
void memory_putpixel(BITMAP *bmp, int x, int y, int color) {
|
||||
putpixel(bmp, x, y, color);
|
||||
}
|
||||
|
@ -213,6 +213,10 @@ extern void bmp_select(BITMAP *bmp);
|
||||
extern byte *bmp_write_line(BITMAP *bmp, int line);
|
||||
extern void bmp_unwrite_line(BITMAP *bmp);
|
||||
extern void bmp_write8(byte *addr, int color);
|
||||
extern void bmp_write15(byte *addr, int color);
|
||||
extern void bmp_write16(byte *addr, int color);
|
||||
extern void bmp_write24(byte *addr, int color);
|
||||
extern void bmp_write32(byte *addr, int color);
|
||||
extern void memory_putpixel(BITMAP *bmp, int x, int y, int color);
|
||||
extern void putpixel(BITMAP *bmp, int x, int y, int color);
|
||||
extern void _putpixel(BITMAP *bmp, int x, int y, int color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user