mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 13:57:59 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
34
components/bsa/tests/ogre_archive_test.cpp
Normal file
34
components/bsa/tests/ogre_archive_test.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#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
|
||||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue