2022-09-25 00:55:05 +04:00
|
|
|
/*
|
|
|
|
* BitmapHandler.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2022-09-18 03:23:17 +04:00
|
|
|
#pragma once
|
2022-10-13 01:51:55 +04:00
|
|
|
//code is copied from vcmiclient/CBitmapHandler.h with minimal changes
|
2022-09-18 03:23:17 +04:00
|
|
|
|
|
|
|
#define read_le_u16(p) (* reinterpret_cast<const ui16 *>(p))
|
|
|
|
#define read_le_u32(p) (* reinterpret_cast<const ui32 *>(p))
|
|
|
|
|
|
|
|
#include <QImage>
|
|
|
|
|
|
|
|
namespace BitmapHandler
|
|
|
|
{
|
|
|
|
//Load file from /DATA or /SPRITES
|
2022-09-25 00:55:05 +04:00
|
|
|
QImage loadBitmap(const std::string & fname, bool setKey = true);
|
2022-09-18 03:23:17 +04:00
|
|
|
}
|
|
|
|
|