REminiscence/scaler.h

35 lines
632 B
C
Raw Permalink Normal View History

2016-03-20 17:00:00 +01:00
/*
* REminiscence - Flashback interpreter
2018-01-20 17:00:00 +01:00
* Copyright (C) 2005-2018 Gregory Montoir (cyx@users.sourceforge.net)
2015-08-02 18:00:00 +02:00
*/
#ifndef SCALER_H__
#define SCALER_H__
2017-11-03 17:00:00 +01:00
#include <stdint.h>
typedef void (*ScaleProc32)(int factor, uint32_t *dst, int dstPitch, const uint32_t *src, int srcPitch, int w, int h);
enum ScalerType {
kScalerTypePoint,
kScalerTypeLinear,
kScalerTypeInternal,
kScalerTypeExternal,
2015-08-02 18:00:00 +02:00
};
2017-11-03 17:00:00 +01:00
#define SCALER_TAG 1
2015-08-02 18:00:00 +02:00
struct Scaler {
2017-11-03 17:00:00 +01:00
uint32_t tag;
2015-08-02 18:00:00 +02:00
const char *name;
2017-11-03 17:00:00 +01:00
int factorMin, factorMax;
ScaleProc32 scale;
2015-08-02 18:00:00 +02:00
};
2017-11-03 17:00:00 +01:00
extern const Scaler _internalScaler;
const Scaler *findScaler(const char *name);
2015-08-02 18:00:00 +02:00
#endif // SCALER_H__