Skip to content

Commit 2661b4d

Browse files
committed
Allow Android inlines and CCControlColourPicker bindings
1 parent d8dff37 commit 2661b4d

File tree

3 files changed

+31
-22
lines changed

3 files changed

+31
-22
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ jobs:
6363
7z x ninja.zip -o"$GITHUB_WORKSPACE/ninja"
6464
echo "$GITHUB_WORKSPACE/ninja" >> $GITHUB_PATH
6565
66-
# - name: Update LLVM (Windows)
67-
# shell: bash
68-
# run: |
69-
# curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/LLVM-17.0.6-win64.exe -o llvm-inst.exe
70-
# 7z x llvm-inst.exe -ollvm bin/clang.exe bin/clang++.exe bin/lld-link.exe bin/llvm-rc.exe bin/*.dll lib/clang/*/include/*
71-
# echo "$GITHUB_WORKSPACE/llvm/bin" >> $GITHUB_PATH
72-
# if: matrix.config.id == 'win'
66+
- name: Update LLVM (Windows)
67+
shell: bash
68+
run: |
69+
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/LLVM-19.1.7-win64.exe -o llvm-inst.exe
70+
7z x llvm-inst.exe -ollvm bin/clang.exe bin/clang++.exe bin/lld-link.exe bin/llvm-rc.exe bin/*.dll lib/clang/*/include/*
71+
echo "$GITHUB_WORKSPACE/llvm/bin" >> $GITHUB_PATH
72+
if: matrix.config.id == 'win'
7373

7474
- name: Update Clang (Linux)
7575
shell: bash

bindings/2.2074/Cocos2d.bro

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3761,7 +3761,7 @@ class cocos2d::CCRepeat : cocos2d::CCActionInterval {
37613761

37623762
// CCRepeat(cocos2d::CCRepeat const&);
37633763
// CCRepeat();
3764-
virtual ~CCRepeat() {
3764+
virtual ~CCRepeat() = mac inline, ios inline {
37653765
CC_SAFE_RELEASE(m_pInnerAction);
37663766
}
37673767

@@ -4969,19 +4969,32 @@ class cocos2d::extension::CCControl : cocos2d::CCLayerRGBA {
49694969

49704970
[[link(win, android)]]
49714971
class cocos2d::extension::CCControlColourPicker : cocos2d::extension::CCControl {
4972-
~CCControlColourPicker();
4973-
4972+
CCControlColourPicker() = android inline, mac inline, ios inline {
4973+
m_colourPicker = nullptr;
4974+
m_huePicker = nullptr;
4975+
m_background = nullptr;
4976+
m_colorTarget = nullptr;
4977+
m_delegate = nullptr;
4978+
}
4979+
~CCControlColourPicker() = mac inline, ios inline {}
4980+
49744981
static cocos2d::extension::CCControlColourPicker* colourPicker() = imac 0x3424e0, m1 0x2d7fe0, ios 0x1b1bd8;
4975-
4976-
ccColor3B const& getColorValue() const;
4977-
virtual void setColorValue(ccColor3B const&);
4982+
4983+
cocos2d::ccColor3B const& getColorValue() const {
4984+
return m_rgb;
4985+
}
4986+
4987+
void hueSliderValueChanged(cocos2d::CCObject*, unsigned int) = m1 0x2d7d44, imac 0x342180, ios 0x1b19d8;
4988+
void colourSliderValueChanged(cocos2d::CCObject*, unsigned int) = m1 0x2d7e2c, imac 0x3422b0, ios 0x1b1abc;
4989+
void updateControlPicker() = m1 0x2d8170, imac 0x342700, ios inline {
4990+
m_huePicker->setHue(m_hsv.h);
4991+
m_colourPicker->updateWithHSV(m_hsv);
4992+
}
4993+
void updateHueAndControlPicker() = m1 0x2d7eec, imac 0x342390, ios 0x1b1b78;
49784994

49794995
virtual bool init() = m1 0x2d7a70, imac 0x341e50, ios 0x1b1744;
4980-
void hueSliderValueChanged(CCObject* sender, CCControlEvent controlEvent);
4981-
void colourSliderValueChanged(CCObject* sender, CCControlEvent controlEvent);
4982-
void updateControlPicker();
4983-
void updateHueAndControlPicker();
49844996
virtual bool ccTouchBegan(cocos2d::CCTouch*, cocos2d::CCEvent*) = m1 0x2d81b8, imac 0x342760, ios 0x1b1d2c;
4997+
virtual void setColorValue(ccColor3B const&) = m1 0x2d8074, imac 0x3425b0, ios 0x1b1c6c;
49854998
}
49864999

49875000
[[link(win, android)]]
@@ -5245,7 +5258,7 @@ class pugi::xml_document {
52455258
[[link(android)]]
52465259
class pugi::xml_node {
52475260
// i'm not bothering
5248-
xml_node() {
5261+
xml_node() = win inline, mac inline, ios inline {
52495262
_root = nullptr;
52505263
}
52515264
}

codegen/src/SourceGen.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ std::string generateBindingSource(Root const& root, bool skipPugixml) {
242242
// yeah there are no inlines on cocos
243243
} else if (auto fn = f.get_as<FunctionBindField>()) {
244244
if (codegen::getStatus(*fn) == BindStatus::Inlined) {
245-
if (is_cocos_or_fmod_class(c.name) && (c.attributes.links & codegen::platform) != Platform::None) {
246-
continue;
247-
}
248-
249245
switch (fn->prototype.type) {
250246
case FunctionType::Ctor:
251247
case FunctionType::Dtor:

0 commit comments

Comments
 (0)