Skip to content

Commit

Permalink
[cpp] Fix rendererObject assignment in sequence loading code
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jul 1, 2024
1 parent e12b71b commit e9aab1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ namespace spine {
String path = sequence->getPath(basePath, i);
regions[i] = atlas->findRegion(path);
if (!regions[i]) return false;
regions[i]->rendererObject = regions[i];
}
return true;
}
Expand Down
1 change: 0 additions & 1 deletion spine-sfml/cpp/example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,6 @@ int main() {
testcase(spineboy, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.62f);
testcase(ikDemo, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.6f);
testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine-pma.atlas", 0.5f);
testcase(dragon, "data/dragon-ess.json", "data/dragon-ess.skel", "data/dragon-pma.atlas", 0.6f);
testcase(owl, "data/owl-pro.json", "data/owl-pro.skel", "data/owl-pma.atlas", 0.5f);
testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin-pma.atlas", 0.5f);
testcase(raptor, "data/raptor-pro.json", "data/raptor-pro.skel", "data/raptor-pma.atlas", 0.5f);
Expand Down
4 changes: 2 additions & 2 deletions spine-sfml/cpp/src/spine/spine-sfml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ void SkeletonDrawable::draw(RenderTarget &target, RenderStates states) const {
if (!skeletonRenderer) skeletonRenderer = new (__FILE__, __LINE__) SkeletonRenderer();
RenderCommand *command = skeletonRenderer->render(*skeleton);
while (command) {
Texture *texture = (Texture *)command->texture;
Vector2u size = texture->getSize();
Vertex vertex;
float *positions = command->positions;
float *uvs = command->uvs;
uint32_t *colors = command->colors;
uint16_t *indices = command->indices;
Texture *texture = (Texture *)command->texture;
Vector2u size = texture->getSize();
for (int i = 0, n = command->numIndices; i < n; ++i) {
int ii = indices[i];
int index = ii << 1;
Expand Down

0 comments on commit e9aab1c

Please sign in to comment.