本文整理汇总了C++中AssetManager::list方法的典型用法代码示例。如果您正苦于以下问题:C++ AssetManager::list方法的具体用法?C++ AssetManager::list怎么用?C++ AssetManager::list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetManager
的用法示例。
在下文中一共展示了AssetManager::list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadBitmaps
void LoadBitmaps(JavaVM* vm, JNIEnv* env, jobject objActivity)
{
vm->AttachCurrentThread(&env, NULL);
BitmapFactory::Options options = BitmapFactory::Options();
options.set_inScaled(false); // No pre-scaling
Activity activity = Activity(objActivity);
Context context = activity.getApplicationContext();
AssetManager assetManager = context.getAssets();
String path = String("");
std::vector<std::string> files = assetManager.list(path);
for (int index = 0; index < files.size(); ++index)
{
__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, files[index].c_str());
}
glGenTextures(TEXTURE_COUNT, &textures[0]);
int textureId = 0;
g_controller = LoadTexture(env, assetManager, options, "controller.png", textureId);
g_buttonA = LoadTexture(env, assetManager, options, "a.png", ++textureId);
g_dpadDown = LoadTexture(env, assetManager, options, "dpad_down.png", ++textureId);
g_dpadLeft = LoadTexture(env, assetManager, options, "dpad_left.png", ++textureId);
g_dpadRight = LoadTexture(env, assetManager, options, "dpad_right.png", ++textureId);
g_dpadUp = LoadTexture(env, assetManager, options, "dpad_up.png", ++textureId);
g_leftBumper = LoadTexture(env, assetManager, options, "lb.png", ++textureId);
g_leftTrigger = LoadTexture(env, assetManager, options, "lt.png", ++textureId);
g_leftStickInactive = LoadTexture(env, assetManager, options, "l_stick.png", ++textureId);
g_buttonO = LoadTexture(env, assetManager, options, "o.png", ++textureId);
g_rightBumper = LoadTexture(env, assetManager, options, "rb.png", ++textureId);
g_rightTrigger = LoadTexture(env, assetManager, options, "rt.png", ++textureId);
g_rightStickInactive = LoadTexture(env, assetManager, options, "r_stick.png", ++textureId);
g_leftStickActive = LoadTexture(env, assetManager, options, "thumbl.png", ++textureId);
g_rightStickActive = LoadTexture(env, assetManager, options, "thumbr.png", ++textureId);
g_buttonU = LoadTexture(env, assetManager, options, "u.png", ++textureId);
g_buttonY = LoadTexture(env, assetManager, options, "y.png", ++textureId);
__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "Loaded %d textures", textureId + 1);
}