[spine-cpp] Closes #2225, incorrect integer division when reading AlphaTimeline frames.

This commit is contained in:
Mario Zechner 2023-01-26 15:40:04 +01:00
parent a87776e8bd
commit 0042015e7c
3 changed files with 39 additions and 15 deletions

View File

@ -1010,7 +1010,7 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S
timeline->setFrame(frame, time, a);
if (frame == frameLast) break;
float time2 = readFloat(input);
float a2 = readByte(input) / 255;
float a2 = readByte(input) / 255.0;
switch (readSByte(input)) {
case CURVE_STEPPED:
timeline->setStepped(frame);

View File

@ -15,7 +15,19 @@
"examples/01-helloworld/helloworld.tscn"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "build-v4"
"preLaunchTask": "build-v4",
"linux": {
"type": "lldb",
"request": "launch",
"name": "debug scene v3",
"program": "${workspaceFolder}/godot/bin/godot.linux.editor.dev.x86_64",
},
"osx": {
"type": "lldb",
"request": "launch",
"name": "debug scene v3",
"program": "${workspaceFolder}/godot/bin/godot.macos.editor.dev.arm64",
},
},
{
"type": "cppvsdbg",
@ -28,14 +40,26 @@
"example-v4",
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "build-v4"
"preLaunchTask": "build-v4",
"linux": {
"type": "lldb",
"request": "launch",
"name": "debug scene v3",
"program": "${workspaceFolder}/godot/bin/godot.linux.editor.dev.x86_64",
},
"osx": {
"type": "lldb",
"request": "launch",
"name": "debug scene v3",
"program": "${workspaceFolder}/godot/bin/godot.macos.editor.dev.arm64",
},
},
{
"type": "cppvsdbg",
"request": "launch",
"name": "debug scene v3",
"cwd": "${workspaceFolder}",
"program": "godot/bin/godot.windows.tools.64.exe",
"program": "${workspaceFolder}/godot/bin/godot.windows.tools.64.exe",
"args": [
"--path",
"example",
@ -46,20 +70,20 @@
"type": "cppdbg",
"request": "launch",
"name": "debug scene v3",
"program": "godot/bin/godot.windows.tools.64.exe",
"program": "${workspaceFolder}/godot/bin/godot.linux.tools.64",
},
"osx": {
"type": "cppdbg",
"type": "lldb",
"request": "launch",
"name": "debug scene v3",
"program": "godot/bin/godot.tools.64.exe",
"program": "${workspaceFolder}/godot/bin/godot.osx.tools.64",
},
},
{
"type": "cppvsdbg",
"request": "launch",
"name": "debug editor v3",
"program": "godot/bin/godot.windows.tools.64.exe",
"program": "${workspaceFolder}/godot/bin/godot.windows.tools.64.exe",
"args": [
"-e",
"--path",
@ -71,13 +95,13 @@
"type": "cppdbg",
"request": "launch",
"name": "debug editor v3",
"program": "godot/bin/godot.windows.tools.64.exe",
"program": "${workspaceFolder}/godot/bin/godot.linux.tools.64",
},
"osx": {
"type": "cppdbg",
"type": "lldb",
"request": "launch",
"name": "debug editor v3",
"program": "godot/bin/godot.tools.64.exe",
"program": "${workspaceFolder}/godot/bin/godot.osx.tools.64",
},
},
]

View File

@ -14,7 +14,7 @@
"16",
"target=editor",
"dev_build=yes",
"custom_modules=\"${workspaceFolder}/spine_godot"
"custom_modules=\"${workspaceFolder}/spine_godot\""
],
"problemMatcher": "$msCompile",
"windows": {
@ -23,7 +23,7 @@
"16",
"target=editor",
"dev_build=yes",
"custom_modules=\"${workspaceFolder}/spine_godot",
"custom_modules=\"${workspaceFolder}/spine_godot\"",
"livepp=${env:LIVEPP}"
]
},
@ -40,14 +40,14 @@
"-j",
"16",
"target=debug",
"custom_modules=\"${workspaceFolder}/spine_godot"
"custom_modules=\"${workspaceFolder}/spine_godot\""
],
"windows": {
"args": [
"-j",
"16",
"target=debug",
"custom_modules=\"${workspaceFolder}/spine_godot",
"custom_modules=\"${workspaceFolder}/spine_godot\"",
"livepp=${env:LIVEPP}"
]
},