Skip to content

Commit

Permalink
Rename org.axmol* to dev.axmol* (axmolengine#2272)
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 authored Dec 13, 2024
1 parent e9d51ed commit 3d24cae
Show file tree
Hide file tree
Showing 90 changed files with 217 additions and 241 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/SharedLoader.java.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
package org.axmol.lib;
package dev.axmol.lib;

@SuppressWarnings("unused")
public final class SharedLoader {
Expand Down
2 changes: 1 addition & 1 deletion core/2d/FontAtlas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "2d/FontAtlas.h"
#if AX_TARGET_PLATFORM != AX_PLATFORM_WIN32 && AX_TARGET_PLATFORM != AX_PLATFORM_ANDROID
#elif AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID
# include "platform/android/jni/Java_org_axmol_lib_AxmolEngine.h"
# include "platform/android/jni/Java_dev_axmol_lib_AxmolEngine.h"
#endif
#include <algorithm>
#include "2d/FontFreeType.h"
Expand Down
10 changes: 5 additions & 5 deletions core/base/Controller-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ Controller::Controller()

void Controller::receiveExternalKeyEvent(int externalKeyCode, bool receive)
{
JniHelper::callStaticVoidMethod("org.axmol.lib.GameControllerHelper", "receiveExternalKeyEvent", _deviceId,
JniHelper::callStaticVoidMethod("dev.axmol.lib.GameControllerHelper", "receiveExternalKeyEvent", _deviceId,
externalKeyCode, receive);
}

}

extern "C" {

JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeControllerConnected(JNIEnv*,
JNIEXPORT void JNICALL Java_dev_axmol_lib_GameControllerAdapter_nativeControllerConnected(JNIEnv*,
jclass,
jstring deviceName,
jint controllerID)
Expand All @@ -178,7 +178,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeController
ax::ControllerImpl::onConnected(ax::JniHelper::jstring2string(deviceName), controllerID);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeControllerDisconnected(JNIEnv*,
JNIEXPORT void JNICALL Java_dev_axmol_lib_GameControllerAdapter_nativeControllerDisconnected(JNIEnv*,
jclass,
jstring deviceName,
jint controllerID)
Expand All @@ -187,7 +187,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeController
ax::ControllerImpl::onDisconnected(ax::JniHelper::jstring2string(deviceName), controllerID);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeControllerButtonEvent(JNIEnv*,
JNIEXPORT void JNICALL Java_dev_axmol_lib_GameControllerAdapter_nativeControllerButtonEvent(JNIEnv*,
jclass,
jstring deviceName,
jint controllerID,
Expand All @@ -200,7 +200,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeController
isPressed, value, isAnalog);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_GameControllerAdapter_nativeControllerAxisEvent(JNIEnv*,
JNIEXPORT void JNICALL Java_dev_axmol_lib_GameControllerAdapter_nativeControllerAxisEvent(JNIEnv*,
jclass,
jstring deviceName,
jint controllerID,
Expand Down
4 changes: 2 additions & 2 deletions core/base/EventType.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/

// The application will come to foreground.
// This message is posted in core/platform/android/jni/Java_org_axmol_lib_AxmolRenderer.cpp.
// This message is posted in core/platform/android/jni/Java_dev_axmol_lib_AxmolRenderer.cpp.
#define EVENT_COME_TO_FOREGROUND "event_come_to_foreground"

// The renderer[android:GLSurfaceView.Renderer WP8:Cocos2dRenderer] was recreated.
Expand All @@ -43,7 +43,7 @@

// The application will come to background.
// This message is used for doing something before coming to background, such as save RenderTexture.
// This message is posted in core/platform/android/jni/Java_org_axmol_lib_AxmolRenderer.cpp and
// This message is posted in core/platform/android/jni/Java_dev_axmol_lib_AxmolRenderer.cpp and
// cocos\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp.
#define EVENT_COME_TO_BACKGROUND "event_come_to_background"

Expand Down
12 changes: 6 additions & 6 deletions core/media/AndroidMediaEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# include "platform/android/jni/JniHelper.h"

extern "C" {
JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeFireEvent(JNIEnv* env, jclass, jlong pME, int arg1)
JNIEXPORT void JNICALL Java_dev_axmol_lib_AxmolMediaEngine_nativeFireEvent(JNIEnv* env, jclass, jlong pME, int arg1)
{
auto mediaEngine = (ax::AndroidMediaEngine*)((uintptr_t)pME);
if (!mediaEngine)
Expand All @@ -36,7 +36,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeFireEvent(JNIEn
mediaEngine->_fireMediaEvent((ax::MEMediaEventType)arg1);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreVideoMeta(JNIEnv* env,
JNIEXPORT void JNICALL Java_dev_axmol_lib_AxmolMediaEngine_nativeStoreVideoMeta(JNIEnv* env,
jclass,
jlong pME,
int outputX,
Expand All @@ -54,7 +54,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreVideoMeta(
mediaEngine->_storeVideoMeta(outputX, outputY, videoX, videoY, cbcrOffset, rotation, videoPF);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreLastVideoSample(JNIEnv* env,
JNIEXPORT void JNICALL Java_dev_axmol_lib_AxmolMediaEngine_nativeStoreLastVideoSample(JNIEnv* env,
jclass,
jlong pME,
jobject sampleBuffer,
Expand All @@ -69,7 +69,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreLastVideoS
mediaEngine->_storeLastVideoSample(sampleData, sampleLen);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreDuration(JNIEnv* env,
JNIEXPORT void JNICALL Java_dev_axmol_lib_AxmolMediaEngine_nativeStoreDuration(JNIEnv* env,
jclass,
jlong pME,
double duration)
Expand All @@ -81,7 +81,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreDuration(J
mediaEngine->_storeDuration(duration);
}

JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreCurrentTime(JNIEnv* env,
JNIEXPORT void JNICALL Java_dev_axmol_lib_AxmolMediaEngine_nativeStoreCurrentTime(JNIEnv* env,
jclass,
jlong pME,
double currentTime)
Expand All @@ -97,7 +97,7 @@ JNIEXPORT void JNICALL Java_org_axmol_lib_AxmolMediaEngine_nativeStoreCurrentTim
namespace ax
{

static const char* className = "org.axmol.lib.AxmolMediaEngine";
static const char* className = "dev.axmol.lib.AxmolMediaEngine";

AndroidMediaEngine::AndroidMediaEngine()
{
Expand Down
2 changes: 1 addition & 1 deletion core/platform/android/Application-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern "C" size_t __ctype_get_mb_cur_max(void)
}
#endif

static const char* applicationHelperClassName = "org.axmol.lib.AxmolEngine";
static const char* applicationHelperClassName = "dev.axmol.lib.AxmolEngine";

namespace ax
{
Expand Down
8 changes: 4 additions & 4 deletions core/platform/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ set(${target_name}_src
javaactivity-android.cpp
jni/JniHelper.cpp
jni/TouchesJni.cpp
jni/Java_org_axmol_lib_AxmolEngine.cpp
jni/Java_org_axmol_lib_AxmolRenderer.cpp
jni/Java_org_axmol_lib_AxmolAccelerometer.cpp
jni/Java_org_axmol_lib_BitmapHelper.cpp
jni/Java_dev_axmol_lib_AxmolEngine.cpp
jni/Java_dev_axmol_lib_AxmolRenderer.cpp
jni/Java_dev_axmol_lib_AxmolAccelerometer.cpp
jni/Java_dev_axmol_lib_BitmapHelper.cpp
)

add_library(${target_name} STATIC
Expand Down
2 changes: 1 addition & 1 deletion core/platform/android/Common-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace ax

void messageBox(const char* pszMsg, const char* pszTitle)
{
JniHelper::callStaticVoidMethod("org.axmol.lib.AxmolEngine", "showDialog", pszTitle, pszMsg);
JniHelper::callStaticVoidMethod("dev.axmol.lib.AxmolEngine", "showDialog", pszTitle, pszMsg);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
#}
-libraryjars com.bda.controller.jar
-dontwarn com.bda.controller.*
-keep class org.axmol.lib.*{*;}
-keep class dev.axmol.lib.*{*;}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ of this software and associated documentation files (the "Software"), to deal
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
package org.axmol.lib;
package dev.axmol.lib;

import java.lang.reflect.Method;

import org.axmol.lib.GameControllerDelegate.ControllerEventListener;
import org.axmol.lib.inputmanagercompat.InputManagerCompat;
import org.axmol.lib.inputmanagercompat.InputManagerCompat.InputDeviceListener;
import org.axmol.lib.AxmolActivity;
import dev.axmol.lib.GameControllerDelegate.ControllerEventListener;
import dev.axmol.lib.inputmanagercompat.InputManagerCompat;
import dev.axmol.lib.inputmanagercompat.InputManagerCompat.InputDeviceListener;
import dev.axmol.lib.AxmolActivity;

import android.os.Bundle;
import android.view.KeyEvent;
Expand Down Expand Up @@ -70,19 +70,19 @@ public void connectController(int driveType){
if (mControllerMoga != null) {
return;
}
controllerDelegate = loader.loadClass("org.axmol.lib.GameControllerMoga");
controllerDelegate = loader.loadClass("dev.axmol.lib.GameControllerMoga");
} else if (driveType == DRIVERTYPE_NIBIRU) {
if (mControllerNibiru != null) {
mControllerNibiru.onCreate(sGameControllerActivity);
mControllerNibiru.onResume();
return;
}
controllerDelegate = loader.loadClass("org.axmol.lib.GameControllerNibiru");
controllerDelegate = loader.loadClass("dev.axmol.lib.GameControllerNibiru");
} else if (driveType == DRIVERTYPE_OUYA) {
if (mControllerOuya != null) {
return;
}
controllerDelegate = loader.loadClass("org.axmol.lib.GameControllerOuya");
controllerDelegate = loader.loadClass("dev.axmol.lib.GameControllerOuya");
}

GameControllerDelegate instance = (GameControllerDelegate)controllerDelegate.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ of this software and associated documentation files (the "Software"), to deal
THE SOFTWARE.
****************************************************************************/

package org.axmol.lib;
package dev.axmol.lib;

import java.util.ArrayList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ of this software and associated documentation files (the "Software"), to deal
THE SOFTWARE.
****************************************************************************/

package org.axmol.lib;
package dev.axmol.lib;

import org.axmol.lib.GameControllerDelegate;
import dev.axmol.lib.GameControllerDelegate;

import android.content.Context;
import android.os.Handler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ of this software and associated documentation files (the "Software"), to deal
THE SOFTWARE.
****************************************************************************/

package org.axmol.lib;
package dev.axmol.lib;

import org.axmol.lib.GameControllerDelegate;
import dev.axmol.lib.GameControllerDelegate;

import com.nibiru.lib.controller.AccEvent;
import com.nibiru.lib.controller.Controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ of this software and associated documentation files (the "Software"), to deal
THE SOFTWARE.
****************************************************************************/

package org.axmol.lib;
package dev.axmol.lib;


import org.axmol.lib.GameControllerDelegate;
import dev.axmol.lib.GameControllerDelegate;

import tv.ouya.console.api.OuyaController;
import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.axmol.lib.inputmanagercompat;
package dev.axmol.lib.inputmanagercompat;

import android.content.Context;
import android.os.Build;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.axmol.lib.inputmanagercompat;
package dev.axmol.lib.inputmanagercompat;

import android.annotation.TargetApi;
import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.axmol.lib.inputmanagercompat;
package dev.axmol.lib.inputmanagercompat;

import android.os.Handler;
import android.os.Message;
Expand Down
8 changes: 4 additions & 4 deletions core/platform/android/Device-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ THE SOFTWARE.
#include "platform/FileUtils.h"
#include "yasio/string_view.hpp"

static const char* deviceHelperClassName = "org.axmol.lib.AxmolEngine";
static const char* deviceHelperClassName = "dev.axmol.lib.AxmolEngine";

namespace ax
{
Expand Down Expand Up @@ -85,7 +85,7 @@ class BitmapDC
const FontDefinition& textDefinition)
{
JniMethodInfo methodInfo;
if (!JniHelper::getStaticMethodInfo(methodInfo, "org.axmol.lib.BitmapHelper",
if (!JniHelper::getStaticMethodInfo(methodInfo, "dev.axmol.lib.BitmapHelper",
"createTextBitmapShadowStroke",
"([BLjava/lang/String;IIIIIIIIZFFFFZIIIIFZI)Z"))
{
Expand All @@ -112,7 +112,7 @@ class BitmapDC

/**create bitmap
* this method call Cococs2dx.createBitmap()(java code) to create the bitmap, the java code
* will call Java_org_axmol_lib_BitmapHelper_nativeInitBitmapDC() to init the width, height
* will call Java_dev_axmol_lib_BitmapHelper_nativeInitBitmapDC() to init the width, height
* and data.
* use this approach to decrease the jni call number
*/
Expand Down Expand Up @@ -220,7 +220,7 @@ extern "C" {
* this method is called by java code to init width, height and pixels data
*/
JNIEXPORT void JNICALL
Java_org_axmol_lib_BitmapHelper_nativeInitBitmapDC(JNIEnv* env, jclass, jint width, jint height, jbyteArray pixels)
Java_dev_axmol_lib_BitmapHelper_nativeInitBitmapDC(JNIEnv* env, jclass, jint width, jint height, jbyteArray pixels)
{
int size = width * height * 4;
ax::BitmapDC& bitmapDC = ax::sharedBitmapDC();
Expand Down
8 changes: 4 additions & 4 deletions core/platform/android/FileUtils-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
#include "platform/android/FileUtils-android.h"
#include "platform/Common.h"
#include "platform/android/jni/JniHelper.h"
#include "platform/android/jni/Java_org_axmol_lib_AxmolEngine.h"
#include "platform/android/jni/Java_dev_axmol_lib_AxmolEngine.h"
#include "android/asset_manager.h"
#include "android/asset_manager_jni.h"
#include "base/ZipUtils.h"
Expand Down Expand Up @@ -205,7 +205,7 @@ bool FileUtilsAndroid::isAbsolutePath(std::string_view strPath) const
{
// On Android, there are two situations for full path.
// 1) Files in APK, e.g. assets/path/path/file.png
// 2) Files not in APK, e.g. /data/data/org.axmol.hellocpp/cache/path/path/file.png, or
// 2) Files not in APK, e.g. /data/data/dev.axmol.hellocpp/cache/path/path/file.png, or
// /sdcard/path/path/file.png. So these two situations need to be checked on Android.
return (strPath[0] == '/' || strPath.find(_defaultResRootPath) == 0);
}
Expand Down Expand Up @@ -305,9 +305,9 @@ std::string FileUtilsAndroid::getNativeWritableAbsolutePath() const
// Fix for Nexus 10 (Android 4.2 multi-user environment)
// the path is retrieved through Java Context.getCacheDir() method
#ifdef AX_USE_ANDROID_EXTERNAL_FILES_DIR
std::string path = JniHelper::callStaticStringMethod("org.axmol.lib.AxmolEngine", "getExternalFilesDir");
std::string path = JniHelper::callStaticStringMethod("dev.axmol.lib.AxmolEngine", "getExternalFilesDir");
#else
std::string path = JniHelper::callStaticStringMethod("org.axmol.lib.AxmolEngine", "getInternalFilesDir");
std::string path = JniHelper::callStaticStringMethod("dev.axmol.lib.AxmolEngine", "getInternalFilesDir");
#endif
if (!path.empty())
path.append("/");
Expand Down
8 changes: 4 additions & 4 deletions core/platform/android/GLViewImpl-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool GLViewImpl::isOpenGLReady()

void GLViewImpl::end()
{
JniHelper::callStaticVoidMethod("org.axmol.lib.AxmolEngine", "onExit");
JniHelper::callStaticVoidMethod("dev.axmol.lib.AxmolEngine", "onExit");
release();
}

Expand All @@ -117,11 +117,11 @@ void GLViewImpl::setIMEKeyboardState(bool bOpen)
{
if (bOpen)
{
JniHelper::callStaticVoidMethod("org.axmol.lib.AxmolGLSurfaceView", "openIMEKeyboard");
JniHelper::callStaticVoidMethod("dev.axmol.lib.AxmolGLSurfaceView", "openIMEKeyboard");
}
else
{
JniHelper::callStaticVoidMethod("org.axmol.lib.AxmolGLSurfaceView", "closeIMEKeyboard");
JniHelper::callStaticVoidMethod("dev.axmol.lib.AxmolGLSurfaceView", "closeIMEKeyboard");
}
}

Expand Down Expand Up @@ -269,7 +269,7 @@ Rect GLViewImpl::getSafeAreaRect() const

void GLViewImpl::queueOperation(void (*op)(void*), void* param)
{
JniHelper::callStaticVoidMethod("org.axmol.lib.AxmolEngine", "queueOperation", (jlong)(uintptr_t)op,
JniHelper::callStaticVoidMethod("dev.axmol.lib.AxmolEngine", "queueOperation", (jlong)(uintptr_t)op,
(jlong)(uintptr_t)param);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ of this software and associated documentation files (the "Software"), to deal
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
package org.axmol.lib;
package dev.axmol.lib;

import android.content.Context;
import android.content.res.Configuration;
Expand Down
Loading

0 comments on commit 3d24cae

Please sign in to comment.