mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-24 13:23:50 -04:00
Merge branch 'geode-sdk:main' into main
This commit is contained in:
commit
6bbf5e0017
141 changed files with 4330 additions and 301 deletions
.git-blame-ignore-revs
.github/workflows
CHANGELOG.mdCMakeLists.txtVERSIONcmake
flash.tomlloader
CMakeLists.txt
include
Geode
UI.hpp
c++stl/gnustl
cocos
CCCamera.hCCConfiguration.hCCScheduler.h
actions
CCAction.hCCActionCatmullRom.hCCActionEase.hCCActionGrid.hCCActionInstant.hCCActionInterval.hCCActionTiledGrid.h
base_nodes
cocoa
effects
extensions
GUI
CCControlExtension
CCControlButton.hCCControlHuePicker.hCCControlPotentiometer.hCCControlSaturationBrightnessPicker.hCCControlSlider.hCCControlStepper.hCCControlSwitch.h
CCEditBox
CCEditBox.hCCEditBoxImpl.hCCEditBoxImplAndroid.hCCEditBoxImplIOS.hCCEditBoxImplMac.hCCEditBoxImplTizen.hCCEditBoxImplWin.hCCEditBoxImplWp8.h
CCScrollView
network
keypad_dispatcher
label_nodes
layers_scenes_transitions_nodes
menu_nodes
misc_nodes
particle_nodes
platform
robtop
content
keyboard_dispatcher
mouse_dispatcher
sprite_nodes
xml
script_support
shaders
sprite_nodes
support
text_input_node
textures
tilemap_parallax_nodes
touch_dispatcher
loader
platform
ui
utils
link/ios
6
.git-blame-ignore-revs
Normal file
6
.git-blame-ignore-revs
Normal file
|
@ -0,0 +1,6 @@
|
|||
# add clang format (#62)
|
||||
11e81e3d64313d319955d9a214ad0ded78985bed
|
||||
2bb416ba77f2f01897cc10a1afac40c957feadfc
|
||||
|
||||
# whole lot of whitespace changes
|
||||
0cecd677561d1992859f30dc1e233d8d5d83c9ad
|
73
.github/workflows/build.yml
vendored
73
.github/workflows/build.yml
vendored
|
@ -295,10 +295,74 @@ jobs:
|
|||
target: ${{ matrix.config.id }}
|
||||
if: inputs.build-debug-info && (success() || failure())
|
||||
|
||||
build-ios:
|
||||
name: Build iOS
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare for Build Debug Info
|
||||
id: build-debug-info
|
||||
uses: ./.github/actions/build-debug-info
|
||||
with:
|
||||
has-sccache: ${{ inputs.use-ccache }}
|
||||
if: inputs.build-debug-info
|
||||
|
||||
- name: Setup caches
|
||||
uses: ./.github/actions/setup-cache
|
||||
with:
|
||||
host: mac
|
||||
target: ios
|
||||
use-ccache: ${{ github.event_name != 'workflow_dispatch' || inputs.use-ccache }}
|
||||
|
||||
- name: Setup Ninja
|
||||
uses: ./.github/actions/setup-ninja
|
||||
with:
|
||||
host: mac
|
||||
|
||||
- name: Install LLVM
|
||||
run: |
|
||||
brew install llvm
|
||||
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Setup CLI
|
||||
uses: geode-sdk/cli/.github/actions/setup@main
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
${{ env.base-configure-command }}
|
||||
-DGEODE_TARGET_PLATFORM=iOS
|
||||
-DCMAKE_SYSTEM_NAME=iOS
|
||||
-DGEODE_DONT_BUILD_TEST_MODS=ON
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
${{ steps.build-debug-info.outputs.extra-configure }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
${{ env.base-build-command }}
|
||||
${{ steps.build-debug-info.outputs.extra-build }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: geode-ios
|
||||
path: ./bin/nightly
|
||||
|
||||
- name: Complete Build Debug Info
|
||||
uses: ./.github/actions/build-debug-info-post
|
||||
with:
|
||||
target: mac
|
||||
if: inputs.build-debug-info && (success() || failure())
|
||||
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build-windows, build-mac, build-android ]
|
||||
needs: [ build-windows, build-mac, build-android, build-ios ]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -342,6 +406,12 @@ jobs:
|
|||
files: geode-android64/Geode.android64.so geode-android64/Geode.android64.so.sym
|
||||
dest: geode-${{ steps.ref.outputs.hash }}-android64.zip
|
||||
|
||||
- name: Zip iOS Artifacts
|
||||
uses: vimtor/action-zip@v1.2
|
||||
with:
|
||||
files: geode-ios/Geode.ios.dylib
|
||||
dest: geode-${{ steps.ref.outputs.hash }}-ios.zip
|
||||
|
||||
- name: Zip Resources
|
||||
uses: vimtor/action-zip@v1.2
|
||||
with:
|
||||
|
@ -364,4 +434,5 @@ jobs:
|
|||
./geode-${{ steps.ref.outputs.hash }}-mac.zip
|
||||
./geode-${{ steps.ref.outputs.hash }}-android32.zip
|
||||
./geode-${{ steps.ref.outputs.hash }}-android64.zip
|
||||
./geode-${{ steps.ref.outputs.hash }}-ios.zip
|
||||
./resources.zip
|
||||
|
|
28
CHANGELOG.md
28
CHANGELOG.md
|
@ -1,7 +1,33 @@
|
|||
# Geode Changelog
|
||||
|
||||
## v4.2.1
|
||||
## v4.3.1
|
||||
* Fix `SimpleAxisLayout` not respecting `Layout::ignoreInvisibleChildren` (a16d230)
|
||||
* Fix MacOS arrow keys (#1267)
|
||||
* Fix ScrollLayer culling with scaled children (f03cee8)
|
||||
|
||||
## v4.3.0
|
||||
* Event export macro (#1243)
|
||||
* See [the docs](https://docs.geode-sdk.org/mods/dependencies#event-macro) for more info
|
||||
* Fix settings `enable-if` parsing (315bf46, 1542e29)
|
||||
* Add `SimpleAxisLayout` (#1223)
|
||||
* A simpler and faster alternative to `AxisLayout`. Some features may be missing
|
||||
* Add environment variable for forcing terminal colors (39b1bef)
|
||||
* Fix crashlog PDB search paths (#1222)
|
||||
* Add support for missing keys and mouse buttons (#1258)
|
||||
* Add utils::string::trim* overloads for specific charset (0d4dcb3, 17faf36)
|
||||
* Round number settings to 5 decimal places (c9dbc4b)
|
||||
* Allow number inputs to be invalid while typing and active (6c6215b)
|
||||
* Optimize m_fields access to perform no allocations (7548421)
|
||||
* Allow `Task<void>`, useful for coroutines (2bfff1a, 463ea22)
|
||||
* Add some coroutine utils (99cefab)
|
||||
* Fix culling on ScrollLayer (b136e3b, b733c36)
|
||||
* Fix `WeakRef` behavior with nullptr (9a8939f)
|
||||
* Remove handler from function if no hooks are active (dc14d4c)
|
||||
* Fix some bugs in `geode::utils::ranges` methods (#1236, #1239)
|
||||
* Add patch for `CCGLProgram::compileShader` on remaining platforms (#1241)
|
||||
* Update the pugixml headers to be v1.15 compatible (#1247)
|
||||
* Allow auto update across major versions if running in forward compat mode (4bb17a9)
|
||||
* Re-add console log level to android (b1dc29a)
|
||||
|
||||
## v4.2.0
|
||||
* Implement gd::set for android (#1197, #1207)
|
||||
|
|
|
@ -15,6 +15,12 @@ endif()
|
|||
|
||||
option(GEODE_USE_BREAKPAD "Enables the use of the Breakpad library for crash dumps." ON)
|
||||
|
||||
# Check if git is installed, raise a fatal error if not
|
||||
find_program(GIT_EXECUTABLE git)
|
||||
if (NOT GIT_EXECUTABLE)
|
||||
message(FATAL_ERROR "Git not found! Please install Git and try again.\nhttps://git-scm.com/")
|
||||
endif()
|
||||
|
||||
# Read version
|
||||
file(READ VERSION GEODE_VERSION)
|
||||
string(STRIP "${GEODE_VERSION}" GEODE_VERSION)
|
||||
|
@ -238,7 +244,7 @@ endif()
|
|||
set(MAT_JSON_AS_INTERFACE ON)
|
||||
CPMAddPackage("gh:geode-sdk/result@1.3.3")
|
||||
CPMAddPackage("gh:geode-sdk/json@3.2.1")
|
||||
CPMAddPackage("gh:fmtlib/fmt#11.0.2")
|
||||
CPMAddPackage("gh:fmtlib/fmt#11.1.4")
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} INTERFACE MAT_JSON_DYNAMIC=1)
|
||||
|
||||
|
@ -267,7 +273,7 @@ if (DEFINED GEODE_TULIPHOOK_REPO_PATH)
|
|||
message(STATUS "Using ${GEODE_TULIPHOOK_REPO_PATH} for TulipHook")
|
||||
add_subdirectory(${GEODE_TULIPHOOK_REPO_PATH} ${GEODE_TULIPHOOK_REPO_PATH}/build)
|
||||
else()
|
||||
CPMAddPackage("gh:geode-sdk/TulipHook@2.4.2")
|
||||
CPMAddPackage("gh:geode-sdk/TulipHook@2.4.3")
|
||||
endif()
|
||||
set(CMAKE_WARN_DEPRECATED ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.2.1
|
||||
4.3.1
|
||||
|
|
|
@ -241,8 +241,13 @@ function(setup_geode_mod proname)
|
|||
if (WIN32 OR LINUX)
|
||||
file(GLOB libs ${dir}/*.lib)
|
||||
list(APPEND libs_to_link ${libs})
|
||||
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS")
|
||||
file(GLOB libs ${dir}/*.ios.dylib)
|
||||
list(APPEND libs_to_link ${libs})
|
||||
elseif (APPLE)
|
||||
file(GLOB libs ${dir}/*.dylib)
|
||||
file(GLOB ios_libs ${dir}/*.ios.dylib)
|
||||
list(REMOVE_ITEM libs ${ios_libs})
|
||||
list(APPEND libs_to_link ${libs})
|
||||
elseif (ANDROID)
|
||||
if (CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a")
|
||||
|
|
|
@ -5,18 +5,49 @@ if (NOT ${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
|||
endif()
|
||||
|
||||
if (GEODE_TARGET_PLATFORM STREQUAL "iOS")
|
||||
# make sure that we get the ios sdk
|
||||
execute_process(COMMAND xcrun --show-sdk-path --sdk iphoneos
|
||||
OUTPUT_VARIABLE GEODE_IOS_SDK
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
message(STATUS "iOS c++ compiler: ${CMAKE_CXX_COMPILER}")
|
||||
set(CMAKE_OSX_ARCHITECTURES arm64)
|
||||
set(CMAKE_OSX_SYSROOT ${GEODE_IOS_SDK})
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0")
|
||||
set(CMAKE_SYSTEM_NAME "iOS")
|
||||
|
||||
# this fails on ios builds
|
||||
set(BUILD_MD2HTML_EXECUTABLE "OFF")
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
SYSTEM_NAME iOS
|
||||
OSX_SYSROOT ${GEODE_IOS_SDK}
|
||||
OSX_ARCHITECTURES arm64
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE
|
||||
"-framework OpenGLES" # needed for CCClippingNode reimpl and ScrollLayer
|
||||
"-framework UIKit" # needed for file picking (UIApplication)
|
||||
"-framework Foundation" # needed for many things
|
||||
"-framework AVFoundation" # needed for fmod
|
||||
"-framework AudioToolbox" # needed for fmod
|
||||
${GEODE_LOADER_PATH}/include/link/ios/libcurl.a
|
||||
${GEODE_LOADER_PATH}/include/link/ios/libfmod_iphoneos.a
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} INTERFACE
|
||||
-DCommentType=CommentTypeDummy
|
||||
)
|
||||
|
||||
set(GEODE_OUTPUT_NAME "Geode.ios")
|
||||
set(GEODE_PLATFORM_BINARY "Geode.ios.dylib")
|
||||
set(GEODE_MOD_BINARY_SUFFIX ".ios.dylib" CACHE STRING "" FORCE)
|
||||
|
||||
if (NOT ${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
||||
set(GEODE_TARGET_PLATFORM_SHORT "ios" PARENT_SCOPE)
|
||||
# this is needed because else loading mods will fail below ios 14.5
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0" PARENT_SCOPE)
|
||||
else()
|
||||
set(GEODE_TARGET_PLATFORM_SHORT "ios")
|
||||
endif()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if (NOT DEFINED GEODE_TARGET_PLATFORM)
|
||||
if(APPLE)
|
||||
if(IOS)
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
|
||||
set(GEODE_TARGET_PLATFORM "iOS")
|
||||
else()
|
||||
set(GEODE_TARGET_PLATFORM "MacOS")
|
||||
|
|
27
flash.toml
27
flash.toml
|
@ -4,7 +4,7 @@
|
|||
|
||||
[project]
|
||||
name = "Geode"
|
||||
version = "v3.0.0"
|
||||
version = "" # dont bother
|
||||
repository = "https://github.com/geode-sdk/geode"
|
||||
tree = "https://github.com/geode-sdk/geode/tree/main"
|
||||
icon = "loader/resources/logos/geode-circle.png"
|
||||
|
@ -18,6 +18,14 @@ assets = [
|
|||
"docs/assets/handbook/vol2/*.png",
|
||||
]
|
||||
|
||||
[[external-libs]]
|
||||
pattern = "matjson"
|
||||
repository = "https://github.com/geode-sdk/json"
|
||||
|
||||
[[external-libs]]
|
||||
pattern = "Result.hpp"
|
||||
repository = "https://github.com/geode-sdk/result"
|
||||
|
||||
[[sources]]
|
||||
name = "Geode"
|
||||
dir = "loader/include"
|
||||
|
@ -42,6 +50,23 @@ include = [
|
|||
# Bindings are generated at compile time
|
||||
exists-online = false
|
||||
|
||||
[ignore]
|
||||
patterns-name = [
|
||||
# anything that starts with a double underscore
|
||||
# shouldnt be included
|
||||
"^__",
|
||||
"^tinyxml2$",
|
||||
"^format_as$",
|
||||
# operator overloads
|
||||
"^operator\\W"
|
||||
]
|
||||
patterns-full = [
|
||||
"^geode::modifier",
|
||||
"^geode::prelude",
|
||||
"^geode::stl",
|
||||
"^geode::geode_internal"
|
||||
]
|
||||
|
||||
# CMake options
|
||||
|
||||
[cmake]
|
||||
|
|
|
@ -88,10 +88,19 @@ file(GLOB SOURCES CONFIGURE_DEPENDS
|
|||
)
|
||||
|
||||
# Obj-c sources
|
||||
file(GLOB OBJC_SOURCES
|
||||
src/platform/Objcpp.mm
|
||||
src/load.mm
|
||||
)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
|
||||
file(GLOB OBJC_SOURCES CONFIGURE_DEPENDS
|
||||
src/platform/ios/*.mm
|
||||
src/load.mm
|
||||
src/hooks/AddExtraKeys.mm
|
||||
)
|
||||
else()
|
||||
file(GLOB OBJC_SOURCES CONFIGURE_DEPENDS
|
||||
src/platform/mac/*.mm
|
||||
src/load.mm
|
||||
src/hooks/AddExtraKeys.mm
|
||||
)
|
||||
endif()
|
||||
set_source_files_properties(${OBJC_SOURCES} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
|
||||
|
||||
if (WIN32)
|
||||
|
@ -109,17 +118,16 @@ if (WIN32)
|
|||
)
|
||||
list(APPEND SOURCES ${WIN_SOURCES})
|
||||
|
||||
elseif(IOS)
|
||||
|
||||
file(GLOB IOS_SOURCES CONFIGURE_DEPENDS
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
|
||||
file(GLOB IOS_SOURCES CONFIGURE_DEPENDS
|
||||
src/platform/ios/*.cpp
|
||||
src/platform/mac/Cocos2d.cpp # identical on ios, so we just use the mac one
|
||||
)
|
||||
list(APPEND SOURCES ${IOS_SOURCES})
|
||||
list(APPEND SOURCES ${OBJC_SOURCES})
|
||||
|
||||
elseif(APPLE)
|
||||
|
||||
file(GLOB MAC_SOURCES CONFIGURE_DEPENDS
|
||||
file(GLOB MAC_SOURCES CONFIGURE_DEPENDS
|
||||
src/platform/mac/*.cpp
|
||||
)
|
||||
list(APPEND SOURCES ${MAC_SOURCES})
|
||||
|
@ -142,7 +150,7 @@ endif()
|
|||
|
||||
|
||||
if (ANDROID AND GEODE_USE_BREAKPAD)
|
||||
CPMAddPackage("gh:qimiko/breakpad#161e908")
|
||||
CPMAddPackage("gh:qimiko/breakpad#169df6a")
|
||||
endif()
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED ${SOURCES})
|
||||
|
@ -317,22 +325,22 @@ endif()
|
|||
|
||||
# Create launcher
|
||||
if (APPLE)
|
||||
set_target_properties(geode-loader PROPERTIES
|
||||
SYSTEM_NAME MacOS
|
||||
OSX_DEPLOYMENT_TARGET 10.15
|
||||
APPLE_SILICON_PROCESSOR x86_64
|
||||
)
|
||||
|
||||
add_subdirectory(launcher/mac)
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
|
||||
# Used for File Picker API
|
||||
find_library(UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK UniformTypeIdentifiers)
|
||||
target_link_libraries(${PROJECT_NAME} ${UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK})
|
||||
else()
|
||||
set_target_properties(geode-loader PROPERTIES
|
||||
SYSTEM_NAME MacOS
|
||||
OSX_DEPLOYMENT_TARGET 10.15
|
||||
APPLE_SILICON_PROCESSOR x86_64
|
||||
)
|
||||
|
||||
if(GEODE_TARGET_PLATFORM STREQUAL "iOS")
|
||||
add_custom_command(TARGET geode-loader
|
||||
POST_BUILD COMMAND
|
||||
${CMAKE_INSTALL_NAME_TOOL} -id \"/Library/MobileSubstrate/DynamicLibraries/Geode.dylib\"
|
||||
$<TARGET_FILE:geode-loader>)
|
||||
# geodebootstrapper is unused on ios
|
||||
add_subdirectory(launcher/mac)
|
||||
set(LAUNCHER_TARGET GeodeBootstrapper)
|
||||
endif()
|
||||
|
||||
set(LAUNCHER_TARGET GeodeBootstrapper)
|
||||
elseif (WIN32)
|
||||
add_subdirectory(launcher/windows)
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "ui/SceneManager.hpp"
|
||||
#include "ui/ScrollLayer.hpp"
|
||||
#include "ui/SelectList.hpp"
|
||||
#include "ui/SimpleAxisLayout.hpp"
|
||||
#include "ui/Scrollbar.hpp"
|
||||
#include "ui/TextArea.hpp"
|
||||
#include "ui/TextRenderer.hpp"
|
||||
|
|
|
@ -425,7 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
* Insertion requires logarithmic time.
|
||||
*/
|
||||
template<typename... _Args>
|
||||
std::pair<iterator, bool>
|
||||
pair<iterator, bool>
|
||||
emplace(_Args&&... __args)
|
||||
{ return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); }
|
||||
|
||||
|
@ -472,21 +472,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
*
|
||||
* Insertion requires logarithmic time.
|
||||
*/
|
||||
std::pair<iterator, bool>
|
||||
pair<iterator, bool>
|
||||
insert(const value_type& __x)
|
||||
{
|
||||
std::pair<typename _Rep_type::iterator, bool> __p =
|
||||
pair<typename _Rep_type::iterator, bool> __p =
|
||||
_M_t._M_insert_unique(__x);
|
||||
return std::pair<iterator, bool>(__p.first, __p.second);
|
||||
return pair<iterator, bool>(__p.first, __p.second);
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
std::pair<iterator, bool>
|
||||
pair<iterator, bool>
|
||||
insert(value_type&& __x)
|
||||
{
|
||||
std::pair<typename _Rep_type::iterator, bool> __p =
|
||||
pair<typename _Rep_type::iterator, bool> __p =
|
||||
_M_t._M_insert_unique(std::move(__x));
|
||||
return std::pair<iterator, bool>(__p.first, __p.second);
|
||||
return pair<iterator, bool>(__p.first, __p.second);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -749,11 +749,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
*
|
||||
* This function probably only makes sense for multisets.
|
||||
*/
|
||||
std::pair<iterator, iterator>
|
||||
pair<iterator, iterator>
|
||||
equal_range(const key_type& __x)
|
||||
{ return _M_t.equal_range(__x); }
|
||||
|
||||
std::pair<const_iterator, const_iterator>
|
||||
pair<const_iterator, const_iterator>
|
||||
equal_range(const key_type& __x) const
|
||||
{ return _M_t.equal_range(__x); }
|
||||
//@}
|
||||
|
|
1
loader/include/Geode/cocos/CCCamera.h
vendored
1
loader/include/Geode/cocos/CCCamera.h
vendored
|
@ -80,6 +80,7 @@ public:
|
|||
bool m_bDirty;
|
||||
kmMat4 m_lookupMatrix;
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCCamera, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
1
loader/include/Geode/cocos/CCConfiguration.h
vendored
1
loader/include/Geode/cocos/CCConfiguration.h
vendored
|
@ -63,6 +63,7 @@ public:
|
|||
static void purgeConfiguration(void);
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCConfiguration, CCObject)
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
1
loader/include/Geode/cocos/CCScheduler.h
vendored
1
loader/include/Geode/cocos/CCScheduler.h
vendored
|
@ -53,6 +53,7 @@ class CC_DLL CCTimer : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTimer, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
* @lua NA
|
||||
|
|
|
@ -185,6 +185,7 @@ class CC_DLL CCSpeed : public CCAction
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpeed, CCAction)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -243,6 +244,7 @@ class CC_DLL CCFollow : public CCAction
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCFollow, CCAction)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -59,6 +59,7 @@ class CC_DLL CCPointArray : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCPointArray, CCObject)
|
||||
|
||||
/** creates and initializes a Points array with capacity
|
||||
* @lua NA
|
||||
|
@ -121,6 +122,7 @@ class CC_DLL CCCardinalSplineTo : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCCardinalSplineTo, CCActionInterval)
|
||||
|
||||
/** creates an action with a Cardinal Spline array of points and tension
|
||||
* @code
|
||||
|
@ -193,6 +195,7 @@ class CC_DLL CCCardinalSplineBy : public CCCardinalSplineTo
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCCardinalSplineBy, CCCardinalSplineTo)
|
||||
|
||||
/** creates an action with a Cardinal Spline array of points and tension
|
||||
* @code
|
||||
|
|
|
@ -86,6 +86,9 @@ class CC_DLL CCEaseRateAction : public CCActionEase
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEaseRateAction, CCActionEase);
|
||||
CCEaseRateAction() {}
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
|
@ -42,6 +42,9 @@ class CC_DLL CCGridAction : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCGridAction, CCActionInterval)
|
||||
CCGridAction() {}
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -98,6 +101,9 @@ class CC_DLL CCTiledGrid3DAction : public CCGridAction
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTiledGrid3DAction, CCGridAction)
|
||||
CCTiledGrid3DAction() {}
|
||||
|
||||
/** returns the tile that belongs to a certain position of the grid */
|
||||
ccQuad3 tile(const CCPoint& position);
|
||||
/** returns the non-transformed tile that belongs to a certain position of the grid */
|
||||
|
|
|
@ -301,6 +301,7 @@ class CC_DLL CCCallFunc : public CCActionInstant //<NSCopying>
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCCallFunc, CCActionInstant)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -485,6 +486,8 @@ class CC_DLL CCCallFuncO : public CCCallFunc, public TypeInfo
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCCallFuncO, CCCallFunc)
|
||||
|
||||
CCCallFuncO();
|
||||
virtual ~CCCallFuncO();
|
||||
|
||||
|
|
|
@ -107,6 +107,9 @@ class CC_DLL CCSequence : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSequence, CCActionInterval)
|
||||
CCSequence() {}
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -178,6 +181,9 @@ class CC_DLL CCRepeat : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCRepeat, CCActionInterval)
|
||||
CCRepeat() {}
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -233,6 +239,7 @@ class CC_DLL CCRepeatForever : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCRepeatForever, CCActionInterval)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -287,6 +294,9 @@ class CC_DLL CCSpawn : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpawn, CCActionInterval)
|
||||
CCSpawn() {}
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -469,6 +479,7 @@ class CC_DLL CCSkewTo : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSkewTo, CCActionInterval)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -889,6 +900,7 @@ class CC_DLL CCReverseTime : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCReverseTime, CCActionInterval)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -924,6 +936,7 @@ class CC_DLL CCAnimate : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAnimate, CCActionInterval)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -971,6 +984,7 @@ class CC_DLL CCTargetedAction : public CCActionInterval
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTargetedAction, CCActionInterval)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -90,6 +90,8 @@ class CC_DLL CCShuffleTiles : public CCTiledGrid3DAction
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCShuffleTiles, CCTiledGrid3DAction)
|
||||
CCShuffleTiles() {}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -191,6 +193,8 @@ class CC_DLL CCTurnOffTiles : public CCTiledGrid3DAction
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTurnOffTiles, CCTiledGrid3DAction)
|
||||
CCTurnOffTiles() {}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
|
@ -80,6 +80,7 @@ public:
|
|||
bool m_bIgnoreContentScaleFactor;
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAtlasNode, CCNodeRGBA)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
1
loader/include/Geode/cocos/cocoa/CCArray.h
vendored
1
loader/include/Geode/cocos/cocoa/CCArray.h
vendored
|
@ -115,6 +115,7 @@ class CC_DLL CCArray : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCArray, CCObject)
|
||||
/**
|
||||
* @lua NA
|
||||
*/
|
||||
|
|
|
@ -41,6 +41,8 @@ class CC_DLL CCAutoreleasePool : public CCObject
|
|||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
CCArray* m_pManagedObjectArray;
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAutoreleasePool, CCObject)
|
||||
|
||||
CCAutoreleasePool(void);
|
||||
~CCAutoreleasePool(void);
|
||||
|
||||
|
@ -62,6 +64,8 @@ class CC_DLL CCPoolManager
|
|||
|
||||
CCAutoreleasePool* getCurReleasePool();
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCPoolManager)
|
||||
|
||||
CCPoolManager();
|
||||
~CCPoolManager();
|
||||
void finalize();
|
||||
|
|
4
loader/include/Geode/cocos/effects/CCGrid.h
vendored
4
loader/include/Geode/cocos/effects/CCGrid.h
vendored
|
@ -53,6 +53,8 @@ class CC_DLL CCGridBase : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCGridBase, CCObject)
|
||||
CCGridBase() {}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -170,6 +172,7 @@ class CC_DLL CCGrid3D : public CCGridBase
|
|||
#endif // EMSCRIPTEN
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCGrid3D, CCGridBase)
|
||||
CCGrid3D();
|
||||
~CCGrid3D(void);
|
||||
|
||||
|
@ -209,6 +212,7 @@ class CC_DLL CCTiledGrid3D : public CCGridBase
|
|||
#endif // EMSCRIPTEN
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTiledGrid3D, CCGridBase)
|
||||
CCTiledGrid3D();
|
||||
~CCTiledGrid3D(void);
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ NS_CC_EXT_BEGIN
|
|||
class CC_DLL CCControlButton : public CCControl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlButton, CCControl)
|
||||
CCControlButton();
|
||||
virtual ~CCControlButton();
|
||||
virtual void needsLayout(void);
|
||||
|
|
|
@ -60,6 +60,7 @@ class CC_DLL CCControlHuePicker : public CCControl
|
|||
CC_SYNTHESIZE_READONLY(CCPoint, m_startPos, StartPos);
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlHuePicker, CCControl)
|
||||
CCControlHuePicker();
|
||||
virtual ~CCControlHuePicker();
|
||||
virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos);
|
||||
|
|
|
@ -42,6 +42,7 @@ NS_CC_EXT_BEGIN
|
|||
class CC_DLL CCControlPotentiometer : public CCControl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlPotentiometer, CCControl)
|
||||
CCControlPotentiometer();
|
||||
virtual ~CCControlPotentiometer();
|
||||
/**
|
||||
|
|
|
@ -64,6 +64,7 @@ public:
|
|||
int boxSize;
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlSaturationBrightnessPicker, CCControl)
|
||||
CCControlSaturationBrightnessPicker();
|
||||
virtual ~CCControlSaturationBrightnessPicker();
|
||||
virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos);
|
||||
|
|
|
@ -69,6 +69,7 @@ class CC_DLL CCControlSlider: public CCControl
|
|||
CC_SYNTHESIZE_RETAIN(CCSprite*, m_backgroundSprite, BackgroundSprite);
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlSlider, CCControl)
|
||||
CCControlSlider();
|
||||
virtual ~CCControlSlider();
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ typedef enum
|
|||
class CC_DLL CCControlStepper : public CCControl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlStepper, CCControl)
|
||||
CCControlStepper();
|
||||
virtual ~CCControlStepper();
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ class CC_DLL CCControlSwitchSprite;
|
|||
class CC_DLL CCControlSwitch : public CCControl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlSwitch, CCControl)
|
||||
CCControlSwitch();
|
||||
virtual ~CCControlSwitch();
|
||||
/** Initializes a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite. */
|
||||
|
|
|
@ -176,6 +176,8 @@ class CC_DLL CCEditBox
|
|||
, public CCIMEDelegate
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBox, CCControlButton)
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
|
|
|
@ -36,6 +36,9 @@ NS_CC_EXT_BEGIN
|
|||
class CC_DLL CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCEditBoxImpl)
|
||||
CCEditBoxImpl() {}
|
||||
|
||||
CCEditBoxImpl(CCEditBox* pEditBox) : m_pDelegate(NULL),m_pEditBox(pEditBox) {}
|
||||
virtual ~CCEditBoxImpl() {}
|
||||
|
||||
|
|
|
@ -40,6 +40,9 @@ class CC_DLL CCEditBox;
|
|||
class CC_DLL CCEditBoxImplAndroid : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBoxImplAndroid, CCEditBoxImpl)
|
||||
CCEditBoxImplAndroid() {}
|
||||
|
||||
CCEditBoxImplAndroid(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplAndroid();
|
||||
|
||||
|
|
|
@ -74,6 +74,9 @@ class CC_DLL CCEditBox;
|
|||
class CC_DLL CCEditBoxImplIOS : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBoxImplIOS, CCEditBoxImpl)
|
||||
CCEditBoxImplIOS() {}
|
||||
|
||||
CCEditBoxImplIOS(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplIOS();
|
||||
|
||||
|
|
|
@ -73,6 +73,9 @@ class CC_DLL CCEditBox;
|
|||
class CC_DLL CCEditBoxImplMac : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBoxImplMac, CCEditBoxImpl)
|
||||
CCEditBoxImplMac() {}
|
||||
|
||||
CCEditBoxImplMac(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplMac();
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@ class CC_DLL CCEditBox;
|
|||
class CC_DLL CCEditBoxImplTizen : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBoxImplTizen, CCEditBoxImpl)
|
||||
CCEditBoxImplTizen() {}
|
||||
|
||||
CCEditBoxImplTizen(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplTizen();
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ class CC_DLL CCEditBox;
|
|||
class CC_DLL CCEditBoxImplWin : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBoxImplWin, CCEditBoxImpl)
|
||||
CCEditBoxImplWin() {}
|
||||
|
||||
CCEditBoxImplWin(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplWin();
|
||||
|
||||
|
|
|
@ -34,6 +34,9 @@ class CC_DLL CCEditBox;
|
|||
class CC_DLL CCEditBoxImplWp8 : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEditBoxImplWp8, CCEditBoxImpl)
|
||||
CCEditBoxImplWp8() {}
|
||||
|
||||
CCEditBoxImplWp8(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplWp8();
|
||||
|
||||
|
|
|
@ -140,6 +140,7 @@ public:
|
|||
class CC_DLL CCTableView : public CCScrollView, public CCScrollViewDelegate
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTableView, CCScrollView)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -49,6 +49,8 @@ class CC_DLL CCHttpClient : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCHttpClient, CCObject)
|
||||
|
||||
/** Return the shared instance **/
|
||||
static CCHttpClient *getInstance();
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ class CC_DLL CCKeypadDispatcher : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCKeypadDispatcher, CCObject);
|
||||
CCKeypadDispatcher();
|
||||
~CCKeypadDispatcher();
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ public://@public
|
|||
// Character Set defines the letters that actually exist in the font
|
||||
gd::set<unsigned int> *m_pCharacterSet;
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCBMFontConfiguration, CCObject)
|
||||
CCBMFontConfiguration();
|
||||
/**
|
||||
* @js NA
|
||||
|
|
|
@ -430,6 +430,7 @@ protected:
|
|||
unsigned int m_nEnabledLayer;
|
||||
CCArray* m_pLayers;
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCLayerMultiplex, CCLayer)
|
||||
/**
|
||||
* @js ctor
|
||||
* @lua NA
|
||||
|
|
|
@ -195,6 +195,7 @@ class CC_DLL CCTransitionJumpZoom : public CCTransitionScene
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionJumpZoom, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -220,6 +221,7 @@ class CC_DLL CCTransitionMoveInL : public CCTransitionScene, public CCTransition
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionMoveInL, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -251,6 +253,7 @@ class CC_DLL CCTransitionMoveInR : public CCTransitionMoveInL
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionMoveInR, CCTransitionMoveInL)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -272,6 +275,7 @@ class CC_DLL CCTransitionMoveInT : public CCTransitionMoveInL
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionMoveInT, CCTransitionMoveInL)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -293,6 +297,7 @@ class CC_DLL CCTransitionMoveInB : public CCTransitionMoveInL
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionMoveInB, CCTransitionMoveInL)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -314,6 +319,7 @@ class CC_DLL CCTransitionSlideInL : public CCTransitionScene, public CCTransitio
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionSlideInL, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -348,6 +354,7 @@ class CC_DLL CCTransitionSlideInR : public CCTransitionSlideInL
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionSlideInR, CCTransitionSlideInL)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -375,6 +382,7 @@ class CC_DLL CCTransitionSlideInB : public CCTransitionSlideInL
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionSlideInB, CCTransitionSlideInL)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -402,6 +410,7 @@ class CC_DLL CCTransitionSlideInT : public CCTransitionSlideInL
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionSlideInT, CCTransitionSlideInL)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -429,6 +438,7 @@ class CC_DLL CCTransitionShrinkGrow : public CCTransitionScene , public CCTransi
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionShrinkGrow, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -456,6 +466,7 @@ class CC_DLL CCTransitionFlipX : public CCTransitionSceneOriented
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFlipX, CCTransitionSceneOriented)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -483,6 +494,7 @@ class CC_DLL CCTransitionFlipY : public CCTransitionSceneOriented
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFlipY, CCTransitionSceneOriented)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -510,6 +522,7 @@ class CC_DLL CCTransitionFlipAngular : public CCTransitionSceneOriented
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFlipAngular, CCTransitionSceneOriented)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -537,6 +550,7 @@ class CC_DLL CCTransitionZoomFlipX : public CCTransitionSceneOriented
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionZoomFlipX, CCTransitionSceneOriented)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -564,6 +578,7 @@ class CC_DLL CCTransitionZoomFlipY : public CCTransitionSceneOriented
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionZoomFlipY, CCTransitionSceneOriented)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -591,6 +606,7 @@ class CC_DLL CCTransitionZoomFlipAngular : public CCTransitionSceneOriented
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionZoomFlipAngular, CCTransitionSceneOriented)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -664,6 +680,7 @@ class CC_DLL CCTransitionCrossFade : public CCTransitionScene
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public :
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionCrossFade, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -697,6 +714,7 @@ class CC_DLL CCTransitionTurnOffTiles : public CCTransitionScene ,public CCTrans
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public :
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionTurnOffTiles, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -726,6 +744,7 @@ class CC_DLL CCTransitionSplitCols : public CCTransitionScene , public CCTransit
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionSplitCols, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -756,6 +775,7 @@ class CC_DLL CCTransitionSplitRows : public CCTransitionSplitCols
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionSplitRows, CCTransitionSplitCols)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -780,6 +800,7 @@ class CC_DLL CCTransitionFadeTR : public CCTransitionScene , public CCTransition
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFadeTR, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -811,6 +832,7 @@ class CC_DLL CCTransitionFadeBL : public CCTransitionFadeTR
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFadeBL, CCTransitionFadeTR)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -834,6 +856,7 @@ class CC_DLL CCTransitionFadeUp : public CCTransitionFadeTR
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFadeUp, CCTransitionFadeTR)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -857,6 +880,7 @@ class CC_DLL CCTransitionFadeDown : public CCTransitionFadeTR
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionFadeDown, CCTransitionFadeTR)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -55,6 +55,7 @@ public:
|
|||
bool m_bBack;
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionPageTurn, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -44,6 +44,8 @@ class CC_DLL CCTransitionProgress : public CCTransitionScene
|
|||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
static CCTransitionProgress* create(float t, CCScene* scene);
|
||||
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTransitionProgress, CCTransitionScene)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -393,6 +393,7 @@ class CC_DLL CCMenuItemToggle : public CCMenuItem
|
|||
*/
|
||||
CC_PROPERTY(CCArray*, m_pSubItems, SubItems);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMenuItemToggle, CCMenuItem)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -60,6 +60,7 @@ class CC_DLL CCProgressTimer : public CCNodeRGBA
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCProgressTimer, CCNodeRGBA)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -68,6 +68,7 @@ class CC_DLL CCParticleBatchNode : public CCNode, public CCTextureProtocol
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCParticleBatchNode, CCNode)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -16,6 +16,7 @@ private:
|
|||
|
||||
CCDevice();
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCDevice)
|
||||
/**
|
||||
* Gets the DPI of device
|
||||
* @return The DPI of device.
|
||||
|
|
|
@ -59,6 +59,7 @@ class CC_DLL CCSAXParser
|
|||
CCSAXDelegator* m_pDelegator;
|
||||
public:
|
||||
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCSAXParser)
|
||||
CCSAXParser();
|
||||
~CCSAXParser(void);
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ class CC_DLL CCThread
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCThread)
|
||||
CCThread() : m_pAutoreasePool(0) {}
|
||||
~CCThread();
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ class CC_DLL CCAccelerometer
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCAccelerometer)
|
||||
CCAccelerometer();
|
||||
~CCAccelerometer();
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class CC_DLL CCAccelerometer
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCAccelerometer)
|
||||
CCAccelerometer();
|
||||
~CCAccelerometer();
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class CC_DLL CCAccelerometer
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCAccelerometer)
|
||||
CCAccelerometer() {}
|
||||
~CCAccelerometer() {}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
#endif
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define CURL_SIZEOF_LONG 4
|
||||
#define CURL_SIZEOF_LONG 8
|
||||
|
||||
/* Integral data type used for curl_socklen_t. */
|
||||
#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
|
|
|
@ -33,6 +33,7 @@ class CC_DLL CCAccelerometer
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCAccelerometer)
|
||||
CCAccelerometer();
|
||||
~CCAccelerometer();
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ class CC_DLL CCFileUtilsWin32 : public CCFileUtils
|
|||
friend class CCFileUtils;
|
||||
CCFileUtilsWin32();
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCFileUtilsWin32, CCFileUtils)
|
||||
/* override funtions */
|
||||
bool init();
|
||||
virtual void addSearchPath(const char* path);
|
||||
|
|
|
@ -12,13 +12,17 @@ class CC_DLL CCContentManager : public cocos2d::CCObject
|
|||
{
|
||||
public:
|
||||
static CCContentManager* sharedManager();
|
||||
CCContentManager();
|
||||
CCContentManager() {}
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCContentManager, CCObject)
|
||||
|
||||
bool init();
|
||||
|
||||
cocos2d::CCDictionary* addDict(const char* dict, bool unk);
|
||||
cocos2d::CCDictionary* addDictDS(const char* dict);
|
||||
|
||||
void clearCache();
|
||||
public:
|
||||
cocos2d::CCDictionary* m_pDictCache;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -14,7 +14,6 @@ NS_CC_BEGIN
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
// this one might not actually exist in gd itself
|
||||
KEY_Unknown = -0x01,
|
||||
KEY_None = 0x00,
|
||||
KEY_Backspace = 0x08,
|
||||
|
@ -198,6 +197,28 @@ typedef enum
|
|||
CONTROLLER_RTHUMBSTICK_DOWN = 0x40F,
|
||||
CONTROLLER_RTHUMBSTICK_LEFT = 0x411,
|
||||
CONTROLLER_RTHUMBSTICK_RIGHT = 0x413,
|
||||
|
||||
// Geode additions
|
||||
KEY_GraveAccent = 0x1000,
|
||||
KEY_OEMEqual = 0x1001,
|
||||
KEY_LeftBracket = 0x1002,
|
||||
KEY_RightBracket = 0x1003,
|
||||
KEY_Backslash = 0x1004,
|
||||
KEY_Semicolon = 0x1005,
|
||||
KEY_Apostrophe = 0x1006,
|
||||
KEY_Slash = 0x1007,
|
||||
KEY_Equal = 0x1008,
|
||||
KEY_NumEnter = 0x1009,
|
||||
// Keys used by some non-US keyboard layouts
|
||||
KEY_World1 = 0x100A,
|
||||
KEY_World2 = 0x100B,
|
||||
|
||||
// Mouse buttons (excluding clicks)
|
||||
MOUSE_4 = 0x1100,
|
||||
MOUSE_5 = 0x1101,
|
||||
MOUSE_6 = 0x1102,
|
||||
MOUSE_7 = 0x1103,
|
||||
MOUSE_8 = 0x1104
|
||||
} enumKeyCodes;
|
||||
|
||||
// @note RobTop Addition
|
||||
|
|
|
@ -11,6 +11,7 @@ NS_CC_BEGIN
|
|||
class CC_DLL CCKeyboardDispatcher : public CCObject
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCKeyboardDispatcher, CCObject)
|
||||
CCKeyboardDispatcher();
|
||||
virtual ~CCKeyboardDispatcher();
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ class CC_DLL CCMouseDispatcher : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMouseDispatcher, CCObject)
|
||||
CCMouseDispatcher();
|
||||
virtual ~CCMouseDispatcher();
|
||||
|
||||
|
|
|
@ -9,7 +9,15 @@ NS_CC_BEGIN
|
|||
// @note RobTop Addition
|
||||
class CC_DLL CCFontSprite : public CCSpriteExtra {
|
||||
public:
|
||||
CCFontSprite() {}
|
||||
CCFontSprite()
|
||||
: m_bUseInstant(false)
|
||||
, m_fInstantTime(0.0f)
|
||||
, m_fDelay(0.0f)
|
||||
, m_fShakesPerSecond(0.0f)
|
||||
, m_fShakeIntensity(0.0f)
|
||||
, m_fShakeElapsed(0.0f)
|
||||
, m_nShakeIndex(0)
|
||||
{}
|
||||
virtual ~CCFontSprite() {}
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCFontSprite, CCSpriteExtra);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ NS_CC_BEGIN
|
|||
// @note RobTop Addition
|
||||
class CC_DLL CCSpriteExtra : public CCSprite {
|
||||
public:
|
||||
CCSpriteExtra() {}
|
||||
CCSpriteExtra() : m_fXOffset(0.0f), m_fYOffset(0.0f) {}
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpriteExtra, CCSprite);
|
||||
|
||||
inline float getXOffset() const { return m_fXOffset; }
|
||||
|
|
|
@ -12,9 +12,9 @@ public:
|
|||
// @note RobTop Addition
|
||||
class CC_DLL ObjectDecoder : public cocos2d::CCNode {
|
||||
public:
|
||||
ObjectDecoder();
|
||||
ObjectDecoder() : m_delegate(nullptr) {}
|
||||
~ObjectDecoder() {}
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(ObjectDecoder)
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(ObjectDecoder, cocos2d::CCNode);
|
||||
|
||||
static ObjectDecoder* sharedDecoder();
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@ class CC_DLL CCScriptEngineManager
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCScriptEngineManager)
|
||||
~CCScriptEngineManager(void);
|
||||
|
||||
CCScriptEngineProtocol* getScriptEngine(void) {
|
||||
|
|
|
@ -46,6 +46,7 @@ class CC_DLL CCShaderCache : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCShaderCache, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -56,6 +56,7 @@ class CC_DLL CCAnimationFrame : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAnimationFrame, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
@ -98,6 +99,7 @@ class CC_DLL CCAnimation : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAnimation, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -51,6 +51,7 @@ class CC_DLL CCAnimationCache : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAnimationCache, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -98,6 +98,9 @@ public:
|
|||
* @lua NA
|
||||
*/
|
||||
~CCSpriteFrame(void);
|
||||
inline CCSpriteFrame() {}
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpriteFrame, CCObject);
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
|
@ -67,6 +67,8 @@ protected:
|
|||
*/
|
||||
CCSpriteFrameCache(void) : m_pSpriteFrames(NULL), m_pSpriteFramesAliases(NULL){}
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpriteFrameCache, CCObject)
|
||||
|
||||
bool init(void);
|
||||
/**
|
||||
* @js NA
|
||||
|
|
|
@ -36,6 +36,8 @@ class CC_DLL CCNotificationCenter : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCNotificationCenter, CCObject)
|
||||
|
||||
/** CCNotificationCenter constructor */
|
||||
CCNotificationCenter();
|
||||
|
||||
|
@ -123,6 +125,9 @@ class CC_DLL CCNotificationObserver : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCNotificationObserver, CCObject)
|
||||
CCNotificationObserver() {}
|
||||
|
||||
/** @brief CCNotificationObserver constructor
|
||||
* @param target The target which wants to observer notification events.
|
||||
* @param selector The callback function which will be invoked when the specified notification event was posted.
|
||||
|
|
|
@ -52,6 +52,9 @@ class CC_DLL CCProfiler : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCProfiler, CCObject)
|
||||
CCProfiler() {}
|
||||
|
||||
~CCProfiler(void);
|
||||
/** display the timers */
|
||||
void displayTimers(void);
|
||||
|
@ -76,6 +79,7 @@ public:
|
|||
class CCProfilingTimer : public CCObject
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCProfilingTimer, CCObject)
|
||||
CCProfilingTimer();
|
||||
~CCProfilingTimer();
|
||||
bool initWithName(const char* timerName);
|
||||
|
|
|
@ -38,6 +38,7 @@ protected:
|
|||
|
||||
CCComponent(void);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCComponent, CCObject)
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
|
@ -44,6 +44,9 @@ protected:
|
|||
CCComponentContainer(CCNode *pNode);
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCComponentContainer)
|
||||
CCComponentContainer() {}
|
||||
|
||||
virtual ~CCComponentContainer(void);
|
||||
virtual CCComponent* get(const char *pName) const;
|
||||
virtual bool add(CCComponent *pCom);
|
||||
|
|
|
@ -46,6 +46,7 @@ class CC_DLL CCUserDefault
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCUserDefault)
|
||||
~CCUserDefault();
|
||||
|
||||
// get value methods
|
||||
|
|
|
@ -21,7 +21,6 @@ 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.
|
||||
****************************************************************************/
|
||||
#ifndef GEODE_IS_MEMBER_TEST
|
||||
#ifndef __SUPPORT_ZIPUTILS_H__
|
||||
#define __SUPPORT_ZIPUTILS_H__
|
||||
|
||||
|
@ -272,5 +271,3 @@ namespace cocos2d
|
|||
};
|
||||
} // end of namespace cocos2d
|
||||
#endif // __SUPPORT_ZIPUTILS_H__
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,6 +43,7 @@ class CC_DLL CCIMEDispatcher
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCIMEDispatcher)
|
||||
~CCIMEDispatcher();
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,6 +67,7 @@ private:
|
|||
/// todo: void addImageWithAsyncObject(CCAsyncObject* async);
|
||||
void addImageAsyncCallBack(float dt);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTextureCache, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
* @lua NA
|
||||
|
|
|
@ -38,6 +38,7 @@ class CC_DLL CCTextureETC : public CCObject
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTextureETC, CCObject)
|
||||
CCTextureETC();
|
||||
virtual ~CCTextureETC();
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ enum {
|
|||
class CCTexturePVR : public CCObject
|
||||
{
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTexturePVR, CCObject)
|
||||
CCTexturePVR();
|
||||
virtual ~CCTexturePVR();
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ class CC_DLL CCParallaxNode : public CCNode
|
|||
CC_SYNTHESIZE(struct _ccArray *, m_pParallaxArray, ParallaxArray)
|
||||
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCParallaxNode, CCNode)
|
||||
/** Adds a child to the container with a z-order, a parallax ratio and a position offset
|
||||
It returns self, so you can chain several addChilds.
|
||||
@since v0.8
|
||||
|
|
|
@ -87,6 +87,7 @@ class CC_DLL CCTMXLayer : public CCSpriteBatchNode
|
|||
/** properties from the layer. They can be added using Tiled */
|
||||
CC_PROPERTY(CCDictionary*, m_pProperties, Properties);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTMXLayer, CCSpriteBatchNode)
|
||||
/**
|
||||
* @js ctor
|
||||
* @lua NA
|
||||
|
|
|
@ -52,6 +52,7 @@ class CC_DLL CCTMXObjectGroup : public CCObject
|
|||
/** array of the objects */
|
||||
CC_PROPERTY(CCArray*, m_pObjects, Objects);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTMXObjectGroup, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -120,6 +120,7 @@ class CC_DLL CCTMXTiledMap : public CCNode
|
|||
/** properties */
|
||||
CC_PROPERTY(CCDictionary*, m_pProperties, Properties);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTMXTiledMap, CCNode)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -101,6 +101,7 @@ public:
|
|||
unsigned int m_uMaxGID;
|
||||
CCPoint m_tOffset;
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTMXLayerInfo, CCObject)
|
||||
CCTMXLayerInfo();
|
||||
virtual ~CCTMXLayerInfo();
|
||||
};
|
||||
|
@ -129,6 +130,7 @@ public:
|
|||
//! size in pixels of the image
|
||||
CCSize m_tImageSize;
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTMXTilesetInfo, CCObject)
|
||||
CCTMXTilesetInfo();
|
||||
virtual ~CCTMXTilesetInfo();
|
||||
CCRect rectForGID(unsigned int gid);
|
||||
|
@ -174,6 +176,7 @@ public:
|
|||
/// properties
|
||||
CC_PROPERTY(CCDictionary*, m_pProperties, Properties);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTMXMapInfo, CCObject)
|
||||
/**
|
||||
* @js ctor
|
||||
* @lua NA
|
||||
|
|
|
@ -60,6 +60,7 @@ class CC_DLL CCTileMapAtlas : public CCAtlasNode
|
|||
/** TileMap info */
|
||||
CC_PROPERTY(struct sImageTGA*, m_pTGAInfo, TGAInfo);
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTileMapAtlas, CCAtlasNode)
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
|
|
|
@ -118,6 +118,7 @@ class CC_DLL CCTouchDispatcher : public CCObject, public EGLTouchDelegate
|
|||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTouchDispatcher, CCObject)
|
||||
/**
|
||||
* @lua NA
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Event.hpp"
|
||||
#include "../modify/Traits.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
@ -16,11 +17,11 @@ namespace geode {
|
|||
protected:
|
||||
std::string m_id;
|
||||
std::tuple<Args...> m_args;
|
||||
|
||||
|
||||
public:
|
||||
DispatchEvent(std::string const& id, Args... args)
|
||||
: m_id(id), m_args(std::make_tuple(args...)) {}
|
||||
|
||||
DispatchEvent(std::string const& id, Args... args) :
|
||||
m_id(id), m_args(std::make_tuple(args...)) {}
|
||||
|
||||
std::tuple<Args...> getArgs() const {
|
||||
return m_args;
|
||||
}
|
||||
|
@ -61,6 +62,103 @@ namespace geode {
|
|||
}
|
||||
|
||||
DispatchFilter(std::string const& id) : m_id(id) {}
|
||||
|
||||
DispatchFilter(DispatchFilter const&) = default;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// - Macros for exporting functions via events -
|
||||
|
||||
// You can use these to easily export functions to other mods
|
||||
// without being a required depedency.
|
||||
// # Example Usage:
|
||||
/*
|
||||
```
|
||||
// (In your api distributed header file)
|
||||
#pragma once
|
||||
|
||||
#include <Geode/loader/Dispatch.hpp>
|
||||
// You must **manually** declare the mod id, as macros like GEODE_MOD_ID will not
|
||||
// behave correctly to other mods using your api.
|
||||
#define MY_MOD_ID "dev.my-api"
|
||||
|
||||
namespace api {
|
||||
// Important: The function must be declared inline, and return a geode::Result,
|
||||
// as it can fail if the api is not available.
|
||||
inline geode::Result<int> addNumbers(int a, int b) GEODE_EVENT_EXPORT(&addNumbers, (a, b));
|
||||
}
|
||||
```
|
||||
*/
|
||||
// Then, in **one** of your source files, you must define the exported functions:
|
||||
/*
|
||||
```
|
||||
// MUST be defined before including the header.
|
||||
#define GEODE_DEFINE_EVENT_EXPORTS
|
||||
#include "../include/api.hpp"
|
||||
|
||||
Result<int> api::addNumbers(int a, int b) {
|
||||
return Ok(a + b);
|
||||
}
|
||||
```
|
||||
*/
|
||||
|
||||
// once this is set in stone we should not change it ever
|
||||
#define GEODE_EVENT_EXPORT_ID_FOR(fnPtrStr, callArgsStr) \
|
||||
(std::string(MY_MOD_ID "/") + (fnPtrStr[0] == '&' ? &fnPtrStr[1] : fnPtrStr))
|
||||
|
||||
namespace geode::geode_internal {
|
||||
template <class Fn>
|
||||
inline auto callEventExportListener(Fn fnPtr, auto eventID) {
|
||||
using StaticType = geode::modifier::AsStaticType<Fn>::type;
|
||||
Fn ptr = nullptr;
|
||||
geode::DispatchEvent<Fn*>(eventID, &ptr).post();
|
||||
return std::function<std::remove_pointer_t<StaticType>>(ptr);
|
||||
}
|
||||
|
||||
template <class Fn>
|
||||
inline bool getEventExportListener(Fn fnPtr, auto eventID) {
|
||||
new geode::EventListener(
|
||||
[=](Fn* ptr) {
|
||||
*ptr = fnPtr;
|
||||
return geode::ListenerResult::Stop;
|
||||
},
|
||||
geode::DispatchFilter<Fn*>(eventID)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#define GEODE_EVENT_EXPORT_CALL(fnPtr, callArgs, eventID) \
|
||||
{ \
|
||||
static auto storage = geode::geode_internal::callEventExportListener(fnPtr, eventID); \
|
||||
if (!storage) return geode::Err("Unable to call method"); \
|
||||
return storage callArgs; \
|
||||
}
|
||||
|
||||
#define GEODE_EVENT_EXPORT_DEFINE(fnPtr, callArgs, eventID) \
|
||||
; \
|
||||
template <auto> \
|
||||
struct EventExportDefine; \
|
||||
template <> \
|
||||
struct EventExportDefine<geode::modifier::FunctionUUID<fnPtr>::value> { \
|
||||
static inline bool val = geode::geode_internal::getEventExportListener(fnPtr, eventID); \
|
||||
static inline auto nonOmitted = &val; \
|
||||
};
|
||||
|
||||
#ifndef GEODE_DEFINE_EVENT_EXPORTS
|
||||
|
||||
#define GEODE_EVENT_EXPORT(fnPtr, callArgs) \
|
||||
GEODE_EVENT_EXPORT_CALL(fnPtr, callArgs, GEODE_EVENT_EXPORT_ID_FOR(#fnPtr, #callArgs))
|
||||
|
||||
#define GEODE_EVENT_EXPORT_ID(fnPtr, callArgs, eventID) \
|
||||
GEODE_EVENT_EXPORT_CALL(fnPtr, callArgs, eventID)
|
||||
|
||||
#else
|
||||
|
||||
#define GEODE_EVENT_EXPORT(fnPtr, callArgs) \
|
||||
GEODE_EVENT_EXPORT_DEFINE(fnPtr, callArgs, GEODE_EVENT_EXPORT_ID_FOR(#fnPtr, #callArgs))
|
||||
|
||||
#define GEODE_EVENT_EXPORT_ID(fnPtr, callArgs, eventID) \
|
||||
GEODE_EVENT_EXPORT_DEFINE(fnPtr, callArgs, eventID)
|
||||
|
||||
#endif
|
|
@ -16,7 +16,17 @@ namespace geode {
|
|||
|
||||
namespace geode::base {
|
||||
GEODE_NOINLINE inline uintptr_t get() {
|
||||
static uintptr_t base = _dyld_get_image_vmaddr_slide(0) + 0x100000000;
|
||||
static uintptr_t base = []() -> uintptr_t {
|
||||
for(uint32_t gdii = 0; gdii < _dyld_image_count(); gdii++) {
|
||||
std::string_view imageName(_dyld_get_image_name(gdii));
|
||||
|
||||
if (imageName.ends_with("GeometryJump")) {
|
||||
return _dyld_get_image_vmaddr_slide(gdii) + 0x100000000;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}();
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
|
|
239
loader/include/Geode/ui/SimpleAxisLayout.hpp
Normal file
239
loader/include/Geode/ui/SimpleAxisLayout.hpp
Normal file
|
@ -0,0 +1,239 @@
|
|||
#pragma once
|
||||
|
||||
#include "Layout.hpp"
|
||||
|
||||
namespace geode {
|
||||
enum class AxisScaling {
|
||||
// Does not scale items
|
||||
None,
|
||||
// Scales items down if necessary to fit
|
||||
ScaleDown,
|
||||
// Scales items up/down to fit
|
||||
Scale,
|
||||
// Grows the layout if necessary to fit
|
||||
Grow,
|
||||
// Fits the layout to the items
|
||||
Fit,
|
||||
// Shrinks gaps if needed to fit, then scales down items
|
||||
ScaleDownGaps,
|
||||
};
|
||||
|
||||
enum class ScalingPriority {
|
||||
// Scales down first
|
||||
First,
|
||||
// Scales down second
|
||||
Early,
|
||||
// Default scaling priority
|
||||
Normal,
|
||||
// Scales down second to last
|
||||
Late,
|
||||
// Scales down last
|
||||
Last,
|
||||
// Does not scale
|
||||
Never = 128,
|
||||
};
|
||||
|
||||
enum class MainAxisAlignment {
|
||||
// Align items to the start
|
||||
// |ooo......|
|
||||
Start,
|
||||
// All items are centered
|
||||
// |...ooo...|
|
||||
Center,
|
||||
// Align items to the end
|
||||
// |......ooo|
|
||||
End,
|
||||
// Each item gets the same portion from the layout (disregards gap)
|
||||
// |.o..o..o.|
|
||||
Even,
|
||||
// Space between each item is the same (disregards gap)
|
||||
// |o...o...o|
|
||||
Between,
|
||||
// Space around each item is the same (disregards gap)
|
||||
// |.o..o..o.|
|
||||
Around,
|
||||
};
|
||||
|
||||
enum class CrossAxisAlignment {
|
||||
// Align items to the start
|
||||
// |ooo......|
|
||||
Start,
|
||||
// All items are centered
|
||||
// |...ooo...|
|
||||
Center,
|
||||
// Align items to the end
|
||||
// |......ooo|
|
||||
End,
|
||||
};
|
||||
|
||||
enum class AxisDirection {
|
||||
// Items are laid out from top to bottom
|
||||
TopToBottom = 1,
|
||||
// Items are laid out from bottom to top
|
||||
BottomToTop = 0,
|
||||
// Items are laid out from left to right
|
||||
LeftToRight = 0,
|
||||
// Items are laid out from right to left
|
||||
RightToLeft = 1,
|
||||
// Items are laid out from front to back
|
||||
FrontToBack = 0,
|
||||
// Items are laid out from back to front
|
||||
BackToFront = 1,
|
||||
};
|
||||
|
||||
class GEODE_DLL SimpleAxisLayoutOptions : public LayoutOptions {
|
||||
protected:
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> m_impl;
|
||||
|
||||
SimpleAxisLayoutOptions();
|
||||
|
||||
public:
|
||||
static SimpleAxisLayoutOptions* create();
|
||||
|
||||
virtual ~SimpleAxisLayoutOptions();
|
||||
|
||||
/**
|
||||
* Sets the minimum relative scale the node can be scaled to
|
||||
* if required to scale down to fit the layout
|
||||
*/
|
||||
SimpleAxisLayoutOptions* setMinRelativeScale(std::optional<float> scale);
|
||||
/**
|
||||
* Sets the maximum relative scale the node can be scaled to
|
||||
* if required to scale up to fit the layout
|
||||
*/
|
||||
SimpleAxisLayoutOptions* setMaxRelativeScale(std::optional<float> scale);
|
||||
/**
|
||||
* Sets the scaling priority for the node, to specify
|
||||
* when the node should be scaled compared to other nodes
|
||||
* during main axis scaling
|
||||
*/
|
||||
SimpleAxisLayoutOptions* setScalingPriority(ScalingPriority priority);
|
||||
|
||||
std::optional<float> getMinRelativeScale() const;
|
||||
std::optional<float> getMaxRelativeScale() const;
|
||||
ScalingPriority getScalingPriority() const;
|
||||
};
|
||||
|
||||
class GEODE_DLL SimpleAxisLayout : public Layout {
|
||||
protected:
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> m_impl;
|
||||
|
||||
SimpleAxisLayout(Axis);
|
||||
|
||||
public:
|
||||
static SimpleAxisLayout* create(Axis axis);
|
||||
|
||||
virtual ~SimpleAxisLayout();
|
||||
|
||||
void apply(cocos2d::CCNode* on) override;
|
||||
cocos2d::CCSize getSizeHint(cocos2d::CCNode* on) const override;
|
||||
|
||||
/**
|
||||
* Sets the axis of the layout
|
||||
*/
|
||||
SimpleAxisLayout* setAxis(Axis axis);
|
||||
/**
|
||||
* Sets the scaling behaviour of the main axis
|
||||
* The default is set to AxisScaling::None
|
||||
*/
|
||||
SimpleAxisLayout* setMainAxisScaling(AxisScaling scaling);
|
||||
/**
|
||||
* Sets the scaling behaviour of the cross axis
|
||||
* The default is set to AxisScaling::None
|
||||
*/
|
||||
SimpleAxisLayout* setCrossAxisScaling(AxisScaling scaling);
|
||||
/**
|
||||
* Sets how the items are aligned on the main axis
|
||||
* The default is set to MainAxisAlignment::Start
|
||||
*/
|
||||
SimpleAxisLayout* setMainAxisAlignment(MainAxisAlignment alignment);
|
||||
/**
|
||||
* Sets how the items are aligned on the cross axis
|
||||
* The default is set to CrossAxisAlignment::Center
|
||||
*/
|
||||
SimpleAxisLayout* setCrossAxisAlignment(CrossAxisAlignment alignment);
|
||||
/**
|
||||
* Sets the direction of the main axis
|
||||
* The default is set to AxisDirection::TopToBottom for SimpleRow
|
||||
* and AxisDirection::LeftToRight for SimpleColumn
|
||||
*/
|
||||
SimpleAxisLayout* setMainAxisDirection(AxisDirection direction);
|
||||
/**
|
||||
* Sets the direction of the cross axis
|
||||
* The default is set to AxisDirection::TopToBottom for SimpleRow
|
||||
* and AxisDirection::LeftToRight for SimpleColumn
|
||||
*/
|
||||
SimpleAxisLayout* setCrossAxisDirection(AxisDirection direction);
|
||||
/**
|
||||
* Sets the gap between items, unless overridden by a AxisGap node
|
||||
* The default is set to 0.0f
|
||||
*/
|
||||
SimpleAxisLayout* setGap(float gap);
|
||||
/**
|
||||
* Sets the minimum relative scale the node can be scaled to
|
||||
* The default is set to 0.5f
|
||||
*/
|
||||
SimpleAxisLayout* setMinRelativeScale(std::optional<float> scale);
|
||||
/**
|
||||
* Sets the maximum relative scale the node can be scaled to
|
||||
* The default is set to 2.0f
|
||||
*/
|
||||
SimpleAxisLayout* setMaxRelativeScale(std::optional<float> scale);
|
||||
|
||||
Axis getAxis() const;
|
||||
AxisScaling getMainAxisScaling() const;
|
||||
AxisScaling getCrossAxisScaling() const;
|
||||
MainAxisAlignment getMainAxisAlignment() const;
|
||||
CrossAxisAlignment getCrossAxisAlignment() const;
|
||||
AxisDirection getMainAxisDirection() const;
|
||||
AxisDirection getCrossAxisDirection() const;
|
||||
float getGap() const;
|
||||
std::optional<float> getMinRelativeScale() const;
|
||||
std::optional<float> getMaxRelativeScale() const;
|
||||
};
|
||||
|
||||
class GEODE_DLL SimpleRowLayout : public SimpleAxisLayout {
|
||||
protected:
|
||||
SimpleRowLayout();
|
||||
|
||||
public:
|
||||
static SimpleRowLayout* create();
|
||||
|
||||
virtual ~SimpleRowLayout();
|
||||
};
|
||||
|
||||
class GEODE_DLL SimpleColumnLayout : public SimpleAxisLayout {
|
||||
protected:
|
||||
SimpleColumnLayout();
|
||||
|
||||
public:
|
||||
static SimpleColumnLayout* create();
|
||||
|
||||
virtual ~SimpleColumnLayout();
|
||||
};
|
||||
|
||||
class GEODE_DLL AxisGap : public cocos2d::CCNode {
|
||||
protected:
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> m_impl;
|
||||
|
||||
AxisGap(float gap);
|
||||
|
||||
public:
|
||||
static AxisGap* create(float gap);
|
||||
|
||||
virtual ~AxisGap();
|
||||
|
||||
/**
|
||||
* Sets the gap between items in the layout
|
||||
*/
|
||||
AxisGap* setGap(float gap);
|
||||
|
||||
float getGap() const;
|
||||
};
|
||||
}
|
|
@ -23,6 +23,15 @@ namespace geode {
|
|||
* @returns The implementation of the method, or an error.
|
||||
*/
|
||||
Result<void*> getObjcMethodImp(std::string const& className, std::string const& selectorName);
|
||||
|
||||
/**
|
||||
* Replace an Objective-C method with a new implementation.
|
||||
* @param className The name of the class whose method to replace
|
||||
* @param selectorName The name of the method to replace
|
||||
* @param imp The new implementation of the method
|
||||
* @returns Ok() if the method was replaced successfully, or an error.
|
||||
*/
|
||||
Result<void*> replaceObjcMethod(std::string const& className, std::string const& selectorName, void* imp);
|
||||
}
|
||||
|
||||
class ObjcHook {
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace geode {
|
|||
} invoke;
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
namespace geode_internal {
|
||||
template <typename T, typename E>
|
||||
struct promise_type {
|
||||
using Inner = std::optional<Result<T, E>>;
|
||||
|
@ -91,10 +91,10 @@ namespace geode {
|
|||
|
||||
template <typename T = void, typename E = std::string>
|
||||
auto operator co_await(geode::Result<T, E>&& res) {
|
||||
return geode::internal::Awaiter { std::move(res) };
|
||||
return geode::geode_internal::Awaiter { std::move(res) };
|
||||
}
|
||||
|
||||
template <typename T, typename E, typename ...Args>
|
||||
struct std::coroutine_traits<geode::Result<T, E>, Args...> {
|
||||
using promise_type = geode::internal::promise_type<T, E>;
|
||||
using promise_type = geode::geode_internal::promise_type<T, E>;
|
||||
};
|
||||
|
|
|
@ -413,7 +413,7 @@ namespace geode {
|
|||
* to it is freed or locked
|
||||
* @param obj Object to construct the WeakRef from
|
||||
*/
|
||||
WeakRef(T* obj) : m_controller(WeakRefPool::get()->manage(obj)) {}
|
||||
WeakRef(T* obj) : m_controller(obj ? WeakRefPool::get()->manage(obj) : nullptr) {}
|
||||
|
||||
WeakRef(WeakRef<T> const& other) : WeakRef(other.m_controller) {}
|
||||
|
||||
|
@ -437,7 +437,7 @@ namespace geode {
|
|||
* a null Ref if the object has been freed
|
||||
*/
|
||||
Ref<T> lock() const {
|
||||
if (m_controller->isManaged()) {
|
||||
if (m_controller && m_controller->isManaged()) {
|
||||
return Ref(static_cast<T*>(m_controller->get()));
|
||||
}
|
||||
return Ref<T>(nullptr);
|
||||
|
@ -447,7 +447,7 @@ namespace geode {
|
|||
* Check if the WeakRef points to a valid object
|
||||
*/
|
||||
bool valid() const {
|
||||
return m_controller->isManaged();
|
||||
return m_controller && m_controller->isManaged();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -456,7 +456,13 @@ namespace geode {
|
|||
* @param other The new object to swap to
|
||||
*/
|
||||
void swap(T* other) {
|
||||
m_controller->swap(other);
|
||||
if (m_controller) {
|
||||
m_controller->swap(other);
|
||||
} else if (other) {
|
||||
m_controller = WeakRefPool::get()->manage(other);
|
||||
} else {
|
||||
m_controller = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Ref<T> operator=(T* obj) {
|
||||
|
@ -465,7 +471,7 @@ namespace geode {
|
|||
}
|
||||
|
||||
WeakRef<T>& operator=(WeakRef<T> const& other) {
|
||||
this->swap(static_cast<T*>(other.m_controller->get()));
|
||||
this->swap(static_cast<T*>(other.m_controller ? other.m_controller->get() : nullptr));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -479,33 +485,40 @@ namespace geode {
|
|||
}
|
||||
|
||||
bool operator==(T* other) const {
|
||||
return m_controller->get() == other;
|
||||
return (m_controller && m_controller->get() == other) || (!m_controller && !other);
|
||||
}
|
||||
|
||||
bool operator==(WeakRef<T> const& other) const {
|
||||
if (!m_controller && !other.m_controller) return true;
|
||||
if (!m_controller || !other.m_controller) return false;
|
||||
|
||||
return m_controller->get() == other.m_controller->get();
|
||||
}
|
||||
|
||||
bool operator!=(T* other) const {
|
||||
return m_controller->get() != other;
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool operator!=(WeakRef<T> const& other) const {
|
||||
return m_controller->get() != other.m_controller->get();
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
// for containers
|
||||
bool operator<(WeakRef<T> const& other) const {
|
||||
if (!m_controller && !other.m_controller) return false;
|
||||
if (!m_controller) return true;
|
||||
if (!other.m_controller) return false;
|
||||
|
||||
return m_controller->get() < other.m_controller->get();
|
||||
}
|
||||
bool operator<=(WeakRef<T> const& other) const {
|
||||
return m_controller->get() <= other.m_controller->get();
|
||||
return !(*this > other);
|
||||
}
|
||||
bool operator>(WeakRef<T> const& other) const {
|
||||
return m_controller->get() > other.m_controller->get();
|
||||
return other < *this;
|
||||
}
|
||||
bool operator>=(WeakRef<T> const& other) const {
|
||||
return m_controller->get() >= other.m_controller->get();
|
||||
return !(*this < other);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ namespace geode {
|
|||
* On most platforms this is 1.0, but on retina displays for example this returns 2.0.
|
||||
*/
|
||||
GEODE_DLL float getDisplayFactor();
|
||||
|
||||
GEODE_DLL std::string getEnvironmentVariable(const char* name);
|
||||
}
|
||||
|
||||
template <class... Args>
|
||||
|
|
BIN
loader/include/link/ios/libcurl.a
Normal file
BIN
loader/include/link/ios/libcurl.a
Normal file
Binary file not shown.
BIN
loader/include/link/ios/libfmod_iphoneos.a
Normal file
BIN
loader/include/link/ios/libfmod_iphoneos.a
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue