-
Notifications
You must be signed in to change notification settings - Fork 0
/
BbcImageLoader.h
45 lines (35 loc) · 949 Bytes
/
BbcImageLoader.h
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
/*
* Copyright © 2010-2021 Matt Robinson
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include <stdint.h>
#include "BbcScreen.h"
#ifdef __cplusplus
class BbcImageLoader
{
public:
BbcImageLoader(uint8_t *data, int size);
BbcScreen* LoadAuto();
BbcScreen* LoadMemDump();
BbcScreen* LoadLdPic();
BbcScreen* LoadScrLoad();
private:
bool getBit(uint8_t *bit);
bool getBits(int numBits, uint8_t *bits);
uint8_t *data;
int size;
int pos = 0;
uint8_t bitStore = 0;
int bitsLeft = 0;
};
extern "C" {
#endif
BbcScreenP BbcImageLoader_LoadAuto(uint8_t *data, int size);
BbcScreenP BbcImageLoader_LoadMemDump(uint8_t *data, int size);
BbcScreenP BbcImageLoader_LoadLdPic(uint8_t *data, int size);
BbcScreenP BbcImageLoader_LoadScrLoad(uint8_t *data, int size);
#ifdef __cplusplus
}
#endif