remove Android Asset handling
This commit is contained in:
parent
97584126e7
commit
0f3be8033e
1 changed files with 13 additions and 13 deletions
|
@ -7,8 +7,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "os_generic.h"
|
#include "os_generic.h"
|
||||||
#include <GLES3/gl3.h>
|
#include <GLES3/gl3.h>
|
||||||
#include <android/asset_manager.h>
|
//A-s-s-e-t-s #include <android/asset_manager.h>
|
||||||
#include <android/asset_manager_jni.h>
|
//A-s-s-e-t-s #include <android/asset_manager_jni.h>
|
||||||
#include <android_native_app_glue.h>
|
#include <android_native_app_glue.h>
|
||||||
//SENSORSTURFF #include <android/sensor.h>
|
//SENSORSTURFF #include <android/sensor.h>
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
|
@ -533,16 +533,16 @@ int main( int argc, char ** argv )
|
||||||
Heightmap[x+y*HMX] = tdPerlin2D( x, y )*8.;
|
Heightmap[x+y*HMX] = tdPerlin2D( x, y )*8.;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * assettext = "Not Found,2";
|
//A-s-s-e-t-s const char * assettext = "Not Found,2";
|
||||||
AAsset * file = AAssetManager_open( gapp->activity->assetManager, "asset.txt", AASSET_MODE_BUFFER );
|
//A-s-s-e-t-s AAsset * file = AAssetManager_open( gapp->activity->assetManager, "asset.txt", AASSET_MODE_BUFFER );
|
||||||
if( file )
|
//A-s-s-e-t-s if( file )
|
||||||
{
|
//A-s-s-e-t-s {
|
||||||
size_t fileLength = AAsset_getLength(file);
|
//A-s-s-e-t-s size_t fileLength = AAsset_getLength(file);
|
||||||
char * temp = (char*)malloc( fileLength + 1);
|
//A-s-s-e-t-s char * temp = (char*)malloc( fileLength + 1);
|
||||||
memcpy( temp, AAsset_getBuffer( file ), fileLength );
|
//A-s-s-e-t-s memcpy( temp, AAsset_getBuffer( file ), fileLength );
|
||||||
temp[fileLength] = 0;
|
//A-s-s-e-t-s temp[fileLength] = 0;
|
||||||
assettext = temp;
|
//A-s-s-e-t-s assettext = temp;
|
||||||
}
|
//A-s-s-e-t-s }
|
||||||
|
|
||||||
//SENSORSTURFF // Inertial Measurement Unit (gyroscopes and accelerometer)
|
//SENSORSTURFF // Inertial Measurement Unit (gyroscopes and accelerometer)
|
||||||
//SENSORSTURFF SetupIMU();
|
//SENSORSTURFF SetupIMU();
|
||||||
|
@ -585,7 +585,7 @@ int main( int argc, char ** argv )
|
||||||
DrawHeightmap();
|
DrawHeightmap();
|
||||||
CNFGPenX = 0; CNFGPenY = 400;
|
CNFGPenX = 0; CNFGPenY = 400;
|
||||||
CNFGColor( 0xffffffff );
|
CNFGColor( 0xffffffff );
|
||||||
CNFGDrawText( assettext, 15 );
|
//A-s-s-e-t-s CNFGDrawText( assettext, 15 );
|
||||||
CNFGFlushRender();
|
CNFGFlushRender();
|
||||||
|
|
||||||
CNFGPenX = 0; CNFGPenY = 480;
|
CNFGPenX = 0; CNFGPenY = 480;
|
||||||
|
|
Loading…
Add table
Reference in a new issue