Fix broken merge

This commit is contained in:
Luke Benstead 2023-09-01 20:29:24 +01:00
parent 0e31aa3d27
commit 9cedc81850
2 changed files with 9 additions and 15 deletions

View File

@ -147,25 +147,16 @@ void* alloc_next_available_ex(void* pool, size_t required_size, size_t* start_su
uintptr_t offset = (it - pool_header.block_usage) * 8;
offset += (i + 1);
offset -= required_subblocks;
if(start_subblock_out) {
*start_subblock_out = offset;
}
return pool_header.base_address + (offset * 256);
}
}
} else {
found_subblocks = 0;
} else {
found_subblocks++;
if(found_subblocks >= required_subblocks) {
/* We found space! Now calculate the address */
uintptr_t offset = (it - pool_header.block_usage) * 8;
offset += (i + 1);
offset -= required_subblocks;
if(start_subblock_out) {
*start_subblock_out = offset;
}
return pool_header.base_address + (offset * 256);
}
}
t <<= 1;

View File

@ -10,7 +10,10 @@ public:
uint8_t image_data[8 * 8 * 4] = {0};
void set_up() {
glKosInit();
GLdcConfig config;
glKosInitConfig(&config);
config.texture_twiddle = false;
glKosInitEx(&config);
/* Init image data so each texel RGBA value matches the
* position in the array */