mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fix fomatting script, apply formatting.
This commit is contained in:
parent
beea7c5b4d
commit
d7bb172c95
@ -8,8 +8,7 @@ setup() {
|
|||||||
cp $dir/.clang-format $dir/..
|
cp $dir/.clang-format $dir/..
|
||||||
cp $dir/build.gradle $dir/..
|
cp $dir/build.gradle $dir/..
|
||||||
cp $dir/settings.gradle $dir/..
|
cp $dir/settings.gradle $dir/..
|
||||||
cp $dir/.editorconfig $dir/../spine-csharp
|
cp $dir/.editorconfig $dir/../spine-csharp
|
||||||
cp $dir/.editorconfig $dir/../spine-xna
|
|
||||||
cp $dir/.editorconfig $dir/../spine-monogame
|
cp $dir/.editorconfig $dir/../spine-monogame
|
||||||
cp $dir/.editorconfig $dir/../spine-unity
|
cp $dir/.editorconfig $dir/../spine-unity
|
||||||
}
|
}
|
||||||
@ -18,8 +17,7 @@ cleanup() {
|
|||||||
rm $dir/../.clang-format
|
rm $dir/../.clang-format
|
||||||
rm $dir/../build.gradle
|
rm $dir/../build.gradle
|
||||||
rm $dir/../settings.gradle
|
rm $dir/../settings.gradle
|
||||||
rm $dir/../spine-csharp/.editorconfig
|
rm $dir/../spine-csharp/.editorconfig
|
||||||
rm $dir/../spine-xna/.editorconfig
|
|
||||||
rm $dir/../spine-monogame/.editorconfig
|
rm $dir/../spine-monogame/.editorconfig
|
||||||
rm $dir/../spine-unity/.editorconfig
|
rm $dir/../spine-unity/.editorconfig
|
||||||
}
|
}
|
||||||
@ -31,7 +29,6 @@ setup
|
|||||||
pushd $dir/..
|
pushd $dir/..
|
||||||
./formatters/gradlew spotlessApply
|
./formatters/gradlew spotlessApply
|
||||||
dotnet-format spine-csharp/spine-csharp.sln
|
dotnet-format spine-csharp/spine-csharp.sln
|
||||||
dotnet-format -f spine-xna
|
|
||||||
dotnet-format -f spine-monogame
|
dotnet-format -f spine-monogame
|
||||||
dotnet-format -f spine-unity
|
dotnet-format -f spine-unity
|
||||||
popd
|
popd
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequence *sequence) {
|
static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequence *sequence) {
|
||||||
spTextureRegionArray *regions = sequence->regions;
|
spTextureRegionArray *regions = sequence->regions;
|
||||||
char *path = CALLOC(char, strlen(basePath) + sequence->digits + 1);
|
char *path = CALLOC(char, strlen(basePath) + sequence->digits + 1);
|
||||||
int i ;
|
int i;
|
||||||
for (i = 0; i < regions->size; i++) {
|
for (i = 0; i < regions->size; i++) {
|
||||||
spSequence_getPath(basePath, i, path);
|
spSequence_getPath(basePath, i, path);
|
||||||
regions->items[i] = SUPER(spAtlas_findRegion(atlas, path));
|
regions->items[i] = SUPER(spAtlas_findRegion(atlas, path));
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
#include <spine/Sequence.h>
|
#include <spine/Sequence.h>
|
||||||
#include <spine/extension.h>
|
#include <spine/extension.h>
|
||||||
|
|
||||||
_SP_ARRAY_IMPLEMENT_TYPE(spTextureRegionArray, spTextureRegion*)
|
_SP_ARRAY_IMPLEMENT_TYPE(spTextureRegionArray, spTextureRegion *)
|
||||||
|
|
||||||
static int nextSequenceId = 0;
|
static int nextSequenceId = 0;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
|
|||||||
region = self->regions->items[index];
|
region = self->regions->items[index];
|
||||||
|
|
||||||
if (attachment->type == SP_ATTACHMENT_REGION) {
|
if (attachment->type == SP_ATTACHMENT_REGION) {
|
||||||
spRegionAttachment *regionAttachment = (spRegionAttachment*)attachment;
|
spRegionAttachment *regionAttachment = (spRegionAttachment *) attachment;
|
||||||
if (regionAttachment->region != region) {
|
if (regionAttachment->region != region) {
|
||||||
regionAttachment->rendererObject = region;
|
regionAttachment->rendererObject = region;
|
||||||
regionAttachment->region = region;
|
regionAttachment->region = region;
|
||||||
@ -78,7 +78,7 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attachment->type == SP_ATTACHMENT_MESH) {
|
if (attachment->type == SP_ATTACHMENT_MESH) {
|
||||||
spMeshAttachment *meshAttachment = (spMeshAttachment*)attachment;
|
spMeshAttachment *meshAttachment = (spMeshAttachment *) attachment;
|
||||||
if (meshAttachment->region != region) {
|
if (meshAttachment->region != region) {
|
||||||
meshAttachment->rendererObject = region;
|
meshAttachment->rendererObject = region;
|
||||||
meshAttachment->region = region;
|
meshAttachment->region = region;
|
||||||
@ -87,6 +87,6 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void spSequence_getPath(const char* basePath, int index, char* path) {
|
void spSequence_getPath(const char *basePath, int index, char *path) {
|
||||||
fix me
|
fix me
|
||||||
}
|
}
|
||||||
|
|||||||
@ -656,7 +656,7 @@ namespace spine {
|
|||||||
|
|
||||||
RegionAttachment *attachment = (RegionAttachment *) slot->getAttachment();
|
RegionAttachment *attachment = (RegionAttachment *) slot->getAttachment();
|
||||||
float worldVertices[8];
|
float worldVertices[8];
|
||||||
attachment->computeWorldVertices(*slot, worldVertices, 0, 2);
|
attachment->computeWorldVertices(*slot, worldVertices, 0, 2);
|
||||||
const Vec2 points[4] =
|
const Vec2 points[4] =
|
||||||
{
|
{
|
||||||
{worldVertices[0], worldVertices[1]},
|
{worldVertices[0], worldVertices[1]},
|
||||||
@ -907,23 +907,22 @@ namespace spine {
|
|||||||
return startSlotIndex > index || endSlotIndex < index;
|
return startSlotIndex > index || endSlotIndex < index;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nothingToDraw(Slot& slot, int startSlotIndex, int endSlotIndex) {
|
bool nothingToDraw(Slot &slot, int startSlotIndex, int endSlotIndex) {
|
||||||
Attachment *attachment = slot.getAttachment();
|
Attachment *attachment = slot.getAttachment();
|
||||||
if (!attachment ||
|
if (!attachment ||
|
||||||
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
||||||
!slot.getBone().isActive())
|
!slot.getBone().isActive())
|
||||||
return true;
|
return true;
|
||||||
const auto& attachmentRTTI = attachment->getRTTI();
|
const auto &attachmentRTTI = attachment->getRTTI();
|
||||||
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
||||||
return false;
|
return false;
|
||||||
if (slot.getColor().a == 0)
|
if (slot.getColor().a == 0)
|
||||||
return true;
|
return true;
|
||||||
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
||||||
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
|
if (static_cast<RegionAttachment *>(attachment)->getColor().a == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
||||||
else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
if (static_cast<MeshAttachment *>(attachment)->getColor().a == 0)
|
||||||
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -139,7 +139,7 @@ export class AssetManagerBase implements Disposable {
|
|||||||
loadTextureAtlas (path: string,
|
loadTextureAtlas (path: string,
|
||||||
success: (path: string, atlas: TextureAtlas) => void = null,
|
success: (path: string, atlas: TextureAtlas) => void = null,
|
||||||
error: (path: string, message: string) => void = null,
|
error: (path: string, message: string) => void = null,
|
||||||
fileAlias: {[keyword:string] : string} = null
|
fileAlias: { [keyword: string]: string } = null
|
||||||
) {
|
) {
|
||||||
let index = path.lastIndexOf("/");
|
let index = path.lastIndexOf("/");
|
||||||
let parent = index >= 0 ? path.substring(0, index + 1) : "";
|
let parent = index >= 0 ? path.substring(0, index + 1) : "";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user