Compare commits
5 Commits
dev-ba7188
...
master
Author | SHA1 | Date | |
---|---|---|---|
e0a2729572 | |||
fc62be8b5d | |||
5f186ac1d2 | |||
1cc0c275ab | |||
cfb0c1fee0 |
2
.github/workflows/cd.yml
vendored
2
.github/workflows/cd.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
linux-ubuntu:
|
||||
timeout-minutes: 10
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -81,3 +81,4 @@ jobs:
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.14...3.24 FATAL_ERROR)
|
||||
|
||||
#pingpong
|
||||
|
||||
# cmake setup begin
|
||||
project(tomato)
|
||||
|
||||
|
@ -99,7 +99,7 @@ ImageLoaderSDLImage::ImageResult ImageLoaderSDLImage::loadFromMemoryRGBA(const u
|
||||
|
||||
auto& new_frame = res.frames.emplace_back();
|
||||
new_frame.ms = anim->delays[i];
|
||||
new_frame.data = {(const uint8_t*)conv_surf->pixels, ((const uint8_t*)conv_surf->pixels) + (anim->w*anim->h*4)};
|
||||
new_frame.data.insert(new_frame.data.cbegin(), (const uint8_t*)conv_surf->pixels, ((const uint8_t*)conv_surf->pixels) + (anim->w*anim->h*4));
|
||||
|
||||
SDL_UnlockSurface(conv_surf);
|
||||
SDL_DestroySurface(conv_surf);
|
||||
|
@ -41,7 +41,7 @@ ImageLoaderSTB::ImageResult ImageLoaderSTB::loadFromMemoryRGBA(const uint8_t* da
|
||||
for (int i = 0; i < z; i++) {
|
||||
auto& new_frame = res.frames.emplace_back();
|
||||
new_frame.ms = delays[i];
|
||||
new_frame.data = {img_data + (i*stride), img_data + ((i+1)*stride)};
|
||||
new_frame.data.insert(new_frame.data.cbegin(), img_data + (i*stride), img_data + ((i+1)*stride));
|
||||
}
|
||||
|
||||
stbi_image_free(delays); // hope this is right
|
||||
@ -62,7 +62,7 @@ ImageLoaderSTB::ImageResult ImageLoaderSTB::loadFromMemoryRGBA(const uint8_t* da
|
||||
|
||||
auto& new_frame = res.frames.emplace_back();
|
||||
new_frame.ms = 0;
|
||||
new_frame.data = {img_data, img_data+(x*y*4)};
|
||||
new_frame.data.insert(new_frame.data.cbegin(), img_data, img_data+(x*y*4));
|
||||
|
||||
stbi_image_free(img_data);
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user