//
// Tools_Texture_Management.cpp
//
// Created by Richard Rice - 26/06/2002
// 
// Copyright (C) 2002 Rebellion, All Rights Reserved.
//

#include "Core/Asura.h"
#include "Debugging/Asura_Assert.h"

#include "Core/Asura_TextureManagement.h"
#include "Texturing/Tools_Texture_Management.h"

struct Tools_Texture_Data
{
	int Width;
	int Height;
};

static Tools_Texture_Data Textures[ASURA_MAX_NO_OF_TEXTURES];

void Tools_Texture_Management::StoreTextureSize(int index,int width,int height)
{
	Asura_Assert(index>=0 && index<ASURA_MAX_NO_OF_TEXTURES,"");
	Textures[index].Width = width;
	Textures[index].Height = height;
}

bool Tools_Texture_Management::GetTextureSize(int index,int& width,int& height)
{
	Asura_Assert(index>=0 && index<ASURA_MAX_NO_OF_TEXTURES,"");
	if(!Textures[index].Width || !Textures[index].Height) return false;

	width = Textures[index].Width;
	height = Textures[index].Height;
	return true;
}
