| 572 | }; |
| 573 | |
| 574 | bool ConvertTile(const TextureInfo & ti, |
| 575 | void * texels, |
| 576 | NativePf8888 * palette, |
| 577 | ETextureFormat texture_format, |
| 578 | u32 pitch) |
| 579 | { |
| 580 | DAEDALUS_ASSERT(texture_format == TexFmt_8888, "OSX should only use RGBA 8888 textures"); |
| 581 | |
| 582 | TileDestInfo dsti( texture_format ); |
| 583 | dsti.Data = texels; |
| 584 | dsti.Width = ti.GetWidth(); |
| 585 | dsti.Height = ti.GetHeight(); |
| 586 | dsti.Pitch = pitch; |
| 587 | //dsti.Palette = palette; |
| 588 | |
| 589 | DAEDALUS_ASSERT(ti.GetLine() != 0, "No line"); |
| 590 | |
| 591 | const ConvertFunction fn = gConvertFunctions[ (ti.GetFormat() << 2) | ti.GetSize() ]; |
| 592 | if( fn ) |
| 593 | { |
| 594 | fn( dsti, ti ); |
| 595 | return true; |
| 596 | } |
| 597 | |
| 598 | DAEDALUS_ERROR("Unhandled format %d/%d", ti.GetFormat(), ti.GetSize()); |
| 599 | return false; |
| 600 | } |
| 601 | #endif //DAEDALUS_ACCURATE_TMEM |