Implement asset loading for kraken_convert
This commit is contained in:
@@ -11,6 +11,7 @@ class Context::impl
|
||||
public:
|
||||
impl();
|
||||
~impl();
|
||||
bool loadResource(const char* szPath);
|
||||
|
||||
private:
|
||||
KRContext mContext;
|
||||
@@ -35,6 +36,18 @@ Context::~Context()
|
||||
delete mImpl;
|
||||
}
|
||||
|
||||
bool Context::loadResource(const char* szPath)
|
||||
{
|
||||
return mImpl->loadResource(szPath);
|
||||
}
|
||||
|
||||
bool Context::impl::loadResource(const char* szPath)
|
||||
{
|
||||
mContext.loadResource(szPath);
|
||||
// TODO: update KRContext::loadResource to return success/fail boolean
|
||||
return true;
|
||||
}
|
||||
|
||||
Context::impl::impl()
|
||||
{
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ class Context
|
||||
class impl;
|
||||
public:
|
||||
static Context* Get();
|
||||
bool loadResource(const char* szPath);
|
||||
private:
|
||||
Context();
|
||||
~Context();
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
#include "main.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "kraken.h"
|
||||
|
||||
using namespace kraken;
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
Context* context = Context::Get();
|
||||
|
||||
for (int i = 0; i < argc; i++) {
|
||||
char *arg = argv[i];
|
||||
if (arg[0] != '-') {
|
||||
context->loadResource(arg);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Kraken Convert\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user