kraken_convert now takes an '-o' argument to specify the output bundle. Created cmake scripts to use kraken_convert to bundle standard assets. HRTF Kemar data is now bundled by cmake scripts. Added README.md for HRTF Kemar data
This commit is contained in:
@@ -4,10 +4,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
if (WIN32)
|
||||
add_executable(kraken_cube WIN32 main_win.cpp)
|
||||
add_executable(kraken_cube WIN32 main_win.cpp hello_cube.cpp)
|
||||
add_compile_definitions(UNICODE)
|
||||
else(WIN32)
|
||||
add_executable(kraken_cube main_macos.mm)
|
||||
add_executable(kraken_cube main_macos.mm hello_cube.cpp)
|
||||
set(CMAKE_CXX_COMPILER "clang++")
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
7
tests/smoke/hello_cube/hello_cube.cpp
Normal file
7
tests/smoke/hello_cube/hello_cube.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "hello_cube.h"
|
||||
#include "kraken.h"
|
||||
|
||||
void smoke_main()
|
||||
{
|
||||
|
||||
}
|
||||
37
tests/smoke/hello_cube/hello_cube.h
Normal file
37
tests/smoke/hello_cube/hello_cube.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// KRAnimationLayer.h
|
||||
// KREngine
|
||||
//
|
||||
// Copyright 2012 Kearwood Gilbert. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||
// provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// The views and conclusions contained in the software and documentation are those of the
|
||||
// authors and should not be interpreted as representing official policies, either expressed
|
||||
// or implied, of Kearwood Gilbert.
|
||||
//
|
||||
|
||||
#ifndef HELLO_CUBE_H
|
||||
#define HELLO_CUBE_H
|
||||
|
||||
void smoke_main();
|
||||
|
||||
#endif // HELLO_CUBE_H
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <windows.h>
|
||||
#include "kraken.h"
|
||||
#include "hello_cube.h"
|
||||
|
||||
using namespace kraken;
|
||||
|
||||
@@ -22,9 +23,32 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
0, 0, 640, 480, 0, 0, hInstance, NULL))
|
||||
return 2;
|
||||
|
||||
|
||||
KrInitializeInfo init_info = {};
|
||||
init_info.sType = KR_STRUCTURE_TYPE_INITIALIZE;
|
||||
init_info.resourceMapSize = 1024;
|
||||
KrResult res = KrInitialize(&init_info);
|
||||
if (res != KR_SUCCESS) {
|
||||
// printf("Failed to initialize Kraken!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
KrLoadResourceInfo load_resource_info = {};
|
||||
load_resource_info.sType = KR_STRUCTURE_TYPE_LOAD_RESOURCE;
|
||||
load_resource_info.resourceHandle = 1;
|
||||
load_resource_info.pResourcePath = "kraken_standard_assets.krbundle";
|
||||
res = KrLoadResource(&load_resource_info);
|
||||
if (res != KR_SUCCESS) {
|
||||
//printf("Failed to load resource: %s\n", arg);
|
||||
KrShutdown();
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (GetMessage(&msg, NULL, 0, 0) > 0)
|
||||
DispatchMessage(&msg);
|
||||
|
||||
KrShutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user