Skip to content

Commit 48cdb86

Browse files
committed
Some logs and comment removed. Readme updated.
1 parent a2d2708 commit 48cdb86

File tree

4 files changed

+22
-29
lines changed

4 files changed

+22
-29
lines changed

README

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
Pacman: Test task from ZeptoLab. Android NDK(C++) + OpenGL ES 2.0 + OpenSL ES + Java wrapping
2+
3+
Available on Google Play: https://play.google.com/store/apps/details?id=com.zagayevskiy.pacman

jni/graphics/ui/menu/SwipeGameMenu.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "SwipeGameMenu.h"
99

10-
const char* SwipeGameMenu::INFO_STRING = "x%d %d/%d Food cost:%d";
10+
const char* SwipeGameMenu::INFO_STRING = "x%d %d/%d Food cost:%d";
1111

1212
SwipeGameMenu::SwipeGameMenu()
1313
: lastX(-1.0f), lastY(-1.0f), event(EVENT_NONE), labelInfo(NULL), lifeImage(NULL){

jni/log.h

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#ifndef LOG_H_
2-
#define LOG_H_
3-
4-
#include <android/log.h>
5-
#include <GLES2/gl2.h>
6-
7-
#define LOG_TAG "pacman"
8-
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
9-
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
10-
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
11-
12-
static void checkGlError(const char* op) {
13-
for (GLint error = glGetError(); error; error = glGetError()) {
14-
LOGE("after %s glError (0x%x)\n", op, error);
15-
}
16-
}
17-
18-
#endif
1+
#ifndef LOG_H_
2+
#define LOG_H_
3+
4+
#include <android/log.h>
5+
#include <GLES2/gl2.h>
6+
7+
#define LOG_TAG "pacman"
8+
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
9+
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
10+
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
11+
12+
static void checkGlError(const char* op) {
13+
for (GLint error = glGetError(); error; error = glGetError()) {
14+
LOGE("after %s glError (0x%x)\n", op, error);
15+
}
16+
}
17+
18+
#endif

src/com/zagayevskiy/pacman/PacmanActivity.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,26 @@ public void onCreate(Bundle savedInstanceState) {
3636
*/
3737
@Override
3838
protected void onPause() {
39-
// is called when a different Activity instance is going to be visible
40-
// and the current Activity has stopped interacting with the user
4139
super.onPause();
42-
Log.i(PacmanLib.tag, "PacmanActivity.onPause()");
4340
PacmanLib.stop();
4441
//pacmanView.onPause();
45-
4642
}
4743

4844

4945
@Override
5046
protected void onResume() {
51-
//is called when the Activity object and its views become interactive with the user
52-
super.onResume();
53-
//pacmanView.onResume();
47+
super.onResume();;
5448
}
5549

5650
@Override
5751
protected void onStop() {
58-
//is called when an activity is no longer visible to, or interacting with, the user
5952
super.onStop();
60-
Log.i(PacmanLib.tag, "PacmanActivity.onStop()");
6153
PacmanLib.stop();
6254
}
6355

6456
@Override
6557
protected void onDestroy(){
6658
super.onDestroy();
67-
Log.i(PacmanLib.tag, "PacmanActivity.onDestroy()");
6859
PacmanLib.free();
6960
}
7061

0 commit comments

Comments
 (0)