mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 22:51:11 +00:00
58 lines
2.1 KiB
C++
58 lines
2.1 KiB
C++
/*
|
|
* This file is part of the Scale2x project.
|
|
*
|
|
* Copyright (C) 2003 Andrea Mazzoleni
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
/*
|
|
* This file contains an example implementation of the Scale effect
|
|
* applyed to a generic bitmap.
|
|
*
|
|
* You can find an high level description of the effect at :
|
|
*
|
|
* http://scale2x.sourceforge.net/
|
|
*
|
|
* Alternatively at the previous license terms, you are allowed to use this
|
|
* code in your program with these conditions:
|
|
* - the program is not used in commercial activities.
|
|
* - the whole source code of the program is released with the binary.
|
|
* - derivative works of the program are allowed.
|
|
*/
|
|
|
|
#ifndef SCALER_SCALEBIT_H
|
|
#define SCALER_SCALEBIT_H
|
|
|
|
#include "graphics/scalerplugin.h"
|
|
|
|
int scale_precondition(unsigned scale, unsigned pixel, unsigned width, unsigned height);
|
|
void scale(unsigned scale, void* void_dst, unsigned dst_slice, const void* void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height);
|
|
|
|
class AdvMamePlugin : public ScalerPluginObject {
|
|
public:
|
|
AdvMamePlugin();
|
|
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
|
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
|
virtual uint increaseFactor() override;
|
|
virtual uint decreaseFactor() override;
|
|
virtual bool canDrawCursor() const override { return true; }
|
|
virtual uint extraPixels() const override { return 4; }
|
|
virtual const char *getName() const override;
|
|
virtual const char *getPrettyName() const override;
|
|
};
|
|
|
|
#endif
|