You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
741 B
C++
35 lines
741 B
C++
#include <Ogre.h>
|
|
#include <iostream>
|
|
|
|
// This is a test of the BSA archive handler for OGRE.
|
|
|
|
#include "../bsa_archive.hpp"
|
|
|
|
using namespace Ogre;
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
// Disable Ogre logging
|
|
new LogManager;
|
|
Log *log = LogManager::getSingleton().createLog("");
|
|
log->setDebugOutputEnabled(false);
|
|
|
|
// Set up Root
|
|
Root *root = new Root("","","");
|
|
|
|
// Add the BSA
|
|
addBSA("../../data/Morrowind.bsa");
|
|
|
|
// Pick a sample file
|
|
String tex = "textures\\tx_natural_cavern_wall13.dds";
|
|
cout << "Opening file: " << tex << endl;
|
|
|
|
// Get it from the resource system
|
|
DataStreamPtr data = ResourceGroupManager::getSingleton().openResource(tex, "General");
|
|
|
|
cout << "Size: " << data->size() << endl;
|
|
|
|
return 0;
|
|
}
|