2022-09-24 22:55:05 +02: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 01:23:17 +02:00
|
|
|
#pragma once
|
2022-10-12 23:51:55 +02:00
|
|
|
//code is copied from vcmiclient/CBitmapHandler.h with minimal changes
|
2022-09-18 01:23:17 +02: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-24 22:55:05 +02:00
|
|
|
QImage loadBitmap(const std::string & fname, bool setKey = true);
|
2022-09-18 01:23:17 +02:00
|
|
|
}
|
|
|
|
|