mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-22 17:47:20 +03:00
Something with streaming
This commit is contained in:
parent
e3ad2108f1
commit
6992f313a9
5 changed files with 37 additions and 30 deletions
2
vendor/librw/src/gl/gl3raster.cpp
vendored
2
vendor/librw/src/gl/gl3raster.cpp
vendored
|
|
@ -630,7 +630,7 @@ rasterUnlock(Raster *raster, int32 level)
|
|||
#endif
|
||||
) {
|
||||
// convert to 16-bit
|
||||
uint16_t* pixels16 = (uint16_t*)malloc(raster->width * raster->height * sizeof(uint16_t));
|
||||
uint16_t* pixels16 = (uint16_t*)rwMalloc(raster->width * raster->height * sizeof(uint16_t));
|
||||
uint8_t* pixels8 = (uint8_t*)raster->pixels;
|
||||
|
||||
for (int i = 0; i < raster->width * raster->height; i++) {
|
||||
|
|
|
|||
4
vendor/librw/src/gles1/gl1raster.cpp
vendored
4
vendor/librw/src/gles1/gl1raster.cpp
vendored
|
|
@ -456,7 +456,7 @@ void rasterUnlock(Raster *raster, int32 level){
|
|||
// flip vertical (igual que antes)
|
||||
{
|
||||
int stride = raster->width * natras->bpp;
|
||||
uint8_t *tmp = (uint8_t*)malloc(stride);
|
||||
uint8_t *tmp = (uint8_t*)rwMalloc(stride);
|
||||
for(int y = 0; y < raster->height / 2; y++){
|
||||
uint8_t *a = (uint8_t*)raster->pixels + y * stride;
|
||||
uint8_t *b = (uint8_t*)raster->pixels + (raster->height - 1 - y) * stride;
|
||||
|
|
@ -470,7 +470,7 @@ void rasterUnlock(Raster *raster, int32 level){
|
|||
if(!natras->isCompressed){
|
||||
if(natras->format == GL_RGBA && natras->type == GL_UNSIGNED_BYTE){
|
||||
// convertir RGBA8888 → RGBA4444
|
||||
uint16_t *pixels16 = (uint16_t*)malloc(raster->width * raster->height * 2);
|
||||
uint16_t *pixels16 = (uint16_t*)rwMalloc(raster->width * raster->height * 2);
|
||||
uint8_t *pixels8 = (uint8_t*)raster->pixels;
|
||||
for(int i = 0; i < raster->width * raster->height; i++){
|
||||
uint8_t r = pixels8[i*4+0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue