-
Notifications
You must be signed in to change notification settings - Fork 0
/
BbcImageLoaderC.cpp
67 lines (60 loc) · 1.23 KB
/
BbcImageLoaderC.cpp
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
59
60
61
62
63
64
65
66
67
/*
* Copyright © 2016 Matt Robinson
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <iostream>
#include "BbcImageLoader.h"
void PrintException();
BbcScreenP BbcImageLoader_LoadAuto(uint8_t *data, int size)
{
try
{
BbcImageLoader loader(data, size);
return reinterpret_cast<BbcScreenP>(loader.LoadAuto());
}
catch(...)
{
PrintException();
std::terminate();
}
}
BbcScreenP BbcImageLoader_LoadMemDump(uint8_t *data, int size)
{
try
{
BbcImageLoader loader(data, size);
return reinterpret_cast<BbcScreenP>(loader.LoadMemDump());
}
catch(...)
{
PrintException();
std::terminate();
}
}
BbcScreenP BbcImageLoader_LoadLdPic(uint8_t *data, int size)
{
try
{
BbcImageLoader loader(data, size);
return reinterpret_cast<BbcScreenP>(loader.LoadLdPic());
}
catch(...)
{
PrintException();
std::terminate();
}
}
BbcScreenP BbcImageLoader_LoadScrLoad(uint8_t *data, int size)
{
try
{
BbcImageLoader loader(data, size);
return reinterpret_cast<BbcScreenP>(loader.LoadScrLoad());
}
catch(...)
{
PrintException();
std::terminate();
}
}