mirror of https://github.com/axmolengine/axmol.git
Migrate [skip ci]
This commit is contained in:
parent
8a2f5d6666
commit
abd9338a7a
|
@ -491,7 +491,7 @@ function(ax_use_pkg target pkg)
|
|||
|
||||
endfunction()
|
||||
|
||||
# The axis preprocessors config helper macro
|
||||
# The axmol preprocessors config helper macro
|
||||
macro(ax_config_pred target_name pred)
|
||||
if(${pred})
|
||||
target_compile_definitions(${target_name} PUBLIC ${pred}=1)
|
||||
|
|
|
@ -15,8 +15,8 @@ if(CMAKE_TOOLCHAIN_FILE)
|
|||
endif()
|
||||
|
||||
find_program(PYTHON_COMMAND NAMES python3 python2 python)
|
||||
find_program(_AX_COMMAND NAME axis
|
||||
PATHS ${_AX_ROOT_PATH}/tools/axis-console/bin $ENV{_AX_CONSOLE_ROOT})
|
||||
find_program(_AX_COMMAND NAME axmol
|
||||
PATHS ${_AX_ROOT_PATH}/tools/axmol-console/bin $ENV{_AX_CONSOLE_ROOT})
|
||||
|
||||
message(STATUS "PROJECT_NAME:" ${PROJECT_NAME})
|
||||
message(STATUS "PROJECT_SOURCE_DIR:" ${PROJECT_SOURCE_DIR})
|
||||
|
|
|
@ -61,8 +61,8 @@ message(STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
|
|||
# custom target property for lua/js link
|
||||
define_property(TARGET
|
||||
PROPERTY AX_LUA_DEPEND
|
||||
BRIEF_DOCS "axis lua depend libs"
|
||||
FULL_DOCS "use to save depend libs of axis lua project"
|
||||
BRIEF_DOCS "axmol lua depend libs"
|
||||
FULL_DOCS "use to save depend libs of axmol lua project"
|
||||
)
|
||||
|
||||
# config c standard
|
||||
|
@ -103,12 +103,12 @@ if(WINDOWS)
|
|||
# Visual Studio 2015, MSVC_VERSION 1900 (v140 toolset)
|
||||
# Visual Studio 2017, MSVC_VERSION 1910-1919 (v141 toolset)
|
||||
if(${MSVC_VERSION} EQUAL 1900 OR ${MSVC_VERSION} GREATER 1900)
|
||||
message(STATUS "using Windows MSVC generate axis project, MSVC_VERSION:${MSVC_VERSION}")
|
||||
message(STATUS "using Windows MSVC generate axmol project, MSVC_VERSION:${MSVC_VERSION}")
|
||||
else()
|
||||
message(FATAL_ERROR "using Windows MSVC generate axis project, MSVC_VERSION:${MSVC_VERSION} lower than needed")
|
||||
message(FATAL_ERROR "using Windows MSVC generate axmol project, MSVC_VERSION:${MSVC_VERSION} lower than needed")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "please using Windows MSVC compile axis project, support other compile tools not yet")
|
||||
message(FATAL_ERROR "please using Windows MSVC compile axmol project, support other compile tools not yet")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -116,7 +116,7 @@ endif()
|
|||
function(use_ax_compile_define target)
|
||||
target_compile_definitions(${target} PUBLIC $<$<CONFIG:Debug>:_AX_DEBUG=1>)
|
||||
|
||||
# !important axis not use double precision
|
||||
# !important axmol not use double precision
|
||||
# target_compile_definitions(${target} PUBLIC CP_USE_CGTYPES=0)
|
||||
# target_compile_definitions(${target} PUBLIC CP_USE_DOUBLES=0)
|
||||
|
||||
|
|
|
@ -9,23 +9,23 @@ function(AssureOutOfSourceBuilds)
|
|||
# disallow in-source builds
|
||||
if("${srcdir}" STREQUAL "${bindir}")
|
||||
message("######################################################")
|
||||
message("# axis should not be configured & built in the axis source directory")
|
||||
message("# axmol should not be configured & built in the axmol source directory")
|
||||
message("# You must run cmake in a build directory.")
|
||||
message("# For example:")
|
||||
message("# mkdir axis ; cd axis")
|
||||
message("# download & unpack the axis tarball")
|
||||
message("# mkdir axmol ; cd axmol")
|
||||
message("# download & unpack the axmol tarball")
|
||||
message("# mkdir build")
|
||||
message("# this will create the following directory structure")
|
||||
message("#")
|
||||
message("# axis")
|
||||
message("# +--axis")
|
||||
message("# axmol")
|
||||
message("# +--axmol")
|
||||
message("# +--build")
|
||||
message("#")
|
||||
message("# Then you can proceed to configure and build")
|
||||
message("# by using the following commands")
|
||||
message("#")
|
||||
message("# cd build")
|
||||
message("# cmake ../axis # or ccmake, or cmake-gui ")
|
||||
message("# cmake ../axmol # or ccmake, or cmake-gui ")
|
||||
message("# make")
|
||||
message("#")
|
||||
message("# NOTE: Given that you already tried to make an in-source build")
|
||||
|
@ -33,7 +33,7 @@ function(AssureOutOfSourceBuilds)
|
|||
message("# in your source tree. run 'git status' to find them and")
|
||||
message("# remove them by doing:")
|
||||
message("#")
|
||||
message("# cd axis")
|
||||
message("# cd axmol")
|
||||
message("# git clean -n -d")
|
||||
message("# git clean -f -d")
|
||||
message("# git checkout --")
|
||||
|
|
|
@ -237,14 +237,14 @@ public:
|
|||
/**
|
||||
* Gets the field of view of the camera if the projection mode is 3D.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
float getFOV() const { return _fieldOfView; }
|
||||
|
||||
/**
|
||||
* Sets the field of view of the camera if the projection mode is 3D.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
void setFOV(float fov);
|
||||
|
||||
|
@ -256,7 +256,7 @@ public:
|
|||
/**
|
||||
* Sets the frustum's far plane.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
void setFarPlane(float farPlane);
|
||||
|
||||
|
@ -268,14 +268,14 @@ public:
|
|||
/**
|
||||
* Gets the frustum's near plane.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
void setNearPlane(float nearPlane);
|
||||
|
||||
/**
|
||||
* Gets the zoom multiplier of the camera.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
float getZoom() const { return _zoomFactor; }
|
||||
|
||||
|
@ -285,14 +285,14 @@ public:
|
|||
*
|
||||
* @param factor The zoom factor of the camera.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
void setZoom(float factor);
|
||||
|
||||
/**
|
||||
Apply the zoom factor.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
void applyZoom();
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Copyright (c) 2013-2016 Chukong Technologies Inc.
|
|||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Bytedance Inc.
|
||||
|
||||
https://axmolengine.github.io/axis
|
||||
https://axmolengine.github.io/axmol
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -564,7 +564,7 @@ public:
|
|||
virtual const Vec2& getContentSize() const;
|
||||
|
||||
/**
|
||||
* The basic node hit test, since axis-1.0
|
||||
* The basic node hit test, since axmol-1.0
|
||||
*
|
||||
* @param worldPoint The coord in GL world space.
|
||||
*
|
||||
|
|
|
@ -50,7 +50,7 @@ struct particle_point
|
|||
* Particle emission shapes.
|
||||
* Current supported shapes are Point, Rectangle, RectangularTorus, Circle, Torus, Cone, Cone Torus, Texture alpha
|
||||
* emission mask
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
struct EmissionShape
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ struct EmissionShape
|
|||
|
||||
/**
|
||||
* Particle emission mask descriptor.
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
struct ParticleEmissionMaskDescriptor
|
||||
{
|
||||
|
@ -237,7 +237,7 @@ public:
|
|||
|
||||
/**
|
||||
* Particle emission mask cache.
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
class AX_DLL ParticleEmissionMaskCache : public ax::Ref
|
||||
{
|
||||
|
|
|
@ -603,7 +603,7 @@ void SpriteBatchNode::appendChild(Sprite* sprite)
|
|||
// add children recursively
|
||||
auto& children = sprite->getChildren();
|
||||
|
||||
// axis Github issue #502
|
||||
// axmol Github issue #502
|
||||
for (auto iter = children.begin(); iter != children.end();)
|
||||
{
|
||||
auto child = *iter;
|
||||
|
|
|
@ -119,7 +119,7 @@ enum class AnchorPreset
|
|||
/**
|
||||
* Particle emission shapes.
|
||||
* Supported shapes are Point, Rectangle, RectangularTorus, Circle, Torus, Cone, Cone Torus, Texture alpha emission mask
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
enum class EmissionShapeType
|
||||
{
|
||||
|
|
|
@ -178,7 +178,7 @@ Color4F operator/(Color4F lhs, float rhs);
|
|||
|
||||
/**
|
||||
* Hue Saturation Value color space composed of 4 floats.
|
||||
* @since axis-1.0.0b7
|
||||
* @since axmol-1.0.0b7
|
||||
*
|
||||
* Implementation source: https://gist.github.com/fairlight1337/4935ae72bcbcc1ba5c72
|
||||
*/
|
||||
|
@ -227,7 +227,7 @@ HSV operator/(HSV lhs, float rhs);
|
|||
|
||||
/**
|
||||
* Hue Saturation Luminance color space composed of 4 floats.
|
||||
* @since axis-1.0.0b7
|
||||
* @since axmol-1.0.0b7
|
||||
*
|
||||
* Implementation source: https://gist.github.com/ciembor/1494530
|
||||
*/
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace utils
|
|||
* @param filename specify a filename where the snapshot is stored. This parameter can be either an absolute path or a
|
||||
* simple base filename ("hello.png" etc.), don't use a relative path containing directory names.("mydir/hello.png"
|
||||
* etc.).
|
||||
* @since v4.0 with axis
|
||||
* @since v4.0 with axmol
|
||||
*/
|
||||
AX_DLL void captureScreen(std::function<void(RefPtr<Image>)> imageCallback);
|
||||
|
||||
|
@ -79,7 +79,7 @@ AX_DLL void captureScreen(std::function<void(RefPtr<Image>)> imageCallback);
|
|||
* @param startNode specify the snapshot Node. It should be ax::Scene
|
||||
* @param scale
|
||||
* @returns: return a Image, then can call saveToFile to save the image as "xxx.png or xxx.jpg".
|
||||
* @since v4.0 with axis
|
||||
* @since v4.0 with axmol
|
||||
*/
|
||||
AX_DLL void captureNode(Node* startNode, std::function<void(RefPtr<Image>)> imageCallback, float scale = 1.0f);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ NS_AX_BEGIN
|
|||
|
||||
AX_DLL const char* cocos2dVersion();
|
||||
|
||||
/** Backward compatibility with old axis projects */
|
||||
/** Backward compatibility with old axmol projects */
|
||||
|
||||
using Sprite3D = MeshRenderer;
|
||||
using Sprite3DMaterial = MeshMaterial;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* It uses a simple algorithm to improve the speed of generating random numbers with a decent quality,
|
||||
* Use this if you're planning to generate large amounts of random numbers in a single frame.
|
||||
*
|
||||
* @since axis-1.0.0b8
|
||||
* @since axmol-1.0.0b8
|
||||
*/
|
||||
struct FastRNG
|
||||
{
|
||||
|
|
|
@ -455,7 +455,7 @@ static void pngReadCallback(png_structp png_ptr, png_bytep data, png_size_t leng
|
|||
} // namespace
|
||||
|
||||
/*
|
||||
* Notes: PVR file Specification have many pixel formats, cocos2d-x-v2~v4 and axis only support pvrtc and etc1
|
||||
* Notes: PVR file Specification have many pixel formats, cocos2d-x-v2~v4 and axmol only support pvrtc and etc1
|
||||
* see: https://cdn.imgtec.com/sdk-documentation/PVR+File+Format.Specification.pdf
|
||||
*/
|
||||
static backend::PixelFormat getDevicePVRPixelFormat(backend::PixelFormat format)
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef struct _MipmapInfo
|
|||
_MipmapInfo() : address(NULL), len(0) {}
|
||||
} MipmapInfo;
|
||||
|
||||
/** The Image class for loading all images supported by axis . */
|
||||
/** The Image class for loading all images supported by axmol . */
|
||||
class AX_DLL Image : public Ref
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -43,7 +43,7 @@ NS_AX_BEGIN
|
|||
#define AX_MAX_PATH 512
|
||||
|
||||
// The root path of resources, the character encoding is UTF-8.
|
||||
// UTF-8 is the only encoding supported by axis API by default.
|
||||
// UTF-8 is the only encoding supported by axmol API by default.
|
||||
static std::string s_workingDir;
|
||||
static std::string s_exeDir;
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ enum class PixelFormat : uint32_t
|
|||
D24S8,
|
||||
//!!!Please append depth stencil pixel format
|
||||
|
||||
/* the count of pixel format supported by axis */
|
||||
/* the count of pixel format supported by axmol */
|
||||
COUNT,
|
||||
|
||||
NONE = 0xffff
|
||||
|
|
|
@ -162,7 +162,7 @@ PixelFormat RenderTargetMTL::getColorAttachmentPixelFormat(int index) const
|
|||
}
|
||||
|
||||
PixelFormat RenderTargetMTL::getDepthAttachmentPixelFormat() const
|
||||
{ // FIXME: axis only support D24S8
|
||||
{ // FIXME: axmol only support D24S8
|
||||
if (bitmask::any(_flags, TargetBufferFlags::DEPTH_AND_STENCIL))
|
||||
{
|
||||
if (isDefaultRenderTarget() || !_depth)
|
||||
|
@ -173,7 +173,7 @@ PixelFormat RenderTargetMTL::getDepthAttachmentPixelFormat() const
|
|||
}
|
||||
|
||||
PixelFormat RenderTargetMTL::getStencilAttachmentPixelFormat() const
|
||||
{ // FIXME: axis only support D24S8
|
||||
{ // FIXME: axmol only support D24S8
|
||||
if (bitmask::any(_flags, TargetBufferFlags::DEPTH_AND_STENCIL))
|
||||
{
|
||||
if (isDefaultRenderTarget() || !_stencil)
|
||||
|
|
Loading…
Reference in New Issue