repo_name
stringclasses 5
values | pr_number
int64 1.52k
15.5k
| pr_title
stringlengths 8
143
| pr_description
stringlengths 0
10.2k
| author
stringlengths 3
18
| date_created
timestamp[ns, tz=UTC] | date_merged
timestamp[ns, tz=UTC] | previous_commit
stringlengths 40
40
| pr_commit
stringlengths 40
40
| query
stringlengths 11
10.2k
| filepath
stringlengths 6
220
| before_content
stringlengths 0
597M
| after_content
stringlengths 0
597M
| label
int64 -1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./tests/gdx-tests/src/com/badlogic/gdx/tests/TiledMapDirectLoaderTest.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tests;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TiledMapRenderer;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer;
import com.badlogic.gdx.tests.utils.GdxTest;
import com.badlogic.gdx.tests.utils.OrthoCamController;
import com.badlogic.gdx.utils.ScreenUtils;
public class TiledMapDirectLoaderTest extends GdxTest {
private TiledMap map;
private TiledMapRenderer renderer;
private OrthographicCamera camera;
private OrthoCamController cameraController;
private BitmapFont font;
private SpriteBatch batch;
@Override
public void create () {
float w = Gdx.graphics.getWidth();
float h = Gdx.graphics.getHeight();
camera = new OrthographicCamera();
camera.setToOrtho(false, (w / h) * 10, 10);
camera.update();
cameraController = new OrthoCamController(camera);
Gdx.input.setInputProcessor(cameraController);
font = new BitmapFont();
batch = new SpriteBatch();
map = new TmxMapLoader().load("data/maps/tiled/super-koalio/level1.tmx");
renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f);
}
@Override
public void render () {
ScreenUtils.clear(0.55f, 0.55f, 0.55f, 1f);
camera.update();
renderer.setView(camera);
renderer.render();
batch.begin();
font.draw(batch, "FPS: " + Gdx.graphics.getFramesPerSecond(), 10, 20);
batch.end();
}
@Override
public void dispose () {
map.dispose();
}
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tests;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TiledMapRenderer;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer;
import com.badlogic.gdx.tests.utils.GdxTest;
import com.badlogic.gdx.tests.utils.OrthoCamController;
import com.badlogic.gdx.utils.ScreenUtils;
public class TiledMapDirectLoaderTest extends GdxTest {
private TiledMap map;
private TiledMapRenderer renderer;
private OrthographicCamera camera;
private OrthoCamController cameraController;
private BitmapFont font;
private SpriteBatch batch;
@Override
public void create () {
float w = Gdx.graphics.getWidth();
float h = Gdx.graphics.getHeight();
camera = new OrthographicCamera();
camera.setToOrtho(false, (w / h) * 10, 10);
camera.update();
cameraController = new OrthoCamController(camera);
Gdx.input.setInputProcessor(cameraController);
font = new BitmapFont();
batch = new SpriteBatch();
map = new TmxMapLoader().load("data/maps/tiled/super-koalio/level1.tmx");
renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f);
}
@Override
public void render () {
ScreenUtils.clear(0.55f, 0.55f, 0.55f, 1f);
camera.update();
renderer.setView(camera);
renderer.render();
batch.begin();
font.draw(batch, "FPS: " + Gdx.graphics.getFramesPerSecond(), 10, 20);
batch.end();
}
@Override
public void dispose () {
map.dispose();
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/linearmath/com/badlogic/gdx/physics/bullet/linearmath/btSerializer.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
public class btSerializer extends BulletBase {
private long swigCPtr;
protected btSerializer (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btSerializer, normally you should not need this constructor it's intended for low-level usage. */
public btSerializer (long cPtr, boolean cMemoryOwn) {
this("btSerializer", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btSerializer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btSerializer(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public java.nio.ByteBuffer getBufferPointer () {
return LinearMathJNI.btSerializer_getBufferPointer(swigCPtr, this);
}
public int getCurrentBufferSize () {
return LinearMathJNI.btSerializer_getCurrentBufferSize(swigCPtr, this);
}
public btChunk allocate (long size, int numElements) {
long cPtr = LinearMathJNI.btSerializer_allocate(swigCPtr, this, size, numElements);
return (cPtr == 0) ? null : new btChunk(cPtr, false);
}
public void finalizeChunk (btChunk chunk, String structType, int chunkCode, long oldPtr) {
LinearMathJNI.btSerializer_finalizeChunk(swigCPtr, this, btChunk.getCPtr(chunk), chunk, structType, chunkCode, oldPtr);
}
public long findPointer (long oldPtr) {
return LinearMathJNI.btSerializer_findPointer(swigCPtr, this, oldPtr);
}
public long getUniquePointer (long oldPtr) {
return LinearMathJNI.btSerializer_getUniquePointer(swigCPtr, this, oldPtr);
}
public void startSerialization () {
LinearMathJNI.btSerializer_startSerialization(swigCPtr, this);
}
public void finishSerialization () {
LinearMathJNI.btSerializer_finishSerialization(swigCPtr, this);
}
public String findNameForPointer (long ptr) {
return LinearMathJNI.btSerializer_findNameForPointer(swigCPtr, this, ptr);
}
public void registerNameForPointer (long ptr, String name) {
LinearMathJNI.btSerializer_registerNameForPointer(swigCPtr, this, ptr, name);
}
public void serializeName (String ptr) {
LinearMathJNI.btSerializer_serializeName(swigCPtr, this, ptr);
}
public int getSerializationFlags () {
return LinearMathJNI.btSerializer_getSerializationFlags(swigCPtr, this);
}
public void setSerializationFlags (int flags) {
LinearMathJNI.btSerializer_setSerializationFlags(swigCPtr, this, flags);
}
public int getNumChunks () {
return LinearMathJNI.btSerializer_getNumChunks(swigCPtr, this);
}
public btChunk getChunk (int chunkIndex) {
long cPtr = LinearMathJNI.btSerializer_getChunk(swigCPtr, this, chunkIndex);
return (cPtr == 0) ? null : new btChunk(cPtr, false);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
public class btSerializer extends BulletBase {
private long swigCPtr;
protected btSerializer (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btSerializer, normally you should not need this constructor it's intended for low-level usage. */
public btSerializer (long cPtr, boolean cMemoryOwn) {
this("btSerializer", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btSerializer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btSerializer(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public java.nio.ByteBuffer getBufferPointer () {
return LinearMathJNI.btSerializer_getBufferPointer(swigCPtr, this);
}
public int getCurrentBufferSize () {
return LinearMathJNI.btSerializer_getCurrentBufferSize(swigCPtr, this);
}
public btChunk allocate (long size, int numElements) {
long cPtr = LinearMathJNI.btSerializer_allocate(swigCPtr, this, size, numElements);
return (cPtr == 0) ? null : new btChunk(cPtr, false);
}
public void finalizeChunk (btChunk chunk, String structType, int chunkCode, long oldPtr) {
LinearMathJNI.btSerializer_finalizeChunk(swigCPtr, this, btChunk.getCPtr(chunk), chunk, structType, chunkCode, oldPtr);
}
public long findPointer (long oldPtr) {
return LinearMathJNI.btSerializer_findPointer(swigCPtr, this, oldPtr);
}
public long getUniquePointer (long oldPtr) {
return LinearMathJNI.btSerializer_getUniquePointer(swigCPtr, this, oldPtr);
}
public void startSerialization () {
LinearMathJNI.btSerializer_startSerialization(swigCPtr, this);
}
public void finishSerialization () {
LinearMathJNI.btSerializer_finishSerialization(swigCPtr, this);
}
public String findNameForPointer (long ptr) {
return LinearMathJNI.btSerializer_findNameForPointer(swigCPtr, this, ptr);
}
public void registerNameForPointer (long ptr, String name) {
LinearMathJNI.btSerializer_registerNameForPointer(swigCPtr, this, ptr, name);
}
public void serializeName (String ptr) {
LinearMathJNI.btSerializer_serializeName(swigCPtr, this, ptr);
}
public int getSerializationFlags () {
return LinearMathJNI.btSerializer_getSerializationFlags(swigCPtr, this);
}
public void setSerializationFlags (int flags) {
LinearMathJNI.btSerializer_setSerializationFlags(swigCPtr, this, flags);
}
public int getNumChunks () {
return LinearMathJNI.btSerializer_getNumChunks(swigCPtr, this);
}
public btChunk getChunk (int chunkIndex) {
long cPtr = LinearMathJNI.btSerializer_getChunk(swigCPtr, this, chunkIndex);
return (cPtr == 0) ? null : new btChunk(cPtr, false);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/LocalShapeInfo.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class LocalShapeInfo extends BulletBase {
private long swigCPtr;
protected LocalShapeInfo (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new LocalShapeInfo, normally you should not need this constructor it's intended for low-level usage. */
public LocalShapeInfo (long cPtr, boolean cMemoryOwn) {
this("LocalShapeInfo", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (LocalShapeInfo obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_LocalShapeInfo(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setShapePart (int value) {
CollisionJNI.LocalShapeInfo_shapePart_set(swigCPtr, this, value);
}
public int getShapePart () {
return CollisionJNI.LocalShapeInfo_shapePart_get(swigCPtr, this);
}
public void setTriangleIndex (int value) {
CollisionJNI.LocalShapeInfo_triangleIndex_set(swigCPtr, this, value);
}
public int getTriangleIndex () {
return CollisionJNI.LocalShapeInfo_triangleIndex_get(swigCPtr, this);
}
public LocalShapeInfo () {
this(CollisionJNI.new_LocalShapeInfo(), true);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class LocalShapeInfo extends BulletBase {
private long swigCPtr;
protected LocalShapeInfo (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new LocalShapeInfo, normally you should not need this constructor it's intended for low-level usage. */
public LocalShapeInfo (long cPtr, boolean cMemoryOwn) {
this("LocalShapeInfo", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (LocalShapeInfo obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_LocalShapeInfo(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setShapePart (int value) {
CollisionJNI.LocalShapeInfo_shapePart_set(swigCPtr, this, value);
}
public int getShapePart () {
return CollisionJNI.LocalShapeInfo_shapePart_get(swigCPtr, this);
}
public void setTriangleIndex (int value) {
CollisionJNI.LocalShapeInfo_triangleIndex_set(swigCPtr, this, value);
}
public int getTriangleIndex () {
return CollisionJNI.LocalShapeInfo_triangleIndex_get(swigCPtr, this);
}
public LocalShapeInfo () {
this(CollisionJNI.new_LocalShapeInfo(), true);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/softbody/com/badlogic/gdx/physics/bullet/softbody/btSoftClusterCollisionShape.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.softbody;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.physics.bullet.dynamics.*;
public class btSoftClusterCollisionShape extends btConvexInternalShape {
private long swigCPtr;
protected btSoftClusterCollisionShape (final String className, long cPtr, boolean cMemoryOwn) {
super(className, SoftbodyJNI.btSoftClusterCollisionShape_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btSoftClusterCollisionShape, normally you should not need this constructor it's intended for low-level
* usage. */
public btSoftClusterCollisionShape (long cPtr, boolean cMemoryOwn) {
this("btSoftClusterCollisionShape", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(SoftbodyJNI.btSoftClusterCollisionShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
}
public static long getCPtr (btSoftClusterCollisionShape obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
SoftbodyJNI.delete_btSoftClusterCollisionShape(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setCluster (btSoftBody.Cluster value) {
SoftbodyJNI.btSoftClusterCollisionShape_cluster_set(swigCPtr, this, btSoftBody.Cluster.getCPtr(value), value);
}
public btSoftBody.Cluster getCluster () {
long cPtr = SoftbodyJNI.btSoftClusterCollisionShape_cluster_get(swigCPtr, this);
return (cPtr == 0) ? null : new btSoftBody.Cluster(cPtr, false);
}
public btSoftClusterCollisionShape (btSoftBody.Cluster cluster) {
this(SoftbodyJNI.new_btSoftClusterCollisionShape(btSoftBody.Cluster.getCPtr(cluster), cluster), true);
}
public int getShapeType () {
return SoftbodyJNI.btSoftClusterCollisionShape_getShapeType(swigCPtr, this);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.softbody;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.physics.bullet.dynamics.*;
public class btSoftClusterCollisionShape extends btConvexInternalShape {
private long swigCPtr;
protected btSoftClusterCollisionShape (final String className, long cPtr, boolean cMemoryOwn) {
super(className, SoftbodyJNI.btSoftClusterCollisionShape_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btSoftClusterCollisionShape, normally you should not need this constructor it's intended for low-level
* usage. */
public btSoftClusterCollisionShape (long cPtr, boolean cMemoryOwn) {
this("btSoftClusterCollisionShape", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(SoftbodyJNI.btSoftClusterCollisionShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
}
public static long getCPtr (btSoftClusterCollisionShape obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
SoftbodyJNI.delete_btSoftClusterCollisionShape(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setCluster (btSoftBody.Cluster value) {
SoftbodyJNI.btSoftClusterCollisionShape_cluster_set(swigCPtr, this, btSoftBody.Cluster.getCPtr(value), value);
}
public btSoftBody.Cluster getCluster () {
long cPtr = SoftbodyJNI.btSoftClusterCollisionShape_cluster_get(swigCPtr, this);
return (cPtr == 0) ? null : new btSoftBody.Cluster(cPtr, false);
}
public btSoftClusterCollisionShape (btSoftBody.Cluster cluster) {
this(SoftbodyJNI.new_btSoftClusterCollisionShape(btSoftBody.Cluster.getCPtr(cluster), cluster), true);
}
public int getShapeType () {
return SoftbodyJNI.btSoftClusterCollisionShape_getShapeType(swigCPtr, this);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./tests/gdx-tests/src/com/badlogic/gdx/tests/bullet/OcclusionCuller.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tests.bullet;
import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.math.Frustum;
import com.badlogic.gdx.math.Plane;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.utils.BufferUtils;
import com.badlogic.gdx.utils.Disposable;
import java.nio.Buffer;
import java.nio.FloatBuffer;
/** Performs the occlusion culling or k-DOP culling using the dynamic bounding volume tree from the Bullet broadphase.
* <p>
* Occlusion culling is a process that determines which objects are visible or hidden from the viewpoint of a camera. This is
* achieved by rendering the bounding boxes of collision objects to a depth buffer using a software rasterizer. When determining
* if an object is visible to the camera, this depth buffer is queried and compared against the depth of the object in question.
* <p>
* k-DOP culling determines which objects are inside a camera frustum. The process is accelerated by the dynamic bounding volume
* tree.
*
* @author jsjolund */
public abstract class OcclusionCuller implements Disposable {
protected class Collider extends ICollide {
/** Callback method for {@link btDbvt#collideKDOP}. The bounding volume tree node in the parameter is inside the camera
* frustum, as are any collision objects it contains.
*
* @param node A bounding volume tree node, the children of which are all inside the camera frustum. */
@Override
public boolean AllLeaves (btDbvtNode node) {
if (node.isleaf()) {
onObjectVisible(node.getDataAsProxyClientObject());
} else {
long nodePointer = node.getCPointer();
btDbvtNode child;
if ((child = btDbvtNode.internalTemp(nodePointer, false).getChild(0)).getCPointer() != 0) AllLeaves(child);
if ((child = btDbvtNode.internalTemp(nodePointer, false).getChild(1)).getCPointer() != 0) AllLeaves(child);
}
return true;
}
/** Callback for {@link btDbvt#collideOCL}. This method must check if the input node from the broadphase bounding volume
* tree is completely occluded by an occluder node previously rendered by {@link #Process(btDbvtNode, float)}.
* <p>
* The node may or may not be a leaf node, i.e. may or may not contain a single collision object. If the node is not a leaf
* (i.e. an internal node), and the node is occluded, the child nodes it contains will not be processed or checked for
* occlusion, since they are contained in this parent node bounding volume and must therefore also be occluded.
*
* @param node A node from the broadphase bounding volume tree.
* @return False if the node is completely occluded, true otherwise. */
@Override
public boolean Descent (btDbvtNode node) {
return oclBuffer.queryAABB(tmpV1.set(node.getVolume().Center()), tmpV2.set(node.getVolume().Extents()));
}
/** Callback for {@link btDbvt#collideOCL}, which will trigger a call to this method if a leaf node is not occluded. If the
* node contains an object which can occlude others, it will be added to the depth buffer so that it may be considered in
* future occlusion checks.
* <p>
* Only box shaped occluder objects are supported.
*
* @param leaf A leaf node which contains a collision object.
* @param depth The depth of the node along the sorting axis. Objects closer to the camera will have a value closer to
* zero. */
@Override
public void Process (btDbvtNode leaf, float depth) {
btCollisionObject object = leaf.getDataAsProxyClientObject();
onObjectVisible(object);
btCollisionShape shape = object.getCollisionShape();
if (shape instanceof btBoxShape && isOccluder(object)) {
oclBuffer.drawBB(object.getWorldTransform(), ((btBoxShape)shape).getHalfExtentsWithMargin());
}
}
}
private static final int NUM_PLANES = 5;
private final FloatBuffer frustumNormals = BufferUtils.newFloatBuffer(NUM_PLANES * 4);
private final FloatBuffer frustumOffsets = BufferUtils.newFloatBuffer(NUM_PLANES);
final Vector3 tmpV1 = new Vector3();
final Vector3 tmpV2 = new Vector3();
OcclusionBuffer oclBuffer;
private final Collider collider = new Collider();
@Override
public void dispose () {
collider.dispose();
oclBuffer = null;
}
/** True if this collision object can block vision of other collision objects. If true, its collision shape will be drawn to
* the depth buffer and considered in future occlusion checks. Only btBoxShape collision shapes can be occluders, other types
* of shapes will be ignored. However, box occluders can block vision of any type of collision shape.
*
* @param object Object to check
* @return True if the collision object can occlude other objects */
public abstract boolean isOccluder (btCollisionObject object);
/** When performing occlusion culling, this method is a callback for when a collision object is found to be visible from the
* point of view of the camera.
* <p>
* When performing k-DOP culling, this method is a callback for when a collision object is found to be inside the camera
* frustum (regardless of occlusion).
*
* @param object A collision object which is visible to the camera */
public abstract void onObjectVisible (btCollisionObject object);
/** Performs k-DOP (k-Discrete Oriented Polytope) culling using the Bullet method {@link btDbvt#collideKDOP}. Finds all
* collision objects inside the camera frustum, each of which will trigger a callback to
* {@link #onObjectVisible(btCollisionObject)}. The process of finding objects in frustum is accelerated by the broadphase
* dynamic bounding volume tree ({@link btDbvt}).
*
* @param broadphase The dynamics world broadphase
* @param camera Camera for which to perform k-DOP culling */
public void performKDOPCulling (btDbvtBroadphase broadphase, Camera camera) {
setFrustumPlanes(camera.frustum);
btDbvt.collideKDOP(broadphase.getSet1().getRoot(), frustumNormals, frustumOffsets, NUM_PLANES, collider);
btDbvt.collideKDOP(broadphase.getSet0().getRoot(), frustumNormals, frustumOffsets, NUM_PLANES, collider);
}
/** Performs occlusion culling using the Bullet method {@link btDbvt#collideOCL}. Finds all collision objects which are visible
* to the camera, where vision is not blocked (occluded) by another object. If a collision object from the broadphase is
* visible to the camera, a callback is made to {@link #onObjectVisible(btCollisionObject)}. Only collision objects for which
* {@link #isOccluder(btCollisionObject)} returns true can occlude others. These collision objects must have a
* {@link btBoxShape} collision shape. However, box occluders can block vision of any type of shape.
*
* @param broadphase The dynamics world broadphase
* @param oclBuffer The occlusion buffer in which to query and draw depth during culling
* @param camera Camera for which to perform occlusion culling */
public void performOcclusionCulling (btDbvtBroadphase broadphase, OcclusionBuffer oclBuffer, Camera camera) {
this.oclBuffer = oclBuffer;
oclBuffer.setProjectionMatrix(camera.combined);
setFrustumPlanes(camera.frustum);
btDbvt.collideOCL(broadphase.getSet1().getRoot(), frustumNormals, frustumOffsets, camera.direction, NUM_PLANES, collider);
btDbvt.collideOCL(broadphase.getSet0().getRoot(), frustumNormals, frustumOffsets, camera.direction, NUM_PLANES, collider);
}
/** @param frustum Set the frustum plane buffers to this frustum */
private void setFrustumPlanes (Frustum frustum) {
// All frustum planes except 'near' (index 0) should be sent to Bullet.
((Buffer)frustumNormals).clear();
((Buffer)frustumOffsets).clear();
for (int i = 1; i < 6; i++) {
Plane plane = frustum.planes[i];
// Since the plane normals map to an array of btVector3, all four vector components (x, y, z, w)
// required by the C++ struct must be provided. The plane offset from origin (d) must also be set.
frustumNormals.put(plane.normal.x);
frustumNormals.put(plane.normal.y);
frustumNormals.put(plane.normal.z);
frustumNormals.put(0);
frustumOffsets.put(plane.d);
}
}
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tests.bullet;
import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.math.Frustum;
import com.badlogic.gdx.math.Plane;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.utils.BufferUtils;
import com.badlogic.gdx.utils.Disposable;
import java.nio.Buffer;
import java.nio.FloatBuffer;
/** Performs the occlusion culling or k-DOP culling using the dynamic bounding volume tree from the Bullet broadphase.
* <p>
* Occlusion culling is a process that determines which objects are visible or hidden from the viewpoint of a camera. This is
* achieved by rendering the bounding boxes of collision objects to a depth buffer using a software rasterizer. When determining
* if an object is visible to the camera, this depth buffer is queried and compared against the depth of the object in question.
* <p>
* k-DOP culling determines which objects are inside a camera frustum. The process is accelerated by the dynamic bounding volume
* tree.
*
* @author jsjolund */
public abstract class OcclusionCuller implements Disposable {
protected class Collider extends ICollide {
/** Callback method for {@link btDbvt#collideKDOP}. The bounding volume tree node in the parameter is inside the camera
* frustum, as are any collision objects it contains.
*
* @param node A bounding volume tree node, the children of which are all inside the camera frustum. */
@Override
public boolean AllLeaves (btDbvtNode node) {
if (node.isleaf()) {
onObjectVisible(node.getDataAsProxyClientObject());
} else {
long nodePointer = node.getCPointer();
btDbvtNode child;
if ((child = btDbvtNode.internalTemp(nodePointer, false).getChild(0)).getCPointer() != 0) AllLeaves(child);
if ((child = btDbvtNode.internalTemp(nodePointer, false).getChild(1)).getCPointer() != 0) AllLeaves(child);
}
return true;
}
/** Callback for {@link btDbvt#collideOCL}. This method must check if the input node from the broadphase bounding volume
* tree is completely occluded by an occluder node previously rendered by {@link #Process(btDbvtNode, float)}.
* <p>
* The node may or may not be a leaf node, i.e. may or may not contain a single collision object. If the node is not a leaf
* (i.e. an internal node), and the node is occluded, the child nodes it contains will not be processed or checked for
* occlusion, since they are contained in this parent node bounding volume and must therefore also be occluded.
*
* @param node A node from the broadphase bounding volume tree.
* @return False if the node is completely occluded, true otherwise. */
@Override
public boolean Descent (btDbvtNode node) {
return oclBuffer.queryAABB(tmpV1.set(node.getVolume().Center()), tmpV2.set(node.getVolume().Extents()));
}
/** Callback for {@link btDbvt#collideOCL}, which will trigger a call to this method if a leaf node is not occluded. If the
* node contains an object which can occlude others, it will be added to the depth buffer so that it may be considered in
* future occlusion checks.
* <p>
* Only box shaped occluder objects are supported.
*
* @param leaf A leaf node which contains a collision object.
* @param depth The depth of the node along the sorting axis. Objects closer to the camera will have a value closer to
* zero. */
@Override
public void Process (btDbvtNode leaf, float depth) {
btCollisionObject object = leaf.getDataAsProxyClientObject();
onObjectVisible(object);
btCollisionShape shape = object.getCollisionShape();
if (shape instanceof btBoxShape && isOccluder(object)) {
oclBuffer.drawBB(object.getWorldTransform(), ((btBoxShape)shape).getHalfExtentsWithMargin());
}
}
}
private static final int NUM_PLANES = 5;
private final FloatBuffer frustumNormals = BufferUtils.newFloatBuffer(NUM_PLANES * 4);
private final FloatBuffer frustumOffsets = BufferUtils.newFloatBuffer(NUM_PLANES);
final Vector3 tmpV1 = new Vector3();
final Vector3 tmpV2 = new Vector3();
OcclusionBuffer oclBuffer;
private final Collider collider = new Collider();
@Override
public void dispose () {
collider.dispose();
oclBuffer = null;
}
/** True if this collision object can block vision of other collision objects. If true, its collision shape will be drawn to
* the depth buffer and considered in future occlusion checks. Only btBoxShape collision shapes can be occluders, other types
* of shapes will be ignored. However, box occluders can block vision of any type of collision shape.
*
* @param object Object to check
* @return True if the collision object can occlude other objects */
public abstract boolean isOccluder (btCollisionObject object);
/** When performing occlusion culling, this method is a callback for when a collision object is found to be visible from the
* point of view of the camera.
* <p>
* When performing k-DOP culling, this method is a callback for when a collision object is found to be inside the camera
* frustum (regardless of occlusion).
*
* @param object A collision object which is visible to the camera */
public abstract void onObjectVisible (btCollisionObject object);
/** Performs k-DOP (k-Discrete Oriented Polytope) culling using the Bullet method {@link btDbvt#collideKDOP}. Finds all
* collision objects inside the camera frustum, each of which will trigger a callback to
* {@link #onObjectVisible(btCollisionObject)}. The process of finding objects in frustum is accelerated by the broadphase
* dynamic bounding volume tree ({@link btDbvt}).
*
* @param broadphase The dynamics world broadphase
* @param camera Camera for which to perform k-DOP culling */
public void performKDOPCulling (btDbvtBroadphase broadphase, Camera camera) {
setFrustumPlanes(camera.frustum);
btDbvt.collideKDOP(broadphase.getSet1().getRoot(), frustumNormals, frustumOffsets, NUM_PLANES, collider);
btDbvt.collideKDOP(broadphase.getSet0().getRoot(), frustumNormals, frustumOffsets, NUM_PLANES, collider);
}
/** Performs occlusion culling using the Bullet method {@link btDbvt#collideOCL}. Finds all collision objects which are visible
* to the camera, where vision is not blocked (occluded) by another object. If a collision object from the broadphase is
* visible to the camera, a callback is made to {@link #onObjectVisible(btCollisionObject)}. Only collision objects for which
* {@link #isOccluder(btCollisionObject)} returns true can occlude others. These collision objects must have a
* {@link btBoxShape} collision shape. However, box occluders can block vision of any type of shape.
*
* @param broadphase The dynamics world broadphase
* @param oclBuffer The occlusion buffer in which to query and draw depth during culling
* @param camera Camera for which to perform occlusion culling */
public void performOcclusionCulling (btDbvtBroadphase broadphase, OcclusionBuffer oclBuffer, Camera camera) {
this.oclBuffer = oclBuffer;
oclBuffer.setProjectionMatrix(camera.combined);
setFrustumPlanes(camera.frustum);
btDbvt.collideOCL(broadphase.getSet1().getRoot(), frustumNormals, frustumOffsets, camera.direction, NUM_PLANES, collider);
btDbvt.collideOCL(broadphase.getSet0().getRoot(), frustumNormals, frustumOffsets, camera.direction, NUM_PLANES, collider);
}
/** @param frustum Set the frustum plane buffers to this frustum */
private void setFrustumPlanes (Frustum frustum) {
// All frustum planes except 'near' (index 0) should be sent to Bullet.
((Buffer)frustumNormals).clear();
((Buffer)frustumOffsets).clear();
for (int i = 1; i < 6; i++) {
Plane plane = frustum.planes[i];
// Since the plane normals map to an array of btVector3, all four vector components (x, y, z, w)
// required by the C++ struct must be provided. The plane offset from origin (d) must also be set.
frustumNormals.put(plane.normal.x);
frustumNormals.put(plane.normal.y);
frustumNormals.put(plane.normal.z);
frustumNormals.put(0);
frustumOffsets.put(plane.d);
}
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/linearmath/com/badlogic/gdx/physics/bullet/linearmath/btAngleCompareFunc.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.math.Vector3;
public class btAngleCompareFunc extends BulletBase {
private long swigCPtr;
protected btAngleCompareFunc (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btAngleCompareFunc, normally you should not need this constructor it's intended for low-level usage. */
public btAngleCompareFunc (long cPtr, boolean cMemoryOwn) {
this("btAngleCompareFunc", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btAngleCompareFunc obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btAngleCompareFunc(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setAnchor (btVector3 value) {
LinearMathJNI.btAngleCompareFunc_anchor_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getAnchor () {
long cPtr = LinearMathJNI.btAngleCompareFunc_anchor_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public btAngleCompareFunc (Vector3 anchor) {
this(LinearMathJNI.new_btAngleCompareFunc(anchor), true);
}
public boolean operatorFunctionCall (GrahamVector3 a, GrahamVector3 b) {
return LinearMathJNI.btAngleCompareFunc_operatorFunctionCall(swigCPtr, this, GrahamVector3.getCPtr(a), a,
GrahamVector3.getCPtr(b), b);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.math.Vector3;
public class btAngleCompareFunc extends BulletBase {
private long swigCPtr;
protected btAngleCompareFunc (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btAngleCompareFunc, normally you should not need this constructor it's intended for low-level usage. */
public btAngleCompareFunc (long cPtr, boolean cMemoryOwn) {
this("btAngleCompareFunc", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btAngleCompareFunc obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btAngleCompareFunc(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setAnchor (btVector3 value) {
LinearMathJNI.btAngleCompareFunc_anchor_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getAnchor () {
long cPtr = LinearMathJNI.btAngleCompareFunc_anchor_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public btAngleCompareFunc (Vector3 anchor) {
this(LinearMathJNI.new_btAngleCompareFunc(anchor), true);
}
public boolean operatorFunctionCall (GrahamVector3 a, GrahamVector3 b) {
return LinearMathJNI.btAngleCompareFunc_operatorFunctionCall(swigCPtr, this, GrahamVector3.getCPtr(a), a,
GrahamVector3.getCPtr(b), b);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./gdx/src/com/badlogic/gdx/assets/loaders/resolvers/InternalFileHandleResolver.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.assets.loaders.resolvers;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.files.FileHandle;
public class InternalFileHandleResolver implements FileHandleResolver {
@Override
public FileHandle resolve (String fileName) {
return Gdx.files.internal(fileName);
}
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.assets.loaders.resolvers;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.files.FileHandle;
public class InternalFileHandleResolver implements FileHandleResolver {
@Override
public FileHandle resolve (String fileName) {
return Gdx.files.internal(fileName);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/_btMprSupport_t.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class _btMprSupport_t extends BulletBase {
private long swigCPtr;
protected _btMprSupport_t (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new _btMprSupport_t, normally you should not need this constructor it's intended for low-level usage. */
public _btMprSupport_t (long cPtr, boolean cMemoryOwn) {
this("_btMprSupport_t", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (_btMprSupport_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete__btMprSupport_t(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setV (btVector3 value) {
CollisionJNI._btMprSupport_t_v_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getV () {
long cPtr = CollisionJNI._btMprSupport_t_v_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setV1 (btVector3 value) {
CollisionJNI._btMprSupport_t_v1_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getV1 () {
long cPtr = CollisionJNI._btMprSupport_t_v1_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setV2 (btVector3 value) {
CollisionJNI._btMprSupport_t_v2_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getV2 () {
long cPtr = CollisionJNI._btMprSupport_t_v2_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public _btMprSupport_t () {
this(CollisionJNI.new__btMprSupport_t(), true);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class _btMprSupport_t extends BulletBase {
private long swigCPtr;
protected _btMprSupport_t (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new _btMprSupport_t, normally you should not need this constructor it's intended for low-level usage. */
public _btMprSupport_t (long cPtr, boolean cMemoryOwn) {
this("_btMprSupport_t", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (_btMprSupport_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete__btMprSupport_t(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setV (btVector3 value) {
CollisionJNI._btMprSupport_t_v_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getV () {
long cPtr = CollisionJNI._btMprSupport_t_v_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setV1 (btVector3 value) {
CollisionJNI._btMprSupport_t_v1_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getV1 () {
long cPtr = CollisionJNI._btMprSupport_t_v1_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setV2 (btVector3 value) {
CollisionJNI._btMprSupport_t_v2_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getV2 () {
long cPtr = CollisionJNI._btMprSupport_t_v2_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public _btMprSupport_t () {
this(CollisionJNI.new__btMprSupport_t(), true);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./gdx/src/com/badlogic/gdx/scenes/scene2d/actions/RepeatAction.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.scenes.scene2d.actions;
/** Repeats an action a number of times or forever.
* @author Nathan Sweet */
public class RepeatAction extends DelegateAction {
static public final int FOREVER = -1;
private int repeatCount, executedCount;
private boolean finished;
protected boolean delegate (float delta) {
if (executedCount == repeatCount) return true;
if (action.act(delta)) {
if (finished) return true;
if (repeatCount > 0) executedCount++;
if (executedCount == repeatCount) return true;
if (action != null) action.restart();
}
return false;
}
/** Causes the action to not repeat again. */
public void finish () {
finished = true;
}
public void restart () {
super.restart();
executedCount = 0;
finished = false;
}
/** Sets the number of times to repeat. Can be set to {@link #FOREVER}. */
public void setCount (int count) {
this.repeatCount = count;
}
public int getCount () {
return repeatCount;
}
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.scenes.scene2d.actions;
/** Repeats an action a number of times or forever.
* @author Nathan Sweet */
public class RepeatAction extends DelegateAction {
static public final int FOREVER = -1;
private int repeatCount, executedCount;
private boolean finished;
protected boolean delegate (float delta) {
if (executedCount == repeatCount) return true;
if (action.act(delta)) {
if (finished) return true;
if (repeatCount > 0) executedCount++;
if (executedCount == repeatCount) return true;
if (action != null) action.restart();
}
return false;
}
/** Causes the action to not repeat again. */
public void finish () {
finished = true;
}
public void restart () {
super.restart();
executedCount = 0;
finished = false;
}
/** Sets the number of times to repeat. Can be set to {@link #FOREVER}. */
public void setCount (int count) {
this.repeatCount = count;
}
public int getCount () {
return repeatCount;
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/dynamics/com/badlogic/gdx/physics/bullet/dynamics/btConeTwistFlags.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
public final class btConeTwistFlags {
public final static int BT_CONETWIST_FLAGS_LIN_CFM = 1;
public final static int BT_CONETWIST_FLAGS_LIN_ERP = 2;
public final static int BT_CONETWIST_FLAGS_ANG_CFM = 4;
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
public final class btConeTwistFlags {
public final static int BT_CONETWIST_FLAGS_LIN_CFM = 1;
public final static int BT_CONETWIST_FLAGS_LIN_ERP = 2;
public final static int BT_CONETWIST_FLAGS_ANG_CFM = 4;
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/DISTANCE_PLANE_3D_FUNC.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class DISTANCE_PLANE_3D_FUNC extends BulletBase {
private long swigCPtr;
protected DISTANCE_PLANE_3D_FUNC (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new DISTANCE_PLANE_3D_FUNC, normally you should not need this constructor it's intended for low-level usage. */
public DISTANCE_PLANE_3D_FUNC (long cPtr, boolean cMemoryOwn) {
this("DISTANCE_PLANE_3D_FUNC", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (DISTANCE_PLANE_3D_FUNC obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_DISTANCE_PLANE_3D_FUNC(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public DISTANCE_PLANE_3D_FUNC () {
this(CollisionJNI.new_DISTANCE_PLANE_3D_FUNC(), true);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class DISTANCE_PLANE_3D_FUNC extends BulletBase {
private long swigCPtr;
protected DISTANCE_PLANE_3D_FUNC (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new DISTANCE_PLANE_3D_FUNC, normally you should not need this constructor it's intended for low-level usage. */
public DISTANCE_PLANE_3D_FUNC (long cPtr, boolean cMemoryOwn) {
this("DISTANCE_PLANE_3D_FUNC", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (DISTANCE_PLANE_3D_FUNC obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_DISTANCE_PLANE_3D_FUNC(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public DISTANCE_PLANE_3D_FUNC () {
this(CollisionJNI.new_DISTANCE_PLANE_3D_FUNC(), true);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/dynamics/com/badlogic/gdx/physics/bullet/dynamics/btWheelInfo.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
public class btWheelInfo extends BulletBase {
private long swigCPtr;
protected btWheelInfo (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btWheelInfo, normally you should not need this constructor it's intended for low-level usage. */
public btWheelInfo (long cPtr, boolean cMemoryOwn) {
this("btWheelInfo", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btWheelInfo obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btWheelInfo(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
static public class RaycastInfo extends BulletBase {
private long swigCPtr;
protected RaycastInfo (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new RaycastInfo, normally you should not need this constructor it's intended for low-level usage. */
public RaycastInfo (long cPtr, boolean cMemoryOwn) {
this("RaycastInfo", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (RaycastInfo obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btWheelInfo_RaycastInfo(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setContactNormalWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_contactNormalWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getContactNormalWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_contactNormalWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setContactPointWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_contactPointWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getContactPointWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_contactPointWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setSuspensionLength (float value) {
DynamicsJNI.btWheelInfo_RaycastInfo_suspensionLength_set(swigCPtr, this, value);
}
public float getSuspensionLength () {
return DynamicsJNI.btWheelInfo_RaycastInfo_suspensionLength_get(swigCPtr, this);
}
public void setHardPointWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_hardPointWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getHardPointWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_hardPointWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelDirectionWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_wheelDirectionWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelDirectionWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_wheelDirectionWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelAxleWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_wheelAxleWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelAxleWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_wheelAxleWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setIsInContact (boolean value) {
DynamicsJNI.btWheelInfo_RaycastInfo_isInContact_set(swigCPtr, this, value);
}
public boolean getIsInContact () {
return DynamicsJNI.btWheelInfo_RaycastInfo_isInContact_get(swigCPtr, this);
}
public void setGroundObject (long value) {
DynamicsJNI.btWheelInfo_RaycastInfo_groundObject_set(swigCPtr, this, value);
}
public long getGroundObject () {
return DynamicsJNI.btWheelInfo_RaycastInfo_groundObject_get(swigCPtr, this);
}
public RaycastInfo () {
this(DynamicsJNI.new_btWheelInfo_RaycastInfo(), true);
}
}
public void setRaycastInfo (btWheelInfo.RaycastInfo value) {
DynamicsJNI.btWheelInfo_raycastInfo_set(swigCPtr, this, btWheelInfo.RaycastInfo.getCPtr(value), value);
}
public btWheelInfo.RaycastInfo getRaycastInfo () {
long cPtr = DynamicsJNI.btWheelInfo_raycastInfo_get(swigCPtr, this);
return (cPtr == 0) ? null : new btWheelInfo.RaycastInfo(cPtr, false);
}
public void setWorldTransform (btTransform value) {
DynamicsJNI.btWheelInfo_worldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
}
public btTransform getWorldTransform () {
long cPtr = DynamicsJNI.btWheelInfo_worldTransform_get(swigCPtr, this);
return (cPtr == 0) ? null : new btTransform(cPtr, false);
}
public void setChassisConnectionPointCS (btVector3 value) {
DynamicsJNI.btWheelInfo_chassisConnectionPointCS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getChassisConnectionPointCS () {
long cPtr = DynamicsJNI.btWheelInfo_chassisConnectionPointCS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelDirectionCS (btVector3 value) {
DynamicsJNI.btWheelInfo_wheelDirectionCS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelDirectionCS () {
long cPtr = DynamicsJNI.btWheelInfo_wheelDirectionCS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelAxleCS (btVector3 value) {
DynamicsJNI.btWheelInfo_wheelAxleCS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelAxleCS () {
long cPtr = DynamicsJNI.btWheelInfo_wheelAxleCS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setSuspensionRestLength1 (float value) {
DynamicsJNI.btWheelInfo_suspensionRestLength1_set(swigCPtr, this, value);
}
public float getSuspensionRestLength1 () {
return DynamicsJNI.btWheelInfo_suspensionRestLength1_get(swigCPtr, this);
}
public void setMaxSuspensionTravelCm (float value) {
DynamicsJNI.btWheelInfo_maxSuspensionTravelCm_set(swigCPtr, this, value);
}
public float getMaxSuspensionTravelCm () {
return DynamicsJNI.btWheelInfo_maxSuspensionTravelCm_get(swigCPtr, this);
}
public float getSuspensionRestLength () {
return DynamicsJNI.btWheelInfo_getSuspensionRestLength(swigCPtr, this);
}
public void setWheelsRadius (float value) {
DynamicsJNI.btWheelInfo_wheelsRadius_set(swigCPtr, this, value);
}
public float getWheelsRadius () {
return DynamicsJNI.btWheelInfo_wheelsRadius_get(swigCPtr, this);
}
public void setSuspensionStiffness (float value) {
DynamicsJNI.btWheelInfo_suspensionStiffness_set(swigCPtr, this, value);
}
public float getSuspensionStiffness () {
return DynamicsJNI.btWheelInfo_suspensionStiffness_get(swigCPtr, this);
}
public void setWheelsDampingCompression (float value) {
DynamicsJNI.btWheelInfo_wheelsDampingCompression_set(swigCPtr, this, value);
}
public float getWheelsDampingCompression () {
return DynamicsJNI.btWheelInfo_wheelsDampingCompression_get(swigCPtr, this);
}
public void setWheelsDampingRelaxation (float value) {
DynamicsJNI.btWheelInfo_wheelsDampingRelaxation_set(swigCPtr, this, value);
}
public float getWheelsDampingRelaxation () {
return DynamicsJNI.btWheelInfo_wheelsDampingRelaxation_get(swigCPtr, this);
}
public void setFrictionSlip (float value) {
DynamicsJNI.btWheelInfo_frictionSlip_set(swigCPtr, this, value);
}
public float getFrictionSlip () {
return DynamicsJNI.btWheelInfo_frictionSlip_get(swigCPtr, this);
}
public void setSteering (float value) {
DynamicsJNI.btWheelInfo_steering_set(swigCPtr, this, value);
}
public float getSteering () {
return DynamicsJNI.btWheelInfo_steering_get(swigCPtr, this);
}
public void setRotation (float value) {
DynamicsJNI.btWheelInfo_rotation_set(swigCPtr, this, value);
}
public float getRotation () {
return DynamicsJNI.btWheelInfo_rotation_get(swigCPtr, this);
}
public void setDeltaRotation (float value) {
DynamicsJNI.btWheelInfo_deltaRotation_set(swigCPtr, this, value);
}
public float getDeltaRotation () {
return DynamicsJNI.btWheelInfo_deltaRotation_get(swigCPtr, this);
}
public void setRollInfluence (float value) {
DynamicsJNI.btWheelInfo_rollInfluence_set(swigCPtr, this, value);
}
public float getRollInfluence () {
return DynamicsJNI.btWheelInfo_rollInfluence_get(swigCPtr, this);
}
public void setMaxSuspensionForce (float value) {
DynamicsJNI.btWheelInfo_maxSuspensionForce_set(swigCPtr, this, value);
}
public float getMaxSuspensionForce () {
return DynamicsJNI.btWheelInfo_maxSuspensionForce_get(swigCPtr, this);
}
public void setEngineForce (float value) {
DynamicsJNI.btWheelInfo_engineForce_set(swigCPtr, this, value);
}
public float getEngineForce () {
return DynamicsJNI.btWheelInfo_engineForce_get(swigCPtr, this);
}
public void setBrake (float value) {
DynamicsJNI.btWheelInfo_brake_set(swigCPtr, this, value);
}
public float getBrake () {
return DynamicsJNI.btWheelInfo_brake_get(swigCPtr, this);
}
public void setBIsFrontWheel (boolean value) {
DynamicsJNI.btWheelInfo_bIsFrontWheel_set(swigCPtr, this, value);
}
public boolean getBIsFrontWheel () {
return DynamicsJNI.btWheelInfo_bIsFrontWheel_get(swigCPtr, this);
}
public void setClientInfo (long value) {
DynamicsJNI.btWheelInfo_clientInfo_set(swigCPtr, this, value);
}
public long getClientInfo () {
return DynamicsJNI.btWheelInfo_clientInfo_get(swigCPtr, this);
}
public btWheelInfo () {
this(DynamicsJNI.new_btWheelInfo__SWIG_0(), true);
}
public btWheelInfo (btWheelInfoConstructionInfo ci) {
this(DynamicsJNI.new_btWheelInfo__SWIG_1(btWheelInfoConstructionInfo.getCPtr(ci), ci), true);
}
public void updateWheel (btRigidBody chassis, btWheelInfo.RaycastInfo raycastInfo) {
DynamicsJNI.btWheelInfo_updateWheel(swigCPtr, this, btRigidBody.getCPtr(chassis), chassis,
btWheelInfo.RaycastInfo.getCPtr(raycastInfo), raycastInfo);
}
public void setClippedInvContactDotSuspension (float value) {
DynamicsJNI.btWheelInfo_clippedInvContactDotSuspension_set(swigCPtr, this, value);
}
public float getClippedInvContactDotSuspension () {
return DynamicsJNI.btWheelInfo_clippedInvContactDotSuspension_get(swigCPtr, this);
}
public void setSuspensionRelativeVelocity (float value) {
DynamicsJNI.btWheelInfo_suspensionRelativeVelocity_set(swigCPtr, this, value);
}
public float getSuspensionRelativeVelocity () {
return DynamicsJNI.btWheelInfo_suspensionRelativeVelocity_get(swigCPtr, this);
}
public void setWheelsSuspensionForce (float value) {
DynamicsJNI.btWheelInfo_wheelsSuspensionForce_set(swigCPtr, this, value);
}
public float getWheelsSuspensionForce () {
return DynamicsJNI.btWheelInfo_wheelsSuspensionForce_get(swigCPtr, this);
}
public void setSkidInfo (float value) {
DynamicsJNI.btWheelInfo_skidInfo_set(swigCPtr, this, value);
}
public float getSkidInfo () {
return DynamicsJNI.btWheelInfo_skidInfo_get(swigCPtr, this);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
public class btWheelInfo extends BulletBase {
private long swigCPtr;
protected btWheelInfo (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btWheelInfo, normally you should not need this constructor it's intended for low-level usage. */
public btWheelInfo (long cPtr, boolean cMemoryOwn) {
this("btWheelInfo", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btWheelInfo obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btWheelInfo(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
static public class RaycastInfo extends BulletBase {
private long swigCPtr;
protected RaycastInfo (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new RaycastInfo, normally you should not need this constructor it's intended for low-level usage. */
public RaycastInfo (long cPtr, boolean cMemoryOwn) {
this("RaycastInfo", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (RaycastInfo obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btWheelInfo_RaycastInfo(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setContactNormalWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_contactNormalWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getContactNormalWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_contactNormalWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setContactPointWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_contactPointWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getContactPointWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_contactPointWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setSuspensionLength (float value) {
DynamicsJNI.btWheelInfo_RaycastInfo_suspensionLength_set(swigCPtr, this, value);
}
public float getSuspensionLength () {
return DynamicsJNI.btWheelInfo_RaycastInfo_suspensionLength_get(swigCPtr, this);
}
public void setHardPointWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_hardPointWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getHardPointWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_hardPointWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelDirectionWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_wheelDirectionWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelDirectionWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_wheelDirectionWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelAxleWS (btVector3 value) {
DynamicsJNI.btWheelInfo_RaycastInfo_wheelAxleWS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelAxleWS () {
long cPtr = DynamicsJNI.btWheelInfo_RaycastInfo_wheelAxleWS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setIsInContact (boolean value) {
DynamicsJNI.btWheelInfo_RaycastInfo_isInContact_set(swigCPtr, this, value);
}
public boolean getIsInContact () {
return DynamicsJNI.btWheelInfo_RaycastInfo_isInContact_get(swigCPtr, this);
}
public void setGroundObject (long value) {
DynamicsJNI.btWheelInfo_RaycastInfo_groundObject_set(swigCPtr, this, value);
}
public long getGroundObject () {
return DynamicsJNI.btWheelInfo_RaycastInfo_groundObject_get(swigCPtr, this);
}
public RaycastInfo () {
this(DynamicsJNI.new_btWheelInfo_RaycastInfo(), true);
}
}
public void setRaycastInfo (btWheelInfo.RaycastInfo value) {
DynamicsJNI.btWheelInfo_raycastInfo_set(swigCPtr, this, btWheelInfo.RaycastInfo.getCPtr(value), value);
}
public btWheelInfo.RaycastInfo getRaycastInfo () {
long cPtr = DynamicsJNI.btWheelInfo_raycastInfo_get(swigCPtr, this);
return (cPtr == 0) ? null : new btWheelInfo.RaycastInfo(cPtr, false);
}
public void setWorldTransform (btTransform value) {
DynamicsJNI.btWheelInfo_worldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
}
public btTransform getWorldTransform () {
long cPtr = DynamicsJNI.btWheelInfo_worldTransform_get(swigCPtr, this);
return (cPtr == 0) ? null : new btTransform(cPtr, false);
}
public void setChassisConnectionPointCS (btVector3 value) {
DynamicsJNI.btWheelInfo_chassisConnectionPointCS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getChassisConnectionPointCS () {
long cPtr = DynamicsJNI.btWheelInfo_chassisConnectionPointCS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelDirectionCS (btVector3 value) {
DynamicsJNI.btWheelInfo_wheelDirectionCS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelDirectionCS () {
long cPtr = DynamicsJNI.btWheelInfo_wheelDirectionCS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWheelAxleCS (btVector3 value) {
DynamicsJNI.btWheelInfo_wheelAxleCS_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWheelAxleCS () {
long cPtr = DynamicsJNI.btWheelInfo_wheelAxleCS_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setSuspensionRestLength1 (float value) {
DynamicsJNI.btWheelInfo_suspensionRestLength1_set(swigCPtr, this, value);
}
public float getSuspensionRestLength1 () {
return DynamicsJNI.btWheelInfo_suspensionRestLength1_get(swigCPtr, this);
}
public void setMaxSuspensionTravelCm (float value) {
DynamicsJNI.btWheelInfo_maxSuspensionTravelCm_set(swigCPtr, this, value);
}
public float getMaxSuspensionTravelCm () {
return DynamicsJNI.btWheelInfo_maxSuspensionTravelCm_get(swigCPtr, this);
}
public float getSuspensionRestLength () {
return DynamicsJNI.btWheelInfo_getSuspensionRestLength(swigCPtr, this);
}
public void setWheelsRadius (float value) {
DynamicsJNI.btWheelInfo_wheelsRadius_set(swigCPtr, this, value);
}
public float getWheelsRadius () {
return DynamicsJNI.btWheelInfo_wheelsRadius_get(swigCPtr, this);
}
public void setSuspensionStiffness (float value) {
DynamicsJNI.btWheelInfo_suspensionStiffness_set(swigCPtr, this, value);
}
public float getSuspensionStiffness () {
return DynamicsJNI.btWheelInfo_suspensionStiffness_get(swigCPtr, this);
}
public void setWheelsDampingCompression (float value) {
DynamicsJNI.btWheelInfo_wheelsDampingCompression_set(swigCPtr, this, value);
}
public float getWheelsDampingCompression () {
return DynamicsJNI.btWheelInfo_wheelsDampingCompression_get(swigCPtr, this);
}
public void setWheelsDampingRelaxation (float value) {
DynamicsJNI.btWheelInfo_wheelsDampingRelaxation_set(swigCPtr, this, value);
}
public float getWheelsDampingRelaxation () {
return DynamicsJNI.btWheelInfo_wheelsDampingRelaxation_get(swigCPtr, this);
}
public void setFrictionSlip (float value) {
DynamicsJNI.btWheelInfo_frictionSlip_set(swigCPtr, this, value);
}
public float getFrictionSlip () {
return DynamicsJNI.btWheelInfo_frictionSlip_get(swigCPtr, this);
}
public void setSteering (float value) {
DynamicsJNI.btWheelInfo_steering_set(swigCPtr, this, value);
}
public float getSteering () {
return DynamicsJNI.btWheelInfo_steering_get(swigCPtr, this);
}
public void setRotation (float value) {
DynamicsJNI.btWheelInfo_rotation_set(swigCPtr, this, value);
}
public float getRotation () {
return DynamicsJNI.btWheelInfo_rotation_get(swigCPtr, this);
}
public void setDeltaRotation (float value) {
DynamicsJNI.btWheelInfo_deltaRotation_set(swigCPtr, this, value);
}
public float getDeltaRotation () {
return DynamicsJNI.btWheelInfo_deltaRotation_get(swigCPtr, this);
}
public void setRollInfluence (float value) {
DynamicsJNI.btWheelInfo_rollInfluence_set(swigCPtr, this, value);
}
public float getRollInfluence () {
return DynamicsJNI.btWheelInfo_rollInfluence_get(swigCPtr, this);
}
public void setMaxSuspensionForce (float value) {
DynamicsJNI.btWheelInfo_maxSuspensionForce_set(swigCPtr, this, value);
}
public float getMaxSuspensionForce () {
return DynamicsJNI.btWheelInfo_maxSuspensionForce_get(swigCPtr, this);
}
public void setEngineForce (float value) {
DynamicsJNI.btWheelInfo_engineForce_set(swigCPtr, this, value);
}
public float getEngineForce () {
return DynamicsJNI.btWheelInfo_engineForce_get(swigCPtr, this);
}
public void setBrake (float value) {
DynamicsJNI.btWheelInfo_brake_set(swigCPtr, this, value);
}
public float getBrake () {
return DynamicsJNI.btWheelInfo_brake_get(swigCPtr, this);
}
public void setBIsFrontWheel (boolean value) {
DynamicsJNI.btWheelInfo_bIsFrontWheel_set(swigCPtr, this, value);
}
public boolean getBIsFrontWheel () {
return DynamicsJNI.btWheelInfo_bIsFrontWheel_get(swigCPtr, this);
}
public void setClientInfo (long value) {
DynamicsJNI.btWheelInfo_clientInfo_set(swigCPtr, this, value);
}
public long getClientInfo () {
return DynamicsJNI.btWheelInfo_clientInfo_get(swigCPtr, this);
}
public btWheelInfo () {
this(DynamicsJNI.new_btWheelInfo__SWIG_0(), true);
}
public btWheelInfo (btWheelInfoConstructionInfo ci) {
this(DynamicsJNI.new_btWheelInfo__SWIG_1(btWheelInfoConstructionInfo.getCPtr(ci), ci), true);
}
public void updateWheel (btRigidBody chassis, btWheelInfo.RaycastInfo raycastInfo) {
DynamicsJNI.btWheelInfo_updateWheel(swigCPtr, this, btRigidBody.getCPtr(chassis), chassis,
btWheelInfo.RaycastInfo.getCPtr(raycastInfo), raycastInfo);
}
public void setClippedInvContactDotSuspension (float value) {
DynamicsJNI.btWheelInfo_clippedInvContactDotSuspension_set(swigCPtr, this, value);
}
public float getClippedInvContactDotSuspension () {
return DynamicsJNI.btWheelInfo_clippedInvContactDotSuspension_get(swigCPtr, this);
}
public void setSuspensionRelativeVelocity (float value) {
DynamicsJNI.btWheelInfo_suspensionRelativeVelocity_set(swigCPtr, this, value);
}
public float getSuspensionRelativeVelocity () {
return DynamicsJNI.btWheelInfo_suspensionRelativeVelocity_get(swigCPtr, this);
}
public void setWheelsSuspensionForce (float value) {
DynamicsJNI.btWheelInfo_wheelsSuspensionForce_set(swigCPtr, this, value);
}
public float getWheelsSuspensionForce () {
return DynamicsJNI.btWheelInfo_wheelsSuspensionForce_get(swigCPtr, this);
}
public void setSkidInfo (float value) {
DynamicsJNI.btWheelInfo_skidInfo_set(swigCPtr, this, value);
}
public float getSkidInfo () {
return DynamicsJNI.btWheelInfo_skidInfo_get(swigCPtr, this);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/dynamics/com/badlogic/gdx/physics/bullet/dynamics/btDantzigScratchMemory.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
public class btDantzigScratchMemory extends BulletBase {
private long swigCPtr;
protected btDantzigScratchMemory (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btDantzigScratchMemory, normally you should not need this constructor it's intended for low-level usage. */
public btDantzigScratchMemory (long cPtr, boolean cMemoryOwn) {
this("btDantzigScratchMemory", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btDantzigScratchMemory obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btDantzigScratchMemory(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setScratch (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_scratch_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getScratch () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_scratch_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setL (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_L_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getL () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_L_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setD (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_d_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getD () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_d_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setDelta_w (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_delta_w_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getDelta_w () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_delta_w_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setDelta_x (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_delta_x_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getDelta_x () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_delta_x_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setDell (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_Dell_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getDell () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_Dell_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setEll (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_ell_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getEll () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_ell_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setArows (SWIGTYPE_p_btAlignedObjectArrayT_float_p_t value) {
DynamicsJNI.btDantzigScratchMemory_Arows_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_float_p_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_float_p_t getArows () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_Arows_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_float_p_t(cPtr, false);
}
public void setP (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
DynamicsJNI.btDantzigScratchMemory_p_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_int_t getP () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_p_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
}
public void setC (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
DynamicsJNI.btDantzigScratchMemory_C_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_int_t getC () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_C_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
}
public void setState (SWIGTYPE_p_btAlignedObjectArrayT_bool_t value) {
DynamicsJNI.btDantzigScratchMemory_state_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_bool_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_bool_t getState () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_state_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_bool_t(cPtr, false);
}
public btDantzigScratchMemory () {
this(DynamicsJNI.new_btDantzigScratchMemory(), true);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
public class btDantzigScratchMemory extends BulletBase {
private long swigCPtr;
protected btDantzigScratchMemory (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btDantzigScratchMemory, normally you should not need this constructor it's intended for low-level usage. */
public btDantzigScratchMemory (long cPtr, boolean cMemoryOwn) {
this("btDantzigScratchMemory", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btDantzigScratchMemory obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btDantzigScratchMemory(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setScratch (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_scratch_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getScratch () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_scratch_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setL (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_L_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getL () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_L_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setD (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_d_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getD () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_d_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setDelta_w (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_delta_w_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getDelta_w () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_delta_w_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setDelta_x (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_delta_x_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getDelta_x () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_delta_x_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setDell (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_Dell_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getDell () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_Dell_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setEll (btScalarArray value) {
DynamicsJNI.btDantzigScratchMemory_ell_set(swigCPtr, this, btScalarArray.getCPtr(value), value);
}
public btScalarArray getEll () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_ell_get(swigCPtr, this);
return (cPtr == 0) ? null : new btScalarArray(cPtr, false);
}
public void setArows (SWIGTYPE_p_btAlignedObjectArrayT_float_p_t value) {
DynamicsJNI.btDantzigScratchMemory_Arows_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_float_p_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_float_p_t getArows () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_Arows_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_float_p_t(cPtr, false);
}
public void setP (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
DynamicsJNI.btDantzigScratchMemory_p_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_int_t getP () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_p_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
}
public void setC (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
DynamicsJNI.btDantzigScratchMemory_C_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_int_t getC () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_C_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
}
public void setState (SWIGTYPE_p_btAlignedObjectArrayT_bool_t value) {
DynamicsJNI.btDantzigScratchMemory_state_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_bool_t.getCPtr(value));
}
public SWIGTYPE_p_btAlignedObjectArrayT_bool_t getState () {
long cPtr = DynamicsJNI.btDantzigScratchMemory_state_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_bool_t(cPtr, false);
}
public btDantzigScratchMemory () {
this(DynamicsJNI.new_btDantzigScratchMemory(), true);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/btMaterial.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class btMaterial extends BulletBase {
private long swigCPtr;
protected btMaterial (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btMaterial, normally you should not need this constructor it's intended for low-level usage. */
public btMaterial (long cPtr, boolean cMemoryOwn) {
this("btMaterial", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btMaterial obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_btMaterial(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setFriction (float value) {
CollisionJNI.btMaterial_friction_set(swigCPtr, this, value);
}
public float getFriction () {
return CollisionJNI.btMaterial_friction_get(swigCPtr, this);
}
public void setRestitution (float value) {
CollisionJNI.btMaterial_restitution_set(swigCPtr, this, value);
}
public float getRestitution () {
return CollisionJNI.btMaterial_restitution_get(swigCPtr, this);
}
public void setPad (int[] value) {
CollisionJNI.btMaterial_pad_set(swigCPtr, this, value);
}
public int[] getPad () {
return CollisionJNI.btMaterial_pad_get(swigCPtr, this);
}
public btMaterial () {
this(CollisionJNI.new_btMaterial__SWIG_0(), true);
}
public btMaterial (float fric, float rest) {
this(CollisionJNI.new_btMaterial__SWIG_1(fric, rest), true);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
public class btMaterial extends BulletBase {
private long swigCPtr;
protected btMaterial (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btMaterial, normally you should not need this constructor it's intended for low-level usage. */
public btMaterial (long cPtr, boolean cMemoryOwn) {
this("btMaterial", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btMaterial obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_btMaterial(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setFriction (float value) {
CollisionJNI.btMaterial_friction_set(swigCPtr, this, value);
}
public float getFriction () {
return CollisionJNI.btMaterial_friction_get(swigCPtr, this);
}
public void setRestitution (float value) {
CollisionJNI.btMaterial_restitution_set(swigCPtr, this, value);
}
public float getRestitution () {
return CollisionJNI.btMaterial_restitution_get(swigCPtr, this);
}
public void setPad (int[] value) {
CollisionJNI.btMaterial_pad_set(swigCPtr, this, value);
}
public int[] getPad () {
return CollisionJNI.btMaterial_pad_get(swigCPtr, this);
}
public btMaterial () {
this(CollisionJNI.new_btMaterial__SWIG_0(), true);
}
public btMaterial (float fric, float rest) {
this(CollisionJNI.new_btMaterial__SWIG_1(fric, rest), true);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-box2d/gdx-box2d/src/com/badlogic/gdx/physics/box2d/joints/FrictionJoint.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.physics.box2d.joints;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Joint;
import com.badlogic.gdx.physics.box2d.World;
/** Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. */
public class FrictionJoint extends Joint {
// @off
/*JNI
#include <Box2D/Box2D.h>
*/
private final float[] tmp = new float[2];
private final Vector2 localAnchorA = new Vector2();
private final Vector2 localAnchorB = new Vector2();
public FrictionJoint (World world, long addr) {
super(world, addr);
}
public Vector2 getLocalAnchorA () {
jniGetLocalAnchorA(addr, tmp);
localAnchorA.set(tmp[0], tmp[1]);
return localAnchorA;
}
private native void jniGetLocalAnchorA (long addr, float[] anchor); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
anchor[0] = joint->GetLocalAnchorA().x;
anchor[1] = joint->GetLocalAnchorA().y;
*/
public Vector2 getLocalAnchorB () {
jniGetLocalAnchorB(addr, tmp);
localAnchorB.set(tmp[0], tmp[1]);
return localAnchorB;
}
private native void jniGetLocalAnchorB (long addr, float[] anchor); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
anchor[0] = joint->GetLocalAnchorB().x;
anchor[1] = joint->GetLocalAnchorB().y;
*/
/** Set the maximum friction force in N. */
public void setMaxForce (float force) {
jniSetMaxForce(addr, force);
}
private native void jniSetMaxForce (long addr, float force); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
joint->SetMaxForce( force );
*/
/** Get the maximum friction force in N. */
public float getMaxForce () {
return jniGetMaxForce(addr);
}
private native float jniGetMaxForce (long addr); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
return joint->GetMaxForce();
*/
/** Set the maximum friction torque in N*m. */
public void setMaxTorque (float torque) {
jniSetMaxTorque(addr, torque);
}
private native void jniSetMaxTorque (long addr, float torque); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
joint->SetMaxTorque( torque );
*/
/** Get the maximum friction torque in N*m. */
public float getMaxTorque () {
return jniGetMaxTorque(addr);
}
private native float jniGetMaxTorque (long addr); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
return joint->GetMaxTorque();
*/
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.physics.box2d.joints;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Joint;
import com.badlogic.gdx.physics.box2d.World;
/** Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. */
public class FrictionJoint extends Joint {
// @off
/*JNI
#include <Box2D/Box2D.h>
*/
private final float[] tmp = new float[2];
private final Vector2 localAnchorA = new Vector2();
private final Vector2 localAnchorB = new Vector2();
public FrictionJoint (World world, long addr) {
super(world, addr);
}
public Vector2 getLocalAnchorA () {
jniGetLocalAnchorA(addr, tmp);
localAnchorA.set(tmp[0], tmp[1]);
return localAnchorA;
}
private native void jniGetLocalAnchorA (long addr, float[] anchor); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
anchor[0] = joint->GetLocalAnchorA().x;
anchor[1] = joint->GetLocalAnchorA().y;
*/
public Vector2 getLocalAnchorB () {
jniGetLocalAnchorB(addr, tmp);
localAnchorB.set(tmp[0], tmp[1]);
return localAnchorB;
}
private native void jniGetLocalAnchorB (long addr, float[] anchor); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
anchor[0] = joint->GetLocalAnchorB().x;
anchor[1] = joint->GetLocalAnchorB().y;
*/
/** Set the maximum friction force in N. */
public void setMaxForce (float force) {
jniSetMaxForce(addr, force);
}
private native void jniSetMaxForce (long addr, float force); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
joint->SetMaxForce( force );
*/
/** Get the maximum friction force in N. */
public float getMaxForce () {
return jniGetMaxForce(addr);
}
private native float jniGetMaxForce (long addr); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
return joint->GetMaxForce();
*/
/** Set the maximum friction torque in N*m. */
public void setMaxTorque (float torque) {
jniSetMaxTorque(addr, torque);
}
private native void jniSetMaxTorque (long addr, float torque); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
joint->SetMaxTorque( torque );
*/
/** Get the maximum friction torque in N*m. */
public float getMaxTorque () {
return jniGetMaxTorque(addr);
}
private native float jniGetMaxTorque (long addr); /*
b2FrictionJoint* joint = (b2FrictionJoint*)addr;
return joint->GetMaxTorque();
*/
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/linearmath/com/badlogic/gdx/physics/bullet/linearmath/btIDebugDraw.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Matrix4;
public class btIDebugDraw extends BulletBase {
private long swigCPtr;
protected btIDebugDraw (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btIDebugDraw, normally you should not need this constructor it's intended for low-level usage. */
public btIDebugDraw (long cPtr, boolean cMemoryOwn) {
this("btIDebugDraw", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btIDebugDraw obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btIDebugDraw(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
protected void swigDirectorDisconnect () {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership () {
swigCMemOwn = false;
LinearMathJNI.btIDebugDraw_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership () {
swigCMemOwn = true;
LinearMathJNI.btIDebugDraw_change_ownership(this, swigCPtr, true);
}
static public class DefaultColors extends BulletBase {
private long swigCPtr;
protected DefaultColors (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new DefaultColors, normally you should not need this constructor it's intended for low-level usage. */
public DefaultColors (long cPtr, boolean cMemoryOwn) {
this("DefaultColors", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (DefaultColors obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btIDebugDraw_DefaultColors(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setActiveObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_activeObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getActiveObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_activeObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setDeactivatedObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_deactivatedObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getDeactivatedObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_deactivatedObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWantsDeactivationObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_wantsDeactivationObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWantsDeactivationObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_wantsDeactivationObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setDisabledDeactivationObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_disabledDeactivationObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getDisabledDeactivationObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_disabledDeactivationObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setDisabledSimulationObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_disabledSimulationObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getDisabledSimulationObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_disabledSimulationObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setAabb (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_aabb_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getAabb () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_aabb_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setContactPoint (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_contactPoint_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getContactPoint () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_contactPoint_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public DefaultColors () {
this(LinearMathJNI.new_btIDebugDraw_DefaultColors(), true);
}
}
public btIDebugDraw.DefaultColors getDefaultColors () {
return new btIDebugDraw.DefaultColors(
(getClass() == btIDebugDraw.class) ? LinearMathJNI.btIDebugDraw_getDefaultColors(swigCPtr, this)
: LinearMathJNI.btIDebugDraw_getDefaultColorsSwigExplicitbtIDebugDraw(swigCPtr, this),
true);
}
public void setDefaultColors (btIDebugDraw.DefaultColors arg0) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_setDefaultColors(swigCPtr, this, btIDebugDraw.DefaultColors.getCPtr(arg0), arg0);
else
LinearMathJNI.btIDebugDraw_setDefaultColorsSwigExplicitbtIDebugDraw(swigCPtr, this,
btIDebugDraw.DefaultColors.getCPtr(arg0), arg0);
}
public void drawLine (Vector3 from, Vector3 to, Vector3 color) {
LinearMathJNI.btIDebugDraw_drawLine__SWIG_0(swigCPtr, this, from, to, color);
}
public void drawLine (Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawLine__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
else
LinearMathJNI.btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
}
public void drawSphere (float radius, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSphere__SWIG_0(swigCPtr, this, radius, transform, color);
else
LinearMathJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, radius, transform, color);
}
public void drawSphere (Vector3 p, float radius, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSphere__SWIG_1(swigCPtr, this, p, radius, color);
else
LinearMathJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, p, radius, color);
}
public void drawTriangle (Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color,
float alpha) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawTriangle__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha);
else
LinearMathJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5,
color, alpha);
}
public void drawTriangle (Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawTriangle__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
else
LinearMathJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
}
public void drawContactPoint (Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color) {
LinearMathJNI.btIDebugDraw_drawContactPoint(swigCPtr, this, PointOnB, normalOnB, distance, lifeTime, color);
}
public void reportErrorWarning (String warningString) {
LinearMathJNI.btIDebugDraw_reportErrorWarning(swigCPtr, this, warningString);
}
public void draw3dText (Vector3 location, String textString) {
LinearMathJNI.btIDebugDraw_draw3dText(swigCPtr, this, location, textString);
}
public void setDebugMode (int debugMode) {
LinearMathJNI.btIDebugDraw_setDebugMode(swigCPtr, this, debugMode);
}
public int getDebugMode () {
return LinearMathJNI.btIDebugDraw_getDebugMode(swigCPtr, this);
}
public void drawAabb (Vector3 from, Vector3 to, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawAabb(swigCPtr, this, from, to, color);
else
LinearMathJNI.btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw(swigCPtr, this, from, to, color);
}
public void drawTransform (Matrix4 transform, float orthoLen) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawTransform(swigCPtr, this, transform, orthoLen);
else
LinearMathJNI.btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw(swigCPtr, this, transform, orthoLen);
}
public void drawArc (Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle,
float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawArc__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle,
color, drawSect, stepDegrees);
else
LinearMathJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, normal, axis, radiusA,
radiusB, minAngle, maxAngle, color, drawSect, stepDegrees);
}
public void drawArc (Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle,
float maxAngle, Vector3 color, boolean drawSect) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawArc__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle,
color, drawSect);
else
LinearMathJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, normal, axis, radiusA,
radiusB, minAngle, maxAngle, color, drawSect);
}
public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
float maxPs, Vector3 color, float stepDegrees, boolean drawCenter) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color, stepDegrees, drawCenter);
else
LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, up, axis, radius,
minTh, maxTh, minPs, maxPs, color, stepDegrees, drawCenter);
}
public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
float maxPs, Vector3 color, float stepDegrees) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color, stepDegrees);
else
LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, up, axis, radius,
minTh, maxTh, minPs, maxPs, color, stepDegrees);
}
public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
float maxPs, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_2(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color);
else
LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_2(swigCPtr, this, center, up, axis, radius,
minTh, maxTh, minPs, maxPs, color);
}
public void drawBox (Vector3 bbMin, Vector3 bbMax, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawBox__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
else
LinearMathJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
}
public void drawBox (Vector3 bbMin, Vector3 bbMax, Matrix4 trans, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawBox__SWIG_1(swigCPtr, this, bbMin, bbMax, trans, color);
else
LinearMathJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, bbMin, bbMax, trans, color);
}
public void drawCapsule (float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawCapsule(swigCPtr, this, radius, halfHeight, upAxis, transform, color);
else
LinearMathJNI.btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, transform,
color);
}
public void drawCylinder (float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawCylinder(swigCPtr, this, radius, halfHeight, upAxis, transform, color);
else
LinearMathJNI.btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, transform,
color);
}
public void drawCone (float radius, float height, int upAxis, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawCone(swigCPtr, this, radius, height, upAxis, transform, color);
else
LinearMathJNI.btIDebugDraw_drawConeSwigExplicitbtIDebugDraw(swigCPtr, this, radius, height, upAxis, transform, color);
}
public void drawPlane (Vector3 planeNormal, float planeConst, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawPlane(swigCPtr, this, planeNormal, planeConst, transform, color);
else
LinearMathJNI.btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw(swigCPtr, this, planeNormal, planeConst, transform, color);
}
public void clearLines () {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_clearLines(swigCPtr, this);
else
LinearMathJNI.btIDebugDraw_clearLinesSwigExplicitbtIDebugDraw(swigCPtr, this);
}
public void flushLines () {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_flushLines(swigCPtr, this);
else
LinearMathJNI.btIDebugDraw_flushLinesSwigExplicitbtIDebugDraw(swigCPtr, this);
}
public btIDebugDraw () {
this(LinearMathJNI.new_btIDebugDraw(), true);
LinearMathJNI.btIDebugDraw_director_connect(this, swigCPtr, swigCMemOwn, true);
}
public final static class DebugDrawModes {
public final static int DBG_NoDebug = 0;
public final static int DBG_DrawWireframe = 1;
public final static int DBG_DrawAabb = 2;
public final static int DBG_DrawFeaturesText = 4;
public final static int DBG_DrawContactPoints = 8;
public final static int DBG_NoDeactivation = 16;
public final static int DBG_NoHelpText = 32;
public final static int DBG_DrawText = 64;
public final static int DBG_ProfileTimings = 128;
public final static int DBG_EnableSatComparison = 256;
public final static int DBG_DisableBulletLCP = 512;
public final static int DBG_EnableCCD = 1024;
public final static int DBG_DrawConstraints = (1 << 11);
public final static int DBG_DrawConstraintLimits = (1 << 12);
public final static int DBG_FastWireframe = (1 << 13);
public final static int DBG_DrawNormals = (1 << 14);
public final static int DBG_DrawFrames = (1 << 15);
public final static int DBG_MAX_DEBUG_DRAW_MODE = DBG_DrawFrames + 1;
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Matrix4;
public class btIDebugDraw extends BulletBase {
private long swigCPtr;
protected btIDebugDraw (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btIDebugDraw, normally you should not need this constructor it's intended for low-level usage. */
public btIDebugDraw (long cPtr, boolean cMemoryOwn) {
this("btIDebugDraw", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btIDebugDraw obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btIDebugDraw(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
protected void swigDirectorDisconnect () {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership () {
swigCMemOwn = false;
LinearMathJNI.btIDebugDraw_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership () {
swigCMemOwn = true;
LinearMathJNI.btIDebugDraw_change_ownership(this, swigCPtr, true);
}
static public class DefaultColors extends BulletBase {
private long swigCPtr;
protected DefaultColors (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new DefaultColors, normally you should not need this constructor it's intended for low-level usage. */
public DefaultColors (long cPtr, boolean cMemoryOwn) {
this("DefaultColors", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (DefaultColors obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LinearMathJNI.delete_btIDebugDraw_DefaultColors(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setActiveObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_activeObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getActiveObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_activeObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setDeactivatedObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_deactivatedObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getDeactivatedObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_deactivatedObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setWantsDeactivationObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_wantsDeactivationObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getWantsDeactivationObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_wantsDeactivationObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setDisabledDeactivationObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_disabledDeactivationObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getDisabledDeactivationObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_disabledDeactivationObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setDisabledSimulationObject (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_disabledSimulationObject_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getDisabledSimulationObject () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_disabledSimulationObject_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setAabb (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_aabb_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getAabb () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_aabb_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public void setContactPoint (btVector3 value) {
LinearMathJNI.btIDebugDraw_DefaultColors_contactPoint_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
public btVector3 getContactPoint () {
long cPtr = LinearMathJNI.btIDebugDraw_DefaultColors_contactPoint_get(swigCPtr, this);
return (cPtr == 0) ? null : new btVector3(cPtr, false);
}
public DefaultColors () {
this(LinearMathJNI.new_btIDebugDraw_DefaultColors(), true);
}
}
public btIDebugDraw.DefaultColors getDefaultColors () {
return new btIDebugDraw.DefaultColors(
(getClass() == btIDebugDraw.class) ? LinearMathJNI.btIDebugDraw_getDefaultColors(swigCPtr, this)
: LinearMathJNI.btIDebugDraw_getDefaultColorsSwigExplicitbtIDebugDraw(swigCPtr, this),
true);
}
public void setDefaultColors (btIDebugDraw.DefaultColors arg0) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_setDefaultColors(swigCPtr, this, btIDebugDraw.DefaultColors.getCPtr(arg0), arg0);
else
LinearMathJNI.btIDebugDraw_setDefaultColorsSwigExplicitbtIDebugDraw(swigCPtr, this,
btIDebugDraw.DefaultColors.getCPtr(arg0), arg0);
}
public void drawLine (Vector3 from, Vector3 to, Vector3 color) {
LinearMathJNI.btIDebugDraw_drawLine__SWIG_0(swigCPtr, this, from, to, color);
}
public void drawLine (Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawLine__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
else
LinearMathJNI.btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
}
public void drawSphere (float radius, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSphere__SWIG_0(swigCPtr, this, radius, transform, color);
else
LinearMathJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, radius, transform, color);
}
public void drawSphere (Vector3 p, float radius, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSphere__SWIG_1(swigCPtr, this, p, radius, color);
else
LinearMathJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, p, radius, color);
}
public void drawTriangle (Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color,
float alpha) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawTriangle__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha);
else
LinearMathJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5,
color, alpha);
}
public void drawTriangle (Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawTriangle__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
else
LinearMathJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
}
public void drawContactPoint (Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color) {
LinearMathJNI.btIDebugDraw_drawContactPoint(swigCPtr, this, PointOnB, normalOnB, distance, lifeTime, color);
}
public void reportErrorWarning (String warningString) {
LinearMathJNI.btIDebugDraw_reportErrorWarning(swigCPtr, this, warningString);
}
public void draw3dText (Vector3 location, String textString) {
LinearMathJNI.btIDebugDraw_draw3dText(swigCPtr, this, location, textString);
}
public void setDebugMode (int debugMode) {
LinearMathJNI.btIDebugDraw_setDebugMode(swigCPtr, this, debugMode);
}
public int getDebugMode () {
return LinearMathJNI.btIDebugDraw_getDebugMode(swigCPtr, this);
}
public void drawAabb (Vector3 from, Vector3 to, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawAabb(swigCPtr, this, from, to, color);
else
LinearMathJNI.btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw(swigCPtr, this, from, to, color);
}
public void drawTransform (Matrix4 transform, float orthoLen) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawTransform(swigCPtr, this, transform, orthoLen);
else
LinearMathJNI.btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw(swigCPtr, this, transform, orthoLen);
}
public void drawArc (Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle,
float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawArc__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle,
color, drawSect, stepDegrees);
else
LinearMathJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, normal, axis, radiusA,
radiusB, minAngle, maxAngle, color, drawSect, stepDegrees);
}
public void drawArc (Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle,
float maxAngle, Vector3 color, boolean drawSect) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawArc__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle,
color, drawSect);
else
LinearMathJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, normal, axis, radiusA,
radiusB, minAngle, maxAngle, color, drawSect);
}
public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
float maxPs, Vector3 color, float stepDegrees, boolean drawCenter) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color, stepDegrees, drawCenter);
else
LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, up, axis, radius,
minTh, maxTh, minPs, maxPs, color, stepDegrees, drawCenter);
}
public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
float maxPs, Vector3 color, float stepDegrees) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color, stepDegrees);
else
LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, up, axis, radius,
minTh, maxTh, minPs, maxPs, color, stepDegrees);
}
public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
float maxPs, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawSpherePatch__SWIG_2(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color);
else
LinearMathJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_2(swigCPtr, this, center, up, axis, radius,
minTh, maxTh, minPs, maxPs, color);
}
public void drawBox (Vector3 bbMin, Vector3 bbMax, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawBox__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
else
LinearMathJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
}
public void drawBox (Vector3 bbMin, Vector3 bbMax, Matrix4 trans, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawBox__SWIG_1(swigCPtr, this, bbMin, bbMax, trans, color);
else
LinearMathJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, bbMin, bbMax, trans, color);
}
public void drawCapsule (float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawCapsule(swigCPtr, this, radius, halfHeight, upAxis, transform, color);
else
LinearMathJNI.btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, transform,
color);
}
public void drawCylinder (float radius, float halfHeight, int upAxis, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawCylinder(swigCPtr, this, radius, halfHeight, upAxis, transform, color);
else
LinearMathJNI.btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, transform,
color);
}
public void drawCone (float radius, float height, int upAxis, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawCone(swigCPtr, this, radius, height, upAxis, transform, color);
else
LinearMathJNI.btIDebugDraw_drawConeSwigExplicitbtIDebugDraw(swigCPtr, this, radius, height, upAxis, transform, color);
}
public void drawPlane (Vector3 planeNormal, float planeConst, Matrix4 transform, Vector3 color) {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_drawPlane(swigCPtr, this, planeNormal, planeConst, transform, color);
else
LinearMathJNI.btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw(swigCPtr, this, planeNormal, planeConst, transform, color);
}
public void clearLines () {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_clearLines(swigCPtr, this);
else
LinearMathJNI.btIDebugDraw_clearLinesSwigExplicitbtIDebugDraw(swigCPtr, this);
}
public void flushLines () {
if (getClass() == btIDebugDraw.class)
LinearMathJNI.btIDebugDraw_flushLines(swigCPtr, this);
else
LinearMathJNI.btIDebugDraw_flushLinesSwigExplicitbtIDebugDraw(swigCPtr, this);
}
public btIDebugDraw () {
this(LinearMathJNI.new_btIDebugDraw(), true);
LinearMathJNI.btIDebugDraw_director_connect(this, swigCPtr, swigCMemOwn, true);
}
public final static class DebugDrawModes {
public final static int DBG_NoDebug = 0;
public final static int DBG_DrawWireframe = 1;
public final static int DBG_DrawAabb = 2;
public final static int DBG_DrawFeaturesText = 4;
public final static int DBG_DrawContactPoints = 8;
public final static int DBG_NoDeactivation = 16;
public final static int DBG_NoHelpText = 32;
public final static int DBG_DrawText = 64;
public final static int DBG_ProfileTimings = 128;
public final static int DBG_EnableSatComparison = 256;
public final static int DBG_DisableBulletLCP = 512;
public final static int DBG_EnableCCD = 1024;
public final static int DBG_DrawConstraints = (1 << 11);
public final static int DBG_DrawConstraintLimits = (1 << 12);
public final static int DBG_FastWireframe = (1 << 13);
public final static int DBG_DrawNormals = (1 << 14);
public final static int DBG_DrawFrames = (1 << 15);
public final static int DBG_MAX_DEBUG_DRAW_MODE = DBG_DrawFrames + 1;
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-tools/src/com/badlogic/gdx/tiledmappacker/TiledMapPacker.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tiledmappacker;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.loaders.resolvers.AbsoluteFileHandleResolver;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.maps.MapLayer;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TiledMapTile;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer;
import com.badlogic.gdx.maps.tiled.TiledMapTileSet;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.maps.tiled.tiles.AnimatedTiledMapTile;
import com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.tools.texturepacker.TexturePacker;
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.IntArray;
import com.badlogic.gdx.utils.ObjectMap;
/** Given one or more TMX tilemaps, packs all tileset resources used across the maps, or the resources used per map, into a
* single, or multiple (one per map), {@link TextureAtlas} and produces a new TMX file to be loaded with an AtlasTiledMapLoader
* loader. Optionally, it can keep track of unused tiles and omit them from the generated atlas, reducing the resource size.
*
* The original TMX map file will be parsed by using the {@link TmxMapLoader} loader, thus access to a valid OpenGL context is
* <b>required</b>, that's why an LwjglApplication is created by this preprocessor.
*
* The new TMX map file will contains a new property, namely "atlas", whose value will enable the AtlasTiledMapLoader to correctly
* read the associated TextureAtlas representing the tileset.
*
* @author David Fraska and others (initial implementation, tell me who you are!)
* @author Manuel Bua */
public class TiledMapPacker {
private TexturePacker packer;
private TiledMap map;
private TmxMapLoader mapLoader = new TmxMapLoader(new AbsoluteFileHandleResolver());
private TiledMapPackerSettings settings;
private static final String TilesetsOutputDir = "tileset";
static String AtlasOutputName = "packed";
private HashMap<String, IntArray> tilesetUsedIds = new HashMap<String, IntArray>();
private ObjectMap<String, TiledMapTileSet> tilesetsToPack;
static File inputDir;
static File outputDir;
private FileHandle currentDir;
private static class TmxFilter implements FilenameFilter {
public TmxFilter () {
}
@Override
public boolean accept (File dir, String name) {
return (name.endsWith(".tmx"));
}
}
private static class DirFilter implements FilenameFilter {
public DirFilter () {
}
@Override
public boolean accept (File f, String s) {
return (new File(f, s).isDirectory());
}
}
/** Constructs a new preprocessor by using the default packing settings */
public TiledMapPacker () {
this(new TiledMapPackerSettings());
}
/** Constructs a new preprocessor by using the specified packing settings */
public TiledMapPacker (TiledMapPackerSettings settings) {
this.settings = settings;
}
/** You can either run the {@link TiledMapPacker#main(String[])} method or reference this class in your own project and call
* this method. If working with libGDX sources, you can also run this file to create a run configuration then export it as a
* Runnable Jar. To run from a nightly build:
*
* <code> <br><br>
* Linux / OS X <br>
java -cp gdx.jar:gdx-natives.jar:gdx-backend-lwjgl.jar:gdx-backend-lwjgl-natives.jar:gdx-tiled-preprocessor.jar:extensions/gdx-tools/gdx-tools.jar
com.badlogic.gdx.tiledmappacker.TiledMapPacker inputDir [outputDir] [--strip-unused] [--combine-tilesets] [-v]
* <br><br>
*
* Windows <br>
java -cp gdx.jar;gdx-natives.jar;gdx-backend-lwjgl.jar;gdx-backend-lwjgl-natives.jar;gdx-tiled-preprocessor.jar;extensions/gdx-tools/gdx-tools.jar
com.badlogic.gdx.tiledmappacker.TiledMapPacker inputDir [outputDir] [--strip-unused] [--combine-tilesets] [-v]
* <br><br> </code>
*
* Keep in mind that this preprocessor will need to load the maps by using the {@link TmxMapLoader} loader and this in turn
* will need a valid OpenGL context to work.
*
* Process a directory containing TMX map files representing Tiled maps and produce multiple, or a single, TextureAtlas as well
* as new processed TMX map files, correctly referencing the generated {@link TextureAtlas} by using the "atlas" custom map
* property. */
public void processInputDir (Settings texturePackerSettings) throws IOException {
FileHandle inputDirHandle = new FileHandle(inputDir.getCanonicalPath());
File[] mapFilesInCurrentDir = inputDir.listFiles(new TmxFilter());
tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
// Processes the maps inside inputDir
for (File mapFile : mapFilesInCurrentDir) {
processSingleMap(mapFile, inputDirHandle, texturePackerSettings);
}
processSubdirectories(inputDirHandle, texturePackerSettings);
boolean combineTilesets = this.settings.combineTilesets;
if (combineTilesets == true) {
packTilesets(inputDirHandle, texturePackerSettings);
}
}
/** Looks for subdirectories inside parentHandle, processes maps in subdirectory, repeat.
* @param currentDir The directory to look for maps and other directories
* @throws IOException */
private void processSubdirectories (FileHandle currentDir, Settings texturePackerSettings) throws IOException {
File parentPath = new File(currentDir.path());
File[] directories = parentPath.listFiles(new DirFilter());
for (File directory : directories) {
currentDir = new FileHandle(directory.getCanonicalPath());
File[] mapFilesInCurrentDir = directory.listFiles(new TmxFilter());
for (File mapFile : mapFilesInCurrentDir) {
processSingleMap(mapFile, currentDir, texturePackerSettings);
}
processSubdirectories(currentDir, texturePackerSettings);
}
}
private void processSingleMap (File mapFile, FileHandle dirHandle, Settings texturePackerSettings) throws IOException {
boolean combineTilesets = this.settings.combineTilesets;
if (combineTilesets == false) {
tilesetUsedIds = new HashMap<String, IntArray>();
tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
}
map = mapLoader.load(mapFile.getCanonicalPath());
// if enabled, build a list of used tileids for the tileset used by this map
boolean stripUnusedTiles = this.settings.stripUnusedTiles;
if (stripUnusedTiles) {
stripUnusedTiles();
} else {
for (TiledMapTileSet tileset : map.getTileSets()) {
String tilesetName = tileset.getName();
if (!tilesetsToPack.containsKey(tilesetName)) {
tilesetsToPack.put(tilesetName, tileset);
}
}
}
if (combineTilesets == false) {
FileHandle tmpHandle = new FileHandle(mapFile.getName());
this.settings.atlasOutputName = tmpHandle.nameWithoutExtension();
packTilesets(dirHandle, texturePackerSettings);
}
FileHandle tmxFile = new FileHandle(mapFile.getCanonicalPath());
writeUpdatedTMX(map, tmxFile);
}
private void stripUnusedTiles () {
int mapWidth = map.getProperties().get("width", Integer.class);
int mapHeight = map.getProperties().get("height", Integer.class);
int numlayers = map.getLayers().getCount();
int bucketSize = mapWidth * mapHeight * numlayers;
Iterator<MapLayer> it = map.getLayers().iterator();
while (it.hasNext()) {
MapLayer layer = it.next();
// some layers can be plain MapLayer instances (ie. object groups), just ignore them
if (layer instanceof TiledMapTileLayer) {
TiledMapTileLayer tlayer = (TiledMapTileLayer)layer;
for (int y = 0; y < mapHeight; ++y) {
for (int x = 0; x < mapWidth; ++x) {
if (tlayer.getCell(x, y) != null) {
TiledMapTile tile = tlayer.getCell(x, y).getTile();
if (tile instanceof AnimatedTiledMapTile) {
AnimatedTiledMapTile aTile = (AnimatedTiledMapTile)tile;
for (StaticTiledMapTile t : aTile.getFrameTiles()) {
addTile(t, bucketSize);
}
}
// Adds non-animated tiles and the base animated tile
addTile(tile, bucketSize);
}
}
}
}
}
}
private void addTile (TiledMapTile tile, int bucketSize) {
int tileid = tile.getId() & ~0xE0000000;
String tilesetName = tilesetNameFromTileId(map, tileid);
IntArray usedIds = getUsedIdsBucket(tilesetName, bucketSize);
usedIds.add(tileid);
// track this tileset to be packed if not already tracked
if (!tilesetsToPack.containsKey(tilesetName)) {
tilesetsToPack.put(tilesetName, map.getTileSets().getTileSet(tilesetName));
}
}
private String tilesetNameFromTileId (TiledMap map, int tileid) {
String name = "";
if (tileid == 0) {
return "";
}
for (TiledMapTileSet tileset : map.getTileSets()) {
int firstgid = tileset.getProperties().get("firstgid", -1, Integer.class);
if (firstgid == -1) continue; // skip this tileset
if (tileid >= firstgid) {
name = tileset.getName();
} else {
return name;
}
}
return name;
}
/** Returns the usedIds bucket for the given tileset name. If it doesn't exist one will be created with the specified size if
* its > 0, else null will be returned.
*
* @param size The size to use to create a new bucket if it doesn't exist, else specify 0 or lower to return null instead
* @return a bucket */
private IntArray getUsedIdsBucket (String tilesetName, int size) {
if (tilesetUsedIds.containsKey(tilesetName)) {
return tilesetUsedIds.get(tilesetName);
}
if (size <= 0) {
return null;
}
IntArray bucket = new IntArray(size);
tilesetUsedIds.put(tilesetName, bucket);
return bucket;
}
/** Traverse the specified tilesets, optionally lookup the used ids and pass every tile image to the {@link TexturePacker},
* optionally ignoring unused tile ids */
private void packTilesets (FileHandle inputDirHandle, Settings texturePackerSettings) throws IOException {
BufferedImage tile;
Vector2 tileLocation;
Graphics g;
packer = new TexturePacker(texturePackerSettings);
for (TiledMapTileSet set : tilesetsToPack.values()) {
String tilesetName = set.getName();
System.out.println("Processing tileset " + tilesetName);
IntArray usedIds = this.settings.stripUnusedTiles ? getUsedIdsBucket(tilesetName, -1) : null;
int tileWidth = set.getProperties().get("tilewidth", Integer.class);
int tileHeight = set.getProperties().get("tileheight", Integer.class);
int firstgid = set.getProperties().get("firstgid", Integer.class);
String imageName = set.getProperties().get("imagesource", String.class);
TileSetLayout layout = new TileSetLayout(firstgid, set, inputDirHandle);
for (int gid = layout.firstgid, i = 0; i < layout.numTiles; gid++, i++) {
boolean verbose = this.settings.verbose;
if (usedIds != null && !usedIds.contains(gid)) {
if (verbose) {
System.out.println("Stripped id #" + gid + " from tileset \"" + tilesetName + "\"");
}
continue;
}
tileLocation = layout.getLocation(gid);
tile = new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_4BYTE_ABGR);
g = tile.createGraphics();
g.drawImage(layout.image, 0, 0, tileWidth, tileHeight, (int)tileLocation.x, (int)tileLocation.y,
(int)tileLocation.x + tileWidth, (int)tileLocation.y + tileHeight, null);
if (verbose) {
System.out.println(
"Adding " + tileWidth + "x" + tileHeight + " (" + (int)tileLocation.x + ", " + (int)tileLocation.y + ")");
}
// AtlasTmxMapLoader expects every tileset's index to begin at zero for the first tile in every tileset.
// so the region's adjusted gid is (gid - layout.firstgid). firstgid will be added back in AtlasTmxMapLoader on load
int adjustedGid = gid - layout.firstgid;
final String separator = "_";
String regionName = tilesetName + separator + adjustedGid;
packer.addImage(tile, regionName);
}
}
String tilesetOutputDir = outputDir.toString() + "/" + this.settings.tilesetOutputDirectory;
File relativeTilesetOutputDir = new File(tilesetOutputDir);
File outputDirTilesets = new File(relativeTilesetOutputDir.getCanonicalPath());
outputDirTilesets.mkdirs();
packer.pack(outputDirTilesets, this.settings.atlasOutputName + ".atlas");
}
private void writeUpdatedTMX (TiledMap tiledMap, FileHandle tmxFileHandle) throws IOException {
Document doc;
DocumentBuilder docBuilder;
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
try {
docBuilder = docFactory.newDocumentBuilder();
doc = docBuilder.parse(tmxFileHandle.read());
Node map = doc.getFirstChild();
while (map.getNodeType() != Node.ELEMENT_NODE || map.getNodeName() != "map") {
if ((map = map.getNextSibling()) == null) {
throw new GdxRuntimeException("Couldn't find map node!");
}
}
setProperty(doc, map, "atlas", settings.tilesetOutputDirectory + "/" + settings.atlasOutputName + ".atlas");
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(doc);
outputDir.mkdirs();
StreamResult result = new StreamResult(new File(outputDir, tmxFileHandle.name()));
transformer.transform(source, result);
} catch (ParserConfigurationException e) {
throw new RuntimeException("ParserConfigurationException: " + e.getMessage());
} catch (SAXException e) {
throw new RuntimeException("SAXException: " + e.getMessage());
} catch (TransformerConfigurationException e) {
throw new RuntimeException("TransformerConfigurationException: " + e.getMessage());
} catch (TransformerException e) {
throw new RuntimeException("TransformerException: " + e.getMessage());
}
}
private static void setProperty (Document doc, Node parent, String name, String value) {
Node properties = getFirstChildNodeByName(parent, "properties");
Node property = getFirstChildByNameAttrValue(properties, "property", "name", name);
NamedNodeMap attributes = property.getAttributes();
Node valueNode = attributes.getNamedItem("value");
if (valueNode == null) {
valueNode = doc.createAttribute("value");
valueNode.setNodeValue(value);
attributes.setNamedItem(valueNode);
} else {
valueNode.setNodeValue(value);
}
}
/** If the child node doesn't exist, it is created. */
private static Node getFirstChildNodeByName (Node parent, String child) {
NodeList childNodes = parent.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
if (childNodes.item(i).getNodeName().equals(child)) {
return childNodes.item(i);
}
}
Node newNode = parent.getOwnerDocument().createElement(child);
if (childNodes.item(0) != null)
return parent.insertBefore(newNode, childNodes.item(0));
else
return parent.appendChild(newNode);
}
/** If the child node or attribute doesn't exist, it is created. Usage example: Node property =
* getFirstChildByAttrValue(properties, "property", "name"); */
private static Node getFirstChildByNameAttrValue (Node node, String childName, String attr, String value) {
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
if (childNodes.item(i).getNodeName().equals(childName)) {
NamedNodeMap attributes = childNodes.item(i).getAttributes();
Node attribute = attributes.getNamedItem(attr);
if (attribute.getNodeValue().equals(value)) return childNodes.item(i);
}
}
Node newNode = node.getOwnerDocument().createElement(childName);
NamedNodeMap attributes = newNode.getAttributes();
Attr nodeAttr = node.getOwnerDocument().createAttribute(attr);
nodeAttr.setNodeValue(value);
attributes.setNamedItem(nodeAttr);
if (childNodes.item(0) != null) {
return node.insertBefore(newNode, childNodes.item(0));
} else {
return node.appendChild(newNode);
}
}
/** Processes a directory of Tile Maps, compressing each tile set contained in any map once.
*
* @param args args[0]: the input directory containing the tmx files (and tile sets, relative to the path listed in the tmx
* file). args[1]: The output directory for the tmx files, should be empty before running. args[2-4] options */
public static void main (String[] args) {
final Settings texturePackerSettings = new Settings();
texturePackerSettings.paddingX = 2;
texturePackerSettings.paddingY = 2;
texturePackerSettings.edgePadding = true;
texturePackerSettings.duplicatePadding = true;
texturePackerSettings.bleed = true;
texturePackerSettings.alias = true;
texturePackerSettings.useIndexes = true;
final TiledMapPackerSettings packerSettings = new TiledMapPackerSettings();
if (args.length == 0) {
printUsage();
System.exit(0);
} else if (args.length == 1) {
inputDir = new File(args[0]);
outputDir = new File(inputDir, "../output/");
} else if (args.length == 2) {
inputDir = new File(args[0]);
outputDir = new File(args[1]);
} else {
inputDir = new File(args[0]);
outputDir = new File(args[1]);
processExtraArgs(args, packerSettings);
}
TiledMapPacker packer = new TiledMapPacker(packerSettings);
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.forceExit = false;
config.width = 100;
config.height = 50;
config.title = "TiledMapPacker";
new LwjglApplication(new ApplicationListener() {
@Override
public void resume () {
}
@Override
public void resize (int width, int height) {
}
@Override
public void render () {
}
@Override
public void pause () {
}
@Override
public void dispose () {
}
@Override
public void create () {
TiledMapPacker packer = new TiledMapPacker(packerSettings);
if (!inputDir.exists()) {
System.out.println(inputDir.getAbsolutePath());
throw new RuntimeException("Input directory does not exist: " + inputDir);
}
try {
packer.processInputDir(texturePackerSettings);
} catch (IOException e) {
throw new RuntimeException("Error processing map: " + e.getMessage());
}
System.out.println("Finished processing.");
Gdx.app.exit();
}
}, config);
}
private static void processExtraArgs (String[] args, TiledMapPackerSettings packerSettings) {
String stripUnused = "--strip-unused";
String combineTilesets = "--combine-tilesets";
String verbose = "-v";
int length = args.length - 2;
String[] argsNotDir = new String[length];
System.arraycopy(args, 2, argsNotDir, 0, length);
for (String string : argsNotDir) {
if (stripUnused.equals(string)) {
packerSettings.stripUnusedTiles = true;
} else if (combineTilesets.equals(string)) {
packerSettings.combineTilesets = true;
} else if (verbose.equals(string)) {
packerSettings.verbose = true;
} else {
System.out.println("\nOption \"" + string + "\" not recognized.\n");
printUsage();
System.exit(0);
}
}
}
private static void printUsage () {
System.out.println("Usage: INPUTDIR [OUTPUTDIR] [--strip-unused] [--combine-tilesets] [-v]");
System.out.println("Processes a directory of Tiled .tmx maps. Unable to process maps with XML");
System.out.println("tile layer format.");
System.out.println(" --strip-unused omits all tiles that are not used. Speeds up");
System.out.println(" the processing. Smaller tilesets.");
System.out.println(" --combine-tilesets instead of creating a tileset for each map,");
System.out.println(" this combines the tilesets into some kind");
System.out.println(" of monster tileset. Has problems with tileset");
System.out.println(" location. Has problems with nested folders.");
System.out.println(" Not recommended.");
System.out.println(" -v outputs which tiles are stripped and included");
System.out.println();
}
public static class TiledMapPackerSettings {
public boolean stripUnusedTiles = false;
public boolean combineTilesets = false;
public boolean verbose = false;
public String tilesetOutputDirectory = TilesetsOutputDir;
public String atlasOutputName = AtlasOutputName;
}
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tiledmappacker;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.loaders.resolvers.AbsoluteFileHandleResolver;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.maps.MapLayer;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TiledMapTile;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer;
import com.badlogic.gdx.maps.tiled.TiledMapTileSet;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.maps.tiled.tiles.AnimatedTiledMapTile;
import com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.tools.texturepacker.TexturePacker;
import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.IntArray;
import com.badlogic.gdx.utils.ObjectMap;
/** Given one or more TMX tilemaps, packs all tileset resources used across the maps, or the resources used per map, into a
* single, or multiple (one per map), {@link TextureAtlas} and produces a new TMX file to be loaded with an AtlasTiledMapLoader
* loader. Optionally, it can keep track of unused tiles and omit them from the generated atlas, reducing the resource size.
*
* The original TMX map file will be parsed by using the {@link TmxMapLoader} loader, thus access to a valid OpenGL context is
* <b>required</b>, that's why an LwjglApplication is created by this preprocessor.
*
* The new TMX map file will contains a new property, namely "atlas", whose value will enable the AtlasTiledMapLoader to correctly
* read the associated TextureAtlas representing the tileset.
*
* @author David Fraska and others (initial implementation, tell me who you are!)
* @author Manuel Bua */
public class TiledMapPacker {
private TexturePacker packer;
private TiledMap map;
private TmxMapLoader mapLoader = new TmxMapLoader(new AbsoluteFileHandleResolver());
private TiledMapPackerSettings settings;
private static final String TilesetsOutputDir = "tileset";
static String AtlasOutputName = "packed";
private HashMap<String, IntArray> tilesetUsedIds = new HashMap<String, IntArray>();
private ObjectMap<String, TiledMapTileSet> tilesetsToPack;
static File inputDir;
static File outputDir;
private FileHandle currentDir;
private static class TmxFilter implements FilenameFilter {
public TmxFilter () {
}
@Override
public boolean accept (File dir, String name) {
return (name.endsWith(".tmx"));
}
}
private static class DirFilter implements FilenameFilter {
public DirFilter () {
}
@Override
public boolean accept (File f, String s) {
return (new File(f, s).isDirectory());
}
}
/** Constructs a new preprocessor by using the default packing settings */
public TiledMapPacker () {
this(new TiledMapPackerSettings());
}
/** Constructs a new preprocessor by using the specified packing settings */
public TiledMapPacker (TiledMapPackerSettings settings) {
this.settings = settings;
}
/** You can either run the {@link TiledMapPacker#main(String[])} method or reference this class in your own project and call
* this method. If working with libGDX sources, you can also run this file to create a run configuration then export it as a
* Runnable Jar. To run from a nightly build:
*
* <code> <br><br>
* Linux / OS X <br>
java -cp gdx.jar:gdx-natives.jar:gdx-backend-lwjgl.jar:gdx-backend-lwjgl-natives.jar:gdx-tiled-preprocessor.jar:extensions/gdx-tools/gdx-tools.jar
com.badlogic.gdx.tiledmappacker.TiledMapPacker inputDir [outputDir] [--strip-unused] [--combine-tilesets] [-v]
* <br><br>
*
* Windows <br>
java -cp gdx.jar;gdx-natives.jar;gdx-backend-lwjgl.jar;gdx-backend-lwjgl-natives.jar;gdx-tiled-preprocessor.jar;extensions/gdx-tools/gdx-tools.jar
com.badlogic.gdx.tiledmappacker.TiledMapPacker inputDir [outputDir] [--strip-unused] [--combine-tilesets] [-v]
* <br><br> </code>
*
* Keep in mind that this preprocessor will need to load the maps by using the {@link TmxMapLoader} loader and this in turn
* will need a valid OpenGL context to work.
*
* Process a directory containing TMX map files representing Tiled maps and produce multiple, or a single, TextureAtlas as well
* as new processed TMX map files, correctly referencing the generated {@link TextureAtlas} by using the "atlas" custom map
* property. */
public void processInputDir (Settings texturePackerSettings) throws IOException {
FileHandle inputDirHandle = new FileHandle(inputDir.getCanonicalPath());
File[] mapFilesInCurrentDir = inputDir.listFiles(new TmxFilter());
tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
// Processes the maps inside inputDir
for (File mapFile : mapFilesInCurrentDir) {
processSingleMap(mapFile, inputDirHandle, texturePackerSettings);
}
processSubdirectories(inputDirHandle, texturePackerSettings);
boolean combineTilesets = this.settings.combineTilesets;
if (combineTilesets == true) {
packTilesets(inputDirHandle, texturePackerSettings);
}
}
/** Looks for subdirectories inside parentHandle, processes maps in subdirectory, repeat.
* @param currentDir The directory to look for maps and other directories
* @throws IOException */
private void processSubdirectories (FileHandle currentDir, Settings texturePackerSettings) throws IOException {
File parentPath = new File(currentDir.path());
File[] directories = parentPath.listFiles(new DirFilter());
for (File directory : directories) {
currentDir = new FileHandle(directory.getCanonicalPath());
File[] mapFilesInCurrentDir = directory.listFiles(new TmxFilter());
for (File mapFile : mapFilesInCurrentDir) {
processSingleMap(mapFile, currentDir, texturePackerSettings);
}
processSubdirectories(currentDir, texturePackerSettings);
}
}
private void processSingleMap (File mapFile, FileHandle dirHandle, Settings texturePackerSettings) throws IOException {
boolean combineTilesets = this.settings.combineTilesets;
if (combineTilesets == false) {
tilesetUsedIds = new HashMap<String, IntArray>();
tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
}
map = mapLoader.load(mapFile.getCanonicalPath());
// if enabled, build a list of used tileids for the tileset used by this map
boolean stripUnusedTiles = this.settings.stripUnusedTiles;
if (stripUnusedTiles) {
stripUnusedTiles();
} else {
for (TiledMapTileSet tileset : map.getTileSets()) {
String tilesetName = tileset.getName();
if (!tilesetsToPack.containsKey(tilesetName)) {
tilesetsToPack.put(tilesetName, tileset);
}
}
}
if (combineTilesets == false) {
FileHandle tmpHandle = new FileHandle(mapFile.getName());
this.settings.atlasOutputName = tmpHandle.nameWithoutExtension();
packTilesets(dirHandle, texturePackerSettings);
}
FileHandle tmxFile = new FileHandle(mapFile.getCanonicalPath());
writeUpdatedTMX(map, tmxFile);
}
private void stripUnusedTiles () {
int mapWidth = map.getProperties().get("width", Integer.class);
int mapHeight = map.getProperties().get("height", Integer.class);
int numlayers = map.getLayers().getCount();
int bucketSize = mapWidth * mapHeight * numlayers;
Iterator<MapLayer> it = map.getLayers().iterator();
while (it.hasNext()) {
MapLayer layer = it.next();
// some layers can be plain MapLayer instances (ie. object groups), just ignore them
if (layer instanceof TiledMapTileLayer) {
TiledMapTileLayer tlayer = (TiledMapTileLayer)layer;
for (int y = 0; y < mapHeight; ++y) {
for (int x = 0; x < mapWidth; ++x) {
if (tlayer.getCell(x, y) != null) {
TiledMapTile tile = tlayer.getCell(x, y).getTile();
if (tile instanceof AnimatedTiledMapTile) {
AnimatedTiledMapTile aTile = (AnimatedTiledMapTile)tile;
for (StaticTiledMapTile t : aTile.getFrameTiles()) {
addTile(t, bucketSize);
}
}
// Adds non-animated tiles and the base animated tile
addTile(tile, bucketSize);
}
}
}
}
}
}
private void addTile (TiledMapTile tile, int bucketSize) {
int tileid = tile.getId() & ~0xE0000000;
String tilesetName = tilesetNameFromTileId(map, tileid);
IntArray usedIds = getUsedIdsBucket(tilesetName, bucketSize);
usedIds.add(tileid);
// track this tileset to be packed if not already tracked
if (!tilesetsToPack.containsKey(tilesetName)) {
tilesetsToPack.put(tilesetName, map.getTileSets().getTileSet(tilesetName));
}
}
private String tilesetNameFromTileId (TiledMap map, int tileid) {
String name = "";
if (tileid == 0) {
return "";
}
for (TiledMapTileSet tileset : map.getTileSets()) {
int firstgid = tileset.getProperties().get("firstgid", -1, Integer.class);
if (firstgid == -1) continue; // skip this tileset
if (tileid >= firstgid) {
name = tileset.getName();
} else {
return name;
}
}
return name;
}
/** Returns the usedIds bucket for the given tileset name. If it doesn't exist one will be created with the specified size if
* its > 0, else null will be returned.
*
* @param size The size to use to create a new bucket if it doesn't exist, else specify 0 or lower to return null instead
* @return a bucket */
private IntArray getUsedIdsBucket (String tilesetName, int size) {
if (tilesetUsedIds.containsKey(tilesetName)) {
return tilesetUsedIds.get(tilesetName);
}
if (size <= 0) {
return null;
}
IntArray bucket = new IntArray(size);
tilesetUsedIds.put(tilesetName, bucket);
return bucket;
}
/** Traverse the specified tilesets, optionally lookup the used ids and pass every tile image to the {@link TexturePacker},
* optionally ignoring unused tile ids */
private void packTilesets (FileHandle inputDirHandle, Settings texturePackerSettings) throws IOException {
BufferedImage tile;
Vector2 tileLocation;
Graphics g;
packer = new TexturePacker(texturePackerSettings);
for (TiledMapTileSet set : tilesetsToPack.values()) {
String tilesetName = set.getName();
System.out.println("Processing tileset " + tilesetName);
IntArray usedIds = this.settings.stripUnusedTiles ? getUsedIdsBucket(tilesetName, -1) : null;
int tileWidth = set.getProperties().get("tilewidth", Integer.class);
int tileHeight = set.getProperties().get("tileheight", Integer.class);
int firstgid = set.getProperties().get("firstgid", Integer.class);
String imageName = set.getProperties().get("imagesource", String.class);
TileSetLayout layout = new TileSetLayout(firstgid, set, inputDirHandle);
for (int gid = layout.firstgid, i = 0; i < layout.numTiles; gid++, i++) {
boolean verbose = this.settings.verbose;
if (usedIds != null && !usedIds.contains(gid)) {
if (verbose) {
System.out.println("Stripped id #" + gid + " from tileset \"" + tilesetName + "\"");
}
continue;
}
tileLocation = layout.getLocation(gid);
tile = new BufferedImage(tileWidth, tileHeight, BufferedImage.TYPE_4BYTE_ABGR);
g = tile.createGraphics();
g.drawImage(layout.image, 0, 0, tileWidth, tileHeight, (int)tileLocation.x, (int)tileLocation.y,
(int)tileLocation.x + tileWidth, (int)tileLocation.y + tileHeight, null);
if (verbose) {
System.out.println(
"Adding " + tileWidth + "x" + tileHeight + " (" + (int)tileLocation.x + ", " + (int)tileLocation.y + ")");
}
// AtlasTmxMapLoader expects every tileset's index to begin at zero for the first tile in every tileset.
// so the region's adjusted gid is (gid - layout.firstgid). firstgid will be added back in AtlasTmxMapLoader on load
int adjustedGid = gid - layout.firstgid;
final String separator = "_";
String regionName = tilesetName + separator + adjustedGid;
packer.addImage(tile, regionName);
}
}
String tilesetOutputDir = outputDir.toString() + "/" + this.settings.tilesetOutputDirectory;
File relativeTilesetOutputDir = new File(tilesetOutputDir);
File outputDirTilesets = new File(relativeTilesetOutputDir.getCanonicalPath());
outputDirTilesets.mkdirs();
packer.pack(outputDirTilesets, this.settings.atlasOutputName + ".atlas");
}
private void writeUpdatedTMX (TiledMap tiledMap, FileHandle tmxFileHandle) throws IOException {
Document doc;
DocumentBuilder docBuilder;
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
try {
docBuilder = docFactory.newDocumentBuilder();
doc = docBuilder.parse(tmxFileHandle.read());
Node map = doc.getFirstChild();
while (map.getNodeType() != Node.ELEMENT_NODE || map.getNodeName() != "map") {
if ((map = map.getNextSibling()) == null) {
throw new GdxRuntimeException("Couldn't find map node!");
}
}
setProperty(doc, map, "atlas", settings.tilesetOutputDirectory + "/" + settings.atlasOutputName + ".atlas");
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(doc);
outputDir.mkdirs();
StreamResult result = new StreamResult(new File(outputDir, tmxFileHandle.name()));
transformer.transform(source, result);
} catch (ParserConfigurationException e) {
throw new RuntimeException("ParserConfigurationException: " + e.getMessage());
} catch (SAXException e) {
throw new RuntimeException("SAXException: " + e.getMessage());
} catch (TransformerConfigurationException e) {
throw new RuntimeException("TransformerConfigurationException: " + e.getMessage());
} catch (TransformerException e) {
throw new RuntimeException("TransformerException: " + e.getMessage());
}
}
private static void setProperty (Document doc, Node parent, String name, String value) {
Node properties = getFirstChildNodeByName(parent, "properties");
Node property = getFirstChildByNameAttrValue(properties, "property", "name", name);
NamedNodeMap attributes = property.getAttributes();
Node valueNode = attributes.getNamedItem("value");
if (valueNode == null) {
valueNode = doc.createAttribute("value");
valueNode.setNodeValue(value);
attributes.setNamedItem(valueNode);
} else {
valueNode.setNodeValue(value);
}
}
/** If the child node doesn't exist, it is created. */
private static Node getFirstChildNodeByName (Node parent, String child) {
NodeList childNodes = parent.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
if (childNodes.item(i).getNodeName().equals(child)) {
return childNodes.item(i);
}
}
Node newNode = parent.getOwnerDocument().createElement(child);
if (childNodes.item(0) != null)
return parent.insertBefore(newNode, childNodes.item(0));
else
return parent.appendChild(newNode);
}
/** If the child node or attribute doesn't exist, it is created. Usage example: Node property =
* getFirstChildByAttrValue(properties, "property", "name"); */
private static Node getFirstChildByNameAttrValue (Node node, String childName, String attr, String value) {
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
if (childNodes.item(i).getNodeName().equals(childName)) {
NamedNodeMap attributes = childNodes.item(i).getAttributes();
Node attribute = attributes.getNamedItem(attr);
if (attribute.getNodeValue().equals(value)) return childNodes.item(i);
}
}
Node newNode = node.getOwnerDocument().createElement(childName);
NamedNodeMap attributes = newNode.getAttributes();
Attr nodeAttr = node.getOwnerDocument().createAttribute(attr);
nodeAttr.setNodeValue(value);
attributes.setNamedItem(nodeAttr);
if (childNodes.item(0) != null) {
return node.insertBefore(newNode, childNodes.item(0));
} else {
return node.appendChild(newNode);
}
}
/** Processes a directory of Tile Maps, compressing each tile set contained in any map once.
*
* @param args args[0]: the input directory containing the tmx files (and tile sets, relative to the path listed in the tmx
* file). args[1]: The output directory for the tmx files, should be empty before running. args[2-4] options */
public static void main (String[] args) {
final Settings texturePackerSettings = new Settings();
texturePackerSettings.paddingX = 2;
texturePackerSettings.paddingY = 2;
texturePackerSettings.edgePadding = true;
texturePackerSettings.duplicatePadding = true;
texturePackerSettings.bleed = true;
texturePackerSettings.alias = true;
texturePackerSettings.useIndexes = true;
final TiledMapPackerSettings packerSettings = new TiledMapPackerSettings();
if (args.length == 0) {
printUsage();
System.exit(0);
} else if (args.length == 1) {
inputDir = new File(args[0]);
outputDir = new File(inputDir, "../output/");
} else if (args.length == 2) {
inputDir = new File(args[0]);
outputDir = new File(args[1]);
} else {
inputDir = new File(args[0]);
outputDir = new File(args[1]);
processExtraArgs(args, packerSettings);
}
TiledMapPacker packer = new TiledMapPacker(packerSettings);
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.forceExit = false;
config.width = 100;
config.height = 50;
config.title = "TiledMapPacker";
new LwjglApplication(new ApplicationListener() {
@Override
public void resume () {
}
@Override
public void resize (int width, int height) {
}
@Override
public void render () {
}
@Override
public void pause () {
}
@Override
public void dispose () {
}
@Override
public void create () {
TiledMapPacker packer = new TiledMapPacker(packerSettings);
if (!inputDir.exists()) {
System.out.println(inputDir.getAbsolutePath());
throw new RuntimeException("Input directory does not exist: " + inputDir);
}
try {
packer.processInputDir(texturePackerSettings);
} catch (IOException e) {
throw new RuntimeException("Error processing map: " + e.getMessage());
}
System.out.println("Finished processing.");
Gdx.app.exit();
}
}, config);
}
private static void processExtraArgs (String[] args, TiledMapPackerSettings packerSettings) {
String stripUnused = "--strip-unused";
String combineTilesets = "--combine-tilesets";
String verbose = "-v";
int length = args.length - 2;
String[] argsNotDir = new String[length];
System.arraycopy(args, 2, argsNotDir, 0, length);
for (String string : argsNotDir) {
if (stripUnused.equals(string)) {
packerSettings.stripUnusedTiles = true;
} else if (combineTilesets.equals(string)) {
packerSettings.combineTilesets = true;
} else if (verbose.equals(string)) {
packerSettings.verbose = true;
} else {
System.out.println("\nOption \"" + string + "\" not recognized.\n");
printUsage();
System.exit(0);
}
}
}
private static void printUsage () {
System.out.println("Usage: INPUTDIR [OUTPUTDIR] [--strip-unused] [--combine-tilesets] [-v]");
System.out.println("Processes a directory of Tiled .tmx maps. Unable to process maps with XML");
System.out.println("tile layer format.");
System.out.println(" --strip-unused omits all tiles that are not used. Speeds up");
System.out.println(" the processing. Smaller tilesets.");
System.out.println(" --combine-tilesets instead of creating a tileset for each map,");
System.out.println(" this combines the tilesets into some kind");
System.out.println(" of monster tileset. Has problems with tileset");
System.out.println(" location. Has problems with nested folders.");
System.out.println(" Not recommended.");
System.out.println(" -v outputs which tiles are stripped and included");
System.out.println();
}
public static class TiledMapPackerSettings {
public boolean stripUnusedTiles = false;
public boolean combineTilesets = false;
public boolean verbose = false;
public String tilesetOutputDirectory = TilesetsOutputDir;
public String atlasOutputName = AtlasOutputName;
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-box2d/gdx-box2d-gwt/src/com/badlogic/gdx/physics/box2d/gwt/emu/org/jbox2d/dynamics/joints/MouseJointDef.java | /*******************************************************************************
* Copyright (c) 2013, Daniel Murphy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
package org.jbox2d.dynamics.joints;
import org.jbox2d.common.Vec2;
/** Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
*
* @author Daniel */
public class MouseJointDef extends JointDef {
/** The initial world target point. This is assumed to coincide with the body anchor initially. */
public final Vec2 target = new Vec2();
/** The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of
* the weight (multiplier * mass * gravity). */
public float maxForce;
/** The response speed. */
public float frequencyHz;
/** The damping ratio. 0 = no damping, 1 = critical damping. */
public float dampingRatio;
public MouseJointDef () {
super(JointType.MOUSE);
target.set(0, 0);
maxForce = 0;
frequencyHz = 5;
dampingRatio = .7f;
}
}
| /*******************************************************************************
* Copyright (c) 2013, Daniel Murphy
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
package org.jbox2d.dynamics.joints;
import org.jbox2d.common.Vec2;
/** Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
*
* @author Daniel */
public class MouseJointDef extends JointDef {
/** The initial world target point. This is assumed to coincide with the body anchor initially. */
public final Vec2 target = new Vec2();
/** The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of
* the weight (multiplier * mass * gravity). */
public float maxForce;
/** The response speed. */
public float frequencyHz;
/** The damping ratio. 0 = no damping, 1 = critical damping. */
public float dampingRatio;
public MouseJointDef () {
super(JointType.MOUSE);
target.set(0, 0);
maxForce = 0;
frequencyHz = 5;
dampingRatio = .7f;
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/dynamics/com/badlogic/gdx/physics/bullet/dynamics/btRotationalLimitMotor.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.math.Vector3;
public class btRotationalLimitMotor extends BulletBase {
private long swigCPtr;
protected btRotationalLimitMotor (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btRotationalLimitMotor, normally you should not need this constructor it's intended for low-level usage. */
public btRotationalLimitMotor (long cPtr, boolean cMemoryOwn) {
this("btRotationalLimitMotor", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btRotationalLimitMotor obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btRotationalLimitMotor(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setLoLimit (float value) {
DynamicsJNI.btRotationalLimitMotor_loLimit_set(swigCPtr, this, value);
}
public float getLoLimit () {
return DynamicsJNI.btRotationalLimitMotor_loLimit_get(swigCPtr, this);
}
public void setHiLimit (float value) {
DynamicsJNI.btRotationalLimitMotor_hiLimit_set(swigCPtr, this, value);
}
public float getHiLimit () {
return DynamicsJNI.btRotationalLimitMotor_hiLimit_get(swigCPtr, this);
}
public void setTargetVelocity (float value) {
DynamicsJNI.btRotationalLimitMotor_targetVelocity_set(swigCPtr, this, value);
}
public float getTargetVelocity () {
return DynamicsJNI.btRotationalLimitMotor_targetVelocity_get(swigCPtr, this);
}
public void setMaxMotorForce (float value) {
DynamicsJNI.btRotationalLimitMotor_maxMotorForce_set(swigCPtr, this, value);
}
public float getMaxMotorForce () {
return DynamicsJNI.btRotationalLimitMotor_maxMotorForce_get(swigCPtr, this);
}
public void setMaxLimitForce (float value) {
DynamicsJNI.btRotationalLimitMotor_maxLimitForce_set(swigCPtr, this, value);
}
public float getMaxLimitForce () {
return DynamicsJNI.btRotationalLimitMotor_maxLimitForce_get(swigCPtr, this);
}
public void setDamping (float value) {
DynamicsJNI.btRotationalLimitMotor_damping_set(swigCPtr, this, value);
}
public float getDamping () {
return DynamicsJNI.btRotationalLimitMotor_damping_get(swigCPtr, this);
}
public void setLimitSoftness (float value) {
DynamicsJNI.btRotationalLimitMotor_limitSoftness_set(swigCPtr, this, value);
}
public float getLimitSoftness () {
return DynamicsJNI.btRotationalLimitMotor_limitSoftness_get(swigCPtr, this);
}
public void setNormalCFM (float value) {
DynamicsJNI.btRotationalLimitMotor_normalCFM_set(swigCPtr, this, value);
}
public float getNormalCFM () {
return DynamicsJNI.btRotationalLimitMotor_normalCFM_get(swigCPtr, this);
}
public void setStopERP (float value) {
DynamicsJNI.btRotationalLimitMotor_stopERP_set(swigCPtr, this, value);
}
public float getStopERP () {
return DynamicsJNI.btRotationalLimitMotor_stopERP_get(swigCPtr, this);
}
public void setStopCFM (float value) {
DynamicsJNI.btRotationalLimitMotor_stopCFM_set(swigCPtr, this, value);
}
public float getStopCFM () {
return DynamicsJNI.btRotationalLimitMotor_stopCFM_get(swigCPtr, this);
}
public void setBounce (float value) {
DynamicsJNI.btRotationalLimitMotor_bounce_set(swigCPtr, this, value);
}
public float getBounce () {
return DynamicsJNI.btRotationalLimitMotor_bounce_get(swigCPtr, this);
}
public void setEnableMotor (boolean value) {
DynamicsJNI.btRotationalLimitMotor_enableMotor_set(swigCPtr, this, value);
}
public boolean getEnableMotor () {
return DynamicsJNI.btRotationalLimitMotor_enableMotor_get(swigCPtr, this);
}
public void setCurrentLimitError (float value) {
DynamicsJNI.btRotationalLimitMotor_currentLimitError_set(swigCPtr, this, value);
}
public float getCurrentLimitError () {
return DynamicsJNI.btRotationalLimitMotor_currentLimitError_get(swigCPtr, this);
}
public void setCurrentPosition (float value) {
DynamicsJNI.btRotationalLimitMotor_currentPosition_set(swigCPtr, this, value);
}
public float getCurrentPosition () {
return DynamicsJNI.btRotationalLimitMotor_currentPosition_get(swigCPtr, this);
}
public void setCurrentLimit (int value) {
DynamicsJNI.btRotationalLimitMotor_currentLimit_set(swigCPtr, this, value);
}
public int getCurrentLimit () {
return DynamicsJNI.btRotationalLimitMotor_currentLimit_get(swigCPtr, this);
}
public void setAccumulatedImpulse (float value) {
DynamicsJNI.btRotationalLimitMotor_accumulatedImpulse_set(swigCPtr, this, value);
}
public float getAccumulatedImpulse () {
return DynamicsJNI.btRotationalLimitMotor_accumulatedImpulse_get(swigCPtr, this);
}
public btRotationalLimitMotor () {
this(DynamicsJNI.new_btRotationalLimitMotor__SWIG_0(), true);
}
public btRotationalLimitMotor (btRotationalLimitMotor limot) {
this(DynamicsJNI.new_btRotationalLimitMotor__SWIG_1(btRotationalLimitMotor.getCPtr(limot), limot), true);
}
public boolean isLimited () {
return DynamicsJNI.btRotationalLimitMotor_isLimited(swigCPtr, this);
}
public boolean needApplyTorques () {
return DynamicsJNI.btRotationalLimitMotor_needApplyTorques(swigCPtr, this);
}
public int testLimitValue (float test_value) {
return DynamicsJNI.btRotationalLimitMotor_testLimitValue(swigCPtr, this, test_value);
}
public float solveAngularLimits (float timeStep, Vector3 axis, float jacDiagABInv, btRigidBody body0, btRigidBody body1) {
return DynamicsJNI.btRotationalLimitMotor_solveAngularLimits(swigCPtr, this, timeStep, axis, jacDiagABInv,
btRigidBody.getCPtr(body0), body0, btRigidBody.getCPtr(body1), body1);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.dynamics;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.physics.bullet.collision.*;
import com.badlogic.gdx.math.Vector3;
public class btRotationalLimitMotor extends BulletBase {
private long swigCPtr;
protected btRotationalLimitMotor (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btRotationalLimitMotor, normally you should not need this constructor it's intended for low-level usage. */
public btRotationalLimitMotor (long cPtr, boolean cMemoryOwn) {
this("btRotationalLimitMotor", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btRotationalLimitMotor obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
DynamicsJNI.delete_btRotationalLimitMotor(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setLoLimit (float value) {
DynamicsJNI.btRotationalLimitMotor_loLimit_set(swigCPtr, this, value);
}
public float getLoLimit () {
return DynamicsJNI.btRotationalLimitMotor_loLimit_get(swigCPtr, this);
}
public void setHiLimit (float value) {
DynamicsJNI.btRotationalLimitMotor_hiLimit_set(swigCPtr, this, value);
}
public float getHiLimit () {
return DynamicsJNI.btRotationalLimitMotor_hiLimit_get(swigCPtr, this);
}
public void setTargetVelocity (float value) {
DynamicsJNI.btRotationalLimitMotor_targetVelocity_set(swigCPtr, this, value);
}
public float getTargetVelocity () {
return DynamicsJNI.btRotationalLimitMotor_targetVelocity_get(swigCPtr, this);
}
public void setMaxMotorForce (float value) {
DynamicsJNI.btRotationalLimitMotor_maxMotorForce_set(swigCPtr, this, value);
}
public float getMaxMotorForce () {
return DynamicsJNI.btRotationalLimitMotor_maxMotorForce_get(swigCPtr, this);
}
public void setMaxLimitForce (float value) {
DynamicsJNI.btRotationalLimitMotor_maxLimitForce_set(swigCPtr, this, value);
}
public float getMaxLimitForce () {
return DynamicsJNI.btRotationalLimitMotor_maxLimitForce_get(swigCPtr, this);
}
public void setDamping (float value) {
DynamicsJNI.btRotationalLimitMotor_damping_set(swigCPtr, this, value);
}
public float getDamping () {
return DynamicsJNI.btRotationalLimitMotor_damping_get(swigCPtr, this);
}
public void setLimitSoftness (float value) {
DynamicsJNI.btRotationalLimitMotor_limitSoftness_set(swigCPtr, this, value);
}
public float getLimitSoftness () {
return DynamicsJNI.btRotationalLimitMotor_limitSoftness_get(swigCPtr, this);
}
public void setNormalCFM (float value) {
DynamicsJNI.btRotationalLimitMotor_normalCFM_set(swigCPtr, this, value);
}
public float getNormalCFM () {
return DynamicsJNI.btRotationalLimitMotor_normalCFM_get(swigCPtr, this);
}
public void setStopERP (float value) {
DynamicsJNI.btRotationalLimitMotor_stopERP_set(swigCPtr, this, value);
}
public float getStopERP () {
return DynamicsJNI.btRotationalLimitMotor_stopERP_get(swigCPtr, this);
}
public void setStopCFM (float value) {
DynamicsJNI.btRotationalLimitMotor_stopCFM_set(swigCPtr, this, value);
}
public float getStopCFM () {
return DynamicsJNI.btRotationalLimitMotor_stopCFM_get(swigCPtr, this);
}
public void setBounce (float value) {
DynamicsJNI.btRotationalLimitMotor_bounce_set(swigCPtr, this, value);
}
public float getBounce () {
return DynamicsJNI.btRotationalLimitMotor_bounce_get(swigCPtr, this);
}
public void setEnableMotor (boolean value) {
DynamicsJNI.btRotationalLimitMotor_enableMotor_set(swigCPtr, this, value);
}
public boolean getEnableMotor () {
return DynamicsJNI.btRotationalLimitMotor_enableMotor_get(swigCPtr, this);
}
public void setCurrentLimitError (float value) {
DynamicsJNI.btRotationalLimitMotor_currentLimitError_set(swigCPtr, this, value);
}
public float getCurrentLimitError () {
return DynamicsJNI.btRotationalLimitMotor_currentLimitError_get(swigCPtr, this);
}
public void setCurrentPosition (float value) {
DynamicsJNI.btRotationalLimitMotor_currentPosition_set(swigCPtr, this, value);
}
public float getCurrentPosition () {
return DynamicsJNI.btRotationalLimitMotor_currentPosition_get(swigCPtr, this);
}
public void setCurrentLimit (int value) {
DynamicsJNI.btRotationalLimitMotor_currentLimit_set(swigCPtr, this, value);
}
public int getCurrentLimit () {
return DynamicsJNI.btRotationalLimitMotor_currentLimit_get(swigCPtr, this);
}
public void setAccumulatedImpulse (float value) {
DynamicsJNI.btRotationalLimitMotor_accumulatedImpulse_set(swigCPtr, this, value);
}
public float getAccumulatedImpulse () {
return DynamicsJNI.btRotationalLimitMotor_accumulatedImpulse_get(swigCPtr, this);
}
public btRotationalLimitMotor () {
this(DynamicsJNI.new_btRotationalLimitMotor__SWIG_0(), true);
}
public btRotationalLimitMotor (btRotationalLimitMotor limot) {
this(DynamicsJNI.new_btRotationalLimitMotor__SWIG_1(btRotationalLimitMotor.getCPtr(limot), limot), true);
}
public boolean isLimited () {
return DynamicsJNI.btRotationalLimitMotor_isLimited(swigCPtr, this);
}
public boolean needApplyTorques () {
return DynamicsJNI.btRotationalLimitMotor_needApplyTorques(swigCPtr, this);
}
public int testLimitValue (float test_value) {
return DynamicsJNI.btRotationalLimitMotor_testLimitValue(swigCPtr, this, test_value);
}
public float solveAngularLimits (float timeStep, Vector3 axis, float jacDiagABInv, btRigidBody body0, btRigidBody body1) {
return DynamicsJNI.btRotationalLimitMotor_solveAngularLimits(swigCPtr, this, timeStep, axis, jacDiagABInv,
btRigidBody.getCPtr(body0), body0, btRigidBody.getCPtr(body1), body1);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/widgets/ResizableWidgetCollection.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.badlogic.gdx.backends.gwt.widgets;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
/** A collection of {@link ResizableWidget} that periodically checks the outer dimensions of a widget and redraws it as necessary.
* Every {@link ResizableWidgetCollection} uses a timer, so consider the cost when adding one.
*
* Typically, a {@link ResizableWidgetCollection} is only needed if you expect your widgets to resize based on window resizing or
* other events. Fixed sized Widgets do not need to be added to a {@link ResizableWidgetCollection} as they cannot be resized. */
public class ResizableWidgetCollection implements ResizeHandler, Iterable<ResizableWidget> {
/** Information about a widgets size. */
static class ResizableWidgetInfo {
private ResizableWidget widget;
private int curOffsetHeight = 0;
private int curOffsetWidth = 0;
private int curClientHeight = 0;
private int curClientWidth = 0;
/** Constructor.
*
* @param widget the widget that will be monitored */
public ResizableWidgetInfo (ResizableWidget widget) {
this.widget = widget;
updateSizes();
}
public int getClientHeight () {
return curClientHeight;
}
public int getClientWidth () {
return curClientWidth;
}
public int getOffsetHeight () {
return curOffsetHeight;
}
public int getOffsetWidth () {
return curOffsetWidth;
}
/** Update the current sizes.
*
* @return true if the sizes changed, false if not. */
public boolean updateSizes () {
int offsetWidth = widget.getElement().getOffsetWidth();
int offsetHeight = widget.getElement().getOffsetHeight();
int clientWidth = widget.getElement().getClientWidth();
int clientHeight = widget.getElement().getClientHeight();
if (offsetWidth != curOffsetWidth || offsetHeight != curOffsetHeight || clientWidth != curClientWidth
|| clientHeight != curClientHeight) {
this.curOffsetWidth = offsetWidth;
this.curOffsetHeight = offsetHeight;
this.curClientWidth = clientWidth;
this.curClientHeight = clientHeight;
return true;
}
return false;
}
}
/** The default delay between resize checks in milliseconds. */
private static final int DEFAULT_RESIZE_CHECK_DELAY = 400;
/** A static {@link ResizableWidgetCollection} that can be used in most cases. */
private static ResizableWidgetCollection staticCollection = null;
/** Get the globally accessible {@link ResizableWidgetCollection}. In most cases, the global collection can be used for all
* {@link ResizableWidget}s.
*
* @return the global {@link ResizableWidgetCollection} */
public static ResizableWidgetCollection get () {
if (staticCollection == null) {
staticCollection = new ResizableWidgetCollection();
}
return staticCollection;
}
/** The timer used to periodically compare the dimensions of elements to their old dimensions. */
private Timer resizeCheckTimer = new Timer() {
@Override
public void run () {
// Ignore changes that result from window resize events
if (windowHeight != Window.getClientHeight() || windowWidth != Window.getClientWidth()) {
windowHeight = Window.getClientHeight();
windowWidth = Window.getClientWidth();
schedule(resizeCheckDelay);
return;
}
// Look for elements that have new dimensions
checkWidgetSize();
// Start checking again
if (resizeCheckingEnabled) {
schedule(resizeCheckDelay);
}
}
};
/** A hash map of the resizable widgets this collection is checking. */
private final Map<ResizableWidget, ResizableWidgetInfo> widgets = new HashMap<>();
/** The current window height. */
int windowHeight = 0;
/** The current window width. */
int windowWidth = 0;
/** The hook used to remove the window handler. */
private HandlerRegistration windowHandler;
/** The delay between resize checks. */
int resizeCheckDelay = DEFAULT_RESIZE_CHECK_DELAY;
/** A boolean indicating that resize checking should run. */
boolean resizeCheckingEnabled;
/** Create a ResizableWidget. */
public ResizableWidgetCollection () {
this(DEFAULT_RESIZE_CHECK_DELAY);
}
/** Constructor.
*
* @param resizeCheckingEnabled false to disable resize checking */
public ResizableWidgetCollection (boolean resizeCheckingEnabled) {
this(DEFAULT_RESIZE_CHECK_DELAY, resizeCheckingEnabled);
}
/** Constructor.
*
* @param resizeCheckDelay the delay between checks in milliseconds */
public ResizableWidgetCollection (int resizeCheckDelay) {
this(resizeCheckDelay, true);
}
/** Constructor. */
protected ResizableWidgetCollection (int resizeCheckDelay, boolean resizeCheckingEnabled) {
setResizeCheckDelay(resizeCheckDelay);
setResizeCheckingEnabled(resizeCheckingEnabled);
}
/** Add a resizable widget to the collection.
*
* @param widget the resizable widget to add */
public void add (ResizableWidget widget) {
widgets.put(widget, new ResizableWidgetInfo(widget));
}
/** Check to see if any Widgets have been resized and call their handlers appropriately. */
public void checkWidgetSize () {
for (Map.Entry<ResizableWidget, ResizableWidgetInfo> entry : widgets.entrySet()) {
ResizableWidget widget = entry.getKey();
ResizableWidgetInfo info = entry.getValue();
// Call the onResize method only if the widget is attached
if (info.updateSizes()) {
// Check that the offset width and height are greater than 0.
if (info.getOffsetWidth() > 0 && info.getOffsetHeight() > 0 && widget.isAttached()) {
// Send the client dimensions, which is the space available for
// rendering.
widget.onResize(info.getOffsetWidth(), info.getOffsetHeight());
}
}
}
}
/** Get the delay between resize checks in milliseconds.
*
* @return the resize check delay */
public int getResizeCheckDelay () {
return resizeCheckDelay;
}
/** Check whether or not resize checking is enabled.
*
* @return true is resize checking is enabled */
public boolean isResizeCheckingEnabled () {
return resizeCheckingEnabled;
}
public Iterator<ResizableWidget> iterator () {
return widgets.keySet().iterator();
}
/** Remove a {@link ResizableWidget} from the collection.
*
* @param widget the widget to remove */
public void remove (ResizableWidget widget) {
widgets.remove(widget);
}
/** Set the delay between resize checks in milliseconds.
*
* @param resizeCheckDelay the new delay */
public void setResizeCheckDelay (int resizeCheckDelay) {
this.resizeCheckDelay = resizeCheckDelay;
}
/** Set whether resize checking is enabled. If disabled, elements will still be resized on window events, but the timer will
* not check their dimensions periodically.
*
* @param enabled true to enable the resize checking timer */
public void setResizeCheckingEnabled (boolean enabled) {
if (enabled && !resizeCheckingEnabled) {
resizeCheckingEnabled = true;
if (windowHandler == null) {
windowHandler = Window.addResizeHandler(this);
}
resizeCheckTimer.schedule(resizeCheckDelay);
} else if (!enabled && resizeCheckingEnabled) {
resizeCheckingEnabled = false;
if (windowHandler != null) {
windowHandler.removeHandler();
windowHandler = null;
}
resizeCheckTimer.cancel();
}
}
/** Inform the {@link ResizableWidgetCollection} that the size of a widget has changed and already been redrawn. This will
* prevent the widget from being redrawn on the next loop.
*
* @param widget the widget's size that changed */
public void updateWidgetSize (ResizableWidget widget) {
if (!widget.isAttached()) {
return;
}
ResizableWidgetInfo info = widgets.get(widget);
if (info != null) {
info.updateSizes();
}
}
/** Called when the browser window is resized. */
@Override
public void onResize (ResizeEvent event) {
checkWidgetSize();
}
}
| /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.badlogic.gdx.backends.gwt.widgets;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
/** A collection of {@link ResizableWidget} that periodically checks the outer dimensions of a widget and redraws it as necessary.
* Every {@link ResizableWidgetCollection} uses a timer, so consider the cost when adding one.
*
* Typically, a {@link ResizableWidgetCollection} is only needed if you expect your widgets to resize based on window resizing or
* other events. Fixed sized Widgets do not need to be added to a {@link ResizableWidgetCollection} as they cannot be resized. */
public class ResizableWidgetCollection implements ResizeHandler, Iterable<ResizableWidget> {
/** Information about a widgets size. */
static class ResizableWidgetInfo {
private ResizableWidget widget;
private int curOffsetHeight = 0;
private int curOffsetWidth = 0;
private int curClientHeight = 0;
private int curClientWidth = 0;
/** Constructor.
*
* @param widget the widget that will be monitored */
public ResizableWidgetInfo (ResizableWidget widget) {
this.widget = widget;
updateSizes();
}
public int getClientHeight () {
return curClientHeight;
}
public int getClientWidth () {
return curClientWidth;
}
public int getOffsetHeight () {
return curOffsetHeight;
}
public int getOffsetWidth () {
return curOffsetWidth;
}
/** Update the current sizes.
*
* @return true if the sizes changed, false if not. */
public boolean updateSizes () {
int offsetWidth = widget.getElement().getOffsetWidth();
int offsetHeight = widget.getElement().getOffsetHeight();
int clientWidth = widget.getElement().getClientWidth();
int clientHeight = widget.getElement().getClientHeight();
if (offsetWidth != curOffsetWidth || offsetHeight != curOffsetHeight || clientWidth != curClientWidth
|| clientHeight != curClientHeight) {
this.curOffsetWidth = offsetWidth;
this.curOffsetHeight = offsetHeight;
this.curClientWidth = clientWidth;
this.curClientHeight = clientHeight;
return true;
}
return false;
}
}
/** The default delay between resize checks in milliseconds. */
private static final int DEFAULT_RESIZE_CHECK_DELAY = 400;
/** A static {@link ResizableWidgetCollection} that can be used in most cases. */
private static ResizableWidgetCollection staticCollection = null;
/** Get the globally accessible {@link ResizableWidgetCollection}. In most cases, the global collection can be used for all
* {@link ResizableWidget}s.
*
* @return the global {@link ResizableWidgetCollection} */
public static ResizableWidgetCollection get () {
if (staticCollection == null) {
staticCollection = new ResizableWidgetCollection();
}
return staticCollection;
}
/** The timer used to periodically compare the dimensions of elements to their old dimensions. */
private Timer resizeCheckTimer = new Timer() {
@Override
public void run () {
// Ignore changes that result from window resize events
if (windowHeight != Window.getClientHeight() || windowWidth != Window.getClientWidth()) {
windowHeight = Window.getClientHeight();
windowWidth = Window.getClientWidth();
schedule(resizeCheckDelay);
return;
}
// Look for elements that have new dimensions
checkWidgetSize();
// Start checking again
if (resizeCheckingEnabled) {
schedule(resizeCheckDelay);
}
}
};
/** A hash map of the resizable widgets this collection is checking. */
private final Map<ResizableWidget, ResizableWidgetInfo> widgets = new HashMap<>();
/** The current window height. */
int windowHeight = 0;
/** The current window width. */
int windowWidth = 0;
/** The hook used to remove the window handler. */
private HandlerRegistration windowHandler;
/** The delay between resize checks. */
int resizeCheckDelay = DEFAULT_RESIZE_CHECK_DELAY;
/** A boolean indicating that resize checking should run. */
boolean resizeCheckingEnabled;
/** Create a ResizableWidget. */
public ResizableWidgetCollection () {
this(DEFAULT_RESIZE_CHECK_DELAY);
}
/** Constructor.
*
* @param resizeCheckingEnabled false to disable resize checking */
public ResizableWidgetCollection (boolean resizeCheckingEnabled) {
this(DEFAULT_RESIZE_CHECK_DELAY, resizeCheckingEnabled);
}
/** Constructor.
*
* @param resizeCheckDelay the delay between checks in milliseconds */
public ResizableWidgetCollection (int resizeCheckDelay) {
this(resizeCheckDelay, true);
}
/** Constructor. */
protected ResizableWidgetCollection (int resizeCheckDelay, boolean resizeCheckingEnabled) {
setResizeCheckDelay(resizeCheckDelay);
setResizeCheckingEnabled(resizeCheckingEnabled);
}
/** Add a resizable widget to the collection.
*
* @param widget the resizable widget to add */
public void add (ResizableWidget widget) {
widgets.put(widget, new ResizableWidgetInfo(widget));
}
/** Check to see if any Widgets have been resized and call their handlers appropriately. */
public void checkWidgetSize () {
for (Map.Entry<ResizableWidget, ResizableWidgetInfo> entry : widgets.entrySet()) {
ResizableWidget widget = entry.getKey();
ResizableWidgetInfo info = entry.getValue();
// Call the onResize method only if the widget is attached
if (info.updateSizes()) {
// Check that the offset width and height are greater than 0.
if (info.getOffsetWidth() > 0 && info.getOffsetHeight() > 0 && widget.isAttached()) {
// Send the client dimensions, which is the space available for
// rendering.
widget.onResize(info.getOffsetWidth(), info.getOffsetHeight());
}
}
}
}
/** Get the delay between resize checks in milliseconds.
*
* @return the resize check delay */
public int getResizeCheckDelay () {
return resizeCheckDelay;
}
/** Check whether or not resize checking is enabled.
*
* @return true is resize checking is enabled */
public boolean isResizeCheckingEnabled () {
return resizeCheckingEnabled;
}
public Iterator<ResizableWidget> iterator () {
return widgets.keySet().iterator();
}
/** Remove a {@link ResizableWidget} from the collection.
*
* @param widget the widget to remove */
public void remove (ResizableWidget widget) {
widgets.remove(widget);
}
/** Set the delay between resize checks in milliseconds.
*
* @param resizeCheckDelay the new delay */
public void setResizeCheckDelay (int resizeCheckDelay) {
this.resizeCheckDelay = resizeCheckDelay;
}
/** Set whether resize checking is enabled. If disabled, elements will still be resized on window events, but the timer will
* not check their dimensions periodically.
*
* @param enabled true to enable the resize checking timer */
public void setResizeCheckingEnabled (boolean enabled) {
if (enabled && !resizeCheckingEnabled) {
resizeCheckingEnabled = true;
if (windowHandler == null) {
windowHandler = Window.addResizeHandler(this);
}
resizeCheckTimer.schedule(resizeCheckDelay);
} else if (!enabled && resizeCheckingEnabled) {
resizeCheckingEnabled = false;
if (windowHandler != null) {
windowHandler.removeHandler();
windowHandler = null;
}
resizeCheckTimer.cancel();
}
}
/** Inform the {@link ResizableWidgetCollection} that the size of a widget has changed and already been redrawn. This will
* prevent the widget from being redrawn on the next loop.
*
* @param widget the widget's size that changed */
public void updateWidgetSize (ResizableWidget widget) {
if (!widget.isAttached()) {
return;
}
ResizableWidgetInfo info = widgets.get(widget);
if (info != null) {
info.updateSizes();
}
}
/** Called when the browser window is resized. */
@Override
public void onResize (ResizeEvent event) {
checkWidgetSize();
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/btCollisionWorld.java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Matrix4;
public class btCollisionWorld extends BulletBase {
private long swigCPtr;
protected btCollisionWorld (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btCollisionWorld, normally you should not need this constructor it's intended for low-level usage. */
public btCollisionWorld (long cPtr, boolean cMemoryOwn) {
this("btCollisionWorld", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btCollisionWorld obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_btCollisionWorld(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public btCollisionWorld (btDispatcher dispatcher, btBroadphaseInterface broadphasePairCache,
btCollisionConfiguration collisionConfiguration) {
this(CollisionJNI.new_btCollisionWorld(btDispatcher.getCPtr(dispatcher), dispatcher,
btBroadphaseInterface.getCPtr(broadphasePairCache), broadphasePairCache,
btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
}
public void setBroadphase (btBroadphaseInterface pairCache) {
CollisionJNI.btCollisionWorld_setBroadphase(swigCPtr, this, btBroadphaseInterface.getCPtr(pairCache), pairCache);
}
public btBroadphaseInterface getBroadphaseConst () {
long cPtr = CollisionJNI.btCollisionWorld_getBroadphaseConst(swigCPtr, this);
return (cPtr == 0) ? null : new btBroadphaseInterface(cPtr, false);
}
public btBroadphaseInterface getBroadphase () {
long cPtr = CollisionJNI.btCollisionWorld_getBroadphase(swigCPtr, this);
return (cPtr == 0) ? null : new btBroadphaseInterface(cPtr, false);
}
public btOverlappingPairCache getPairCache () {
long cPtr = CollisionJNI.btCollisionWorld_getPairCache(swigCPtr, this);
return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
}
public btDispatcher getDispatcher () {
long cPtr = CollisionJNI.btCollisionWorld_getDispatcher(swigCPtr, this);
return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
}
public btDispatcher getDispatcherConst () {
long cPtr = CollisionJNI.btCollisionWorld_getDispatcherConst(swigCPtr, this);
return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
}
public void updateSingleAabb (btCollisionObject colObj) {
CollisionJNI.btCollisionWorld_updateSingleAabb(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj);
}
public void updateAabbs () {
CollisionJNI.btCollisionWorld_updateAabbs(swigCPtr, this);
}
public void computeOverlappingPairs () {
CollisionJNI.btCollisionWorld_computeOverlappingPairs(swigCPtr, this);
}
public void setDebugDrawer (btIDebugDraw debugDrawer) {
CollisionJNI.btCollisionWorld_setDebugDrawer(swigCPtr, this, btIDebugDraw.getCPtr(debugDrawer), debugDrawer);
}
public btIDebugDraw getDebugDrawer () {
long cPtr = CollisionJNI.btCollisionWorld_getDebugDrawer(swigCPtr, this);
return (cPtr == 0) ? null : new btIDebugDraw(cPtr, false);
}
public void debugDrawWorld () {
CollisionJNI.btCollisionWorld_debugDrawWorld(swigCPtr, this);
}
public void debugDrawObject (Matrix4 worldTransform, btCollisionShape shape, Vector3 color) {
CollisionJNI.btCollisionWorld_debugDrawObject(swigCPtr, this, worldTransform, btCollisionShape.getCPtr(shape), shape,
color);
}
public int getNumCollisionObjects () {
return CollisionJNI.btCollisionWorld_getNumCollisionObjects(swigCPtr, this);
}
public void rayTest (Vector3 rayFromWorld, Vector3 rayToWorld, RayResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_rayTest(swigCPtr, this, rayFromWorld, rayToWorld, RayResultCallback.getCPtr(resultCallback),
resultCallback);
}
public void convexSweepTest (btConvexShape castShape, Matrix4 from, Matrix4 to, ConvexResultCallback resultCallback,
float allowedCcdPenetration) {
CollisionJNI.btCollisionWorld_convexSweepTest__SWIG_0(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, from, to,
ConvexResultCallback.getCPtr(resultCallback), resultCallback, allowedCcdPenetration);
}
public void convexSweepTest (btConvexShape castShape, Matrix4 from, Matrix4 to, ConvexResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_convexSweepTest__SWIG_1(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, from, to,
ConvexResultCallback.getCPtr(resultCallback), resultCallback);
}
public void contactTest (btCollisionObject colObj, ContactResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_contactTest(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj,
ContactResultCallback.getCPtr(resultCallback), resultCallback);
}
public void contactPairTest (btCollisionObject colObjA, btCollisionObject colObjB, ContactResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_contactPairTest(swigCPtr, this, btCollisionObject.getCPtr(colObjA), colObjA,
btCollisionObject.getCPtr(colObjB), colObjB, ContactResultCallback.getCPtr(resultCallback), resultCallback);
}
public static void rayTestSingle (Matrix4 rayFromTrans, Matrix4 rayToTrans, btCollisionObject collisionObject,
btCollisionShape collisionShape, Matrix4 colObjWorldTransform, RayResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_rayTestSingle(rayFromTrans, rayToTrans, btCollisionObject.getCPtr(collisionObject),
collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape, colObjWorldTransform,
RayResultCallback.getCPtr(resultCallback), resultCallback);
}
public static void rayTestSingleInternal (Matrix4 rayFromTrans, Matrix4 rayToTrans,
btCollisionObjectWrapper collisionObjectWrap, RayResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_rayTestSingleInternal(rayFromTrans, rayToTrans,
btCollisionObjectWrapper.getCPtr(collisionObjectWrap), collisionObjectWrap, RayResultCallback.getCPtr(resultCallback),
resultCallback);
}
public static void objectQuerySingle (btConvexShape castShape, Matrix4 rayFromTrans, Matrix4 rayToTrans,
btCollisionObject collisionObject, btCollisionShape collisionShape, Matrix4 colObjWorldTransform,
ConvexResultCallback resultCallback, float allowedPenetration) {
CollisionJNI.btCollisionWorld_objectQuerySingle(btConvexShape.getCPtr(castShape), castShape, rayFromTrans, rayToTrans,
btCollisionObject.getCPtr(collisionObject), collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape,
colObjWorldTransform, ConvexResultCallback.getCPtr(resultCallback), resultCallback, allowedPenetration);
}
public static void objectQuerySingleInternal (btConvexShape castShape, Matrix4 convexFromTrans, Matrix4 convexToTrans,
btCollisionObjectWrapper colObjWrap, ConvexResultCallback resultCallback, float allowedPenetration) {
CollisionJNI.btCollisionWorld_objectQuerySingleInternal(btConvexShape.getCPtr(castShape), castShape, convexFromTrans,
convexToTrans, btCollisionObjectWrapper.getCPtr(colObjWrap), colObjWrap, ConvexResultCallback.getCPtr(resultCallback),
resultCallback, allowedPenetration);
}
public void addCollisionObject (btCollisionObject collisionObject, int collisionFilterGroup, int collisionFilterMask) {
CollisionJNI.btCollisionWorld_addCollisionObject__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject, collisionFilterGroup, collisionFilterMask);
}
public void addCollisionObject (btCollisionObject collisionObject, int collisionFilterGroup) {
CollisionJNI.btCollisionWorld_addCollisionObject__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject, collisionFilterGroup);
}
public void addCollisionObject (btCollisionObject collisionObject) {
CollisionJNI.btCollisionWorld_addCollisionObject__SWIG_2(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject);
}
public btCollisionObjectArray getCollisionObjectArray () {
return new btCollisionObjectArray(CollisionJNI.btCollisionWorld_getCollisionObjectArray(swigCPtr, this), false);
}
public btCollisionObjectArray getCollisionObjectArrayConst () {
return new btCollisionObjectArray(CollisionJNI.btCollisionWorld_getCollisionObjectArrayConst(swigCPtr, this), false);
}
public void removeCollisionObject (btCollisionObject collisionObject) {
CollisionJNI.btCollisionWorld_removeCollisionObject(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject);
}
public void performDiscreteCollisionDetection () {
CollisionJNI.btCollisionWorld_performDiscreteCollisionDetection(swigCPtr, this);
}
public btDispatcherInfo getDispatchInfo () {
return new btDispatcherInfo(CollisionJNI.btCollisionWorld_getDispatchInfo(swigCPtr, this), false);
}
public btDispatcherInfo getDispatchInfoConst () {
return new btDispatcherInfo(CollisionJNI.btCollisionWorld_getDispatchInfoConst(swigCPtr, this), false);
}
public boolean getForceUpdateAllAabbs () {
return CollisionJNI.btCollisionWorld_getForceUpdateAllAabbs(swigCPtr, this);
}
public void setForceUpdateAllAabbs (boolean forceUpdateAllAabbs) {
CollisionJNI.btCollisionWorld_setForceUpdateAllAabbs(swigCPtr, this, forceUpdateAllAabbs);
}
public void serialize (btSerializer serializer) {
CollisionJNI.btCollisionWorld_serialize(swigCPtr, this, btSerializer.getCPtr(serializer), serializer);
}
}
| /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Matrix4;
public class btCollisionWorld extends BulletBase {
private long swigCPtr;
protected btCollisionWorld (final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new btCollisionWorld, normally you should not need this constructor it's intended for low-level usage. */
public btCollisionWorld (long cPtr, boolean cMemoryOwn) {
this("btCollisionWorld", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset (long cPtr, boolean cMemoryOwn) {
if (!destroyed) destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr (btCollisionWorld obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize () throws Throwable {
if (!destroyed) destroy();
super.finalize();
}
@Override
protected synchronized void delete () {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_btCollisionWorld(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public btCollisionWorld (btDispatcher dispatcher, btBroadphaseInterface broadphasePairCache,
btCollisionConfiguration collisionConfiguration) {
this(CollisionJNI.new_btCollisionWorld(btDispatcher.getCPtr(dispatcher), dispatcher,
btBroadphaseInterface.getCPtr(broadphasePairCache), broadphasePairCache,
btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
}
public void setBroadphase (btBroadphaseInterface pairCache) {
CollisionJNI.btCollisionWorld_setBroadphase(swigCPtr, this, btBroadphaseInterface.getCPtr(pairCache), pairCache);
}
public btBroadphaseInterface getBroadphaseConst () {
long cPtr = CollisionJNI.btCollisionWorld_getBroadphaseConst(swigCPtr, this);
return (cPtr == 0) ? null : new btBroadphaseInterface(cPtr, false);
}
public btBroadphaseInterface getBroadphase () {
long cPtr = CollisionJNI.btCollisionWorld_getBroadphase(swigCPtr, this);
return (cPtr == 0) ? null : new btBroadphaseInterface(cPtr, false);
}
public btOverlappingPairCache getPairCache () {
long cPtr = CollisionJNI.btCollisionWorld_getPairCache(swigCPtr, this);
return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
}
public btDispatcher getDispatcher () {
long cPtr = CollisionJNI.btCollisionWorld_getDispatcher(swigCPtr, this);
return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
}
public btDispatcher getDispatcherConst () {
long cPtr = CollisionJNI.btCollisionWorld_getDispatcherConst(swigCPtr, this);
return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
}
public void updateSingleAabb (btCollisionObject colObj) {
CollisionJNI.btCollisionWorld_updateSingleAabb(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj);
}
public void updateAabbs () {
CollisionJNI.btCollisionWorld_updateAabbs(swigCPtr, this);
}
public void computeOverlappingPairs () {
CollisionJNI.btCollisionWorld_computeOverlappingPairs(swigCPtr, this);
}
public void setDebugDrawer (btIDebugDraw debugDrawer) {
CollisionJNI.btCollisionWorld_setDebugDrawer(swigCPtr, this, btIDebugDraw.getCPtr(debugDrawer), debugDrawer);
}
public btIDebugDraw getDebugDrawer () {
long cPtr = CollisionJNI.btCollisionWorld_getDebugDrawer(swigCPtr, this);
return (cPtr == 0) ? null : new btIDebugDraw(cPtr, false);
}
public void debugDrawWorld () {
CollisionJNI.btCollisionWorld_debugDrawWorld(swigCPtr, this);
}
public void debugDrawObject (Matrix4 worldTransform, btCollisionShape shape, Vector3 color) {
CollisionJNI.btCollisionWorld_debugDrawObject(swigCPtr, this, worldTransform, btCollisionShape.getCPtr(shape), shape,
color);
}
public int getNumCollisionObjects () {
return CollisionJNI.btCollisionWorld_getNumCollisionObjects(swigCPtr, this);
}
public void rayTest (Vector3 rayFromWorld, Vector3 rayToWorld, RayResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_rayTest(swigCPtr, this, rayFromWorld, rayToWorld, RayResultCallback.getCPtr(resultCallback),
resultCallback);
}
public void convexSweepTest (btConvexShape castShape, Matrix4 from, Matrix4 to, ConvexResultCallback resultCallback,
float allowedCcdPenetration) {
CollisionJNI.btCollisionWorld_convexSweepTest__SWIG_0(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, from, to,
ConvexResultCallback.getCPtr(resultCallback), resultCallback, allowedCcdPenetration);
}
public void convexSweepTest (btConvexShape castShape, Matrix4 from, Matrix4 to, ConvexResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_convexSweepTest__SWIG_1(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, from, to,
ConvexResultCallback.getCPtr(resultCallback), resultCallback);
}
public void contactTest (btCollisionObject colObj, ContactResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_contactTest(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj,
ContactResultCallback.getCPtr(resultCallback), resultCallback);
}
public void contactPairTest (btCollisionObject colObjA, btCollisionObject colObjB, ContactResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_contactPairTest(swigCPtr, this, btCollisionObject.getCPtr(colObjA), colObjA,
btCollisionObject.getCPtr(colObjB), colObjB, ContactResultCallback.getCPtr(resultCallback), resultCallback);
}
public static void rayTestSingle (Matrix4 rayFromTrans, Matrix4 rayToTrans, btCollisionObject collisionObject,
btCollisionShape collisionShape, Matrix4 colObjWorldTransform, RayResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_rayTestSingle(rayFromTrans, rayToTrans, btCollisionObject.getCPtr(collisionObject),
collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape, colObjWorldTransform,
RayResultCallback.getCPtr(resultCallback), resultCallback);
}
public static void rayTestSingleInternal (Matrix4 rayFromTrans, Matrix4 rayToTrans,
btCollisionObjectWrapper collisionObjectWrap, RayResultCallback resultCallback) {
CollisionJNI.btCollisionWorld_rayTestSingleInternal(rayFromTrans, rayToTrans,
btCollisionObjectWrapper.getCPtr(collisionObjectWrap), collisionObjectWrap, RayResultCallback.getCPtr(resultCallback),
resultCallback);
}
public static void objectQuerySingle (btConvexShape castShape, Matrix4 rayFromTrans, Matrix4 rayToTrans,
btCollisionObject collisionObject, btCollisionShape collisionShape, Matrix4 colObjWorldTransform,
ConvexResultCallback resultCallback, float allowedPenetration) {
CollisionJNI.btCollisionWorld_objectQuerySingle(btConvexShape.getCPtr(castShape), castShape, rayFromTrans, rayToTrans,
btCollisionObject.getCPtr(collisionObject), collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape,
colObjWorldTransform, ConvexResultCallback.getCPtr(resultCallback), resultCallback, allowedPenetration);
}
public static void objectQuerySingleInternal (btConvexShape castShape, Matrix4 convexFromTrans, Matrix4 convexToTrans,
btCollisionObjectWrapper colObjWrap, ConvexResultCallback resultCallback, float allowedPenetration) {
CollisionJNI.btCollisionWorld_objectQuerySingleInternal(btConvexShape.getCPtr(castShape), castShape, convexFromTrans,
convexToTrans, btCollisionObjectWrapper.getCPtr(colObjWrap), colObjWrap, ConvexResultCallback.getCPtr(resultCallback),
resultCallback, allowedPenetration);
}
public void addCollisionObject (btCollisionObject collisionObject, int collisionFilterGroup, int collisionFilterMask) {
CollisionJNI.btCollisionWorld_addCollisionObject__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject, collisionFilterGroup, collisionFilterMask);
}
public void addCollisionObject (btCollisionObject collisionObject, int collisionFilterGroup) {
CollisionJNI.btCollisionWorld_addCollisionObject__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject, collisionFilterGroup);
}
public void addCollisionObject (btCollisionObject collisionObject) {
CollisionJNI.btCollisionWorld_addCollisionObject__SWIG_2(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject);
}
public btCollisionObjectArray getCollisionObjectArray () {
return new btCollisionObjectArray(CollisionJNI.btCollisionWorld_getCollisionObjectArray(swigCPtr, this), false);
}
public btCollisionObjectArray getCollisionObjectArrayConst () {
return new btCollisionObjectArray(CollisionJNI.btCollisionWorld_getCollisionObjectArrayConst(swigCPtr, this), false);
}
public void removeCollisionObject (btCollisionObject collisionObject) {
CollisionJNI.btCollisionWorld_removeCollisionObject(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
collisionObject);
}
public void performDiscreteCollisionDetection () {
CollisionJNI.btCollisionWorld_performDiscreteCollisionDetection(swigCPtr, this);
}
public btDispatcherInfo getDispatchInfo () {
return new btDispatcherInfo(CollisionJNI.btCollisionWorld_getDispatchInfo(swigCPtr, this), false);
}
public btDispatcherInfo getDispatchInfoConst () {
return new btDispatcherInfo(CollisionJNI.btCollisionWorld_getDispatchInfoConst(swigCPtr, this), false);
}
public boolean getForceUpdateAllAabbs () {
return CollisionJNI.btCollisionWorld_getForceUpdateAllAabbs(swigCPtr, this);
}
public void setForceUpdateAllAabbs (boolean forceUpdateAllAabbs) {
CollisionJNI.btCollisionWorld_setForceUpdateAllAabbs(swigCPtr, this, forceUpdateAllAabbs);
}
public void serialize (btSerializer serializer) {
CollisionJNI.btCollisionWorld_serialize(swigCPtr, this, btSerializer.getCPtr(serializer), serializer);
}
}
| -1 |
libgdx/libgdx | 7,247 | Upgrade Gdx Setup to generate projects using Gradle 8.4 | Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | obigu | 2023-10-05T12:50:39Z | 2023-12-04T22:53:11Z | 3335e7598fb061cadc6472e8f4dffe811d438ab2 | ddc75209f30c3f6aa23d8888604663b09784320a | Upgrade Gdx Setup to generate projects using Gradle 8.4. Not to merge before #7246.
The only required change has been to remove the following line from the `html` module `build.gradle` as the property doesn't appear to exist on the latest GWT plugin version.
`checkGwt.war = file("war")`
Would be great if somebody could confirm how important this line is.
**EDITED**
Another change has been made to disable R8 full mode which is set to `true` by default on AGP 8 (was `false` https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes). Main issue with full mode is it removes implicit empty constructors which are quite commonly used by libGDX `ReflectionPool` (espcially Scene 2d classes). Should be possible to enable Full mode by adding some Proguard rules to keep the necessary empty constructors but it's not easy to make sure some will be missing and unexpected runtime errors occur. For the moment I think it's best to keep using old well tested Proguard rules by default. | ./tests/gdx-tests-android/assets/data/tile.png | PNG
IHDR # # ٳY sRGB bKGD pHYs tIMEre iTXtComment Created with GIMPd.e IDATXÍX9v@#r5ҥKk#pƮli. H߿'V6sw0_803_7\Nqgn
0<:
uq% qm= ҦK:̌Lѫ#yxHtx
ه0jW@4VVS<!gfb9k=<>
p%٠OC,Q3jbplB= 30% ڰL?Sژ<P6tFF=kz. :`5j}CL=2гaV62}9$a<#I4cu
ljm40DfU)J);e0{{o=.t;o2y$C*GN.$q(#l:C^Knd7IS!kR%h5cmMG\%]ϯS83;ذwlp"7g#UߧR!QI)ypS
CsETڡi#}T\4뱧n#~'"HEtjZmg5NmDX4Gw8ڜ%A7AAMǖV:A9538N?r
ٴTV}o )4!=i=,ib{UX/D/_L͐& |