/*--------------------------------------------------------------------------
  Project:  Manual 2D Library - m2d
  File:     DirectTexture.h

  Copyright (C)2007-2009 Nintendo  All Rights Reserved.

  These coded instructions, statements, and computer programs contain
  proprietary information of Nintendo of America Inc. and/or Nintendo
  Company Ltd., and are protected by Federal copyright law. They may
  not be disclosed to third parties or copied or duplicated in any form,
  in whole or in part, without the prior written consent of Nintendo.

  $Revision: 1.10 $
 *-------------------------------------------------------------------------*/

#ifndef NTMV_M2D_DIRECTTEXTURE_H_
#define NTMV_M2D_DIRECTTEXTURE_H_

#if defined(__CWCC__)
#pragma once
#endif

#include <nitro/types.h>
#include <ntmv/m2d/resources.h>

namespace ntmv
{
namespace m2d
{

class ObjectConstructor;

/*
    Class that handles direct color format images
*/
class DirectTexture
{
public:
                        DirectTexture();

    void                Finalize(const ObjectConstructor& objectConstructor);

    void                Set(
                            const ObjectConstructor&    objectConstructor,
                            const ImageHeader*          pImageHd);

    const void*         GetImage() const            { return mpImage; }
    const Size          GetSize() const             { return mSize; }

private:
    Size                mSize;          // Size

    const u16*          mpImage;        // Image pointer

    struct
    {
        u32                 bAllocImage:        1;  // TRUE if memory was allocated
    }                   mFlags;          // Flags
};

}   // namespace m2d
}   // namespace ntmv

/* NTMV_M2D_DIRECTTEXTURE_H_ */
#endif
