/*
 * Copyright (C) 2002  Terence M. Welsh
 *
 * Skyrocket is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as 
 * published by the Free Software Foundation.
 *
 * Skyrocket is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


#ifndef HELIOS_DATA_H
#define HELIOS_DATA_H

#include <string.h>
#include <qfile.h>
#include <kstandarddirs.h>

#define TEXSIZE 256
unsigned char spheremap[TEXSIZE][TEXSIZE][3];

void loadDataFile(QString name, unsigned char* data)
{
	QString filename = locate("data", name);
	QFile file(filename);
	if (!file.open(IO_ReadOnly))
	{
		printf("Error opening file %s\n", filename.latin1());
		return;
	}
	memcpy(data, file.readAll().data(), file.size());
	file.close();
}

void loadHeliosData()
{
	loadDataFile("rss-kde/spheremap", (unsigned char*)spheremap);
}


#endif
