~haggai-eran/nux/rtl-rebased

« back to all changes in this revision

Viewing changes to NuxImage/Bmp.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-21 23:49:15 UTC
  • mfrom: (508.1.2 nux-20)
  • Revision ID: jay.taoko@canonical.com-20111021234915-hnzakb5ndebica8i
* Removed custom Nux types: t_u32, t_s32, t_bool, ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
 
362
362
 
363
363
    bmp_data_pointer = bmp_buffer;
364
 
    t_u32 image_width = TextureObjectData->GetSurface(0).GetWidth();
365
 
    t_u32 image_height = TextureObjectData->GetSurface(0).GetHeight();
366
 
    t_u32 i, j;
367
 
    t_u32 value;
 
364
    unsigned int image_width = TextureObjectData->GetSurface(0).GetWidth();
 
365
    unsigned int image_height = TextureObjectData->GetSurface(0).GetHeight();
 
366
    unsigned int i, j;
 
367
    unsigned int value;
368
368
 
369
369
    // 32 bits RGBA pixels
370
370
    if (infoheader.biBitCount == 32)
430
430
      }
431
431
      else
432
432
      {
433
 
        t_u32 ix, iy = image_height - 1;
434
 
        t_u32 val, valS, skip;
435
 
        t_u32 index = 0;
 
433
        unsigned int ix, iy = image_height - 1;
 
434
        unsigned int val, valS, skip;
 
435
        unsigned int index = 0;
436
436
 
437
437
        while (iy >= 0)
438
438
        {
710
710
    }
711
711
 
712
712
 
713
 
    t_s32 i, j;
 
713
    int i, j;
714
714
 
715
715
    for (j = 0; j < image->GetSurface(0).GetHeight(); j++)
716
716
    {
717
717
      for (i = 0; i < image->GetSurface(0).GetWidth(); i++)
718
718
      {
719
 
        t_u32 gba = image->GetSurface(0).Read(i, image->GetSurface(0).GetHeight() - 1 - j);
 
719
        unsigned int gba = image->GetSurface(0).Read(i, image->GetSurface(0).GetHeight() - 1 - j);
720
720
        file.write((char *) &gba, 3);
721
721
      }
722
722
    }