blob: 23fa72d686ae77f8df26b16f05a3ea8fdc1a9be2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// license:BSD-3-Clause
// copyright-holders:R. Belmont
/*********************************************************************
picture.h
Image device that loads still pictures (currently PNG)
*********************************************************************/
#ifndef MAME_DEVICES_IMAGEDEV_PICTURE_H
#define MAME_DEVICES_IMAGEDEV_PICTURE_H
#pragma once
#include "bitmap.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
// ======================> picture_image_device
class picture_image_device : public device_t,
public device_image_interface
{
public:
// construction/destruction
picture_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~picture_image_device();
// image-level overrides
virtual image_init_result call_load() override;
virtual void call_unload() override;
virtual bool is_readable() const noexcept override { return true; }
virtual bool is_writeable() const noexcept override { return false; }
virtual bool is_creatable() const noexcept override { return false; }
virtual bool is_reset_on_load() const noexcept override { return false; }
virtual const char *file_extensions() const noexcept override { return "png"; }
virtual const char *image_type_name() const noexcept override { return "picture"; }
virtual const char *image_brief_type_name() const noexcept override { return "pic"; }
const bitmap_argb32 &get_bitmap() { return m_picture; }
protected:
// device-level overrides
virtual void device_start() override;
private:
bitmap_argb32 m_picture;
};
// device type definition
DECLARE_DEVICE_TYPE(IMAGE_PICTURE, picture_image_device)
#endif // MAME_DEVICES_IMAGEDEV_PICTURE_H
|