Skip to content

Commit 738334a

Browse files
committed
Rename folder core => axmol (step.2)
1 parent 0733baf commit 738334a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+163
-116
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ include(AXBuildSet)
4747

4848
option(AX_BUILD_TESTS "Build cpp & lua tests" ON)
4949

50-
add_subdirectory(${_AX_ROOT}/core ${ENGINE_BINARY_PATH}/axmol/core)
50+
add_subdirectory(${_AX_ROOT}/axmol ${ENGINE_BINARY_PATH}/axmol)
5151

52-
# prevent tests project to build "axmol/core" again
52+
# prevent tests project to build axmol engine again
5353
set(BUILD_ENGINE_DONE ON)
5454

5555
if(AX_BUILD_TESTS)

axmol/CMakeLists.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
set(_AX_VERSION 2.7)
3636

3737
if(NOT DEFINED _AX_CORE_LIB)
38-
set(_AX_CORE_LIB axmol CACHE INTERNAL "The axmol core lib name")
38+
set(_AX_CORE_LIB axmol CACHE INTERNAL "The axmol engine lib name")
3939
endif()
4040

4141
cmake_policy(SET CMP0127 NEW)
@@ -322,7 +322,7 @@ elseif(AX_ENABLE_MFMEDIA AND NOT WINRT)
322322
endif()
323323
endif()
324324

325-
ax_find_shaders(${_AX_ROOT}/core/renderer/shaders BUILTIN_SHADER_SOURCES)
325+
ax_find_shaders(${_AX_ROOT}/axmol/renderer/shaders BUILTIN_SHADER_SOURCES)
326326
set(ax_builtin_shaders ${BUILTIN_SHADER_SOURCES} CACHE STATIC "" FORCE)
327327

328328
# configure engine builtin light num
@@ -348,17 +348,17 @@ configure_file(
348348
# POSITION_BUMPEDNORMAL_TEXTURE_3D: positionNormalTexture.vert, colorNormalTexture.frag, lightNormMapDef
349349
# SKINPOSITION_BUMPEDNORMAL_TEXTURE_3D: skinPositionNormalTexture_vert, colorNormalTexture.frag, lightNormMapDef
350350
set_source_files_properties(
351-
${_AX_ROOT}/core/renderer/shaders/colorNormal.frag
352-
${_AX_ROOT}/core/renderer/shaders/colorNormalTexture.frag
353-
${_AX_ROOT}/core/renderer/shaders/positionNormalTexture.vert
354-
${_AX_ROOT}/core/renderer/shaders/skinPositionNormalTexture.vert
351+
${_AX_ROOT}/axmol/renderer/shaders/colorNormal.frag
352+
${_AX_ROOT}/axmol/renderer/shaders/colorNormalTexture.frag
353+
${_AX_ROOT}/axmol/renderer/shaders/positionNormalTexture.vert
354+
${_AX_ROOT}/axmol/renderer/shaders/skinPositionNormalTexture.vert
355355
PROPERTIES AXSLCC_DEFINES
356356
"MAX_DIRECTIONAL_LIGHT_NUM=${AX_MAX_DIRECTIONAL_LIGHT},MAX_POINT_LIGHT_NUM=${AX_MAX_POINT_LIGHT},MAX_SPOT_LIGHT_NUM=${AX_MAX_SPOT_LIGHT}"
357357
)
358358
set_source_files_properties(
359-
${_AX_ROOT}/core/renderer/shaders/colorNormalTexture.frag
360-
${_AX_ROOT}/core/renderer/shaders/positionNormalTexture.vert
361-
${_AX_ROOT}/core/renderer/shaders/skinPositionNormalTexture.vert
359+
${_AX_ROOT}/axmol/renderer/shaders/colorNormalTexture.frag
360+
${_AX_ROOT}/axmol/renderer/shaders/positionNormalTexture.vert
361+
${_AX_ROOT}/axmol/renderer/shaders/skinPositionNormalTexture.vert
362362
PROPERTIES AXSLCC_OUTPUT1 "USE_NORMAL_MAPPING=1"
363363
)
364364
ax_target_compile_shaders(${_AX_CORE_LIB} FILES ${BUILTIN_SHADER_SOURCES})
@@ -385,14 +385,14 @@ target_include_directories(${_AX_CORE_LIB}
385385
PUBLIC ${_AX_ROOT}
386386
PUBLIC ${_AX_ROOT}/3rdparty
387387
PUBLIC ${_AX_ROOT}/extensions/scripting
388-
PUBLIC ${_AX_ROOT}/core
389-
PUBLIC ${_AX_ROOT}/core/platform
388+
PUBLIC ${_AX_ROOT}/axmol
389+
PUBLIC ${_AX_ROOT}/axmol/platform
390390

391391
INTERFACE ${_AX_ROOT}/3rdparty
392392
INTERFACE ${_AX_ROOT}/extensions/scripting
393-
INTERFACE ${_AX_ROOT}/core/base
394-
INTERFACE ${_AX_ROOT}/core/audio
395-
INTERFACE ${_AX_ROOT}/core/platform/${PLATFORM_NAME}
393+
INTERFACE ${_AX_ROOT}/axmol/base
394+
INTERFACE ${_AX_ROOT}/axmol/audio
395+
INTERFACE ${_AX_ROOT}/axmol/platform/${PLATFORM_NAME}
396396
)
397397

398398
set_target_properties(${_AX_CORE_LIB}
@@ -627,7 +627,7 @@ if(MSVC)
627627
endif()
628628

629629
if(ANDROID)
630-
add_subdirectory(${_AX_ROOT}/core/platform/android ${ENGINE_BINARY_PATH}/core/cpp-android)
630+
add_subdirectory(${_AX_ROOT}/axmol/platform/android ${ENGINE_BINARY_PATH}/axmol/cpp-android)
631631

632632
if(BUILD_SHARED_LIBS)
633633
# whole archive for jni

axmol/axmolver.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#pragma once
2+
3+
/* Define the axmol version */
4+
// 0x00 HI ME LO
5+
// 00 03 08 00
6+
#define AX_VERSION_MAJOR 3
7+
#define AX_VERSION_MINOR 0
8+
#define AX_VERSION_PATCH 0
9+
10+
/* Define axmol version helper macros */
11+
#define AX_VERSION_MAKE(a, b, c) ((a << 16) | (b << 8) | (c & 0xff))
12+
#define AX_VERSION_NUM AX_VERSION_MAKE(AX_VERSION_MAJOR, AX_VERSION_MINOR, AX_VERSION_PATCH)
13+
#define AX_VERSION AX_VERSION_NUM
14+
15+
/* Define whether axmol/.git present */
16+
#define AX_GIT_PRESENT 1
17+
18+
/* Define to the library build number from git commit count */
19+
#define AX_BUILD_NUM "4475"
20+
21+
/* Define the branch being built */
22+
#define AX_GIT_BRANCH "source-folder-adjustment"
23+
24+
/* Define the hash of the head commit */
25+
#define AX_GIT_COMMIT_HASH "9cb8cc8"
26+
27+
/* Define the axmol version string */
28+
#define _AXSTR(R) #R
29+
#define _AXMACROSTR(R) _AXSTR(R)
30+
#define AX_VERSION_STR _AXMACROSTR(AX_VERSION_MAJOR) "." _AXMACROSTR(AX_VERSION_MINOR) "." _AXMACROSTR(AX_VERSION_PATCH)
31+
32+
#if AX_GIT_PRESENT
33+
# define AX_VERSION_STR_FULL AX_VERSION_STR "-" AX_GIT_COMMIT_HASH
34+
#else
35+
# define AX_VERSION_STR_FULL AX_VERSION_STR
36+
#endif

axmol/base/EventType.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,27 @@
3232
*/
3333

3434
// The application will come to foreground.
35-
// This message is posted in core/platform/android/jni/Java_dev_axmol_lib_AxmolRenderer.cpp.
35+
// This message is posted in axmol/platform/android/jni/Java_dev_axmol_lib_AxmolRenderer.cpp.
3636
#define EVENT_COME_TO_FOREGROUND "event_come_to_foreground"
3737

3838
// The renderer[android:GLSurfaceView.Renderer WP8:Cocos2dRenderer] was recreated.
3939
// This message is used for reloading resources before renderer is recreated on Android/WP8.
40-
// This message is posted in core/platform/android/javaactivity.cpp and
40+
// This message is posted in axmol/platform/android/javaactivity.cpp and
4141
// cocos\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp.
4242
#define EVENT_RENDERER_RECREATED "event_renderer_recreated"
4343

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

5050
// The application will be restarted.
5151
// This message is used for notifying application code of a pending application restart.
52-
// This message is posted in core/platform/android/javaactivity.cpp
52+
// This message is posted in axmol/platform/android/javaactivity.cpp
5353
#define EVENT_APP_RESTARTING "event_app_restarting"
5454

5555
// The application has made a warm start, creating a new Activity, Surface View and Renderer
5656
// This message is used for notifying application code of a warm start.
57-
// This message is posted in core/platform/android/javaactivity.cpp
57+
// This message is posted in axmol/platform/android/javaactivity.cpp
5858
#define EVENT_APP_WARM_START "event_app_warm_start"

axmol/base/Utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ std::string computeFileDigest(std::string_view filename,
494494
LanguageType getLanguageTypeByISO2(const char* code)
495495
{
496496
// this function is used by all platforms to get system language
497-
// except windows: core/platform/win32/CCApplication-win32.cpp
497+
// except windows: axmol/platform/win32/CCApplication-win32.cpp
498498
LanguageType ret = LanguageType::ENGLISH;
499499

500500
if (strncmp(code, "zh", 2) == 0)

axmol/network/WebSocket-wasm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ bool WebSocket::open(Delegate* delegate, std::string_view url, std::string_view
107107

108108
// chrome/edge can't connect
109109
// firefox works with "Sec-Fetch-Site: cross-site" in request header
110-
// refer: https://github.com/emscripten-core/emscripten/issues/19100
110+
// refer: https://github.com/emscripten-axmol/emscripten/issues/19100
111111
// wasm websocket callback thread same with axmol render thread
112112
emscripten_websocket_set_onopen_callback(_wsfd, this, em_ws_onopen);
113113
emscripten_websocket_set_onerror_callback(_wsfd, this, em_ws_onerror);

axmol/platform/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# ****************************************************************************/
2424

2525
if(ANDROID)
26-
# refer to target: core/platform/android/CMakeLists.txt
26+
# refer to target: axmol/platform/android/CMakeLists.txt
2727
set(_AX_PLATFORM_SPECIFIC_SRC
2828
platform/android/Application-android.cpp
2929
platform/android/Common-android.cpp
@@ -140,7 +140,7 @@ elseif(LINUX)
140140
elseif(EMSCRIPTEN)
141141
include_directories(
142142
PUBLIC "${_AX_ROOT}/3rdparty/angle/_x/include"
143-
PUBLIC "${_AX_ROOT}/core"
143+
PUBLIC "${_AX_ROOT}/axmol"
144144
)
145145
set(_AX_PLATFORM_SPECIFIC_HEADER
146146
platform/wasm/Application-wasm.h

axmol/platform/android/java/src/dev/axmol/lib/BitmapHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public final class BitmapHelper {
4747
// Constants
4848
// ===========================================================
4949

50-
/* The values are the same as core/platform/Image.h. */
50+
/* The values are the same as axmol/platform/Image.h. */
5151
private static final int HORIZONTAL_ALIGN_LEFT = 1;
5252
private static final int HORIZONTAL_ALIGN_RIGHT = 2;
5353
private static final int HORIZONTAL_ALIGN_CENTER = 3;

axmol/renderer/RenderConsts.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#pragma once
2+
3+
/* The max directional lights */
4+
#define AX_MAX_DIRECTIONAL_LIGHT 1
5+
6+
/* The max point lights */
7+
#define AX_MAX_POINT_LIGHT 1
8+
9+
/* The max spot lights */
10+
#define AX_MAX_SPOT_LIGHT 1
11+

cmake/Modules/AXBuildHelpers.cmake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ function(ax_setup_app_config app_name)
580580
endif()
581581
endfunction()
582582

583-
set(AX_WASM_SHELL_FILE "${_AX_ROOT}/core/platform/wasm/shell_minimal.html" CACHE STRING "The path of wasm shell file")
583+
set(AX_WASM_SHELL_FILE "${_AX_ROOT}/axmol/platform/wasm/shell_minimal.html" CACHE STRING "The path of wasm shell file")
584584

585585
option(AX_WASM_ENABLE_DEVTOOLS "Enable wasm devtools" ON)
586586

@@ -678,14 +678,14 @@ macro(ax_setup_winrt_sources)
678678
proj.winrt/App.h
679679
proj.winrt/App.cpp
680680
proj.winrt/Package.appxmanifest
681-
${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.xaml
682-
${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.idl
683-
${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.h
684-
${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.cpp
685-
${_AX_ROOT}/core/platform/winrt/xaml/OpenGLES.h
686-
${_AX_ROOT}/core/platform/winrt/xaml/OpenGLES.cpp
687-
${_AX_ROOT}/core/platform/winrt/xaml/AxmolRenderer.h
688-
${_AX_ROOT}/core/platform/winrt/xaml/AxmolRenderer.cpp
681+
${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.xaml
682+
${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.idl
683+
${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.h
684+
${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.cpp
685+
${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLES.h
686+
${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLES.cpp
687+
${_AX_ROOT}/axmol/platform/winrt/xaml/AxmolRenderer.h
688+
${_AX_ROOT}/axmol/platform/winrt/xaml/AxmolRenderer.cpp
689689
)
690690

691691
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/proj.winrt/App.xaml" APP_XAML_FULL_PATH)
@@ -694,14 +694,14 @@ macro(ax_setup_winrt_sources)
694694
PROPERTY VS_SETTINGS
695695
"DependentUpon=${APP_XAML_FULL_PATH}"
696696
)
697-
file(TO_NATIVE_PATH "${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.xaml" MAINPAGE_XAML_FULL_PATH)
697+
file(TO_NATIVE_PATH "${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.xaml" MAINPAGE_XAML_FULL_PATH)
698698
set_property(
699-
SOURCE ${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.h ${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.cpp ${_AX_ROOT}/core/platform/winrt/xaml/OpenGLESPage.idl
699+
SOURCE ${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.h ${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.cpp ${_AX_ROOT}/axmol/platform/winrt/xaml/OpenGLESPage.idl
700700
PROPERTY VS_SETTINGS
701701
"DependentUpon=${MAINPAGE_XAML_FULL_PATH}"
702702
)
703703

704-
list(APPEND GAME_INC_DIRS ${_AX_ROOT}/core/platform/winrt/xaml)
704+
list(APPEND GAME_INC_DIRS ${_AX_ROOT}/axmol/platform/winrt/xaml)
705705

706706
list(APPEND GAME_HEADER
707707
${PLATFORM_HEADERS}

0 commit comments

Comments
 (0)