Integrated combineFrames from boolean to int

This commit is contained in:
Collin Smith
2021-12-14 12:46:44 -08:00
parent 83516f5d6a
commit d0ccd1aa11
4 changed files with 7 additions and 7 deletions

View File

@ -70,12 +70,12 @@ public class Dc6LoaderTest {
@ParameterizedTest
@CsvSource(value = {
"data\\global\\monsters\\ty\\ra\\tyralitnuhth.dc6,0,false",
"data\\global\\ui\\panel\\invchar6.dc6,0,true",
"data\\global\\monsters\\ty\\ra\\tyralitnuhth.dc6,0,0",
"data\\global\\ui\\panel\\invchar6.dc6,0,1",
}, delimiter = ',')
void load(String dccName, String szDirection, String szCombineFrames) throws Throwable {
int direction = NumberUtils.toInt(szDirection);
boolean combineFrames = Boolean.parseBoolean(szCombineFrames);
int combineFrames = NumberUtils.toInt(szCombineFrames);
AssetDesc<Dc6> asset = AssetDesc.of(dccName, Dc6.class, DcParams.of(direction, combineFrames));
EventExecutor executor = ImmediateEventExecutor.INSTANCE;
final Promise<Throwable> promise = executor.newPromise();
@ -134,7 +134,7 @@ public class Dc6LoaderTest {
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.setBlendMode(NONE);
batch.begin(palette.texture());
if (combineFrames) {
if (combineFrames > 0) {
batch.draw(dc6.page(0), 0, 0);
batch.end();
return;

View File

@ -86,7 +86,7 @@ public class DccLoaderTest {
"data\\global\\chars\\ba\\tr\\batrlittnhth.dcc",
})
void fail(String dccName) throws Throwable {
AssetDesc<Dcc> asset = AssetDesc.of(dccName, Dcc.class, DcParams.of(0, true));
AssetDesc<Dcc> asset = AssetDesc.of(dccName, Dcc.class, DcParams.of(0, 1));
EventExecutor executor = ImmediateEventExecutor.INSTANCE;
final Promise<Throwable> promise = executor.newPromise();
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration() {{

View File

@ -83,7 +83,7 @@ public class Dc6DecoderTest {
void create0() {
decoder.decode(dc6, 0);
dc6.uploadTextures(0, false);
dc6.uploadTextures(0, 0);
String paletteName = "data\\global\\palette\\ACT1\\pal.dat";
AssetDesc<Palette> paletteDesc = AssetDesc.of(paletteName, Palette.class, MpqParams.of());

View File

@ -191,7 +191,7 @@ public class DccDecoderTest {
void create0() {
decoder.decode(dcc, 0);
dcc.uploadTextures(0, false);
dcc.uploadTextures(0, 0);
String paletteName = "data\\global\\palette\\ACT1\\pal.dat";
AssetDesc<Palette> paletteDesc = AssetDesc.of(paletteName, Palette.class, MpqParams.of());