0.8.4
This commit is contained in:
@ -463,3 +463,13 @@ bool RenderD7::BitmapPrinter::Decode(Decoder deccc) {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void RenderD7::BitmapPrinter::DrawBitmap(int x, int y, BMP map) {
|
||||
for (int i = 0; i < map.bmp_info_header.width; i++) {
|
||||
for (int j = 0; j < map.bmp_info_header.height; j++) {
|
||||
bitmap.set_pixel(
|
||||
x + i, (bitmap.bmp_info_header.height - 1) - (y + j),
|
||||
UNPACK_BGRA(map.get_pixel(i, (map.bmp_info_header.height - 1) - j)));
|
||||
}
|
||||
}
|
||||
}
|
22
source/Tasks.cpp
Normal file
22
source/Tasks.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include <renderd7/Tasks.hpp>
|
||||
|
||||
#include <3ds.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static std::vector<Thread> threads;
|
||||
|
||||
void Tasks::create(ThreadFunc entrypoint) {
|
||||
s32 prio = 0;
|
||||
svcGetThreadPriority(&prio, CUR_THREAD_HANDLE);
|
||||
Thread thread = threadCreate((ThreadFunc)entrypoint, NULL, 64 * 1024,
|
||||
prio - 1, -2, false);
|
||||
threads.push_back(thread);
|
||||
}
|
||||
|
||||
void Tasks::destroy(void) {
|
||||
for (u32 i = 0; i < threads.size(); i++) {
|
||||
threadJoin(threads.at(i), U64_MAX);
|
||||
threadFree(threads.at(i));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user