diff --git a/.github/ISSUE_TEMPLATE/000-report-bug.yml b/.github/ISSUE_TEMPLATE/000-report-bug.yml index c9e296ed7..4ba0b5f20 100644 --- a/.github/ISSUE_TEMPLATE/000-report-bug.yml +++ b/.github/ISSUE_TEMPLATE/000-report-bug.yml @@ -15,7 +15,7 @@ body: attributes: label: Cleanroom Version description: "What version of the Cleanroom are you using?" - placeholder: "Example: 15.24.0.3000" + placeholder: "Example: 0.2.4-alpha" validations: required: true - type: dropdown @@ -25,13 +25,11 @@ body: description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version. options: - Java 8 - - Java 9 - - Java 11 - - Java 17 - - Java 19 - - Java 20 - Java 21 - Java 22 + - Java 23 + - Java 24 (Release Candidate) + - Java 25 (Early Access) - Other (Please Specify) validations: required: true @@ -65,14 +63,6 @@ body: placeholder: "List of mods goes here" validations: required: true - - type: textarea - id: notes - attributes: - label: MMC Instance Notes - description: "Obtain from Notes sections if using MMC instance pack." - placeholder: "Notes goes here" - validations: - required: true - type: checkboxes id: final attributes: @@ -81,11 +71,13 @@ body: options: - label: "I have searched the issues and haven't found a similar issue." required: true - - label: "I have read the known incompatibilities and this is not related to one of those." + - label: "I have read the readme and know that what is action build and non-MMC based launcher are unsupported." + required: true + - label: "I have installed [Fugue](https://www.curseforge.com/minecraft/mc-mods/fugue) and it does not fix this issue." required: true - - label: "I have installed [Fugue](https://github.com/CleanroomMC/Fugue) and it does not fix this issue." + - label: "I have installed [Scalar](https://www.curseforge.com/minecraft/mc-mods/scalar) and it does not fix this issue." required: true - - label: "I am using experimental branch and have installed [Scalar](https://github.com/CleanroomMC/Scalar/releases/tag/2.11.1) and it does not fix this issue." + - label: "I have switched my Forgelin and LibrarianLib to continuous versions(check readme for more detail)." required: true - label: "I am running a test build from Cleanroom Github Actions. (Or, if I've compiled it myself I plan to fix the issue)" required: true diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml new file mode 100644 index 000000000..df3bfce57 --- /dev/null +++ b/.github/workflows/Publish.yml @@ -0,0 +1,43 @@ +name: Manually Publish + +on: + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4.2.2 + with: + fetch-tags: true + fetch-depth: 0 + + - name: Set up JDK 21 + uses: actions/setup-java@v4.5.0 + with: + java-version: '21' + distribution: 'temurin' + + - name: Fix Gradle permission + run: chmod +x ./gradlew + + - name: Setup Forge env + run: ./gradlew setup -Prun_number=${{ github.run_number }} + + - name: Get version + run: echo "CLEANROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV + + - name: Stop Gradle daemon + run: ./gradlew --stop + + - name: Build Jars + run: ./gradlew installerJar -Prun_number=${{ github.run_number }} + + - name: Stop Gradle daemon again + run: ./gradlew --stop + + - name: Publish to maven for mod development + run: ./gradlew publish -PoutlandUsername=${{ secrets.MAVEN_USERNAME }} -PoutlandPassword="${{ secrets.MAVEN_PASSWORD }}" -Prun_number=${{ github.run_number }} \ No newline at end of file diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index ead13b9b9..00ca23713 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -12,13 +12,13 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4.1.4 + - uses: actions/checkout@v4.2.2 with: fetch-tags: true fetch-depth: 0 - name: Set up JDK 21 - uses: actions/setup-java@v4.2.1 + uses: actions/setup-java@v4.5.0 with: java-version: '21' distribution: 'temurin' @@ -45,13 +45,13 @@ jobs: run: ./gradlew publish -PoutlandUsername=${{ secrets.MAVEN_USERNAME }} -PoutlandPassword="${{ secrets.MAVEN_PASSWORD }}" -Prun_number=${{ github.run_number }} -Prelease=true - name: Checkout CleanroomMMC - uses: actions/checkout@v4.1.4 + uses: actions/checkout@v4.2.2 with: repository: CleanroomMC/CleanroomMMC path: mmc - name: setup python - uses: actions/setup-python@v5.1.0 + uses: actions/setup-python@v5.3.0 with: python-version: '3.12' diff --git a/.gitignore b/.gitignore index 5ebc21673..73d2832d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,13 @@ -/.idea/ +/.idea/* /.run/ /.gradle/ /projects/ /buildSrc/.gradle/ /buildSrc/build/ /logs/ +build/ version.txt -src/main/java/com/cleanroommc/common/CleanroomVersion.java \ No newline at end of file +src/main/java/com/cleanroommc/common/CleanroomVersion.java +build/ + +!/.idea/icon.svg diff --git a/.idea/icon.svg b/.idea/icon.svg new file mode 100644 index 000000000..5f2bd79d0 --- /dev/null +++ b/.idea/icon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/README.md b/README.md index e76514378..145075186 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### Implemented - 1.12.2 on Java 21 -- LWJGL3 +- *Latest* LWJGL3 - A working *mod development template/kit* - Patches for loading incompatible mods - Built-in Mixin w/ handy bootstrapping @@ -25,16 +25,20 @@ - Cleanroom Minecraft (Continuation + Revamp of MinecraftForge) - Customized Mixin - Bytecode Patcher (Coming Soon) \[Inspired by [Bansoukou](https://github.com/LoliKingdom/Bansoukou) and [Bytecode Patcher](https://github.com/jbredwards/Bytecode-Patcher)] -- [Fugue](https://github.com/CleanroomMC/Fugue), a mod patches many incompatibilities. +- [Fugue](https://www.curseforge.com/minecraft/mc-mods/fugue), a mod patches many incompatibilities. - Javassist -- [Scalar](https://github.com/CleanroomMC/Scalar/releases/tag/2.11.1), a Scala provider. We made Scala libraries become a standalone mod so it can be updated. +- [Scalar](https://www.curseforge.com/minecraft/mc-mods/scalar), a Scala provider. We made Scala libraries become a standalone mod so it can be updated. +- [Forgelin-Continuous](https://www.curseforge.com/minecraft/mc-mods/forgelin-continuous) and [LibrarianLib-Continuous](https://www.curseforge.com/minecraft/mc-mods/librarianlib-continuous) ## Download & Installation: - For MultiMC-based launchers (PolyMC, PrismLauncher), download the MMC instance from [release](https://github.com/CleanroomMC/Cleanroom/releases), import it in your launcher(alternatively unzip patches and json inside to your 1.12 instance). - For regular launcher (official launcher, AT launcher, FTB, HMCL), download the installer jar from release. You could use the installer like the Forge one. -- **Remember to install Fugue!** -- **And Scalar!** +- **WARNING:** Only MultiMC-based launchers are officially supported. This is because of the limit on removing vanilla libraries in other launchers. +- **Remember to install [Fugue](https://www.curseforge.com/minecraft/mc-mods/fugue)!** +- **And [Scalar](https://www.curseforge.com/minecraft/mc-mods/scalar)!** +- If you were told to use **action builds** (aka bleeding edge), here: [Cleanroom jar](https://github.com/CleanroomMC/Cleanroom/actions), [Cleanroom MMC zip](https://github.com/CleanroomMC/CleanroomMMC/actions/), [Fugue](https://github.com/CleanroomMC/Fugue/actions) +- You need to log-in with a GitHub account to download action artifacts. ## Build Instructions: @@ -49,7 +53,7 @@ - Run `gradlew genPatches` before commit, or the changes won't exist - Modifications on `src/` doesn't need generating patches - [Tips from Forge](https://github.com/MinecraftForge/MinecraftForge/wiki/If-you-want-to-contribute-to-Forge) are still apply, keep the patches clean! -- The current patches is full of useless hunks after we switched to VineFlower, we encourage contributors to manual clean up their patches +- The current patches is full of useless hunks after we switched to VineFlower, we encourage contributors to clean up these patches manually. ## Mod Development: diff --git a/build.gradle b/build.gradle index 18084b958..cbf3cae17 100644 --- a/build.gradle +++ b/build.gradle @@ -245,8 +245,8 @@ project(':cleanroom') { // Do not change the order unless it is required so lwjglLibraries = [ [ - 'lwjgl3-glfw', 'lwjgl3-jemalloc', 'lwjgl3-openal', - 'lwjgl3-opengl', 'lwjgl3-stb', 'lwjgl3-tinyfd', 'lwjgl3' + 'lwjgl-glfw', 'lwjgl-jemalloc', 'lwjgl-openal', + 'lwjgl-opengl', 'lwjgl-stb', 'lwjgl-tinyfd', 'lwjgl' ], [ @@ -290,7 +290,7 @@ project(':cleanroom') { environment 'FORGE_GROUP', project.group environment 'FORGE_VERSION', props.last_forge_version - jvmArgs jvm_arguments + '-Dmixin.debug.export=true' + '-Dmixin.checks.interfaces=true' + '-Djava.system.class.loader=net.minecraft.launchwrapper.LaunchClassLoader' + jvmArgs jvm_arguments + '-Dmixin.debug.export=true' + '-Dmixin.checks.interfaces=true' //jvmArgs jvm_arguments // Lazily supply the Mappings target, createSrg2Mcp.getMappings() doesn't get populated until later @@ -416,12 +416,14 @@ project(':cleanroom') { } dependencies { + compileOnly "com.cleanroommc:lwjglx:1.0.0" + installer "com.cleanroommc:lwjglxx:1.0.16" lwjglLibraries[0].each { - installer "org.lwjgl3:$it:$props.lwjgl_version" - runtimeOnly "org.lwjgl3:$it::$lwjglArch" + installer "org.lwjgl:$it:$props.lwjgl_version" + runtimeOnly "org.lwjgl:$it::$lwjglArch" lwjglLibraries[1].each { arch -> - lwjglNatives "org.lwjgl3:$it:$props.lwjgl_version:$arch" + lwjglNatives "org.lwjgl:$it:$props.lwjgl_version:$arch" } } @@ -435,36 +437,39 @@ project(':cleanroom') { installer "org.ow2.asm:asm-deprecated:$props.asm_deprecated" //installer "com.cleanroommc:bouncepad:$props.bouncepad_version" - installer "top.outlands:foundation:0.13.8" + installer "top.outlands:foundation:0.14.3" installer 'org.burningwave:jvm-driver:8.16.1' installer 'io.github.toolfactory:jvm-driver:9.7.1' installer 'io.github.toolfactory:narcissus:1.0.7' installer 'org.javassist:javassist:3.30.2-GA' installer "zone.rong:imaginebreaker:2.1" - installer 'com.ibm.icu:icu4j:75.1' + installer 'com.ibm.icu:icu4j:76.1' - installer 'org.jline:jline:3.26.1' + installer 'org.jline:jline:3.29.0' + installer 'org.jline:jline-native:3.29.0' + + installer 'net.java.jinput:jinput:2.0.10' installer 'lzma:lzma:0.0.1' installer 'java3d:vecmath:1.5.2' installer 'net.sf.trove4j:trove4j:3.0.3' - installer 'org.apache.maven:maven-artifact:3.9.7' + installer 'org.apache.maven:maven-artifact:3.9.9' installer 'net.sf.jopt-simple:jopt-simple:5.0.4' - installer 'org.apache.commons:commons-lang3:3.14.0' - installer 'org.apache.commons:commons-compress:1.26.2' + installer 'org.apache.commons:commons-lang3:3.17.0' + installer 'org.apache.commons:commons-compress:1.27.1' installer 'org.apache.httpcomponents:httpclient:4.5.14' installer 'org.apache.httpcomponents:httpcore:4.4.16' - installer 'com.github.oshi:oshi-core:6.5.0' - installer 'net.java.dev.jna:jna:5.14.0' - installer 'net.java.dev.jna:jna-platform:5.14.0' - installer 'it.unimi.dsi:fastutil:8.5.13' - installer 'commons-codec:commons-codec:1.16.0' - installer 'commons-io:commons-io:2.16.1' - installer 'commons-logging:commons-logging:1.3.1' - installer 'com.google.guava:guava:33.2.1-jre' + installer 'com.github.oshi:oshi-core:6.6.6' + installer 'net.java.dev.jna:jna:5.16.0' + installer 'net.java.dev.jna:jna-platform:5.16.0' + installer 'it.unimi.dsi:fastutil:8.5.15' + installer 'commons-codec:commons-codec:1.17.2' + installer 'commons-io:commons-io:2.18.0' + installer 'commons-logging:commons-logging:1.3.4' + installer 'com.google.guava:guava:33.4.0-jre' installer 'com.google.guava:failureaccess:1.0.2' - installer 'com.google.code.gson:gson:2.11.0' + installer 'com.google.code.gson:gson:2.12.1' installer 'com.google.code.findbugs:jsr305:3.0.2' // Netty @@ -482,28 +487,33 @@ project(':cleanroom') { installer "io.netty:netty-codec-dns:$props.netty_version" installer "io.netty:netty-resolver-dns:$props.netty_version" - // installer 'io.netty:netty-all:4.1.93.Final' - - // TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version - installer 'org.apache.logging.log4j:log4j-api:2.23.1' - installer 'org.apache.logging.log4j:log4j-core:2.23.1' - installer 'org.apache.logging.log4j:log4j-slf4j2-impl:2.23.1' - installer 'org.slf4j:slf4j-api:2.0.13' - installer 'jakarta.annotation:jakarta.annotation-api:2.1.1' + installer 'org.apache.logging.log4j:log4j-api:2.24.1' + installer 'org.apache.logging.log4j:log4j-core:2.24.1' + installer 'org.apache.logging.log4j:log4j-slf4j2-impl:2.24.1' + installer 'org.slf4j:slf4j-api:2.0.16' + installer 'jakarta.annotation:jakarta.annotation-api:3.0.0' installer 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' + installer 'org.glassfish.jaxb:jaxb-core:4.0.5' + installer 'org.glassfish.jaxb:txw2:4.0.5' + installer 'com.sun.istack:istack-commons-runtime:4.2.0' + installer 'org.glassfish.jaxb:jaxb-runtime:4.0.5' + installer 'org.jvnet.staxex:stax-ex:2.1.0' + installer 'com.sun.xml.fastinfoset:FastInfoset:2.1.1' installer 'jakarta.xml.ws:jakarta.xml.ws-api:4.0.2' installer 'jakarta.activation:jakarta.activation-api:2.1.3' installer 'org.glassfish.corba:glassfish-corba-omgapi:4.2.5' installer 'org.openjdk.nashorn:nashorn-core:15.4' + // installer 'ca.weblite:java-objc-bridge:1.2' + // Mixin - installer 'com.cleanroommc:sponge-mixin:0.20.5+mixin.0.8.7' - installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.4.0') + installer 'com.cleanroommc:sponge-mixin:0.20.10+mixin.0.8.7' + installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.5.0-beta.5') - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1' - testImplementation 'org.junit.vintage:junit-vintage-engine:5.10.1' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0' + testImplementation 'org.junit.vintage:junit-vintage-engine:5.11.0' testImplementation 'org.opentest4j:opentest4j:1.3.0' // Needed for junit 5 - testImplementation 'org.hamcrest:hamcrest:2.2' // Needs advanced matching for list order + testImplementation 'org.hamcrest:hamcrest:3.0' // Needs advanced matching for list order } @@ -605,7 +615,7 @@ project(':cleanroom') { zip.entries().findAll { !it.directory && it.name.endsWith('.class') }.each { entry -> - new ClassReader(zip.getInputStream(entry)).accept(new ClassVisitor(Opcodes.ASM7) { + new ClassReader(zip.getInputStream(entry)).accept(new ClassVisitor(Opcodes.ASM9) { String name @@ -1045,4 +1055,4 @@ subprojects { options.compilerArgs += compiler_jvm_arguments options.encoding = 'UTF-8' } -} \ No newline at end of file +} diff --git a/buildSrc/src/main/groovy/com/cleanroommc/gradle/helpers/tasks/Util.groovy b/buildSrc/src/main/groovy/com/cleanroommc/gradle/helpers/tasks/Util.groovy index a7c3b3a77..4ff247f87 100644 --- a/buildSrc/src/main/groovy/com/cleanroommc/gradle/helpers/tasks/Util.groovy +++ b/buildSrc/src/main/groovy/com/cleanroommc/gradle/helpers/tasks/Util.groovy @@ -151,7 +151,7 @@ class Util { "https://maven.minecraftforge.net/", "https://repo.maven.apache.org/maven2/", "https://libraries.minecraft.net/", - "https://maven.outlands.top/releases/" + "https://maven.arcseekers.com/releases/" ] try { return urlList.stream().map(original -> original + path) diff --git a/gradle.properties b/gradle.properties index 1fd47f452..bb75a0351 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ last_forge_version = 14.23.5.2860 mapping_channel = stable mapping_version = 39-1.12 minecraft_version = 1.12.2 -mcp_version = 20240102.171137 +mcp_version = 20241220.122414 # Related Tooling special_source = net.md-5:SpecialSource:1.9.0 @@ -16,10 +16,10 @@ binary_patcher = net.minecraftforge:binarypatcher:1.1.1:fatjar installer_tools_version = 1.4.1 # Libraries -asm_version = 9.7 +asm_version = 9.7.1 asm_deprecated = 7.1 -netty_version = 4.1.110.Final -lwjgl_version = 3.3.4-27-CLEANROOM +netty_version = 4.1.117.Final +lwjgl_version = 3.3.6 # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 19cfad969..e382118b0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/patches/minecraft/net/minecraft/advancements/AdvancementManager.java.patch b/patches/minecraft/net/minecraft/advancements/AdvancementManager.java.patch index 2c7a3b195..f273709ce 100644 --- a/patches/minecraft/net/minecraft/advancements/AdvancementManager.java.patch +++ b/patches/minecraft/net/minecraft/advancements/AdvancementManager.java.patch @@ -1,40 +1,6 @@ --- before/net/minecraft/advancements/AdvancementManager.java +++ after/net/minecraft/advancements/AdvancementManager.java -@@ -9,6 +9,7 @@ - import com.google.gson.JsonObject; - import com.google.gson.JsonParseException; - import java.io.BufferedReader; -+import java.io.Closeable; - import java.io.File; - import java.io.IOException; - import java.io.Reader; -@@ -41,23 +42,14 @@ - public class AdvancementManager - { - private static final Logger field_192782_a = LogManager.getLogger(); -- public static final Gson field_192783_b = new GsonBuilder() -- .registerTypeHierarchyAdapter( -- Advancement.Builder.class, -- new JsonDeserializer() -+ public static final Gson field_192783_b = (new GsonBuilder()).registerTypeHierarchyAdapter(Advancement.Builder.class, new JsonDeserializer() - { - public Advancement.Builder deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException - { - JsonObject jsonobject = JsonUtils.func_151210_l(p_deserialize_1_, "advancement"); - return Advancement.Builder.func_192059_a(jsonobject, p_deserialize_3_); - } -- } -- ) -- .registerTypeAdapter(AdvancementRewards.class, new AdvancementRewards.Deserializer()) -- .registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer()) -- .registerTypeHierarchyAdapter(Style.class, new Style.Serializer()) -- .registerTypeAdapterFactory(new EnumTypeAdapterFactory()) -- .create(); -+ }).registerTypeAdapter(AdvancementRewards.class, new AdvancementRewards.Deserializer()).registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer()).registerTypeHierarchyAdapter(Style.class, new Style.Serializer()).registerTypeAdapterFactory(new EnumTypeAdapterFactory()).create(); - private static final AdvancementList field_192784_c = new AdvancementList(); - private final File field_192785_d; - private boolean field_193768_e; -@@ -74,6 +66,7 @@ +@@ -74,6 +74,7 @@ field_192784_c.func_192087_a(); Map map = this.func_192781_c(); this.func_192777_a(map); @@ -42,75 +8,3 @@ field_192784_c.func_192083_a(map); for (Advancement advancement : field_192784_c.func_192088_b()) -@@ -94,11 +87,11 @@ - { - if (this.field_192785_d == null) - { -- return Maps.newHashMap(); -+ return Maps.newHashMap(); - } - else - { -- Map map = Maps.newHashMap(); -+ Map map = Maps.newHashMap(); - this.field_192785_d.mkdirs(); - - for (File file1 : FileUtils.listFiles(this.field_192785_d, new String[] {"json"}, true)) -@@ -112,9 +105,7 @@ - - try - { -- Advancement.Builder advancement$builder = JsonUtils.func_188178_a( -- field_192783_b, FileUtils.readFileToString(file1, StandardCharsets.UTF_8), Advancement.Builder.class -- ); -+ Advancement.Builder advancement$builder = (Advancement.Builder)JsonUtils.func_188178_a(field_192783_b, FileUtils.readFileToString(file1, StandardCharsets.UTF_8), Advancement.Builder.class); - - if (advancement$builder == null) - { -@@ -149,12 +140,7 @@ - { - URL url = AdvancementManager.class.getResource("/assets/.mcassetsroot"); - -- if (url == null) -- { -- field_192782_a.error("Couldn't find .mcassetsroot"); -- this.field_193768_e = true; -- } -- else -+ if (url != null) - { - URI uri = url.toURI(); - Path path; -@@ -195,7 +181,7 @@ - try - { - bufferedreader = Files.newBufferedReader(path1); -- Advancement.Builder advancement$builder = JsonUtils.func_193839_a(field_192783_b, bufferedreader, Advancement.Builder.class); -+ Advancement.Builder advancement$builder = (Advancement.Builder)JsonUtils.func_193839_a(field_192783_b, bufferedreader, Advancement.Builder.class); - p_192777_1_.put(resourcelocation, advancement$builder); - } - catch (JsonParseException jsonparseexception) -@@ -215,16 +201,22 @@ - } - } - } -+ -+ return; - } -+ -+ field_192782_a.error("Couldn't find .mcassetsroot"); -+ this.field_193768_e = true; - } - catch (IOException | URISyntaxException urisyntaxexception) - { - field_192782_a.error("Couldn't get a list of all built-in advancement files", (Throwable)urisyntaxexception); - this.field_193768_e = true; -+ return; - } - finally - { -- IOUtils.closeQuietly(filesystem); -+ IOUtils.closeQuietly((Closeable)filesystem); - } - } - diff --git a/patches/minecraft/net/minecraft/advancements/AdvancementRewards.java.patch b/patches/minecraft/net/minecraft/advancements/AdvancementRewards.java.patch index 493d3b63e..8820f37d4 100644 --- a/patches/minecraft/net/minecraft/advancements/AdvancementRewards.java.patch +++ b/patches/minecraft/net/minecraft/advancements/AdvancementRewards.java.patch @@ -129,3 +129,21 @@ } public static class Deserializer implements JsonDeserializer +@@ -187,7 +153,7 @@ + JsonArray jsonarray = JsonUtils.func_151213_a(jsonobject, "loot", new JsonArray()); + ResourceLocation[] aresourcelocation = new ResourceLocation[jsonarray.size()]; + +- for (int j = 0; j < aresourcelocation.length; j++) ++ for (int j = 0; j < aresourcelocation.length; ++j) + { + aresourcelocation[j] = new ResourceLocation(JsonUtils.func_151206_a(jsonarray.get(j), "loot[" + j + "]")); + } +@@ -195,7 +161,7 @@ + JsonArray jsonarray1 = JsonUtils.func_151213_a(jsonobject, "recipes", new JsonArray()); + ResourceLocation[] aresourcelocation1 = new ResourceLocation[jsonarray1.size()]; + +- for (int k = 0; k < aresourcelocation1.length; k++) ++ for (int k = 0; k < aresourcelocation1.length; ++k) + { + aresourcelocation1[k] = new ResourceLocation(JsonUtils.func_151206_a(jsonarray1.get(k), "recipes[" + k + "]")); + IRecipe irecipe = CraftingManager.func_193373_a(aresourcelocation1[k]); diff --git a/patches/minecraft/net/minecraft/advancements/PlayerAdvancements.java.patch b/patches/minecraft/net/minecraft/advancements/PlayerAdvancements.java.patch index 79c1b4a72..0f14e5769 100644 --- a/patches/minecraft/net/minecraft/advancements/PlayerAdvancements.java.patch +++ b/patches/minecraft/net/minecraft/advancements/PlayerAdvancements.java.patch @@ -172,3 +172,12 @@ } } +@@ -424,7 +414,7 @@ + + private boolean func_192738_c(Advancement p_192738_1_) + { +- for (int i = 0; p_192738_1_ != null && i <= 2; i++) ++ for (int i = 0; p_192738_1_ != null && i <= 2; ++i) + { + if (i == 0 && this.func_192746_d(p_192738_1_)) + { diff --git a/patches/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java.patch b/patches/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java.patch index 6570abd1e..d8830a867 100644 --- a/patches/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java.patch +++ b/patches/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java.patch @@ -1,39 +1,14 @@ --- before/net/minecraft/advancements/critereon/ItemPredicate.java +++ after/net/minecraft/advancements/critereon/ItemPredicate.java -@@ -37,15 +37,7 @@ - this.field_193445_h = NBTPredicate.field_193479_a; - } - -- public ItemPredicate( -- @Nullable Item p_i47540_1_, -- @Nullable Integer p_i47540_2_, -- MinMaxBounds p_i47540_3_, -- MinMaxBounds p_i47540_4_, -- EnchantmentPredicate[] p_i47540_5_, -- @Nullable PotionType p_i47540_6_, -- NBTPredicate p_i47540_7_ -- ) -+ public ItemPredicate(@Nullable Item p_i47540_1_, @Nullable Integer p_i47540_2_, MinMaxBounds p_i47540_3_, MinMaxBounds p_i47540_4_, EnchantmentPredicate[] p_i47540_5_, @Nullable PotionType p_i47540_6_, NBTPredicate p_i47540_7_) - { - this.field_192496_b = p_i47540_1_; - this.field_192497_c = p_i47540_2_; -@@ -95,7 +87,15 @@ - } - - PotionType potiontype = PotionUtils.func_185191_c(p_192493_1_); -- return this.field_192500_f == null || this.field_192500_f == potiontype; -+ -+ if (this.field_192500_f != null && this.field_192500_f != potiontype) -+ { -+ return false; -+ } -+ else -+ { -+ return true; -+ } - } - } +@@ -86,7 +86,7 @@ + { + Map map = EnchantmentHelper.func_82781_a(p_192493_1_); +- for (int i = 0; i < this.field_192499_e.length; i++) ++ for (int i = 0; i < this.field_192499_e.length; ++i) + { + if (!this.field_192499_e[i].func_192463_a(map)) + { @@ -104,6 +104,13 @@ if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) { @@ -48,3 +23,12 @@ MinMaxBounds minmaxbounds = MinMaxBounds.func_192515_a(jsonobject.get("count")); MinMaxBounds minmaxbounds1 = MinMaxBounds.func_192515_a(jsonobject.get("durability")); Integer integer = jsonobject.has("data") ? JsonUtils.func_151203_m(jsonobject, "data") : null; +@@ -151,7 +158,7 @@ + JsonArray jsonarray = JsonUtils.func_151207_m(p_192494_0_, "items"); + ItemPredicate[] aitempredicate = new ItemPredicate[jsonarray.size()]; + +- for (int i = 0; i < aitempredicate.length; i++) ++ for (int i = 0; i < aitempredicate.length; ++i) + { + aitempredicate[i] = func_192492_a(jsonarray.get(i)); + } diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index bcf217b0f..8f187b7b3 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -249,7 +249,7 @@ + List drops = getDrops(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_); // use the old method until it gets removed, for backward compatibility + p_180653_4_ = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(drops, p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_, p_180653_4_, false, harvesters.get()); -- for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) + for (ItemStack drop : drops) { - if (!(p_180653_1_.field_73012_v.nextFloat() > p_180653_4_)) @@ -3036,7 +3036,7 @@ - { - if (set.contains(block16)) - { -- for (int i = 0; i < 15; ++i) +- for (int i = 0; i < 15; i++) - { - int j = field_149771_c.func_148757_b(block16) << 4 | i; - field_176229_d.func_148746_a(block16.func_176203_a(i), j); diff --git a/patches/minecraft/net/minecraft/block/BlockBed.java.patch b/patches/minecraft/net/minecraft/block/BlockBed.java.patch index de317575f..7cad18c17 100644 --- a/patches/minecraft/net/minecraft/block/BlockBed.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBed.java.patch @@ -210,7 +210,7 @@ public boolean func_190946_v(IBlockState p_190946_1_) { return true; -@@ -256,7 +231,7 @@ +@@ -256,21 +231,21 @@ @Nullable public static BlockPos func_176468_a(World p_176468_0_, BlockPos p_176468_1_, int p_176468_2_) { @@ -219,6 +219,32 @@ int i = p_176468_1_.func_177958_n(); int j = p_176468_1_.func_177956_o(); int k = p_176468_1_.func_177952_p(); + +- for (int l = 0; l <= 1; l++) ++ for (int l = 0; l <= 1; ++l) + { + int i1 = i - enumfacing.func_82601_c() * l - 1; + int j1 = k - enumfacing.func_82599_e() * l - 1; + int k1 = i1 + 2; + int l1 = j1 + 2; + +- for (int i2 = i1; i2 <= k1; i2++) ++ for (int i2 = i1; i2 <= k1; ++i2) + { +- for (int j2 = j1; j2 <= l1; j2++) ++ for (int j2 = j1; j2 <= l1; ++j2) + { + BlockPos blockpos = new BlockPos(i2, j, j2); + +@@ -281,7 +256,7 @@ + return blockpos; + } + +- p_176468_2_--; ++ --p_176468_2_; + } + } + } @@ -292,12 +267,9 @@ protected static boolean func_176469_d(World p_176469_0_, BlockPos p_176469_1_) diff --git a/patches/minecraft/net/minecraft/block/BlockButton.java.patch b/patches/minecraft/net/minecraft/block/BlockButton.java.patch index 87d472f91..7e8790a4d 100644 --- a/patches/minecraft/net/minecraft/block/BlockButton.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockButton.java.patch @@ -83,17 +83,20 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { for (EnumFacing enumfacing : EnumFacing.values()) -@@ -103,7 +98,7 @@ - - if (p_181088_2_ == EnumFacing.UP) - { -- return block == Blocks.field_150438_bZ || !func_193384_b(block) && flag; +@@ -100,30 +95,25 @@ + IBlockState iblockstate = p_181088_0_.func_180495_p(blockpos); + boolean flag = iblockstate.func_193401_d(p_181088_0_, blockpos, p_181088_2_) == BlockFaceShape.SOLID; + Block block = iblockstate.func_177230_c(); +- return p_181088_2_ == EnumFacing.UP ? block == Blocks.field_150438_bZ || !func_193384_b(block) && flag : !func_193382_c(block) && flag; ++ ++ if (p_181088_2_ == EnumFacing.UP) ++ { + return iblockstate.func_185896_q() || !func_193384_b(block) && flag; - } - else - { -@@ -111,27 +106,14 @@ - } ++ } ++ else ++ { ++ return !func_193382_c(block) && flag; ++ } } - @Override @@ -123,7 +126,7 @@ { this.func_176226_b(p_189540_2_, p_189540_3_, p_189540_1_, 0); p_189540_2_.func_175698_g(p_189540_3_); -@@ -152,11 +134,10 @@ +@@ -144,11 +134,10 @@ } } @@ -137,7 +140,7 @@ switch (enumfacing) { -@@ -176,29 +157,18 @@ +@@ -168,29 +157,18 @@ } } @@ -171,7 +174,7 @@ p_180639_1_.func_175684_a(p_180639_2_, this, this.func_149738_a(p_180639_1_)); return true; } -@@ -208,27 +178,24 @@ +@@ -200,27 +178,24 @@ protected abstract void func_185617_b(World p_185617_1_, BlockPos p_185617_2_); @@ -203,7 +206,7 @@ { return 0; } -@@ -238,23 +205,20 @@ +@@ -230,23 +205,20 @@ } } @@ -228,7 +231,7 @@ { if (this.field_150047_a) { -@@ -262,8 +226,8 @@ +@@ -254,8 +226,8 @@ } else { @@ -239,7 +242,7 @@ this.func_185617_b(p_180650_1_, p_180650_2_); p_180650_1_.func_175704_b(p_180650_2_, p_180650_2_); } -@@ -271,14 +235,13 @@ +@@ -263,14 +235,13 @@ } } @@ -255,7 +258,7 @@ { this.func_185616_e(p_180634_3_, p_180634_1_, p_180634_2_); } -@@ -288,22 +251,22 @@ +@@ -280,22 +251,22 @@ private void func_185616_e(IBlockState p_185616_1_, World p_185616_2_, BlockPos p_185616_3_) { @@ -285,7 +288,7 @@ p_185616_2_.func_175704_b(p_185616_3_, p_185616_3_); this.func_185617_b(p_185616_2_, p_185616_3_); } -@@ -320,7 +283,6 @@ +@@ -312,7 +283,6 @@ p_176582_1_.func_175685_c(p_176582_2_.func_177972_a(p_176582_3_.func_176734_d()), this, false); } @@ -293,7 +296,7 @@ public IBlockState func_176203_a(int p_176203_1_) { EnumFacing enumfacing; -@@ -347,10 +309,9 @@ +@@ -339,10 +309,9 @@ enumfacing = EnumFacing.UP; } @@ -305,7 +308,7 @@ public int func_176201_c(IBlockState p_176201_1_) { int i; -@@ -377,7 +338,7 @@ +@@ -369,7 +338,7 @@ i = 0; } @@ -314,7 +317,7 @@ { i |= 8; } -@@ -385,25 +346,21 @@ +@@ -377,25 +346,21 @@ return i; } diff --git a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch index 0cf70cc21..4cc1d5691 100644 --- a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch @@ -44,7 +44,7 @@ - while (p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(i)).func_177230_c() == this) + for (i = 1; p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(i)).func_177230_c() == this; ++i) { -- ++i; +- i++; + ; } diff --git a/patches/minecraft/net/minecraft/block/BlockChest.java.patch b/patches/minecraft/net/minecraft/block/BlockChest.java.patch index 5d2feb4e9..ebde3bec6 100644 --- a/patches/minecraft/net/minecraft/block/BlockChest.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockChest.java.patch @@ -148,6 +148,42 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { int i = 0; +@@ -347,7 +330,7 @@ + return false; + } + +- i++; ++ ++i; + } + + if (p_176196_1_.func_180495_p(blockpos1).func_177230_c() == this) +@@ -357,7 +340,7 @@ + return false; + } + +- i++; ++ ++i; + } + + if (p_176196_1_.func_180495_p(blockpos2).func_177230_c() == this) +@@ -367,7 +350,7 @@ + return false; + } + +- i++; ++ ++i; + } + + if (p_176196_1_.func_180495_p(blockpos3).func_177230_c() == this) +@@ -377,7 +360,7 @@ + return false; + } + +- i++; ++ ++i; + } + + return i <= 1; @@ -403,7 +386,6 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch b/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch index 01140501e..bb1e0c0d7 100644 --- a/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockChorusFlower.java.patch @@ -40,6 +40,32 @@ { boolean flag = false; boolean flag1 = false; +@@ -71,7 +70,7 @@ + { + int j = 1; + +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) + { + Block block1 = p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(j + 1)).func_177230_c(); + +@@ -85,14 +84,14 @@ + break; + } + +- j++; ++ ++j; + } + + int i1 = 4; + + if (flag1) + { +- i1++; ++ ++i1; + } + + if (j < 2 || p_180650_4_.nextInt(i1) >= j) @@ -105,7 +104,7 @@ flag = true; } @@ -49,7 +75,17 @@ { p_180650_1_.func_180501_a(p_180650_2_, Blocks.field_185765_cR.func_176223_P(), 2); this.func_185602_a(p_180650_1_, blockpos, i); -@@ -125,9 +124,7 @@ +@@ -117,17 +116,15 @@ + + if (flag1) + { +- l++; ++ ++l; + } + +- for (int j1 = 0; j1 < l; j1++) ++ for (int j1 = 0; j1 < l; ++j1) + { EnumFacing enumfacing = EnumFacing.Plane.HORIZONTAL.func_179518_a(p_180650_4_); BlockPos blockpos1 = p_180650_2_.func_177972_a(enumfacing); @@ -110,6 +146,15 @@ public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) { if (!this.func_185606_b(p_189540_2_, p_189540_3_)) +@@ -222,7 +216,7 @@ + + if (block1 == Blocks.field_185765_cR) + { +- i++; ++ ++i; + } + else if (iblockstate1.func_185904_a() != Material.field_151579_a) + { @@ -243,44 +237,36 @@ } } @@ -159,7 +204,16 @@ } public static void func_185603_a(World p_185603_0_, BlockPos p_185603_1_, Random p_185603_2_, int p_185603_3_) -@@ -302,7 +288,7 @@ +@@ -295,14 +281,14 @@ + + if (p_185601_5_ == 0) + { +- i++; ++ ++i; + } + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { BlockPos blockpos = p_185601_1_.func_177981_b(j + 1); @@ -168,7 +222,17 @@ { return; } -@@ -326,11 +312,7 @@ +@@ -318,19 +304,15 @@ + + if (p_185601_5_ == 0) + { +- l++; ++ ++l; + } + +- for (int k = 0; k < l; k++) ++ for (int k = 0; k < l; ++k) + { EnumFacing enumfacing = EnumFacing.Plane.HORIZONTAL.func_179518_a(p_185601_2_); BlockPos blockpos1 = p_185601_1_.func_177981_b(i).func_177972_a(enumfacing); diff --git a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch index b466e29f5..38dec612b 100644 --- a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch @@ -170,9 +170,12 @@ int j = 1; if (i >= 2) -@@ -180,62 +150,54 @@ +@@ -178,64 +148,56 @@ + j = 3; + } - for (int k = 0; k < j; ++k) +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) { - func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b())); + drops.add(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b())); diff --git a/patches/minecraft/net/minecraft/block/BlockCrops.java.patch b/patches/minecraft/net/minecraft/block/BlockCrops.java.patch index 305fbeecb..0f591d978 100644 --- a/patches/minecraft/net/minecraft/block/BlockCrops.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCrops.java.patch @@ -93,7 +93,16 @@ } } } -@@ -127,11 +118,11 @@ +@@ -120,18 +111,18 @@ + float f = 1.0F; + BlockPos blockpos = p_180672_2_.func_177977_b(); + +- for (int i = -1; i <= 1; i++) ++ for (int i = -1; i <= 1; ++i) + { +- for (int j = -1; j <= 1; j++) ++ for (int j = -1; j <= 1; ++j) + { float f1 = 0.0F; IBlockState iblockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j)); @@ -177,6 +186,15 @@ { int i = this.func_185527_x(p_180653_3_); +@@ -204,7 +210,7 @@ + { + int j = 3 + p_180653_5_; + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + if (p_180653_1_.field_73012_v.nextInt(2 * this.func_185526_g()) <= i) + { @@ -215,51 +221,43 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index 1fb628724..eea8952a9 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -151,7 +151,7 @@ { p_189540_2_.func_175698_g(p_189540_3_); flag1 = true; -@@ -252,43 +225,39 @@ +@@ -252,38 +225,39 @@ { boolean flag = p_189540_2_.func_175640_z(p_189540_3_) || p_189540_2_.func_175640_z(blockpos1); @@ -184,26 +184,27 @@ - @Override public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { -- if (p_176196_2_.func_177956_o() >= 255) +- return p_176196_2_.func_177956_o() >= 255 +- ? false +- : p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() +- && super.func_176196_c(p_176196_1_, p_176196_2_) +- && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); + if (p_176196_2_.func_177956_o() >= p_176196_1_.func_72800_K() - 1) - { - return false; - } - else - { -- return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() -- && super.func_176196_c(p_176196_1_, p_176196_2_) -- && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); ++ { ++ return false; ++ } ++ else ++ { + IBlockState state = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()); + return (state.func_185896_q() || state.func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID) && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); - } ++ } } - @Override public EnumPushReaction func_149656_h(IBlockState p_149656_1_) { return EnumPushReaction.DESTROY; -@@ -310,7 +279,6 @@ +@@ -305,7 +279,6 @@ return func_176510_b(k) | (flag ? 8 : 0) | (flag1 ? 16 : 0) | (flag2 ? 32 : 0); } @@ -211,7 +212,7 @@ public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) { return new ItemStack(this.func_176509_j()); -@@ -344,15 +312,12 @@ +@@ -339,15 +312,12 @@ } } @@ -228,7 +229,7 @@ { p_176208_1_.func_175698_g(blockpos); } -@@ -369,13 +334,11 @@ +@@ -364,13 +334,11 @@ } @SideOnly(Side.CLIENT) @@ -242,7 +243,7 @@ public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_) { if (p_176221_1_.func_177229_b(field_176523_O) == BlockDoor.EnumDoorHalf.LOWER) -@@ -384,8 +347,7 @@ +@@ -379,8 +347,7 @@ if (iblockstate.func_177230_c() == this) { @@ -252,7 +253,7 @@ } } else -@@ -394,68 +356,51 @@ +@@ -389,68 +356,51 @@ if (iblockstate1.func_177230_c() == this) { @@ -329,7 +330,7 @@ { i |= 4; } -@@ -494,13 +439,11 @@ +@@ -489,13 +439,11 @@ return (p_176518_0_ & 8) != 0; } @@ -344,7 +345,7 @@ public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) { return BlockFaceShape.UNDEFINED; -@@ -511,13 +454,11 @@ +@@ -506,13 +454,11 @@ UPPER, LOWER; @@ -358,7 +359,7 @@ public String func_176610_l() { return this == UPPER ? "upper" : "lower"; -@@ -529,13 +470,11 @@ +@@ -524,13 +470,11 @@ LEFT, RIGHT; diff --git a/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch b/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch index b4b3a9b1d..b3b8dd0b0 100644 --- a/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch @@ -96,9 +96,12 @@ public void func_180649_a(World p_180649_1_, BlockPos p_180649_2_, EntityPlayer p_180649_3_) { this.func_180684_e(p_180649_1_, p_180649_2_); -@@ -117,13 +93,9 @@ +@@ -115,36 +91,23 @@ + + if (iblockstate.func_177230_c() == this) { - for (int i = 0; i < 1000; ++i) +- for (int i = 0; i < 1000; i++) ++ for (int i = 0; i < 1000; ++i) { - BlockPos blockpos = p_180684_2_.func_177982_a( - p_180684_1_.field_73012_v.nextInt(16) - p_180684_1_.field_73012_v.nextInt(16), @@ -112,7 +115,10 @@ { if (p_180684_1_.field_72995_K) { -@@ -133,18 +105,9 @@ +- for (int j = 0; j < 128; j++) ++ for (int j = 0; j < 128; ++j) + { + double d0 = p_180684_1_.field_73012_v.nextDouble(); float f = (p_180684_1_.field_73012_v.nextFloat() - 0.5F) * 0.2F; float f1 = (p_180684_1_.field_73012_v.nextFloat() - 0.5F) * 0.2F; float f2 = (p_180684_1_.field_73012_v.nextFloat() - 0.5F) * 0.2F; diff --git a/patches/minecraft/net/minecraft/block/BlockDynamicLiquid.java.patch b/patches/minecraft/net/minecraft/block/BlockDynamicLiquid.java.patch index 44acac540..a167fc3a7 100644 --- a/patches/minecraft/net/minecraft/block/BlockDynamicLiquid.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDynamicLiquid.java.patch @@ -128,6 +128,15 @@ } protected int func_176371_a(World p_176371_1_, BlockPos p_176371_2_, int p_176371_3_) +@@ -284,7 +281,7 @@ + { + if (i == 0) + { +- this.field_149815_a++; ++ ++this.field_149815_a; + } + + if (i >= 8) @@ -302,7 +299,6 @@ return material != this.field_149764_J && material != Material.field_151587_i && !this.func_176372_g(p_176373_1_, p_176373_2_, p_176373_3_); } diff --git a/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch b/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch index 84935ff71..e9d0b725b 100644 --- a/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockEnchantmentTable.java.patch @@ -9,7 +9,7 @@ protected BlockEnchantmentTable() { -@@ -34,20 +34,17 @@ +@@ -34,27 +34,24 @@ this.func_149647_a(CreativeTabs.field_78031_c); } @@ -30,7 +30,21 @@ public void func_180655_c(IBlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) { super.func_180655_c(p_180655_1_, p_180655_2_, p_180655_3_, p_180655_4_); -@@ -67,22 +64,14 @@ + +- for (int i = -2; i <= 2; i++) ++ for (int i = -2; i <= 2; ++i) + { +- for (int j = -2; j <= 2; j++) ++ for (int j = -2; j <= 2; ++j) + { + if (i > -2 && i < 2 && j == -1) + { +@@ -63,26 +60,18 @@ + + if (p_180655_4_.nextInt(16) == 0) + { +- for (int k = 0; k <= 1; k++) ++ for (int k = 0; k <= 1; ++k) { BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j); diff --git a/patches/minecraft/net/minecraft/block/BlockEnderChest.java.patch b/patches/minecraft/net/minecraft/block/BlockEnderChest.java.patch index 0d2bf0217..94521e49e 100644 --- a/patches/minecraft/net/minecraft/block/BlockEnderChest.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockEnderChest.java.patch @@ -157,7 +157,8 @@ - @Override public void func_180655_c(IBlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) { - for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { int j = p_180655_4_.nextInt(2) * 2 - 1; int k = p_180655_4_.nextInt(2) * 2 - 1; diff --git a/patches/minecraft/net/minecraft/block/BlockFire.java.patch b/patches/minecraft/net/minecraft/block/BlockFire.java.patch index 39feda561..e02b1d1d0 100644 --- a/patches/minecraft/net/minecraft/block/BlockFire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFire.java.patch @@ -151,7 +151,7 @@ { p_180650_1_.func_175698_g(p_180650_2_); return; -@@ -204,12 +187,12 @@ +@@ -204,18 +187,18 @@ j = -50; } @@ -168,8 +168,17 @@ + this.tryCatchFire(p_180650_1_, p_180650_2_.func_177978_c(), 300 + j, p_180650_4_, i, EnumFacing.SOUTH); + this.tryCatchFire(p_180650_1_, p_180650_2_.func_177968_d(), 300 + j, p_180650_4_, i, EnumFacing.NORTH); - for (int k = -1; k <= 1; ++k) +- for (int k = -1; k <= 1; k++) ++ for (int k = -1; k <= 1; ++k) { +- for (int l = -1; l <= 1; l++) ++ for (int l = -1; l <= 1; ++l) + { +- for (int i1 = -1; i1 <= 4; i1++) ++ for (int i1 = -1; i1 <= 4; ++i1) + { + if (k != 0 || i1 != 0 || l != 0) + { @@ -247,7 +230,7 @@ i2 = 15; } @@ -296,7 +305,7 @@ public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_) { if (p_176213_1_.field_73011_w.func_186058_p().func_186068_a() > 0 || !Blocks.field_150427_aO.func_176548_d(p_176213_1_, p_176213_2_)) -@@ -390,79 +373,73 @@ +@@ -390,126 +373,124 @@ } } @@ -331,7 +340,8 @@ - if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177976_e())) + if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177976_e(), EnumFacing.EAST)) { - for (int j = 0; j < 2; ++j) +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) { - double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * 0.1F; + double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * 0.10000000149011612D; @@ -345,7 +355,8 @@ - if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177974_f())) + if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177974_f(), EnumFacing.WEST)) { - for (int k = 0; k < 2; ++k) +- for (int k = 0; k < 2; k++) ++ for (int k = 0; k < 2; ++k) { - double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * 0.1F; + double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * 0.10000000149011612D; @@ -359,7 +370,8 @@ - if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177978_c())) + if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177978_c(), EnumFacing.SOUTH)) { - for (int l = 0; l < 2; ++l) +- for (int l = 0; l < 2; l++) ++ for (int l = 0; l < 2; ++l) { double d5 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); double d10 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble(); @@ -373,7 +385,8 @@ - if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177968_d())) + if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177968_d(), EnumFacing.NORTH)) { - for (int i1 = 0; i1 < 2; ++i1) +- for (int i1 = 0; i1 < 2; i1++) ++ for (int i1 = 0; i1 < 2; ++i1) { double d6 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); double d11 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble(); @@ -387,7 +400,8 @@ - if (Blocks.field_150480_ab.func_176535_e(p_180655_2_, p_180655_3_.func_177984_a())) + if (Blocks.field_150480_ab.canCatchFire(p_180655_2_, p_180655_3_.func_177984_a(), EnumFacing.DOWN)) { - for (int j1 = 0; j1 < 2; ++j1) +- for (int j1 = 0; j1 < 2; j1++) ++ for (int j1 = 0; j1 < 2; ++j1) { double d7 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); - double d12 = (double)(p_180655_3_.func_177956_o() + 1) - p_180655_4_.nextDouble() * 0.1F; @@ -398,8 +412,10 @@ } } } -@@ -471,45 +448,49 @@ - for (int i = 0; i < 3; ++i) + else + { +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { double d0 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); - double d1 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble() * 0.5 + 0.5; diff --git a/patches/minecraft/net/minecraft/block/BlockGrass.java.patch b/patches/minecraft/net/minecraft/block/BlockGrass.java.patch index 9c6b87443..9d3a0a6cd 100644 --- a/patches/minecraft/net/minecraft/block/BlockGrass.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockGrass.java.patch @@ -37,6 +37,15 @@ { p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P()); } +@@ -47,7 +47,7 @@ + { + if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) >= 9) + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + BlockPos blockpos = p_180650_2_.func_177982_a(p_180650_4_.nextInt(3) - 1, p_180650_4_.nextInt(5) - 3, p_180650_4_.nextInt(3) - 1); + @@ -59,10 +59,7 @@ IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos.func_177984_a()); IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos); @@ -79,11 +88,12 @@ BlockPos blockpos = p_176474_3_.func_177984_a(); - label38: - for (int i = 0; i < 128; ++i) +- for (int i = 0; i < 128; i++) ++ for (int i = 0; i < 128; ++i) { BlockPos blockpos1 = blockpos; - -- for (int j = 0; j < i / 16; ++j) +- for (int j = 0; j < i / 16; j++) - { - blockpos1 = blockpos1.func_177982_a( - p_176474_2_.nextInt(3) - 1, (p_176474_2_.nextInt(3) - 1) * p_176474_2_.nextInt(3) / 2, p_176474_2_.nextInt(3) - 1 diff --git a/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch b/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch index 609aa2765..e1cade7a6 100644 --- a/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockHugeMushroom.java.patch @@ -80,11 +80,12 @@ public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_) { switch (p_185499_2_) -@@ -179,10 +163,9 @@ +@@ -178,10 +162,10 @@ + } } - @SuppressWarnings("incomplete-switch") - @Override ++ @SuppressWarnings("incomplete-switch") public IBlockState func_185471_a(IBlockState p_185471_1_, Mirror p_185471_2_) { - BlockHugeMushroom.EnumType blockhugemushroom$enumtype = p_185471_1_.func_177229_b(field_176380_a); @@ -92,7 +93,7 @@ switch (p_185471_2_) { -@@ -234,10 +217,23 @@ +@@ -233,10 +217,23 @@ return super.func_185471_a(p_185471_1_, p_185471_2_); } @@ -118,7 +119,7 @@ } public static enum EnumType implements IStringSerializable -@@ -271,7 +267,6 @@ +@@ -270,7 +267,6 @@ return this.field_176906_o; } @@ -126,7 +127,7 @@ public String toString() { return this.field_176914_p; -@@ -288,7 +283,6 @@ +@@ -287,7 +283,6 @@ return blockhugemushroom$enumtype == null ? field_176905_n[0] : blockhugemushroom$enumtype; } diff --git a/patches/minecraft/net/minecraft/block/BlockLadder.java.patch b/patches/minecraft/net/minecraft/block/BlockLadder.java.patch index 17a837ecc..5ad64c45c 100644 --- a/patches/minecraft/net/minecraft/block/BlockLadder.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLadder.java.patch @@ -51,7 +51,24 @@ public boolean func_176198_a(World p_176198_1_, BlockPos p_176198_2_, EnumFacing p_176198_3_) { if (this.func_193392_c(p_176198_1_, p_176198_2_.func_177976_e(), p_176198_3_)) -@@ -90,17 +87,7 @@ +@@ -73,11 +70,13 @@ + { + return true; + } ++ else if (this.func_193392_c(p_176198_1_, p_176198_2_.func_177978_c(), p_176198_3_)) ++ { ++ return true; ++ } + else + { +- return this.func_193392_c(p_176198_1_, p_176198_2_.func_177978_c(), p_176198_3_) +- ? true +- : this.func_193392_c(p_176198_1_, p_176198_2_.func_177968_d(), p_176198_3_); ++ return this.func_193392_c(p_176198_1_, p_176198_2_.func_177968_d(), p_176198_3_); + } + } + +@@ -88,17 +87,7 @@ return !flag && iblockstate.func_193401_d(p_193392_1_, p_193392_2_, p_193392_3_) == BlockFaceShape.SOLID && !iblockstate.func_185897_m(); } @@ -70,7 +87,7 @@ { if (p_180642_3_.func_176740_k().func_176722_c() && this.func_193392_c(p_180642_1_, p_180642_2_.func_177972_a(p_180642_3_.func_176734_d()), p_180642_3_)) { -@@ -120,10 +107,9 @@ +@@ -118,10 +107,9 @@ } } @@ -82,7 +99,7 @@ if (!this.func_193392_c(p_189540_2_, p_189540_3_.func_177972_a(enumfacing.func_176734_d()), enumfacing)) { -@@ -134,14 +120,6 @@ +@@ -132,14 +120,6 @@ super.func_189540_a(p_189540_1_, p_189540_2_, p_189540_3_, p_189540_4_, p_189540_5_); } @@ -97,7 +114,7 @@ public IBlockState func_176203_a(int p_176203_1_) { EnumFacing enumfacing = EnumFacing.func_82600_a(p_176203_1_); -@@ -154,31 +132,34 @@ +@@ -152,31 +132,34 @@ return this.func_176223_P().func_177226_a(field_176382_a, enumfacing); } diff --git a/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch b/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch index b79bfd0a3..42e16c54c 100644 --- a/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch @@ -17,7 +17,19 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { int i = 1; -@@ -54,9 +53,9 @@ +@@ -45,18 +44,18 @@ + + if (p_180663_1_.func_175707_a(new BlockPos(k - 2, l - 2, i1 - 2), new BlockPos(k + 2, l + 2, i1 + 2))) + { +- for (int j1 = -1; j1 <= 1; j1++) ++ for (int j1 = -1; j1 <= 1; ++j1) + { +- for (int k1 = -1; k1 <= 1; k1++) ++ for (int k1 = -1; k1 <= 1; ++k1) + { +- for (int l1 = -1; l1 <= 1; l1++) ++ for (int l1 = -1; l1 <= 1; ++l1) + { BlockPos blockpos = p_180663_2_.func_177982_a(j1, k1, l1); IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos); @@ -43,7 +55,7 @@ { int i = 4; int j = 5; -@@ -85,7 +83,8 @@ +@@ -85,22 +83,23 @@ this.field_150128_a = new int[32768]; } @@ -53,7 +65,15 @@ { BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); -@@ -98,9 +97,9 @@ +- for (int i2 = -4; i2 <= 4; i2++) ++ for (int i2 = -4; i2 <= 4; ++i2) + { +- for (int j2 = -4; j2 <= 4; j2++) ++ for (int j2 = -4; j2 <= 4; ++j2) + { +- for (int k2 = -4; k2 <= 4; k2++) ++ for (int k2 = -4; k2 <= 4; ++k2) + { IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)); Block block = iblockstate.func_177230_c(); @@ -65,6 +85,24 @@ { this.field_150128_a[(i2 + 16) * 1024 + (j2 + 16) * 32 + k2 + 16] = -2; } +@@ -117,13 +116,13 @@ + } + } + +- for (int i3 = 1; i3 <= 4; i3++) ++ for (int i3 = 1; i3 <= 4; ++i3) + { +- for (int j3 = -4; j3 <= 4; j3++) ++ for (int j3 = -4; j3 <= 4; ++j3) + { +- for (int k3 = -4; k3 <= 4; k3++) ++ for (int k3 = -4; k3 <= 4; ++k3) + { +- for (int l3 = -4; l3 <= 4; l3++) ++ for (int l3 = -4; l3 <= 4; ++l3) + { + if (this.field_150128_a[(j3 + 16) * 1024 + (k3 + 16) * 32 + l3 + 16] == i3 - 1) + { @@ -167,7 +166,7 @@ if (l2 >= 0) diff --git a/patches/minecraft/net/minecraft/block/BlockLiquid.java.patch b/patches/minecraft/net/minecraft/block/BlockLiquid.java.patch index 8bb8399fe..0d5d4154f 100644 --- a/patches/minecraft/net/minecraft/block/BlockLiquid.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLiquid.java.patch @@ -88,9 +88,9 @@ - @SideOnly(Side.CLIENT) - public boolean func_176364_g(IBlockAccess p_176364_1_, BlockPos p_176364_2_) - { -- for (int i = -1; i <= 1; ++i) +- for (int i = -1; i <= 1; i++) - { -- for (int j = -1; j <= 1; ++j) +- for (int j = -1; j <= 1; j++) - { - IBlockState iblockstate = p_176364_1_.func_180495_p(p_176364_2_.func_177982_a(i, 0, j)); - @@ -441,7 +441,8 @@ - ); + p_180688_1_.func_184133_a((EntityPlayer)null, p_180688_2_, SoundEvents.field_187659_cY, SoundCategory.BLOCKS, 0.5F, 2.6F + (p_180688_1_.field_73012_v.nextFloat() - p_180688_1_.field_73012_v.nextFloat()) * 0.8F); - for (int i = 0; i < 8; ++i) +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) { - p_180688_1_.func_175688_a(EnumParticleTypes.SMOKE_LARGE, d0 + Math.random(), d1 + 1.2, d2 + Math.random(), 0.0, 0.0, 0.0); + p_180688_1_.func_175688_a(EnumParticleTypes.SMOKE_LARGE, d0 + Math.random(), d1 + 1.2D, d2 + Math.random(), 0.0D, 0.0D, 0.0D); diff --git a/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch b/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch index 1801a01e4..a1dbf3941 100644 --- a/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch @@ -33,6 +33,15 @@ { return; } +@@ -46,7 +46,7 @@ + + BlockPos blockpos1 = p_180650_2_.func_177982_a(p_180650_4_.nextInt(3) - 1, p_180650_4_.nextInt(2) - p_180650_4_.nextInt(2), p_180650_4_.nextInt(3) - 1); + +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) + { + if (p_180650_1_.func_175623_d(blockpos1) && this.func_180671_f(p_180650_1_, blockpos1, this.func_176223_P())) + { @@ -63,19 +63,16 @@ } } @@ -53,16 +62,24 @@ public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_) { if (p_180671_2_.func_177956_o() >= 0 && p_180671_2_.func_177956_o() < 256) -@@ -92,7 +89,7 @@ +@@ -86,11 +83,13 @@ + { + return true; } ++ else if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.PODZOL) ++ { ++ return true; ++ } else { -- return p_180671_1_.func_175699_k(p_180671_2_) < 13 && this.func_185514_i(iblockstate); +- return iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.PODZOL +- ? true +- : p_180671_1_.func_175699_k(p_180671_2_) < 13 && this.func_185514_i(iblockstate); + return p_180671_1_.func_175699_k(p_180671_2_) < 13 && iblockstate.func_177230_c().canSustainPlant(iblockstate, p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this); } } else -@@ -126,19 +123,16 @@ +@@ -124,19 +123,16 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch b/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch index a92afd194..32bef9cc8 100644 --- a/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch @@ -37,7 +37,14 @@ { p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P().func_177226_a(BlockDirt.field_176386_a, BlockDirt.DirtType.DIRT)); } -@@ -54,10 +54,7 @@ +@@ -48,16 +48,13 @@ + { + if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) >= 9) + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + BlockPos blockpos = p_180650_2_.func_177982_a(p_180650_4_.nextInt(3) - 1, p_180650_4_.nextInt(5) - 3, p_180650_4_.nextInt(3) - 1); IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos); IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos.func_177984_a()); diff --git a/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch b/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch index fec8ff28f..3ec16550d 100644 --- a/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockNetherWart.java.patch @@ -89,7 +89,15 @@ { i = 2 + p_180653_1_.field_73012_v.nextInt(3); -@@ -90,39 +84,50 @@ +@@ -83,46 +77,57 @@ + } + } + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(Items.field_151075_bm)); + } } } diff --git a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch index 4152ffc7c..ab2d05954 100644 --- a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch @@ -271,16 +271,24 @@ } else { -@@ -382,7 +336,7 @@ +@@ -382,9 +336,9 @@ else { List list = blockpistonstructurehelper.func_177254_c(); - List list1 = Lists.newArrayList(); + List list1 = Lists.newArrayList(); - for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) { -@@ -399,7 +353,9 @@ + BlockPos blockpos = list.get(i); + list1.add(p_176319_1_.func_180495_p(blockpos).func_185899_b(p_176319_1_, blockpos)); +@@ -395,17 +349,19 @@ + IBlockState[] aiblockstate = new IBlockState[k]; + EnumFacing enumfacing = p_176319_4_ ? p_176319_3_ : p_176319_3_.func_176734_d(); + +- for (int j = list2.size() - 1; j >= 0; j--) ++ for (int j = list2.size() - 1; j >= 0; --j) { BlockPos blockpos1 = list2.get(j); IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos1); @@ -289,9 +297,26 @@ + float chance = iblockstate.func_177230_c() instanceof BlockSnow ? -1.0f : 1.0f; + iblockstate.func_177230_c().func_180653_a(p_176319_1_, blockpos1, iblockstate, chance, 0); p_176319_1_.func_180501_a(blockpos1, Blocks.field_150350_a.func_176223_P(), 4); - --k; +- k--; ++ --k; aiblockstate[k] = iblockstate; -@@ -421,20 +377,9 @@ + } + +- for (int l = list.size() - 1; l >= 0; l--) ++ for (int l = list.size() - 1; l >= 0; --l) + { + BlockPos blockpos3 = list.get(l); + IBlockState iblockstate2 = p_176319_1_.func_180495_p(blockpos3); +@@ -413,7 +369,7 @@ + blockpos3 = blockpos3.func_177972_a(enumfacing); + p_176319_1_.func_180501_a(blockpos3, Blocks.field_180384_M.func_176223_P().func_177226_a(field_176387_N, p_176319_3_), 4); + p_176319_1_.func_175690_a(blockpos3, BlockPistonMoving.func_185588_a(list1.get(l), p_176319_3_, p_176319_4_, false)); +- k--; ++ --k; + aiblockstate[k] = iblockstate2; + } + +@@ -421,30 +377,19 @@ if (p_176319_4_) { @@ -315,6 +340,18 @@ p_176319_1_.func_180501_a(blockpos2, iblockstate1, 4); p_176319_1_.func_175690_a(blockpos2, BlockPistonMoving.func_185588_a(iblockstate3, p_176319_3_, true, true)); } + +- for (int i1 = list2.size() - 1; i1 >= 0; i1--) ++ for (int i1 = list2.size() - 1; i1 >= 0; --i1) + { + p_176319_1_.func_175685_c(list2.get(i1), aiblockstate[k++].func_177230_c(), false); + } + +- for (int j1 = list.size() - 1; j1 >= 0; j1--) ++ for (int j1 = list.size() - 1; j1 >= 0; --j1) + { + p_176319_1_.func_175685_c(list.get(j1), aiblockstate[k++].func_177230_c(), false); + } @@ -458,19 +403,17 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockPortal.java.patch b/patches/minecraft/net/minecraft/block/BlockPortal.java.patch index 6eea6c45b..84187ffbf 100644 --- a/patches/minecraft/net/minecraft/block/BlockPortal.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPortal.java.patch @@ -153,7 +153,18 @@ boolean flag4 = flag || flag1 || enumfacing$axis == EnumFacing.Axis.X; boolean flag5 = flag2 || flag3 || enumfacing$axis == EnumFacing.Axis.Z; -@@ -226,20 +207,17 @@ +@@ -216,26 +197,27 @@ + { + return true; + } ++ else if (flag5 && p_176225_4_ == EnumFacing.NORTH) ++ { ++ return true; ++ } + else + { +- return flag5 && p_176225_4_ == EnumFacing.NORTH ? true : flag5 && p_176225_4_ == EnumFacing.SOUTH; ++ return flag5 && p_176225_4_ == EnumFacing.SOUTH; } } @@ -174,7 +185,7 @@ public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_) { if (!p_180634_4_.func_184218_aH() && !p_180634_4_.func_184207_aI() && p_180634_4_.func_184222_aU()) -@@ -249,21 +227,11 @@ +@@ -245,42 +227,31 @@ } @SideOnly(Side.CLIENT) @@ -196,8 +207,9 @@ + p_180655_2_.func_184134_a((double)p_180655_3_.func_177958_n() + 0.5D, (double)p_180655_3_.func_177956_o() + 0.5D, (double)p_180655_3_.func_177952_p() + 0.5D, SoundEvents.field_187810_eg, SoundCategory.BLOCKS, 0.5F, p_180655_4_.nextFloat() * 0.4F + 0.8F, false); } - for (int i = 0; i < 4; ++i) -@@ -271,20 +239,19 @@ +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { double d0 = (double)((float)p_180655_3_.func_177958_n() + p_180655_4_.nextFloat()); double d1 = (double)((float)p_180655_3_.func_177956_o() + p_180655_4_.nextFloat()); double d2 = (double)((float)p_180655_3_.func_177952_p() + p_180655_4_.nextFloat()); @@ -224,7 +236,7 @@ d5 = (double)(p_180655_4_.nextFloat() * 2.0F * (float)j); } -@@ -292,25 +259,21 @@ +@@ -288,25 +259,21 @@ } } @@ -250,7 +262,7 @@ public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_) { switch (p_185499_2_) -@@ -333,10 +296,9 @@ +@@ -329,10 +296,9 @@ } } @@ -262,7 +274,7 @@ } public BlockPattern.PatternHelper func_181089_f(World p_181089_1_, BlockPos p_181089_2_) -@@ -363,17 +325,7 @@ +@@ -359,27 +325,17 @@ for (EnumFacing.AxisDirection enumfacing$axisdirection : EnumFacing.AxisDirection.values()) { @@ -279,9 +291,13 @@ - ); + BlockPattern.PatternHelper blockpattern$patternhelper = new BlockPattern.PatternHelper(enumfacing.func_176743_c() == enumfacing$axisdirection ? blockpos : blockpos.func_177967_a(blockportal$size.field_150866_c, blockportal$size.func_181101_b() - 1), EnumFacing.func_181076_a(enumfacing$axisdirection, enumfacing$axis), EnumFacing.UP, loadingcache, blockportal$size.func_181101_b(), blockportal$size.func_181100_a(), 1); - for (int i = 0; i < blockportal$size.func_181101_b(); ++i) +- for (int i = 0; i < blockportal$size.func_181101_b(); i++) ++ for (int i = 0; i < blockportal$size.func_181101_b(); ++i) { -@@ -383,7 +335,7 @@ +- for (int j = 0; j < blockportal$size.func_181100_a(); j++) ++ for (int j = 0; j < blockportal$size.func_181100_a(); ++j) + { + BlockWorldState blockworldstate = blockpattern$patternhelper.func_177670_a(i, j, 1); if (blockworldstate.func_177509_a() != null && blockworldstate.func_177509_a().func_185904_a() != Material.field_151579_a) { @@ -290,7 +306,7 @@ } } } -@@ -399,21 +351,10 @@ +@@ -395,21 +351,10 @@ } } @@ -313,7 +329,7 @@ public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) { return BlockFaceShape.UNDEFINED; -@@ -446,15 +387,9 @@ +@@ -442,15 +387,9 @@ this.field_150866_c = EnumFacing.SOUTH; } @@ -331,7 +347,12 @@ } int i = this.func_180120_a(p_i45694_2_, this.field_150863_d) - 1; -@@ -485,8 +420,7 @@ +@@ -477,12 +416,11 @@ + { + int i; + +- for (i = 0; i < 22; i++) ++ for (i = 0; i < 22; ++i) { BlockPos blockpos = p_180120_1_.func_177967_a(p_180120_2_, i); @@ -341,9 +362,33 @@ { break; } -@@ -550,8 +484,7 @@ +@@ -506,9 +444,9 @@ + { + label56: - for (int j = 0; j < this.field_150868_h; ++j) +- for (this.field_150862_g = 0; this.field_150862_g < 21; this.field_150862_g++) ++ for (this.field_150862_g = 0; this.field_150862_g < 21; ++this.field_150862_g) + { +- for (int i = 0; i < this.field_150868_h; i++) ++ for (int i = 0; i < this.field_150868_h; ++i) + { + BlockPos blockpos = this.field_150861_f.func_177967_a(this.field_150866_c, i).func_177981_b(this.field_150862_g); + Block block = this.field_150867_a.func_180495_p(blockpos).func_177230_c(); +@@ -520,7 +458,7 @@ + + if (block == Blocks.field_150427_aO) + { +- this.field_150864_e++; ++ ++this.field_150864_e; + } + + if (i == 0) +@@ -544,10 +482,9 @@ + } + } + +- for (int j = 0; j < this.field_150868_h; j++) ++ for (int j = 0; j < this.field_150868_h; ++j) { - if (this.field_150867_a.func_180495_p(this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g)).func_177230_c() - != Blocks.field_150343_Z) @@ -351,9 +396,17 @@ { this.field_150862_g = 0; break; -@@ -589,10 +522,7 @@ +@@ -579,16 +516,13 @@ + + public void func_150859_c() + { +- for (int i = 0; i < this.field_150868_h; i++) ++ for (int i = 0; i < this.field_150868_h; ++i) + { + BlockPos blockpos = this.field_150861_f.func_177967_a(this.field_150866_c, i); - for (int j = 0; j < this.field_150862_g; ++j) +- for (int j = 0; j < this.field_150862_g; j++) ++ for (int j = 0; j < this.field_150862_g; ++j) { - this.field_150867_a - .func_180501_a( diff --git a/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch b/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch index a54ee6095..d8fa4de7b 100644 --- a/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch @@ -16,7 +16,16 @@ public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_) { super.func_176213_c(p_176213_1_, p_176213_2_, p_176213_3_); -@@ -73,27 +73,17 @@ +@@ -65,7 +65,7 @@ + + if (blockpattern$patternhelper != null) + { +- for (int i = 0; i < this.func_176391_l().func_177685_b(); i++) ++ for (int i = 0; i < this.func_176391_l().func_177685_b(); ++i) + { + BlockWorldState blockworldstate = blockpattern$patternhelper.func_177670_a(0, i, 0); + p_180673_1_.func_180501_a(blockworldstate.func_177508_d(), Blocks.field_150350_a.func_176223_P(), 2); +@@ -73,30 +73,20 @@ EntitySnowman entitysnowman = new EntitySnowman(p_180673_1_); BlockPos blockpos1 = blockpattern$patternhelper.func_177670_a(0, 2, 0).func_177508_d(); @@ -32,7 +41,8 @@ CriteriaTriggers.field_192133_m.func_192229_a(entityplayermp, entitysnowman); } - for (int l = 0; l < 120; ++l) +- for (int l = 0; l < 120; l++) ++ for (int l = 0; l < 120; ++l) { - p_180673_1_.func_175688_a( - EnumParticleTypes.SNOW_SHOVEL, @@ -46,8 +56,24 @@ + p_180673_1_.func_175688_a(EnumParticleTypes.SNOW_SHOVEL, (double)blockpos1.func_177958_n() + p_180673_1_.field_73012_v.nextDouble(), (double)blockpos1.func_177956_o() + p_180673_1_.field_73012_v.nextDouble() * 2.5D, (double)blockpos1.func_177952_p() + p_180673_1_.field_73012_v.nextDouble(), 0.0D, 0.0D, 0.0D); } - for (int i1 = 0; i1 < this.func_176391_l().func_177685_b(); ++i1) -@@ -119,27 +109,17 @@ +- for (int i1 = 0; i1 < this.func_176391_l().func_177685_b(); i1++) ++ for (int i1 = 0; i1 < this.func_176391_l().func_177685_b(); ++i1) + { + BlockWorldState blockworldstate2 = blockpattern$patternhelper.func_177670_a(0, i1, 0); + p_180673_1_.func_175722_b(blockworldstate2.func_177508_d(), Blocks.field_150350_a, false); +@@ -108,9 +98,9 @@ + + if (blockpattern$patternhelper != null) + { +- for (int j = 0; j < this.func_176388_T().func_177684_c(); j++) ++ for (int j = 0; j < this.func_176388_T().func_177684_c(); ++j) + { +- for (int k = 0; k < this.func_176388_T().func_177685_b(); k++) ++ for (int k = 0; k < this.func_176388_T().func_177685_b(); ++k) + { + p_180673_1_.func_180501_a(blockpattern$patternhelper.func_177670_a(j, k, 0).func_177508_d(), Blocks.field_150350_a.func_176223_P(), 2); + } +@@ -119,32 +109,22 @@ BlockPos blockpos = blockpattern$patternhelper.func_177670_a(1, 2, 0).func_177508_d(); EntityIronGolem entityirongolem = new EntityIronGolem(p_180673_1_); entityirongolem.func_70849_f(true); @@ -63,7 +89,8 @@ CriteriaTriggers.field_192133_m.func_192229_a(entityplayermp1, entityirongolem); } - for (int j1 = 0; j1 < 120; ++j1) +- for (int j1 = 0; j1 < 120; j1++) ++ for (int j1 = 0; j1 < 120; ++j1) { - p_180673_1_.func_175688_a( - EnumParticleTypes.SNOWBALL, @@ -77,7 +104,14 @@ + p_180673_1_.func_175688_a(EnumParticleTypes.SNOWBALL, (double)blockpos.func_177958_n() + p_180673_1_.field_73012_v.nextDouble(), (double)blockpos.func_177956_o() + p_180673_1_.field_73012_v.nextDouble() * 3.9D, (double)blockpos.func_177952_p() + p_180673_1_.field_73012_v.nextDouble(), 0.0D, 0.0D, 0.0D); } - for (int k1 = 0; k1 < this.func_176388_T().func_177684_c(); ++k1) +- for (int k1 = 0; k1 < this.func_176388_T().func_177684_c(); k1++) ++ for (int k1 = 0; k1 < this.func_176388_T().func_177684_c(); ++k1) + { +- for (int l1 = 0; l1 < this.func_176388_T().func_177685_b(); l1++) ++ for (int l1 = 0; l1 < this.func_176388_T().func_177685_b(); ++l1) + { + BlockWorldState blockworldstate1 = blockpattern$patternhelper.func_177670_a(k1, l1, 0); + p_180673_1_.func_175722_b(blockworldstate1.func_177508_d(), Blocks.field_150350_a, false); @@ -154,66 +134,46 @@ } } diff --git a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch index 3b1e12bf4..a40cc3700 100644 --- a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch @@ -309,6 +309,15 @@ this.func_180360_a(blockrailbase$enumraildirection); } +@@ -326,7 +401,7 @@ + + private void func_150651_b() + { +- for (int i = 0; i < this.field_150657_g.size(); i++) ++ for (int i = 0; i < this.field_150657_g.size(); ++i) + { + BlockRailBase.Rail blockrailbase$rail = this.func_180697_b(this.field_150657_g.get(i)); + @@ -343,9 +418,7 @@ private boolean func_180359_a(BlockPos p_180359_1_) @@ -320,6 +329,24 @@ } @Nullable +@@ -382,7 +455,7 @@ + + private boolean func_180363_c(BlockPos p_180363_1_) + { +- for (int i = 0; i < this.field_150657_g.size(); i++) ++ for (int i = 0; i < this.field_150657_g.size(); ++i) + { + BlockPos blockpos = this.field_150657_g.get(i); + +@@ -403,7 +476,7 @@ + { + if (this.func_180359_a(this.field_180367_c.func_177972_a(enumfacing))) + { +- i++; ++ ++i; + } + } + @@ -461,7 +534,7 @@ } } @@ -356,3 +383,12 @@ { if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a())) { +@@ -655,7 +728,7 @@ + { + this.field_150660_b.func_180501_a(this.field_180367_c, this.field_180366_e, 3); + +- for (int i = 0; i < this.field_150657_g.size(); i++) ++ for (int i = 0; i < this.field_150657_g.size(); ++i) + { + BlockRailBase.Rail blockrailbase$rail = this.func_180697_b(this.field_150657_g.get(i)); + diff --git a/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch b/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch index cc7b215d7..18446ebc6 100644 --- a/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailDetector.java.patch @@ -208,19 +208,21 @@ { i |= 8; } -@@ -245,7 +214,6 @@ +@@ -244,7 +213,7 @@ + return i; } - @SuppressWarnings("incomplete-switch") - @Override ++ @SuppressWarnings("incomplete-switch") public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_) { switch (p_185499_2_) -@@ -330,10 +298,9 @@ +@@ -328,10 +297,10 @@ + } } - @SuppressWarnings("incomplete-switch") - @Override ++ @SuppressWarnings("incomplete-switch") public IBlockState func_185471_a(IBlockState p_185471_1_, Mirror p_185471_2_) { - BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = p_185471_1_.func_177229_b(field_176573_b); @@ -228,7 +230,7 @@ switch (p_185471_2_) { -@@ -383,9 +350,8 @@ +@@ -381,9 +350,8 @@ return super.func_185471_a(p_185471_1_, p_185471_2_); } diff --git a/patches/minecraft/net/minecraft/block/BlockRailPowered.java.patch b/patches/minecraft/net/minecraft/block/BlockRailPowered.java.patch index dac617471..d8b43641f 100644 --- a/patches/minecraft/net/minecraft/block/BlockRailPowered.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailPowered.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/block/BlockRailPowered.java +++ after/net/minecraft/block/BlockRailPowered.java -@@ -14,28 +14,27 @@ +@@ -14,30 +14,30 @@ public class BlockRailPowered extends BlockRailBase { @@ -40,8 +40,11 @@ + this.func_180632_j(this.field_176227_L.func_177621_b().func_177226_a(field_176568_b, BlockRailBase.EnumRailDirection.NORTH_SOUTH).func_177226_a(field_176569_M, Boolean.valueOf(false))); } - @SuppressWarnings("incomplete-switch") -@@ -51,7 +50,7 @@ ++ @SuppressWarnings("incomplete-switch") + protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, IBlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) + { + if (p_176566_5_ >= 8) +@@ -50,7 +50,7 @@ int j = p_176566_2_.func_177956_o(); int k = p_176566_2_.func_177952_p(); boolean flag = true; @@ -50,7 +53,117 @@ switch (blockrailbase$enumraildirection) { -@@ -155,34 +154,26 @@ +@@ -58,11 +58,11 @@ + + if (p_176566_4_) + { +- k++; ++ ++k; + } + else + { +- k--; ++ --k; + } + + break; +@@ -70,11 +70,11 @@ + + if (p_176566_4_) + { +- i--; ++ --i; + } + else + { +- i++; ++ ++i; + } + + break; +@@ -82,12 +82,12 @@ + + if (p_176566_4_) + { +- i--; ++ --i; + } + else + { +- i++; +- j++; ++ ++i; ++ ++j; + flag = false; + } + +@@ -97,13 +97,13 @@ + + if (p_176566_4_) + { +- i--; +- j++; ++ --i; ++ ++j; + flag = false; + } + else + { +- i++; ++ ++i; + } + + blockrailbase$enumraildirection = BlockRailBase.EnumRailDirection.EAST_WEST; +@@ -112,12 +112,12 @@ + + if (p_176566_4_) + { +- k++; ++ ++k; + } + else + { +- k--; +- j++; ++ --k; ++ ++j; + flag = false; + } + +@@ -127,21 +127,26 @@ + + if (p_176566_4_) + { +- k++; +- j++; ++ ++k; ++ ++j; + flag = false; + } + else + { +- k--; ++ --k; + } + + blockrailbase$enumraildirection = BlockRailBase.EnumRailDirection.NORTH_SOUTH; + } + +- return this.func_176567_a(p_176566_1_, new BlockPos(i, j, k), p_176566_4_, p_176566_5_, blockrailbase$enumraildirection) +- ? true +- : flag && this.func_176567_a(p_176566_1_, new BlockPos(i, j - 1, k), p_176566_4_, p_176566_5_, blockrailbase$enumraildirection); ++ if (this.func_176567_a(p_176566_1_, new BlockPos(i, j, k), p_176566_4_, p_176566_5_, blockrailbase$enumraildirection)) ++ { ++ return true; ++ } ++ else ++ { ++ return flag && this.func_176567_a(p_176566_1_, new BlockPos(i, j - 1, k), p_176566_4_, p_176566_5_, blockrailbase$enumraildirection); ++ } + } + } + +@@ -149,34 +154,26 @@ { IBlockState iblockstate = p_176567_1_.func_180495_p(p_176567_2_); @@ -94,7 +207,7 @@ } else { -@@ -196,47 +187,39 @@ +@@ -190,47 +187,39 @@ } } @@ -149,19 +262,21 @@ { i |= 8; } -@@ -245,7 +228,6 @@ +@@ -238,7 +227,7 @@ + return i; } - @SuppressWarnings("incomplete-switch") - @Override ++ @SuppressWarnings("incomplete-switch") public IBlockState func_185499_a(IBlockState p_185499_1_, Rotation p_185499_2_) { switch (p_185499_2_) -@@ -330,10 +312,9 @@ +@@ -322,10 +311,10 @@ + } } - @SuppressWarnings("incomplete-switch") - @Override ++ @SuppressWarnings("incomplete-switch") public IBlockState func_185471_a(IBlockState p_185471_1_, Mirror p_185471_2_) { - BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = p_185471_1_.func_177229_b(field_176568_b); @@ -169,7 +284,7 @@ switch (p_185471_2_) { -@@ -383,9 +364,8 @@ +@@ -375,9 +364,8 @@ return super.func_185471_a(p_185471_1_, p_185471_2_); } diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch index 6d8611098..deb987213 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneComparator.java.patch @@ -112,7 +112,20 @@ protected boolean func_176404_e(World p_176404_1_, BlockPos p_176404_2_, IBlockState p_176404_3_) { int i = this.func_176397_f(p_176404_1_, p_176404_2_, p_176404_3_); -@@ -148,11 +124,10 @@ +@@ -136,15 +112,22 @@ + else + { + int j = this.func_176407_c(p_176404_1_, p_176404_2_, p_176404_3_); +- return j == 0 ? true : i >= j; ++ ++ if (j == 0) ++ { ++ return true; ++ } ++ else ++ { ++ return i >= j; ++ } } } @@ -125,7 +138,7 @@ BlockPos blockpos = p_176397_2_.func_177972_a(enumfacing); IBlockState iblockstate = p_176397_1_.func_180495_p(blockpos); -@@ -186,39 +161,17 @@ +@@ -178,39 +161,17 @@ @Nullable private EntityItemFrame func_176461_a(World p_176461_1_, final EnumFacing p_176461_2_, BlockPos p_176461_3_) { @@ -169,7 +182,7 @@ { if (!p_180639_4_.field_71075_bZ.field_75099_e) { -@@ -235,7 +188,6 @@ +@@ -227,7 +188,6 @@ } } @@ -177,7 +190,7 @@ protected void func_176398_g(World p_176398_1_, BlockPos p_176398_2_, IBlockState p_176398_3_) { if (!p_176398_1_.func_175691_a(p_176398_2_, this)) -@@ -278,36 +230,33 @@ +@@ -270,36 +230,33 @@ if (flag && !flag1) { @@ -217,7 +230,7 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_); -@@ -315,7 +264,6 @@ +@@ -307,7 +264,6 @@ this.func_176400_h(p_180663_1_, p_180663_2_, p_180663_3_); } @@ -225,7 +238,7 @@ public boolean func_189539_a(IBlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) { super.func_189539_a(p_189539_1_, p_189539_2_, p_189539_3_, p_189539_4_, p_189539_5_); -@@ -323,28 +271,22 @@ +@@ -315,28 +271,22 @@ return tileentity == null ? false : tileentity.func_145842_c(p_189539_4_, p_189539_5_); } @@ -257,7 +270,7 @@ { i |= 8; } -@@ -357,40 +299,39 @@ +@@ -349,40 +299,39 @@ return i; } @@ -321,7 +334,7 @@ } public static enum Mode implements IStringSerializable -@@ -405,13 +346,11 @@ +@@ -397,13 +346,11 @@ this.field_177041_c = p_i45731_3_; } diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch index 7d4adc6b1..ec177c1d1 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneDiode.java.patch @@ -185,16 +185,27 @@ public boolean func_149662_c(IBlockState p_149662_1_) { return false; -@@ -301,7 +276,7 @@ +@@ -301,9 +276,17 @@ public boolean func_176402_i(World p_176402_1_, BlockPos p_176402_2_, IBlockState p_176402_3_) { - EnumFacing enumfacing = p_176402_3_.func_177229_b(field_185512_D).func_176734_d(); + EnumFacing enumfacing = ((EnumFacing)p_176402_3_.func_177229_b(field_185512_D)).func_176734_d(); BlockPos blockpos = p_176402_2_.func_177972_a(enumfacing); +- return func_185546_B(p_176402_1_.func_180495_p(blockpos)) ? p_176402_1_.func_180495_p(blockpos).func_177229_b(field_185512_D) != enumfacing : false; ++ ++ if (func_185546_B(p_176402_1_.func_180495_p(blockpos))) ++ { ++ return p_176402_1_.func_180495_p(blockpos).func_177229_b(field_185512_D) != enumfacing; ++ } ++ else ++ { ++ return false; ++ } + } - if (func_185546_B(p_176402_1_.func_180495_p(blockpos))) -@@ -325,20 +300,36 @@ + protected int func_176399_m(IBlockState p_176399_1_) +@@ -317,20 +300,36 @@ protected abstract IBlockState func_180675_k(IBlockState p_180675_1_); diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch index 4f8185e28..d761c2bcb 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch @@ -94,15 +94,18 @@ public void func_180655_c(IBlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) { if (this.field_150187_a) -@@ -132,7 +116,7 @@ +@@ -132,9 +116,9 @@ private void func_180691_e(World p_180691_1_, BlockPos p_180691_2_) { Random random = p_180691_1_.field_73012_v; - double d0 = 0.0625; + double d0 = 0.0625D; - for (int i = 0; i < 6; ++i) +- for (int i = 0; i < 6; i++) ++ for (int i = 0; i < 6; ++i) { + double d1 = (double)((float)p_180691_2_.func_177958_n() + random.nextFloat()); + double d2 = (double)((float)p_180691_2_.func_177956_o() + random.nextFloat()); @@ -142,53 +126,46 @@ if (i == 0 && !p_180691_1_.func_180495_p(p_180691_2_.func_177984_a()).func_185914_p()) diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneTorch.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneTorch.java.patch index 78c305d67..0c5d8a122 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneTorch.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneTorch.java.patch @@ -27,7 +27,14 @@ if (p_176598_3_) { -@@ -46,7 +48,9 @@ +@@ -40,13 +42,15 @@ + + int i = 0; + +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) + { + BlockRedstoneTorch.Toggle blockredstonetorch$toggle = list.get(j); if (blockredstonetorch$toggle.field_180111_a.equals(p_176598_2_)) { @@ -119,7 +126,8 @@ - ); + p_180650_1_.func_184133_a((EntityPlayer)null, p_180650_2_, SoundEvents.field_187745_eA, SoundCategory.BLOCKS, 0.5F, 2.6F + (p_180650_1_.field_73012_v.nextFloat() - p_180650_1_.field_73012_v.nextFloat()) * 0.8F); - for (int i = 0; i < 5; ++i) +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { - double d0 = (double)p_180650_2_.func_177958_n() + p_180650_4_.nextDouble() * 0.6 + 0.2; - double d1 = (double)p_180650_2_.func_177956_o() + p_180650_4_.nextDouble() * 0.6 + 0.2; diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch index fffe6597d..11310c9a6 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch @@ -149,6 +149,15 @@ int j = 0; j = this.func_176342_a(p_176345_1_, p_176345_3_, j); this.field_150181_a = false; +@@ -247,7 +208,7 @@ + } + else if (j > 0) + { +- j--; ++ --j; + } + else + { @@ -261,7 +222,7 @@ if (i != j) @@ -241,16 +250,27 @@ } } } -@@ -456,7 +415,7 @@ +@@ -456,29 +415,26 @@ { return true; } - else if (func_176343_a(iblockstate, p_176339_3_)) + else if (canConnectTo(iblockstate, p_176339_3_, p_176339_1_, p_176339_2_)) ++ { ++ return true; ++ } ++ else if (iblockstate.func_177230_c() == Blocks.field_150416_aS && iblockstate.func_177229_b(BlockRedstoneDiode.field_185512_D) == p_176339_3_) { return true; } -@@ -472,15 +431,10 @@ + else + { +- return iblockstate.func_177230_c() == Blocks.field_150416_aS && iblockstate.func_177229_b(BlockRedstoneDiode.field_185512_D) == p_176339_3_ +- ? true +- : !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b()); ++ return !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b()); + } + } protected static boolean func_176340_e(IBlockAccess p_176340_0_, BlockPos p_176340_1_) { @@ -270,7 +290,7 @@ { Block block = p_176343_0_.func_177230_c(); -@@ -490,7 +444,7 @@ +@@ -488,18 +444,19 @@ } else if (Blocks.field_150413_aR.func_185547_C(p_176343_0_)) { @@ -278,12 +298,15 @@ + EnumFacing enumfacing = (EnumFacing)p_176343_0_.func_177229_b(BlockRedstoneRepeater.field_185512_D); return enumfacing == p_176343_1_ || enumfacing.func_176734_d() == p_176343_1_; } - else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) -@@ -499,11 +453,10 @@ - } ++ else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) ++ { ++ return p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N); ++ } else { -- return p_176343_0_.func_185897_m() && p_176343_1_ != null; +- return Blocks.field_190976_dk == p_176343_0_.func_177230_c() +- ? p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N) +- : p_176343_0_.func_185897_m() && p_176343_1_ != null; + return p_176343_0_.func_177230_c().canConnectRedstone(p_176343_0_, world, pos, p_176343_1_); } } @@ -292,7 +315,7 @@ public boolean func_149744_f(IBlockState p_149744_1_) { return this.field_150181_a; -@@ -536,20 +489,19 @@ +@@ -532,20 +489,19 @@ int i = MathHelper.func_76125_a((int)(f1 * 255.0F), 0, 255); int j = MathHelper.func_76125_a((int)(f2 * 255.0F), 0, 255); int k = MathHelper.func_76125_a((int)(f3 * 255.0F), 0, 255); @@ -317,7 +340,7 @@ float f = (float)i / 15.0F; float f1 = f * 0.6F + 0.4F; float f2 = Math.max(0.0F, f * f * 0.7F - 0.5F); -@@ -558,79 +510,60 @@ +@@ -554,79 +510,60 @@ } } @@ -409,7 +432,7 @@ public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_) { return BlockFaceShape.UNDEFINED; -@@ -649,13 +582,11 @@ +@@ -645,13 +582,11 @@ this.field_176820_d = p_i45689_3_; } diff --git a/patches/minecraft/net/minecraft/block/BlockReed.java.patch b/patches/minecraft/net/minecraft/block/BlockReed.java.patch index 8f4d71a42..c6edeb8b5 100644 --- a/patches/minecraft/net/minecraft/block/BlockReed.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockReed.java.patch @@ -46,7 +46,7 @@ - while (p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(i)).func_177230_c() == this) + for (i = 1; p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(i)).func_177230_c() == this; ++i) { -- ++i; +- i++; + ; } diff --git a/patches/minecraft/net/minecraft/block/BlockSapling.java.patch b/patches/minecraft/net/minecraft/block/BlockSapling.java.patch index db2ad1ab2..0a930535c 100644 --- a/patches/minecraft/net/minecraft/block/BlockSapling.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSapling.java.patch @@ -65,7 +65,19 @@ WorldGenerator worldgenerator = (WorldGenerator)(p_176476_4_.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true)); int i = 0; int j = 0; -@@ -112,10 +112,7 @@ +@@ -86,9 +86,9 @@ + case SPRUCE: + label68: + +- for (i = 0; i >= -1; i--) ++ for (i = 0; i >= -1; --i) + { +- for (j = 0; j >= -1; j--) ++ for (j = 0; j >= -1; --j) + { + if (this.func_181624_a(p_176476_1_, p_176476_2_, i, j, BlockPlanks.EnumType.SPRUCE)) + { +@@ -112,15 +112,12 @@ break; case JUNGLE: IBlockState iblockstate = Blocks.field_150364_r.func_176223_P().func_177226_a(BlockOldLog.field_176301_b, BlockPlanks.EnumType.JUNGLE); @@ -76,7 +88,26 @@ + IBlockState iblockstate1 = Blocks.field_150362_t.func_176223_P().func_177226_a(BlockOldLeaf.field_176239_P, BlockPlanks.EnumType.JUNGLE).func_177226_a(BlockLeaves.field_176236_b, Boolean.valueOf(false)); label82: - for (i = 0; i >= -1; --i) +- for (i = 0; i >= -1; i--) ++ for (i = 0; i >= -1; --i) + { +- for (j = 0; j >= -1; j--) ++ for (j = 0; j >= -1; --j) + { + if (this.func_181624_a(p_176476_1_, p_176476_2_, i, j, BlockPlanks.EnumType.JUNGLE)) + { +@@ -145,9 +142,9 @@ + case DARK_OAK: + label96: + +- for (i = 0; i >= -1; i--) ++ for (i = 0; i >= -1; --i) + { +- for (j = 0; j >= -1; j--) ++ for (j = 0; j >= -1; --j) + { + if (this.func_181624_a(p_176476_1_, p_176476_2_, i, j, BlockPlanks.EnumType.DARK_OAK)) + { @@ -198,10 +195,7 @@ private boolean func_181624_a(World p_181624_1_, BlockPos p_181624_2_, int p_181624_3_, int p_181624_4_, BlockPlanks.EnumType p_181624_5_) diff --git a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch index 9cb7f7b6a..6c2ebdfad 100644 --- a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch @@ -161,19 +161,25 @@ public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_) { return Items.field_151144_bL; -@@ -202,10 +177,7 @@ +@@ -202,35 +177,34 @@ public boolean func_176415_b(World p_176415_1_, BlockPos p_176415_2_, ItemStack p_176415_3_) { -- if (p_176415_3_.func_77960_j() == 1 -- && p_176415_2_.func_177956_o() >= 2 -- && p_176415_1_.func_175659_aa() != EnumDifficulty.PEACEFUL -- && !p_176415_1_.field_72995_K) +- return p_176415_3_.func_77960_j() == 1 +- && p_176415_2_.func_177956_o() >= 2 +- && p_176415_1_.func_175659_aa() != EnumDifficulty.PEACEFUL +- && !p_176415_1_.field_72995_K +- ? this.func_176414_j().func_177681_a(p_176415_1_, p_176415_2_) != null +- : false; + if (p_176415_3_.func_77960_j() == 1 && p_176415_2_.func_177956_o() >= 2 && p_176415_1_.func_175659_aa() != EnumDifficulty.PEACEFUL && !p_176415_1_.field_72995_K) - { - return this.func_176414_j().func_177681_a(p_176415_1_, p_176415_2_) != null; - } -@@ -217,10 +189,7 @@ ++ { ++ return this.func_176414_j().func_177681_a(p_176415_1_, p_176415_2_) != null; ++ } ++ else ++ { ++ return false; ++ } + } public void func_180679_a(World p_180679_1_, BlockPos p_180679_2_, TileEntitySkull p_180679_3_) { @@ -185,16 +191,26 @@ { BlockPattern blockpattern = this.func_176416_l(); BlockPattern.PatternHelper blockpattern$patternhelper = blockpattern.func_177681_a(p_180679_1_, p_180679_2_); -@@ -230,7 +199,7 @@ - for (int i = 0; i < 3; ++i) + + if (blockpattern$patternhelper != null) + { +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { BlockWorldState blockworldstate = blockpattern$patternhelper.func_177670_a(i, 0, 0); - p_180679_1_.func_180501_a(blockworldstate.func_177508_d(), blockworldstate.func_177509_a().func_177226_a(field_176417_b, true), 2); + p_180679_1_.func_180501_a(blockworldstate.func_177508_d(), blockworldstate.func_177509_a().func_177226_a(field_176417_b, Boolean.valueOf(true)), 2); } - for (int j = 0; j < blockpattern.func_177684_c(); ++j) -@@ -245,17 +214,11 @@ +- for (int j = 0; j < blockpattern.func_177684_c(); j++) ++ for (int j = 0; j < blockpattern.func_177684_c(); ++j) + { +- for (int k = 0; k < blockpattern.func_177685_b(); k++) ++ for (int k = 0; k < blockpattern.func_177685_b(); ++k) + { + BlockWorldState blockworldstate1 = blockpattern$patternhelper.func_177670_a(j, k, 0); + p_180679_1_.func_180501_a(blockworldstate1.func_177508_d(), Blocks.field_150350_a.func_176223_P(), 2); +@@ -240,39 +214,25 @@ BlockPos blockpos = blockpattern$patternhelper.func_177670_a(1, 0, 0).func_177508_d(); EntityWither entitywither = new EntityWither(p_180679_1_); BlockPos blockpos1 = blockpattern$patternhelper.func_177670_a(1, 2, 0).func_177508_d(); @@ -214,9 +230,11 @@ { CriteriaTriggers.field_192133_m.func_192229_a(entityplayermp, entitywither); } -@@ -264,15 +227,7 @@ - for (int l = 0; l < 120; ++l) + p_180679_1_.func_72838_d(entitywither); + +- for (int l = 0; l < 120; l++) ++ for (int l = 0; l < 120; ++l) { - p_180679_1_.func_175688_a( - EnumParticleTypes.SNOWBALL, @@ -230,8 +248,15 @@ + p_180679_1_.func_175688_a(EnumParticleTypes.SNOWBALL, (double)blockpos.func_177958_n() + p_180679_1_.field_73012_v.nextDouble(), (double)(blockpos.func_177956_o() - 2) + p_180679_1_.field_73012_v.nextDouble() * 3.9D, (double)blockpos.func_177952_p() + p_180679_1_.field_73012_v.nextDouble(), 0.0D, 0.0D, 0.0D); } - for (int i1 = 0; i1 < blockpattern.func_177684_c(); ++i1) -@@ -287,19 +242,17 @@ +- for (int i1 = 0; i1 < blockpattern.func_177684_c(); i1++) ++ for (int i1 = 0; i1 < blockpattern.func_177684_c(); ++i1) + { +- for (int j1 = 0; j1 < blockpattern.func_177685_b(); j1++) ++ for (int j1 = 0; j1 < blockpattern.func_177685_b(); ++j1) + { + BlockWorldState blockworldstate2 = blockpattern$patternhelper.func_177670_a(i1, j1, 0); + p_180679_1_.func_175722_b(blockworldstate2.func_177508_d(), Blocks.field_150350_a, false); +@@ -282,19 +242,17 @@ } } @@ -254,7 +279,7 @@ { i |= 8; } -@@ -307,33 +260,26 @@ +@@ -302,33 +260,26 @@ return i; } @@ -292,7 +317,7 @@ } return this.field_176420_N; -@@ -343,18 +289,12 @@ +@@ -338,18 +289,12 @@ { if (this.field_176421_O == null) { diff --git a/patches/minecraft/net/minecraft/block/BlockSlab.java.patch b/patches/minecraft/net/minecraft/block/BlockSlab.java.patch index 4322c72e1..9c05c3825 100644 --- a/patches/minecraft/net/minecraft/block/BlockSlab.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSlab.java.patch @@ -127,15 +127,43 @@ { IBlockState iblockstate = p_176225_2_.func_180495_p(p_176225_3_.func_177972_a(p_176225_4_)); boolean flag = func_185675_i(iblockstate) && iblockstate.func_177229_b(field_176554_a) == BlockSlab.EnumBlockHalf.TOP; -@@ -172,6 +162,7 @@ - return !func_185675_i(iblockstate) || flag; +@@ -150,24 +140,29 @@ + { + return true; + } ++ else if (p_176225_4_ == EnumFacing.UP && super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_)) ++ { ++ return true; ++ } + else + { +- return p_176225_4_ == EnumFacing.UP && super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_) +- ? true +- : !func_185675_i(iblockstate) || !flag; ++ return !func_185675_i(iblockstate) || !flag; + } + } + else if (p_176225_4_ == EnumFacing.UP) + { + return true; + } ++ else if (p_176225_4_ == EnumFacing.DOWN && super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_)) ++ { ++ return true; ++ } + else + { +- return p_176225_4_ == EnumFacing.DOWN && super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_) +- ? true +- : !func_185675_i(iblockstate) || flag; ++ return !func_185675_i(iblockstate) || flag; } } + return super.func_176225_a(p_176225_1_, p_176225_2_, p_176225_3_, p_176225_4_); } @SideOnly(Side.CLIENT) -@@ -201,13 +192,11 @@ +@@ -197,13 +192,11 @@ this.field_176988_c = p_i45713_3_; } diff --git a/patches/minecraft/net/minecraft/block/BlockStaticLiquid.java.patch b/patches/minecraft/net/minecraft/block/BlockStaticLiquid.java.patch index 9580b539f..72c3d5138 100644 --- a/patches/minecraft/net/minecraft/block/BlockStaticLiquid.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockStaticLiquid.java.patch @@ -16,7 +16,12 @@ public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_) { if (this.field_149764_J == Material.field_151587_i) -@@ -54,22 +52,22 @@ +@@ -50,26 +48,26 @@ + { + BlockPos blockpos = p_180650_2_; + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { blockpos = blockpos.func_177982_a(p_180650_4_.nextInt(3) - 1, 1, p_180650_4_.nextInt(3) - 1); @@ -44,6 +49,15 @@ { return; } +@@ -77,7 +75,7 @@ + } + else + { +- for (int k = 0; k < 3; k++) ++ for (int k = 0; k < 3; ++k) + { + BlockPos blockpos1 = p_180650_2_.func_177982_a(p_180650_4_.nextInt(3) - 1, 0, p_180650_4_.nextInt(3) - 1); + @@ -88,7 +86,7 @@ if (p_180650_1_.func_175623_d(blockpos1.func_177984_a()) && this.func_176368_m(p_180650_1_, blockpos1)) diff --git a/patches/minecraft/net/minecraft/block/BlockStem.java.patch b/patches/minecraft/net/minecraft/block/BlockStem.java.patch index e2090657b..31a2ecdd9 100644 --- a/patches/minecraft/net/minecraft/block/BlockStem.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockStem.java.patch @@ -136,7 +136,8 @@ - int i = p_180653_3_.func_177229_b(field_176484_a); + int i = ((Integer)state.func_177229_b(field_176484_a)).intValue(); - for (int j = 0; j < 3; ++j) +- for (int j = 0; j < 3; j++) ++ for (int j = 0; j < 3; ++j) { - if (p_180653_1_.field_73012_v.nextInt(15) <= i) + if (RANDOM.nextInt(15) <= i) diff --git a/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch b/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch index 9b7fb5318..88bc0a456 100644 --- a/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch @@ -72,7 +72,7 @@ } else { -@@ -78,13 +71,11 @@ +@@ -78,34 +71,29 @@ } } @@ -85,8 +85,10 @@ - @Override public void func_149666_a(CreativeTabs p_149666_1_, NonNullList p_149666_2_) { - for (int i = 1; i < 3; ++i) -@@ -93,19 +84,16 @@ +- for (int i = 1; i < 3; i++) ++ for (int i = 1; i < 3; ++i) + { + p_149666_2_.add(new ItemStack(this, 1, i)); } } diff --git a/patches/minecraft/net/minecraft/block/BlockTorch.java.patch b/patches/minecraft/net/minecraft/block/BlockTorch.java.patch index 851a98ccd..ad04fa406 100644 --- a/patches/minecraft/net/minecraft/block/BlockTorch.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTorch.java.patch @@ -77,7 +77,18 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { for (EnumFacing enumfacing : field_176596_a.func_177700_c()) -@@ -134,17 +120,7 @@ +@@ -124,23 +110,17 @@ + { + return true; + } ++ else if (p_176595_3_ != EnumFacing.UP && p_176595_3_ != EnumFacing.DOWN) ++ { ++ return !func_193382_c(block) && blockfaceshape == BlockFaceShape.SOLID; ++ } + else + { +- return p_176595_3_ != EnumFacing.UP && p_176595_3_ != EnumFacing.DOWN ? !func_193382_c(block) && blockfaceshape == BlockFaceShape.SOLID : false; ++ return false; } } @@ -96,7 +107,7 @@ { if (this.func_176595_b(p_180642_1_, p_180642_2_, p_180642_3_)) { -@@ -164,13 +140,11 @@ +@@ -160,13 +140,11 @@ } } @@ -110,7 +121,7 @@ public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) { this.func_176592_e(p_189540_2_, p_189540_3_, p_189540_1_); -@@ -184,7 +158,7 @@ +@@ -180,7 +158,7 @@ } else { @@ -119,7 +130,7 @@ EnumFacing.Axis enumfacing$axis = enumfacing.func_176740_k(); EnumFacing enumfacing1 = enumfacing.func_176734_d(); BlockPos blockpos = p_176592_2_.func_177972_a(enumfacing1); -@@ -214,7 +188,7 @@ +@@ -210,7 +188,7 @@ protected boolean func_176593_f(World p_176593_1_, BlockPos p_176593_2_, IBlockState p_176593_3_) { @@ -128,7 +139,7 @@ { return true; } -@@ -231,47 +205,28 @@ +@@ -227,47 +205,28 @@ } @SideOnly(Side.CLIENT) @@ -186,7 +197,7 @@ public IBlockState func_176203_a(int p_176203_1_) { IBlockState iblockstate = this.func_176223_P(); -@@ -298,7 +253,12 @@ +@@ -294,7 +253,12 @@ return iblockstate; } @@ -200,7 +211,7 @@ public int func_176201_c(IBlockState p_176201_1_) { int i = 0; -@@ -306,45 +266,41 @@ +@@ -302,45 +266,41 @@ switch ((EnumFacing)p_176201_1_.func_177229_b(field_176596_a)) { case EAST: diff --git a/patches/minecraft/net/minecraft/block/BlockVine.java.patch b/patches/minecraft/net/minecraft/block/BlockVine.java.patch index dfcadaaff..801616475 100644 --- a/patches/minecraft/net/minecraft/block/BlockVine.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockVine.java.patch @@ -17,7 +17,7 @@ { public static final PropertyBool field_176277_a = PropertyBool.func_177716_a("up"); public static final PropertyBool field_176273_b = PropertyBool.func_177716_a("north"); -@@ -35,67 +36,57 @@ +@@ -35,103 +36,86 @@ public static final PropertyBool field_176279_N = PropertyBool.func_177716_a("south"); public static final PropertyBool field_176280_O = PropertyBool.func_177716_a("west"); public static final PropertyBool[] field_176274_P = new PropertyBool[] {field_176277_a, field_176273_b, field_176279_N, field_176280_O, field_176278_M}; @@ -67,36 +67,42 @@ + if (((Boolean)p_185496_1_.func_177229_b(field_176277_a)).booleanValue()) { axisalignedbb = field_185757_g; - ++i; +- i++; ++ ++i; } - if (p_185496_1_.func_177229_b(field_176273_b)) + if (((Boolean)p_185496_1_.func_177229_b(field_176273_b)).booleanValue()) { axisalignedbb = field_185755_D; - ++i; +- i++; ++ ++i; } - if (p_185496_1_.func_177229_b(field_176278_M)) + if (((Boolean)p_185496_1_.func_177229_b(field_176278_M)).booleanValue()) { axisalignedbb = field_185754_C; - ++i; +- i++; ++ ++i; } - if (p_185496_1_.func_177229_b(field_176279_N)) + if (((Boolean)p_185496_1_.func_177229_b(field_176279_N)).booleanValue()) { axisalignedbb = field_185756_E; - ++i; +- i++; ++ ++i; } - if (p_185496_1_.func_177229_b(field_176280_O)) + if (((Boolean)p_185496_1_.func_177229_b(field_176280_O)).booleanValue()) { axisalignedbb = field_185753_B; - ++i; -@@ -104,34 +95,27 @@ +- i++; ++ ++i; + } + return i == 1 ? axisalignedbb : field_185505_j; } @@ -184,7 +190,7 @@ public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) { if (!p_189540_2_.field_72995_K && !this.func_176269_e(p_189540_2_, p_189540_3_, p_189540_1_)) -@@ -207,17 +181,16 @@ +@@ -207,193 +181,168 @@ } } @@ -202,9 +208,14 @@ - label179: + label181: - for (int k = -4; k <= 4; ++k) +- for (int k = -4; k <= 4; k++) ++ for (int k = -4; k <= 4; ++k) { -@@ -227,173 +200,149 @@ +- for (int l = -4; l <= 4; l++) ++ for (int l = -4; l <= 4; ++l) + { +- for (int i1 = -1; i1 <= 1; i1++) ++ for (int i1 = -1; i1 <= 1; ++i1) { if (p_180650_1_.func_180495_p(p_180650_2_.func_177982_a(k, i1, l)).func_177230_c() == this) { @@ -566,16 +577,17 @@ default: return super.func_185471_a(p_185471_1_, p_185471_2_); } -@@ -523,7 +451,7 @@ +@@ -523,16 +451,25 @@ for (PropertyBool propertybool : field_176274_P) { - if (p_176268_0_.func_177229_b(propertybool)) + if (((Boolean)p_176268_0_.func_177229_b(propertybool)).booleanValue()) { - ++i; +- i++; ++ ++i; } -@@ -531,8 +459,17 @@ + } return i; } diff --git a/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch b/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch index ffe206563..98f531270 100644 --- a/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch +++ b/patches/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java.patch @@ -11,7 +11,12 @@ public BlockPistonStructureHelper(World p_i45664_1_, BlockPos p_i45664_2_, EnumFacing p_i45664_3_, boolean p_i45664_4_) { -@@ -65,7 +65,7 @@ +@@ -61,11 +61,11 @@ + } + else + { +- for (int i = 0; i < this.field_177258_e.size(); i++) ++ for (int i = 0; i < this.field_177258_e.size(); ++i) { BlockPos blockpos = this.field_177258_e.get(i); @@ -55,7 +60,25 @@ { return false; } -@@ -148,7 +148,7 @@ +@@ -127,10 +127,10 @@ + + int i1 = 0; + +- for (int j = i - 1; j >= 0; j--) ++ for (int j = i - 1; j >= 0; --j) + { + this.field_177258_e.add(p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), j)); +- i1++; ++ ++i1; + } + + int j1 = 1; +@@ -144,11 +144,11 @@ + { + this.func_177255_a(i1, k); + +- for (int l = 0; l <= k + i1; l++) ++ for (int l = 0; l <= k + i1; ++l) { BlockPos blockpos2 = this.field_177258_e.get(l); @@ -80,6 +103,17 @@ { return false; } +@@ -182,8 +181,8 @@ + } + + this.field_177258_e.add(blockpos1); +- i1++; +- j1++; ++ ++i1; ++ ++j1; + } + } + } @@ -191,9 +190,9 @@ private void func_177255_a(int p_177255_1_, int p_177255_2_) diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 74788749e..96aac6873 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -637,6 +637,15 @@ } this.field_147127_av.func_147685_d(); +@@ -1082,7 +1071,7 @@ + long l = System.nanoTime(); + this.field_71424_I.func_76320_a("tick"); + +- for (int j = 0; j < Math.min(10, this.field_71428_T.field_74280_b); j++) ++ for (int j = 0; j < Math.min(10, this.field_71428_T.field_74280_b); ++j) + { + this.func_71407_l(); + } @@ -1091,7 +1080,7 @@ long i1 = System.nanoTime() - l; this.func_71361_d("Pre render"); @@ -660,6 +669,15 @@ } this.field_71424_I.func_76319_b(); +@@ -1140,7 +1131,7 @@ + this.func_175601_h(); + Thread.yield(); + this.func_71361_d("Post render"); +- this.field_71420_M++; ++ ++this.field_71420_M; + boolean flag = this.func_71356_B() && this.field_71462_r != null && this.field_71462_r.func_73868_f() && !this.field_71437_Z.func_71344_c(); + + if (this.field_71445_n != flag) @@ -1164,17 +1155,7 @@ while (func_71386_F() >= this.field_71419_L + 1000L) { @@ -702,9 +720,12 @@ } System.gc(); -@@ -1287,14 +1270,14 @@ +@@ -1285,16 +1268,16 @@ + } + else { - --p_71383_1_; +- p_71383_1_--; ++ --p_71383_1_; - if (p_71383_1_ < list.size() && !"unspecified".equals(list.get(p_71383_1_).field_76331_c)) + if (p_71383_1_ < list.size() && !"unspecified".equals((list.get(p_71383_1_)).field_76331_c)) @@ -728,7 +749,7 @@ GlStateManager.func_179128_n(5888); GlStateManager.func_179096_D(); GlStateManager.func_179109_b(0.0F, 0.0F, -2000.0F); -@@ -1323,31 +1306,31 @@ +@@ -1323,45 +1306,43 @@ int k = this.field_71440_d - 320; GlStateManager.func_179147_l(); bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181706_f); @@ -745,7 +766,8 @@ - double d0 = 0.0; + double d0 = 0.0D; - for (int l = 0; l < list.size(); ++l) +- for (int l = 0; l < list.size(); l++) ++ for (int l = 0; l < list.size(); ++l) { Profiler.Result profiler$result1 = list.get(l); - int i1 = MathHelper.func_76128_c(profiler$result1.field_76332_a / 4.0) + 1; @@ -761,7 +783,8 @@ + int i2 = j1 & 255; + bufferbuilder.func_181662_b((double)j, (double)k, 0.0D).func_181669_b(k1, l1, i2, 255).func_181675_d(); - for (int j2 = i1; j2 >= 0; --j2) +- for (int j2 = i1; j2 >= 0; j2--) ++ for (int j2 = i1; j2 >= 0; --j2) { - float f = (float)((d0 + profiler$result1.field_76332_a * (double)j2 / (double)i1) * (float)(Math.PI * 2) / 100.0); + float f = (float)((d0 + profiler$result1.field_76332_a * (double)j2 / (double)i1) * (Math.PI * 2D) / 100.0D); @@ -772,9 +795,10 @@ } tessellator.func_78381_a(); -@@ -1355,13 +1338,11 @@ + bufferbuilder.func_181668_a(5, DefaultVertexFormats.field_181706_f); - for (int i3 = i1; i3 >= 0; --i3) +- for (int i3 = i1; i3 >= 0; i3--) ++ for (int i3 = i1; i3 >= 0; --i3) { - float f3 = (float)((d0 + profiler$result1.field_76332_a * (double)i3 / (double)i1) * (float)(Math.PI * 2) / 100.0); + float f3 = (float)((d0 + profiler$result1.field_76332_a * (double)i3 / (double)i1) * (Math.PI * 2D) / 100.0D); @@ -789,6 +813,15 @@ } tessellator.func_78381_a(); +@@ -1391,7 +1372,7 @@ + s = decimalformat.format(profiler$result.field_76330_b) + "%"; + this.field_71466_p.func_175063_a(s, (float)(j + 160 - this.field_71466_p.func_78256_a(s)), (float)(k - 80 - 16), 16777215); + +- for (int k2 = 0; k2 < list.size(); k2++) ++ for (int k2 = 0; k2 < list.size(); ++k2) + { + Profiler.Result profiler$result2 = list.get(k2); + StringBuilder stringbuilder = new StringBuilder(); @@ -1408,11 +1389,9 @@ String s1 = stringbuilder.append(profiler$result2.field_76331_c).toString(); this.field_71466_p.func_175063_a(s1, (float)(j - 160), (float)(k + 80 + k2 * 8 + 20), profiler$result2.func_76329_a()); @@ -880,7 +913,18 @@ { this.field_71460_t.field_78516_c.func_187460_a(enumhand); return; -@@ -1662,6 +1632,11 @@ +@@ -1614,6 +1584,10 @@ + + public void func_71352_k() + { ++ if (net.minecraftforge.common.ForgeEarlyConfig.WINDOW_BORDERLESS_REPLACES_FULLSCREEN) { ++ Display.toggleBorderless(); ++ return; ++ } + try + { + this.field_71431_Q = !this.field_71431_Q; +@@ -1662,6 +1636,11 @@ } Display.setFullscreen(this.field_71431_Q); @@ -892,16 +936,19 @@ Display.setVSyncEnabled(this.field_71474_y.field_74352_v); this.func_175601_h(); } -@@ -1708,6 +1683,8 @@ - --this.field_71467_ac; +@@ -1705,8 +1684,10 @@ + { + if (this.field_71467_ac > 0) + { +- this.field_71467_ac--; ++ --this.field_71467_ac; } - -+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick(); + ++ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick(); + this.field_71424_I.func_76320_a("gui"); - if (!this.field_71445_n) -@@ -1736,7 +1713,7 @@ +@@ -1736,7 +1717,7 @@ { if (this.field_71439_g.func_110143_aJ() <= 0.0F && !(this.field_71462_r instanceof GuiGameOver)) { @@ -910,7 +957,7 @@ } else if (this.field_71439_g.func_70608_bn() && this.field_71441_e != null) { -@@ -1745,7 +1722,7 @@ +@@ -1745,7 +1726,7 @@ } else if (this.field_71462_r != null && this.field_71462_r instanceof GuiSleepMP && !this.field_71439_g.func_70608_bn()) { @@ -919,7 +966,25 @@ } if (this.field_71462_r != null) -@@ -1892,12 +1869,7 @@ +@@ -1802,7 +1783,7 @@ + + if (this.field_71429_W > 0) + { +- this.field_71429_W--; ++ --this.field_71429_W; + } + + this.field_71424_I.func_76318_c("keyboard"); +@@ -1813,7 +1794,7 @@ + { + if (this.field_71439_g != null) + { +- this.field_71457_ai++; ++ ++this.field_71457_ai; + + if (this.field_71457_ai == 30) + { +@@ -1892,12 +1873,7 @@ if (!this.field_71445_n && this.field_71441_e != null) { @@ -933,7 +998,7 @@ } this.field_71424_I.func_76318_c("particles"); -@@ -1914,6 +1886,7 @@ +@@ -1914,6 +1890,7 @@ } this.field_71424_I.func_76319_b(); @@ -941,7 +1006,16 @@ this.field_71423_H = func_71386_F(); } -@@ -2019,6 +1992,7 @@ +@@ -1992,7 +1969,7 @@ + this.func_71383_b(0); + } + +- for (int j = 0; j < 9; j++) ++ for (int j = 0; j < 9; ++j) + { + if (i == 2 + j) + { +@@ -2019,6 +1996,7 @@ } } } @@ -949,7 +1023,7 @@ } this.func_184117_aA(); -@@ -2095,16 +2069,16 @@ +@@ -2095,16 +2073,16 @@ { this.func_190521_a("debug.help.message"); GuiNewChat guinewchat = this.field_71456_v.func_146158_b(); @@ -976,16 +1050,40 @@ return true; } else if (p_184122_1_ == 20) -@@ -2136,7 +2110,7 @@ +@@ -2121,9 +2099,9 @@ + + private void func_184117_aA() + { +- while (this.field_71474_y.field_151457_aa.func_151468_f()) ++ for (; this.field_71474_y.field_151457_aa.func_151468_f(); this.field_71438_f.func_174979_m()) + { +- this.field_71474_y.field_74320_O++; ++ ++this.field_71474_y.field_74320_O; + + if (this.field_71474_y.field_74320_O > 2) + { +@@ -2136,10 +2114,8 @@ } else if (this.field_71474_y.field_74320_O == 1) { - this.field_71460_t.func_175066_a(null); + this.field_71460_t.func_175066_a((Entity)null); } +- +- this.field_71438_f.func_174979_m(); } -@@ -2223,16 +2197,27 @@ + while (this.field_71474_y.field_151458_ab.func_151468_f()) +@@ -2147,7 +2123,7 @@ + this.field_71474_y.field_74326_T = !this.field_71474_y.field_74326_T; + } + +- for (int i = 0; i < 9; i++) ++ for (int i = 0; i < 9; ++i) + { + boolean flag = this.field_71474_y.field_193629_ap.func_151470_d(); + boolean flag1 = this.field_71474_y.field_193630_aq.func_151470_d(); +@@ -2225,16 +2201,27 @@ this.field_71442_b.func_78766_c(this.field_71439_g); } @@ -1023,7 +1121,7 @@ } } else -@@ -2265,6 +2250,8 @@ +@@ -2267,6 +2254,8 @@ { while (Mouse.next()) { @@ -1032,7 +1130,7 @@ int i = Mouse.getEventButton(); KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState()); -@@ -2320,24 +2307,19 @@ +@@ -2322,24 +2311,19 @@ this.field_71462_r.func_146274_d(); } } @@ -1061,7 +1159,7 @@ System.gc(); ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false); WorldInfo worldinfo = isavehandler.func_75757_d(); -@@ -2358,15 +2340,11 @@ +@@ -2360,15 +2344,11 @@ YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString()); MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService(); GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); @@ -1079,7 +1177,7 @@ this.field_71437_Z.func_71256_s(); this.field_71455_al = true; } -@@ -2383,6 +2361,12 @@ +@@ -2385,6 +2365,12 @@ while (!this.field_71437_Z.func_71200_ad()) { @@ -1092,7 +1190,7 @@ String s = this.field_71437_Z.func_71195_b_(); if (s != null) -@@ -2398,17 +2382,24 @@ +@@ -2400,17 +2386,24 @@ { Thread.sleep(200L); } @@ -1121,7 +1219,7 @@ this.field_71453_ak = networkmanager; } -@@ -2419,6 +2410,8 @@ +@@ -2421,6 +2414,8 @@ public void func_71353_a(@Nullable WorldClient p_71353_1_, String p_71353_2_) { @@ -1130,7 +1228,7 @@ if (p_71353_1_ == null) { NetHandlerPlayClient nethandlerplayclient = this.func_147114_u(); -@@ -2431,6 +2424,18 @@ +@@ -2433,6 +2428,18 @@ if (this.field_71437_Z != null && this.field_71437_Z.func_175578_N()) { this.field_71437_Z.func_71263_m(); @@ -1149,7 +1247,7 @@ } this.field_71437_Z = null; -@@ -2452,8 +2457,9 @@ +@@ -2454,8 +2461,9 @@ { this.field_110448_aq.func_148529_f(); this.field_71456_v.func_181029_i(); @@ -1160,7 +1258,7 @@ } this.field_147127_av.func_147690_c(); -@@ -2470,6 +2476,7 @@ +@@ -2472,6 +2480,7 @@ } TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_71353_1_); @@ -1168,7 +1266,7 @@ if (p_71353_1_ != null) { -@@ -2478,9 +2485,7 @@ +@@ -2480,9 +2489,7 @@ AuthenticationService authenticationservice = new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString()); MinecraftSessionService minecraftsessionservice = authenticationservice.createMinecraftSessionService(); GameProfileRepository gameprofilerepository = authenticationservice.createProfileRepository(); @@ -1179,7 +1277,7 @@ TileEntitySkull.func_184293_a(playerprofilecache); TileEntitySkull.func_184294_a(minecraftsessionservice); PlayerProfileCache.func_187320_a(false); -@@ -2524,13 +2529,9 @@ +@@ -2526,13 +2533,9 @@ this.field_175622_Z = null; EntityPlayerSP entityplayersp = this.field_71439_g; @@ -1195,7 +1293,7 @@ this.field_71439_g.field_71093_bK = p_71354_1_; this.field_175622_Z = this.field_71439_g; this.field_71439_g.func_70065_x(); -@@ -2544,7 +2545,7 @@ +@@ -2546,7 +2549,7 @@ if (this.field_71462_r instanceof GuiGameOver) { @@ -1204,7 +1302,7 @@ } } -@@ -2578,159 +2579,8 @@ +@@ -2580,159 +2583,8 @@ { if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS) { @@ -1366,12 +1464,12 @@ } } -@@ -2778,7 +2628,14 @@ +@@ -2780,7 +2632,14 @@ { public String call() { - return GlStateManager.func_187416_u(7937) + " GL version " + GlStateManager.func_187416_u(7938) + ", " + GlStateManager.func_187416_u(7936); -+ if (Minecraft.func_71410_x().func_152345_ab()) ++ if (Minecraft.func_71410_x().func_152345_ab() && Display.isCreated()) + { + return GlStateManager.func_187416_u(7937) + " GL version " + GlStateManager.func_187416_u(7938) + ", " + GlStateManager.func_187416_u(7936); + } @@ -1382,7 +1480,7 @@ } }); p_71396_1_.func_85056_g().func_189529_a("GL Caps", new ICrashReportDetail() -@@ -2795,10 +2652,7 @@ +@@ -2797,10 +2656,7 @@ return Minecraft.this.field_71474_y.field_178881_t ? "Yes" : "No"; } }); @@ -1394,7 +1492,7 @@ { public String call() throws Exception { -@@ -2810,13 +2664,10 @@ +@@ -2812,13 +2668,10 @@ } else { @@ -1410,7 +1508,7 @@ p_71396_1_.func_85056_g().func_189529_a("Type", new ICrashReportDetail() { public String call() throws Exception -@@ -2883,11 +2734,11 @@ +@@ -2885,11 +2738,11 @@ return field_71432_P; } @@ -1423,7 +1521,7 @@ public void run() { Minecraft.this.func_110436_a(); -@@ -2895,21 +2746,20 @@ +@@ -2897,21 +2750,20 @@ }); } @@ -1451,7 +1549,7 @@ int i = 0; for (ResourcePackRepository.Entry resourcepackrepository$entry : this.field_110448_aq.func_110613_c()) -@@ -2939,7 +2789,6 @@ +@@ -2941,7 +2793,6 @@ } } @@ -1459,7 +1557,7 @@ public void func_70001_b(Snooper p_70001_1_) { p_70001_1_.func_152767_b("opengl_version", GlStateManager.func_187416_u(7938)); -@@ -2947,110 +2796,110 @@ +@@ -2949,110 +2800,110 @@ p_70001_1_.func_152767_b("client_brand", ClientBrandRetriever.getClientModName()); p_70001_1_.func_152767_b("launched_version", this.field_110447_Z); ContextCapabilities contextcapabilities = GLContext.getCapabilities(); @@ -1674,7 +1772,7 @@ GameProfile gameprofile = this.field_71449_j.func_148256_e(); if (gameprofile != null && gameprofile.getId() != null) -@@ -3061,21 +2910,10 @@ +@@ -3063,21 +2914,10 @@ public static int func_71369_N() { @@ -1698,7 +1796,7 @@ public boolean func_70002_Q() { return this.field_71474_y.field_74355_t; -@@ -3205,6 +3043,9 @@ +@@ -3207,6 +3047,9 @@ } else if (this.field_71439_g != null) { @@ -1708,7 +1806,7 @@ if (this.field_71439_g.field_70170_p.field_73011_w instanceof WorldProviderHell) { return MusicTicker.MusicType.NETHER; -@@ -3215,9 +3056,7 @@ +@@ -3217,9 +3060,7 @@ } else { @@ -1719,7 +1817,7 @@ } } else -@@ -3236,19 +3075,15 @@ +@@ -3238,19 +3079,15 @@ { if (Keyboard.getEventKeyState()) { @@ -1743,7 +1841,7 @@ { this.field_71474_y.func_74306_a(GameSettings.Options.NARRATOR, 1); -@@ -3258,6 +3093,7 @@ +@@ -3260,6 +3097,7 @@ } } } @@ -1751,7 +1849,7 @@ } } } -@@ -3292,16 +3128,16 @@ +@@ -3294,16 +3132,16 @@ { try { @@ -1771,7 +1869,7 @@ synchronized (this.field_152351_aB) { -@@ -3311,14 +3147,12 @@ +@@ -3313,14 +3151,12 @@ } } @@ -1787,7 +1885,7 @@ public boolean func_152345_ab() { return Thread.currentThread() == this.field_152352_aC; -@@ -3346,7 +3180,7 @@ +@@ -3348,7 +3184,7 @@ public ISearchTree func_193987_a(SearchTreeManager.Key p_193987_1_) { @@ -1796,7 +1894,7 @@ } public static int func_175610_ah() -@@ -3389,6 +3223,12 @@ +@@ -3391,6 +3227,12 @@ return this.field_184127_aH; } @@ -1809,7 +1907,7 @@ public boolean func_189648_am() { return this.field_71439_g != null && this.field_71439_g.func_175140_cp() || this.field_71474_y.field_178879_v; -@@ -3402,5 +3242,10 @@ +@@ -3404,5 +3246,10 @@ public Tutorial func_193032_ao() { return this.field_193035_aW; diff --git a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch index 88fab4f11..68baa83b1 100644 --- a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch +++ b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch @@ -111,6 +111,15 @@ this.field_148629_h.clear(); this.field_148626_m.clear(); this.field_148625_l.clear(); +@@ -222,7 +228,7 @@ + + public void func_148605_d() + { +- this.field_148618_g++; ++ ++this.field_148618_g; + + for (ITickableSound itickablesound : this.field_148625_l) + { @@ -245,13 +251,13 @@ while (iterator.hasNext()) @@ -164,16 +173,24 @@ { ISound isound1 = entry1.getKey(); -@@ -320,7 +327,7 @@ - } - else - { -- return this.field_148620_e.playing(s) || this.field_148624_n.containsKey(s) && this.field_148624_n.get(s) <= this.field_148618_g; +@@ -313,7 +320,15 @@ + else + { + String s = this.field_148630_i.get(p_148597_1_); +- return s == null ? false : this.field_148620_e.playing(s) || this.field_148624_n.containsKey(s) && this.field_148624_n.get(s) <= this.field_148618_g; ++ ++ if (s == null) ++ { ++ return false; ++ } ++ else ++ { + return this.field_148620_e.playing(s) || this.field_148624_n.containsKey(s) && ((Integer)this.field_148624_n.get(s)).intValue() <= this.field_148618_g; - } ++ } } } -@@ -342,6 +349,9 @@ + +@@ -334,6 +349,9 @@ { if (this.field_148617_f) { @@ -183,7 +200,7 @@ SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c); ResourceLocation resourcelocation = p_148611_1_.func_147650_b(); -@@ -349,7 +359,7 @@ +@@ -341,7 +359,7 @@ { if (field_188775_c.add(resourcelocation)) { @@ -192,7 +209,7 @@ } } else -@@ -364,7 +374,7 @@ +@@ -356,7 +374,7 @@ if (this.field_148620_e.getMasterVolume() <= 0.0F) { @@ -201,7 +218,7 @@ } else { -@@ -374,7 +384,7 @@ +@@ -366,7 +384,7 @@ { if (field_188775_c.add(resourcelocation)) { @@ -210,7 +227,7 @@ } } else -@@ -393,7 +403,7 @@ +@@ -385,7 +403,7 @@ if (f1 == 0.0F) { @@ -219,7 +236,7 @@ } else { -@@ -403,42 +413,20 @@ +@@ -395,42 +413,20 @@ if (sound.func_188723_h()) { @@ -267,7 +284,7 @@ this.field_148629_h.put(s, p_148611_1_); this.field_188776_k.put(soundcategory, s); -@@ -472,7 +460,7 @@ +@@ -464,7 +460,7 @@ if (flag) { @@ -276,7 +293,7 @@ this.field_148620_e.pause(s); this.field_189000_p.add(s); } -@@ -483,7 +471,7 @@ +@@ -475,7 +471,7 @@ { for (String s : this.field_189000_p) { @@ -285,7 +302,7 @@ this.field_148620_e.play(s); } -@@ -492,7 +480,7 @@ +@@ -484,7 +480,7 @@ public void func_148599_a(ISound p_148599_1_, int p_148599_2_) { @@ -294,7 +311,7 @@ } private static URL func_148612_a(final ResourceLocation p_148612_0_) -@@ -500,16 +488,13 @@ +@@ -492,16 +488,13 @@ String s = String.format("%s:%s:%s", "mcsounddomain", p_148612_0_.func_110624_b(), p_148612_0_.func_110623_a()); URLStreamHandler urlstreamhandler = new URLStreamHandler() { @@ -311,7 +328,7 @@ public InputStream getInputStream() throws IOException { return Minecraft.func_71410_x().func_110442_L().func_110536_a(p_148612_0_).func_110527_b(); -@@ -520,9 +505,9 @@ +@@ -512,9 +505,9 @@ try { @@ -323,7 +340,7 @@ { throw new Error("TODO: Sanely handle url exception! :D"); } -@@ -530,21 +515,24 @@ +@@ -522,21 +515,24 @@ public void func_148615_a(EntityPlayer p_148615_1_, float p_148615_2_) { @@ -357,7 +374,7 @@ float f8 = f2 * f4; float f9 = f3 * f4; float f10 = f2 * f6; -@@ -595,7 +583,6 @@ +@@ -587,7 +583,6 @@ { } @@ -365,12 +382,22 @@ public boolean playing(String p_playing_1_) { synchronized (SoundSystemConfig.THREAD_SYNC) -@@ -606,7 +593,7 @@ +@@ -598,8 +593,16 @@ } else { - Source source = this.soundLibrary.getSources().get(p_playing_1_); +- return source == null ? false : source.playing() || source.paused() || source.preLoad; + Source source = (Source)this.soundLibrary.getSources().get(p_playing_1_); - - if (source == null) - { ++ ++ if (source == null) ++ { ++ return false; ++ } ++ else ++ { ++ return source.playing() || source.paused() || source.preLoad; ++ } + } + } + } diff --git a/patches/minecraft/net/minecraft/client/entity/AbstractClientPlayer.java.patch b/patches/minecraft/net/minecraft/client/entity/AbstractClientPlayer.java.patch index 67e3b25ef..ca2aee1b8 100644 --- a/patches/minecraft/net/minecraft/client/entity/AbstractClientPlayer.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/AbstractClientPlayer.java.patch @@ -1,51 +1,6 @@ --- before/net/minecraft/client/entity/AbstractClientPlayer.java +++ after/net/minecraft/client/entity/AbstractClientPlayer.java -@@ -1,6 +1,7 @@ - package net.minecraft.client.entity; - - import com.mojang.authlib.GameProfile; -+import java.io.File; - import javax.annotation.Nullable; - import net.minecraft.client.Minecraft; - import net.minecraft.client.network.NetworkPlayerInfo; -@@ -33,14 +34,12 @@ - super(p_i45074_1_, p_i45074_2_); - } - -- @Override - public boolean func_175149_v() - { - NetworkPlayerInfo networkplayerinfo = Minecraft.func_71410_x().func_147114_u().func_175102_a(this.func_146103_bH().getId()); - return networkplayerinfo != null && networkplayerinfo.func_178848_b() == GameType.SPECTATOR; - } - -- @Override - public boolean func_184812_l_() - { - NetworkPlayerInfo networkplayerinfo = Minecraft.func_71410_x().func_147114_u().func_175102_a(this.func_146103_bH().getId()); -@@ -101,12 +100,7 @@ - - if (itextureobject == null) - { -- itextureobject = new ThreadDownloadImageData( -- null, -- String.format("http://skins.minecraft.net/MinecraftSkins/%s.png", StringUtils.func_76338_a(p_110304_1_)), -- DefaultPlayerSkin.func_177334_a(func_175147_b(p_110304_1_)), -- new ImageBufferDownload() -- ); -+ itextureobject = new ThreadDownloadImageData((File)null, String.format("http://skins.minecraft.net/MinecraftSkins/%s.png", StringUtils.func_76338_a(p_110304_1_)), DefaultPlayerSkin.func_177334_a(func_175147_b(p_110304_1_)), new ImageBufferDownload()); - texturemanager.func_110579_a(p_110304_0_, itextureobject); - } - -@@ -134,14 +128,14 @@ - } - - IAttributeInstance iattributeinstance = this.func_110148_a(SharedMonsterAttributes.field_111263_d); -- f = (float)((double)f * ((iattributeinstance.func_111126_e() / (double)this.field_71075_bZ.func_75094_b() + 1.0) / 2.0)); -+ f = (float)((double)f * ((iattributeinstance.func_111126_e() / (double)this.field_71075_bZ.func_75094_b() + 1.0D) / 2.0D)); - - if (this.field_71075_bZ.func_75094_b() == 0.0F || Float.isNaN(f) || Float.isInfinite(f)) - { +@@ -141,7 +141,7 @@ f = 1.0F; } @@ -54,14 +9,7 @@ { int i = this.func_184612_cw(); float f1 = (float)i / 20.0F; -@@ -152,12 +146,12 @@ - } - else - { -- f1 *= f1; -+ f1 = f1 * f1; - } - +@@ -158,6 +158,6 @@ f *= 1.0F - f1 * 0.15F; } diff --git a/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch b/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch index 8acea2d43..2a802eef0 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch @@ -44,15 +44,21 @@ public void func_70071_h_() { this.field_71082_cx = 0.0F; -@@ -80,7 +75,6 @@ - this.field_184619_aG += this.field_70721_aZ; +@@ -76,11 +71,10 @@ + f = 1.0F; + } + +- this.field_70721_aZ = this.field_70721_aZ + (f - this.field_70721_aZ) * 0.4F; +- this.field_184619_aG = this.field_184619_aG + this.field_70721_aZ; ++ this.field_70721_aZ += (f - this.field_70721_aZ) * 0.4F; ++ this.field_184619_aG += this.field_70721_aZ; } - @Override public void func_70636_d() { if (this.field_71184_b > 0) -@@ -88,16 +82,16 @@ +@@ -88,21 +82,21 @@ double d0 = this.field_70165_t + (this.field_71185_c - this.field_70165_t) / (double)this.field_71184_b; double d1 = this.field_70163_u + (this.field_71182_d - this.field_70163_u) / (double)this.field_71184_b; double d2 = this.field_70161_v + (this.field_71183_e - this.field_70161_v) / (double)this.field_71184_b; @@ -74,6 +80,12 @@ } this.field_70177_z = (float)((double)this.field_70177_z + d3 / (double)this.field_71184_b); + this.field_70125_A = (float)((double)this.field_70125_A + (this.field_71181_g - (double)this.field_70125_A) / (double)this.field_71184_b); +- this.field_71184_b--; ++ --this.field_71184_b; + this.func_70107_b(d0, d1, d2); + this.func_70101_b(this.field_70177_z, this.field_70125_A); + } @@ -110,7 +104,7 @@ this.field_71107_bF = this.field_71109_bG; this.func_82168_bl(); @@ -83,7 +95,16 @@ if (f1 > 0.1F) { -@@ -134,21 +128,18 @@ +@@ -127,28 +121,25 @@ + f = 0.0F; + } + +- this.field_71109_bG = this.field_71109_bG + (f1 - this.field_71109_bG) * 0.4F; +- this.field_70726_aT = this.field_70726_aT + (f - this.field_70726_aT) * 0.8F; ++ this.field_71109_bG += (f1 - this.field_71109_bG) * 0.4F; ++ this.field_70726_aT += (f - this.field_70726_aT) * 0.8F; + this.field_70170_p.field_72984_F.func_76320_a("push"); + this.func_85033_bc(); this.field_70170_p.field_72984_F.func_76319_b(); } diff --git a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch index 0620a5517..48410ca49 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch @@ -62,12 +62,14 @@ Entity entity = this.func_184208_bv(); if (entity != this && entity.func_184186_bw()) -@@ -246,30 +241,21 @@ +@@ -245,31 +240,22 @@ + double d2 = this.field_70161_v - this.field_175167_bK; double d3 = (double)(this.field_70177_z - this.field_175164_bL); double d4 = (double)(this.field_70125_A - this.field_175165_bM); - ++this.field_175168_bP; +- this.field_175168_bP++; - boolean flag2 = d0 * d0 + d1 * d1 + d2 * d2 > 9.0E-4 || this.field_175168_bP >= 20; - boolean flag3 = d3 != 0.0 || d4 != 0.0; ++ ++this.field_175168_bP; + boolean flag2 = d0 * d0 + d1 * d1 + d2 * d2 > 9.0E-4D || this.field_175168_bP >= 20; + boolean flag3 = d3 != 0.0D || d4 != 0.0D; @@ -510,14 +512,23 @@ } } -@@ -821,7 +792,6 @@ +@@ -821,14 +792,13 @@ return this.field_71159_c.func_175606_aa() == this; } - @Override public void func_70636_d() { - ++this.field_71157_e; +- this.field_71157_e++; ++ ++this.field_71157_e; + + if (this.field_71156_d > 0) + { +- this.field_71156_d--; ++ --this.field_71156_d; + } + + this.field_71080_cy = this.field_71086_bY; @@ -842,14 +812,12 @@ this.func_71053_j(); } @@ -535,6 +546,15 @@ } this.field_71086_bY += 0.0125F; +@@ -885,7 +853,7 @@ + + if (this.field_71088_bW > 0) + { +- this.field_71088_bW--; ++ --this.field_71088_bW; + } + + boolean flag = this.field_71158_b.field_78901_c; @@ -893,6 +861,7 @@ float f = 0.8F; boolean flag2 = this.field_71158_b.field_192832_b >= 0.8F; @@ -543,7 +563,14 @@ this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b); if (this.func_184587_cr() && !this.func_184218_aH()) -@@ -912,28 +881,16 @@ +@@ -906,34 +875,22 @@ + + if (this.field_189812_cs > 0) + { +- this.field_189812_cs--; ++ --this.field_189812_cs; + flag3 = true; + this.field_71158_b.field_78901_c = true; } AxisAlignedBB axisalignedbb = this.func_174813_aQ(); @@ -608,17 +635,43 @@ { ItemStack itemstack = this.func_184582_a(EntityEquipmentSlot.CHEST); -@@ -1006,8 +953,8 @@ +@@ -1006,14 +953,14 @@ { if (this.field_71158_b.field_78899_d) { - this.field_71158_b.field_78902_a = (float)((double)this.field_71158_b.field_78902_a / 0.3); - this.field_71158_b.field_192832_b = (float)((double)this.field_71158_b.field_192832_b / 0.3); +- this.field_70181_x = this.field_70181_x - (double)(this.field_71075_bZ.func_75093_a() * 3.0F); + this.field_71158_b.field_78902_a = (float)((double)this.field_71158_b.field_78902_a / 0.3D); + this.field_71158_b.field_192832_b = (float)((double)this.field_71158_b.field_192832_b / 0.3D); - this.field_70181_x -= (double)(this.field_71075_bZ.func_75093_a() * 3.0F); ++ this.field_70181_x -= (double)(this.field_71075_bZ.func_75093_a() * 3.0F); + } + + if (this.field_71158_b.field_78901_c) + { +- this.field_70181_x = this.field_70181_x + (double)(this.field_71075_bZ.func_75093_a() * 3.0F); ++ this.field_70181_x += (double)(this.field_71075_bZ.func_75093_a() * 3.0F); } + } + +@@ -1023,7 +970,7 @@ + + if (this.field_110320_a < 0) + { +- this.field_110320_a++; ++ ++this.field_110320_a; + if (this.field_110320_a == 0) + { +@@ -1044,7 +991,7 @@ + } + else if (flag) + { +- this.field_110320_a++; ++ ++this.field_110320_a; + + if (this.field_110320_a < 10) + { @@ -1070,7 +1017,6 @@ } } @@ -627,23 +680,21 @@ public void func_70098_U() { super.func_70098_U(); -@@ -1079,13 +1025,8 @@ +@@ -1079,11 +1025,8 @@ if (this.func_184187_bx() instanceof EntityBoat) { EntityBoat entityboat = (EntityBoat)this.func_184187_bx(); - entityboat.func_184442_a( - this.field_71158_b.field_187257_e, this.field_71158_b.field_187258_f, this.field_71158_b.field_187255_c, this.field_71158_b.field_187256_d - ); -- this.field_184844_co |= this.field_71158_b.field_187257_e -- || this.field_71158_b.field_187258_f -- || this.field_71158_b.field_187255_c -- || this.field_71158_b.field_187256_d; +- this.field_184844_co = this.field_184844_co +- | (this.field_71158_b.field_187257_e || this.field_71158_b.field_187258_f || this.field_71158_b.field_187255_c || this.field_71158_b.field_187256_d); + entityboat.func_184442_a(this.field_71158_b.field_187257_e, this.field_71158_b.field_187258_f, this.field_71158_b.field_187255_c, this.field_71158_b.field_187256_d); + this.field_184844_co |= this.field_71158_b.field_187257_e || this.field_71158_b.field_187258_f || this.field_71158_b.field_187255_c || this.field_71158_b.field_187256_d; } } -@@ -1095,7 +1036,6 @@ +@@ -1093,7 +1036,6 @@ } @Nullable @@ -651,7 +702,7 @@ public PotionEffect func_184596_c(@Nullable Potion p_184596_1_) { if (p_184596_1_ == MobEffects.field_76431_k) -@@ -1107,7 +1047,6 @@ +@@ -1105,7 +1047,6 @@ return super.func_184596_c(p_184596_1_); } @@ -659,7 +710,7 @@ public void func_70091_d(MoverType p_70091_1_, double p_70091_2_, double p_70091_4_, double p_70091_6_) { double d0 = this.field_70165_t; -@@ -1132,8 +1071,10 @@ +@@ -1130,8 +1071,10 @@ if (vec2f.field_189982_i != 0.0F || vec2f.field_189983_j != 0.0F) { Vec3d vec3d = new Vec3d(this.field_70165_t, this.func_174813_aQ().field_72338_b, this.field_70161_v); @@ -672,7 +723,7 @@ float f = this.func_70689_ay(); float f1 = (float)vec3d2.func_189985_c(); -@@ -1141,8 +1082,8 @@ +@@ -1139,8 +1082,8 @@ { float f2 = f * vec2f.field_189982_i; float f3 = f * vec2f.field_189983_j; @@ -683,7 +734,7 @@ vec3d2 = new Vec3d((double)(f2 * f5 - f3 * f4), vec3d2.field_72448_b, (double)(f3 * f5 + f2 * f4)); f1 = (float)vec3d2.func_189985_c(); -@@ -1157,7 +1098,7 @@ +@@ -1155,7 +1098,7 @@ Vec3d vec3d13 = this.func_189651_aD(); float f13 = (float)(vec3d13.field_72450_a * vec3d12.field_72450_a + vec3d13.field_72449_c * vec3d12.field_72449_c); @@ -692,7 +743,7 @@ { BlockPos blockpos = new BlockPos(this.field_70165_t, this.func_174813_aQ().field_72337_e, this.field_70161_v); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); -@@ -1181,11 +1122,10 @@ +@@ -1179,11 +1122,10 @@ Vec3d vec3d4 = vec3d1.func_178787_e(vec3d12.func_186678_a((double)f8)); float f9 = this.field_70130_N; float f10 = this.field_70131_O; @@ -708,7 +759,7 @@ Vec3d vec3d6 = vec3d5.func_186678_a((double)(f9 * 0.5F)); Vec3d vec3d7 = lvt_19_1_.func_178788_d(vec3d6); Vec3d vec3d8 = vec3d4.func_178788_d(vec3d6); -@@ -1195,9 +1135,11 @@ +@@ -1193,9 +1135,11 @@ if (!list.isEmpty()) { @@ -720,13 +771,13 @@ for (AxisAlignedBB axisalignedbb2 : list) { -@@ -1206,9 +1148,15 @@ +@@ -1204,9 +1148,15 @@ f11 = (float)axisalignedbb2.field_72337_e; Vec3d vec3d11 = axisalignedbb2.func_189972_c(); BlockPos blockpos1 = new BlockPos(vec3d11); + int i = 1; -- for (int i = 1; (float)i < f7; ++i) +- for (int i = 1; (float)i < f7; i++) + while (true) { + if ((float)i >= f7) @@ -737,7 +788,7 @@ BlockPos blockpos2 = blockpos1.func_177981_b(i); IBlockState iblockstate2 = this.field_70170_p.func_180495_p(blockpos2); AxisAlignedBB axisalignedbb1; -@@ -1233,9 +1181,9 @@ +@@ -1231,9 +1181,9 @@ return; } } @@ -749,7 +800,7 @@ } } -@@ -1243,7 +1191,7 @@ +@@ -1241,7 +1191,7 @@ { float f14 = (float)((double)f11 - this.func_174813_aQ().field_72338_b); @@ -758,7 +809,7 @@ { this.field_189812_cs = 1; } -@@ -1254,5 +1202,18 @@ +@@ -1252,5 +1202,18 @@ } } } diff --git a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch index 3c357aaeb..81c17a41f 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -24,15 +24,18 @@ @SideOnly(Side.CLIENT) public class FontRenderer implements IResourceManagerReloadListener -@@ -56,7 +60,7 @@ +@@ -56,9 +60,9 @@ this.field_111273_g = p_i1035_2_; this.field_78298_i = p_i1035_3_; this.field_78293_l = p_i1035_4_; - p_i1035_3_.func_110577_a(this.field_111273_g); + bindTexture(this.field_111273_g); - for (int i = 0; i < 32; ++i) +- for (int i = 0; i < 32; i++) ++ for (int i = 0; i < 32; ++i) { + int j = (i >> 3 & 1) * 85; + int k = (i >> 2 & 1) * 170 + j; @@ -107,7 +111,7 @@ try @@ -42,6 +45,30 @@ bufferedimage = TextureUtil.func_177053_a(iresource.func_110527_b()); } catch (IOException ioexception) +@@ -128,7 +132,7 @@ + boolean lvt_8_1_ = true; + float lvt_9_1_ = 8.0F / (float)lvt_7_1_; + +- for (int lvt_10_1_ = 0; lvt_10_1_ < 256; lvt_10_1_++) ++ for (int lvt_10_1_ = 0; lvt_10_1_ < 256; ++lvt_10_1_) + { + int j1 = lvt_10_1_ % 16; + int k1 = lvt_10_1_ / 16; +@@ -140,12 +144,12 @@ + + int l1; + +- for (l1 = lvt_7_1_ - 1; l1 >= 0; l1--) ++ for (l1 = lvt_7_1_ - 1; l1 >= 0; --l1) + { + int i2 = j1 * lvt_7_1_ + l1; + boolean flag1 = true; + +- for (int j2 = 0; j2 < lvt_6_1_ && flag1; j2++) ++ for (int j2 = 0; j2 < lvt_6_1_ && flag1; ++j2) + { + int k2 = (k1 * lvt_7_1_ + j2) * lvt_3_2_; + @@ -171,7 +175,7 @@ try @@ -86,7 +113,12 @@ this.func_78265_b(); int i; -@@ -326,7 +331,7 @@ +@@ -322,11 +327,11 @@ + + private void func_78255_a(String p_78255_1_, boolean p_78255_2_) + { +- for (int i = 0; i < p_78255_1_.length(); i++) ++ for (int i = 0; i < p_78255_1_.length(); ++i) { char c0 = p_78255_1_.charAt(i); @@ -116,7 +148,7 @@ } else if (i1 == 16) { -@@ -379,7 +379,7 @@ +@@ -379,10 +379,10 @@ this.field_78299_w = false; this.field_78300_v = false; this.field_78301_u = false; @@ -124,7 +156,11 @@ + setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); } - ++i; +- i++; ++ ++i; + } + else + { @@ -409,7 +409,7 @@ c0 = c1; } @@ -134,9 +170,12 @@ boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_; if (flag) -@@ -447,6 +447,15 @@ +@@ -445,8 +445,17 @@ + this.field_78296_k += f1; + } - ++f; +- f++; ++ ++f; } + doDraw(f); + } @@ -159,6 +198,24 @@ this.field_78295_j = p_180455_2_; this.field_78296_k = p_180455_3_; this.func_78255_a(p_180455_1_, p_180455_5_); +@@ -545,7 +554,7 @@ + int i = 0; + boolean flag = false; + +- for (int j = 0; j < p_78256_1_.length(); j++) ++ for (int j = 0; j < p_78256_1_.length(); ++j) + { + char c0 = p_78256_1_.charAt(j); + int k = this.func_78263_a(c0); +@@ -570,7 +579,7 @@ + + if (flag && k > 0) + { +- i++; ++ ++i; + } + } + @@ -580,6 +589,7 @@ public int func_78263_a(char p_78263_1_) @@ -167,6 +224,15 @@ if (p_78263_1_ == 167) { return -1; +@@ -602,7 +612,7 @@ + int j = this.field_78287_e[p_78263_1_] & 255; + int k = j >>> 4; + int l = j & 15; +- l++; ++ ++l; + return (l - k) / 2 + 1; + } + else @@ -635,14 +645,17 @@ { flag = false; @@ -190,6 +256,15 @@ } else if (i1 < 0) { +@@ -654,7 +667,7 @@ + + if (flag1) + { +- i++; ++ ++i; + } + } + @@ -678,7 +691,7 @@ private String func_78273_d(String p_78273_1_) @@ -199,7 +274,7 @@ { p_78273_1_ = p_78273_1_.substring(0, p_78273_1_.length() - 1); } -@@ -725,9 +738,95 @@ +@@ -725,9 +738,96 @@ public List func_78271_c(String p_78271_1_, int p_78271_2_) { @@ -225,6 +300,7 @@ + list.add(line.toString()); + fed = i + 1; + line.delete(0, line.length()).append(format); ++ prevFormat = format.length(); + lineWidth = 0; + widths[0] = lineWidth; + formats[0] = format.toString(); @@ -278,7 +354,7 @@ + lineWidth = func_78263_a(current); + } else { + d = icui - fed; -+ if (line.charAt(d + prevFormat - 1) == '§') d++; ++ if (line.charAt(d + prevFormat - 2) == '§') d++; + list.add(line.substring(0, d + prevFormat)); + temp = line.substring(d + prevFormat); + fed += d; @@ -296,7 +372,7 @@ String func_78280_d(String p_78280_1_, int p_78280_2_) { int i = this.func_78259_e(p_78280_1_, p_78280_2_); -@@ -746,6 +845,7 @@ +@@ -746,6 +846,7 @@ } } @@ -304,7 +380,33 @@ private int func_78259_e(String p_78259_1_, int p_78259_2_) { int i = p_78259_1_.length(); -@@ -844,6 +944,26 @@ +@@ -753,14 +854,14 @@ + int k = 0; + int l = -1; + +- for (boolean flag = false; k < i; k++) ++ for (boolean flag = false; k < i; ++k) + { + char c0 = p_78259_1_.charAt(k); + + switch (c0) + { + case '\n': +- k--; ++ --k; + break; + case ' ': + l = k; +@@ -769,7 +870,7 @@ + + if (flag) + { +- j++; ++ ++j; + } + + break; +@@ -844,6 +945,26 @@ public boolean func_78260_a() { return this.field_78294_m; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch index 95e4a3b2f..cbaa67de2 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch @@ -55,7 +55,8 @@ + this.field_146292_n.add(new GuiOptionButton(gamesettings$options.func_74381_c(), this.field_146294_l / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options, this.field_146497_i.func_74297_c(gamesettings$options))); } - ++i; +- i++; ++ ++i; } } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch index 177a79d87..5f03b78da 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch @@ -124,6 +124,24 @@ worldsettings.func_82750_a(this.field_146334_a); if (this.field_146338_v && !this.field_146337_w) +@@ -319,7 +285,7 @@ + } + else if (p_146284_1_.field_146127_k == 5) + { +- this.field_146331_K++; ++ ++this.field_146331_K; + + if (this.field_146331_K >= WorldType.field_77139_a.length) + { +@@ -328,7 +294,7 @@ + + while (!this.func_175299_g()) + { +- this.field_146331_K++; ++ ++this.field_146331_K; + + if (this.field_146331_K >= WorldType.field_77139_a.length) + { @@ -348,14 +314,7 @@ } else if (p_146284_1_.field_146127_k == 8) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch index a6fc4e15a..cf0a10960 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiEnchantment.java.patch @@ -8,7 +8,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ContainerEnchantment; import net.minecraft.item.ItemStack; -@@ -50,21 +51,18 @@ +@@ -50,28 +51,25 @@ this.field_175380_I = p_i45502_3_; } @@ -30,6 +30,14 @@ protected void func_73864_a(int p_73864_1_, int p_73864_2_, int p_73864_3_) throws IOException { super.func_73864_a(p_73864_1_, p_73864_2_, p_73864_3_); + int i = (this.field_146294_l - this.field_146999_f) / 2; + int j = (this.field_146295_m - this.field_147000_g) / 2; + +- for (int k = 0; k < 3; k++) ++ for (int k = 0; k < 3; ++k) + { + int l = p_73864_1_ - (i + 60); + int i1 = p_73864_2_ - (j + 14 + 19 * k); @@ -83,7 +81,6 @@ } } @@ -61,6 +69,15 @@ GlStateManager.func_179101_C(); RenderHelper.func_74518_a(); GlStateManager.func_179128_n(5889); +@@ -158,7 +150,7 @@ + EnchantmentNameParts.func_178176_a().func_148335_a((long)this.field_147075_G.field_178149_f); + int k = this.field_147075_G.func_178147_e(); + +- for (int l = 0; l < 3; l++) ++ for (int l = 0; l < 3; ++l) + { + int i1 = i + 60; + int j1 = i1 + 20; @@ -179,7 +171,7 @@ FontRenderer fontrenderer = this.field_146297_k.field_71464_q; int i2 = 6839882; @@ -78,7 +95,15 @@ public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) { p_73863_3_ = this.field_146297_k.func_193989_ak(); -@@ -229,11 +220,12 @@ +@@ -222,18 +213,19 @@ + boolean flag = this.field_146297_k.field_71439_g.field_71075_bZ.field_75098_d; + int i = this.field_147075_G.func_178147_e(); + +- for (int j = 0; j < 3; j++) ++ for (int j = 0; j < 3; ++j) + { + int k = this.field_147075_G.field_75167_g[j]; + Enchantment enchantment = Enchantment.func_185262_c(this.field_147075_G.field_185001_h[j]); int l = this.field_147075_G.field_185002_i[j]; int i1 = j + 1; @@ -94,14 +119,15 @@ if (!flag) { list.add(""); -@@ -285,11 +277,15 @@ +@@ -285,19 +277,23 @@ { this.field_147077_B = itemstack; - do + while (true) { - this.field_147082_x += (float)(this.field_147074_F.nextInt(4) - this.field_147074_F.nextInt(4)); +- this.field_147082_x = this.field_147082_x + (float)(this.field_147074_F.nextInt(4) - this.field_147074_F.nextInt(4)); ++ this.field_147082_x += (float)(this.field_147074_F.nextInt(4) - this.field_147074_F.nextInt(4)); + + if (this.field_147071_v > this.field_147082_x + 1.0F || this.field_147071_v < this.field_147082_x - 1.0F) + { @@ -111,4 +137,24 @@ - while (this.field_147071_v <= this.field_147082_x + 1.0F && this.field_147071_v >= this.field_147082_x - 1.0F); } - ++this.field_147073_u; +- this.field_147073_u++; ++ ++this.field_147073_u; + this.field_147069_w = this.field_147071_v; + this.field_147076_A = this.field_147080_z; + boolean flag = false; + +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) + { + if (this.field_147075_G.field_75167_g[i] != 0) + { +@@ -318,7 +314,7 @@ + float f1 = (this.field_147082_x - this.field_147071_v) * 0.4F; + float f = 0.2F; + f1 = MathHelper.func_76131_a(f1, -0.2F, 0.2F); +- this.field_147081_y = this.field_147081_y + (f1 - this.field_147081_y) * 0.9F; +- this.field_147071_v = this.field_147071_v + this.field_147081_y; ++ this.field_147081_y += (f1 - this.field_147081_y) * 0.9F; ++ this.field_147071_v += this.field_147081_y; + } + } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiGameOver.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiGameOver.java.patch index 09d686b3c..e4e71e5f0 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiGameOver.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiGameOver.java.patch @@ -9,3 +9,12 @@ } else { +@@ -195,7 +195,7 @@ + public void func_73876_c() + { + super.func_73876_c(); +- this.field_146347_a++; ++ ++this.field_146347_a; + + if (this.field_146347_a == 20) + { diff --git a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch index 98a65a91e..b1f6fc697 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch @@ -169,17 +169,20 @@ { int k = p_184048_1_.func_78326_a(); int l = 1; -@@ -491,12 +468,12 @@ +@@ -490,13 +467,13 @@ + if (potion.func_188408_i()) { - ++i; +- i++; - k -= 25 * i; ++ ++i; + k = k - 25 * i; } else { - ++j; +- j++; - k -= 25 * j; ++ ++j; + k = k - 25 * j; l += 26; } @@ -203,7 +206,7 @@ } } } -@@ -559,12 +537,7 @@ +@@ -559,15 +537,10 @@ this.field_73735_i = f; GlStateManager.func_179091_B(); GlStateManager.func_179147_l(); @@ -216,7 +219,11 @@ + GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); RenderHelper.func_74520_c(); - for (int l = 0; l < 9; ++l) +- for (int l = 0; l < 9; l++) ++ for (int l = 0; l < 9; ++l) + { + int i1 = i - 90 + l * 20 + 2; + int j1 = p_180479_1_.func_78328_b() - 16 - 3; @@ -702,12 +675,7 @@ { GlStateManager.func_179094_E(); @@ -231,7 +238,52 @@ this.func_175179_f().func_175063_a(s, (float)i, (float)j, 16777215 + (k << 24)); GlStateManager.func_179084_k(); GlStateManager.func_179121_F(); -@@ -997,8 +965,8 @@ +@@ -774,7 +742,7 @@ + + for (Score score1 : collection) + { +- j++; ++ ++j; + ScorePlayerTeam scoreplayerteam1 = scoreboard.func_96509_i(score1.func_96653_e()); + String s1 = ScorePlayerTeam.func_96667_a(scoreplayerteam1, score1.func_96653_e()); + String s2 = TextFormatting.RED + "" + score1.func_96652_c(); +@@ -846,7 +814,7 @@ + + this.field_73839_d.field_71424_I.func_76320_a("armor"); + +- for (int k3 = 0; k3 < 10; k3++) ++ for (int k3 = 0; k3 < 10; ++k3) + { + if (i3 > 0) + { +@@ -871,7 +839,7 @@ + + this.field_73839_d.field_71424_I.func_76318_c("health"); + +- for (int j5 = MathHelper.func_76123_f((f + (float)k1) / 2.0F) - 1; j5 >= 0; j5--) ++ for (int j5 = MathHelper.func_76123_f((f + (float)k1) / 2.0F) - 1; j5 >= 0; --j5) + { + int k5 = 16; + +@@ -932,7 +900,7 @@ + if (l2 == k1 && k1 % 2 == 1) + { + this.func_73729_b(k4, l4, k5 + 153, 9 * i5, 9, 9); +- l2--; ++ --l2; + } + else + { +@@ -960,7 +928,7 @@ + { + this.field_73839_d.field_71424_I.func_76318_c("food"); + +- for (int l5 = 0; l5 < 10; l5++) ++ for (int l5 = 0; l5 < 10; ++l5) + { + int j6 = j1; + int l6 = 16; +@@ -997,10 +965,10 @@ if (entityplayer.func_70055_a(Material.field_151586_h)) { int i6 = this.field_73839_d.field_71439_g.func_70086_ai(); @@ -240,8 +292,20 @@ + int k6 = MathHelper.func_76143_f((double)(i6 - 2) * 10.0D / 300.0D); + int i7 = MathHelper.func_76143_f((double)i6 * 10.0D / 300.0D) - k6; - for (int k7 = 0; k7 < k6 + i7; ++k7) +- for (int k7 = 0; k7 < k6 + i7; k7++) ++ for (int k7 = 0; k7 < k6 + i7; ++k7) { + if (k7 < k6) + { +@@ -1047,7 +1015,7 @@ + int k1 = Math.min(j, 10); + j -= k1; + +- for (int l1 = 0; l1 < k1; l1++) ++ for (int l1 = 0; l1 < k1; ++l1) + { + int i2 = 52; + int j2 = 0; @@ -1075,19 +1043,17 @@ { GlStateManager.func_179097_i(); @@ -353,7 +417,31 @@ tessellator.func_78381_a(); GlStateManager.func_179132_a(true); GlStateManager.func_179126_j(); -@@ -1240,10 +1196,7 @@ +@@ -1216,12 +1172,12 @@ + { + if (this.field_73845_h > 0) + { +- this.field_73845_h--; ++ --this.field_73845_h; + } + + if (this.field_175195_w > 0) + { +- this.field_175195_w--; ++ --this.field_175195_w; + + if (this.field_175195_w <= 0) + { +@@ -1230,7 +1186,7 @@ + } + } + +- this.field_73837_f++; ++ ++this.field_73837_f; + + if (this.field_73839_d.field_71439_g != null) + { +@@ -1240,14 +1196,11 @@ { this.field_92017_k = 0; } @@ -365,3 +453,8 @@ { if (this.field_92017_k > 0) { +- this.field_92017_k--; ++ --this.field_92017_k; + } + } + else diff --git a/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch index 2cc84c760..00ef0fbab 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiIngameMenu.java.patch @@ -80,7 +80,8 @@ public void func_73876_c() { super.func_73876_c(); - ++this.field_146444_f; +- this.field_146444_f++; ++ ++this.field_146444_f; } - @Override diff --git a/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch index 82e4141fb..522116505 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiMainMenu.java.patch @@ -227,7 +227,7 @@ oclass.getMethod("browse", URI.class).invoke(object, new URI(this.field_104024_v)); } catch (Throwable throwable) -@@ -359,9 +321,7 @@ +@@ -359,12 +321,10 @@ GlStateManager.func_179118_c(); GlStateManager.func_179129_p(); GlStateManager.func_179132_a(false); @@ -237,7 +237,20 @@ + GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); int i = 8; - for (int j = 0; j < 64; ++j) +- for (int j = 0; j < 64; j++) ++ for (int j = 0; j < 64; ++j) + { + GlStateManager.func_179094_E(); + float f = ((float)(j % 8) / 8.0F - 0.5F) / 64.0F; +@@ -374,7 +334,7 @@ + GlStateManager.func_179114_b(MathHelper.func_76126_a(this.field_73979_m / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F); + GlStateManager.func_179114_b(-this.field_73979_m * 0.1F, 0.0F, 1.0F, 0.0F); + +- for (int k = 0; k < 6; k++) ++ for (int k = 0; k < 6; ++k) + { + GlStateManager.func_179094_E(); + @@ -407,10 +367,10 @@ bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i); int l = 255 / (j + 1); @@ -273,7 +286,14 @@ GlStateManager.func_179135_a(true, true, true, false); Tessellator tessellator = Tessellator.func_178181_a(); BufferBuilder bufferbuilder = tessellator.func_178180_c(); -@@ -453,22 +411,10 @@ +@@ -447,28 +405,16 @@ + GlStateManager.func_179118_c(); + int i = 3; + +- for (int j = 0; j < 3; j++) ++ for (int j = 0; j < 3; ++j) + { + float f = 1.0F / (float)(j + 1); int k = this.field_146294_l; int l = this.field_146295_m; float f1 = (float)(j - 1) / 256.0F; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch index cd0ca5a5c..c3666ac3b 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java.patch @@ -16,7 +16,7 @@ import org.lwjgl.opengl.Display; @SideOnly(Side.CLIENT) -@@ -59,12 +61,7 @@ +@@ -59,15 +61,10 @@ { List list = this.call(); list.add(""); @@ -29,9 +29,25 @@ + list.add("Debug: Pie [shift]: " + (this.field_175242_a.field_71474_y.field_74329_Q ? "visible" : "hidden") + " FPS [alt]: " + (this.field_175242_a.field_71474_y.field_181657_aC ? "visible" : "hidden")); list.add("For help: press F3 + Q"); - for (int i = 0; i < list.size(); ++i) -@@ -106,24 +103,11 @@ - @SuppressWarnings("incomplete-switch") +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + String s = list.get(i); + +@@ -87,7 +84,7 @@ + { + List list = this.func_175238_c(); + +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + String s = list.get(i); + +@@ -103,26 +100,14 @@ + } + } + ++ @SuppressWarnings("incomplete-switch") protected List call() { - BlockPos blockpos = new BlockPos( @@ -57,7 +73,7 @@ } else { -@@ -146,87 +130,40 @@ +@@ -145,87 +130,40 @@ s = "Towards positive X"; } @@ -166,7 +182,7 @@ } } -@@ -235,9 +172,7 @@ +@@ -234,9 +172,7 @@ list.add("Shader: " + this.field_175242_a.field_71460_t.func_147706_e().func_148022_b()); } @@ -177,7 +193,7 @@ { BlockPos blockpos1 = this.field_175242_a.field_71476_x.func_178782_a(); list.add(String.format("Looking at: %d %d %d", blockpos1.func_177958_n(), blockpos1.func_177956_o(), blockpos1.func_177952_p())); -@@ -253,17 +188,10 @@ +@@ -252,17 +188,10 @@ long j = Runtime.getRuntime().totalMemory(); long k = Runtime.getRuntime().freeMemory(); long l = j - k; @@ -199,7 +215,7 @@ if (this.field_175242_a.func_189648_am()) { -@@ -271,9 +199,7 @@ +@@ -270,9 +199,7 @@ } else { @@ -210,7 +226,7 @@ { BlockPos blockpos = this.field_175242_a.field_71476_x.func_178782_a(); IBlockState iblockstate = this.field_175242_a.field_71441_e.func_180495_p(blockpos); -@@ -285,12 +211,15 @@ +@@ -284,12 +211,15 @@ list.add(""); list.add(String.valueOf(Block.field_149771_c.func_177774_c(iblockstate.func_177230_c()))); @@ -220,7 +236,7 @@ - for (Entry entry : iblockstate.func_177228_b().entrySet()) + for (UnmodifiableIterator unmodifiableiterator = iblockstate.func_177228_b().entrySet().iterator(); unmodifiableiterator.hasNext(); list.add(iproperty.func_177701_a() + ": " + s)) { -- IProperty iproperty = (IProperty)entry.getKey(); +- IProperty iproperty = (IProperty)entry.getKey(); + Entry < IProperty, Comparable> entry = (Entry)unmodifiableiterator.next(); + iproperty = (IProperty)entry.getKey(); T t = (T)entry.getValue(); @@ -229,7 +245,7 @@ if (Boolean.TRUE.equals(t)) { -@@ -300,8 +229,6 @@ +@@ -299,8 +229,6 @@ { s = TextFormatting.RED + s; } @@ -238,7 +254,16 @@ } } -@@ -350,21 +277,19 @@ +@@ -325,7 +253,7 @@ + int i1 = frametimer.func_181748_a(along[k], 30); + int j1 = this.func_181552_c(MathHelper.func_76125_a(i1, 0, 60), 0, 30, 60); + this.func_73728_b(l, scaledresolution.func_78328_b(), scaledresolution.func_78328_b() - i1, j1); +- l++; ++ ++l; + k = frametimer.func_181751_b(k + 1); + } + +@@ -349,21 +277,19 @@ private int func_181552_c(int p_181552_1_, int p_181552_2_, int p_181552_3_, int p_181552_4_) { diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch index 396c38d71..04efdd03c 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreen.java.patch @@ -27,13 +27,15 @@ public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) { - for (int i = 0; i < this.field_146292_n.size(); ++i) +- for (int i = 0; i < this.field_146292_n.size(); i++) ++ for (int i = 0; i < this.field_146292_n.size(); ++i) { - this.field_146292_n.get(i).func_191745_a(this.field_146297_k, p_73863_1_, p_73863_2_, p_73863_3_); + ((GuiButton)this.field_146292_n.get(i)).func_191745_a(this.field_146297_k, p_73863_1_, p_73863_2_, p_73863_3_); } - for (int j = 0; j < this.field_146293_o.size(); ++j) +- for (int j = 0; j < this.field_146293_o.size(); j++) ++ for (int j = 0; j < this.field_146293_o.size(); ++j) { - this.field_146293_o.get(j).func_146159_a(this.field_146297_k, p_73863_1_, p_73863_2_); + ((GuiLabel)this.field_146293_o.get(j)).func_146159_a(this.field_146297_k, p_73863_1_, p_73863_2_); @@ -68,7 +70,7 @@ } return ""; -@@ -118,31 +121,32 @@ +@@ -118,35 +121,36 @@ try { StringSelection stringselection = new StringSelection(p_146275_0_); @@ -100,15 +102,21 @@ - ); + List list = p_191927_1_.func_82840_a(this.field_146297_k.field_71439_g, this.field_146297_k.field_71474_y.field_82882_x ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL); - for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) { if (i == 0) { -- list.set(i, p_191927_1_.func_77953_t().field_77937_e + (String)list.get(i)); +- list.set(i, p_191927_1_.func_77953_t().field_77937_e + list.get(i)); + list.set(i, p_191927_1_.func_77973_b().getForgeRarity(p_191927_1_).getColor() + (String)list.get(i)); } else { +- list.set(i, TextFormatting.GRAY + list.get(i)); ++ list.set(i, TextFormatting.GRAY + (String)list.get(i)); + } + } + @@ -170,7 +174,13 @@ public void func_146283_a(List p_146283_1_, int p_146283_2_, int p_146283_3_) @@ -124,6 +132,15 @@ { GlStateManager.func_179101_C(); RenderHelper.func_74518_a(); +@@ -222,7 +232,7 @@ + this.func_73733_a(l1 - 3, i2 - 3, l1 + i + 3, i2 - 3 + 1, 1347420415, 1347420415); + this.func_73733_a(l1 - 3, i2 + k + 2, l1 + i + 3, i2 + k + 3, 1344798847, 1344798847); + +- for (int k1 = 0; k1 < p_146283_1_.size(); k1++) ++ for (int k1 = 0; k1 < p_146283_1_.size(); ++k1) + { + String s1 = p_146283_1_.get(k1); + this.field_146289_q.func_175063_a(s1, (float)l1, (float)i2, -1); @@ -263,8 +273,9 @@ itemstack = new ItemStack((NBTTagCompound)nbtbase); } @@ -198,7 +215,14 @@ this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_); } -@@ -424,9 +434,15 @@ +@@ -418,15 +428,21 @@ + { + if (p_73864_3_ == 0) + { +- for (int i = 0; i < this.field_146292_n.size(); i++) ++ for (int i = 0; i < this.field_146292_n.size(); ++i) + { + GuiButton guibutton = this.field_146292_n.get(i); if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_)) { @@ -289,7 +313,7 @@ public void func_73878_a(boolean p_73878_1_, int p_73878_2_) { if (p_73878_2_ == 31102009) -@@ -611,13 +628,13 @@ +@@ -611,19 +628,26 @@ try { Class oclass = Class.forName("java.awt.Desktop"); @@ -305,3 +329,17 @@ } } + public static boolean func_146271_m() + { +- return Minecraft.field_142025_a ? Keyboard.isKeyDown(219) || Keyboard.isKeyDown(220) : Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157); ++ if (Minecraft.field_142025_a) ++ { ++ return Keyboard.isKeyDown(219) || Keyboard.isKeyDown(220); ++ } ++ else ++ { ++ return Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157); ++ } + } + + public static boolean func_146272_n() diff --git a/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.java.patch index d143ad47f..5a08fe4b7 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiScreenBook.java.patch @@ -16,7 +16,8 @@ public void func_73876_c() { super.func_73876_c(); - ++this.field_146479_t; +- this.field_146479_t++; ++ ++this.field_146479_t; } - @Override @@ -54,7 +55,32 @@ this.func_146462_a(false); } else if (p_146284_1_.field_146127_k == 3 && this.field_146475_i) -@@ -218,7 +215,7 @@ +@@ -196,7 +193,7 @@ + { + if (this.field_146484_x < this.field_146476_w - 1) + { +- this.field_146484_x++; ++ ++this.field_146484_x; + } + else if (this.field_146475_i) + { +@@ -204,7 +201,7 @@ + + if (this.field_146484_x < this.field_146476_w - 1) + { +- this.field_146484_x++; ++ ++this.field_146484_x; + } + } + } +@@ -212,13 +209,13 @@ + { + if (this.field_146484_x > 0) + { +- this.field_146484_x--; ++ --this.field_146484_x; + } + } else if (p_146284_1_.field_146127_k == 5 && this.field_146480_s) { this.func_146462_a(true); @@ -63,7 +89,13 @@ } else if (p_146284_1_.field_146127_k == 4 && this.field_146480_s) { -@@ -239,7 +236,6 @@ +@@ -234,12 +231,11 @@ + if (this.field_146483_y != null && this.field_146483_y.func_74745_c() < 50) + { + this.field_146483_y.func_74742_a(new NBTTagString("")); +- this.field_146476_w++; ++ ++this.field_146476_w; + this.field_146481_r = true; } } @@ -113,6 +145,15 @@ { this.field_175386_A = null; } +@@ -449,7 +440,7 @@ + { + int k1 = Math.min(128 / this.field_146289_q.field_78288_b, this.field_175386_A.size()); + +- for (int l1 = 0; l1 < k1; l1++) ++ for (int l1 = 0; l1 < k1; ++l1) + { + ITextComponent itextcomponent2 = this.field_175386_A.get(l1); + this.field_146289_q.func_78276_b(itextcomponent2.func_150260_c(), i + 36, 34 + l1 * this.field_146289_q.field_78288_b, 0); @@ -467,7 +458,6 @@ super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); } diff --git a/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch index 971880646..18c465786 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch @@ -23,6 +23,22 @@ } public void func_148145_f(int p_148145_1_) +@@ -159,13 +154,13 @@ + { + if (p_148147_1_.field_146127_k == this.field_148159_m) + { +- this.field_148169_q = this.field_148169_q - (float)(this.field_148149_f * 2 / 3); ++ this.field_148169_q -= (float)(this.field_148149_f * 2 / 3); + this.field_148157_o = -2; + this.func_148121_k(); + } + else if (p_148147_1_.field_146127_k == this.field_148156_n) + { +- this.field_148169_q = this.field_148169_q + (float)(this.field_148149_f * 2 / 3); ++ this.field_148169_q += (float)(this.field_148149_f * 2 / 3); + this.field_148157_o = -2; + this.func_148121_k(); + } @@ -186,27 +181,8 @@ GlStateManager.func_179106_n(); Tessellator tessellator = Tessellator.func_178181_a(); @@ -217,7 +233,7 @@ - (float)((this.field_148154_c - this.field_148153_b) * (this.field_148154_c - this.field_148153_b)) / (float)this.func_148138_e() - ); - l1 = MathHelper.func_76125_a(l1, 32, this.field_148154_c - this.field_148153_b - 8); -- this.field_148170_p /= (float)(this.field_148154_c - this.field_148153_b - l1) / (float)k1; +- this.field_148170_p = this.field_148170_p / ((float)(this.field_148154_c - this.field_148153_b - l1) / (float)k1); - } - else - { @@ -296,12 +312,30 @@ - else if (this.field_148157_o >= 0) + else { -- this.field_148169_q -= (float)(this.field_148162_h - this.field_148157_o) * this.field_148170_p; +- this.field_148169_q = this.field_148169_q - (float)(this.field_148162_h - this.field_148157_o) * this.field_148170_p; - this.field_148157_o = this.field_148162_h; + this.field_148157_o = -1; } int i2 = Mouse.getEventDWheel(); +@@ -417,7 +362,7 @@ + i2 = 1; + } + +- this.field_148169_q = this.field_148169_q + (float)(i2 * this.field_148149_f / 2); ++ this.field_148169_q += (float)(i2 * this.field_148149_f / 2); + } + } + } +@@ -443,7 +388,7 @@ + Tessellator tessellator = Tessellator.func_178181_a(); + BufferBuilder bufferbuilder = tessellator.func_178180_c(); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + int k = p_192638_2_ + j * this.field_148149_f + this.field_148160_j; + int l = this.field_148149_f - 4; @@ -460,14 +405,14 @@ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179090_x(); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiSpectator.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiSpectator.java.patch index bf7284582..8558c7186 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiSpectator.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiSpectator.java.patch @@ -11,6 +11,15 @@ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, p_175258_2_); this.field_175268_g.func_110434_K().func_110577_a(field_175267_f); this.func_175174_a((float)(p_175258_3_ - 91), p_175258_4_, 0, 0, 182, 22); +@@ -88,7 +86,7 @@ + + RenderHelper.func_74520_c(); + +- for (int i = 0; i < 9; i++) ++ for (int i = 0; i < 9; ++i) + { + this.func_175266_a(i, p_175258_1_.func_78326_a() / 2 - 90 + i * 20 + 2, p_175258_4_ + 3.0F, p_175258_2_, p_175258_5_.func_178680_a(i)); + } @@ -111,15 +109,11 @@ GlStateManager.func_179131_c(f, f, f, p_175266_4_); p_175266_5_.func_178663_a(f, i); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiTextField.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiTextField.java.patch new file mode 100644 index 000000000..5e1917575 --- /dev/null +++ b/patches/minecraft/net/minecraft/client/gui/GuiTextField.java.patch @@ -0,0 +1,86 @@ +--- before/net/minecraft/client/gui/GuiTextField.java ++++ after/net/minecraft/client/gui/GuiTextField.java +@@ -1,5 +1,6 @@ + package net.minecraft.client.gui; + ++import com.cleanroommc.client.IMEHandler; + import com.google.common.base.Predicate; + import com.google.common.base.Predicates; + import net.minecraft.client.Minecraft; +@@ -54,7 +55,7 @@ + + public void func_146178_a() + { +- this.field_146214_l++; ++ ++this.field_146214_l; + } + + public void func_146180_a(String p_146180_1_) +@@ -214,7 +215,7 @@ + boolean flag = p_146197_1_ < 0; + int j = Math.abs(p_146197_1_); + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + if (!flag) + { +@@ -229,7 +230,7 @@ + { + while (p_146197_3_ && i < l && this.field_146216_j.charAt(i) == ' ') + { +- i++; ++ ++i; + } + } + } +@@ -237,12 +238,12 @@ + { + while (p_146197_3_ && i > 0 && this.field_146216_j.charAt(i - 1) == ' ') + { +- i--; ++ --i; + } + + while (i > 0 && this.field_146216_j.charAt(i - 1) != ' ') + { +- i--; ++ --i; + } + } + } +@@ -513,7 +514,7 @@ + else if (flag2) + { + k1 = j1 - 1; +- j1--; ++ --j1; + } + + if (!s.isEmpty() && flag && j < s.length()) +@@ -631,6 +632,7 @@ + } + + this.field_146213_o = p_146195_1_; ++ IMEHandler.setIME(this.field_146213_o); + + if (Minecraft.func_71410_x().field_71462_r != null) + { +@@ -687,7 +689,7 @@ + + if (p_146199_1_ == this.field_146225_q) + { +- this.field_146225_q = this.field_146225_q - this.field_146211_a.func_78262_a(this.field_146216_j, j, true).length(); ++ this.field_146225_q -= this.field_146211_a.func_78262_a(this.field_146216_j, j, true).length(); + } + + if (p_146199_1_ > k) +@@ -696,7 +698,7 @@ + } + else if (p_146199_1_ <= this.field_146225_q) + { +- this.field_146225_q = this.field_146225_q - (this.field_146225_q - p_146199_1_); ++ this.field_146225_q -= this.field_146225_q - p_146199_1_; + } + + this.field_146225_q = MathHelper.func_76125_a(this.field_146225_q, 0, i); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch index 32fd61d94..97eca75a3 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch @@ -27,7 +27,7 @@ List list = Lists.newArrayList(); - List list1 = Lists.newArrayList(p_178908_0_); - -- for (int j = 0; j < list1.size(); ++j) +- for (int j = 0; j < list1.size(); j++) - { - ITextComponent itextcomponent1 = list1.get(j); - String s = itextcomponent1.func_150261_e(); @@ -113,7 +113,8 @@ - if (p_178908_3_) + if (p_178908_3_ && cleanedLine.charAt(l) == ' ') { - ++l; +- l++; ++ ++l; } - s3 = s4.substring(l); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch index 437eda1a8..9cec98886 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiVideoSettings.java.patch @@ -46,8 +46,12 @@ } else { -@@ -69,20 +48,16 @@ - ++i; +@@ -66,23 +45,19 @@ + } + + agamesettings$options[i] = gamesettings$options; +- i++; ++ ++i; } - this.field_146501_h = new GuiOptionsRowList( diff --git a/patches/minecraft/net/minecraft/client/gui/MapItemRenderer.java.patch b/patches/minecraft/net/minecraft/client/gui/MapItemRenderer.java.patch index 7b827bdaa..83d69264c 100644 --- a/patches/minecraft/net/minecraft/client/gui/MapItemRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/MapItemRenderer.java.patch @@ -9,6 +9,24 @@ public MapItemRenderer(TextureManager p_i45009_1_) { +@@ -88,7 +88,7 @@ + this.field_148241_e = this.field_148243_c.func_110565_c(); + this.field_148240_d = MapItemRenderer.this.field_148251_b.func_110578_a("map/" + p_i45007_2_.field_76190_i, this.field_148243_c); + +- for (int i = 0; i < this.field_148241_e.length; i++) ++ for (int i = 0; i < this.field_148241_e.length; ++i) + { + this.field_148241_e[i] = 0; + } +@@ -96,7 +96,7 @@ + + private void func_148236_a() + { +- for (int i = 0; i < 16384; i++) ++ for (int i = 0; i < 16384; ++i) + { + int j = this.field_148242_b.field_76198_e[i] & 255; + @@ -122,15 +122,13 @@ float f = 0.0F; MapItemRenderer.this.field_148251_b.func_110577_a(this.field_148240_d); @@ -44,7 +62,7 @@ GlStateManager.func_179114_b((float)(mapdecoration.func_176111_d() * 360) / 16.0F, 0.0F, 0.0F, 1.0F); GlStateManager.func_179152_a(4.0F, 4.0F, 3.0F); GlStateManager.func_179109_b(-0.125F, 0.125F, 0.0F); -@@ -155,10 +153,10 @@ +@@ -155,13 +153,13 @@ float f4 = (float)(b0 / 4 + 1) / 4.0F; bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181707_g); float f5 = -0.001F; @@ -58,4 +76,8 @@ + bufferbuilder.func_181662_b(-1.0D, -1.0D, (double)((float)k * -0.001F)).func_187315_a((double)f1, (double)f4).func_181675_d(); tessellator.func_78381_a(); GlStateManager.func_179121_F(); - ++k; +- k++; ++ ++k; + } + } + diff --git a/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch b/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch index e497e697a..d84de01f1 100644 --- a/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java.patch @@ -60,7 +60,8 @@ - List list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_192634_4_ - 32 - 2); + List list = this.field_148300_d.field_71466_p.func_78271_c(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.field_78843_d), p_192634_4_ - 32 - 2); - for (int i = 0; i < Math.min(list.size(), 2); ++i) +- for (int i = 0; i < Math.min(list.size(), 2); i++) ++ for (int i = 0; i < Math.min(list.size(), 2); ++i) { - this.field_148300_d - .field_71466_p diff --git a/patches/minecraft/net/minecraft/client/gui/advancements/GuiAdvancementTab.java.patch b/patches/minecraft/net/minecraft/client/gui/advancements/GuiAdvancementTab.java.patch index 2a9a6618e..61ab263f2 100644 --- a/patches/minecraft/net/minecraft/client/gui/advancements/GuiAdvancementTab.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/advancements/GuiAdvancementTab.java.patch @@ -27,6 +27,18 @@ { this.field_191802_a = p_i47589_1_; this.field_193938_f = p_i47589_2_; +@@ -106,9 +100,9 @@ + int i = this.field_191811_n % 16; + int j = this.field_191812_o % 16; + +- for (int k = -1; k <= 15; k++) ++ for (int k = -1; k <= 15; ++k) + { +- for (int l = -1; l <= 8; l++) ++ for (int l = -1; l <= 8; ++l) + { + func_146110_a(i + 16 * k, j + 16 * l, 0.0F, 0.0F, 16, 16, 16.0F, 16.0F); + } @@ -167,9 +161,9 @@ { for (AdvancementTabType advancementtabtype : AdvancementTabType.values()) diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch index 8a9764462..c6c6a6a08 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch @@ -25,6 +25,15 @@ public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) { int i = this.field_147003_i; +@@ -91,7 +89,7 @@ + OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, 240.0F, 240.0F); + GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); + +- for (int i1 = 0; i1 < this.field_147002_h.field_75151_b.size(); i1++) ++ for (int i1 = 0; i1 < this.field_147002_h.field_75151_b.size(); ++i1) + { + Slot slot = this.field_147002_h.field_75151_b.get(i1); + @@ -118,6 +116,7 @@ RenderHelper.func_74518_a(); this.func_146979_b(p_73863_1_, p_73863_2_); @@ -83,6 +92,24 @@ this.func_175175_a(i, j, textureatlassprite, 16, 16); GlStateManager.func_179145_e(); flag1 = true; +@@ -300,7 +297,7 @@ + itemstack1.func_190920_e(j); + } + +- this.field_146996_I = this.field_146996_I - (itemstack1.func_190916_E() - i); ++ this.field_146996_I -= itemstack1.func_190916_E() - i; + } + } + } +@@ -308,7 +305,7 @@ + + private Slot func_146975_c(int p_146975_1_, int p_146975_2_) + { +- for (int i = 0; i < this.field_147002_h.field_75151_b.size(); i++) ++ for (int i = 0; i < this.field_147002_h.field_75151_b.size(); ++i) + { + Slot slot = this.field_147002_h.field_75151_b.get(i); + @@ -321,11 +318,10 @@ return null; } @@ -259,9 +286,12 @@ { this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, func_146271_m() ? 1 : 0, ClickType.THROW); } -@@ -688,7 +666,7 @@ +@@ -686,9 +664,9 @@ + { + if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && this.field_147006_u != null) { - for (int i = 0; i < 9; ++i) +- for (int i = 0; i < 9; i++) ++ for (int i = 0; i < 9; ++i) { - if (p_146983_1_ == this.field_146297_k.field_71474_y.field_151456_ac[i].func_151463_i()) + if (this.field_146297_k.field_71474_y.field_151456_ac[i].isActiveAndMatches(p_146983_1_)) diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch index 7cf0fb2f4..736feb7cb 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch @@ -25,6 +25,15 @@ protected void func_184098_a(@Nullable Slot p_184098_1_, int p_184098_2_, int p_184098_3_, ClickType p_184098_4_) { this.field_147057_D = true; +@@ -113,7 +113,7 @@ + + if (p_184098_1_ == this.field_147064_C && flag) + { +- for (int j = 0; j < this.field_146297_k.field_71439_g.field_71069_bz.func_75138_a().size(); j++) ++ for (int j = 0; j < this.field_146297_k.field_71439_g.field_71069_bz.func_75138_a().size(); ++j) + { + this.field_146297_k.field_71442_b.func_78761_a(ItemStack.field_190927_a, j); + } @@ -140,15 +140,7 @@ } else @@ -54,7 +63,7 @@ { if (p_184098_3_ == 0) { -@@ -239,8 +228,7 @@ +@@ -239,12 +228,11 @@ else if (this.field_147002_h != null) { ItemStack itemstack3 = p_184098_1_ == null ? ItemStack.field_190927_a : this.field_147002_h.func_75139_a(p_184098_1_.field_75222_d).func_75211_c(); @@ -64,6 +73,11 @@ if (Container.func_94532_c(p_184098_3_) == 2) { +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + this.field_146297_k.field_71442_b.func_78761_a(this.field_147002_h.func_75139_a(45 + k).func_75211_c(), 36 + k); + } @@ -273,7 +261,6 @@ } } @@ -227,6 +241,22 @@ int i = field_147058_w; field_147058_w = p_147050_1_.func_78021_a(); GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h; +@@ -455,13 +466,13 @@ + + if (p_147050_1_ == CreativeTabs.field_192395_m) + { +- for (int j = 0; j < 9; j++) ++ for (int j = 0; j < 9; ++j) + { + HotbarSnapshot hotbarsnapshot = this.field_146297_k.field_191950_u.func_192563_a(j); + + if (hotbarsnapshot.isEmpty()) + { +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + if (k == j) + { @@ -469,7 +480,7 @@ itemstack.func_190925_c("CustomCreativeLock"); String s = GameSettings.func_74298_c(this.field_146297_k.field_71474_y.field_151456_ac[j].func_151463_i()); @@ -236,15 +266,18 @@ guicontainercreative$containercreative.field_148330_a.add(itemstack); } else -@@ -498,7 +509,7 @@ +@@ -498,9 +509,9 @@ this.field_147063_B = guicontainercreative$containercreative.field_75151_b; } - guicontainercreative$containercreative.field_75151_b = Lists.newArrayList(); + guicontainercreative$containercreative.field_75151_b = Lists.newArrayList(); - for (int l = 0; l < container.field_75151_b.size(); ++l) +- for (int l = 0; l < container.field_75151_b.size(); l++) ++ for (int l = 0; l < container.field_75151_b.size(); ++l) { + Slot slot = new GuiContainerCreative.CreativeSlot(container.field_75151_b.get(l), l); + guicontainercreative$containercreative.field_75151_b.add(slot); @@ -552,12 +563,14 @@ if (this.field_147062_A != null) @@ -340,16 +373,22 @@ CreativeTabs creativetabs = p_146285_1_.func_77973_b().func_77640_w(); if (creativetabs == null && p_146285_1_.func_77973_b() == Items.field_151134_bR) -@@ -690,7 +719,7 @@ +@@ -686,19 +715,22 @@ + list.add(1, "" + TextFormatting.BOLD + TextFormatting.BLUE + I18n.func_135052_a(creativetabs.func_78024_c())); + } + +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) { if (i == 0) { -- list.set(i, p_146285_1_.func_77953_t().field_77937_e + (String)list.get(i)); +- list.set(i, p_146285_1_.func_77953_t().field_77937_e + list.get(i)); + list.set(i, p_146285_1_.func_77973_b().getForgeRarity(p_146285_1_).getColor() + (String)list.get(i)); } else { -@@ -698,7 +727,10 @@ +- list.set(i, TextFormatting.GRAY + list.get(i)); ++ list.set(i, TextFormatting.GRAY + (String)list.get(i)); } } @@ -526,16 +565,27 @@ } public int func_147056_g() -@@ -889,7 +958,7 @@ +@@ -887,9 +956,9 @@ + + if (p_192044_2_) { - for (int i = 0; i < InventoryPlayer.func_70451_h(); ++i) +- for (int i = 0; i < InventoryPlayer.func_70451_h(); i++) ++ for (int i = 0; i < InventoryPlayer.func_70451_h(); ++i) { - ItemStack itemstack = hotbarsnapshot.get(i).func_77946_l(); + ItemStack itemstack = ((ItemStack)hotbarsnapshot.get(i)).func_77946_l(); entityplayersp.field_71071_by.func_70299_a(i, itemstack); p_192044_0_.field_71442_b.func_78761_a(itemstack, 36 + i); } -@@ -905,7 +974,7 @@ +@@ -898,14 +967,14 @@ + } + else if (p_192044_3_) + { +- for (int j = 0; j < InventoryPlayer.func_70451_h(); j++) ++ for (int j = 0; j < InventoryPlayer.func_70451_h(); ++j) + { + hotbarsnapshot.set(j, entityplayersp.field_71071_by.func_70301_a(j).func_77946_l()); + } String s = GameSettings.func_74298_c(p_192044_0_.field_71474_y.field_151456_ac[p_192044_1_].func_151463_i()); String s1 = GameSettings.func_74298_c(p_192044_0_.field_71474_y.field_193630_aq.func_151463_i()); @@ -544,7 +594,7 @@ creativesettings.func_192564_b(); } } -@@ -913,7 +982,7 @@ +@@ -913,21 +982,21 @@ @SideOnly(Side.CLIENT) public static class ContainerCreative extends Container { @@ -553,6 +603,23 @@ public ContainerCreative(EntityPlayer p_i1086_1_) { + InventoryPlayer inventoryplayer = p_i1086_1_.field_71071_by; + +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) + { +- for (int j = 0; j < 9; j++) ++ for (int j = 0; j < 9; ++j) + { + this.func_75146_a(new GuiContainerCreative.LockedSlot(GuiContainerCreative.field_147060_v, i * 9 + j, 9 + j * 18, 18 + i * 18)); + } + } + +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + this.func_75146_a(new Slot(inventoryplayer, k, 9 + k * 18, 112)); + } @@ -935,7 +1004,6 @@ this.func_148329_a(0.0F); } @@ -561,7 +628,7 @@ public boolean func_75145_c(EntityPlayer p_75145_1_) { return true; -@@ -944,7 +1012,7 @@ +@@ -944,16 +1012,16 @@ public void func_148329_a(float p_148329_1_) { int i = (this.field_148330_a.size() + 9 - 1) / 9 - 5; @@ -570,6 +637,17 @@ if (j < 0) { + j = 0; + } + +- for (int k = 0; k < 5; k++) ++ for (int k = 0; k < 5; ++k) + { +- for (int l = 0; l < 9; l++) ++ for (int l = 0; l < 9; ++l) + { + int i1 = l + (k + j) * 9; + @@ -974,7 +1042,6 @@ return this.field_148330_a.size() > 45; } @@ -711,11 +789,22 @@ } @SideOnly(Side.CLIENT) -@@ -1103,7 +1188,6 @@ +@@ -1103,10 +1188,16 @@ super(p_i47453_1_, p_i47453_2_, p_i47453_3_, p_i47453_4_); } - @Override public boolean func_82869_a(EntityPlayer p_82869_1_) { - if (super.func_82869_a(p_82869_1_) && this.func_75216_d()) +- return super.func_82869_a(p_82869_1_) && this.func_75216_d() ? this.func_75211_c().func_179543_a("CustomCreativeLock") == null : !this.func_75216_d(); ++ if (super.func_82869_a(p_82869_1_) && this.func_75216_d()) ++ { ++ return this.func_75211_c().func_179543_a("CustomCreativeLock") == null; ++ } ++ else ++ { ++ return !this.func_75216_d(); ++ } + } + } + } diff --git a/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeBook.java.patch b/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeBook.java.patch index 796a119b0..f75c693ab 100644 --- a/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeBook.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeBook.java.patch @@ -89,6 +89,15 @@ } } +@@ -281,7 +286,7 @@ + { + ItemStack itemstack = null; + +- for (int i = 0; i < this.field_191915_z.func_192684_b(); i++) ++ for (int i = 0; i < this.field_191915_z.func_192684_b(); ++i) + { + GhostRecipe.GhostIngredient ghostrecipe$ghostingredient = this.field_191915_z.func_192681_a(i); + int j = ghostrecipe$ghostingredient.func_193713_b() + p_193015_1_; @@ -308,10 +313,7 @@ { if (this.func_191878_b() && !this.field_191888_F.field_71439_g.func_175149_v()) @@ -213,7 +222,7 @@ public void func_193001_a(List p_193001_1_) { for (IRecipe irecipe : p_193001_1_) -@@ -487,10 +482,10 @@ +@@ -487,16 +482,16 @@ { ItemStack itemstack = p_193951_1_.func_77571_b(); this.field_191915_z.func_192685_a(p_193951_1_); @@ -226,7 +235,15 @@ int l = 1; Iterator iterator = p_193951_1_.func_192400_c().iterator(); -@@ -505,7 +500,7 @@ +- for (int i1 = 0; i1 < j; i1++) ++ for (int i1 = 0; i1 < j; ++i1) + { +- for (int j1 = 0; j1 < k; j1++) ++ for (int j1 = 0; j1 < k; ++j1) + { + if (!iterator.hasNext()) + { +@@ -505,13 +500,13 @@ Ingredient ingredient = iterator.next(); @@ -235,3 +252,10 @@ { Slot slot = p_193951_2_.get(l); this.field_191915_z.func_194187_a(ingredient, slot.field_75223_e, slot.field_75221_f); + } + +- l++; ++ ++l; + } + + if (k < i) diff --git a/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeOverlay.java.patch b/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeOverlay.java.patch index 3037fe58a..12033b0a0 100644 --- a/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeOverlay.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/recipebook/GuiRecipeOverlay.java.patch @@ -27,8 +27,12 @@ { this.field_191853_k = p_191845_1_; this.field_191848_f = p_191845_2_; -@@ -85,12 +76,7 @@ - for (int j1 = 0; j1 < j; ++j1) +@@ -82,15 +73,10 @@ + this.field_191850_h = true; + this.field_193972_f.clear(); + +- for (int j1 = 0; j1 < j; j1++) ++ for (int j1 = 0; j1 < j; ++j1) { boolean flag1 = j1 < i; - this.field_193972_f @@ -73,7 +77,8 @@ + this.func_73729_b(this.field_191851_i, this.field_191852_j + p_191846_4_ * 2 + p_191846_2_ * p_191846_3_, p_191846_5_, p_191846_6_ + p_191846_3_ + p_191846_4_, p_191846_4_, p_191846_4_); + this.func_73729_b(this.field_191851_i + p_191846_4_ * 2 + p_191846_1_ * p_191846_3_, this.field_191852_j + p_191846_4_ * 2 + p_191846_2_ * p_191846_3_, p_191846_5_ + p_191846_3_ + p_191846_4_, p_191846_6_ + p_191846_3_ + p_191846_4_, p_191846_4_, p_191846_4_); - for (int i = 0; i < p_191846_1_; ++i) +- for (int i = 0; i < p_191846_1_; i++) ++ for (int i = 0; i < p_191846_1_; ++i) { - this.func_73729_b( - this.field_191851_i + p_191846_4_ + i * p_191846_3_, this.field_191852_j, p_191846_5_ + p_191846_4_, p_191846_6_, p_191846_3_, p_191846_4_ @@ -84,7 +89,8 @@ + this.func_73729_b(this.field_191851_i + p_191846_4_ + i * p_191846_3_, this.field_191852_j, p_191846_5_ + p_191846_4_, p_191846_6_, p_191846_3_, p_191846_4_); + this.func_73729_b(this.field_191851_i + p_191846_4_ + (i + 1) * p_191846_3_, this.field_191852_j, p_191846_5_ + p_191846_4_, p_191846_6_, p_191846_4_, p_191846_4_); - for (int j = 0; j < p_191846_2_; ++j) +- for (int j = 0; j < p_191846_2_; j++) ++ for (int j = 0; j < p_191846_2_; ++j) { if (i == 0) { @@ -202,7 +208,7 @@ int i = 152; if (!this.field_193925_q) -@@ -338,11 +230,11 @@ +@@ -338,24 +230,24 @@ int k = 3; int l = 3; @@ -218,7 +224,14 @@ } Iterator iterator = this.field_193924_p.func_192400_c().iterator(); -@@ -355,7 +247,7 @@ + +- for (int i1 = 0; i1 < l; i1++) ++ for (int i1 = 0; i1 < l; ++i1) + { + int j1 = 3 + i1 * 7; + +- for (int k1 = 0; k1 < k; k1++) ++ for (int k1 = 0; k1 < k; ++k1) { if (iterator.hasNext()) { diff --git a/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch b/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch index aa53ed35a..43ec0654a 100644 --- a/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch @@ -107,7 +107,7 @@ public void func_78785_a(float p_78785_1_) { if (!this.field_78807_k) -@@ -130,64 +121,67 @@ +@@ -130,71 +121,75 @@ GlStateManager.func_179109_b(this.field_82906_o, this.field_82908_p, this.field_82907_q); @@ -162,27 +162,30 @@ if (this.field_78795_f != 0.0F) { - GlStateManager.func_179114_b(this.field_78795_f * (180.0F / (float)Math.PI), 1.0F, 0.0F, 0.0F); -- } -- -- GlStateManager.func_179148_o(this.field_78811_r); -- -- if (this.field_78805_m != null) -- { -- for (int k = 0; k < this.field_78805_m.size(); ++k) -- { ++ GlStateManager.func_179114_b(this.field_78795_f * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); + } + + GlStateManager.func_179148_o(this.field_78811_r); + + if (this.field_78805_m != null) + { +- for (int k = 0; k < this.field_78805_m.size(); k++) ++ for (int i = 0; i < this.field_78805_m.size(); ++i) + { - this.field_78805_m.get(k).func_78785_a(p_78785_1_); -- } -- } -- -- GlStateManager.func_179121_F(); -- } ++ ((ModelRenderer)this.field_78805_m.get(i)).func_78785_a(p_78785_1_); + } + } + + GlStateManager.func_179121_F(); + } - else if (this.field_78800_c == 0.0F && this.field_78797_d == 0.0F && this.field_78798_e == 0.0F) - { - GlStateManager.func_179148_o(this.field_78811_r); - - if (this.field_78805_m != null) - { -- for (int j = 0; j < this.field_78805_m.size(); ++j) +- for (int j = 0; j < this.field_78805_m.size(); j++) - { - this.field_78805_m.get(j).func_78785_a(p_78785_1_); - } @@ -191,26 +194,21 @@ - else - { - GlStateManager.func_179109_b(this.field_78800_c * p_78785_1_, this.field_78797_d * p_78785_1_, this.field_78798_e * p_78785_1_); -+ GlStateManager.func_179114_b(this.field_78795_f * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F); -+ } -+ - GlStateManager.func_179148_o(this.field_78811_r); - - if (this.field_78805_m != null) - { - for (int i = 0; i < this.field_78805_m.size(); ++i) - { +- GlStateManager.func_179148_o(this.field_78811_r); +- +- if (this.field_78805_m != null) +- { +- for (int i = 0; i < this.field_78805_m.size(); i++) +- { - this.field_78805_m.get(i).func_78785_a(p_78785_1_); -+ ((ModelRenderer)this.field_78805_m.get(i)).func_78785_a(p_78785_1_); - } - } - +- } +- } +- - GlStateManager.func_179109_b(-this.field_78800_c * p_78785_1_, -this.field_78797_d * p_78785_1_, -this.field_78798_e * p_78785_1_); -+ GlStateManager.func_179121_F(); - } +- } GlStateManager.func_179109_b(-this.field_82906_o, -this.field_82908_p, -this.field_82907_q); -@@ -195,6 +189,7 @@ + } } } @@ -247,7 +245,7 @@ public void func_78794_c(float p_78794_1_) { if (!this.field_78807_k) -@@ -241,33 +237,37 @@ +@@ -241,42 +237,46 @@ this.func_78788_d(p_78794_1_); } @@ -293,9 +291,11 @@ private void func_78788_d(float p_78788_1_) { this.field_78811_r = GLAllocation.func_74526_a(1); -@@ -276,7 +276,7 @@ + GlStateManager.func_187423_f(this.field_78811_r, 4864); + BufferBuilder bufferbuilder = Tessellator.func_178181_a().func_178180_c(); - for (int i = 0; i < this.field_78804_l.size(); ++i) +- for (int i = 0; i < this.field_78804_l.size(); i++) ++ for (int i = 0; i < this.field_78804_l.size(); ++i) { - this.field_78804_l.get(i).func_178780_a(bufferbuilder, p_78788_1_); + ((ModelBox)this.field_78804_l.get(i)).func_178780_a(bufferbuilder, p_78788_1_); diff --git a/patches/minecraft/net/minecraft/client/model/ModelSkeleton.java.patch b/patches/minecraft/net/minecraft/client/model/ModelSkeleton.java.patch index 5c1ea03b4..6e19384a1 100644 --- a/patches/minecraft/net/minecraft/client/model/ModelSkeleton.java.patch +++ b/patches/minecraft/net/minecraft/client/model/ModelSkeleton.java.patch @@ -16,7 +16,7 @@ { if (p_78086_1_.func_184591_cq() == EnumHandSide.RIGHT) { -@@ -64,23 +63,22 @@ +@@ -64,33 +63,31 @@ super.func_78086_a(p_78086_1_, p_78086_2_, p_78086_3_, p_78086_4_); } @@ -44,8 +44,14 @@ + this.field_178724_i.field_78795_f = -((float)Math.PI / 2F); this.field_178723_h.field_78795_f -= f * 1.2F - f1 * 0.4F; this.field_178724_i.field_78795_f -= f * 1.2F - f1 * 0.4F; - this.field_178723_h.field_78808_h += MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F; -@@ -90,7 +88,6 @@ +- this.field_178723_h.field_78808_h = this.field_178723_h.field_78808_h + MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F; +- this.field_178724_i.field_78808_h = this.field_178724_i.field_78808_h - (MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F); +- this.field_178723_h.field_78795_f = this.field_178723_h.field_78795_f + MathHelper.func_76126_a(p_78087_3_ * 0.067F) * 0.05F; +- this.field_178724_i.field_78795_f = this.field_178724_i.field_78795_f - MathHelper.func_76126_a(p_78087_3_ * 0.067F) * 0.05F; ++ this.field_178723_h.field_78808_h += MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F; ++ this.field_178724_i.field_78808_h -= MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F; ++ this.field_178723_h.field_78795_f += MathHelper.func_76126_a(p_78087_3_ * 0.067F) * 0.05F; ++ this.field_178724_i.field_78795_f -= MathHelper.func_76126_a(p_78087_3_ * 0.067F) * 0.05F; } } diff --git a/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch b/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch index 54c8b2a4c..c398b5bef 100644 --- a/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch +++ b/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch @@ -8,6 +8,15 @@ public class TexturedQuad { public PositionTextureVertex[] field_78239_a; +@@ -35,7 +34,7 @@ + { + PositionTextureVertex[] apositiontexturevertex = new PositionTextureVertex[this.field_78239_a.length]; + +- for (int i = 0; i < this.field_78239_a.length; i++) ++ for (int i = 0; i < this.field_78239_a.length; ++i) + { + apositiontexturevertex[i] = this.field_78239_a[this.field_78239_a.length - i - 1]; + } @@ -43,6 +42,7 @@ this.field_78239_a = apositiontexturevertex; } @@ -16,8 +25,12 @@ public void func_178765_a(BufferBuilder p_178765_1_, float p_178765_2_) { Vec3d vec3d = this.field_78239_a[1].field_78243_a.func_72444_a(this.field_78239_a[0].field_78243_a); -@@ -64,14 +64,7 @@ - for (int i = 0; i < 4; ++i) +@@ -61,17 +61,10 @@ + + p_178765_1_.func_181668_a(7, DefaultVertexFormats.field_181703_c); + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { PositionTextureVertex positiontexturevertex = this.field_78239_a[i]; - p_178765_1_.func_181662_b( diff --git a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch index da7a56e1c..68880ba9b 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch @@ -112,7 +112,14 @@ this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.ABORT_DESTROY_BLOCK, this.field_178895_c, EnumFacing.DOWN)); this.field_78778_j = false; this.field_78770_f = 0.0F; -@@ -284,9 +287,7 @@ +@@ -278,15 +281,13 @@ + + if (this.field_78781_i > 0) + { +- this.field_78781_i--; ++ --this.field_78781_i; + return true; + } else if (this.field_78779_k.func_77145_d() && this.field_78776_a.field_71441_e.func_175723_af().func_177746_a(p_180512_1_)) { this.field_78781_i = 5; @@ -123,7 +130,13 @@ this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180512_1_, p_180512_2_)); func_178891_a(this.field_78776_a, this, p_180512_1_, p_180512_2_); return true; -@@ -307,24 +308,12 @@ +@@ -303,29 +304,16 @@ + } + else + { +- this.field_78770_f = this.field_78770_f +- + iblockstate.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180512_1_); ++ this.field_78770_f += iblockstate.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180512_1_); if (this.field_78780_h % 4.0F == 0.0F) { @@ -143,15 +156,16 @@ + this.field_78776_a.func_147118_V().func_147682_a(new PositionedSoundRecord(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_)); } - ++this.field_78780_h; +- this.field_78780_h++; - this.field_78776_a - .func_193032_ao() - .func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, iblockstate, MathHelper.func_76131_a(this.field_78770_f, 0.0F, 1.0F)); ++ ++this.field_78780_h; + this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, iblockstate, MathHelper.func_76131_a(this.field_78770_f, 0.0F, 1.0F)); if (this.field_78770_f >= 1.0F) { -@@ -336,9 +325,7 @@ +@@ -337,9 +325,7 @@ this.field_78781_i = 5; } @@ -162,7 +176,7 @@ return true; } } -@@ -350,7 +337,8 @@ +@@ -351,7 +337,8 @@ public float func_78757_d() { @@ -172,7 +186,7 @@ } public void func_78765_e() -@@ -374,9 +362,7 @@ +@@ -375,9 +362,7 @@ if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) { @@ -183,7 +197,7 @@ } return p_178893_1_.equals(this.field_178895_c) && flag; -@@ -393,9 +379,7 @@ +@@ -394,9 +379,7 @@ } } @@ -194,7 +208,7 @@ { this.func_78750_j(); ItemStack itemstack = p_187099_1_.func_184586_b(p_187099_6_); -@@ -410,14 +394,34 @@ +@@ -411,14 +394,34 @@ } else { @@ -232,7 +246,7 @@ } if (!flag && itemstack.func_77973_b() instanceof ItemBlock) -@@ -433,44 +437,53 @@ +@@ -434,44 +437,53 @@ this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_3_, p_187099_4_, p_187099_6_, f, f1, f2)); @@ -321,7 +335,7 @@ } } -@@ -492,6 +505,8 @@ +@@ -493,6 +505,8 @@ } else { @@ -330,7 +344,7 @@ int i = itemstack.func_190916_E(); ActionResult actionresult = itemstack.func_77957_a(p_187101_2_, p_187101_1_, p_187101_3_); ItemStack itemstack1 = actionresult.func_188398_b(); -@@ -499,6 +514,10 @@ +@@ -500,6 +514,10 @@ if (itemstack1 != itemstack || itemstack1.func_190916_E() != i) { p_187101_1_.func_184611_a(p_187101_3_, itemstack1); @@ -341,7 +355,7 @@ } return actionresult.func_188397_a(); -@@ -533,12 +552,11 @@ +@@ -534,12 +552,11 @@ public EnumActionResult func_187102_a(EntityPlayer p_187102_1_, Entity p_187102_2_, RayTraceResult p_187102_3_, EnumHand p_187102_4_) { this.func_78750_j(); @@ -358,7 +372,7 @@ return this.field_78779_k == GameType.SPECTATOR ? EnumActionResult.PASS : p_187102_2_.func_184199_a(p_187102_1_, vec3d, p_187102_4_); } -@@ -625,6 +643,6 @@ +@@ -626,6 +643,6 @@ public void func_187100_a(int p_187100_1_) { diff --git a/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch index 3917845c1..8a3d7ea14 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch @@ -39,6 +39,15 @@ public void func_72835_b() { super.func_72835_b(); +@@ -84,7 +87,7 @@ + + this.field_72984_F.func_76320_a("reEntryProcessing"); + +- for (int i = 0; i < 10 && !this.field_73036_L.isEmpty(); i++) ++ for (int i = 0; i < 10 && !this.field_73036_L.isEmpty(); ++i) + { + Entity entity = this.field_73036_L.iterator().next(); + this.field_73036_L.remove(entity); @@ -106,14 +109,12 @@ { } @@ -54,7 +63,7 @@ protected boolean func_175680_a(int p_175680_1_, int p_175680_2_, boolean p_175680_3_) { return p_175680_3_ || !this.func_72863_F().func_186025_d(p_175680_1_, p_175680_2_).func_76621_g(); -@@ -124,8 +125,8 @@ +@@ -124,12 +125,12 @@ this.field_184157_a.clear(); int i = this.field_73037_M.field_71474_y.field_151451_c; this.field_72984_F.func_76320_a("buildList"); @@ -63,9 +72,15 @@ + int j = MathHelper.func_76128_c(this.field_73037_M.field_71439_g.field_70165_t / 16.0D); + int k = MathHelper.func_76128_c(this.field_73037_M.field_71439_g.field_70161_v / 16.0D); - for (int l = -i; l <= i; ++l) +- for (int l = -i; l <= i; l++) ++ for (int l = -i; l <= i; ++l) { -@@ -138,7 +139,6 @@ +- for (int i1 = -i; i1 <= i; i1++) ++ for (int i1 = -i; i1 <= i; ++i1) + { + this.field_184157_a.add(new ChunkPos(l + j, i1 + k)); + } +@@ -138,14 +139,13 @@ this.field_72984_F.func_76319_b(); } @@ -73,6 +88,14 @@ protected void func_147456_g() { this.func_184154_a(); + + if (this.field_184158_M > 0) + { +- this.field_184158_M--; ++ --this.field_184158_M; + } + + this.field_73038_N.retainAll(this.field_184157_a); @@ -168,8 +168,9 @@ this.func_147467_a(j, k, chunk); this.field_72984_F.func_76319_b(); @@ -180,7 +203,7 @@ this.field_184158_M = this.field_73012_v.nextInt(12000) + 6000; } } -@@ -354,9 +336,7 @@ +@@ -354,21 +336,17 @@ int i = 32; Random random = new Random(); ItemStack itemstack = this.field_73037_M.field_71439_g.func_184614_ca(); @@ -190,8 +213,11 @@ + boolean flag = this.field_73037_M.field_71442_b.func_178889_l() == GameType.CREATIVE && !itemstack.func_190926_b() && itemstack.func_77973_b() == Item.func_150898_a(Blocks.field_180401_cv); BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); - for (int j = 0; j < 667; ++j) -@@ -366,9 +346,7 @@ +- for (int j = 0; j < 667; j++) ++ for (int j = 0; j < 667; ++j) + { + this.func_184153_a(p_73029_1_, p_73029_2_, p_73029_3_, 16, random, flag, blockpos$mutableblockpos); + this.func_184153_a(p_73029_1_, p_73029_2_, p_73029_3_, 32, random, flag, blockpos$mutableblockpos); } } @@ -213,6 +239,32 @@ } } +@@ -389,7 +365,7 @@ + { + this.field_72996_f.removeAll(this.field_72997_g); + +- for (int i = 0; i < this.field_72997_g.size(); i++) ++ for (int i = 0; i < this.field_72997_g.size(); ++i) + { + Entity entity = this.field_72997_g.get(i); + int j = entity.field_70176_ah; +@@ -401,14 +377,14 @@ + } + } + +- for (int i1 = 0; i1 < this.field_72997_g.size(); i1++) ++ for (int i1 = 0; i1 < this.field_72997_g.size(); ++i1) + { + this.func_72847_b(this.field_72997_g.get(i1)); + } + + this.field_72997_g.clear(); + +- for (int j1 = 0; j1 < this.field_72996_f.size(); j1++) ++ for (int j1 = 0; j1 < this.field_72996_f.size(); ++j1) + { + Entity entity1 = this.field_72996_f.get(j1); + Entity entity2 = entity1.func_184187_bx(); @@ -439,7 +415,6 @@ } } diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch index fe13fabeb..e673f79f7 100644 --- a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch +++ b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch @@ -293,13 +293,19 @@ public void func_147259_a(SPacketEntity p_147259_1_) { PacketThreadUtil.func_180031_a(p_147259_1_, this, this.field_147299_f); -@@ -698,9 +624,9 @@ - entity.field_70118_ct += (long)p_147259_1_.func_186952_a(); - entity.field_70117_cu += (long)p_147259_1_.func_186953_b(); - entity.field_70116_cv += (long)p_147259_1_.func_186951_c(); +@@ -695,12 +621,12 @@ + + if (entity != null) + { +- entity.field_70118_ct = entity.field_70118_ct + (long)p_147259_1_.func_186952_a(); +- entity.field_70117_cu = entity.field_70117_cu + (long)p_147259_1_.func_186953_b(); +- entity.field_70116_cv = entity.field_70116_cv + (long)p_147259_1_.func_186951_c(); - double d0 = (double)entity.field_70118_ct / 4096.0; - double d1 = (double)entity.field_70117_cu / 4096.0; - double d2 = (double)entity.field_70116_cv / 4096.0; ++ entity.field_70118_ct += (long)p_147259_1_.func_186952_a(); ++ entity.field_70117_cu += (long)p_147259_1_.func_186953_b(); ++ entity.field_70116_cv += (long)p_147259_1_.func_186951_c(); + double d0 = (double)entity.field_70118_ct / 4096.0D; + double d1 = (double)entity.field_70117_cu / 4096.0D; + double d2 = (double)entity.field_70116_cv / 4096.0D; @@ -314,7 +320,7 @@ public void func_147267_a(SPacketEntityHeadLook p_147267_1_) { PacketThreadUtil.func_180031_a(p_147267_1_, this, this.field_147299_f); -@@ -725,7 +650,6 @@ +@@ -725,18 +650,16 @@ } } @@ -322,7 +328,11 @@ public void func_147238_a(SPacketDestroyEntities p_147238_1_) { PacketThreadUtil.func_180031_a(p_147238_1_, this, this.field_147299_f); -@@ -736,7 +660,6 @@ + +- for (int i = 0; i < p_147238_1_.func_149098_c().length; i++) ++ for (int i = 0; i < p_147238_1_.func_149098_c().length; ++i) + { + this.field_147300_g.func_73028_b(p_147238_1_.func_149098_c()[i]); } } @@ -680,9 +690,12 @@ - ); + Explosion explosion = new Explosion(this.field_147299_f.field_71441_e, (Entity)null, p_147283_1_.func_149148_f(), p_147283_1_.func_149143_g(), p_147283_1_.func_149145_h(), p_147283_1_.func_149146_i(), p_147283_1_.func_149150_j()); explosion.func_77279_a(true); - this.field_147299_f.field_71439_g.field_70159_w += (double)p_147283_1_.func_149149_c(); - this.field_147299_f.field_71439_g.field_70181_x += (double)p_147283_1_.func_149144_d(); - this.field_147299_f.field_71439_g.field_70179_y += (double)p_147283_1_.func_149147_e(); +- this.field_147299_f.field_71439_g.field_70159_w = this.field_147299_f.field_71439_g.field_70159_w + (double)p_147283_1_.func_149149_c(); +- this.field_147299_f.field_71439_g.field_70181_x = this.field_147299_f.field_71439_g.field_70181_x + (double)p_147283_1_.func_149144_d(); +- this.field_147299_f.field_71439_g.field_70179_y = this.field_147299_f.field_71439_g.field_70179_y + (double)p_147283_1_.func_149147_e(); ++ this.field_147299_f.field_71439_g.field_70159_w += (double)p_147283_1_.func_149149_c(); ++ this.field_147299_f.field_71439_g.field_70181_x += (double)p_147283_1_.func_149144_d(); ++ this.field_147299_f.field_71439_g.field_70179_y += (double)p_147283_1_.func_149147_e(); } - @Override @@ -1492,7 +1505,7 @@ } else { -- for (int i = 0; i < p_147289_1_.func_149222_k(); ++i) +- for (int i = 0; i < p_147289_1_.func_149222_k(); i++) + for (int k = 0; k < p_147289_1_.func_149222_k(); ++k) { double d1 = this.field_147306_l.nextGaussian() * (double)p_147289_1_.func_149221_g(); diff --git a/patches/minecraft/net/minecraft/client/particle/Particle.java.patch b/patches/minecraft/net/minecraft/client/particle/Particle.java.patch index ac830f0f1..962f4acbf 100644 --- a/patches/minecraft/net/minecraft/client/particle/Particle.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/Particle.java.patch @@ -84,7 +84,7 @@ this.func_187112_i(); } -- this.field_187130_j -= 0.04 * (double)this.field_70545_g; +- this.field_187130_j = this.field_187130_j - 0.04 * (double)this.field_70545_g; + this.field_187130_j -= 0.04D * (double)this.field_70545_g; this.func_187110_a(this.field_187129_i, this.field_187130_j, this.field_187131_k); - this.field_187129_i *= 0.98F; @@ -132,9 +132,12 @@ if (this.field_190014_F != 0.0F) { -@@ -214,32 +202,14 @@ +@@ -212,34 +200,16 @@ + float f12 = MathHelper.func_76126_a(f8 * 0.5F) * (float)field_190016_K.field_72449_c; + Vec3d vec3d = new Vec3d((double)f10, (double)f11, (double)f12); - for (int l = 0; l < 4; ++l) +- for (int l = 0; l < 4; l++) ++ for (int l = 0; l < 4; ++l) { - avec3d[l] = vec3d.func_186678_a(2.0 * avec3d[l].func_72430_b(vec3d)) - .func_178787_e(avec3d[l].func_186678_a((double)(f9 * f9) - vec3d.func_72430_b(vec3d))) @@ -170,8 +173,12 @@ } public int func_70537_b() -@@ -279,26 +249,9 @@ - ++this.field_94054_b; +@@ -276,29 +246,12 @@ + + public void func_94053_h() + { +- this.field_94054_b++; ++ ++this.field_94054_b; } - @Override diff --git a/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch b/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch index 88c1f4375..b9b51363d 100644 --- a/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/ParticleManager.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/client/particle/ParticleManager.java +++ after/net/minecraft/client/particle/ParticleManager.java -@@ -41,11 +41,11 @@ +@@ -41,22 +41,22 @@ private static final ResourceLocation field_110737_b = new ResourceLocation("textures/particle/particles.png"); protected World field_78878_a; private final ArrayDeque[][] field_78876_b = new ArrayDeque[4][]; @@ -15,6 +15,19 @@ public ParticleManager(World p_i1220_1_, TextureManager p_i1220_2_) { + this.field_78878_a = p_i1220_1_; + this.field_78877_c = p_i1220_2_; + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + this.field_78876_b[i] = new ArrayDeque[2]; + +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) + { + this.field_78876_b[i][j] = Queues.newArrayDeque(); + } @@ -119,7 +119,7 @@ public void func_178929_a(int p_178929_1_, IParticleFactory p_178929_2_) @@ -52,7 +65,7 @@ if (particle != null) { -@@ -164,6 +153,7 @@ +@@ -164,19 +153,20 @@ public void func_78873_a(Particle p_78873_1_) { @@ -60,7 +73,13 @@ this.field_187241_h.add(p_78873_1_); } -@@ -176,7 +166,7 @@ + public void func_78868_a() + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + this.func_178922_a(i); + } if (!this.field_178933_d.isEmpty()) { @@ -69,7 +88,30 @@ for (ParticleEmitter particleemitter : this.field_178933_d) { -@@ -379,12 +369,12 @@ +@@ -212,7 +202,7 @@ + { + this.field_78878_a.field_72984_F.func_76320_a(String.valueOf(p_178922_1_)); + +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { + this.field_78878_a.field_72984_F.func_76320_a(String.valueOf(i)); + this.func_187240_a(this.field_78876_b[p_178922_1_][i]); +@@ -296,11 +286,11 @@ + GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); + GlStateManager.func_179092_a(516, 0.003921569F); + +- for (int i_nf = 0; i_nf < 3; i_nf++) ++ for (int i_nf = 0; i_nf < 3; ++i_nf) + { + final int i = i_nf; + +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) + { + if (!this.field_78876_b[i][j].isEmpty()) + { +@@ -379,14 +369,14 @@ public void func_78872_b(Entity p_78872_1_, float p_78872_2_) { @@ -86,9 +128,24 @@ + float f4 = f1 * MathHelper.func_76126_a(p_78872_1_.field_70125_A * 0.017453292F); + float f5 = MathHelper.func_76134_b(p_78872_1_.field_70125_A * 0.017453292F); - for (int i = 0; i < 2; ++i) +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) { -@@ -420,7 +410,7 @@ + Queue queue = this.field_78876_b[3][i]; + +@@ -407,9 +397,9 @@ + { + this.field_78878_a = p_78870_1_; + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) + { + this.field_78876_b[i][j].clear(); + } +@@ -420,33 +410,21 @@ public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_) { @@ -97,9 +154,15 @@ { p_180533_2_ = p_180533_2_.func_185899_b(this.field_78878_a, p_180533_1_); int i = 4; -@@ -431,22 +421,10 @@ + +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) + { +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) { - for (int l = 0; l < 4; ++l) +- for (int l = 0; l < 4; l++) ++ for (int l = 0; l < 4; ++l) { - double d0 = ((double)j + 0.5) / 4.0; - double d1 = ((double)k + 0.5) / 4.0; @@ -187,6 +250,18 @@ } } +@@ -517,9 +484,9 @@ + { + int i = 0; + +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) + { +- for (int k = 0; k < 2; k++) ++ for (int k = 0; k < 2; ++k) + { + i += this.field_78876_b[j][k].size(); + } @@ -527,4 +494,13 @@ return "" + i; diff --git a/patches/minecraft/net/minecraft/client/renderer/BlockFluidRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/BlockFluidRenderer.java.patch index ae13618d3..b8a5cdd41 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BlockFluidRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BlockFluidRenderer.java.patch @@ -97,7 +97,7 @@ } } -@@ -185,26 +147,10 @@ +@@ -185,52 +147,36 @@ int l1 = p_178270_2_.func_185889_a(p_178270_1_, p_178270_3_.func_177977_b()); int i2 = l1 >> 16 & 65535; int j2 = l1 & 65535; @@ -128,6 +128,37 @@ flag3 = true; } +- for (int i1 = 0; i1 < 4; i1++) ++ for (int i1 = 0; i1 < 4; ++i1) + { + int j1 = 0; + int k1 = 0; + + if (i1 == 0) + { +- k1--; ++ --k1; + } + + if (i1 == 1) + { +- k1++; ++ ++k1; + } + + if (i1 == 2) + { +- j1--; ++ --j1; + } + + if (i1 == 3) + { +- j1++; ++ ++j1; + } + + BlockPos blockpos = p_178270_3_.func_177982_a(j1, 0, k1); @@ -238,9 +184,9 @@ if (!flag) @@ -258,6 +289,15 @@ } } } +@@ -361,7 +275,7 @@ + int i = 0; + float f = 0.0F; + +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) + { + BlockPos blockpos = p_178269_2_.func_177982_a(-(j & 1), 0, -(j >> 1 & 1)); + @@ -373,9 +287,17 @@ IBlockState iblockstate = p_178269_1_.func_180495_p(blockpos); Material material = iblockstate.func_185904_a(); @@ -279,15 +319,17 @@ if (k >= 8 || k == 0) { -@@ -384,11 +306,6 @@ +@@ -384,12 +306,7 @@ } f += BlockLiquid.func_149801_b(k); -- ++i; +- i++; - } - else if (!material.func_76220_a()) - { -- ++f; - ++i; +- f++; +- i++; ++ ++i; } } + diff --git a/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch index b547abb84..a0074a321 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java.patch @@ -110,7 +110,15 @@ { Vec3d vec3d = p_187492_2_.func_191059_e(p_187492_1_, p_187492_3_); double d0 = (double)p_187492_3_.func_177958_n() + vec3d.field_72450_a; -@@ -165,7 +128,14 @@ +@@ -158,14 +121,21 @@ + double d2 = (double)p_187492_3_.func_177952_p() + vec3d.field_72449_c; + int i = 0; + +- for (int j = p_187492_5_.size(); i < j; i++) ++ for (int j = p_187492_5_.size(); i < j; ++i) + { + BakedQuad bakedquad = p_187492_5_.get(i); + this.func_187494_a(p_187492_2_, bakedquad.func_178209_a(), bakedquad.func_178210_d(), p_187492_6_, p_187492_7_); p_187492_8_.func_187491_a(p_187492_1_, p_187492_2_, p_187492_3_, bakedquad.func_178210_d(), p_187492_6_, p_187492_7_); p_187492_4_.func_178981_a(bakedquad.func_178209_a()); p_187492_4_.func_178962_a(p_187492_8_.field_178207_c[0], p_187492_8_.field_178207_c[1], p_187492_8_.field_178207_c[2], p_187492_8_.field_178207_c[3]); @@ -139,6 +147,15 @@ p_187492_4_.func_178978_a(p_187492_8_.field_178206_b[0] * f, p_187492_8_.field_178206_b[0] * f1, p_187492_8_.field_178206_b[0] * f2, 4); p_187492_4_.func_178978_a(p_187492_8_.field_178206_b[1] * f, p_187492_8_.field_178206_b[1] * f1, p_187492_8_.field_178206_b[1] * f2, 3); p_187492_4_.func_178978_a(p_187492_8_.field_178206_b[2] * f, p_187492_8_.field_178206_b[2] * f1, p_187492_8_.field_178206_b[2] * f2, 2); +@@ -204,7 +174,7 @@ + float f4 = -32.0F; + float f5 = -32.0F; + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + float f6 = Float.intBitsToFloat(p_187494_2_[i * 7]); + float f7 = Float.intBitsToFloat(p_187494_2_[i * 7 + 1]); @@ -265,16 +235,7 @@ } } @@ -157,7 +174,14 @@ { Vec3d vec3d = p_187496_2_.func_191059_e(p_187496_1_, p_187496_3_); double d0 = (double)p_187496_3_.func_177958_n() + vec3d.field_72450_a; -@@ -288,7 +249,7 @@ +@@ -282,13 +243,13 @@ + double d2 = (double)p_187496_3_.func_177952_p() + vec3d.field_72449_c; + int i = 0; + +- for (int j = p_187496_7_.size(); i < j; i++) ++ for (int j = p_187496_7_.size(); i < j; ++i) + { + BakedQuad bakedquad = p_187496_7_.get(i); if (p_187496_5_) { @@ -237,6 +261,15 @@ if (!p_178266_4_) { +@@ -362,7 +338,7 @@ + BufferBuilder bufferbuilder = tessellator.func_178180_c(); + int i = 0; + +- for (int j = p_178264_5_.size(); i < j; i++) ++ for (int j = p_178264_5_.size(); i < j; ++i) + { + BakedQuad bakedquad = p_178264_5_.get(i); + bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_176599_b); @@ -389,25 +365,15 @@ private final float[] field_178206_b = new float[4]; private final int[] field_178207_c = new int[4]; diff --git a/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch b/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch index 410b0f86d..5ae2107d6 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch @@ -38,9 +38,12 @@ } } -@@ -74,14 +72,7 @@ +@@ -72,21 +70,14 @@ + int i = this.field_178997_d / 4; + final float[] afloat = new float[i]; - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { - afloat[j] = func_181665_a( - this.field_179000_c, @@ -54,6 +57,12 @@ } Integer[] ainteger = new Integer[i]; + +- for (int k = 0; k < ainteger.length; k++) ++ for (int k = 0; k < ainteger.length; ++k) + { + ainteger[k] = k; + } @@ -95,7 +86,7 @@ { public int compare(Integer p_compare_1_, Integer p_compare_2_) @@ -143,6 +152,15 @@ } } +@@ -280,7 +273,7 @@ + int i = this.field_179011_q.func_181719_f(); + int j = (this.field_178997_d - 4) * i; + +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) + { + int l = j + k * i; + int i1 = l + 1; @@ -307,19 +300,19 @@ if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) @@ -200,7 +218,7 @@ } } -@@ -424,8 +417,8 @@ +@@ -424,15 +417,15 @@ public void func_178981_a(int[] p_178981_1_) { @@ -209,8 +227,28 @@ + this.func_181670_b(p_178981_1_.length * 4 + this.field_179011_q.func_177338_f());//Forge, fix MC-122110 + this.field_178999_b.position(this.func_181664_j()); this.field_178999_b.put(p_178981_1_); - this.field_178997_d += p_178981_1_.length / this.field_179011_q.func_181719_f(); +- this.field_178997_d = this.field_178997_d + p_178981_1_.length / this.field_179011_q.func_181719_f(); ++ this.field_178997_d += p_178981_1_.length / this.field_179011_q.func_181719_f(); } + + public void func_181675_d() + { +- this.field_178997_d++; ++ ++this.field_178997_d; + this.func_181670_b(this.field_179011_q.func_177338_f()); + } + +@@ -486,8 +479,8 @@ + + private void func_181667_k() + { +- this.field_181678_g++; +- this.field_181678_g = this.field_181678_g % this.field_179011_q.func_177345_h(); ++ ++this.field_181678_g; ++ this.field_181678_g %= this.field_179011_q.func_177345_h(); + this.field_181677_f = this.field_179011_q.func_177348_c(this.field_181678_g); + + if (this.field_181677_f.func_177375_c() == VertexFormatElement.EnumUsage.PADDING) @@ -515,15 +508,15 @@ break; case USHORT: @@ -244,6 +282,24 @@ } } +@@ -573,7 +566,7 @@ + + public void func_178968_d(int p_178968_1_) + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + this.func_192836_a(p_178968_1_, i + 1); + } +@@ -581,7 +574,7 @@ + + public void func_178990_f(float p_178990_1_, float p_178990_2_, float p_178990_3_) + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + this.func_178994_b(p_178990_1_, p_178990_2_, p_178990_3_, i + 1); + } @@ -613,5 +606,28 @@ { return this.field_179018_e; diff --git a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch index e8abfac2d..94e18fd4a 100644 --- a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch @@ -71,6 +71,18 @@ this.field_78531_r = p_i45076_1_; this.field_147711_ac = p_i45076_2_; this.field_78516_c = p_i45076_1_.func_175597_ag(); +@@ -178,9 +154,9 @@ + this.field_78504_Q = this.field_78513_d.func_110565_c(); + this.field_147707_d = null; + +- for (int i = 0; i < 32; i++) ++ for (int i = 0; i < 32; ++i) + { +- for (int j = 0; j < 32; j++) ++ for (int j = 0; j < 32; ++j) + { + float f = (float)(j - 16); + float f1 = (float)(i - 16); @@ -235,6 +211,7 @@ { this.func_175069_a(new ResourceLocation("shaders/post/invert.json")); @@ -87,7 +99,7 @@ public void func_110549_a(IResourceManager p_110549_1_) { if (this.field_147707_d != null) -@@ -315,7 +291,7 @@ +@@ -315,11 +291,11 @@ this.field_78531_r.func_175607_a(this.field_78531_r.field_71439_g); } @@ -95,7 +107,22 @@ + float f3 = this.field_78531_r.field_71441_e.func_175724_o(new BlockPos(this.field_78531_r.func_175606_aa().func_174824_e(1F))); // Forge: fix MC-51150 float f4 = (float)this.field_78531_r.field_71474_y.field_151451_c / 32.0F; float f2 = f3 * (1.0F - f4) + f4; - this.field_78539_ae += (f2 - this.field_78539_ae) * 0.1F; +- this.field_78539_ae = this.field_78539_ae + (f2 - this.field_78539_ae) * 0.1F; +- this.field_78529_t++; ++ this.field_78539_ae += (f2 - this.field_78539_ae) * 0.1F; ++ ++this.field_78529_t; + this.field_78516_c.func_78441_a(); + this.func_78484_h(); + this.field_82832_V = this.field_82831_U; +@@ -340,7 +316,7 @@ + + if (this.field_190567_ac > 0) + { +- this.field_190567_ac--; ++ --this.field_190567_ac; + + if (this.field_190567_ac == 0) + { @@ -386,12 +362,12 @@ if (this.field_78531_r.field_71442_b.func_78749_i()) @@ -111,7 +138,7 @@ { flag = true; } -@@ -407,21 +383,13 @@ +@@ -407,24 +383,16 @@ this.field_78528_u = null; Vec3d vec3d3 = null; float f = 1.0F; @@ -134,7 +161,11 @@ + })); double d2 = d1; - for (int j = 0; j < list.size(); ++j) +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) + { + Entity entity1 = list.get(j); + AxisAlignedBB axisalignedbb = entity1.func_174813_aQ().func_186662_g((double)entity1.func_70111_Y()); @@ -432,22 +400,22 @@ if (axisalignedbb.func_72318_a(vec3d)) @@ -176,6 +207,15 @@ } if (this.field_78528_u != null && (d2 < d1 || this.field_78531_r.field_71476_x == null)) +@@ -495,7 +463,7 @@ + } + + this.field_78506_S = this.field_78507_R; +- this.field_78507_R = this.field_78507_R + (f - this.field_78507_R) * 0.5F; ++ this.field_78507_R += (f - this.field_78507_R) * 0.5F; + + if (this.field_78507_R > 1.5F) + { @@ -522,7 +490,7 @@ if (p_78481_2_) { @@ -254,7 +294,8 @@ + double d5 = (double)(MathHelper.func_76134_b(f1 * 0.017453292F) * MathHelper.func_76134_b(f2 * 0.017453292F)) * d3; + double d6 = (double)(-MathHelper.func_76126_a(f2 * 0.017453292F)) * d3; - for (int i = 0; i < 8; ++i) +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) { float f3 = (float)((i & 1) * 2 - 1); float f4 = (float)((i >> 1 & 1) * 2 - 1); @@ -378,15 +419,26 @@ { this.func_180436_i(); this.field_78516_c.func_78440_a(p_78476_1_); -@@ -879,7 +821,7 @@ +@@ -879,8 +821,8 @@ private void func_78470_f() { this.field_175075_L = (float)((double)this.field_175075_L + (Math.random() - Math.random()) * Math.random() * Math.random()); - this.field_175075_L = (float)((double)this.field_175075_L * 0.9); +- this.field_78514_e = this.field_78514_e + (this.field_175075_L - this.field_78514_e); + this.field_175075_L = (float)((double)this.field_175075_L * 0.9D); - this.field_78514_e += this.field_175075_L - this.field_78514_e; ++ this.field_78514_e += this.field_175075_L - this.field_78514_e; this.field_78536_aa = true; } + +@@ -896,7 +838,7 @@ + float f = world.func_72971_b(1.0F); + float f1 = f * 0.95F + 0.05F; + +- for (int i = 0; i < 256; i++) ++ for (int i = 0; i < 256; ++i) + { + float f2 = world.field_73011_w.func_177497_p()[i / 16] * f1; + float f3 = world.field_73011_w.func_177497_p()[i % 16] * (this.field_78514_e * 0.1F + 1.5F); @@ -932,6 +874,15 @@ f10 = 0.25F + f7 * 0.75F; } @@ -669,9 +721,12 @@ int j = 0; int k = (int)(100.0F * f * f); -@@ -1558,60 +1494,36 @@ +@@ -1556,62 +1492,38 @@ + k = 0; + } - for (int l = 0; l < k; ++l) +- for (int l = 0; l < k; l++) ++ for (int l = 0; l < k; ++l) { - BlockPos blockpos1 = world.func_175725_q( - blockpos.func_177982_a( @@ -791,8 +846,15 @@ GlStateManager.func_179092_a(516, 0.1F); double d0 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_78474_1_; double d1 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_78474_1_; -@@ -1679,8 +1592,8 @@ - for (int l1 = i - i1; l1 <= i + i1; ++l1) +@@ -1674,13 +1587,13 @@ + GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k1 = k - i1; k1 <= k + i1; k1++) ++ for (int k1 = k - i1; k1 <= k + i1; ++k1) + { +- for (int l1 = i - i1; l1 <= i + i1; l1++) ++ for (int l1 = i - i1; l1 <= i + i1; ++l1) { int i2 = (k1 - k + 16) * 32 + l1 - i + 16; - double d3 = (double)this.field_175076_N[i2] * 0.5; @@ -933,6 +995,19 @@ this.field_175080_Q = this.field_175080_Q * (1.0F - f5) + afloat[0] * f5; this.field_175082_R = this.field_175082_R * (1.0F - f5) + afloat[1] * f5; this.field_175081_S = this.field_175081_S * (1.0F - f5) + afloat[2] * f5; +@@ -1875,9 +1754,9 @@ + } + } + +- this.field_175080_Q = this.field_175080_Q + (f1 - this.field_175080_Q) * f; +- this.field_175082_R = this.field_175082_R + (f2 - this.field_175082_R) * f; +- this.field_175081_S = this.field_175081_S + (f3 - this.field_175081_S) * f; ++ this.field_175080_Q += (f1 - this.field_175080_Q) * f; ++ this.field_175082_R += (f2 - this.field_175082_R) * f; ++ this.field_175081_S += (f3 - this.field_175081_S) * f; + float f8 = world.func_72867_j(p_78466_1_); + + if (f8 > 0.0F) @@ -1908,29 +1787,16 @@ this.field_175082_R = (float)vec3d3.field_72448_b; this.field_175081_S = (float)vec3d3.field_72449_c; diff --git a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch index 2c27111ff..ee5e2d8ce 100644 --- a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch @@ -212,14 +212,18 @@ } GlStateManager.func_179121_F(); -@@ -455,6 +442,7 @@ +@@ -455,9 +442,10 @@ if (this.field_78455_a.field_71439_g.func_70094_T()) { IBlockState iblockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g)); + BlockPos overlayPos = new BlockPos(this.field_78455_a.field_71439_g); EntityPlayer entityplayer = this.field_78455_a.field_71439_g; - for (int i = 0; i < 8; ++i) +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) + { + double d0 = entityplayer.field_70165_t + (double)(((float)((i >> 0) % 2) - 0.5F) * entityplayer.field_70130_N * 0.8F); + double d1 = entityplayer.field_70163_u + (double)(((float)((i >> 1) % 2) - 0.5F) * 0.1F); @@ -468,11 +456,13 @@ if (iblockstate1.func_191058_s()) { @@ -289,7 +293,7 @@ tessellator.func_78381_a(); GlStateManager.func_179121_F(); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); -@@ -559,9 +549,7 @@ +@@ -559,12 +549,10 @@ GlStateManager.func_179143_c(519); GlStateManager.func_179132_a(false); GlStateManager.func_179147_l(); @@ -299,7 +303,11 @@ + GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); float f = 1.0F; - for (int i = 0; i < 2; ++i) +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { + GlStateManager.func_179094_E(); + TextureAtlasSprite textureatlassprite = this.field_78455_a.func_147117_R().func_110572_b("minecraft:blocks/fire_layer_1"); @@ -581,10 +569,10 @@ GlStateManager.func_179109_b((float)(-(i * 2 - 1)) * 0.24F, -0.3F, 0.0F); GlStateManager.func_179114_b((float)(i * 2 - 1) * 10.0F, 0.0F, 1.0F, 0.0F); @@ -315,12 +323,14 @@ tessellator.func_78381_a(); GlStateManager.func_179121_F(); } -@@ -611,8 +599,17 @@ +@@ -611,10 +599,17 @@ else { float f = entityplayersp.func_184825_o(1.0F); -- this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); -- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); +- this.field_187469_f = this.field_187469_f +- + MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); +- this.field_187471_h = this.field_187471_h +- + MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); + + boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, entityplayersp.field_71071_by.field_70461_c); + boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1); diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch index f0d040125..62fc4b07b 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch @@ -49,6 +49,15 @@ public void func_110549_a(IResourceManager p_110549_1_) { this.func_174971_n(); +@@ -191,7 +191,7 @@ + { + TextureMap texturemap = this.field_72777_q.func_147117_R(); + +- for (int i = 0; i < this.field_94141_F.length; i++) ++ for (int i = 0; i < this.field_94141_F.length; ++i) + { + this.field_94141_F[i] = texturemap.func_110572_b("minecraft:blocks/destroy_stage_" + i); + } @@ -210,9 +210,7 @@ try @@ -74,6 +83,15 @@ this.field_175015_z.func_178038_a(this.field_72777_q.field_71443_c, this.field_72777_q.field_71440_d, false); GlStateManager.func_179084_k(); } +@@ -393,7 +386,7 @@ + Random random = new Random(10842L); + p_180444_1_.func_181668_a(7, DefaultVertexFormats.field_181705_e); + +- for (int i = 0; i < 1500; i++) ++ for (int i = 0; i < 1500; ++i) + { + double d0 = (double)(random.nextFloat() * 2.0F - 1.0F); + double d1 = (double)(random.nextFloat() * 2.0F - 1.0F); @@ -401,35 +394,35 @@ double d3 = (double)(0.15F + random.nextFloat() * 0.1F); double d4 = d0 * d0 + d1 * d1 + d2 * d2; @@ -106,7 +124,8 @@ double d15 = Math.sin(d14); double d16 = Math.cos(d14); - for (int j = 0; j < 4; ++j) +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) { - double d17 = 0.0; + double d17 = 0.0D; @@ -123,17 +142,19 @@ double d25 = d24 * d9 - d22 * d10; double d26 = d22 * d9 + d24 * d10; p_180444_1_.func_181662_b(d5 + d25, d6 + d23, d7 + d26).func_181675_d(); -@@ -560,8 +553,10 @@ +@@ -560,9 +553,11 @@ public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float p_180446_3_) { + int pass = net.minecraftforge.client.MinecraftForgeClient.getRenderPass(); if (this.field_72740_G > 0) { +- this.field_72740_G--; + if (pass > 0) return; - --this.field_72740_G; ++ --this.field_72740_G; } else + { @@ -570,27 +565,14 @@ double d1 = p_180446_1_.field_70167_r + (p_180446_1_.field_70163_u - p_180446_1_.field_70167_r) * (double)p_180446_3_; double d2 = p_180446_1_.field_70166_s + (p_180446_1_.field_70161_v - p_180446_1_.field_70166_s) * (double)p_180446_3_; @@ -167,7 +188,7 @@ Entity entity = this.field_72777_q.func_175606_aa(); double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_; double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_; -@@ -602,11 +584,15 @@ +@@ -602,12 +584,16 @@ this.field_72777_q.field_71460_t.func_180436_i(); this.field_72769_h.field_72984_F.func_76318_c("global"); List list = this.field_72769_h.func_72910_y(); @@ -176,14 +197,17 @@ this.field_72748_H = list.size(); + } - for (int i = 0; i < this.field_72769_h.field_73007_j.size(); ++i) +- for (int i = 0; i < this.field_72769_h.field_73007_j.size(); i++) ++ for (int i = 0; i < this.field_72769_h.field_73007_j.size(); ++i) { Entity entity1 = this.field_72769_h.field_73007_j.get(i); +- this.field_72749_I++; + if (!entity1.shouldRenderInPass(pass)) continue; - ++this.field_72749_I; ++ ++this.field_72749_I; if (entity1.func_145770_h(d0, d1, d2)) -@@ -616,36 +602,27 @@ + { +@@ -616,38 +602,29 @@ } this.field_72769_h.field_72984_F.func_76318_c("entities"); @@ -224,8 +248,11 @@ - )) + if ((entity2 != this.field_72777_q.func_175606_aa() || this.field_72777_q.field_71474_y.field_74320_O != 0 || flag1) && (entity2.field_70163_u < 0.0D || entity2.field_70163_u >= 256.0D || this.field_72769_h.func_175667_e(blockpos$pooledmutableblockpos.func_189535_a(entity2)))) { - ++this.field_72749_I; +- this.field_72749_I++; ++ ++this.field_72749_I; this.field_175010_j.func_188388_a(entity2, p_180446_3_, false); + + if (this.func_184383_a(entity2, entity, p_180446_2_)) @@ -675,6 +652,7 @@ } } @@ -234,6 +261,15 @@ if (this.func_174985_d() && (!list1.isEmpty() || this.field_184386_ad)) { this.field_72769_h.field_72984_F.func_76318_c("entityOutlines"); +@@ -689,7 +667,7 @@ + RenderHelper.func_74518_a(); + this.field_175010_j.func_178632_c(true); + +- for (int j = 0; j < list1.size(); j++) ++ for (int j = 0; j < list1.size(); ++j) + { + this.field_175010_j.func_188388_a(list1.get(j), p_180446_3_, false); + } @@ -714,6 +692,7 @@ this.field_72769_h.field_72984_F.func_76318_c("blockentities"); RenderHelper.func_74519_b(); @@ -262,23 +298,28 @@ this.func_180443_s(); -@@ -788,13 +770,9 @@ +@@ -788,15 +770,13 @@ { return true; } -- else if (this.field_72777_q.field_71439_g.func_175149_v() -- && this.field_72777_q.field_71474_y.field_178883_an.func_151470_d() -- && p_184383_1_ instanceof EntityPlayer) + else if (this.field_72777_q.field_71439_g.func_175149_v() && this.field_72777_q.field_71474_y.field_178883_an.func_151470_d() && p_184383_1_ instanceof EntityPlayer) - { -- return p_184383_1_.field_70158_ak -- || p_184383_3_.func_78546_a(p_184383_1_.func_174813_aQ()) -- || p_184383_1_.func_184215_y(this.field_72777_q.field_71439_g); ++ { + return p_184383_1_.field_70158_ak || p_184383_3_.func_78546_a(p_184383_1_.func_174813_aQ()) || p_184383_1_.func_184215_y(this.field_72777_q.field_71439_g); - } ++ } else { -@@ -806,15 +784,7 @@ +- return this.field_72777_q.field_71439_g.func_175149_v() +- && this.field_72777_q.field_71474_y.field_178883_an.func_151470_d() +- && p_184383_1_ instanceof EntityPlayer +- ? p_184383_1_.field_70158_ak +- || p_184383_3_.func_78546_a(p_184383_1_.func_174813_aQ()) +- || p_184383_1_.func_184215_y(this.field_72777_q.field_71439_g) +- : false; ++ return false; + } + } + +@@ -804,15 +784,7 @@ { int i = this.field_175008_n.field_178164_f.length; int j = this.func_184382_g(); @@ -295,7 +336,16 @@ } protected int func_184382_g() -@@ -851,10 +821,7 @@ +@@ -825,7 +797,7 @@ + + if (compiledchunk != CompiledChunk.field_178502_a && !compiledchunk.func_178489_a()) + { +- i++; ++ ++i; + } + } + +@@ -849,10 +821,7 @@ double d1 = p_174970_1_.field_70163_u - this.field_174993_C; double d2 = p_174970_1_.field_70161_v - this.field_174987_D; @@ -307,7 +357,7 @@ { this.field_174992_B = p_174970_1_.field_70165_t; this.field_174993_C = p_174970_1_.field_70163_u; -@@ -882,16 +849,8 @@ +@@ -880,16 +849,8 @@ this.field_72777_q.field_71424_I.func_76318_c("culling"); BlockPos blockpos1 = new BlockPos(d3, d4 + (double)p_174970_1_.func_70047_e(), d5); RenderChunk renderchunk = this.field_175008_n.func_178161_a(blockpos1); @@ -326,7 +376,7 @@ this.field_174997_H = p_174970_1_.field_70165_t; this.field_174998_I = p_174970_1_.field_70163_u; this.field_174999_J = p_174970_1_.field_70161_v; -@@ -903,17 +862,15 @@ +@@ -901,17 +862,15 @@ if (!flag && this.field_147595_R) { this.field_147595_R = false; @@ -348,7 +398,15 @@ Set set1 = this.func_174978_c(blockpos1); if (set1.size() == 1) -@@ -953,10 +910,10 @@ +@@ -945,16 +904,16 @@ + { + int i = blockpos1.func_177956_o() > 0 ? 248 : 8; + +- for (int j = -this.field_72739_F; j <= this.field_72739_F; j++) ++ for (int j = -this.field_72739_F; j <= this.field_72739_F; ++j) + { +- for (int k = -this.field_72739_F; k <= this.field_72739_F; k++) ++ for (int k = -this.field_72739_F; k <= this.field_72739_F; ++k) { RenderChunk renderchunk1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8)); @@ -361,7 +419,7 @@ } } } -@@ -975,15 +932,9 @@ +@@ -973,15 +932,9 @@ { RenderChunk renderchunk2 = this.func_181562_a(blockpos, renderchunk3, enumfacing1); @@ -379,7 +437,7 @@ renderglobal$containerlocalrenderinformation.func_189561_a(renderglobal$containerlocalrenderinformation1.field_178035_c, enumfacing1); queue.add(renderglobal$containerlocalrenderinformation); } -@@ -1003,7 +954,7 @@ +@@ -1001,7 +954,7 @@ this.field_72777_q.field_71424_I.func_76318_c("rebuildNear"); Set set = this.field_175009_l; @@ -388,7 +446,7 @@ for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation2 : this.field_72755_R) { -@@ -1013,9 +964,9 @@ +@@ -1011,9 +964,9 @@ { this.field_147595_R = true; BlockPos blockpos2 = renderchunk4.func_178568_j().func_177982_a(8, 8, 8); @@ -400,7 +458,7 @@ { this.field_175009_l.add(renderchunk4); } -@@ -1059,15 +1010,13 @@ +@@ -1057,15 +1010,13 @@ { return null; } @@ -419,7 +477,24 @@ } } -@@ -1114,10 +1063,10 @@ +@@ -1092,12 +1043,12 @@ + this.field_175004_V[6] = new Vector4f(1.0F, 1.0F, 1.0F, 1.0F); + this.field_175004_V[7] = new Vector4f(-1.0F, 1.0F, 1.0F, 1.0F); + +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) + { + Matrix4f.transform(matrix4f2, this.field_175004_V[i], this.field_175004_V[i]); +- this.field_175004_V[i].x = this.field_175004_V[i].x / this.field_175004_V[i].w; +- this.field_175004_V[i].y = this.field_175004_V[i].y / this.field_175004_V[i].w; +- this.field_175004_V[i].z = this.field_175004_V[i].z / this.field_175004_V[i].w; ++ this.field_175004_V[i].x /= this.field_175004_V[i].w; ++ this.field_175004_V[i].y /= this.field_175004_V[i].w; ++ this.field_175004_V[i].z /= this.field_175004_V[i].w; + this.field_175004_V[i].w = 1.0F; + } + } +@@ -1112,10 +1063,10 @@ f += 180.0F; } @@ -434,7 +509,7 @@ return new Vector3f(f3 * f4, f5, f2 * f4); } -@@ -1132,7 +1081,7 @@ +@@ -1130,7 +1081,7 @@ double d1 = p_174977_5_.field_70163_u - this.field_147597_g; double d2 = p_174977_5_.field_70161_v - this.field_147602_h; @@ -443,7 +518,7 @@ { this.field_147596_f = p_174977_5_.field_70165_t; this.field_147597_g = p_174977_5_.field_70163_u; -@@ -1160,7 +1109,7 @@ +@@ -1158,16 +1109,19 @@ for (int j = i1; j != i; j += j1) { @@ -452,7 +527,9 @@ if (!renderchunk.func_178571_g().func_178491_b(p_174977_1_)) { -@@ -1169,7 +1118,10 @@ +- l++; ++ ++l; + this.field_174996_N.func_178002_a(renderchunk, p_174977_1_); } } @@ -464,7 +541,7 @@ this.func_174982_a(p_174977_1_); this.field_72777_q.field_71424_I.func_76319_b(); return l; -@@ -1198,7 +1150,7 @@ +@@ -1196,7 +1150,7 @@ for (VertexFormatElement vertexformatelement : DefaultVertexFormats.field_176600_a.func_177343_g()) { VertexFormatElement.EnumUsage vertexformatelement$enumusage = vertexformatelement.func_177375_c(); @@ -473,7 +550,7 @@ switch (vertexformatelement$enumusage) { -@@ -1206,7 +1158,7 @@ +@@ -1204,7 +1158,7 @@ GlStateManager.func_187429_p(32884); break; case UV: @@ -482,7 +559,7 @@ GlStateManager.func_187429_p(32888); OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a); break; -@@ -1225,9 +1177,9 @@ +@@ -1223,9 +1177,9 @@ while (p_174965_1_.hasNext()) { DestroyBlockProgress destroyblockprogress = p_174965_1_.next(); @@ -494,7 +571,16 @@ { p_174965_1_.remove(); } -@@ -1251,10 +1203,10 @@ +@@ -1234,7 +1188,7 @@ + + public void func_72734_e() + { +- this.field_72773_u++; ++ ++this.field_72773_u; + + if (this.field_72773_u % 20 == 0) + { +@@ -1249,10 +1203,10 @@ { BlockPos blockpos = iterator.next(); iterator.remove(); @@ -509,7 +595,7 @@ } } } -@@ -1264,49 +1216,47 @@ +@@ -1262,49 +1216,47 @@ GlStateManager.func_179106_n(); GlStateManager.func_179118_c(); GlStateManager.func_179147_l(); @@ -523,7 +609,7 @@ Tessellator tessellator = Tessellator.func_178181_a(); BufferBuilder bufferbuilder = tessellator.func_178180_c(); -- for (int i = 0; i < 6; ++i) +- for (int i = 0; i < 6; i++) + for (int k1 = 0; k1 < 6; ++k1) { GlStateManager.func_179094_E(); @@ -570,7 +656,7 @@ tessellator.func_78381_a(); GlStateManager.func_179121_F(); } -@@ -1318,6 +1268,13 @@ +@@ -1316,6 +1268,13 @@ public void func_174976_a(float p_174976_1_, int p_174976_2_) { @@ -584,7 +670,7 @@ if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p().func_186068_a() == 1) { this.func_180448_r(); -@@ -1364,12 +1321,7 @@ +@@ -1362,12 +1321,7 @@ GlStateManager.func_179106_n(); GlStateManager.func_179118_c(); GlStateManager.func_179147_l(); @@ -598,7 +684,7 @@ RenderHelper.func_74518_a(); float[] afloat = this.field_72769_h.field_73011_w.func_76560_a(this.field_72769_h.func_72826_c(p_174976_1_), p_174976_1_); -@@ -1396,17 +1348,15 @@ +@@ -1394,17 +1348,15 @@ } bufferbuilder.func_181668_a(6, DefaultVertexFormats.field_181706_f); @@ -607,7 +693,7 @@ + bufferbuilder.func_181662_b(0.0D, 100.0D, 0.0D).func_181666_a(f6, f7, f8, afloat[3]).func_181675_d(); + int l1 = 16; -- for (int l = 0; l <= 16; ++l) +- for (int l = 0; l <= 16; l++) + for (int j2 = 0; j2 <= 16; ++j2) { - float f21 = (float)l * (float)(Math.PI * 2) / 16.0F; @@ -621,7 +707,7 @@ } tessellator.func_78381_a(); -@@ -1415,9 +1365,7 @@ +@@ -1413,9 +1365,7 @@ } GlStateManager.func_179098_w(); @@ -632,7 +718,7 @@ GlStateManager.func_179094_E(); float f16 = 1.0F - this.field_72769_h.func_72867_j(p_174976_1_); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, f16); -@@ -1426,25 +1374,25 @@ +@@ -1424,25 +1374,25 @@ float f17 = 30.0F; this.field_72770_i.func_110577_a(field_110928_i); bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181707_g); @@ -673,7 +759,7 @@ tessellator.func_78381_a(); GlStateManager.func_179090_x(); float f15 = this.field_72769_h.func_72880_h(p_174976_1_) * f16; -@@ -1475,9 +1423,9 @@ +@@ -1473,9 +1423,9 @@ GlStateManager.func_179121_F(); GlStateManager.func_179090_x(); GlStateManager.func_179124_c(0.0F, 0.0F, 0.0F); @@ -685,7 +771,7 @@ { GlStateManager.func_179094_E(); GlStateManager.func_179109_b(0.0F, 12.0F, 0.0F); -@@ -1498,29 +1446,29 @@ +@@ -1496,29 +1446,29 @@ GlStateManager.func_179121_F(); float f18 = 1.0F; @@ -736,7 +822,7 @@ tessellator.func_78381_a(); } -@@ -1534,7 +1482,7 @@ +@@ -1532,7 +1482,7 @@ } GlStateManager.func_179094_E(); @@ -745,7 +831,7 @@ GlStateManager.func_179148_o(this.field_72781_x); GlStateManager.func_179121_F(); GlStateManager.func_179098_w(); -@@ -1544,6 +1492,7 @@ +@@ -1542,6 +1492,7 @@ public void func_180447_b(float p_180447_1_, int p_180447_2_, double p_180447_3_, double p_180447_5_, double p_180447_7_) { @@ -753,7 +839,7 @@ if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) { if (this.field_72777_q.field_71474_y.func_181147_e() == 2) -@@ -1553,18 +1502,13 @@ +@@ -1551,18 +1502,13 @@ else { GlStateManager.func_179129_p(); @@ -775,7 +861,7 @@ Vec3d vec3d = this.field_72769_h.func_72824_f(p_180447_1_); float f = (float)vec3d.field_72450_a; float f1 = (float)vec3d.field_72448_b; -@@ -1581,37 +1525,25 @@ +@@ -1579,37 +1525,25 @@ } float f9 = 4.8828125E-4F; @@ -827,7 +913,7 @@ } } -@@ -1635,19 +1567,17 @@ +@@ -1633,19 +1567,17 @@ BufferBuilder bufferbuilder = tessellator.func_178180_c(); float f = 12.0F; float f1 = 4.0F; @@ -855,7 +941,7 @@ Vec3d vec3d = this.field_72769_h.func_72824_f(p_180445_1_); float f3 = (float)vec3d.field_72450_a; float f4 = (float)vec3d.field_72448_b; -@@ -1673,18 +1603,18 @@ +@@ -1671,18 +1603,18 @@ float f13 = f4 * 0.8F; float f14 = f5 * 0.8F; float f15 = 0.00390625F; @@ -874,7 +960,7 @@ float f20 = 9.765625E-4F; GlStateManager.func_179152_a(12.0F, 1.0F, 12.0F); -- for (int i1 = 0; i1 < 2; ++i1) +- for (int i1 = 0; i1 < 2; i1++) + for (int k2 = 0; k2 < 2; ++k2) { - if (i1 == 0) @@ -882,14 +968,14 @@ { GlStateManager.func_179135_a(false, false, false, false); } -@@ -1703,169 +1633,73 @@ +@@ -1701,169 +1633,73 @@ } } -- for (int j1 = -3; j1 <= 4; ++j1) +- for (int j1 = -3; j1 <= 4; j1++) + for (int l2 = -3; l2 <= 4; ++l2) { -- for (int k1 = -3; k1 <= 4; ++k1) +- for (int k1 = -3; k1 <= 4; k1++) + for (int i3 = -3; i3 <= 4; ++i3) { bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181712_l); @@ -954,7 +1040,7 @@ - - if (j1 > -1) - { -- for (int l1 = 0; l1 < 8; ++l1) +- for (int l1 = 0; l1 < 8; l1++) - { - bufferbuilder.func_181662_b((double)(f23 + (float)l1 + 0.0F), (double)(f2 + 0.0F), (double)(f24 + 8.0F)) - .func_187315_a((double)((f21 + (float)l1 + 0.5F) * 0.00390625F + f16), (double)((f22 + 8.0F) * 0.00390625F + f17)) @@ -981,7 +1067,7 @@ - - if (j1 <= 1) - { -- for (int i2 = 0; i2 < 8; ++i2) +- for (int i2 = 0; i2 < 8; i2++) - { - bufferbuilder.func_181662_b((double)(f23 + (float)i2 + 1.0F - 9.765625E-4F), (double)(f2 + 0.0F), (double)(f24 + 8.0F)) - .func_187315_a((double)((f21 + (float)i2 + 0.5F) * 0.00390625F + f16), (double)((f22 + 8.0F) * 0.00390625F + f17)) @@ -1008,7 +1094,7 @@ - - if (k1 > -1) - { -- for (int j2 = 0; j2 < 8; ++j2) +- for (int j2 = 0; j2 < 8; j2++) - { - bufferbuilder.func_181662_b((double)(f23 + 0.0F), (double)(f2 + 4.0F), (double)(f24 + (float)j2 + 0.0F)) - .func_187315_a((double)((f21 + 0.0F) * 0.00390625F + f16), (double)((f22 + (float)j2 + 0.5F) * 0.00390625F + f17)) @@ -1035,7 +1121,7 @@ - - if (k1 <= 1) - { -- for (int k2 = 0; k2 < 8; ++k2) +- for (int k2 = 0; k2 < 8; k2++) - { - bufferbuilder.func_181662_b((double)(f23 + 0.0F), (double)(f2 + 4.0F), (double)(f24 + (float)k2 + 1.0F - 9.765625E-4F)) - .func_187315_a((double)((f21 + 0.0F) * 0.00390625F + f16), (double)((f22 + (float)k2 + 0.5F) * 0.00390625F + f17)) @@ -1107,7 +1193,16 @@ } } -@@ -1889,28 +1723,28 @@ +@@ -1879,7 +1715,7 @@ + + public void func_174967_a(long p_174967_1_) + { +- this.field_147595_R = this.field_147595_R | this.field_174995_M.func_178516_a(p_174967_1_); ++ this.field_147595_R |= this.field_174995_M.func_178516_a(p_174967_1_); + + if (!this.field_175009_l.isEmpty()) + { +@@ -1887,28 +1723,28 @@ while (iterator.hasNext()) { @@ -1145,7 +1240,7 @@ { break; } -@@ -1923,30 +1757,25 @@ +@@ -1921,30 +1757,25 @@ Tessellator tessellator = Tessellator.func_178181_a(); BufferBuilder bufferbuilder = tessellator.func_178180_c(); WorldBorder worldborder = this.field_72769_h.func_175723_af(); @@ -1189,7 +1284,7 @@ GlStateManager.func_179136_a(-3.0F, -3.0F); GlStateManager.func_179088_q(); GlStateManager.func_179092_a(516, 0.1F); -@@ -1957,95 +1786,79 @@ +@@ -1955,95 +1786,79 @@ float f5 = 0.0F; float f6 = 128.0F; bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181707_g); @@ -1218,7 +1313,7 @@ - .func_187315_a((double)(f3 + f8 + f7), (double)(f3 + 128.0F)) - .func_181675_d(); - bufferbuilder.func_181662_b(worldborder.func_177728_d(), 0.0, d7).func_187315_a((double)(f3 + f7), (double)(f3 + 128.0F)).func_181675_d(); -- ++d7; +- d7++; + double d11 = Math.min(1.0D, d9 - d10); + float f8 = (float)d11 * 0.5F; + bufferbuilder.func_181662_b(worldborder.func_177728_d(), 256.0D, d10).func_187315_a((double)(f3 + f7), (double)(f3 + 0.0F)).func_181675_d(); @@ -1247,7 +1342,7 @@ - .func_187315_a((double)(f3 + f12 + f9), (double)(f3 + 128.0F)) - .func_181675_d(); - bufferbuilder.func_181662_b(worldborder.func_177726_b(), 0.0, d9).func_187315_a((double)(f3 + f9), (double)(f3 + 128.0F)).func_181675_d(); -- ++d9; +- d9++; + double d15 = Math.min(1.0D, d9 - d12); + float f12 = (float)d15 * 0.5F; + bufferbuilder.func_181662_b(worldborder.func_177726_b(), 256.0D, d12).func_187315_a((double)(f3 + f9), (double)(f3 + 0.0F)).func_181675_d(); @@ -1281,7 +1376,7 @@ - .func_187315_a((double)(f3 + f13 + f10), (double)(f3 + 128.0F)) - .func_181675_d(); - bufferbuilder.func_181662_b(d10, 0.0, worldborder.func_177733_e()).func_187315_a((double)(f3 + f10), (double)(f3 + 128.0F)).func_181675_d(); -- ++d10; +- d10++; + double d16 = Math.min(1.0D, d9 - d13); + float f13 = (float)d16 * 0.5F; + bufferbuilder.func_181662_b(d13, 256.0D, worldborder.func_177733_e()).func_187315_a((double)(f3 + f10), (double)(f3 + 0.0F)).func_181675_d(); @@ -1310,7 +1405,7 @@ - .func_187315_a((double)(f3 + f14 + f11), (double)(f3 + 128.0F)) - .func_181675_d(); - bufferbuilder.func_181662_b(d11, 0.0, worldborder.func_177736_c()).func_187315_a((double)(f3 + f11), (double)(f3 + 128.0F)).func_181675_d(); -- ++d11; +- d11++; + double d17 = Math.min(1.0D, d9 - d14); + float f14 = (float)d17 * 0.5F; + bufferbuilder.func_181662_b(d14, 256.0D, worldborder.func_177736_c()).func_187315_a((double)(f3 + f11), (double)(f3 + 0.0F)).func_181675_d(); @@ -1327,7 +1422,7 @@ GlStateManager.func_179089_o(); GlStateManager.func_179118_c(); GlStateManager.func_179136_a(0.0F, 0.0F); -@@ -2059,12 +1872,11 @@ +@@ -2057,12 +1872,11 @@ private void func_180443_s() { @@ -1343,7 +1438,7 @@ GlStateManager.func_179088_q(); GlStateManager.func_179092_a(516, 0.1F); GlStateManager.func_179141_d(); -@@ -2083,16 +1895,16 @@ +@@ -2081,16 +1895,16 @@ public void func_174981_a(Tessellator p_174981_1_, BufferBuilder p_174981_2_, Entity p_174981_3_, float p_174981_4_) { @@ -1364,7 +1459,7 @@ p_174981_2_.func_78914_f(); Iterator iterator = this.field_72738_E.values().iterator(); -@@ -2100,14 +1912,17 @@ +@@ -2098,14 +1912,17 @@ { DestroyBlockProgress destroyblockprogress = iterator.next(); BlockPos blockpos = destroyblockprogress.func_180246_b(); @@ -1387,7 +1482,7 @@ { iterator.remove(); } -@@ -2117,8 +1932,8 @@ +@@ -2115,8 +1932,8 @@ if (iblockstate.func_185904_a() != Material.field_151579_a) { @@ -1398,7 +1493,7 @@ BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab(); blockrendererdispatcher.func_175020_a(iblockstate, blockpos, textureatlassprite, this.field_72769_h); } -@@ -2127,7 +1942,7 @@ +@@ -2125,7 +1942,7 @@ } p_174981_1_.func_78381_a(); @@ -1407,7 +1502,7 @@ this.func_174969_t(); } } -@@ -2137,12 +1952,7 @@ +@@ -2135,12 +1952,7 @@ if (p_72731_3_ == 0 && p_72731_2_.field_72313_a == RayTraceResult.Type.BLOCK) { GlStateManager.func_179147_l(); @@ -1421,7 +1516,7 @@ GlStateManager.func_187441_d(2.0F); GlStateManager.func_179090_x(); GlStateManager.func_179132_a(false); -@@ -2151,10 +1961,10 @@ +@@ -2149,10 +1961,10 @@ if (iblockstate.func_185904_a() != Material.field_151579_a && this.field_72769_h.func_175723_af().func_177746_a(blockpos)) { @@ -1436,7 +1531,7 @@ } GlStateManager.func_179132_a(true); -@@ -2165,55 +1975,19 @@ +@@ -2163,55 +1975,19 @@ public static void func_189697_a(AxisAlignedBB p_189697_0_, float p_189697_1_, float p_189697_2_, float p_189697_3_, float p_189697_4_) { @@ -1496,7 +1591,7 @@ { p_189698_0_.func_181662_b(p_189698_1_, p_189698_3_, p_189698_5_).func_181666_a(p_189698_13_, p_189698_14_, p_189698_15_, 0.0F).func_181675_d(); p_189698_0_.func_181662_b(p_189698_1_, p_189698_3_, p_189698_5_).func_181666_a(p_189698_13_, p_189698_14_, p_189698_15_, p_189698_16_).func_181675_d(); -@@ -2237,55 +2011,19 @@ +@@ -2235,55 +2011,19 @@ public static void func_189696_b(AxisAlignedBB p_189696_0_, float p_189696_1_, float p_189696_2_, float p_189696_3_, float p_189696_4_) { @@ -1556,7 +1651,7 @@ { p_189693_0_.func_181662_b(p_189693_1_, p_189693_3_, p_189693_5_).func_181666_a(p_189693_13_, p_189693_14_, p_189693_15_, p_189693_16_).func_181675_d(); p_189693_0_.func_181662_b(p_189693_1_, p_189693_3_, p_189693_5_).func_181666_a(p_189693_13_, p_189693_14_, p_189693_15_, p_189693_16_).func_181675_d(); -@@ -2324,28 +2062,24 @@ +@@ -2322,28 +2062,24 @@ this.field_175008_n.func_187474_a(p_184385_1_, p_184385_2_, p_184385_3_, p_184385_4_, p_184385_5_, p_184385_6_, p_184385_7_); } @@ -1589,7 +1684,7 @@ public void func_184377_a(@Nullable SoundEvent p_184377_1_, BlockPos p_184377_2_) { ISound isound = this.field_147593_P.get(p_184377_2_); -@@ -2365,9 +2099,7 @@ +@@ -2363,9 +2099,7 @@ this.field_72777_q.field_71456_v.func_73833_a(itemrecord.func_150927_i()); } @@ -1600,7 +1695,7 @@ this.field_147593_P.put(p_184377_2_, positionedsoundrecord); this.field_72777_q.func_147118_V().func_147682_a(positionedsoundrecord); } -@@ -2377,67 +2109,32 @@ +@@ -2375,67 +2109,32 @@ private void func_193054_a(World p_193054_1_, BlockPos p_193054_2_, boolean p_193054_3_) { @@ -1674,7 +1769,7 @@ if (p_190570_16_ != null) { -@@ -2455,78 +2152,40 @@ +@@ -2453,78 +2152,40 @@ } } @@ -1764,7 +1859,7 @@ } } else -@@ -2537,27 +2196,25 @@ +@@ -2535,27 +2196,25 @@ private int func_190572_a(boolean p_190572_1_) { @@ -1805,7 +1900,7 @@ public void func_72709_b(Entity p_72709_1_) { } -@@ -2566,7 +2223,6 @@ +@@ -2564,7 +2223,6 @@ { } @@ -1813,7 +1908,7 @@ public void func_180440_a(int p_180440_1_, BlockPos p_180440_2_, int p_180440_3_) { switch (p_180440_1_) -@@ -2578,38 +2234,39 @@ +@@ -2576,38 +2234,39 @@ if (entity != null) { @@ -1868,7 +1963,7 @@ public void func_180439_a(EntityPlayer p_180439_1_, int p_180439_2_, BlockPos p_180439_3_, int p_180439_4_) { Random random = this.field_72769_h.field_73012_v; -@@ -2632,34 +2289,19 @@ +@@ -2630,34 +2289,19 @@ this.field_72769_h.func_184156_a(p_180439_3_, SoundEvents.field_187634_bp, SoundCategory.NEUTRAL, 1.0F, 1.2F, false); break; case 1005: @@ -1908,7 +2003,7 @@ break; case 1010: -@@ -2669,128 +2311,69 @@ +@@ -2667,128 +2311,69 @@ } else { @@ -2058,7 +2153,7 @@ break; case 1033: this.field_72769_h.func_184156_a(p_180439_3_, SoundEvents.field_187542_ac, SoundCategory.BLOCKS, 1.0F, 1.0F, false); -@@ -2802,169 +2385,119 @@ +@@ -2800,169 +2385,119 @@ this.field_72769_h.func_184156_a(p_180439_3_, SoundEvents.field_187621_J, SoundCategory.BLOCKS, 1.0F, 1.0F, false); break; case 1036: @@ -2087,7 +2182,7 @@ + double d13 = (double)p_180439_3_.func_177956_o() + 0.5D; + double d15 = (double)p_180439_3_.func_177952_p() + (double)k1 * 0.6D + 0.5D; -- for (int j1 = 0; j1 < 10; ++j1) +- for (int j1 = 0; j1 < 10; j1++) + for (int l2 = 0; l2 < 10; ++l2) { - double d13 = random.nextDouble() * 0.2 + 0.01; @@ -2141,7 +2236,7 @@ + double d10 = (double)p_180439_3_.func_177956_o(); + double d12 = (double)p_180439_3_.func_177952_p(); -- for (int i1 = 0; i1 < 8; ++i1) +- for (int i1 = 0; i1 < 8; i1++) + for (int k2 = 0; k2 < 8; ++k2) { - this.func_174972_a( @@ -2165,7 +2260,7 @@ + float f1 = (float)(p_180439_4_ >> 0 & 255) / 255.0F; EnumParticleTypes enumparticletypes = p_180439_2_ == 2007 ? EnumParticleTypes.SPELL_INSTANT : EnumParticleTypes.SPELL; -- for (int l1 = 0; l1 < 100; ++l1) +- for (int l1 = 0; l1 < 100; l1++) + for (int j3 = 0; j3 < 100; ++j3) { - double d15 = random.nextDouble() * 4.0; @@ -2203,7 +2298,7 @@ - double d1 = (double)p_180439_3_.func_177956_o(); - double d2 = (double)p_180439_3_.func_177952_p() + 0.5; - -- for (int j = 0; j < 8; ++j) +- for (int j = 0; j < 8; j++) - { - this.func_174972_a( - EnumParticleTypes.ITEM_CRACK, @@ -2246,7 +2341,7 @@ + return; case 2004: -- for (int k1 = 0; k1 < 20; ++k1) +- for (int k1 = 0; k1 < 20; k1++) + for (int i3 = 0; i3 < 20; ++i3) { - double d14 = (double)p_180439_3_.func_177958_n() + 0.5 + ((double)this.field_72769_h.field_73012_v.nextFloat() - 0.5) * 2.0; @@ -2268,7 +2363,7 @@ break; case 2006: -- for (int k = 0; k < 200; ++k) +- for (int k = 0; k < 200; k++) + for (int i2 = 0; i2 < 200; ++i2) { float f2 = random.nextFloat() * 4.0F; @@ -2294,7 +2389,7 @@ if (particle != null) { -@@ -2972,56 +2505,27 @@ +@@ -2970,56 +2505,27 @@ } } @@ -2358,7 +2453,7 @@ } destroyblockprogress.func_73107_a(p_180441_3_); -@@ -3029,7 +2533,7 @@ +@@ -3027,7 +2533,7 @@ } else { diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch index fc49db110..397c9b3b3 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderItem.java.patch @@ -50,6 +50,15 @@ } else { +@@ -200,7 +206,7 @@ + boolean flag = p_191970_3_ == -1 && !p_191970_4_.func_190926_b(); + int i = 0; + +- for (int j = p_191970_2_.size(); i < j; i++) ++ for (int j = p_191970_2_.size(); i < j; ++i) + { + BakedQuad bakedquad = p_191970_2_.get(i); + int k = p_191970_3_; @@ -214,10 +220,10 @@ k = TextureUtil.func_177054_c(k); } diff --git a/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch b/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch index dfa6eaf2d..a62807dcd 100644 --- a/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/WorldVertexBufferUploader.java.patch @@ -7,7 +7,14 @@ import java.nio.ByteBuffer; import java.util.List; import net.minecraft.client.renderer.vertex.VertexFormat; -@@ -26,28 +25,10 @@ +@@ -20,62 +19,29 @@ + ByteBuffer bytebuffer = p_181679_1_.func_178966_f(); + List list = vertexformat.func_177343_g(); + +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) + { + VertexFormatElement vertexformatelement = list.get(j); VertexFormatElement.EnumUsage vertexformatelement$enumusage = vertexformatelement.func_177375_c(); int k = vertexformatelement.func_177367_b().func_177397_c(); int l = vertexformatelement.func_177369_e(); @@ -39,7 +46,12 @@ } GlStateManager.func_187439_f(p_181679_1_.func_178979_i(), 0, p_181679_1_.func_178989_h()); -@@ -59,23 +40,8 @@ + int i1 = 0; + +- for (int j1 = list.size(); i1 < j1; i1++) ++ for (int j1 = list.size(); i1 < j1; ++i1) + { + VertexFormatElement vertexformatelement1 = list.get(i1); VertexFormatElement.EnumUsage vertexformatelement$enumusage1 = vertexformatelement1.func_177375_c(); int k1 = vertexformatelement1.func_177369_e(); diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java.patch index 9c455f19e..db3cca075 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java +++ after/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java -@@ -12,12 +12,7 @@ +@@ -12,27 +12,25 @@ public BakedQuadRetextured(BakedQuad p_i46217_1_, TextureAtlasSprite p_i46217_2_) { @@ -14,9 +14,11 @@ this.field_178218_d = p_i46217_2_; this.func_178217_e(); } -@@ -26,13 +21,16 @@ + + private void func_178217_e() { - for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { - int j = 7 * i; - this.field_178215_a[j + 4] = Float.floatToRawIntBits( diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java.patch index 75116321a..58fd65cbb 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java.patch @@ -107,7 +107,8 @@ { int[] aint = new int[28]; - for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { - this.func_188015_a(aint, i, p_188012_3_, p_188012_1_, p_188012_4_, p_188012_2_, p_188012_5_, p_188012_6_, p_188012_7_); + this.fillVertexData(aint, i, orientation, uvs, p_188012_4_, sprite, rotationIn, partRotation, shade); @@ -220,6 +221,19 @@ } } +@@ -245,9 +226,9 @@ + { + Vector4f vector4f = new Vector4f(p_178406_1_.x - p_178406_2_.x, p_178406_1_.y - p_178406_2_.y, p_178406_1_.z - p_178406_2_.z, 1.0F); + Matrix4f.transform(p_178406_3_, vector4f, vector4f); +- vector4f.x = vector4f.x * p_178406_4_.x; +- vector4f.y = vector4f.y * p_178406_4_.y; +- vector4f.z = vector4f.z * p_178406_4_.z; ++ vector4f.x *= p_178406_4_.x; ++ vector4f.y *= p_178406_4_.y; ++ vector4f.z *= p_178406_4_.z; + p_178406_1_.set(vector4f.x + p_178406_2_.x, vector4f.y + p_178406_2_.y, vector4f.z + p_178406_2_.z); + } + @@ -289,7 +270,14 @@ } } @@ -236,3 +250,30 @@ } private void func_178408_a(int[] p_178408_1_, EnumFacing p_178408_2_) +@@ -304,7 +292,7 @@ + afloat[EnumFaceDirection.Constants.field_179179_b] = -999.0F; + afloat[EnumFaceDirection.Constants.field_179181_a] = -999.0F; + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + int j = 7 * i; + float f = Float.intBitsToFloat(aint[j]); +@@ -344,7 +332,7 @@ + + EnumFaceDirection enumfacedirection = EnumFaceDirection.func_179027_a(p_178408_2_); + +- for (int i1 = 0; i1 < 4; i1++) ++ for (int i1 = 0; i1 < 4; ++i1) + { + int j1 = 7 * i1; + EnumFaceDirection.VertexInformation enumfacedirection$vertexinformation = enumfacedirection.func_179025_a(i1); +@@ -355,7 +343,7 @@ + p_178408_1_[j1 + 1] = Float.floatToRawIntBits(f3); + p_178408_1_[j1 + 2] = Float.floatToRawIntBits(f4); + +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) + { + int l = 7 * k; + float f5 = Float.intBitsToFloat(aint[l]); diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ItemOverrideList.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ItemOverrideList.java.patch index 0ac06697d..18a68f3df 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ItemOverrideList.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ItemOverrideList.java.patch @@ -9,7 +9,15 @@ private ItemOverrideList() { -@@ -29,6 +29,7 @@ +@@ -22,13 +22,14 @@ + + public ItemOverrideList(List p_i46570_1_) + { +- for (int i = p_i46570_1_.size() - 1; i >= 0; i--) ++ for (int i = p_i46570_1_.size() - 1; i >= 0; --i) + { + this.field_188023_b.add(p_i46570_1_.get(i)); + } } @Nullable diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransformVec3f.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransformVec3f.java.patch index f92ac0394..00a878e38 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransformVec3f.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ItemTransformVec3f.java.patch @@ -46,3 +46,12 @@ } @SideOnly(Side.CLIENT) +@@ -97,7 +99,7 @@ + { + float[] afloat = new float[3]; + +- for (int i = 0; i < afloat.length; i++) ++ for (int i = 0; i < afloat.length; ++i) + { + afloat[i] = JsonUtils.func_151220_d(jsonarray.get(i), p_178358_2_ + "[" + i + "]"); + } diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch index 5261443cc..af07df896 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch @@ -620,7 +620,7 @@ - if (ibakedmodel != null) - { -- ++i; +- i++; - weightedbakedmodel$builder.func_177677_a(ibakedmodel, variant.func_188047_d()); + if (ibakedmodel != null) + { @@ -840,7 +840,23 @@ for (ResourceLocation resourcelocation : this.field_177615_s.values()) { -@@ -1189,5 +941,24 @@ +@@ -1124,7 +876,14 @@ + + protected boolean func_177581_b(@Nullable ModelBlock p_177581_1_) + { +- return p_177581_1_ == null ? false : p_177581_1_.func_178310_f() == field_177606_o; ++ if (p_177581_1_ == null) ++ { ++ return false; ++ } ++ else ++ { ++ return p_177581_1_.func_178310_f() == field_177606_o; ++ } + } + + protected boolean func_177587_c(@Nullable ModelBlock p_177587_1_) +@@ -1182,5 +941,24 @@ field_177600_d.put("missing", field_188641_d); field_177606_o.field_178317_b = "generation marker"; field_177616_r.field_178317_b = "block entity marker"; diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelRotation.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelRotation.java.patch index 4f61195ed..451a6c035 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/ModelRotation.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/ModelRotation.java.patch @@ -32,6 +32,32 @@ this.field_177542_u = MathHelper.func_76130_a(p_i46087_4_ / 90); Matrix4f.mul(matrix4f1, matrix4f, this.field_177544_s); } +@@ -64,14 +64,14 @@ + { + EnumFacing enumfacing = p_177523_1_; + +- for (int i = 0; i < this.field_177543_t; i++) ++ for (int i = 0; i < this.field_177543_t; ++i) + { + enumfacing = enumfacing.func_176732_a(EnumFacing.Axis.X); + } + + if (enumfacing.func_176740_k() != EnumFacing.Axis.Y) + { +- for (int j = 0; j < this.field_177542_u; j++) ++ for (int j = 0; j < this.field_177542_u; ++j) + { + enumfacing = enumfacing.func_176732_a(EnumFacing.Axis.Y); + } +@@ -91,7 +91,7 @@ + + EnumFacing enumfacing = p_177520_1_; + +- for (int j = 0; j < this.field_177543_t; j++) ++ for (int j = 0; j < this.field_177543_t; ++j) + { + enumfacing = enumfacing.func_176732_a(EnumFacing.Axis.X); + } @@ -106,14 +106,19 @@ public static ModelRotation func_177524_a(int p_177524_0_, int p_177524_1_) diff --git a/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch index 2997670e9..05cc53b42 100644 --- a/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java +++ after/net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java -@@ -31,22 +31,28 @@ +@@ -31,26 +31,32 @@ public class ChunkRenderDispatcher { private static final Logger field_178523_a = LogManager.getLogger(); @@ -36,15 +36,23 @@ if (j > 1) { -@@ -60,7 +66,7 @@ +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + ChunkRenderWorker chunkrenderworker = new ChunkRenderWorker(this); + Thread thread = field_178521_b.newThread(chunkrenderworker); +@@ -60,9 +66,9 @@ } } - this.field_178520_e = Queues.newArrayBlockingQueue(this.field_188249_c); + this.field_178520_e = Queues.newArrayBlockingQueue(this.field_188249_c); - for (int l = 0; l < this.field_188249_c; ++l) +- for (int l = 0; l < this.field_188249_c; l++) ++ for (int l = 0; l < this.field_188249_c; ++l) { + this.field_178520_e.add(new RegionRenderCacheBuilder()); + } @@ -72,19 +78,16 @@ public String func_178504_a() diff --git a/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderWorker.java.patch b/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderWorker.java.patch index c73653720..66d89c008 100644 --- a/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderWorker.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/chunk/ChunkRenderWorker.java.patch @@ -129,7 +129,7 @@ { ChunkRenderWorker.this.func_178473_b(p_178474_1_); p_178474_1_.func_178540_f().lock(); -- label41: +- label43: + label49: { try @@ -137,7 +137,7 @@ if (p_178474_1_.func_178546_a() == ChunkCompileTaskGenerator.Status.UPLOADING) { p_178474_1_.func_178535_a(ChunkCompileTaskGenerator.Status.DONE); -- break label41; +- break label43; + break label49; } diff --git a/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch b/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch index e31e1f50b..14fdb7d3b 100644 --- a/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java.patch @@ -9,6 +9,24 @@ private final int field_178596_j; private final FloatBuffer field_178597_k = GLAllocation.func_74529_h(16); private final VertexBuffer[] field_178594_l = new VertexBuffer[BlockRenderLayer.values().length]; +@@ -56,7 +56,7 @@ + + public RenderChunk(World p_i47120_1_, RenderGlobal p_i47120_2_, int p_i47120_3_) + { +- for (int i = 0; i < this.field_181702_p.length; i++) ++ for (int i = 0; i < this.field_181702_p.length; ++i) + { + this.field_181702_p[i] = new BlockPos.MutableBlockPos(); + } +@@ -67,7 +67,7 @@ + + if (OpenGlHelper.func_176075_f()) + { +- for (int j = 0; j < BlockRenderLayer.values().length; j++) ++ for (int j = 0; j < BlockRenderLayer.values().length; ++j) + { + this.field_178594_l[j] = new VertexBuffer(DefaultVertexFormats.field_176600_a); + } @@ -94,15 +94,11 @@ public void func_189562_a(int p_189562_1_, int p_189562_2_, int p_189562_3_) @@ -43,6 +61,15 @@ } } +@@ -159,7 +148,7 @@ + + if (!this.field_189564_r.func_72806_N()) + { +- field_178592_a++; ++ ++field_178592_a; + boolean[] aboolean = new boolean[BlockRenderLayer.values().length]; + BlockRendererDispatcher blockrendererdispatcher = Minecraft.func_71410_x().func_175602_ab(); + @@ -173,27 +162,29 @@ lvt_9_1_.func_178606_a(blockpos$mutableblockpos); } @@ -160,6 +187,15 @@ { if (p_178584_1_ == BlockRenderLayer.TRANSLUCENT && !p_178584_6_.func_178491_b(p_178584_1_)) { +@@ -400,7 +392,7 @@ + this.func_178585_h(); + this.field_178588_d = null; + +- for (int i = 0; i < BlockRenderLayer.values().length; i++) ++ for (int i = 0; i < BlockRenderLayer.values().length; ++i) + { + if (this.field_178594_l[i] != null) + { @@ -440,6 +432,26 @@ { return this.field_178593_n && this.field_188284_q; diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch index 9584d44e2..872e68810 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch @@ -52,6 +52,15 @@ GlStateManager.func_179109_b(f3, f4, f5); } +@@ -124,7 +120,7 @@ + GlStateManager.func_187431_e(this.func_188298_c(p_76986_1_)); + } + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + if (flag1) + { @@ -135,11 +131,11 @@ float f7 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; float f9 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderFish.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderFish.java.patch index f208610f9..ee7f9424d 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderFish.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderFish.java.patch @@ -95,8 +95,12 @@ double d9 = p_76986_1_.field_70166_s + (p_76986_1_.field_70161_v - p_76986_1_.field_70166_s) * (double)p_76986_9_; double d10 = (double)((float)(d4 - d13)); double d11 = (double)((float)(d5 - d8)) + d7; -@@ -138,11 +128,7 @@ - for (int i1 = 0; i1 <= 16; ++i1) +@@ -135,14 +125,10 @@ + bufferbuilder.func_181668_a(3, DefaultVertexFormats.field_181706_f); + int l = 16; + +- for (int i1 = 0; i1 <= 16; i1++) ++ for (int i1 = 0; i1 <= 16; ++i1) { float f11 = (float)i1 / 16.0F; - bufferbuilder.func_181662_b( diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch index 9a492218d..a9298b26e 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java.patch @@ -162,3 +162,12 @@ } protected boolean func_177070_b(T p_177070_1_) +@@ -510,7 +514,7 @@ + { + int[] aint = field_177096_e.func_110565_c(); + +- for (int i = 0; i < 256; i++) ++ for (int i = 0; i < 256; ++i) + { + aint[i] = -1; + } diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch index 861d4171d..6b48fb8c2 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch @@ -51,6 +51,15 @@ } public void func_178628_a(double p_178628_1_, double p_178628_3_, double p_178628_5_) +@@ -245,7 +251,7 @@ + this.field_78729_o.put(p_78715_1_, render); + } + +- return (Render)render; ++ return render; + } + + @Nullable @@ -259,7 +265,7 @@ } else diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch index 5cfa936f5..9276d3d99 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java.patch @@ -102,6 +102,15 @@ } } } +@@ -116,7 +91,7 @@ + + public T func_188360_a(EntityEquipmentSlot p_188360_1_) + { +- return this.func_188363_b(p_188360_1_) ? this.field_177189_c : this.field_177186_d; ++ return (T)(this.func_188363_b(p_188360_1_) ? this.field_177189_c : this.field_177186_d); + } + + private boolean func_188363_b(EntityEquipmentSlot p_188363_1_) @@ -124,18 +99,7 @@ return p_188363_1_ == EntityEquipmentSlot.LEGS; } @@ -122,6 +131,15 @@ { float f = (float)p_188364_1_.field_70173_aa + p_188364_5_; p_188364_0_.func_110776_a(field_177188_b); +@@ -146,7 +110,7 @@ + float f1 = 0.5F; + GlStateManager.func_179131_c(0.5F, 0.5F, 0.5F, 1.0F); + +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { + GlStateManager.func_179140_f(); + GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_COLOR, GlStateManager.DestFactor.ONE); @@ -173,19 +137,16 @@ Minecraft.func_71410_x().field_71460_t.func_191514_d(false); } diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArrow.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArrow.java.patch index 574a321ed..66a21d026 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArrow.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerArrow.java.patch @@ -19,6 +19,15 @@ { int i = p_177141_1_.func_85035_bI(); +@@ -43,7 +33,7 @@ + Random random = new Random((long)p_177141_1_.func_145782_y()); + RenderHelper.func_74518_a(); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + GlStateManager.func_179094_E(); + ModelRenderer modelrenderer = this.field_177168_a.func_177087_b().func_85181_a(random); @@ -59,18 +49,18 @@ f = f * 2.0F - 1.0F; f1 = f1 * 2.0F - 1.0F; diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java.patch index ae2faf5ff..4bd944e33 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java +++ after/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java -@@ -14,7 +14,6 @@ +@@ -14,13 +14,13 @@ super(p_i46116_1_); } @@ -8,7 +8,14 @@ protected void func_177177_a() { this.field_177189_c = new ModelBiped(0.5F); -@@ -51,5 +50,11 @@ + this.field_177186_d = new ModelBiped(1.0F); + } + ++ @SuppressWarnings("incomplete-switch") + protected void func_188359_a(ModelBiped p_188359_1_, EntityEquipmentSlot p_188359_2_) + { + this.func_177194_a(p_188359_1_); +@@ -50,5 +50,11 @@ protected void func_177194_a(ModelBiped p_177194_1_) { p_177194_1_.func_178719_a(false); diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/LayeredColorMaskTexture.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/LayeredColorMaskTexture.java.patch index 58abc8008..dc0787807 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/LayeredColorMaskTexture.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/LayeredColorMaskTexture.java.patch @@ -41,7 +41,7 @@ } IResource iresource1 = null; -@@ -66,16 +67,12 @@ +@@ -66,26 +67,22 @@ try { String s = this.field_174949_h.get(j); @@ -59,9 +59,11 @@ + BufferedImage bufferedimage2 = net.minecraftforge.client.MinecraftForgeClient.getImageLayer(new ResourceLocation(s), p_110551_1_); + if (bufferedimage2.getWidth() == bufferedimage.getWidth() && bufferedimage2.getHeight() == bufferedimage.getHeight() && bufferedimage2.getType() == 6) { - for (int l = 0; l < bufferedimage2.getHeight(); ++l) +- for (int l = 0; l < bufferedimage2.getHeight(); l++) ++ for (int l = 0; l < bufferedimage2.getHeight(); ++l) { -@@ -83,9 +80,9 @@ +- for (int i1 = 0; i1 < bufferedimage2.getWidth(); i1++) ++ for (int i1 = 0; i1 < bufferedimage2.getWidth(); ++i1) { int j1 = bufferedimage2.getRGB(i1, l); @@ -73,7 +75,7 @@ int l1 = bufferedimage1.getRGB(i1, l); int i2 = MathHelper.func_180188_d(l1, k) & 16777215; bufferedimage2.setRGB(i1, l, k1 | i2); -@@ -93,13 +90,13 @@ +@@ -93,16 +90,16 @@ } } @@ -88,7 +90,11 @@ + IOUtils.closeQuietly((Closeable)iresource1); } - ++j; +- j++; ++ ++j; + } + } + catch (IOException ioexception) @@ -111,7 +108,7 @@ } finally diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch index d10ac69fb..8d4b2be31 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch @@ -68,9 +68,12 @@ list1.add(textureatlassprite); } -@@ -111,7 +110,7 @@ +@@ -109,9 +108,9 @@ + TextureAtlasSprite textureatlassprite = p_94310_1_.func_98150_a(); + boolean flag = textureatlassprite.func_94211_a() != textureatlassprite.func_94216_b(); - for (int i = 0; i < this.field_94317_b.size(); ++i) +- for (int i = 0; i < this.field_94317_b.size(); i++) ++ for (int i = 0; i < this.field_94317_b.size(); ++i) { - if (this.field_94317_b.get(i).func_94182_a(p_94310_1_)) + if (((Stitcher.Slot)this.field_94317_b.get(i)).func_94182_a(p_94310_1_)) @@ -95,6 +98,21 @@ } else { +@@ -177,12 +176,12 @@ + } + + stitcher$slot = new Stitcher.Slot(this.field_94318_c, 0, p_94311_1_.func_94197_a(), this.field_94315_d); +- this.field_94318_c = this.field_94318_c + p_94311_1_.func_94197_a(); ++ this.field_94318_c += p_94311_1_.func_94197_a(); + } + else + { + stitcher$slot = new Stitcher.Slot(0, this.field_94315_d, this.field_94318_c, p_94311_1_.func_94199_b()); +- this.field_94315_d = this.field_94315_d + p_94311_1_.func_94199_b(); ++ this.field_94315_d += p_94311_1_.func_94199_b(); + } + + stitcher$slot.func_94182_a(p_94311_1_); @@ -245,10 +244,9 @@ } } diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch index 79a27538e..13f319210 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch @@ -34,6 +34,15 @@ } public void func_94217_a(TextureAtlasSprite p_94217_1_) +@@ -141,7 +140,7 @@ + + public void func_94219_l() + { +- this.field_110983_h++; ++ ++this.field_110983_h; + + if (this.field_110983_h >= this.field_110982_k.func_110472_a(this.field_110973_g)) + { @@ -153,9 +152,7 @@ if (i != k && k >= 0 && k < this.field_110976_a.size()) @@ -45,7 +54,7 @@ } } else if (this.field_110982_k.func_177219_e()) -@@ -166,15 +163,15 @@ +@@ -166,7 +163,7 @@ private void func_180599_n() { @@ -54,17 +63,21 @@ int i = this.field_110982_k.func_110468_c(this.field_110973_g); int j = this.field_110982_k.func_110473_c() == 0 ? this.field_110976_a.size() : this.field_110982_k.func_110473_c(); int k = this.field_110982_k.func_110468_c((this.field_110973_g + 1) % j); +@@ -181,7 +178,7 @@ + this.field_176605_b = new int[aint.length][]; + } - if (i != k && k >= 0 && k < this.field_110976_a.size()) - { -- int[][] aint = (int[][])this.field_110976_a.get(i); -- int[][] aint1 = (int[][])this.field_110976_a.get(k); -+ int[][] aint = this.field_110976_a.get(i); -+ int[][] aint1 = this.field_110976_a.get(k); - - if (this.field_176605_b == null || this.field_176605_b.length != aint.length) +- for (int l = 0; l < aint.length; l++) ++ for (int l = 0; l < aint.length; ++l) { -@@ -194,10 +191,10 @@ + if (this.field_176605_b[l] == null) + { +@@ -190,14 +187,14 @@ + + if (l < aint1.length && aint1[l].length == aint[l].length) + { +- for (int i1 = 0; i1 < aint[l].length; i1++) ++ for (int i1 = 0; i1 < aint[l].length; ++i1) { int j1 = aint[l][i1]; int k1 = aint1[l][i1]; @@ -111,16 +124,17 @@ if (j >= i) { throw new RuntimeException("invalid frameindex " + j); -@@ -280,7 +281,7 @@ +@@ -280,26 +281,24 @@ } else { - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int k = 0; k < i; ++k) +- for (int k = 0; k < i; k++) ++ for (int k = 0; k < i; ++k) { -@@ -288,20 +289,18 @@ + this.field_110976_a.add(func_147962_a(aint, this.field_130223_c, this.field_130223_c, k)); list.add(new AnimationFrame(k, -1)); } @@ -137,13 +151,11 @@ - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < this.field_110976_a.size(); ++i) +- for (int i = 0; i < this.field_110976_a.size(); i++) ++ for (int i = 0; i < this.field_110976_a.size(); ++i) { -- final int[][] aint = (int[][])this.field_110976_a.get(i); -+ final int[][] aint = this.field_110976_a.get(i); + final int[][] aint = this.field_110976_a.get(i); - if (aint != null) - { @@ -313,7 +312,7 @@ { CrashReport crashreport = CrashReport.func_85055_a(throwable, "Generating mipmaps for frame"); @@ -153,6 +165,24 @@ crashreportcategory.func_189529_a("Frame sizes", new ICrashReportDetail() { public String call() throws Exception +@@ -345,7 +344,7 @@ + { + if (this.field_110976_a.size() <= p_130099_1_) + { +- for (int i = this.field_110976_a.size(); i <= p_130099_1_; i++) ++ for (int i = this.field_110976_a.size(); i <= p_130099_1_; ++i) + { + this.field_110976_a.add(null); + } +@@ -356,7 +355,7 @@ + { + int[][] aint = new int[p_147962_0_.length][]; + +- for (int i = 0; i < p_147962_0_.length; i++) ++ for (int i = 0; i < p_147962_0_.length; ++i) + { + int[] aint1 = p_147962_0_[i]; + @@ -393,32 +392,43 @@ this.field_110983_h = 0; } diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 60e739b3b..2c9e643e4 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -259,7 +259,7 @@ { ResourceLocation resourcelocation = this.func_184396_a(p_184397_2_); IResource iresource = null; -- label52: +- label45: + label62: { - boolean lvt_6_1_; @@ -270,7 +270,7 @@ { iresource = p_184397_1_.func_110536_a(resourcelocation); p_184397_2_.func_188539_a(iresource, this.field_147636_j + 1); -- break label52; +- break label45; + break label62; } catch (RuntimeException runtimeexception) diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch index f75e8b149..901fd998e 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch @@ -24,12 +24,21 @@ { boolean flag = false; -- for (int i = 0; i < p_147949_2_.length; ++i) +- for (int i = 0; i < p_147949_2_.length; i++) + for (int i = 0; i < p_147949_2_[0].length; ++i) { if (p_147949_2_[0][i] >> 24 == 0) { -@@ -83,6 +83,7 @@ +@@ -72,7 +72,7 @@ + } + } + +- for (int l1 = 1; l1 <= p_147949_0_; l1++) ++ for (int l1 = 1; l1 <= p_147949_0_; ++l1) + { + if (p_147949_2_[l1] != null) + { +@@ -83,17 +83,19 @@ int[] aint1 = aint[l1 - 1]; int[] aint2 = new int[aint1.length >> 2]; int j = p_147949_1_ >> l1; @@ -37,7 +46,13 @@ int k = aint2.length / j; int l = j << 1; -@@ -94,6 +95,7 @@ +- for (int i1 = 0; i1 < j; i1++) ++ for (int i1 = 0; i1 < j; ++i1) + { +- for (int j1 = 0; j1 < k; j1++) ++ for (int j1 = 0; j1 < k; ++j1) + { + int k1 = 2 * (i1 + j1 * l); aint2[i1 + j1 * j] = func_147943_a(aint1[k1 + 0], aint1[k1 + 1], aint1[k1 + 0 + l], aint1[k1 + 1 + l], flag); } } @@ -45,6 +60,15 @@ aint[l1] = aint2; } +@@ -116,7 +118,7 @@ + float f2 = 0.0F; + float f3 = 0.0F; + +- for (int i1 = 0; i1 < 4; i1++) ++ for (int i1 = 0; i1 < 4; ++i1) + { + if (field_147957_g[i1] >> 24 != 0) + { @@ -127,14 +129,14 @@ } } @@ -68,7 +92,7 @@ if (i2 < 96) { -@@ -159,32 +161,21 @@ +@@ -159,46 +161,34 @@ float f1 = func_188543_d(p_147944_1_ >> p_147944_4_); float f2 = func_188543_d(p_147944_2_ >> p_147944_4_); float f3 = func_188543_d(p_147944_3_ >> p_147944_4_); @@ -83,7 +107,8 @@ - ) + public static void func_147955_a(int[][] p_147955_0_, int p_147955_1_, int p_147955_2_, int p_147955_3_, int p_147955_4_, boolean p_147955_5_, boolean p_147955_6_) { - for (int i = 0; i < p_147955_0_.length; ++i) +- for (int i = 0; i < p_147955_0_.length; i++) ++ for (int i = 0; i < p_147955_0_.length; ++i) { int[] aint = p_147955_0_[i]; + if ((p_147955_1_ >> i <= 0) || (p_147955_2_ >> i <= 0)) break; @@ -106,7 +131,24 @@ { int i = 4194304 / p_147947_2_; func_147954_b(p_147947_6_, p_147947_8_); -@@ -214,9 +205,11 @@ + func_110997_a(p_147947_7_); +- int j = 0; ++ int l; + +- while (j < p_147947_2_ * p_147947_3_) ++ for (int j = 0; j < p_147947_2_ * p_147947_3_; j += p_147947_2_ * l) + { + int k = j / p_147947_2_; +- int l = Math.min(i, p_147947_3_ - k); ++ l = Math.min(i, p_147947_3_ - k); + int i1 = p_147947_2_ * l; + func_110994_a(p_147947_1_, j, i1); + GlStateManager.func_187414_b(3553, p_147947_0_, p_147947_4_, p_147947_5_ + k, p_147947_2_, l, 32993, 33639, field_111000_c); +- j += p_147947_2_ * l; + } + } + +@@ -215,9 +205,11 @@ public static void func_180600_a(int p_180600_0_, int p_180600_1_, int p_180600_2_, int p_180600_3_) { @@ -119,16 +161,19 @@ if (p_180600_1_ >= 0) { GlStateManager.func_187421_b(3553, 33085, p_180600_1_); -@@ -227,7 +220,7 @@ +@@ -226,9 +218,9 @@ + GlStateManager.func_187403_b(3553, 34049, 0.0F); + } - for (int i = 0; i <= p_180600_1_; ++i) +- for (int i = 0; i <= p_180600_1_; i++) ++ for (int i = 0; i <= p_180600_1_; ++i) { - GlStateManager.func_187419_a(3553, i, 6408, p_180600_2_ >> i, p_180600_3_ >> i, 0, 32993, 33639, null); + GlStateManager.func_187419_a(3553, i, 6408, p_180600_2_ >> i, p_180600_3_ >> i, 0, 32993, 33639, (IntBuffer)null); } } -@@ -305,9 +298,9 @@ +@@ -306,9 +298,9 @@ aint = func_110985_a(p_110994_0_); } @@ -140,7 +185,7 @@ } static void func_94277_a(int p_94277_0_) -@@ -332,7 +325,7 @@ +@@ -333,7 +325,7 @@ } finally { @@ -149,7 +194,16 @@ } return aint1; -@@ -368,10 +361,10 @@ +@@ -359,7 +351,7 @@ + { + int[] aint = new int[p_110985_0_.length]; + +- for (int i = 0; i < p_110985_0_.length; i++) ++ for (int i = 0; i < p_110985_0_.length; ++i) + { + aint[i] = func_177054_c(p_110985_0_[i]); + } +@@ -369,10 +361,10 @@ public static int func_177054_c(int p_177054_0_) { @@ -164,9 +218,30 @@ int i1 = (j * 30 + k * 59 + l * 11) / 100; int j1 = (j * 30 + k * 70) / 100; int k1 = (j * 30 + l * 70) / 100; -@@ -410,7 +403,7 @@ +@@ -384,7 +376,7 @@ + int[] aint = new int[p_147953_1_]; + int i = p_147953_2_ / 2; - for (int i1 = 0; i1 < field_188544_e.length; ++i1) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + System.arraycopy(p_147953_0_, j * p_147953_1_, aint, 0, p_147953_1_); + System.arraycopy(p_147953_0_, (p_147953_2_ - 1 - j) * p_147953_1_, p_147953_0_, j * p_147953_1_, p_147953_1_); +@@ -400,7 +392,7 @@ + int[] aint1 = new int[] { -16777216, -16777216, -16777216, -16777216, -16777216, -16777216, -16777216, -16777216}; + int k = aint.length; + +- for (int l = 0; l < 16; l++) ++ for (int l = 0; l < 16; ++l) + { + System.arraycopy(l < k ? aint : aint1, 0, field_110999_b, 16 * l, k); + System.arraycopy(l < k ? aint1 : aint, 0, field_110999_b, 16 * l + k, k); +@@ -409,9 +401,9 @@ + field_111001_a.func_110564_a(); + field_188544_e = new float[256]; + +- for (int i1 = 0; i1 < field_188544_e.length; i1++) ++ for (int i1 = 0; i1 < field_188544_e.length; ++i1) { - field_188544_e[i1] = (float)Math.pow((double)((float)i1 / 255.0F), 2.2); + field_188544_e[i1] = (float)Math.pow((double)((float)i1 / 255.0F), 2.2D); diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch index 151c0ffc0..551f45cab 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java.patch @@ -22,14 +22,14 @@ this.field_147559_m.put(p_147546_1_, tileentityspecialrenderer); } -- return (TileEntitySpecialRenderer) tileentityspecialrenderer; +- return (TileEntitySpecialRenderer)tileentityspecialrenderer; + return tileentityspecialrenderer; } @Nullable public TileEntitySpecialRenderer func_147547_b(@Nullable TileEntity p_147547_1_) { -- return p_147547_1_ == null ? null : this.func_147546_a(p_147547_1_.getClass()); +- return p_147547_1_ == null ? null : this.func_147546_a((Class )p_147547_1_.getClass()); + return p_147547_1_ == null || p_147547_1_.func_145837_r() ? null : this.func_147546_a(p_147547_1_.getClass()); // Forge: fix MC-123363 } diff --git a/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormat.java.patch b/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormat.java.patch index 091bf43b4..3a7659757 100644 --- a/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormat.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormat.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/client/renderer/vertex/VertexFormat.java +++ after/net/minecraft/client/renderer/vertex/VertexFormat.java -@@ -11,12 +11,13 @@ +@@ -11,18 +11,19 @@ public class VertexFormat { private static final Logger field_177357_a = LogManager.getLogger(); @@ -19,6 +19,13 @@ public VertexFormat(VertexFormat p_i46097_1_) { + this(); + +- for (int i = 0; i < p_i46097_1_.func_177345_h(); i++) ++ for (int i = 0; i < p_i46097_1_.func_177345_h(); ++i) + { + this.func_181721_a(p_i46097_1_.func_177348_c(i)); + } @@ -32,6 +33,11 @@ public VertexFormat() @@ -56,7 +63,8 @@ + this.field_177351_f.add(p_181721_1_.func_177369_e(), Integer.valueOf(this.field_177353_d)); } - this.field_177353_d += p_181721_1_.func_177368_f(); +- this.field_177353_d = this.field_177353_d + p_181721_1_.func_177368_f(); ++ this.field_177353_d += p_181721_1_.func_177368_f(); + this.hashCode = 0; return this; } @@ -74,13 +82,23 @@ { String s = "format: " + this.field_177355_b.size() + " elements: "; - for (int i = 0; i < this.field_177355_b.size(); ++i) +- for (int i = 0; i < this.field_177355_b.size(); i++) ++ for (int i = 0; i < this.field_177355_b.size(); ++i) { - s = s + this.field_177355_b.get(i).toString(); + s = s + ((VertexFormatElement)this.field_177355_b.get(i)).toString(); if (i != this.field_177355_b.size() - 1) { +@@ -126,7 +133,7 @@ + { + int i = 0; + +- for (int j = this.field_177355_b.size(); i < j; i++) ++ for (int j = this.field_177355_b.size(); i < j; ++i) + { + VertexFormatElement vertexformatelement = this.field_177355_b.get(i); + @@ -166,10 +173,9 @@ public int func_181720_d(int p_181720_1_) @@ -93,7 +111,22 @@ public boolean equals(Object p_equals_1_) { if (this == p_equals_1_) -@@ -199,11 +205,13 @@ +@@ -184,9 +190,13 @@ + { + return false; + } ++ else if (!this.field_177355_b.equals(vertexformat.field_177355_b)) ++ { ++ return false; ++ } + else + { +- return !this.field_177355_b.equals(vertexformat.field_177355_b) ? false : this.field_177356_c.equals(vertexformat.field_177356_c); ++ return this.field_177356_c.equals(vertexformat.field_177356_c); + } + } + else +@@ -195,11 +205,13 @@ } } diff --git a/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch b/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch index 97b61acfa..daf0ce380 100644 --- a/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/vertex/VertexFormatElement.java.patch @@ -16,7 +16,22 @@ public boolean equals(Object p_equals_1_) { if (this == p_equals_1_) -@@ -106,13 +104,13 @@ +@@ -91,9 +89,13 @@ + { + return false; + } ++ else if (this.field_177379_b != vertexformatelement.field_177379_b) ++ { ++ return false; ++ } + else + { +- return this.field_177379_b != vertexformatelement.field_177379_b ? false : this.field_177380_c == vertexformatelement.field_177380_c; ++ return this.field_177380_c == vertexformatelement.field_177380_c; + } + } + else +@@ -102,13 +104,13 @@ } } @@ -32,7 +47,7 @@ } @SideOnly(Side.CLIENT) -@@ -160,9 +158,16 @@ +@@ -156,9 +158,16 @@ NORMAL("Normal"), COLOR("Vertex Color"), UV("UV"), diff --git a/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch b/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch index 1206b4abd..184b12ad1 100644 --- a/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch +++ b/patches/minecraft/net/minecraft/client/resources/FallbackResourceManager.java.patch @@ -9,7 +9,7 @@ private final MetadataSerializer field_110539_b; public FallbackResourceManager(MetadataSerializer p_i1289_1_) -@@ -33,13 +33,11 @@ +@@ -33,20 +33,18 @@ this.field_110540_a.add(p_110538_1_); } @@ -24,6 +24,14 @@ public IResource func_110536_a(ResourceLocation p_110536_1_) throws IOException { this.func_188552_d(p_110536_1_); + IResourcePack iresourcepack = null; + ResourceLocation resourcelocation = func_110537_b(p_110536_1_); + +- for (int i = this.field_110540_a.size() - 1; i >= 0; i--) ++ for (int i = this.field_110540_a.size() - 1; i >= 0; --i) + { + IResourcePack iresourcepack1 = this.field_110540_a.get(i); + @@ -64,21 +62,18 @@ inputstream = this.func_177245_a(resourcelocation, iresourcepack); } diff --git a/patches/minecraft/net/minecraft/client/resources/Locale.java.patch b/patches/minecraft/net/minecraft/client/resources/Locale.java.patch index 9b29ca474..d9e36a610 100644 --- a/patches/minecraft/net/minecraft/client/resources/Locale.java.patch +++ b/patches/minecraft/net/minecraft/client/resources/Locale.java.patch @@ -13,11 +13,11 @@ - int k = s.length(); - j += k; - -- for (int l = 0; l < k; ++l) +- for (int l = 0; l < k; l++) - { - if (s.charAt(l) >= 256) - { -- ++i; +- i++; - } - } - } diff --git a/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch b/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch index 94d488a63..76e86229e 100644 --- a/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch +++ b/patches/minecraft/net/minecraft/client/settings/KeyBinding.java.patch @@ -23,7 +23,7 @@ - - if (keybinding != null) - { -- ++keybinding.field_151474_i; +- keybinding.field_151474_i++; - } + field_74514_b.lookupActives(p_74507_0_).forEach($ -> ++$.field_151474_i); } @@ -79,6 +79,15 @@ } public String func_151466_e() +@@ -117,7 +113,7 @@ + } + else + { +- this.field_151474_i--; ++ --this.field_151474_i; + return true; + } + } @@ -150,25 +146,166 @@ public int compareTo(KeyBinding p_compareTo_1_) diff --git a/patches/minecraft/net/minecraft/client/shader/ShaderGroup.java.patch b/patches/minecraft/net/minecraft/client/shader/ShaderGroup.java.patch index ef9d7d312..3ee28c281 100644 --- a/patches/minecraft/net/minecraft/client/shader/ShaderGroup.java.patch +++ b/patches/minecraft/net/minecraft/client/shader/ShaderGroup.java.patch @@ -21,6 +21,24 @@ private Matrix4f field_148030_g; private int field_148038_h; private int field_148039_i; +@@ -81,7 +82,7 @@ + throw jsonexception1; + } + +- i++; ++ ++i; + } + } + +@@ -103,7 +104,7 @@ + throw jsonexception2; + } + +- j++; ++ ++j; + } + } + } @@ -115,7 +116,7 @@ } finally @@ -84,7 +102,12 @@ } else { -@@ -229,7 +231,7 @@ +@@ -225,11 +227,11 @@ + throw jsonexception; + } + +- i++; ++ ++i; } } @@ -93,6 +116,15 @@ if (jsonarray1 != null) { +@@ -248,7 +250,7 @@ + throw jsonexception1; + } + +- l++; ++ ++l; + } + } + } @@ -258,7 +260,7 @@ { JsonObject jsonobject = JsonUtils.func_151210_l(p_148028_1_, "uniform"); @@ -102,8 +134,27 @@ if (shaderuniform == null) { -@@ -386,11 +388,9 @@ - this.field_148036_j += p_148018_1_ - this.field_148037_k; +@@ -282,7 +284,7 @@ + throw jsonexception; + } + +- i++; ++ ++i; + } + + switch (i) +@@ -378,19 +380,17 @@ + { + if (p_148018_1_ < this.field_148037_k) + { +- this.field_148036_j = this.field_148036_j + (1.0F - this.field_148037_k); ++ this.field_148036_j += 1.0F - this.field_148037_k; + this.field_148036_j += p_148018_1_; + } + else + { +- this.field_148036_j = this.field_148036_j + (p_148018_1_ - this.field_148037_k); ++ this.field_148036_j += p_148018_1_ - this.field_148037_k; } - this.field_148037_k = p_148018_1_; diff --git a/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch b/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch index 53d0f99dc..f1d1e5696 100644 --- a/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch +++ b/patches/minecraft/net/minecraft/client/shader/ShaderLoader.java.patch @@ -10,6 +10,22 @@ import java.nio.ByteBuffer; import java.util.Map; import net.minecraft.client.renderer.OpenGlHelper; +@@ -34,13 +34,13 @@ + + public void func_148056_a(ShaderManager p_148056_1_) + { +- this.field_148058_d++; ++ ++this.field_148058_d; + OpenGlHelper.func_153178_b(p_148056_1_.func_147986_h(), this.field_148060_c); + } + + public void func_148054_b(ShaderManager p_148054_1_) + { +- this.field_148058_d--; ++ --this.field_148058_d; + + if (this.field_148058_d <= 0) + { @@ -56,11 +56,12 @@ public static ShaderLoader func_148057_a(IResourceManager p_148057_0_, ShaderLoader.ShaderType p_148057_1_, String p_148057_2_) throws IOException diff --git a/patches/minecraft/net/minecraft/client/shader/ShaderManager.java.patch b/patches/minecraft/net/minecraft/client/shader/ShaderManager.java.patch index cac9dffb4..e9f6607c3 100644 --- a/patches/minecraft/net/minecraft/client/shader/ShaderManager.java.patch +++ b/patches/minecraft/net/minecraft/client/shader/ShaderManager.java.patch @@ -46,7 +46,12 @@ if (jsonarray != null) { -@@ -86,13 +88,13 @@ +@@ -82,17 +84,17 @@ + throw jsonexception1; + } + +- i++; ++ ++i; } } @@ -63,6 +68,15 @@ for (JsonElement jsonelement1 : jsonarray1) { +@@ -107,7 +109,7 @@ + throw jsonexception2; + } + +- j++; ++ ++j; + } + } + else @@ -116,7 +118,7 @@ this.field_148014_r = null; } @@ -72,7 +86,12 @@ if (jsonarray2 != null) { -@@ -139,7 +141,7 @@ +@@ -135,11 +137,11 @@ + throw jsonexception3; + } + +- k++; ++ ++k; } } @@ -99,6 +118,24 @@ } this.func_147985_d(); +@@ -182,7 +184,7 @@ + field_148002_c = null; + field_148000_e = true; + +- for (int i = 0; i < this.field_148010_h.size(); i++) ++ for (int i = 0; i < this.field_148010_h.size(); ++i) + { + if (this.field_147997_f.get(this.field_147998_g.get(i)) != null) + { +@@ -213,7 +215,7 @@ + GlStateManager.func_179129_p(); + } + +- for (int i = 0; i < this.field_148010_h.size(); i++) ++ for (int i = 0; i < this.field_148010_h.size(); ++i) + { + if (this.field_147997_f.get(this.field_147998_g.get(i)) != null) + { @@ -232,7 +234,7 @@ } else if (object instanceof Integer) @@ -108,7 +145,21 @@ } if (j != -1) -@@ -284,7 +286,7 @@ +@@ -270,7 +272,7 @@ + { + int i = 0; + +- for (int j = 0; i < this.field_147998_g.size(); j++) ++ for (int j = 0; i < this.field_147998_g.size(); ++j) + { + String s = this.field_147998_g.get(i); + int k = OpenGlHelper.func_153194_a(this.field_148006_l, s); +@@ -280,14 +282,14 @@ + field_148003_a.warn("Shader {}could not find sampler named {} in the specified shader program.", this.field_148007_m, s); + this.field_147997_f.remove(s); + this.field_147998_g.remove(j); +- j--; ++ --j; } else { @@ -116,7 +167,11 @@ + this.field_148010_h.add(Integer.valueOf(k)); } - ++i; +- i++; ++ ++i; + } + + for (ShaderUniform shaderuniform : this.field_148011_i) @@ -297,11 +299,11 @@ if (l == -1) @@ -140,3 +195,21 @@ this.field_147998_g.add(s); } else +@@ -365,7 +367,7 @@ + throw jsonexception; + } + +- k++; ++ ++k; + } + + if (j > 1 && jsonarray.size() == 1) +@@ -373,7 +375,7 @@ + while (k < j) + { + afloat[k] = afloat[0]; +- k++; ++ ++k; + } + } + diff --git a/patches/minecraft/net/minecraft/client/util/RecipeBookClient.java.patch b/patches/minecraft/net/minecraft/client/util/RecipeBookClient.java.patch index 31f589fde..fb554db42 100644 --- a/patches/minecraft/net/minecraft/client/util/RecipeBookClient.java.patch +++ b/patches/minecraft/net/minecraft/client/util/RecipeBookClient.java.patch @@ -21,8 +21,8 @@ { RecipeList recipelist = new RecipeList(); field_194087_f.add(recipelist); -- field_194086_e.computeIfAbsent(p_194082_0_, p_194085_0_ -> new ArrayList()).add(recipelist); -- field_194086_e.computeIfAbsent(CreativeTabs.field_78027_g, p_194083_0_ -> new ArrayList()).add(recipelist); +- field_194086_e.computeIfAbsent(p_194082_0_, p_194085_0_ -> new ArrayList<>()).add(recipelist); +- field_194086_e.computeIfAbsent(CreativeTabs.field_78027_g, p_194083_0_ -> new ArrayList<>()).add(recipelist); + (field_194086_e.computeIfAbsent(p_194082_0_, (p_194085_0_) -> + { + return new ArrayList(); diff --git a/patches/minecraft/net/minecraft/client/util/RecipeItemHelper.java.patch b/patches/minecraft/net/minecraft/client/util/RecipeItemHelper.java.patch index ab6a958df..db211aec4 100644 --- a/patches/minecraft/net/minecraft/client/util/RecipeItemHelper.java.patch +++ b/patches/minecraft/net/minecraft/client/util/RecipeItemHelper.java.patch @@ -46,7 +46,7 @@ } public static ItemStack func_194115_b(int p_194115_0_) -@@ -106,7 +113,10 @@ +@@ -106,17 +113,20 @@ { this.field_194105_b = p_i47608_2_; this.field_194106_c.addAll(p_i47608_2_.func_192400_c()); @@ -58,6 +58,70 @@ this.field_194107_d = this.field_194106_c.size(); this.field_194108_e = this.func_194097_a(); this.field_194109_f = this.field_194108_e.length; + this.field_194110_g = new BitSet(this.field_194107_d + this.field_194109_f + this.field_194107_d + this.field_194107_d * this.field_194109_f); + +- for (int i = 0; i < this.field_194106_c.size(); i++) ++ for (int i = 0; i < this.field_194106_c.size(); ++i) + { + IntList intlist = this.field_194106_c.get(i).func_194139_b(); + +- for (int j = 0; j < this.field_194109_f; j++) ++ for (int j = 0; j < this.field_194109_f; ++j) + { + if (intlist.contains(this.field_194108_e[j])) + { +@@ -136,13 +146,13 @@ + { + int i; + +- for (i = 0; this.func_194098_a(p_194092_1_); i++) ++ for (i = 0; this.func_194098_a(p_194092_1_); ++i) + { + RecipeItemHelper.this.func_194122_a(this.field_194108_e[this.field_194111_h.getInt(0)], p_194092_1_); + int j = this.field_194111_h.size() - 1; + this.func_194096_c(this.field_194111_h.getInt(j)); + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + this.func_194089_c((k & 1) == 0, this.field_194111_h.get(k), this.field_194111_h.get(k + 1)); + } +@@ -163,7 +173,7 @@ + int l = 0; + List list = this.field_194105_b.func_192400_c(); + +- for (int i1 = 0; i1 < list.size(); i1++) ++ for (int i1 = 0; i1 < list.size(); ++i1) + { + if (flag1 && list.get(i1) == Ingredient.field_193370_a) + { +@@ -171,7 +181,7 @@ + } + else + { +- for (int j1 = 0; j1 < this.field_194109_f; j1++) ++ for (int j1 = 0; j1 < this.field_194109_f; ++j1) + { + if (this.func_194100_b(false, l, j1)) + { +@@ -185,7 +195,7 @@ + } + } + +- l++; ++ ++l; + } + } + +@@ -219,7 +229,7 @@ + { + int i = this.field_194109_f; + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + if (RecipeItemHelper.this.field_194124_a.get(this.field_194108_e[j]) >= p_194098_1_) + { @@ -237,29 +247,21 @@ } @@ -72,7 +136,7 @@ { - if (this.func_194101_b(flag, j1) || !this.func_194093_a(flag, l, j1) || !this.func_194100_b(flag, l, j1)) - { -- ++j1; +- j1++; - continue; - } - diff --git a/patches/minecraft/net/minecraft/command/CommandBase.java.patch b/patches/minecraft/net/minecraft/command/CommandBase.java.patch index 796dd83b9..d0b6e34da 100644 --- a/patches/minecraft/net/minecraft/command/CommandBase.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandBase.java.patch @@ -1,139 +1,6 @@ --- before/net/minecraft/command/CommandBase.java +++ after/net/minecraft/command/CommandBase.java -@@ -56,7 +56,7 @@ - } - } - -- return new SyntaxErrorException("commands.tellraw.jsonException", s); -+ return new SyntaxErrorException("commands.tellraw.jsonException", new Object[] {s}); - } - - public static NBTTagCompound func_184887_a(Entity p_184887_0_) -@@ -81,22 +81,19 @@ - return 4; - } - -- @Override - public List func_71514_a() - { -- return Collections.emptyList(); -+ return Collections.emptyList(); - } - -- @Override - public boolean func_184882_a(MinecraftServer p_184882_1_, ICommandSender p_184882_2_) - { - return p_184882_2_.func_70003_b(this.func_82362_a(), this.func_71517_b()); - } - -- @Override - public List func_184883_a(MinecraftServer p_184883_1_, ICommandSender p_184883_2_, String[] p_184883_3_, @Nullable BlockPos p_184883_4_) - { -- return Collections.emptyList(); -+ return Collections.emptyList(); - } - - public static int func_175755_a(String p_175755_0_) throws NumberInvalidException -@@ -105,9 +102,9 @@ - { - return Integer.parseInt(p_175755_0_); - } -- catch (NumberFormatException numberformatexception) -+ catch (NumberFormatException var2) - { -- throw new NumberInvalidException("commands.generic.num.invalid", p_175755_0_); -+ throw new NumberInvalidException("commands.generic.num.invalid", new Object[] {p_175755_0_}); - } - } - -@@ -122,11 +119,11 @@ - - if (i < p_175764_1_) - { -- throw new NumberInvalidException("commands.generic.num.tooSmall", i, p_175764_1_); -+ throw new NumberInvalidException("commands.generic.num.tooSmall", new Object[] {i, p_175764_1_}); - } - else if (i > p_175764_2_) - { -- throw new NumberInvalidException("commands.generic.num.tooBig", i, p_175764_2_); -+ throw new NumberInvalidException("commands.generic.num.tooBig", new Object[] {i, p_175764_2_}); - } - else - { -@@ -140,9 +137,9 @@ - { - return Long.parseLong(p_175766_0_); - } -- catch (NumberFormatException numberformatexception) -+ catch (NumberFormatException var2) - { -- throw new NumberInvalidException("commands.generic.num.invalid", p_175766_0_); -+ throw new NumberInvalidException("commands.generic.num.invalid", new Object[] {p_175766_0_}); - } - } - -@@ -152,11 +149,11 @@ - - if (i < p_175760_1_) - { -- throw new NumberInvalidException("commands.generic.num.tooSmall", i, p_175760_1_); -+ throw new NumberInvalidException("commands.generic.num.tooSmall", new Object[] {i, p_175760_1_}); - } - else if (i > p_175760_3_) - { -- throw new NumberInvalidException("commands.generic.num.tooBig", i, p_175760_3_); -+ throw new NumberInvalidException("commands.generic.num.tooBig", new Object[] {i, p_175760_3_}); - } - else - { -@@ -167,11 +164,7 @@ - public static BlockPos func_175757_a(ICommandSender p_175757_0_, String[] p_175757_1_, int p_175757_2_, boolean p_175757_3_) throws NumberInvalidException - { - BlockPos blockpos = p_175757_0_.func_180425_c(); -- return new BlockPos( -- func_175769_b((double)blockpos.func_177958_n(), p_175757_1_[p_175757_2_], -30000000, 30000000, p_175757_3_), -- func_175769_b((double)blockpos.func_177956_o(), p_175757_1_[p_175757_2_ + 1], 0, 256, false), -- func_175769_b((double)blockpos.func_177952_p(), p_175757_1_[p_175757_2_ + 2], -30000000, 30000000, p_175757_3_) -- ); -+ return new BlockPos(func_175769_b((double)blockpos.func_177958_n(), p_175757_1_[p_175757_2_], -30000000, 30000000, p_175757_3_), func_175769_b((double)blockpos.func_177956_o(), p_175757_1_[p_175757_2_ + 1], 0, 256, false), func_175769_b((double)blockpos.func_177952_p(), p_175757_1_[p_175757_2_ + 2], -30000000, 30000000, p_175757_3_)); - } - - public static double func_175765_c(String p_175765_0_) throws NumberInvalidException -@@ -182,16 +175,16 @@ - - if (!Doubles.isFinite(d0)) - { -- throw new NumberInvalidException("commands.generic.num.invalid", p_175765_0_); -+ throw new NumberInvalidException("commands.generic.num.invalid", new Object[] {p_175765_0_}); - } - else - { - return d0; - } - } -- catch (NumberFormatException numberformatexception) -+ catch (NumberFormatException var3) - { -- throw new NumberInvalidException("commands.generic.num.invalid", p_175765_0_); -+ throw new NumberInvalidException("commands.generic.num.invalid", new Object[] {p_175765_0_}); - } - } - -@@ -206,11 +199,11 @@ - - if (d0 < p_175756_1_) - { -- throw new NumberInvalidException("commands.generic.num.tooSmall", String.format("%.2f", d0), String.format("%.2f", p_175756_1_)); -+ throw new NumberInvalidException("commands.generic.num.tooSmall", new Object[] {String.format("%.2f", d0), String.format("%.2f", p_175756_1_)}); - } - else if (d0 > p_175756_3_) - { -- throw new NumberInvalidException("commands.generic.num.tooBig", String.format("%.2f", d0), String.format("%.2f", p_175756_3_)); -+ throw new NumberInvalidException("commands.generic.num.tooBig", new Object[] {String.format("%.2f", d0), String.format("%.2f", p_175756_3_)}); - } - else - { -@@ -220,18 +213,21 @@ +@@ -220,18 +220,21 @@ public static boolean func_180527_d(String p_180527_0_) throws CommandException { @@ -164,70 +31,15 @@ } public static EntityPlayerMP func_71521_c(ICommandSender p_71521_0_) throws PlayerNotFoundException -@@ -249,7 +245,7 @@ - public static List func_193513_a(MinecraftServer p_193513_0_, ICommandSender p_193513_1_, String p_193513_2_) throws CommandException - { - List list = EntitySelector.func_193531_b(p_193513_1_, p_193513_2_); -- return (List)(list.isEmpty() ? Lists.newArrayList(func_193512_a(p_193513_0_, null, p_193513_2_)) : list); -+ return (List)(list.isEmpty() ? Lists.newArrayList(func_193512_a(p_193513_0_, (EntityPlayerMP)null, p_193513_2_)) : list); - } - - public static EntityPlayerMP func_184888_a(MinecraftServer p_184888_0_, ICommandSender p_184888_1_, String p_184888_2_) throws PlayerNotFoundException, CommandException -@@ -265,8 +261,9 @@ - { - p_193512_1_ = p_193512_0_.func_184103_al().func_177451_a(UUID.fromString(p_193512_2_)); - } -- catch (IllegalArgumentException illegalargumentexception) -+ catch (IllegalArgumentException var4) - { -+ ; - } - } - -@@ -277,7 +274,7 @@ - - if (p_193512_1_ == null) - { -- throw new PlayerNotFoundException("commands.generic.player.notFound", p_193512_2_); -+ throw new PlayerNotFoundException("commands.generic.player.notFound", new Object[] {p_193512_2_}); - } - else - { -@@ -311,11 +308,11 @@ - entity = p_184884_0_.func_184103_al().func_177451_a(uuid); - } - } -- catch (IllegalArgumentException illegalargumentexception) -+ catch (IllegalArgumentException var6) - { - if (p_184884_2_.split("-").length == 5) - { -- throw new EntityNotFoundException("commands.generic.entity.invalidUuid", p_184884_2_); -+ throw new EntityNotFoundException("commands.generic.entity.invalidUuid", new Object[] {p_184884_2_}); - } - } - } -@@ -332,9 +329,7 @@ - - public static List func_184890_c(MinecraftServer p_184890_0_, ICommandSender p_184890_1_, String p_184890_2_) throws EntityNotFoundException, CommandException +@@ -391,14 +394,14 @@ { -- return (List)(EntitySelector.func_82378_b(p_184890_2_) -- ? EntitySelector.func_179656_b(p_184890_1_, p_184890_2_, Entity.class) -- : Lists.newArrayList(func_184885_b(p_184890_0_, p_184890_1_, p_184890_2_))); -+ return (List)(EntitySelector.func_82378_b(p_184890_2_) ? EntitySelector.func_179656_b(p_184890_1_, p_184890_2_, Entity.class) : Lists.newArrayList(func_184885_b(p_184890_0_, p_184890_1_, p_184890_2_))); - } + ITextComponent itextcomponent = new TextComponentString(""); - public static String func_184886_d(MinecraftServer p_184886_0_, ICommandSender p_184886_1_, String p_184886_2_) throws PlayerNotFoundException, CommandException -@@ -362,7 +357,7 @@ +- for (int i = p_147176_2_; i < p_147176_1_.length; i++) ++ for (int i = p_147176_2_; i < p_147176_1_.length; ++i) { - return func_184888_a(p_184891_0_, p_184891_1_, p_184891_2_).func_70005_c_(); - } -- catch (PlayerNotFoundException playernotfoundexception) -+ catch (PlayerNotFoundException var6) - { - try + if (i > p_147176_2_) { -@@ -398,7 +393,7 @@ itextcomponent.func_150258_a(" "); } @@ -236,221 +48,48 @@ if (p_147176_3_) { -@@ -408,7 +403,7 @@ - { - if (EntitySelector.func_82378_b(p_147176_1_[i])) - { -- throw new PlayerNotFoundException("commands.generic.selector.notFound", p_147176_1_[i]); -+ throw new PlayerNotFoundException("commands.generic.selector.notFound", new Object[] {p_147176_1_[i]}); - } - } - else -@@ -452,11 +447,11 @@ - - if (flag && Double.isNaN(p_175767_0_)) - { -- throw new NumberInvalidException("commands.generic.num.invalid", p_175767_0_); -+ throw new NumberInvalidException("commands.generic.num.invalid", new Object[] {p_175767_0_}); - } - else - { -- double d0 = 0.0; -+ double d0 = 0.0D; - - if (!flag || p_175767_2_.length() > 1) - { -@@ -471,22 +466,22 @@ - - if (!flag1 && !flag && p_175767_5_) - { -- d0 += 0.5; -+ d0 += 0.5D; - } - } - -- double d1 = d0 + (flag ? p_175767_0_ : 0.0); -+ double d1 = d0 + (flag ? p_175767_0_ : 0.0D); - - if (p_175767_3_ != 0 || p_175767_4_ != 0) - { - if (d1 < (double)p_175767_3_) - { -- throw new NumberInvalidException("commands.generic.num.tooSmall", String.format("%.2f", d1), p_175767_3_); -+ throw new NumberInvalidException("commands.generic.num.tooSmall", new Object[] {String.format("%.2f", d1), p_175767_3_}); - } - - if (d1 > (double)p_175767_4_) - { -- throw new NumberInvalidException("commands.generic.num.tooBig", String.format("%.2f", d1), p_175767_4_); -+ throw new NumberInvalidException("commands.generic.num.tooBig", new Object[] {String.format("%.2f", d1), p_175767_4_}); - } - } - -@@ -505,11 +500,11 @@ +@@ -427,7 +430,7 @@ + { + StringBuilder stringbuilder = new StringBuilder(); - if (flag && Double.isNaN(p_175769_0_)) - { -- throw new NumberInvalidException("commands.generic.num.invalid", p_175769_0_); -+ throw new NumberInvalidException("commands.generic.num.invalid", new Object[] {p_175769_0_}); - } - else +- for (int i = p_180529_1_; i < p_180529_0_.length; i++) ++ for (int i = p_180529_1_; i < p_180529_0_.length; ++i) { -- double d0 = flag ? p_175769_0_ : 0.0; -+ double d0 = flag ? p_175769_0_ : 0.0D; - - if (!flag || p_175769_2_.length() > 1) + if (i > p_180529_1_) { -@@ -524,7 +519,7 @@ - - if (!flag1 && !flag && p_175769_5_) - { -- d0 += 0.5; -+ d0 += 0.5D; +@@ -702,7 +705,7 @@ + break; } - } -@@ -532,12 +527,12 @@ - { - if (d0 < (double)p_175769_3_) - { -- throw new NumberInvalidException("commands.generic.num.tooSmall", String.format("%.2f", d0), p_175769_3_); -+ throw new NumberInvalidException("commands.generic.num.tooSmall", new Object[] {String.format("%.2f", d0), p_175769_3_}); - } +- Comparable comparable = func_190792_a((IProperty)iproperty, iterator1.next()); ++ Comparable comparable = func_190792_a(iproperty, iterator1.next()); - if (d0 > (double)p_175769_4_) + if (comparable == null) { -- throw new NumberInvalidException("commands.generic.num.tooBig", String.format("%.2f", d0), p_175769_4_); -+ throw new NumberInvalidException("commands.generic.num.tooBig", new Object[] {String.format("%.2f", d0), p_175769_4_}); - } - } - -@@ -552,7 +547,7 @@ - - if (item == null) - { -- throw new NumberInvalidException("commands.give.item.notFound", resourcelocation); -+ throw new NumberInvalidException("commands.give.item.notFound", new Object[] {resourcelocation}); - } - else - { -@@ -566,7 +561,7 @@ - - if (!Block.field_149771_c.func_148741_d(resourcelocation)) - { -- throw new NumberInvalidException("commands.give.block.notFound", resourcelocation); -+ throw new NumberInvalidException("commands.give.block.notFound", new Object[] {resourcelocation}); - } - else - { -@@ -582,18 +577,18 @@ - - if (i < 0) - { -- throw new NumberInvalidException("commands.generic.num.tooSmall", i, 0); -+ throw new NumberInvalidException("commands.generic.num.tooSmall", new Object[] {i, Integer.valueOf(0)}); - } - else if (i > 15) - { -- throw new NumberInvalidException("commands.generic.num.tooBig", i, 15); -+ throw new NumberInvalidException("commands.generic.num.tooBig", new Object[] {i, Integer.valueOf(15)}); - } - else - { - return p_190794_0_.func_176203_a(Integer.parseInt(p_190794_1_)); - } - } -- catch (RuntimeException runtimeexception1) -+ catch (RuntimeException var7) - { - try - { -@@ -607,16 +602,16 @@ - - return iblockstate; - } -- catch (RuntimeException runtimeexception) -+ catch (RuntimeException var6) - { -- throw new InvalidBlockStateException("commands.generic.blockstate.invalid", p_190794_1_, Block.field_149771_c.func_177774_c(p_190794_0_)); -+ throw new InvalidBlockStateException("commands.generic.blockstate.invalid", new Object[] {p_190794_1_, Block.field_149771_c.func_177774_c(p_190794_0_)}); - } - } - } - - private static > IBlockState func_190793_a(IBlockState p_190793_0_, IProperty p_190793_1_, Comparable p_190793_2_) - { -- return p_190793_0_.func_177226_a(p_190793_1_, (T) p_190793_2_); -+ return p_190793_0_.func_177226_a(p_190793_1_, (T)p_190793_2_); - } - - public static Predicate func_190791_b(final Block p_190791_0_, String p_190791_1_) throws InvalidBlockStateException -@@ -634,7 +629,7 @@ - } - }; - } -- catch (RuntimeException runtimeexception) -+ catch (RuntimeException var3) - { - final Map < IProperty, Comparable> map = func_190795_c(p_190791_0_, p_190791_1_); - return new Predicate() -@@ -669,7 +664,7 @@ - - private static Map < IProperty, Comparable> func_190795_c(Block p_190795_0_, String p_190795_1_) throws InvalidBlockStateException +@@ -726,7 +729,7 @@ { -- Map < IProperty, Comparable> map = Maps.newHashMap(); -+ Map < IProperty, Comparable> map = Maps. < IProperty, Comparable> newHashMap(); + StringBuilder stringbuilder = new StringBuilder(); - if ("default".equals(p_190795_1_)) +- for (int i = 0; i < p_71527_0_.length; i++) ++ for (int i = 0; i < p_71527_0_.length; ++i) { -@@ -712,14 +707,14 @@ - map.put(iproperty, comparable); - } - -- throw new InvalidBlockStateException("commands.generic.blockstate.invalid", p_190795_1_, Block.field_149771_c.func_177774_c(p_190795_0_)); -+ throw new InvalidBlockStateException("commands.generic.blockstate.invalid", new Object[] {p_190795_1_, Block.field_149771_c.func_177774_c(p_190795_0_)}); - } - } + String s = p_71527_0_[i].toString(); - @Nullable - private static > T func_190792_a(IProperty p_190792_0_, String p_190792_1_) +@@ -752,7 +755,7 @@ { -- return p_190792_0_.func_185929_b(p_190792_1_).orNull(); -+ return (T)(p_190792_0_.func_185929_b(p_190792_1_).orNull()); - } - - public static String func_71527_a(Object[] p_71527_0_) -@@ -800,7 +795,7 @@ - { - if (i != p_175771_1_ + 2) - { -- return Collections.emptyList(); -+ return Collections.emptyList(); - } + ITextComponent itextcomponent = new TextComponentString(""); - s = Integer.toString(p_175771_2_.func_177952_p()); -@@ -829,7 +824,7 @@ +- for (int i = 0; i < p_180530_0_.size(); i++) ++ for (int i = 0; i < p_180530_0_.size(); ++i) + { + if (i > 0) { - if (i != p_181043_1_ + 1) - { -- return Collections.emptyList(); -+ return Collections.emptyList(); - } - - s = Integer.toString(p_181043_2_.func_177952_p()); -@@ -852,7 +847,7 @@ - public static List func_175762_a(String[] p_175762_0_, Collection p_175762_1_) - { - String s = p_175762_0_[p_175762_0_.length - 1]; -- List list = Lists.newArrayList(); -+ List list = Lists.newArrayList(); +@@ -856,7 +859,7 @@ if (!p_175762_1_.isEmpty()) { -@@ -879,7 +874,6 @@ - return list; - } - -- @Override - public boolean func_82358_a(String[] p_82358_1_, int p_82358_2_) - { - return false; +- for (String s1 : Iterables.transform((Iterable)p_175762_1_, Functions.toStringFunction())) ++ for (String s1 : Iterables.transform(p_175762_1_, Functions.toStringFunction())) + { + if (func_71523_a(s, s1)) + { diff --git a/patches/minecraft/net/minecraft/command/CommandFill.java.patch b/patches/minecraft/net/minecraft/command/CommandFill.java.patch index fd45befc5..93f453658 100644 --- a/patches/minecraft/net/minecraft/command/CommandFill.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandFill.java.patch @@ -1,75 +1,6 @@ --- before/net/minecraft/command/CommandFill.java +++ after/net/minecraft/command/CommandFill.java -@@ -18,30 +18,26 @@ - - public class CommandFill extends CommandBase - { -- @Override - public String func_71517_b() - { - return "fill"; - } - -- @Override - public int func_82362_a() - { - return 2; - } - -- @Override - public String func_71518_a(ICommandSender p_71518_1_) - { - return "commands.fill.usage"; - } - -- @Override - public void func_184881_a(MinecraftServer p_184881_1_, ICommandSender p_184881_2_, String[] p_184881_3_) throws CommandException - { - if (p_184881_3_.length < 7) - { -- throw new WrongUsageException("commands.fill.usage"); -+ throw new WrongUsageException("commands.fill.usage", new Object[0]); - } - else - { -@@ -60,23 +56,13 @@ - iblockstate = block.func_176223_P(); - } - -- BlockPos blockpos2 = new BlockPos( -- Math.min(blockpos.func_177958_n(), blockpos1.func_177958_n()), -- Math.min(blockpos.func_177956_o(), blockpos1.func_177956_o()), -- Math.min(blockpos.func_177952_p(), blockpos1.func_177952_p()) -- ); -- BlockPos blockpos3 = new BlockPos( -- Math.max(blockpos.func_177958_n(), blockpos1.func_177958_n()), -- Math.max(blockpos.func_177956_o(), blockpos1.func_177956_o()), -- Math.max(blockpos.func_177952_p(), blockpos1.func_177952_p()) -- ); -- int i = (blockpos3.func_177958_n() - blockpos2.func_177958_n() + 1) -- * (blockpos3.func_177956_o() - blockpos2.func_177956_o() + 1) -- * (blockpos3.func_177952_p() - blockpos2.func_177952_p() + 1); -+ BlockPos blockpos2 = new BlockPos(Math.min(blockpos.func_177958_n(), blockpos1.func_177958_n()), Math.min(blockpos.func_177956_o(), blockpos1.func_177956_o()), Math.min(blockpos.func_177952_p(), blockpos1.func_177952_p())); -+ BlockPos blockpos3 = new BlockPos(Math.max(blockpos.func_177958_n(), blockpos1.func_177958_n()), Math.max(blockpos.func_177956_o(), blockpos1.func_177956_o()), Math.max(blockpos.func_177952_p(), blockpos1.func_177952_p())); -+ int i = (blockpos3.func_177958_n() - blockpos2.func_177958_n() + 1) * (blockpos3.func_177956_o() - blockpos2.func_177956_o() + 1) * (blockpos3.func_177952_p() - blockpos2.func_177952_p() + 1); - - if (i > 32768) - { -- throw new CommandException("commands.fill.tooManyBlocks", i, 32768); -+ throw new CommandException("commands.fill.tooManyBlocks", new Object[] {i, Integer.valueOf(32768)}); - } - else if (blockpos2.func_177956_o() >= 0 && blockpos3.func_177956_o() < 256) - { -@@ -88,7 +74,7 @@ - { - if (!world.func_175667_e(new BlockPos(k, blockpos3.func_177956_o() - blockpos2.func_177956_o(), j))) - { -- throw new CommandException("commands.fill.outOfWorld"); -+ throw new CommandException("commands.fill.outOfWorld", new Object[0]); - } - } - } -@@ -96,7 +82,7 @@ +@@ -96,7 +96,7 @@ NBTTagCompound nbttagcompound = new NBTTagCompound(); boolean flag = false; @@ -78,21 +9,22 @@ { String s = func_180529_a(p_184881_3_, 9); -@@ -107,11 +93,11 @@ - } - catch (NBTException nbtexception) - { -- throw new CommandException("commands.fill.tagError", nbtexception.getMessage()); -+ throw new CommandException("commands.fill.tagError", new Object[] {nbtexception.getMessage()}); - } - } - -- List list = Lists.newArrayList(); -+ List list = Lists.newArrayList(); +@@ -114,11 +114,11 @@ + List list = Lists.newArrayList(); i = 0; - for (int l = blockpos2.func_177952_p(); l <= blockpos3.func_177952_p(); ++l) -@@ -137,26 +123,17 @@ +- for (int l = blockpos2.func_177952_p(); l <= blockpos3.func_177952_p(); l++) ++ for (int l = blockpos2.func_177952_p(); l <= blockpos3.func_177952_p(); ++l) + { +- for (int i1 = blockpos2.func_177956_o(); i1 <= blockpos3.func_177956_o(); i1++) ++ for (int i1 = blockpos2.func_177956_o(); i1 <= blockpos3.func_177956_o(); ++i1) + { +- for (int j1 = blockpos2.func_177958_n(); j1 <= blockpos3.func_177958_n(); j1++) ++ for (int j1 = blockpos2.func_177958_n(); j1 <= blockpos3.func_177958_n(); ++j1) + { + BlockPos blockpos4 = new BlockPos(j1, i1, l); + +@@ -137,7 +137,7 @@ continue; } } @@ -101,58 +33,12 @@ { Block block1 = CommandBase.func_147180_g(p_184881_2_, p_184881_3_[9]); -- if (world.func_180495_p(blockpos4).func_177230_c() != block1 -- || p_184881_3_.length > 10 -- && !"-1".equals(p_184881_3_[10]) -- && !"*".equals(p_184881_3_[10]) -- && !CommandBase.func_190791_b(block1, p_184881_3_[10]).apply(world.func_180495_p(blockpos4))) -+ if (world.func_180495_p(blockpos4).func_177230_c() != block1 || p_184881_3_.length > 10 && !"-1".equals(p_184881_3_[10]) && !"*".equals(p_184881_3_[10]) && !CommandBase.func_190791_b(block1, p_184881_3_[10]).apply(world.func_180495_p(blockpos4))) - { - continue; - } - } - } -- else if (j1 != blockpos2.func_177958_n() -- && j1 != blockpos3.func_177958_n() -- && i1 != blockpos2.func_177956_o() -- && i1 != blockpos3.func_177956_o() -- && l != blockpos2.func_177952_p() -- && l != blockpos3.func_177952_p()) -+ else if (j1 != blockpos2.func_177958_n() && j1 != blockpos3.func_177958_n() && i1 != blockpos2.func_177956_o() && i1 != blockpos3.func_177956_o() && l != blockpos2.func_177952_p() && l != blockpos3.func_177952_p()) - { - if ("hollow".equals(p_184881_3_[8])) - { -@@ -205,7 +182,7 @@ +@@ -178,7 +178,7 @@ + if (world.func_180501_a(blockpos4, iblockstate, 2)) + { + list.add(blockpos4); +- i++; ++ ++i; - if (i <= 0) - { -- throw new CommandException("commands.fill.failed"); -+ throw new CommandException("commands.fill.failed", new Object[0]); - } - else - { -@@ -215,12 +192,11 @@ - } - else - { -- throw new CommandException("commands.fill.outOfWorld"); -+ throw new CommandException("commands.fill.outOfWorld", new Object[0]); - } - } - } - -- @Override - public List func_184883_a(MinecraftServer p_184883_1_, ICommandSender p_184883_2_, String[] p_184883_3_, @Nullable BlockPos p_184883_4_) - { - if (p_184883_3_.length > 0 && p_184883_3_.length <= 3) -@@ -241,9 +217,7 @@ - } - else - { -- return p_184883_3_.length == 10 && "replace".equals(p_184883_3_[8]) -- ? func_175762_a(p_184883_3_, Block.field_149771_c.func_148742_b()) -- : Collections.emptyList(); -+ return p_184883_3_.length == 10 && "replace".equals(p_184883_3_[8]) ? func_175762_a(p_184883_3_, Block.field_149771_c.func_148742_b()) : Collections.emptyList(); - } - } - } + if (flag) + { diff --git a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch index 28a417926..afd85d78a 100644 --- a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch @@ -49,7 +49,23 @@ } for (Entity entity : list) -@@ -86,7 +96,7 @@ +@@ -68,7 +78,7 @@ + + if (this.func_175786_a(p_71556_1_, astring, icommand, p_71556_2_)) + { +- i++; ++ ++i; + } + } + +@@ -80,13 +90,13 @@ + + if (this.func_175786_a(p_71556_1_, astring, icommand, p_71556_2_)) + { +- i++; ++ ++i; + } + } } else { @@ -125,3 +141,12 @@ public Map func_71555_a() { return this.field_71562_a; +@@ -227,7 +232,7 @@ + } + else + { +- for (int i = 0; i < p_82370_2_.length; i++) ++ for (int i = 0; i < p_82370_2_.length; ++i) + { + if (p_82370_1_.func_82358_a(p_82370_2_, i) && EntitySelector.func_82377_a(p_82370_2_[i])) + { diff --git a/patches/minecraft/net/minecraft/command/EntitySelector.java.patch b/patches/minecraft/net/minecraft/command/EntitySelector.java.patch index 7ccc2a76c..f5f909e68 100644 --- a/patches/minecraft/net/minecraft/command/EntitySelector.java.patch +++ b/patches/minecraft/net/minecraft/command/EntitySelector.java.patch @@ -277,23 +277,22 @@ list.add(new Predicate() { public boolean apply(@Nullable Entity p_apply_1_) -@@ -496,13 +499,13 @@ +@@ -496,9 +499,13 @@ { return false; } -- else if ("".equals(s1)) + else if ("".equals(s_f_)) - { - return p_apply_1_.func_184216_O().isEmpty() != flag; - } ++ { ++ return p_apply_1_.func_184216_O().isEmpty() != flag; ++ } else { -- return p_apply_1_.func_184216_O().contains(s1) != flag; +- return "".equals(s1) ? p_apply_1_.func_184216_O().isEmpty() != flag : p_apply_1_.func_184216_O().contains(s1) != flag; + return p_apply_1_.func_184216_O().contains(s_f_) != flag; } } }); -@@ -515,18 +518,18 @@ +@@ -511,18 +518,18 @@ { double d0 = (double)func_179653_a(p_180698_0_, field_190832_f, -1); double d1 = (double)func_179653_a(p_180698_0_, field_190831_e, -1); @@ -317,7 +316,7 @@ final double d5 = d4 * d4; return Lists.newArrayList(new Predicate() { -@@ -548,7 +551,7 @@ +@@ -544,7 +551,7 @@ private static List> func_179662_g(Map p_179662_0_) { @@ -326,7 +325,41 @@ if (p_179662_0_.containsKey(field_190844_r) || p_179662_0_.containsKey(field_190843_q)) { -@@ -611,16 +614,9 @@ +@@ -561,7 +568,15 @@ + else + { + int i1 = MathHelper.func_188209_b(MathHelper.func_76141_d(p_apply_1_.field_70177_z)); +- return i > j ? i1 >= i || i1 <= j : i1 >= i && i1 <= j; ++ ++ if (i > j) ++ { ++ return i1 >= i || i1 <= j; ++ } ++ else ++ { ++ return i1 >= i && i1 <= j; ++ } + } + } + }); +@@ -582,7 +597,15 @@ + else + { + int i1 = MathHelper.func_188209_b(MathHelper.func_76141_d(p_apply_1_.field_70125_A)); +- return k > l ? i1 >= k || i1 <= l : i1 >= k && i1 <= l; ++ ++ if (k > l) ++ { ++ return i1 >= k || i1 <= l; ++ } ++ else ++ { ++ return i1 >= k && i1 <= l; ++ } + } + } + }); +@@ -591,16 +614,9 @@ return list; } @@ -345,7 +378,7 @@ String s = func_179651_b(p_179660_0_, field_190849_w); s = s != null && s.startsWith("!") ? s.substring(1) : s; boolean flag = !p_179660_3_.equals("e"); -@@ -630,11 +626,39 @@ +@@ -610,11 +626,39 @@ int k = func_179653_a(p_179660_0_, field_190840_n, 0); int l = func_179653_a(p_179660_0_, field_190831_e, -1); Predicate predicate = Predicates.and(p_179660_2_); @@ -390,7 +423,7 @@ if (flag && !flag1) { -@@ -642,91 +666,47 @@ +@@ -622,91 +666,47 @@ { public boolean apply(@Nullable Entity p_apply_1_) { @@ -497,7 +530,7 @@ } if (i != 0) -@@ -758,27 +738,17 @@ +@@ -738,27 +738,17 @@ private static BlockPos func_179664_b(Map p_179664_0_, BlockPos p_179664_1_) { @@ -528,7 +561,7 @@ } private static boolean func_179665_h(Map p_179665_0_) -@@ -807,13 +777,13 @@ +@@ -787,13 +777,13 @@ public static Map func_96560_a(Map p_96560_0_) { @@ -544,7 +577,7 @@ } } -@@ -822,6 +792,11 @@ +@@ -802,6 +792,11 @@ public static boolean func_82377_a(String p_82377_0_) throws CommandException { @@ -556,7 +589,7 @@ Matcher matcher = field_82389_a.matcher(p_82377_0_); if (!matcher.matches()) -@@ -839,12 +814,17 @@ +@@ -819,12 +814,17 @@ public static boolean func_82378_b(String p_82378_0_) { @@ -575,7 +608,7 @@ if (p_82381_0_ == null) { -@@ -859,10 +839,10 @@ +@@ -839,10 +839,10 @@ if (!field_190851_y.apply(s1)) { diff --git a/patches/minecraft/net/minecraft/crash/CrashReport.java.patch b/patches/minecraft/net/minecraft/crash/CrashReport.java.patch index 2e9fa208b..688cec708 100644 --- a/patches/minecraft/net/minecraft/crash/CrashReport.java.patch +++ b/patches/minecraft/net/minecraft/crash/CrashReport.java.patch @@ -1,42 +1,14 @@ --- before/net/minecraft/crash/CrashReport.java +++ after/net/minecraft/crash/CrashReport.java -@@ -9,18 +9,26 @@ - import java.io.Writer; - import java.lang.management.ManagementFactory; - import java.lang.management.RuntimeMXBean; -+import java.lang.reflect.Method; - import java.nio.charset.StandardCharsets; +@@ -13,6 +13,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; -+import java.util.Set; + -+import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import net.minecraft.util.ReportedException; import net.minecraft.world.gen.layer.IntCache; -+import net.minecraftforge.fml.relauncher.MixinBooterPlugin; import net.minecraftforge.fml.relauncher.Side; - import net.minecraftforge.fml.relauncher.SideOnly; - import org.apache.commons.io.IOUtils; - import org.apache.commons.lang3.ArrayUtils; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; -+import org.spongepowered.asm.mixin.extensibility.IMixinInfo; -+import org.spongepowered.asm.mixin.transformer.ClassInfo; -+import org.spongepowered.asm.mixin.transformer.MixinInfo; - - public class CrashReport - { -@@ -28,7 +36,7 @@ - private final String field_71513_a; - private final Throwable field_71511_b; - private final CrashReportCategory field_85061_c = new CrashReportCategory(this, "System Details"); -- private final List field_71512_c = Lists.newArrayList(); -+ private final List field_71512_c = Lists.newArrayList(); - private File field_71510_d; - private boolean field_85059_f = true; - private StackTraceElement[] field_85060_g = new StackTraceElement[0]; -@@ -116,6 +124,7 @@ +@@ -116,6 +117,7 @@ return IntCache.func_85144_b(); } }); @@ -44,72 +16,15 @@ } public String func_71501_a() -@@ -132,7 +141,7 @@ - { - if ((this.field_85060_g == null || this.field_85060_g.length <= 0) && !this.field_71512_c.isEmpty()) - { -- this.field_85060_g = ArrayUtils.subarray(this.field_71512_c.get(0).func_147152_a(), 0, 1); -+ this.field_85060_g = (StackTraceElement[])ArrayUtils.subarray(((CrashReportCategory)this.field_71512_c.get(0)).func_147152_a(), 0, 1); - } - - if (this.field_85060_g != null && this.field_85060_g.length > 0) -@@ -143,7 +152,7 @@ - - for (StackTraceElement stacktraceelement : this.field_85060_g) - { -- p_71506_1_.append("\t").append("at ").append(stacktraceelement); -+ p_71506_1_.append("\t").append("at ").append((Object)stacktraceelement); - p_71506_1_.append("\n"); - } - -@@ -198,6 +207,46 @@ +@@ -198,18 +200,19 @@ IOUtils.closeQuietly((Writer)printwriter); } -+ StackTraceElement[] stacktrace = throwable.getStackTrace(); -+ if (stacktrace.length > 0) { -+ try { -+ StringBuilder mixinMetadataBuilder = null; -+ Set classes = new ObjectOpenHashSet<>(); -+ for (StackTraceElement stackTraceElement : stacktrace) { -+ classes.add(stackTraceElement.getClassName()); -+ } -+ for (String className : classes) { -+ ClassInfo classInfo = ClassInfo.fromCache(className); -+ if (classInfo != null) { -+ @SuppressWarnings("unchecked") -+ Set mixinInfos = classInfo.getMixins(); -+ if (!mixinInfos.isEmpty()) { -+ if (mixinMetadataBuilder == null) { -+ mixinMetadataBuilder = new StringBuilder("\n(MixinBooter) Mixins in Stacktrace:"); -+ } -+ mixinMetadataBuilder.append("\n\t"); -+ mixinMetadataBuilder.append(className); -+ mixinMetadataBuilder.append(":"); -+ for (IMixinInfo mixinInfo : mixinInfos) { -+ mixinMetadataBuilder.append("\n\t\t"); -+ mixinMetadataBuilder.append(mixinInfo.getClassName()); -+ mixinMetadataBuilder.append(" ("); -+ mixinMetadataBuilder.append(mixinInfo.getConfig().getName()); -+ mixinMetadataBuilder.append(")"); -+ } -+ } -+ } -+ } -+ -+ if (mixinMetadataBuilder == null) { -+ return s + "\nNo Mixin Metadata is found in the Stacktrace.\n"; -+ } else { -+ return s + mixinMetadataBuilder; -+ } -+ } catch (Throwable t) { -+ return s + "\nFailed to find Mixin Metadata in Stacktrace:\n" + t; -+ } -+ } - return s; +- return s; ++ return s + net.minecraftforge.common.ForgeHooks.gatherMixinInfo(throwable); } -@@ -205,11 +254,12 @@ + public String func_71502_e() { StringBuilder stringbuilder = new StringBuilder(); stringbuilder.append("---- Minecraft Crash Report ----\n"); @@ -123,7 +38,16 @@ stringbuilder.append("\n"); stringbuilder.append("Description: "); stringbuilder.append(this.field_71513_a); -@@ -247,26 +297,27 @@ +@@ -217,7 +220,7 @@ + stringbuilder.append(this.func_71498_d()); + stringbuilder.append("\n\nA detailed walkthrough of the error, its code path and all known details is as follows:\n"); + +- for (int i = 0; i < 87; i++) ++ for (int i = 0; i < 87; ++i) + { + stringbuilder.append("-"); + } +@@ -247,26 +250,27 @@ } Writer writer = null; @@ -155,7 +79,7 @@ } } -@@ -331,49 +382,13 @@ +@@ -331,49 +335,13 @@ private static String func_71503_h() { diff --git a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch index 828336286..1bad6e6d7 100644 --- a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch @@ -1,6 +1,15 @@ --- before/net/minecraft/enchantment/EnchantmentHelper.java +++ after/net/minecraft/enchantment/EnchantmentHelper.java -@@ -58,7 +58,7 @@ +@@ -40,7 +40,7 @@ + { + NBTTagList nbttaglist = p_77506_1_.func_77986_q(); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i); + Enchantment enchantment = Enchantment.func_185262_c(nbttagcompound.func_74765_d("id")); +@@ -58,15 +58,15 @@ public static Map func_82781_a(ItemStack p_82781_0_) { @@ -8,8 +17,9 @@ + Map map = Maps.newLinkedHashMap(); NBTTagList nbttaglist = p_82781_0_.func_77973_b() == Items.field_151134_bR ? ItemEnchantedBook.func_92110_g(p_82781_0_) : p_82781_0_.func_77986_q(); - for (int i = 0; i < nbttaglist.func_74745_c(); ++i) -@@ -66,7 +66,7 @@ +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i); Enchantment enchantment = Enchantment.func_185262_c(nbttagcompound.func_74765_d("id")); int j = nbttagcompound.func_74765_d("lvl"); @@ -27,6 +37,15 @@ NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.func_74777_a("id", (short)Enchantment.func_185258_b(enchantment)); nbttagcompound.func_74777_a("lvl", (short)i); +@@ -114,7 +114,7 @@ + { + NBTTagList nbttaglist = p_77518_1_.func_77986_q(); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + int j = nbttaglist.func_150305_b(i).func_74765_d("id"); + int k = nbttaglist.func_150305_b(i).func_74765_d("lvl"); @@ -140,6 +140,7 @@ field_77520_b.field_77497_a = 0; field_77520_b.field_77496_b = p_77508_1_; @@ -120,7 +139,7 @@ { iterator.remove(); } -@@ -407,13 +414,13 @@ +@@ -407,15 +414,15 @@ public static List func_185291_a(int p_185291_0_, ItemStack p_185291_1_, boolean p_185291_2_) { @@ -134,8 +153,11 @@ - if ((!enchantment.func_185261_e() || p_185291_2_) && (enchantment.field_77351_y.func_77557_a(item) || flag)) + if ((!enchantment.func_185261_e() || p_185291_2_) && (enchantment.canApplyAtEnchantingTable(p_185291_1_) || (flag && enchantment.isAllowedOnBooks()))) { - for (int i = enchantment.func_77325_b(); i > enchantment.func_77319_d() - 1; --i) +- for (int i = enchantment.func_77325_b(); i > enchantment.func_77319_d() - 1; i--) ++ for (int i = enchantment.func_77325_b(); i > enchantment.func_77319_d() - 1; --i) { + if (p_185291_0_ >= enchantment.func_77321_a(i) && p_185291_0_ <= enchantment.func_77317_b(i)) + { @@ -438,7 +445,6 @@ { } @@ -152,19 +174,27 @@ public void func_77493_a(Enchantment p_77493_1_, int p_77493_2_) { p_77493_1_.func_151367_b(this.field_151364_a, this.field_151363_b, p_77493_2_); -@@ -475,7 +480,6 @@ +@@ -475,10 +480,9 @@ { } - @Override public void func_77493_a(Enchantment p_77493_1_, int p_77493_2_) { - this.field_77497_a += p_77493_1_.func_77318_a(p_77493_2_, this.field_77496_b); -@@ -491,7 +495,6 @@ +- this.field_77497_a = this.field_77497_a + p_77493_1_.func_77318_a(p_77493_2_, this.field_77496_b); ++ this.field_77497_a += p_77493_1_.func_77318_a(p_77493_2_, this.field_77496_b); + } + } + +@@ -491,10 +495,9 @@ { } - @Override public void func_77493_a(Enchantment p_77493_1_, int p_77493_2_) { - this.field_77495_a += p_77493_1_.func_152376_a(p_77493_2_, this.field_77494_b); +- this.field_77495_a = this.field_77495_a + p_77493_1_.func_152376_a(p_77493_2_, this.field_77494_b); ++ this.field_77495_a += p_77493_1_.func_152376_a(p_77493_2_, this.field_77494_b); + } + } + } diff --git a/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch b/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch index 65a40c8ea..6b8769082 100644 --- a/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/EnchantmentThorns.java.patch @@ -32,7 +32,7 @@ public void func_151367_b(EntityLivingBase p_151367_1_, Entity p_151367_2_, int p_151367_3_) { Random random = p_151367_1_.func_70681_au(); -@@ -56,12 +51,12 @@ +@@ -56,22 +51,50 @@ if (!itemstack.func_190926_b()) { @@ -47,7 +47,19 @@ } } -@@ -80,5 +75,26 @@ + public static boolean func_92094_a(int p_92094_0_, Random p_92094_1_) + { +- return p_92094_0_ <= 0 ? false : p_92094_1_.nextFloat() < 0.15F * (float)p_92094_0_; ++ if (p_92094_0_ <= 0) ++ { ++ return false; ++ } ++ else ++ { ++ return p_92094_1_.nextFloat() < 0.15F * (float)p_92094_0_; ++ } + } + public static int func_92095_b(int p_92095_0_, Random p_92095_1_) { return p_92095_0_ > 10 ? p_92095_0_ - 10 : 1 + p_92095_1_.nextInt(4); diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index 6ab50fcdf..8b7698614 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -96,23 +96,29 @@ public int func_145782_y() { -@@ -258,7 +270,6 @@ +@@ -258,13 +270,18 @@ return this.field_70180_af; } - @Override public boolean equals(Object p_equals_1_) { - if (p_equals_1_ instanceof Entity) -@@ -271,7 +282,6 @@ - } +- return p_equals_1_ instanceof Entity ? ((Entity)p_equals_1_).field_145783_c == this.field_145783_c : false; ++ if (p_equals_1_ instanceof Entity) ++ { ++ return ((Entity)p_equals_1_).field_145783_c == this.field_145783_c; ++ } ++ else ++ { ++ return false; ++ } } - @Override public int hashCode() { return this.field_145783_c; -@@ -282,7 +292,7 @@ +@@ -275,7 +292,7 @@ { if (this.field_70170_p != null) { @@ -121,8 +127,12 @@ { this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v); -@@ -294,9 +304,9 @@ - ++this.field_70163_u; +@@ -284,12 +301,12 @@ + break; + } + +- this.field_70163_u++; ++ ++this.field_70163_u; } - this.field_70159_w = 0.0; @@ -134,7 +144,7 @@ this.field_70125_A = 0.0F; } } -@@ -320,35 +330,17 @@ +@@ -313,35 +330,17 @@ if (this.field_70130_N < f) { @@ -174,7 +184,7 @@ } } } -@@ -364,11 +356,10 @@ +@@ -357,11 +356,10 @@ this.field_70165_t = p_70107_1_; this.field_70163_u = p_70107_3_; this.field_70161_v = p_70107_5_; @@ -188,7 +198,7 @@ } @SideOnly(Side.CLIENT) -@@ -376,8 +367,8 @@ +@@ -369,11 +367,11 @@ { float f = this.field_70125_A; float f1 = this.field_70177_z; @@ -197,9 +207,32 @@ + this.field_70177_z = (float)((double)this.field_70177_z + (double)p_70082_1_ * 0.15D); + this.field_70125_A = (float)((double)this.field_70125_A - (double)p_70082_2_ * 0.15D); this.field_70125_A = MathHelper.func_76131_a(this.field_70125_A, -90.0F, 90.0F); - this.field_70127_C += this.field_70125_A - f; - this.field_70126_B += this.field_70177_z - f1; -@@ -507,7 +498,7 @@ +- this.field_70127_C = this.field_70127_C + (this.field_70125_A - f); +- this.field_70126_B = this.field_70126_B + (this.field_70177_z - f1); ++ this.field_70127_C += this.field_70125_A - f; ++ this.field_70126_B += this.field_70177_z - f1; + + if (this.field_184239_as != null) + { +@@ -402,7 +400,7 @@ + + if (this.field_184245_j > 0) + { +- this.field_184245_j--; ++ --this.field_184245_j; + } + + this.field_70141_P = this.field_70140_Q; +@@ -490,7 +488,7 @@ + this.func_70097_a(DamageSource.field_76370_b, 1.0F); + } + +- this.field_190534_ay--; ++ --this.field_190534_ay; + } + } + +@@ -500,7 +498,7 @@ this.field_70143_R *= 0.5F; } @@ -208,7 +241,16 @@ { this.func_70076_C(); } -@@ -594,47 +585,47 @@ +@@ -518,7 +516,7 @@ + { + if (this.field_71088_bW > 0) + { +- this.field_71088_bW--; ++ --this.field_71088_bW; + } + } + +@@ -587,47 +585,47 @@ if (i != this.field_191506_aJ) { @@ -266,7 +308,7 @@ { return; } -@@ -649,12 +640,12 @@ +@@ -642,12 +640,12 @@ if (this.field_70134_J) { this.field_70134_J = false; @@ -285,7 +327,7 @@ } double d2 = p_70091_2_; -@@ -663,81 +654,66 @@ +@@ -656,81 +654,66 @@ if ((p_70091_1_ == MoverType.SELF || p_70091_1_ == MoverType.PLAYER) && this.field_70122_E && this.func_70093_af() && this instanceof EntityPlayer) { @@ -417,7 +459,7 @@ } } } -@@ -745,49 +721,49 @@ +@@ -738,49 +721,49 @@ List list1 = this.field_70170_p.func_184144_a(this, this.func_174813_aQ().func_72321_a(p_70091_2_, p_70091_4_, p_70091_6_)); AxisAlignedBB axisalignedbb = this.func_174813_aQ(); @@ -426,7 +468,8 @@ { int k = 0; - for (int l = list1.size(); k < l; ++k) +- for (int l = list1.size(); k < l; k++) ++ for (int l = list1.size(); k < l; ++k) { - p_70091_4_ = list1.get(k).func_72323_b(this.func_174813_aQ(), p_70091_4_); + p_70091_4_ = ((AxisAlignedBB)list1.get(k)).func_72323_b(this.func_174813_aQ(), p_70091_4_); @@ -441,7 +484,8 @@ { int j5 = 0; - for (int l5 = list1.size(); j5 < l5; ++j5) +- for (int l5 = list1.size(); j5 < l5; j5++) ++ for (int l5 = list1.size(); j5 < l5; ++j5) { - p_70091_2_ = list1.get(j5).func_72316_a(this.func_174813_aQ(), p_70091_2_); + p_70091_2_ = ((AxisAlignedBB)list1.get(j5)).func_72316_a(this.func_174813_aQ(), p_70091_2_); @@ -460,7 +504,8 @@ { int k5 = 0; - for (int i6 = list1.size(); k5 < i6; ++k5) +- for (int i6 = list1.size(); k5 < i6; k5++) ++ for (int i6 = list1.size(); k5 < i6; ++k5) { - p_70091_6_ = list1.get(k5).func_72322_c(this.func_174813_aQ(), p_70091_6_); + p_70091_6_ = ((AxisAlignedBB)list1.get(k5)).func_72322_c(this.func_174813_aQ(), p_70091_6_); @@ -479,7 +524,7 @@ if (this.field_70138_W > 0.0F && flag && (d2 != p_70091_2_ || d4 != p_70091_6_)) { -@@ -799,62 +775,62 @@ +@@ -792,62 +775,62 @@ p_70091_4_ = (double)this.field_70138_W; List list = this.field_70170_p.func_184144_a(this, this.func_174813_aQ().func_72321_a(d2, p_70091_4_, d4)); AxisAlignedBB axisalignedbb2 = this.func_174813_aQ(); @@ -488,7 +533,8 @@ double d8 = p_70091_4_; int j1 = 0; - for (int k1 = list.size(); j1 < k1; ++j1) +- for (int k1 = list.size(); j1 < k1; j1++) ++ for (int k1 = list.size(); j1 < k1; ++j1) { - d8 = list.get(j1).func_72323_b(axisalignedbb3, d8); + d8 = ((AxisAlignedBB)list.get(j1)).func_72323_b(axisalignedbb3, d8); @@ -499,7 +545,8 @@ double d18 = d2; int l1 = 0; - for (int i2 = list.size(); l1 < i2; ++l1) +- for (int i2 = list.size(); l1 < i2; l1++) ++ for (int i2 = list.size(); l1 < i2; ++l1) { - d18 = list.get(l1).func_72316_a(axisalignedbb2, d18); + d18 = ((AxisAlignedBB)list.get(l1)).func_72316_a(axisalignedbb2, d18); @@ -510,7 +557,8 @@ double d19 = d4; int j2 = 0; - for (int k2 = list.size(); j2 < k2; ++j2) +- for (int k2 = list.size(); j2 < k2; j2++) ++ for (int k2 = list.size(); j2 < k2; ++j2) { - d19 = list.get(j2).func_72322_c(axisalignedbb2, d19); + d19 = ((AxisAlignedBB)list.get(j2)).func_72322_c(axisalignedbb2, d19); @@ -522,7 +570,8 @@ double d20 = p_70091_4_; int l2 = 0; - for (int i3 = list.size(); l2 < i3; ++l2) +- for (int i3 = list.size(); l2 < i3; l2++) ++ for (int i3 = list.size(); l2 < i3; ++l2) { - d20 = list.get(l2).func_72323_b(axisalignedbb4, d20); + d20 = ((AxisAlignedBB)list.get(l2)).func_72323_b(axisalignedbb4, d20); @@ -533,7 +582,8 @@ double d21 = d2; int j3 = 0; - for (int k3 = list.size(); j3 < k3; ++j3) +- for (int k3 = list.size(); j3 < k3; j3++) ++ for (int k3 = list.size(); j3 < k3; ++j3) { - d21 = list.get(j3).func_72316_a(axisalignedbb5, d21); + d21 = ((AxisAlignedBB)list.get(j3)).func_72316_a(axisalignedbb4, d21); @@ -544,7 +594,8 @@ double d22 = d4; int l3 = 0; - for (int i4 = list.size(); l3 < i4; ++l3) +- for (int i4 = list.size(); l3 < i4; l3++) ++ for (int i4 = list.size(); l3 < i4; ++l3) { - d22 = list.get(l3).func_72322_c(axisalignedbb6, d22); + d22 = ((AxisAlignedBB)list.get(l3)).func_72322_c(axisalignedbb4, d22); @@ -555,7 +606,7 @@ double d23 = d18 * d18 + d19 * d19; double d9 = d21 * d21 + d22 * d22; -@@ -870,17 +846,17 @@ +@@ -863,17 +846,17 @@ p_70091_2_ = d21; p_70091_6_ = d22; p_70091_4_ = -d20; @@ -565,7 +616,8 @@ int j4 = 0; - for (int k4 = list.size(); j4 < k4; ++j4) +- for (int k4 = list.size(); j4 < k4; j4++) ++ for (int k4 = list.size(); j4 < k4; ++j4) { - p_70091_4_ = list.get(j4).func_72323_b(this.func_174813_aQ(), p_70091_4_); + p_70091_4_ = ((AxisAlignedBB)list.get(j4)).func_72323_b(this.func_174813_aQ(), p_70091_4_); @@ -576,7 +628,7 @@ if (d14 * d14 + d7 * d7 >= p_70091_2_ * p_70091_2_ + p_70091_6_ * p_70091_6_) { -@@ -896,10 +872,10 @@ +@@ -889,10 +872,10 @@ this.func_174829_m(); this.field_70123_F = d2 != p_70091_2_ || d4 != p_70091_6_; this.field_70124_G = d3 != p_70091_4_; @@ -589,7 +641,7 @@ int k6 = MathHelper.func_76128_c(this.field_70161_v); BlockPos blockpos = new BlockPos(j6, i1, k6); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); -@@ -921,12 +897,12 @@ +@@ -914,12 +897,12 @@ if (d2 != p_70091_2_) { @@ -604,7 +656,7 @@ } Block block = iblockstate.func_177230_c(); -@@ -944,7 +920,7 @@ +@@ -937,7 +920,7 @@ if (block != Blocks.field_150468_ap) { @@ -613,7 +665,7 @@ } if (block != null && this.field_70122_E) -@@ -952,8 +928,8 @@ +@@ -945,8 +928,8 @@ block.func_176199_a(this.field_70170_p, blockpos, this); } @@ -624,7 +676,7 @@ if (this.field_82151_R > (float)this.field_70150_b && iblockstate.func_185904_a() != Material.field_151579_a) { -@@ -963,12 +939,7 @@ +@@ -956,12 +939,7 @@ { Entity entity = this.func_184207_aI() && this.func_184179_bs() != null ? this.func_184179_bs() : this; float f = entity == this ? 0.35F : 0.4F; @@ -638,7 +690,7 @@ if (f1 > 1.0F) { -@@ -1002,7 +973,7 @@ +@@ -995,13 +973,13 @@ boolean flag1 = this.func_70026_G(); @@ -647,7 +699,14 @@ { this.func_70081_e(1); -@@ -1034,9 +1005,10 @@ + if (!flag1) + { +- this.field_190534_ay++; ++ ++this.field_190534_ay; + + if (this.field_190534_ay == 0) + { +@@ -1027,9 +1005,10 @@ public void func_174829_m() { AxisAlignedBB axisalignedbb = this.func_174813_aQ(); @@ -660,7 +719,7 @@ } protected SoundEvent func_184184_Z() -@@ -1052,12 +1024,8 @@ +@@ -1045,21 +1024,17 @@ protected void func_145775_I() { AxisAlignedBB axisalignedbb = this.func_174813_aQ(); @@ -675,7 +734,19 @@ BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos2 = BlockPos.PooledMutableBlockPos.func_185346_s(); if (this.field_70170_p.func_175707_a(blockpos$pooledmutableblockpos, blockpos$pooledmutableblockpos1)) -@@ -1099,7 +1067,7 @@ + { +- for (int i = blockpos$pooledmutableblockpos.func_177958_n(); i <= blockpos$pooledmutableblockpos1.func_177958_n(); i++) ++ for (int i = blockpos$pooledmutableblockpos.func_177958_n(); i <= blockpos$pooledmutableblockpos1.func_177958_n(); ++i) + { +- for (int j = blockpos$pooledmutableblockpos.func_177956_o(); j <= blockpos$pooledmutableblockpos1.func_177956_o(); j++) ++ for (int j = blockpos$pooledmutableblockpos.func_177956_o(); j <= blockpos$pooledmutableblockpos1.func_177956_o(); ++j) + { +- for (int k = blockpos$pooledmutableblockpos.func_177952_p(); k <= blockpos$pooledmutableblockpos1.func_177952_p(); k++) ++ for (int k = blockpos$pooledmutableblockpos.func_177952_p(); k <= blockpos$pooledmutableblockpos1.func_177952_p(); ++k) + { + blockpos$pooledmutableblockpos2.func_181079_c(i, j, k); + IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos$pooledmutableblockpos2); +@@ -1092,7 +1067,7 @@ protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_) { @@ -684,7 +755,7 @@ if (this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a()).func_177230_c() == Blocks.field_150431_aC) { -@@ -1126,29 +1094,28 @@ +@@ -1119,29 +1094,28 @@ { if (!this.func_174814_R()) { @@ -719,7 +790,7 @@ } protected boolean func_70041_e_() -@@ -1167,7 +1134,7 @@ +@@ -1160,7 +1134,7 @@ this.field_70143_R = 0.0F; } @@ -728,7 +799,7 @@ { this.field_70143_R = (float)((double)this.field_70143_R - p_184231_1_); } -@@ -1211,15 +1178,9 @@ +@@ -1204,15 +1178,9 @@ } else { @@ -746,7 +817,7 @@ { blockpos$pooledmutableblockpos.func_185344_t(); return false; -@@ -1239,7 +1200,7 @@ +@@ -1232,7 +1200,7 @@ public boolean func_191953_am() { @@ -755,7 +826,7 @@ } public boolean func_70072_I() -@@ -1248,7 +1209,7 @@ +@@ -1241,7 +1209,7 @@ { this.field_70171_ac = false; } @@ -764,7 +835,7 @@ { if (!this.field_70171_ac && !this.field_70148_d) { -@@ -1271,12 +1232,7 @@ +@@ -1264,12 +1232,7 @@ { Entity entity = this.func_184207_aI() && this.func_184179_bs() != null ? this.func_184179_bs() : this; float f = entity == this ? 0.2F : 0.9F; @@ -778,7 +849,12 @@ if (f1 > 1.0F) { -@@ -1290,32 +1246,14 @@ +@@ -1279,36 +1242,18 @@ + this.func_184185_a(this.func_184181_aa(), f1, 1.0F + (this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.4F); + float f2 = (float)MathHelper.func_76128_c(this.func_174813_aQ().field_72338_b); + +- for (int i = 0; (float)i < 1.0F + this.field_70130_N * 20.0F; i++) ++ for (int i = 0; (float)i < 1.0F + this.field_70130_N * 20.0F; ++i) { float f3 = (this.field_70146_Z.nextFloat() * 2.0F - 1.0F) * this.field_70130_N; float f4 = (this.field_70146_Z.nextFloat() * 2.0F - 1.0F) * this.field_70130_N; @@ -795,7 +871,8 @@ + this.field_70170_p.func_175688_a(EnumParticleTypes.WATER_BUBBLE, this.field_70165_t + (double)f3, (double)(f2 + 1.0F), this.field_70161_v + (double)f4, this.field_70159_w, this.field_70181_x - (double)(this.field_70146_Z.nextFloat() * 0.2F), this.field_70179_y); } - for (int j = 0; (float)j < 1.0F + this.field_70130_N * 20.0F; ++j) +- for (int j = 0; (float)j < 1.0F + this.field_70130_N * 20.0F; j++) ++ for (int j = 0; (float)j < 1.0F + this.field_70130_N * 20.0F; ++j) { float f5 = (this.field_70146_Z.nextFloat() * 2.0F - 1.0F) * this.field_70130_N; float f6 = (this.field_70146_Z.nextFloat() * 2.0F - 1.0F) * this.field_70130_N; @@ -813,7 +890,7 @@ } } -@@ -1330,24 +1268,15 @@ +@@ -1323,24 +1268,15 @@ protected void func_174808_Z() { int i = MathHelper.func_76128_c(this.field_70165_t); @@ -841,7 +918,7 @@ } } -@@ -1363,12 +1292,12 @@ +@@ -1356,12 +1292,12 @@ BlockPos blockpos = new BlockPos(this.field_70165_t, d0, this.field_70161_v); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -858,7 +935,7 @@ } else { -@@ -1379,14 +1308,14 @@ +@@ -1372,14 +1308,14 @@ public boolean func_180799_ab() { @@ -875,7 +952,7 @@ { f = MathHelper.func_76129_c(f); -@@ -1396,11 +1325,11 @@ +@@ -1389,11 +1325,11 @@ } f = p_191958_4_ / f; @@ -892,7 +969,7 @@ this.field_70159_w += (double)(p_191958_1_ * f2 - p_191958_3_ * f1); this.field_70181_x += (double)p_191958_2_; this.field_70179_y += (double)(p_191958_3_ * f2 + p_191958_1_ * f1); -@@ -1410,9 +1339,7 @@ +@@ -1403,9 +1339,7 @@ @SideOnly(Side.CLIENT) public int func_70070_b() { @@ -903,7 +980,7 @@ if (this.field_70170_p.func_175667_e(blockpos$mutableblockpos)) { -@@ -1427,9 +1354,7 @@ +@@ -1420,9 +1354,7 @@ public float func_70013_c() { @@ -914,7 +991,7 @@ if (this.field_70170_p.func_175667_e(blockpos$mutableblockpos)) { -@@ -1449,9 +1374,9 @@ +@@ -1442,9 +1374,9 @@ public void func_70080_a(double p_70080_1_, double p_70080_3_, double p_70080_5_, float p_70080_7_, float p_70080_8_) { @@ -926,7 +1003,7 @@ this.field_70169_q = this.field_70165_t; this.field_70167_r = this.field_70163_u; this.field_70166_s = this.field_70161_v; -@@ -1462,25 +1387,24 @@ +@@ -1455,25 +1387,24 @@ this.field_70127_C = this.field_70125_A; double d0 = (double)(this.field_70126_B - p_70080_7_); @@ -956,7 +1033,7 @@ } public void func_70012_b(double p_70012_1_, double p_70012_3_, double p_70012_5_, float p_70012_7_, float p_70012_8_) -@@ -1555,33 +1479,33 @@ +@@ -1548,33 +1479,33 @@ double d1 = p_70108_1_.field_70161_v - this.field_70161_v; double d2 = MathHelper.func_76132_a(d0, d1); @@ -1004,7 +1081,7 @@ } } } -@@ -1630,10 +1554,10 @@ +@@ -1623,10 +1554,10 @@ protected final Vec3d func_174806_f(float p_174806_1_, float p_174806_2_) { @@ -1019,7 +1096,7 @@ return new Vec3d((double)(f1 * f2), (double)f3, (double)(f * f2)); } -@@ -1697,10 +1621,10 @@ +@@ -1690,10 +1621,10 @@ if (Double.isNaN(d0)) { @@ -1032,7 +1109,7 @@ return p_70112_1_ < d0 * d0; } -@@ -1740,7 +1664,6 @@ +@@ -1733,14 +1664,13 @@ { p_190533_0_.func_188258_a(FixTypes.ENTITY, new IDataWalker() { @@ -1040,7 +1117,15 @@ public NBTTagCompound func_188266_a(IDataFixer p_188266_1_, NBTTagCompound p_188266_2_, int p_188266_3_) { if (p_188266_2_.func_150297_b("Passengers", 9)) -@@ -1800,6 +1723,7 @@ + { + NBTTagList nbttaglist = p_188266_2_.func_150295_c("Passengers", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + nbttaglist.func_150304_a(i, p_188266_1_.func_188251_a(FixTypes.ENTITY, nbttaglist.func_150305_b(i), p_188266_3_)); + } +@@ -1793,6 +1723,7 @@ { p_189511_1_.func_74757_a("Glowing", this.field_184238_ar); } @@ -1048,7 +1133,7 @@ if (!this.field_184236_aF.isEmpty()) { -@@ -1813,6 +1737,9 @@ +@@ -1806,6 +1737,9 @@ p_189511_1_.func_74782_a("Tags", nbttaglist); } @@ -1058,7 +1143,7 @@ this.func_70014_b(p_189511_1_); if (this.func_184207_aI()) -@@ -1857,19 +1784,19 @@ +@@ -1850,19 +1784,19 @@ this.field_70181_x = nbttaglist2.func_150309_d(1); this.field_70179_y = nbttaglist2.func_150309_d(2); @@ -1091,7 +1176,7 @@ } this.field_70165_t = nbttaglist.func_150309_d(0); -@@ -1919,6 +1846,10 @@ +@@ -1912,6 +1846,10 @@ this.func_174810_b(p_70020_1_.func_74767_n("Silent")); this.func_189654_d(p_70020_1_.func_74767_n("NoGravity")); this.func_184195_f(p_70020_1_.func_74767_n("Glowing")); @@ -1102,7 +1187,16 @@ if (p_70020_1_.func_150297_b("Tags", 9)) { -@@ -2011,7 +1942,10 @@ +@@ -1919,7 +1857,7 @@ + NBTTagList nbttaglist1 = p_70020_1_.func_150295_c("Tags", 8); + int i = Math.min(nbttaglist1.func_74745_c(), 1024); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + this.field_184236_aF.add(nbttaglist1.func_150307_f(j)); + } +@@ -2004,7 +1942,10 @@ { EntityItem entityitem = new EntityItem(this.field_70170_p, this.field_70165_t, this.field_70163_u + (double)p_70099_2_, this.field_70161_v, p_70099_1_); entityitem.func_174869_p(); @@ -1114,7 +1208,14 @@ return entityitem; } } -@@ -2037,9 +1971,7 @@ +@@ -2024,15 +1965,13 @@ + { + BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); + +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) + { + int j = MathHelper.func_76128_c(this.field_70163_u + (double)(((float)((i >> 0) % 2) - 0.5F) * 0.1F) + (double)this.func_70047_e()); int k = MathHelper.func_76128_c(this.field_70165_t + (double)(((float)((i >> 1) % 2) - 0.5F) * this.field_70130_N * 0.8F)); int l = MathHelper.func_76128_c(this.field_70161_v + (double)(((float)((i >> 2) % 2) - 0.5F) * this.field_70130_N * 0.8F)); @@ -1125,7 +1226,7 @@ { blockpos$pooledmutableblockpos.func_181079_c(k, j, l); -@@ -2077,9 +2009,10 @@ +@@ -2070,9 +2009,10 @@ } else { @@ -1139,7 +1240,7 @@ this.func_70071_h_(); if (this.func_184218_aH()) -@@ -2104,12 +2037,12 @@ +@@ -2097,12 +2037,12 @@ public double func_70033_W() { @@ -1154,7 +1255,7 @@ } public boolean func_184220_m(Entity p_184220_1_) -@@ -2127,6 +2060,7 @@ +@@ -2120,6 +2060,7 @@ } } @@ -1162,16 +1263,19 @@ if (p_184205_2_ || this.func_184228_n(p_184205_1_) && p_184205_1_.func_184219_q(this)) { if (this.func_184218_aH()) -@@ -2153,7 +2087,7 @@ +@@ -2144,9 +2085,9 @@ + + public void func_184226_ay() { - for (int i = this.field_184244_h.size() - 1; i >= 0; --i) +- for (int i = this.field_184244_h.size() - 1; i >= 0; i--) ++ for (int i = this.field_184244_h.size() - 1; i >= 0; --i) { - this.field_184244_h.get(i).func_184210_p(); + ((Entity)this.field_184244_h.get(i)).func_184210_p(); } } -@@ -2162,6 +2096,7 @@ +@@ -2155,6 +2096,7 @@ if (this.field_184239_as != null) { Entity entity = this.field_184239_as; @@ -1179,7 +1283,7 @@ this.field_184239_as = null; entity.func_184225_p(this); } -@@ -2205,9 +2140,7 @@ +@@ -2198,9 +2140,7 @@ } @SideOnly(Side.CLIENT) @@ -1190,7 +1294,7 @@ { this.func_70107_b(p_180426_1_, p_180426_3_, p_180426_5_); this.func_70101_b(p_180426_7_, p_180426_8_); -@@ -2247,23 +2180,11 @@ +@@ -2240,23 +2180,11 @@ { this.field_181016_an = new BlockPos(p_181015_1_); BlockPattern.PatternHelper blockpattern$patternhelper = Blocks.field_150427_aO.func_181089_f(this.field_70170_p, this.field_181016_an); @@ -1218,7 +1322,7 @@ this.field_181018_ap = blockpattern$patternhelper.func_177669_b(); } -@@ -2306,7 +2227,7 @@ +@@ -2299,7 +2227,7 @@ public Iterable func_184209_aF() { @@ -1227,7 +1331,7 @@ } public void func_184201_a(EntityEquipmentSlot p_184201_1_, ItemStack p_184201_2_) -@@ -2406,31 +2327,31 @@ +@@ -2399,37 +2327,37 @@ protected boolean func_70083_f(int p_70083_1_) { @@ -1265,7 +1369,14 @@ } public void func_70077_a(EntityLightningBolt p_70077_1_) -@@ -2470,9 +2391,9 @@ + { + this.func_70097_a(DamageSource.field_180137_b, 5.0F); +- this.field_190534_ay++; ++ ++this.field_190534_ay; + + if (this.field_190534_ay == 0) + { +@@ -2463,9 +2391,9 @@ enumfacing = EnumFacing.WEST; } @@ -1277,7 +1388,7 @@ enumfacing = EnumFacing.EAST; } -@@ -2482,15 +2403,15 @@ +@@ -2475,15 +2403,15 @@ enumfacing = EnumFacing.NORTH; } @@ -1297,7 +1408,7 @@ enumfacing = EnumFacing.UP; } -@@ -2500,19 +2421,19 @@ +@@ -2493,19 +2421,19 @@ if (enumfacing.func_176740_k() == EnumFacing.Axis.X) { this.field_70159_w = (double)(f1 * f); @@ -1323,7 +1434,7 @@ this.field_70179_y = (double)(f1 * f); } -@@ -2526,7 +2447,6 @@ +@@ -2519,7 +2447,6 @@ this.field_70143_R = 0.0F; } @@ -1331,7 +1442,7 @@ public String func_70005_c_() { if (this.func_145818_k_()) -@@ -2580,19 +2500,9 @@ +@@ -2573,19 +2500,9 @@ return false; } @@ -1352,7 +1463,7 @@ } public boolean func_180431_b(DamageSource p_180431_1_) -@@ -2629,8 +2539,16 @@ +@@ -2622,8 +2539,16 @@ @Nullable public Entity func_184204_a(int p_184204_1_) { @@ -1369,7 +1480,7 @@ this.field_70170_p.field_72984_F.func_76320_a("changeDimension"); MinecraftServer minecraftserver = this.func_184102_h(); int i = this.field_71093_bK; -@@ -2638,7 +2556,7 @@ +@@ -2631,7 +2556,7 @@ WorldServer worldserver1 = minecraftserver.func_71218_a(p_184204_1_); this.field_71093_bK = p_184204_1_; @@ -1378,7 +1489,7 @@ { worldserver1 = minecraftserver.func_71218_a(0); this.field_71093_bK = 0; -@@ -2649,41 +2567,33 @@ +@@ -2642,53 +2567,45 @@ this.field_70170_p.field_72984_F.func_76320_a("reposition"); BlockPos blockpos; @@ -1432,7 +1543,12 @@ blockpos = new BlockPos(this); } -@@ -2695,7 +2605,7 @@ + worldserver.func_72866_a(this, false); + this.field_70170_p.field_72984_F.func_76318_c("reloading"); +- Entity entity = EntityList.func_191304_a((Class )this.getClass(), worldserver1); ++ Entity entity = EntityList.func_191304_a(this.getClass(), worldserver1); + + if (entity != null) { entity.func_180432_n(this); @@ -1441,7 +1557,7 @@ { BlockPos blockpos1 = worldserver1.func_175672_r(worldserver1.func_175694_M()); entity.func_174828_a(blockpos1, entity.field_70177_z, entity.field_70125_A); -@@ -2732,7 +2642,7 @@ +@@ -2725,7 +2642,7 @@ public float func_180428_a(Explosion p_180428_1_, World p_180428_2_, BlockPos p_180428_3_, IBlockState p_180428_4_) { @@ -1450,7 +1566,7 @@ } public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_) -@@ -2769,7 +2679,7 @@ +@@ -2762,7 +2679,7 @@ return EntityList.func_191301_a(Entity.this) + " (" + Entity.this.getClass().getCanonicalName() + ")"; } }); @@ -1459,7 +1575,7 @@ p_85029_1_.func_189529_a("Entity Name", new ICrashReportDetail() { public String call() throws Exception -@@ -2778,12 +2688,7 @@ +@@ -2771,12 +2688,7 @@ } }); p_85029_1_.func_71507_a("Entity's Exact location", String.format("%.2f, %.2f, %.2f", this.field_70165_t, this.field_70163_u, this.field_70161_v)); @@ -1473,7 +1589,7 @@ p_85029_1_.func_71507_a("Entity's Momentum", String.format("%.2f, %.2f, %.2f", this.field_70159_w, this.field_70181_x, this.field_70179_y)); p_85029_1_.func_189529_a("Entity's Passengers", new ICrashReportDetail() { -@@ -2801,18 +2706,18 @@ +@@ -2794,18 +2706,18 @@ }); } @@ -1498,7 +1614,7 @@ public UUID func_110124_au() { return this.field_96093_i; -@@ -2840,7 +2745,6 @@ +@@ -2833,7 +2745,6 @@ field_70155_l = p_184227_0_; } @@ -1506,7 +1622,7 @@ public ITextComponent func_145748_c_() { TextComponentString textcomponentstring = new TextComponentString(ScorePlayerTeam.func_96667_a(this.func_96124_cp(), this.func_70005_c_())); -@@ -2856,22 +2760,22 @@ +@@ -2849,22 +2760,22 @@ public String func_95999_t() { @@ -1533,7 +1649,7 @@ } public void func_70634_a(double p_70634_1_, double p_70634_3_, double p_70634_5_) -@@ -2881,19 +2785,19 @@ +@@ -2874,19 +2785,19 @@ this.field_70170_p.func_72866_a(this, false); } @@ -1558,7 +1674,7 @@ } public EnumFacing func_184172_bi() -@@ -2957,48 +2861,40 @@ +@@ -2950,48 +2861,40 @@ return false; } @@ -1608,7 +1724,7 @@ public void func_174794_a(CommandResultStats.Type p_174794_1_, int p_174794_2_) { if (this.field_70170_p != null && !this.field_70170_p.field_72995_K) -@@ -3008,7 +2904,6 @@ +@@ -3001,7 +2904,6 @@ } @Nullable @@ -1616,7 +1732,7 @@ public MinecraftServer func_184102_h() { return this.field_70170_p.func_73046_m(); -@@ -3044,6 +2939,218 @@ +@@ -3037,6 +2939,218 @@ EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_); } @@ -1835,7 +1951,7 @@ public void func_184178_b(EntityPlayerMP p_184178_1_) { } -@@ -3122,14 +3229,14 @@ +@@ -3115,14 +3229,14 @@ public Collection func_184182_bu() { @@ -1852,7 +1968,7 @@ this.func_184175_a(p_184180_1_, set); return set; } -@@ -3149,11 +3256,11 @@ +@@ -3142,11 +3256,11 @@ public Entity func_184208_bv() { @@ -1867,3 +1983,20 @@ } return entity; +@@ -3178,7 +3292,15 @@ + public boolean func_184186_bw() + { + Entity entity = this.func_184179_bs(); +- return entity instanceof EntityPlayer ? ((EntityPlayer)entity).func_175144_cb() : !this.field_70170_p.field_72995_K; ++ ++ if (entity instanceof EntityPlayer) ++ { ++ return ((EntityPlayer)entity).func_175144_cb(); ++ } ++ else ++ { ++ return !this.field_70170_p.field_72995_K; ++ } + } + + @Nullable diff --git a/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch b/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch index 2261612f4..25cf92e6c 100644 --- a/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityAgeable.java.patch @@ -121,7 +121,7 @@ public void func_70636_d() { super.func_70636_d(); -@@ -188,16 +183,7 @@ +@@ -188,19 +183,10 @@ { if (this.field_175503_c % 4 == 0) { @@ -138,7 +138,11 @@ + this.field_70170_p.func_175688_a(EnumParticleTypes.VILLAGER_HAPPY, this.field_70165_t + (double)(this.field_70146_Z.nextFloat() * this.field_70130_N * 2.0F) - (double)this.field_70130_N, this.field_70163_u + 0.5D + (double)(this.field_70146_Z.nextFloat() * this.field_70131_O), this.field_70161_v + (double)(this.field_70146_Z.nextFloat() * this.field_70130_N * 2.0F) - (double)this.field_70130_N, 0.0D, 0.0D, 0.0D); } - --this.field_175503_c; +- this.field_175503_c--; ++ --this.field_175503_c; + } + } + else @@ -209,7 +195,8 @@ if (i < 0) diff --git a/patches/minecraft/net/minecraft/entity/EntityFlying.java.patch b/patches/minecraft/net/minecraft/entity/EntityFlying.java.patch index b03f203c7..ffad1ecd8 100644 --- a/patches/minecraft/net/minecraft/entity/EntityFlying.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityFlying.java.patch @@ -83,8 +83,14 @@ } this.func_70091_d(MoverType.SELF, this.field_70159_w, this.field_70181_x, this.field_70179_y); -@@ -99,7 +80,6 @@ - this.field_184619_aG += this.field_70721_aZ; +@@ -95,11 +76,10 @@ + f2 = 1.0F; + } + +- this.field_70721_aZ = this.field_70721_aZ + (f2 - this.field_70721_aZ) * 0.4F; +- this.field_184619_aG = this.field_184619_aG + this.field_70721_aZ; ++ this.field_70721_aZ += (f2 - this.field_70721_aZ) * 0.4F; ++ this.field_184619_aG += this.field_70721_aZ; } - @Override diff --git a/patches/minecraft/net/minecraft/entity/EntityHanging.java.patch b/patches/minecraft/net/minecraft/entity/EntityHanging.java.patch index 32da0f490..0baa918fa 100644 --- a/patches/minecraft/net/minecraft/entity/EntityHanging.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityHanging.java.patch @@ -78,7 +78,18 @@ } } } -@@ -146,6 +144,9 @@ +@@ -137,15 +135,18 @@ + EnumFacing enumfacing = this.field_174860_b.func_176735_f(); + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k = 0; k < i; k++) ++ for (int k = 0; k < i; ++k) + { +- for (int l = 0; l < j; l++) ++ for (int l = 0; l < j; ++l) + { + int i1 = (i - 1) / -2; + int j1 = (j - 1) / -2; blockpos$mutableblockpos.func_189533_g(blockpos).func_189534_c(enumfacing, k + i1).func_189534_c(EnumFacing.UP, l + j1); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos$mutableblockpos); @@ -184,15 +195,16 @@ public void func_70107_b(double p_70107_1_, double p_70107_3_, double p_70107_5_) { this.field_174861_a = new BlockPos(p_70107_1_, p_70107_3_, p_70107_5_); -@@ -275,7 +259,6 @@ +@@ -274,7 +258,7 @@ + return this.field_174861_a; } - @SuppressWarnings("incomplete-switch") - @Override ++ @SuppressWarnings("incomplete-switch") public float func_184229_a(Rotation p_184229_1_) { if (this.field_174860_b != null && this.field_174860_b.func_176740_k() != EnumFacing.Axis.Y) -@@ -308,13 +291,11 @@ +@@ -307,13 +291,11 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/EntityList.java.patch b/patches/minecraft/net/minecraft/entity/EntityList.java.patch index c3b92bc7a..e7ce1be9b 100644 --- a/patches/minecraft/net/minecraft/entity/EntityList.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityList.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/entity/EntityList.java +++ after/net/minecraft/entity/EntityList.java -@@ -107,10 +107,8 @@ +@@ -107,49 +107,63 @@ public static final ResourceLocation field_191307_a = new ResourceLocation("lightning_bolt"); private static final ResourceLocation field_191310_e = new ResourceLocation("player"); private static final Logger field_151516_b = LogManager.getLogger(); @@ -13,7 +13,11 @@ @Nullable public static ResourceLocation func_191301_a(Entity p_191301_0_) -@@ -121,35 +119,51 @@ + { +- return func_191306_a((Class )p_191301_0_.getClass()); ++ return func_191306_a(p_191301_0_.getClass()); + } + @Nullable public static ResourceLocation func_191306_a(Class p_191306_0_) { @@ -25,7 +29,7 @@ @Nullable public static String func_75621_b(Entity p_75621_0_) { -- int i = field_191308_b.func_148757_b(p_75621_0_.getClass()); +- int i = field_191308_b.func_148757_b((Class )p_75621_0_.getClass()); - return i == -1 ? null : field_191311_g.get(i); + net.minecraftforge.fml.common.registry.EntityEntry entry = net.minecraftforge.fml.common.registry.EntityRegistry.getEntry(p_75621_0_.getClass()); + return entry == null ? null : entry.getName(); @@ -121,7 +125,7 @@ } return entity; -@@ -206,7 +233,7 @@ +@@ -206,12 +233,12 @@ public static Set func_180124_b() { @@ -130,6 +134,12 @@ } public static boolean func_180123_a(Entity p_180123_0_, ResourceLocation p_180123_1_) + { +- ResourceLocation resourcelocation = func_191306_a((Class )p_180123_0_.getClass()); ++ ResourceLocation resourcelocation = func_191306_a(p_180123_0_.getClass()); + + if (resourcelocation != null) + { @@ -238,10 +265,10 @@ for (ResourceLocation resourcelocation : func_180124_b()) diff --git a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch index 06e444f00..daa60531f 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch @@ -86,7 +86,7 @@ protected void func_184581_c(DamageSource p_184581_1_) { this.func_175456_n(); -@@ -231,7 +228,6 @@ +@@ -231,24 +228,23 @@ this.field_70757_a = -this.func_70627_aG(); } @@ -94,27 +94,33 @@ protected int func_70693_a(EntityPlayer p_70693_1_) { if (this.field_70728_aV > 0) -@@ -240,7 +236,7 @@ + { + int i = this.field_70728_aV; - for (int j = 0; j < this.field_184657_bw.size(); ++j) +- for (int j = 0; j < this.field_184657_bw.size(); j++) ++ for (int j = 0; j < this.field_184657_bw.size(); ++j) { - if (!this.field_184657_bw.get(j).func_190926_b() && this.field_184655_bs[j] <= 1.0F) + if (!((ItemStack)this.field_184657_bw.get(j)).func_190926_b() && this.field_184655_bs[j] <= 1.0F) { i += 1 + this.field_70146_Z.nextInt(3); } -@@ -248,7 +244,7 @@ + } - for (int k = 0; k < this.field_184656_bv.size(); ++k) +- for (int k = 0; k < this.field_184656_bv.size(); k++) ++ for (int k = 0; k < this.field_184656_bv.size(); ++k) { - if (!this.field_184656_bv.get(k).func_190926_b() && this.field_82174_bp[k] <= 1.0F) + if (!((ItemStack)this.field_184656_bv.get(k)).func_190926_b() && this.field_82174_bp[k] <= 1.0F) { i += 1 + this.field_70146_Z.nextInt(3); } -@@ -268,20 +264,11 @@ +@@ -266,22 +262,13 @@ + { + if (this.field_70170_p.field_72995_K) { - for (int i = 0; i < 20; ++i) +- for (int i = 0; i < 20; i++) ++ for (int i = 0; i < 20; ++i) { - double d0 = this.field_70146_Z.nextGaussian() * 0.02; - double d1 = this.field_70146_Z.nextGaussian() * 0.02; @@ -170,6 +176,15 @@ protected void func_70628_a(boolean p_70628_1_, int p_70628_2_) { Item item = this.func_146068_u(); +@@ -357,7 +340,7 @@ + i += this.field_70146_Z.nextInt(p_70628_2_ + 1); + } + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + this.func_145779_a(item, 1); + } @@ -366,10 +349,9 @@ public static void func_189752_a(DataFixer p_189752_0_, Class p_189752_1_) @@ -190,6 +205,42 @@ public void func_70037_a(NBTTagCompound p_70037_1_) { super.func_70037_a(p_70037_1_); +@@ -477,7 +458,7 @@ + { + NBTTagList nbttaglist = p_70037_1_.func_150295_c("ArmorItems", 10); + +- for (int i = 0; i < this.field_184657_bw.size(); i++) ++ for (int i = 0; i < this.field_184657_bw.size(); ++i) + { + this.field_184657_bw.set(i, new ItemStack(nbttaglist.func_150305_b(i))); + } +@@ -487,7 +468,7 @@ + { + NBTTagList nbttaglist1 = p_70037_1_.func_150295_c("HandItems", 10); + +- for (int j = 0; j < this.field_184656_bv.size(); j++) ++ for (int j = 0; j < this.field_184656_bv.size(); ++j) + { + this.field_184656_bv.set(j, new ItemStack(nbttaglist1.func_150305_b(j))); + } +@@ -497,7 +478,7 @@ + { + NBTTagList nbttaglist2 = p_70037_1_.func_150295_c("ArmorDropChances", 5); + +- for (int k = 0; k < nbttaglist2.func_74745_c(); k++) ++ for (int k = 0; k < nbttaglist2.func_74745_c(); ++k) + { + this.field_184655_bs[k] = nbttaglist2.func_150308_e(k); + } +@@ -507,7 +488,7 @@ + { + NBTTagList nbttaglist3 = p_70037_1_.func_150295_c("HandDropChances", 5); + +- for (int l = 0; l < nbttaglist3.func_74745_c(); l++) ++ for (int l = 0; l < nbttaglist3.func_74745_c(); ++l) + { + this.field_82174_bp[l] = nbttaglist3.func_150308_e(l); + } @@ -537,7 +518,6 @@ return null; } @@ -309,14 +360,18 @@ { this.field_70708_bq = 0; } -@@ -761,7 +747,6 @@ +@@ -761,10 +747,9 @@ } } - @Override protected final void func_70626_be() { - ++this.field_70708_bq; +- this.field_70708_bq++; ++ ++this.field_70708_bq; + this.field_70170_p.field_72984_F.func_76320_a("checkDespawn"); + this.func_70623_bb(); + this.field_70170_p.field_72984_F.func_76319_b(); @@ -787,7 +772,7 @@ if (this.func_184218_aH() && this.func_184187_bx() instanceof EntityLiving) { @@ -443,6 +498,35 @@ } this.func_70099_a(itemstack, 0.0F); +@@ -989,17 +959,17 @@ + + if (this.field_70146_Z.nextFloat() < 0.095F) + { +- i++; +- } +- +- if (this.field_70146_Z.nextFloat() < 0.095F) +- { +- i++; +- } +- +- if (this.field_70146_Z.nextFloat() < 0.095F) +- { +- i++; ++ ++i; ++ } ++ ++ if (this.field_70146_Z.nextFloat() < 0.095F) ++ { ++ ++i; ++ } ++ ++ if (this.field_70146_Z.nextFloat() < 0.095F) ++ { ++ ++i; + } + + boolean flag = true; @@ -1033,22 +1003,27 @@ public static EntityEquipmentSlot func_184640_d(ItemStack p_184640_0_) diff --git a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch index 8292bcab7..858d13e58 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch @@ -128,7 +128,13 @@ { this.func_70097_a(DamageSource.field_76368_d, (float)Math.max(1, MathHelper.func_76128_c(-d0 * d1))); } -@@ -290,23 +277,14 @@ +@@ -285,28 +272,19 @@ + { + this.func_70050_g(0); + +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) + { float f2 = this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat(); float f = this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat(); float f1 = this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat(); @@ -154,6 +160,30 @@ { this.func_184210_p(); } +@@ -333,12 +311,12 @@ + + if (this.field_70737_aN > 0) + { +- this.field_70737_aN--; ++ --this.field_70737_aN; + } + + if (this.field_70172_ad > 0 && !(this instanceof EntityPlayerMP)) + { +- this.field_70172_ad--; ++ --this.field_70172_ad; + } + + if (this.func_110143_aJ() <= 0.0F) +@@ -348,7 +326,7 @@ + + if (this.field_70718_bc > 0) + { +- this.field_70718_bc--; ++ --this.field_70718_bc; + } + else + { @@ -364,11 +342,11 @@ { if (!this.field_70755_b.func_70089_S()) @@ -168,7 +198,12 @@ } } -@@ -402,11 +380,10 @@ +@@ -398,15 +376,14 @@ + + protected void func_70609_aI() + { +- this.field_70725_aQ++; ++ ++this.field_70725_aQ; if (this.field_70725_aQ == 20) { @@ -182,9 +217,12 @@ while (i > 0) { int j = EntityXPOrb.func_70527_a(i); -@@ -419,19 +396,10 @@ +@@ -417,21 +394,12 @@ + + this.func_70106_y(); - for (int k = 0; k < 20; ++k) +- for (int k = 0; k < 20; k++) ++ for (int k = 0; k < 20; ++k) { - double d2 = this.field_70146_Z.nextGaussian() * 0.02; - double d0 = this.field_70146_Z.nextGaussian() * 0.02; @@ -222,6 +260,15 @@ public void func_70037_a(NBTTagCompound p_70037_1_) { this.func_110149_m(p_70037_1_.func_74760_g("AbsorptionAmount")); +@@ -588,7 +554,7 @@ + { + NBTTagList nbttaglist = p_70037_1_.func_150295_c("ActiveEffects", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i); + PotionEffect potioneffect = PotionEffect.func_82722_b(nbttagcompound); @@ -639,7 +605,7 @@ if (!potioneffect.func_76455_a(this)) @@ -432,7 +479,8 @@ - this.func_184185_a(SoundEvents.field_187635_cQ, 0.8F, 0.8F + this.field_70170_p.field_73012_v.nextFloat() * 0.4F); + this.field_70170_p.func_184148_a(null, this.field_70165_t, this.field_70163_u, this.field_70161_v, SoundEvents.field_187635_cQ, this.func_184176_by(), 0.8F, 0.8F + this.field_70170_p.field_73012_v.nextFloat() * 0.4F); //Forge: Fix MC-2518 Items are not damaged on the client so client needs packet as well. - for (int i = 0; i < 5; ++i) +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { - Vec3d vec3d = new Vec3d(((double)this.field_70146_Z.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, 0.0); - vec3d = vec3d.func_178789_a(-this.field_70125_A * (float)(Math.PI / 180.0)); @@ -539,19 +587,13 @@ } } } -@@ -1310,26 +1285,17 @@ +@@ -1310,20 +1285,17 @@ BlockPos blockpos = new BlockPos(i, j, k); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); -- -- if (block != Blocks.field_150468_ap && block != Blocks.field_150395_bd) -- { -- return block instanceof BlockTrapDoor && this.func_184604_a(blockpos, iblockstate); -- } -- else -- { -- return true; -- } +- return block != Blocks.field_150468_ap && block != Blocks.field_150395_bd +- ? block instanceof BlockTrapDoor && this.func_184604_a(blockpos, iblockstate) +- : true; + return net.minecraftforge.common.ForgeHooks.isLivingOnLadder(iblockstate, field_70170_p, new BlockPos(i, j, k), this); } } @@ -569,7 +611,7 @@ { return true; } -@@ -1338,15 +1304,16 @@ +@@ -1332,15 +1304,16 @@ return false; } @@ -588,7 +630,7 @@ super.func_180430_e(p_180430_1_, p_180430_2_); PotionEffect potioneffect = this.func_70660_b(MobEffects.field_76430_j); float f = potioneffect == null ? 0.0F : (float)(potioneffect.func_76458_c() + 1); -@@ -1357,20 +1324,19 @@ +@@ -1351,20 +1324,19 @@ this.func_184185_a(this.func_184588_d(i), 1.0F, 1.0F); this.func_70097_a(DamageSource.field_76379_h, (float)i); int j = MathHelper.func_76128_c(this.field_70165_t); @@ -611,7 +653,7 @@ public void func_70057_ab() { this.field_70738_aO = 10; -@@ -1397,9 +1363,7 @@ +@@ -1391,9 +1363,7 @@ if (!p_70655_1_.func_76363_c()) { this.func_70675_k(p_70655_2_); @@ -622,7 +664,7 @@ } return p_70655_2_; -@@ -1443,17 +1407,21 @@ +@@ -1437,17 +1407,21 @@ { if (!this.func_180431_b(p_70665_1_)) { @@ -651,7 +693,7 @@ } } } -@@ -1487,12 +1455,12 @@ +@@ -1481,12 +1455,12 @@ public final int func_85035_bI() { @@ -666,7 +708,7 @@ } private int func_82166_i() -@@ -1509,6 +1477,11 @@ +@@ -1503,6 +1477,11 @@ public void func_184609_a(EnumHand p_184609_1_) { @@ -678,7 +720,7 @@ if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0) { this.field_110158_av = -1; -@@ -1523,14 +1496,40 @@ +@@ -1517,14 +1496,40 @@ } @SideOnly(Side.CLIENT) @@ -721,7 +763,7 @@ { this.field_70721_aZ = 1.5F; this.field_70172_ad = this.field_70771_an; -@@ -1540,9 +1539,7 @@ +@@ -1534,9 +1539,7 @@ if (flag) { @@ -732,7 +774,7 @@ } DamageSource damagesource; -@@ -1560,42 +1557,17 @@ +@@ -1554,42 +1557,17 @@ damagesource = DamageSource.field_76377_j; } @@ -777,7 +819,16 @@ protected void func_70076_C() { this.func_70097_a(DamageSource.field_76380_i, 4.0F); -@@ -1691,15 +1663,12 @@ +@@ -1601,7 +1579,7 @@ + + if (this.field_82175_bq) + { +- this.field_110158_av++; ++ ++this.field_110158_av; + + if (this.field_110158_av >= i) + { +@@ -1685,15 +1663,12 @@ return !this.func_184582_a(p_190630_1_).func_190926_b(); } @@ -793,7 +844,7 @@ public void func_70031_b(boolean p_70031_1_) { super.func_70031_b(p_70031_1_); -@@ -1723,9 +1692,7 @@ +@@ -1717,9 +1692,7 @@ protected float func_70647_i() { @@ -804,7 +855,7 @@ } protected boolean func_70610_aX() -@@ -1746,18 +1713,11 @@ +@@ -1740,18 +1713,11 @@ { EnumFacing enumfacing = enumfacing1.func_176746_e(); int[][] aint1 = new int[][] {{0, 1}, {0, -1}, { -1, 1}, { -1, -1}, {1, 1}, {1, -1}, { -1, 0}, {1, 0}, {0, 1}}; @@ -826,7 +877,7 @@ for (int[] aint : aint1) { -@@ -1765,31 +1725,29 @@ +@@ -1759,31 +1725,29 @@ double d10 = (double)(enumfacing1.func_82599_e() * aint[0] + enumfacing.func_82599_e() * aint[1]); double d11 = d5 + d9; double d12 = d6 + d10; @@ -866,7 +917,7 @@ d14 = d12; } } -@@ -1799,7 +1757,7 @@ +@@ -1793,7 +1757,7 @@ } else { @@ -875,7 +926,7 @@ float f; if (p_110145_1_ instanceof EntityBoat) -@@ -1808,30 +1766,29 @@ +@@ -1802,30 +1766,29 @@ } else { @@ -912,14 +963,22 @@ public boolean func_94059_bO() { return this.func_174833_aM(); -@@ -1853,22 +1810,23 @@ +@@ -1842,27 +1805,28 @@ + + if (this.func_70644_a(MobEffects.field_76430_j)) + { +- this.field_70181_x = this.field_70181_x + (double)((float)(this.func_70660_b(MobEffects.field_76430_j).func_76458_c() + 1) * 0.1F); ++ this.field_70181_x += (double)((float)(this.func_70660_b(MobEffects.field_76430_j).func_76458_c() + 1) * 0.1F); + } if (this.func_70051_ag()) { - float f = this.field_70177_z * (float)(Math.PI / 180.0); +- this.field_70159_w = this.field_70159_w - (double)(MathHelper.func_76126_a(f) * 0.2F); +- this.field_70179_y = this.field_70179_y + (double)(MathHelper.func_76134_b(f) * 0.2F); + float f = this.field_70177_z * 0.017453292F; - this.field_70159_w -= (double)(MathHelper.func_76126_a(f) * 0.2F); - this.field_70179_y += (double)(MathHelper.func_76134_b(f) * 0.2F); ++ this.field_70159_w -= (double)(MathHelper.func_76126_a(f) * 0.2F); ++ this.field_70179_y += (double)(MathHelper.func_76134_b(f) * 0.2F); } this.field_70160_al = true; @@ -939,7 +998,7 @@ } protected float func_189749_co() -@@ -1886,23 +1844,23 @@ +@@ -1880,52 +1844,52 @@ { if (this.func_184613_cA()) { @@ -967,25 +1026,29 @@ - double d2 = this.field_70181_x * -0.1 * (double)f4; + double d2 = this.field_70181_x * -0.1D * (double)f4; this.field_70181_x += d2; - this.field_70159_w += vec3d.field_72450_a * d2 / d6; - this.field_70179_y += vec3d.field_72449_c * d2 / d6; -@@ -1910,28 +1868,28 @@ +- this.field_70159_w = this.field_70159_w + vec3d.field_72450_a * d2 / d6; +- this.field_70179_y = this.field_70179_y + vec3d.field_72449_c * d2 / d6; ++ this.field_70159_w += vec3d.field_72450_a * d2 / d6; ++ this.field_70179_y += vec3d.field_72449_c * d2 / d6; + } if (f < 0.0F) { - double d10 = d8 * (double)(-MathHelper.func_76126_a(f)) * 0.04; - this.field_70181_x += d10 * 3.2; +- this.field_70159_w = this.field_70159_w - vec3d.field_72450_a * d10 / d6; +- this.field_70179_y = this.field_70179_y - vec3d.field_72449_c * d10 / d6; + double d10 = d8 * (double)(-MathHelper.func_76126_a(f)) * 0.04D; + this.field_70181_x += d10 * 3.2D; - this.field_70159_w -= vec3d.field_72450_a * d10 / d6; - this.field_70179_y -= vec3d.field_72449_c * d10 / d6; ++ this.field_70159_w -= vec3d.field_72450_a * d10 / d6; ++ this.field_70179_y -= vec3d.field_72449_c * d10 / d6; } - if (d6 > 0.0) + if (d6 > 0.0D) { -- this.field_70159_w += (vec3d.field_72450_a / d6 * d8 - this.field_70159_w) * 0.1; -- this.field_70179_y += (vec3d.field_72449_c / d6 * d8 - this.field_70179_y) * 0.1; +- this.field_70159_w = this.field_70159_w + (vec3d.field_72450_a / d6 * d8 - this.field_70159_w) * 0.1; +- this.field_70179_y = this.field_70179_y + (vec3d.field_72449_c / d6 * d8 - this.field_70179_y) * 0.1; + this.field_70159_w += (vec3d.field_72450_a / d6 * d8 - this.field_70159_w) * 0.1D; + this.field_70179_y += (vec3d.field_72449_c / d6 * d8 - this.field_70179_y) * 0.1D; } @@ -1007,7 +1070,7 @@ if (f5 > 0.0F) { -@@ -1948,13 +1906,12 @@ +@@ -1942,13 +1906,12 @@ else { float f6 = 0.91F; @@ -1024,7 +1087,7 @@ } float f7 = 0.16277136F / (f6 * f6 * f6); -@@ -1974,32 +1931,27 @@ +@@ -1968,32 +1931,27 @@ if (this.field_70122_E) { @@ -1065,7 +1128,7 @@ } } -@@ -2007,37 +1959,35 @@ +@@ -2001,38 +1959,35 @@ if (this.field_70123_F && this.func_70617_f_()) { @@ -1075,7 +1138,8 @@ if (this.func_70644_a(MobEffects.field_188424_y)) { -- this.field_70181_x += (0.05 * (double)(this.func_70660_b(MobEffects.field_188424_y).func_76458_c() + 1) - this.field_70181_x) * 0.2; +- this.field_70181_x = this.field_70181_x +- + (0.05 * (double)(this.func_70660_b(MobEffects.field_188424_y).func_76458_c() + 1) - this.field_70181_x) * 0.2; + this.field_70181_x += (0.05D * (double)(this.func_70660_b(MobEffects.field_188424_y).func_76458_c() + 1) - this.field_70181_x) * 0.2D; } else @@ -1112,7 +1176,7 @@ this.field_70159_w *= (double)f6; this.field_70179_y *= (double)f6; blockpos$pooledmutableblockpos.func_185344_t(); -@@ -2048,18 +1998,18 @@ +@@ -2043,18 +1998,18 @@ double d4 = this.field_70163_u; this.func_191958_b(p_191986_1_, p_191986_2_, p_191986_3_, 0.02F); this.func_70091_d(MoverType.SELF, this.field_70159_w, this.field_70181_x, this.field_70179_y); @@ -1137,7 +1201,7 @@ } } } -@@ -2089,17 +2039,17 @@ +@@ -2084,17 +2039,17 @@ this.func_191958_b(p_191986_1_, p_191986_2_, p_191986_3_, f2); this.func_70091_d(MoverType.SELF, this.field_70159_w, this.field_70181_x, this.field_70179_y); this.field_70159_w *= (double)f1; @@ -1159,7 +1223,7 @@ } } } -@@ -2107,7 +2057,7 @@ +@@ -2102,7 +2057,7 @@ this.field_184618_aE = this.field_70721_aZ; double d5 = this.field_70165_t - this.field_70169_q; double d7 = this.field_70161_v - this.field_70166_s; @@ -1168,7 +1232,18 @@ float f10 = MathHelper.func_76133_a(d5 * d5 + d9 * d9 + d7 * d7) * 4.0F; if (f10 > 1.0F) -@@ -2140,9 +2090,9 @@ +@@ -2110,8 +2065,8 @@ + f10 = 1.0F; + } + +- this.field_70721_aZ = this.field_70721_aZ + (f10 - this.field_70721_aZ) * 0.4F; +- this.field_184619_aG = this.field_184619_aG + this.field_70721_aZ; ++ this.field_70721_aZ += (f10 - this.field_70721_aZ) * 0.4F; ++ this.field_184619_aG += this.field_70721_aZ; + } + + public float func_70689_ay() +@@ -2135,9 +2090,9 @@ return false; } @@ -1179,7 +1254,16 @@ super.func_70071_h_(); this.func_184608_ct(); -@@ -2185,9 +2135,9 @@ +@@ -2152,7 +2107,7 @@ + this.field_70720_be = 20 * (30 - i); + } + +- this.field_70720_be--; ++ --this.field_70720_be; + + if (this.field_70720_be <= 0) + { +@@ -2180,9 +2135,9 @@ if (!ItemStack.func_77989_b(itemstack1, itemstack)) { @@ -1192,7 +1276,7 @@ if (!itemstack.func_190926_b()) { -@@ -2202,12 +2152,10 @@ +@@ -2197,12 +2152,10 @@ switch (entityequipmentslot.func_188453_a()) { case HAND: @@ -1207,7 +1291,7 @@ } } } -@@ -2241,7 +2189,7 @@ +@@ -2236,7 +2189,7 @@ { f = 1.0F; f5 = (float)Math.sqrt((double)f3) * 3.0F; @@ -1216,7 +1300,41 @@ float f2 = MathHelper.func_76135_e(MathHelper.func_76142_g(this.field_70177_z) - f1); if (95.0F < f2 && f2 < 265.0F) -@@ -2376,24 +2324,24 @@ +@@ -2259,7 +2212,7 @@ + f = 0.0F; + } + +- this.field_110154_aX = this.field_110154_aX + (f - this.field_110154_aX) * 0.3F; ++ this.field_110154_aX += (f - this.field_110154_aX) * 0.3F; + this.field_70170_p.field_72984_F.func_76320_a("headTurn"); + f5 = this.func_110146_f(f4, f5); + this.field_70170_p.field_72984_F.func_76319_b(); +@@ -2310,7 +2263,7 @@ + + if (this.func_184613_cA()) + { +- this.field_184629_bo++; ++ ++this.field_184629_bo; + } + else + { +@@ -2354,7 +2307,7 @@ + { + if (this.field_70773_bE > 0) + { +- this.field_70773_bE--; ++ --this.field_70773_bE; + } + + if (this.field_70716_bi > 0 && !this.func_184186_bw()) +@@ -2365,30 +2318,30 @@ + double d3 = MathHelper.func_76138_g(this.field_184626_bk - (double)this.field_70177_z); + this.field_70177_z = (float)((double)this.field_70177_z + d3 / (double)this.field_70716_bi); + this.field_70125_A = (float)((double)this.field_70125_A + (this.field_70709_bj - (double)this.field_70125_A) / (double)this.field_70716_bi); +- this.field_70716_bi--; ++ --this.field_70716_bi; + this.func_70107_b(d0, d1, d2); + this.func_70101_b(this.field_70177_z, this.field_70125_A); } else if (!this.func_70613_aW()) { @@ -1259,16 +1377,31 @@ } this.field_70170_p.field_72984_F.func_76320_a("ai"); -@@ -2500,7 +2448,7 @@ +@@ -2493,11 +2446,11 @@ + { + int j = 0; - for (int k = 0; k < list.size(); ++k) +- for (int k = 0; k < list.size(); k++) ++ for (int k = 0; k < list.size(); ++k) { - if (!list.get(k).func_184218_aH()) + if (!((Entity)list.get(k)).func_184218_aH()) { - ++j; +- j++; ++ ++j; } -@@ -2525,7 +2473,6 @@ + } + +@@ -2507,7 +2460,7 @@ + } + } + +- for (int l = 0; l < list.size(); l++) ++ for (int l = 0; l < list.size(); ++l) + { + Entity entity = list.get(l); + this.func_82167_n(entity); +@@ -2520,7 +2473,6 @@ p_82167_1_.func_70108_f(this); } @@ -1276,7 +1409,7 @@ public void func_184210_p() { Entity entity = this.func_184187_bx(); -@@ -2537,7 +2484,6 @@ +@@ -2532,7 +2484,6 @@ } } @@ -1284,7 +1417,7 @@ public void func_70098_U() { super.func_70098_U(); -@@ -2547,10 +2493,7 @@ +@@ -2542,10 +2493,7 @@ } @SideOnly(Side.CLIENT) @@ -1296,7 +1429,7 @@ { this.field_184623_bh = p_180426_1_; this.field_184624_bi = p_180426_3_; -@@ -2580,18 +2523,9 @@ +@@ -2575,18 +2523,9 @@ public boolean func_70685_l(Entity p_70685_1_) { @@ -1316,7 +1449,16 @@ public Vec3d func_70676_i(float p_70676_1_) { if (p_70676_1_ == 1.0F) -@@ -2624,37 +2558,31 @@ +@@ -2608,7 +2547,7 @@ + + if (f < 0.0F) + { +- f++; ++ ++f; + } + + return this.field_70732_aI + f * p_70678_1_; +@@ -2619,37 +2558,31 @@ return !this.field_70170_p.field_72995_K; } @@ -1354,7 +1496,7 @@ public void func_181013_g(float p_181013_1_) { this.field_70761_aq = p_181013_1_; -@@ -2688,16 +2616,50 @@ +@@ -2683,16 +2616,50 @@ this.field_70752_e = true; } @@ -1407,7 +1549,7 @@ } protected void func_184608_ct() -@@ -2705,15 +2667,23 @@ +@@ -2700,15 +2667,23 @@ if (this.func_184587_cr()) { ItemStack itemstack = this.func_184586_b(this.func_184600_cs()); @@ -1432,7 +1574,7 @@ { this.func_71036_o(); } -@@ -2731,8 +2701,10 @@ +@@ -2726,8 +2701,10 @@ if (!itemstack.func_190926_b() && !this.func_184587_cr()) { @@ -1444,7 +1586,7 @@ if (!this.field_70170_p.field_72995_K) { -@@ -2743,12 +2715,11 @@ +@@ -2738,12 +2715,11 @@ i |= 2; } @@ -1458,9 +1600,12 @@ public void func_184206_a(DataParameter p_184206_1_) { super.func_184206_a(p_184206_1_); -@@ -2785,51 +2756,26 @@ +@@ -2778,53 +2754,28 @@ + + if (p_184584_1_.func_77975_n() == EnumAction.EAT) { - for (int i = 0; i < p_184584_2_; ++i) +- for (int i = 0; i < p_184584_2_; i++) ++ for (int i = 0; i < p_184584_2_; ++i) { - Vec3d vec3d = new Vec3d(((double)this.field_70146_Z.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, 0.0); - vec3d = vec3d.func_178789_a(-this.field_70125_A * (float)(Math.PI / 180.0)); @@ -1520,7 +1665,7 @@ } } } -@@ -2839,7 +2785,10 @@ +@@ -2834,7 +2785,10 @@ if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) { this.func_184584_a(this.field_184627_bm, 16); @@ -1532,7 +1677,7 @@ this.func_184602_cy(); } } -@@ -2863,7 +2812,8 @@ +@@ -2858,7 +2812,8 @@ { if (!this.field_184627_bm.func_190926_b()) { @@ -1542,7 +1687,7 @@ } this.func_184602_cy(); -@@ -2873,7 +2823,7 @@ +@@ -2868,7 +2823,7 @@ { if (!this.field_70170_p.field_72995_K) { @@ -1551,9 +1696,38 @@ } this.field_184627_bm = ItemStack.field_190927_a; -@@ -2967,13 +2917,13 @@ +@@ -2880,7 +2835,15 @@ + if (this.func_184587_cr() && !this.field_184627_bm.func_190926_b()) + { + Item item = this.field_184627_bm.func_77973_b(); +- return item.func_77661_b(this.field_184627_bm) != EnumAction.BLOCK ? false : item.func_77626_a(this.field_184627_bm) - this.field_184628_bn >= 5; ++ ++ if (item.func_77661_b(this.field_184627_bm) != EnumAction.BLOCK) ++ { ++ return false; ++ } ++ else ++ { ++ return item.func_77626_a(this.field_184627_bm) - this.field_184628_bn >= 5; ++ } + } + else + { +@@ -2927,7 +2890,7 @@ + } + else + { +- this.field_70163_u--; ++ --this.field_70163_u; + blockpos = blockpos1; + } + } +@@ -2952,15 +2915,15 @@ + { + int i = 128; - for (int j = 0; j < 128; ++j) +- for (int j = 0; j < 128; j++) ++ for (int j = 0; j < 128; ++j) { - double d6 = (double)j / 127.0; + double d6 = (double)j / 127.0D; @@ -1568,7 +1742,7 @@ world.func_175688_a(EnumParticleTypes.PORTAL, d3, d4, d5, (double)f, (double)f1, (double)f2); } -@@ -2991,6 +2941,31 @@ +@@ -2978,6 +2941,31 @@ return true; } @@ -1600,7 +1774,7 @@ public boolean func_190631_cK() { return true; -@@ -2999,5 +2974,31 @@ +@@ -2986,5 +2974,31 @@ @SideOnly(Side.CLIENT) public void func_191987_a(BlockPos p_191987_1_, boolean p_191987_2_) { diff --git a/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch b/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch index fa0dcbad6..ec3f7cf6a 100644 --- a/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityTracker.java.patch @@ -47,6 +47,15 @@ for (EntityTrackerEntry entitytrackerentry : this.field_72793_b) { +@@ -300,7 +302,7 @@ + } + } + +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + EntityPlayerMP entityplayermp = list.get(i); + @@ -339,6 +341,25 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch b/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch index 8408e2d45..79c3539d9 100644 --- a/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityTrackerEntry.java.patch @@ -14,23 +14,31 @@ public EntityTrackerEntry(Entity p_i46837_1_, int p_i46837_2_, int p_i46837_3_, int p_i46837_4_, boolean p_i46837_5_) { -@@ -112,7 +112,6 @@ +@@ -112,15 +112,18 @@ this.field_180234_y = p_i46837_1_.field_70122_E; } - @Override public boolean equals(Object p_equals_1_) { - if (p_equals_1_ instanceof EntityTrackerEntry) -@@ -125,7 +124,6 @@ - } +- return p_equals_1_ instanceof EntityTrackerEntry +- ? ((EntityTrackerEntry)p_equals_1_).field_73132_a.func_145782_y() == this.field_73132_a.func_145782_y() +- : false; ++ if (p_equals_1_ instanceof EntityTrackerEntry) ++ { ++ return ((EntityTrackerEntry)p_equals_1_).field_73132_a.func_145782_y() == this.field_73132_a.func_145782_y(); ++ } ++ else ++ { ++ return false; ++ } } - @Override public int hashCode() { return this.field_73132_a.func_145782_y(); -@@ -135,7 +133,7 @@ +@@ -130,7 +133,7 @@ { this.field_73133_n = false; @@ -39,7 +47,7 @@ { this.field_73147_p = this.field_73132_a.field_70165_t; this.field_73146_q = this.field_73132_a.field_70163_u; -@@ -160,13 +158,13 @@ +@@ -155,13 +158,13 @@ if (itemstack.func_77973_b() instanceof ItemMap) { @@ -55,7 +63,7 @@ if (packet != null) { -@@ -188,9 +186,7 @@ +@@ -183,9 +186,7 @@ if (flag3) { @@ -66,7 +74,16 @@ this.field_73127_g = j1; this.field_73139_h = l1; } -@@ -218,15 +214,7 @@ +@@ -198,7 +199,7 @@ + } + else + { +- this.field_73142_u++; ++ ++this.field_73142_u; + long i1 = EntityTracker.func_187253_a(this.field_73132_a.field_70165_t); + long i2 = EntityTracker.func_187253_a(this.field_73132_a.field_70163_u); + long j2 = EntityTracker.func_187253_a(this.field_73132_a.field_70161_v); +@@ -213,15 +214,7 @@ if (this.field_73136_m > 0 || this.field_73132_a instanceof EntityArrow) { @@ -83,7 +100,7 @@ { if ((!flag || !flag1) && !(this.field_73132_a instanceof EntityArrow)) { -@@ -241,9 +229,7 @@ +@@ -236,9 +229,7 @@ } else { @@ -94,7 +111,7 @@ } } else -@@ -267,11 +253,10 @@ +@@ -262,11 +253,10 @@ double d0 = this.field_73132_a.field_70159_w - this.field_73137_j; double d1 = this.field_73132_a.field_70181_x - this.field_73138_k; double d2 = this.field_73132_a.field_70179_y - this.field_73135_l; @@ -108,7 +125,16 @@ { this.field_73137_j = this.field_73132_a.field_70159_w; this.field_73138_k = this.field_73132_a.field_70181_x; -@@ -397,8 +382,7 @@ +@@ -309,7 +299,7 @@ + this.field_73132_a.field_70160_al = false; + } + +- this.field_73136_m++; ++ ++this.field_73136_m; + + if (this.field_73132_a.field_70133_I) + { +@@ -392,8 +382,7 @@ if (!this.field_73132_a.func_184212_Q().func_187228_d()) { @@ -118,7 +144,7 @@ } boolean flag = this.field_73143_t; -@@ -425,15 +409,7 @@ +@@ -420,15 +409,7 @@ if (flag && !(packet instanceof SPacketSpawnMob)) { @@ -135,7 +161,7 @@ } if (this.field_73132_a instanceof EntityLivingBase) -@@ -481,6 +457,7 @@ +@@ -476,6 +457,7 @@ this.field_73132_a.func_184178_b(p_73117_1_); p_73117_1_.func_184848_d(this.field_73132_a); @@ -143,7 +169,7 @@ } } else if (this.field_73134_o.contains(p_73117_1_)) -@@ -488,14 +465,15 @@ +@@ -483,14 +465,15 @@ this.field_73134_o.remove(p_73117_1_); this.field_73132_a.func_184203_c(p_73117_1_); p_73117_1_.func_152339_d(this.field_73132_a); @@ -161,7 +187,16 @@ int i = Math.min(this.field_73130_b, this.field_187262_f); return d0 >= (double)(-i) && d0 <= (double)i && d1 >= (double)(-i) && d1 <= (double)i && this.field_73132_a.func_174827_a(p_180233_1_); } -@@ -520,6 +498,9 @@ +@@ -502,7 +485,7 @@ + + public void func_73125_b(List p_73125_1_) + { +- for (int i = 0; i < p_73125_1_.size(); i++) ++ for (int i = 0; i < p_73125_1_.size(); ++i) + { + this.func_73117_b((EntityPlayerMP)p_73125_1_.get(i)); + } +@@ -515,6 +498,9 @@ field_151262_p.warn("Fetching addPacket for removed entity"); } @@ -171,7 +206,7 @@ if (this.field_73132_a instanceof EntityPlayerMP) { return new SPacketSpawnPlayer((EntityPlayer)this.field_73132_a); -@@ -621,17 +602,17 @@ +@@ -616,17 +602,17 @@ spacketspawnobject = new SPacketSpawnObject(this.field_73132_a, i, 0); } diff --git a/patches/minecraft/net/minecraft/entity/SharedMonsterAttributes.java.patch b/patches/minecraft/net/minecraft/entity/SharedMonsterAttributes.java.patch index c6e17406a..990ccb7a1 100644 --- a/patches/minecraft/net/minecraft/entity/SharedMonsterAttributes.java.patch +++ b/patches/minecraft/net/minecraft/entity/SharedMonsterAttributes.java.patch @@ -34,7 +34,15 @@ public static NBTTagList func_111257_a(AbstractAttributeMap p_111257_0_) { -@@ -91,7 +84,7 @@ +@@ -84,14 +77,14 @@ + + public static void func_151475_a(AbstractAttributeMap p_151475_0_, NBTTagList p_151475_1_) + { +- for (int i = 0; i < p_151475_1_.func_74745_c(); i++) ++ for (int i = 0; i < p_151475_1_.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = p_151475_1_.func_150305_b(i); + IAttributeInstance iattributeinstance = p_151475_0_.func_111152_a(nbttagcompound.func_74779_i("Name")); if (iattributeinstance == null) { @@ -43,6 +51,15 @@ } else { +@@ -108,7 +101,7 @@ + { + NBTTagList nbttaglist = p_111258_1_.func_150295_c("Modifiers", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + AttributeModifier attributemodifier = func_111259_a(nbttaglist.func_150305_b(i)); + @@ -138,7 +131,7 @@ } catch (Exception exception) diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch index 8b36e2f8b..69c4c1009 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackMelee.java.patch @@ -17,7 +17,7 @@ public boolean func_75250_a() { EntityLivingBase entitylivingbase = this.field_75441_b.func_70638_az(); -@@ -46,6 +47,19 @@ +@@ -46,16 +47,32 @@ } else { @@ -35,17 +35,20 @@ + } + } this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase); - - if (this.field_75438_g != null) -@@ -54,14 +68,11 @@ - } - else - { -- return this.func_179512_a(entitylivingbase) -- >= this.field_75441_b -- .func_70092_e(entitylivingbase.field_70165_t, entitylivingbase.func_174813_aQ().field_72338_b, entitylivingbase.field_70161_v); +- return this.field_75438_g != null +- ? true +- : this.func_179512_a(entitylivingbase) +- >= this.field_75441_b +- .func_70092_e(entitylivingbase.field_70165_t, entitylivingbase.func_174813_aQ().field_72338_b, entitylivingbase.field_70161_v); ++ ++ if (this.field_75438_g != null) ++ { ++ return true; ++ } ++ else ++ { + return this.func_179512_a(entitylivingbase) >= this.field_75441_b.func_70092_e(entitylivingbase.field_70165_t, entitylivingbase.func_174813_aQ().field_72338_b, entitylivingbase.field_70161_v); - } ++ } } } @@ -53,11 +56,19 @@ public boolean func_75253_b() { EntityLivingBase entitylivingbase = this.field_75441_b.func_70638_az(); -@@ -84,58 +95,64 @@ +@@ -72,62 +89,70 @@ + { + return !this.field_75441_b.func_70661_as().func_75500_f(); } ++ else if (!this.field_75441_b.func_180485_d(new BlockPos(entitylivingbase))) ++ { ++ return false; ++ } else { -- return !(entitylivingbase instanceof EntityPlayer) +- return !this.field_75441_b.func_180485_d(new BlockPos(entitylivingbase)) +- ? false +- : !(entitylivingbase instanceof EntityPlayer) - || !((EntityPlayer)entitylivingbase).func_175149_v() && !((EntityPlayer)entitylivingbase).func_184812_l_(); + return !(entitylivingbase instanceof EntityPlayer) || !((EntityPlayer)entitylivingbase).func_175149_v() && !((EntityPlayer)entitylivingbase).func_184812_l_(); } @@ -91,8 +102,9 @@ this.field_75441_b.func_70671_ap().func_75651_a(entitylivingbase, 30.0F, 30.0F); - double d0 = this.field_75441_b - .func_70092_e(entitylivingbase.field_70165_t, entitylivingbase.func_174813_aQ().field_72338_b, entitylivingbase.field_70161_v); +- this.field_75445_i--; + double d0 = this.field_75441_b.func_70092_e(entitylivingbase.field_70165_t, entitylivingbase.func_174813_aQ().field_72338_b, entitylivingbase.field_70161_v); - --this.field_75445_i; ++ --this.field_75445_i; - if ((this.field_75437_f || this.field_75441_b.func_70635_at().func_75522_a(entitylivingbase)) - && this.field_75445_i <= 0 diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackRangedBow.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackRangedBow.java.patch index 45e7f1263..a1cdaf4e6 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackRangedBow.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackRangedBow.java.patch @@ -54,15 +54,28 @@ boolean flag = this.field_188499_a.func_70635_at().func_75522_a(entitylivingbase); boolean flag1 = this.field_188504_f > 0; -@@ -93,7 +87,7 @@ - --this.field_188504_f; +@@ -86,17 +80,17 @@ + + if (flag) + { +- this.field_188504_f++; ++ ++this.field_188504_f; + } + else + { +- this.field_188504_f--; ++ --this.field_188504_f; } - if (!(d0 > (double)this.field_188502_d) && this.field_188504_f >= 20) + if (d0 <= (double)this.field_188502_d && this.field_188504_f >= 20) { this.field_188499_a.func_70661_as().func_75499_g(); - ++this.field_188507_i; +- this.field_188507_i++; ++ ++this.field_188507_i; + } + else + { @@ -106,12 +100,12 @@ if (this.field_188507_i >= 20) diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIBreakDoor.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIBreakDoor.java.patch index 1d101a96b..676e15a67 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIBreakDoor.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIBreakDoor.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/entity/ai/EntityAIBreakDoor.java +++ after/net/minecraft/entity/ai/EntityAIBreakDoor.java -@@ -15,45 +15,55 @@ +@@ -15,43 +15,55 @@ super(p_i1618_1_); } @@ -11,15 +11,17 @@ { return false; } -- else if (!this.field_75356_a.field_70170_p.func_82736_K().func_82766_b("mobGriefing")) + else if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.field_75356_a.field_70170_p, this.field_75356_a) || !this.field_75356_a.field_70170_p.func_180495_p(this.field_179507_b).func_177230_c().canEntityDestroy(this.field_75356_a.field_70170_p.func_180495_p(this.field_179507_b), this.field_75356_a.field_70170_p, this.field_179507_b, this.field_75356_a) || !net.minecraftforge.event.ForgeEventFactory.onEntityDestroyBlock(this.field_75356_a, this.field_179507_b, this.field_75356_a.field_70170_p.func_180495_p(this.field_179507_b))) - { - return false; - } ++ { ++ return false; ++ } else { +- return !this.field_75356_a.field_70170_p.func_82736_K().func_82766_b("mobGriefing") +- ? false +- : !BlockDoor.func_176514_f(this.field_75356_a.field_70170_p, this.field_179507_b); + BlockDoor blockdoor = this.field_151504_e; - return !BlockDoor.func_176514_f(this.field_75356_a.field_70170_p, this.field_179507_b); ++ return !BlockDoor.func_176514_f(this.field_75356_a.field_70170_p, this.field_179507_b); } } @@ -63,3 +65,12 @@ public void func_75246_d() { super.func_75246_d(); +@@ -61,7 +73,7 @@ + this.field_75356_a.field_70170_p.func_175718_b(1019, this.field_179507_b, 0); + } + +- this.field_75359_i++; ++ ++this.field_75359_i; + int i = (int)((float)this.field_75359_i / 240.0F * 10.0F); + + if (i != this.field_75358_j) diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIEatGrass.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIEatGrass.java.patch index b041ca995..c5c3a5b22 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIEatGrass.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIEatGrass.java.patch @@ -18,7 +18,22 @@ public boolean func_75250_a() { if (this.field_151500_b.func_70681_au().nextInt(this.field_151500_b.func_70631_g_() ? 50 : 1000) != 0) -@@ -48,7 +46,6 @@ +@@ -36,13 +34,18 @@ + else + { + BlockPos blockpos = new BlockPos(this.field_151500_b.field_70165_t, this.field_151500_b.field_70163_u, this.field_151500_b.field_70161_v); +- return field_179505_b.apply(this.field_151501_c.func_180495_p(blockpos)) +- ? true +- : this.field_151501_c.func_180495_p(blockpos.func_177977_b()).func_177230_c() == Blocks.field_150349_c; ++ ++ if (field_179505_b.apply(this.field_151501_c.func_180495_p(blockpos))) ++ { ++ return true; ++ } ++ else ++ { ++ return this.field_151501_c.func_180495_p(blockpos.func_177977_b()).func_177230_c() == Blocks.field_150349_c; ++ } } } @@ -26,7 +41,7 @@ public void func_75249_e() { this.field_151502_a = 40; -@@ -56,13 +53,11 @@ +@@ -50,13 +53,11 @@ this.field_151500_b.func_70661_as().func_75499_g(); } @@ -40,7 +55,7 @@ public boolean func_75253_b() { return this.field_151502_a > 0; -@@ -73,7 +68,6 @@ +@@ -67,7 +68,6 @@ return this.field_151502_a; } @@ -48,7 +63,7 @@ public void func_75246_d() { this.field_151502_a = Math.max(0, this.field_151502_a - 1); -@@ -84,7 +78,7 @@ +@@ -78,7 +78,7 @@ if (field_179505_b.apply(this.field_151501_c.func_180495_p(blockpos))) { @@ -57,7 +72,7 @@ { this.field_151501_c.func_175655_b(blockpos, false); } -@@ -97,7 +91,7 @@ +@@ -91,7 +91,7 @@ if (this.field_151501_c.func_180495_p(blockpos1).func_177230_c() == Blocks.field_150349_c) { diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch index 31adbcebf..da30f07ad 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch @@ -41,6 +41,15 @@ if (this.func_179487_f()) { +@@ -78,7 +67,7 @@ + { + InventoryBasic inventorybasic = this.field_179504_c.func_175551_co(); + +- for (int i = 0; i < inventorybasic.func_70302_i_(); i++) ++ for (int i = 0; i < inventorybasic.func_70302_i_(); ++i) + { + ItemStack itemstack = inventorybasic.func_70301_a(i); + boolean flag = false; @@ -105,6 +94,12 @@ world.func_180501_a(blockpos, Blocks.field_185773_cZ.func_176223_P(), 3); flag = true; diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch index 634a4ba60..3a1e07fe9 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch @@ -1,5 +1,14 @@ --- before/net/minecraft/entity/ai/EntityAIMate.java +++ after/net/minecraft/entity/ai/EntityAIMate.java +@@ -22,7 +22,7 @@ + + public EntityAIMate(EntityAnimal p_i1619_1_, double p_i1619_2_) + { +- this(p_i1619_1_, p_i1619_2_, (Class )p_i1619_1_.getClass()); ++ this(p_i1619_1_, p_i1619_2_, p_i1619_1_.getClass()); + } + + public EntityAIMate(EntityAnimal p_i47306_1_, double p_i47306_2_, Class p_i47306_4_) @@ -34,7 +34,6 @@ this.func_75248_a(3); } @@ -30,7 +39,8 @@ { this.field_75390_d.func_70671_ap().func_75651_a(this.field_75391_e, 10.0F, (float)this.field_75390_d.func_70646_bf()); this.field_75390_d.func_70661_as().func_75497_a(this.field_75391_e, this.field_75393_c); - ++this.field_75392_b; +- this.field_75392_b++; ++ ++this.field_75392_b; - if (this.field_75392_b >= 60 && this.field_75390_d.func_70068_e(this.field_75391_e) < 9.0) + if (this.field_75392_b >= 60 && this.field_75390_d.func_70068_e(this.field_75391_e) < 9.0D) @@ -65,9 +75,12 @@ if (entityageable != null) { EntityPlayerMP entityplayermp = this.field_75390_d.func_191993_do(); -@@ -122,36 +130,18 @@ +@@ -120,38 +128,20 @@ + this.field_75394_a.func_72838_d(entityageable); + Random random = this.field_75390_d.func_70681_au(); - for (int i = 0; i < 7; ++i) +- for (int i = 0; i < 7; i++) ++ for (int i = 0; i < 7; ++i) { - double d0 = random.nextGaussian() * 0.02; - double d1 = random.nextGaussian() * 0.02; diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIVillagerMate.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIVillagerMate.java.patch index 30cbb04b1..ba52516d2 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIVillagerMate.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIVillagerMate.java.patch @@ -46,7 +46,8 @@ - @Override public void func_75246_d() { - --this.field_75449_e; +- this.field_75449_e--; ++ --this.field_75449_e; this.field_75450_b.func_70671_ap().func_75651_a(this.field_75451_c, 10.0F, 30.0F); - if (this.field_75450_b.func_70068_e(this.field_75451_c) > 2.25) diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch index 9ff5b8675..aff8b56dc 100644 --- a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch @@ -151,6 +151,24 @@ if (this.field_184677_bJ.func_188756_a().func_188654_a()) { +@@ -246,7 +196,7 @@ + { + if (this.field_70976_f < 0) + { +- for (int i = 0; i < this.field_70979_e.length; i++) ++ for (int i = 0; i < this.field_70979_e.length; ++i) + { + this.field_70979_e[i][0] = (double)this.field_70177_z; + this.field_70979_e[i][1] = this.field_70163_u; +@@ -271,7 +221,7 @@ + double d2 = MathHelper.func_76138_g(this.field_184626_bk - (double)this.field_70177_z); + this.field_70177_z = (float)((double)this.field_70177_z + d2 / (double)this.field_70716_bi); + this.field_70125_A = (float)((double)this.field_70125_A + (this.field_70709_bj - (double)this.field_70125_A) / (double)this.field_70716_bi); +- this.field_70716_bi--; ++ --this.field_70716_bi; + this.func_70107_b(d5, d0, d1); + this.func_70101_b(this.field_70177_z, this.field_70125_A); + } @@ -299,44 +249,34 @@ double d3 = d6 * d6 + d7 * d7 + d8 * d8; float f5 = iphase.func_188651_f(); @@ -177,8 +195,9 @@ float f7 = Math.max(((float)vec3d2.func_72430_b(vec3d1) + 0.5F) / 1.5F, 0.0F); this.field_70704_bt *= 0.8F; this.field_70704_bt = (float)((double)this.field_70704_bt + d4 * (double)iphase.func_188653_h()); - this.field_70177_z += this.field_70704_bt * 0.1F; +- this.field_70177_z = this.field_70177_z + this.field_70704_bt * 0.1F; - float f8 = (float)(2.0 / (d3 + 1.0)); ++ this.field_70177_z += this.field_70704_bt * 0.1F; + float f8 = (float)(2.0D / (d3 + 1.0D)); float f9 = 0.06F; this.func_191958_b(0.0F, 0.0F, -1.0F, 0.06F * (f7 * f8 + (1.0F - f8))); @@ -204,7 +223,13 @@ } } -@@ -364,56 +304,35 @@ +@@ -359,63 +299,42 @@ + this.field_70990_bB.field_70130_N = 4.0F; + Vec3d[] avec3d = new Vec3d[this.field_70977_g.length]; + +- for (int j = 0; j < this.field_70977_g.length; j++) ++ for (int j = 0; j < this.field_70977_g.length; ++j) + { avec3d[j] = new Vec3d(this.field_70977_g[j].field_70165_t, this.field_70977_g[j].field_70163_u, this.field_70977_g[j].field_70161_v); } @@ -272,8 +297,11 @@ + this.field_70986_h.func_70012_b(this.field_70165_t + (double)(f19 * 6.5F * f16), this.field_70163_u + (double)f20 + (double)(f2 * 6.5F), this.field_70161_v - (double)(f4 * 6.5F * f16), 0.0F, 0.0F); + this.field_184673_bv.func_70012_b(this.field_70165_t + (double)(f19 * 5.5F * f16), this.field_70163_u + (double)f20 + (double)(f2 * 5.5F), this.field_70161_v - (double)(f4 * 5.5F * f16), 0.0F, 0.0F); - for (int k = 0; k < 3; ++k) +- for (int k = 0; k < 3; k++) ++ for (int k = 0; k < 3; ++k) { + MultiPartEntityPart multipartentitypart = null; + @@ -435,26 +354,18 @@ } @@ -304,6 +332,15 @@ if (this.field_184676_bI != null) { +@@ -462,7 +373,7 @@ + } + } + +- for (int l = 0; l < this.field_70977_g.length; l++) ++ for (int l = 0; l < this.field_70977_g.length; ++l) + { + this.field_70977_g[l].field_70169_q = avec3d[l].field_72450_a; + this.field_70977_g[l].field_70167_r = avec3d[l].field_72448_b; @@ -478,7 +389,7 @@ if (this.field_184677_bJ.func_188756_a().func_188654_a()) @@ -342,7 +379,29 @@ if (!this.field_184677_bJ.func_188756_a().func_188654_a() && ((EntityLivingBase)entity).func_142015_aE() < entity.field_70173_aa - 2) { -@@ -588,28 +499,22 @@ +@@ -550,7 +461,7 @@ + + private void func_70971_b(List p_70971_1_) + { +- for (int i = 0; i < p_70971_1_.size(); i++) ++ for (int i = 0; i < p_70971_1_.size(); ++i) + { + Entity entity = p_70971_1_.get(i); + +@@ -578,38 +489,32 @@ + boolean flag = false; + boolean flag1 = false; + +- for (int k1 = i; k1 <= l; k1++) ++ for (int k1 = i; k1 <= l; ++k1) + { +- for (int l1 = j; l1 <= i1; l1++) ++ for (int l1 = j; l1 <= i1; ++l1) + { +- for (int i2 = k; i2 <= j1; i2++) ++ for (int i2 = k; i2 <= j1; ++i2) + { + BlockPos blockpos = new BlockPos(k1, l1, i2); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); @@ -425,7 +484,15 @@ protected void func_70609_aI() { if (this.field_184676_bI != null) -@@ -717,16 +618,7 @@ +@@ -710,23 +611,14 @@ + this.field_184676_bI.func_186099_b(this); + } + +- this.field_70995_bG++; ++ ++this.field_70995_bG; + + if (this.field_70995_bG >= 180 && this.field_70995_bG <= 200) + { float f = (this.field_70146_Z.nextFloat() - 0.5F) * 8.0F; float f1 = (this.field_70146_Z.nextFloat() - 0.5F) * 4.0F; float f2 = (this.field_70146_Z.nextFloat() - 0.5F) * 8.0F; @@ -461,6 +528,15 @@ while (p_184668_1_ > 0) { int i = EntityXPOrb.func_70527_a(p_184668_1_); +@@ -784,7 +678,7 @@ + { + if (this.field_184680_bM[0] == null) + { +- for (int i = 0; i < 24; i++) ++ for (int i = 0; i < 24; ++i) + { + int j = 5; + int l; @@ -792,21 +686,21 @@ if (i < 12) @@ -489,6 +565,42 @@ } int j1 = Math.max(this.field_70170_p.func_181545_F() + 10, this.field_70170_p.func_175672_r(new BlockPos(l, 0, i1)).func_177956_o() + j); +@@ -854,7 +748,7 @@ + j = 12; + } + +- for (int k = j; k < 24; k++) ++ for (int k = j; k < 24; ++k) + { + if (this.field_184680_bM[k] != null) + { +@@ -874,7 +768,7 @@ + @Nullable + public Path func_184666_a(int p_184666_1_, int p_184666_2_, @Nullable PathPoint p_184666_3_) + { +- for (int i = 0; i < 24; i++) ++ for (int i = 0; i < 24; ++i) + { + PathPoint pathpoint = this.field_184680_bM[i]; + pathpoint.field_75842_i = false; +@@ -923,7 +817,7 @@ + pathpoint2.field_75842_i = true; + int k = 0; + +- for (int l = 0; l < 24; l++) ++ for (int l = 0; l < 24; ++l) + { + if (this.field_184680_bM[l] == pathpoint2) + { +@@ -932,7 +826,7 @@ + } + } + +- for (int i1 = j; i1 < 24; i1++) ++ for (int i1 = j; i1 < 24; ++i1) + { + if ((this.field_184681_bN[k] & 1 << i1) > 0) + { @@ -969,7 +863,7 @@ } else @@ -498,6 +610,27 @@ if (p_184666_3_ != null) { +@@ -987,17 +881,17 @@ + + for (PathPoint pathpoint = p_184669_2_; pathpoint.field_75841_h != null; pathpoint = pathpoint.field_75841_h) + { +- i++; ++ ++i; + } + + PathPoint[] apathpoint = new PathPoint[i]; + PathPoint pathpoint1 = p_184669_2_; +- i--; ++ --i; + + for (apathpoint[i] = p_184669_2_; pathpoint1.field_75841_h != null; apathpoint[i] = pathpoint1) + { + pathpoint1 = pathpoint1.field_75841_h; +- i--; ++ --i; + } + + return new Path(apathpoint); @@ -1008,14 +902,12 @@ EntityLiving.func_189752_a(p_189755_0_, EntityDragon.class); } diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch index 07efa5330..da2c33ab7 100644 --- a/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch @@ -122,7 +122,7 @@ if (!this.field_70170_p.field_72995_K && this.func_82203_t(0) > 0) { -@@ -169,32 +157,32 @@ +@@ -169,43 +157,43 @@ if (entity != null) { @@ -136,7 +136,7 @@ + this.field_70181_x = 0.0D; } -- this.field_70181_x += (0.5 - this.field_70181_x) * 0.6F; +- this.field_70181_x = this.field_70181_x + (0.5 - this.field_70181_x) * 0.6F; + this.field_70181_x += (0.5D - this.field_70181_x) * 0.6000000238418579D; } @@ -148,8 +148,8 @@ + if (d3 > 9.0D) { double d5 = (double)MathHelper.func_76133_a(d3); -- this.field_70159_w += (d0 / d5 * 0.5 - this.field_70159_w) * 0.6F; -- this.field_70179_y += (d1 / d5 * 0.5 - this.field_70179_y) * 0.6F; +- this.field_70159_w = this.field_70159_w + (d0 / d5 * 0.5 - this.field_70159_w) * 0.6F; +- this.field_70179_y = this.field_70179_y + (d1 / d5 * 0.5 - this.field_70179_y) * 0.6F; + this.field_70159_w += (d0 / d5 * 0.5D - this.field_70159_w) * 0.6000000238418579D; + this.field_70179_y += (d1 / d5 * 0.5D - this.field_70179_y) * 0.6000000238418579D; } @@ -164,6 +164,19 @@ } super.func_70636_d(); + +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { + this.field_82218_g[i] = this.field_82221_e[i]; + this.field_82217_f[i] = this.field_82220_d[i]; + } + +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) + { + int k = this.func_82203_t(j + 1); + Entity entity1 = null; @@ -224,8 +212,8 @@ double d7 = entity1.field_70163_u + (double)entity1.func_70047_e() - d12; double d8 = entity1.field_70161_v - d13; @@ -175,7 +188,13 @@ this.field_82220_d[j] = this.func_82204_b(this.field_82220_d[j], f1, 40.0F); this.field_82221_e[j] = this.func_82204_b(this.field_82221_e[j], f, 10.0F); } -@@ -242,29 +230,11 @@ +@@ -237,56 +225,28 @@ + + boolean flag = this.func_82205_o(); + +- for (int l = 0; l < 3; l++) ++ for (int l = 0; l < 3; ++l) + { double d10 = this.func_82214_u(l); double d2 = this.func_82208_v(l); double d4 = this.func_82213_w(l); @@ -207,9 +226,10 @@ } } -@@ -272,21 +242,11 @@ + if (this.func_82212_n() > 0) { - for (int i1 = 0; i1 < 3; ++i1) +- for (int i1 = 0; i1 < 3; i1++) ++ for (int i1 = 0; i1 < 3; ++i1) { - this.field_70170_p - .func_175688_a( @@ -248,7 +268,14 @@ this.field_70170_p.func_175669_a(1023, new BlockPos(this), 0); } -@@ -325,16 +276,22 @@ +@@ -319,22 +270,28 @@ + { + super.func_70619_bc(); + +- for (int i = 1; i < 3; i++) ++ for (int i = 1; i < 3; ++i) + { + if (this.field_70173_aa >= this.field_82223_h[i - 1]) { this.field_82223_h[i - 1] = this.field_70173_aa + 10 + this.field_70146_Z.nextInt(10); @@ -280,7 +307,7 @@ } int k1 = this.func_82203_t(i); -@@ -343,29 +300,27 @@ +@@ -343,31 +300,29 @@ { Entity entity = this.field_70170_p.func_73045_a(k1); @@ -322,17 +349,37 @@ - ); + List list = this.field_70170_p.func_175647_a(EntityLivingBase.class, this.func_174813_aQ().func_72314_b(20.0D, 8.0D, 20.0D), Predicates.and(field_82219_bJ, EntitySelectors.field_180132_d)); - for (int j2 = 0; j2 < 10 && !list.isEmpty(); ++j2) +- for (int j2 = 0; j2 < 10 && !list.isEmpty(); j2++) ++ for (int j2 = 0; j2 < 10 && !list.isEmpty(); ++j2) { -@@ -407,7 +362,7 @@ + EntityLivingBase entitylivingbase = list.get(this.field_70146_Z.nextInt(list.size())); + +@@ -405,20 +360,20 @@ + + if (this.field_82222_j > 0) { - --this.field_82222_j; +- this.field_82222_j--; ++ --this.field_82222_j; - if (this.field_82222_j == 0 && this.field_70170_p.func_82736_K().func_82766_b("mobGriefing")) + if (this.field_82222_j == 0 && net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.field_70170_p, this)) { int i1 = MathHelper.func_76128_c(this.field_70163_u); int l1 = MathHelper.func_76128_c(this.field_70165_t); + int i2 = MathHelper.func_76128_c(this.field_70161_v); + boolean flag = false; + +- for (int k2 = -1; k2 <= 1; k2++) ++ for (int k2 = -1; k2 <= 1; ++k2) + { +- for (int l2 = -1; l2 <= 1; l2++) ++ for (int l2 = -1; l2 <= 1; ++l2) + { +- for (int j = 0; j <= 3; j++) ++ for (int j = 0; j <= 3; ++j) + { + int i3 = l1 + k2; + int k = i1 + j; @@ -427,7 +382,7 @@ IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); @@ -498,9 +545,9 @@ - this.field_82222_j = 20; - } - -- for (int i = 0; i < this.field_82224_i.length; ++i) +- for (int i = 0; i < this.field_82224_i.length; i++) - { -- this.field_82224_i[i] += 3; +- this.field_82224_i[i] = this.field_82224_i[i] + 3; - } - - return super.func_70097_a(p_70097_1_, p_70097_2_); diff --git a/patches/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java.patch b/patches/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java.patch index df8813e53..f9c897a4b 100644 --- a/patches/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java.patch @@ -1,14 +1,15 @@ --- before/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java +++ after/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java -@@ -20,7 +20,6 @@ +@@ -20,49 +20,37 @@ super(p_i46786_1_); } - @Override public void func_188657_b() { - ++this.field_188664_b; -@@ -28,38 +27,27 @@ +- this.field_188664_b++; ++ ++this.field_188664_b; + if (this.field_188664_b % 2 == 0 && this.field_188664_b < 10) { Vec3d vec3d = this.field_188661_a.func_184665_a(1.0F).func_72432_b(); @@ -18,7 +19,8 @@ double d1 = this.field_188661_a.field_70986_h.field_70163_u + (double)(this.field_188661_a.field_70986_h.field_70131_O / 2.0F); double d2 = this.field_188661_a.field_70986_h.field_70161_v; - for (int i = 0; i < 8; ++i) +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) { - double d3 = d0 + this.field_188661_a.func_70681_au().nextGaussian() / 2.0; - double d4 = d1 + this.field_188661_a.func_70681_au().nextGaussian() / 2.0; @@ -27,7 +29,8 @@ + double d4 = d1 + this.field_188661_a.func_70681_au().nextGaussian() / 2.0D; + double d5 = d2 + this.field_188661_a.func_70681_au().nextGaussian() / 2.0D; - for (int j = 0; j < 6; ++j) +- for (int j = 0; j < 6; j++) ++ for (int j = 0; j < 6; ++j) { - this.field_188661_a - .field_70170_p @@ -52,7 +55,11 @@ - @Override public void func_188659_c() { - ++this.field_188664_b; +- this.field_188664_b++; ++ ++this.field_188664_b; + + if (this.field_188664_b >= 200) + { @@ -77,23 +65,17 @@ } else if (this.field_188664_b == 10) @@ -92,7 +99,8 @@ public void func_188660_d() { this.field_188664_b = 0; - ++this.field_188665_c; +- this.field_188665_c++; ++ ++this.field_188665_c; } - @Override diff --git a/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch b/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch index 5ca7d706c..ea5e0280b 100644 --- a/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch +++ b/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch @@ -8,7 +8,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.SoundEvents; import net.minecraft.nbt.NBTTagCompound; -@@ -29,11 +30,7 @@ +@@ -29,23 +30,18 @@ this.field_184529_d = p_i46780_8_; BlockPos blockpos = new BlockPos(this); @@ -21,7 +21,11 @@ { if (p_i46780_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && Blocks.field_150480_ab.func_176196_c(p_i46780_1_, blockpos)) { -@@ -44,8 +41,7 @@ + p_i46780_1_.func_175656_a(blockpos, Blocks.field_150480_ab.func_176223_P()); + } + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { BlockPos blockpos1 = blockpos.func_177982_a(this.field_70146_Z.nextInt(3) - 1, this.field_70146_Z.nextInt(3) - 1, this.field_70146_Z.nextInt(3) - 1); @@ -31,7 +35,7 @@ { p_i46780_1_.func_175656_a(blockpos1, Blocks.field_150480_ab.func_176223_P()); } -@@ -53,41 +49,19 @@ +@@ -53,44 +49,22 @@ } } @@ -74,7 +78,20 @@ + this.field_70170_p.func_184148_a((EntityPlayer)null, this.field_70165_t, this.field_70163_u, this.field_70161_v, SoundEvents.field_187752_dd, SoundCategory.WEATHER, 2.0F, 0.5F + this.field_70146_Z.nextFloat() * 0.2F); } - --this.field_70262_b; +- this.field_70262_b--; ++ --this.field_70262_b; + + if (this.field_70262_b < 0) + { +@@ -100,7 +74,7 @@ + } + else if (this.field_70262_b < -this.field_70146_Z.nextInt(10)) + { +- this.field_70263_c--; ++ --this.field_70263_c; + this.field_70262_b = 1; + + if (!this.field_184529_d && !this.field_70170_p.field_72995_K) @@ -108,10 +82,7 @@ this.field_70264_a = this.field_70146_Z.nextLong(); BlockPos blockpos = new BlockPos(this); @@ -107,7 +124,8 @@ + double d0 = 3.0D; + List list = this.field_70170_p.func_72839_b(this, new AxisAlignedBB(this.field_70165_t - 3.0D, this.field_70163_u - 3.0D, this.field_70161_v - 3.0D, this.field_70165_t + 3.0D, this.field_70163_u + 6.0D + 3.0D, this.field_70161_v + 3.0D)); - for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) { Entity entity = list.get(i); - entity.func_70077_a(this); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityArmorStand.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityArmorStand.java.patch index 6cf6aa9f7..283f2ae2e 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityArmorStand.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityArmorStand.java.patch @@ -144,7 +144,25 @@ public void func_70037_a(NBTTagCompound p_70037_1_) { super.func_70037_a(p_70037_1_); -@@ -347,18 +345,15 @@ +@@ -266,7 +264,7 @@ + { + NBTTagList nbttaglist = p_70037_1_.func_150295_c("ArmorItems", 10); + +- for (int i = 0; i < this.field_184800_bx.size(); i++) ++ for (int i = 0; i < this.field_184800_bx.size(); ++i) + { + this.field_184800_bx.set(i, new ItemStack(nbttaglist.func_150305_b(i))); + } +@@ -276,7 +274,7 @@ + { + NBTTagList nbttaglist1 = p_70037_1_.func_150295_c("HandItems", 10); + +- for (int j = 0; j < this.field_184799_bw.size(); j++) ++ for (int j = 0; j < this.field_184799_bw.size(); ++j) + { + this.field_184799_bw.set(j, new ItemStack(nbttaglist1.func_150305_b(j))); + } +@@ -347,99 +345,98 @@ return nbttagcompound; } @@ -163,7 +181,9 @@ protected void func_85033_bc() { List list = this.field_70170_p.func_175674_a(this, this.func_174813_aQ(), field_184798_bv); -@@ -367,79 +362,81 @@ + +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) { Entity entity = list.get(i); @@ -546,7 +566,14 @@ if (f <= 0.5F) { -@@ -657,7 +647,7 @@ +@@ -651,24 +641,24 @@ + { + this.func_190773_I(); + +- for (int i = 0; i < this.field_184799_bw.size(); i++) ++ for (int i = 0; i < this.field_184799_bw.size(); ++i) + { + ItemStack itemstack = this.field_184799_bw.get(i); if (!itemstack.func_190926_b()) { @@ -555,7 +582,11 @@ this.field_184799_bw.set(i, ItemStack.field_190927_a); } } -@@ -668,7 +658,7 @@ + +- for (int j = 0; j < this.field_184800_bx.size(); j++) ++ for (int j = 0; j < this.field_184800_bx.size(); ++j) + { + ItemStack itemstack1 = this.field_184800_bx.get(j); if (!itemstack1.func_190926_b()) { diff --git a/patches/minecraft/net/minecraft/entity/item/EntityBoat.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityBoat.java.patch index baaf3aa46..69270c3a6 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityBoat.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityBoat.java.patch @@ -204,6 +204,15 @@ public void func_70071_h_() { this.field_184471_aG = this.field_184469_aF; +@@ -253,7 +238,7 @@ + } + else + { +- this.field_184474_h++; ++ ++this.field_184474_h; + } + + if (!this.field_70170_p.field_72995_K && this.field_184474_h >= 60.0F) @@ -296,18 +281,16 @@ } else @@ -216,7 +225,8 @@ + this.field_70179_y = 0.0D; } - for (int i = 0; i <= 1; ++i) +- for (int i = 0; i <= 1; i++) ++ for (int i = 0; i <= 1; ++i) { if (this.func_184457_a(i)) { @@ -251,7 +261,7 @@ } else { -@@ -339,7 +312,7 @@ +@@ -339,25 +312,19 @@ } this.func_145775_I(); @@ -260,7 +270,12 @@ if (!list.isEmpty()) { -@@ -351,13 +324,7 @@ + boolean flag = !this.field_70170_p.field_72995_K && !(this.func_184179_bs() instanceof EntityPlayer); + +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) + { + Entity entity = list.get(j); if (!entity.func_184196_w(this)) { @@ -275,6 +290,15 @@ { entity.func_184220_m(this); } +@@ -397,7 +364,7 @@ + double d3 = MathHelper.func_76138_g(this.field_70273_g - (double)this.field_70177_z); + this.field_70177_z = (float)((double)this.field_70177_z + d3 / (double)this.field_184476_at); + this.field_70125_A = (float)((double)this.field_70125_A + (this.field_184479_ay - (double)this.field_70125_A) / (double)this.field_184476_at); +- this.field_184476_at--; ++ --this.field_184476_at; + this.func_70107_b(d0, d1, d2); + this.func_70101_b(this.field_70177_z, this.field_70125_A); + } @@ -405,18 +372,14 @@ public void func_184445_a(boolean p_184445_1_, boolean p_184445_2_) @@ -297,22 +321,24 @@ } private EntityBoat.Status func_184449_t() -@@ -461,7 +424,7 @@ +@@ -461,48 +424,54 @@ try { -- label89: +- label87: + label108: - for (int k1 = k; k1 < l; ++k1) +- for (int k1 = k; k1 < l; k1++) ++ for (int k1 = k; k1 < l; ++k1) { -@@ -470,35 +433,45 @@ + float f = 0.0F; + int l1 = i; while (true) { - if (l1 < j) - { -- for (int i2 = i1; i2 < j1; ++i2) +- for (int i2 = i1; i2 < j1; i2++) - { - blockpos$pooledmutableblockpos.func_181079_c(l1, k1, i2); - IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos$pooledmutableblockpos); @@ -324,27 +350,24 @@ - - if (f >= 1.0F) - { -- continue label89; +- continue label87; - } - } - -- ++l1; -- continue; -- } -- else if (f < 1.0F) -- { -- return (float)blockpos$pooledmutableblockpos.func_177956_o() + f; +- l1++; - } +- else + if (l1 >= j) -+ { -+ if (f < 1.0F) -+ { + { + if (f < 1.0F) + { +- return (float)blockpos$pooledmutableblockpos.func_177956_o() + f; + float f2 = (float)blockpos$pooledmutableblockpos.func_177956_o() + f; + return f2; -+ } -+ -+ break; -+ } + } + + break; + } + + for (int i2 = i1; i2 < j1; ++i2) + { @@ -378,7 +401,7 @@ } finally { -@@ -509,21 +482,14 @@ +@@ -513,36 +482,29 @@ public float func_184441_l() { AxisAlignedBB axisalignedbb = this.func_174813_aQ(); @@ -402,16 +425,36 @@ float f = 0.0F; int k1 = 0; BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -@@ -548,7 +514,7 @@ + + try + { +- for (int l1 = i; l1 < j; l1++) ++ for (int l1 = i; l1 < j; ++l1) + { +- for (int i2 = i1; i2 < j1; i2++) ++ for (int i2 = i1; i2 < j1; ++i2) + { + int j2 = (l1 != i && l1 != j - 1 ? 0 : 1) + (i2 != i1 && i2 != j1 - 1 ? 0 : 1); + + if (j2 != 2) + { +- for (int k2 = k; k2 < l; k2++) ++ for (int k2 = k; k2 < l; ++k2) + { + if (j2 <= 0 || k2 != k && k2 != l - 1) + { +@@ -552,8 +514,8 @@ if (!list.isEmpty()) { - f += iblockstate.func_177230_c().field_149765_K; +- k1++; + f += iblockstate.func_177230_c().getSlipperiness(iblockstate, this.field_70170_p, blockpos$pooledmutableblockpos, this); - ++k1; ++ ++k1; } -@@ -573,7 +539,7 @@ + list.clear(); +@@ -577,7 +539,7 @@ int i = MathHelper.func_76128_c(axisalignedbb.field_72340_a); int j = MathHelper.func_76143_f(axisalignedbb.field_72336_d); int k = MathHelper.func_76128_c(axisalignedbb.field_72338_b); @@ -420,10 +463,22 @@ int i1 = MathHelper.func_76128_c(axisalignedbb.field_72339_c); int j1 = MathHelper.func_76143_f(axisalignedbb.field_72334_f); boolean flag = false; -@@ -591,6 +557,15 @@ +@@ -586,14 +548,23 @@ + + try + { +- for (int k1 = i; k1 < j; k1++) ++ for (int k1 = i; k1 < j; ++k1) + { +- for (int l1 = k; l1 < l; l1++) ++ for (int l1 = k; l1 < l; ++l1) + { +- for (int i2 = i1; i2 < j1; i2++) ++ for (int i2 = i1; i2 < j1; ++i2) + { blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos$pooledmutableblockpos); - ++ + Boolean result = iblockstate.func_177230_c().isAABBInsideMaterial(field_70170_p, blockpos$pooledmutableblockpos, axisalignedbb, Material.field_151586_h); + if (result != null) { + if (!result) continue; @@ -432,11 +487,10 @@ + this.field_184465_aD = Math.max((double)f, this.field_184465_aD); + flag |= axisalignedbb.field_72338_b < (double)f; + } -+ + if (iblockstate.func_185904_a() == Material.field_151586_h) { - float f = BlockLiquid.func_190972_g(iblockstate, this.field_70170_p, blockpos$pooledmutableblockpos); -@@ -613,7 +588,7 @@ +@@ -617,7 +588,7 @@ private EntityBoat.Status func_184444_v() { AxisAlignedBB axisalignedbb = this.func_174813_aQ(); @@ -445,7 +499,19 @@ int i = MathHelper.func_76128_c(axisalignedbb.field_72340_a); int j = MathHelper.func_76143_f(axisalignedbb.field_72336_d); int k = MathHelper.func_76128_c(axisalignedbb.field_72337_e); -@@ -634,12 +609,24 @@ +@@ -629,21 +600,33 @@ + + try + { +- for (int k1 = i; k1 < j; k1++) ++ for (int k1 = i; k1 < j; ++k1) + { +- for (int l1 = k; l1 < l; l1++) ++ for (int l1 = k; l1 < l; ++l1) + { +- for (int i2 = i1; i2 < j1; i2++) ++ for (int i2 = i1; i2 < j1; ++i2) + { blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos$pooledmutableblockpos); @@ -475,7 +541,7 @@ } flag = true; -@@ -658,19 +645,17 @@ +@@ -662,19 +645,17 @@ private void func_184450_w() { @@ -502,7 +568,7 @@ this.field_184469_aF = EntityBoat.Status.IN_WATER; } else -@@ -682,12 +667,12 @@ +@@ -686,12 +667,12 @@ } else if (this.field_184469_aF == EntityBoat.Status.UNDER_FLOWING_WATER) { @@ -517,8 +583,16 @@ this.field_184472_g = 0.45F; } else if (this.field_184469_aF == EntityBoat.Status.IN_AIR) -@@ -709,12 +694,12 @@ - this.field_184475_as *= this.field_184472_g; +@@ -708,17 +689,17 @@ + } + } + +- this.field_70159_w = this.field_70159_w * (double)this.field_184472_g; +- this.field_70179_y = this.field_70179_y * (double)this.field_184472_g; +- this.field_184475_as = this.field_184475_as * this.field_184472_g; ++ this.field_70159_w *= (double)this.field_184472_g; ++ this.field_70179_y *= (double)this.field_184472_g; ++ this.field_184475_as *= this.field_184472_g; this.field_70181_x += d1; - if (d2 > 0.0) @@ -535,12 +609,30 @@ } } } -@@ -752,21 +737,18 @@ +@@ -736,7 +717,7 @@ + + if (this.field_184459_aA) + { +- this.field_184475_as++; ++ ++this.field_184475_as; + } + + if (this.field_184459_aA != this.field_184480_az && !this.field_184461_aB && !this.field_184463_aC) +@@ -744,7 +725,7 @@ + f += 0.005F; + } + +- this.field_70177_z = this.field_70177_z + this.field_184475_as; ++ this.field_70177_z += this.field_184475_as; + + if (this.field_184461_aB) + { +@@ -756,21 +737,18 @@ f -= 0.005F; } -- this.field_70159_w += (double)(MathHelper.func_76126_a(-this.field_70177_z * (float)(Math.PI / 180.0)) * f); -- this.field_70179_y += (double)(MathHelper.func_76134_b(this.field_70177_z * (float)(Math.PI / 180.0)) * f); +- this.field_70159_w = this.field_70159_w + (double)(MathHelper.func_76126_a(-this.field_70177_z * (float)(Math.PI / 180.0)) * f); +- this.field_70179_y = this.field_70179_y + (double)(MathHelper.func_76134_b(this.field_70177_z * (float)(Math.PI / 180.0)) * f); - this.func_184445_a( - this.field_184459_aA && !this.field_184480_az || this.field_184461_aB, this.field_184480_az && !this.field_184459_aA || this.field_184461_aB - ); @@ -561,7 +653,7 @@ if (this.func_184188_bt().size() > 1) { -@@ -783,11 +765,11 @@ +@@ -787,13 +765,13 @@ if (p_184232_1_ instanceof EntityAnimal) { @@ -573,9 +665,12 @@ - Vec3d vec3d = new Vec3d((double)f, 0.0, 0.0).func_178785_b(-this.field_70177_z * (float)(Math.PI / 180.0) - (float)(Math.PI / 2)); + Vec3d vec3d = (new Vec3d((double)f, 0.0D, 0.0D)).func_178785_b(-this.field_70177_z * 0.017453292F - ((float)Math.PI / 2F)); p_184232_1_.func_70107_b(this.field_70165_t + vec3d.field_72450_a, this.field_70163_u + (double)f1, this.field_70161_v + vec3d.field_72449_c); - p_184232_1_.field_70177_z += this.field_184475_as; +- p_184232_1_.field_70177_z = p_184232_1_.field_70177_z + this.field_184475_as; ++ p_184232_1_.field_70177_z += this.field_184475_as; p_184232_1_.func_70034_d(p_184232_1_.func_70079_am() + this.field_184475_as); -@@ -813,19 +795,16 @@ + this.func_184454_a(p_184232_1_); + +@@ -817,19 +795,16 @@ } @SideOnly(Side.CLIENT) @@ -595,7 +690,7 @@ protected void func_70037_a(NBTTagCompound p_70037_1_) { if (p_70037_1_.func_150297_b("Type", 8)) -@@ -834,7 +813,6 @@ +@@ -838,7 +813,6 @@ } } @@ -603,7 +698,7 @@ public boolean func_184230_a(EntityPlayer p_184230_1_, EnumHand p_184230_2_) { if (p_184230_1_.func_70093_af()) -@@ -852,7 +830,6 @@ +@@ -856,7 +830,6 @@ } } @@ -611,7 +706,22 @@ protected void func_184231_a(double p_184231_1_, boolean p_184231_3_, IBlockState p_184231_4_, BlockPos p_184231_5_) { this.field_184473_aH = this.field_70181_x; -@@ -892,7 +869,7 @@ +@@ -881,12 +854,12 @@ + + if (this.field_70170_p.func_82736_K().func_82766_b("doEntityDrops")) + { +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) + { + this.func_70099_a(new ItemStack(Item.func_150898_a(Blocks.field_150344_f), 1, this.func_184453_r().func_184982_b()), 0.0F); + } + +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) + { + this.func_145778_a(Items.field_151055_y, 1, 0.0F); + } +@@ -896,7 +869,7 @@ this.field_70143_R = 0.0F; } @@ -620,7 +730,7 @@ { this.field_70143_R = (float)((double)this.field_70143_R - p_184231_1_); } -@@ -901,61 +878,59 @@ +@@ -905,61 +878,59 @@ public boolean func_184457_a(int p_184457_1_) { @@ -692,7 +802,7 @@ } @SideOnly(Side.CLIENT) -@@ -1004,7 +979,6 @@ +@@ -1008,7 +979,6 @@ return this.field_184991_h; } @@ -700,7 +810,16 @@ public String toString() { return this.field_184990_g; -@@ -1031,6 +1005,22 @@ +@@ -1026,7 +996,7 @@ + + public static EntityBoat.Type func_184981_a(String p_184981_0_) + { +- for (int i = 0; i < values().length; i++) ++ for (int i = 0; i < values().length; ++i) + { + if (values()[i].func_184980_a().equals(p_184981_0_)) + { +@@ -1035,6 +1005,22 @@ } return values()[0]; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch index 3159ca54b..654b75ae8 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch @@ -8,9 +8,12 @@ protected void func_70184_a(RayTraceResult p_70184_1_) { EntityLivingBase entitylivingbase = this.func_85052_h(); -@@ -88,16 +87,7 @@ +@@ -86,18 +85,9 @@ + } + } - for (int i = 0; i < 32; ++i) +- for (int i = 0; i < 32; i++) ++ for (int i = 0; i < 32; ++i) { - this.field_70170_p - .func_175688_a( diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch index 99da349b5..a65505201 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch @@ -71,6 +71,15 @@ if (this.func_92059_d().func_190926_b()) { this.func_70106_y(); +@@ -87,7 +95,7 @@ + + if (this.field_145804_b > 0 && this.field_145804_b != 32767) + { +- this.field_145804_b--; ++ --this.field_145804_b; + } + + this.field_70169_q = this.field_70165_t; @@ -99,7 +107,7 @@ if (!this.func_189652_ae()) @@ -105,7 +114,7 @@ this.field_70159_w = (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.2F); this.field_70179_y = (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.2F); this.func_184185_a(SoundEvents.field_187658_bx, 0.4F, 2.0F + this.field_70146_Z.nextFloat() * 0.4F); -@@ -138,26 +142,18 @@ +@@ -138,31 +142,23 @@ if (this.field_70122_E) { @@ -137,6 +146,12 @@ } if (this.field_70292_b != -32768) + { +- this.field_70292_b++; ++ ++this.field_70292_b; + } + + this.func_70072_I(); @@ -174,13 +170,21 @@ double d5 = this.field_70179_y - d2; double d6 = d3 * d3 + d4 * d4 + d5 * d5; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index c700b6d00..c74c5deb9 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -230,6 +230,24 @@ { this.func_70076_C(); } +@@ -293,7 +289,7 @@ + + if (this.field_71088_bW > 0) + { +- this.field_71088_bW--; ++ --this.field_71088_bW; + } + + this.field_70170_p.field_72984_F.func_76319_b(); +@@ -309,7 +305,7 @@ + double d1 = MathHelper.func_76138_g(this.field_70512_ao - (double)this.field_70177_z); + this.field_70177_z = (float)((double)this.field_70177_z + d1 / (double)this.field_70510_h); + this.field_70125_A = (float)((double)this.field_70125_A + (this.field_70513_ap - (double)this.field_70125_A) / (double)this.field_70510_h); +- this.field_70510_h--; ++ --this.field_70510_h; + this.func_70107_b(d4, d5, d6); + this.func_70101_b(this.field_70177_z, this.field_70125_A); + } @@ -327,7 +323,7 @@ if (!this.func_189652_ae()) @@ -239,7 +257,14 @@ } int k = MathHelper.func_76128_c(this.field_70165_t); -@@ -342,13 +338,13 @@ +@@ -336,19 +332,19 @@ + + if (BlockRailBase.func_176562_d(this.field_70170_p, new BlockPos(k, l - 1, i1))) + { +- l--; ++ --l; + } + BlockPos blockpos = new BlockPos(k, l, i1); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); @@ -276,7 +301,7 @@ { this.field_70177_z += 180.0F; this.field_70499_f = !this.field_70499_f; -@@ -381,10 +377,13 @@ +@@ -381,22 +377,21 @@ this.func_70101_b(this.field_70177_z, this.field_70125_A); @@ -293,7 +318,8 @@ if (!list.isEmpty()) { -@@ -392,11 +391,7 @@ +- for (int j1 = 0; j1 < list.size(); j1++) ++ for (int j1 = 0; j1 < list.size(); ++j1) { Entity entity1 = list.get(j1); @@ -374,7 +400,7 @@ } } -@@ -466,29 +473,29 @@ +@@ -466,30 +473,30 @@ if (blockrailbase == Blocks.field_150318_D) { @@ -392,25 +418,30 @@ { case ASCENDING_EAST: - this.field_70159_w -= 0.0078125; +- this.field_70163_u++; + this.field_70159_w -= slopeAdjustment; - ++this.field_70163_u; ++ ++this.field_70163_u; break; case ASCENDING_WEST: - this.field_70159_w += 0.0078125; +- this.field_70163_u++; + this.field_70159_w += slopeAdjustment; - ++this.field_70163_u; ++ ++this.field_70163_u; break; case ASCENDING_NORTH: - this.field_70179_y += 0.0078125; +- this.field_70163_u++; + this.field_70179_y += slopeAdjustment; - ++this.field_70163_u; ++ ++this.field_70163_u; break; case ASCENDING_SOUTH: - this.field_70179_y -= 0.0078125; +- this.field_70163_u++; + this.field_70179_y -= slopeAdjustment; - ++this.field_70163_u; ++ ++this.field_70163_u; } + int[][] aint = field_70500_g[blockrailbase$enumraildirection.func_177015_a()]; @@ -498,7 +505,7 @@ double d3 = Math.sqrt(d1 * d1 + d2 * d2); double d4 = this.field_70159_w * d1 + this.field_70179_y * d2; @@ -586,8 +617,8 @@ + if (d15 > 0.01D) { - double d16 = 0.06; -- this.field_70159_w += this.field_70159_w / d15 * 0.06; -- this.field_70179_y += this.field_70179_y / d15 * 0.06; +- this.field_70159_w = this.field_70159_w + this.field_70159_w / d15 * 0.06; +- this.field_70179_y = this.field_70179_y + this.field_70179_y / d15 * 0.06; + double d16 = 0.06D; + this.field_70159_w += this.field_70159_w / d15 * 0.06D; + this.field_70179_y += this.field_70179_y / d15 * 0.06D; @@ -656,7 +687,15 @@ } @Nullable -@@ -715,9 +709,7 @@ +@@ -708,16 +702,14 @@ + + if (BlockRailBase.func_176562_d(this.field_70170_p, new BlockPos(i, j - 1, k))) + { +- j--; ++ --j; + } + + IBlockState iblockstate = this.field_70170_p.func_180495_p(new BlockPos(i, j, k)); if (BlockRailBase.func_176563_d(iblockstate)) { @@ -682,7 +721,15 @@ if (aint[0][1] != 0 && MathHelper.func_76128_c(p_70495_1_) - i == aint[0][0] && MathHelper.func_76128_c(p_70495_5_) - k == aint[0][2]) { -@@ -767,26 +759,24 @@ +@@ -760,33 +752,31 @@ + + if (BlockRailBase.func_176562_d(this.field_70170_p, new BlockPos(i, j - 1, k))) + { +- j--; ++ --j; + } + + IBlockState iblockstate = this.field_70170_p.func_180495_p(new BlockPos(i, j, k)); if (BlockRailBase.func_176563_d(iblockstate)) { @@ -734,7 +781,8 @@ - if (d7 < 0.0) + if (d7 < 0.0D) { - ++p_70489_3_; +- p_70489_3_++; ++ ++p_70489_3_; } - if (d7 > 0.0) diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch index 509d01445..ef04fe1dc 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch @@ -65,7 +65,7 @@ this.field_94113_a.set(p_70299_1_, p_70299_2_); if (!p_70299_2_.func_190926_b() && p_70299_2_.func_190916_E() > this.func_70297_j_()) -@@ -109,12 +103,10 @@ +@@ -109,48 +103,47 @@ } } @@ -77,14 +77,15 @@ - @Override public boolean func_70300_a(EntityPlayer p_70300_1_) { - if (this.field_70128_L) -@@ -123,41 +115,35 @@ - } - else - { -- return !(p_70300_1_.func_70068_e(this) > 64.0); +- return this.field_70128_L ? false : !(p_70300_1_.func_70068_e(this) > 64.0); ++ if (this.field_70128_L) ++ { ++ return false; ++ } ++ else ++ { + return p_70300_1_.func_70068_e(this) <= 64.0D; - } ++ } } - @Override @@ -123,7 +124,7 @@ public void func_70106_y() { if (this.field_94112_b) -@@ -168,7 +154,6 @@ +@@ -161,7 +154,6 @@ super.func_70106_y(); } @@ -131,7 +132,7 @@ public void func_184174_b(boolean p_184174_1_) { this.field_94112_b = p_184174_1_; -@@ -177,10 +162,9 @@ +@@ -170,10 +162,9 @@ public static void func_190574_b(DataFixer p_190574_0_, Class p_190574_1_) { EntityMinecart.func_189669_a(p_190574_0_, p_190574_1_); @@ -143,7 +144,7 @@ protected void func_70014_b(NBTTagCompound p_70014_1_) { super.func_70014_b(p_70014_1_); -@@ -200,11 +184,10 @@ +@@ -193,11 +184,10 @@ } } @@ -156,7 +157,7 @@ if (p_70037_1_.func_150297_b("LootTable", 8)) { -@@ -217,9 +200,9 @@ +@@ -210,9 +200,9 @@ } } @@ -167,7 +168,7 @@ if (!this.field_70170_p.field_72995_K) { p_184230_1_.func_71007_a(this); -@@ -228,7 +211,6 @@ +@@ -221,7 +211,6 @@ return true; } @@ -175,7 +176,7 @@ protected void func_94101_h() { float f = 0.98F; -@@ -240,39 +222,33 @@ +@@ -233,39 +222,33 @@ } this.field_70159_w *= (double)f; @@ -216,7 +217,7 @@ public LockCode func_174891_i() { return LockCode.field_180162_a; -@@ -295,21 +271,40 @@ +@@ -288,21 +271,40 @@ random = new Random(this.field_184291_d); } @@ -261,7 +262,7 @@ this.field_94113_a.clear(); } -@@ -319,7 +314,6 @@ +@@ -312,7 +314,6 @@ this.field_184291_d = p_184289_2_; } diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch index 641f452dc..7b7c63f3d 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch @@ -9,7 +9,7 @@ private int field_94110_c; public double field_94111_a; public double field_94109_b; -@@ -41,20 +41,17 @@ +@@ -41,50 +41,45 @@ EntityMinecart.func_189669_a(p_189671_0_, EntityMinecartFurnace.class); } @@ -31,7 +31,12 @@ public void func_70071_h_() { super.func_70071_h_(); -@@ -66,25 +63,23 @@ + + if (this.field_94110_c > 0) + { +- this.field_94110_c--; ++ --this.field_94110_c; + } if (this.field_94110_c <= 0) { @@ -107,8 +112,8 @@ - this.field_70159_w *= 0.8F; - this.field_70181_x *= 0.0; - this.field_70179_y *= 0.8F; -- this.field_70159_w += this.field_94111_a * 1.0; -- this.field_70179_y += this.field_94109_b * 1.0; +- this.field_70159_w = this.field_70159_w + this.field_94111_a * 1.0; +- this.field_70179_y = this.field_70179_y + this.field_94109_b * 1.0; + double d1 = 1.0D; + this.field_70159_w *= 0.800000011920929D; + this.field_70181_x *= 0.0D; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch index 91a68975f..e1ab880ed 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch @@ -84,6 +84,15 @@ public void func_70071_h_() { super.func_70071_h_(); +@@ -125,7 +116,7 @@ + + if (blockpos.equals(this.field_174900_c)) + { +- this.field_98044_b--; ++ --this.field_98044_b; + } + else + { @@ -153,19 +144,17 @@ } else diff --git a/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch index ae563138a..2dd92a090 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityXPOrb.java.patch @@ -42,7 +42,7 @@ j += (int)(f * 15.0F * 16.0F); if (j > 240) -@@ -74,7 +71,6 @@ +@@ -74,14 +71,13 @@ return j | k << 16; } @@ -50,6 +50,14 @@ public void func_70071_h_() { super.func_70071_h_(); + + if (this.field_70532_c > 0) + { +- this.field_70532_c--; ++ --this.field_70532_c; + } + + this.field_70169_q = this.field_70165_t; @@ -90,25 +86,25 @@ if (!this.func_189652_ae()) @@ -109,7 +117,7 @@ } } -@@ -141,26 +137,18 @@ +@@ -141,30 +137,22 @@ if (this.field_70122_E) { @@ -140,7 +148,13 @@ + this.field_70181_x *= (double) - 0.9F; } - ++this.field_70533_a; +- this.field_70533_a++; +- this.field_70531_b++; ++ ++this.field_70533_a; ++ ++this.field_70531_b; + + if (this.field_70531_b >= 6000) + { @@ -172,21 +160,19 @@ } } @@ -199,7 +213,7 @@ if (!itemstack.func_190926_b() && itemstack.func_77951_h()) { - int i = Math.min(this.func_184514_c(this.field_70530_e), itemstack.func_77952_i()); -- this.field_70530_e -= this.func_184515_b(i); +- this.field_70530_e = this.field_70530_e - this.func_184515_b(i); + float ratio = itemstack.func_77973_b().getXpRepairRatio(itemstack); + int i = Math.min(roundAverage(this.field_70530_e * ratio), itemstack.func_77952_i()); + this.field_70530_e -= roundAverage(i / ratio); diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityCreeper.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityCreeper.java.patch index 6e106b175..f47acb0a7 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityCreeper.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityCreeper.java.patch @@ -231,3 +231,11 @@ } public boolean func_70650_aV() +@@ -341,6 +313,6 @@ + + public void func_175493_co() + { +- this.field_175494_bm++; ++ ++this.field_175494_bm; + } + } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch index 765de5090..30b98d9ed 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch @@ -170,7 +170,8 @@ { if (this.field_70170_p.field_72995_K) { - for (int i = 0; i < 2; ++i) +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) { - this.field_70170_p - .func_175688_a( @@ -295,6 +296,15 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { if (this.func_180431_b(p_70097_1_)) +@@ -377,7 +333,7 @@ + } + else if (p_70097_1_ instanceof EntityDamageSourceIndirect) + { +- for (int i = 0; i < 64; i++) ++ for (int i = 0; i < 64; ++i) + { + if (this.func_70820_n()) + { @@ -400,9 +356,21 @@ } } @@ -401,7 +411,7 @@ { this.field_179451_i = 0; } -@@ -543,14 +494,13 @@ +@@ -543,38 +494,38 @@ this.field_179475_a = p_i45843_1_; } @@ -412,12 +422,16 @@ { return false; } -- else if (!this.field_179475_a.field_70170_p.func_82736_K().func_82766_b("mobGriefing")) + else if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.field_179475_a.field_70170_p, this.field_179475_a)) ++ { ++ return false; ++ } + else { - return false; - } -@@ -560,23 +510,22 @@ +- return !this.field_179475_a.field_70170_p.func_82736_K().func_82766_b("mobGriefing") +- ? false +- : this.field_179475_a.func_70681_au().nextInt(2000) == 0; ++ return this.field_179475_a.func_70681_au().nextInt(2000) == 0; } } @@ -446,7 +460,22 @@ } } -@@ -610,14 +559,13 @@ +@@ -588,9 +539,13 @@ + { + return false; + } ++ else if (p_188518_5_.func_185904_a() == Material.field_151579_a) ++ { ++ return false; ++ } + else + { +- return p_188518_5_.func_185904_a() == Material.field_151579_a ? false : p_188518_5_.func_185917_h(); ++ return p_188518_5_.func_185917_h(); + } + } + } +@@ -604,41 +559,33 @@ this.field_179473_a = p_i45841_1_; } @@ -457,12 +486,14 @@ { return false; } -- else if (!this.field_179473_a.field_70170_p.func_82736_K().func_82766_b("mobGriefing")) + else if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.field_179473_a.field_70170_p, this.field_179473_a)) ++ { ++ return false; ++ } + else { - return false; - } -@@ -627,28 +575,17 @@ +- return !this.field_179473_a.field_70170_p.func_82736_K().func_82766_b("mobGriefing") ? false : this.field_179473_a.func_70681_au().nextInt(20) == 0; ++ return this.field_179473_a.func_70681_au().nextInt(20) == 0; } } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityEvoker.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityEvoker.java.patch index 72edd6ba1..215080ab9 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityEvoker.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityEvoker.java.patch @@ -91,7 +91,20 @@ public boolean func_184191_r(Entity p_184191_1_) { if (p_184191_1_ == null) -@@ -141,19 +133,16 @@ +@@ -131,27 +123,26 @@ + { + return this.func_184191_r(((EntityVex)p_184191_1_).func_190645_o()); + } ++ else if (p_184191_1_ instanceof EntityLivingBase && ((EntityLivingBase)p_184191_1_).func_70668_bt() == EnumCreatureAttribute.ILLAGER) ++ { ++ return this.func_96124_cp() == null && p_184191_1_.func_96124_cp() == null; ++ } + else + { +- return p_184191_1_ instanceof EntityLivingBase && ((EntityLivingBase)p_184191_1_).func_70668_bt() == EnumCreatureAttribute.ILLAGER +- ? this.func_96124_cp() == null && p_184191_1_.func_96124_cp() == null +- : false; ++ return false; } } @@ -111,7 +124,7 @@ protected SoundEvent func_184601_bQ(DamageSource p_184601_1_) { return SoundEvents.field_191246_bp; -@@ -170,7 +159,6 @@ +@@ -168,7 +159,6 @@ return this.field_190763_bw; } @@ -119,7 +132,7 @@ protected SoundEvent func_193086_dk() { return SoundEvents.field_191244_bn; -@@ -182,70 +170,44 @@ +@@ -180,70 +170,44 @@ { } @@ -150,7 +163,8 @@ - if (EntityEvoker.this.func_70068_e(entitylivingbase) < 9.0) + if (EntityEvoker.this.func_70068_e(entitylivingbase) < 9.0D) { - for (int i = 0; i < 5; ++i) +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { - float f1 = f + (float)i * (float) Math.PI * 0.4F; - this.func_190876_a( @@ -165,7 +179,8 @@ + this.func_190876_a(EntityEvoker.this.field_70165_t + (double)MathHelper.func_76134_b(f1) * 1.5D, EntityEvoker.this.field_70161_v + (double)MathHelper.func_76126_a(f1) * 1.5D, d0, d1, f1, 0); } - for (int k = 0; k < 8; ++k) +- for (int k = 0; k < 8; k++) ++ for (int k = 0; k < 8; ++k) { - float f2 = f + (float)k * (float) Math.PI * 2.0F / 8.0F + (float)(Math.PI * 2.0 / 5.0); - this.func_190876_a( @@ -182,7 +197,8 @@ } else { - for (int l = 0; l < 16; ++l) +- for (int l = 0; l < 16; l++) ++ for (int l = 0; l < 16; ++l) { - double d2 = 1.25 * (double)(l + 1); + double d2 = 1.25D * (double)(l + 1); @@ -199,7 +215,7 @@ } } } -@@ -254,12 +216,11 @@ +@@ -252,12 +216,11 @@ { BlockPos blockpos = new BlockPos(p_190876_1_, p_190876_7_, p_190876_3_); boolean flag = false; @@ -215,7 +231,7 @@ { if (!EntityEvoker.this.field_70170_p.func_175623_d(blockpos)) { -@@ -277,25 +238,25 @@ +@@ -275,25 +238,25 @@ } blockpos = blockpos.func_177977_b(); @@ -247,7 +263,7 @@ protected EntitySpellcasterIllager.SpellType func_193320_l() { return EntitySpellcasterIllager.SpellType.FANGS; -@@ -308,18 +269,15 @@ +@@ -306,18 +269,15 @@ { } @@ -268,7 +284,7 @@ } } } -@@ -330,7 +288,6 @@ +@@ -328,7 +288,6 @@ { } @@ -276,7 +292,7 @@ public boolean func_75250_a() { if (!super.func_75250_a()) -@@ -339,33 +296,29 @@ +@@ -337,33 +296,29 @@ } else { @@ -301,7 +317,8 @@ - @Override protected void func_190868_j() { - for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { - BlockPos blockpos = new BlockPos(EntityEvoker.this) - .func_177982_a(-2 + EntityEvoker.this.field_70146_Z.nextInt(5), 1, -2 + EntityEvoker.this.field_70146_Z.nextInt(5)); @@ -313,7 +330,7 @@ entityvex.func_190658_a(EntityEvoker.this); entityvex.func_190651_g(blockpos); entityvex.func_190653_a(20 * (30 + EntityEvoker.this.field_70146_Z.nextInt(90))); -@@ -373,13 +326,11 @@ +@@ -371,13 +326,11 @@ } } @@ -327,7 +344,7 @@ protected EntitySpellcasterIllager.SpellType func_193320_l() { return EntitySpellcasterIllager.SpellType.SUMMON_VEX; -@@ -396,7 +347,10 @@ +@@ -394,7 +347,10 @@ } }; @@ -339,7 +356,7 @@ public boolean func_75250_a() { if (EntityEvoker.this.func_70638_az() != null) -@@ -411,14 +365,13 @@ +@@ -409,14 +365,13 @@ { return false; } @@ -356,7 +373,7 @@ if (list.isEmpty()) { -@@ -432,20 +385,17 @@ +@@ -430,20 +385,17 @@ } } @@ -378,7 +395,7 @@ protected void func_190868_j() { EntitySheep entitysheep = EntityEvoker.this.func_190751_dj(); -@@ -456,31 +406,26 @@ +@@ -454,31 +406,26 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityIllusionIllager.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityIllusionIllager.java.patch index a2e34ba9e..1d69976db 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityIllusionIllager.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityIllusionIllager.java.patch @@ -1,8 +1,11 @@ --- before/net/minecraft/entity/monster/EntityIllusionIllager.java +++ after/net/minecraft/entity/monster/EntityIllusionIllager.java -@@ -53,12 +53,11 @@ +@@ -51,14 +51,13 @@ + this.field_70728_aV = 5; + this.field_193100_bx = new Vec3d[2][4]; - for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { - this.field_193100_bx[0][i] = new Vec3d(0.0, 0.0, 0.0); - this.field_193100_bx[1][i] = new Vec3d(0.0, 0.0, 0.0); @@ -15,7 +18,7 @@ protected void func_184651_r() { super.func_184651_r(); -@@ -66,52 +65,46 @@ +@@ -66,107 +65,90 @@ this.field_70714_bg.func_75776_a(1, new EntitySpellcasterIllager.AICastingApell()); this.field_70714_bg.func_75776_a(4, new EntityIllusionIllager.AIMirriorSpell()); this.field_70714_bg.func_75776_a(5, new EntityIllusionIllager.AIBlindnessSpell()); @@ -78,7 +81,14 @@ public void func_70636_d() { super.func_70636_d(); -@@ -125,48 +118,37 @@ + + if (this.field_70170_p.field_72995_K && this.func_82150_aj()) + { +- this.field_193099_c--; ++ --this.field_193099_c; + + if (this.field_193099_c < 0) + { this.field_193099_c = 0; } @@ -101,23 +111,19 @@ this.field_193099_c = 3; float f = -6.0F; - int j = 13; -+ int i = 13; - -- for (int k = 0; k < 4; ++k) -+ for (int j = 0; j < 4; ++j) - { +- +- for (int k = 0; k < 4; k++) +- { - this.field_193100_bx[0][k] = this.field_193100_bx[1][k]; - this.field_193100_bx[1][k] = new Vec3d( - (double)(-6.0F + (float)this.field_70146_Z.nextInt(13)) * 0.5, - (double)Math.max(0, this.field_70146_Z.nextInt(6) - 4), - (double)(-6.0F + (float)this.field_70146_Z.nextInt(13)) * 0.5 - ); -+ this.field_193100_bx[0][j] = this.field_193100_bx[1][j]; -+ this.field_193100_bx[1][j] = new Vec3d((double)(-6.0F + (float)this.field_70146_Z.nextInt(13)) * 0.5D, (double)Math.max(0, this.field_70146_Z.nextInt(6) - 4), (double)(-6.0F + (float)this.field_70146_Z.nextInt(13)) * 0.5D); - } - - for (int l = 0; l < 16; ++l) - { +- } +- +- for (int l = 0; l < 16; l++) +- { - this.field_70170_p - .func_175688_a( - EnumParticleTypes.CLOUD, @@ -137,11 +143,21 @@ - { - this.field_193099_c = 3; - -- for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) - { - this.field_193100_bx[0][i] = this.field_193100_bx[1][i]; - this.field_193100_bx[1][i] = new Vec3d(0.0, 0.0, 0.0); - } ++ int i = 13; ++ ++ for (int j = 0; j < 4; ++j) ++ { ++ this.field_193100_bx[0][j] = this.field_193100_bx[1][j]; ++ this.field_193100_bx[1][j] = new Vec3d((double)(-6.0F + (float)this.field_70146_Z.nextInt(13)) * 0.5D, (double)Math.max(0, this.field_70146_Z.nextInt(6) - 4), (double)(-6.0F + (float)this.field_70146_Z.nextInt(13)) * 0.5D); ++ } ++ ++ for (int l = 0; l < 16; ++l) ++ { + this.field_70170_p.func_175688_a(EnumParticleTypes.CLOUD, this.field_70165_t + (this.field_70146_Z.nextDouble() - 0.5D) * (double)this.field_70130_N, this.field_70163_u + this.field_70146_Z.nextDouble() * (double)this.field_70131_O, this.field_70161_v + (this.field_70146_Z.nextDouble() - 0.5D) * (double)this.field_70130_N, 0.0D, 0.0D, 0.0D); + } + @@ -149,7 +165,7 @@ } } } -@@ -181,19 +163,18 @@ +@@ -181,66 +163,64 @@ else { double d0 = (double)(((float)this.field_193099_c - p_193098_1_) / 3.0F); @@ -157,7 +173,8 @@ + d0 = Math.pow(d0, 0.25D); Vec3d[] avec3d = new Vec3d[4]; - for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { - avec3d[i] = this.field_193100_bx[1][i].func_186678_a(1.0 - d0).func_178787_e(this.field_193100_bx[0][i].func_186678_a(d0)); + avec3d[i] = this.field_193100_bx[1][i].func_186678_a(1.0D - d0).func_178787_e(this.field_193100_bx[0][i].func_186678_a(d0)); @@ -171,7 +188,19 @@ public boolean func_184191_r(Entity p_184191_1_) { if (super.func_184191_r(p_184191_1_)) -@@ -210,39 +191,36 @@ + { + return true; + } ++ else if (p_184191_1_ instanceof EntityLivingBase && ((EntityLivingBase)p_184191_1_).func_70668_bt() == EnumCreatureAttribute.ILLAGER) ++ { ++ return this.func_96124_cp() == null && p_184191_1_.func_96124_cp() == null; ++ } + else + { +- return p_184191_1_ instanceof EntityLivingBase && ((EntityLivingBase)p_184191_1_).func_70668_bt() == EnumCreatureAttribute.ILLAGER +- ? this.func_96124_cp() == null && p_184191_1_.func_96124_cp() == null +- : false; ++ return false; } } @@ -214,7 +243,7 @@ this.func_184185_a(SoundEvents.field_187866_fi, 1.0F, 1.0F / (this.func_70681_au().nextFloat() * 0.4F + 0.8F)); this.field_70170_p.func_72838_d(entityarrow); } -@@ -260,14 +238,12 @@ +@@ -258,14 +238,12 @@ return this.func_193078_a(1); } @@ -229,7 +258,7 @@ public AbstractIllager.IllagerArmPose func_193077_p() { if (this.func_193082_dl()) -@@ -288,7 +264,6 @@ +@@ -286,7 +264,6 @@ { } @@ -237,11 +266,19 @@ public boolean func_75250_a() { if (!super.func_75250_a()) -@@ -305,44 +280,36 @@ +@@ -297,48 +274,42 @@ + { + return false; } ++ else if (EntityIllusionIllager.this.func_70638_az().func_145782_y() == this.field_193325_b) ++ { ++ return false; ++ } else { -- return EntityIllusionIllager.this.field_70170_p +- return EntityIllusionIllager.this.func_70638_az().func_145782_y() == this.field_193325_b +- ? false +- : EntityIllusionIllager.this.field_70170_p - .func_175649_E(new BlockPos(EntityIllusionIllager.this)) - .func_193845_a((float)EnumDifficulty.NORMAL.ordinal()); + return EntityIllusionIllager.this.field_70170_p.func_175649_E(new BlockPos(EntityIllusionIllager.this)).func_193845_a((float)EnumDifficulty.NORMAL.ordinal()); @@ -283,16 +320,22 @@ protected EntitySpellcasterIllager.SpellType func_193320_l() { return EntitySpellcasterIllager.SpellType.BLINDNESS; -@@ -355,7 +322,6 @@ +@@ -351,38 +322,39 @@ { } - @Override public boolean func_75250_a() { - if (!super.func_75250_a()) -@@ -368,32 +334,27 @@ - } +- return !super.func_75250_a() ? false : !EntityIllusionIllager.this.func_70644_a(MobEffects.field_76441_p); ++ if (!super.func_75250_a()) ++ { ++ return false; ++ } ++ else ++ { ++ return !EntityIllusionIllager.this.func_70644_a(MobEffects.field_76441_p); ++ } } - @Override diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch index d58ef95c4..119bda41d 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityIronGolem.java.patch @@ -79,7 +79,7 @@ protected void func_82167_n(Entity p_82167_1_) { if (p_82167_1_ instanceof IMob && !(p_82167_1_ instanceof EntityCreeper) && this.func_70681_au().nextInt(20) == 0) -@@ -131,7 +125,6 @@ +@@ -131,46 +125,34 @@ super.func_82167_n(p_82167_1_); } @@ -87,8 +87,17 @@ public void func_70636_d() { super.func_70636_d(); -@@ -146,31 +139,20 @@ - --this.field_70856_g; + + if (this.field_70855_f > 0) + { +- this.field_70855_f--; ++ --this.field_70855_f; + } + + if (this.field_70856_g > 0) + { +- this.field_70856_g--; ++ --this.field_70856_g; } - if (this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y > 2.5000003E-7F && this.field_70146_Z.nextInt(5) == 0) diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityShulker.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityShulker.java.patch index bf87ed541..31f25772e 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityShulker.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityShulker.java.patch @@ -170,6 +170,15 @@ if (this.field_70170_p.func_175623_d(blockpos.func_177972_a(enumfacing3))) { +@@ -316,7 +300,7 @@ + { + if (this.field_184708_bA > 0 && this.field_184707_bz != null) + { +- this.field_184708_bA--; ++ --this.field_184708_bA; + } + else + { @@ -324,105 +308,52 @@ } } @@ -323,9 +332,12 @@ this.field_70160_al = true; } } -@@ -480,14 +409,9 @@ +@@ -478,16 +407,11 @@ + { + BlockPos blockpos = new BlockPos(this); - for (int i = 0; i < 5; ++i) +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { - BlockPos blockpos1 = blockpos.func_177982_a( - 8 - this.field_70146_Z.nextInt(17), 8 - this.field_70146_Z.nextInt(17), 8 - this.field_70146_Z.nextInt(17) @@ -511,7 +523,7 @@ } class AIAttack extends EntityAIBase -@@ -730,7 +648,6 @@ +@@ -730,57 +648,53 @@ this.func_75248_a(3); } @@ -519,8 +531,18 @@ public boolean func_75250_a() { EntityLivingBase entitylivingbase = EntityShulker.this.func_70638_az(); -@@ -745,20 +662,17 @@ - } +- return entitylivingbase != null && entitylivingbase.func_70089_S() +- ? EntityShulker.this.field_70170_p.func_175659_aa() != EnumDifficulty.PEACEFUL +- : false; ++ ++ if (entitylivingbase != null && entitylivingbase.func_70089_S()) ++ { ++ return EntityShulker.this.field_70170_p.func_175659_aa() != EnumDifficulty.PEACEFUL; ++ } ++ else ++ { ++ return false; ++ } } - @Override @@ -540,7 +562,10 @@ public void func_75246_d() { if (EntityShulker.this.field_70170_p.func_175659_aa() != EnumDifficulty.PEACEFUL) -@@ -768,25 +682,19 @@ + { +- this.field_188520_b--; ++ --this.field_188520_b; + EntityLivingBase entitylivingbase = EntityShulker.this.func_70638_az(); EntityShulker.this.func_70671_ap().func_75651_a(entitylivingbase, 180.0F, 180.0F); double d0 = EntityShulker.this.func_70068_e(entitylivingbase); @@ -570,7 +595,7 @@ } super.func_75246_d(); -@@ -801,26 +709,22 @@ +@@ -795,26 +709,22 @@ super(p_i47060_2_, EntityPlayer.class, true); } @@ -599,7 +624,7 @@ } } } -@@ -838,26 +742,22 @@ +@@ -832,26 +742,22 @@ }); } @@ -628,7 +653,7 @@ } } } -@@ -870,26 +770,22 @@ +@@ -864,26 +770,22 @@ { } @@ -655,15 +680,19 @@ public void func_75251_c() { if (EntityShulker.this.func_70638_az() == null) -@@ -898,7 +794,6 @@ +@@ -892,10 +794,9 @@ } } - @Override public void func_75246_d() { - --this.field_188522_b; -@@ -912,7 +807,6 @@ +- this.field_188522_b--; ++ --this.field_188522_b; + } + } + +@@ -906,7 +807,6 @@ super(p_i47062_2_); } diff --git a/patches/minecraft/net/minecraft/entity/monster/EntitySilverfish.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntitySilverfish.java.patch index 6bd36ffca..4772fad19 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntitySilverfish.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntitySilverfish.java.patch @@ -193,7 +193,7 @@ this.field_75457_a.func_70656_aK(); this.field_75457_a.func_70106_y(); } -@@ -273,13 +247,11 @@ +@@ -273,16 +247,14 @@ } } @@ -206,7 +206,11 @@ - @Override public void func_75246_d() { - --this.field_179463_b; +- this.field_179463_b--; ++ --this.field_179463_b; + + if (this.field_179463_b <= 0) + { @@ -301,13 +273,13 @@ if (iblockstate.func_177230_c() == Blocks.field_150418_aU) diff --git a/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch index c31a4ee67..4f27e2b9d 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntitySlime.java.patch @@ -69,13 +69,22 @@ public void func_70071_h_() { if (!this.field_70170_p.field_72995_K && this.field_70170_p.func_175659_aa() == EnumDifficulty.PEACEFUL && this.func_70809_q() > 0) -@@ -142,10 +137,10 @@ +@@ -135,17 +130,17 @@ + this.field_70128_L = true; + } + +- this.field_70811_b = this.field_70811_b + (this.field_70813_a - this.field_70811_b) * 0.5F; ++ this.field_70811_b += (this.field_70813_a - this.field_70811_b) * 0.5F; + this.field_70812_c = this.field_70811_b; + super.func_70071_h_(); + if (this.field_70122_E && !this.field_175452_bi) { int i = this.func_70809_q(); - +- for (int j = 0; j < i * 8; j++) + if (spawnCustomParticles()) { i = 0; } // don't spawn particles if it's handled by the implementation itself - for (int j = 0; j < i * 8; ++j) ++ for (int j = 0; j < i * 8; ++j) { - float f = this.field_70146_Z.nextFloat() * (float)(Math.PI * 2); + float f = this.field_70146_Z.nextFloat() * ((float)Math.PI * 2F); @@ -113,6 +122,15 @@ public void func_70106_y() { int i = this.func_70809_q(); +@@ -213,7 +204,7 @@ + { + int j = 2 + this.field_70146_Z.nextInt(3); + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + float f = ((float)(k % 2) - 0.5F) * (float)i / 4.0F; + float f1 = ((float)(k / 2) - 0.5F) * (float)i / 4.0F; @@ -230,9 +221,7 @@ } @@ -234,7 +252,7 @@ public int func_70646_bf() { return 0; -@@ -372,15 +344,14 @@ +@@ -372,22 +344,21 @@ return this.func_70809_q() > 0; } @@ -251,6 +269,14 @@ public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, @Nullable IEntityLivingData p_180482_2_) { int i = this.field_70146_Z.nextInt(3); + + if (i < 2 && this.field_70146_Z.nextFloat() < 0.5F * p_180482_1_.func_180170_c()) + { +- i++; ++ ++i; + } + + int j = 1 << i; @@ -400,6 +371,14 @@ return this.func_189101_db() ? SoundEvents.field_189110_fE : SoundEvents.field_187882_fq; } @@ -274,7 +300,20 @@ public boolean func_75250_a() { EntityLivingBase entitylivingbase = this.field_179466_a.func_70638_az(); -@@ -430,14 +408,12 @@ +@@ -420,22 +398,22 @@ + { + return false; + } ++ else if (!entitylivingbase.func_70089_S()) ++ { ++ return false; ++ } + else + { +- return !entitylivingbase.func_70089_S() +- ? false +- : !(entitylivingbase instanceof EntityPlayer) || !((EntityPlayer)entitylivingbase).field_71075_bZ.field_75102_a; ++ return !(entitylivingbase instanceof EntityPlayer) || !((EntityPlayer)entitylivingbase).field_71075_bZ.field_75102_a; } } @@ -289,7 +328,20 @@ public boolean func_75253_b() { EntityLivingBase entitylivingbase = this.field_179466_a.func_70638_az(); -@@ -460,12 +436,10 @@ +@@ -448,20 +426,20 @@ + { + return false; + } ++ else if (entitylivingbase instanceof EntityPlayer && ((EntityPlayer)entitylivingbase).field_71075_bZ.field_75102_a) ++ { ++ return false; ++ } + else + { +- return entitylivingbase instanceof EntityPlayer && ((EntityPlayer)entitylivingbase).field_71075_bZ.field_75102_a +- ? false +- : --this.field_179465_b > 0; ++ return --this.field_179465_b > 0; } } @@ -303,7 +355,7 @@ } } -@@ -481,19 +455,11 @@ +@@ -477,19 +455,11 @@ this.func_75248_a(2); } @@ -324,7 +376,7 @@ public void func_75246_d() { if (--this.field_179460_c <= 0) -@@ -517,13 +483,11 @@ +@@ -513,13 +483,11 @@ ((PathNavigateGround)p_i45823_1_.func_70661_as()).func_179693_d(true); } @@ -338,7 +390,7 @@ public void func_75246_d() { if (this.field_179457_a.func_70681_au().nextFloat() < 0.8F) -@@ -531,7 +495,7 @@ +@@ -527,7 +495,7 @@ this.field_179457_a.func_70683_ar().func_75660_a(); } @@ -347,7 +399,7 @@ } } -@@ -545,16 +509,14 @@ +@@ -541,16 +509,14 @@ this.func_75248_a(5); } @@ -365,7 +417,7 @@ } } -@@ -569,7 +531,7 @@ +@@ -565,7 +531,7 @@ { super(p_i45821_1_); this.field_179925_i = p_i45821_1_; @@ -374,7 +426,7 @@ } public void func_179920_a(float p_179920_1_, boolean p_179920_2_) -@@ -584,7 +546,6 @@ +@@ -580,7 +546,6 @@ this.field_188491_h = EntityMoveHelper.Action.MOVE_TO; } @@ -382,7 +434,7 @@ public void func_75641_c() { this.field_75648_a.field_70177_z = this.func_75639_a(this.field_75648_a.field_70177_z, this.field_179922_g, 90.0F); -@@ -601,8 +562,7 @@ +@@ -597,8 +562,7 @@ if (this.field_75648_a.field_70122_E) { @@ -392,7 +444,7 @@ if (this.field_179924_h-- <= 0) { -@@ -617,12 +577,7 @@ +@@ -613,12 +577,7 @@ if (this.field_179925_i.func_70807_r()) { @@ -406,7 +458,7 @@ } } else -@@ -634,8 +589,7 @@ +@@ -630,8 +589,7 @@ } else { diff --git a/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch index f885c670c..e0c2a3b46 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntitySnowman.java.patch @@ -66,7 +66,7 @@ public void func_70636_d() { super.func_70636_d(); -@@ -110,7 +104,7 @@ +@@ -110,21 +104,19 @@ this.func_70097_a(DamageSource.field_76370_b, 1.0F); } @@ -75,7 +75,12 @@ { return; } -@@ -122,9 +116,7 @@ + +- for (int l = 0; l < 4; l++) ++ for (int l = 0; l < 4; ++l) + { + i = MathHelper.func_76128_c(this.field_70165_t + (double)((float)(l % 2 * 2 - 1) * 0.25F)); + j = MathHelper.func_76128_c(this.field_70163_u); k = MathHelper.func_76128_c(this.field_70161_v + (double)((float)(l / 2 % 2 * 2 - 1) * 0.25F)); BlockPos blockpos = new BlockPos(i, j, k); diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch index 036abd0a5..c8d59a50d 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch @@ -110,7 +110,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { if (super.func_70097_a(p_70097_1_, p_70097_2_)) -@@ -250,15 +239,24 @@ +@@ -250,37 +239,42 @@ entitylivingbase = (EntityLivingBase)p_70097_1_.func_76346_g(); } @@ -141,9 +141,10 @@ + entityzombie = new EntityZombie(this.field_70170_p); + } - for (int l = 0; l < 50; ++l) +- for (int l = 0; l < 50; l++) ++ for (int l = 0; l < 50; ++l) { -@@ -266,21 +264,17 @@ + int i1 = i + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); int j1 = j + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); int k1 = k + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch index 518adf6bd..b8e45e910 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityZombieVillager.java.patch @@ -170,6 +170,34 @@ } protected int func_190735_dq() +@@ -238,11 +228,11 @@ + int j = 0; + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k = (int)this.field_70165_t - 4; k < (int)this.field_70165_t + 4 && j < 14; k++) ++ for (int k = (int)this.field_70165_t - 4; k < (int)this.field_70165_t + 4 && j < 14; ++k) + { +- for (int l = (int)this.field_70163_u - 4; l < (int)this.field_70163_u + 4 && j < 14; l++) ++ for (int l = (int)this.field_70163_u - 4; l < (int)this.field_70163_u + 4 && j < 14; ++l) + { +- for (int i1 = (int)this.field_70161_v - 4; i1 < (int)this.field_70161_v + 4 && j < 14; i1++) ++ for (int i1 = (int)this.field_70161_v - 4; i1 < (int)this.field_70161_v + 4 && j < 14; ++i1) + { + Block block = this.field_70170_p.func_180495_p(blockpos$mutableblockpos.func_181079_c(k, l, i1)).func_177230_c(); + +@@ -250,10 +240,10 @@ + { + if (this.field_70146_Z.nextFloat() < 0.3F) + { +- i++; ++ ++i; + } + +- j++; ++ ++j; + } + } + } @@ -263,48 +253,72 @@ return i; } diff --git a/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch b/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch index 26f925510..bf358b1ca 100644 --- a/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/AbstractHorse.java.patch @@ -170,6 +170,15 @@ } } } +@@ -330,7 +302,7 @@ + containerhorsechest.func_110132_b(this); + int i = Math.min(containerhorsechest.func_70302_i_(), this.field_110296_bG.func_70302_i_()); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + ItemStack itemstack = containerhorsechest.func_70301_a(j); + @@ -343,6 +315,7 @@ this.field_110296_bG.func_110134_a(this); @@ -228,6 +237,15 @@ protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_) { if (!p_180429_2_.func_176223_P().func_185904_a().func_76224_d()) +@@ -459,7 +426,7 @@ + + if (this.func_184207_aI() && this.field_190688_bE) + { +- this.field_110285_bP++; ++ ++this.field_110285_bP; + + if (this.field_110285_bP > 5 && this.field_110285_bP % 3 == 0) + { @@ -486,16 +453,14 @@ this.func_184185_a(SoundEvents.field_187714_cq, p_190680_1_.func_185843_a() * 0.15F, p_190680_1_.func_185847_b()); } @@ -293,7 +311,7 @@ public boolean func_70877_b(ItemStack p_70877_1_) { return false; -@@ -658,7 +610,6 @@ +@@ -658,14 +610,13 @@ this.field_110278_bp = 1; } @@ -301,6 +319,14 @@ public void func_70645_a(DamageSource p_70645_1_) { super.func_70645_a(p_70645_1_); + + if (!this.field_70170_p.field_72995_K && this.field_110296_bG != null) + { +- for (int i = 0; i < this.field_110296_bG.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_110296_bG.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_110296_bG.func_70301_a(i); + @@ -677,7 +628,6 @@ } } @@ -350,7 +376,71 @@ public void func_70071_h_() { super.func_70071_h_(); -@@ -899,7 +836,6 @@ +@@ -766,7 +703,7 @@ + + if (this.field_110279_bq > 0) + { +- this.field_110279_bq++; ++ ++this.field_110279_bq; + + if (this.field_110279_bq > 300) + { +@@ -778,7 +715,7 @@ + + if (this.func_110204_cc()) + { +- this.field_110283_bJ = this.field_110283_bJ + (1.0F - this.field_110283_bJ) * 0.4F + 0.05F; ++ this.field_110283_bJ += (1.0F - this.field_110283_bJ) * 0.4F + 0.05F; + + if (this.field_110283_bJ > 1.0F) + { +@@ -787,7 +724,7 @@ + } + else + { +- this.field_110283_bJ = this.field_110283_bJ + ((0.0F - this.field_110283_bJ) * 0.4F - 0.05F); ++ this.field_110283_bJ += (0.0F - this.field_110283_bJ) * 0.4F - 0.05F; + + if (this.field_110283_bJ < 0.0F) + { +@@ -801,7 +738,7 @@ + { + this.field_110283_bJ = 0.0F; + this.field_110284_bK = this.field_110283_bJ; +- this.field_110281_bL = this.field_110281_bL + (1.0F - this.field_110281_bL) * 0.4F + 0.05F; ++ this.field_110281_bL += (1.0F - this.field_110281_bL) * 0.4F + 0.05F; + + if (this.field_110281_bL > 1.0F) + { +@@ -811,8 +748,7 @@ + else + { + this.field_110294_bI = false; +- this.field_110281_bL = this.field_110281_bL +- + ((0.8F * this.field_110281_bL * this.field_110281_bL * this.field_110281_bL - this.field_110281_bL) * 0.6F - 0.05F); ++ this.field_110281_bL += (0.8F * this.field_110281_bL * this.field_110281_bL * this.field_110281_bL - this.field_110281_bL) * 0.6F - 0.05F; + + if (this.field_110281_bL < 0.0F) + { +@@ -824,7 +760,7 @@ + + if (this.func_110233_w(64)) + { +- this.field_110287_bN = this.field_110287_bN + (1.0F - this.field_110287_bN) * 0.7F + 0.05F; ++ this.field_110287_bN += (1.0F - this.field_110287_bN) * 0.7F + 0.05F; + + if (this.field_110287_bN > 1.0F) + { +@@ -833,7 +769,7 @@ + } + else + { +- this.field_110287_bN = this.field_110287_bN + ((0.0F - this.field_110287_bN) * 0.7F - 0.05F); ++ this.field_110287_bN += (0.0F - this.field_110287_bN) * 0.7F - 0.05F; + + if (this.field_110287_bN < 0.0F) + { +@@ -900,7 +836,6 @@ return true; } @@ -358,18 +448,31 @@ public void func_191986_a(float p_191986_1_, float p_191986_2_, float p_191986_3_) { if (this.func_184207_aI() && this.func_82171_bF() && this.func_110257_ck()) -@@ -940,8 +876,8 @@ +@@ -933,7 +868,7 @@ + + if (this.func_70644_a(MobEffects.field_76430_j)) + { +- this.field_70181_x = this.field_70181_x + (double)((float)(this.func_70660_b(MobEffects.field_76430_j).func_76458_c() + 1) * 0.1F); ++ this.field_70181_x += (double)((float)(this.func_70660_b(MobEffects.field_76430_j).func_76458_c() + 1) * 0.1F); + } + + this.func_110255_k(true); +@@ -941,10 +876,10 @@ if (p_191986_3_ > 0.0F) { - float f = MathHelper.func_76126_a(this.field_70177_z * (float)(Math.PI / 180.0)); - float f1 = MathHelper.func_76134_b(this.field_70177_z * (float)(Math.PI / 180.0)); +- this.field_70159_w = this.field_70159_w + (double)(-0.4F * f * this.field_110277_bt); +- this.field_70179_y = this.field_70179_y + (double)(0.4F * f1 * this.field_110277_bt); + float f = MathHelper.func_76126_a(this.field_70177_z * 0.017453292F); + float f1 = MathHelper.func_76134_b(this.field_70177_z * 0.017453292F); - this.field_70159_w += (double)(-0.4F * f * this.field_110277_bt); - this.field_70179_y += (double)(0.4F * f1 * this.field_110277_bt); ++ this.field_70159_w += (double)(-0.4F * f * this.field_110277_bt); ++ this.field_70179_y += (double)(0.4F * f1 * this.field_110277_bt); this.func_184185_a(SoundEvents.field_187720_cs, 0.4F, 1.0F); -@@ -959,9 +895,9 @@ + } + +@@ -960,9 +895,9 @@ } else if (entitylivingbase instanceof EntityPlayer) { @@ -382,7 +485,18 @@ } if (this.field_70122_E) -@@ -993,10 +929,9 @@ +@@ -981,8 +916,8 @@ + f2 = 1.0F; + } + +- this.field_70721_aZ = this.field_70721_aZ + (f2 - this.field_70721_aZ) * 0.4F; +- this.field_184619_aG = this.field_184619_aG + this.field_70721_aZ; ++ this.field_70721_aZ += (f2 - this.field_70721_aZ) * 0.4F; ++ this.field_184619_aG += this.field_70721_aZ; + } + else + { +@@ -994,10 +929,9 @@ public static void func_190683_c(DataFixer p_190683_0_, Class p_190683_1_) { EntityLiving.func_189752_a(p_190683_0_, p_190683_1_); @@ -394,7 +508,7 @@ public void func_70014_b(NBTTagCompound p_70014_1_) { super.func_70014_b(p_70014_1_); -@@ -1016,7 +951,6 @@ +@@ -1017,7 +951,6 @@ } } @@ -402,7 +516,7 @@ public void func_70037_a(NBTTagCompound p_70037_1_) { super.func_70037_a(p_70037_1_); -@@ -1045,7 +979,7 @@ +@@ -1046,7 +979,7 @@ if (iattributeinstance != null) { @@ -411,7 +525,7 @@ } if (p_70037_1_.func_150297_b("SaddleItem", 10)) -@@ -1061,7 +995,6 @@ +@@ -1062,7 +995,6 @@ this.func_110232_cE(); } @@ -419,7 +533,7 @@ public boolean func_70878_b(EntityAnimal p_70878_1_) { return false; -@@ -1069,16 +1002,10 @@ +@@ -1070,16 +1002,10 @@ protected boolean func_110200_cJ() { @@ -437,7 +551,7 @@ public EntityAgeable func_90011_a(EntityAgeable p_90011_1_) { return null; -@@ -1086,19 +1013,14 @@ +@@ -1087,19 +1013,14 @@ protected void func_190681_a(EntityAgeable p_190681_1_, AbstractHorse p_190681_2_) { @@ -462,7 +576,7 @@ public boolean func_82171_bF() { return this.func_184179_bs() instanceof EntityLivingBase; -@@ -1123,7 +1045,6 @@ +@@ -1124,7 +1045,6 @@ } @SideOnly(Side.CLIENT) @@ -470,7 +584,7 @@ public void func_110206_u(int p_110206_1_) { if (this.func_110257_ck()) -@@ -1149,20 +1070,17 @@ +@@ -1150,20 +1070,17 @@ } } @@ -491,9 +605,12 @@ public void func_184777_r_() { } -@@ -1174,24 +1092,14 @@ +@@ -1173,26 +1090,16 @@ + { + EnumParticleTypes enumparticletypes = p_110216_1_ ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL; - for (int i = 0; i < 7; ++i) +- for (int i = 0; i < 7; i++) ++ for (int i = 0; i < 7; ++i) { - double d0 = this.field_70146_Z.nextGaussian() * 0.02; - double d1 = this.field_70146_Z.nextGaussian() * 0.02; @@ -520,7 +637,7 @@ public void func_70103_a(byte p_70103_1_) { if (p_70103_1_ == 7) -@@ -1208,7 +1116,6 @@ +@@ -1209,7 +1116,6 @@ } } @@ -528,7 +645,7 @@ public void func_184232_k(Entity p_184232_1_) { super.func_184232_k(p_184232_1_); -@@ -1221,15 +1128,11 @@ +@@ -1222,15 +1128,11 @@ if (this.field_110282_bM > 0.0F) { @@ -547,7 +664,7 @@ if (p_184232_1_ instanceof EntityLivingBase) { -@@ -1245,21 +1148,19 @@ +@@ -1246,21 +1148,19 @@ protected double func_110245_cM() { @@ -571,7 +688,7 @@ public float func_70047_e() { return this.field_70131_O; -@@ -1275,7 +1176,6 @@ +@@ -1276,7 +1176,6 @@ return false; } @@ -579,7 +696,7 @@ public boolean func_174820_d(int p_174820_1_, ItemStack p_174820_2_) { int i = p_174820_1_ - 400; -@@ -1314,14 +1214,12 @@ +@@ -1315,14 +1214,12 @@ } @Nullable @@ -595,7 +712,7 @@ public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, @Nullable IEntityLivingData p_180482_2_) { p_180482_2_ = super.func_180482_a(p_180482_1_, p_180482_2_); -@@ -1332,5 +1230,23 @@ +@@ -1333,5 +1230,23 @@ } return p_180482_2_; diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch index 644dd3f61..bc3f81db7 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityHorse.java.patch @@ -223,7 +223,7 @@ public boolean func_184645_a(EntityPlayer p_184645_1_, EnumHand p_184645_2_) { ItemStack itemstack = p_184645_1_.func_184586_b(p_184645_2_); -@@ -339,7 +316,6 @@ +@@ -339,22 +316,22 @@ } } @@ -231,7 +231,19 @@ public boolean func_70878_b(EntityAnimal p_70878_1_) { if (p_70878_1_ == this) -@@ -356,7 +332,6 @@ + { + return false; + } ++ else if (!(p_70878_1_ instanceof EntityDonkey) && !(p_70878_1_ instanceof EntityHorse)) ++ { ++ return false; ++ } + else + { +- return !(p_70878_1_ instanceof EntityDonkey) && !(p_70878_1_ instanceof EntityHorse) +- ? false +- : this.func_110200_cJ() && ((AbstractHorse)p_70878_1_).func_110200_cJ(); ++ return this.func_110200_cJ() && ((AbstractHorse)p_70878_1_).func_110200_cJ(); } } @@ -239,7 +251,7 @@ public EntityAgeable func_90011_a(EntityAgeable p_90011_1_) { AbstractHorse abstracthorse; -@@ -374,11 +349,11 @@ +@@ -372,11 +349,11 @@ if (j < 4) { @@ -253,7 +265,7 @@ } else { -@@ -389,15 +364,15 @@ +@@ -387,15 +364,15 @@ if (k < 2) { @@ -272,7 +284,7 @@ } ((EntityHorse)abstracthorse).func_110235_q(i); -@@ -407,20 +382,17 @@ +@@ -405,20 +382,17 @@ return abstracthorse; } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityLlama.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityLlama.java.patch index f839f81e0..8df3fcd9d 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityLlama.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityLlama.java.patch @@ -1,5 +1,14 @@ --- before/net/minecraft/entity/passive/EntityLlama.java +++ after/net/minecraft/entity/passive/EntityLlama.java +@@ -449,7 +449,7 @@ + + if (this.field_70146_Z.nextFloat() < 0.03F) + { +- i++; ++ ++i; + } + + entityllama.func_190706_p(i); @@ -488,6 +488,9 @@ @Override public void func_180430_e(float p_180430_1_, float p_180430_2_) diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch index e4321315e..29eaeadd4 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch @@ -39,9 +39,12 @@ if (!this.field_70170_p.field_72995_K) { -@@ -80,16 +70,7 @@ +@@ -78,18 +68,9 @@ - for (int i = 0; i < 5; ++i) + this.field_70170_p.func_72838_d(entitycow); + +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { - this.field_70170_p - .func_72838_d( diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch index 24b259145..d8ff7fa17 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch @@ -197,7 +197,22 @@ public boolean func_70878_b(EntityAnimal p_70878_1_) { if (p_70878_1_ == this) -@@ -312,26 +293,22 @@ +@@ -298,32 +279,36 @@ + else + { + EntityOcelot entityocelot = (EntityOcelot)p_70878_1_; +- return !entityocelot.func_70909_n() ? false : this.func_70880_s() && entityocelot.func_70880_s(); ++ ++ if (!entityocelot.func_70909_n()) ++ { ++ return false; ++ } ++ else ++ { ++ return this.func_70880_s() && entityocelot.func_70880_s(); ++ } + } + } public int func_70913_u() { @@ -227,7 +242,7 @@ { BlockPos blockpos = new BlockPos(this.field_70165_t, this.func_174813_aQ().field_72338_b, this.field_70161_v); -@@ -343,7 +320,7 @@ +@@ -335,7 +320,7 @@ IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos.func_177977_b()); Block block = iblockstate.func_177230_c(); @@ -236,7 +251,7 @@ { return true; } -@@ -352,7 +329,6 @@ +@@ -344,7 +329,6 @@ return false; } @@ -244,7 +259,7 @@ public String func_70005_c_() { if (this.func_145818_k_()) -@@ -365,12 +341,11 @@ +@@ -357,12 +341,11 @@ } } @@ -258,7 +273,7 @@ } this.field_70714_bg.func_85156_a(this.field_175545_bm); -@@ -382,7 +357,6 @@ +@@ -374,14 +357,13 @@ } @Nullable @@ -266,3 +281,11 @@ public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, @Nullable IEntityLivingData p_180482_2_) { p_180482_2_ = super.func_180482_a(p_180482_1_, p_180482_2_); + + if (this.func_70913_u() == 0 && this.field_70170_p.field_73012_v.nextInt(7) == 0) + { +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { + EntityOcelot entityocelot = new EntityOcelot(this.field_70170_p); + entityocelot.func_70012_b(this.field_70165_t, this.field_70163_u, this.field_70161_v, this.field_70177_z, 0.0F); diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityParrot.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityParrot.java.patch index 7c4a9da1c..d095fe3a7 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityParrot.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityParrot.java.patch @@ -8,7 +8,7 @@ import com.google.common.collect.Sets; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -@@ -84,17 +85,17 @@ +@@ -84,18 +85,17 @@ public class EntityParrot extends EntityShoulderRiding implements EntityFlying { @@ -18,7 +18,8 @@ { public boolean apply(@Nullable EntityLiving p_apply_1_) { -- return p_apply_1_ != null && EntityParrot.field_192017_bK.containsKey(EntityList.field_191308_b.func_148757_b(p_apply_1_.getClass())); +- return p_apply_1_ != null +- && EntityParrot.field_192017_bK.containsKey(EntityList.field_191308_b.func_148757_b((Class )p_apply_1_.getClass())); + return p_apply_1_ != null && EntityParrot.MIMIC_SOUNDS.containsKey(p_apply_1_.getClass()); } }; @@ -29,7 +30,7 @@ public float field_192008_bB; public float field_192009_bC; public float field_192010_bD; -@@ -111,38 +112,34 @@ +@@ -112,38 +112,34 @@ } @Nullable @@ -75,7 +76,7 @@ protected PathNavigate func_175447_b(World p_175447_1_) { PathNavigateFlying pathnavigateflying = new PathNavigateFlying(this, p_175447_1_); -@@ -152,20 +149,16 @@ +@@ -153,20 +149,16 @@ return pathnavigateflying; } @@ -97,7 +98,7 @@ { this.field_192018_bL = false; this.field_192019_bM = null; -@@ -176,7 +169,6 @@ +@@ -177,7 +169,6 @@ } @SideOnly(Side.CLIENT) @@ -105,7 +106,7 @@ public void func_191987_a(BlockPos p_191987_1_, boolean p_191987_2_) { this.field_192019_bM = p_191987_1_; -@@ -193,7 +185,7 @@ +@@ -194,7 +185,7 @@ { this.field_192011_bE = this.field_192008_bB; this.field_192010_bD = this.field_192009_bC; @@ -114,7 +115,7 @@ this.field_192009_bC = MathHelper.func_76131_a(this.field_192009_bC, 0.0F, 1.0F); if (!this.field_70122_E && this.field_192012_bF < 1.0F) -@@ -201,11 +193,11 @@ +@@ -202,21 +193,21 @@ this.field_192012_bF = 1.0F; } @@ -128,8 +129,11 @@ + this.field_70181_x *= 0.6D; } - this.field_192008_bB += this.field_192012_bF * 2.0F; -@@ -215,7 +207,7 @@ +- this.field_192008_bB = this.field_192008_bB + this.field_192012_bF * 2.0F; ++ this.field_192008_bB += this.field_192012_bF * 2.0F; + } + + private static boolean func_192006_b(World p_192006_0_, Entity p_192006_1_) { if (!p_192006_1_.func_174814_R() && p_192006_0_.field_73012_v.nextInt(50) == 0) { @@ -138,11 +142,11 @@ if (!list.isEmpty()) { -@@ -223,17 +215,8 @@ +@@ -224,17 +215,8 @@ if (!entityliving.func_174814_R()) { -- SoundEvent soundevent = func_191999_g(EntityList.field_191308_b.func_148757_b(entityliving.getClass())); +- SoundEvent soundevent = func_191999_g(EntityList.field_191308_b.func_148757_b((Class )entityliving.getClass())); - p_192006_0_.func_184148_a( - null, - p_192006_1_.field_70165_t, @@ -158,7 +162,7 @@ return true; } } -@@ -246,7 +229,6 @@ +@@ -247,7 +229,6 @@ } } @@ -166,7 +170,7 @@ public boolean func_184645_a(EntityPlayer p_184645_1_, EnumHand p_184645_2_) { ItemStack itemstack = p_184645_1_.func_184586_b(p_184645_2_); -@@ -260,22 +242,12 @@ +@@ -261,22 +242,12 @@ if (!this.func_174814_R()) { @@ -191,7 +195,7 @@ { this.func_193101_c(p_184645_1_); this.func_70908_e(true); -@@ -317,13 +289,11 @@ +@@ -318,13 +289,11 @@ } } @@ -205,7 +209,7 @@ public boolean func_70601_bi() { int i = MathHelper.func_76128_c(this.field_70165_t); -@@ -331,30 +301,23 @@ +@@ -332,30 +301,23 @@ int k = MathHelper.func_76128_c(this.field_70161_v); BlockPos blockpos = new BlockPos(i, j, k); Block block = this.field_70170_p.func_180495_p(blockpos.func_177977_b()).func_177230_c(); @@ -237,7 +241,7 @@ public EntityAgeable func_90011_a(EntityAgeable p_90011_1_) { return null; -@@ -364,27 +327,16 @@ +@@ -365,27 +327,16 @@ { if (!p_192005_1_.func_174814_R() && !func_192006_b(p_192005_0_, p_192005_1_) && p_192005_0_.field_73012_v.nextInt(200) == 0) { @@ -266,7 +270,7 @@ public SoundEvent func_184639_G() { return func_192003_a(this.field_70146_Z); -@@ -394,8 +346,9 @@ +@@ -395,8 +346,9 @@ { if (p_192003_0_.nextInt(1000) == 0) { @@ -278,7 +282,7 @@ } else { -@@ -403,43 +356,32 @@ +@@ -404,43 +356,32 @@ } } @@ -322,7 +326,7 @@ protected float func_70647_i() { return func_192000_b(this.field_70146_Z); -@@ -450,19 +392,16 @@ +@@ -451,19 +392,16 @@ return (p_192000_0_.nextFloat() - p_192000_0_.nextFloat()) * 0.2F + 1.0F; } @@ -342,7 +346,7 @@ protected void func_82167_n(Entity p_82167_1_) { if (!(p_82167_1_ instanceof EntityPlayer)) -@@ -471,7 +410,6 @@ +@@ -472,7 +410,6 @@ } } @@ -350,7 +354,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { if (this.func_180431_b(p_70097_1_)) -@@ -491,29 +429,26 @@ +@@ -492,29 +429,26 @@ public int func_191998_ds() { @@ -383,7 +387,7 @@ public void func_70037_a(NBTTagCompound p_70037_1_) { super.func_70037_a(p_70037_1_); -@@ -521,7 +456,6 @@ +@@ -522,7 +456,6 @@ } @Nullable @@ -391,7 +395,7 @@ protected ResourceLocation func_184647_J() { return LootTableList.field_192561_ax; -@@ -534,33 +468,38 @@ +@@ -535,33 +468,38 @@ static { diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityRabbit.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityRabbit.java.patch index c4480e9a2..5e2ccbf5e 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityRabbit.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityRabbit.java.patch @@ -105,7 +105,7 @@ } } -@@ -167,14 +161,12 @@ +@@ -167,24 +161,22 @@ this.field_175540_bm = 0; } @@ -121,6 +121,18 @@ public void func_70619_bc() { if (this.field_175538_bq > 0) + { +- this.field_175538_bq--; ++ --this.field_175538_bq; + } + + if (this.field_175541_bs > 0) + { +- this.field_175541_bs = this.field_175541_bs - this.field_70146_Z.nextInt(3); ++ this.field_175541_bs -= this.field_70146_Z.nextInt(3); + + if (this.field_175541_bs < 0) + { @@ -204,13 +196,10 @@ { EntityLivingBase entitylivingbase = this.func_70638_az(); @@ -163,7 +175,7 @@ { this.field_175538_bq = 10; } -@@ -282,7 +269,6 @@ +@@ -282,14 +269,13 @@ this.func_175520_cs(); } @@ -171,6 +183,14 @@ public void func_70636_d() { super.func_70636_d(); + + if (this.field_175540_bm != this.field_175535_bn) + { +- this.field_175540_bm++; ++ ++this.field_175540_bm; + } + else if (this.field_175535_bn != 0) + { @@ -299,12 +285,11 @@ } } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch index dd8f9a84f..d71a045ec 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch @@ -85,7 +85,7 @@ public void func_70103_a(byte p_70103_1_) { if (p_70103_1_ == 10) -@@ -193,43 +185,11 @@ +@@ -193,57 +185,23 @@ } } @@ -130,17 +130,25 @@ { if (!this.field_70170_p.field_72995_K) { -@@ -238,9 +198,7 @@ + this.func_70893_e(true); + int i = 1 + this.field_70146_Z.nextInt(3); - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { - EntityItem entityitem = this.func_70099_a( - new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, this.func_175509_cj().func_176765_a()), 1.0F - ); +- entityitem.field_70181_x = entityitem.field_70181_x + (double)(this.field_70146_Z.nextFloat() * 0.05F); +- entityitem.field_70159_w = entityitem.field_70159_w + (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); +- entityitem.field_70179_y = entityitem.field_70179_y + (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); + EntityItem entityitem = this.func_70099_a(new ItemStack(Item.func_150898_a(Blocks.field_150325_L), 1, this.func_175509_cj().func_176765_a()), 1.0F); - entityitem.field_70181_x += (double)(this.field_70146_Z.nextFloat() * 0.05F); - entityitem.field_70159_w += (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); - entityitem.field_70179_y += (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); ++ entityitem.field_70181_x += (double)(this.field_70146_Z.nextFloat() * 0.05F); ++ entityitem.field_70159_w += (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); ++ entityitem.field_70179_y += (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); + } + } + @@ -259,7 +217,37 @@ EntityLiving.func_189752_a(p_189802_0_, EntitySheep.class); } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch index b0c904cff..2c98e9f6b 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch @@ -329,6 +329,15 @@ protected void func_70619_bc() { if (--this.field_70955_e <= 0) +@@ -442,7 +214,7 @@ + + if (!this.func_70940_q() && this.field_70961_j > 0) + { +- this.field_70961_j--; ++ --this.field_70961_j; + + if (this.field_70961_j <= 0) + { @@ -462,7 +234,7 @@ if (this.field_70954_d != null && this.field_82189_bL != null) { @@ -346,16 +355,19 @@ public boolean func_184645_a(EntityPlayer p_184645_1_, EnumHand p_184645_2_) { ItemStack itemstack = p_184645_1_.func_184586_b(p_184645_2_); -@@ -484,7 +255,7 @@ +@@ -484,10 +255,7 @@ itemstack.func_111282_a(p_184645_1_, this, p_184645_2_); return true; } -- else if (!this.func_190669_a(itemstack, this.getClass()) && this.func_70089_S() && !this.func_70940_q() && !this.func_70631_g_()) +- else if (!this.func_190669_a(itemstack, (Class )this.getClass()) +- && this.func_70089_S() +- && !this.func_70940_q() +- && !this.func_70631_g_()) + else if (!this.func_190669_a(itemstack, this.getClass()) && this.func_70089_S() && !this.func_70940_q() && !this.func_70631_g_() && !p_184645_1_.func_70093_af()) { if (this.field_70963_i == null) { -@@ -514,26 +285,21 @@ +@@ -517,26 +285,21 @@ } } @@ -386,7 +398,16 @@ { NBTTagCompound nbttagcompound = p_188266_2_.func_74775_l("Offers"); -@@ -554,15 +320,14 @@ +@@ -544,7 +307,7 @@ + { + NBTTagList nbttaglist = nbttagcompound.func_150295_c("Recipes", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound1 = nbttaglist.func_150305_b(i); + DataFixesManager.func_188277_a(p_188266_1_, nbttagcompound1, p_188266_3_, "buy"); +@@ -557,15 +320,14 @@ return p_188266_2_; } @@ -404,7 +425,16 @@ p_70014_1_.func_74768_a("Riches", this.field_70956_bz); p_70014_1_.func_74768_a("Career", this.field_175563_bv); p_70014_1_.func_74768_a("CareerLevel", this.field_175562_bw); -@@ -588,11 +353,18 @@ +@@ -578,7 +340,7 @@ + + NBTTagList nbttaglist = new NBTTagList(); + +- for (int i = 0; i < this.field_175560_bz.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_175560_bz.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_175560_bz.func_70301_a(i); + +@@ -591,11 +353,18 @@ p_70014_1_.func_74782_a("Inventory", nbttaglist); } @@ -424,7 +454,16 @@ this.field_70956_bz = p_70037_1_.func_74762_e("Riches"); this.field_175563_bv = p_70037_1_.func_74762_e("Career"); this.field_175562_bw = p_70037_1_.func_74762_e("CareerLevel"); -@@ -620,32 +392,27 @@ +@@ -609,7 +378,7 @@ + + NBTTagList nbttaglist = p_70037_1_.func_150295_c("Inventory", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + ItemStack itemstack = new ItemStack(nbttaglist.func_150305_b(i)); + +@@ -623,32 +392,27 @@ this.func_175552_ct(); } @@ -457,7 +496,7 @@ protected ResourceLocation func_184647_J() { return LootTableList.field_191184_at; -@@ -653,12 +420,42 @@ +@@ -656,12 +420,42 @@ public void func_70938_b(int p_70938_1_) { @@ -502,7 +541,7 @@ } public boolean func_70941_o() -@@ -681,7 +478,6 @@ +@@ -684,7 +478,6 @@ return this.field_70953_g; } @@ -510,7 +549,7 @@ public void func_70604_c(@Nullable EntityLivingBase p_70604_1_) { super.func_70604_c(p_70604_1_); -@@ -699,7 +495,7 @@ +@@ -702,7 +495,7 @@ i = -3; } @@ -519,7 +558,7 @@ if (this.func_70089_S()) { -@@ -709,7 +505,6 @@ +@@ -712,7 +505,6 @@ } } @@ -527,7 +566,7 @@ public void func_70645_a(DamageSource p_70645_1_) { if (this.field_70954_d != null) -@@ -720,7 +515,7 @@ +@@ -723,7 +515,7 @@ { if (entity instanceof EntityPlayer) { @@ -536,7 +575,7 @@ } else if (entity instanceof IMob) { -@@ -729,7 +524,7 @@ +@@ -732,7 +524,7 @@ } else { @@ -545,7 +584,7 @@ if (entityplayer != null) { -@@ -741,14 +536,12 @@ +@@ -744,14 +536,12 @@ super.func_70645_a(p_70645_1_); } @@ -560,7 +599,16 @@ public EntityPlayer func_70931_l_() { return this.field_70962_h; -@@ -776,8 +569,7 @@ +@@ -768,7 +558,7 @@ + { + boolean flag = false; + +- for (int i = 0; i < this.field_175560_bz.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_175560_bz.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_175560_bz.func_70301_a(i); + +@@ -779,8 +569,7 @@ flag = true; this.field_175560_bz.func_70298_a(i, 3); } @@ -570,7 +618,7 @@ { flag = true; this.field_175560_bz.func_70298_a(i, 12); -@@ -801,7 +593,6 @@ +@@ -804,7 +593,6 @@ this.field_175565_bs = p_175549_1_; } @@ -578,7 +626,7 @@ public void func_70933_a(MerchantRecipe p_70933_1_) { p_70933_1_.func_77399_f(); -@@ -817,7 +608,7 @@ +@@ -820,7 +608,7 @@ if (this.field_70962_h != null) { @@ -587,7 +635,13 @@ } else { -@@ -834,7 +625,7 @@ +@@ -832,12 +620,12 @@ + + if (p_70933_1_.func_77394_a().func_77973_b() == Items.field_151166_bC) + { +- this.field_70956_bz = this.field_70956_bz + p_70933_1_.func_77394_a().func_190916_E(); ++ this.field_70956_bz += p_70933_1_.func_77394_a().func_190916_E(); + } if (p_70933_1_.func_180322_j()) { @@ -596,7 +650,7 @@ } if (this.field_70962_h instanceof EntityPlayerMP) -@@ -843,7 +634,6 @@ +@@ -846,7 +634,6 @@ } } @@ -604,7 +658,7 @@ public void func_110297_a_(ItemStack p_110297_1_) { if (!this.field_70170_p.field_72995_K && this.field_70757_a > -this.func_70627_aG() + 20) -@@ -854,7 +644,6 @@ +@@ -857,7 +644,6 @@ } @Nullable @@ -612,7 +666,7 @@ public MerchantRecipeList func_70934_b(EntityPlayer p_70934_1_) { if (this.field_70963_i == null) -@@ -862,20 +651,18 @@ +@@ -865,20 +651,18 @@ this.func_175554_cu(); } @@ -626,7 +680,8 @@ - if (this.field_175563_bv != 0 && this.field_175562_bw != 0) { - ++this.field_175562_bw; +- this.field_175562_bw++; ++ ++this.field_175562_bw; } else { @@ -635,7 +690,7 @@ this.field_175562_bw = 1; } -@@ -886,42 +673,32 @@ +@@ -889,42 +673,32 @@ int i = this.field_175563_bv - 1; int j = this.field_175562_bw - 1; @@ -682,7 +737,7 @@ public ITextComponent func_145748_c_() { Team team = this.func_96124_cp(); -@@ -1012,9 +789,9 @@ +@@ -1015,9 +789,9 @@ s1 = "nitwit"; } @@ -694,7 +749,7 @@ itextcomponent.func_150256_b().func_150209_a(this.func_174823_aP()); itextcomponent.func_150256_b().func_179989_a(this.func_189512_bd()); -@@ -1025,21 +802,15 @@ +@@ -1028,21 +802,15 @@ return itextcomponent; } @@ -716,9 +771,12 @@ public void func_70103_a(byte p_70103_1_) { if (p_70103_1_ == 12) -@@ -1065,24 +836,14 @@ +@@ -1066,26 +834,16 @@ + @SideOnly(Side.CLIENT) + private void func_180489_a(EnumParticleTypes p_180489_1_) { - for (int i = 0; i < 5; ++i) +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { - double d0 = this.field_70146_Z.nextGaussian() * 0.02; - double d1 = this.field_70146_Z.nextGaussian() * 0.02; @@ -745,7 +803,7 @@ public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, @Nullable IEntityLivingData p_180482_2_) { return this.func_190672_a(p_180482_1_, p_180482_2_, true); -@@ -1094,7 +855,7 @@ +@@ -1097,7 +855,7 @@ if (p_190672_3_) { @@ -754,7 +812,7 @@ } this.func_175552_ct(); -@@ -1110,24 +871,22 @@ +@@ -1113,24 +871,22 @@ public EntityVillager func_90011_a(EntityAgeable p_90011_1_) { EntityVillager entityvillager = new EntityVillager(this.field_70170_p); @@ -781,7 +839,7 @@ entitywitch.func_94061_f(this.func_175446_cd()); if (this.func_145818_k_()) -@@ -1146,7 +905,6 @@ +@@ -1149,7 +905,6 @@ return this.field_175560_bz; } @@ -789,7 +847,7 @@ protected void func_175445_a(EntityItem p_175445_1_) { ItemStack itemstack = p_175445_1_.func_92059_d(); -@@ -1169,13 +927,7 @@ +@@ -1172,13 +927,7 @@ private boolean func_175558_a(Item p_175558_1_) { @@ -804,7 +862,30 @@ } public boolean func_175553_cp() -@@ -1212,10 +964,7 @@ +@@ -1194,23 +943,28 @@ + public boolean func_175557_cr() + { + boolean flag = this.func_70946_n() == 0; +- return flag ? !this.func_175559_s(5) : !this.func_175559_s(1); ++ ++ if (flag) ++ { ++ return !this.func_175559_s(5); ++ } ++ else ++ { ++ return !this.func_175559_s(1); ++ } + } + + private boolean func_175559_s(int p_175559_1_) + { + boolean flag = this.func_70946_n() == 0; + +- for (int i = 0; i < this.field_175560_bz.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_175560_bz.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_175560_bz.func_70301_a(i); if (!itemstack.func_190926_b()) { @@ -816,7 +897,12 @@ { return true; } -@@ -1236,13 +985,7 @@ +@@ -1227,17 +981,11 @@ + + public boolean func_175556_cs() + { +- for (int i = 0; i < this.field_175560_bz.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_175560_bz.func_70302_i_(); ++i) { ItemStack itemstack = this.field_175560_bz.func_70301_a(i); @@ -831,7 +917,7 @@ { return true; } -@@ -1251,7 +994,6 @@ +@@ -1246,7 +994,6 @@ return false; } @@ -839,7 +925,7 @@ public boolean func_174820_d(int p_174820_1_, ItemStack p_174820_2_) { if (super.func_174820_d(p_174820_1_, p_174820_2_)) -@@ -1285,7 +1027,6 @@ +@@ -1280,7 +1027,6 @@ this.field_179404_b = p_i45815_2_; } @@ -847,7 +933,7 @@ public void func_190888_a(IMerchant p_190888_1_, MerchantRecipeList p_190888_2_, Random p_190888_3_) { int i = 1; -@@ -1319,27 +1060,19 @@ +@@ -1314,27 +1060,19 @@ this.field_179408_d = p_i45813_4_; } @@ -877,7 +963,7 @@ int i = MathHelper.func_76136_a(p_190888_3_, enchantment.func_77319_d(), enchantment.func_77325_b()); ItemStack itemstack = ItemEnchantedBook.func_92111_a(new EnchantmentData(enchantment, i)); int j = 2 + p_190888_3_.nextInt(5 + i * 10) + 3 * i; -@@ -1369,7 +1102,6 @@ +@@ -1364,7 +1102,6 @@ this.field_179406_b = p_i45814_2_; } @@ -885,7 +971,7 @@ public void func_190888_a(IMerchant p_190888_1_, MerchantRecipeList p_190888_2_, Random p_190888_3_) { int i = 1; -@@ -1380,12 +1112,13 @@ +@@ -1375,12 +1112,13 @@ } ItemStack itemstack = new ItemStack(Items.field_151166_bC, i, 0); @@ -902,7 +988,7 @@ public static class ListItemForEmeralds implements EntityVillager.ITradeList { -@@ -1404,7 +1137,6 @@ +@@ -1399,7 +1137,6 @@ this.field_179402_b = p_i45812_2_; } @@ -910,7 +996,7 @@ public void func_190888_a(IMerchant p_190888_1_, MerchantRecipeList p_190888_2_, Random p_190888_3_) { int i = 1; -@@ -1436,19 +1168,17 @@ +@@ -1431,19 +1168,17 @@ { public PriceInfo(int p_i45810_1_, int p_i45810_2_) { @@ -933,7 +1019,7 @@ } } -@@ -1465,7 +1195,6 @@ +@@ -1460,7 +1195,6 @@ this.field_190891_c = p_i47340_3_; } diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch index 268e44ef3..8c1305d4e 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityWolf.java.patch @@ -180,6 +180,20 @@ public void func_70071_h_() { super.func_70071_h_(); +@@ -247,11 +232,11 @@ + + if (this.func_70922_bv()) + { +- this.field_70926_e = this.field_70926_e + (1.0F - this.field_70926_e) * 0.4F; ++ this.field_70926_e += (1.0F - this.field_70926_e) * 0.4F; + } + else + { +- this.field_70926_e = this.field_70926_e + (0.0F - this.field_70926_e) * 0.4F; ++ this.field_70926_e += (0.0F - this.field_70926_e) * 0.4F; + } + + if (this.func_70026_G()) @@ -265,9 +250,7 @@ { if (this.field_70929_i == 0.0F) @@ -198,7 +212,8 @@ - int i = (int)(MathHelper.func_76126_a((this.field_70929_i - 0.4F) * (float) Math.PI) * 7.0F); + int i = (int)(MathHelper.func_76126_a((this.field_70929_i - 0.4F) * (float)Math.PI) * 7.0F); - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { float f1 = (this.field_70146_Z.nextFloat() * 2.0F - 1.0F) * this.field_70130_N * 0.5F; float f2 = (this.field_70146_Z.nextFloat() * 2.0F - 1.0F) * this.field_70130_N * 0.5F; @@ -400,7 +415,21 @@ public boolean func_70878_b(EntityAnimal p_70878_1_) { if (p_70878_1_ == this) -@@ -618,10 +578,9 @@ +@@ -605,19 +565,22 @@ + { + return false; + } ++ else if (entitywolf.func_70906_o()) ++ { ++ return false; ++ } + else + { +- return entitywolf.func_70906_o() ? false : this.func_70880_s() && entitywolf.func_70880_s(); ++ return this.func_70880_s() && entitywolf.func_70880_s(); + } + } + } public boolean func_70922_bv() { @@ -412,17 +441,27 @@ public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) { if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) -@@ -636,8 +595,7 @@ +@@ -632,11 +595,14 @@ } } -- if (p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).func_96122_a((EntityPlayer)p_142018_1_) -- ) +- return p_142018_1_ instanceof EntityPlayer +- && p_142018_2_ instanceof EntityPlayer +- && !((EntityPlayer)p_142018_2_).func_96122_a((EntityPlayer)p_142018_1_) +- ? false +- : !(p_142018_1_ instanceof AbstractHorse) || !((AbstractHorse)p_142018_1_).func_110248_bS(); + if (p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).func_96122_a((EntityPlayer)p_142018_1_)) - { - return false; - } -@@ -652,7 +610,6 @@ ++ { ++ return false; ++ } ++ else ++ { ++ return !(p_142018_1_ instanceof AbstractHorse) || !((AbstractHorse)p_142018_1_).func_110248_bS(); ++ } + } + else + { +@@ -644,7 +610,6 @@ } } @@ -430,15 +469,28 @@ public boolean func_184652_a(EntityPlayer p_184652_1_) { return !this.func_70919_bu() && super.func_184652_a(p_184652_1_); -@@ -668,7 +625,6 @@ +@@ -660,12 +625,16 @@ this.field_190856_d = p_i47251_2_; } - @Override public boolean func_75250_a() { - if (super.func_75250_a() && this.field_75376_d instanceof EntityLlama) -@@ -686,17 +642,15 @@ +- return super.func_75250_a() && this.field_75376_d instanceof EntityLlama +- ? !this.field_190856_d.func_70909_n() && this.func_190854_a((EntityLlama)this.field_75376_d) +- : false; ++ if (super.func_75250_a() && this.field_75376_d instanceof EntityLlama) ++ { ++ return !this.field_190856_d.func_70909_n() && this.func_190854_a((EntityLlama)this.field_75376_d); ++ } ++ else ++ { ++ return false; ++ } + } + + private boolean func_190854_a(EntityLlama p_190854_1_) +@@ -673,17 +642,15 @@ return p_190854_1_.func_190707_dL() >= EntityWolf.this.field_70146_Z.nextInt(5); } diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch index 5f8f08b43..51e0cc6b3 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch @@ -70,6 +70,21 @@ this.field_70145_X = this.func_175149_v(); if (this.func_175149_v()) +@@ -192,12 +197,12 @@ + + if (this.field_71090_bL > 0) + { +- this.field_71090_bL--; ++ --this.field_71090_bL; + } + + if (this.func_70608_bn()) + { +- this.field_71076_b++; ++ ++this.field_71076_b; + + if (this.field_71076_b > 100) + { @@ -210,7 +215,7 @@ { this.func_70999_a(true, true, false); @@ -79,7 +94,16 @@ { this.func_70999_a(false, true, true); } -@@ -258,8 +263,8 @@ +@@ -218,7 +223,7 @@ + } + else if (this.field_71076_b > 0) + { +- this.field_71076_b++; ++ ++this.field_71076_b; + + if (this.field_71076_b >= 110) + { +@@ -258,15 +263,15 @@ } int i = 29999999; @@ -90,6 +114,14 @@ if (d0 != this.field_70165_t || d1 != this.field_70161_v) { + this.func_70107_b(d0, this.field_70163_u, d1); + } + +- this.field_184617_aD++; ++ ++this.field_184617_aD; + ItemStack itemstack = this.func_184614_ca(); + + if (!ItemStack.func_77989_b(this.field_184831_bT, itemstack)) @@ -291,47 +296,47 @@ double d0 = this.field_70165_t - this.field_71094_bP; double d1 = this.field_70163_u - this.field_71095_bQ; @@ -294,7 +326,7 @@ protected void func_70626_be() { super.func_70626_be(); -@@ -502,7 +488,6 @@ +@@ -502,12 +488,11 @@ this.field_70759_as = this.field_70177_z; } @@ -302,6 +334,12 @@ public void func_70636_d() { if (this.field_71101_bC > 0) + { +- this.field_71101_bC--; ++ --this.field_71101_bC; + } + + if (this.field_70170_p.func_175659_aa() == EnumDifficulty.PEACEFUL && this.field_70170_p.func_82736_K().func_82766_b("naturalRegeneration")) @@ -537,12 +522,12 @@ if (this.func_70051_ag()) @@ -317,7 +355,18 @@ if (f > 0.1F) { -@@ -568,11 +553,11 @@ +@@ -559,8 +544,8 @@ + f1 = 0.0F; + } + +- this.field_71109_bG = this.field_71109_bG + (f - this.field_71109_bG) * 0.4F; +- this.field_70726_aT = this.field_70726_aT + (f1 - this.field_70726_aT) * 0.8F; ++ this.field_71109_bG += (f - this.field_71109_bG) * 0.4F; ++ this.field_70726_aT += (f1 - this.field_70726_aT) * 0.8F; + + if (this.func_110143_aJ() > 0.0F && !this.func_175149_v()) + { +@@ -568,16 +553,16 @@ if (this.func_184218_aH() && !this.func_184187_bx().field_70128_L) { @@ -331,6 +380,12 @@ } List list = this.field_70170_p.func_72839_b(this, axisalignedbb); + +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + Entity entity = list.get(i); + @@ -591,8 +576,7 @@ this.func_192028_j(this.func_192023_dk()); this.func_192028_j(this.func_192025_dl()); @@ -400,6 +455,15 @@ } this.func_71029_a(StatList.field_188069_A); +@@ -670,7 +660,7 @@ + + protected void func_190776_cN() + { +- for (int i = 0; i < this.field_71071_by.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_71071_by.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_71071_by.func_70301_a(i); + @@ -681,7 +671,6 @@ } } @@ -460,7 +524,7 @@ EntityItem entityitem = new EntityItem(this.field_70170_p, this.field_70165_t, d0, this.field_70161_v, p_146097_1_); entityitem.func_174867_a(40); -@@ -741,26 +732,18 @@ +@@ -741,30 +732,22 @@ if (p_146097_2_) { float f = this.field_70146_Z.nextFloat() * 0.5F; @@ -491,8 +555,15 @@ + entityitem.field_70181_x = (double)(-MathHelper.func_76126_a(this.field_70125_A * 0.017453292F) * f2 + 0.1F); + float f3 = this.field_70146_Z.nextFloat() * ((float)Math.PI * 2F); f2 = 0.02F * this.field_70146_Z.nextFloat(); - entityitem.field_70159_w += Math.cos((double)f3) * (double)f2; - entityitem.field_70181_x += (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); +- entityitem.field_70159_w = entityitem.field_70159_w + Math.cos((double)f3) * (double)f2; +- entityitem.field_70181_x = entityitem.field_70181_x + (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); +- entityitem.field_70179_y = entityitem.field_70179_y + Math.sin((double)f3) * (double)f2; ++ entityitem.field_70159_w += Math.cos((double)f3) * (double)f2; ++ entityitem.field_70181_x += (double)((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.1F); ++ entityitem.field_70179_y += Math.sin((double)f3) * (double)f2; + } + + ItemStack itemstack = this.func_184816_a(entityitem); @@ -785,13 +768,21 @@ public ItemStack func_184816_a(EntityItem p_184816_1_) @@ -685,7 +756,15 @@ if (enumhand == EnumHand.MAIN_HAND) { -@@ -1099,26 +1113,30 @@ +@@ -1092,33 +1106,37 @@ + { + if (!itemstack.func_190926_b()) + { +- i++; ++ ++i; + } + } + return (float)i / (float)this.field_71071_by.field_70460_b.size(); } @@ -802,8 +881,9 @@ - .func_184148_a( - null, this.field_70165_t, this.field_70163_u, this.field_70161_v, SoundEvents.field_187721_dT, this.func_184176_by(), 1.0F, 1.0F - ); +- i++; + this.field_70170_p.func_184148_a((EntityPlayer)null, this.field_70165_t, this.field_70163_u, this.field_70161_v, SoundEvents.field_187721_dT, this.func_184176_by(), 1.0F, 1.0F); - ++i; ++ ++i; flag1 = true; } @@ -1338,6 +1418,18 @@ public void func_70110_aj() { if (!this.field_71075_bZ.field_75100_b) +@@ -2047,9 +1992,9 @@ + p_71023_1_ = i; + } + +- this.field_71106_cc = this.field_71106_cc + (float)p_71023_1_ / (float)this.func_71050_bK(); ++ this.field_71106_cc += (float)p_71023_1_ / (float)this.func_71050_bK(); + +- for (this.field_71067_cb += p_71023_1_; this.field_71106_cc >= 1.0F; this.field_71106_cc = this.field_71106_cc / (float)this.func_71050_bK()) ++ for (this.field_71067_cb += p_71023_1_; this.field_71106_cc >= 1.0F; this.field_71106_cc /= (float)this.func_71050_bK()) + { + this.field_71106_cc = (this.field_71106_cc - 1.0F) * (float)this.func_71050_bK(); + this.func_82242_a(1); @@ -2089,10 +2034,7 @@ if (p_82242_1_ > 0 && this.field_71068_ca % 5 == 0 && (float)this.field_82249_h < (float)this.field_70173_aa - 100.0F) { diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch index c383f14ea..653e0abbf 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch @@ -68,7 +68,7 @@ public void func_192024_a(ItemStack p_192024_1_, int p_192024_2_) { super.func_192024_a(p_192024_1_, p_192024_2_); -@@ -294,33 +289,28 @@ +@@ -294,46 +289,41 @@ this.field_71070_bA.func_75132_a(this); } @@ -102,7 +102,14 @@ public void func_70071_h_() { this.field_71134_c.func_73075_a(); -@@ -333,7 +323,7 @@ +- this.field_147101_bU--; ++ --this.field_147101_bU; + + if (this.field_70172_ad > 0) + { +- this.field_70172_ad--; ++ --this.field_70172_ad; + } this.field_71070_bA.func_75142_b(); @@ -120,6 +127,15 @@ iterator.remove(); } +@@ -391,7 +381,7 @@ + { + super.func_70071_h_(); + +- for (int i = 0; i < this.field_71071_by.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_71071_by.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_71071_by.func_70301_a(i); + @@ -406,12 +396,9 @@ } } @@ -472,7 +488,7 @@ public void func_71111_a(Container p_71111_1_, int p_71111_2_, ItemStack p_71111_3_) { if (!(p_71111_1_.func_75139_a(p_71111_2_) instanceof SlotCrafting)) -@@ -1014,20 +984,17 @@ +@@ -1014,29 +984,25 @@ this.func_71110_a(p_71120_1_, p_71120_1_.func_75138_a()); } @@ -492,8 +508,10 @@ - @Override public void func_175173_a(Container p_175173_1_, IInventory p_175173_2_) { - for (int i = 0; i < p_175173_2_.func_174890_g(); ++i) -@@ -1036,7 +1003,6 @@ +- for (int i = 0; i < p_175173_2_.func_174890_g(); i++) ++ for (int i = 0; i < p_175173_2_.func_174890_g(); ++i) + { + this.field_71135_a.func_147359_a(new SPacketWindowProperty(p_175173_1_.field_75152_c, i, p_175173_2_.func_174887_a_(i))); } } @@ -668,16 +686,26 @@ public boolean func_70003_b(int p_70003_1_, String p_70003_2_) { if ("seed".equals(p_70003_2_) && !this.field_71133_b.func_71262_S()) -@@ -1323,7 +1288,7 @@ +@@ -1323,8 +1288,16 @@ { if (this.field_71133_b.func_184103_al().func_152596_g(this.func_146103_bH())) { - UserListOpsEntry userlistopsentry = this.field_71133_b.func_184103_al().func_152603_m().func_152683_b(this.func_146103_bH()); +- return userlistopsentry != null ? userlistopsentry.func_152644_a() >= p_70003_1_ : this.field_71133_b.func_110455_j() >= p_70003_1_; + UserListOpsEntry userlistopsentry = (UserListOpsEntry)this.field_71133_b.func_184103_al().func_152603_m().func_152683_b(this.func_146103_bH()); - - if (userlistopsentry != null) - { -@@ -1349,7 +1314,8 @@ ++ ++ if (userlistopsentry != null) ++ { ++ return userlistopsentry.func_152644_a() >= p_70003_1_; ++ } ++ else ++ { ++ return this.field_71133_b.func_110455_j() >= p_70003_1_; ++ } + } + else + { +@@ -1341,7 +1314,8 @@ { String s = this.field_71135_a.field_147371_a.func_74430_c().toString(); s = s.substring(s.indexOf("/") + 1); @@ -687,7 +715,7 @@ } public void func_147100_a(CPacketClientSettings p_147100_1_) -@@ -1357,8 +1323,8 @@ +@@ -1349,8 +1323,8 @@ this.field_71148_cg = p_147100_1_.func_149524_c(); this.field_71143_cn = p_147100_1_.func_149523_e(); this.field_71140_co = p_147100_1_.func_149520_f(); @@ -698,7 +726,7 @@ } public EntityPlayer.EnumChatVisibility func_147096_v() -@@ -1371,10 +1337,9 @@ +@@ -1363,10 +1337,9 @@ this.field_71135_a.func_147359_a(new SPacketResourcePackSend(p_175397_1_, p_175397_2_)); } @@ -710,7 +738,7 @@ } public void func_143004_u() -@@ -1396,11 +1361,11 @@ +@@ -1388,11 +1361,11 @@ { if (p_152339_1_ instanceof EntityPlayer) { @@ -724,7 +752,7 @@ } } -@@ -1409,7 +1374,6 @@ +@@ -1401,7 +1374,6 @@ this.field_71130_g.remove(Integer.valueOf(p_184848_1_.func_145782_y())); } @@ -732,7 +760,7 @@ protected void func_175135_B() { if (this.func_175149_v()) -@@ -1442,7 +1406,6 @@ +@@ -1434,16 +1406,14 @@ } } @@ -740,7 +768,9 @@ protected void func_184173_H() { if (this.field_71088_bW > 0 && !this.field_184851_cj) -@@ -1451,7 +1414,6 @@ + { +- this.field_71088_bW--; ++ --this.field_71088_bW; } } @@ -748,7 +778,7 @@ public void func_71059_n(Entity p_71059_1_) { if (this.field_71134_c.func_73081_b() == GameType.SPECTATOR) -@@ -1475,7 +1437,6 @@ +@@ -1467,7 +1437,6 @@ return null; } diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch index a6b488d2e..37a2c77be 100644 --- a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch @@ -62,7 +62,8 @@ public int func_70447_i() { - for (int i = 0; i < this.field_70462_a.size(); ++i) +- for (int i = 0; i < this.field_70462_a.size(); i++) ++ for (int i = 0; i < this.field_70462_a.size(); ++i) { - if (this.field_70462_a.get(i).func_190926_b()) + if (((ItemStack)this.field_70462_a.get(i)).func_190926_b()) @@ -78,16 +79,24 @@ { int j = this.func_70447_i(); -@@ -133,7 +130,7 @@ +@@ -131,9 +128,9 @@ + @SideOnly(Side.CLIENT) + public int func_184429_b(ItemStack p_184429_1_) { - for (int i = 0; i < this.field_70462_a.size(); ++i) +- for (int i = 0; i < this.field_70462_a.size(); i++) ++ for (int i = 0; i < this.field_70462_a.size(); ++i) { - if (!this.field_70462_a.get(i).func_190926_b() && this.func_184431_b(p_184429_1_, this.field_70462_a.get(i))) + if (!((ItemStack)this.field_70462_a.get(i)).func_190926_b() && this.func_184431_b(p_184429_1_, this.field_70462_a.get(i))) { return i; } -@@ -148,11 +145,7 @@ +@@ -144,15 +141,11 @@ + + public int func_194014_c(ItemStack p_194014_1_) + { +- for (int i = 0; i < this.field_70462_a.size(); i++) ++ for (int i = 0; i < this.field_70462_a.size(); ++i) { ItemStack itemstack = this.field_70462_a.get(i); @@ -100,7 +109,12 @@ { return i; } -@@ -167,7 +160,7 @@ +@@ -163,21 +156,21 @@ + + public int func_184433_k() + { +- for (int i = 0; i < 9; i++) ++ for (int i = 0; i < 9; ++i) { int j = (this.field_70461_c + i) % 9; @@ -109,7 +123,10 @@ { return j; } -@@ -177,7 +170,7 @@ + } + +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) { int l = (this.field_70461_c + k) % 9; @@ -132,7 +149,12 @@ } while (this.field_70461_c >= 9) -@@ -220,10 +211,7 @@ +@@ -216,14 +207,11 @@ + { + int i = 0; + +- for (int j = 0; j < this.func_70302_i_(); j++) ++ for (int j = 0; j < this.func_70302_i_(); ++j) { ItemStack itemstack = this.func_70301_a(j); @@ -163,9 +185,21 @@ itemstack.func_190917_f(j); itemstack.func_190915_d(5); return i; -@@ -369,10 +358,17 @@ +@@ -351,7 +340,7 @@ + } + else + { +- for (int i = 0; i < this.field_70462_a.size(); i++) ++ for (int i = 0; i < this.field_70462_a.size(); ++i) + { + if (this.func_184436_a(this.field_70462_a.get(i), p_70432_1_)) + { +@@ -367,12 +356,19 @@ + { + for (NonNullList nonnulllist : this.field_184440_g) { - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { - if (!nonnulllist.get(i).func_190926_b()) + if (!((ItemStack)nonnulllist.get(i)).func_190926_b()) @@ -236,7 +270,7 @@ public ItemStack func_70298_a(int p_70298_1_, int p_70298_2_) { List list = null; -@@ -509,7 +510,7 @@ +@@ -509,14 +510,14 @@ p_70298_1_ -= nonnulllist.size(); } @@ -245,6 +279,14 @@ } public void func_184437_d(ItemStack p_184437_1_) + { + for (NonNullList nonnulllist : this.field_184440_g) + { +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) + { + if (nonnulllist.get(i) == p_184437_1_) + { @@ -527,7 +528,6 @@ } } @@ -282,9 +324,12 @@ } return f; -@@ -593,33 +592,33 @@ +@@ -591,35 +590,35 @@ + + public NBTTagList func_70442_a(NBTTagList p_70442_1_) { - for (int i = 0; i < this.field_70462_a.size(); ++i) +- for (int i = 0; i < this.field_70462_a.size(); i++) ++ for (int i = 0; i < this.field_70462_a.size(); ++i) { - if (!this.field_70462_a.get(i).func_190926_b()) + if (!((ItemStack)this.field_70462_a.get(i)).func_190926_b()) @@ -297,7 +342,8 @@ } } - for (int j = 0; j < this.field_70460_b.size(); ++j) +- for (int j = 0; j < this.field_70460_b.size(); j++) ++ for (int j = 0; j < this.field_70460_b.size(); ++j) { - if (!this.field_70460_b.get(j).func_190926_b()) + if (!((ItemStack)this.field_70460_b.get(j)).func_190926_b()) @@ -310,7 +356,8 @@ } } - for (int k = 0; k < this.field_184439_c.size(); ++k) +- for (int k = 0; k < this.field_184439_c.size(); k++) ++ for (int k = 0; k < this.field_184439_c.size(); ++k) { - if (!this.field_184439_c.get(k).func_190926_b()) + if (!((ItemStack)this.field_184439_c.get(k)).func_190926_b()) @@ -322,6 +369,15 @@ p_70442_1_.func_74742_a(nbttagcompound2); } } +@@ -633,7 +632,7 @@ + this.field_70460_b.clear(); + this.field_184439_c.clear(); + +- for (int i = 0; i < p_70443_1_.func_74745_c(); i++) ++ for (int i = 0; i < p_70443_1_.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = p_70443_1_.func_150305_b(i); + int j = nbttagcompound.func_74771_c("Slot") & 255; @@ -657,13 +656,11 @@ } } @@ -375,7 +431,7 @@ public int func_70297_j_() { return 64; -@@ -757,7 +749,7 @@ +@@ -757,14 +749,14 @@ public void func_70449_g(float p_70449_1_) { @@ -384,29 +440,51 @@ if (p_70449_1_ < 1.0F) { -@@ -792,7 +784,6 @@ + p_70449_1_ = 1.0F; + } + +- for (int i = 0; i < this.field_70460_b.size(); i++) ++ for (int i = 0; i < this.field_70460_b.size(); ++i) + { + ItemStack itemstack = this.field_70460_b.get(i); + +@@ -779,7 +771,7 @@ + { + for (List list : this.field_184440_g) + { +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + ItemStack itemstack = list.get(i); + +@@ -792,10 +784,9 @@ } } - @Override public void func_70296_d() { - ++this.field_194017_h; -@@ -814,7 +805,6 @@ +- this.field_194017_h++; ++ ++this.field_194017_h; + } + + @SideOnly(Side.CLIENT) +@@ -814,39 +805,55 @@ return this.field_70457_g; } - @Override public boolean func_70300_a(EntityPlayer p_70300_1_) { - if (this.field_70458_d.field_70128_L) -@@ -823,37 +813,47 @@ - } - else - { -- return !(p_70300_1_.func_70068_e(this.field_70458_d) > 64.0); +- return this.field_70458_d.field_70128_L ? false : !(p_70300_1_.func_70068_e(this.field_70458_d) > 64.0); ++ if (this.field_70458_d.field_70128_L) ++ { ++ return false; ++ } ++ else ++ { + return p_70300_1_.func_70068_e(this.field_70458_d) <= 64.0D; - } ++ } } public boolean func_70431_c(ItemStack p_70431_1_) @@ -454,7 +532,16 @@ public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) { return true; -@@ -869,24 +869,20 @@ +@@ -854,7 +861,7 @@ + + public void func_70455_b(InventoryPlayer p_70455_1_) + { +- for (int i = 0; i < this.func_70302_i_(); i++) ++ for (int i = 0; i < this.func_70302_i_(); ++i) + { + this.func_70299_a(i, p_70455_1_.func_70301_a(i)); + } +@@ -862,24 +869,20 @@ this.field_70461_c = p_70455_1_.field_70461_c; } diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityArrow.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityArrow.java.patch index 7b00c269c..6e2532179 100644 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityArrow.java.patch +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityArrow.java.patch @@ -57,7 +57,7 @@ this.field_70250_c = p_i46777_2_; if (p_i46777_2_ instanceof EntityPlayer) -@@ -88,31 +91,29 @@ +@@ -88,77 +91,70 @@ } @SideOnly(Side.CLIENT) @@ -94,9 +94,15 @@ + float f1 = -MathHelper.func_76126_a(p_184547_2_ * 0.017453292F); + float f2 = MathHelper.func_76134_b(p_184547_3_ * 0.017453292F) * MathHelper.func_76134_b(p_184547_2_ * 0.017453292F); this.func_70186_c((double)f, (double)f1, (double)f2, p_184547_5_, p_184547_6_); - this.field_70159_w += p_184547_1_.field_70159_w; - this.field_70179_y += p_184547_1_.field_70179_y; -@@ -123,42 +124,37 @@ +- this.field_70159_w = this.field_70159_w + p_184547_1_.field_70159_w; +- this.field_70179_y = this.field_70179_y + p_184547_1_.field_70179_y; ++ this.field_70159_w += p_184547_1_.field_70159_w; ++ this.field_70179_y += p_184547_1_.field_70179_y; + + if (!p_184547_1_.field_70122_E) + { +- this.field_70181_x = this.field_70181_x + p_184547_1_.field_70181_x; ++ this.field_70181_x += p_184547_1_.field_70181_x; } } @@ -191,7 +197,15 @@ { this.field_70254_i = true; } -@@ -215,7 +209,7 @@ +@@ -208,25 +202,25 @@ + + if (this.field_70249_b > 0) + { +- this.field_70249_b--; ++ --this.field_70249_b; + } + + if (this.field_70254_i) { int j = block.func_176201_c(iblockstate); @@ -199,7 +213,37 @@ + if ((block != this.field_145790_g || j != this.field_70253_h) && !this.field_70170_p.func_184143_b(this.func_174813_aQ().func_186662_g(0.05D))) { this.field_70254_i = false; - this.field_70159_w *= (double)(this.field_70146_Z.nextFloat() * 0.2F); +- this.field_70159_w = this.field_70159_w * (double)(this.field_70146_Z.nextFloat() * 0.2F); +- this.field_70181_x = this.field_70181_x * (double)(this.field_70146_Z.nextFloat() * 0.2F); +- this.field_70179_y = this.field_70179_y * (double)(this.field_70146_Z.nextFloat() * 0.2F); ++ this.field_70159_w *= (double)(this.field_70146_Z.nextFloat() * 0.2F); ++ this.field_70181_x *= (double)(this.field_70146_Z.nextFloat() * 0.2F); ++ this.field_70179_y *= (double)(this.field_70146_Z.nextFloat() * 0.2F); + this.field_70252_j = 0; + this.field_70257_an = 0; + } + else + { +- this.field_70252_j++; ++ ++this.field_70252_j; + + if (this.field_70252_j >= 1200) + { +@@ -234,12 +228,12 @@ + } + } + +- this.field_184552_b++; ++ ++this.field_184552_b; + } + else + { + this.field_184552_b = 0; +- this.field_70257_an++; ++ ++this.field_70257_an; + Vec3d vec3d1 = new Vec3d(this.field_70165_t, this.field_70163_u, this.field_70161_v); + Vec3d vec3d = new Vec3d(this.field_70165_t + this.field_70159_w, this.field_70163_u + this.field_70181_x, this.field_70161_v + this.field_70179_y); + RayTraceResult raytraceresult = this.field_70170_p.func_147447_a(vec3d1, vec3d, false, true, false); @@ -248,9 +242,7 @@ if (raytraceresult != null) @@ -211,7 +255,7 @@ } Entity entity = this.func_184551_a(vec3d1, vec3d); -@@ -270,7 +262,7 @@ +@@ -270,38 +262,28 @@ } } @@ -220,9 +264,11 @@ { this.func_184549_a(raytraceresult); } -@@ -279,16 +271,7 @@ + + if (this.func_70241_g()) { - for (int k = 0; k < 4; ++k) +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) { - this.field_70170_p - .func_175688_a( @@ -238,9 +284,12 @@ } } -@@ -296,12 +279,11 @@ - this.field_70163_u += this.field_70181_x; - this.field_70161_v += this.field_70179_y; +- this.field_70165_t = this.field_70165_t + this.field_70159_w; +- this.field_70163_u = this.field_70163_u + this.field_70181_x; +- this.field_70161_v = this.field_70161_v + this.field_70179_y; ++ this.field_70165_t += this.field_70159_w; ++ this.field_70163_u += this.field_70181_x; ++ this.field_70161_v += this.field_70179_y; float f4 = MathHelper.func_76133_a(this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y); - this.field_70177_z = (float)(MathHelper.func_181159_b(this.field_70159_w, this.field_70179_y) * 180.0F / (float)Math.PI); - this.field_70125_A = (float)(MathHelper.func_181159_b(this.field_70181_x, (double)f4) * 180.0F / (float)Math.PI); @@ -254,8 +303,12 @@ } while (this.field_70125_A - this.field_70127_C >= 180.0F) -@@ -329,16 +311,7 @@ - for (int i = 0; i < 4; ++i) +@@ -326,19 +308,10 @@ + + if (this.func_70090_H()) + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { float f3 = 0.25F; - this.field_70170_p @@ -344,9 +397,9 @@ - float f2 = MathHelper.func_76133_a( - this.field_70159_w * this.field_70159_w + this.field_70181_x * this.field_70181_x + this.field_70179_y * this.field_70179_y - ); -- this.field_70165_t -= this.field_70159_w / (double)f2 * 0.05F; -- this.field_70163_u -= this.field_70181_x / (double)f2 * 0.05F; -- this.field_70161_v -= this.field_70179_y / (double)f2 * 0.05F; +- this.field_70165_t = this.field_70165_t - this.field_70159_w / (double)f2 * 0.05F; +- this.field_70163_u = this.field_70163_u - this.field_70181_x / (double)f2 * 0.05F; +- this.field_70161_v = this.field_70161_v - this.field_70179_y / (double)f2 * 0.05F; + float f2 = MathHelper.func_76133_a(this.field_70159_w * this.field_70159_w + this.field_70181_x * this.field_70181_x + this.field_70179_y * this.field_70179_y); + this.field_70165_t -= this.field_70159_w / (double)f2 * 0.05000000074505806D; + this.field_70163_u -= this.field_70181_x / (double)f2 * 0.05000000074505806D; @@ -362,7 +415,7 @@ public void func_70091_d(MoverType p_70091_1_, double p_70091_2_, double p_70091_4_, double p_70091_6_) { super.func_70091_d(p_70091_1_, p_70091_2_, p_70091_4_, p_70091_6_); -@@ -516,9 +476,8 @@ +@@ -516,24 +476,23 @@ protected Entity func_184551_a(Vec3d p_184551_1_, Vec3d p_184551_2_) { Entity entity = null; @@ -372,9 +425,10 @@ + List list = this.field_70170_p.func_175674_a(this, this.func_174813_aQ().func_72321_a(this.field_70159_w, this.field_70181_x, this.field_70179_y).func_186662_g(1.0D), field_184553_f); + double d0 = 0.0D; - for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) { -@@ -526,14 +485,14 @@ + Entity entity1 = list.get(i); if (entity1 != this.field_70250_c || this.field_70257_an >= 5) { diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityFireball.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityFireball.java.patch index cd427a8d5..08f03b493 100644 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityFireball.java.patch +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityFireball.java.patch @@ -74,8 +74,12 @@ { super.func_70071_h_(); -@@ -97,7 +93,7 @@ - ++this.field_70234_an; +@@ -94,47 +90,38 @@ + this.func_70015_d(1); + } + +- this.field_70234_an++; ++ ++this.field_70234_an; RayTraceResult raytraceresult = ProjectileHelper.func_188802_a(this, true, this.field_70234_an >= 25, this.field_70235_a); - if (raytraceresult != null) @@ -83,8 +87,20 @@ { this.func_70227_a(raytraceresult); } -@@ -113,16 +109,7 @@ - for (int i = 0; i < 4; ++i) + +- this.field_70165_t = this.field_70165_t + this.field_70159_w; +- this.field_70163_u = this.field_70163_u + this.field_70181_x; +- this.field_70161_v = this.field_70161_v + this.field_70179_y; ++ this.field_70165_t += this.field_70159_w; ++ this.field_70163_u += this.field_70181_x; ++ this.field_70161_v += this.field_70179_y; + ProjectileHelper.func_188803_a(this, 0.2F); + float f = this.func_82341_c(); + + if (this.func_70090_H()) + { +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { float f1 = 0.25F; - this.field_70170_p @@ -101,7 +117,14 @@ } f = 0.8F; -@@ -134,7 +121,7 @@ + } + +- this.field_70159_w = this.field_70159_w + this.field_70232_b; +- this.field_70181_x = this.field_70181_x + this.field_70233_c; +- this.field_70179_y = this.field_70179_y + this.field_70230_d; ++ this.field_70159_w += this.field_70232_b; ++ this.field_70181_x += this.field_70233_c; ++ this.field_70179_y += this.field_70230_d; this.field_70159_w *= (double)f; this.field_70181_x *= (double)f; this.field_70179_y *= (double)f; diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch index c41d4b0a2..9c679bdee 100644 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityFishHook.java.patch @@ -36,9 +36,9 @@ - float f6 = MathHelper.func_76133_a( - this.field_70159_w * this.field_70159_w + this.field_70181_x * this.field_70181_x + this.field_70179_y * this.field_70179_y - ); -- this.field_70159_w *= 0.6 / (double)f6 + 0.5 + this.field_70146_Z.nextGaussian() * 0.0045; -- this.field_70181_x *= 0.6 / (double)f6 + 0.5 + this.field_70146_Z.nextGaussian() * 0.0045; -- this.field_70179_y *= 0.6 / (double)f6 + 0.5 + this.field_70146_Z.nextGaussian() * 0.0045; +- this.field_70159_w = this.field_70159_w * (0.6 / (double)f6 + 0.5 + this.field_70146_Z.nextGaussian() * 0.0045); +- this.field_70181_x = this.field_70181_x * (0.6 / (double)f6 + 0.5 + this.field_70146_Z.nextGaussian() * 0.0045); +- this.field_70179_y = this.field_70179_y * (0.6 / (double)f6 + 0.5 + this.field_70146_Z.nextGaussian() * 0.0045); + float f6 = MathHelper.func_76133_a(this.field_70159_w * this.field_70159_w + this.field_70181_x * this.field_70181_x + this.field_70179_y * this.field_70179_y); + this.field_70159_w *= 0.6D / (double)f6 + 0.5D + this.field_70146_Z.nextGaussian() * 0.0045D; + this.field_70181_x *= 0.6D / (double)f6 + 0.5D + this.field_70146_Z.nextGaussian() * 0.0045D; @@ -95,6 +95,15 @@ public void func_70071_h_() { super.func_70071_h_(); +@@ -162,7 +151,7 @@ + { + if (this.field_146051_au) + { +- this.field_146049_av++; ++ ++this.field_146049_av; + + if (this.field_146049_av >= 1200) + { @@ -184,18 +173,18 @@ { if (this.field_146043_c != null) @@ -120,7 +129,13 @@ this.field_190627_av = EntityFishHook.State.BOBBING; return; } -@@ -212,9 +201,9 @@ +@@ -207,14 +196,14 @@ + + if (!this.field_146051_au && !this.field_70122_E && !this.field_70123_F) + { +- this.field_146047_aw++; ++ ++this.field_146047_aw; + } else { this.field_146047_aw = 0; @@ -159,7 +174,7 @@ + d0 += Math.signum(d0) * 0.1D; } -- this.field_70181_x -= d0 * (double)this.field_70146_Z.nextFloat() * 0.2; +- this.field_70181_x = this.field_70181_x - d0 * (double)this.field_70146_Z.nextFloat() * 0.2; + this.field_70181_x -= d0 * (double)this.field_70146_Z.nextFloat() * 0.2D; if (!this.field_70170_p.field_72995_K && f > 0.0F) @@ -251,11 +266,32 @@ } private void func_190621_a(BlockPos p_190621_1_) +@@ -394,17 +381,17 @@ + + if (this.field_70146_Z.nextFloat() < 0.25F && this.field_70170_p.func_175727_C(blockpos)) + { +- i++; ++ ++i; + } + + if (this.field_70146_Z.nextFloat() < 0.5F && !this.field_70170_p.func_175678_i(blockpos)) + { +- i--; ++ --i; + } + + if (this.field_146045_ax > 0) + { +- this.field_146045_ax--; ++ --this.field_146045_ax; + + if (this.field_146045_ax <= 0) + { @@ -413,7 +400,7 @@ } else { -- this.field_70181_x -= 0.2 * (double)this.field_70146_Z.nextFloat() * (double)this.field_70146_Z.nextFloat(); +- this.field_70181_x = this.field_70181_x - 0.2 * (double)this.field_70146_Z.nextFloat() * (double)this.field_70146_Z.nextFloat(); + this.field_70181_x -= 0.2D * (double)this.field_70146_Z.nextFloat() * (double)this.field_70146_Z.nextFloat(); } } @@ -363,6 +399,15 @@ } } +@@ -516,7 +483,7 @@ + else + { + this.field_146040_ay = MathHelper.func_76136_a(this.field_70146_Z, 100, 600); +- this.field_146040_ay = this.field_146040_ay - this.field_191519_ax * 20 * 5; ++ this.field_146040_ay -= this.field_191519_ax * 20 * 5; + } + } + @@ -525,12 +492,10 @@ return p_189739_1_.func_70067_L() || p_189739_1_ instanceof EntityItem; } diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityLlamaSpit.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityLlamaSpit.java.patch index a8c967756..2966976d7 100644 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityLlamaSpit.java.patch +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityLlamaSpit.java.patch @@ -24,7 +24,8 @@ super(p_i47274_1_); this.func_70107_b(p_i47274_2_, p_i47274_4_, p_i47274_6_); - for (int i = 0; i < 7; ++i) +- for (int i = 0; i < 7; i++) ++ for (int i = 0; i < 7; ++i) { - double d0 = 0.4 + 0.1 * (double)i; + double d0 = 0.4D + 0.1D * (double)i; @@ -39,7 +40,7 @@ public void func_70071_h_() { super.func_70071_h_(); -@@ -89,7 +80,7 @@ +@@ -89,21 +80,20 @@ raytraceresult = new RayTraceResult(entity); } @@ -48,9 +49,13 @@ { this.func_190536_a(raytraceresult); } -@@ -98,12 +89,11 @@ - this.field_70163_u += this.field_70181_x; - this.field_70161_v += this.field_70179_y; + +- this.field_70165_t = this.field_70165_t + this.field_70159_w; +- this.field_70163_u = this.field_70163_u + this.field_70181_x; +- this.field_70161_v = this.field_70161_v + this.field_70179_y; ++ this.field_70165_t += this.field_70159_w; ++ this.field_70163_u += this.field_70181_x; ++ this.field_70161_v += this.field_70179_y; float f = MathHelper.func_76133_a(this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y); - this.field_70177_z = (float)(MathHelper.func_181159_b(this.field_70159_w, this.field_70179_y) * 180.0F / (float)Math.PI); - this.field_70125_A = (float)(MathHelper.func_181159_b(this.field_70181_x, (double)f) * 180.0F / (float)Math.PI); diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityShulkerBullet.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityShulkerBullet.java.patch index 39e35742b..7594e1366 100644 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityShulkerBullet.java.patch +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityShulkerBullet.java.patch @@ -90,6 +90,15 @@ if (p_184569_1_ != EnumFacing.Axis.X) { +@@ -219,7 +213,7 @@ + + if (list.isEmpty()) + { +- for (int i = 5; !this.field_70170_p.func_175623_d(blockpos1.func_177972_a(enumfacing)) && i > 0; i--) ++ for (int i = 5; !this.field_70170_p.func_175623_d(blockpos1.func_177972_a(enumfacing)) && i > 0; --i) + { + enumfacing = EnumFacing.func_176741_a(this.field_70146_Z); + } @@ -240,24 +234,23 @@ double d4 = d3 - this.field_70161_v; double d5 = (double)MathHelper.func_76133_a(d6 * d6 + d7 * d7 + d4 * d4); @@ -166,9 +175,9 @@ - this.field_184577_e = MathHelper.func_151237_a(this.field_184577_e * 1.025, -1.0, 1.0); - this.field_184578_f = MathHelper.func_151237_a(this.field_184578_f * 1.025, -1.0, 1.0); - this.field_184579_g = MathHelper.func_151237_a(this.field_184579_g * 1.025, -1.0, 1.0); -- this.field_70159_w += (this.field_184577_e - this.field_70159_w) * 0.2; -- this.field_70181_x += (this.field_184578_f - this.field_70181_x) * 0.2; -- this.field_70179_y += (this.field_184579_g - this.field_70179_y) * 0.2; +- this.field_70159_w = this.field_70159_w + (this.field_184577_e - this.field_70159_w) * 0.2; +- this.field_70181_x = this.field_70181_x + (this.field_184578_f - this.field_70181_x) * 0.2; +- this.field_70179_y = this.field_70179_y + (this.field_184579_g - this.field_70179_y) * 0.2; + this.field_184577_e = MathHelper.func_151237_a(this.field_184577_e * 1.025D, -1.0D, 1.0D); + this.field_184578_f = MathHelper.func_151237_a(this.field_184578_f * 1.025D, -1.0D, 1.0D); + this.field_184579_g = MathHelper.func_151237_a(this.field_184579_g * 1.025D, -1.0D, 1.0D); @@ -184,7 +193,7 @@ { this.func_184567_a(raytraceresult); } -@@ -336,16 +321,7 @@ +@@ -336,22 +321,13 @@ if (this.field_70170_p.field_72995_K) { @@ -202,6 +211,13 @@ } else if (this.field_184571_b != null && !this.field_184571_b.field_70128_L) { + if (this.field_184575_d > 0) + { +- this.field_184575_d--; ++ --this.field_184575_d; + + if (this.field_184575_d == 0) + { @@ -372,9 +348,7 @@ { BlockPos blockpos1 = new BlockPos(this.field_184571_b); diff --git a/patches/minecraft/net/minecraft/entity/projectile/EntityThrowable.java.patch b/patches/minecraft/net/minecraft/entity/projectile/EntityThrowable.java.patch index bb283e1c1..9940f0ca4 100644 --- a/patches/minecraft/net/minecraft/entity/projectile/EntityThrowable.java.patch +++ b/patches/minecraft/net/minecraft/entity/projectile/EntityThrowable.java.patch @@ -23,7 +23,7 @@ this.func_70105_a(0.25F, 0.25F); } -@@ -52,35 +55,33 @@ +@@ -52,71 +55,67 @@ public EntityThrowable(World p_i1777_1_, EntityLivingBase p_i1777_2_) { @@ -64,9 +64,15 @@ + float f1 = -MathHelper.func_76126_a((p_184538_2_ + p_184538_4_) * 0.017453292F); + float f2 = MathHelper.func_76134_b(p_184538_3_ * 0.017453292F) * MathHelper.func_76134_b(p_184538_2_ * 0.017453292F); this.func_70186_c((double)f, (double)f1, (double)f2, p_184538_5_, p_184538_6_); - this.field_70159_w += p_184538_1_.field_70159_w; - this.field_70179_y += p_184538_1_.field_70179_y; -@@ -91,32 +92,30 @@ +- this.field_70159_w = this.field_70159_w + p_184538_1_.field_70159_w; +- this.field_70179_y = this.field_70179_y + p_184538_1_.field_70179_y; ++ this.field_70159_w += p_184538_1_.field_70159_w; ++ this.field_70179_y += p_184538_1_.field_70179_y; + + if (!p_184538_1_.field_70122_E) + { +- this.field_70181_x = this.field_70181_x + p_184538_1_.field_70181_x; ++ this.field_70181_x += p_184538_1_.field_70181_x; } } @@ -127,7 +133,13 @@ public void func_70071_h_() { this.field_70142_S = this.field_70165_t; -@@ -148,8 +146,7 @@ +@@ -143,15 +141,14 @@ + + if (this.field_70191_b > 0) + { +- this.field_70191_b--; ++ --this.field_70191_b; + } if (this.field_174854_a) { @@ -135,9 +147,32 @@ - == this.field_174853_f) + if (this.field_70170_p.func_180495_p(new BlockPos(this.field_145788_c, this.field_145786_d, this.field_145787_e)).func_177230_c() == this.field_174853_f) { - ++this.field_70194_h; +- this.field_70194_h++; ++ ++this.field_70194_h; + + if (this.field_70194_h == 1200) + { +@@ -162,15 +159,15 @@ + } + + this.field_174854_a = false; +- this.field_70159_w = this.field_70159_w * (double)(this.field_70146_Z.nextFloat() * 0.2F); +- this.field_70181_x = this.field_70181_x * (double)(this.field_70146_Z.nextFloat() * 0.2F); +- this.field_70179_y = this.field_70179_y * (double)(this.field_70146_Z.nextFloat() * 0.2F); ++ this.field_70159_w *= (double)(this.field_70146_Z.nextFloat() * 0.2F); ++ this.field_70181_x *= (double)(this.field_70146_Z.nextFloat() * 0.2F); ++ this.field_70179_y *= (double)(this.field_70146_Z.nextFloat() * 0.2F); + this.field_70194_h = 0; + this.field_70195_i = 0; + } + else + { +- this.field_70195_i++; ++ ++this.field_70195_i; + } -@@ -185,9 +182,8 @@ + Vec3d vec3d = new Vec3d(this.field_70165_t, this.field_70163_u, this.field_70161_v); +@@ -185,12 +182,11 @@ } Entity entity = null; @@ -148,7 +183,11 @@ + double d0 = 0.0D; boolean flag = false; - for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + Entity entity1 = list.get(i); + @@ -208,14 +204,14 @@ else { @@ -166,7 +205,7 @@ { entity = entity1; d0 = d1; -@@ -244,12 +240,11 @@ +@@ -244,27 +240,25 @@ if (raytraceresult != null) { @@ -181,9 +220,14 @@ { this.func_70184_a(raytraceresult); } -@@ -259,12 +254,11 @@ - this.field_70163_u += this.field_70181_x; - this.field_70161_v += this.field_70179_y; + } + +- this.field_70165_t = this.field_70165_t + this.field_70159_w; +- this.field_70163_u = this.field_70163_u + this.field_70181_x; +- this.field_70161_v = this.field_70161_v + this.field_70179_y; ++ this.field_70165_t += this.field_70159_w; ++ this.field_70163_u += this.field_70181_x; ++ this.field_70161_v += this.field_70179_y; float f = MathHelper.func_76133_a(this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y); - this.field_70177_z = (float)(MathHelper.func_181159_b(this.field_70159_w, this.field_70179_y) * 180.0F / (float)Math.PI); - this.field_70125_A = (float)(MathHelper.func_181159_b(this.field_70181_x, (double)f) * 180.0F / (float)Math.PI); @@ -197,8 +241,12 @@ } while (this.field_70125_A - this.field_70127_C >= 180.0F) -@@ -292,16 +286,7 @@ - for (int j = 0; j < 4; ++j) +@@ -289,19 +283,10 @@ + + if (this.func_70090_H()) + { +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) { float f3 = 0.25F; - this.field_70170_p diff --git a/patches/minecraft/net/minecraft/inventory/Container.java.patch b/patches/minecraft/net/minecraft/inventory/Container.java.patch index 2308716ff..1cf0730a9 100644 --- a/patches/minecraft/net/minecraft/inventory/Container.java.patch +++ b/patches/minecraft/net/minecraft/inventory/Container.java.patch @@ -37,7 +37,8 @@ - NonNullList nonnulllist = NonNullList.func_191196_a(); + NonNullList nonnulllist = NonNullList.func_191196_a(); - for (int i = 0; i < this.field_75151_b.size(); ++i) +- for (int i = 0; i < this.field_75151_b.size(); i++) ++ for (int i = 0; i < this.field_75151_b.size(); ++i) { - nonnulllist.add(this.field_75151_b.get(i).func_75211_c()); + nonnulllist.add(((Slot)this.field_75151_b.get(i)).func_75211_c()); @@ -54,7 +55,8 @@ + public void func_75142_b() { - for (int i = 0; i < this.field_75151_b.size(); ++i) +- for (int i = 0; i < this.field_75151_b.size(); i++) ++ for (int i = 0; i < this.field_75151_b.size(); ++i) { - ItemStack itemstack = this.field_75151_b.get(i).func_75211_c(); + ItemStack itemstack = ((Slot)this.field_75151_b.get(i)).func_75211_c(); @@ -66,14 +68,24 @@ itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l(); this.field_75153_a.set(i, itemstack1); +- for (int j = 0; j < this.field_75149_d.size(); j++) + if (clientStackChanged) - for (int j = 0; j < this.field_75149_d.size(); ++j) ++ for (int j = 0; j < this.field_75149_d.size(); ++j) { - this.field_75149_d.get(j).func_71111_a(this, i, itemstack1); + ((IContainerListener)this.field_75149_d.get(j)).func_71111_a(this, i, itemstack1); } } } +@@ -100,7 +102,7 @@ + @Nullable + public Slot func_75147_a(IInventory p_75147_1_, int p_75147_2_) + { +- for (int i = 0; i < this.field_75151_b.size(); i++) ++ for (int i = 0; i < this.field_75151_b.size(); ++i) + { + Slot slot = this.field_75151_b.get(i); + @@ -161,11 +163,7 @@ Slot slot7 = this.field_75151_b.get(p_184996_1_); ItemStack itemstack12 = inventoryplayer.func_70445_o(); @@ -148,6 +160,50 @@ { Slot slot3 = this.field_75151_b.get(p_184996_1_); +@@ -459,7 +441,7 @@ + int i = p_184996_2_ == 0 ? 0 : this.field_75151_b.size() - 1; + int j = p_184996_2_ == 0 ? 1 : -1; + +- for (int k = 0; k < 2; k++) ++ for (int k = 0; k < 2; ++k) + { + for (int l = i; l >= 0 && l < this.field_75151_b.size() && itemstack1.func_190916_E() < itemstack1.func_77976_d(); l += j) + { +@@ -513,14 +495,14 @@ + { + if (!p_193327_1_.func_70089_S() || p_193327_1_ instanceof EntityPlayerMP && ((EntityPlayerMP)p_193327_1_).func_193105_t()) + { +- for (int j = 0; j < p_193327_3_.func_70302_i_(); j++) ++ for (int j = 0; j < p_193327_3_.func_70302_i_(); ++j) + { + p_193327_1_.func_71019_a(p_193327_3_.func_70304_b(j), false); + } + } + else + { +- for (int i = 0; i < p_193327_3_.func_70302_i_(); i++) ++ for (int i = 0; i < p_193327_3_.func_70302_i_(); ++i) + { + p_193327_1_.field_71071_by.func_191975_a(p_193327_2_, p_193327_3_.func_70304_b(i)); + } +@@ -540,7 +522,7 @@ + @SideOnly(Side.CLIENT) + public void func_190896_a(List p_190896_1_) + { +- for (int i = 0; i < p_190896_1_.size(); i++) ++ for (int i = 0; i < p_190896_1_.size(); ++i) + { + this.func_75139_a(i).func_75215_d(p_190896_1_.get(i)); + } +@@ -554,7 +536,7 @@ + @SideOnly(Side.CLIENT) + public short func_75136_a(InventoryPlayer p_75136_1_) + { +- this.field_75150_e++; ++ ++this.field_75150_e; + return this.field_75150_e; + } + @@ -589,29 +571,39 @@ if (p_75135_1_.func_77985_e()) @@ -197,6 +253,20 @@ slot.func_75218_e(); flag = true; } +@@ -619,11 +611,11 @@ + + if (p_75135_4_) + { +- i--; ++ --i; + } + else + { +- i++; ++ ++i; + } + } + } @@ -639,8 +631,20 @@ i = p_75135_2_; } @@ -219,7 +289,55 @@ Slot slot1 = this.field_75151_b.get(i); ItemStack itemstack1 = slot1.func_75211_c(); -@@ -737,7 +741,7 @@ +@@ -662,11 +666,11 @@ + + if (p_75135_4_) + { +- i--; ++ --i; + } + else + { +- i++; ++ ++i; + } + } + } +@@ -696,9 +700,13 @@ + { + return true; + } ++ else if (p_180610_0_ == 1) ++ { ++ return true; ++ } + else + { +- return p_180610_0_ == 1 ? true : p_180610_0_ == 2 && p_180610_1_.field_71075_bZ.field_75098_d; ++ return p_180610_0_ == 2 && p_180610_1_.field_71075_bZ.field_75098_d; + } + } + +@@ -711,9 +719,15 @@ + public static boolean func_94527_a(@Nullable Slot p_94527_0_, ItemStack p_94527_1_, boolean p_94527_2_) + { + boolean flag = p_94527_0_ == null || !p_94527_0_.func_75216_d(); +- return !flag && p_94527_1_.func_77969_a(p_94527_0_.func_75211_c()) && ItemStack.func_77970_a(p_94527_0_.func_75211_c(), p_94527_1_) +- ? p_94527_0_.func_75211_c().func_190916_E() + (p_94527_2_ ? 0 : p_94527_1_.func_190916_E()) <= p_94527_1_.func_77976_d() +- : flag; ++ ++ if (!flag && p_94527_1_.func_77969_a(p_94527_0_.func_75211_c()) && ItemStack.func_77970_a(p_94527_0_.func_75211_c(), p_94527_1_)) ++ { ++ return p_94527_0_.func_75211_c().func_190916_E() + (p_94527_2_ ? 0 : p_94527_1_.func_190916_E()) <= p_94527_1_.func_77976_d(); ++ } ++ else ++ { ++ return flag; ++ } + } + + public static void func_94525_a(Set p_94525_0_, int p_94525_1_, ItemStack p_94525_2_, int p_94525_3_) +@@ -727,7 +741,7 @@ p_94525_2_.func_190920_e(1); break; case 2: @@ -228,7 +346,20 @@ } p_94525_2_.func_190917_f(p_94525_3_); -@@ -775,7 +779,7 @@ +@@ -754,18 +768,18 @@ + int i = 0; + float f = 0.0F; + +- for (int j = 0; j < p_94526_0_.func_70302_i_(); j++) ++ for (int j = 0; j < p_94526_0_.func_70302_i_(); ++j) + { + ItemStack itemstack = p_94526_0_.func_70301_a(j); + + if (!itemstack.func_190926_b()) + { + f += (float)itemstack.func_190916_E() / (float)Math.min(p_94526_0_.func_70297_j_(), itemstack.func_77976_d()); +- i++; ++ ++i; } } @@ -237,7 +368,7 @@ return MathHelper.func_76141_d(f * 14.0F) + (i > 0 ? 1 : 0); } } -@@ -788,12 +792,7 @@ +@@ -778,12 +792,7 @@ ItemStack itemstack = ItemStack.field_190927_a; IRecipe irecipe = CraftingManager.func_192413_b(p_192389_3_, p_192389_1_); diff --git a/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch index 7a9009c4b..ed730425c 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerBeacon.java.patch @@ -1,6 +1,23 @@ --- before/net/minecraft/inventory/ContainerBeacon.java +++ after/net/minecraft/inventory/ContainerBeacon.java -@@ -34,7 +34,6 @@ +@@ -20,21 +20,20 @@ + int i = 36; + int j = 137; + +- for (int k = 0; k < 3; k++) ++ for (int k = 0; k < 3; ++k) + { +- for (int l = 0; l < 9; l++) ++ for (int l = 0; l < 9; ++l) + { + this.func_75146_a(new Slot(p_i45804_1_, l + k * 9 + 9, 36 + l * 18, 137 + k * 18)); + } + } + +- for (int i1 = 0; i1 < 9; i1++) ++ for (int i1 = 0; i1 < 9; ++i1) + { + this.func_75146_a(new Slot(p_i45804_1_, i1, 36 + i1 * 18, 195)); } } diff --git a/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch index 17f85582b..c28eb59d6 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerBrewingStand.java.patch @@ -1,6 +1,23 @@ --- before/net/minecraft/inventory/ContainerBrewingStand.java +++ after/net/minecraft/inventory/ContainerBrewingStand.java -@@ -43,14 +43,12 @@ +@@ -29,33 +29,31 @@ + this.field_75186_f = this.func_75146_a(new ContainerBrewingStand.Ingredient(p_i45802_2_, 3, 79, 17)); + this.func_75146_a(new ContainerBrewingStand.Fuel(p_i45802_2_, 4, 17, 17)); + +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) + { +- for (int j = 0; j < 9; j++) ++ for (int j = 0; j < 9; ++j) + { + this.func_75146_a(new Slot(p_i45802_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + this.func_75146_a(new Slot(p_i45802_1_, k, 8 + k * 18, 142)); } } @@ -15,6 +32,12 @@ public void func_75142_b() { super.func_75142_b(); + +- for (int i = 0; i < this.field_75149_d.size(); i++) ++ for (int i = 0; i < this.field_75149_d.size(); ++i) + { + IContainerListener icontainerlistener = this.field_75149_d.get(i); + @@ -75,19 +73,16 @@ } diff --git a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch index 25b48a306..01c15a0b9 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch @@ -67,7 +67,7 @@ public int func_75219_a() { return 1; -@@ -72,10 +73,12 @@ +@@ -72,22 +73,24 @@ }); this.func_75146_a(new Slot(this.field_75168_e, 1, 35, 47) { @@ -82,7 +82,22 @@ } }); -@@ -107,14 +110,12 @@ +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) + { +- for (int j = 0; j < 9; j++) ++ for (int j = 0; j < 9; ++j) + { + this.func_75146_a(new Slot(p_i45798_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + this.func_75146_a(new Slot(p_i45798_1_, k, 8 + k * 18, 142)); + } +@@ -107,19 +110,17 @@ p_185000_1_.func_71112_a(this, 9, this.field_185002_i[2]); } @@ -97,6 +112,12 @@ public void func_75142_b() { super.func_75142_b(); + +- for (int i = 0; i < this.field_75149_d.size(); i++) ++ for (int i = 0; i < this.field_75149_d.size(); ++i) + { + IContainerListener icontainerlistener = this.field_75149_d.get(i); + this.func_185000_c(icontainerlistener); @@ -127,7 +128,6 @@ } @@ -119,9 +140,11 @@ int l = 0; + float power = 0; - for (int j = -1; j <= 1; ++j) +- for (int j = -1; j <= 1; j++) ++ for (int j = -1; j <= 1; ++j) { - for (int k = -1; k <= 1; ++k) +- for (int k = -1; k <= 1; k++) ++ for (int k = -1; k <= 1; ++k) { - if ((j != 0 || k != 0) - && this.field_75172_h.func_175623_d(this.field_178150_j.func_177982_a(k, 0, j)) @@ -130,12 +153,12 @@ { - if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 0, j * 2)).func_177230_c() == Blocks.field_150342_X) - { -- ++l; +- l++; - } - - if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 1, j * 2)).func_177230_c() == Blocks.field_150342_X) - { -- ++l; +- l++; - } - + power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 0, j * 2)); @@ -144,22 +167,22 @@ { - if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 0, j)).func_177230_c() == Blocks.field_150342_X) - { -- ++l; +- l++; - } - - if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 1, j)).func_177230_c() == Blocks.field_150342_X) - { -- ++l; +- l++; - } - - if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k, 0, j * 2)).func_177230_c() == Blocks.field_150342_X) - { -- ++l; +- l++; - } - - if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k, 1, j * 2)).func_177230_c() == Blocks.field_150342_X) - { -- ++l; +- l++; - } + power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 0, j)); + power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 1, j)); @@ -168,23 +191,39 @@ } } } -@@ -213,7 +188,7 @@ +@@ -211,9 +186,9 @@ + + this.field_75169_l.setSeed((long)this.field_178149_f); - for (int i1 = 0; i1 < 3; ++i1) +- for (int i1 = 0; i1 < 3; i1++) ++ for (int i1 = 0; i1 < 3; ++i1) { - this.field_75167_g[i1] = EnchantmentHelper.func_77514_a(this.field_75169_l, i1, l, itemstack); + this.field_75167_g[i1] = EnchantmentHelper.func_77514_a(this.field_75169_l, i1, (int)power, itemstack); this.field_185001_h[i1] = -1; this.field_185002_i[i1] = -1; -@@ -221,6 +196,7 @@ +@@ -221,9 +196,10 @@ { this.field_75167_g[i1] = 0; } + this.field_75167_g[i1] = net.minecraftforge.event.ForgeEventFactory.onEnchantmentLevelSet(field_75172_h, field_178150_j, i1, (int)power, itemstack, field_75167_g[i1]); } - for (int j1 = 0; j1 < 3; ++j1) +- for (int j1 = 0; j1 < 3; j1++) ++ for (int j1 = 0; j1 < 3; ++j1) + { + if (this.field_75167_g[j1] > 0) + { +@@ -243,7 +219,7 @@ + } + else + { +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) + { + this.field_75167_g[i] = 0; + this.field_185001_h[i] = -1; @@ -253,7 +229,6 @@ } } @@ -204,6 +243,15 @@ { if (!this.field_75172_h.field_72995_K) { +@@ -283,7 +256,7 @@ + this.field_75168_e.func_70299_a(0, itemstack); + } + +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) + { + EnchantmentData enchantmentdata = list.get(j); + @@ -317,15 +290,7 @@ this.field_75168_e.func_70296_d(); this.field_178149_f = p_75140_1_.func_175138_ci(); @@ -229,35 +277,38 @@ public void func_75134_a(EntityPlayer p_75134_1_) { super.func_75134_a(p_75134_1_); -@@ -368,7 +332,6 @@ +@@ -368,22 +332,18 @@ } } - @Override public boolean func_75145_c(EntityPlayer p_75145_1_) { - if (this.field_75172_h.func_180495_p(this.field_178150_j).func_177230_c() != Blocks.field_150381_bn) -@@ -377,18 +340,10 @@ - } - else - { -- return !( -- p_75145_1_.func_70092_e( -- (double)this.field_178150_j.func_177958_n() + 0.5, -- (double)this.field_178150_j.func_177956_o() + 0.5, -- (double)this.field_178150_j.func_177952_p() + 0.5 -- ) -- > 64.0 -- ); +- return this.field_75172_h.func_180495_p(this.field_178150_j).func_177230_c() != Blocks.field_150381_bn +- ? false +- : !( +- p_75145_1_.func_70092_e( +- (double)this.field_178150_j.func_177958_n() + 0.5, +- (double)this.field_178150_j.func_177956_o() + 0.5, +- (double)this.field_178150_j.func_177952_p() + 0.5 +- ) +- > 64.0 +- ); ++ if (this.field_75172_h.func_180495_p(this.field_178150_j).func_177230_c() != Blocks.field_150381_bn) ++ { ++ return false; ++ } ++ else ++ { + return p_75145_1_.func_70092_e((double)this.field_178150_j.func_177958_n() + 0.5D, (double)this.field_178150_j.func_177956_o() + 0.5D, (double)this.field_178150_j.func_177952_p() + 0.5D) <= 64.0D; - } ++ } } - @Override public ItemStack func_82846_b(EntityPlayer p_82846_1_, int p_82846_2_) { ItemStack itemstack = ItemStack.field_190927_a; -@@ -422,19 +377,18 @@ +@@ -417,19 +377,18 @@ } else { diff --git a/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch index 14e2053bc..a63367b6c 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerPlayer.java.patch @@ -12,8 +12,22 @@ public InventoryCrafting field_75181_e = new InventoryCrafting(this, 2, 2); public InventoryCraftResult field_75179_f = new InventoryCraftResult(); public boolean field_75180_g; -@@ -38,36 +35,28 @@ - for (int k = 0; k < 4; ++k) +@@ -27,58 +24,50 @@ + this.field_82862_h = p_i1819_3_; + this.func_75146_a(new SlotCrafting(p_i1819_1_.field_70458_d, this.field_75181_e, this.field_75179_f, 0, 154, 28)); + +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { +- for (int j = 0; j < 2; j++) ++ for (int j = 0; j < 2; ++j) + { + this.func_75146_a(new Slot(this.field_75181_e, j + i * 2, 98 + j * 18, 18 + i * 18)); + } + } + +- for (int k = 0; k < 4; k++) ++ for (int k = 0; k < 4; ++k) { final EntityEquipmentSlot entityequipmentslot = field_185003_h[k]; - this.func_75146_a( @@ -52,7 +66,21 @@ + }); } - for (int l = 0; l < 3; ++l) +- for (int l = 0; l < 3; l++) ++ for (int l = 0; l < 3; ++l) + { +- for (int j1 = 0; j1 < 9; j1++) ++ for (int j1 = 0; j1 < 9; ++j1) + { + this.func_75146_a(new Slot(p_i1819_1_, j1 + (l + 1) * 9, 8 + j1 * 18, 84 + l * 18)); + } + } + +- for (int i1 = 0; i1 < 9; i1++) ++ for (int i1 = 0; i1 < 9; ++i1) + { + this.func_75146_a(new Slot(p_i1819_1_, i1, 8 + i1 * 18, 142)); + } @@ -87,7 +76,6 @@ { @Nullable diff --git a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch index 6633254b7..52fd26e7d 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch @@ -94,7 +94,7 @@ p_i45807_2_.func_175718_b(1030, p_i45807_3_, 0); } } -@@ -124,8 +119,7 @@ +@@ -124,24 +119,22 @@ return p_190901_2_; } @@ -102,9 +102,20 @@ - ); + }); - for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { -@@ -141,7 +135,6 @@ +- for (int j = 0; j < 9; j++) ++ for (int j = 0; j < 9; ++j) + { + this.func_75146_a(new Slot(p_i45807_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + this.func_75146_a(new Slot(p_i45807_1_, k, 8 + k * 18, 142)); } } @@ -129,6 +140,20 @@ if (itemstack1.func_77984_f() && itemstack1.func_77973_b().func_82789_a(itemstack, itemstack2)) { +@@ -190,11 +185,11 @@ + + int i3; + +- for (i3 = 0; l2 > 0 && i3 < itemstack2.func_190916_E(); i3++) ++ for (i3 = 0; l2 > 0 && i3 < itemstack2.func_190916_E(); ++i3) + { + int j3 = itemstack1.func_77952_i() - l2; + itemstack1.func_77964_b(j3); +- i++; ++ ++i; + l2 = Math.min(itemstack1.func_77952_i(), itemstack1.func_77958_k() / 4); + } + @@ -222,7 +217,7 @@ l1 = 0; } @@ -149,6 +174,15 @@ j2 = i2 == j2 ? j2 + 1 : Math.max(j2, i2); boolean flag1 = enchantment1.func_92089_a(itemstack); +@@ -252,7 +247,7 @@ + if (enchantment != enchantment1 && !enchantment1.func_191560_c(enchantment)) + { + flag1 = false; +- i++; ++ ++i; + } + } + @@ -269,7 +264,7 @@ j2 = enchantment1.func_77325_b(); } @@ -190,26 +224,29 @@ public void func_75134_a(EntityPlayer p_75134_1_) { super.func_75134_a(p_75134_1_); -@@ -395,7 +388,6 @@ +@@ -395,20 +388,18 @@ } } - @Override public boolean func_75145_c(EntityPlayer p_75145_1_) { - if (this.field_82860_h.func_180495_p(this.field_178156_j).func_177230_c() != Blocks.field_150467_bQ) -@@ -404,16 +396,10 @@ - } - else - { -- return p_75145_1_.func_70092_e( -- (double)this.field_178156_j.func_177958_n() + 0.5, -- (double)this.field_178156_j.func_177956_o() + 0.5, -- (double)this.field_178156_j.func_177952_p() + 0.5 -- ) -- <= 64.0; +- return this.field_82860_h.func_180495_p(this.field_178156_j).func_177230_c() != Blocks.field_150467_bQ +- ? false +- : p_75145_1_.func_70092_e( +- (double)this.field_178156_j.func_177958_n() + 0.5, +- (double)this.field_178156_j.func_177956_o() + 0.5, +- (double)this.field_178156_j.func_177952_p() + 0.5 +- ) +- <= 64.0; ++ if (this.field_82860_h.func_180495_p(this.field_178156_j).func_177230_c() != Blocks.field_150467_bQ) ++ { ++ return false; ++ } ++ else ++ { + return p_75145_1_.func_70092_e((double)this.field_178156_j.func_177958_n() + 0.5D, (double)this.field_178156_j.func_177956_o() + 0.5D, (double)this.field_178156_j.func_177952_p() + 0.5D) <= 64.0D; - } ++ } } - @Override diff --git a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch index 9179e8c97..257af475e 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/inventory/SlotCrafting.java +++ after/net/minecraft/inventory/SlotCrafting.java -@@ -20,13 +20,11 @@ +@@ -20,42 +20,38 @@ this.field_75239_a = p_i45790_2_; } @@ -14,7 +14,11 @@ public ItemStack func_75209_a(int p_75209_1_) { if (this.func_75216_d()) -@@ -37,25 +35,23 @@ + { +- this.field_75237_g = this.field_75237_g + Math.min(p_75209_1_, this.func_75211_c().func_190916_E()); ++ this.field_75237_g += Math.min(p_75209_1_, this.func_75211_c().func_190916_E()); + } + return super.func_75209_a(p_75209_1_); } @@ -41,7 +45,7 @@ } this.field_75237_g = 0; -@@ -65,15 +61,16 @@ +@@ -65,17 +61,18 @@ if (irecipe != null && !irecipe.func_192399_d()) { this.field_75238_b.func_192021_a(Lists.newArrayList(irecipe)); @@ -58,5 +62,8 @@ NonNullList nonnulllist = CraftingManager.func_180303_b(this.field_75239_a, p_190901_1_.field_70170_p); + net.minecraftforge.common.ForgeHooks.setCraftingPlayer(null); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { + ItemStack itemstack = this.field_75239_a.func_70301_a(i); + ItemStack itemstack1 = nonnulllist.get(i); diff --git a/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch b/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch index c8569575c..df732ff93 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/inventory/SlotFurnaceOutput.java +++ after/net/minecraft/inventory/SlotFurnaceOutput.java -@@ -17,13 +17,11 @@ +@@ -17,24 +17,21 @@ this.field_75229_a = p_i45793_1_; } @@ -14,7 +14,11 @@ public ItemStack func_75209_a(int p_75209_1_) { if (this.func_75216_d()) -@@ -34,7 +32,6 @@ + { +- this.field_75228_b = this.field_75228_b + Math.min(p_75209_1_, this.func_75211_c().func_190916_E()); ++ this.field_75228_b += Math.min(p_75209_1_, this.func_75211_c().func_190916_E()); + } + return super.func_75209_a(p_75209_1_); } @@ -37,6 +41,15 @@ protected void func_75208_c(ItemStack p_75208_1_) { p_75208_1_.func_77980_a(this.field_75229_a.field_70170_p, this.field_75229_a, this.field_75228_b); +@@ -69,7 +64,7 @@ + + if (j < MathHelper.func_76123_f((float)i * f) && Math.random() < (double)((float)i * f - (float)j)) + { +- j++; ++ ++j; + } + + i = j; @@ -79,20 +74,11 @@ { int k = EntityXPOrb.func_70527_a(i); diff --git a/patches/minecraft/net/minecraft/item/ItemBed.java.patch b/patches/minecraft/net/minecraft/item/ItemBed.java.patch index 7884dbb92..691b60cb4 100644 --- a/patches/minecraft/net/minecraft/item/ItemBed.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBed.java.patch @@ -60,7 +60,7 @@ TileEntity tileentity = p_180614_2_.func_175625_s(blockpos); if (tileentity instanceof TileEntityBed) -@@ -130,13 +106,11 @@ +@@ -130,18 +106,16 @@ } } @@ -74,3 +74,9 @@ public void func_150895_a(CreativeTabs p_150895_1_, NonNullList p_150895_2_) { if (this.func_194125_a(p_150895_1_)) + { +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) + { + p_150895_2_.add(new ItemStack(this, 1, i)); + } diff --git a/patches/minecraft/net/minecraft/item/ItemBow.java.patch b/patches/minecraft/net/minecraft/item/ItemBow.java.patch index 65aad610f..eca1b8d66 100644 --- a/patches/minecraft/net/minecraft/item/ItemBow.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBow.java.patch @@ -34,6 +34,15 @@ public float func_185085_a(ItemStack p_185085_1_, @Nullable World p_185085_2_, @Nullable EntityLivingBase p_185085_3_) { return p_185085_3_ != null && p_185085_3_.func_184587_cr() && p_185085_3_.func_184607_cu() == p_185085_1_ ? 1.0F : 0.0F; +@@ -70,7 +63,7 @@ + } + else + { +- for (int i = 0; i < p_185060_1_.field_71071_by.func_70302_i_(); i++) ++ for (int i = 0; i < p_185060_1_.field_71071_by.func_70302_i_(); ++i) + { + ItemStack itemstack = p_185060_1_.field_71071_by.func_70301_a(i); + @@ -89,7 +82,6 @@ return p_185058_1_.func_77973_b() instanceof ItemArrow; } diff --git a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch index 9cc39eccd..ba7bfdde9 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch @@ -108,7 +108,8 @@ - ); + p_180616_2_.func_184133_a(p_180616_1_, p_180616_3_, SoundEvents.field_187646_bt, SoundCategory.BLOCKS, 0.5F, 2.6F + (p_180616_2_.field_73012_v.nextFloat() - p_180616_2_.field_73012_v.nextFloat()) * 0.8F); - for (int k = 0; k < 8; ++k) +- for (int k = 0; k < 8; k++) ++ for (int k = 0; k < 8; ++k) { - p_180616_2_.func_175688_a( - EnumParticleTypes.SMOKE_LARGE, (double)l + Math.random(), (double)i + Math.random(), (double)j + Math.random(), 0.0, 0.0, 0.0 diff --git a/patches/minecraft/net/minecraft/item/ItemDye.java.patch b/patches/minecraft/net/minecraft/item/ItemDye.java.patch index 152f79e62..22608f63e 100644 --- a/patches/minecraft/net/minecraft/item/ItemDye.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemDye.java.patch @@ -76,10 +76,12 @@ if (iblockstate.func_177230_c() instanceof IGrowable) { IGrowable igrowable = (IGrowable)iblockstate.func_177230_c(); -@@ -153,23 +148,24 @@ +@@ -151,25 +146,26 @@ + + if (iblockstate.func_185904_a() != Material.field_151579_a) { - for (int i = 0; i < p_180617_2_; ++i) - { +- for (int i = 0; i < p_180617_2_; i++) +- { - double d0 = field_77697_d.nextGaussian() * 0.02; - double d1 = field_77697_d.nextGaussian() * 0.02; - double d2 = field_77697_d.nextGaussian() * 0.02; @@ -92,6 +94,8 @@ - d1, - d2 - ); ++ for (int i = 0; i < p_180617_2_; ++i) ++ { + double d0 = field_77697_d.nextGaussian() * 0.02D; + double d1 = field_77697_d.nextGaussian() * 0.02D; + double d2 = field_77697_d.nextGaussian() * 0.02D; @@ -114,7 +118,7 @@ public boolean func_111207_a(ItemStack p_111207_1_, EntityPlayer p_111207_2_, EntityLivingBase p_111207_3_, EnumHand p_111207_4_) { if (p_111207_3_ instanceof EntitySheep) -@@ -191,7 +187,6 @@ +@@ -191,12 +187,11 @@ } } @@ -122,3 +126,9 @@ public void func_150895_a(CreativeTabs p_150895_1_, NonNullList p_150895_2_) { if (this.func_194125_a(p_150895_1_)) + { +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) + { + p_150895_2_.add(new ItemStack(this, 1, i)); + } diff --git a/patches/minecraft/net/minecraft/item/ItemMap.java.patch b/patches/minecraft/net/minecraft/item/ItemMap.java.patch index 20e67e3d0..959d9a5f7 100644 --- a/patches/minecraft/net/minecraft/item/ItemMap.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemMap.java.patch @@ -27,15 +27,28 @@ { int i = 1 << p_77872_3_.field_76197_d; int j = p_77872_3_.field_76201_a; -@@ -103,7 +103,7 @@ +@@ -95,17 +95,17 @@ + } + + MapData.MapInfo mapdata$mapinfo = p_77872_3_.func_82568_a((EntityPlayer)p_77872_2_); +- mapdata$mapinfo.field_82569_d++; ++ ++mapdata$mapinfo.field_82569_d; + boolean flag = false; + +- for (int k1 = l - j1 + 1; k1 < l + j1; k1++) ++ for (int k1 = l - j1 + 1; k1 < l + j1; ++k1) + { if ((k1 & 15) == (mapdata$mapinfo.field_82569_d & 15) || flag) { flag = false; - double d0 = 0.0; + double d0 = 0.0D; - for (int l1 = i1 - j1 - 1; l1 < i1 + j1; ++l1) +- for (int l1 = i1 - j1 - 1; l1 < i1 + j1; l1++) ++ for (int l1 = i1 - j1 - 1; l1 < i1 + j1; ++l1) { + if (k1 >= 0 && l1 >= -1 && k1 < 128 && l1 < 128) + { @@ -114,7 +114,7 @@ boolean flag1 = i2 * i2 + j2 * j2 > (j1 - 2) * (j1 - 2); int k2 = (j / i + k1 - 64) * i; @@ -54,7 +67,7 @@ if (p_77872_1_.field_73011_w.func_177495_o()) { -@@ -131,26 +131,14 @@ +@@ -131,34 +131,22 @@ if ((l3 >> 20 & 1) == 0) { @@ -84,6 +97,16 @@ } else { + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int i4 = 0; i4 < i; i4++) ++ for (int i4 = 0; i4 < i; ++i4) + { +- for (int j4 = 0; j4 < i; j4++) ++ for (int j4 = 0; j4 < i; ++j4) + { + int k4 = chunk.func_76611_b(i4 + i3, j4 + j3) + 1; + IBlockState iblockstate = Blocks.field_150350_a.func_176223_P(); @@ -169,24 +157,35 @@ } else @@ -103,7 +126,7 @@ - do - { - iblockstate1 = chunk.func_186032_a(i4 + i3, l4--, j4 + j3); -- ++k3; +- k3++; - } - while (l4 > 0 && iblockstate1.func_185904_a().func_76224_d()); + label175: @@ -180,7 +203,7 @@ { i5 = 0; } -@@ -252,18 +251,18 @@ +@@ -252,22 +251,22 @@ public static void func_190905_a(World p_190905_0_, ItemStack p_190905_1_) { @@ -201,8 +224,65 @@ - Biome[] abiome = p_190905_0_.func_72959_q().func_76931_a(null, (j / i - 64) * i, (k / i - 64) * i, 128 * i, 128 * i, false); + Biome[] abiome = p_190905_0_.func_72959_q().func_76931_a((Biome[])null, (j / i - 64) * i, (k / i - 64) * i, 128 * i, 128 * i, false); - for (int l = 0; l < 128; ++l) +- for (int l = 0; l < 128; l++) ++ for (int l = 0; l < 128; ++l) { +- for (int i1 = 0; i1 < 128; i1++) ++ for (int i1 = 0; i1 < 128; ++i1) + { + int j1 = l * i; + int k1 = i1 * i; +@@ -280,42 +279,42 @@ + { + if (abiome[(l - 1) * i + (i1 - 1) * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[(l - 1) * i + (i1 + 1) * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[(l - 1) * i + i1 * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[(l + 1) * i + (i1 - 1) * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[(l + 1) * i + (i1 + 1) * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[(l + 1) * i + i1 * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[l * i + (i1 - 1) * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (abiome[l * i + (i1 + 1) * i * 128 * i].func_185355_j() >= 0.0F) + { +- i2--; ++ --i2; + } + + if (biome.func_185355_j() < 0.0F) @@ -379,7 +378,6 @@ } } diff --git a/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch b/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch index 05effa18c..06805cc86 100644 --- a/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemMonsterPlacer.java.patch @@ -139,6 +139,15 @@ } } } +@@ -249,7 +224,7 @@ + { + Entity entity = null; + +- for (int i = 0; i < 1; i++) ++ for (int i = 0; i < 1; ++i) + { + entity = EntityList.func_188429_b(p_77840_1_, p_77840_0_); + @@ -259,7 +234,8 @@ entity.func_70012_b(p_77840_2_, p_77840_4_, p_77840_6_, MathHelper.func_76142_g(p_77840_0_.field_73012_v.nextFloat() * 360.0F), 0.0F); entityliving.field_70759_as = entityliving.field_70177_z; diff --git a/patches/minecraft/net/minecraft/item/ItemSkull.java.patch b/patches/minecraft/net/minecraft/item/ItemSkull.java.patch index 823262b64..bc6cec7a4 100644 --- a/patches/minecraft/net/minecraft/item/ItemSkull.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSkull.java.patch @@ -47,7 +47,7 @@ { return EnumActionResult.FAIL; } -@@ -68,71 +64,73 @@ +@@ -68,89 +64,89 @@ ItemStack itemstack = p_180614_1_.func_184586_b(p_180614_4_); @@ -179,7 +179,12 @@ public void func_150895_a(CreativeTabs p_150895_1_, NonNullList p_150895_2_) { if (this.func_194125_a(p_150895_1_)) -@@ -144,13 +142,11 @@ + { +- for (int i = 0; i < field_82807_a.length; i++) ++ for (int i = 0; i < field_82807_a.length; ++i) + { + p_150895_2_.add(new ItemStack(this, 1, i)); + } } } diff --git a/patches/minecraft/net/minecraft/item/ItemSlab.java.patch b/patches/minecraft/net/minecraft/item/ItemSlab.java.patch index d865629cc..b5e56aa25 100644 --- a/patches/minecraft/net/minecraft/item/ItemSlab.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSlab.java.patch @@ -31,11 +31,13 @@ { ItemStack itemstack = p_180614_1_.func_184586_b(p_180614_4_); -@@ -67,30 +55,17 @@ +@@ -66,31 +54,18 @@ + if (iblockstate.func_177230_c() == this.field_150949_c) { IProperty iproperty = this.field_150949_c.func_176551_l(); - Comparable comparable1 = iblockstate.func_177229_b(iproperty); +- Comparable comparable1 = iblockstate.func_177229_b((IProperty)iproperty); - BlockSlab.EnumBlockHalf blockslab$enumblockhalf = iblockstate.func_177229_b(BlockSlab.field_176554_a); ++ Comparable comparable1 = iblockstate.func_177229_b(iproperty); + BlockSlab.EnumBlockHalf blockslab$enumblockhalf = (BlockSlab.EnumBlockHalf)iblockstate.func_177229_b(BlockSlab.field_176554_a); - if (( @@ -104,7 +106,15 @@ } private boolean func_180615_a(EntityPlayer p_180615_1_, ItemStack p_180615_2_, World p_180615_3_, BlockPos p_180615_4_, Object p_180615_5_) -@@ -151,19 +122,10 @@ +@@ -144,26 +115,17 @@ + + if (iblockstate.func_177230_c() == this.field_150949_c) + { +- Comparable comparable = iblockstate.func_177229_b((IProperty)this.field_150949_c.func_176551_l()); ++ Comparable comparable = iblockstate.func_177229_b(this.field_150949_c.func_176551_l()); + + if (comparable == p_180615_5_) + { IBlockState iblockstate1 = this.func_185055_a(this.field_150949_c.func_176551_l(), comparable); AxisAlignedBB axisalignedbb = iblockstate1.func_185890_d(p_180615_3_, p_180615_4_); diff --git a/patches/minecraft/net/minecraft/item/ItemStack.java.patch b/patches/minecraft/net/minecraft/item/ItemStack.java.patch index ce932f3f8..82f1b4375 100644 --- a/patches/minecraft/net/minecraft/item/ItemStack.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemStack.java.patch @@ -62,19 +62,14 @@ } public boolean func_190926_b() -@@ -135,17 +148,20 @@ +@@ -135,13 +148,20 @@ { return true; } - else if (this.field_151002_e == null || this.field_151002_e == Item.func_150898_a(Blocks.field_150350_a)) -- { -- return true; -- } -- else if (this.field_77994_a <= 0) -- { -- return true; + else if (this.getItemRaw() != null && this.getItemRaw() != Items.field_190931_a) -+ { + { +- return true; + if (this.field_77994_a <= 0) + { + return true; @@ -86,12 +81,12 @@ } else { -- return this.field_77991_e < -32768 || this.field_77991_e > 65535; +- return this.field_77994_a <= 0 ? true : this.field_77991_e < -32768 || this.field_77991_e > 65535; + return true; } } -@@ -166,22 +182,13 @@ +@@ -162,22 +182,13 @@ public Item func_77973_b() { @@ -118,7 +113,7 @@ if (enumactionresult == EnumActionResult.SUCCESS) { -@@ -191,6 +198,19 @@ +@@ -187,6 +198,19 @@ return enumactionresult; } @@ -138,7 +133,7 @@ public float func_150997_a(IBlockState p_150997_1_) { return this.func_77973_b().func_150893_a(this, p_150997_1_); -@@ -218,12 +238,18 @@ +@@ -214,12 +238,18 @@ p_77955_1_.func_74782_a("tag", this.field_77990_d); } @@ -158,16 +153,22 @@ } public boolean func_77985_e() -@@ -237,7 +263,7 @@ +@@ -233,9 +263,13 @@ { return false; } -- else if (this.field_151002_e.func_77612_l() <= 0) + else if (this.field_151002_e.getMaxDamage(this) <= 0) ++ { ++ return false; ++ } + else { - return false; +- return this.field_151002_e.func_77612_l() <= 0 ? false : !this.func_77942_o() || !this.func_77978_p().func_74767_n("Unbreakable"); ++ return !this.func_77942_o() || !this.func_77978_p().func_74767_n("Unbreakable"); } -@@ -254,32 +280,27 @@ + } + +@@ -246,32 +280,27 @@ public boolean func_77951_h() { @@ -205,7 +206,21 @@ } public boolean func_96631_a(int p_96631_1_, Random p_96631_2_, @Nullable EntityPlayerMP p_96631_3_) -@@ -316,8 +337,8 @@ +@@ -287,11 +316,11 @@ + int i = EnchantmentHelper.func_77506_a(Enchantments.field_185307_s, this); + int j = 0; + +- for (int k = 0; i > 0 && k < p_96631_1_; k++) ++ for (int k = 0; i > 0 && k < p_96631_1_; ++k) + { + if (EnchantmentDurability.func_92097_a(this, i, p_96631_2_)) + { +- j++; ++ ++j; + } + } + +@@ -308,8 +337,8 @@ CriteriaTriggers.field_193132_s.func_193158_a(p_96631_3_, this, this.field_77991_e + p_96631_1_); } @@ -216,7 +231,7 @@ } } -@@ -366,7 +387,7 @@ +@@ -358,7 +387,7 @@ public boolean func_150998_b(IBlockState p_150998_1_) { @@ -225,7 +240,7 @@ } public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_, EnumHand p_111282_3_) -@@ -374,17 +395,27 @@ +@@ -366,17 +395,27 @@ return this.func_77973_b().func_111207_a(this, p_111282_1_, p_111282_2_, p_111282_3_); } @@ -264,19 +279,14 @@ } public static boolean func_77970_a(ItemStack p_77970_0_, ItemStack p_77970_1_) -@@ -393,17 +424,20 @@ +@@ -385,15 +424,20 @@ { return true; } - else if (p_77970_0_.func_190926_b() || p_77970_1_.func_190926_b()) -- { -- return false; -- } -- else if (p_77970_0_.field_77990_d == null && p_77970_1_.field_77990_d != null) -- { -- return false; + else if (!p_77970_0_.func_190926_b() && !p_77970_1_.func_190926_b()) -+ { + { +- return false; + if (p_77970_0_.field_77990_d == null && p_77970_1_.field_77990_d != null) + { + return false; @@ -288,29 +298,122 @@ } else { -- return p_77970_0_.field_77990_d == null || p_77970_0_.field_77990_d.equals(p_77970_1_.field_77990_d); +- return p_77970_0_.field_77990_d == null && p_77970_1_.field_77990_d != null +- ? false +- : p_77970_0_.field_77990_d == null || p_77970_0_.field_77990_d.equals(p_77970_1_.field_77990_d); + return false; } } -@@ -439,7 +473,7 @@ +@@ -423,11 +467,13 @@ + { + return false; } ++ else if (this.field_77990_d == null && p_77959_1_.field_77990_d != null) ++ { ++ return false; ++ } else { -- return this.field_77990_d == null || this.field_77990_d.equals(p_77959_1_.field_77990_d); +- return this.field_77990_d == null && p_77959_1_.field_77990_d != null +- ? false +- : this.field_77990_d == null || this.field_77990_d.equals(p_77959_1_.field_77990_d); + return (this.field_77990_d == null || this.field_77990_d.equals(p_77959_1_.field_77990_d)) && this.areCapsCompatible(p_77959_1_); } } -@@ -815,6 +849,7 @@ - I18n.func_74838_a("attribute.name." + (String)entry.getKey()) +@@ -462,7 +508,14 @@ + + public boolean func_185136_b(ItemStack p_185136_1_) + { +- return !this.func_77984_f() ? this.func_77969_a(p_185136_1_) : !p_185136_1_.func_190926_b() && this.field_151002_e == p_185136_1_.field_151002_e; ++ if (!this.func_77984_f()) ++ { ++ return this.func_77969_a(p_185136_1_); ++ } ++ else ++ { ++ return !p_185136_1_.func_190926_b() && this.field_151002_e == p_185136_1_.field_151002_e; ++ } + } + + public String func_77977_a() +@@ -480,7 +533,7 @@ + { + if (this.field_77992_b > 0) + { +- this.field_77992_b--; ++ --this.field_77992_b; + } + + if (this.field_151002_e != null) +@@ -675,7 +728,7 @@ + { + NBTTagList nbttaglist = this.func_77986_q(); + +- for (int j = 0; j < nbttaglist.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist.func_74745_c(); ++j) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(j); + int k = nbttagcompound.func_74765_d("id"); +@@ -711,7 +764,7 @@ + + if (!nbttaglist3.func_82582_d()) + { +- for (int l1 = 0; l1 < nbttaglist3.func_74745_c(); l1++) ++ for (int l1 = 0; l1 < nbttaglist3.func_74745_c(); ++l1) + { + list.add(TextFormatting.DARK_PURPLE + "" + TextFormatting.ITALIC + nbttaglist3.func_150307_f(l1)); + } +@@ -768,7 +821,7 @@ + + I18n.func_74837_a( + "attribute.modifier.equals." + attributemodifier.func_111169_c(), + field_111284_a.format(d1), +- I18n.func_74838_a("attribute.name." + entry.getKey()) ++ I18n.func_74838_a("attribute.name." + (String)entry.getKey()) + ) + ); + } +@@ -780,7 +833,7 @@ + + I18n.func_74837_a( + "attribute.modifier.plus." + attributemodifier.func_111169_c(), + field_111284_a.format(d1), +- I18n.func_74838_a("attribute.name." + entry.getKey()) ++ I18n.func_74838_a("attribute.name." + (String)entry.getKey()) + ) + ); + } +@@ -793,9 +846,10 @@ + + I18n.func_74837_a( + "attribute.modifier.take." + attributemodifier.func_111169_c(), + field_111284_a.format(d1), +- I18n.func_74838_a("attribute.name." + entry.getKey()) ++ I18n.func_74838_a("attribute.name." + (String)entry.getKey()) ) ); + list.add(" " + I18n.func_74837_a("attribute.modifier.equals." + attributemodifier.func_111169_c(), field_111284_a.format(d1), I18n.func_74838_a("attribute.name." + (String)entry.getKey()))); } } } -@@ -890,6 +925,7 @@ +@@ -815,7 +869,7 @@ + list.add(""); + list.add(TextFormatting.GRAY + I18n.func_74838_a("item.canBreak")); + +- for (int j1 = 0; j1 < nbttaglist1.func_74745_c(); j1++) ++ for (int j1 = 0; j1 < nbttaglist1.func_74745_c(); ++j1) + { + Block block = Block.func_149684_b(nbttaglist1.func_150307_f(j1)); + +@@ -840,7 +894,7 @@ + list.add(""); + list.add(TextFormatting.GRAY + I18n.func_74838_a("item.canPlace")); + +- for (int k1 = 0; k1 < nbttaglist2.func_74745_c(); k1++) ++ for (int k1 = 0; k1 < nbttaglist2.func_74745_c(); ++k1) + { + Block block1 = Block.func_149684_b(nbttaglist2.func_150307_f(k1)); + +@@ -871,6 +925,7 @@ } } @@ -318,7 +421,7 @@ return list; } -@@ -899,6 +935,7 @@ +@@ -880,6 +935,7 @@ return this.func_77973_b().func_77636_d(this); } @@ -326,7 +429,48 @@ public EnumRarity func_77953_t() { return this.func_77973_b().func_77613_e(this); -@@ -1018,7 +1055,7 @@ +@@ -887,7 +943,14 @@ + + public boolean func_77956_u() + { +- return !this.func_77973_b().func_77616_k(this) ? false : !this.func_77948_v(); ++ if (!this.func_77973_b().func_77616_k(this)) ++ { ++ return false; ++ } ++ else ++ { ++ return !this.func_77948_v(); ++ } + } + + public void func_77966_a(Enchantment p_77966_1_, int p_77966_2_) +@@ -911,7 +974,14 @@ + + public boolean func_77948_v() + { +- return this.field_77990_d != null && this.field_77990_d.func_150297_b("ench", 9) ? !this.field_77990_d.func_150295_c("ench", 10).func_82582_d() : false; ++ if (this.field_77990_d != null && this.field_77990_d.func_150297_b("ench", 9)) ++ { ++ return !this.field_77990_d.func_150295_c("ench", 10).func_82582_d(); ++ } ++ else ++ { ++ return false; ++ } + } + + public void func_77983_a(String p_77983_1_, NBTBase p_77983_2_) +@@ -969,7 +1039,7 @@ + multimap = HashMultimap.create(); + NBTTagList nbttaglist = this.field_77990_d.func_150295_c("AttributeModifiers", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i); + AttributeModifier attributemodifier = SharedMonsterAttributes.func_111259_a(nbttagcompound); +@@ -985,7 +1055,7 @@ } else { @@ -335,7 +479,7 @@ } return multimap; -@@ -1063,7 +1100,7 @@ +@@ -1030,7 +1100,7 @@ { NBTTagCompound nbttagcompound = this.func_77955_b(new NBTTagCompound()); itextcomponent.func_150256_b().func_150209_a(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new TextComponentString(nbttagcompound.toString()))); @@ -344,7 +488,25 @@ } return itextcomponent; -@@ -1160,5 +1197,129 @@ +@@ -1050,7 +1120,7 @@ + { + NBTTagList nbttaglist = this.field_77990_d.func_150295_c("CanDestroy", 8); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + Block block = Block.func_149684_b(nbttaglist.func_150307_f(i)); + +@@ -1081,7 +1151,7 @@ + { + NBTTagList nbttaglist = this.field_77990_d.func_150295_c("CanPlaceOn", 8); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + Block block = Block.func_149684_b(nbttaglist.func_150307_f(i)); + +@@ -1127,5 +1197,129 @@ public void func_190918_g(int p_190918_1_) { this.func_190917_f(-p_190918_1_); diff --git a/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch b/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch index 3bc0365e1..945d1349c 100644 --- a/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch @@ -138,15 +138,18 @@ { if (field_193380_a.func_148741_d(p_193372_0_)) { -@@ -216,7 +229,7 @@ +@@ -216,9 +229,9 @@ } } - NonNullList nonnulllist = NonNullList.func_191197_a(p_180303_0_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_180303_0_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { + nonnulllist.set(i, p_180303_0_.func_70301_a(i)); + } @@ -232,11 +245,13 @@ return field_193380_a.func_82594_a(p_193373_0_); } diff --git a/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch b/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch index dd7277e1c..23751e10e 100644 --- a/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch @@ -90,6 +90,15 @@ public static Ingredient func_193367_a(Item p_193367_0_) { return func_193369_a(new ItemStack(p_193367_0_, 1, 32767)); +@@ -86,7 +119,7 @@ + { + ItemStack[] aitemstack = new ItemStack[p_193368_0_.length]; + +- for (int i = 0; i < p_193368_0_.length; i++) ++ for (int i = 0; i < p_193368_0_.length; ++i) + { + aitemstack[i] = new ItemStack(p_193368_0_[i]); + } @@ -108,5 +141,23 @@ } diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch index 9426de19d..6b3d35ac2 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeBookCloning.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/RecipeBookCloning.java +++ after/net/minecraft/item/crafting/RecipeBookCloning.java -@@ -6,12 +6,9 @@ +@@ -6,18 +6,15 @@ import net.minecraft.item.ItemWrittenBook; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -14,7 +14,23 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { int i = 0; -@@ -47,7 +44,6 @@ + ItemStack itemstack = ItemStack.field_190927_a; + +- for (int j = 0; j < p_77569_1_.func_70302_i_(); j++) ++ for (int j = 0; j < p_77569_1_.func_70302_i_(); ++j) + { + ItemStack itemstack1 = p_77569_1_.func_70301_a(j); + +@@ -39,7 +36,7 @@ + return false; + } + +- i++; ++ ++i; + } + } + } +@@ -47,13 +44,12 @@ return !itemstack.func_190926_b() && itemstack.func_77942_o() && i > 0; } @@ -22,7 +38,23 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { int i = 0; -@@ -99,16 +95,14 @@ + ItemStack itemstack = ItemStack.field_190927_a; + +- for (int j = 0; j < p_77572_1_.func_70302_i_(); j++) ++ for (int j = 0; j < p_77572_1_.func_70302_i_(); ++j) + { + ItemStack itemstack1 = p_77572_1_.func_70301_a(j); + +@@ -75,7 +71,7 @@ + return ItemStack.field_190927_a; + } + +- i++; ++ ++i; + } + } + } +@@ -99,18 +95,16 @@ } } @@ -38,8 +70,11 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { + ItemStack itemstack = p_179532_1_.func_70301_a(i); + @@ -126,14 +120,11 @@ return nonnulllist; } diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch index d9fc16974..19b29d60c 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch @@ -16,19 +16,74 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { this.field_92102_a = ItemStack.field_190927_a; -@@ -42,7 +39,7 @@ +@@ -28,7 +25,7 @@ + int i1 = 0; + int j1 = 0; + +- for (int k1 = 0; k1 < p_77569_1_.func_70302_i_(); k1++) ++ for (int k1 = 0; k1 < p_77569_1_.func_70302_i_(); ++k1) + { + ItemStack itemstack = p_77569_1_.func_70301_a(k1); + +@@ -36,39 +33,39 @@ + { + if (itemstack.func_77973_b() == Items.field_151016_H) { - ++l; +- j++; ++ ++j; + } + else if (itemstack.func_77973_b() == Items.field_151154_bQ) + { +- l++; ++ ++l; } - else if (itemstack.func_77973_b() == Items.field_151100_aR) + else if (net.minecraftforge.oredict.DyeUtils.isDye(itemstack)) { - ++k; +- k++; ++ ++k; } -@@ -82,140 +79,143 @@ - } - } + else if (itemstack.func_77973_b() == Items.field_151121_aF) + { +- i++; ++ ++i; + } + else if (itemstack.func_77973_b() == Items.field_151114_aO) + { +- i1++; ++ ++i1; + } + else if (itemstack.func_77973_b() == Items.field_151045_i) + { +- i1++; ++ ++i1; + } + else if (itemstack.func_77973_b() == Items.field_151059_bz) + { +- j1++; ++ ++j1; + } + else if (itemstack.func_77973_b() == Items.field_151008_G) + { +- j1++; ++ ++j1; + } + else if (itemstack.func_77973_b() == Items.field_151074_bl) + { +- j1++; ++ ++j1; + } + else + { +@@ -77,145 +74,148 @@ + return false; + } +- j1++; +- } +- } +- } +- - i1 += k + j1; - - if (j > 3 || i > 1) @@ -44,7 +99,7 @@ - { - NBTTagList nbttaglist = new NBTTagList(); - -- for (int k2 = 0; k2 < p_77569_1_.func_70302_i_(); ++k2) +- for (int k2 = 0; k2 < p_77569_1_.func_70302_i_(); k2++) - { - ItemStack itemstack3 = p_77569_1_.func_70301_a(k2); - @@ -71,7 +126,7 @@ - byte b0 = 0; - List list = Lists.newArrayList(); - -- for (int l1 = 0; l1 < p_77569_1_.func_70302_i_(); ++l1) +- for (int l1 = 0; l1 < p_77569_1_.func_70302_i_(); l1++) - { - ItemStack itemstack2 = p_77569_1_.func_70301_a(l1); - @@ -110,7 +165,7 @@ - - int[] aint1 = new int[list.size()]; - -- for (int l2 = 0; l2 < aint1.length; ++l2) +- for (int l2 = 0; l2 < aint1.length; l2++) - { - aint1[l2] = list.get(l2); - } @@ -125,7 +180,7 @@ - { - List list1 = Lists.newArrayList(); - -- for (int i2 = 0; i2 < p_77569_1_.func_70302_i_(); ++i2) +- for (int i2 = 0; i2 < p_77569_1_.func_70302_i_(); i2++) - { - ItemStack itemstack1 = p_77569_1_.func_70301_a(i2); - @@ -145,7 +200,7 @@ - - int[] aint = new int[list1.size()]; - -- for (int j2 = 0; j2 < aint.length; ++j2) +- for (int j2 = 0; j2 < aint.length; j2++) - { - aint[j2] = list1.get(j2); - } @@ -155,6 +210,11 @@ - NBTTagCompound nbttagcompound4 = this.field_92102_a.func_77978_p().func_74775_l("Explosion"); - - if (nbttagcompound4 == null) ++ ++j1; ++ } ++ } ++ } ++ + i1 = i1 + k + j1; + + if (j <= 3 && i <= 1) @@ -322,7 +382,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch index ad57ca8de..7853d25e4 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeRepairItem.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/RecipeRepairItem.java +++ after/net/minecraft/item/crafting/RecipeRepairItem.java -@@ -7,15 +7,12 @@ +@@ -7,17 +7,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -16,8 +16,11 @@ - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) +- for (int i = 0; i < p_77569_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) { + ItemStack itemstack = p_77569_1_.func_70301_a(i); + @@ -29,10 +26,7 @@ { ItemStack itemstack1 = list.get(0); @@ -30,7 +33,7 @@ { return false; } -@@ -43,10 +37,9 @@ +@@ -43,12 +37,11 @@ return list.size() == 2; } @@ -40,8 +43,11 @@ - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) +- for (int i = 0; i < p_77572_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) { + ItemStack itemstack = p_77572_1_.func_70301_a(i); + @@ -60,10 +53,7 @@ { ItemStack itemstack1 = list.get(0); @@ -93,7 +99,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch index c59b7babd..6d5524fe0 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeTippedArrow.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/RecipeTippedArrow.java +++ after/net/minecraft/item/crafting/RecipeTippedArrow.java -@@ -7,12 +7,9 @@ +@@ -7,19 +7,16 @@ import net.minecraft.potion.PotionUtils; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -14,6 +14,15 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { if (p_77569_1_.func_174922_i() == 3 && p_77569_1_.func_174923_h() == 3) + { +- for (int i = 0; i < p_77569_1_.func_174922_i(); i++) ++ for (int i = 0; i < p_77569_1_.func_174922_i(); ++i) + { +- for (int j = 0; j < p_77569_1_.func_174923_h(); j++) ++ for (int j = 0; j < p_77569_1_.func_174923_h(); ++j) + { + ItemStack itemstack = p_77569_1_.func_70463_b(i, j); + @@ -52,7 +49,6 @@ } } diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch index 323d37cb2..b5888c90d 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesArmorDyes.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/RecipesArmorDyes.java +++ after/net/minecraft/item/crafting/RecipesArmorDyes.java -@@ -9,16 +9,13 @@ +@@ -9,18 +9,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -17,8 +17,11 @@ - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) +- for (int i = 0; i < p_77569_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) { + ItemStack itemstack1 = p_77569_1_.func_70301_a(i); + @@ -39,7 +36,7 @@ } else @@ -36,7 +39,16 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { ItemStack itemstack = ItemStack.field_190927_a; -@@ -82,9 +78,9 @@ +@@ -61,7 +57,7 @@ + int j = 0; + ItemArmor itemarmor = null; + +- for (int k = 0; k < p_77572_1_.func_70302_i_(); k++) ++ for (int k = 0; k < p_77572_1_.func_70302_i_(); ++k) + { + ItemStack itemstack1 = p_77572_1_.func_70301_a(k); + +@@ -82,24 +78,24 @@ if (itemarmor.func_82816_b_(itemstack1)) { int l = itemarmor.func_82814_b(itemstack); @@ -49,7 +61,10 @@ i = (int)((float)i + Math.max(f, Math.max(f1, f2)) * 255.0F); aint[0] = (int)((float)aint[0] + f * 255.0F); aint[1] = (int)((float)aint[1] + f1 * 255.0F); -@@ -94,12 +90,12 @@ + aint[2] = (int)((float)aint[2] + f2 * 255.0F); +- j++; ++ ++j; + } } else { @@ -64,6 +79,15 @@ int l1 = (int)(afloat[0] * 255.0F); int i2 = (int)(afloat[1] * 255.0F); int j2 = (int)(afloat[2] * 255.0F); +@@ -107,7 +103,7 @@ + aint[0] += l1; + aint[1] += i2; + aint[2] += j2; +- j++; ++ ++j; + } + } + } @@ -133,38 +129,29 @@ } } @@ -80,7 +104,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch index 6815ef4d5..6e408fd5b 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesBanners.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/RecipesBanners.java +++ after/net/minecraft/item/crafting/RecipesBanners.java -@@ -12,14 +12,11 @@ +@@ -12,19 +12,16 @@ import net.minecraft.tileentity.TileEntityBanner; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -16,15 +16,43 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { boolean flag = false; -@@ -54,7 +51,6 @@ + +- for (int i = 0; i < p_77569_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) + { + ItemStack itemstack = p_77569_1_.func_70301_a(i); + +@@ -44,15 +41,21 @@ + } } + +- return !flag ? false : this.func_190933_c(p_77569_1_) != null; ++ if (!flag) ++ { ++ return false; ++ } ++ else ++ { ++ return this.func_190933_c(p_77569_1_) != null; ++ } } - @Override public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { ItemStack itemstack = ItemStack.field_190927_a; -@@ -81,9 +77,10 @@ + +- for (int i = 0; i < p_77572_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) + { + ItemStack itemstack1 = p_77572_1_.func_70301_a(i); + +@@ -70,13 +73,14 @@ + { + int k = 0; + +- for (int j = 0; j < p_77572_1_.func_70302_i_(); j++) ++ for (int j = 0; j < p_77572_1_.func_70302_i_(); ++j) { ItemStack itemstack2 = p_77572_1_.func_70301_a(j); @@ -37,7 +65,7 @@ break; } } -@@ -110,25 +107,19 @@ +@@ -103,25 +107,19 @@ return itemstack; } @@ -53,7 +81,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - @@ -65,7 +94,14 @@ } return nonnulllist; -@@ -154,7 +145,7 @@ +@@ -141,13 +139,13 @@ + boolean flag1 = false; + boolean flag2 = false; + +- for (int i = 0; i < p_190933_1_.func_70302_i_() && flag; i++) ++ for (int i = 0; i < p_190933_1_.func_70302_i_() && flag; ++i) + { + ItemStack itemstack = p_190933_1_.func_70301_a(i); if (!itemstack.func_190926_b() && itemstack.func_77973_b() != Items.field_179564_cE) { @@ -74,7 +110,16 @@ { if (flag2) { -@@ -194,7 +185,7 @@ +@@ -179,7 +177,7 @@ + { + int j = -1; + +- for (int k = 0; k < p_190933_1_.func_70302_i_() && flag; k++) ++ for (int k = 0; k < p_190933_1_.func_70302_i_() && flag; ++k) + { + int l = k / 3; + int i1 = k % 3; +@@ -187,7 +185,7 @@ if (!itemstack1.func_190926_b() && itemstack1.func_77973_b() != Items.field_179564_cE) { @@ -83,7 +128,7 @@ { flag = false; break; -@@ -236,23 +227,19 @@ +@@ -229,29 +227,25 @@ return null; } @@ -108,15 +153,26 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { ItemStack itemstack = ItemStack.field_190927_a; -@@ -319,7 +306,6 @@ + ItemStack itemstack1 = ItemStack.field_190927_a; + +- for (int i = 0; i < p_77569_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) + { + ItemStack itemstack2 = p_77569_1_.func_70301_a(i); + +@@ -312,10 +306,9 @@ return !itemstack.func_190926_b() && !itemstack1.func_190926_b(); } - @Override public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { - for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) -@@ -337,16 +323,14 @@ +- for (int i = 0; i < p_77572_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) + { + ItemStack itemstack = p_77572_1_.func_70301_a(i); + +@@ -330,26 +323,24 @@ return ItemStack.field_190927_a; } @@ -132,9 +188,10 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { -@@ -354,9 +338,9 @@ + ItemStack itemstack = p_179532_1_.func_70301_a(i); if (!itemstack.func_190926_b()) { @@ -146,7 +203,7 @@ } else if (itemstack.func_77942_o() && TileEntityBanner.func_175113_c(itemstack) > 0) { -@@ -370,14 +354,11 @@ +@@ -363,14 +354,11 @@ return nonnulllist; } diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch index b0cd835a2..84f9a8a41 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/RecipesMapCloning.java +++ after/net/minecraft/item/crafting/RecipesMapCloning.java -@@ -5,12 +5,9 @@ +@@ -5,18 +5,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -14,7 +14,23 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { int i = 0; -@@ -46,7 +43,6 @@ + ItemStack itemstack = ItemStack.field_190927_a; + +- for (int j = 0; j < p_77569_1_.func_70302_i_(); j++) ++ for (int j = 0; j < p_77569_1_.func_70302_i_(); ++j) + { + ItemStack itemstack1 = p_77569_1_.func_70301_a(j); + +@@ -38,7 +35,7 @@ + return false; + } + +- i++; ++ ++i; + } + } + } +@@ -46,13 +43,12 @@ return !itemstack.func_190926_b() && i > 0; } @@ -22,6 +38,22 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { int i = 0; + ItemStack itemstack = ItemStack.field_190927_a; + +- for (int j = 0; j < p_77572_1_.func_70302_i_(); j++) ++ for (int j = 0; j < p_77572_1_.func_70302_i_(); ++j) + { + ItemStack itemstack1 = p_77572_1_.func_70301_a(j); + +@@ -74,7 +70,7 @@ + return ItemStack.field_190927_a; + } + +- i++; ++ ++i; + } + } + } @@ -101,38 +97,29 @@ } } @@ -38,7 +70,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); - diff --git a/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch index 736a809df..e9ec27784 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShapedRecipes.java.patch @@ -35,7 +35,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -65,10 +66,10 @@ - @Override public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { -- for (int i = 0; i <= 3 - this.field_77576_b; ++i) +- for (int i = 0; i <= 3 - this.field_77576_b; i++) + for (int i = 0; i <= p_77569_1_.func_174922_i() - this.field_77576_b; ++i) { -- for (int j = 0; j <= 3 - this.field_77577_c; ++j) +- for (int j = 0; j <= 3 - this.field_77577_c; j++) + for (int j = 0; j <= p_77569_1_.func_174923_h() - this.field_77577_c; ++j) { if (this.func_77573_a(p_77569_1_, i, j, true)) @@ -77,10 +78,10 @@ private boolean func_77573_a(InventoryCrafting p_77573_1_, int p_77573_2_, int p_77573_3_, boolean p_77573_4_) { -- for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) + for (int i = 0; i < p_77573_1_.func_174922_i(); ++i) { -- for (int j = 0; j < 3; ++j) +- for (int j = 0; j < 3; j++) + for (int j = 0; j < p_77573_1_.func_174923_h(); ++j) { int k = i - p_77573_2_; @@ -93,7 +94,7 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { return this.func_77571_b().func_77946_l(); -@@ -167,7 +153,7 @@ +@@ -167,13 +153,13 @@ private static NonNullList func_192402_a(String[] p_192402_0_, Map p_192402_1_, int p_192402_2_, int p_192402_3_) { @@ -102,6 +103,45 @@ Set set = Sets.newHashSet(p_192402_1_.keySet()); set.remove(" "); +- for (int i = 0; i < p_192402_0_.length; i++) ++ for (int i = 0; i < p_192402_0_.length; ++i) + { +- for (int j = 0; j < p_192402_0_[i].length(); j++) ++ for (int j = 0; j < p_192402_0_[i].length(); ++j) + { + String s = p_192402_0_[i].substring(j, j + 1); + Ingredient ingredient = p_192402_1_.get(s); +@@ -206,7 +192,7 @@ + int k = 0; + int l = 0; + +- for (int i1 = 0; i1 < p_194134_0_.length; i1++) ++ for (int i1 = 0; i1 < p_194134_0_.length; ++i1) + { + String s = p_194134_0_[i1]; + i = Math.min(i, func_194135_a(s)); +@@ -217,10 +203,10 @@ + { + if (k == i1) + { +- k++; ++ ++k; + } + +- l++; ++ ++l; + } + else + { +@@ -236,7 +222,7 @@ + { + String[] astring = new String[p_194134_0_.length - l - k]; + +- for (int k1 = 0; k1 < astring.length; k1++) ++ for (int k1 = 0; k1 < astring.length; ++k1) + { + astring[k1] = p_194134_0_[k1 + k].substring(i, j + 1); + } @@ -247,11 +233,11 @@ private static int func_194135_a(String p_194135_0_) @@ -112,7 +152,7 @@ - while (i < p_194135_0_.length() && p_194135_0_.charAt(i) == ' ') + for (i = 0; i < p_194135_0_.length() && p_194135_0_.charAt(i) == ' '; ++i) { -- ++i; +- i++; + ; } @@ -127,12 +167,21 @@ - while (i >= 0 && p_194136_0_.charAt(i) == ' ') + for (i = p_194136_0_.length() - 1; i >= 0 && p_194136_0_.charAt(i) == ' '; --i) { -- --i; +- i--; + ; } return i; -@@ -306,11 +292,11 @@ +@@ -283,7 +269,7 @@ + } + else + { +- for (int i = 0; i < astring.length; i++) ++ for (int i = 0; i < astring.length; ++i) + { + String s = JsonUtils.func_151206_a(p_192407_0_.get(i), "pattern[" + i + "]"); + +@@ -306,13 +292,13 @@ private static Map func_192408_a(JsonObject p_192408_0_) { @@ -144,8 +193,11 @@ - if (entry.getKey().length() != 1) + if (((String)entry.getKey()).length() != 1) { - throw new JsonSyntaxException("Invalid key entry: '" + (String)entry.getKey() + "' is an invalid symbol (must be 1 character only)."); +- throw new JsonSyntaxException("Invalid key entry: '" + entry.getKey() + "' is an invalid symbol (must be 1 character only)."); ++ throw new JsonSyntaxException("Invalid key entry: '" + (String)entry.getKey() + "' is an invalid symbol (must be 1 character only)."); } + + if (" ".equals(entry.getKey())) @@ -329,38 +315,41 @@ public static Ingredient func_193361_a(@Nullable JsonElement p_193361_0_) @@ -206,7 +258,7 @@ - { - ItemStack[] aitemstack = new ItemStack[jsonarray.size()]; - -- for (int i = 0; i < jsonarray.size(); ++i) +- for (int i = 0; i < jsonarray.size(); i++) - { - aitemstack[i] = func_192405_a(JsonUtils.func_151210_l(jsonarray.get(i), "item"), false); - } diff --git a/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch index 769dc9fd1..e1b8470f6 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShapelessRecipes.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/ShapelessRecipes.java +++ after/net/minecraft/item/crafting/ShapelessRecipes.java -@@ -10,63 +10,59 @@ +@@ -10,96 +10,86 @@ import net.minecraft.util.JsonUtils; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -51,7 +51,8 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { ItemStack itemstack = p_179532_1_.func_70301_a(i); @@ -73,9 +74,13 @@ + net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper(); + List inputs = Lists.newArrayList(); - for (int i = 0; i < p_77569_1_.func_174923_h(); ++i) +- for (int i = 0; i < p_77569_1_.func_174923_h(); i++) ++ for (int i = 0; i < p_77569_1_.func_174923_h(); ++i) { -@@ -76,30 +72,24 @@ +- for (int j = 0; j < p_77569_1_.func_174922_i(); j++) ++ for (int j = 0; j < p_77569_1_.func_174922_i(); ++j) + { + ItemStack itemstack = p_77569_1_.func_70463_b(j, i); if (!itemstack.func_190926_b()) { @@ -118,15 +123,18 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { return this.field_77580_a.func_77946_l(); -@@ -127,7 +117,7 @@ +@@ -127,9 +117,9 @@ private static NonNullList func_193364_a(JsonArray p_193364_0_) { - NonNullList nonnulllist = NonNullList.func_191196_a(); + NonNullList nonnulllist = NonNullList.func_191196_a(); - for (int i = 0; i < p_193364_0_.size(); ++i) +- for (int i = 0; i < p_193364_0_.size(); i++) ++ for (int i = 0; i < p_193364_0_.size(); ++i) { + Ingredient ingredient = ShapedRecipes.func_193361_a(p_193364_0_.get(i)); + @@ -142,8 +132,6 @@ return nonnulllist; } diff --git a/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch index 41b041c5b..17720654c 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShieldRecipes.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/ShieldRecipes.java +++ after/net/minecraft/item/crafting/ShieldRecipes.java -@@ -6,14 +6,11 @@ +@@ -6,20 +6,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -16,7 +16,14 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { ItemStack itemstack = ItemStack.field_190927_a; -@@ -56,10 +53,16 @@ + ItemStack itemstack1 = ItemStack.field_190927_a; + +- for (int i = 0; i < p_77569_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77569_1_.func_70302_i_(); ++i) + { + ItemStack itemstack2 = p_77569_1_.func_70301_a(i); + +@@ -56,16 +53,22 @@ } } @@ -35,7 +42,14 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { ItemStack itemstack = ItemStack.field_190927_a; -@@ -96,16 +99,14 @@ + ItemStack itemstack1 = ItemStack.field_190927_a; + +- for (int i = 0; i < p_77572_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) + { + ItemStack itemstack2 = p_77572_1_.func_70301_a(i); + +@@ -96,18 +99,16 @@ } } @@ -51,8 +65,11 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { + ItemStack itemstack = p_179532_1_.func_70301_a(i); + @@ -120,14 +121,11 @@ return nonnulllist; } diff --git a/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch index 3f9b52910..ab442f744 100644 --- a/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/ShulkerBoxRecipes.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/item/crafting/ShulkerBoxRecipes.java +++ after/net/minecraft/item/crafting/ShulkerBoxRecipes.java -@@ -8,14 +8,11 @@ +@@ -8,20 +8,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.world.World; @@ -16,7 +16,19 @@ public boolean func_77569_a(InventoryCrafting p_77569_1_, World p_77569_2_) { int i = 0; -@@ -33,7 +30,7 @@ + int j = 0; + +- for (int k = 0; k < p_77569_1_.func_70302_i_(); k++) ++ for (int k = 0; k < p_77569_1_.func_70302_i_(); ++k) + { + ItemStack itemstack = p_77569_1_.func_70301_a(k); + +@@ -29,16 +26,16 @@ + { + if (Block.func_149634_a(itemstack.func_77973_b()) instanceof BlockShulkerBox) + { +- i++; ++ ++i; } else { @@ -25,7 +37,13 @@ { return false; } -@@ -51,7 +48,6 @@ + +- j++; ++ ++j; + } + + if (j > 1 || i > 1) +@@ -51,13 +48,12 @@ return i == 1 && j == 1; } @@ -33,6 +51,13 @@ public ItemStack func_77572_b(InventoryCrafting p_77572_1_) { ItemStack itemstack = ItemStack.field_190927_a; + ItemStack itemstack1 = ItemStack.field_190927_a; + +- for (int i = 0; i < p_77572_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_77572_1_.func_70302_i_(); ++i) + { + ItemStack itemstack2 = p_77572_1_.func_70301_a(i); + @@ -67,14 +63,14 @@ { itemstack = itemstack2; @@ -50,7 +75,7 @@ if (itemstack.func_77942_o()) { -@@ -84,16 +80,14 @@ +@@ -84,18 +80,16 @@ return itemstack3; } @@ -66,8 +91,11 @@ - NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); + NonNullList nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a); - for (int i = 0; i < nonnulllist.size(); ++i) +- for (int i = 0; i < nonnulllist.size(); i++) ++ for (int i = 0; i < nonnulllist.size(); ++i) { + ItemStack itemstack = p_179532_1_.func_70301_a(i); + @@ -108,14 +102,11 @@ return nonnulllist; } diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch index a5d295447..f5d775e15 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch @@ -35,7 +35,22 @@ this.field_74784_a.put(p_74782_1_, p_74782_2_); } -@@ -198,8 +196,9 @@ +@@ -179,9 +177,13 @@ + { + return true; + } ++ else if (p_150297_2_ != 99) ++ { ++ return false; ++ } + else + { +- return p_150297_2_ != 99 ? false : i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6; ++ return i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6; + } + } + +@@ -194,8 +196,9 @@ return ((NBTPrimitive)this.field_74784_a.get(p_74771_1_)).func_150290_f(); } } @@ -46,7 +61,7 @@ } return 0; -@@ -214,8 +213,9 @@ +@@ -210,8 +213,9 @@ return ((NBTPrimitive)this.field_74784_a.get(p_74765_1_)).func_150289_e(); } } @@ -57,7 +72,7 @@ } return 0; -@@ -230,8 +230,9 @@ +@@ -226,8 +230,9 @@ return ((NBTPrimitive)this.field_74784_a.get(p_74762_1_)).func_150287_d(); } } @@ -68,7 +83,7 @@ } return 0; -@@ -246,8 +247,9 @@ +@@ -242,8 +247,9 @@ return ((NBTPrimitive)this.field_74784_a.get(p_74763_1_)).func_150291_c(); } } @@ -79,7 +94,7 @@ } return 0L; -@@ -262,8 +264,9 @@ +@@ -258,8 +264,9 @@ return ((NBTPrimitive)this.field_74784_a.get(p_74760_1_)).func_150288_h(); } } @@ -90,7 +105,7 @@ } return 0.0F; -@@ -278,11 +281,12 @@ +@@ -274,11 +281,12 @@ return ((NBTPrimitive)this.field_74784_a.get(p_74769_1_)).func_150286_g(); } } @@ -105,7 +120,7 @@ } public String func_74779_i(String p_74779_1_) -@@ -291,11 +295,12 @@ +@@ -287,11 +295,12 @@ { if (this.func_150297_b(p_74779_1_, 8)) { @@ -120,7 +135,7 @@ } return ""; -@@ -386,7 +391,6 @@ +@@ -382,7 +391,6 @@ this.field_74784_a.remove(p_82580_1_); } @@ -128,7 +143,7 @@ public String toString() { StringBuilder stringbuilder = new StringBuilder("{"); -@@ -412,7 +416,6 @@ +@@ -408,7 +416,6 @@ return stringbuilder.append('}').toString(); } @@ -136,7 +151,7 @@ public boolean func_82582_d() { return this.field_74784_a.isEmpty(); -@@ -426,7 +429,7 @@ +@@ -422,7 +429,7 @@ { public String call() throws Exception { @@ -145,7 +160,7 @@ } }); crashreportcategory.func_189529_a("Tag type expected", new ICrashReportDetail() -@@ -446,19 +449,17 @@ +@@ -442,19 +449,17 @@ for (String s : this.field_74784_a.keySet()) { @@ -166,7 +181,7 @@ public int hashCode() { return super.hashCode() ^ this.field_74784_a.hashCode(); -@@ -477,6 +478,7 @@ +@@ -473,6 +478,7 @@ private static byte func_152447_a(DataInput p_152447_0_, NBTSizeTracker p_152447_1_) throws IOException { @@ -174,7 +189,7 @@ return p_152447_0_.readByte(); } -@@ -487,6 +489,7 @@ +@@ -483,6 +489,7 @@ static NBTBase func_152449_a(byte p_152449_0_, String p_152449_1_, DataInput p_152449_2_, int p_152449_3_, NBTSizeTracker p_152449_4_) throws IOException { @@ -182,7 +197,7 @@ NBTBase nbtbase = NBTBase.func_150284_a(p_152449_0_); try -@@ -499,7 +502,7 @@ +@@ -495,7 +502,7 @@ CrashReport crashreport = CrashReport.func_85055_a(ioexception, "Loading NBT data"); CrashReportCategory crashreportcategory = crashreport.func_85058_a("NBT Tag"); crashreportcategory.func_71507_a("Tag name", p_152449_1_); diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch index 93b56898f..dd08d05a5 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch @@ -16,7 +16,7 @@ void func_74734_a(DataOutput p_74734_1_) throws IOException { if (this.field_74747_a.isEmpty()) -@@ -24,7 +23,7 @@ +@@ -24,19 +23,18 @@ } else { @@ -25,9 +25,10 @@ } p_74734_1_.writeByte(this.field_74746_b); -@@ -32,11 +31,10 @@ + p_74734_1_.writeInt(this.field_74747_a.size()); - for (int i = 0; i < this.field_74747_a.size(); ++i) +- for (int i = 0; i < this.field_74747_a.size(); i++) ++ for (int i = 0; i < this.field_74747_a.size(); ++i) { - this.field_74747_a.get(i).func_74734_a(p_74734_1_); + ((NBTBase)this.field_74747_a.get(i)).func_74734_a(p_74734_1_); @@ -38,16 +39,19 @@ void func_152446_a(DataInput p_152446_1_, int p_152446_2_, NBTSizeTracker p_152446_3_) throws IOException { p_152446_3_.func_152450_a(296L); -@@ -57,7 +55,7 @@ +@@ -57,9 +55,9 @@ else { p_152446_3_.func_152450_a(32L * (long)i); - this.field_74747_a = Lists.newArrayListWithCapacity(i); + this.field_74747_a = Lists.newArrayListWithCapacity(i); - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { -@@ -69,13 +67,11 @@ + NBTBase nbtbase = NBTBase.func_150284_a(this.field_74746_b); + nbtbase.func_152446_a(p_152446_1_, p_152446_2_ + 1, p_152446_3_); +@@ -69,18 +67,16 @@ } } @@ -61,6 +65,12 @@ public String toString() { StringBuilder stringbuilder = new StringBuilder("["); + +- for (int i = 0; i < this.field_74747_a.size(); i++) ++ for (int i = 0; i < this.field_74747_a.size(); ++i) + { + if (i != 0) + { @@ -146,7 +142,6 @@ return this.field_74747_a.remove(p_74744_1_); } diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch index 7d16319b7..29d2188cf 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch @@ -57,3 +57,12 @@ public String func_150285_a_() { return this.field_74751_a; +@@ -87,7 +79,7 @@ + { + StringBuilder stringbuilder = new StringBuilder("\""); + +- for (int i = 0; i < p_193588_0_.length(); i++) ++ for (int i = 0; i < p_193588_0_.length(); ++i) + { + char c0 = p_193588_0_.charAt(i); + diff --git a/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch b/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch index 9ea2d2c80..887031f09 100644 --- a/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch +++ b/patches/minecraft/net/minecraft/network/NetHandlerPlayServer.java.patch @@ -9,7 +9,7 @@ private double field_184349_l; private double field_184350_m; private double field_184351_n; -@@ -167,13 +167,11 @@ +@@ -167,22 +167,20 @@ p_i1530_3_.field_71135_a = this; } @@ -20,11 +20,12 @@ this.field_147369_b.func_71127_g(); - this.field_147369_b - .func_70080_a(this.field_184349_l, this.field_184350_m, this.field_184351_n, this.field_147369_b.field_70177_z, this.field_147369_b.field_70125_A); +- this.field_147368_e++; + this.field_147369_b.func_70080_a(this.field_184349_l, this.field_184350_m, this.field_184351_n, this.field_147369_b.field_70177_z, this.field_147369_b.field_70125_A); - ++this.field_147368_e; ++ ++this.field_147368_e; this.field_184348_G = this.field_184347_F; -@@ -181,8 +179,8 @@ + if (this.field_184344_B) { if (++this.field_147365_f > 80) { @@ -55,8 +56,18 @@ } else { -@@ -255,11 +253,9 @@ - --this.field_147375_m; +@@ -247,19 +245,17 @@ + + if (this.field_147374_l > 0) + { +- this.field_147374_l--; ++ --this.field_147374_l; + } + + if (this.field_147375_m > 0) + { +- this.field_147375_m--; ++ --this.field_147375_m; } - if (this.field_147369_b.func_154331_x() > 0L @@ -93,25 +104,28 @@ public void func_147358_a(CPacketInput p_147358_1_) { PacketThreadUtil.func_180031_a(p_147358_1_, this, this.field_147369_b.func_71121_q()); -@@ -308,15 +301,9 @@ +@@ -308,34 +301,28 @@ private static boolean func_183006_b(CPacketPlayer p_183006_0_) { -- if (Doubles.isFinite(p_183006_0_.func_186997_a(0.0)) -- && Doubles.isFinite(p_183006_0_.func_186996_b(0.0)) -- && Doubles.isFinite(p_183006_0_.func_187000_c(0.0)) -- && Floats.isFinite(p_183006_0_.func_186998_b(0.0F)) -- && Floats.isFinite(p_183006_0_.func_186999_a(0.0F))) +- return Doubles.isFinite(p_183006_0_.func_186997_a(0.0)) +- && Doubles.isFinite(p_183006_0_.func_186996_b(0.0)) +- && Doubles.isFinite(p_183006_0_.func_187000_c(0.0)) +- && Floats.isFinite(p_183006_0_.func_186998_b(0.0F)) +- && Floats.isFinite(p_183006_0_.func_186999_a(0.0F)) +- ? Math.abs(p_183006_0_.func_186997_a(0.0)) > 3.0E7 +- || Math.abs(p_183006_0_.func_186996_b(0.0)) > 3.0E7 +- || Math.abs(p_183006_0_.func_187000_c(0.0)) > 3.0E7 +- : true; + if (Doubles.isFinite(p_183006_0_.func_186997_a(0.0D)) && Doubles.isFinite(p_183006_0_.func_186996_b(0.0D)) && Doubles.isFinite(p_183006_0_.func_187000_c(0.0D)) && Floats.isFinite(p_183006_0_.func_186998_b(0.0F)) && Floats.isFinite(p_183006_0_.func_186999_a(0.0F))) - { -- return Math.abs(p_183006_0_.func_186997_a(0.0)) > 3.0E7 -- || Math.abs(p_183006_0_.func_186996_b(0.0)) > 3.0E7 -- || Math.abs(p_183006_0_.func_187000_c(0.0)) > 3.0E7; ++ { + return Math.abs(p_183006_0_.func_186997_a(0.0D)) > 3.0E7D || Math.abs(p_183006_0_.func_186996_b(0.0D)) > 3.0E7D || Math.abs(p_183006_0_.func_187000_c(0.0D)) > 3.0E7D; - } - else - { -@@ -326,21 +313,16 @@ ++ } ++ else ++ { ++ return true; ++ } + } private static boolean func_184341_b(CPacketVehicleMove p_184341_0_) { @@ -135,7 +149,7 @@ } else { -@@ -363,52 +345,52 @@ +@@ -358,52 +345,52 @@ double d9 = entity.field_70159_w * entity.field_70159_w + entity.field_70181_x * entity.field_70181_x + entity.field_70179_y * entity.field_70179_y; double d10 = d6 * d6 + d7 * d7 + d8 * d8; @@ -202,7 +216,7 @@ this.field_184359_v = entity.field_70165_t; this.field_184360_w = entity.field_70163_u; this.field_184361_x = entity.field_70161_v; -@@ -416,21 +398,13 @@ +@@ -411,21 +398,13 @@ } } @@ -225,7 +239,7 @@ if (this.field_147369_b.func_184850_K()) { -@@ -444,7 +418,6 @@ +@@ -439,7 +418,6 @@ } } @@ -233,7 +247,7 @@ public void func_191984_a(CPacketRecipeInfo p_191984_1_) { PacketThreadUtil.func_180031_a(p_191984_1_, this, this.field_147369_b.func_71121_q()); -@@ -460,7 +433,6 @@ +@@ -455,7 +433,6 @@ } } @@ -241,7 +255,7 @@ public void func_194027_a(CPacketSeenAdvancements p_194027_1_) { PacketThreadUtil.func_180031_a(p_194027_1_, this, this.field_147369_b.func_71121_q()); -@@ -477,14 +449,13 @@ +@@ -472,14 +449,13 @@ } } @@ -257,7 +271,7 @@ } else { -@@ -502,13 +473,7 @@ +@@ -497,13 +473,7 @@ if (this.field_147368_e - this.field_184343_A > 20) { this.field_184343_A = this.field_147368_e; @@ -272,7 +286,7 @@ } } else -@@ -517,14 +482,7 @@ +@@ -512,14 +482,7 @@ if (this.field_147369_b.func_184218_aH()) { @@ -288,7 +302,7 @@ this.field_147367_d.func_184103_al().func_72358_d(this.field_147369_b); } else -@@ -541,22 +499,14 @@ +@@ -536,99 +499,76 @@ double d7 = d4 - this.field_184349_l; double d8 = d5 - this.field_184350_m; double d9 = d6 - this.field_184351_n; @@ -314,7 +328,10 @@ } } else -@@ -566,74 +516,59 @@ + { +- this.field_184347_F++; ++ ++this.field_184347_F; + int i = this.field_184347_F - this.field_184348_G; if (i > 5) { @@ -403,21 +420,25 @@ if (flag2 && (flag || !flag1)) { -@@ -642,11 +577,9 @@ +@@ -637,14 +577,9 @@ } } - this.field_184344_B = d8 >= -0.03125; +- this.field_184344_B = this.field_184344_B & (!this.field_147367_d.func_71231_X() && !this.field_147369_b.field_71075_bZ.field_75101_c); +- this.field_184344_B = this.field_184344_B +- & ( +- !this.field_147369_b.func_70644_a(MobEffects.field_188424_y) +- && !this.field_147369_b.func_184613_cA() +- && !worldserver.func_72829_c(this.field_147369_b.func_174813_aQ().func_186662_g(0.0625).func_72321_a(0.0, -0.55, 0.0)) +- ); + this.field_184344_B = d12 >= -0.03125D; - this.field_184344_B &= !this.field_147367_d.func_71231_X() && !this.field_147369_b.field_71075_bZ.field_75101_c; -- this.field_184344_B &= !this.field_147369_b.func_70644_a(MobEffects.field_188424_y) -- && !this.field_147369_b.func_184613_cA() -- && !worldserver.func_72829_c(this.field_147369_b.func_174813_aQ().func_186662_g(0.0625).func_72321_a(0.0, -0.55, 0.0)); ++ this.field_184344_B &= !this.field_147367_d.func_71231_X() && !this.field_147369_b.field_71075_bZ.field_75101_c; + this.field_184344_B &= !this.field_147369_b.func_70644_a(MobEffects.field_188424_y) && !this.field_147369_b.func_184613_cA() && !worldserver.func_72829_c(this.field_147369_b.func_174813_aQ().func_186662_g(0.0625D).func_72321_a(0.0D, -0.55D, 0.0D)); this.field_147369_b.field_70122_E = p_147347_1_.func_149465_i(); this.field_147367_d.func_184103_al().func_72358_d(this.field_147369_b); this.field_147369_b.func_71122_b(this.field_147369_b.field_70163_u - d3, p_147347_1_.func_149465_i()); -@@ -665,13 +598,11 @@ +@@ -663,13 +598,11 @@ this.func_175089_a(p_147364_1_, p_147364_3_, p_147364_5_, p_147364_7_, p_147364_8_, Collections.emptySet()); } @@ -435,7 +456,7 @@ this.field_184362_y = new Vec3d(p_175089_1_ + d0, p_175089_3_ + d1, p_175089_5_ + d2); float f = p_175089_7_; float f1 = p_175089_8_; -@@ -693,12 +624,9 @@ +@@ -691,12 +624,9 @@ this.field_184343_A = this.field_147368_e; this.field_147369_b.func_70080_a(this.field_184362_y.field_72450_a, this.field_184362_y.field_72448_b, this.field_184362_y.field_72449_c, f, f1); @@ -449,7 +470,7 @@ public void func_147345_a(CPacketPlayerDigging p_147345_1_) { PacketThreadUtil.func_180031_a(p_147345_1_, this, this.field_147369_b.func_71121_q()); -@@ -740,12 +668,15 @@ +@@ -738,12 +668,15 @@ case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: @@ -469,7 +490,7 @@ { return; } -@@ -791,7 +722,6 @@ +@@ -789,7 +722,6 @@ } } @@ -477,7 +498,7 @@ public void func_184337_a(CPacketPlayerTryUseItemOnBlock p_184337_1_) { PacketThreadUtil.func_180031_a(p_184337_1_, this, this.field_147369_b.func_71121_q()); -@@ -802,34 +732,18 @@ +@@ -800,34 +732,18 @@ EnumFacing enumfacing = p_184337_1_.func_187024_b(); this.field_147369_b.func_143004_u(); @@ -518,7 +539,7 @@ textcomponenttranslation.func_150256_b().func_150238_a(TextFormatting.RED); this.field_147369_b.field_71135_a.func_147359_a(new SPacketChat(textcomponenttranslation, ChatType.GAME_INFO)); } -@@ -838,7 +752,6 @@ +@@ -836,7 +752,6 @@ this.field_147369_b.field_71135_a.func_147359_a(new SPacketBlockChange(worldserver, blockpos.func_177972_a(enumfacing))); } @@ -526,7 +547,7 @@ public void func_147346_a(CPacketPlayerTryUseItem p_147346_1_) { PacketThreadUtil.func_180031_a(p_147346_1_, this, this.field_147369_b.func_71121_q()); -@@ -853,7 +766,6 @@ +@@ -851,7 +766,6 @@ } } @@ -534,7 +555,7 @@ public void func_175088_a(CPacketSpectate p_175088_1_) { PacketThreadUtil.func_180031_a(p_175088_1_, this, this.field_147369_b.func_71121_q()); -@@ -884,19 +796,13 @@ +@@ -882,19 +796,13 @@ { this.field_147369_b.func_70634_a(entity.field_70165_t, entity.field_70163_u, entity.field_70161_v); } @@ -557,7 +578,7 @@ this.field_147367_d.func_184103_al().func_187243_f(this.field_147369_b); worldserver1.func_72973_f(this.field_147369_b); this.field_147369_b.field_70128_L = false; -@@ -915,17 +821,16 @@ +@@ -913,17 +821,16 @@ this.field_147369_b.field_71134_c.func_73080_a(worldserver2); this.field_147367_d.func_184103_al().func_72354_b(this.field_147369_b, worldserver2); this.field_147367_d.func_184103_al().func_72385_f(this.field_147369_b); @@ -576,7 +597,7 @@ public void func_184340_a(CPacketSteerBoat p_184340_1_) { PacketThreadUtil.func_180031_a(p_184340_1_, this, this.field_147369_b.func_71121_q()); -@@ -937,12 +842,11 @@ +@@ -935,12 +842,11 @@ } } @@ -590,7 +611,7 @@ textcomponenttranslation.func_150256_b().func_150238_a(TextFormatting.YELLOW); this.field_147367_d.func_184103_al().func_148539_a(textcomponenttranslation); this.field_147369_b.func_71123_m(); -@@ -992,7 +896,6 @@ +@@ -990,7 +896,6 @@ } } @@ -598,7 +619,7 @@ public void func_147355_a(CPacketHeldItemChange p_147355_1_) { PacketThreadUtil.func_180031_a(p_147355_1_, this, this.field_147369_b.func_71121_q()); -@@ -1004,18 +907,17 @@ +@@ -1002,18 +907,17 @@ } else { @@ -619,7 +640,12 @@ textcomponenttranslation.func_150256_b().func_150238_a(TextFormatting.RED); this.func_147359_a(new SPacketChat(textcomponenttranslation)); } -@@ -1029,7 +931,7 @@ +@@ -1023,11 +927,11 @@ + String s = p_147354_1_.func_149439_c(); + s = StringUtils.normalizeSpace(s); + +- for (int i = 0; i < s.length(); i++) ++ for (int i = 0; i < s.length(); ++i) { if (!ChatAllowedCharacters.func_71566_a(s.charAt(i))) { @@ -628,7 +654,7 @@ return; } } -@@ -1040,7 +942,9 @@ +@@ -1038,7 +942,9 @@ } else { @@ -639,7 +665,7 @@ this.field_147367_d.func_184103_al().func_148544_a(itextcomponent, false); } -@@ -1048,7 +952,7 @@ +@@ -1046,7 +952,7 @@ if (this.field_147374_l > 200 && !this.field_147367_d.func_184103_al().func_152596_g(this.field_147369_b.func_146103_bH())) { @@ -648,7 +674,7 @@ } } } -@@ -1058,7 +962,6 @@ +@@ -1056,7 +962,6 @@ this.field_147367_d.func_71187_D().func_71556_a(this.field_147369_b, p_147361_1_); } @@ -656,7 +682,7 @@ public void func_175087_a(CPacketAnimation p_175087_1_) { PacketThreadUtil.func_180031_a(p_175087_1_, this, this.field_147369_b.func_71121_q()); -@@ -1066,7 +969,6 @@ +@@ -1064,7 +969,6 @@ this.field_147369_b.func_184609_a(p_175087_1_.func_187018_a()); } @@ -664,7 +690,7 @@ public void func_147357_a(CPacketEntityAction p_147357_1_) { PacketThreadUtil.func_180031_a(p_147357_1_, this, this.field_147369_b.func_71121_q()); -@@ -1128,10 +1030,7 @@ +@@ -1126,10 +1030,7 @@ break; case START_FALL_FLYING: @@ -676,7 +702,7 @@ { ItemStack itemstack = this.field_147369_b.func_184582_a(EntityEquipmentSlot.CHEST); -@@ -1151,7 +1050,6 @@ +@@ -1149,7 +1050,6 @@ } } @@ -684,7 +710,7 @@ public void func_147340_a(CPacketUseEntity p_147340_1_) { PacketThreadUtil.func_180031_a(p_147340_1_, this, this.field_147369_b.func_71121_q()); -@@ -1162,11 +1060,11 @@ +@@ -1160,11 +1060,11 @@ if (entity != null) { boolean flag = this.field_147369_b.func_70685_l(entity); @@ -698,7 +724,7 @@ } if (this.field_147369_b.func_70068_e(entity) < d0) -@@ -1179,13 +1077,14 @@ +@@ -1177,13 +1077,14 @@ else if (p_147340_1_.func_149565_c() == CPacketUseEntity.Action.INTERACT_AT) { EnumHand enumhand1 = p_147340_1_.func_186994_b(); @@ -714,7 +740,7 @@ this.field_147367_d.func_71236_h("Player " + this.field_147369_b.func_70005_c_() + " tried to attack an invalid entity"); return; } -@@ -1196,7 +1095,6 @@ +@@ -1194,7 +1095,6 @@ } } @@ -722,7 +748,7 @@ public void func_147342_a(CPacketClientStatus p_147342_1_) { PacketThreadUtil.func_180031_a(p_147342_1_, this, this.field_147369_b.func_71121_q()); -@@ -1220,7 +1118,7 @@ +@@ -1218,7 +1118,7 @@ return; } @@ -731,7 +757,7 @@ if (this.field_147367_d.func_71199_h()) { -@@ -1235,40 +1133,35 @@ +@@ -1233,40 +1133,35 @@ } } @@ -757,7 +783,8 @@ - NonNullList nonnulllist = NonNullList.func_191196_a(); + NonNullList nonnulllist = NonNullList.func_191196_a(); - for (int i = 0; i < this.field_147369_b.field_71070_bA.field_75151_b.size(); ++i) +- for (int i = 0; i < this.field_147369_b.field_71070_bA.field_75151_b.size(); i++) ++ for (int i = 0; i < this.field_147369_b.field_71070_bA.field_75151_b.size(); ++i) { - nonnulllist.add(this.field_147369_b.field_71070_bA.field_75151_b.get(i).func_75211_c()); + nonnulllist.add(((Slot)this.field_147369_b.field_71070_bA.field_75151_b.get(i)).func_75211_c()); @@ -777,7 +804,7 @@ { this.field_147369_b.field_71135_a.func_147359_a(new SPacketConfirmTransaction(p_147351_1_.func_149548_c(), p_147351_1_.func_149547_f(), true)); this.field_147369_b.field_71137_h = true; -@@ -1278,14 +1171,14 @@ +@@ -1276,14 +1171,14 @@ } else { @@ -788,14 +815,15 @@ - NonNullList nonnulllist1 = NonNullList.func_191196_a(); + NonNullList nonnulllist1 = NonNullList.func_191196_a(); - for (int j = 0; j < this.field_147369_b.field_71070_bA.field_75151_b.size(); ++j) +- for (int j = 0; j < this.field_147369_b.field_71070_bA.field_75151_b.size(); j++) ++ for (int j = 0; j < this.field_147369_b.field_71070_bA.field_75151_b.size(); ++j) { - ItemStack itemstack = this.field_147369_b.field_71070_bA.field_75151_b.get(j).func_75211_c(); + ItemStack itemstack = ((Slot)this.field_147369_b.field_71070_bA.field_75151_b.get(j)).func_75211_c(); ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack; nonnulllist1.add(itemstack1); } -@@ -1296,36 +1189,29 @@ +@@ -1294,36 +1189,29 @@ } } @@ -834,7 +862,7 @@ public void func_147344_a(CPacketCreativeInventoryAction p_147344_1_) { PacketThreadUtil.func_180031_a(p_147344_1_, this, this.field_147369_b.func_71121_q()); -@@ -1384,23 +1270,17 @@ +@@ -1382,23 +1270,17 @@ } } @@ -859,7 +887,16 @@ public void func_147343_a(CPacketUpdateSign p_147343_1_) { PacketThreadUtil.func_180031_a(p_147343_1_, this, this.field_147369_b.func_71121_q()); -@@ -1438,7 +1318,6 @@ +@@ -1426,7 +1308,7 @@ + + String[] astring = p_147343_1_.func_187017_b(); + +- for (int i = 0; i < astring.length; i++) ++ for (int i = 0; i < astring.length; ++i) + { + tileentitysign.field_145915_a[i] = new TextComponentString(TextFormatting.func_110646_a(astring[i])); + } +@@ -1436,7 +1318,6 @@ } } @@ -867,7 +904,7 @@ public void func_147353_a(CPacketKeepAlive p_147353_1_) { if (this.field_194403_g && p_147353_1_.func_149460_c() == this.field_194404_h) -@@ -1449,7 +1328,7 @@ +@@ -1447,7 +1328,7 @@ } else if (!this.field_147369_b.func_70005_c_().equals(this.field_147367_d.func_71214_G())) { @@ -876,7 +913,7 @@ } } -@@ -1458,36 +1337,31 @@ +@@ -1456,36 +1337,31 @@ return System.nanoTime() / 1000000L; } @@ -916,7 +953,16 @@ public void func_147349_a(CPacketCustomPayload p_147349_1_) { PacketThreadUtil.func_180031_a(p_147349_1_, this, this.field_147369_b.func_71121_q()); -@@ -1598,13 +1472,13 @@ +@@ -1558,7 +1434,7 @@ + itemstack2.func_77983_a("title", new NBTTagString(itemstack3.func_77978_p().func_74779_i("title"))); + NBTTagList nbttaglist = itemstack3.func_77978_p().func_150295_c("pages", 8); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + String s1 = nbttaglist.func_150307_f(i); + ITextComponent itextcomponent = new TextComponentString(s1); +@@ -1596,13 +1472,13 @@ { if (!this.field_147367_d.func_82356_Z()) { @@ -932,7 +978,7 @@ return; } -@@ -1617,9 +1491,7 @@ +@@ -1615,9 +1491,7 @@ if (l == 0) { @@ -943,7 +989,7 @@ if (tileentity instanceof TileEntityCommandBlock) { -@@ -1646,11 +1518,11 @@ +@@ -1644,11 +1518,11 @@ if (!flag2) { @@ -957,7 +1003,7 @@ } } catch (Exception exception4) -@@ -1662,13 +1534,13 @@ +@@ -1660,13 +1534,13 @@ { if (!this.field_147367_d.func_82356_Z()) { @@ -973,7 +1019,7 @@ return; } -@@ -1695,39 +1567,21 @@ +@@ -1693,39 +1567,21 @@ if (commandblockbaselogic != null) { @@ -1017,7 +1063,7 @@ } tileentity2.func_145829_t(); -@@ -1737,7 +1591,7 @@ +@@ -1735,7 +1591,7 @@ if (!flag3) { @@ -1026,7 +1072,7 @@ } tileentitycommandblock.func_184253_b(flag1); -@@ -1745,7 +1599,7 @@ +@@ -1743,7 +1599,7 @@ if (!net.minecraft.util.StringUtils.func_151246_b(s7)) { @@ -1035,7 +1081,7 @@ } } } -@@ -1848,37 +1702,37 @@ +@@ -1846,37 +1702,37 @@ { if (tileentitystructure.func_184419_m()) { @@ -1080,7 +1126,7 @@ } } -@@ -1899,15 +1753,7 @@ +@@ -1897,15 +1753,7 @@ { int j1 = packetbuffer6.func_150792_a(); this.field_147369_b.field_71071_by.func_184430_d(j1); diff --git a/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch b/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch index 86ed19c23..893eedb27 100644 --- a/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch +++ b/patches/minecraft/net/minecraft/network/PacketBuffer.java.patch @@ -1,5 +1,32 @@ --- before/net/minecraft/network/PacketBuffer.java +++ after/net/minecraft/network/PacketBuffer.java +@@ -42,7 +42,7 @@ + + public static int func_150790_a(int p_150790_0_) + { +- for (int i = 1; i < 5; i++) ++ for (int i = 1; i < 5; ++i) + { + if ((p_150790_0_ & -1 << i * 7) == 0) + { +@@ -110,7 +110,7 @@ + { + int[] aint = new int[i]; + +- for (int j = 0; j < aint.length; j++) ++ for (int j = 0; j < aint.length; ++j) + { + aint[j] = this.func_150792_a(); + } +@@ -152,7 +152,7 @@ + p_189423_1_ = new long[i]; + } + +- for (int j = 0; j < p_189423_1_.length; j++) ++ for (int j = 0; j < p_189423_1_.length; ++j) + { + p_189423_1_[j] = this.readLong(); + } @@ -183,7 +183,7 @@ public > T func_179257_a(Class p_179257_1_) diff --git a/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch b/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch index 13ca56393..1cc7f30ae 100644 --- a/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch +++ b/patches/minecraft/net/minecraft/network/ServerStatusResponse.java.patch @@ -41,7 +41,16 @@ if (JsonUtils.func_151202_d(jsonobject, "sample")) { -@@ -127,8 +129,8 @@ +@@ -110,7 +112,7 @@ + { + GameProfile[] agameprofile = new GameProfile[jsonarray.size()]; + +- for (int i = 0; i < agameprofile.length; i++) ++ for (int i = 0; i < agameprofile.length; ++i) + { + JsonObject jsonobject1 = JsonUtils.func_151210_l(jsonarray.get(i), "player[" + i + "]"); + String s = JsonUtils.func_151200_h(jsonobject1, "id"); +@@ -127,14 +129,14 @@ public JsonElement serialize(ServerStatusResponse.Players p_serialize_1_, Type p_serialize_2_, JsonSerializationContext p_serialize_3_) { JsonObject jsonobject = new JsonObject(); @@ -52,6 +61,13 @@ if (p_serialize_1_.func_151331_c() != null && p_serialize_1_.func_151331_c().length > 0) { + JsonArray jsonarray = new JsonArray(); + +- for (int i = 0; i < p_serialize_1_.func_151331_c().length; i++) ++ for (int i = 0; i < p_serialize_1_.func_151331_c().length; ++i) + { + JsonObject jsonobject1 = new JsonObject(); + UUID uuid = p_serialize_1_.func_151331_c()[i].getId(); @@ -160,17 +162,17 @@ if (jsonobject.has("description")) diff --git a/patches/minecraft/net/minecraft/network/datasync/EntityDataManager.java.patch b/patches/minecraft/net/minecraft/network/datasync/EntityDataManager.java.patch index e6e134baf..71d67a4d3 100644 --- a/patches/minecraft/net/minecraft/network/datasync/EntityDataManager.java.patch +++ b/patches/minecraft/net/minecraft/network/datasync/EntityDataManager.java.patch @@ -115,9 +115,12 @@ if (ObjectUtils.notEqual(p_187227_2_, dataentry.func_187206_b())) { -@@ -179,7 +182,7 @@ +@@ -177,9 +180,9 @@ + { + int i = 0; - for (int j = p_187229_0_.size(); i < j; ++i) +- for (int j = p_187229_0_.size(); i < j; i++) ++ for (int j = p_187229_0_.size(); i < j; ++i) { - EntityDataManager.DataEntry dataentry = p_187229_0_.get(i); + EntityDataManager.DataEntry dataentry = (EntityDataManager.DataEntry)p_187229_0_.get(i); diff --git a/patches/minecraft/net/minecraft/network/play/server/SPacketSpawnMob.java.patch b/patches/minecraft/net/minecraft/network/play/server/SPacketSpawnMob.java.patch index 1d6f3898b..b0edee5e5 100644 --- a/patches/minecraft/net/minecraft/network/play/server/SPacketSpawnMob.java.patch +++ b/patches/minecraft/net/minecraft/network/play/server/SPacketSpawnMob.java.patch @@ -1,10 +1,18 @@ --- before/net/minecraft/network/play/server/SPacketSpawnMob.java +++ after/net/minecraft/network/play/server/SPacketSpawnMob.java -@@ -38,55 +38,54 @@ +@@ -4,7 +4,6 @@ + import java.util.List; + import java.util.UUID; + import javax.annotation.Nullable; +-import net.minecraft.entity.Entity; + import net.minecraft.entity.EntityList; + import net.minecraft.entity.EntityLivingBase; + import net.minecraft.network.Packet; +@@ -39,55 +38,54 @@ { this.field_149042_a = p_i46973_1_.func_145782_y(); this.field_186894_b = p_i46973_1_.func_110124_au(); -- this.field_149040_b = EntityList.field_191308_b.func_148757_b(p_i46973_1_.getClass()); +- this.field_149040_b = EntityList.field_191308_b.func_148757_b((Class )p_i46973_1_.getClass()); + this.field_149040_b = EntityList.getID(p_i46973_1_.getClass()); this.field_149041_c = p_i46973_1_.field_70165_t; this.field_149038_d = p_i46973_1_.field_70163_u; @@ -91,7 +99,7 @@ public void func_148837_a(PacketBuffer p_148837_1_) throws IOException { this.field_149042_a = p_148837_1_.func_150792_a(); -@@ -104,7 +103,6 @@ +@@ -105,7 +103,6 @@ this.field_149044_m = EntityDataManager.func_187215_b(p_148837_1_); } diff --git a/patches/minecraft/net/minecraft/pathfinding/FlyingNodeProcessor.java.patch b/patches/minecraft/net/minecraft/pathfinding/FlyingNodeProcessor.java.patch index 3a5f608a1..a21374bc2 100644 --- a/patches/minecraft/net/minecraft/pathfinding/FlyingNodeProcessor.java.patch +++ b/patches/minecraft/net/minecraft/pathfinding/FlyingNodeProcessor.java.patch @@ -82,7 +82,15 @@ protected PathPoint func_176159_a(int p_176159_1_, int p_176159_2_, int p_176159_3_) { PathPoint pathpoint = null; -@@ -279,26 +267,14 @@ +@@ -272,33 +260,21 @@ + + if (pathnodetype == PathNodeType.WALKABLE) + { +- pathpoint.field_186286_l++; ++ ++pathpoint.field_186286_l; + } + } + return pathnodetype != PathNodeType.OPEN && pathnodetype != PathNodeType.WALKABLE ? pathpoint : pathpoint; } diff --git a/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch b/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch index 4f573f823..9a72a8bd7 100644 --- a/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch +++ b/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch @@ -209,6 +209,15 @@ if (this.field_186326_b.field_70170_p.func_184143_b(axisalignedbb3)) { +@@ -296,7 +260,7 @@ + + while (p_186332_2_ > 0 && pathnodetype == PathNodeType.OPEN) + { +- p_186332_2_--; ++ --p_186332_2_; + + if (i++ >= this.field_186326_b.func_82143_as()) + { @@ -326,27 +290,15 @@ } } @@ -243,7 +252,7 @@ if (enumset.contains(PathNodeType.FENCE)) { -@@ -369,24 +321,18 @@ +@@ -369,30 +321,24 @@ } } @@ -275,8 +284,17 @@ - ) + public PathNodeType func_193577_a(IBlockAccess p_193577_1_, int p_193577_2_, int p_193577_3_, int p_193577_4_, int p_193577_5_, int p_193577_6_, int p_193577_7_, boolean p_193577_8_, boolean p_193577_9_, EnumSet p_193577_10_, PathNodeType p_193577_11_, BlockPos p_193577_12_) { - for (int i = 0; i < p_193577_5_; ++i) +- for (int i = 0; i < p_193577_5_; i++) ++ for (int i = 0; i < p_193577_5_; ++i) { +- for (int j = 0; j < p_193577_6_; j++) ++ for (int j = 0; j < p_193577_6_; ++j) + { +- for (int k = 0; k < p_193577_7_; k++) ++ for (int k = 0; k < p_193577_7_; ++k) + { + int l = i + p_193577_2_; + int i1 = j + p_193577_3_; @@ -409,9 +355,7 @@ pathnodetype = PathNodeType.BLOCKED; } @@ -339,7 +357,15 @@ } public PathNodeType func_193578_a(IBlockAccess p_193578_1_, int p_193578_2_, int p_193578_3_, int p_193578_4_, PathNodeType p_193578_5_) -@@ -492,17 +422,19 @@ +@@ -486,23 +416,25 @@ + + if (p_193578_5_ == PathNodeType.WALKABLE) + { +- for (int i = -1; i <= 1; i++) ++ for (int i = -1; i <= 1; ++i) + { +- for (int j = -1; j <= 1; j++) ++ for (int j = -1; j <= 1; ++j) { if (i != 0 || j != 0) { diff --git a/patches/minecraft/net/minecraft/potion/Potion.java.patch b/patches/minecraft/net/minecraft/potion/Potion.java.patch index 4c3ce6afa..663ebfaf7 100644 --- a/patches/minecraft/net/minecraft/potion/Potion.java.patch +++ b/patches/minecraft/net/minecraft/potion/Potion.java.patch @@ -46,7 +46,52 @@ p_180793_3_.func_70691_i((float)i); } } -@@ -204,6 +204,12 @@ +@@ -146,17 +146,41 @@ + if (this == MobEffects.field_76428_l) + { + int k = 50 >> p_76397_2_; +- return k > 0 ? p_76397_1_ % k == 0 : true; ++ ++ if (k > 0) ++ { ++ return p_76397_1_ % k == 0; ++ } ++ else ++ { ++ return true; ++ } + } + else if (this == MobEffects.field_76436_u) + { + int j = 25 >> p_76397_2_; +- return j > 0 ? p_76397_1_ % j == 0 : true; ++ ++ if (j > 0) ++ { ++ return p_76397_1_ % j == 0; ++ } ++ else ++ { ++ return true; ++ } + } + else if (this == MobEffects.field_82731_v) + { + int i = 40 >> p_76397_2_; +- return i > 0 ? p_76397_1_ % i == 0 : true; ++ ++ if (i > 0) ++ { ++ return p_76397_1_ % i == 0; ++ } ++ else ++ { ++ return true; ++ } + } + else + { +@@ -180,6 +204,12 @@ return this.field_76416_I; } @@ -59,7 +104,7 @@ @SideOnly(Side.CLIENT) public boolean func_76400_d() { -@@ -216,7 +222,6 @@ +@@ -192,7 +222,6 @@ return this.field_76417_J; } @@ -67,7 +112,7 @@ public boolean func_76398_f() { return this.field_76418_K; -@@ -236,12 +241,6 @@ +@@ -212,12 +241,6 @@ } } @@ -80,7 +125,7 @@ public int func_76401_j() { return this.field_76414_N; -@@ -254,12 +253,6 @@ +@@ -230,12 +253,6 @@ return this; } @@ -93,7 +138,7 @@ public void func_111187_a(EntityLivingBase p_111187_1_, AbstractAttributeMap p_111187_2_, int p_111187_3_) { for (Entry entry : this.field_111188_I.entrySet()) -@@ -273,6 +266,12 @@ +@@ -249,6 +266,12 @@ } } @@ -106,7 +151,7 @@ public void func_111185_a(EntityLivingBase p_111185_1_, AbstractAttributeMap p_111185_2_, int p_111185_3_) { for (Entry entry : this.field_111188_I.entrySet()) -@@ -283,14 +282,7 @@ +@@ -259,14 +282,7 @@ { AttributeModifier attributemodifier = entry.getValue(); iattributeinstance.func_111124_b(attributemodifier); @@ -122,7 +167,7 @@ } } } -@@ -300,6 +292,121 @@ +@@ -276,6 +292,121 @@ return p_111183_2_.func_111164_d() * (double)(p_111183_1_ + 1); } @@ -244,7 +289,7 @@ @SideOnly(Side.CLIENT) public boolean func_188408_i() { -@@ -314,127 +421,32 @@ +@@ -290,127 +421,32 @@ public static void func_188411_k() { diff --git a/patches/minecraft/net/minecraft/potion/PotionHelper.java.patch b/patches/minecraft/net/minecraft/potion/PotionHelper.java.patch index ded5cadb1..2f6379506 100644 --- a/patches/minecraft/net/minecraft/potion/PotionHelper.java.patch +++ b/patches/minecraft/net/minecraft/potion/PotionHelper.java.patch @@ -13,27 +13,52 @@ private static final Predicate field_185216_d = new Predicate() { public boolean apply(ItemStack p_apply_1_) -@@ -43,7 +43,7 @@ +@@ -41,9 +41,9 @@ + { + int i = 0; - for (int j = field_185214_b.size(); i < j; ++i) +- for (int j = field_185214_b.size(); i < j; i++) ++ for (int j = field_185214_b.size(); i < j; ++i) { - if (field_185214_b.get(i).field_185199_b.apply(p_185203_0_)) + if ((field_185214_b.get(i)).field_185199_b.apply(p_185203_0_)) { return true; } -@@ -58,7 +58,7 @@ +@@ -56,9 +56,9 @@ + { + int i = 0; - for (int j = field_185213_a.size(); i < j; ++i) +- for (int j = field_185213_a.size(); i < j; i++) ++ for (int j = field_185213_a.size(); i < j; ++i) { - if (field_185213_a.get(i).field_185199_b.apply(p_185211_0_)) + if ((field_185213_a.get(i)).field_185199_b.apply(p_185211_0_)) { return true; } -@@ -86,9 +86,9 @@ +@@ -69,7 +69,14 @@ + + public static boolean func_185208_a(ItemStack p_185208_0_, ItemStack p_185208_1_) + { +- return !field_185216_d.apply(p_185208_0_) ? false : func_185206_b(p_185208_0_, p_185208_1_) || func_185209_c(p_185208_0_, p_185208_1_); ++ if (!field_185216_d.apply(p_185208_0_)) ++ { ++ return false; ++ } ++ else ++ { ++ return func_185206_b(p_185208_0_, p_185208_1_) || func_185209_c(p_185208_0_, p_185208_1_); ++ } + } + + protected static boolean func_185206_b(ItemStack p_185206_0_, ItemStack p_185206_1_) +@@ -77,11 +84,11 @@ + Item item = p_185206_0_.func_77973_b(); + int i = 0; - for (int j = field_185214_b.size(); i < j; ++i) +- for (int j = field_185214_b.size(); i < j; i++) ++ for (int j = field_185214_b.size(); i < j; ++i) { - PotionHelper.MixPredicate mixpredicate = field_185214_b.get(i); + PotionHelper.MixPredicate mixpredicate = (PotionHelper.MixPredicate)field_185214_b.get(i); @@ -43,9 +68,12 @@ { return true; } -@@ -104,9 +104,9 @@ +@@ -95,11 +102,11 @@ + PotionType potiontype = PotionUtils.func_185191_c(p_185209_0_); + int i = 0; - for (int j = field_185213_a.size(); i < j; ++i) +- for (int j = field_185213_a.size(); i < j; i++) ++ for (int j = field_185213_a.size(); i < j; ++i) { - PotionHelper.MixPredicate mixpredicate = field_185213_a.get(i); + PotionHelper.MixPredicate mixpredicate = (PotionHelper.MixPredicate)field_185213_a.get(i); @@ -55,9 +83,12 @@ { return true; } -@@ -125,11 +125,11 @@ +@@ -116,25 +123,25 @@ + Item item = p_185212_1_.func_77973_b(); + int i = 0; - for (int j = field_185214_b.size(); i < j; ++i) +- for (int j = field_185214_b.size(); i < j; i++) ++ for (int j = field_185214_b.size(); i < j; ++i) { - PotionHelper.MixPredicate mixpredicate = field_185214_b.get(i); + PotionHelper.MixPredicate mixpredicate = (PotionHelper.MixPredicate)field_185214_b.get(i); @@ -70,9 +101,10 @@ } } -@@ -137,11 +137,11 @@ + i = 0; - for (int k = field_185213_a.size(); i < k; ++i) +- for (int k = field_185213_a.size(); i < k; i++) ++ for (int k = field_185213_a.size(); i < k; ++i) { - PotionHelper.MixPredicate mixpredicate1 = field_185213_a.get(i); + PotionHelper.MixPredicate mixpredicate1 = (PotionHelper.MixPredicate)field_185213_a.get(i); @@ -85,7 +117,7 @@ } } } -@@ -184,11 +184,7 @@ +@@ -177,11 +184,7 @@ func_193357_a(PotionTypes.field_185233_e, Items.field_151102_aT, PotionTypes.field_185243_o); func_193357_a(PotionTypes.field_185243_o, Items.field_151137_ax, PotionTypes.field_185244_p); func_193357_a(PotionTypes.field_185243_o, Items.field_151114_aO, PotionTypes.field_185245_q); @@ -98,7 +130,7 @@ func_193357_a(PotionTypes.field_185248_t, Items.field_151137_ax, PotionTypes.field_185249_u); func_193357_a(PotionTypes.field_185233_e, Items.field_151060_bw, PotionTypes.field_185250_v); func_193357_a(PotionTypes.field_185250_v, Items.field_151114_aO, PotionTypes.field_185251_w); -@@ -213,7 +209,7 @@ +@@ -206,7 +209,7 @@ public static void func_193355_a(ItemPotion p_193355_0_, Item p_193355_1_, ItemPotion p_193355_2_) { @@ -107,7 +139,7 @@ } public static void func_193354_a(ItemPotion p_193354_0_) -@@ -228,20 +224,20 @@ +@@ -221,20 +224,20 @@ public static void func_193356_a(PotionType p_193356_0_, Ingredient p_193356_1_, PotionType p_193356_2_) { diff --git a/patches/minecraft/net/minecraft/scoreboard/Scoreboard.java.patch b/patches/minecraft/net/minecraft/scoreboard/Scoreboard.java.patch index ec30f9aa5..0e6e5b20a 100644 --- a/patches/minecraft/net/minecraft/scoreboard/Scoreboard.java.patch +++ b/patches/minecraft/net/minecraft/scoreboard/Scoreboard.java.patch @@ -121,7 +121,12 @@ } return map; -@@ -206,11 +206,11 @@ +@@ -202,15 +202,15 @@ + { + this.field_96545_a.remove(p_96519_1_.func_96679_b()); + +- for (int i = 0; i < 19; i++) ++ for (int i = 0; i < 19; ++i) { if (this.func_96539_a(i) == p_96519_1_) { @@ -135,6 +140,15 @@ if (list != null) { +@@ -445,7 +445,7 @@ + { + field_178823_g = new String[19]; + +- for (int i = 0; i < 19; i++) ++ for (int i = 0; i < 19; ++i) + { + field_178823_g[i] = func_96517_b(i); + } @@ -459,7 +459,7 @@ if (p_181140_1_ != null && !(p_181140_1_ instanceof EntityPlayer) && !p_181140_1_.func_70089_S()) { diff --git a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch index b4fe1e768..a861897bf 100644 --- a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch +++ b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch @@ -117,14 +117,16 @@ ISaveHandler isavehandler = this.field_71310_m.func_75804_a(p_71247_1_, true); this.func_175584_a(this.func_71270_I(), isavehandler); WorldInfo worldinfo = isavehandler.func_75757_d(); -@@ -265,6 +253,7 @@ +@@ -265,7 +253,8 @@ worldsettings = new WorldSettings(worldinfo); } +- for (int i = 0; i < this.field_71305_c.length; i++) + if (false) { //Forge Dead code, reimplemented below - for (int i = 0; i < this.field_71305_c.length; ++i) ++ for (int i = 0; i < this.field_71305_c.length; ++i) { int j = 0; + @@ -283,18 +272,18 @@ { if (this.func_71242_L()) @@ -182,6 +184,15 @@ BlockPos blockpos = worldserver.func_175694_M(); long k1 = func_130071_aq(); +@@ -336,7 +340,7 @@ + k1 = j2; + } + +- i1++; ++ ++i1; + worldserver.func_72863_F().func_186025_d(blockpos.func_177958_n() + l1 >> 4, blockpos.func_177952_p() + i2 >> 4); + } + } @@ -354,9 +358,9 @@ { this.func_180507_a_("level://" + URLEncoder.encode(p_175584_1_, StandardCharsets.UTF_8.toString()) + "/" + "resources.zip", ""); @@ -351,17 +362,22 @@ } catch (Exception exception) { -@@ -648,6 +654,7 @@ +@@ -648,7 +654,8 @@ public void func_71217_p() { long i = System.nanoTime(); +- this.field_71315_w++; + net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreServerTick(); - ++this.field_71315_w; ++ ++this.field_71315_w; if (this.field_71295_T) -@@ -669,11 +676,12 @@ + { +@@ -667,13 +674,14 @@ + GameProfile[] agameprofile = new GameProfile[Math.min(this.func_71233_x(), 12)]; + int j = MathHelper.func_76136_a(this.field_147146_q, 0, this.func_71233_x() - agameprofile.length); - for (int k = 0; k < agameprofile.length; ++k) +- for (int k = 0; k < agameprofile.length; k++) ++ for (int k = 0; k < agameprofile.length; ++k) { - agameprofile[k] = this.field_71318_t.func_181057_v().get(j + k).func_146103_bH(); + agameprofile[k] = ((EntityPlayerMP)this.field_71318_t.func_181057_v().get(j + k)).func_146103_bH(); @@ -387,7 +403,7 @@ this.field_71304_b.func_76318_c("levels"); + net.minecraftforge.common.chunkio.ChunkIOExecutor.tick(); -- for (int j = 0; j < this.field_71305_c.length; ++j) +- for (int j = 0; j < this.field_71305_c.length; j++) + Integer[] ids = net.minecraftforge.common.DimensionManager.getIDs(this.field_71315_w % 200 == 0); + for (int x = 0; x < ids.length; x++) { @@ -443,9 +459,12 @@ this.field_71304_b.func_76318_c("connection"); this.func_147137_ag().func_151269_c(); this.field_71304_b.func_76318_c("players"); -@@ -781,7 +796,7 @@ +@@ -779,9 +794,9 @@ + this.func_193030_aL().func_73660_a(); + this.field_71304_b.func_76318_c("tickables"); - for (int k = 0; k < this.field_71322_p.size(); ++k) +- for (int k = 0; k < this.field_71322_p.size(); k++) ++ for (int k = 0; k < this.field_71322_p.size(); ++k) { - this.field_71322_p.get(k).func_73660_a(); + ((ITickable)this.field_71322_p.get(k)).func_73660_a(); @@ -477,7 +496,7 @@ - boolean flag2 = false; - int i = -1; - -- for (int j = 0; j < p_main_0_.length; ++j) +- for (int j = 0; j < p_main_0_.length; j++) - { - String s3 = p_main_0_[j]; - String s4 = j == p_main_0_.length - 1 ? null : p_main_0_[j + 1]; @@ -525,7 +544,7 @@ - - if (flag3) - { -- ++j; +- j++; - } - } - @@ -814,7 +833,7 @@ - p_70000_1_.func_152768_a("world[" + i + "][generator_version]", worldinfo.func_76067_t().func_77131_c()); - p_70000_1_.func_152768_a("world[" + i + "][height]", this.field_71280_D); - p_70000_1_.func_152768_a("world[" + i + "][chunks_loaded]", worldserver.func_72863_F().func_73152_e()); -- ++i; +- i++; + WorldInfo worldinfo = worldserver1.func_72912_H(); + p_70000_1_.func_152768_a("world[" + l + "][dimension]", Integer.valueOf(worldserver1.field_73011_w.func_186058_p().func_186068_a())); + p_70000_1_.func_152768_a("world[" + l + "][mode]", worldinfo.func_76077_q()); diff --git a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch index 8b7f99a6b..39968bd01 100644 --- a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -416,7 +416,7 @@ public int func_175580_aG() { int i = this.field_71340_o.func_73669_a("max-world-size", super.func_175580_aG()); -@@ -626,12 +587,14 @@ +@@ -626,17 +587,19 @@ return i; } @@ -432,6 +432,48 @@ protected boolean func_152368_aE() throws IOException { boolean flag = false; + +- for (int i = 0; !flag && i <= 2; i++) ++ for (int i = 0; !flag && i <= 2; ++i) + { + if (i > 0) + { +@@ -649,7 +612,7 @@ + + boolean flag1 = false; + +- for (int j = 0; !flag1 && j <= 2; j++) ++ for (int j = 0; !flag1 && j <= 2; ++j) + { + if (j > 0) + { +@@ -662,7 +625,7 @@ + + boolean flag2 = false; + +- for (int k = 0; !flag2 && k <= 2; k++) ++ for (int k = 0; !flag2 && k <= 2; ++k) + { + if (k > 0) + { +@@ -675,7 +638,7 @@ + + boolean flag3 = false; + +- for (int l = 0; !flag3 && l <= 2; l++) ++ for (int l = 0; !flag3 && l <= 2; ++l) + { + if (l > 0) + { +@@ -688,7 +651,7 @@ + + boolean flag4 = false; + +- for (int i1 = 0; !flag4 && i1 <= 2; i1++) ++ for (int i1 = 0; !flag4 && i1 <= 2; ++i1) + { + if (i1 > 0) + { @@ -708,8 +671,9 @@ { Thread.sleep(5000L); diff --git a/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch b/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch index 4305ff782..53caf67fc 100644 --- a/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch @@ -56,14 +56,16 @@ ISaveHandler isavehandler = this.func_71254_M().func_75804_a(p_71247_1_, true); this.func_175584_a(this.func_71270_I(), isavehandler); WorldInfo worldinfo = isavehandler.func_75757_d(); -@@ -101,6 +81,7 @@ +@@ -101,7 +81,8 @@ worldinfo.func_76062_a(p_71247_2_); } +- for (int i = 0; i < this.field_71305_c.length; i++) + if (false) { //Forge: Dead Code, implement below. - for (int i = 0; i < this.field_71305_c.length; ++i) ++ for (int i = 0; i < this.field_71305_c.length; ++i) { int j = 0; + @@ -119,26 +100,41 @@ { if (this.func_71242_L()) diff --git a/patches/minecraft/net/minecraft/server/management/PlayerChunkMapEntry.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerChunkMapEntry.java.patch index 7da1b1e21..8ae1e3d50 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerChunkMapEntry.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerChunkMapEntry.java.patch @@ -126,7 +126,7 @@ } return true; -@@ -177,7 +200,7 @@ +@@ -177,18 +200,19 @@ this.field_187288_h |= 1 << (p_187265_2_ >> 4); @@ -135,7 +135,11 @@ { short short1 = (short)(p_187265_1_ << 12 | p_187265_3_ << 8 | p_187265_2_); -@@ -188,7 +211,8 @@ +- for (int i = 0; i < this.field_187287_g; i++) ++ for (int i = 0; i < this.field_187287_g; ++i) + { + if (this.field_187285_e[i] == short1) + { return; } } @@ -145,9 +149,12 @@ this.field_187285_e[this.field_187287_g++] = short1; } } -@@ -200,11 +224,12 @@ +@@ -198,13 +222,14 @@ + { + if (this.field_187290_j) { - for (int i = 0; i < this.field_187283_c.size(); ++i) +- for (int i = 0; i < this.field_187283_c.size(); i++) ++ for (int i = 0; i < this.field_187283_c.size(); ++i) { - this.field_187283_c.get(i).field_71135_a.func_147359_a(p_187267_1_); + (this.field_187283_c.get(i)).field_71135_a.func_147359_a(p_187267_1_); @@ -181,9 +188,10 @@ { this.func_187267_a(new SPacketMultiBlockChange(this.field_187287_g, this.field_187285_e, this.field_187286_f)); - +- for (int l = 0; l < this.field_187287_g; l++) + //} Keep this in the else until we figure out a fix for mojang's derpitude on the data packet so we don't double send crap. + //{// Forge: Send only the tile entities that are updated, Adding this brace lets us keep the indent and the patch small - for (int l = 0; l < this.field_187287_g; ++l) ++ for (int l = 0; l < this.field_187287_g; ++l) { int i1 = (this.field_187285_e[l] >> 12 & 15) + this.field_187284_d.field_77276_a * 16; int j1 = this.field_187285_e[l] & 255; @@ -196,6 +204,15 @@ { this.func_187273_a(this.field_187282_b.func_72688_a().func_175625_s(blockpos1)); } +@@ -279,7 +308,7 @@ + { + int i = 0; + +- for (int j = this.field_187283_c.size(); i < j; i++) ++ for (int j = this.field_187283_c.size(); i < j; ++i) + { + EntityPlayerMP entityplayermp = this.field_187283_c.get(i); + @@ -318,5 +347,10 @@ } diff --git a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch index 65785c77e..4bf35b718 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch @@ -12,7 +12,15 @@ this.field_73092_a.func_72854_c(); } -@@ -91,7 +88,7 @@ +@@ -84,14 +81,14 @@ + + public void func_73075_a() + { +- this.field_73100_i++; ++ ++this.field_73100_i; + + if (this.field_73097_j) + { int i = this.field_73100_i - this.field_73093_n; IBlockState iblockstate = this.field_73092_a.func_180495_p(this.field_180241_i); diff --git a/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch index df2b0e0da..5322df3a7 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch @@ -126,7 +126,7 @@ this.func_72354_b(p_72355_2_, worldserver); if (!this.field_72400_f.func_147133_T().isEmpty()) -@@ -221,11 +216,12 @@ +@@ -221,18 +216,19 @@ } p_72355_2_.func_71116_b(); @@ -140,6 +140,14 @@ for (ScorePlayerTeam scoreplayerteam : p_96456_1_.func_96525_g()) { + p_96456_2_.field_71135_a.func_147359_a(new SPacketTeams(scoreplayerteam, 0)); + } + +- for (int i = 0; i < 19; i++) ++ for (int i = 0; i < 19; ++i) + { + ScoreObjective scoreobjective = p_96456_1_.func_96539_a(i); + @@ -253,36 +249,29 @@ this.field_72412_k = p_72364_1_[0].func_72860_G().func_75756_e(); p_72364_1_[0].func_175723_af().func_177737_a(new IBorderListener() @@ -229,7 +237,8 @@ + this.func_148540_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.ADD_PLAYER, new EntityPlayerMP[] {p_72377_1_})); WorldServer worldserver = this.field_72400_f.func_71218_a(p_72377_1_.field_71093_bK); - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { - p_72377_1_.field_71135_a.func_147359_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.ADD_PLAYER, this.field_72404_b.get(i))); + p_72377_1_.field_71135_a.func_147359_a(new SPacketPlayerListItem(SPacketPlayerListItem.Action.ADD_PLAYER, new EntityPlayerMP[] {this.field_72404_b.get(i)})); @@ -275,15 +284,18 @@ String s1 = "You are banned from this server!\nReason: " + userlistbansentry.func_73686_f(); if (userlistbansentry.func_73680_d() != null) -@@ -459,7 +466,7 @@ +@@ -459,9 +466,9 @@ public EntityPlayerMP func_148545_a(GameProfile p_148545_1_) { UUID uuid = EntityPlayer.func_146094_a(p_148545_1_); - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { + EntityPlayerMP entityplayermp = this.field_72404_b.get(i); + @@ -480,7 +487,7 @@ for (EntityPlayerMP entityplayermp1 : list) @@ -538,16 +550,43 @@ p_82448_4_.func_72838_d(p_82448_1_); p_82448_4_.func_72866_a(p_82448_1_, false); } -@@ -726,7 +742,7 @@ +@@ -724,15 +740,15 @@ + + public void func_148540_a(Packet p_148540_1_) { - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { - this.field_72404_b.get(i).field_71135_a.func_147359_a(p_148540_1_); + (this.field_72404_b.get(i)).field_71135_a.func_147359_a(p_148540_1_); } } -@@ -795,11 +811,11 @@ + public void func_148537_a(Packet p_148537_1_, int p_148537_2_) + { +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) + { + EntityPlayerMP entityplayermp = this.field_72404_b.get(i); + +@@ -771,7 +787,7 @@ + } + else + { +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) + { + EntityPlayerMP entityplayermp = this.field_72404_b.get(i); + +@@ -788,18 +804,18 @@ + String s = ""; + List list = Lists.newArrayList(this.field_72404_b); + +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + if (i > 0) + { s = s + ", "; } @@ -561,18 +600,24 @@ } } -@@ -812,7 +828,7 @@ +@@ -810,9 +826,9 @@ + { + String[] astring = new String[this.field_72404_b.size()]; - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { - astring[i] = this.field_72404_b.get(i).func_70005_c_(); + astring[i] = ((EntityPlayerMP)this.field_72404_b.get(i)).func_70005_c_(); } return astring; -@@ -824,7 +840,7 @@ +@@ -822,9 +838,9 @@ + { + GameProfile[] agameprofile = new GameProfile[this.field_72404_b.size()]; - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { - agameprofile[i] = this.field_72404_b.get(i).func_146103_bH(); + agameprofile[i] = ((EntityPlayerMP)this.field_72404_b.get(i)).func_146103_bH(); @@ -592,7 +637,7 @@ } @Nullable -@@ -904,15 +916,7 @@ +@@ -904,17 +916,9 @@ return null; } @@ -607,8 +652,20 @@ - ) + public void func_148543_a(@Nullable EntityPlayer p_148543_1_, double p_148543_2_, double p_148543_4_, double p_148543_6_, double p_148543_8_, int p_148543_10_, Packet p_148543_11_) { - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { + EntityPlayerMP entityplayermp = this.field_72404_b.get(i); + +@@ -934,7 +938,7 @@ + + public void func_72389_g() + { +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) + { + this.func_72391_b(this.field_72404_b.get(i)); + } @@ -978,8 +982,7 @@ { WorldBorder worldborder = this.field_72400_f.field_71305_c[0].func_175723_af(); @@ -641,9 +698,12 @@ for (EntityPlayerMP entityplayermp : this.field_72404_b) { -@@ -1084,7 +1081,7 @@ +@@ -1082,9 +1079,9 @@ + + public void func_72392_r() { - for (int i = 0; i < this.field_72404_b.size(); ++i) +- for (int i = 0; i < this.field_72404_b.size(); i++) ++ for (int i = 0; i < this.field_72404_b.size(); ++i) { - this.field_72404_b.get(i).field_71135_a.func_194028_b(new TextComponentTranslation("multiplayer.disconnect.server_shutdown")); + (this.field_72404_b.get(i)).field_71135_a.func_194028_b(new TextComponentTranslation("multiplayer.disconnect.server_shutdown", new Object[0])); diff --git a/patches/minecraft/net/minecraft/stats/RecipeBookServer.java.patch b/patches/minecraft/net/minecraft/stats/RecipeBookServer.java.patch index 2b5bba366..449d2c9c6 100644 --- a/patches/minecraft/net/minecraft/stats/RecipeBookServer.java.patch +++ b/patches/minecraft/net/minecraft/stats/RecipeBookServer.java.patch @@ -46,7 +46,15 @@ } nbttagcompound.func_74782_a("toBeDisplayed", nbttaglist1); -@@ -96,7 +95,7 @@ +@@ -89,14 +88,14 @@ + this.field_192819_c = p_192825_1_.func_74767_n("isFilteringCraftable"); + NBTTagList nbttaglist = p_192825_1_.func_150295_c("recipes", 8); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + ResourceLocation resourcelocation = new ResourceLocation(nbttaglist.func_150307_f(i)); + IRecipe irecipe = CraftingManager.func_193373_a(resourcelocation); if (irecipe == null) { @@ -55,7 +63,15 @@ } else { -@@ -113,7 +112,7 @@ +@@ -106,14 +105,14 @@ + + NBTTagList nbttaglist1 = p_192825_1_.func_150295_c("toBeDisplayed", 8); + +- for (int j = 0; j < nbttaglist1.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist1.func_74745_c(); ++j) + { + ResourceLocation resourcelocation1 = new ResourceLocation(nbttaglist1.func_150307_f(j)); + IRecipe irecipe1 = CraftingManager.func_193373_a(resourcelocation1); if (irecipe1 == null) { diff --git a/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch b/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch index 47b8abe21..dbbb9a914 100644 --- a/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java.patch @@ -29,7 +29,7 @@ } public void func_98278_g() -@@ -70,11 +68,11 @@ +@@ -70,19 +68,19 @@ if (this.func_98271_a().field_72995_K) { @@ -46,7 +46,8 @@ if (this.field_98286_b > 0) { -@@ -82,7 +80,7 @@ +- this.field_98286_b--; ++ --this.field_98286_b; } this.field_98284_d = this.field_98287_c; @@ -55,7 +56,21 @@ } else { -@@ -105,33 +103,17 @@ +@@ -93,45 +91,29 @@ + + if (this.field_98286_b > 0) + { +- this.field_98286_b--; ++ --this.field_98286_b; + return; + } + + boolean flag = false; + +- for (int i = 0; i < this.field_98294_i; i++) ++ for (int i = 0; i < this.field_98294_i; ++i) + { + NBTTagCompound nbttagcompound = this.field_98282_f.func_185277_b(); NBTTagList nbttaglist = nbttagcompound.func_150295_c("Pos", 6); World world = this.func_98271_a(); int j = nbttaglist.func_74745_c(); @@ -128,6 +143,15 @@ } this.func_98267_a(1); +@@ -199,7 +181,7 @@ + { + NBTTagList nbttaglist = p_98270_1_.func_150295_c("SpawnPotentials", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + this.field_98285_e.add(new WeightedSpawnerEntity(nbttaglist.func_150305_b(i))); + } @@ -211,7 +193,7 @@ } else if (!this.field_98285_e.isEmpty()) diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch index d8e4ce91d..e1c5a2282 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch @@ -22,6 +22,15 @@ } public NBTTagCompound func_189515_b(NBTTagCompound p_189515_1_) +@@ -69,7 +71,7 @@ + + private NBTTagCompound func_189516_d(NBTTagCompound p_189516_1_) + { +- ResourceLocation resourcelocation = field_190562_f.func_177774_c((Class )this.getClass()); ++ ResourceLocation resourcelocation = field_190562_f.func_177774_c(this.getClass()); + + if (resourcelocation == null) + { @@ -81,6 +83,8 @@ p_189516_1_.func_74768_a("x", this.field_174879_c.func_177958_n()); p_189516_1_.func_74768_a("y", this.field_174879_c.func_177956_o()); @@ -93,7 +102,29 @@ } public BlockPos func_174877_v() -@@ -244,9 +252,9 @@ +@@ -225,18 +233,13 @@ + + public void func_145828_a(CrashReportCategory p_145828_1_) + { +- p_145828_1_.func_189529_a( +- "Name", +- new ICrashReportDetail() ++ p_145828_1_.func_189529_a("Name", new ICrashReportDetail() + { + public String call() throws Exception + { +- return TileEntity.field_190562_f.func_177774_c((Class )TileEntity.this.getClass()) +- + " // " +- + TileEntity.this.getClass().getCanonicalName(); ++ return TileEntity.field_190562_f.func_177774_c(TileEntity.this.getClass()) + " // " + TileEntity.this.getClass().getCanonicalName(); + } +- } +- ); ++ }); + + if (this.field_145850_b != null) + { +@@ -249,9 +252,9 @@ try { @@ -105,7 +136,7 @@ { return "ID #" + i; } -@@ -295,6 +303,204 @@ +@@ -300,6 +303,204 @@ public void func_189668_a(Mirror p_189668_1_) { diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch index 417d438dd..5af9022c4 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch @@ -40,7 +40,15 @@ for (EntityPlayer entityplayer : list) { -@@ -133,34 +124,33 @@ +@@ -126,41 +117,40 @@ + boolean flag = true; + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int i1 = j + 1; i1 < 256; i1++) ++ for (int i1 = j + 1; i1 < 256; ++i1) + { + IBlockState iblockstate = this.field_145850_b.func_180495_p(blockpos$mutableblockpos.func_181079_c(i, i1, k)); + float[] afloat; if (iblockstate.func_177230_c() == Blocks.field_150399_cn) { @@ -85,7 +93,15 @@ } if (Arrays.equals(afloat, tileentitybeacon$beamsegment.func_177263_b())) -@@ -195,7 +185,7 @@ +@@ -189,13 +179,13 @@ + + boolean flag1 = true; + +- for (int j1 = i - l1; j1 <= i + l1 && flag1; j1++) ++ for (int j1 = i - l1; j1 <= i + l1 && flag1; ++j1) + { +- for (int k1 = k - l1; k1 <= k + l1; k1++) ++ for (int k1 = k - l1; k1 <= k + l1; ++k1) { Block block = this.field_145850_b.func_180495_p(new BlockPos(j1, i2, k1)).func_177230_c(); @@ -227,7 +243,7 @@ public boolean func_145818_k_() { return this.field_146008_p != null && !this.field_146008_p.isEmpty(); -@@ -395,13 +372,11 @@ +@@ -395,59 +372,46 @@ this.field_146008_p = p_145999_1_; } @@ -240,21 +256,24 @@ - @Override public boolean func_70300_a(EntityPlayer p_70300_1_) { - if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) -@@ -410,49 +385,33 @@ - } - else - { -- return !( -- p_70300_1_.func_70092_e( -- (double)this.field_174879_c.func_177958_n() + 0.5, -- (double)this.field_174879_c.func_177956_o() + 0.5, -- (double)this.field_174879_c.func_177952_p() + 0.5 -- ) -- > 64.0 -- ); +- return this.field_145850_b.func_175625_s(this.field_174879_c) != this +- ? false +- : !( +- p_70300_1_.func_70092_e( +- (double)this.field_174879_c.func_177958_n() + 0.5, +- (double)this.field_174879_c.func_177956_o() + 0.5, +- (double)this.field_174879_c.func_177952_p() + 0.5 +- ) +- > 64.0 +- ); ++ if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) ++ { ++ return false; ++ } ++ else ++ { + return p_70300_1_.func_70092_e((double)this.field_174879_c.func_177958_n() + 0.5D, (double)this.field_174879_c.func_177956_o() + 0.5D, (double)this.field_174879_c.func_177952_p() + 0.5D) <= 64.0D; - } ++ } } - @Override @@ -293,7 +312,7 @@ public int func_174887_a_(int p_174887_1_) { switch (p_174887_1_) -@@ -468,7 +427,6 @@ +@@ -463,7 +427,6 @@ } } @@ -301,7 +320,7 @@ public void func_174885_b(int p_174885_1_, int p_174885_2_) { switch (p_174885_1_) -@@ -484,19 +442,16 @@ +@@ -479,19 +442,16 @@ } } @@ -321,7 +340,7 @@ public boolean func_145842_c(int p_145842_1_, int p_145842_2_) { if (p_145842_1_ == 1) -@@ -510,19 +465,16 @@ +@@ -505,19 +465,16 @@ } } @@ -341,3 +360,12 @@ public boolean func_180461_b(int p_180461_1_, ItemStack p_180461_2_, EnumFacing p_180461_3_) { return false; +@@ -544,7 +501,7 @@ + + protected void func_177262_a() + { +- this.field_177265_b++; ++ ++this.field_177265_b; + } + + public float[] func_177263_b() diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch index ee20792e5..990c9eeb2 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch @@ -44,18 +44,42 @@ public void func_73660_a() { ItemStack itemstack = this.field_145945_j.get(4); -@@ -133,7 +128,7 @@ +@@ -90,7 +85,7 @@ - for (int i = 0; i < BlockBrewingStand.field_176451_a.length; ++i) + if (flag1) + { +- this.field_145946_k--; ++ --this.field_145946_k; + boolean flag2 = this.field_145946_k == 0; + + if (flag2 && flag) +@@ -111,7 +106,7 @@ + } + else if (flag && this.field_184278_m > 0) + { +- this.field_184278_m--; ++ --this.field_184278_m; + this.field_145946_k = 400; + this.field_145944_m = itemstack1.func_77973_b(); + this.func_70296_d(); +@@ -131,9 +126,9 @@ + return; + } + +- for (int i = 0; i < BlockBrewingStand.field_176451_a.length; i++) ++ for (int i = 0; i < BlockBrewingStand.field_176451_a.length; ++i) { - iblockstate = iblockstate.func_177226_a(BlockBrewingStand.field_176451_a[i], aboolean[i]); + iblockstate = iblockstate.func_177226_a(BlockBrewingStand.field_176451_a[i], Boolean.valueOf(aboolean[i])); } this.field_145850_b.func_180501_a(this.field_174879_c, iblockstate, 2); -@@ -147,7 +142,7 @@ +@@ -145,9 +140,9 @@ + { + boolean[] aboolean = new boolean[3]; - for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { - if (!this.field_145945_j.get(i).func_190926_b()) + if (!((ItemStack)this.field_145945_j.get(i)).func_190926_b()) @@ -70,6 +94,15 @@ ItemStack itemstack = this.field_145945_j.get(3); if (itemstack.func_190926_b()) +@@ -170,7 +166,7 @@ + } + else + { +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) + { + ItemStack itemstack1 = this.field_145945_j.get(i); + @@ -186,19 +182,17 @@ private void func_145940_l() @@ -77,7 +110,7 @@ + if (net.minecraftforge.event.ForgeEventFactory.onPotionAttemptBrew(field_145945_j)) return; ItemStack itemstack = this.field_145945_j.get(3); -- for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) - { - this.field_145945_j.set(i, PotionHelper.func_185212_d(itemstack, this.field_145945_j.get(i))); - } @@ -160,7 +193,7 @@ public void func_70299_a(int p_70299_1_, ItemStack p_70299_2_) { if (p_70299_1_ >= 0 && p_70299_1_ < this.field_145945_j.size()) -@@ -280,13 +267,11 @@ +@@ -280,55 +267,52 @@ } } @@ -173,21 +206,24 @@ - @Override public boolean func_70300_a(EntityPlayer p_70300_1_) { - if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) -@@ -295,33 +280,23 @@ - } - else - { -- return !( -- p_70300_1_.func_70092_e( -- (double)this.field_174879_c.func_177958_n() + 0.5, -- (double)this.field_174879_c.func_177956_o() + 0.5, -- (double)this.field_174879_c.func_177952_p() + 0.5 -- ) -- > 64.0 -- ); +- return this.field_145850_b.func_175625_s(this.field_174879_c) != this +- ? false +- : !( +- p_70300_1_.func_70092_e( +- (double)this.field_174879_c.func_177958_n() + 0.5, +- (double)this.field_174879_c.func_177956_o() + 0.5, +- (double)this.field_174879_c.func_177952_p() + 0.5 +- ) +- > 64.0 +- ); ++ if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) ++ { ++ return false; ++ } ++ else ++ { + return p_70300_1_.func_70092_e((double)this.field_174879_c.func_177958_n() + 0.5D, (double)this.field_174879_c.func_177956_o() + 0.5D, (double)this.field_174879_c.func_177952_p() + 0.5D) <= 64.0D; - } ++ } } - @Override @@ -210,14 +246,20 @@ } else { -@@ -333,13 +308,11 @@ - } - else - { -- return (item == Items.field_151068_bn || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.field_151069_bo) -- && this.func_70301_a(p_94041_1_).func_190926_b(); + Item item = p_94041_2_.func_77973_b(); +- return p_94041_1_ == 4 +- ? item == Items.field_151065_br +- : (item == Items.field_151068_bn || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.field_151069_bo) +- && this.func_70301_a(p_94041_1_).func_190926_b(); ++ ++ if (p_94041_1_ == 4) ++ { ++ return item == Items.field_151065_br; ++ } ++ else ++ { + return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(p_94041_2_) && this.func_70301_a(p_94041_1_).func_190926_b(); - } ++ } } } @@ -225,7 +267,7 @@ public int[] func_180463_a(EnumFacing p_180463_1_) { if (p_180463_1_ == EnumFacing.UP) -@@ -352,13 +325,11 @@ +@@ -341,31 +325,33 @@ } } @@ -238,9 +280,15 @@ - @Override public boolean func_180461_b(int p_180461_1_, ItemStack p_180461_2_, EnumFacing p_180461_3_) { - if (p_180461_1_ == 3) -@@ -371,19 +342,16 @@ - } +- return p_180461_1_ == 3 ? p_180461_2_.func_77973_b() == Items.field_151069_bo : true; ++ if (p_180461_1_ == 3) ++ { ++ return p_180461_2_.func_77973_b() == Items.field_151069_bo; ++ } ++ else ++ { ++ return true; ++ } } - @Override @@ -259,7 +307,7 @@ public int func_174887_a_(int p_174887_1_) { switch (p_174887_1_) -@@ -397,7 +365,6 @@ +@@ -379,7 +365,6 @@ } } @@ -267,7 +315,7 @@ public void func_174885_b(int p_174885_1_, int p_174885_2_) { switch (p_174885_1_) -@@ -410,13 +377,32 @@ +@@ -392,13 +377,32 @@ } } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch index 9e4e0758b..abcfc55ef 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityChest.java.patch @@ -83,7 +83,7 @@ this.field_145984_a = true; this.field_145991_k = this.func_174911_a(EnumFacing.WEST); this.field_145990_j = this.func_174911_a(EnumFacing.EAST); -@@ -215,7 +210,6 @@ +@@ -215,32 +210,20 @@ } } @@ -91,7 +91,14 @@ public void func_73660_a() { this.func_145979_i(); -@@ -229,18 +223,7 @@ + int i = this.field_174879_c.func_177958_n(); + int j = this.field_174879_c.func_177956_o(); + int k = this.field_174879_c.func_177952_p(); +- this.field_145983_q++; ++ ++this.field_145983_q; + + if (!this.field_145850_b.field_72995_K && this.field_145987_o != 0 && (this.field_145983_q + i + j + k) % 200 == 0) + { this.field_145987_o = 0; float f = 5.0F; @@ -111,6 +118,15 @@ { if (entityplayer.field_71070_bA instanceof ContainerChest) { +@@ -248,7 +231,7 @@ + + if (iinventory == this || iinventory instanceof InventoryLargeChest && ((InventoryLargeChest)iinventory).func_90010_a(this)) + { +- this.field_145987_o++; ++ ++this.field_145987_o; + } + } + } @@ -259,30 +242,20 @@ if (this.field_145987_o > 0 && this.field_145989_m == 0.0F && this.field_145992_i == null && this.field_145991_k == null) @@ -199,7 +215,16 @@ public void func_174889_b(EntityPlayer p_174889_1_) { if (!p_174889_1_.func_175149_v()) -@@ -375,7 +336,6 @@ +@@ -364,7 +325,7 @@ + this.field_145987_o = 0; + } + +- this.field_145987_o++; ++ ++this.field_145987_o; + this.field_145850_b.func_175641_c(this.field_174879_c, this.func_145838_q(), 1, this.field_145987_o); + this.field_145850_b.func_175685_c(this.field_174879_c, this.func_145838_q(), false); + +@@ -375,12 +336,11 @@ } } @@ -207,6 +232,12 @@ public void func_174886_c(EntityPlayer p_174886_1_) { if (!p_174886_1_.func_175149_v() && this.func_145838_q() instanceof BlockChest) + { +- this.field_145987_o--; ++ --this.field_145987_o; + this.field_145850_b.func_175641_c(this.field_174879_c, this.func_145838_q(), 1, this.field_145987_o); + this.field_145850_b.func_175685_c(this.field_174879_c, this.func_145838_q(), false); + @@ -391,7 +351,29 @@ } } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch index cf03ccc1c..f0985cdd4 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch @@ -119,7 +119,15 @@ public void func_73660_a() { boolean flag = this.func_145950_i(); -@@ -190,7 +178,7 @@ +@@ -183,14 +171,14 @@ + + if (this.func_145950_i()) + { +- this.field_145956_a--; ++ --this.field_145956_a; + } + + if (!this.field_145850_b.field_72995_K) { ItemStack itemstack = this.field_145957_n.get(1); @@ -139,6 +147,15 @@ } } } +@@ -217,7 +205,7 @@ + + if (this.func_145950_i() && this.func_145948_k()) + { +- this.field_174906_k++; ++ ++this.field_174906_k; + + if (this.field_174906_k == this.field_174905_l) + { @@ -257,7 +245,7 @@ private boolean func_145948_k() @@ -148,23 +165,24 @@ { return false; } -@@ -281,13 +269,13 @@ +@@ -281,11 +269,13 @@ { return false; } -- else if (itemstack1.func_190916_E() < this.func_70297_j_() && itemstack1.func_190916_E() < itemstack1.func_77976_d()) + else if (itemstack1.func_190916_E() + itemstack.func_190916_E() <= this.func_70297_j_() && itemstack1.func_190916_E() + itemstack.func_190916_E() <= itemstack1.func_77976_d()) // Forge fix: make furnace respect stack sizes in furnace recipes - { - return true; - } ++ { ++ return true; ++ } else { -- return itemstack1.func_190916_E() < itemstack.func_77976_d(); +- return itemstack1.func_190916_E() < this.func_70297_j_() && itemstack1.func_190916_E() < itemstack1.func_77976_d() +- ? true +- : itemstack1.func_190916_E() < itemstack.func_77976_d(); + return itemstack1.func_190916_E() + itemstack.func_190916_E() <= itemstack.func_77976_d(); // Forge fix: make furnace respect stack sizes in furnace recipes } } } -@@ -307,13 +295,10 @@ +@@ -305,13 +295,10 @@ } else if (itemstack2.func_77973_b() == itemstack1.func_77973_b()) { @@ -180,7 +198,7 @@ { this.field_145957_n.set(1, new ItemStack(Items.field_151131_as)); } -@@ -330,6 +315,8 @@ +@@ -328,6 +315,8 @@ } else { @@ -189,7 +207,7 @@ Item item = p_145952_0_.func_77973_b(); if (item == Item.func_150898_a(Blocks.field_150376_bx)) -@@ -376,37 +363,43 @@ +@@ -374,37 +363,43 @@ { return 100; } @@ -261,28 +279,31 @@ } } } -@@ -416,7 +409,6 @@ +@@ -414,32 +409,26 @@ return func_145952_a(p_145954_0_) > 0; } - @Override public boolean func_70300_a(EntityPlayer p_70300_1_) { - if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) -@@ -425,28 +417,18 @@ - } - else - { -- return !( -- p_70300_1_.func_70092_e( -- (double)this.field_174879_c.func_177958_n() + 0.5, -- (double)this.field_174879_c.func_177956_o() + 0.5, -- (double)this.field_174879_c.func_177952_p() + 0.5 -- ) -- > 64.0 -- ); +- return this.field_145850_b.func_175625_s(this.field_174879_c) != this +- ? false +- : !( +- p_70300_1_.func_70092_e( +- (double)this.field_174879_c.func_177958_n() + 0.5, +- (double)this.field_174879_c.func_177956_o() + 0.5, +- (double)this.field_174879_c.func_177952_p() + 0.5 +- ) +- > 64.0 +- ); ++ if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) ++ { ++ return false; ++ } ++ else ++ { + return p_70300_1_.func_70092_e((double)this.field_174879_c.func_177958_n() + 0.5D, (double)this.field_174879_c.func_177956_o() + 0.5D, (double)this.field_174879_c.func_177952_p() + 0.5D) <= 64.0D; - } ++ } } - @Override @@ -299,7 +320,7 @@ public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) { if (p_94041_1_ == 2) -@@ -464,7 +446,6 @@ +@@ -457,7 +446,6 @@ } } @@ -307,7 +328,7 @@ public int[] func_180463_a(EnumFacing p_180463_1_) { if (p_180463_1_ == EnumFacing.DOWN) -@@ -477,13 +458,11 @@ +@@ -470,13 +458,11 @@ } } @@ -321,7 +342,7 @@ public boolean func_180461_b(int p_180461_1_, ItemStack p_180461_2_, EnumFacing p_180461_3_) { if (p_180461_3_ == EnumFacing.DOWN && p_180461_1_ == 1) -@@ -499,19 +478,16 @@ +@@ -492,19 +478,16 @@ return true; } @@ -341,7 +362,7 @@ public int func_174887_a_(int p_174887_1_) { switch (p_174887_1_) -@@ -529,7 +505,6 @@ +@@ -522,7 +505,6 @@ } } @@ -349,7 +370,7 @@ public void func_174885_b(int p_174885_1_, int p_174885_2_) { switch (p_174885_1_) -@@ -548,15 +523,32 @@ +@@ -541,15 +523,32 @@ } } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch index 778a3cee7..8048bafa4 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch @@ -60,7 +60,7 @@ this.func_190576_q().set(p_70299_1_, p_70299_2_); if (p_70299_2_.func_190916_E() > this.func_70297_j_()) -@@ -103,19 +99,16 @@ +@@ -103,24 +99,21 @@ } } @@ -80,6 +80,12 @@ public void func_73660_a() { if (this.field_145850_b != null && !this.field_145850_b.field_72995_K) + { +- this.field_145901_j--; ++ --this.field_145901_j; + this.field_190578_g = this.field_145850_b.func_82737_E(); + + if (!this.func_145888_j()) @@ -178,7 +171,6 @@ return true; } @@ -96,6 +102,15 @@ IInventory iinventory = this.func_145895_l(); if (iinventory == null) +@@ -215,7 +208,7 @@ + } + else + { +- for (int i = 0; i < this.func_70302_i_(); i++) ++ for (int i = 0; i < this.func_70302_i_(); ++i) + { + if (!this.func_70301_a(i).func_190926_b()) + { @@ -244,23 +237,9 @@ ISidedInventory isidedinventory = (ISidedInventory)p_174919_1_; int[] aint = isidedinventory.func_180463_a(p_174919_2_); @@ -114,7 +129,7 @@ - { - int j = p_174919_1_.func_70302_i_(); - -- for (int k = 0; k < j; ++k) +- for (int k = 0; k < j; k++) - { - ItemStack itemstack1 = p_174919_1_.func_70301_a(k); + for (int k : aint) @@ -144,6 +159,15 @@ return true; } +@@ -291,7 +284,7 @@ + { + int j = p_174917_0_.func_70302_i_(); + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + if (!p_174917_0_.func_70301_a(k).func_190926_b()) + { @@ -305,6 +298,8 @@ public static boolean func_145891_a(IHopper p_145891_0_) @@ -153,6 +177,15 @@ IInventory iinventory = func_145884_b(p_145891_0_); if (iinventory != null) +@@ -333,7 +328,7 @@ + { + int j = iinventory.func_70302_i_(); + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + if (func_174915_a(p_145891_0_, iinventory, k, enumfacing)) + { @@ -344,11 +339,9 @@ } else @@ -198,7 +231,43 @@ public static ItemStack func_174918_a(IInventory p_174918_0_, IInventory p_174918_1_, ItemStack p_174918_2_, @Nullable EnumFacing p_174918_3_) { if (p_174918_1_ instanceof ISidedInventory && p_174918_3_ != null) -@@ -506,26 +505,17 @@ +@@ -413,7 +412,7 @@ + ISidedInventory isidedinventory = (ISidedInventory)p_174918_1_; + int[] aint = isidedinventory.func_180463_a(p_174918_3_); + +- for (int k = 0; k < aint.length && !p_174918_2_.func_190926_b(); k++) ++ for (int k = 0; k < aint.length && !p_174918_2_.func_190926_b(); ++k) + { + p_174918_2_ = func_174916_c(p_174918_0_, p_174918_1_, p_174918_2_, aint[k], p_174918_3_); + } +@@ -422,7 +421,7 @@ + { + int i = p_174918_1_.func_70302_i_(); + +- for (int j = 0; j < i && !p_174918_2_.func_190926_b(); j++) ++ for (int j = 0; j < i && !p_174918_2_.func_190926_b(); ++j) + { + p_174918_2_ = func_174916_c(p_174918_0_, p_174918_1_, p_174918_2_, j, p_174918_3_); + } +@@ -433,9 +432,14 @@ + + private static boolean func_174920_a(IInventory p_174920_0_, ItemStack p_174920_1_, int p_174920_2_, EnumFacing p_174920_3_) + { +- return !p_174920_0_.func_94041_b(p_174920_2_, p_174920_1_) +- ? false +- : !(p_174920_0_ instanceof ISidedInventory) || ((ISidedInventory)p_174920_0_).func_180462_a(p_174920_2_, p_174920_1_, p_174920_3_); ++ if (!p_174920_0_.func_94041_b(p_174920_2_, p_174920_1_)) ++ { ++ return false; ++ } ++ else ++ { ++ return !(p_174920_0_ instanceof ISidedInventory) || ((ISidedInventory)p_174920_0_).func_180462_a(p_174920_2_, p_174920_1_, p_174920_3_); ++ } + } + + private static boolean func_174921_b(IInventory p_174921_0_, ItemStack p_174921_1_, int p_174921_2_, EnumFacing p_174921_3_) +@@ -501,26 +505,17 @@ private IInventory func_145895_l() { EnumFacing enumfacing = BlockHopper.func_176428_b(this.func_145832_p()); @@ -228,7 +297,7 @@ } public static IInventory func_145893_b(World p_145893_0_, double p_145893_1_, double p_145893_3_, double p_145893_5_) -@@ -535,9 +525,10 @@ +@@ -530,9 +525,10 @@ int j = MathHelper.func_76128_c(p_145893_3_); int k = MathHelper.func_76128_c(p_145893_5_); BlockPos blockpos = new BlockPos(i, j, k); @@ -241,7 +310,7 @@ { TileEntity tileentity = p_145893_0_.func_175625_s(blockpos); -@@ -554,11 +545,7 @@ +@@ -549,11 +545,7 @@ if (iinventory == null) { @@ -254,7 +323,18 @@ if (!list.isEmpty()) { -@@ -589,22 +576,19 @@ +@@ -574,28 +566,29 @@ + { + return false; + } ++ else if (p_145894_0_.func_190916_E() > p_145894_0_.func_77976_d()) ++ { ++ return false; ++ } + else + { +- return p_145894_0_.func_190916_E() > p_145894_0_.func_77976_d() ? false : ItemStack.func_77970_a(p_145894_0_, p_145894_1_); ++ return ItemStack.func_77970_a(p_145894_0_, p_145894_1_); } } @@ -280,7 +360,7 @@ } public void func_145896_c(int p_145896_1_) -@@ -622,22 +606,21 @@ +@@ -613,22 +606,21 @@ return this.field_145901_j > 8; } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityLockableLoot.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityLockableLoot.java.patch index b2b40f705..15dfe6e0c 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityLockableLoot.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityLockableLoot.java.patch @@ -65,28 +65,31 @@ this.func_190576_q().set(p_70299_1_, p_70299_2_); if (p_70299_2_.func_190916_E() > this.func_70297_j_()) -@@ -145,7 +139,6 @@ +@@ -145,58 +139,48 @@ this.func_70296_d(); } - @Override public boolean func_70300_a(EntityPlayer p_70300_1_) { - if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) -@@ -154,54 +147,40 @@ - } - else - { -- return !( -- p_70300_1_.func_70092_e( -- (double)this.field_174879_c.func_177958_n() + 0.5, -- (double)this.field_174879_c.func_177956_o() + 0.5, -- (double)this.field_174879_c.func_177952_p() + 0.5 -- ) -- > 64.0 -- ); +- return this.field_145850_b.func_175625_s(this.field_174879_c) != this +- ? false +- : !( +- p_70300_1_.func_70092_e( +- (double)this.field_174879_c.func_177958_n() + 0.5, +- (double)this.field_174879_c.func_177956_o() + 0.5, +- (double)this.field_174879_c.func_177952_p() + 0.5 +- ) +- > 64.0 +- ); ++ if (this.field_145850_b.func_175625_s(this.field_174879_c) != this) ++ { ++ return false; ++ } ++ else ++ { + return p_70300_1_.func_70092_e((double)this.field_174879_c.func_177958_n() + 0.5D, (double)this.field_174879_c.func_177956_o() + 0.5D, (double)this.field_174879_c.func_177952_p() + 0.5D) <= 64.0D; - } ++ } } - @Override diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch index 14620eb15..079d94318 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityPiston.java.patch @@ -14,7 +14,7 @@ public int func_145832_p() { return 0; -@@ -125,44 +123,29 @@ +@@ -125,46 +123,31 @@ { p_184319_3_ = this.func_184320_e(p_184319_3_); IBlockState iblockstate = this.func_190606_j(); @@ -63,17 +63,23 @@ - boolean flag = this.field_174932_a.func_177230_c() == Blocks.field_180399_cE; + boolean flag = this.field_174932_a.func_177230_c().isStickyBlock(this.field_174932_a); - for (int i = 0; i < list1.size(); ++i) +- for (int i = 0; i < list1.size(); i++) ++ for (int i = 0; i < list1.size(); ++i) { -@@ -185,7 +168,7 @@ + Entity entity = list1.get(i); + +@@ -185,9 +168,9 @@ } } - double d1 = 0.0; + double d1 = 0.0D; - for (int j = 0; j < list.size(); ++j) +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) { + AxisAlignedBB axisalignedbb1 = this.func_190610_a(this.func_190607_a(list.get(j)), enumfacing, d0); + AxisAlignedBB axisalignedbb2 = entity.func_174813_aQ(); @@ -203,16 +186,11 @@ } } @@ -300,9 +306,12 @@ } else { -@@ -493,7 +409,7 @@ +@@ -491,9 +407,9 @@ + double d2 = (double)((float)this.field_174931_f.func_82599_e() * f); + iblockstate.func_185908_a(p_190609_1_, p_190609_2_, p_190609_3_.func_72317_d(-d0, -d1, -d2), p_190609_4_, p_190609_5_, true); - for (int j = i; j < p_190609_4_.size(); ++j) +- for (int j = i; j < p_190609_4_.size(); j++) ++ for (int j = i; j < p_190609_4_.size(); ++j) { - p_190609_4_.set(j, p_190609_4_.get(j).func_72317_d(d0, d1, d2)); + p_190609_4_.set(j, ((AxisAlignedBB)p_190609_4_.get(j)).func_72317_d(d0, d1, d2)); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityShulkerBox.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityShulkerBox.java.patch index 5c2b4bc01..8dcfcd28e 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityShulkerBox.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityShulkerBox.java.patch @@ -60,7 +60,7 @@ } private void func_190589_G() -@@ -131,9 +126,9 @@ +@@ -131,21 +126,21 @@ if (iblockstate.func_177230_c() instanceof BlockShulkerBox) { @@ -72,7 +72,10 @@ if (!list.isEmpty()) { -@@ -143,9 +138,9 @@ +- for (int i = 0; i < list.size(); i++) ++ for (int i = 0; i < list.size(); ++i) + { + Entity entity = list.get(i); if (entity.func_184192_z() != EnumPushReaction.IGNORE) { @@ -148,7 +151,13 @@ public void func_174889_b(EntityPlayer p_174889_1_) { if (!p_174889_1_.func_175149_v()) -@@ -254,20 +240,11 @@ +@@ -249,60 +235,40 @@ + this.field_190598_h = 0; + } + +- this.field_190598_h++; ++ ++this.field_190598_h; + this.field_145850_b.func_175641_c(this.field_174879_c, this.func_145838_q(), 1, this.field_190598_h); if (this.field_190598_h == 1) { @@ -170,7 +179,10 @@ public void func_174886_c(EntityPlayer p_174886_1_) { if (!p_174886_1_.func_175149_v()) -@@ -277,32 +254,21 @@ + { +- this.field_190598_h--; ++ --this.field_190598_h; + this.field_145850_b.func_175641_c(this.field_174879_c, this.func_145838_q(), 1, this.field_190598_h); if (this.field_190598_h <= 0) { diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch index 3a5c8b9c4..7380ca9e4 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntitySign.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/tileentity/TileEntitySign.java +++ after/net/minecraft/tileentity/TileEntitySign.java -@@ -22,16 +22,12 @@ +@@ -22,21 +22,17 @@ public class TileEntitySign extends TileEntity { @@ -18,7 +18,13 @@ public NBTTagCompound func_189515_b(NBTTagCompound p_189515_1_) { super.func_189515_b(p_189515_1_); -@@ -46,49 +42,37 @@ + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + String s = ITextComponent.Serializer.func_150696_a(this.field_145915_a[i]); + p_189515_1_.func_74778_a("Text" + (i + 1), s); +@@ -46,65 +42,53 @@ return p_189515_1_; } @@ -70,7 +76,14 @@ public MinecraftServer func_184102_h() { return TileEntitySign.this.field_145850_b.func_73046_m(); -@@ -102,9 +86,9 @@ + } + }; + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + String s = p_145839_1_.func_74779_i("Text" + (i + 1)); + ITextComponent itextcomponent = ITextComponent.Serializer.func_150699_a(s); try { diff --git a/patches/minecraft/net/minecraft/util/IntIdentityHashBiMap.java.patch b/patches/minecraft/net/minecraft/util/IntIdentityHashBiMap.java.patch index bd34af2d0..ad16cfcc2 100644 --- a/patches/minecraft/net/minecraft/util/IntIdentityHashBiMap.java.patch +++ b/patches/minecraft/net/minecraft/util/IntIdentityHashBiMap.java.patch @@ -9,6 +9,24 @@ } private int func_186805_c(int p_186805_1_) +@@ -53,7 +53,7 @@ + { + while (this.field_186821_e < this.field_186820_d.length && this.field_186820_d[this.field_186821_e] != null) + { +- this.field_186821_e++; ++ ++this.field_186821_e; + } + + return this.field_186821_e; +@@ -69,7 +69,7 @@ + this.field_186821_e = 0; + this.field_186822_f = 0; + +- for (int i = 0; i < ak.length; i++) ++ for (int i = 0; i < ak.length; ++i) + { + if (ak[i] != null) + { @@ -84,11 +84,11 @@ if ((float)i >= (float)this.field_186818_b.length * 0.8F) @@ -24,7 +42,19 @@ } this.func_186807_d(j); -@@ -108,7 +108,7 @@ +@@ -98,22 +98,22 @@ + this.field_186818_b[k] = p_186814_1_; + this.field_186819_c[k] = p_186814_2_; + this.field_186820_d[p_186814_2_] = p_186814_1_; +- this.field_186822_f++; ++ ++this.field_186822_f; + + if (p_186814_2_ == this.field_186821_e) + { +- this.field_186821_e++; ++ ++this.field_186821_e; + } + } private int func_186811_d(@Nullable K p_186811_1_) { @@ -33,6 +63,39 @@ } private int func_186816_b(@Nullable K p_186816_1_, int p_186816_2_) + { +- for (int i = p_186816_2_; i < this.field_186818_b.length; i++) ++ for (int i = p_186816_2_; i < this.field_186818_b.length; ++i) + { + if (this.field_186818_b[i] == p_186816_1_) + { +@@ -126,7 +126,7 @@ + } + } + +- for (int j = 0; j < p_186816_2_; j++) ++ for (int j = 0; j < p_186816_2_; ++j) + { + if (this.field_186818_b[j] == p_186816_1_) + { +@@ -144,7 +144,7 @@ + + private int func_186806_e(int p_186806_1_) + { +- for (int i = p_186806_1_; i < this.field_186818_b.length; i++) ++ for (int i = p_186806_1_; i < this.field_186818_b.length; ++i) + { + if (this.field_186818_b[i] == field_186817_a) + { +@@ -152,7 +152,7 @@ + } + } + +- for (int j = 0; j < p_186806_1_; j++) ++ for (int j = 0; j < p_186806_1_; ++j) + { + if (this.field_186818_b[j] == field_186817_a) + { @@ -163,17 +163,15 @@ throw new RuntimeException("Overflowed :("); } diff --git a/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch b/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch index 2f957f9f9..90455a7bb 100644 --- a/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch +++ b/patches/minecraft/net/minecraft/util/ScreenShotHelper.java.patch @@ -50,3 +50,12 @@ if (OpenGlHelper.func_148822_b()) { +@@ -118,7 +121,7 @@ + return file1; + } + +- i++; ++ ++i; + } + } + } diff --git a/patches/minecraft/net/minecraft/util/ServerRecipeBookHelper.java.patch b/patches/minecraft/net/minecraft/util/ServerRecipeBookHelper.java.patch index 0d5fd0888..4c6238e7e 100644 --- a/patches/minecraft/net/minecraft/util/ServerRecipeBookHelper.java.patch +++ b/patches/minecraft/net/minecraft/util/ServerRecipeBookHelper.java.patch @@ -29,7 +29,16 @@ { this.func_194329_b(); } -@@ -113,7 +119,7 @@ +@@ -83,7 +89,7 @@ + { + InventoryPlayer inventoryplayer = this.field_194332_c.field_71071_by; + +- for (int i = 0; i < this.field_194336_g.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_194336_g.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_194336_g.func_70301_a(i); + +@@ -113,13 +119,13 @@ private void func_194329_b() { boolean flag = this.field_194333_d.func_77569_a(this.field_194336_g, this.field_194332_c.field_70170_p); @@ -38,6 +47,13 @@ if (flag) { + boolean flag1 = true; + +- for (int j = 0; j < this.field_194336_g.func_70302_i_(); j++) ++ for (int j = 0; j < this.field_194336_g.func_70302_i_(); ++j) + { + ItemStack itemstack = this.field_194336_g.func_70301_a(j); + @@ -141,9 +147,11 @@ if (this.field_194331_b.func_194118_a(this.field_194333_d, intlist, i1)) { @@ -51,7 +67,25 @@ int l = RecipeItemHelper.func_194115_b(k).func_77976_d(); if (l < j1) -@@ -196,11 +204,11 @@ +@@ -172,7 +180,7 @@ + { + i = 64; + +- for (int j = 0; j < this.field_194336_g.func_70302_i_(); j++) ++ for (int j = 0; j < this.field_194336_g.func_70302_i_(); ++j) + { + ItemStack itemstack = this.field_194336_g.func_70301_a(j); + +@@ -184,7 +192,7 @@ + + if (i < 64) + { +- i++; ++ ++i; + } + } + +@@ -196,19 +204,19 @@ int i = this.field_194336_g.func_174922_i(); int j = this.field_194336_g.func_174923_h(); @@ -67,7 +101,17 @@ } int j1 = 1; -@@ -217,7 +225,7 @@ + Iterator iterator = p_194323_2_.iterator(); + +- for (int k = 0; k < this.field_194336_g.func_174922_i() && j != k; k++) ++ for (int k = 0; k < this.field_194336_g.func_174922_i() && j != k; ++k) + { +- for (int l = 0; l < this.field_194336_g.func_174923_h(); l++) ++ for (int l = 0; l < this.field_194336_g.func_174923_h(); ++l) + { + if (i == l || !iterator.hasNext()) + { +@@ -217,20 +225,20 @@ } Slot slot = this.field_194337_h.get(j1); @@ -76,3 +120,28 @@ if (itemstack.func_190926_b()) { +- j1++; ++ ++j1; + } + else + { +- for (int i1 = 0; i1 < p_194323_1_; i1++) ++ for (int i1 = 0; i1 < p_194323_1_; ++i1) + { + this.func_194325_a(slot, itemstack); + } + +- j1++; ++ ++j1; + } + } + +@@ -279,7 +287,7 @@ + { + InventoryPlayer inventoryplayer = this.field_194332_c.field_71071_by; + +- for (int i = 0; i < this.field_194336_g.func_70302_i_(); i++) ++ for (int i = 0; i < this.field_194336_g.func_70302_i_(); ++i) + { + ItemStack itemstack = this.field_194336_g.func_70301_a(i); + diff --git a/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch b/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch index 7ff287415..2c7267a10 100644 --- a/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch +++ b/patches/minecraft/net/minecraft/util/datafix/DataFixesManager.java.patch @@ -8,3 +8,12 @@ WorldInfo.func_189967_a(datafixer); EntityPlayerMP.func_191522_a(datafixer); EntityPlayer.func_189806_a(datafixer); +@@ -272,7 +273,7 @@ + { + NBTTagList nbttaglist = p_188278_1_.func_150295_c(p_188278_3_, 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + nbttaglist.func_150304_a(i, p_188278_0_.func_188251_a(FixTypes.ITEM_INSTANCE, nbttaglist.func_150305_b(i), p_188278_2_)); + } diff --git a/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch b/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch index a2cfdb162..714d7a020 100644 --- a/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch +++ b/patches/minecraft/net/minecraft/util/math/Vec3d.java.patch @@ -152,7 +152,19 @@ public boolean equals(Object p_equals_1_) { if (this == p_equals_1_) -@@ -214,7 +198,6 @@ +@@ -203,14 +187,17 @@ + { + return false; + } ++ else if (Double.compare(vec3d.field_72448_b, this.field_72448_b) != 0) ++ { ++ return false; ++ } + else + { +- return Double.compare(vec3d.field_72448_b, this.field_72448_b) != 0 ? false : Double.compare(vec3d.field_72449_c, this.field_72449_c) == 0; ++ return Double.compare(vec3d.field_72449_c, this.field_72449_c) == 0; + } } } @@ -160,7 +172,7 @@ public int hashCode() { long j = Double.doubleToLongBits(this.field_72450_a); -@@ -222,10 +205,10 @@ +@@ -218,10 +205,10 @@ j = Double.doubleToLongBits(this.field_72448_b); i = 31 * i + (int)(j ^ j >>> 32); j = Double.doubleToLongBits(this.field_72449_c); @@ -173,7 +185,7 @@ public String toString() { return "(" + this.field_72450_a + ", " + this.field_72448_b + ", " + this.field_72449_c + ")"; -@@ -251,19 +234,17 @@ +@@ -247,19 +234,17 @@ return new Vec3d(d0, d1, d2); } diff --git a/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch b/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch index 5cb387b62..177250dd6 100644 --- a/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch +++ b/patches/minecraft/net/minecraft/util/text/ITextComponent.java.patch @@ -8,6 +8,15 @@ String func_150254_d(); List func_150253_a(); +@@ -97,7 +96,7 @@ + JsonArray jsonarray = jsonobject.getAsJsonArray("with"); + Object[] aobject = new Object[jsonarray.size()]; + +- for (int i = 0; i < aobject.length; i++) ++ for (int i = 0; i < aobject.length; ++i) + { + aobject[i] = this.deserialize(jsonarray.get(i), p_deserialize_2_, p_deserialize_3_); + @@ -116,7 +115,7 @@ } else @@ -17,7 +26,14 @@ } } else if (jsonobject.has("score")) -@@ -164,7 +163,7 @@ +@@ -158,13 +157,13 @@ + throw new JsonParseException("Unexpected empty array of components"); + } + +- for (int j = 0; j < jsonarray2.size(); j++) ++ for (int j = 0; j < jsonarray2.size(); ++j) + { + itextcomponent.func_150257_a(this.deserialize(jsonarray2.get(j), p_deserialize_2_, p_deserialize_3_)); } } diff --git a/patches/minecraft/net/minecraft/village/Village.java.patch b/patches/minecraft/net/minecraft/village/Village.java.patch index 401fc17bd..a273933db 100644 --- a/patches/minecraft/net/minecraft/village/Village.java.patch +++ b/patches/minecraft/net/minecraft/village/Village.java.patch @@ -35,9 +35,20 @@ } public void func_82691_a(World p_82691_1_) -@@ -91,9 +93,7 @@ +@@ -82,18 +84,16 @@ + EntityIronGolem entityirongolem = new EntityIronGolem(this.field_75586_a); + entityirongolem.func_70107_b(vec3d.field_72450_a, vec3d.field_72448_b, vec3d.field_72449_c); + this.field_75586_a.func_72838_d(entityirongolem); +- this.field_75587_j++; ++ ++this.field_75587_j; + } + } + } + + private Vec3d func_179862_a(BlockPos p_179862_1_, int p_179862_2_, int p_179862_3_, int p_179862_4_) { - for (int i = 0; i < 10; ++i) +- for (int i = 0; i < 10; i++) ++ for (int i = 0; i < 10; ++i) { - BlockPos blockpos = p_179862_1_.func_177982_a( - this.field_75586_a.field_73012_v.nextInt(16) - 8, this.field_75586_a.field_73012_v.nextInt(6) - 3, this.field_75586_a.field_73012_v.nextInt(16) - 8 @@ -46,6 +57,21 @@ if (this.func_179866_a(blockpos) && this.func_179861_a(new BlockPos(p_179862_2_, p_179862_3_, p_179862_4_), blockpos)) { +@@ -115,11 +115,11 @@ + int i = p_179861_2_.func_177958_n() - p_179861_1_.func_177958_n() / 2; + int j = p_179861_2_.func_177952_p() - p_179861_1_.func_177952_p() / 2; + +- for (int k = i; k < i + p_179861_1_.func_177958_n(); k++) ++ for (int k = i; k < i + p_179861_1_.func_177958_n(); ++k) + { +- for (int l = p_179861_2_.func_177956_o(); l < p_179861_2_.func_177956_o() + p_179861_1_.func_177956_o(); l++) ++ for (int l = p_179861_2_.func_177956_o(); l < p_179861_2_.func_177956_o() + p_179861_1_.func_177956_o(); ++l) + { +- for (int i1 = j; i1 < j + p_179861_1_.func_177952_p(); i1++) ++ for (int i1 = j; i1 < j + p_179861_1_.func_177952_p(); ++i1) + { + if (this.field_75586_a.func_180495_p(new BlockPos(k, l, i1)).func_185915_l()) + { @@ -135,35 +135,13 @@ private void func_75579_h() @@ -128,7 +154,13 @@ { return villagedoorinfo; } -@@ -336,7 +297,7 @@ +@@ -331,12 +292,12 @@ + double d0 = Double.MAX_VALUE; + Village.VillageAggressor village$villageaggressor = null; + +- for (int i = 0; i < this.field_75589_i.size(); i++) ++ for (int i = 0; i < this.field_75589_i.size(); ++i) + { Village.VillageAggressor village$villageaggressor1 = this.field_75589_i.get(i); double d1 = village$villageaggressor1.field_75592_a.func_70068_e(p_75571_1_); @@ -167,7 +199,24 @@ if (!this.func_179860_f(villagedoorinfo.func_179852_d()) || Math.abs(this.field_75581_g - villagedoorinfo.func_75473_b()) > 1200) { this.field_75585_c = this.field_75585_c.func_177973_b(villagedoorinfo.func_179852_d()); -@@ -444,9 +406,7 @@ +@@ -422,7 +384,15 @@ + { + IBlockState iblockstate = this.field_75586_a.func_180495_p(p_179860_1_); + Block block = iblockstate.func_177230_c(); +- return block instanceof BlockDoor ? iblockstate.func_185904_a() == Material.field_151575_d : false; ++ ++ if (block instanceof BlockDoor) ++ { ++ return iblockstate.func_185904_a() == Material.field_151575_d; ++ } ++ else ++ { ++ return false; ++ } + } + + private void func_75573_l() +@@ -436,9 +406,7 @@ } else { @@ -178,7 +227,7 @@ int j = 0; for (VillageDoorInfo villagedoorinfo : this.field_75584_b) -@@ -458,23 +418,49 @@ +@@ -450,23 +418,49 @@ } } @@ -234,8 +283,12 @@ } public void func_82690_a(NBTTagCompound p_82690_1_) -@@ -492,12 +478,7 @@ - for (int i = 0; i < nbttaglist.func_74745_c(); ++i) +@@ -481,39 +475,30 @@ + this.field_75585_c = new BlockPos(p_82690_1_.func_74762_e("ACX"), p_82690_1_.func_74762_e("ACY"), p_82690_1_.func_74762_e("ACZ")); + NBTTagList nbttaglist = p_82690_1_.func_150295_c("Doors", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) { NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i); - VillageDoorInfo villagedoorinfo = new VillageDoorInfo( @@ -248,7 +301,10 @@ this.field_75584_b.add(villagedoorinfo); } -@@ -507,21 +488,17 @@ + NBTTagList nbttaglist1 = p_82690_1_.func_150295_c("Players", 10); + +- for (int j = 0; j < nbttaglist1.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist1.func_74745_c(); ++j) { NBTTagCompound nbttagcompound1 = nbttaglist1.func_150305_b(j); @@ -275,7 +331,7 @@ } public void func_82689_b(NBTTagCompound p_82689_1_) -@@ -555,28 +532,26 @@ +@@ -547,28 +532,26 @@ p_82689_1_.func_74782_a("Doors", nbttaglist); NBTTagList nbttaglist1 = new NBTTagList(); @@ -310,7 +366,7 @@ } public void func_82692_h() -@@ -591,9 +566,9 @@ +@@ -583,9 +566,9 @@ public void func_82683_b(int p_82683_1_) { @@ -322,7 +378,7 @@ } } -@@ -608,4 +583,31 @@ +@@ -600,4 +583,31 @@ this.field_75590_b = p_i1674_3_; } } diff --git a/patches/minecraft/net/minecraft/village/VillageCollection.java.patch b/patches/minecraft/net/minecraft/village/VillageCollection.java.patch index 792e9997e..2dfef4af5 100644 --- a/patches/minecraft/net/minecraft/village/VillageCollection.java.patch +++ b/patches/minecraft/net/minecraft/village/VillageCollection.java.patch @@ -13,6 +13,15 @@ private int field_75553_e; public VillageCollection(String p_i1677_1_) +@@ -59,7 +59,7 @@ + + public void func_75544_a() + { +- this.field_75553_e++; ++ ++this.field_75553_e; + + for (Village village : this.field_75552_d) + { @@ -100,17 +100,17 @@ public Village func_176056_a(BlockPos p_176056_1_, int p_176056_2_) { @@ -34,7 +43,16 @@ { village = village1; d0 = d1; -@@ -151,6 +151,7 @@ +@@ -131,7 +131,7 @@ + + private void func_75545_e() + { +- for (int i = 0; i < this.field_75555_c.size(); i++) ++ for (int i = 0; i < this.field_75555_c.size(); ++i) + { + VillageDoorInfo villagedoorinfo = this.field_75555_c.get(i); + Village village = this.func_176056_a(villagedoorinfo.func_179852_d(), 32); +@@ -151,15 +151,16 @@ private void func_180609_b(BlockPos p_180609_1_) { @@ -42,6 +60,18 @@ int i = 16; int j = 4; int k = 16; + +- for (int l = -16; l < 16; l++) ++ for (int l = -16; l < 16; ++l) + { +- for (int i1 = -4; i1 < 4; i1++) ++ for (int i1 = -4; i1 < 4; ++i1) + { +- for (int j1 = -16; j1 < 16; j1++) ++ for (int j1 = -16; j1 < 16; ++j1) + { + BlockPos blockpos = p_180609_1_.func_177982_a(l, i1, j1); + @@ -186,9 +187,7 @@ { for (VillageDoorInfo villagedoorinfo : this.field_75555_c) @@ -53,7 +83,12 @@ { return villagedoorinfo; } -@@ -228,7 +227,9 @@ +@@ -224,11 +223,13 @@ + { + int i = 0; + +- for (int j = 1; j <= 5; j++) ++ for (int j = 1; j <= 5; ++j) { if (this.field_75556_a.func_175678_i(p_176061_1_.func_177967_a(p_176061_2_, j))) { @@ -64,15 +99,34 @@ { return i; } -@@ -266,7 +267,6 @@ - } +@@ -255,16 +256,23 @@ + { + IBlockState iblockstate = this.field_75556_a.func_180495_p(p_176058_1_); + Block block = iblockstate.func_177230_c(); +- return block instanceof BlockDoor ? iblockstate.func_185904_a() == Material.field_151575_d : false; ++ ++ if (block instanceof BlockDoor) ++ { ++ return iblockstate.func_185904_a() == Material.field_151575_d; ++ } ++ else ++ { ++ return false; ++ } } - @Override public void func_76184_a(NBTTagCompound p_76184_1_) { this.field_75553_e = p_76184_1_.func_74762_e("Tick"); -@@ -281,7 +281,6 @@ + NBTTagList nbttaglist = p_76184_1_.func_150295_c("Villages", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i); + Village village = new Village(); +@@ -273,7 +281,6 @@ } } diff --git a/patches/minecraft/net/minecraft/village/VillageSiege.java.patch b/patches/minecraft/net/minecraft/village/VillageSiege.java.patch index 909c67454..0d31c6b95 100644 --- a/patches/minecraft/net/minecraft/village/VillageSiege.java.patch +++ b/patches/minecraft/net/minecraft/village/VillageSiege.java.patch @@ -20,7 +20,25 @@ { return; } -@@ -89,16 +92,23 @@ +@@ -67,7 +70,7 @@ + + if (this.field_75534_e > 0) + { +- this.field_75534_e--; ++ --this.field_75534_e; + } + else + { +@@ -76,7 +79,7 @@ + if (this.field_75533_d > 0) + { + this.func_75530_c(); +- this.field_75533_d--; ++ --this.field_75533_d; + } + else + { +@@ -89,27 +92,34 @@ private boolean func_75529_b() { @@ -49,9 +67,10 @@ { BlockPos blockpos = this.field_75531_f.func_180608_a(); float f = (float)this.field_75531_f.func_75568_b(); -@@ -106,10 +116,10 @@ + boolean flag = false; - for (int i = 0; i < 10; ++i) +- for (int i = 0; i < 10; i++) ++ for (int i = 0; i < 10; ++i) { - float f1 = this.field_75537_a.field_73012_v.nextFloat() * (float)(Math.PI * 2); - this.field_75532_g = blockpos.func_177958_n() + (int)((double)(MathHelper.func_76134_b(f1) * f) * 0.9); @@ -93,9 +112,12 @@ } catch (Exception exception) { -@@ -183,12 +194,9 @@ +@@ -181,14 +192,11 @@ + @Nullable + private Vec3d func_179867_a(BlockPos p_179867_1_) { - for (int i = 0; i < 10; ++i) +- for (int i = 0; i < 10; i++) ++ for (int i = 0; i < 10; ++i) { - BlockPos blockpos = p_179867_1_.func_177982_a( - this.field_75537_a.field_73012_v.nextInt(16) - 8, this.field_75537_a.field_73012_v.nextInt(6) - 3, this.field_75537_a.field_73012_v.nextInt(16) - 8 diff --git a/patches/minecraft/net/minecraft/world/ChunkCache.java.patch b/patches/minecraft/net/minecraft/world/ChunkCache.java.patch index bfbfa5e38..49bb776c8 100644 --- a/patches/minecraft/net/minecraft/world/ChunkCache.java.patch +++ b/patches/minecraft/net/minecraft/world/ChunkCache.java.patch @@ -1,5 +1,27 @@ --- before/net/minecraft/world/ChunkCache.java +++ after/net/minecraft/world/ChunkCache.java +@@ -30,17 +30,17 @@ + this.field_72817_c = new Chunk[i - this.field_72818_a + 1][j - this.field_72816_b + 1]; + this.field_72814_d = true; + +- for (int k = this.field_72818_a; k <= i; k++) ++ for (int k = this.field_72818_a; k <= i; ++k) + { +- for (int l = this.field_72816_b; l <= j; l++) ++ for (int l = this.field_72816_b; l <= j; ++l) + { + this.field_72817_c[k - this.field_72818_a][l - this.field_72816_b] = p_i45746_1_.func_72964_e(k, l); + } + } + +- for (int i1 = p_i45746_2_.func_177958_n() >> 4; i1 <= p_i45746_3_.func_177958_n() >> 4; i1++) ++ for (int i1 = p_i45746_2_.func_177958_n() >> 4; i1 <= p_i45746_3_.func_177958_n() >> 4; ++i1) + { +- for (int j1 = p_i45746_2_.func_177952_p() >> 4; j1 <= p_i45746_3_.func_177952_p() >> 4; j1++) ++ for (int j1 = p_i45746_2_.func_177952_p() >> 4; j1 <= p_i45746_3_.func_177952_p() >> 4; ++j1) + { + Chunk chunk = this.field_72817_c[i1 - this.field_72818_a][j1 - this.field_72816_b]; + @@ -59,10 +59,9 @@ } diff --git a/patches/minecraft/net/minecraft/world/Explosion.java.patch b/patches/minecraft/net/minecraft/world/Explosion.java.patch index e825937d1..e5f40a709 100644 --- a/patches/minecraft/net/minecraft/world/Explosion.java.patch +++ b/patches/minecraft/net/minecraft/world/Explosion.java.patch @@ -63,7 +63,7 @@ this.field_77287_j = p_i45754_1_; this.field_77283_e = p_i45754_2_; this.field_77280_f = p_i45754_9_; -@@ -86,11 +69,12 @@ +@@ -86,18 +69,19 @@ this.field_77282_d = p_i45754_7_; this.field_77286_a = p_i45754_10_; this.field_82755_b = p_i45754_11_; @@ -76,7 +76,17 @@ + Set set = Sets.newHashSet(); int i = 16; - for (int j = 0; j < 16; ++j) +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { +- for (int l = 0; l < 16; l++) ++ for (int l = 0; l < 16; ++l) + { + if (j == 0 || j == 15 || k == 0 || k == 15 || l == 0 || l == 15) + { @@ -105,9 +89,9 @@ double d1 = (double)((float)k / 15.0F * 2.0F - 1.0F); double d2 = (double)((float)l / 15.0F * 2.0F - 1.0F); @@ -114,7 +124,7 @@ } } } -@@ -142,14 +124,14 @@ +@@ -142,17 +124,17 @@ this.field_77281_g.addAll(set); float f3 = this.field_77280_f * 2.0F; @@ -136,7 +146,11 @@ + net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(this.field_77287_j, this, list, f3); Vec3d vec3d = new Vec3d(this.field_77284_b, this.field_77285_c, this.field_77282_d); - for (int k2 = 0; k2 < list.size(); ++k2) +- for (int k2 = 0; k2 < list.size(); k2++) ++ for (int k2 = 0; k2 < list.size(); ++k2) + { + Entity entity = list.get(k2); + @@ -160,21 +142,21 @@ { double d12 = entity.func_70011_f(this.field_77284_b, this.field_77285_c, this.field_77282_d) / (double)f3; diff --git a/patches/minecraft/net/minecraft/world/Teleporter.java.patch b/patches/minecraft/net/minecraft/world/Teleporter.java.patch index 14c8c0345..87d2f6837 100644 --- a/patches/minecraft/net/minecraft/world/Teleporter.java.patch +++ b/patches/minecraft/net/minecraft/world/Teleporter.java.patch @@ -14,7 +14,20 @@ public Teleporter(WorldServer p_i1963_1_) { -@@ -55,23 +55,22 @@ +@@ -45,33 +45,32 @@ + int l = 1; + int i1 = 0; + +- for (int j1 = -2; j1 <= 2; j1++) ++ for (int j1 = -2; j1 <= 2; ++j1) + { +- for (int k1 = -2; k1 <= 2; k1++) ++ for (int k1 = -2; k1 <= 2; ++k1) + { +- for (int l1 = -1; l1 < 3; l1++) ++ for (int l1 = -1; l1 < 3; ++l1) + { + int i2 = i + k1 * 1 + j1 * 0; int j2 = j + l1; int k2 = k + k1 * 0 - j1 * 1; boolean flag = l1 < 0; @@ -54,17 +67,25 @@ blockpos = teleporter$portalposition; teleporter$portalposition.field_85087_d = this.field_85192_a.func_82737_E(); flag = false; -@@ -96,26 +95,20 @@ +@@ -90,76 +89,62 @@ + { + BlockPos blockpos3 = new BlockPos(p_180620_1_); - for (int j1 = -128; j1 <= 128; ++j1) - { -- for (BlockPos blockpos1 = blockpos3.func_177982_a(i1, this.field_85192_a.func_72940_L() - 1 - blockpos3.func_177956_o(), j1); -- blockpos1.func_177956_o() >= 0; -- blockpos1 = blockpos2 -- ) +- for (int i1 = -128; i1 <= 128; i1++) ++ for (int i1 = -128; i1 <= 128; ++i1) + { +- for (int j1 = -128; j1 <= 128; j1++) +- { +- BlockPos blockpos1 = blockpos3.func_177982_a(i1, this.field_85192_a.func_72940_L() - 1 - blockpos3.func_177956_o(), j1); ++ BlockPos blockpos2; + +- while (blockpos1.func_177956_o() >= 0) ++ for (int j1 = -128; j1 <= 128; ++j1) ++ { + for (BlockPos blockpos1 = blockpos3.func_177982_a(i1, this.field_85192_a.func_72940_L() - 1 - blockpos3.func_177956_o(), j1); blockpos1.func_177956_o() >= 0; blockpos1 = blockpos2) { - blockpos2 = blockpos1.func_177977_b(); +- BlockPos blockpos2 = blockpos1.func_177977_b(); ++ blockpos2 = blockpos1.func_177977_b(); if (this.field_85192_a.func_180495_p(blockpos1).func_177230_c() == Blocks.field_150427_aO) { @@ -84,7 +105,12 @@ { d0 = d1; blockpos = blockpos1; -@@ -126,22 +119,19 @@ + } + } +- +- blockpos1 = blockpos2; + } + } } } @@ -112,7 +138,9 @@ if (flag1) { -@@ -150,17 +140,11 @@ +- d2++; ++ ++d2; + } if (blockpattern$patternhelper.func_177669_b().func_176740_k() == EnumFacing.Axis.X) { @@ -132,7 +160,7 @@ } float f = 0.0F; -@@ -193,9 +177,7 @@ +@@ -192,9 +177,7 @@ double d4 = p_180620_1_.field_70179_y; p_180620_1_.field_70159_w = d3 * (double)f + d4 * (double)f3; p_180620_1_.field_70179_y = d3 * (double)f2 + d4 * (double)f1; @@ -143,7 +171,7 @@ if (p_180620_1_ instanceof EntityPlayerMP) { -@@ -217,7 +199,7 @@ +@@ -216,7 +199,7 @@ public boolean func_85188_a(Entity p_85188_1_) { int i = 16; @@ -152,23 +180,55 @@ int j = MathHelper.func_76128_c(p_85188_1_.field_70165_t); int k = MathHelper.func_76128_c(p_85188_1_.field_70163_u); int l = MathHelper.func_76128_c(p_85188_1_.field_70161_v); -@@ -230,12 +212,12 @@ +@@ -227,25 +210,25 @@ + int i2 = this.field_77187_a.nextInt(4); + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); - for (int j2 = j - 16; j2 <= j + 16; ++j2) +- for (int j2 = j - 16; j2 <= j + 16; j2++) ++ for (int j2 = j - 16; j2 <= j + 16; ++j2) { - double d1 = (double)j2 + 0.5 - p_85188_1_.field_70165_t; + double d1 = (double)j2 + 0.5D - p_85188_1_.field_70165_t; - for (int l2 = l - 16; l2 <= l + 16; ++l2) +- for (int l2 = l - 16; l2 <= l + 16; l2++) ++ for (int l2 = l - 16; l2 <= l + 16; ++l2) { - double d2 = (double)l2 + 0.5 - p_85188_1_.field_70161_v; - label296: + double d2 = (double)l2 + 0.5D - p_85188_1_.field_70161_v; + label293: - for (int j3 = this.field_85192_a.func_72940_L() - 1; j3 >= 0; --j3) +- for (int j3 = this.field_85192_a.func_72940_L() - 1; j3 >= 0; j3--) ++ for (int j3 = this.field_85192_a.func_72940_L() - 1; j3 >= 0; --j3) { -@@ -268,19 +250,18 @@ + if (this.field_85192_a.func_175623_d(blockpos$mutableblockpos.func_181079_c(j2, j3, l2))) + { + while (j3 > 0 && this.field_85192_a.func_175623_d(blockpos$mutableblockpos.func_181079_c(j2, j3 - 1, l2))) + { +- j3--; ++ --j3; + } + +- for (int k3 = i2; k3 < i2 + 4; k3++) ++ for (int k3 = i2; k3 < i2 + 4; ++k3) + { + int l3 = k3 % 2; + int i4 = 1 - l3; +@@ -256,30 +239,29 @@ + i4 = -i4; + } + +- for (int j4 = 0; j4 < 3; j4++) ++ for (int j4 = 0; j4 < 3; ++j4) + { +- for (int k4 = 0; k4 < 4; k4++) ++ for (int k4 = 0; k4 < 4; ++k4) + { +- for (int l4 = -1; l4 < 4; l4++) ++ for (int l4 = -1; l4 < 4; ++l4) + { + int i5 = j2 + (k4 - 1) * l3 + j4 * i4; + int j5 = j3 + l4; int k5 = l2 + (k4 - 1) * i4 - j4 * l3; blockpos$mutableblockpos.func_181079_c(i5, j5, k5); @@ -192,28 +252,52 @@ { d0 = d7; i1 = j2; -@@ -294,16 +275,16 @@ +@@ -293,52 +275,51 @@ } } - if (d0 < 0.0) + if (d0 < 0.0D) { - for (int l5 = j - 16; l5 <= j + 16; ++l5) +- for (int l5 = j - 16; l5 <= j + 16; l5++) ++ for (int l5 = j - 16; l5 <= j + 16; ++l5) { - double d3 = (double)l5 + 0.5 - p_85188_1_.field_70165_t; + double d3 = (double)l5 + 0.5D - p_85188_1_.field_70165_t; - for (int j6 = l - 16; j6 <= l + 16; ++j6) +- for (int j6 = l - 16; j6 <= l + 16; j6++) ++ for (int j6 = l - 16; j6 <= l + 16; ++j6) { - double d4 = (double)j6 + 0.5 - p_85188_1_.field_70161_v; - label233: + double d4 = (double)j6 + 0.5D - p_85188_1_.field_70161_v; + label231: - for (int i7 = this.field_85192_a.func_72940_L() - 1; i7 >= 0; --i7) +- for (int i7 = this.field_85192_a.func_72940_L() - 1; i7 >= 0; i7--) ++ for (int i7 = this.field_85192_a.func_72940_L() - 1; i7 >= 0; --i7) { -@@ -328,18 +309,17 @@ + if (this.field_85192_a.func_175623_d(blockpos$mutableblockpos.func_181079_c(l5, i7, j6))) + { + while (i7 > 0 && this.field_85192_a.func_175623_d(blockpos$mutableblockpos.func_181079_c(l5, i7 - 1, j6))) + { +- i7--; ++ --i7; + } + +- for (int k7 = i2; k7 < i2 + 2; k7++) ++ for (int k7 = i2; k7 < i2 + 2; ++k7) + { + int j8 = k7 % 2; + int j9 = 1 - j8; + +- for (int j10 = 0; j10 < 4; j10++) ++ for (int j10 = 0; j10 < 4; ++j10) + { +- for (int j11 = -1; j11 < 4; j11++) ++ for (int j11 = -1; j11 < 4; ++j11) + { + int j12 = l5 + (j10 - 1) * j8; + int i13 = i7 + j11; int j13 = j6 + (j10 - 1) * j9; blockpos$mutableblockpos.func_181079_c(j12, i13, j13); @@ -236,7 +320,7 @@ { d0 = d8; i1 = l5; -@@ -366,7 +346,7 @@ +@@ -365,37 +346,34 @@ i3 = -i3; } @@ -245,7 +329,17 @@ { j1 = MathHelper.func_76125_a(j1, 70, this.field_85192_a.func_72940_L() - 10); k2 = j1; -@@ -381,16 +361,13 @@ + +- for (int j7 = -1; j7 <= 1; j7++) ++ for (int j7 = -1; j7 <= 1; ++j7) + { +- for (int l7 = 1; l7 < 3; l7++) ++ for (int l7 = 1; l7 < 3; ++l7) + { +- for (int k8 = -1; k8 < 3; k8++) ++ for (int k8 = -1; k8 < 3; ++k8) + { + int k9 = i6 + (l7 - 1) * l6 + j7 * i3; int k10 = k2 + k8; int k11 = k6 + (l7 - 1) * i3 - j7 * l6; boolean flag = k8 < 0; @@ -262,9 +356,30 @@ - .func_177226_a(BlockPortal.field_176550_a, l6 == 0 ? EnumFacing.Axis.Z : EnumFacing.Axis.X); + IBlockState iblockstate = Blocks.field_150427_aO.func_176223_P().func_177226_a(BlockPortal.field_176550_a, l6 == 0 ? EnumFacing.Axis.Z : EnumFacing.Axis.X); - for (int i8 = 0; i8 < 4; ++i8) +- for (int i8 = 0; i8 < 4; i8++) ++ for (int i8 = 0; i8 < 4; ++i8) { -@@ -431,7 +408,7 @@ +- for (int l8 = 0; l8 < 4; l8++) ++ for (int l8 = 0; l8 < 4; ++l8) + { +- for (int l9 = -1; l9 < 4; l9++) ++ for (int l9 = -1; l9 < 4; ++l9) + { + int l10 = i6 + (l8 - 1) * l6; + int l11 = k2 + l9; +@@ -405,9 +383,9 @@ + } + } + +- for (int i9 = 0; i9 < 4; i9++) ++ for (int i9 = 0; i9 < 4; ++i9) + { +- for (int i10 = -1; i10 < 4; i10++) ++ for (int i10 = -1; i10 < 4; ++i10) + { + int i11 = i6 + (i9 - 1) * l6; + int i12 = k2 + i10; +@@ -430,7 +408,7 @@ while (objectiterator.hasNext()) { @@ -273,7 +388,7 @@ if (teleporter$portalposition == null || teleporter$portalposition.field_85087_d < i) { -@@ -450,5 +427,14 @@ +@@ -449,5 +427,14 @@ super(p_i45747_2_.func_177958_n(), p_i45747_2_.func_177956_o(), p_i45747_2_.func_177952_p()); this.field_85087_d = p_i45747_3_; } diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index b437fb2ec..ae7cecda0 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -190,7 +190,7 @@ } public boolean func_175711_a(StructureBoundingBox p_175711_1_) -@@ -262,25 +267,17 @@ +@@ -262,29 +267,21 @@ public boolean func_175639_b(StructureBoundingBox p_175639_1_, boolean p_175639_2_) { @@ -219,8 +219,14 @@ + p_175663_4_ = p_175663_4_ >> 4; + p_175663_6_ = p_175663_6_ >> 4; - for (int i = p_175663_1_; i <= p_175663_4_; ++i) +- for (int i = p_175663_1_; i <= p_175663_4_; i++) ++ for (int i = p_175663_1_; i <= p_175663_4_; ++i) { +- for (int j = p_175663_3_; j <= p_175663_6_; j++) ++ for (int j = p_175663_3_; j <= p_175663_6_; ++j) + { + if (!this.func_175680_a(i, j, p_175663_7_)) + { @@ -331,23 +328,50 @@ else { @@ -293,15 +299,27 @@ { return false; } -@@ -407,7 +429,7 @@ +@@ -405,9 +427,9 @@ + + public void func_184138_a(BlockPos p_184138_1_, IBlockState p_184138_2_, IBlockState p_184138_3_, int p_184138_4_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_184376_a(this, p_184138_1_, p_184138_2_, p_184138_3_, p_184138_4_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_184376_a(this, p_184138_1_, p_184138_2_, p_184138_3_, p_184138_4_); } } +@@ -430,7 +452,7 @@ + + if (this.field_73011_w.func_191066_m()) + { +- for (int j = p_72975_3_; j <= p_72975_4_; j++) ++ for (int j = p_72975_3_; j <= p_72975_4_; ++j) + { + this.func_180500_c(EnumSkyBlock.SKY, new BlockPos(p_72975_1_, j, p_72975_2_)); + } @@ -441,21 +463,14 @@ public void func_175704_b(BlockPos p_175704_1_, BlockPos p_175704_2_) @@ -319,7 +337,8 @@ public void func_147458_c(int p_147458_1_, int p_147458_2_, int p_147458_3_, int p_147458_4_, int p_147458_5_, int p_147458_6_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_147585_a(p_147458_1_, p_147458_2_, p_147458_3_, p_147458_4_, p_147458_5_, p_147458_6_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_147585_a(p_147458_1_, p_147458_2_, p_147458_3_, p_147458_4_, p_147458_5_, p_147458_6_); @@ -542,9 +561,12 @@ } public int func_189649_b(int p_189649_1_, int p_189649_2_) -@@ -866,12 +877,11 @@ +@@ -864,14 +875,13 @@ + + public void func_175679_n(BlockPos p_175679_1_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_174959_b(p_175679_1_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_174959_b(p_175679_1_); @@ -919,7 +941,7 @@ } else { -@@ -1099,49 +1111,27 @@ +@@ -1099,151 +1111,81 @@ } } @@ -953,6 +975,7 @@ - ) + public void func_184148_a(@Nullable EntityPlayer p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) { +- for (int i = 0; i < this.field_73021_x.size(); i++) + net.minecraftforge.event.entity.PlaySoundAtEntityEvent event = net.minecraftforge.event.ForgeEventFactory.onPlaySoundAtEntity(p_184148_1_, p_184148_8_, p_184148_9_, p_184148_10_, p_184148_11_); + if (event.isCanceled() || event.getSound() == null) return; + p_184148_8_ = event.getSound(); @@ -960,7 +983,7 @@ + p_184148_10_ = event.getVolume(); + p_184148_11_ = event.getPitch(); + - for (int i = 0; i < this.field_73021_x.size(); ++i) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_184375_a(p_184148_1_, p_184148_8_, p_184148_9_, p_184148_2_, p_184148_4_, p_184148_6_, p_184148_10_, p_184148_11_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_184375_a(p_184148_1_, p_184148_8_, p_184148_9_, p_184148_2_, p_184148_4_, p_184148_6_, p_184148_10_, p_184148_11_); @@ -981,9 +1004,10 @@ { } -@@ -1149,101 +1139,53 @@ + public void func_184149_a(BlockPos p_184149_1_, @Nullable SoundEvent p_184149_2_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_184377_a(p_184149_2_, p_184149_1_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_184377_a(p_184149_2_, p_184149_1_); @@ -1020,7 +1044,8 @@ - ) + public void func_190523_a(int p_190523_1_, double p_190523_2_, double p_190523_4_, double p_190523_6_, double p_190523_8_, double p_190523_10_, double p_190523_12_, int... p_190523_14_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x - .get(i) @@ -1070,7 +1095,8 @@ - ) + private void func_175720_a(int p_175720_1_, boolean p_175720_2_, double p_175720_3_, double p_175720_5_, double p_175720_7_, double p_175720_9_, double p_175720_11_, double p_175720_13_, int... p_175720_15_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x - .get(i) @@ -1109,9 +1135,12 @@ this.func_72964_e(i, j).func_76612_a(p_72838_1_); this.field_72996_f.add(p_72838_1_); this.func_72923_a(p_72838_1_); -@@ -1275,16 +1219,18 @@ +@@ -1273,18 +1217,20 @@ + + public void func_72923_a(Entity p_72923_1_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_72703_a(p_72923_1_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_72703_a(p_72923_1_); @@ -1121,7 +1150,8 @@ public void func_72847_b(Entity p_72847_1_) { - for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) ++ for (int i = 0; i < this.field_73021_x.size(); ++i) { - this.field_73021_x.get(i).func_72709_b(p_72847_1_); + ((IWorldEventListener)this.field_73021_x.get(i)).func_72709_b(p_72847_1_); @@ -1143,14 +1173,29 @@ private boolean func_191504_a(@Nullable Entity p_191504_1_, AxisAlignedBB p_191504_2_, boolean p_191504_3_, @Nullable List p_191504_4_) { int i = MathHelper.func_76128_c(p_191504_2_.field_72340_a) - 1; -@@ -1357,6 +1297,7 @@ +@@ -1357,18 +1297,19 @@ IBlockState iblockstate = Blocks.field_150348_b.func_176223_P(); BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); + if (p_191504_3_ && !net.minecraftforge.event.ForgeEventFactory.gatherCollisionBoxes(this, p_191504_1_, p_191504_2_, p_191504_4_)) return true; try { - for (int k1 = i; k1 < j; ++k1) +- for (int k1 = i; k1 < j; k1++) ++ for (int k1 = i; k1 < j; ++k1) + { +- for (int l1 = i1; l1 < j1; l1++) ++ for (int l1 = i1; l1 < j1; ++l1) + { + boolean flag2 = k1 == i || k1 == j - 1; + boolean flag3 = l1 == i1 || l1 == j1 - 1; + + if ((!flag2 || !flag3) && this.func_175667_e(blockpos$pooledmutableblockpos.func_181079_c(k1, 64, l1))) + { +- for (int i2 = k; i2 < l; i2++) ++ for (int i2 = k; i2 < l; ++i2) + { + if (!flag2 && !flag3 || i2 != l - 1) + { @@ -1376,7 +1317,8 @@ { if (k1 < -30000000 || k1 >= 30000000 || l1 < -30000000 || l1 >= 30000000) @@ -1174,7 +1219,7 @@ } } } -@@ -1418,12 +1361,12 @@ +@@ -1418,14 +1361,14 @@ public List func_184144_a(@Nullable Entity p_184144_1_, AxisAlignedBB p_184144_2_) { @@ -1187,8 +1232,11 @@ - List list1 = this.func_72839_b(p_184144_1_, p_184144_2_.func_186662_g(0.25)); + List list1 = this.func_72839_b(p_184144_1_, p_184144_2_.func_186662_g(0.25D)); - for (int i = 0; i < list1.size(); ++i) +- for (int i = 0; i < list1.size(); i++) ++ for (int i = 0; i < list1.size(); ++i) { + Entity entity = list1.get(i); + @@ -1447,8 +1390,13 @@ } } @@ -1204,6 +1252,32 @@ } public boolean func_191503_g(Entity p_191503_1_) +@@ -1460,17 +1408,17 @@ + + if (p_191503_1_.func_174832_aS()) + { +- d0++; +- d1++; +- d2--; +- d3--; ++ ++d0; ++ ++d1; ++ --d2; ++ --d3; + } + else + { +- d0--; +- d1--; +- d2++; +- d3++; ++ --d0; ++ --d1; ++ ++d2; ++ ++d3; + } + + return p_191503_1_.field_70165_t > d0 && p_191503_1_.field_70165_t < d2 && p_191503_1_.field_70161_v > d1 && p_191503_1_.field_70161_v < d3; @@ -1478,52 +1426,75 @@ public boolean func_184143_b(AxisAlignedBB p_184143_1_) @@ -1369,18 +1443,20 @@ float f9 = this.func_72819_i(p_72824_1_); if (f9 > 0.0F) -@@ -1641,15 +1623,12 @@ - BlockPos blockpos; - BlockPos blockpos1; - -- for (blockpos = new BlockPos(p_175672_1_.func_177958_n(), chunk.func_76625_h() + 16, p_175672_1_.func_177952_p()); -- blockpos.func_177956_o() >= 0; -- blockpos = blockpos1 -- ) +@@ -1638,19 +1620,18 @@ + public BlockPos func_175672_r(BlockPos p_175672_1_) + { + Chunk chunk = this.func_175726_f(p_175672_1_); +- BlockPos blockpos = new BlockPos(p_175672_1_.func_177958_n(), chunk.func_76625_h() + 16, p_175672_1_.func_177952_p()); ++ BlockPos blockpos; ++ BlockPos blockpos1; + +- while (blockpos.func_177956_o() >= 0) + for (blockpos = new BlockPos(p_175672_1_.func_177958_n(), chunk.func_76625_h() + 16, p_175672_1_.func_177952_p()); blockpos.func_177956_o() >= 0; blockpos = blockpos1) { - blockpos1 = blockpos.func_177977_b(); +- BlockPos blockpos1 = blockpos.func_177977_b(); - Material material = chunk.func_177435_g(blockpos1).func_185904_a(); ++ blockpos1 = blockpos.func_177977_b(); + IBlockState state = chunk.func_177435_g(blockpos1); - if (material.func_76230_c() && material != Material.field_151584_j) @@ -1388,7 +1464,12 @@ { break; } -@@ -1661,8 +1640,14 @@ +- +- blockpos = blockpos1; + } + + return blockpos; +@@ -1659,8 +1640,14 @@ @SideOnly(Side.CLIENT) public float func_72880_h(float p_72880_1_) { @@ -1404,15 +1485,24 @@ f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); return f1 * f1 * 0.5F; } -@@ -1695,6 +1680,7 @@ +@@ -1687,13 +1674,14 @@ + this.field_72984_F.func_76320_a("entities"); + this.field_72984_F.func_76320_a("global"); + +- for (int i = 0; i < this.field_73007_j.size(); i++) ++ for (int i = 0; i < this.field_73007_j.size(); ++i) + { + Entity entity = this.field_73007_j.get(i); try { +- entity.field_70173_aa++; + if(entity.updateBlocked) continue; - ++entity.field_70173_aa; ++ ++entity.field_70173_aa; entity.func_70071_h_(); } -@@ -1712,6 +1698,12 @@ + catch (Throwable throwable2) +@@ -1710,6 +1698,12 @@ entity.func_85029_a(crashreportcategory); } @@ -1425,7 +1515,34 @@ throw new ReportedException(crashreport); } -@@ -1766,13 +1758,21 @@ +@@ -1722,7 +1716,7 @@ + this.field_72984_F.func_76318_c("remove"); + this.field_72996_f.removeAll(this.field_72997_g); + +- for (int k = 0; k < this.field_72997_g.size(); k++) ++ for (int k = 0; k < this.field_72997_g.size(); ++k) + { + Entity entity1 = this.field_72997_g.get(k); + int j = entity1.field_70176_ah; +@@ -1734,7 +1728,7 @@ + } + } + +- for (int l = 0; l < this.field_72997_g.size(); l++) ++ for (int l = 0; l < this.field_72997_g.size(); ++l) + { + this.func_72847_b(this.field_72997_g.get(l)); + } +@@ -1743,7 +1737,7 @@ + this.func_184147_l(); + this.field_72984_F.func_76318_c("regular"); + +- for (int i1 = 0; i1 < this.field_72996_f.size(); i1++) ++ for (int i1 = 0; i1 < this.field_72996_f.size(); ++i1) + { + Entity entity2 = this.field_72996_f.get(i1); + Entity entity3 = entity2.func_184187_bx(); +@@ -1764,13 +1758,21 @@ { try { @@ -1447,7 +1564,7 @@ throw new ReportedException(crashreport1); } } -@@ -1799,14 +1799,23 @@ +@@ -1797,14 +1799,23 @@ this.field_72984_F.func_76318_c("blockEntities"); @@ -1474,7 +1591,7 @@ Iterator iterator = this.field_175730_i.iterator(); while (iterator.hasNext()) -@@ -1817,12 +1826,17 @@ +@@ -1815,12 +1826,17 @@ { BlockPos blockpos = tileentity.func_174877_v(); @@ -1483,7 +1600,7 @@ { try { -- this.field_72984_F.func_194340_a(() -> String.valueOf(TileEntity.func_190559_a(tileentity.getClass()))); +- this.field_72984_F.func_194340_a(() -> String.valueOf(TileEntity.func_190559_a((Class )tileentity.getClass()))); + this.field_72984_F.func_194340_a(() -> + { + return String.valueOf((Object)TileEntity.func_190559_a(tileentity.getClass())); @@ -1494,7 +1611,7 @@ this.field_72984_F.func_76319_b(); } catch (Throwable throwable) -@@ -1830,6 +1844,13 @@ +@@ -1828,6 +1844,13 @@ CrashReport crashreport2 = CrashReport.func_85055_a(throwable, "Ticking block entity"); CrashReportCategory crashreportcategory2 = crashreport2.func_85058_a("Block entity being ticked"); tileentity.func_145828_a(crashreportcategory2); @@ -1508,7 +1625,7 @@ throw new ReportedException(crashreport2); } } -@@ -1842,7 +1863,10 @@ +@@ -1840,7 +1863,10 @@ if (this.func_175667_e(tileentity.func_174877_v())) { @@ -1520,7 +1637,16 @@ } } } -@@ -1886,18 +1910,24 @@ +@@ -1850,7 +1876,7 @@ + + if (!this.field_147484_a.isEmpty()) + { +- for (int j1 = 0; j1 < this.field_147484_a.size(); j1++) ++ for (int j1 = 0; j1 < this.field_147484_a.size(); ++j1) + { + TileEntity tileentity1 = this.field_147484_a.get(j1); + +@@ -1884,18 +1910,24 @@ public boolean func_175700_a(TileEntity p_175700_1_) { @@ -1548,7 +1674,7 @@ } return flag; -@@ -1907,13 +1937,18 @@ +@@ -1905,13 +1937,18 @@ { if (this.field_147481_N) { @@ -1569,7 +1695,7 @@ } } } -@@ -1927,11 +1962,15 @@ +@@ -1925,11 +1962,15 @@ { if (!(p_72866_1_ instanceof EntityPlayer)) { @@ -1590,7 +1716,16 @@ { return; } -@@ -1953,6 +1992,7 @@ +@@ -1943,7 +1984,7 @@ + + if (p_72866_2_ && p_72866_1_.field_70175_ag) + { +- p_72866_1_.field_70173_aa++; ++ ++p_72866_1_.field_70173_aa; + + if (p_72866_1_.func_184218_aH()) + { +@@ -1951,6 +1992,7 @@ } else { @@ -1598,7 +1733,7 @@ p_72866_1_.func_70071_h_(); } } -@@ -1984,24 +2024,24 @@ +@@ -1982,24 +2024,24 @@ p_72866_1_.field_70177_z = p_72866_1_.field_70126_B; } @@ -1629,7 +1764,7 @@ } } -@@ -2009,15 +2049,15 @@ +@@ -2007,15 +2049,15 @@ if (p_72866_2_ && p_72866_1_.field_70175_ag) { @@ -1649,7 +1784,7 @@ } } } -@@ -2025,18 +2065,18 @@ +@@ -2023,18 +2065,18 @@ public boolean func_72855_b(AxisAlignedBB p_72855_1_) { @@ -1662,7 +1797,7 @@ - List list = this.func_72839_b(null, p_72917_1_); + List list = this.func_72839_b((Entity)null, p_72917_1_); -- for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) + for (int j2 = 0; j2 < list.size(); ++j2) { - Entity entity = list.get(i); @@ -1673,7 +1808,7 @@ { return false; } -@@ -2047,23 +2087,23 @@ +@@ -2045,23 +2087,23 @@ public boolean func_72829_c(AxisAlignedBB p_72829_1_) { @@ -1691,13 +1826,13 @@ + int k3 = MathHelper.func_76143_f(p_72829_1_.field_72334_f); BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -- for (int k1 = i; k1 < j; ++k1) +- for (int k1 = i; k1 < j; k1++) + for (int l3 = j2; l3 < k2; ++l3) { -- for (int l1 = k; l1 < l; ++l1) +- for (int l1 = k; l1 < l; l1++) + for (int i4 = l2; i4 < i3; ++i4) { -- for (int i2 = i1; i2 < j1; ++i2) +- for (int i2 = i1; i2 < j1; i2++) + for (int j4 = j3; j4 < k3; ++j4) { - IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2)); @@ -1708,7 +1843,7 @@ { blockpos$pooledmutableblockpos.func_185344_t(); return true; -@@ -2078,23 +2118,29 @@ +@@ -2076,23 +2118,29 @@ public boolean func_72953_d(AxisAlignedBB p_72953_1_) { @@ -1726,13 +1861,13 @@ + int k3 = MathHelper.func_76143_f(p_72953_1_.field_72334_f); BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -- for (int k1 = i; k1 < j; ++k1) +- for (int k1 = i; k1 < j; k1++) + for (int l3 = j2; l3 < k2; ++l3) { -- for (int l1 = k; l1 < l; ++l1) +- for (int l1 = k; l1 < l; l1++) + for (int i4 = l2; i4 < i3; ++i4) { -- for (int i2 = i1; i2 < j1; ++i2) +- for (int i2 = i1; i2 < j1; i2++) + for (int j4 = j3; j4 < k3; ++j4) { - IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2)); @@ -1749,7 +1884,7 @@ { blockpos$pooledmutableblockpos.func_185344_t(); return true; -@@ -2109,30 +2155,35 @@ +@@ -2107,30 +2155,35 @@ public boolean func_147470_e(AxisAlignedBB p_147470_1_) { @@ -1771,13 +1906,13 @@ { BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -- for (int k1 = i; k1 < j; ++k1) +- for (int k1 = i; k1 < j; k1++) + for (int l3 = j2; l3 < k2; ++l3) { -- for (int l1 = k; l1 < l; ++l1) +- for (int l1 = k; l1 < l; l1++) + for (int i4 = l2; i4 < i3; ++i4) { -- for (int i2 = i1; i2 < j1; ++i2) +- for (int i2 = i1; i2 < j1; i2++) + for (int j4 = j3; j4 < k3; ++j4) { - Block block = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2)).func_177230_c(); @@ -1796,7 +1931,7 @@ } } } -@@ -2145,14 +2196,14 @@ +@@ -2143,14 +2196,14 @@ public boolean func_72918_a(AxisAlignedBB p_72918_1_, Material p_72918_2_, Entity p_72918_3_) { @@ -1818,17 +1953,17 @@ { return false; } -@@ -2162,21 +2213,31 @@ +@@ -2160,21 +2213,31 @@ Vec3d vec3d = Vec3d.field_186680_a; BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -- for (int k1 = i; k1 < j; ++k1) +- for (int k1 = i; k1 < j; k1++) + for (int l3 = j2; l3 < k2; ++l3) { -- for (int l1 = k; l1 < l; ++l1) +- for (int l1 = k; l1 < l; l1++) + for (int i4 = l2; i4 < i3; ++i4) { -- for (int i2 = i1; i2 < j1; ++i2) +- for (int i2 = i1; i2 < j1; i2++) + for (int j4 = j3; j4 < k3; ++j4) { - blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2); @@ -1862,7 +1997,7 @@ { flag = true; vec3d = block.func_176197_a(this, blockpos$pooledmutableblockpos, p_72918_3_, vec3d); -@@ -2188,13 +2249,13 @@ +@@ -2186,13 +2249,13 @@ blockpos$pooledmutableblockpos.func_185344_t(); @@ -1871,9 +2006,9 @@ { vec3d = vec3d.func_72432_b(); - double d1 = 0.014; -- p_72918_3_.field_70159_w += vec3d.field_72450_a * 0.014; -- p_72918_3_.field_70181_x += vec3d.field_72448_b * 0.014; -- p_72918_3_.field_70179_y += vec3d.field_72449_c * 0.014; +- p_72918_3_.field_70159_w = p_72918_3_.field_70159_w + vec3d.field_72450_a * 0.014; +- p_72918_3_.field_70181_x = p_72918_3_.field_70181_x + vec3d.field_72448_b * 0.014; +- p_72918_3_.field_70179_y = p_72918_3_.field_70179_y + vec3d.field_72449_c * 0.014; + double d1 = 0.014D; + p_72918_3_.field_70159_w += vec3d.field_72450_a * 0.014D; + p_72918_3_.field_70181_x += vec3d.field_72448_b * 0.014D; @@ -1881,7 +2016,7 @@ } return flag; -@@ -2203,21 +2264,28 @@ +@@ -2201,21 +2264,28 @@ public boolean func_72875_a(AxisAlignedBB p_72875_1_, Material p_72875_2_) { @@ -1899,13 +2034,13 @@ + int k3 = MathHelper.func_76143_f(p_72875_1_.field_72334_f); BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -- for (int k1 = i; k1 < j; ++k1) +- for (int k1 = i; k1 < j; k1++) + for (int l3 = j2; l3 < k2; ++l3) { -- for (int l1 = k; l1 < l; ++l1) +- for (int l1 = k; l1 < l; l1++) + for (int i4 = l2; i4 < i3; ++i4) { -- for (int i2 = i1; i2 < j1; ++i2) +- for (int i2 = i1; i2 < j1; i2++) + for (int j4 = j3; j4 < k3; ++j4) { - if (this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2)).func_185904_a() == p_72875_2_) @@ -1920,7 +2055,7 @@ { blockpos$pooledmutableblockpos.func_185344_t(); return true; -@@ -2235,11 +2303,10 @@ +@@ -2233,11 +2303,10 @@ return this.func_72885_a(p_72876_1_, p_72876_2_, p_72876_4_, p_72876_6_, p_72876_8_, false, p_72876_9_); } @@ -1934,7 +2069,7 @@ explosion.func_77278_a(); explosion.func_77279_a(true); return explosion; -@@ -2247,16 +2314,16 @@ +@@ -2245,16 +2314,16 @@ public float func_72842_a(Vec3d p_72842_1_, AxisAlignedBB p_72842_2_) { @@ -1959,15 +2094,15 @@ for (float f = 0.0F; f <= 1.0F; f = (float)((double)f + d0)) { -@@ -2270,15 +2337,15 @@ +@@ -2268,15 +2337,15 @@ if (this.func_72933_a(new Vec3d(d5 + d3, d6, d7 + d4), p_72842_1_) == null) { -- ++i; +- i++; + ++j2; } -- ++j; +- j++; + ++k2; } } @@ -1978,7 +2113,7 @@ } else { -@@ -2315,7 +2382,6 @@ +@@ -2313,7 +2382,6 @@ } @Nullable @@ -1986,7 +2121,7 @@ public TileEntity func_175625_s(BlockPos p_175625_1_) { if (this.func_189509_E(p_175625_1_)) -@@ -2324,37 +2390,37 @@ +@@ -2322,37 +2390,37 @@ } else { @@ -2029,7 +2164,7 @@ @Nullable private TileEntity func_189508_F(BlockPos p_189508_1_) { -- for (int i = 0; i < this.field_147484_a.size(); ++i) +- for (int i = 0; i < this.field_147484_a.size(); i++) + for (int j2 = 0; j2 < this.field_147484_a.size(); ++j2) { - TileEntity tileentity = this.field_147484_a.get(i); @@ -2043,7 +2178,7 @@ } } -@@ -2363,6 +2429,7 @@ +@@ -2361,6 +2429,7 @@ public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) { @@ -2051,7 +2186,7 @@ if (!this.func_189509_E(p_175690_1_)) { if (p_175690_2_ != null && !p_175690_2_.func_145837_r()) -@@ -2370,24 +2437,29 @@ +@@ -2368,24 +2437,29 @@ if (this.field_147481_N) { p_175690_2_.func_174878_a(p_175690_1_); @@ -2088,7 +2223,7 @@ this.func_175700_a(p_175690_2_); } } -@@ -2396,24 +2468,27 @@ +@@ -2394,24 +2468,27 @@ public void func_175713_t(BlockPos p_175713_1_) { @@ -2124,7 +2259,7 @@ } public void func_147457_a(TileEntity p_147457_1_) -@@ -2424,7 +2499,7 @@ +@@ -2422,7 +2499,7 @@ public boolean func_175665_u(BlockPos p_175665_1_) { AxisAlignedBB axisalignedbb = this.func_180495_p(p_175665_1_).func_185890_d(this, p_175665_1_); @@ -2133,7 +2268,7 @@ } public boolean func_175677_d(BlockPos p_175677_1_, boolean p_175677_2_) -@@ -2435,12 +2510,12 @@ +@@ -2433,12 +2510,12 @@ } else { @@ -2150,7 +2285,7 @@ } else { -@@ -2451,11 +2526,11 @@ +@@ -2449,11 +2526,11 @@ public void func_72966_v() { @@ -2165,7 +2300,7 @@ } } -@@ -2463,6 +2538,7 @@ +@@ -2461,6 +2538,7 @@ { this.field_72985_G = p_72891_1_; this.field_72992_H = p_72891_2_; @@ -2173,7 +2308,7 @@ } public void func_72835_b() -@@ -2472,6 +2548,11 @@ +@@ -2470,6 +2548,11 @@ protected void func_72947_a() { @@ -2185,7 +2320,7 @@ if (this.field_72986_A.func_76059_o()) { this.field_73004_o = 1.0F; -@@ -2485,6 +2566,11 @@ +@@ -2483,6 +2566,11 @@ protected void func_72979_l() { @@ -2197,7 +2332,7 @@ if (this.field_73011_w.func_191066_m()) { if (!this.field_72995_K) -@@ -2493,18 +2579,19 @@ +@@ -2491,18 +2579,19 @@ if (flag) { @@ -2222,7 +2357,7 @@ { if (this.field_72986_A.func_76061_m()) { -@@ -2517,17 +2604,18 @@ +@@ -2515,17 +2604,18 @@ } else { @@ -2245,7 +2380,7 @@ { if (this.field_72986_A.func_76059_o()) { -@@ -2540,9 +2628,10 @@ +@@ -2538,9 +2628,10 @@ } else { @@ -2258,7 +2393,7 @@ { this.field_72986_A.func_76084_b(!this.field_72986_A.func_76059_o()); } -@@ -2553,11 +2642,11 @@ +@@ -2551,11 +2642,11 @@ if (this.field_72986_A.func_76061_m()) { @@ -2272,7 +2407,7 @@ } this.field_73017_q = MathHelper.func_76131_a(this.field_73017_q, 0.0F, 1.0F); -@@ -2565,11 +2654,11 @@ +@@ -2563,11 +2654,11 @@ if (this.field_72986_A.func_76059_o()) { @@ -2286,7 +2421,7 @@ } this.field_73004_o = MathHelper.func_76131_a(this.field_73004_o, 0.0F, 1.0F); -@@ -2606,6 +2695,11 @@ +@@ -2604,6 +2695,11 @@ public boolean func_175670_e(BlockPos p_175670_1_, boolean p_175670_2_) { @@ -2298,7 +2433,7 @@ Biome biome = this.func_180494_b(p_175670_1_); float f = biome.func_180626_a(p_175670_1_); -@@ -2617,20 +2711,17 @@ +@@ -2615,20 +2711,17 @@ { if (p_175670_1_.func_177956_o() >= 0 && p_175670_1_.func_177956_o() < 256 && this.func_175642_b(EnumSkyBlock.BLOCK, p_175670_1_) < 10) { @@ -2323,7 +2458,7 @@ if (!flag) { -@@ -2650,6 +2741,11 @@ +@@ -2648,6 +2741,11 @@ public boolean func_175708_f(BlockPos p_175708_1_, boolean p_175708_2_) { @@ -2335,7 +2470,7 @@ Biome biome = this.func_180494_b(p_175708_1_); float f = biome.func_180626_a(p_175708_1_); -@@ -2665,9 +2761,9 @@ +@@ -2663,9 +2761,9 @@ { if (p_175708_1_.func_177956_o() >= 0 && p_175708_1_.func_177956_o() < 256 && this.func_175642_b(EnumSkyBlock.BLOCK, p_175708_1_) < 10) { @@ -2347,7 +2482,7 @@ { return true; } -@@ -2686,7 +2782,8 @@ +@@ -2684,7 +2782,8 @@ flag |= this.func_180500_c(EnumSkyBlock.SKY, p_175664_1_); } @@ -2357,7 +2492,7 @@ } private int func_175638_a(BlockPos p_175638_1_, EnumSkyBlock p_175638_2_) -@@ -2697,27 +2794,27 @@ +@@ -2695,27 +2794,27 @@ } else { @@ -2406,7 +2541,7 @@ } else { -@@ -2728,20 +2825,21 @@ +@@ -2726,20 +2825,21 @@ for (EnumFacing enumfacing : EnumFacing.values()) { blockpos$pooledmutableblockpos.func_189533_g(p_175638_1_).func_189536_c(enumfacing); @@ -2434,7 +2569,7 @@ } finally { -@@ -2753,65 +2851,67 @@ +@@ -2751,65 +2851,67 @@ public boolean func_180500_c(EnumSkyBlock p_180500_1_, BlockPos p_180500_2_) { @@ -2537,7 +2672,7 @@ } } -@@ -2821,63 +2921,63 @@ +@@ -2819,63 +2921,63 @@ } } @@ -2646,7 +2781,7 @@ } } } -@@ -2913,19 +3013,19 @@ +@@ -2911,19 +3013,19 @@ public List func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate p_175674_3_) { @@ -2661,10 +2796,10 @@ + int l2 = MathHelper.func_76128_c((p_175674_2_.field_72339_c - MAX_ENTITY_RADIUS) / 16.0D); + int i3 = MathHelper.func_76128_c((p_175674_2_.field_72334_f + MAX_ENTITY_RADIUS) / 16.0D); -- for (int i1 = i; i1 <= j; ++i1) +- for (int i1 = i; i1 <= j; i1++) + for (int j3 = j2; j3 <= k2; ++j3) { -- for (int j1 = k; j1 <= l; ++j1) +- for (int j1 = k; j1 <= l; j1++) + for (int k3 = l2; k3 <= i3; ++k3) { - if (this.func_175680_a(i1, j1, true)) @@ -2675,7 +2810,7 @@ } } } -@@ -2935,13 +3035,13 @@ +@@ -2933,13 +3035,13 @@ public List func_175644_a(Class p_175644_1_, Predicate p_175644_2_) { @@ -2693,7 +2828,7 @@ } } -@@ -2950,13 +3050,13 @@ +@@ -2948,13 +3050,13 @@ public List func_175661_b(Class p_175661_1_, Predicate p_175661_2_) { @@ -2711,7 +2846,7 @@ } } -@@ -2965,24 +3065,24 @@ +@@ -2963,24 +3065,24 @@ public List func_72872_a(Class p_72872_1_, AxisAlignedBB p_72872_2_) { @@ -2732,10 +2867,10 @@ + int i3 = MathHelper.func_76143_f((p_175647_2_.field_72334_f + MAX_ENTITY_RADIUS) / 16.0D); + List list = Lists.newArrayList(); -- for (int i1 = i; i1 < j; ++i1) +- for (int i1 = i; i1 < j; i1++) + for (int j3 = j2; j3 < k2; ++j3) { -- for (int j1 = k; j1 < l; ++j1) +- for (int j1 = k; j1 < l; j1++) + for (int k3 = l2; k3 < i3; ++k3) { - if (this.func_175680_a(i1, j1, true)) @@ -2746,7 +2881,7 @@ } } } -@@ -2993,19 +3093,19 @@ +@@ -2991,19 +3093,19 @@ @Nullable public T func_72857_a(Class p_72857_1_, AxisAlignedBB p_72857_2_, T p_72857_3_) { @@ -2755,10 +2890,10 @@ T t = null; double d0 = Double.MAX_VALUE; -- for (int i = 0; i < list.size(); ++i) +- for (int i = 0; i < list.size(); i++) + for (int j2 = 0; j2 < list.size(); ++j2) { -- T t1 = list.get(i); +- T t1 = (T)list.get(i); + T t1 = list.get(j2); if (t1 != p_72857_3_ && EntitySelectors.field_180132_d.apply(t1)) @@ -2770,7 +2905,7 @@ { t = t1; d0 = d1; -@@ -3038,26 +3138,28 @@ +@@ -3036,26 +3138,28 @@ public int func_72907_a(Class p_72907_1_) { @@ -2783,7 +2918,7 @@ - if ((!(entity instanceof EntityLiving) || !((EntityLiving)entity).func_104002_bU()) && p_72907_1_.isAssignableFrom(entity.getClass())) + if ((!(entity4 instanceof EntityLiving) || !((EntityLiving)entity4).func_104002_bU()) && p_72907_1_.isAssignableFrom(entity4.getClass())) { -- ++i; +- i++; + ++j2; } } @@ -2808,7 +2943,7 @@ } } -@@ -3068,20 +3170,21 @@ +@@ -3066,18 +3170,21 @@ public boolean func_190527_a(Block p_190527_1_, BlockPos p_190527_2_, boolean p_190527_3_, EnumFacing p_190527_4_, @Nullable Entity p_190527_5_) { @@ -2822,19 +2957,20 @@ { return false; } -- else if (iblockstate.func_185904_a() == Material.field_151594_q && p_190527_1_ == Blocks.field_150467_bQ) + else if (iblockstate1.func_185904_a() == Material.field_151594_q && p_190527_1_ == Blocks.field_150467_bQ) - { - return true; - } ++ { ++ return true; ++ } else { -- return iblockstate.func_185904_a().func_76222_j() && p_190527_1_.func_176198_a(this, p_190527_2_, p_190527_4_); +- return iblockstate.func_185904_a() == Material.field_151594_q && p_190527_1_ == Blocks.field_150467_bQ +- ? true +- : iblockstate.func_185904_a().func_76222_j() && p_190527_1_.func_176198_a(this, p_190527_2_, p_190527_4_); + return iblockstate1.func_177230_c().func_176200_f(this, p_190527_2_) && p_190527_1_.func_176198_a(this, p_190527_2_, p_190527_4_); } } -@@ -3095,13 +3198,11 @@ +@@ -3091,13 +3198,11 @@ this.field_181546_a = p_181544_1_; } @@ -2848,7 +2984,7 @@ public WorldType func_175624_G() { return this.field_72986_A.func_76067_t(); -@@ -3109,49 +3210,49 @@ +@@ -3105,49 +3210,49 @@ public int func_175676_y(BlockPos p_175676_1_) { @@ -2916,7 +3052,7 @@ } } } -@@ -3166,8 +3267,8 @@ +@@ -3162,8 +3267,8 @@ public int func_175651_c(BlockPos p_175651_1_, EnumFacing p_175651_2_) { @@ -2927,7 +3063,22 @@ } public boolean func_175640_z(BlockPos p_175640_1_) -@@ -3200,24 +3301,24 @@ +@@ -3184,34 +3289,36 @@ + { + return true; + } ++ else if (this.func_175651_c(p_175640_1_.func_177976_e(), EnumFacing.WEST) > 0) ++ { ++ return true; ++ } + else + { +- return this.func_175651_c(p_175640_1_.func_177976_e(), EnumFacing.WEST) > 0 +- ? true +- : this.func_175651_c(p_175640_1_.func_177974_f(), EnumFacing.EAST) > 0; ++ return this.func_175651_c(p_175640_1_.func_177974_f(), EnumFacing.EAST) > 0; + } + } public int func_175687_A(BlockPos p_175687_1_) { @@ -2958,7 +3109,7 @@ } @Nullable -@@ -3242,18 +3343,18 @@ +@@ -3236,18 +3343,18 @@ @Nullable public EntityPlayer func_190525_a(double p_190525_1_, double p_190525_3_, double p_190525_5_, double p_190525_7_, Predicate p_190525_9_) { @@ -2966,7 +3117,7 @@ + double d0 = -1.0D; EntityPlayer entityplayer = null; -- for (int i = 0; i < this.field_73010_i.size(); ++i) +- for (int i = 0; i < this.field_73010_i.size(); i++) + for (int j2 = 0; j2 < this.field_73010_i.size(); ++j2) { - EntityPlayer entityplayer1 = this.field_73010_i.get(i); @@ -2981,11 +3132,11 @@ { d0 = d1; entityplayer = entityplayer1; -@@ -3266,15 +3367,15 @@ +@@ -3260,15 +3367,15 @@ public boolean func_175636_b(double p_175636_1_, double p_175636_3_, double p_175636_5_, double p_175636_7_) { -- for (int i = 0; i < this.field_73010_i.size(); ++i) +- for (int i = 0; i < this.field_73010_i.size(); i++) + for (int j2 = 0; j2 < this.field_73010_i.size(); ++j2) { - EntityPlayer entityplayer = this.field_73010_i.get(i); @@ -3000,7 +3151,7 @@ { return true; } -@@ -3287,52 +3388,33 @@ +@@ -3281,52 +3388,33 @@ @Nullable public EntityPlayer func_184142_a(Entity p_184142_1_, double p_184142_2_, double p_184142_4_) { @@ -3039,7 +3190,7 @@ + double d0 = -1.0D; EntityPlayer entityplayer = null; -- for (int i = 0; i < this.field_73010_i.size(); ++i) +- for (int i = 0; i < this.field_73010_i.size(); i++) + for (int j2 = 0; j2 < this.field_73010_i.size(); ++j2) { - EntityPlayer entityplayer1 = this.field_73010_i.get(i); @@ -3061,7 +3212,7 @@ } if (entityplayer1.func_82150_aj()) -@@ -3349,12 +3431,12 @@ +@@ -3343,12 +3431,12 @@ if (p_184150_11_ != null) { @@ -3078,11 +3229,11 @@ { d0 = d1; entityplayer = entityplayer1; -@@ -3368,9 +3450,9 @@ +@@ -3362,9 +3450,9 @@ @Nullable public EntityPlayer func_72924_a(String p_72924_1_) { -- for (int i = 0; i < this.field_73010_i.size(); ++i) +- for (int i = 0; i < this.field_73010_i.size(); i++) + for (int j2 = 0; j2 < this.field_73010_i.size(); ++j2) { - EntityPlayer entityplayer = this.field_73010_i.get(i); @@ -3090,11 +3241,11 @@ if (p_72924_1_.equals(entityplayer.func_70005_c_())) { -@@ -3384,9 +3466,9 @@ +@@ -3378,9 +3466,9 @@ @Nullable public EntityPlayer func_152378_a(UUID p_152378_1_) { -- for (int i = 0; i < this.field_73010_i.size(); ++i) +- for (int i = 0; i < this.field_73010_i.size(); i++) + for (int j2 = 0; j2 < this.field_73010_i.size(); ++j2) { - EntityPlayer entityplayer = this.field_73010_i.get(i); @@ -3102,7 +3253,7 @@ if (p_152378_1_.equals(entityplayer.func_110124_au())) { -@@ -3415,7 +3497,7 @@ +@@ -3409,7 +3497,7 @@ public long func_72905_C() { @@ -3111,7 +3262,7 @@ } public long func_82737_E() -@@ -3425,54 +3507,60 @@ +@@ -3419,54 +3507,60 @@ public long func_72820_D() { @@ -3157,10 +3308,10 @@ + int k2 = MathHelper.func_76128_c(p_72897_1_.field_70161_v / 16.0D); + int l2 = 2; -- for (int l = -2; l <= 2; ++l) +- for (int l = -2; l <= 2; l++) + for (int i3 = -2; i3 <= 2; ++i3) { -- for (int i1 = -2; i1 <= 2; ++i1) +- for (int i1 = -2; i1 <= 2; i1++) + for (int j3 = -2; j3 <= 2; ++j3) { - this.func_72964_e(i + l, j + i1); @@ -3185,7 +3336,7 @@ return true; } -@@ -3535,12 +3623,12 @@ +@@ -3529,12 +3623,12 @@ public boolean func_72911_I() { @@ -3200,7 +3351,7 @@ } public boolean func_175727_C(BlockPos p_175727_1_) -@@ -3574,8 +3662,7 @@ +@@ -3568,8 +3662,7 @@ public boolean func_180502_D(BlockPos p_180502_1_) { @@ -3210,11 +3361,11 @@ } @Nullable -@@ -3602,73 +3689,67 @@ +@@ -3596,73 +3689,67 @@ public void func_175669_a(int p_175669_1_, BlockPos p_175669_2_, int p_175669_3_) { -- for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) + for (int j2 = 0; j2 < this.field_73021_x.size(); ++j2) { - this.field_73021_x.get(i).func_180440_a(p_175669_1_, p_175669_2_, p_175669_3_); @@ -3232,7 +3383,7 @@ { try { -- for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) + for (int j2 = 0; j2 < this.field_73021_x.size(); ++j2) { - this.field_73021_x.get(i).func_180439_a(p_180498_1_, p_180498_2_, p_180498_3_, p_180498_4_); @@ -3305,7 +3456,7 @@ { public String call() { -@@ -3678,21 +3759,27 @@ +@@ -3672,21 +3759,27 @@ try { @@ -3331,7 +3482,7 @@ public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_) { -- for (int i = 0; i < this.field_73021_x.size(); ++i) +- for (int i = 0; i < this.field_73021_x.size(); i++) + for (int j2 = 0; j2 < this.field_73021_x.size(); ++j2) { - IWorldEventListener iworldeventlistener = this.field_73021_x.get(i); @@ -3339,7 +3490,7 @@ iworldeventlistener.func_180441_b(p_175715_1_, p_175715_2_, p_175715_3_); } } -@@ -3708,9 +3795,7 @@ +@@ -3702,9 +3795,7 @@ } @SideOnly(Side.CLIENT) @@ -3350,7 +3501,7 @@ { } -@@ -3721,26 +3806,23 @@ +@@ -3715,26 +3806,23 @@ public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) { @@ -3390,7 +3541,7 @@ } } } -@@ -3749,16 +3831,16 @@ +@@ -3743,16 +3831,16 @@ public DifficultyInstance func_175649_E(BlockPos p_175649_1_) { @@ -3410,7 +3561,7 @@ } public EnumDifficulty func_175659_aa() -@@ -3799,11 +3881,129 @@ +@@ -3793,11 +3881,129 @@ public boolean func_72916_c(int p_72916_1_, int p_72916_2_) { diff --git a/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch b/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch index 37c862cb4..a435a5967 100644 --- a/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldEntitySpawner.java.patch @@ -11,7 +11,7 @@ public int func_77192_a(WorldServer p_77192_1_, boolean p_77192_2_, boolean p_77192_3_, boolean p_77192_4_) { -@@ -42,8 +42,8 @@ +@@ -42,20 +42,20 @@ { if (!entityplayer.func_175149_v()) { @@ -21,7 +21,22 @@ + int k = MathHelper.func_76128_c(entityplayer.field_70161_v / 16.0D); int l = 8; - for (int i1 = -8; i1 <= 8; ++i1) +- for (int i1 = -8; i1 <= 8; i1++) ++ for (int i1 = -8; i1 <= 8; ++i1) + { +- for (int j1 = -8; j1 <= 8; j1++) ++ for (int j1 = -8; j1 <= 8; ++j1) + { + boolean flag = i1 == -8 || i1 == 8 || j1 == -8 || j1 == 8; + ChunkPos chunkpos = new ChunkPos(i1 + j, j1 + k); + + if (!this.field_77193_b.contains(chunkpos)) + { +- i++; ++ ++i; + + if (!flag && p_77192_1_.func_175723_af().func_177730_a(chunkpos)) + { @@ -77,19 +77,19 @@ for (EnumCreatureType enumcreaturetype : EnumCreatureType.values()) @@ -47,15 +62,27 @@ { BlockPos blockpos = func_180621_a(p_77192_1_, chunkpos1.field_77276_a, chunkpos1.field_77275_b); int k1 = blockpos.func_177958_n(); -@@ -109,7 +109,7 @@ +@@ -101,7 +101,7 @@ + { + int j2 = 0; + +- for (int k2 = 0; k2 < 3; k2++) ++ for (int k2 = 0; k2 < 3; ++k2) + { + int l2 = k1; + int i3 = l1; +@@ -109,9 +109,9 @@ int k3 = 6; Biome.SpawnListEntry biome$spawnlistentry = null; IEntityLivingData ientitylivingdata = null; - int l3 = MathHelper.func_76143_f(Math.random() * 4.0); + int l3 = MathHelper.func_76143_f(Math.random() * 4.0D); - for (int i4 = 0; i4 < l3; ++i4) +- for (int i4 = 0; i4 < l3; i4++) ++ for (int i4 = 0; i4 < l3; ++i4) { + l2 += p_77192_1_.field_73012_v.nextInt(6) - p_77192_1_.field_73012_v.nextInt(6); + i3 += p_77192_1_.field_73012_v.nextInt(1) - p_77192_1_.field_73012_v.nextInt(1); @@ -120,8 +120,7 @@ float f = (float)l2 + 0.5F; float f1 = (float)j3 + 0.5F; @@ -85,7 +112,7 @@ } catch (Exception exception) { -@@ -152,8 +148,10 @@ +@@ -152,13 +148,15 @@ entityliving.func_70012_b((double)f, (double)i3, (double)f1, p_77192_1_.field_73012_v.nextFloat() * 360.0F, 0.0F); @@ -97,6 +124,12 @@ ientitylivingdata = entityliving.func_180482_a(p_77192_1_.func_175649_E(new BlockPos(entityliving)), ientitylivingdata); if (entityliving.func_70058_J()) + { +- j2++; ++ ++j2; + p_77192_1_.func_72838_d(entityliving); + } + else @@ -166,7 +164,7 @@ entityliving.func_70106_y(); } @@ -106,7 +139,22 @@ { continue label134; } -@@ -225,19 +223,25 @@ +@@ -207,9 +205,13 @@ + { + return false; + } ++ else if (p_185331_0_.func_185904_a().func_76224_d()) ++ { ++ return false; ++ } + else + { +- return p_185331_0_.func_185904_a().func_76224_d() ? false : !BlockRailBase.func_176563_d(p_185331_0_); ++ return !BlockRailBase.func_176563_d(p_185331_0_); + } + } + +@@ -221,19 +223,25 @@ } else { @@ -136,7 +184,7 @@ { return false; } -@@ -259,7 +263,7 @@ +@@ -255,7 +263,7 @@ { while (p_77191_6_.nextFloat() < p_77191_1_.func_76741_f()) { @@ -145,7 +193,21 @@ int i = biome$spawnlistentry.field_76301_c + p_77191_6_.nextInt(1 + biome$spawnlistentry.field_76299_d - biome$spawnlistentry.field_76301_c); IEntityLivingData ientitylivingdata = null; int j = p_77191_2_ + p_77191_6_.nextInt(p_77191_4_); -@@ -281,7 +285,7 @@ +@@ -263,11 +271,11 @@ + int l = j; + int i1 = k; + +- for (int j1 = 0; j1 < i; j1++) ++ for (int j1 = 0; j1 < i; ++j1) + { + boolean flag = false; + +- for (int k1 = 0; !flag && k1 < 4; k1++) ++ for (int k1 = 0; !flag && k1 < 4; ++k1) + { + BlockPos blockpos = p_77191_0_.func_175672_r(new BlockPos(j, 0, k)); + +@@ -277,7 +285,7 @@ try { @@ -154,7 +216,7 @@ } catch (Exception exception) { -@@ -289,9 +293,8 @@ +@@ -285,9 +293,8 @@ continue; } @@ -166,7 +228,7 @@ p_77191_0_.func_72838_d(entityliving); ientitylivingdata = entityliving.func_180482_a(p_77191_0_.func_175649_E(new BlockPos(entityliving)), ientitylivingdata); flag = true; -@@ -299,10 +302,7 @@ +@@ -295,10 +302,7 @@ j += p_77191_6_.nextInt(5) - p_77191_6_.nextInt(5); diff --git a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch index c14ce5ce2..94a3103c2 100644 --- a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch @@ -1,6 +1,15 @@ --- before/net/minecraft/world/WorldProvider.java +++ after/net/minecraft/world/WorldProvider.java -@@ -55,45 +55,12 @@ +@@ -45,7 +45,7 @@ + { + float f = 0.0F; + +- for (int i = 0; i <= 15; i++) ++ for (int i = 0; i <= 15; ++i) + { + float f1 = 1.0F - (float)i / 15.0F; + this.field_76573_f[i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * 1.0F + 0.0F; +@@ -55,53 +55,26 @@ protected void func_76572_b() { this.field_191067_f = true; @@ -48,8 +57,35 @@ } public boolean func_76566_a(int p_76566_1_, int p_76566_2_) -@@ -125,8 +92,9 @@ - --f; + { + BlockPos blockpos = new BlockPos(p_76566_1_, 0, p_76566_2_); +- return this.field_76579_a.func_180494_b(blockpos).func_185352_i() +- ? true +- : this.field_76579_a.func_184141_c(blockpos).func_177230_c() == Blocks.field_150349_c; ++ ++ if (this.field_76579_a.func_180494_b(blockpos).func_185352_i()) ++ { ++ return true; ++ } ++ else ++ { ++ return this.field_76579_a.func_184141_c(blockpos).func_177230_c() == Blocks.field_150349_c; ++ } + } + + public float func_76563_a(long p_76563_1_, float p_76563_3_) +@@ -111,16 +84,17 @@ + + if (f < 0.0F) + { +- f++; ++ ++f; + } + + if (f > 1.0F) + { +- f--; ++ --f; } - float f1 = 1.0F - (float)((Math.cos((double)f * Math.PI) + 1.0) / 2.0); @@ -60,7 +96,7 @@ } public int func_76559_b(long p_76559_1_) -@@ -144,14 +112,14 @@ +@@ -138,14 +112,14 @@ public float[] func_76560_a(float p_76560_1_, float p_76560_2_) { float f = 0.4F; @@ -78,7 +114,7 @@ this.field_76580_h[0] = f3 * 0.3F + 0.7F; this.field_76580_h[1] = f3 * f3 * 0.7F + 0.2F; this.field_76580_h[2] = f3 * f3 * 0.0F + 0.2F; -@@ -167,14 +135,14 @@ +@@ -161,14 +135,14 @@ @SideOnly(Side.CLIENT) public Vec3d func_76562_b(float p_76562_1_, float p_76562_2_) { @@ -97,7 +133,7 @@ return new Vec3d((double)f1, (double)f2, (double)f3); } -@@ -186,7 +154,7 @@ +@@ -180,7 +154,7 @@ @SideOnly(Side.CLIENT) public float func_76571_f() { @@ -106,7 +142,7 @@ } @SideOnly(Side.CLIENT) -@@ -203,13 +171,13 @@ +@@ -197,13 +171,13 @@ public int func_76557_i() { @@ -122,7 +158,7 @@ } @SideOnly(Side.CLIENT) -@@ -246,6 +214,371 @@ +@@ -240,6 +214,371 @@ public WorldBorder func_177501_r() { return new WorldBorder(); diff --git a/patches/minecraft/net/minecraft/world/WorldServer.java.patch b/patches/minecraft/net/minecraft/world/WorldServer.java.patch index 30893f258..fa5629f06 100644 --- a/patches/minecraft/net/minecraft/world/WorldServer.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldServer.java.patch @@ -151,6 +151,20 @@ public void func_72854_c() { this.field_73068_P = false; +@@ -255,11 +266,11 @@ + { + if (entityplayer.func_175149_v()) + { +- i++; ++ ++i; + } + else if (entityplayer.func_70608_bn()) + { +- j++; ++ ++j; + } + } + @@ -284,10 +295,7 @@ private void func_73051_P() @@ -270,6 +284,15 @@ if (this.func_175662_w(blockpos2)) { this.func_175656_a(blockpos2, Blocks.field_150432_aD.func_176223_P()); +@@ -461,7 +460,7 @@ + { + if (extendedblockstorage != Chunk.field_186036_a && extendedblockstorage.func_76675_b()) + { +- for (int i1 = 0; i1 < i; i1++) ++ for (int i1 = 0; i1 < i; ++i1) + { + this.field_73005_l = this.field_73005_l * 3 + 1013904223; + int j1 = this.field_73005_l >> 2; @@ -491,9 +490,8 @@ protected BlockPos func_175736_a(BlockPos p_175736_1_) { @@ -354,7 +377,7 @@ { if (this.field_80004_Q++ >= 300) { -@@ -617,7 +613,6 @@ +@@ -617,13 +613,12 @@ super.func_72939_s(); } @@ -362,6 +385,13 @@ protected void func_184147_l() { super.func_184147_l(); + this.field_72984_F.func_76318_c("players"); + +- for (int i = 0; i < this.field_73010_i.size(); i++) ++ for (int i = 0; i < this.field_73010_i.size(); ++i) + { + Entity entity = this.field_73010_i.get(i); + Entity entity1 = entity.func_184187_bx(); @@ -681,7 +676,6 @@ this.field_80004_Q = 0; } @@ -370,6 +400,15 @@ public boolean func_72955_a(boolean p_72955_1_) { if (this.field_72986_A.func_76067_t() == WorldType.field_180272_g) +@@ -705,7 +699,7 @@ + + this.field_72984_F.func_76320_a("cleaning"); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + NextTickListEntry nextticklistentry = this.field_73065_O.first(); + @@ -727,14 +721,16 @@ { NextTickListEntry nextticklistentry1 = iterator.next(); @@ -397,7 +436,7 @@ public List func_72920_a(Chunk p_72920_1_, boolean p_72920_2_) { ChunkPos chunkpos = p_72920_1_.func_76632_l(); -@@ -775,7 +770,6 @@ +@@ -775,12 +770,11 @@ } @Nullable @@ -405,6 +444,12 @@ public List func_175712_a(StructureBoundingBox p_175712_1_, boolean p_175712_2_) { List list = null; + +- for (int i = 0; i < 2; i++) ++ for (int i = 0; i < 2; ++i) + { + Iterator iterator; + @@ -798,10 +792,7 @@ NextTickListEntry nextticklistentry = iterator.next(); BlockPos blockpos = nextticklistentry.field_180282_a; @@ -499,6 +544,15 @@ { break; } +@@ -973,7 +967,7 @@ + { + WorldGeneratorBonusChest worldgeneratorbonuschest = new WorldGeneratorBonusChest(); + +- for (int i = 0; i < 10; i++) ++ for (int i = 0; i < 10; ++i) + { + int j = this.field_72986_A.func_76079_c() + this.field_73012_v.nextInt(6) - this.field_73012_v.nextInt(6); + int k = this.field_72986_A.func_76074_e() + this.field_73012_v.nextInt(6) - this.field_73012_v.nextInt(6); @@ -1011,6 +1005,7 @@ } @@ -721,7 +775,7 @@ public MinecraftServer func_73046_m() { return this.field_73061_a; -@@ -1334,51 +1291,14 @@ +@@ -1334,98 +1291,34 @@ return this.field_73019_z.func_186340_h(); } @@ -775,9 +829,11 @@ - ); + SPacketParticles spacketparticles = new SPacketParticles(p_180505_1_, p_180505_2_, (float)p_180505_3_, (float)p_180505_5_, (float)p_180505_7_, (float)p_180505_10_, (float)p_180505_12_, (float)p_180505_14_, (float)p_180505_16_, p_180505_9_, p_180505_18_); - for (int i = 0; i < this.field_73010_i.size(); ++i) +- for (int i = 0; i < this.field_73010_i.size(); i++) ++ for (int i = 0; i < this.field_73010_i.size(); ++i) { -@@ -1387,45 +1307,18 @@ + EntityPlayerMP entityplayermp = (EntityPlayerMP)this.field_73010_i.get(i); + this.func_184159_a(entityplayermp, p_180505_2_, p_180505_3_, p_180505_5_, p_180505_7_, spacketparticles); } } diff --git a/patches/minecraft/net/minecraft/world/biome/Biome.java.patch b/patches/minecraft/net/minecraft/world/biome/Biome.java.patch index 518e54326..7ee8b9ff4 100644 --- a/patches/minecraft/net/minecraft/world/biome/Biome.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/Biome.java.patch @@ -88,7 +88,7 @@ return this.func_185353_n() - (f + (float)p_180626_1_.func_177956_o() - 64.0F) * 0.05F / 30.0F; } else -@@ -222,34 +225,26 @@ +@@ -222,39 +225,31 @@ this.field_76760_I.func_180292_a(p_180624_1_, p_180624_2_, this, p_180624_3_); } @@ -132,7 +132,22 @@ int l = p_180628_4_ & 15; int i1 = p_180628_5_ & 15; BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); -@@ -328,6 +323,14 @@ + +- for (int j1 = 255; j1 >= 0; j1--) ++ for (int j1 = 255; j1 >= 0; --j1) + { + if (j1 <= p_180628_2_.nextInt(5)) + { +@@ -314,7 +309,7 @@ + } + else if (j > 0) + { +- j--; ++ --j; + p_180628_3_.func_177855_a(i1, j1, l, iblockstate1); + + if (j == 0 && iblockstate1.func_177230_c() == Blocks.field_150354_m && k > 1) +@@ -328,27 +323,35 @@ } } @@ -146,8 +161,9 @@ + public Class func_150562_l() { - return this.getClass(); -@@ -335,20 +338,20 @@ +- return (Class )this.getClass(); ++ return this.getClass(); + } public Biome.TempCategory func_150561_m() { diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch index f35dca436..75c5e45d8 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch @@ -19,7 +19,7 @@ this.field_76821_k = new WorldGenMinable(Blocks.field_150365_q.func_176223_P(), this.field_180293_d.field_177844_ac); this.field_76818_l = new WorldGenMinable(Blocks.field_150366_p.func_176223_P(), this.field_180293_d.field_177848_ag); this.field_76819_m = new WorldGenMinable(Blocks.field_150352_o.func_176223_P(), this.field_180293_d.field_177828_ak); -@@ -98,8 +92,11 @@ +@@ -98,23 +92,28 @@ protected void func_150513_a(Biome p_150513_1_, World p_150513_2_, Random p_150513_3_) { @@ -27,67 +27,84 @@ + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre(p_150513_2_, p_150513_3_, forgeChunkPos)); this.func_76797_b(p_150513_2_, p_150513_3_); +- for (int i = 0; i < this.field_76805_H; i++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SAND)) - for (int i = 0; i < this.field_76805_H; ++i) ++ for (int i = 0; i < this.field_76805_H; ++i) { int j = p_150513_3_.nextInt(16) + 8; -@@ -107,6 +104,7 @@ + int k = p_150513_3_.nextInt(16) + 8; this.field_76810_g.func_180709_b(p_150513_2_, p_150513_3_, p_150513_2_.func_175672_r(this.field_180294_c.func_177982_a(j, 0, k))); } +- for (int i1 = 0; i1 < this.field_76806_I; i1++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY)) - for (int i1 = 0; i1 < this.field_76806_I; ++i1) ++ for (int i1 = 0; i1 < this.field_76806_I; ++i1) { int l1 = p_150513_3_.nextInt(16) + 8; -@@ -114,6 +112,7 @@ + int i6 = p_150513_3_.nextInt(16) + 8; this.field_76809_f.func_180709_b(p_150513_2_, p_150513_3_, p_150513_2_.func_175672_r(this.field_180294_c.func_177982_a(l1, 0, i6))); } +- for (int j1 = 0; j1 < this.field_76801_G; j1++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SAND_PASS2)) - for (int j1 = 0; j1 < this.field_76801_G; ++j1) ++ for (int j1 = 0; j1 < this.field_76801_G; ++j1) { int i2 = p_150513_3_.nextInt(16) + 8; -@@ -128,6 +127,7 @@ - ++k1; + int j6 = p_150513_3_.nextInt(16) + 8; +@@ -125,10 +124,11 @@ + + if (p_150513_3_.nextFloat() < this.field_189870_A) + { +- k1++; ++ ++k1; } +- for (int j2 = 0; j2 < k1; j2++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.TREE)) - for (int j2 = 0; j2 < k1; ++j2) ++ for (int j2 = 0; j2 < k1; ++j2) { int k6 = p_150513_3_.nextInt(16) + 8; -@@ -142,6 +142,7 @@ + int l = p_150513_3_.nextInt(16) + 8; +@@ -142,14 +142,16 @@ } } +- for (int k2 = 0; k2 < this.field_76807_J; k2++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.BIG_SHROOM)) - for (int k2 = 0; k2 < this.field_76807_J; ++k2) ++ for (int k2 = 0; k2 < this.field_76807_J; ++k2) { int l6 = p_150513_3_.nextInt(16) + 8; -@@ -149,6 +150,7 @@ + int k10 = p_150513_3_.nextInt(16) + 8; this.field_76826_u.func_180709_b(p_150513_2_, p_150513_3_, p_150513_2_.func_175645_m(this.field_180294_c.func_177982_a(l6, 0, k10))); } +- for (int l2 = 0; l2 < this.field_76802_A; l2++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS)) - for (int l2 = 0; l2 < this.field_76802_A; ++l2) ++ for (int l2 = 0; l2 < this.field_76802_A; ++l2) { int i7 = p_150513_3_.nextInt(16) + 8; -@@ -170,6 +172,7 @@ + int l10 = p_150513_3_.nextInt(16) + 8; +@@ -170,7 +172,8 @@ } } +- for (int i3 = 0; i3 < this.field_76803_B; i3++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS)) - for (int i3 = 0; i3 < this.field_76803_B; ++i3) ++ for (int i3 = 0; i3 < this.field_76803_B; ++i3) { int j7 = p_150513_3_.nextInt(16) + 8; -@@ -183,6 +186,7 @@ + int i11 = p_150513_3_.nextInt(16) + 8; +@@ -183,7 +186,8 @@ } } +- for (int j3 = 0; j3 < this.field_76804_C; j3++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.DEAD_BUSH)) - for (int j3 = 0; j3 < this.field_76804_C; ++j3) ++ for (int j3 = 0; j3 < this.field_76804_C; ++j3) { int k7 = p_150513_3_.nextInt(16) + 8; -@@ -192,10 +196,11 @@ + int j11 = p_150513_3_.nextInt(16) + 8; +@@ -192,11 +196,12 @@ if (l14 > 0) { int i18 = p_150513_3_.nextInt(l14); @@ -96,31 +113,68 @@ } } +- for (int k3 = 0; k3 < this.field_76833_y; k3++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LILYPAD)) - for (int k3 = 0; k3 < this.field_76833_y; ++k3) ++ for (int k3 = 0; k3 < this.field_76833_y; ++k3) { int l7 = p_150513_3_.nextInt(16) + 8; -@@ -222,6 +227,8 @@ + int k11 = p_150513_3_.nextInt(16) + 8; +@@ -205,25 +210,26 @@ + if (i15 > 0) + { + int j18 = p_150513_3_.nextInt(i15); +- BlockPos blockpos4 = this.field_180294_c.func_177982_a(l7, j18, k11); ++ BlockPos blockpos4; ++ BlockPos blockpos7; + +- while (blockpos4.func_177956_o() > 0) ++ for (blockpos4 = this.field_180294_c.func_177982_a(l7, j18, k11); blockpos4.func_177956_o() > 0; blockpos4 = blockpos7) + { +- BlockPos blockpos7 = blockpos4.func_177977_b(); ++ blockpos7 = blockpos4.func_177977_b(); + + if (!p_150513_2_.func_175623_d(blockpos7)) + { + break; + } +- +- blockpos4 = blockpos7; + } + + this.field_76834_x.func_180709_b(p_150513_2_, p_150513_3_, blockpos4); } } +- for (int l3 = 0; l3 < this.field_76798_D; l3++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SHROOM)) + { - for (int l3 = 0; l3 < this.field_76798_D; ++l3) ++ for (int l3 = 0; l3 < this.field_76798_D; ++l3) { if (p_150513_3_.nextInt(4) == 0) -@@ -272,7 +279,9 @@ + { +@@ -273,8 +279,10 @@ this.field_76827_t.func_180709_b(p_150513_2_, p_150513_3_, this.field_180294_c.func_177982_a(j4, l15, l8)); } } - +- for (int k4 = 0; k4 < this.field_76799_E; k4++) + } // End of Mushroom generation + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.REED)) + { - for (int k4 = 0; k4 < this.field_76799_E; ++k4) ++ for (int k4 = 0; k4 < this.field_76799_E; ++k4) { int i9 = p_150513_3_.nextInt(16) + 8; -@@ -298,7 +307,8 @@ + int l12 = p_150513_3_.nextInt(16) + 8; +@@ -287,7 +295,7 @@ + } + } + +- for (int l4 = 0; l4 < 10; l4++) ++ for (int l4 = 0; l4 < 10; ++l4) + { + int j9 = p_150513_3_.nextInt(16) + 8; + int i13 = p_150513_3_.nextInt(16) + 8; +@@ -299,7 +307,8 @@ this.field_76825_v.func_180709_b(p_150513_2_, p_150513_3_, this.field_180294_c.func_177982_a(j9, i19, i13)); } } @@ -130,7 +184,7 @@ if (p_150513_3_.nextInt(32) == 0) { int i5 = p_150513_3_.nextInt(16) + 8; -@@ -308,10 +318,11 @@ +@@ -309,11 +318,12 @@ if (j13 > 0) { int k16 = p_150513_3_.nextInt(j13); @@ -139,19 +193,23 @@ } } +- for (int j5 = 0; j5 < this.field_76800_F; j5++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CACTUS)) - for (int j5 = 0; j5 < this.field_76800_F; ++j5) ++ for (int j5 = 0; j5 < this.field_76800_F; ++j5) { int l9 = p_150513_3_.nextInt(16) + 8; -@@ -327,6 +338,7 @@ + int k13 = p_150513_3_.nextInt(16) + 8; +@@ -328,7 +338,8 @@ if (this.field_76808_K) { +- for (int k5 = 0; k5 < 50; k5++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LAKE_WATER)) - for (int k5 = 0; k5 < 50; ++k5) ++ for (int k5 = 0; k5 < 50; ++k5) { int i10 = p_150513_3_.nextInt(16) + 8; -@@ -337,101 +349,49 @@ + int l13 = p_150513_3_.nextInt(16) + 8; +@@ -338,101 +349,49 @@ { int k19 = p_150513_3_.nextInt(i17); BlockPos blockpos6 = this.field_180294_c.func_177982_a(i10, k19, l13); @@ -160,8 +218,9 @@ } } +- for (int l5 = 0; l5 < 20; l5++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_150513_2_, p_150513_3_, forgeChunkPos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LAKE_LAVA)) - for (int l5 = 0; l5 < 20; ++l5) ++ for (int l5 = 0; l5 < 20; ++l5) { int j10 = p_150513_3_.nextInt(16) + 8; int i14 = p_150513_3_.nextInt(16) + 8; @@ -281,9 +340,22 @@ } protected void func_76795_a(World p_76795_1_, Random p_76795_2_, int p_76795_3_, WorldGenerator p_76795_4_, int p_76795_5_, int p_76795_6_) -@@ -456,8 +416,7 @@ +@@ -447,30 +406,26 @@ + { + if (p_76795_5_ < 255) + { +- p_76795_6_++; ++ ++p_76795_6_; + } + else + { +- p_76795_5_--; ++ --p_76795_5_; + } + } - for (int j = 0; j < p_76795_3_; ++j) +- for (int j = 0; j < p_76795_3_; j++) ++ for (int j = 0; j < p_76795_3_; ++j) { - BlockPos blockpos = this.field_180294_c - .func_177982_a(p_76795_2_.nextInt(16), p_76795_2_.nextInt(p_76795_6_ - p_76795_5_) + p_76795_5_, p_76795_2_.nextInt(16)); @@ -291,9 +363,11 @@ p_76795_4_.func_180709_b(p_76795_1_, p_76795_2_, blockpos); } } -@@ -466,10 +425,7 @@ + + protected void func_76793_b(World p_76793_1_, Random p_76793_2_, int p_76793_3_, WorldGenerator p_76793_4_, int p_76793_5_, int p_76793_6_) { - for (int i = 0; i < p_76793_3_; ++i) +- for (int i = 0; i < p_76793_3_; i++) ++ for (int i = 0; i < p_76793_3_; ++i) { - BlockPos blockpos = this.field_180294_c - .func_177982_a( diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch index bc2ed7220..ae881ae2e 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeForest.java.patch @@ -72,7 +72,7 @@ int i = p_180624_2_.nextInt(5) - 3; if (this.field_150632_aF == BiomeForest.Type.FLOWER) -@@ -100,11 +106,13 @@ +@@ -100,25 +106,27 @@ } this.func_185378_a(p_180624_1_, p_180624_2_, p_180624_3_, i); @@ -82,11 +82,14 @@ public void func_185379_b(World p_185379_1_, Random p_185379_2_, BlockPos p_185379_3_) { +- for (int i = 0; i < 4; i++) + - for (int i = 0; i < 4; ++i) ++ for (int i = 0; i < 4; ++i) { - for (int j = 0; j < 4; ++j) -@@ -113,12 +121,12 @@ +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) + { + int k = i * 4 + 1 + 8 + p_185379_2_.nextInt(3); int l = j * 4 + 1 + 8 + p_185379_2_.nextInt(3); BlockPos blockpos = p_185379_1_.func_175645_m(p_185379_3_.func_177982_a(k, 0, l)); @@ -101,6 +104,24 @@ { WorldGenAbstractTree worldgenabstracttree = this.func_150567_a(p_185379_2_); worldgenabstracttree.func_175904_e(); +@@ -134,7 +142,7 @@ + + public void func_185378_a(World p_185378_1_, Random p_185378_2_, BlockPos p_185378_3_, int p_185378_4_) + { +- for (int i = 0; i < p_185378_4_; i++) ++ for (int i = 0; i < p_185378_4_; ++i) + { + int j = p_185378_2_.nextInt(3); + +@@ -151,7 +159,7 @@ + field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.PAEONIA); + } + +- for (int k = 0; k < 5; k++) ++ for (int k = 0; k < 5; ++k) + { + int l = p_185378_2_.nextInt(16) + 8; + int i1 = p_185378_2_.nextInt(16) + 8; @@ -165,14 +173,12 @@ } } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch index 9d0a389bb..ffdbdbcd7 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeHills.java.patch @@ -27,7 +27,7 @@ super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); - int i = 3 + p_180624_2_.nextInt(6); - -- for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) - { - int k = p_180624_2_.nextInt(16); - int l = p_180624_2_.nextInt(28) + 4; @@ -39,13 +39,15 @@ - p_180624_1_.func_180501_a(blockpos, Blocks.field_150412_bA.func_176223_P(), 2); - } - } +- +- for (int j1 = 0; j1 < 7; j1++) + + net.minecraftforge.common.MinecraftForge.ORE_GEN_BUS.post(new net.minecraftforge.event.terraingen.OreGenEvent.Pre(p_180624_1_, p_180624_2_, p_180624_3_)); + WorldGenerator emeralds = new EmeraldGenerator(); + if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(p_180624_1_, p_180624_2_, emeralds, p_180624_3_, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.EMERALD)) + emeralds.func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_); - - for (int j1 = 0; j1 < 7; ++j1) ++ ++ for (int j1 = 0; j1 < 7; ++j1) { int k1 = p_180624_2_.nextInt(16); int l1 = p_180624_2_.nextInt(64); diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch index e8db21b60..b00ea89ce 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeJungle.java.patch @@ -29,7 +29,7 @@ public WorldGenAbstractTree func_150567_a(Random p_150567_1_) { if (p_150567_1_.nextInt(10) == 0) -@@ -76,28 +67,28 @@ +@@ -76,29 +67,29 @@ } else { @@ -61,7 +61,9 @@ + (new WorldGenMelon()).func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_.func_177982_a(i, k, j)); WorldGenVines worldgenvines = new WorldGenVines(); +- for (int j1 = 0; j1 < 50; j1++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, new net.minecraft.util.math.ChunkPos(p_180624_3_), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS)) - for (int j1 = 0; j1 < 50; ++j1) ++ for (int j1 = 0; j1 < 50; ++j1) { k = p_180624_2_.nextInt(16) + 8; + int l = 128; diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeMesa.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeMesa.java.patch index caa1f2bd4..a23c00cee 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeMesa.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeMesa.java.patch @@ -89,7 +89,7 @@ } } -@@ -129,8 +108,8 @@ +@@ -129,13 +108,13 @@ int i2 = p_180622_1_.func_181545_F(); IBlockState iblockstate = field_185382_B; IBlockState iblockstate3 = this.field_76753_B; @@ -100,7 +100,13 @@ int l = -1; boolean flag1 = false; int i1 = 0; -@@ -178,49 +157,55 @@ + +- for (int j1 = 255; j1 >= 0; j1--) ++ for (int j1 = 255; j1 >= 0; --j1) + { + if (p_180622_3_.func_177856_a(l1, j1, k1).func_185904_a() == Material.field_151579_a && j1 < (int)d4) + { +@@ -178,54 +157,60 @@ l = k + Math.max(0, j1 - i2); @@ -187,6 +193,90 @@ } } else if (l > 0) + { +- l--; ++ --l; + + if (flag1) + { +@@ -237,7 +222,7 @@ + } + } + +- i1++; ++ ++i1; + } + } + } +@@ -250,7 +235,7 @@ + Random random = new Random(p_150619_1_); + this.field_150625_aG = new NoiseGeneratorPerlin(random, 1); + +- for (int l1 = 0; l1 < 64; l1++) ++ for (int l1 = 0; l1 < 64; ++l1) + { + l1 += random.nextInt(5) + 1; + +@@ -262,12 +247,12 @@ + + int i2 = random.nextInt(4) + 2; + +- for (int i = 0; i < i2; i++) ++ for (int i = 0; i < i2; ++i) + { + int j = random.nextInt(3) + 1; + int k = random.nextInt(64); + +- for (int l = 0; k + l < 64 && l < j; l++) ++ for (int l = 0; k + l < 64 && l < j; ++l) + { + this.field_150621_aC[k + l] = field_185382_B.func_177226_a(BlockColored.field_176581_a, EnumDyeColor.YELLOW); + } +@@ -275,12 +260,12 @@ + + int j2 = random.nextInt(4) + 2; + +- for (int k2 = 0; k2 < j2; k2++) ++ for (int k2 = 0; k2 < j2; ++k2) + { + int i3 = random.nextInt(3) + 2; + int l3 = random.nextInt(64); + +- for (int i1 = 0; l3 + i1 < 64 && i1 < i3; i1++) ++ for (int i1 = 0; l3 + i1 < 64 && i1 < i3; ++i1) + { + this.field_150621_aC[l3 + i1] = field_185382_B.func_177226_a(BlockColored.field_176581_a, EnumDyeColor.BROWN); + } +@@ -288,12 +273,12 @@ + + int l2 = random.nextInt(4) + 2; + +- for (int j3 = 0; j3 < l2; j3++) ++ for (int j3 = 0; j3 < l2; ++j3) + { + int i4 = random.nextInt(3) + 1; + int k4 = random.nextInt(64); + +- for (int j1 = 0; k4 + j1 < 64 && j1 < i4; j1++) ++ for (int j1 = 0; k4 + j1 < 64 && j1 < i4; ++j1) + { + this.field_150621_aC[k4 + j1] = field_185382_B.func_177226_a(BlockColored.field_176581_a, EnumDyeColor.RED); + } +@@ -302,12 +287,12 @@ + int k3 = random.nextInt(3) + 3; + int j4 = 0; + +- for (int l4 = 0; l4 < k3; l4++) ++ for (int l4 = 0; l4 < k3; ++l4) + { + int i5 = 1; + j4 += random.nextInt(16) + 4; + +- for (int k1 = 0; j4 + k1 < 64 && k1 < 1; k1++) ++ for (int k1 = 0; j4 + k1 < 64 && k1 < 1; ++k1) + { + this.field_150621_aC[j4 + k1] = field_185382_B.func_177226_a(BlockColored.field_176581_a, EnumDyeColor.WHITE); + @@ -326,20 +311,32 @@ public IBlockState func_180629_a(int p_180629_1_, int p_180629_2_, int p_180629_3_) diff --git a/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch index bbf1ccb1d..f61654c35 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomePlains.java.patch @@ -30,15 +30,17 @@ { this.field_76760_I.field_76802_A = 15; this.field_76760_I.field_76803_B = 5; -@@ -82,6 +80,7 @@ +@@ -82,7 +80,8 @@ this.field_76760_I.field_76803_B = 10; field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.GRASS); +- for (int i = 0; i < 7; i++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, new net.minecraft.util.math.ChunkPos(p_180624_3_), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS)) - for (int i = 0; i < 7; ++i) ++ for (int i = 0; i < 7; ++i) { int j = p_180624_2_.nextInt(16) + 8; -@@ -91,7 +90,7 @@ + int k = p_180624_2_.nextInt(16) + 8; +@@ -91,11 +90,11 @@ } } @@ -47,6 +49,11 @@ { field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.SUNFLOWER); +- for (int i1 = 0; i1 < 10; i1++) ++ for (int i1 = 0; i1 < 10; ++i1) + { + int j1 = p_180624_2_.nextInt(16) + 8; + int k1 = p_180624_2_.nextInt(16) + 8; @@ -108,6 +107,20 @@ } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch index 2c0852c06..8e972a9f7 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeProvider.java.patch @@ -36,6 +36,15 @@ } public Biome func_180300_a(BlockPos p_180300_1_, Biome p_180300_2_) +@@ -81,7 +83,7 @@ + + try + { +- for (int i = 0; i < p_76937_4_ * p_76937_5_; i++) ++ for (int i = 0; i < p_76937_4_ * p_76937_5_; ++i) + { + p_76937_1_[i] = Biome.func_180276_a(aint[i], Biomes.field_180279_ad); + } @@ -92,11 +94,11 @@ { CrashReport crashreport = CrashReport.func_85055_a(throwable, "Invalid Biome id"); @@ -53,6 +62,24 @@ throw new ReportedException(crashreport); } } +@@ -125,7 +127,7 @@ + { + int[] aint = this.field_76945_e.func_75904_a(p_76931_2_, p_76931_3_, p_76931_4_, p_76931_5_); + +- for (int i = 0; i < p_76931_4_ * p_76931_5_; i++) ++ for (int i = 0; i < p_76931_4_ * p_76931_5_; ++i) + { + p_76931_1_[i] = Biome.func_180276_a(aint[i], Biomes.field_180279_ad); + } +@@ -147,7 +149,7 @@ + + try + { +- for (int k1 = 0; k1 < i1 * j1; k1++) ++ for (int k1 = 0; k1 < i1 * j1; ++k1) + { + Biome biome = Biome.func_150568_d(aint[k1]); + @@ -164,9 +166,9 @@ CrashReport crashreport = CrashReport.func_85055_a(throwable, "Invalid Biome id"); CrashReportCategory crashreportcategory = crashreport.func_85058_a("Layer"); @@ -66,6 +93,24 @@ crashreportcategory.func_71507_a("allowed", p_76940_4_); throw new ReportedException(crashreport); } +@@ -186,7 +188,7 @@ + BlockPos blockpos = null; + int k1 = 0; + +- for (int l1 = 0; l1 < i1 * j1; l1++) ++ for (int l1 = 0; l1 < i1 * j1; ++l1) + { + int i2 = i + l1 % i1 << 2; + int j2 = j + l1 / i1 << 2; +@@ -195,7 +197,7 @@ + if (p_180630_4_.contains(biome) && (blockpos == null || p_180630_5_.nextInt(k1 + 1) == 0)) + { + blockpos = new BlockPos(i2, 0, j2); +- k1++; ++ ++k1; + } + } + @@ -205,6 +207,13 @@ public void func_76938_b() { diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch index 3ad397808..15addfa24 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeSavanna.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/biome/BiomeSavanna.java +++ after/net/minecraft/world/biome/BiomeSavanna.java -@@ -30,17 +30,16 @@ +@@ -30,18 +30,17 @@ this.field_76760_I.field_76803_B = 20; } @@ -15,10 +15,12 @@ { field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.GRASS); +- for (int i = 0; i < 7; i++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, new net.minecraft.util.math.ChunkPos(p_180624_3_), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS)) - for (int i = 0; i < 7; ++i) ++ for (int i = 0; i < 7; ++i) { int j = p_180624_2_.nextInt(16) + 8; + int k = p_180624_2_.nextInt(16) + 8; @@ -52,7 +51,6 @@ super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch index a0c5dc4c7..0a0b8df77 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeSnow.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/biome/BiomeSnow.java +++ after/net/minecraft/world/biome/BiomeSnow.java -@@ -49,16 +49,14 @@ +@@ -49,25 +49,23 @@ this.field_76761_J.add(new Biome.SpawnListEntry(EntityStray.class, 80, 4, 4)); } @@ -16,8 +16,19 @@ - if (this.field_150615_aC) + if (this.field_150615_aC && net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, new net.minecraft.util.math.ChunkPos(p_180624_3_), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.ICE)) { - for (int i = 0; i < 3; ++i) +- for (int i = 0; i < 3; i++) ++ for (int i = 0; i < 3; ++i) { + int j = p_180624_2_.nextInt(16) + 8; + int k = p_180624_2_.nextInt(16) + 8; + this.field_150616_aD.func_180709_b(p_180624_1_, p_180624_2_, p_180624_1_.func_175645_m(p_180624_3_.func_177982_a(j, 0, k))); + } + +- for (int l = 0; l < 2; l++) ++ for (int l = 0; l < 2; ++l) + { + int i1 = p_180624_2_.nextInt(16) + 8; + int j1 = p_180624_2_.nextInt(16) + 8; @@ -78,7 +76,6 @@ super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); } diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeSwamp.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeSwamp.java.patch index 0af407d7c..ec4156dfc 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeSwamp.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeSwamp.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/biome/BiomeSwamp.java +++ after/net/minecraft/world/biome/BiomeSwamp.java -@@ -34,39 +34,21 @@ +@@ -34,44 +34,26 @@ this.field_76761_J.add(new Biome.SpawnListEntry(EntitySlime.class, 1, 1, 1)); } @@ -42,6 +42,12 @@ { int i = p_180622_4_ & 15; int j = p_180622_5_ & 15; + +- for (int k = 255; k >= 0; k--) ++ for (int k = 255; k >= 0; --k) + { + if (p_180622_3_.func_177856_a(j, k, i).func_185904_a() != Material.field_151579_a) + { @@ -79,7 +61,7 @@ { p_180622_3_.func_177855_a(j, k, i, field_185372_h); diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch index 6e952cab6..eba482529 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeTaiga.java.patch @@ -8,7 +8,7 @@ public WorldGenAbstractTree func_150567_a(Random p_150567_1_) { if ((this.field_150644_aH == BiomeTaiga.Type.MEGA || this.field_150644_aH == BiomeTaiga.Type.MEGA_SPRUCE) && p_150567_1_.nextInt(3) == 0) -@@ -61,16 +60,14 @@ +@@ -61,20 +60,18 @@ } } @@ -26,14 +26,21 @@ { int i = p_180624_2_.nextInt(3); -@@ -85,6 +82,7 @@ +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + int k = p_180624_2_.nextInt(16) + 8; + int l = p_180624_2_.nextInt(16) + 8; +@@ -85,7 +82,8 @@ field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.FERN); +- for (int i1 = 0; i1 < 7; i1++) + if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, new net.minecraft.util.math.ChunkPos(p_180624_3_), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS)) - for (int i1 = 0; i1 < 7; ++i1) ++ for (int i1 = 0; i1 < 7; ++i1) { int j1 = p_180624_2_.nextInt(16) + 8; + int k1 = p_180624_2_.nextInt(16) + 8; @@ -96,7 +94,6 @@ super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_); } diff --git a/patches/minecraft/net/minecraft/world/chunk/BlockStateContainer.java.patch b/patches/minecraft/net/minecraft/world/chunk/BlockStateContainer.java.patch index 46af61545..f8de896f8 100644 --- a/patches/minecraft/net/minecraft/world/chunk/BlockStateContainer.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/BlockStateContainer.java.patch @@ -20,7 +20,7 @@ } this.field_186022_c.func_186041_a(field_186020_a); -@@ -54,7 +60,6 @@ +@@ -54,14 +60,13 @@ } } @@ -28,6 +28,14 @@ public int func_186008_a(int p_186008_1_, IBlockState p_186008_2_) { BitArray bitarray = this.field_186021_b; + IBlockStatePalette iblockstatepalette = this.field_186022_c; + this.func_186012_b(p_186008_1_); + +- for (int i = 0; i < bitarray.func_188144_b(); i++) ++ for (int i = 0; i < bitarray.func_188144_b(); ++i) + { + IBlockState iblockstate = iblockstatepalette.func_186039_a(bitarray.func_188142_a(i)); + @@ -103,11 +108,15 @@ if (this.field_186024_e != i) @@ -45,6 +53,15 @@ } public void func_186009_b(PacketBuffer p_186009_1_) +@@ -122,7 +131,7 @@ + { + NibbleArray nibblearray = null; + +- for (int i = 0; i < 4096; i++) ++ for (int i = 0; i < 4096; ++i) + { + int j = Block.field_176229_d.func_148747_b(this.func_186015_a(i)); + int k = i & 15; @@ -139,7 +148,7 @@ nibblearray.func_76581_a(k, l, i1, j >> 12 & 15); } @@ -54,6 +71,15 @@ p_186017_2_.func_76581_a(k, l, i1, j & 15); } +@@ -148,7 +157,7 @@ + + public void func_186019_a(byte[] p_186019_1_, NibbleArray p_186019_2_, @Nullable NibbleArray p_186019_3_) + { +- for (int i = 0; i < 4096; i++) ++ for (int i = 0; i < 4096; ++i) + { + int j = i & 15; + int k = i >> 8 & 15; @@ -161,9 +170,6 @@ public int func_186018_a() diff --git a/patches/minecraft/net/minecraft/world/chunk/BlockStatePaletteHashMap.java.patch b/patches/minecraft/net/minecraft/world/chunk/BlockStatePaletteHashMap.java.patch index 4439b8829..4e88cf19d 100644 --- a/patches/minecraft/net/minecraft/world/chunk/BlockStatePaletteHashMap.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/BlockStatePaletteHashMap.java.patch @@ -12,7 +12,7 @@ public int func_186041_a(IBlockState p_186041_1_) { int i = this.field_186046_a.func_186815_a(p_186041_1_); -@@ -40,14 +39,12 @@ +@@ -40,43 +39,39 @@ } @Nullable @@ -27,7 +27,12 @@ public void func_186038_a(PacketBuffer p_186038_1_) { this.field_186046_a.func_186812_a(); -@@ -59,7 +56,6 @@ + int i = p_186038_1_.func_150792_a(); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + this.field_186046_a.func_186808_c(Block.field_176229_d.func_148745_a(p_186038_1_.func_150792_a())); } } @@ -35,7 +40,12 @@ public void func_186037_b(PacketBuffer p_186037_1_) { int i = this.field_186046_a.func_186810_b(); -@@ -71,7 +67,6 @@ + p_186037_1_.func_150787_b(i); + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + p_186037_1_.func_150787_b(Block.field_176229_d.func_148747_b(this.field_186046_a.func_186813_a(j))); } } @@ -43,3 +53,9 @@ public int func_186040_a() { int i = PacketBuffer.func_150790_a(this.field_186046_a.func_186810_b()); + +- for (int j = 0; j < this.field_186046_a.func_186810_b(); j++) ++ for (int j = 0; j < this.field_186046_a.func_186810_b(); ++j) + { + i += PacketBuffer.func_150790_a(Block.field_176229_d.func_148747_b(this.field_186046_a.func_186813_a(j))); + } diff --git a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch index 05a7141b1..03519c560 100644 --- a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch @@ -28,7 +28,7 @@ private final ClassInheritanceMultiMap[] field_76645_j; private boolean field_76646_k; private boolean field_150814_l; -@@ -65,13 +65,20 @@ +@@ -65,25 +65,33 @@ private long field_76641_n; private int field_82912_p; private long field_111204_q; @@ -52,9 +52,10 @@ this.field_76637_e = p_i1995_1_; this.field_76635_g = p_i1995_2_; this.field_76647_h = p_i1995_3_; -@@ -79,11 +86,12 @@ + this.field_76634_f = new int[256]; - for (int i = 0; i < this.field_76645_j.length; ++i) +- for (int i = 0; i < this.field_76645_j.length; i++) ++ for (int i = 0; i < this.field_76645_j.length; ++i) { - this.field_76645_j[i] = new ClassInheritanceMultiMap<>(Entity.class); + this.field_76645_j[i] = new ClassInheritanceMultiMap(Entity.class); @@ -66,7 +67,44 @@ } public Chunk(World p_i45645_1_, ChunkPrimer p_i45645_2_, int p_i45645_3_, int p_i45645_4_) -@@ -172,7 +180,7 @@ +@@ -92,11 +100,11 @@ + int i = 256; + boolean flag = p_i45645_1_.field_73011_w.func_191066_m(); + +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { +- for (int l = 0; l < 256; l++) ++ for (int l = 0; l < 256; ++l) + { + IBlockState iblockstate = p_i45645_2_.func_177856_a(j, l, k); + +@@ -134,7 +142,7 @@ + @Nullable + private ExtendedBlockStorage func_186031_y() + { +- for (int i = this.field_76652_q.length - 1; i >= 0; i--) ++ for (int i = this.field_76652_q.length - 1; i >= 0; --i) + { + if (this.field_76652_q[i] != field_186036_a) + { +@@ -162,17 +170,17 @@ + int i = this.func_76625_h(); + this.field_82912_p = Integer.MAX_VALUE; + +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { + this.field_76638_b[j + (k << 4)] = -999; + +- for (int l = i + 16; l > 0; l--) ++ for (int l = i + 16; l > 0; --l) { IBlockState iblockstate = this.func_186032_a(j, l - 1, k); @@ -75,6 +113,23 @@ { this.field_76634_f[k << 4 | j] = l; +@@ -195,13 +203,13 @@ + int i = this.func_76625_h(); + this.field_82912_p = Integer.MAX_VALUE; + +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { + this.field_76638_b[j + (k << 4)] = -999; + +- for (int l = i + 16; l > 0; l--) ++ for (int l = i + 16; l > 0; --l) + { + if (this.func_150808_b(j, l - 1, k) != 0) + { @@ -243,7 +251,9 @@ } } @@ -86,6 +141,27 @@ { break; } +@@ -267,9 +277,9 @@ + + if (this.field_76637_e.func_175697_a(new BlockPos(this.field_76635_g * 16 + 8, 0, this.field_76647_h * 16 + 8), 16)) + { +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) + { +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { + if (this.field_76639_c[i + j * 16]) + { +@@ -324,7 +334,7 @@ + { + if (p_76609_4_ > p_76609_3_ && this.field_76637_e.func_175697_a(new BlockPos(p_76609_1_, 0, p_76609_2_), 16)) + { +- for (int i = p_76609_3_; i < p_76609_4_; i++) ++ for (int i = p_76609_3_; i < p_76609_4_; ++i) + { + this.field_76637_e.func_180500_c(EnumSkyBlock.SKY, new BlockPos(p_76609_1_, i, p_76609_2_)); + } @@ -335,7 +345,7 @@ private void func_76615_h(int p_76615_1_, int p_76615_2_, int p_76615_3_) @@ -95,6 +171,33 @@ int j = i; if (p_76615_2_ > i) +@@ -345,7 +355,7 @@ + + while (j > 0 && this.func_150808_b(p_76615_1_, j - 1, p_76615_3_) == 0) + { +- j--; ++ --j; + } + + if (j != i) +@@ -359,7 +369,7 @@ + { + if (j < i) + { +- for (int j1 = j; j1 < i; j1++) ++ for (int j1 = j; j1 < i; ++j1) + { + ExtendedBlockStorage extendedblockstorage2 = this.field_76652_q[j1 >> 4]; + +@@ -372,7 +382,7 @@ + } + else + { +- for (int i1 = i; i1 < j; i1++) ++ for (int i1 = i; i1 < j; ++i1) + { + ExtendedBlockStorage extendedblockstorage = this.field_76652_q[i1 >> 4]; + @@ -388,7 +398,8 @@ while (j > 0 && k1 > 0) @@ -335,7 +438,7 @@ } public void func_76630_e() -@@ -874,8 +886,8 @@ +@@ -874,12 +886,12 @@ public void func_177414_a(@Nullable Entity p_177414_1_, AxisAlignedBB p_177414_2_, List p_177414_3_, Predicate p_177414_4_) { @@ -346,6 +449,11 @@ i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); +- for (int k = i; k <= j; k++) ++ for (int k = i; k <= j; ++k) + { + if (!this.field_76645_j[k].isEmpty()) + { @@ -898,8 +910,7 @@ { for (Entity entity1 : aentity) @@ -356,7 +464,7 @@ { p_177414_3_.add(entity1); } -@@ -911,12 +922,10 @@ +@@ -911,16 +922,14 @@ } } @@ -372,6 +480,11 @@ i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); +- for (int k = i; k <= j; k++) ++ for (int k = i; k <= j; ++k) + { + for (T t : this.field_76645_j[k].func_180215_b(p_177430_1_)) + { @@ -951,14 +960,7 @@ public Random func_76617_a(long p_76617_1_) @@ -427,7 +540,7 @@ } else { -@@ -1132,6 +1139,13 @@ +@@ -1132,9 +1139,16 @@ @SideOnly(Side.CLIENT) public void func_186033_a(PacketBuffer p_186033_1_, int p_186033_2_, boolean p_186033_3_) { @@ -440,7 +553,20 @@ + boolean flag = this.field_76637_e.field_73011_w.func_191066_m(); - for (int i = 0; i < this.field_76652_q.length; ++i) +- for (int i = 0; i < this.field_76652_q.length; i++) ++ for (int i = 0; i < this.field_76652_q.length; ++i) + { + ExtendedBlockStorage extendedblockstorage = this.field_76652_q[i]; + +@@ -1168,7 +1182,7 @@ + p_186033_1_.readBytes(this.field_76651_r); + } + +- for (int j = 0; j < this.field_76652_q.length; j++) ++ for (int j = 0; j < this.field_76652_q.length; ++j) + { + if (this.field_76652_q[j] != field_186036_a && (p_186033_2_ & 1 << j) != 0) + { @@ -1180,10 +1194,16 @@ this.field_76646_k = true; this.func_76590_a(); @@ -484,7 +610,25 @@ } else { -@@ -1248,14 +1273,13 @@ +@@ -1231,7 +1256,7 @@ + { + BlockPos blockpos = new BlockPos(this.field_76635_g << 4, 0, this.field_76647_h << 4); + +- for (int i = 0; i < 8; i++) ++ for (int i = 0; i < 8; ++i) + { + if (this.field_76649_t >= 4096) + { +@@ -1241,21 +1266,20 @@ + int j = this.field_76649_t % 16; + int k = this.field_76649_t / 16 % 16; + int l = this.field_76649_t / 256; +- this.field_76649_t++; ++ ++this.field_76649_t; + +- for (int i1 = 0; i1 < 16; i1++) ++ for (int i1 = 0; i1 < 16; ++i1) + { BlockPos blockpos1 = blockpos.func_177982_a(k, (j << 4) + i1, l); boolean flag = i1 == 0 || i1 == 15 || k == 0 || k == 15 || l == 0 || l == 15; @@ -501,7 +645,61 @@ { this.field_76637_e.func_175664_x(blockpos2); } -@@ -1360,9 +1384,7 @@ +@@ -1280,9 +1304,9 @@ + { + label44: + +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) + { +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { + if (!this.func_150811_f(i, j)) + { +@@ -1312,7 +1336,7 @@ + + private void func_177441_y() + { +- for (int i = 0; i < this.field_76639_c.length; i++) ++ for (int i = 0; i < this.field_76639_c.length; ++i) + { + this.field_76639_c[i] = true; + } +@@ -1326,28 +1350,28 @@ + { + if (p_180700_1_ == EnumFacing.EAST) + { +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) + { + this.func_150811_f(15, i); + } + } + else if (p_180700_1_ == EnumFacing.WEST) + { +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { + this.func_150811_f(0, j); + } + } + else if (p_180700_1_ == EnumFacing.SOUTH) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { + this.func_150811_f(k, 15); + } + } + else if (p_180700_1_ == EnumFacing.NORTH) + { +- for (int l = 0; l < 16; l++) ++ for (int l = 0; l < 16; ++l) + { + this.func_150811_f(l, 0); + } +@@ -1360,11 +1384,9 @@ int i = this.func_76625_h(); boolean flag = false; boolean flag1 = false; @@ -510,9 +708,17 @@ - ); + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos((this.field_76635_g << 4) + p_150811_1_, 0, (this.field_76647_h << 4) + p_150811_2_); - for (int j = i + 16 - 1; j > this.field_76637_e.func_181545_F() || j > 0 && !flag1; --j) +- for (int j = i + 16 - 1; j > this.field_76637_e.func_181545_F() || j > 0 && !flag1; j--) ++ for (int j = i + 16 - 1; j > this.field_76637_e.func_181545_F() || j > 0 && !flag1; --j) { -@@ -1388,7 +1410,7 @@ + blockpos$mutableblockpos.func_181079_c(blockpos$mutableblockpos.func_177958_n(), j, blockpos$mutableblockpos.func_177952_p()); + int k = this.func_177437_b(blockpos$mutableblockpos); +@@ -1384,11 +1406,11 @@ + } + } + +- for (int l = blockpos$mutableblockpos.func_177956_o(); l > 0; l--) ++ for (int l = blockpos$mutableblockpos.func_177956_o(); l > 0; --l) { blockpos$mutableblockpos.func_181079_c(blockpos$mutableblockpos.func_177958_n(), l, blockpos$mutableblockpos.func_177952_p()); diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch index 4db2388cb..bdc973c93 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -197,6 +197,24 @@ public NBTTagCompound func_188266_a(IDataFixer p_188266_1_, NBTTagCompound p_188266_2_, int p_188266_3_) { if (p_188266_2_.func_150297_b("Level", 10)) +@@ -244,7 +279,7 @@ + { + NBTTagList nbttaglist = nbttagcompound.func_150295_c("Entities", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + nbttaglist.func_150304_a(i, p_188266_1_.func_188251_a(FixTypes.ENTITY, (NBTTagCompound)nbttaglist.func_179238_g(i), p_188266_3_)); + } +@@ -254,7 +289,7 @@ + { + NBTTagList nbttaglist1 = nbttagcompound.func_150295_c("TileEntities", 10); + +- for (int j = 0; j < nbttaglist1.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist1.func_74745_c(); ++j) + { + nbttaglist1.func_150304_a(j, p_188266_1_.func_188251_a(FixTypes.BLOCK_ENTITY, (NBTTagCompound)nbttaglist1.func_179238_g(j), p_188266_3_)); + } @@ -284,7 +319,7 @@ if (extendedblockstorage != Chunk.field_186036_a) { @@ -206,7 +224,14 @@ byte[] abyte = new byte[4096]; NibbleArray nibblearray = new NibbleArray(); NibbleArray nibblearray1 = extendedblockstorage.func_186049_g().func_186017_a(abyte, nibblearray); -@@ -322,11 +357,19 @@ +@@ -316,17 +351,25 @@ + p_75820_1_.func_177409_g(false); + NBTTagList nbttaglist1 = new NBTTagList(); + +- for (int i = 0; i < p_75820_1_.func_177429_s().length; i++) ++ for (int i = 0; i < p_75820_1_.func_177429_s().length; ++i) + { + for (Entity entity : p_75820_1_.func_177429_s()[i]) { NBTTagCompound nbttagcompound2 = new NBTTagCompound(); @@ -262,7 +287,16 @@ } private Chunk func_75823_a(World p_75823_1_, NBTTagCompound p_75823_2_) -@@ -405,6 +468,16 @@ +@@ -378,7 +441,7 @@ + ExtendedBlockStorage[] aextendedblockstorage = new ExtendedBlockStorage[16]; + boolean flag = p_75823_1_.field_73011_w.func_191066_m(); + +- for (int l = 0; l < nbttaglist.func_74745_c(); l++) ++ for (int l = 0; l < nbttaglist.func_74745_c(); ++l) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(l); + int i1 = nbttagcompound.func_74771_c("Y"); +@@ -405,9 +468,19 @@ chunk.func_76616_a(p_75823_2_.func_74770_j("Biomes")); } @@ -278,7 +312,29 @@ + { NBTTagList nbttaglist1 = p_75823_2_.func_150295_c("Entities", 10); - for (int j1 = 0; j1 < nbttaglist1.func_74745_c(); ++j1) +- for (int j1 = 0; j1 < nbttaglist1.func_74745_c(); j1++) ++ for (int j1 = 0; j1 < nbttaglist1.func_74745_c(); ++j1) + { + NBTTagCompound nbttagcompound1 = nbttaglist1.func_150305_b(j1); + func_186050_a(nbttagcompound1, p_75823_1_, chunk); +@@ -416,7 +489,7 @@ + + NBTTagList nbttaglist2 = p_75823_2_.func_150295_c("TileEntities", 10); + +- for (int k1 = 0; k1 < nbttaglist2.func_74745_c(); k1++) ++ for (int k1 = 0; k1 < nbttaglist2.func_74745_c(); ++k1) + { + NBTTagCompound nbttagcompound2 = nbttaglist2.func_150305_b(k1); + TileEntity tileentity = TileEntity.func_190200_a(p_75823_1_, nbttagcompound2); +@@ -431,7 +504,7 @@ + { + NBTTagList nbttaglist3 = p_75823_2_.func_150295_c("TileTicks", 10); + +- for (int l1 = 0; l1 < nbttaglist3.func_74745_c(); l1++) ++ for (int l1 = 0; l1 < nbttaglist3.func_74745_c(); ++l1) + { + NBTTagCompound nbttagcompound3 = nbttaglist3.func_150305_b(l1); + Block block; @@ -445,16 +518,9 @@ block = Block.func_149729_e(nbttagcompound3.func_74762_e("i")); } @@ -297,6 +353,15 @@ } @Nullable +@@ -474,7 +540,7 @@ + { + NBTTagList nbttaglist = p_186050_0_.func_150295_c("Passengers", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + Entity entity1 = func_186050_a(nbttaglist.func_150305_b(i), p_186050_1_, p_186050_2_); + @@ -490,9 +556,7 @@ } @@ -308,6 +373,15 @@ { Entity entity = func_186053_a(p_186054_0_, p_186054_1_); +@@ -514,7 +578,7 @@ + { + NBTTagList nbttaglist = p_186054_0_.func_150295_c("Passengers", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + Entity entity1 = func_186054_a(nbttaglist.func_150305_b(i), p_186054_1_, p_186054_2_, p_186054_4_, p_186054_6_, p_186054_8_); + @@ -537,7 +601,7 @@ { return EntityList.func_75615_a(p_186053_0_, p_186053_1_); @@ -317,6 +391,15 @@ { return null; } +@@ -573,7 +637,7 @@ + { + NBTTagList nbttaglist = p_186051_0_.func_150295_c("Passengers", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + Entity entity1 = func_186051_a(nbttaglist.func_150305_b(i), p_186051_1_, p_186051_2_); + @@ -586,5 +650,10 @@ return entity; diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch index 5853a2e52..ed250f466 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java +++ after/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java -@@ -34,6 +34,8 @@ +@@ -34,27 +34,29 @@ public void func_177484_a(int p_177484_1_, int p_177484_2_, int p_177484_3_, IBlockState p_177484_4_) { @@ -9,3 +9,55 @@ IBlockState iblockstate = this.func_177485_a(p_177484_1_, p_177484_2_, p_177484_3_); Block block = iblockstate.func_177230_c(); Block block1 = p_177484_4_.func_177230_c(); + + if (block != Blocks.field_150350_a) + { +- this.field_76682_b--; ++ --this.field_76682_b; + + if (block.func_149653_t()) + { +- this.field_76683_c--; ++ --this.field_76683_c; + } + } + + if (block1 != Blocks.field_150350_a) + { +- this.field_76682_b++; ++ ++this.field_76682_b; + + if (block1.func_149653_t()) + { +- this.field_76683_c++; ++ ++this.field_76683_c; + } + } + +@@ -101,21 +103,21 @@ + this.field_76682_b = 0; + this.field_76683_c = 0; + +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) + { +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { + Block block = this.func_177485_a(i, j, k).func_177230_c(); + + if (block != Blocks.field_150350_a) + { +- this.field_76682_b++; ++ ++this.field_76682_b; + + if (block.func_149653_t()) + { +- this.field_76683_c++; ++ ++this.field_76683_c; + } + } + } diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch index 27401ed0d..a220e8a36 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch @@ -10,14 +10,23 @@ private static final byte[] field_76720_a = new byte[4096]; private final File field_76718_b; private RandomAccessFile field_76719_c; -@@ -58,15 +61,15 @@ +@@ -51,39 +54,51 @@ + + if ((this.field_76719_c.length() & 4095L) != 0L) + { +- for (int i = 0; (long)i < (this.field_76719_c.length() & 4095L); i++) ++ for (int i = 0; (long)i < (this.field_76719_c.length() & 4095L); ++i) + { + this.field_76719_c.write(0); + } } int i1 = (int)this.field_76719_c.length() / 4096; - this.field_76714_f = Lists.newArrayListWithCapacity(i1); + this.field_76714_f = Lists.newArrayListWithCapacity(i1); - for (int j = 0; j < i1; ++j) +- for (int j = 0; j < i1; j++) ++ for (int j = 0; j < i1; ++j) { - this.field_76714_f.add(true); + this.field_76714_f.add(Boolean.valueOf(true)); @@ -29,14 +38,15 @@ + this.field_76714_f.set(1, Boolean.valueOf(false)); this.field_76719_c.seek(0L); - for (int j1 = 0; j1 < 1024; ++j1) -@@ -74,13 +77,25 @@ +- for (int j1 = 0; j1 < 1024; j1++) ++ for (int j1 = 0; j1 < 1024; ++j1) + { int k = this.field_76719_c.readInt(); this.field_76716_d[j1] = k; - if (k != 0 && (k >> 8) + (k & 0xFF) <= this.field_76714_f.size()) - { -- for (int l = 0; l < (k & 0xFF); ++l) +- for (int l = 0; l < (k & 0xFF); l++) + int length = k & 255; + if (length == 255) + { @@ -59,7 +69,11 @@ + net.minecraftforge.fml.common.FMLLog.log.warn("Invalid chunk: ({}, {}) Offset: {} Length: {} runs off end file. {}", j1 % 32, (int)(j1 / 32), k >> 8, length, p_i2001_1_); } - for (int k1 = 0; k1 < 1024; ++k1) +- for (int k1 = 0; k1 < 1024; k1++) ++ for (int k1 = 0; k1 < 1024; ++k1) + { + int l1 = this.field_76719_c.readInt(); + this.field_76717_e[k1] = l1; @@ -95,6 +110,12 @@ } } @@ -141,9 +155,12 @@ } if (j != 0 && k == l) -@@ -196,10 +228,10 @@ +@@ -194,30 +226,30 @@ + } + else { - for (int i1 = 0; i1 < k; ++i1) +- for (int i1 = 0; i1 < k; i1++) ++ for (int i1 = 0; i1 < k; ++i1) { - this.field_76714_f.set(j + i1, true); + this.field_76714_f.set(j + i1, Boolean.valueOf(true)); @@ -154,16 +171,20 @@ int j1 = 0; if (l1 != -1) -@@ -208,7 +240,7 @@ + { +- for (int k1 = l1; k1 < this.field_76714_f.size(); k1++) ++ for (int k1 = l1; k1 < this.field_76714_f.size(); ++k1) { if (j1 != 0) { - if (this.field_76714_f.get(k1)) + if (((Boolean)this.field_76714_f.get(k1)).booleanValue()) { - ++j1; +- j1++; ++ ++j1; } -@@ -217,7 +249,7 @@ + else + { j1 = 0; } } @@ -179,15 +200,20 @@ - this.func_76711_a(p_76706_1_, p_76706_2_, l1 << 8 | l); + this.func_76711_a(p_76706_1_, p_76706_2_, l1 << 8 | (l > 255 ? 255 : l)); - for (int j2 = 0; j2 < l; ++j2) +- for (int j2 = 0; j2 < l; j2++) ++ for (int j2 = 0; j2 < l; ++j2) { - this.field_76714_f.set(j + j2, false); + this.field_76714_f.set(j + j2, Boolean.valueOf(false)); } this.func_76712_a(j, p_76706_3_, p_76706_4_); -@@ -250,12 +282,12 @@ - for (int i2 = 0; i2 < l; ++i2) +@@ -247,15 +279,15 @@ + this.field_76719_c.seek(this.field_76719_c.length()); + j = this.field_76714_f.size(); + +- for (int i2 = 0; i2 < l; i2++) ++ for (int i2 = 0; i2 < l; ++i2) { this.field_76719_c.write(field_76720_a); - this.field_76714_f.add(false); diff --git a/patches/minecraft/net/minecraft/world/end/DragonFightManager.java.patch b/patches/minecraft/net/minecraft/world/end/DragonFightManager.java.patch index 054b397b7..3784fa778 100644 --- a/patches/minecraft/net/minecraft/world/end/DragonFightManager.java.patch +++ b/patches/minecraft/net/minecraft/world/end/DragonFightManager.java.patch @@ -36,9 +36,12 @@ if (p_i46669_2_.func_74767_n("IsRespawning")) { -@@ -110,23 +106,16 @@ +@@ -108,25 +104,18 @@ + { + NBTTagList nbttaglist = p_i46669_2_.func_150295_c("Gateways", 3); - for (int i = 0; i < nbttaglist.func_74745_c(); ++i) +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) { - this.field_186111_e.add(nbttaglist.func_186858_c(i)); + this.field_186111_e.add(Integer.valueOf(nbttaglist.func_186858_c(i))); @@ -102,9 +105,36 @@ } this.field_186113_g = 0; -@@ -340,10 +332,7 @@ +@@ -286,9 +278,9 @@ + + private boolean func_186104_g() + { +- for (int i = -8; i <= 8; i++) ++ for (int i = -8; i <= 8; ++i) + { +- for (int j = -8; j <= 8; j++) ++ for (int j = -8; j <= 8; ++j) + { + Chunk chunk = this.field_186110_d.func_72964_e(i, j); - for (int l = k; l >= 0; --l) +@@ -308,9 +300,9 @@ + @Nullable + private BlockPattern.PatternHelper func_186091_h() + { +- for (int i = -8; i <= 8; i++) ++ for (int i = -8; i <= 8; ++i) + { +- for (int j = -8; j <= 8; j++) ++ for (int j = -8; j <= 8; ++j) + { + Chunk chunk = this.field_186110_d.func_72964_e(i, j); + +@@ -338,12 +330,9 @@ + + int k = this.field_186110_d.func_175645_m(WorldGenEndPodium.field_186139_a).func_177956_o(); + +- for (int l = k; l >= 0; l--) ++ for (int l = k; l >= 0; --l) { - BlockPattern.PatternHelper blockpattern$patternhelper1 = this.field_186112_f - .func_177681_a( @@ -114,6 +144,18 @@ if (blockpattern$patternhelper1 != null) { +@@ -361,9 +350,9 @@ + + private void func_186103_i() + { +- for (int i = -8; i <= 8; i++) ++ for (int i = -8; i <= 8; ++i) + { +- for (int j = -8; j <= 8; j++) ++ for (int j = -8; j <= 8; ++j) + { + this.field_186110_d.func_72964_e(i, j); + } @@ -372,7 +361,7 @@ private void func_186100_j() @@ -123,8 +165,12 @@ for (EntityPlayerMP entityplayermp : this.field_186110_d.func_175661_b(EntityPlayerMP.class, field_186108_b)) { -@@ -399,7 +388,7 @@ - this.field_186114_h += this.field_186110_d.func_72872_a(EntityEnderCrystal.class, worldgenspikes$endspike.func_186153_f()).size(); +@@ -396,10 +385,10 @@ + + for (WorldGenSpikes.EndSpike worldgenspikes$endspike : BiomeEndDecorator.func_185426_a(this.field_186110_d)) + { +- this.field_186114_h = this.field_186114_h + this.field_186110_d.func_72872_a(EntityEnderCrystal.class, worldgenspikes$endspike.func_186153_f()).size(); ++ this.field_186114_h += this.field_186110_d.func_72872_a(EntityEnderCrystal.class, worldgenspikes$endspike.func_186153_f()).size(); } - field_186107_a.debug("Found {} end crystals still alive", this.field_186114_h); @@ -196,7 +242,7 @@ if (list.isEmpty()) { -@@ -564,10 +547,7 @@ +@@ -564,21 +547,17 @@ { if (this.field_186117_k && this.field_186122_p == null) { @@ -206,9 +252,14 @@ - ) + for (BlockPattern.PatternHelper blockpattern$patternhelper = this.func_186091_h(); blockpattern$patternhelper != null; blockpattern$patternhelper = this.func_186091_h()) { - for (int i = 0; i < this.field_186112_f.func_177684_c(); ++i) +- for (int i = 0; i < this.field_186112_f.func_177684_c(); i++) ++ for (int i = 0; i < this.field_186112_f.func_177684_c(); ++i) { -@@ -577,8 +557,7 @@ +- for (int j = 0; j < this.field_186112_f.func_177685_b(); j++) ++ for (int j = 0; j < this.field_186112_f.func_177685_b(); ++j) + { +- for (int k = 0; k < this.field_186112_f.func_185922_a(); k++) ++ for (int k = 0; k < this.field_186112_f.func_185922_a(); ++k) { BlockWorldState blockworldstate = blockpattern$patternhelper.func_177670_a(i, j, k); diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch index 1ff508741..383929513 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorEnd.java.patch @@ -28,9 +28,18 @@ } public void func_180518_a(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_) -@@ -72,35 +86,35 @@ +@@ -66,41 +80,41 @@ + int l = 3; + this.field_185974_p = this.func_185963_a(this.field_185974_p, p_180518_1_ * 2, 0, p_180518_2_ * 2, 3, 33, 3); + +- for (int i1 = 0; i1 < 2; i1++) ++ for (int i1 = 0; i1 < 2; ++i1) + { +- for (int j1 = 0; j1 < 2; j1++) ++ for (int j1 = 0; j1 < 2; ++j1) { - for (int k1 = 0; k1 < 32; ++k1) +- for (int k1 = 0; k1 < 32; k1++) ++ for (int k1 = 0; k1 < 32; ++k1) { - double d0 = 0.25; + double d0 = 0.25D; @@ -47,7 +56,8 @@ + double d7 = (this.field_185974_p[((i1 + 1) * 3 + j1 + 0) * 33 + k1 + 1] - d3) * 0.25D; + double d8 = (this.field_185974_p[((i1 + 1) * 3 + j1 + 1) * 33 + k1 + 1] - d4) * 0.25D; - for (int l1 = 0; l1 < 4; ++l1) +- for (int l1 = 0; l1 < 4; l1++) ++ for (int l1 = 0; l1 < 4; ++l1) { - double d9 = 0.125; + double d9 = 0.125D; @@ -58,7 +68,8 @@ + double d12 = (d3 - d1) * 0.125D; + double d13 = (d4 - d2) * 0.125D; - for (int i2 = 0; i2 < 8; ++i2) +- for (int i2 = 0; i2 < 8; i2++) ++ for (int i2 = 0; i2 < 8; ++i2) { - double d14 = 0.125; + double d14 = 0.125D; @@ -66,7 +77,8 @@ - double d16 = (d11 - d10) * 0.125; + double d16 = (d11 - d10) * 0.125D; - for (int j2 = 0; j2 < 8; ++j2) +- for (int j2 = 0; j2 < 8; j2++) ++ for (int j2 = 0; j2 < 8; ++j2) { IBlockState iblockstate = field_185965_b; @@ -75,14 +87,36 @@ { iblockstate = field_185964_a; } -@@ -128,6 +142,7 @@ +@@ -128,16 +142,17 @@ public void func_185962_a(ChunkPrimer p_185962_1_) { +- for (int i = 0; i < 16; i++) + if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this, this.chunkX, this.chunkZ, p_185962_1_, this.field_73230_p)) return; - for (int i = 0; i < 16; ++i) ++ for (int i = 0; i < 16; ++i) { - for (int j = 0; j < 16; ++j) +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { + int k = 1; + int l = -1; + IBlockState iblockstate = field_185964_a; + IBlockState iblockstate1 = field_185964_a; + +- for (int i1 = 127; i1 >= 0; i1--) ++ for (int i1 = 127; i1 >= 0; --i1) + { + IBlockState iblockstate2 = p_185962_1_.func_177856_a(i, i1, j); + +@@ -162,7 +177,7 @@ + } + else if (l > 0) + { +- l--; ++ --l; + p_185962_1_.func_177855_a(i, i1, j, iblockstate1); + } + } @@ -171,9 +186,9 @@ } } @@ -94,7 +128,25 @@ this.field_73220_k.setSeed((long)p_185932_1_ * 341873128712L + (long)p_185932_2_ * 132897987541L); ChunkPrimer chunkprimer = new ChunkPrimer(); this.field_73231_z = this.field_73230_p.func_72959_q().func_76933_b(this.field_73231_z, p_185932_1_ * 16, p_185932_2_ * 16, 16, 16); -@@ -220,7 +235,7 @@ +@@ -188,7 +203,7 @@ + Chunk chunk = new Chunk(this.field_73230_p, chunkprimer, p_185932_1_, p_185932_2_); + byte[] abyte = chunk.func_76605_m(); + +- for (int i = 0; i < abyte.length; i++) ++ for (int i = 0; i < abyte.length; ++i) + { + abyte[i] = (byte)Biome.func_185362_a(this.field_73231_z[i]); + } +@@ -213,14 +228,14 @@ + f2 = -100.0F; + } + +- for (int i = -12; i <= 12; i++) ++ for (int i = -12; i <= 12; ++i) + { +- for (int j = -12; j <= 12; j++) ++ for (int j = -12; j <= 12; ++j) + { long k = (long)(p_185960_1_ + i); long l = (long)(p_185960_2_ + j); @@ -103,7 +155,7 @@ { float f3 = (MathHelper.func_76135_e((float)k) * 3439.0F + MathHelper.func_76135_e((float)l) * 147.0F) % 13.0F + 9.0F; f = (float)(p_185960_3_ - i * 2); -@@ -250,28 +265,26 @@ +@@ -250,50 +265,48 @@ public boolean func_185961_c(int p_185961_1_, int p_185961_2_) { @@ -143,9 +195,17 @@ int i = p_185963_2_ / 2; int j = p_185963_4_ / 2; int k = 0; -@@ -284,16 +297,16 @@ - for (int j1 = 0; j1 < p_185963_6_; ++j1) +- for (int l = 0; l < p_185963_5_; l++) ++ for (int l = 0; l < p_185963_5_; ++l) + { +- for (int i1 = 0; i1 < p_185963_7_; i1++) ++ for (int i1 = 0; i1 < p_185963_7_; ++i1) + { + float f = this.func_185960_a(i, j, l, i1); + +- for (int j1 = 0; j1 < p_185963_6_; j1++) ++ for (int j1 = 0; j1 < p_185963_6_; ++j1) { - double d2 = this.field_185967_f[k] / 512.0; - double d3 = this.field_185968_g[k] / 512.0; @@ -165,7 +225,7 @@ { d4 = d3; } -@@ -302,23 +315,23 @@ +@@ -302,27 +315,27 @@ d4 = d2 + (d3 - d2) * d5; } @@ -197,6 +257,11 @@ } p_185963_1_[k] = d4; +- k++; ++ ++k; + } + } + } @@ -330,10 +343,10 @@ return p_185963_1_; } @@ -233,6 +298,15 @@ } } +@@ -372,7 +375,7 @@ + { + int j = this.field_73220_k.nextInt(5); + +- for (int k = 0; k < j; k++) ++ for (int k = 0; k < j; ++k) + { + int l = this.field_73220_k.nextInt(16) + 8; + int i1 = this.field_73220_k.nextInt(16) + 8; @@ -382,8 +385,7 @@ { int k1 = j1 - 1; diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch index 135deae99..61a28217b 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch @@ -18,7 +18,16 @@ if (!map1.containsKey("size")) { -@@ -119,12 +119,9 @@ +@@ -96,7 +96,7 @@ + + for (FlatLayerInfo flatlayerinfo : this.field_82699_e.func_82650_c()) + { +- for (int i = flatlayerinfo.func_82656_d(); i < flatlayerinfo.func_82656_d() + flatlayerinfo.func_82657_a(); i++) ++ for (int i = flatlayerinfo.func_82656_d(); i < flatlayerinfo.func_82656_d() + flatlayerinfo.func_82657_a(); ++i) + { + IBlockState iblockstate = flatlayerinfo.func_175900_c(); + +@@ -119,25 +119,22 @@ } p_i2004_1_.func_181544_b(j); @@ -32,7 +41,23 @@ public Chunk func_185932_a(int p_185932_1_, int p_185932_2_) { ChunkPrimer chunkprimer = new ChunkPrimer(); -@@ -151,7 +148,7 @@ + +- for (int i = 0; i < this.field_82700_c.length; i++) ++ for (int i = 0; i < this.field_82700_c.length; ++i) + { + IBlockState iblockstate = this.field_82700_c[i]; + + if (iblockstate != null) + { +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) + { +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) + { + chunkprimer.func_177855_a(j, i, k, iblockstate); + } +@@ -151,10 +148,10 @@ } Chunk chunk = new Chunk(this.field_73163_a, chunkprimer, p_185932_1_, p_185932_2_); @@ -40,7 +65,11 @@ + Biome[] abiome = this.field_73163_a.func_72959_q().func_76933_b((Biome[])null, p_185932_1_ * 16, p_185932_2_ * 16, 16, 16); byte[] abyte = chunk.func_76605_m(); - for (int l = 0; l < abyte.length; ++l) +- for (int l = 0; l < abyte.length; l++) ++ for (int l = 0; l < abyte.length; ++l) + { + abyte[l] = (byte)Biome.func_185362_a(abiome[l]); + } @@ -163,9 +160,9 @@ return chunk; } @@ -83,9 +112,12 @@ if (blockpos1.func_177956_o() < this.field_73163_a.func_181545_F() || this.field_73161_b.nextInt(10) == 0) { -@@ -213,12 +205,7 @@ +@@ -211,14 +203,9 @@ + + if (this.field_82702_h) { - for (int i1 = 0; i1 < 8; ++i1) +- for (int i1 = 0; i1 < 8; i1++) ++ for (int i1 = 0; i1 < 8; ++i1) { - new WorldGenDungeons() - .func_180709_b( diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch index b01f1e959..f5e699159 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorHell.java.patch @@ -35,9 +35,18 @@ } public void func_185936_a(int p_185936_1_, int p_185936_2_, ChunkPrimer p_185936_3_) -@@ -98,29 +107,29 @@ +@@ -92,37 +101,37 @@ + int i1 = 5; + this.field_185956_t = this.func_185938_a(this.field_185956_t, p_185936_1_ * 4, 0, p_185936_2_ * 4, 5, 17, 5); + +- for (int j1 = 0; j1 < 4; j1++) ++ for (int j1 = 0; j1 < 4; ++j1) + { +- for (int k1 = 0; k1 < 4; k1++) ++ for (int k1 = 0; k1 < 4; ++k1) { - for (int l1 = 0; l1 < 16; ++l1) +- for (int l1 = 0; l1 < 16; l1++) ++ for (int l1 = 0; l1 < 16; ++l1) { - double d0 = 0.125; + double d0 = 0.125D; @@ -54,7 +63,8 @@ + double d7 = (this.field_185956_t[((j1 + 1) * 5 + k1 + 0) * 17 + l1 + 1] - d3) * 0.125D; + double d8 = (this.field_185956_t[((j1 + 1) * 5 + k1 + 1) * 17 + l1 + 1] - d4) * 0.125D; - for (int i2 = 0; i2 < 8; ++i2) +- for (int i2 = 0; i2 < 8; i2++) ++ for (int i2 = 0; i2 < 8; ++i2) { - double d9 = 0.25; + double d9 = 0.25D; @@ -65,7 +75,8 @@ + double d12 = (d3 - d1) * 0.25D; + double d13 = (d4 - d2) * 0.25D; - for (int j2 = 0; j2 < 4; ++j2) +- for (int j2 = 0; j2 < 4; j2++) ++ for (int j2 = 0; j2 < 4; ++j2) { - double d14 = 0.25; + double d14 = 0.25D; @@ -73,8 +84,11 @@ - double d16 = (d11 - d10) * 0.25; + double d16 = (d11 - d10) * 0.25D; - for (int k2 = 0; k2 < 4; ++k2) +- for (int k2 = 0; k2 < 4; k2++) ++ for (int k2 = 0; k2 < 4; ++k2) { + IBlockState iblockstate = null; + @@ -131,7 +140,7 @@ iblockstate = field_185943_d; } @@ -84,7 +98,7 @@ { iblockstate = field_185941_b; } -@@ -159,19 +168,20 @@ +@@ -159,81 +168,85 @@ public void func_185937_b(int p_185937_1_, int p_185937_2_, ChunkPrimer p_185937_3_) { @@ -99,9 +113,11 @@ + this.field_73184_r = this.field_73177_m.func_76304_a(this.field_73184_r, p_185937_1_ * 16, 109, p_185937_2_ * 16, 16, 1, 16, 0.03125D, 1.0D, 0.03125D); + this.field_185955_s = this.field_73174_n.func_76304_a(this.field_185955_s, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, 0.0625D, 0.0625D, 0.0625D); - for (int j = 0; j < 16; ++j) +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) { - for (int k = 0; k < 16; ++k) +- for (int k = 0; k < 16; k++) ++ for (int k = 0; k < 16; ++k) { - boolean flag = this.field_73185_q[j + k * 16] + this.field_185954_p.nextDouble() * 0.2 > 0.0; - boolean flag1 = this.field_73184_r[j + k * 16] + this.field_185954_p.nextDouble() * 0.2 > 0.0; @@ -112,7 +128,11 @@ int i1 = -1; IBlockState iblockstate = field_185941_b; IBlockState iblockstate1 = field_185941_b; -@@ -182,58 +192,61 @@ + +- for (int j1 = 127; j1 >= 0; j1--) ++ for (int j1 = 127; j1 >= 0; --j1) + { + if (j1 < 127 - this.field_185954_p.nextInt(5) && j1 > this.field_185954_p.nextInt(5)) { IBlockState iblockstate2 = p_185937_3_.func_177856_a(k, j1, j); @@ -212,7 +232,7 @@ } - else if (i1 > 0) - { -- --i1; +- i1--; - p_185937_3_.func_177855_a(k, j1, j, iblockstate1); - } + } @@ -230,7 +250,7 @@ public Chunk func_185932_a(int p_185932_1_, int p_185932_2_) { this.field_185954_p.setSeed((long)p_185932_1_ * 341873128712L + (long)p_185932_2_ * 132897987541L); -@@ -260,7 +272,7 @@ +@@ -260,10 +272,10 @@ } Chunk chunk = new Chunk(this.field_185952_n, chunkprimer, p_185932_1_, p_185932_2_); @@ -238,7 +258,11 @@ + Biome[] abiome = this.field_185952_n.func_72959_q().func_76933_b((Biome[])null, p_185932_1_ * 16, p_185932_2_ * 16, 16, 16); byte[] abyte = chunk.func_76605_m(); - for (int i = 0; i < abyte.length; ++i) +- for (int i = 0; i < abyte.length; i++) ++ for (int i = 0; i < abyte.length; ++i) + { + abyte[i] = (byte)Biome.func_185362_a(abiome[i]); + } @@ -279,26 +291,23 @@ p_185938_1_ = new double[p_185938_5_ * p_185938_6_ * p_185938_7_]; } @@ -271,14 +295,15 @@ int i = 0; double[] adouble = new double[p_185938_6_]; - for (int j = 0; j < p_185938_6_; ++j) +- for (int j = 0; j < p_185938_6_; j++) ++ for (int j = 0; j < p_185938_6_; ++j) { - adouble[j] = Math.cos((double)j * Math.PI * 6.0 / (double)p_185938_6_) * 2.0; + adouble[j] = Math.cos((double)j * Math.PI * 6.0D / (double)p_185938_6_) * 2.0D; double d2 = (double)j; if (j > p_185938_6_ / 2) -@@ -306,10 +315,10 @@ +@@ -306,32 +315,32 @@ d2 = (double)(p_185938_6_ - 1 - j); } @@ -292,14 +317,17 @@ } } -@@ -317,21 +326,21 @@ +- for (int l = 0; l < p_185938_5_; l++) ++ for (int l = 0; l < p_185938_5_; ++l) { - for (int i1 = 0; i1 < p_185938_7_; ++i1) +- for (int i1 = 0; i1 < p_185938_7_; i1++) ++ for (int i1 = 0; i1 < p_185938_7_; ++i1) { - double d3 = 0.0; + double d3 = 0.0D; - for (int k = 0; k < p_185938_6_; ++k) +- for (int k = 0; k < p_185938_6_; k++) ++ for (int k = 0; k < p_185938_6_; ++k) { double d4 = adouble[k]; - double d5 = this.field_185949_j[i] / 512.0; @@ -320,7 +348,7 @@ { d8 = d6; } -@@ -340,19 +349,19 @@ +@@ -340,23 +349,23 @@ d8 = d5 + (d6 - d5) * d7; } @@ -346,6 +374,11 @@ } p_185938_1_[i] = d8; +- i++; ++ ++i; + } + } + } @@ -364,10 +373,10 @@ return p_185938_1_; } @@ -362,45 +395,38 @@ ChunkPos chunkpos = new ChunkPos(p_185931_1_, p_185931_2_); this.field_73172_c.func_175794_a(this.field_185952_n, this.field_185954_p, chunkpos); -+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA)) - for (int k = 0; k < 8; ++k) - { +- for (int k = 0; k < 8; k++) +- { - this.field_177472_y - .func_180709_b( - this.field_185952_n, - this.field_185954_p, - blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8) - ); -+ this.field_177472_y.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); - } - -+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.FIRE)) - for (int i1 = 0; i1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1) + 1; ++i1) - { +- } +- +- for (int i1 = 0; i1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1) + 1; i1++) +- { - this.field_177470_t - .func_180709_b( - this.field_185952_n, - this.field_185954_p, - blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8) - ); -+ this.field_177470_t.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); - } - -+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.GLOWSTONE)) -+ { - for (int j1 = 0; j1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1); ++j1) - { +- } +- +- for (int j1 = 0; j1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1); j1++) +- { - this.field_177469_u - .func_180709_b( - this.field_185952_n, - this.field_185954_p, - blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8) - ); -+ this.field_177469_u.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); - } - - for (int k1 = 0; k1 < 10; ++k1) - { +- } +- +- for (int k1 = 0; k1 < 10; k1++) +- { - this.field_177468_v - .func_180709_b( - this.field_185952_n, @@ -429,6 +455,35 @@ - ); - } - +- for (int l1 = 0; l1 < 16; l1++) +- { +- this.field_177467_w +- .func_180709_b( +- this.field_185952_n, +- this.field_185954_p, +- blockpos.func_177982_a(this.field_185954_p.nextInt(16), this.field_185954_p.nextInt(108) + 10, this.field_185954_p.nextInt(16)) +- ); ++ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA)) ++ for (int k = 0; k < 8; ++k) ++ { ++ this.field_177472_y.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); ++ } ++ ++ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.FIRE)) ++ for (int i1 = 0; i1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1) + 1; ++i1) ++ { ++ this.field_177470_t.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); ++ } ++ ++ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.GLOWSTONE)) ++ { ++ for (int j1 = 0; j1 < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1); ++j1) ++ { ++ this.field_177469_u.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8)); ++ } ++ ++ for (int k1 = 0; k1 < 10; ++k1) ++ { + this.field_177468_v.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8)); + } + }//Forge: End doGLowstone @@ -451,21 +506,16 @@ + + + if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(this.field_185952_n, this.field_185954_p, field_177467_w, blockpos, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.QUARTZ)) - for (int l1 = 0; l1 < 16; ++l1) - { -- this.field_177467_w -- .func_180709_b( -- this.field_185952_n, -- this.field_185954_p, -- blockpos.func_177982_a(this.field_185954_p.nextInt(16), this.field_185954_p.nextInt(108) + 10, this.field_185954_p.nextInt(16)) -- ); ++ for (int l1 = 0; l1 < 16; ++l1) ++ { + this.field_177467_w.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16), this.field_185954_p.nextInt(108) + 10, this.field_185954_p.nextInt(16))); } int i2 = this.field_185952_n.func_181545_F() / 2 + 1; +- for (int l = 0; l < 4; l++) + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_MAGMA)) - for (int l = 0; l < 4; ++l) ++ for (int l = 0; l < 4; ++l) { - this.field_189888_D - .func_180709_b( @@ -476,8 +526,9 @@ + this.field_189888_D.func_180709_b(this.field_185952_n, this.field_185954_p, blockpos.func_177982_a(this.field_185954_p.nextInt(16), i2 - 5 + this.field_185954_p.nextInt(10), this.field_185954_p.nextInt(16))); } +- for (int j2 = 0; j2 < 16; j2++) + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA2)) - for (int j2 = 0; j2 < 16; ++j2) ++ for (int j2 = 0; j2 < 16; ++j2) { - this.field_177473_x - .func_180709_b( diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch index 36e174b2f..6be0fa54e 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkGeneratorOverworld.java.patch @@ -17,6 +17,18 @@ this.field_185995_n = p_i46668_1_; this.field_185996_o = p_i46668_4_; this.field_185997_p = p_i46668_1_.func_72912_H().func_76067_t(); +@@ -75,9 +85,9 @@ + this.field_185998_q = new double[825]; + this.field_185999_r = new float[25]; + +- for (int i = -2; i <= 2; i++) ++ for (int i = -2; i <= 2; ++i) + { +- for (int j = -2; j <= 2; j++) ++ for (int j = -2; j <= 2; ++j) + { + float f = 10.0F / MathHelper.func_76129_c((float)(i * i + j * j) + 0.2F); + this.field_185999_r[i + 2 + (j + 2) * 5] = f; @@ -90,6 +100,17 @@ this.field_186001_t = this.field_186000_s.field_177778_E ? Blocks.field_150353_l.func_176223_P() : Blocks.field_150355_j.func_176223_P(); p_i46668_1_.func_181544_b(this.field_186000_s.field_177841_q); @@ -35,9 +47,26 @@ } public void func_185976_a(int p_185976_1_, int p_185976_2_, ChunkPrimer p_185976_3_) -@@ -111,33 +132,33 @@ +@@ -97,47 +118,47 @@ + this.field_185981_C = this.field_185995_n.func_72959_q().func_76937_a(this.field_185981_C, p_185976_1_ * 4 - 2, p_185976_2_ * 4 - 2, 10, 10); + this.func_185978_a(p_185976_1_ * 4, 0, p_185976_2_ * 4); + +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) + { + int j = i * 5; + int k = (i + 1) * 5; - for (int i2 = 0; i2 < 32; ++i2) +- for (int l = 0; l < 4; l++) ++ for (int l = 0; l < 4; ++l) + { + int i1 = (j + l) * 33; + int j1 = (j + l + 1) * 33; + int k1 = (k + l) * 33; + int l1 = (k + l + 1) * 33; + +- for (int i2 = 0; i2 < 32; i2++) ++ for (int i2 = 0; i2 < 32; ++i2) { - double d0 = 0.125; + double d0 = 0.125D; @@ -54,7 +83,8 @@ + double d7 = (this.field_185998_q[k1 + i2 + 1] - d3) * 0.125D; + double d8 = (this.field_185998_q[l1 + i2 + 1] - d4) * 0.125D; - for (int j2 = 0; j2 < 8; ++j2) +- for (int j2 = 0; j2 < 8; j2++) ++ for (int j2 = 0; j2 < 8; ++j2) { - double d9 = 0.25; + double d9 = 0.25D; @@ -65,7 +95,8 @@ + double d12 = (d3 - d1) * 0.25D; + double d13 = (d4 - d2) * 0.25D; - for (int k2 = 0; k2 < 4; ++k2) +- for (int k2 = 0; k2 < 4; k2++) ++ for (int k2 = 0; k2 < 4; ++k2) { - double d14 = 0.25; - double d16 = (d11 - d10) * 0.25; @@ -73,7 +104,8 @@ + double d16 = (d11 - d10) * 0.25D; double lvt_45_1_ = d10 - d16; - for (int l2 = 0; l2 < 4; ++l2) +- for (int l2 = 0; l2 < 4; l2++) ++ for (int l2 = 0; l2 < 4; ++l2) { - if ((lvt_45_1_ += d16) > 0.0) + if ((lvt_45_1_ += d16) > 0.0D) @@ -91,9 +123,11 @@ + double d0 = 0.03125D; + this.field_186002_u = this.field_185994_m.func_151599_a(this.field_186002_u, (double)(p_185977_1_ * 16), (double)(p_185977_2_ * 16), 16, 16, 0.0625D, 0.0625D, 1.0D); - for (int i = 0; i < 16; ++i) +- for (int i = 0; i < 16; i++) ++ for (int i = 0; i < 16; ++i) { - for (int j = 0; j < 16; ++j) +- for (int j = 0; j < 16; j++) ++ for (int j = 0; j < 16; ++j) { Biome biome = p_185977_4_[j + i * 16]; - biome.func_180622_a( @@ -108,7 +142,16 @@ public Chunk func_185932_a(int p_185932_1_, int p_185932_2_) { this.field_185990_i.setSeed((long)p_185932_1_ * 341873128712L + (long)p_185932_2_ * 132897987541L); -@@ -245,36 +263,12 @@ +@@ -234,7 +252,7 @@ + Chunk chunk = new Chunk(this.field_185995_n, chunkprimer, p_185932_1_, p_185932_2_); + byte[] abyte = chunk.func_76605_m(); + +- for (int i = 0; i < abyte.length; i++) ++ for (int i = 0; i < abyte.length; ++i) + { + abyte[i] = (byte)Biome.func_185362_a(this.field_185981_C[i]); + } +@@ -245,42 +263,18 @@ private void func_185978_a(int p_185978_1_, int p_185978_2_, int p_185978_3_) { @@ -149,7 +192,27 @@ int i = 0; int j = 0; -@@ -315,66 +309,66 @@ +- for (int k = 0; k < 5; k++) ++ for (int k = 0; k < 5; ++k) + { +- for (int l = 0; l < 5; l++) ++ for (int l = 0; l < 5; ++l) + { + float f2 = 0.0F; + float f3 = 0.0F; +@@ -288,9 +282,9 @@ + int i1 = 2; + Biome biome = this.field_185981_C[k + 2 + (l + 2) * 10]; + +- for (int j1 = -2; j1 <= 2; j1++) ++ for (int j1 = -2; j1 <= 2; ++j1) + { +- for (int k1 = -2; k1 <= 2; k1++) ++ for (int k1 = -2; k1 <= 2; ++k1) + { + Biome biome1 = this.field_185981_C[k + j1 + 2 + (l + k1 + 2) * 10]; + float f5 = this.field_186000_s.field_177813_n + biome1.func_185355_j() * this.field_186000_s.field_177819_m; +@@ -315,76 +309,75 @@ } } @@ -203,7 +266,8 @@ + d7 = d7 / 8.0D; } - ++j; +- j++; ++ ++j; double d8 = (double)f3; double d9 = (double)f2; - d8 += d7 * 0.2; @@ -213,7 +277,8 @@ + d8 = d8 * (double)this.field_186000_s.field_177823_k / 8.0D; + double d0 = (double)this.field_186000_s.field_177823_k + d8 * 4.0D; - for (int l1 = 0; l1 < 33; ++l1) +- for (int l1 = 0; l1 < 33; l1++) ++ for (int l1 = 0; l1 < 33; ++l1) { - double d1 = ((double)l1 - d0) * (double)this.field_186000_s.field_177817_l * 128.0 / 256.0 / d9; + double d1 = ((double)l1 - d0) * (double)this.field_186000_s.field_177817_l * 128.0D / 256.0D / d9; @@ -239,7 +304,10 @@ } this.field_185998_q[i] = d5; -@@ -384,7 +378,6 @@ +- i++; ++ ++i; + } + } } } @@ -280,7 +348,7 @@ { int i2 = this.field_185990_i.nextInt(16) + 8; int l2 = this.field_185990_i.nextInt(this.field_185990_i.nextInt(248) + 8); -@@ -452,25 +445,29 @@ +@@ -452,28 +445,32 @@ if (l2 < this.field_185995_n.func_181545_F() || this.field_185990_i.nextInt(this.field_186000_s.field_177777_D / 8) == 0) { @@ -292,7 +360,8 @@ if (this.field_186000_s.field_177837_s) + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON)) { - for (int j2 = 0; j2 < this.field_186000_s.field_177835_t; ++j2) +- for (int j2 = 0; j2 < this.field_186000_s.field_177835_t; j2++) ++ for (int j2 = 0; j2 < this.field_186000_s.field_177835_t; ++j2) { int i3 = this.field_185990_i.nextInt(16) + 8; int l3 = this.field_185990_i.nextInt(256); @@ -307,11 +376,17 @@ WorldEntitySpawner.func_77191_a(this.field_185995_n, biome, i + 8, j + 8, 16, 16, this.field_185990_i); blockpos = blockpos.func_177982_a(8, 0, 8); +- for (int k2 = 0; k2 < 16; k2++) +- { +- for (int j3 = 0; j3 < 16; j3++) + if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE)) + { - for (int k2 = 0; k2 < 16; ++k2) - { - for (int j3 = 0; j3 < 16; ++j3) ++ for (int k2 = 0; k2 < 16; ++k2) ++ { ++ for (int j3 = 0; j3 < 16; ++j3) + { + BlockPos blockpos1 = this.field_185995_n.func_175725_q(blockpos.func_177982_a(k2, 0, j3)); + BlockPos blockpos2 = blockpos1.func_177977_b(); @@ -489,11 +486,13 @@ } } diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch index 4b110857e..cc801a8c2 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch @@ -120,6 +120,15 @@ crashreportcategory.func_71507_a("Generator", this.field_186029_c); throw new ReportedException(crashreport); } +@@ -186,7 +216,7 @@ + int i = 0; + List list = Lists.newArrayList(this.field_73244_f.values()); + +- for (int j = 0; j < list.size(); j++) ++ for (int j = 0; j < list.size(); ++j) + { + Chunk chunk = list.get(j); + @@ -199,8 +229,9 @@ { this.func_73242_b(chunk); @@ -131,7 +140,7 @@ { return false; } -@@ -215,23 +246,28 @@ +@@ -215,31 +246,38 @@ this.field_73247_e.func_75818_b(); } @@ -162,7 +171,9 @@ this.func_73242_b(chunk); this.func_73243_a(chunk); this.field_73244_f.remove(olong); -@@ -240,6 +276,8 @@ +- i++; ++ ++i; + } } } diff --git a/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch b/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch index f0598a2f0..6e60f110e 100644 --- a/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch @@ -46,9 +46,12 @@ { double d0 = (double)(p_180702_3_ * 16 + 8); double d1 = (double)(p_180702_4_ * 16 + 8); -@@ -78,7 +48,7 @@ +@@ -76,9 +46,9 @@ - for (boolean flag = random.nextInt(6) == 0; p_180702_15_ < p_180702_16_; ++p_180702_15_) + int j = random.nextInt(p_180702_16_ / 2) + p_180702_16_ / 4; + +- for (boolean flag = random.nextInt(6) == 0; p_180702_15_ < p_180702_16_; p_180702_15_++) ++ for (boolean flag = random.nextInt(6) == 0; p_180702_15_ < p_180702_16_; ++p_180702_15_) { - double d2 = 1.5 + (double)(MathHelper.func_76126_a((float)p_180702_15_ * (float) Math.PI / (float)p_180702_16_) * p_180702_12_); + double d2 = 1.5D + (double)(MathHelper.func_76126_a((float)p_180702_15_ * (float)Math.PI / (float)p_180702_16_) * p_180702_12_); @@ -129,7 +132,18 @@ { int k2 = MathHelper.func_76128_c(p_180702_6_ - d2) - p_180702_3_ * 16 - 1; int k = MathHelper.func_76128_c(p_180702_6_ + d2) - p_180702_3_ * 16 + 1; -@@ -201,9 +140,7 @@ +@@ -193,17 +132,15 @@ + + boolean flag3 = false; + +- for (int j1 = k2; !flag3 && j1 < k; j1++) ++ for (int j1 = k2; !flag3 && j1 < k; ++j1) + { +- for (int k1 = i3; !flag3 && k1 < i1; k1++) ++ for (int k1 = i3; !flag3 && k1 < i1; ++k1) + { +- for (int l1 = l + 1; !flag3 && l1 >= l2 - 1; l1--) ++ for (int l1 = l + 1; !flag3 && l1 >= l2 - 1; --l1) { if (l1 >= 0 && l1 < 256) { @@ -140,14 +154,18 @@ { flag3 = true; } -@@ -223,51 +160,30 @@ +@@ -221,53 +158,32 @@ + { + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); - for (int j3 = k2; j3 < k; ++j3) +- for (int j3 = k2; j3 < k; j3++) ++ for (int j3 = k2; j3 < k; ++j3) { - double d10 = ((double)(j3 + p_180702_3_ * 16) + 0.5 - p_180702_6_) / d2; + double d10 = ((double)(j3 + p_180702_3_ * 16) + 0.5D - p_180702_6_) / d2; - for (int i2 = i3; i2 < i1; ++i2) +- for (int i2 = i3; i2 < i1; i2++) ++ for (int i2 = i3; i2 < i1; ++i2) { - double d8 = ((double)(i2 + p_180702_4_ * 16) + 0.5 - p_180702_10_) / d2; + double d8 = ((double)(i2 + p_180702_4_ * 16) + 0.5D - p_180702_10_) / d2; @@ -156,7 +174,8 @@ - if (d10 * d10 + d8 * d8 < 1.0) + if (d10 * d10 + d8 * d8 < 1.0D) { - for (int j2 = l; j2 > l2; --j2) +- for (int j2 = l; j2 > l2; j2--) ++ for (int j2 = l; j2 > l2; --j2) { - double d9 = ((double)(j2 - 1) + 0.5 - p_180702_8_) / d3; + double d9 = ((double)(j2 - 1) + 0.5D - p_180702_8_) / d3; @@ -200,11 +219,19 @@ } } } -@@ -324,12 +240,10 @@ +@@ -318,16 +234,16 @@ + { + return true; } ++ else if (p_175793_1_.func_177230_c() == Blocks.field_150431_aC) ++ { ++ return true; ++ } else { -- return (p_175793_1_.func_177230_c() == Blocks.field_150354_m || p_175793_1_.func_177230_c() == Blocks.field_150351_n) +- return p_175793_1_.func_177230_c() == Blocks.field_150431_aC +- ? true +- : (p_175793_1_.func_177230_c() == Blocks.field_150354_m || p_175793_1_.func_177230_c() == Blocks.field_150351_n) - && p_175793_2_.func_185904_a() != Material.field_151586_h; + return (p_175793_1_.func_177230_c() == Blocks.field_150354_m || p_175793_1_.func_177230_c() == Blocks.field_150351_n) && p_175793_2_.func_185904_a() != Material.field_151586_h; } @@ -214,16 +241,28 @@ protected void func_180701_a(World p_180701_1_, int p_180701_2_, int p_180701_3_, int p_180701_4_, int p_180701_5_, ChunkPrimer p_180701_6_) { int i = this.field_75038_b.nextInt(this.field_75038_b.nextInt(this.field_75038_b.nextInt(15) + 1) + 1); -@@ -354,7 +268,7 @@ +@@ -337,7 +253,7 @@ + i = 0; + } + +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) + { + double d0 = (double)(p_180701_2_ * 16 + this.field_75038_b.nextInt(16)); + double d1 = (double)this.field_75038_b.nextInt(this.field_75038_b.nextInt(120) + 8); +@@ -350,9 +266,9 @@ + k += this.field_75038_b.nextInt(4); + } - for (int l = 0; l < k; ++l) +- for (int l = 0; l < k; l++) ++ for (int l = 0; l < k; ++l) { - float f = this.field_75038_b.nextFloat() * (float)(Math.PI * 2); + float f = this.field_75038_b.nextFloat() * ((float)Math.PI * 2F); float f1 = (this.field_75038_b.nextFloat() - 0.5F) * 2.0F / 8.0F; float f2 = this.field_75038_b.nextFloat() * 2.0F + this.field_75038_b.nextFloat(); -@@ -363,7 +277,69 @@ +@@ -361,7 +277,69 @@ f2 *= this.field_75038_b.nextFloat() * this.field_75038_b.nextFloat() * 3.0F + 1.0F; } diff --git a/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch b/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch index e2612268c..1a9ce6bbe 100644 --- a/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch @@ -23,9 +23,21 @@ { Random random = new Random(p_180707_1_); double d0 = (double)(p_180707_3_ * 16 + 8); -@@ -64,22 +50,22 @@ +@@ -52,7 +38,7 @@ - for (; p_180707_15_ < p_180707_16_; ++p_180707_15_) + float f2 = 1.0F; + +- for (int j = 0; j < 256; j++) ++ for (int j = 0; j < 256; ++j) + { + if (j == 0 || random.nextInt(3) == 0) + { +@@ -62,24 +48,24 @@ + this.field_75046_d[j] = f2 * f2; + } + +- for (; p_180707_15_ < p_180707_16_; p_180707_15_++) ++ for (; p_180707_15_ < p_180707_16_; ++p_180707_15_) { - double d9 = 1.5 + (double)(MathHelper.func_76126_a((float)p_180707_15_ * (float) Math.PI / (float)p_180707_16_) * p_180707_12_); + double d9 = 1.5D + (double)(MathHelper.func_76126_a((float)p_180707_15_ * (float)Math.PI / (float)p_180707_16_) * p_180707_12_); @@ -67,7 +79,18 @@ { int k2 = MathHelper.func_76128_c(p_180707_6_ - d9) - p_180707_3_ * 16 - 1; int k = MathHelper.func_76128_c(p_180707_6_ + d9) - p_180707_3_ * 16 + 1; -@@ -145,9 +128,7 @@ +@@ -137,17 +120,15 @@ + + boolean flag2 = false; + +- for (int j1 = k2; !flag2 && j1 < k; j1++) ++ for (int j1 = k2; !flag2 && j1 < k; ++j1) + { +- for (int k1 = i3; !flag2 && k1 < i1; k1++) ++ for (int k1 = i3; !flag2 && k1 < i1; ++k1) + { +- for (int l1 = l + 1; !flag2 && l1 >= l2 - 1; l1--) ++ for (int l1 = l + 1; !flag2 && l1 >= l2 - 1; --l1) { if (l1 >= 0 && l1 < 256) { @@ -84,12 +107,14 @@ { - BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); - - for (int j3 = k2; j3 < k; ++j3) +- for (int j3 = k2; j3 < k; j3++) ++ for (int j3 = k2; j3 < k; ++j3) { - double d10 = ((double)(j3 + p_180707_3_ * 16) + 0.5 - p_180707_6_) / d9; + double d10 = ((double)(j3 + p_180707_3_ * 16) + 0.5D - p_180707_6_) / d9; - for (int i2 = i3; i2 < i1; ++i2) +- for (int i2 = i3; i2 < i1; i2++) ++ for (int i2 = i3; i2 < i1; ++i2) { - double d7 = ((double)(i2 + p_180707_4_ * 16) + 0.5 - p_180707_10_) / d9; + double d7 = ((double)(i2 + p_180707_4_ * 16) + 0.5D - p_180707_10_) / d9; @@ -98,7 +123,8 @@ - if (d10 * d10 + d7 * d7 < 1.0) + if (d10 * d10 + d7 * d7 < 1.0D) { - for (int j2 = l; j2 > l2; --j2) +- for (int j2 = l; j2 > l2; j2--) ++ for (int j2 = l; j2 > l2; --j2) { - double d8 = ((double)(j2 - 1) + 0.5 - p_180707_8_) / d2; + double d8 = ((double)(j2 - 1) + 0.5D - p_180707_8_) / d2; @@ -145,9 +171,12 @@ protected void func_180701_a(World p_180701_1_, int p_180701_2_, int p_180701_3_, int p_180701_4_, int p_180701_5_, ChunkPrimer p_180701_6_) { if (this.field_75038_b.nextInt(50) == 0) -@@ -236,10 +194,74 @@ +@@ -234,12 +192,76 @@ + double d2 = (double)(p_180701_3_ * 16 + this.field_75038_b.nextInt(16)); + int i = 1; - for (int j = 0; j < 1; ++j) +- for (int j = 0; j < 1; j++) ++ for (int j = 0; j < 1; ++j) { - float f = this.field_75038_b.nextFloat() * (float)(Math.PI * 2); + float f = this.field_75038_b.nextFloat() * ((float)Math.PI * 2F); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch index 7d90446b0..870de88d3 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch @@ -8,7 +8,24 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { Block block = this.field_76523_a; -@@ -63,9 +62,9 @@ +@@ -46,7 +45,7 @@ + + if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 < 256) + { +- for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; j++) ++ for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; ++j) + { + int k = 3; + +@@ -57,15 +56,15 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; l++) ++ for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; ++l) + { +- for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; i1++) ++ for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) { if (j >= 0 && j < 256) { @@ -20,7 +37,47 @@ { flag = false; } -@@ -197,16 +196,14 @@ +@@ -99,13 +98,13 @@ + k2 = p_180709_3_.func_177956_o() + i - 3; + } + +- for (int l2 = k2; l2 <= p_180709_3_.func_177956_o() + i; l2++) ++ for (int l2 = k2; l2 <= p_180709_3_.func_177956_o() + i; ++l2) + { + int j3 = 1; + + if (l2 < p_180709_3_.func_177956_o() + i) + { +- j3++; ++ ++j3; + } + + if (block == Blocks.field_150420_aW) +@@ -118,19 +117,19 @@ + int j1 = p_180709_3_.func_177952_p() - j3; + int k1 = p_180709_3_.func_177952_p() + j3; + +- for (int l1 = k3; l1 <= l3; l1++) ++ for (int l1 = k3; l1 <= l3; ++l1) + { +- for (int i2 = j1; i2 <= k1; i2++) ++ for (int i2 = j1; i2 <= k1; ++i2) + { + int j2 = 5; + + if (l1 == k3) + { +- j2--; ++ --j2; + } + else if (l1 == l3) + { +- j2++; ++ ++j2; + } + + if (i2 == j1) +@@ -197,33 +196,27 @@ blockhugemushroom$enumtype = BlockHugeMushroom.EnumType.ALL_INSIDE; } @@ -41,7 +98,11 @@ } } } -@@ -217,13 +214,9 @@ + } + } + +- for (int i3 = 0; i3 < i; i3++) ++ for (int i3 = 0; i3 < i; ++i3) { IBlockState iblockstate = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(i3)); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch index 721d07f07..aa24c3065 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch @@ -32,14 +32,16 @@ + this.field_175948_j = Lists.newArrayList(); this.field_175948_j.add(new WorldGenBigTree.FoliageCoordinates(this.field_175947_m.func_177981_b(k), j)); - for (; k >= 0; --k) +- for (; k >= 0; k--) ++ for (; k >= 0; --k) { float f = this.func_76490_a(k); - if (!(f < 0.0F)) + if (f >= 0.0F) { - for (int l = 0; l < i; ++l) +- for (int l = 0; l < i; l++) ++ for (int l = 0; l < i; ++l) { - double d0 = this.field_175945_e * (double)f * ((double)this.field_175949_k.nextFloat() + 0.328); + double d0 = this.field_175945_e * (double)f * ((double)this.field_175949_k.nextFloat() + 0.328D); @@ -58,9 +60,11 @@ - int i = (int)((double)p_181631_2_ + 0.618); + int i = (int)((double)p_181631_2_ + 0.618D); - for (int j = -i; j <= i; ++j) +- for (int j = -i; j <= i; j++) ++ for (int j = -i; j <= i; ++j) { - for (int k = -i; k <= i; ++k) +- for (int k = -i; k <= i; k++) ++ for (int k = -i; k <= i; ++k) { - if (Math.pow((double)Math.abs(j) + 0.5, 2.0) + Math.pow((double)Math.abs(k) + 0.5, 2.0) <= (double)(p_181631_2_ * p_181631_2_)) + if (Math.pow((double)Math.abs(j) + 0.5D, 2.0D) + Math.pow((double)Math.abs(k) + 0.5D, 2.0D) <= (double)(p_181631_2_ * p_181631_2_)) @@ -95,7 +99,8 @@ void func_175940_a(BlockPos p_175940_1_) { - for (int i = 0; i < this.field_76508_n; ++i) +- for (int i = 0; i < this.field_76508_n; i++) ++ for (int i = 0; i < this.field_76508_n; ++i) { - this.func_181631_a( - p_175940_1_.func_177981_b(i), this.func_76495_b(i), Blocks.field_150362_t.func_176223_P().func_177226_a(BlockLeaves.field_176236_b, false) @@ -104,6 +109,15 @@ } } +@@ -165,7 +163,7 @@ + float f1 = (float)blockpos.func_177956_o() / (float)i; + float f2 = (float)blockpos.func_177952_p() / (float)i; + +- for (int j = 0; j <= i; j++) ++ for (int j = 0; j <= i; ++j) + { + BlockPos blockpos1 = p_175937_1_.func_177963_a((double)(0.5F + (float)j * f), (double)(0.5F + (float)j * f1), (double)(0.5F + (float)j * f2)); + BlockLog.EnumAxis blocklog$enumaxis = this.func_175938_b(p_175937_1_, blockpos1); @@ -221,7 +219,7 @@ boolean func_76493_c(int p_76493_1_) @@ -113,7 +127,12 @@ } void func_175942_c() -@@ -271,7 +269,7 @@ +@@ -267,11 +265,11 @@ + } + else + { +- for (int j = 0; j <= i; j++) ++ for (int j = 0; j <= i; ++j) { BlockPos blockpos1 = p_175936_1_.func_177963_a((double)(0.5F + (float)j * f), (double)(0.5F + (float)j * f1), (double)(0.5F + (float)j * f2)); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBirchTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBirchTree.java.patch index 7b6c62f74..40638ac2c 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBirchTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBirchTree.java.patch @@ -24,9 +24,24 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = p_180709_2_.nextInt(3) + 5; -@@ -62,11 +56,14 @@ +@@ -42,7 +36,7 @@ + + if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= 256) + { +- for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; j++) ++ for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; ++j) + { + int k = 1; + +@@ -58,15 +52,18 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; l++) ++ for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; ++l) { - for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) +- for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; i1++) ++ for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) { - if (j < 0 || j >= 256) + if (j >= 0 && j < p_180709_1_.func_72800_K()) @@ -42,7 +57,7 @@ { flag = false; } -@@ -80,12 +77,13 @@ +@@ -80,32 +77,33 @@ } else { @@ -58,9 +73,22 @@ - this.func_175921_a(p_180709_1_, p_180709_3_.func_177977_b()); + state.func_177230_c().onPlantGrow(state, p_180709_1_, down, p_180709_3_); - for (int i2 = p_180709_3_.func_177956_o() - 3 + i; i2 <= p_180709_3_.func_177956_o() + i; ++i2) +- for (int i2 = p_180709_3_.func_177956_o() - 3 + i; i2 <= p_180709_3_.func_177956_o() + i; i2++) ++ for (int i2 = p_180709_3_.func_177956_o() - 3 + i; i2 <= p_180709_3_.func_177956_o() + i; ++i2) { -@@ -103,9 +101,9 @@ + int k2 = i2 - (p_180709_3_.func_177956_o() + i); + int l2 = 1 - k2 / 2; + +- for (int i3 = p_180709_3_.func_177958_n() - l2; i3 <= p_180709_3_.func_177958_n() + l2; i3++) ++ for (int i3 = p_180709_3_.func_177958_n() - l2; i3 <= p_180709_3_.func_177958_n() + l2; ++i3) + { + int j1 = i3 - p_180709_3_.func_177958_n(); + +- for (int k1 = p_180709_3_.func_177952_p() - l2; k1 <= p_180709_3_.func_177952_p() + l2; k1++) ++ for (int k1 = p_180709_3_.func_177952_p() - l2; k1 <= p_180709_3_.func_177952_p() + l2; ++k1) + { + int l1 = k1 - p_180709_3_.func_177952_p(); + if (Math.abs(j1) != l2 || Math.abs(l1) != l2 || p_180709_2_.nextInt(2) != 0 && k2 != 0) { BlockPos blockpos = new BlockPos(i3, i2, k1); @@ -72,9 +100,12 @@ { this.func_175903_a(p_180709_1_, blockpos, field_181630_b); } -@@ -116,9 +114,10 @@ +@@ -114,11 +112,12 @@ + } + } - for (int j2 = 0; j2 < i; ++j2) +- for (int j2 = 0; j2 < i; j2++) ++ for (int j2 = 0; j2 < i; ++j2) { - Material material1 = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(j2)).func_185904_a(); + BlockPos upN = p_180709_3_.func_177981_b(j2); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBush.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBush.java.patch index fd86f1096..22c73de69 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBush.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBush.java.patch @@ -7,7 +7,8 @@ - @Override public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { - for (int i = 0; i < 64; ++i) +- for (int i = 0; i < 64; i++) ++ for (int i = 0; i < 64; ++i) { - BlockPos blockpos = p_180709_3_.func_177982_a( - p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8), p_180709_2_.nextInt(4) - p_180709_2_.nextInt(4), p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenCanopyTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenCanopyTree.java.patch index c55b72406..a675b97b9 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenCanopyTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenCanopyTree.java.patch @@ -51,7 +51,20 @@ EnumFacing enumfacing = EnumFacing.Plane.HORIZONTAL.func_179518_a(p_180709_2_); int i1 = i - p_180709_2_.nextInt(4); int j1 = 2 - p_180709_2_.nextInt(3); -@@ -73,9 +68,9 @@ +@@ -62,20 +57,20 @@ + int l1 = l; + int i2 = k + i - 1; + +- for (int j2 = 0; j2 < i; j2++) ++ for (int j2 = 0; j2 < i; ++j2) + { + if (j2 >= i1 && j1 > 0) + { + k1 += enumfacing.func_82601_c(); + l1 += enumfacing.func_82599_e(); +- j1--; ++ --j1; + } int k2 = k + j2; BlockPos blockpos1 = new BlockPos(k1, k2, l1); @@ -63,6 +76,18 @@ { this.func_181639_b(p_180709_1_, blockpos1); this.func_181639_b(p_180709_1_, blockpos1.func_177974_f()); +@@ -84,9 +79,9 @@ + } + } + +- for (int i3 = -2; i3 <= 0; i3++) ++ for (int i3 = -2; i3 <= 0; ++i3) + { +- for (int l3 = -2; l3 <= 0; l3++) ++ for (int l3 = -2; l3 <= 0; ++l3) + { + int k4 = -1; + this.func_150526_a(p_180709_1_, k1 + i3, i2 + k4, l1 + l3); @@ -96,11 +91,11 @@ if ((i3 > -2 || l3 > -1) && (i3 != -1 || l3 != -2)) @@ -80,9 +105,15 @@ } } } -@@ -117,11 +112,7 @@ +@@ -113,45 +108,41 @@ + this.func_150526_a(p_180709_1_, k1, i2 + 2, l1 + 1); + } + +- for (int j3 = -3; j3 <= 4; j3++) ++ for (int j3 = -3; j3 <= 4; ++j3) { - for (int i4 = -3; i4 <= 4; ++i4) +- for (int i4 = -3; i4 <= 4; i4++) ++ for (int i4 = -3; i4 <= 4; ++i4) { - if ((j3 != -3 || i4 != -3) - && (j3 != -3 || i4 != 4) @@ -93,9 +124,61 @@ { this.func_150526_a(p_180709_1_, k1 + j3, i2, l1 + i4); } -@@ -197,7 +188,7 @@ + } + } + +- for (int k3 = -1; k3 <= 2; k3++) ++ for (int k3 = -1; k3 <= 2; ++k3) + { +- for (int j4 = -1; j4 <= 2; j4++) ++ for (int j4 = -1; j4 <= 2; ++j4) + { + if ((k3 < 0 || k3 > 1 || j4 < 0 || j4 > 1) && p_180709_2_.nextInt(3) <= 0) + { + int l4 = p_180709_2_.nextInt(3) + 2; + +- for (int i5 = 0; i5 < l4; i5++) ++ for (int i5 = 0; i5 < l4; ++i5) + { + this.func_181639_b(p_180709_1_, new BlockPos(j + k3, i2 - i5 - 1, l + j4)); + } + +- for (int j5 = -1; j5 <= 1; j5++) ++ for (int j5 = -1; j5 <= 1; ++j5) + { +- for (int l2 = -1; l2 <= 1; l2++) ++ for (int l2 = -1; l2 <= 1; ++l2) + { + this.func_150526_a(p_180709_1_, k1 + k3 + j5, i2, l1 + j4 + l2); + } + } + +- for (int k5 = -2; k5 <= 2; k5++) ++ for (int k5 = -2; k5 <= 2; ++k5) + { +- for (int l5 = -2; l5 <= 2; l5++) ++ for (int l5 = -2; l5 <= 2; ++l5) + { + if (Math.abs(k5) != 2 || Math.abs(l5) != 2) + { +@@ -179,7 +170,7 @@ + int k = p_181638_2_.func_177952_p(); + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int l = 0; l <= p_181638_3_ + 1; l++) ++ for (int l = 0; l <= p_181638_3_ + 1; ++l) + { + int i1 = 1; + +@@ -193,11 +184,11 @@ + i1 = 2; + } + +- for (int j1 = -i1; j1 <= i1; j1++) ++ for (int j1 = -i1; j1 <= i1; ++j1) { - for (int k1 = -i1; k1 <= i1; ++k1) +- for (int k1 = -i1; k1 <= i1; k1++) ++ for (int k1 = -i1; k1 <= i1; ++k1) { - if (!this.func_150523_a(p_181638_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(i + j1, j + l, k + k1)).func_177230_c())) + if (!this.isReplaceable(p_181638_1_, blockpos$mutableblockpos.func_181079_c(i + j1, j + l, k + k1))) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch index 60fdf957a..7d26206ad 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch @@ -16,7 +16,8 @@ p_180709_3_ = p_180709_3_.func_177977_b(); } - for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { - BlockPos blockpos = p_180709_3_.func_177982_a( - p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8), p_180709_2_.nextInt(4) - p_180709_2_.nextInt(4), p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch index 72ba6f157..279f042d1 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch @@ -17,7 +17,22 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = 3; -@@ -63,10 +56,7 @@ +@@ -43,11 +36,11 @@ + int i2 = k1 + 1; + int j2 = 0; + +- for (int k2 = k; k2 <= l; k2++) ++ for (int k2 = k; k2 <= l; ++k2) + { +- for (int l2 = -1; l2 <= 4; l2++) ++ for (int l2 = -1; l2 <= 4; ++l2) + { +- for (int i3 = l1; i3 <= i2; i3++) ++ for (int i3 = l1; i3 <= i2; ++i3) + { + BlockPos blockpos = p_180709_3_.func_177982_a(k2, l2, i3); + Material material = p_180709_1_.func_180495_p(blockpos).func_185904_a(); +@@ -63,12 +56,9 @@ return false; } @@ -27,8 +42,26 @@ - && p_180709_1_.func_175623_d(blockpos.func_177984_a())) + if ((k2 == k || k2 == l || i3 == l1 || i3 == i2) && l2 == 0 && p_180709_1_.func_175623_d(blockpos) && p_180709_1_.func_175623_d(blockpos.func_177984_a())) { - ++j2; +- j2++; ++ ++j2; } + } + } +@@ -76,11 +66,11 @@ + + if (j2 >= 1 && j2 <= 5) + { +- for (int k3 = k; k3 <= l; k3++) ++ for (int k3 = k; k3 <= l; ++k3) + { +- for (int i4 = 3; i4 >= -1; i4--) ++ for (int i4 = 3; i4 >= -1; --i4) + { +- for (int k4 = l1; k4 <= i2; k4++) ++ for (int k4 = l1; k4 <= i2; ++k4) + { + BlockPos blockpos1 = p_180709_3_.func_177982_a(k3, i4, k4); + @@ -95,8 +85,7 @@ { p_180709_1_.func_175698_g(blockpos1); @@ -39,7 +72,26 @@ { if (i4 == -1 && p_180709_2_.nextInt(4) != 0) { -@@ -134,9 +123,7 @@ +@@ -111,9 +100,9 @@ + } + } + +- for (int l3 = 0; l3 < 2; l3++) ++ for (int l3 = 0; l3 < 2; ++l3) + { +- for (int j4 = 0; j4 < 3; j4++) ++ for (int j4 = 0; j4 < 3; ++j4) + { + int l4 = p_180709_3_.func_177958_n() + p_180709_2_.nextInt(j * 2 + 1) - j; + int i5 = p_180709_3_.func_177956_o(); +@@ -128,15 +117,13 @@ + { + if (p_180709_1_.func_180495_p(blockpos2.func_177972_a(enumfacing)).func_185904_a().func_76220_a()) + { +- j3++; ++ ++j3; + } + } if (j3 == 1) { diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone1.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone1.java.patch index 6fa9c386e..07dcf6a01 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone1.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone1.java.patch @@ -8,9 +8,12 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { if (!p_180709_1_.func_175623_d(p_180709_3_)) -@@ -26,11 +25,9 @@ +@@ -24,13 +23,11 @@ + { + p_180709_1_.func_180501_a(p_180709_3_, Blocks.field_150426_aN.func_176223_P(), 2); - for (int i = 0; i < 1500; ++i) +- for (int i = 0; i < 1500; i++) ++ for (int i = 0; i < 1500; ++i) { - BlockPos blockpos = p_180709_3_.func_177982_a( - p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8), -p_180709_2_.nextInt(12), p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8) @@ -22,3 +25,12 @@ { int j = 0; +@@ -38,7 +35,7 @@ + { + if (p_180709_1_.func_180495_p(blockpos.func_177972_a(enumfacing)).func_177230_c() == Blocks.field_150426_aN) + { +- j++; ++ ++j; + } + + if (j > 1) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone2.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone2.java.patch index bacf3f666..392fc4486 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone2.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenGlowStone2.java.patch @@ -8,9 +8,12 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { if (!p_180709_1_.func_175623_d(p_180709_3_)) -@@ -26,11 +25,9 @@ +@@ -24,13 +23,11 @@ + { + p_180709_1_.func_180501_a(p_180709_3_, Blocks.field_150426_aN.func_176223_P(), 2); - for (int i = 0; i < 1500; ++i) +- for (int i = 0; i < 1500; i++) ++ for (int i = 0; i < 1500; ++i) { - BlockPos blockpos = p_180709_3_.func_177982_a( - p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8), -p_180709_2_.nextInt(12), p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8) @@ -22,3 +25,12 @@ { int j = 0; +@@ -38,7 +35,7 @@ + { + if (p_180709_1_.func_180495_p(blockpos.func_177972_a(enumfacing)).func_177230_c() == Blocks.field_150426_aN) + { +- j++; ++ ++j; + } + + if (j > 1) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHellLava.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHellLava.java.patch index 626f959c0..90ba0bfb6 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHellLava.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHellLava.java.patch @@ -17,3 +17,68 @@ { return false; } +@@ -37,54 +35,54 @@ + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177976_e()).func_177230_c() == Blocks.field_150424_aL) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177974_f()).func_177230_c() == Blocks.field_150424_aL) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177978_c()).func_177230_c() == Blocks.field_150424_aL) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177968_d()).func_177230_c() == Blocks.field_150424_aL) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177977_b()).func_177230_c() == Blocks.field_150424_aL) + { +- i++; ++ ++i; + } + + int j = 0; + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177976_e())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177974_f())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177978_c())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177968_d())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177977_b())) + { +- j++; ++ ++j; + } + + if (!this.field_94524_b && i == 4 && j == 1 || i == 5) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch index d312476dc..96a40723a 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch @@ -1,8 +1,23 @@ --- before/net/minecraft/world/gen/feature/WorldGenHugeTrees.java +++ after/net/minecraft/world/gen/feature/WorldGenHugeTrees.java -@@ -59,9 +59,7 @@ +@@ -42,7 +42,7 @@ + + if (p_175926_2_.func_177956_o() >= 1 && p_175926_2_.func_177956_o() + p_175926_3_ + 1 <= 256) + { +- for (int i = 0; i <= 1 + p_175926_3_; i++) ++ for (int i = 0; i <= 1 + p_175926_3_; ++i) + { + int j = 2; + +@@ -55,13 +55,11 @@ + j = 2; + } + +- for (int k = -j; k <= j && flag; k++) ++ for (int k = -j; k <= j && flag; ++k) { - for (int l = -j; l <= j && flag; ++l) +- for (int l = -j; l <= j && flag; l++) ++ for (int l = -j; l <= j && flag; ++l) { - if (p_175926_2_.func_177956_o() + i < 0 - || p_175926_2_.func_177956_o() + i >= 256 @@ -33,6 +48,18 @@ return true; } else +@@ -105,9 +104,9 @@ + { + int i = p_175925_3_ * p_175925_3_; + +- for (int j = -p_175925_3_; j <= p_175925_3_ + 1; j++) ++ for (int j = -p_175925_3_; j <= p_175925_3_ + 1; ++j) + { +- for (int k = -p_175925_3_; k <= p_175925_3_ + 1; k++) ++ for (int k = -p_175925_3_; k <= p_175925_3_ + 1; ++k) + { + int l = j - 1; + int i1 = k - 1; @@ -115,9 +114,9 @@ if (j * j + k * k <= i || l * l + i1 * i1 <= i || j * j + i1 * i1 <= i || l * l + k * k <= i) { @@ -45,7 +72,16 @@ { this.func_175903_a(p_175925_1_, blockpos, this.field_76521_c); } -@@ -137,14 +136,21 @@ +@@ -130,21 +129,28 @@ + { + int i = p_175928_3_ * p_175928_3_; + +- for (int j = -p_175928_3_; j <= p_175928_3_; j++) ++ for (int j = -p_175928_3_; j <= p_175928_3_; ++j) + { +- for (int k = -p_175928_3_; k <= p_175928_3_; k++) ++ for (int k = -p_175928_3_; k <= p_175928_3_; ++k) + { if (j * j + k * k <= i) { BlockPos blockpos = p_175928_2_.func_177982_a(j, 0, k); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenIceSpike.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenIceSpike.java.patch index b08568049..75ae8dac5 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenIceSpike.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenIceSpike.java.patch @@ -8,7 +8,23 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { while (p_180709_1_.func_175623_d(p_180709_3_) && p_180709_3_.func_177956_o() > 2) -@@ -47,16 +46,12 @@ +@@ -34,29 +33,25 @@ + p_180709_3_ = p_180709_3_.func_177981_b(10 + p_180709_2_.nextInt(30)); + } + +- for (int k = 0; k < i; k++) ++ for (int k = 0; k < i; ++k) + { + float f = (1.0F - (float)k / (float)i) * (float)j; + int l = MathHelper.func_76123_f(f); + +- for (int i1 = -l; i1 <= l; i1++) ++ for (int i1 = -l; i1 <= l; ++i1) + { + float f1 = (float)MathHelper.func_76130_a(i1) - 0.25F; + +- for (int j1 = -l; j1 <= l; j1++) ++ for (int j1 = -l; j1 <= l; ++j1) { float f2 = (float)MathHelper.func_76130_a(j1) - 0.25F; @@ -39,6 +55,18 @@ { this.func_175903_a(p_180709_1_, p_180709_3_.func_177982_a(i1, -k, j1), Blocks.field_150403_cj.func_176223_P()); } +@@ -90,9 +82,9 @@ + k1 = 1; + } + +- for (int l1 = -k1; l1 <= k1; l1++) ++ for (int l1 = -k1; l1 <= k1; ++l1) + { +- for (int i2 = -k1; i2 <= k1; i2++) ++ for (int i2 = -k1; i2 <= k1; ++i2) + { + BlockPos blockpos = p_180709_3_.func_177982_a(l1, -1, i2); + int j2 = 50; @@ -107,19 +99,16 @@ IBlockState iblockstate1 = p_180709_1_.func_180495_p(blockpos); Block block1 = iblockstate1.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLakes.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLakes.java.patch index 04ff6d6f8..ee24f4d40 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLakes.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLakes.java.patch @@ -17,9 +17,12 @@ } if (p_180709_3_.func_177956_o() <= 4) -@@ -40,12 +37,12 @@ +@@ -38,27 +35,27 @@ + boolean[] aboolean = new boolean[2048]; + int i = p_180709_2_.nextInt(4) + 4; - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { - double d0 = p_180709_2_.nextDouble() * 6.0 + 3.0; - double d1 = p_180709_2_.nextDouble() * 4.0 + 2.0; @@ -34,11 +37,14 @@ + double d4 = p_180709_2_.nextDouble() * (8.0D - d1 - 4.0D) + 2.0D + d1 / 2.0D; + double d5 = p_180709_2_.nextDouble() * (16.0D - d2 - 2.0D) + 1.0D + d2 / 2.0D; - for (int l = 1; l < 15; ++l) +- for (int l = 1; l < 15; l++) ++ for (int l = 1; l < 15; ++l) { -@@ -53,12 +50,12 @@ +- for (int i1 = 1; i1 < 15; i1++) ++ for (int i1 = 1; i1 < 15; ++i1) { - for (int j1 = 1; j1 < 7; ++j1) +- for (int j1 = 1; j1 < 7; j1++) ++ for (int j1 = 1; j1 < 7; ++j1) { - double d6 = ((double)l - d3) / (d0 / 2.0); - double d7 = ((double)j1 - d4) / (d1 / 2.0); @@ -53,9 +59,18 @@ { aboolean[(l * 16 + i1) * 8 + j1] = true; } -@@ -73,15 +70,7 @@ +@@ -67,21 +64,13 @@ + } + } + +- for (int k1 = 0; k1 < 16; k1++) ++ for (int k1 = 0; k1 < 16; ++k1) + { +- for (int l2 = 0; l2 < 16; l2++) ++ for (int l2 = 0; l2 < 16; ++l2) { - for (int k = 0; k < 8; ++k) +- for (int k = 0; k < 8; k++) ++ for (int k = 0; k < 8; ++k) { - boolean flag = !aboolean[(k1 * 16 + l2) * 8 + k] - && ( @@ -81,7 +96,18 @@ { return false; } -@@ -111,9 +98,7 @@ +@@ -103,34 +90,31 @@ + } + } + +- for (int l1 = 0; l1 < 16; l1++) ++ for (int l1 = 0; l1 < 16; ++l1) + { +- for (int i3 = 0; i3 < 16; i3++) ++ for (int i3 = 0; i3 < 16; ++i3) + { +- for (int i4 = 0; i4 < 8; i4++) ++ for (int i4 = 0; i4 < 8; ++i4) { if (aboolean[(l1 * 16 + i3) * 8 + i4]) { @@ -92,7 +118,18 @@ } } } -@@ -129,8 +114,7 @@ + } + +- for (int i2 = 0; i2 < 16; i2++) ++ for (int i2 = 0; i2 < 16; ++i2) + { +- for (int j3 = 0; j3 < 16; j3++) ++ for (int j3 = 0; j3 < 16; ++j3) + { +- for (int j4 = 4; j4 < 8; j4++) ++ for (int j4 = 4; j4 < 8; ++j4) + { + if (aboolean[(i2 * 16 + j3) * 8 + j4]) { BlockPos blockpos = p_180709_3_.func_177982_a(i2, j4 - 1, j3); @@ -102,9 +139,18 @@ { Biome biome = p_180709_1_.func_180494_b(blockpos); -@@ -156,19 +140,9 @@ +@@ -150,25 +134,15 @@ + + if (this.field_150556_a.func_176223_P().func_185904_a() == Material.field_151587_i) + { +- for (int j2 = 0; j2 < 16; j2++) ++ for (int j2 = 0; j2 < 16; ++j2) + { +- for (int k3 = 0; k3 < 16; k3++) ++ for (int k3 = 0; k3 < 16; ++k3) { - for (int k4 = 0; k4 < 8; ++k4) +- for (int k4 = 0; k4 < 8; k4++) ++ for (int k4 = 0; k4 < 8; ++k4) { - boolean flag1 = !aboolean[(j2 * 16 + k3) * 8 + k4] - && ( @@ -124,7 +170,17 @@ { p_180709_1_.func_180501_a(p_180709_3_.func_177982_a(j2, k4, k3), Blocks.field_150348_b.func_176223_P(), 2); } -@@ -187,7 +161,8 @@ +@@ -179,15 +153,16 @@ + + if (this.field_150556_a.func_176223_P().func_185904_a() == Material.field_151586_h) + { +- for (int k2 = 0; k2 < 16; k2++) ++ for (int k2 = 0; k2 < 16; ++k2) + { +- for (int l3 = 0; l3 < 16; l3++) ++ for (int l3 = 0; l3 < 16; ++l3) + { + int l4 = 4; if (p_180709_1_.func_175675_v(p_180709_3_.func_177982_a(k2, 4, l3))) { diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLiquids.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLiquids.java.patch index 91dd4ac58..0f2ca7f5e 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLiquids.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenLiquids.java.patch @@ -17,3 +17,56 @@ { return false; } +@@ -42,44 +41,44 @@ + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177976_e()).func_177230_c() == Blocks.field_150348_b) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177974_f()).func_177230_c() == Blocks.field_150348_b) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177978_c()).func_177230_c() == Blocks.field_150348_b) + { +- i++; ++ ++i; + } + + if (p_180709_1_.func_180495_p(p_180709_3_.func_177968_d()).func_177230_c() == Blocks.field_150348_b) + { +- i++; ++ ++i; + } + + int j = 0; + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177976_e())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177974_f())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177978_c())) + { +- j++; ++ ++j; + } + + if (p_180709_1_.func_175623_d(p_180709_3_.func_177968_d())) + { +- j++; ++ ++j; + } + + if (i == 3 && j == 1) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaJungle.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaJungle.java.patch index 319a49282..d3261b9b3 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaJungle.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaJungle.java.patch @@ -8,7 +8,7 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = this.func_150533_a(p_180709_2_); -@@ -31,7 +30,7 @@ +@@ -31,11 +30,11 @@ for (int j = p_180709_3_.func_177956_o() + i - 2 - p_180709_2_.nextInt(4); j > p_180709_3_.func_177956_o() + i / 2; j -= 2 + p_180709_2_.nextInt(4)) { @@ -17,7 +17,25 @@ int k = p_180709_3_.func_177958_n() + (int)(0.5F + MathHelper.func_76134_b(f) * 4.0F); int l = p_180709_3_.func_177952_p() + (int)(0.5F + MathHelper.func_76126_a(f) * 4.0F); -@@ -56,7 +55,7 @@ +- for (int i1 = 0; i1 < 5; i1++) ++ for (int i1 = 0; i1 < 5; ++i1) + { + k = p_180709_3_.func_177958_n() + (int)(1.5F + MathHelper.func_76134_b(f) * (float)i1); + l = p_180709_3_.func_177952_p() + (int)(1.5F + MathHelper.func_76126_a(f) * (float)i1); +@@ -45,18 +44,18 @@ + int j2 = 1 + p_180709_2_.nextInt(2); + int j1 = j; + +- for (int k1 = j - j2; k1 <= j1; k1++) ++ for (int k1 = j - j2; k1 <= j1; ++k1) + { + int l1 = k1 - j1; + this.func_175928_b(p_180709_1_, new BlockPos(k, k1, l), 1 - l1); + } + } + +- for (int i2 = 0; i2 < i; i2++) ++ for (int i2 = 0; i2 < i; ++i2) { BlockPos blockpos = p_180709_3_.func_177981_b(i2); @@ -62,7 +80,12 @@ } } -@@ -130,5 +129,12 @@ +@@ -126,9 +125,16 @@ + { + int i = 2; + +- for (int j = -2; j <= 0; j++) ++ for (int j = -2; j <= 0; ++j) { this.func_175925_a(p_175930_1_, p_175930_2_.func_177981_b(j), p_175930_3_ + 1 - j); } diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaPineTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaPineTree.java.patch index 63e04bb07..9b6290616 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaPineTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMegaPineTree.java.patch @@ -24,9 +24,12 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = this.func_150533_a(p_180709_2_); -@@ -47,32 +41,25 @@ +@@ -45,34 +39,27 @@ + { + this.func_150541_c(p_180709_1_, p_180709_3_.func_177958_n(), p_180709_3_.func_177952_p(), p_180709_3_.func_177956_o() + i, 0, p_180709_2_); - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { - IBlockState iblockstate = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(j)); - @@ -61,6 +64,15 @@ { this.func_175903_a(p_180709_1_, p_180709_3_.func_177982_a(0, j, 1), this.field_76520_b); } +@@ -88,7 +75,7 @@ + int i = p_150541_6_.nextInt(5) + (this.field_150542_e ? this.field_76522_a : 3); + int j = 0; + +- for (int k = p_150541_4_ - i; k <= p_150541_4_; k++) ++ for (int k = p_150541_4_ - i; k <= p_150541_4_; ++k) + { + int l = p_150541_4_ - k; + int i1 = p_150541_5_ + MathHelper.func_76141_d((float)l / (float)i * 3.5F); @@ -97,7 +84,6 @@ } } @@ -69,7 +81,35 @@ public void func_180711_a(World p_180711_1_, Random p_180711_2_, BlockPos p_180711_3_) { this.func_175933_b(p_180711_1_, p_180711_3_.func_177976_e().func_177978_c()); -@@ -140,7 +126,7 @@ +@@ -105,7 +91,7 @@ + this.func_175933_b(p_180711_1_, p_180711_3_.func_177976_e().func_177970_e(2)); + this.func_175933_b(p_180711_1_, p_180711_3_.func_177965_g(2).func_177970_e(2)); + +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) + { + int j = p_180711_2_.nextInt(64); + int k = j % 8; +@@ -120,9 +106,9 @@ + + private void func_175933_b(World p_175933_1_, BlockPos p_175933_2_) + { +- for (int i = -2; i <= 2; i++) ++ for (int i = -2; i <= 2; ++i) + { +- for (int j = -2; j <= 2; j++) ++ for (int j = -2; j <= 2; ++j) + { + if (Math.abs(i) != 2 || Math.abs(j) != 2) + { +@@ -134,13 +120,13 @@ + + private void func_175934_c(World p_175934_1_, BlockPos p_175934_2_) + { +- for (int i = 2; i >= -3; i--) ++ for (int i = 2; i >= -3; --i) + { + BlockPos blockpos = p_175934_2_.func_177981_b(i); IBlockState iblockstate = p_175934_1_.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch index ddeaccd5c..fe9c0a107 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch @@ -12,7 +12,14 @@ double d0 = (double)((float)(p_180709_3_.func_177958_n() + 8) + MathHelper.func_76126_a(f) * (float)this.field_76541_b / 8.0F); double d1 = (double)((float)(p_180709_3_.func_177958_n() + 8) - MathHelper.func_76126_a(f) * (float)this.field_76541_b / 8.0F); double d2 = (double)((float)(p_180709_3_.func_177952_p() + 8) + MathHelper.func_76134_b(f) * (float)this.field_76541_b / 8.0F); -@@ -44,37 +43,38 @@ +@@ -38,43 +37,44 @@ + double d4 = (double)(p_180709_3_.func_177956_o() + p_180709_2_.nextInt(3) - 2); + double d5 = (double)(p_180709_3_.func_177956_o() + p_180709_2_.nextInt(3) - 2); + +- for (int i = 0; i < this.field_76541_b; i++) ++ for (int i = 0; i < this.field_76541_b; ++i) + { + float f1 = (float)i / (float)this.field_76541_b; double d6 = d0 + (d1 - d0) * (double)f1; double d7 = d4 + (d5 - d4) * (double)f1; double d8 = d2 + (d3 - d2) * (double)f1; @@ -35,7 +42,8 @@ + int j1 = MathHelper.func_76128_c(d7 + d11 / 2.0D); + int k1 = MathHelper.func_76128_c(d8 + d10 / 2.0D); - for (int l1 = j; l1 <= i1; ++l1) +- for (int l1 = j; l1 <= i1; l1++) ++ for (int l1 = j; l1 <= i1; ++l1) { - double d12 = ((double)l1 + 0.5 - d6) / (d10 / 2.0); + double d12 = ((double)l1 + 0.5D - d6) / (d10 / 2.0D); @@ -43,7 +51,8 @@ - if (d12 * d12 < 1.0) + if (d12 * d12 < 1.0D) { - for (int i2 = k; i2 <= j1; ++i2) +- for (int i2 = k; i2 <= j1; i2++) ++ for (int i2 = k; i2 <= j1; ++i2) { - double d13 = ((double)i2 + 0.5 - d7) / (d11 / 2.0); + double d13 = ((double)i2 + 0.5D - d7) / (d11 / 2.0D); @@ -51,7 +60,8 @@ - if (d12 * d12 + d13 * d13 < 1.0) + if (d12 * d12 + d13 * d13 < 1.0D) { - for (int j2 = l; j2 <= k1; ++j2) +- for (int j2 = l; j2 <= k1; j2++) ++ for (int j2 = l; j2 <= k1; ++j2) { - double d14 = ((double)j2 + 0.5 - d8) / (d10 / 2.0); + double d14 = ((double)j2 + 0.5D - d8) / (d10 / 2.0D); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSavannaTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSavannaTree.java.patch index 855ccc62a..96755d0df 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSavannaTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSavannaTree.java.patch @@ -23,9 +23,24 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = p_180709_2_.nextInt(3) + p_180709_2_.nextInt(3) + 5; -@@ -56,11 +50,14 @@ +@@ -36,7 +30,7 @@ + + if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= 256) + { +- for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; j++) ++ for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; ++j) + { + int k = 1; + +@@ -52,15 +46,18 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; l++) ++ for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; ++l) { - for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) +- for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; i1++) ++ for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) { - if (j < 0 || j >= 256) + if (j >= 0 && j < 256) @@ -58,7 +73,21 @@ EnumFacing enumfacing = EnumFacing.Plane.HORIZONTAL.func_179518_a(p_180709_2_); int k2 = i - p_180709_2_.nextInt(4) - 1; int l2 = 3 - p_180709_2_.nextInt(3); -@@ -98,9 +97,9 @@ +@@ -86,7 +85,7 @@ + int j1 = p_180709_3_.func_177952_p(); + int k1 = 0; + +- for (int l1 = 0; l1 < i; l1++) ++ for (int l1 = 0; l1 < i; ++l1) + { + int i2 = p_180709_3_.func_177956_o() + l1; + +@@ -94,13 +93,13 @@ + { + i3 += enumfacing.func_82601_c(); + j1 += enumfacing.func_82599_e(); +- l2--; ++ --l2; } BlockPos blockpos = new BlockPos(i3, i2, j1); @@ -70,7 +99,40 @@ { this.func_181642_b(p_180709_1_, blockpos); k1 = i2; -@@ -152,9 +151,9 @@ +@@ -109,9 +108,9 @@ + + BlockPos blockpos2 = new BlockPos(i3, k1, j1); + +- for (int j3 = -3; j3 <= 3; j3++) ++ for (int j3 = -3; j3 <= 3; ++j3) + { +- for (int i4 = -3; i4 <= 3; i4++) ++ for (int i4 = -3; i4 <= 3; ++i4) + { + if (Math.abs(j3) != 3 || Math.abs(i4) != 3) + { +@@ -122,9 +121,9 @@ + + blockpos2 = blockpos2.func_177984_a(); + +- for (int k3 = -1; k3 <= 1; k3++) ++ for (int k3 = -1; k3 <= 1; ++k3) + { +- for (int j4 = -1; j4 <= 1; j4++) ++ for (int j4 = -1; j4 <= 1; ++j4) + { + this.func_175924_b(p_180709_1_, blockpos2.func_177982_a(k3, 0, j4)); + } +@@ -144,7 +143,7 @@ + int k4 = 1 + p_180709_2_.nextInt(3); + k1 = 0; + +- for (int l4 = l3; l4 < i && k4 > 0; k4--) ++ for (int l4 = l3; l4 < i && k4 > 0; --k4) + { + if (l4 >= 1) + { +@@ -152,25 +151,25 @@ i3 += enumfacing1.func_82601_c(); j1 += enumfacing1.func_82599_e(); BlockPos blockpos1 = new BlockPos(i3, j2, j1); @@ -82,6 +144,37 @@ { this.func_181642_b(p_180709_1_, blockpos1); k1 = j2; + } + } + +- l4++; ++ ++l4; + } + + if (k1 > 0) + { + BlockPos blockpos3 = new BlockPos(i3, k1, j1); + +- for (int i5 = -2; i5 <= 2; i5++) ++ for (int i5 = -2; i5 <= 2; ++i5) + { +- for (int k5 = -2; k5 <= 2; k5++) ++ for (int k5 = -2; k5 <= 2; ++k5) + { + if (Math.abs(i5) != 2 || Math.abs(k5) != 2) + { +@@ -181,9 +180,9 @@ + + blockpos3 = blockpos3.func_177984_a(); + +- for (int j5 = -1; j5 <= 1; j5++) ++ for (int j5 = -1; j5 <= 1; ++j5) + { +- for (int l5 = -1; l5 <= 1; l5++) ++ for (int l5 = -1; l5 <= 1; ++l5) + { + this.func_175924_b(p_180709_1_, blockpos3.func_177982_a(j5, 0, l5)); + } @@ -212,9 +211,9 @@ private void func_175924_b(World p_175924_1_, BlockPos p_175924_2_) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch index ea268dbb6..4afb6d0e4 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/gen/feature/WorldGenShrub.java +++ after/net/minecraft/world/gen/feature/WorldGenShrub.java -@@ -20,20 +20,16 @@ +@@ -20,43 +20,39 @@ this.field_150528_a = p_i46450_2_; } @@ -24,7 +24,23 @@ { p_180709_3_ = p_180709_3_.func_177984_a(); this.func_175903_a(p_180709_1_, p_180709_3_, this.field_150527_b); -@@ -54,9 +50,9 @@ + +- for (int i = p_180709_3_.func_177956_o(); i <= p_180709_3_.func_177956_o() + 2; i++) ++ for (int i = p_180709_3_.func_177956_o(); i <= p_180709_3_.func_177956_o() + 2; ++i) + { + int j = i - p_180709_3_.func_177956_o(); + int k = 2 - j; + +- for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k; l++) ++ for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k; ++l) + { + int i1 = l - p_180709_3_.func_177958_n(); + +- for (int j1 = p_180709_3_.func_177952_p() - k; j1 <= p_180709_3_.func_177952_p() + k; j1++) ++ for (int j1 = p_180709_3_.func_177952_p() - k; j1 <= p_180709_3_.func_177952_p() + k; ++j1) + { + int k1 = j1 - p_180709_3_.func_177952_p(); + if (Math.abs(i1) != k || Math.abs(k1) != k || p_180709_2_.nextInt(2) != 0) { BlockPos blockpos = new BlockPos(l, i, j1); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch index d7cb5d90a..18a33e541 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/gen/feature/WorldGenSwamp.java +++ after/net/minecraft/world/gen/feature/WorldGenSwamp.java -@@ -16,24 +16,20 @@ +@@ -16,31 +16,27 @@ public class WorldGenSwamp extends WorldGenAbstractTree { private static final IBlockState field_181648_a = Blocks.field_150364_r.func_176223_P().func_177226_a(BlockOldLog.field_176301_b, BlockPlanks.EnumType.OAK); @@ -29,7 +29,26 @@ } boolean flag = true; -@@ -65,7 +61,7 @@ + + if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= 256) + { +- for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; j++) ++ for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; ++j) + { + int k = 1; + +@@ -56,16 +52,16 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; l++) ++ for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; ++l) + { +- for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; i1++) ++ for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) + { + if (j >= 0 && j < 256) + { IBlockState iblockstate = p_180709_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(l, j, i1)); Block block = iblockstate.func_177230_c(); @@ -38,7 +57,7 @@ { if (block != Blocks.field_150355_j && block != Blocks.field_150358_i) { -@@ -91,11 +87,13 @@ +@@ -91,30 +87,33 @@ } else { @@ -53,9 +72,22 @@ - this.func_175921_a(p_180709_1_, p_180709_3_.func_177977_b()); + state.func_177230_c().onPlantGrow(state, p_180709_1_, p_180709_3_.func_177977_b(),p_180709_3_); - for (int k1 = p_180709_3_.func_177956_o() - 3 + i; k1 <= p_180709_3_.func_177956_o() + i; ++k1) +- for (int k1 = p_180709_3_.func_177956_o() - 3 + i; k1 <= p_180709_3_.func_177956_o() + i; k1++) ++ for (int k1 = p_180709_3_.func_177956_o() - 3 + i; k1 <= p_180709_3_.func_177956_o() + i; ++k1) { -@@ -113,8 +111,9 @@ + int j2 = k1 - (p_180709_3_.func_177956_o() + i); + int l2 = 2 - j2 / 2; + +- for (int j3 = p_180709_3_.func_177958_n() - l2; j3 <= p_180709_3_.func_177958_n() + l2; j3++) ++ for (int j3 = p_180709_3_.func_177958_n() - l2; j3 <= p_180709_3_.func_177958_n() + l2; ++j3) + { + int k3 = j3 - p_180709_3_.func_177958_n(); + +- for (int i4 = p_180709_3_.func_177952_p() - l2; i4 <= p_180709_3_.func_177952_p() + l2; i4++) ++ for (int i4 = p_180709_3_.func_177952_p() - l2; i4 <= p_180709_3_.func_177952_p() + l2; ++i4) + { + int j1 = i4 - p_180709_3_.func_177952_p(); + if (Math.abs(k3) != l2 || Math.abs(j1) != l2 || p_180709_2_.nextInt(2) != 0 && j2 != 0) { BlockPos blockpos = new BlockPos(j3, k1, i4); @@ -66,9 +98,12 @@ { this.func_175903_a(p_180709_1_, blockpos, field_181649_b); } -@@ -125,13 +124,11 @@ +@@ -123,29 +122,27 @@ + } + } - for (int l1 = 0; l1 < i; ++l1) +- for (int l1 = 0; l1 < i; l1++) ++ for (int l1 = 0; l1 < i; ++l1) { - IBlockState iblockstate1 = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(l1)); + BlockPos upN = p_180709_3_.func_177981_b(l1); @@ -83,6 +118,23 @@ { this.func_175903_a(p_180709_1_, p_180709_3_.func_177981_b(l1), field_181648_a); } + } + +- for (int i2 = p_180709_3_.func_177956_o() - 3 + i; i2 <= p_180709_3_.func_177956_o() + i; i2++) ++ for (int i2 = p_180709_3_.func_177956_o() - 3 + i; i2 <= p_180709_3_.func_177956_o() + i; ++i2) + { + int k2 = i2 - (p_180709_3_.func_177956_o() + i); + int i3 = 2 - k2 / 2; + BlockPos.MutableBlockPos blockpos$mutableblockpos1 = new BlockPos.MutableBlockPos(); + +- for (int l3 = p_180709_3_.func_177958_n() - i3; l3 <= p_180709_3_.func_177958_n() + i3; l3++) ++ for (int l3 = p_180709_3_.func_177958_n() - i3; l3 <= p_180709_3_.func_177958_n() + i3; ++l3) + { +- for (int j4 = p_180709_3_.func_177952_p() - i3; j4 <= p_180709_3_.func_177952_p() + i3; j4++) ++ for (int j4 = p_180709_3_.func_177952_p() - i3; j4 <= p_180709_3_.func_177952_p() + i3; ++j4) + { + blockpos$mutableblockpos1.func_181079_c(l3, i2, j4); + @@ -156,22 +153,22 @@ BlockPos blockpos1 = blockpos$mutableblockpos1.func_177978_c(); BlockPos blockpos2 = blockpos$mutableblockpos1.func_177968_d(); @@ -119,7 +171,7 @@ this.func_175903_a(p_181647_1_, p_181647_2_, iblockstate); int i = 4; -- for (BlockPos blockpos = p_181647_2_.func_177977_b(); p_181647_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && i > 0; --i) +- for (BlockPos blockpos = p_181647_2_.func_177977_b(); p_181647_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && i > 0; i--) + for (BlockPos blockpos = p_181647_2_.func_177977_b(); p_181647_1_.func_175623_d(blockpos) && i > 0; --i) { this.func_175903_a(p_181647_1_, blockpos, iblockstate); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch index 5630f0456..bd6029ba8 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch @@ -23,9 +23,24 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = p_180709_2_.nextInt(5) + 7; -@@ -58,11 +52,14 @@ +@@ -39,7 +33,7 @@ + { + boolean flag = true; + +- for (int i1 = p_180709_3_.func_177956_o(); i1 <= p_180709_3_.func_177956_o() + 1 + i && flag; i1++) ++ for (int i1 = p_180709_3_.func_177956_o(); i1 <= p_180709_3_.func_177956_o() + 1 + i && flag; ++i1) + { + int j1 = 1; + +@@ -54,15 +48,18 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k1 = p_180709_3_.func_177958_n() - j1; k1 <= p_180709_3_.func_177958_n() + j1 && flag; k1++) ++ for (int k1 = p_180709_3_.func_177958_n() - j1; k1 <= p_180709_3_.func_177958_n() + j1 && flag; ++k1) { - for (int l1 = p_180709_3_.func_177952_p() - j1; l1 <= p_180709_3_.func_177952_p() + j1 && flag; ++l1) +- for (int l1 = p_180709_3_.func_177952_p() - j1; l1 <= p_180709_3_.func_177952_p() + j1 && flag; l1++) ++ for (int l1 = p_180709_3_.func_177952_p() - j1; l1 <= p_180709_3_.func_177952_p() + j1 && flag; ++l1) { - if (i1 < 0 || i1 >= 256) + if (i1 >= 0 && i1 < 256) @@ -41,7 +56,7 @@ { flag = false; } -@@ -76,11 +73,13 @@ +@@ -76,28 +73,31 @@ } else { @@ -57,8 +72,19 @@ + state.func_177230_c().onPlantGrow(state, p_180709_1_, down, p_180709_3_); int k2 = 0; - for (int l2 = p_180709_3_.func_177956_o() + i; l2 >= p_180709_3_.func_177956_o() + j; --l2) -@@ -96,8 +95,9 @@ +- for (int l2 = p_180709_3_.func_177956_o() + i; l2 >= p_180709_3_.func_177956_o() + j; l2--) ++ for (int l2 = p_180709_3_.func_177956_o() + i; l2 >= p_180709_3_.func_177956_o() + j; --l2) + { +- for (int j3 = p_180709_3_.func_177958_n() - k2; j3 <= p_180709_3_.func_177958_n() + k2; j3++) ++ for (int j3 = p_180709_3_.func_177958_n() - k2; j3 <= p_180709_3_.func_177958_n() + k2; ++j3) + { + int k3 = j3 - p_180709_3_.func_177958_n(); + +- for (int i2 = p_180709_3_.func_177952_p() - k2; i2 <= p_180709_3_.func_177952_p() + k2; i2++) ++ for (int i2 = p_180709_3_.func_177952_p() - k2; i2 <= p_180709_3_.func_177952_p() + k2; ++i2) + { + int j2 = i2 - p_180709_3_.func_177952_p(); + if (Math.abs(k3) != k2 || Math.abs(j2) != k2 || k2 <= 0) { BlockPos blockpos = new BlockPos(j3, l2, i2); @@ -69,9 +95,22 @@ { this.func_175903_a(p_180709_1_, blockpos, field_181637_b); } -@@ -117,9 +117,10 @@ +@@ -107,19 +107,20 @@ + + if (k2 >= 1 && l2 == p_180709_3_.func_177956_o() + j + 1) + { +- k2--; ++ --k2; + } + else if (k2 < l) + { +- k2++; ++ ++k2; + } + } - for (int i3 = 0; i3 < i - 1; ++i3) +- for (int i3 = 0; i3 < i - 1; i3++) ++ for (int i3 = 0; i3 < i - 1; ++i3) { - Material material = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(i3)).func_185904_a(); + BlockPos upN = p_180709_3_.func_177981_b(i3); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch index 0346634ae..b4ef4d8f5 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch @@ -23,18 +23,27 @@ public boolean func_180709_b(World p_180709_1_, Random p_180709_2_, BlockPos p_180709_3_) { int i = p_180709_2_.nextInt(4) + 6; -@@ -36,7 +30,7 @@ +@@ -36,9 +30,9 @@ int l = 2 + p_180709_2_.nextInt(2); boolean flag = true; - if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= 256) + if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= p_180709_1_.func_72800_K()) { - for (int i1 = p_180709_3_.func_177956_o(); i1 <= p_180709_3_.func_177956_o() + 1 + i && flag; ++i1) +- for (int i1 = p_180709_3_.func_177956_o(); i1 <= p_180709_3_.func_177956_o() + 1 + i && flag; i1++) ++ for (int i1 = p_180709_3_.func_177956_o(); i1 <= p_180709_3_.func_177956_o() + 1 + i && flag; ++i1) { -@@ -57,11 +51,11 @@ + int j1; + +@@ -53,15 +47,15 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k1 = p_180709_3_.func_177958_n() - j1; k1 <= p_180709_3_.func_177958_n() + j1 && flag; k1++) ++ for (int k1 = p_180709_3_.func_177958_n() - j1; k1 <= p_180709_3_.func_177958_n() + j1 && flag; ++k1) { - for (int l1 = p_180709_3_.func_177952_p() - j1; l1 <= p_180709_3_.func_177952_p() + j1 && flag; ++l1) +- for (int l1 = p_180709_3_.func_177952_p() - j1; l1 <= p_180709_3_.func_177952_p() + j1 && flag; l1++) ++ for (int l1 = p_180709_3_.func_177952_p() - j1; l1 <= p_180709_3_.func_177952_p() + j1 && flag; ++l1) { - if (i1 >= 0 && i1 < 256) + if (i1 >= 0 && i1 < p_180709_1_.func_72800_K()) @@ -47,7 +56,7 @@ { flag = false; } -@@ -80,12 +74,12 @@ +@@ -80,33 +74,34 @@ } else { @@ -64,7 +73,22 @@ int i3 = p_180709_2_.nextInt(2); int j3 = 1; int k3 = 0; -@@ -105,8 +99,9 @@ + +- for (int l3 = 0; l3 <= k; l3++) ++ for (int l3 = 0; l3 <= k; ++l3) + { + int j4 = p_180709_3_.func_177956_o() + i - l3; + +- for (int i2 = p_180709_3_.func_177958_n() - i3; i2 <= p_180709_3_.func_177958_n() + i3; i2++) ++ for (int i2 = p_180709_3_.func_177958_n() - i3; i2 <= p_180709_3_.func_177958_n() + i3; ++i2) + { + int j2 = i2 - p_180709_3_.func_177958_n(); + +- for (int k2 = p_180709_3_.func_177952_p() - i3; k2 <= p_180709_3_.func_177952_p() + i3; k2++) ++ for (int k2 = p_180709_3_.func_177952_p() - i3; k2 <= p_180709_3_.func_177952_p() + i3; ++k2) + { + int l2 = k2 - p_180709_3_.func_177952_p(); + if (Math.abs(j2) != i3 || Math.abs(l2) != i3 || i3 <= 0) { BlockPos blockpos = new BlockPos(i2, j4, k2); @@ -75,7 +99,7 @@ { this.func_175903_a(p_180709_1_, blockpos, field_181646_b); } -@@ -118,8 +113,9 @@ +@@ -118,25 +113,27 @@ { i3 = k3; k3 = 1; @@ -86,9 +110,18 @@ { j3 = l; } -@@ -134,9 +130,10 @@ + } + else + { +- i3++; ++ ++i3; + } + } + + int i4 = p_180709_2_.nextInt(3); - for (int k4 = 0; k4 < i - i4; ++k4) +- for (int k4 = 0; k4 < i - i4; k4++) ++ for (int k4 = 0; k4 < i - i4; ++k4) { - Material material1 = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(k4)).func_185904_a(); + BlockPos upN = p_180709_3_.func_177981_b(k4); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch index 9f8aab93d..66444a1ea 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch @@ -16,7 +16,8 @@ p_180709_3_ = p_180709_3_.func_177977_b(); } - for (int i = 0; i < 128; ++i) +- for (int i = 0; i < 128; i++) ++ for (int i = 0; i < 128; ++i) { - BlockPos blockpos = p_180709_3_.func_177982_a( - p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8), p_180709_2_.nextInt(4) - p_180709_2_.nextInt(4), p_180709_2_.nextInt(8) - p_180709_2_.nextInt(8) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch index 577f3fb41..e4cffb4a0 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch @@ -12,7 +12,7 @@ private final int field_76533_a; private final boolean field_76531_b; private final IBlockState field_76532_c; -@@ -42,13 +39,12 @@ +@@ -42,15 +39,14 @@ this.field_76531_b = p_i46446_5_; } @@ -25,11 +25,20 @@ - if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= 256) + if (p_180709_3_.func_177956_o() >= 1 && p_180709_3_.func_177956_o() + i + 1 <= p_180709_1_.func_72800_K()) { - for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; ++j) +- for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; j++) ++ for (int j = p_180709_3_.func_177956_o(); j <= p_180709_3_.func_177956_o() + 1 + i; ++j) { -@@ -70,11 +66,14 @@ + int k = 1; + +@@ -66,15 +62,18 @@ + + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; l++) ++ for (int l = p_180709_3_.func_177958_n() - k; l <= p_180709_3_.func_177958_n() + k && flag; ++l) { - for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) +- for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; i1++) ++ for (int i1 = p_180709_3_.func_177952_p() - k; i1 <= p_180709_3_.func_177952_p() + k && flag; ++i1) { - if (j < 0 || j >= 256) + if (j >= 0 && j < p_180709_1_.func_72800_K()) @@ -45,7 +54,7 @@ { flag = false; } -@@ -88,12 +87,11 @@ +@@ -88,34 +87,33 @@ } else { @@ -61,7 +70,22 @@ int k2 = 3; int l2 = 0; -@@ -113,9 +111,9 @@ +- for (int i3 = p_180709_3_.func_177956_o() - 3 + i; i3 <= p_180709_3_.func_177956_o() + i; i3++) ++ for (int i3 = p_180709_3_.func_177956_o() - 3 + i; i3 <= p_180709_3_.func_177956_o() + i; ++i3) + { + int i4 = i3 - (p_180709_3_.func_177956_o() + i); + int j1 = 1 - i4 / 2; + +- for (int k1 = p_180709_3_.func_177958_n() - j1; k1 <= p_180709_3_.func_177958_n() + j1; k1++) ++ for (int k1 = p_180709_3_.func_177958_n() - j1; k1 <= p_180709_3_.func_177958_n() + j1; ++k1) + { + int l1 = k1 - p_180709_3_.func_177958_n(); + +- for (int i2 = p_180709_3_.func_177952_p() - j1; i2 <= p_180709_3_.func_177952_p() + j1; i2++) ++ for (int i2 = p_180709_3_.func_177952_p() - j1; i2 <= p_180709_3_.func_177952_p() + j1; ++i2) + { + int j2 = i2 - p_180709_3_.func_177952_p(); + if (Math.abs(l1) != j1 || Math.abs(j2) != j1 || p_180709_2_.nextInt(2) != 0 && i4 != 0) { BlockPos blockpos = new BlockPos(k1, i3, i2); @@ -73,9 +97,12 @@ { this.func_175903_a(p_180709_1_, blockpos, this.field_76530_d); } -@@ -126,9 +124,10 @@ +@@ -124,11 +122,12 @@ + } + } - for (int j3 = 0; j3 < i; ++j3) +- for (int j3 = 0; j3 < i; j3++) ++ for (int j3 = 0; j3 < i; ++j3) { - Material material1 = p_180709_1_.func_180495_p(p_180709_3_.func_177981_b(j3)).func_185904_a(); + BlockPos upN = p_180709_3_.func_177981_b(j3); @@ -86,7 +113,22 @@ { this.func_175903_a(p_180709_1_, p_180709_3_.func_177981_b(j3), this.field_76532_c); -@@ -171,29 +170,30 @@ +@@ -159,41 +158,42 @@ + + if (this.field_76531_b) + { +- for (int k3 = p_180709_3_.func_177956_o() - 3 + i; k3 <= p_180709_3_.func_177956_o() + i; k3++) ++ for (int k3 = p_180709_3_.func_177956_o() - 3 + i; k3 <= p_180709_3_.func_177956_o() + i; ++k3) + { + int j4 = k3 - (p_180709_3_.func_177956_o() + i); + int k4 = 2 - j4 / 2; + BlockPos.MutableBlockPos blockpos$mutableblockpos1 = new BlockPos.MutableBlockPos(); + +- for (int l4 = p_180709_3_.func_177958_n() - k4; l4 <= p_180709_3_.func_177958_n() + k4; l4++) ++ for (int l4 = p_180709_3_.func_177958_n() - k4; l4 <= p_180709_3_.func_177958_n() + k4; ++l4) + { +- for (int i5 = p_180709_3_.func_177952_p() - k4; i5 <= p_180709_3_.func_177952_p() + k4; i5++) ++ for (int i5 = p_180709_3_.func_177952_p() - k4; i5 <= p_180709_3_.func_177952_p() + k4; ++i5) { blockpos$mutableblockpos1.func_181079_c(l4, k3, i5); @@ -122,7 +164,15 @@ { this.func_181650_b(p_180709_1_, blockpos1, BlockVine.field_176273_b); } -@@ -211,12 +211,7 @@ +@@ -204,19 +204,14 @@ + + if (p_180709_2_.nextInt(5) == 0 && i > 5) + { +- for (int l3 = 0; l3 < 2; l3++) ++ for (int l3 = 0; l3 < 2; ++l3) + { + for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL) + { if (p_180709_2_.nextInt(4 - l3) == 0) { EnumFacing enumfacing1 = enumfacing.func_176734_d(); @@ -159,7 +209,7 @@ this.func_181651_a(p_181650_1_, p_181650_2_, p_181650_3_); int i = 4; -- for (BlockPos blockpos = p_181650_2_.func_177977_b(); p_181650_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && i > 0; --i) +- for (BlockPos blockpos = p_181650_2_.func_177977_b(); p_181650_1_.func_180495_p(blockpos).func_185904_a() == Material.field_151579_a && i > 0; i--) + for (BlockPos blockpos = p_181650_2_.func_177977_b(); p_181650_1_.func_175623_d(blockpos) && i > 0; --i) { this.func_181651_a(p_181650_1_, blockpos, p_181650_3_); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGeneratorBonusChest.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGeneratorBonusChest.java.patch index be8c5677e..061ecf2e8 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGeneratorBonusChest.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGeneratorBonusChest.java.patch @@ -15,9 +15,12 @@ { p_180709_3_ = p_180709_3_.func_177977_b(); } -@@ -33,13 +29,9 @@ +@@ -31,15 +27,11 @@ + { + p_180709_3_ = p_180709_3_.func_177984_a(); - for (int i = 0; i < 4; ++i) +- for (int i = 0; i < 4; i++) ++ for (int i = 0; i < 4; ++i) { - BlockPos blockpos = p_180709_3_.func_177982_a( - p_180709_2_.nextInt(4) - p_180709_2_.nextInt(4), diff --git a/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch b/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch index b39d185e5..7e4ba240e 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch @@ -1,30 +1,33 @@ --- before/net/minecraft/world/gen/layer/GenLayer.java +++ after/net/minecraft/world/gen/layer/GenLayer.java -@@ -15,22 +15,22 @@ - public static GenLayer[] func_180781_a(long p_180781_0_, WorldType p_180781_2_, ChunkGeneratorSettings p_180781_3_) +@@ -16,23 +16,23 @@ { GenLayer genlayer = new GenLayerIsland(1L); -- GenLayer genlayerfuzzyzoom = new GenLayerFuzzyZoom(2000L, genlayer); -- GenLayer genlayeraddisland = new GenLayerAddIsland(1L, genlayerfuzzyzoom); -+ genlayer = new GenLayerFuzzyZoom(2000L, genlayer); + genlayer = new GenLayerFuzzyZoom(2000L, genlayer); +- genlayer = new GenLayerAddIsland(1L, genlayer); +- genlayer = new GenLayerZoom(2001L, genlayer); +- genlayer = new GenLayerAddIsland(2L, genlayer); +- genlayer = new GenLayerAddIsland(50L, genlayer); +- genlayer = new GenLayerAddIsland(70L, genlayer); +- genlayer = new GenLayerRemoveTooMuchOcean(2L, genlayer); +- genlayer = new GenLayerAddSnow(2L, genlayer); +- genlayer = new GenLayerAddIsland(3L, genlayer); +- genlayer = new GenLayerEdge(2L, genlayer, GenLayerEdge.Mode.COOL_WARM); +- genlayer = new GenLayerEdge(2L, genlayer, GenLayerEdge.Mode.HEAT_ICE); +- genlayer = new GenLayerEdge(3L, genlayer, GenLayerEdge.Mode.SPECIAL); +- genlayer = new GenLayerZoom(2002L, genlayer); +- genlayer = new GenLayerZoom(2003L, genlayer); +- genlayer = new GenLayerAddIsland(4L, genlayer); +- genlayer = new GenLayerAddMushroomIsland(5L, genlayer); +- genlayer = new GenLayerDeepOcean(4L, genlayer); +- genlayer = GenLayerZoom.func_75915_a(1000L, genlayer, 0); + GenLayer genlayeraddisland = new GenLayerAddIsland(1L, genlayer); - GenLayer genlayerzoom = new GenLayerZoom(2001L, genlayeraddisland); - GenLayer genlayeraddisland1 = new GenLayerAddIsland(2L, genlayerzoom); -- GenLayer genlayeraddisland2 = new GenLayerAddIsland(50L, genlayeraddisland1); -- GenLayer genlayeraddisland3 = new GenLayerAddIsland(70L, genlayeraddisland2); -- GenLayer genlayerremovetoomuchocean = new GenLayerRemoveTooMuchOcean(2L, genlayeraddisland3); ++ GenLayer genlayerzoom = new GenLayerZoom(2001L, genlayeraddisland); ++ GenLayer genlayeraddisland1 = new GenLayerAddIsland(2L, genlayerzoom); + genlayeraddisland1 = new GenLayerAddIsland(50L, genlayeraddisland1); + genlayeraddisland1 = new GenLayerAddIsland(70L, genlayeraddisland1); + GenLayer genlayerremovetoomuchocean = new GenLayerRemoveTooMuchOcean(2L, genlayeraddisland1); - GenLayer genlayeraddsnow = new GenLayerAddSnow(2L, genlayerremovetoomuchocean); -- GenLayer genlayeraddisland4 = new GenLayerAddIsland(3L, genlayeraddsnow); -- GenLayer genlayeredge = new GenLayerEdge(2L, genlayeraddisland4, GenLayerEdge.Mode.COOL_WARM); -- GenLayer genlayeredge1 = new GenLayerEdge(2L, genlayeredge, GenLayerEdge.Mode.HEAT_ICE); -- GenLayer genlayeredge2 = new GenLayerEdge(3L, genlayeredge1, GenLayerEdge.Mode.SPECIAL); -- GenLayer genlayerzoom1 = new GenLayerZoom(2002L, genlayeredge2); -- GenLayer genlayerzoom2 = new GenLayerZoom(2003L, genlayerzoom1); -- GenLayer genlayeraddisland5 = new GenLayerAddIsland(4L, genlayerzoom2); -- GenLayer genlayeraddmushroomisland = new GenLayerAddMushroomIsland(5L, genlayeraddisland5); ++ GenLayer genlayeraddsnow = new GenLayerAddSnow(2L, genlayerremovetoomuchocean); + GenLayer genlayeraddisland2 = new GenLayerAddIsland(3L, genlayeraddsnow); + GenLayer genlayeredge = new GenLayerEdge(2L, genlayeraddisland2, GenLayerEdge.Mode.COOL_WARM); + genlayeredge = new GenLayerEdge(2L, genlayeredge, GenLayerEdge.Mode.HEAT_ICE); @@ -33,20 +36,23 @@ + genlayerzoom1 = new GenLayerZoom(2003L, genlayerzoom1); + GenLayer genlayeraddisland3 = new GenLayerAddIsland(4L, genlayerzoom1); + GenLayer genlayeraddmushroomisland = new GenLayerAddMushroomIsland(5L, genlayeraddisland3); - GenLayer genlayerdeepocean = new GenLayerDeepOcean(4L, genlayeraddmushroomisland); - GenLayer genlayer4 = GenLayerZoom.func_75915_a(1000L, genlayerdeepocean, 0); ++ GenLayer genlayerdeepocean = new GenLayerDeepOcean(4L, genlayeraddmushroomisland); ++ GenLayer genlayer4 = GenLayerZoom.func_75915_a(1000L, genlayerdeepocean, 0); int i = 4; + int j = i; + @@ -47,35 +47,35 @@ i = 6; } +- GenLayer lvt_7_1_ = GenLayerZoom.func_75915_a(1000L, genlayer, 0); + i = getModdedBiomeSize(p_180781_2_, i); + - GenLayer lvt_7_1_ = GenLayerZoom.func_75915_a(1000L, genlayer4, 0); ++ GenLayer lvt_7_1_ = GenLayerZoom.func_75915_a(1000L, genlayer4, 0); GenLayer genlayerriverinit = new GenLayerRiverInit(100L, lvt_7_1_); -- GenLayer lvt_8_1_ = new GenLayerBiome(200L, genlayer4, p_180781_2_, p_180781_3_); -- GenLayer genlayer5 = GenLayerZoom.func_75915_a(1000L, lvt_8_1_, 2); -- GenLayer genlayerbiomeedge = new GenLayerBiomeEdge(1000L, genlayer5); +- GenLayer lvt_8_1_ = new GenLayerBiome(200L, genlayer, p_180781_2_, p_180781_3_); +- GenLayer genlayer4 = GenLayerZoom.func_75915_a(1000L, lvt_8_1_, 2); +- GenLayer genlayerbiomeedge = new GenLayerBiomeEdge(1000L, genlayer4); + GenLayer genlayerbiomeedge = p_180781_2_.getBiomeLayer(p_180781_0_, genlayer4, p_180781_3_); GenLayer lvt_9_1_ = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2); GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_9_1_); @@ -60,7 +66,8 @@ - lvt_8_1_ = new GenLayerRareBiome(1001L, genlayerhills); + genlayerhills = new GenLayerRareBiome(1001L, genlayerhills); - for (int k = 0; k < i; ++k) +- for (int k = 0; k < i; k++) ++ for (int k = 0; k < i; ++k) { - lvt_8_1_ = new GenLayerZoom((long)(1000 + k), lvt_8_1_); + genlayerhills = new GenLayerZoom((long)(1000 + k), genlayerhills); @@ -83,19 +90,77 @@ GenLayer genlayerrivermix = new GenLayerRiverMix(100L, genlayersmooth1, genlayersmooth); GenLayer genlayer3 = new GenLayerVoronoiZoom(10L, genlayerrivermix); genlayerrivermix.func_75905_a(p_180781_0_); -@@ -151,26 +151,51 @@ +@@ -86,11 +86,11 @@ + public GenLayer(long p_i2125_1_) + { + this.field_75906_d = p_i2125_1_; +- this.field_75906_d = this.field_75906_d * (this.field_75906_d * 6364136223846793005L + 1442695040888963407L); +- this.field_75906_d += p_i2125_1_; +- this.field_75906_d = this.field_75906_d * (this.field_75906_d * 6364136223846793005L + 1442695040888963407L); +- this.field_75906_d += p_i2125_1_; +- this.field_75906_d = this.field_75906_d * (this.field_75906_d * 6364136223846793005L + 1442695040888963407L); ++ this.field_75906_d *= this.field_75906_d * 6364136223846793005L + 1442695040888963407L; ++ this.field_75906_d += p_i2125_1_; ++ this.field_75906_d *= this.field_75906_d * 6364136223846793005L + 1442695040888963407L; ++ this.field_75906_d += p_i2125_1_; ++ this.field_75906_d *= this.field_75906_d * 6364136223846793005L + 1442695040888963407L; + this.field_75906_d += p_i2125_1_; + } + +@@ -103,24 +103,24 @@ + this.field_75909_a.func_75905_a(p_75905_1_); + } + +- this.field_75907_b = this.field_75907_b * (this.field_75907_b * 6364136223846793005L + 1442695040888963407L); +- this.field_75907_b = this.field_75907_b + this.field_75906_d; +- this.field_75907_b = this.field_75907_b * (this.field_75907_b * 6364136223846793005L + 1442695040888963407L); +- this.field_75907_b = this.field_75907_b + this.field_75906_d; +- this.field_75907_b = this.field_75907_b * (this.field_75907_b * 6364136223846793005L + 1442695040888963407L); +- this.field_75907_b = this.field_75907_b + this.field_75906_d; ++ this.field_75907_b *= this.field_75907_b * 6364136223846793005L + 1442695040888963407L; ++ this.field_75907_b += this.field_75906_d; ++ this.field_75907_b *= this.field_75907_b * 6364136223846793005L + 1442695040888963407L; ++ this.field_75907_b += this.field_75906_d; ++ this.field_75907_b *= this.field_75907_b * 6364136223846793005L + 1442695040888963407L; ++ this.field_75907_b += this.field_75906_d; + } + + public void func_75903_a(long p_75903_1_, long p_75903_3_) + { + this.field_75908_c = this.field_75907_b; +- this.field_75908_c = this.field_75908_c * (this.field_75908_c * 6364136223846793005L + 1442695040888963407L); ++ this.field_75908_c *= this.field_75908_c * 6364136223846793005L + 1442695040888963407L; + this.field_75908_c += p_75903_1_; +- this.field_75908_c = this.field_75908_c * (this.field_75908_c * 6364136223846793005L + 1442695040888963407L); ++ this.field_75908_c *= this.field_75908_c * 6364136223846793005L + 1442695040888963407L; + this.field_75908_c += p_75903_3_; +- this.field_75908_c = this.field_75908_c * (this.field_75908_c * 6364136223846793005L + 1442695040888963407L); ++ this.field_75908_c *= this.field_75908_c * 6364136223846793005L + 1442695040888963407L; + this.field_75908_c += p_75903_1_; +- this.field_75908_c = this.field_75908_c * (this.field_75908_c * 6364136223846793005L + 1442695040888963407L); ++ this.field_75908_c *= this.field_75908_c * 6364136223846793005L + 1442695040888963407L; + this.field_75908_c += p_75903_3_; + } + +@@ -133,8 +133,8 @@ + i += p_75902_1_; + } + +- this.field_75908_c = this.field_75908_c * (this.field_75908_c * 6364136223846793005L + 1442695040888963407L); +- this.field_75908_c = this.field_75908_c + this.field_75907_b; ++ this.field_75908_c *= this.field_75908_c * 6364136223846793005L + 1442695040888963407L; ++ this.field_75908_c += this.field_75907_b; + return i; + } + +@@ -151,24 +151,51 @@ Biome biome = Biome.func_150568_d(p_151616_0_); Biome biome1 = Biome.func_150568_d(p_151616_1_); - if (biome == null || biome1 == null) -- { -- return false; -- } -- else if (biome != Biomes.field_150607_aa && biome != Biomes.field_150608_ab) -- { -- return biome == biome1 || biome.func_150562_l() == biome1.func_150562_l(); + if (biome != null && biome1 != null) -+ { + { +- return false; + if (biome != Biomes.field_150607_aa && biome != Biomes.field_150608_ab) + { + return biome == biome1 || biome.func_150562_l() == biome1.func_150562_l(); @@ -107,7 +172,9 @@ } else { -- return biome1 == Biomes.field_150607_aa || biome1 == Biomes.field_150608_ab; +- return biome != Biomes.field_150607_aa && biome != Biomes.field_150608_ab +- ? biome == biome1 || biome.func_150562_l() == biome1.func_150562_l() +- : biome1 == Biomes.field_150607_aa || biome1 == Biomes.field_150608_ab; + return false; } } diff --git a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch index 824193eeb..c7d09d24a 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java.patch @@ -54,7 +54,7 @@ this.field_175973_g = null; } else -@@ -38,7 +48,6 @@ +@@ -38,20 +48,19 @@ } } @@ -62,7 +62,14 @@ public int[] func_75904_a(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { int[] aint = this.field_75909_a.func_75904_a(p_75904_1_, p_75904_2_, p_75904_3_, p_75904_4_); -@@ -51,7 +60,7 @@ + int[] aint1 = IntCache.func_76445_a(p_75904_3_ * p_75904_4_); + +- for (int i = 0; i < p_75904_4_; i++) ++ for (int i = 0; i < p_75904_4_; ++i) + { +- for (int j = 0; j < p_75904_3_; j++) ++ for (int j = 0; j < p_75904_3_; ++j) + { this.func_75903_a((long)(j + p_75904_1_), (long)(i + p_75904_2_)); int k = aint[j + i * p_75904_3_]; int l = (k & 3840) >> 8; diff --git a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch index 3bcf6d7cf..dcfeb6ce6 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch @@ -97,7 +97,7 @@ if (i < this.field_75057_g.length) { this.field_75057_g[i++] = new ChunkPos(structurestart.func_143019_e(), structurestart.func_143018_f()); -@@ -127,7 +139,7 @@ +@@ -127,16 +139,16 @@ Random random = new Random(); random.setSeed(this.field_75039_c.func_72905_C()); @@ -106,9 +106,11 @@ int j = 0; int k = 0; int l = this.field_75053_d.size(); -@@ -136,7 +148,7 @@ + + if (l < this.field_75057_g.length) { - for (int i1 = 0; i1 < this.field_75057_g.length; ++i1) +- for (int i1 = 0; i1 < this.field_75057_g.length; i1++) ++ for (int i1 = 0; i1 < this.field_75057_g.length; ++i1) { - double d0 = 4.0 * this.field_82671_h + this.field_82671_h * (double)j * 6.0 + (random.nextDouble() - 0.5) * this.field_82671_h * 2.5; + double d0 = 4.0D * this.field_82671_h + this.field_82671_h * (double)j * 6.0D + (random.nextDouble() - 0.5D) * this.field_82671_h * 2.5D; @@ -126,9 +128,11 @@ - if (++k == this.field_82672_i) + if (k == this.field_82672_i) { - ++j; +- j++; ++ ++j; k = 0; - this.field_82672_i += 2 * this.field_82672_i / (j + 1); +- this.field_82672_i = this.field_82672_i + 2 * this.field_82672_i / (j + 1); ++ this.field_82672_i += 2 * this.field_82672_i / (j + 1); this.field_82672_i = Math.min(this.field_82672_i, this.field_75057_g.length - i1); - d1 += random.nextDouble() * Math.PI * 2.0; + d1 += random.nextDouble() * Math.PI * 2.0D; diff --git a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch index 2bb0c5e56..a3be766a7 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch @@ -107,7 +107,7 @@ } else { -@@ -201,17 +221,7 @@ +@@ -201,29 +221,19 @@ protected abstract StructureStart func_75049_b(int p_75049_1_, int p_75049_2_); @@ -126,6 +126,21 @@ { int i = p_191069_2_.func_177958_n() >> 4; int j = p_191069_2_.func_177952_p() >> 4; + int k = 0; + +- for (Random random = new Random(); k <= p_191069_7_; k++) ++ for (Random random = new Random(); k <= p_191069_7_; ++k) + { +- for (int l = -k; l <= k; l++) ++ for (int l = -k; l <= k; ++l) + { + boolean flag = l == -k || l == k; + +- for (int i1 = -k; i1 <= k; i1++) ++ for (int i1 = -k; i1 <= k; ++i1) + { + boolean flag1 = i1 == -k || i1 == k; + @@ -245,18 +255,18 @@ int l1 = j1 / p_191069_3_; int i2 = k1 / p_191069_3_; diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch index 3ba4eda2b..3a31e2ae5 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch @@ -11,7 +11,43 @@ NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.func_74778_a("id", MapGenStructureIO.func_143036_a(this)); nbttagcompound.func_74782_a("BB", this.field_74887_e.func_151535_h()); -@@ -251,9 +255,7 @@ +@@ -107,9 +111,9 @@ + int j1 = Math.min(this.field_74887_e.field_78892_f + 1, p_74860_2_.field_78892_f); + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k1 = i; k1 <= l; k1++) ++ for (int k1 = i; k1 <= l; ++k1) + { +- for (int l1 = k; l1 <= j1; l1++) ++ for (int l1 = k; l1 <= j1; ++l1) + { + if (p_74860_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(k1, j, l1)).func_185904_a().func_76224_d()) + { +@@ -123,9 +127,9 @@ + } + } + +- for (int i2 = i; i2 <= l; i2++) ++ for (int i2 = i; i2 <= l; ++i2) + { +- for (int k2 = j; k2 <= i1; k2++) ++ for (int k2 = j; k2 <= i1; ++k2) + { + if (p_74860_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(i2, k2, k)).func_185904_a().func_76224_d()) + { +@@ -139,9 +143,9 @@ + } + } + +- for (int j2 = k; j2 <= j1; j2++) ++ for (int j2 = k; j2 <= j1; ++j2) + { +- for (int l2 = j; l2 <= i1; l2++) ++ for (int l2 = j; l2 <= i1; ++l2) + { + if (p_74860_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(i, l2, j2)).func_185904_a().func_76224_d()) + { +@@ -251,15 +255,13 @@ return !p_189916_5_.func_175898_b(blockpos) ? EnumSkyBlock.SKY.field_77198_c : p_189916_1_.func_175642_b(EnumSkyBlock.SKY, blockpos); } @@ -20,9 +56,18 @@ - ) + protected void func_74878_a(World p_74878_1_, StructureBoundingBox p_74878_2_, int p_74878_3_, int p_74878_4_, int p_74878_5_, int p_74878_6_, int p_74878_7_, int p_74878_8_) { - for (int i = p_74878_4_; i <= p_74878_7_; ++i) +- for (int i = p_74878_4_; i <= p_74878_7_; i++) ++ for (int i = p_74878_4_; i <= p_74878_7_; ++i) { -@@ -267,19 +269,7 @@ +- for (int j = p_74878_3_; j <= p_74878_6_; j++) ++ for (int j = p_74878_3_; j <= p_74878_6_; ++j) + { +- for (int k = p_74878_5_; k <= p_74878_8_; k++) ++ for (int k = p_74878_5_; k <= p_74878_8_; ++k) + { + this.func_175811_a(p_74878_1_, Blocks.field_150350_a.func_176223_P(), j, i, k, p_74878_2_); + } +@@ -267,25 +269,13 @@ } } @@ -41,9 +86,18 @@ - ) + protected void func_175804_a(World p_175804_1_, StructureBoundingBox p_175804_2_, int p_175804_3_, int p_175804_4_, int p_175804_5_, int p_175804_6_, int p_175804_7_, int p_175804_8_, IBlockState p_175804_9_, IBlockState p_175804_10_, boolean p_175804_11_) { - for (int i = p_175804_4_; i <= p_175804_7_; ++i) +- for (int i = p_175804_4_; i <= p_175804_7_; i++) ++ for (int i = p_175804_4_; i <= p_175804_7_; ++i) { -@@ -303,19 +293,7 @@ +- for (int j = p_175804_3_; j <= p_175804_6_; j++) ++ for (int j = p_175804_3_; j <= p_175804_6_; ++j) + { +- for (int k = p_175804_5_; k <= p_175804_8_; k++) ++ for (int k = p_175804_5_; k <= p_175804_8_; ++k) + { + if (!p_175804_11_ || this.func_175807_a(p_175804_1_, j, i, k, p_175804_2_).func_185904_a() != Material.field_151579_a) + { +@@ -303,31 +293,17 @@ } } @@ -62,9 +116,14 @@ - ) + protected void func_74882_a(World p_74882_1_, StructureBoundingBox p_74882_2_, int p_74882_3_, int p_74882_4_, int p_74882_5_, int p_74882_6_, int p_74882_7_, int p_74882_8_, boolean p_74882_9_, Random p_74882_10_, StructureComponent.BlockSelector p_74882_11_) { - for (int i = p_74882_4_; i <= p_74882_7_; ++i) +- for (int i = p_74882_4_; i <= p_74882_7_; i++) ++ for (int i = p_74882_4_; i <= p_74882_7_; ++i) { -@@ -325,9 +303,7 @@ +- for (int j = p_74882_3_; j <= p_74882_6_; j++) ++ for (int j = p_74882_3_; j <= p_74882_6_; ++j) + { +- for (int k = p_74882_5_; k <= p_74882_8_; k++) ++ for (int k = p_74882_5_; k <= p_74882_8_; ++k) { if (!p_74882_9_ || this.func_175807_a(p_74882_1_, j, i, k, p_74882_2_).func_185904_a() != Material.field_151579_a) { @@ -75,7 +134,7 @@ this.func_175811_a(p_74882_1_, p_74882_11_.func_180780_a(), j, i, k, p_74882_2_); } } -@@ -335,22 +311,7 @@ +@@ -335,32 +311,15 @@ } } @@ -97,11 +156,14 @@ - ) + protected void func_189914_a(World p_189914_1_, StructureBoundingBox p_189914_2_, Random p_189914_3_, float p_189914_4_, int p_189914_5_, int p_189914_6_, int p_189914_7_, int p_189914_8_, int p_189914_9_, int p_189914_10_, IBlockState p_189914_11_, IBlockState p_189914_12_, boolean p_189914_13_, int p_189914_14_) { - for (int i = p_189914_6_; i <= p_189914_9_; ++i) +- for (int i = p_189914_6_; i <= p_189914_9_; i++) ++ for (int i = p_189914_6_; i <= p_189914_9_; ++i) { -@@ -358,9 +319,7 @@ +- for (int j = p_189914_5_; j <= p_189914_8_; j++) ++ for (int j = p_189914_5_; j <= p_189914_8_; ++j) { - for (int k = p_189914_7_; k <= p_189914_10_; ++k) +- for (int k = p_189914_7_; k <= p_189914_10_; k++) ++ for (int k = p_189914_7_; k <= p_189914_10_; ++k) { - if (!(p_189914_3_.nextFloat() > p_189914_4_) - && (!p_189914_13_ || this.func_175807_a(p_189914_1_, j, i, k, p_189914_2_).func_185904_a() != Material.field_151579_a) @@ -148,7 +210,32 @@ { float f = (float)(p_180777_6_ - p_180777_3_ + 1); float f1 = (float)(p_180777_7_ - p_180777_4_ + 1); -@@ -468,22 +407,13 @@ +@@ -412,15 +351,15 @@ + float f3 = (float)p_180777_3_ + f / 2.0F; + float f4 = (float)p_180777_5_ + f2 / 2.0F; + +- for (int i = p_180777_4_; i <= p_180777_7_; i++) ++ for (int i = p_180777_4_; i <= p_180777_7_; ++i) + { + float f5 = (float)(i - p_180777_4_) / f1; + +- for (int j = p_180777_3_; j <= p_180777_6_; j++) ++ for (int j = p_180777_3_; j <= p_180777_6_; ++j) + { + float f6 = ((float)j - f3) / (f * 0.5F); + +- for (int k = p_180777_5_; k <= p_180777_8_; k++) ++ for (int k = p_180777_5_; k <= p_180777_8_; ++k) + { + float f7 = ((float)k - f4) / (f2 * 0.5F); + +@@ -463,27 +402,18 @@ + while ((p_175808_1_.func_175623_d(new BlockPos(i, j, k)) || p_175808_1_.func_180495_p(new BlockPos(i, j, k)).func_185904_a().func_76224_d()) && j > 1) + { + p_175808_1_.func_180501_a(new BlockPos(i, j, k), p_175808_2_, 2); +- j--; ++ --j; + } } } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch index c3249d3c8..02e303ede 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch @@ -20,9 +20,12 @@ NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.func_74778_a("id", MapGenStructureIO.func_143033_a(this)); nbttagcompound.func_74768_a("ChunkX", p_143021_1_); -@@ -98,7 +102,8 @@ +@@ -96,9 +100,10 @@ - for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + NBTTagList nbttaglist = p_143020_2_.func_150295_c("Children", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) { - this.field_75075_a.add(MapGenStructureIO.func_143032_b(nbttaglist.func_150305_b(i), p_143020_1_)); + StructureComponent tmp = MapGenStructureIO.func_143032_b(nbttaglist.func_150305_b(i), p_143020_1_); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch index 39aaaf2ee..7e34095f9 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java.patch @@ -176,7 +176,16 @@ { int i = func_75079_a(p_176067_0_.field_74931_h); -@@ -224,15 +172,12 @@ +@@ -215,7 +163,7 @@ + + while (j < 5) + { +- j++; ++ ++j; + int k = p_176067_2_.nextInt(i); + + for (StructureVillagePieces.PieceWeight structurevillagepieces$pieceweight : p_176067_0_.field_74931_h) +@@ -224,19 +172,16 @@ if (k < 0) { @@ -194,6 +203,11 @@ if (structurevillagepieces$village != null) { +- structurevillagepieces$pieceweight.field_75089_c++; ++ ++structurevillagepieces$pieceweight.field_75089_c; + p_176067_0_.field_74926_d = structurevillagepieces$pieceweight; + + if (!structurevillagepieces$pieceweight.func_75086_a()) @@ -250,36 +195,28 @@ } } @@ -302,6 +316,15 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -435,7 +348,7 @@ + this.func_189926_a(p_74875_1_, EnumFacing.NORTH, 2, 4, 5, p_74875_3_); + IBlockState iblockstate4 = Blocks.field_150468_ap.func_176223_P().func_177226_a(BlockLadder.field_176382_a, EnumFacing.WEST); + +- for (int i = 1; i <= 9; i++) ++ for (int i = 1; i <= 9; ++i) + { + this.func_175811_a(p_74875_1_, iblockstate4, 3, i, 3, p_74875_3_); + } @@ -444,8 +357,7 @@ this.func_175811_a(p_74875_1_, Blocks.field_150350_a.func_176223_P(), 2, 2, 0, p_74875_3_); this.func_189927_a(p_74875_1_, p_74875_3_, p_74875_2_, 2, 1, 0, EnumFacing.NORTH); @@ -312,6 +335,18 @@ { this.func_175811_a(p_74875_1_, iblockstate1, 2, 0, -1, p_74875_3_); +@@ -455,9 +367,9 @@ + } + } + +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { +- for (int j = 0; j < 5; j++) ++ for (int j = 0; j < 5; ++j) + { + this.func_74871_b(p_74875_1_, j, 12, k, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, j, -1, k, p_74875_3_); @@ -468,7 +380,6 @@ return true; } @@ -363,6 +398,27 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -600,7 +497,7 @@ + this.func_175804_a(p_74875_1_, p_74875_3_, 3, 0, 1, 3, 0, 7, Blocks.field_150355_j.func_176223_P(), Blocks.field_150355_j.func_176223_P(), false); + this.func_175804_a(p_74875_1_, p_74875_3_, 9, 0, 1, 9, 0, 7, Blocks.field_150355_j.func_176223_P(), Blocks.field_150355_j.func_176223_P(), false); + +- for (int i = 1; i <= 7; i++) ++ for (int i = 1; i <= 7; ++i) + { + int j = ((BlockCrops)this.field_82679_b).func_185526_g(); + int k = j / 3; +@@ -620,9 +517,9 @@ + this.func_175811_a(p_74875_1_, this.field_82681_h.func_176203_a(MathHelper.func_76136_a(p_74875_2_, i2, l1)), 11, 1, i, p_74875_3_); + } + +- for (int j2 = 0; j2 < 9; j2++) ++ for (int j2 = 0; j2 < 9; ++j2) + { +- for (int k2 = 0; k2 < 13; k2++) ++ for (int k2 = 0; k2 < 13; ++k2) + { + this.func_74871_b(p_74875_1_, k2, 4, j2, p_74875_3_); + this.func_175808_b(p_74875_1_, Blocks.field_150346_d.func_176223_P(), k2, -1, j2, p_74875_3_); @@ -651,7 +548,6 @@ this.field_82676_c = this.func_151560_a(p_i45569_3_); } @@ -406,6 +462,27 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -726,7 +609,7 @@ + this.func_175804_a(p_74875_1_, p_74875_3_, 1, 0, 8, 5, 0, 8, iblockstate, iblockstate, false); + this.func_175804_a(p_74875_1_, p_74875_3_, 3, 0, 1, 3, 0, 7, Blocks.field_150355_j.func_176223_P(), Blocks.field_150355_j.func_176223_P(), false); + +- for (int i = 1; i <= 7; i++) ++ for (int i = 1; i <= 7; ++i) + { + int j = ((BlockCrops)this.field_82675_b).func_185526_g(); + int k = j / 3; +@@ -738,9 +621,9 @@ + this.func_175811_a(p_74875_1_, this.field_82676_c.func_176203_a(MathHelper.func_76136_a(p_74875_2_, i1, l)), 5, 1, i, p_74875_3_); + } + +- for (int j1 = 0; j1 < 9; j1++) ++ for (int j1 = 0; j1 < 9; ++j1) + { +- for (int k1 = 0; k1 < 7; k1++) ++ for (int k1 = 0; k1 < 7; ++k1) + { + this.func_74871_b(p_74875_1_, k1, 4, j1, p_74875_3_); + this.func_175808_b(p_74875_1_, Blocks.field_150346_d.func_176223_P(), k1, -1, j1, p_74875_3_); @@ -764,24 +647,12 @@ this.field_74887_e = p_i45567_4_; } @@ -433,6 +510,18 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -827,9 +698,9 @@ + IBlockState iblockstate7 = iblockstate1; + IBlockState iblockstate8 = iblockstate2; + +- for (int i = -1; i <= 2; i++) ++ for (int i = -1; i <= 2; ++i) + { +- for (int j = 0; j <= 8; j++) ++ for (int j = 0; j <= 8; ++j) + { + this.func_175811_a(p_74875_1_, iblockstate7, j, 4 + i, i, p_74875_3_); + this.func_175811_a(p_74875_1_, iblockstate8, j, 4 + i, 5 - i, p_74875_3_); @@ -861,8 +732,7 @@ this.func_189926_a(p_74875_1_, EnumFacing.NORTH, 2, 3, 1, p_74875_3_); this.func_189927_a(p_74875_1_, p_74875_3_, p_74875_2_, 2, 1, 0, EnumFacing.NORTH); @@ -443,6 +532,18 @@ { this.func_175811_a(p_74875_1_, iblockstate7, 2, 0, -1, p_74875_3_); +@@ -877,9 +747,9 @@ + this.func_189926_a(p_74875_1_, EnumFacing.SOUTH, 6, 3, 4, p_74875_3_); + this.func_189927_a(p_74875_1_, p_74875_3_, p_74875_2_, 6, 1, 5, EnumFacing.SOUTH); + +- for (int k = 0; k < 5; k++) ++ for (int k = 0; k < 5; ++k) + { +- for (int l = 0; l < 9; l++) ++ for (int l = 0; l < 9; ++l) + { + this.func_74871_b(p_74875_1_, l, 7, k, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, l, -1, k, p_74875_3_); @@ -890,7 +760,6 @@ return true; } @@ -478,6 +579,18 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -955,9 +812,9 @@ + this.func_175804_a(p_74875_1_, p_74875_3_, 0, 6, 1, 8, 6, 4, iblockstate, iblockstate, false); + this.func_175804_a(p_74875_1_, p_74875_3_, 0, 7, 2, 8, 7, 3, iblockstate, iblockstate, false); + +- for (int i = -1; i <= 2; i++) ++ for (int i = -1; i <= 2; ++i) + { +- for (int j = 0; j <= 8; j++) ++ for (int j = 0; j <= 8; ++j) + { + this.func_175811_a(p_74875_1_, iblockstate1, j, 6 + i, i, p_74875_3_); + this.func_175811_a(p_74875_1_, iblockstate2, j, 6 + i, 5 - i, p_74875_3_); @@ -1012,8 +869,7 @@ this.func_175811_a(p_74875_1_, Blocks.field_150350_a.func_176223_P(), 1, 2, 0, p_74875_3_); this.func_189927_a(p_74875_1_, p_74875_3_, p_74875_2_, 1, 1, 0, EnumFacing.NORTH); @@ -488,6 +601,18 @@ { this.func_175811_a(p_74875_1_, iblockstate5, 1, 0, -1, p_74875_3_); +@@ -1023,9 +879,9 @@ + } + } + +- for (int l = 0; l < 6; l++) ++ for (int l = 0; l < 6; ++l) + { +- for (int k = 0; k < 9; k++) ++ for (int k = 0; k < 9; ++k) + { + this.func_74871_b(p_74875_1_, k, 9, l, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, k, -1, l, p_74875_3_); @@ -1036,7 +892,6 @@ return true; } @@ -537,9 +662,12 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) -@@ -1155,8 +996,7 @@ +@@ -1153,10 +994,9 @@ + this.func_186167_a(p_74875_1_, p_74875_3_, p_74875_2_, 5, 1, 5, LootTableList.field_186423_e); + } - for (int i = 6; i <= 8; ++i) +- for (int i = 6; i <= 8; i++) ++ for (int i = 6; i <= 8; ++i) { - if (this.func_175807_a(p_74875_1_, i, 0, -1, p_74875_3_).func_185904_a() == Material.field_151579_a - && this.func_175807_a(p_74875_1_, i, -1, -1, p_74875_3_).func_185904_a() != Material.field_151579_a) @@ -547,6 +675,18 @@ { this.func_175811_a(p_74875_1_, iblockstate4, i, 0, -1, p_74875_3_); +@@ -1167,9 +1007,9 @@ + } + } + +- for (int k = 0; k < 7; k++) ++ for (int k = 0; k < 7; ++k) + { +- for (int j = 0; j < 10; j++) ++ for (int j = 0; j < 10; ++j) + { + this.func_74871_b(p_74875_1_, j, 6, k, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, j, -1, k, p_74875_3_); @@ -1180,7 +1020,6 @@ return true; } @@ -582,6 +722,44 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -1264,9 +1091,9 @@ + IBlockState iblockstate9 = iblockstate4; + IBlockState iblockstate10 = iblockstate3; + +- for (int i = -1; i <= 2; i++) ++ for (int i = -1; i <= 2; ++i) + { +- for (int j = 0; j <= 8; j++) ++ for (int j = 0; j <= 8; ++j) + { + this.func_175811_a(p_74875_1_, iblockstate7, j, 4 + i, i, p_74875_3_); + +@@ -1283,11 +1110,11 @@ + this.func_175804_a(p_74875_1_, p_74875_3_, 6, 5, 4, 6, 5, 10, iblockstate5, iblockstate5, false); + this.func_175804_a(p_74875_1_, p_74875_3_, 5, 6, 3, 5, 6, 10, iblockstate5, iblockstate5, false); + +- for (int k = 4; k >= 1; k--) ++ for (int k = 4; k >= 1; --k) + { + this.func_175811_a(p_74875_1_, iblockstate5, k, 2 + k, 7 - k, p_74875_3_); + +- for (int k1 = 8 - k; k1 <= 10; k1++) ++ for (int k1 = 8 - k; k1 <= 10; ++k1) + { + this.func_175811_a(p_74875_1_, iblockstate10, k, 2 + k, k1, p_74875_3_); + } +@@ -1297,9 +1124,9 @@ + this.func_175811_a(p_74875_1_, iblockstate5, 7, 5, 4, p_74875_3_); + this.func_175811_a(p_74875_1_, iblockstate4, 6, 6, 4, p_74875_3_); + +- for (int l = 6; l <= 8; l++) ++ for (int l = 6; l <= 8; ++l) + { +- for (int l1 = 5; l1 <= 10; l1++) ++ for (int l1 = 5; l1 <= 10; ++l1) + { + this.func_175811_a(p_74875_1_, iblockstate9, l, 12 - l, l1, p_74875_3_); + } @@ -1335,8 +1162,7 @@ this.func_189927_a(p_74875_1_, p_74875_3_, p_74875_2_, 2, 1, 0, EnumFacing.NORTH); this.func_175804_a(p_74875_1_, p_74875_3_, 1, 0, -1, 3, 2, -1, Blocks.field_150350_a.func_176223_P(), Blocks.field_150350_a.func_176223_P(), false); @@ -592,6 +770,29 @@ { this.func_175811_a(p_74875_1_, iblockstate7, 2, 0, -1, p_74875_3_); +@@ -1346,18 +1172,18 @@ + } + } + +- for (int i1 = 0; i1 < 5; i1++) ++ for (int i1 = 0; i1 < 5; ++i1) + { +- for (int i2 = 0; i2 < 9; i2++) ++ for (int i2 = 0; i2 < 9; ++i2) + { + this.func_74871_b(p_74875_1_, i2, 7, i1, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, i2, -1, i1, p_74875_3_); + } + } + +- for (int j1 = 5; j1 < 11; j1++) ++ for (int j1 = 5; j1 < 11; ++j1) + { +- for (int j2 = 2; j2 < 9; j2++) ++ for (int j2 = 2; j2 < 9; ++j2) + { + this.func_74871_b(p_74875_1_, j2, 7, j1, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, j2, -1, j1, p_74875_3_); @@ -1377,9 +1203,7 @@ { } @@ -654,6 +855,18 @@ { this.func_175811_a(p_74875_1_, iblockstate2, 2, 0, -1, p_74875_3_); +@@ -1511,9 +1320,9 @@ + + this.func_189926_a(p_74875_1_, EnumFacing.NORTH, 2, 3, 1, p_74875_3_); + +- for (int j = 0; j < 5; j++) ++ for (int j = 0; j < 5; ++j) + { +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) + { + this.func_74871_b(p_74875_1_, i, 6, j, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, i, -1, j, p_74875_3_); @@ -1541,21 +1350,18 @@ this.field_74934_a = Math.max(p_i45562_4_.func_78883_b(), p_i45562_4_.func_78880_d()); } @@ -812,6 +1025,18 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { IBlockState iblockstate = this.func_175847_a(Blocks.field_185774_da.func_176223_P()); +@@ -1726,9 +1451,9 @@ + IBlockState iblockstate2 = this.func_175847_a(Blocks.field_150351_n.func_176223_P()); + IBlockState iblockstate3 = this.func_175847_a(Blocks.field_150347_e.func_176223_P()); + +- for (int i = this.field_74887_e.field_78897_a; i <= this.field_74887_e.field_78893_d; i++) ++ for (int i = this.field_74887_e.field_78897_a; i <= this.field_74887_e.field_78893_d; ++i) + { +- for (int j = this.field_74887_e.field_78896_c; j <= this.field_74887_e.field_78892_f; j++) ++ for (int j = this.field_74887_e.field_78896_c; j <= this.field_74887_e.field_78892_f; ++j) + { + BlockPos blockpos = new BlockPos(i, 64, j); + @@ -1757,9 +1482,7 @@ break; } @@ -1040,7 +1265,24 @@ } } else -@@ -2110,7 +1743,14 @@ +@@ -2096,21 +1729,28 @@ + int j = 0; + BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); + +- for (int k = this.field_74887_e.field_78896_c; k <= this.field_74887_e.field_78892_f; k++) ++ for (int k = this.field_74887_e.field_78896_c; k <= this.field_74887_e.field_78892_f; ++k) + { +- for (int l = this.field_74887_e.field_78897_a; l <= this.field_74887_e.field_78893_d; l++) ++ for (int l = this.field_74887_e.field_78897_a; l <= this.field_74887_e.field_78893_d; ++l) + { + blockpos$mutableblockpos.func_181079_c(l, 64, k); + + if (p_74889_2_.func_175898_b(blockpos$mutableblockpos)) + { + i += Math.max(p_74889_1_.func_175672_r(blockpos$mutableblockpos).func_177956_o(), p_74889_1_.field_73011_w.func_76557_i() - 1); +- j++; ++ ++j; + } } } @@ -1056,7 +1298,22 @@ } protected static boolean func_74895_a(StructureBoundingBox p_74895_0_) -@@ -2138,31 +1778,40 @@ +@@ -2122,7 +1762,7 @@ + { + if (this.field_74896_a < p_74893_6_) + { +- for (int i = this.field_74896_a; i < p_74893_6_; i++) ++ for (int i = this.field_74896_a; i < p_74893_6_; ++i) + { + int j = this.func_74865_a(p_74893_3_ + i, p_74893_5_); + int k = this.func_74862_a(p_74893_4_); +@@ -2133,36 +1773,45 @@ + break; + } + +- this.field_74896_a++; ++ ++this.field_74896_a; + if (this.field_189929_i) { EntityZombieVillager entityzombievillager = new EntityZombieVillager(p_74893_1_); @@ -1238,6 +1495,18 @@ public boolean func_74875_a(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.field_143015_k < 0) +@@ -2410,9 +1998,9 @@ + this.func_175811_a(p_74875_1_, iblockstate1, 4, 14, 4, p_74875_3_); + this.func_175804_a(p_74875_1_, p_74875_3_, 1, 15, 1, 4, 15, 4, iblockstate, iblockstate, false); + +- for (int i = 0; i <= 5; i++) ++ for (int i = 0; i <= 5; ++i) + { +- for (int j = 0; j <= 5; j++) ++ for (int j = 0; j <= 5; ++j) + { + if (j == 0 || j == 5 || i == 0 || i == 5) + { @@ -2444,7 +2032,6 @@ this.field_74910_c = p_i45565_3_.nextInt(3); } @@ -1291,3 +1560,15 @@ { this.func_175811_a(p_74875_1_, iblockstate2, 1, 0, -1, p_74875_3_); +@@ -2552,9 +2125,9 @@ + } + } + +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) + { +- for (int j = 0; j < 4; j++) ++ for (int j = 0; j < 4; ++j) + { + this.func_74871_b(p_74875_1_, j, 6, i, p_74875_3_); + this.func_175808_b(p_74875_1_, iblockstate, j, -1, i, p_74875_3_); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch index 008e86d2f..68e4d02d3 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/template/Template.java.patch @@ -161,7 +161,18 @@ default: return flag ? new Vec3d(d0, d1, d2) : p_186269_0_; } -@@ -454,7 +437,6 @@ +@@ -426,8 +409,8 @@ + + public static BlockPos func_191157_a(BlockPos p_191157_0_, Mirror p_191157_1_, Rotation p_191157_2_, int p_191157_3_, int p_191157_4_) + { +- p_191157_3_--; +- p_191157_4_--; ++ --p_191157_3_; ++ --p_191157_4_; + int i = p_191157_1_ == Mirror.FRONT_BACK ? p_191157_3_ : 0; + int j = p_191157_1_ == Mirror.LEFT_RIGHT ? p_191157_4_ : 0; + BlockPos blockpos = p_191157_0_; +@@ -454,14 +437,13 @@ { p_191158_0_.func_188258_a(FixTypes.STRUCTURE, new IDataWalker() { @@ -169,6 +180,23 @@ public NBTTagCompound func_188266_a(IDataFixer p_188266_1_, NBTTagCompound p_188266_2_, int p_188266_3_) { if (p_188266_2_.func_150297_b("entities", 9)) + { + NBTTagList nbttaglist = p_188266_2_.func_150295_c("entities", 10); + +- for (int i = 0; i < nbttaglist.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist.func_74745_c(); ++i) + { + NBTTagCompound nbttagcompound = (NBTTagCompound)nbttaglist.func_179238_g(i); + +@@ -476,7 +458,7 @@ + { + NBTTagList nbttaglist1 = p_188266_2_.func_150295_c("blocks", 10); + +- for (int j = 0; j < nbttaglist1.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist1.func_74745_c(); ++j) + { + NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist1.func_179238_g(j); + @@ -500,14 +482,7 @@ for (Template.BlockInfo template$blockinfo : this.field_186270_a) { @@ -225,6 +253,32 @@ p_189552_1_.func_74778_a("author", this.field_186273_d); p_189552_1_.func_74768_a("DataVersion", 1343); return p_189552_1_; +@@ -576,14 +536,14 @@ + Template.BasicPalette template$basicpalette = new Template.BasicPalette(); + NBTTagList nbttaglist1 = p_186256_1_.func_150295_c("palette", 10); + +- for (int i = 0; i < nbttaglist1.func_74745_c(); i++) ++ for (int i = 0; i < nbttaglist1.func_74745_c(); ++i) + { + template$basicpalette.func_189956_a(NBTUtil.func_190008_d(nbttaglist1.func_150305_b(i)), i); + } + + NBTTagList nbttaglist3 = p_186256_1_.func_150295_c("blocks", 10); + +- for (int j = 0; j < nbttaglist3.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist3.func_74745_c(); ++j) + { + NBTTagCompound nbttagcompound = nbttaglist3.func_150305_b(j); + NBTTagList nbttaglist2 = nbttagcompound.func_150295_c("pos", 3); +@@ -605,7 +565,7 @@ + + NBTTagList nbttaglist4 = p_186256_1_.func_150295_c("entities", 10); + +- for (int k = 0; k < nbttaglist4.func_74745_c(); k++) ++ for (int k = 0; k < nbttaglist4.func_74745_c(); ++k) + { + NBTTagCompound nbttagcompound3 = nbttaglist4.func_150305_b(k); + NBTTagList nbttaglist5 = nbttagcompound3.func_150295_c("pos", 6); @@ -648,11 +608,12 @@ static class BasicPalette implements Iterable { diff --git a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch index e1717b748..6b386f990 100644 --- a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch @@ -39,6 +39,22 @@ this.field_76201_a = p_76184_1_.func_74762_e("xCenter"); this.field_76199_b = p_76184_1_.func_74762_e("zCenter"); this.field_76197_d = p_76184_1_.func_74771_c("scale"); +@@ -76,13 +75,13 @@ + int k = (128 - i) / 2; + int l = (128 - j) / 2; + +- for (int i1 = 0; i1 < j; i1++) ++ for (int i1 = 0; i1 < j; ++i1) + { + int j1 = i1 + l; + + if (j1 >= 0 || j1 < 128) + { +- for (int k1 = 0; k1 < i; k1++) ++ for (int k1 = 0; k1 < i; ++k1) + { + int l1 = k1 + k; + @@ -96,10 +95,9 @@ } } @@ -51,7 +67,12 @@ p_189551_1_.func_74768_a("xCenter", this.field_76201_a); p_189551_1_.func_74768_a("zCenter", this.field_76199_b); p_189551_1_.func_74774_a("scale", this.field_76197_d); -@@ -129,19 +127,11 @@ +@@ -125,23 +123,15 @@ + this.field_76203_h.remove(p_76191_1_.func_70005_c_()); + } + +- for (int i = 0; i < this.field_76196_g.size(); i++) ++ for (int i = 0; i < this.field_76196_g.size(); ++i) { MapData.MapInfo mapdata$mapinfo1 = this.field_76196_g.get(i); @@ -73,7 +94,7 @@ } } else -@@ -155,14 +145,7 @@ +@@ -155,34 +145,20 @@ { EntityItemFrame entityitemframe = p_76191_2_.func_82836_z(); BlockPos blockpos = entityitemframe.func_174857_n(); @@ -89,7 +110,13 @@ } if (p_76191_2_.func_77942_o() && p_76191_2_.func_77978_p().func_150297_b("Decorations", 9)) -@@ -175,14 +158,7 @@ + { + NBTTagList nbttaglist = p_76191_2_.func_77978_p().func_150295_c("Decorations", 10); + +- for (int j = 0; j < nbttaglist.func_74745_c(); j++) ++ for (int j = 0; j < nbttaglist.func_74745_c(); ++j) + { + NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(j); if (!this.field_76203_h.containsKey(nbttagcompound.func_74779_i("id"))) { diff --git a/patches/minecraft/net/minecraft/world/storage/MapDecoration.java.patch b/patches/minecraft/net/minecraft/world/storage/MapDecoration.java.patch index fd11edf50..16026f4a3 100644 --- a/patches/minecraft/net/minecraft/world/storage/MapDecoration.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/MapDecoration.java.patch @@ -8,7 +8,19 @@ public boolean equals(Object p_equals_1_) { if (this == p_equals_1_) -@@ -84,13 +83,24 @@ +@@ -73,20 +72,35 @@ + { + return false; + } ++ else if (this.field_176115_b != mapdecoration.field_176115_b) ++ { ++ return false; ++ } + else + { +- return this.field_176115_b != mapdecoration.field_176115_b ? false : this.field_176116_c == mapdecoration.field_176116_c; ++ return this.field_176116_c == mapdecoration.field_176116_c; + } } } @@ -35,7 +47,7 @@ } public static enum Type -@@ -106,7 +116,7 @@ +@@ -102,7 +116,7 @@ MANSION(true, 5393476), MONUMENT(true, 3830373); @@ -44,7 +56,7 @@ private final boolean field_191176_l; private final int field_191177_m; -@@ -117,6 +127,7 @@ +@@ -113,6 +127,7 @@ private Type(boolean p_i47344_3_, int p_i47344_4_) { diff --git a/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch b/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch index c54b0f2ed..3bb845b3d 100644 --- a/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/SaveFormatOld.java.patch @@ -1,6 +1,6 @@ --- before/net/minecraft/world/storage/SaveFormatOld.java +++ after/net/minecraft/world/storage/SaveFormatOld.java -@@ -36,17 +36,15 @@ +@@ -36,19 +36,17 @@ } @SideOnly(Side.CLIENT) @@ -17,8 +17,11 @@ - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < 5; ++i) +- for (int i = 0; i < 5; i++) ++ for (int i = 0; i < 5; ++i) { + String s = "World" + (i + 1); + WorldInfo worldinfo = this.func_75803_c(s); @@ -63,13 +61,11 @@ } @@ -89,7 +92,8 @@ - field_151479_b.info("Deleting level {}", p_75802_1_); + field_151479_b.info("Deleting level {}", (Object)p_75802_1_); - for (int i = 1; i <= 5; ++i) +- for (int i = 1; i <= 5; i++) ++ for (int i = 1; i <= 5; ++i) { - field_151479_b.info("Attempt {}...", i); + field_151479_b.info("Attempt {}...", (int)i); diff --git a/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch b/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch index 7c9218bbe..7ffadc5f5 100644 --- a/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch @@ -139,6 +139,15 @@ public String[] func_75754_f() { String[] astring = this.field_75771_c.list(); +@@ -247,7 +242,7 @@ + astring = new String[0]; + } + +- for (int i = 0; i < astring.length; i++) ++ for (int i = 0; i < astring.length; ++i) + { + if (astring[i].endsWith(".dat")) + { @@ -258,20 +253,35 @@ return astring; } diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch index f36b553ba..3e1003090 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch @@ -28,7 +28,15 @@ public abstract void func_186363_a(Collection p_186363_1_, Random p_186363_2_, LootContext p_186363_3_); protected abstract void func_186362_a(JsonObject p_186362_1_, JsonSerializationContext p_186362_2_); -@@ -57,6 +61,9 @@ +@@ -50,13 +54,16 @@ + + if (jsonobject.has("conditions")) + { +- alootcondition = JsonUtils.func_188174_a(jsonobject, "conditions", p_deserialize_3_, LootCondition[].class); ++ alootcondition = (LootCondition[])JsonUtils.func_188174_a(jsonobject, "conditions", p_deserialize_3_, LootCondition[].class); + } + else + { alootcondition = new LootCondition[0]; } diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch index 0789c82ba..3c4c5bae8 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java.patch @@ -34,7 +34,7 @@ protected void func_186362_a(JsonObject p_186362_1_, JsonSerializationContext p_186362_2_) { if (this.field_186369_b != null && this.field_186369_b.length > 0) -@@ -79,10 +77,9 @@ +@@ -79,22 +77,21 @@ } } @@ -47,7 +47,13 @@ Item item = JsonUtils.func_188180_i(p_186367_0_, "name"); LootFunction[] alootfunction; -@@ -95,6 +92,6 @@ + if (p_186367_0_.has("functions")) + { +- alootfunction = JsonUtils.func_188174_a(p_186367_0_, "functions", p_186367_1_, LootFunction[].class); ++ alootfunction = (LootFunction[])JsonUtils.func_188174_a(p_186367_0_, "functions", p_186367_1_, LootFunction[].class); + } + else + { alootfunction = new LootFunction[0]; } diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch index cbf8ec56f..2f3382038 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootPool.java.patch @@ -31,7 +31,7 @@ int i = 0; for (LootEntry lootentry : this.field_186453_a) -@@ -72,10 +74,9 @@ +@@ -72,35 +74,85 @@ public void func_186449_b(Collection p_186449_1_, Random p_186449_2_, LootContext p_186449_3_) { @@ -42,9 +42,11 @@ - + MathHelper.func_76141_d(this.field_186456_d.func_186507_b(p_186449_2_) * p_186449_3_.func_186491_f()); + int i = this.field_186455_c.func_186511_a(p_186449_2_) + MathHelper.func_76141_d(this.field_186456_d.func_186507_b(p_186449_2_) * p_186449_3_.func_186491_f()); - for (int j = 0; j < i; ++j) +- for (int j = 0; j < i; j++) ++ for (int j = 0; j < i; ++j) { -@@ -84,25 +85,74 @@ + this.func_186452_a(p_186449_1_, p_186449_2_, p_186449_3_); + } } } @@ -103,16 +105,15 @@ public LootPool deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException { JsonObject jsonobject = JsonUtils.func_151210_l(p_deserialize_1_, "loot pool"); -+ String name = net.minecraftforge.common.ForgeHooks.readPoolName(jsonobject); - LootEntry[] alootentry = (LootEntry[])JsonUtils.func_188174_a(jsonobject, "entries", p_deserialize_3_, LootEntry[].class); -- LootCondition[] alootcondition = (LootCondition[])JsonUtils.func_188177_a( -- jsonobject, "conditions", new LootCondition[0], p_deserialize_3_, LootCondition[].class -- ); +- LootEntry[] alootentry = JsonUtils.func_188174_a(jsonobject, "entries", p_deserialize_3_, LootEntry[].class); +- LootCondition[] alootcondition = JsonUtils.func_188177_a(jsonobject, "conditions", new LootCondition[0], p_deserialize_3_, LootCondition[].class); - RandomValueRange randomvaluerange = JsonUtils.func_188174_a(jsonobject, "rolls", p_deserialize_3_, RandomValueRange.class); - RandomValueRange randomvaluerange1 = JsonUtils.func_188177_a( - jsonobject, "bonus_rolls", new RandomValueRange(0.0F, 0.0F), p_deserialize_3_, RandomValueRange.class - ); - return new LootPool(alootentry, alootcondition, randomvaluerange, randomvaluerange1); ++ String name = net.minecraftforge.common.ForgeHooks.readPoolName(jsonobject); ++ LootEntry[] alootentry = (LootEntry[])JsonUtils.func_188174_a(jsonobject, "entries", p_deserialize_3_, LootEntry[].class); + LootCondition[] alootcondition = (LootCondition[])JsonUtils.func_188177_a(jsonobject, "conditions", new LootCondition[0], p_deserialize_3_, LootCondition[].class); + RandomValueRange randomvaluerange = (RandomValueRange)JsonUtils.func_188174_a(jsonobject, "rolls", p_deserialize_3_, RandomValueRange.class); + RandomValueRange randomvaluerange1 = (RandomValueRange)JsonUtils.func_188177_a(jsonobject, "bonus_rolls", new RandomValueRange(0.0F, 0.0F), p_deserialize_3_, RandomValueRange.class); @@ -127,7 +128,7 @@ jsonobject.add("entries", p_serialize_3_.serialize(p_serialize_1_.field_186453_a)); jsonobject.add("rolls", p_serialize_3_.serialize(p_serialize_1_.field_186455_c)); -@@ -111,7 +161,7 @@ +@@ -109,7 +161,7 @@ jsonobject.add("bonus_rolls", p_serialize_3_.serialize(p_serialize_1_.field_186456_d)); } diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch index 29a9a0dd1..d1d6956bc 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/LootTable.java.patch @@ -51,14 +51,15 @@ while (p_186463_2_ > 0 && !list.isEmpty()) { -@@ -130,19 +130,71 @@ +@@ -130,13 +130,13 @@ private List func_186459_a(IInventory p_186459_1_, Random p_186459_2_) { - List list = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int i = 0; i < p_186459_1_.func_70302_i_(); ++i) +- for (int i = 0; i < p_186459_1_.func_70302_i_(); i++) ++ for (int i = 0; i < p_186459_1_.func_70302_i_(); ++i) { if (p_186459_1_.func_70301_a(i).func_190926_b()) { @@ -67,10 +68,10 @@ } } - Collections.shuffle(list, p_186459_2_); +@@ -144,12 +144,64 @@ return list; } -+ + + //======================== FORGE START ============================================= + private boolean isFrozen = false; + public void freeze() @@ -122,6 +123,14 @@ + this.field_186466_c.add(pool); + } + //======================== FORGE END =============================================== - ++ public static class Serializer implements JsonDeserializer, JsonSerializer { + public LootTable deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException + { + JsonObject jsonobject = JsonUtils.func_151210_l(p_deserialize_1_, "loot table"); +- LootPool[] alootpool = JsonUtils.func_188177_a(jsonobject, "pools", new LootPool[0], p_deserialize_3_, LootPool[].class); ++ LootPool[] alootpool = (LootPool[])JsonUtils.func_188177_a(jsonobject, "pools", new LootPool[0], p_deserialize_3_, LootPool[].class); + return new LootTable(alootpool); + } + diff --git a/patches/minecraft/net/minecraft/world/storage/loot/conditions/LootConditionManager.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/conditions/LootConditionManager.java.patch index 7c1a8544f..ebf650180 100644 --- a/patches/minecraft/net/minecraft/world/storage/loot/conditions/LootConditionManager.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/loot/conditions/LootConditionManager.java.patch @@ -40,7 +40,7 @@ public static LootCondition.Serializer func_186640_a(T p_186640_0_) { -- LootCondition.Serializer serializer = (LootCondition.Serializer) field_186643_b.get(p_186640_0_.getClass()); +- LootCondition.Serializer serializer = (LootCondition.Serializer)field_186643_b.get(p_186640_0_.getClass()); + LootCondition.Serializer serializer = (LootCondition.Serializer)field_186643_b.get(p_186640_0_.getClass()); if (serializer == null) diff --git a/src/main/java/com/cleanroommc/client/IMEHandler.java b/src/main/java/com/cleanroommc/client/IMEHandler.java new file mode 100644 index 000000000..1694fa182 --- /dev/null +++ b/src/main/java/com/cleanroommc/client/IMEHandler.java @@ -0,0 +1,25 @@ +package com.cleanroommc.client; + +import com.cleanroommc.client.ime.*; +import net.minecraftforge.fml.common.FMLLog; +import org.lwjgl.glfw.GLFW; + +import java.util.function.Consumer; + +public class IMEHandler { + private static final Consumer instance; + static { + switch (GLFW.glfwGetPlatform()) { + case GLFW.GLFW_PLATFORM_WIN32 -> instance = new WindowsIMEHandler(); + case GLFW.GLFW_PLATFORM_X11 -> instance = new X11IMEHandler(); + case GLFW.GLFW_PLATFORM_WAYLAND -> instance = new WaylandIMEhandler(); + default -> { + instance = new DummyIMEHandler(); + FMLLog.log.warn("IME handler initialization failed: Unsupported platform {}", GLFW.glfwGetPlatform()); + } + } + } + public static void setIME(boolean active) { + instance.accept(active); + } +} diff --git a/src/main/java/com/cleanroommc/client/ime/DummyIMEHandler.java b/src/main/java/com/cleanroommc/client/ime/DummyIMEHandler.java new file mode 100644 index 000000000..fcefe048e --- /dev/null +++ b/src/main/java/com/cleanroommc/client/ime/DummyIMEHandler.java @@ -0,0 +1,10 @@ +package com.cleanroommc.client.ime; + +import java.util.function.Consumer; + +public class DummyIMEHandler implements Consumer { + @Override + public void accept(Boolean aBoolean) { + + } +} diff --git a/src/main/java/com/cleanroommc/client/ime/WaylandIMEhandler.java b/src/main/java/com/cleanroommc/client/ime/WaylandIMEhandler.java new file mode 100644 index 000000000..c1b1fd193 --- /dev/null +++ b/src/main/java/com/cleanroommc/client/ime/WaylandIMEhandler.java @@ -0,0 +1,14 @@ +package com.cleanroommc.client.ime; + +import org.lwjgl.glfw.GLFW; +import org.lwjgl.opengl.Display; + +import java.util.function.Consumer; + +public class WaylandIMEhandler implements Consumer { + private static final long window = Display.getWindow(); + @Override + public void accept(Boolean active) { + GLFW.glfwSetInputMode(window, GLFW.GLFW_IME, active ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE); + } +} diff --git a/src/main/java/com/cleanroommc/client/ime/WindowsIMEHandler.java b/src/main/java/com/cleanroommc/client/ime/WindowsIMEHandler.java new file mode 100644 index 000000000..bcc232584 --- /dev/null +++ b/src/main/java/com/cleanroommc/client/ime/WindowsIMEHandler.java @@ -0,0 +1,46 @@ +package com.cleanroommc.client.ime; + +import com.sun.jna.Native; +import com.sun.jna.platform.win32.User32; +import com.sun.jna.platform.win32.WinDef; +import com.sun.jna.platform.win32.WinNT; + +import java.util.function.Consumer; + +/** + * Copied from IMBlocker + */ +public class WindowsIMEHandler implements Consumer { + + private static native WinNT.HANDLE ImmGetContext(WinDef.HWND hwnd); + private static native WinNT.HANDLE ImmAssociateContext(WinDef.HWND hwnd, WinNT.HANDLE himc); + private static native boolean ImmReleaseContext(WinDef.HWND hwnd, WinNT.HANDLE himc); + private static native WinNT.HANDLE ImmCreateContext(); + private static native boolean ImmDestroyContext(WinNT.HANDLE himc); + + static { + Native.register("imm32"); + } + + User32 user32 = User32.INSTANCE; + + @Override + public void accept(Boolean active) { + WinDef.HWND hwnd = user32.GetForegroundWindow(); + WinNT.HANDLE himc; + if (active) { + himc = ImmGetContext(hwnd); + if (himc == null) { + himc = ImmCreateContext(); + ImmAssociateContext(hwnd, himc); + } + } else { + himc = ImmAssociateContext(hwnd, null); + if (himc != null) { + ImmDestroyContext(himc); + } + } + ImmReleaseContext(hwnd, himc); + } + +} diff --git a/src/main/java/com/cleanroommc/client/ime/X11IMEHandler.java b/src/main/java/com/cleanroommc/client/ime/X11IMEHandler.java new file mode 100644 index 000000000..dffa14f83 --- /dev/null +++ b/src/main/java/com/cleanroommc/client/ime/X11IMEHandler.java @@ -0,0 +1,14 @@ +package com.cleanroommc.client.ime; + +import org.lwjgl.glfw.GLFW; +import org.lwjgl.opengl.Display; + +import java.util.function.Consumer; + +public class X11IMEHandler implements Consumer { + private static final long window = Display.getWindow(); + @Override + public void accept(Boolean active) { + GLFW.glfwSetInputMode(window, GLFW.GLFW_IME, active ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE); + } +} diff --git a/src/main/java/net/minecraftforge/client/ForgeClientHandler.java b/src/main/java/net/minecraftforge/client/ForgeClientHandler.java index 92deaf19f..83c839092 100644 --- a/src/main/java/net/minecraftforge/client/ForgeClientHandler.java +++ b/src/main/java/net/minecraftforge/client/ForgeClientHandler.java @@ -19,15 +19,26 @@ package net.minecraftforge.client; +import com.cleanroommc.client.IMEHandler; +import net.minecraft.client.gui.GuiChat; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiScreenBook; +import net.minecraft.client.gui.inventory.GuiEditSign; import net.minecraftforge.client.event.ColorHandlerEvent; +import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.ForgeModContainer; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import java.util.Arrays; +import java.util.Set; +import java.util.stream.Collectors; + public class ForgeClientHandler { + private static final Set classList = Arrays.stream(ForgeModContainer.inputMethodGuiWhiteList).collect(Collectors.toSet()); @SubscribeEvent public static void registerModels(ModelRegistryEvent event) { @@ -46,4 +57,30 @@ public static void registerItemHandlers(ColorHandlerEvent.Item event) event.getItemColors().registerItemColorHandler(new FluidContainerColorer(), ForgeModContainer.getInstance().universalBucket); } } + + @SubscribeEvent + public static void didChangeGui(GuiOpenEvent event) { + boolean canInput; + GuiScreen gui = event.getGui(); + if (gui == null) { + // Ignore null GuiScreens + canInput = false; + } else if (gui instanceof GuiChat) { + // Skip, this should be handled by Focus + return; + } else { + // Vanilla GuiScreens + canInput = gui instanceof GuiScreenBook + || gui instanceof GuiEditSign + || guiInWhiteList(gui); + + } + + IMEHandler.setIME(canInput); + } + + private static boolean guiInWhiteList(GuiScreen gui) { + String current = gui.getClass().getName(); + return classList.contains(current); + } } diff --git a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java index b080cf649..c57f8c243 100644 --- a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java +++ b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java @@ -20,8 +20,6 @@ package net.minecraftforge.client; import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.BOSSINFO; -import static net.minecraftforge.common.ForgeVersion.Status.BETA; -import static net.minecraftforge.common.ForgeVersion.Status.BETA_OUTDATED; import java.awt.image.BufferedImage; import java.io.File; @@ -81,7 +79,6 @@ import net.minecraft.client.renderer.vertex.VertexFormatElement.EnumUsage; import net.minecraft.client.resources.FoliageColorReloadListener; import net.minecraft.client.resources.GrassColorReloadListener; -import net.minecraft.client.resources.I18n; import net.minecraft.client.resources.IResourceManagerReloadListener; import net.minecraft.client.resources.LanguageManager; import net.minecraft.client.settings.GameSettings; @@ -103,7 +100,6 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.registry.IRegistry; -import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; @@ -130,8 +126,6 @@ import net.minecraftforge.client.resource.VanillaResourceType; import net.minecraftforge.client.model.pipeline.QuadGatheringTransformer; import net.minecraftforge.common.ForgeModContainer; -import net.minecraftforge.common.ForgeVersion; -import net.minecraftforge.common.ForgeVersion.Status; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.model.IModelPart; import net.minecraftforge.common.model.ITransformation; diff --git a/src/main/java/net/minecraftforge/client/IRenderHandler.java b/src/main/java/net/minecraftforge/client/IRenderHandler.java index 8227b8c57..758857303 100644 --- a/src/main/java/net/minecraftforge/client/IRenderHandler.java +++ b/src/main/java/net/minecraftforge/client/IRenderHandler.java @@ -24,8 +24,19 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; +/** + * Take over the rendering of world effects. For the vanilla, they are Cloud, Sky and Weather. + *

+ * Call
{@link net.minecraft.world.WorldProvider#setCloudRenderer(IRenderHandler)}
{@link net.minecraft.world.WorldProvider#setSkyRenderer(IRenderHandler)}
{@link net.minecraft.world.WorldProvider#setWeatherRenderer(IRenderHandler)} + * to enable them. + */ public abstract class IRenderHandler { + /** + * @param partialTicks Fractional part of a tick + * @param world the world being rendered + * @param mc Current mc instance + */ @SideOnly(Side.CLIENT) public abstract void render(float partialTicks, WorldClient world, Minecraft mc); } diff --git a/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java b/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java index f68648c10..e008367cd 100644 --- a/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java +++ b/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java @@ -24,6 +24,22 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; +/** + * ClientChatReceivedEvent is fired whenever the client received a chat message.
+ * This event is fired via {@link net.minecraftforge.event.ForgeEventFactory#onClientChat(ChatType, ITextComponent)}, + * which is executed by {@link net.minecraft.client.network.NetHandlerPlayClient#handleChat(net.minecraft.network.play.server.SPacketChat)}
+ *
+ * {@link #message} contains the message that will be displayed. This can be changed by mods.
+ *
+ * {@link #type} is the type of the message. This field is read only.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the chat message will be ignored and not displayed.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class ClientChatReceivedEvent extends Event { diff --git a/src/main/java/net/minecraftforge/client/event/RenderLivingEvent.java b/src/main/java/net/minecraftforge/client/event/RenderLivingEvent.java index c863ec3fd..f3ea4ade2 100644 --- a/src/main/java/net/minecraftforge/client/event/RenderLivingEvent.java +++ b/src/main/java/net/minecraftforge/client/event/RenderLivingEvent.java @@ -24,6 +24,14 @@ import net.minecraft.client.renderer.entity.RenderLivingBase; import net.minecraft.entity.EntityLivingBase; +/** + * RenderLivingEvent is fired whenever the client is about to render a living.
+ * If a method utilizes this {@link Event} as its parameter, the method will receive every child event of this class. + *
+ * All children of this event are fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}.
+ * + * @param the type of the living. + **/ public abstract class RenderLivingEvent extends Event { private final EntityLivingBase entity; @@ -70,6 +78,12 @@ public static class Post extends RenderLivingEvent renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); } } + /** + * Specials is fired when the living draws the name
+ * This event is fired via {@link RenderLivingBase#renderName(EntityLivingBase, double, double, double)}, + *
+ * This event is fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}. + **/ public abstract static class Specials extends RenderLivingEvent { public Specials(EntityLivingBase entity, RenderLivingBase renderer, double x, double y, double z){ super(entity, renderer, 0, x, y, z); } diff --git a/src/main/java/net/minecraftforge/client/event/RenderPlayerEvent.java b/src/main/java/net/minecraftforge/client/event/RenderPlayerEvent.java index 23cfa7ce7..9b17a40d1 100644 --- a/src/main/java/net/minecraftforge/client/event/RenderPlayerEvent.java +++ b/src/main/java/net/minecraftforge/client/event/RenderPlayerEvent.java @@ -27,6 +27,12 @@ import javax.annotation.Nonnull; +/** + * RenderLivingEvent is fired whenever the client is about to render a player.
+ * When the rendered target is not the local user, {@link RenderLivingEvent} will be fired if {@link Pre} is not cancelled. + *
+ * All children of this event are fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}.
+ **/ public abstract class RenderPlayerEvent extends PlayerEvent { private final RenderPlayer renderer; diff --git a/src/main/java/net/minecraftforge/client/event/sound/SoundEvent.java b/src/main/java/net/minecraftforge/client/event/sound/SoundEvent.java index c29660ab5..85c44cbac 100644 --- a/src/main/java/net/minecraftforge/client/event/sound/SoundEvent.java +++ b/src/main/java/net/minecraftforge/client/event/sound/SoundEvent.java @@ -23,6 +23,11 @@ import net.minecraft.client.audio.ISound; import net.minecraft.client.audio.SoundManager; +/** + * SoundEvent is fired when an event involving any Sound occurs.
+ *
+ * All children of this event are fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}.
+ **/ public class SoundEvent extends Event { private final SoundManager manager; @@ -36,6 +41,9 @@ public SoundManager getManager() return manager; } + /** + * When a new sound source is passed to the SoundSystem + */ public static class SoundSourceEvent extends SoundEvent { private final ISound sound; diff --git a/src/main/java/net/minecraftforge/client/model/ModelLoader.java b/src/main/java/net/minecraftforge/client/model/ModelLoader.java index aaa4975c1..b8cee813e 100644 --- a/src/main/java/net/minecraftforge/client/model/ModelLoader.java +++ b/src/main/java/net/minecraftforge/client/model/ModelLoader.java @@ -108,6 +108,7 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import com.google.common.collect.Sets; +import org.lwjgl.util.vector.Vector3f; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -466,7 +467,7 @@ private IBakedModel bakeNormal(ModelBlock model, IModelState perState, final IMo { transformation = transformation.compose(newTransforms.get(i)); BlockPartRotation rot = part.partRotation; - if(rot == null) rot = new BlockPartRotation(new org.lwjgl.util.vector.Vector3f(), EnumFacing.Axis.Y, 0, false); + if(rot == null) rot = new BlockPartRotation(new Vector3f(), EnumFacing.Axis.Y, 0, false); part = new BlockPart(part.positionFrom, part.positionTo, part.mapFaces, rot, part.shade); } for(Map.Entry e : part.mapFaces.entrySet()) diff --git a/src/main/java/net/minecraftforge/common/BiomeDictionary.java b/src/main/java/net/minecraftforge/common/BiomeDictionary.java index 1bff606fc..344e31e35 100644 --- a/src/main/java/net/minecraftforge/common/BiomeDictionary.java +++ b/src/main/java/net/minecraftforge/common/BiomeDictionary.java @@ -35,6 +35,11 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +/** +* BiomeDictionary provides tags for Biomes to use +* If tags are not specified, you imply an "average" biome +* (Think Oak forest, moderate temperature, temperate trees, and moderate humidity) +*/ public class BiomeDictionary { private static final boolean DEBUG = false; @@ -49,18 +54,21 @@ public static final class Type public static final Type HOT = new Type("HOT"); public static final Type COLD = new Type("COLD"); - /*Tags specifying the amount of vegetation a biome has. Specifying neither implies a biome to have moderate amounts*/ + /**Tag specifying a sparse amount of vegetation*/ public static final Type SPARSE = new Type("SPARSE"); + /**Tag specifying a dense amount of vegetation*/ public static final Type DENSE = new Type("DENSE"); - /*Tags specifying how moist a biome is. Specifying neither implies the biome as having moderate humidity*/ + /**Tag specifying how moist a biome is*/ public static final Type WET = new Type("WET"); + /**Tag specifying how moist a biome is*/ public static final Type DRY = new Type("DRY"); - /*Tree-based tags, SAVANNA refers to dry, desert-like trees (Such as Acacia), CONIFEROUS refers to snowy trees (Such as Spruce) and JUNGLE refers to jungle trees. - * Specifying no tag implies a biome has temperate trees (Such as Oak)*/ + /**Tree-based tag: refers to dry, desert-like trees (Such as Acacia)*/ public static final Type SAVANNA = new Type("SAVANNA"); + /**Tree-based tag: refers to snowy trees (Such as Spruce)*/ public static final Type CONIFEROUS = new Type("CONIFEROUS"); + /**Tree-based tag: refers to jungle trees*/ public static final Type JUNGLE = new Type("JUNGLE"); /*Tags specifying the nature of a biome*/ @@ -125,14 +133,14 @@ public String toString() } /** - * Retrieves a Type instance by name, - * if one does not exist already it creates one. + * Retrieves a Type instance by name. + * If one does not exist already, it creates one. * This can be used as intermediate measure for modders to * add their own Biome types. *

* There are no naming conventions besides: *

  • Must be all upper case (enforced by name.toUpper())
  • - *
  • No Special characters. {Unenforced, just don't be a pain, if it becomes a issue I WILL + *
  • No Special characters. {Unenforced, just don't be a pain, if it becomes an issue I WILL * make this RTE with no worry about backwards compatibility}
*

* Note: For performance sake, the return value of this function SHOULD be cached. diff --git a/src/main/java/net/minecraftforge/common/DungeonHooks.java b/src/main/java/net/minecraftforge/common/DungeonHooks.java index 2fb280e44..aad428432 100644 --- a/src/main/java/net/minecraftforge/common/DungeonHooks.java +++ b/src/main/java/net/minecraftforge/common/DungeonHooks.java @@ -25,6 +25,13 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.util.WeightedRandom; + +/** +* DungeonHooks allows you to add or remove mobs +* to the spawners that generate in dungeons +* +* @author LexManos, cpw +*/ public class DungeonHooks { private static ArrayList dungeonMobs = new ArrayList(); @@ -34,7 +41,7 @@ public class DungeonHooks * If the mob is already in the spawn list, the rarity will be added to the existing one, * causing the mob to be more common. * - * @param name The name of the monster, use the same name used when registering the entity. + * @param name The name of the monster. This is the same name used when registering the entity. * @param rarity The rarity of selecting this mob over others. Must be greater then 0. * Vanilla Minecraft has the following mobs: * Spider 100 @@ -83,8 +90,9 @@ public static int removeDungeonMob(ResourceLocation name) /** * Gets a random mob name from the list. - * @param rand World generation random number generator - * @return The mob name + * + * @param rand The World generation random number + * @return The mobs name */ public static ResourceLocation getRandomDungeonMob(Random rand) { diff --git a/src/main/java/net/minecraftforge/common/ForgeEarlyConfig.java b/src/main/java/net/minecraftforge/common/ForgeEarlyConfig.java index f56ce60c2..11d682048 100644 --- a/src/main/java/net/minecraftforge/common/ForgeEarlyConfig.java +++ b/src/main/java/net/minecraftforge/common/ForgeEarlyConfig.java @@ -4,21 +4,86 @@ @Config(modid = ForgeVersion.MOD_ID, name = ForgeVersion.MOD_ID + "_early") public class ForgeEarlyConfig { + public static boolean RAW_INPUT = true; + + //TODO : make CATEGORY? + //TODO : make the config display name lowcase? + public static boolean WINDOW_START_MAXIMIZED = false; public static boolean WINDOW_START_FOCUSED = true; public static boolean WINDOW_START_ICONIFIED = false; + + @Config.Comment("Enable this when the game has problem running on Wayland") + public static boolean FORCE_X11 = false; + + public static boolean WINDOW_CENTERED = true; + + @Config.Comment("Should the window have decorations (titlebar, border, close button)") public static boolean WINDOW_DECORATED = true; + + @Config.Comment("Should exclusive fullscreen mode replaced with borderless fullscreen mode") + public static boolean WINDOW_BORDERLESS_REPLACES_FULLSCREEN = false; + + @Config.Comment("Windows-only - should borderless window have height increased by 1 to solve flickering on un-focusing") + public static boolean WINDOW_BORDERLESS_WINDOWS_COMPATIBILITY = true; + + @Config.Comment("Enable KHR_debug in the OpenGL context for advanced debugging capabilities") public static boolean OPENGL_DEBUG_CONTEXT = false; + + @Config.Comment("Make the framebuffer use the sRGB color space") public static boolean OPENGL_SRGB_CONTEXT = false; + + @Config.Comment("Make the framebuffer double-buffered (will cause visual artifacts if disabled)") public static boolean OPENGL_DOUBLEBUFFER = true; + + @Config.Comment("Enable GL_KHR_no_error to use faster driver code, but which can cause memory corruption in case of OpenGL errors") public static boolean OPENGL_CONTEXT_NO_ERROR = false; + + public static boolean DECORATED = true; + public static boolean INPUT_INVERT_WHEEL = false; + public static double INPUT_SCROLL_SPEED = 1.0; + + @Config.Comment("Allow text character input when Ctrl+Left Alt are pressed (disables special escape code handling for this combination of keys)") + public static boolean INPUT_CTRL_ALT_TEXT = false; + + @Config.Comment("Allows AltGr use in Ctrl+key special key combinations (disables text character input handling when AltGr is pressed)") + public static boolean INPUT_ALTGR_ESCAPE_CODES = false; + + @Config.Comment("Linux-only - change the X11 class name, which is used by your window manager to identify the running application") public static String X11_CLASS_NAME = "minecraft"; + + @Config.Comment("OSX-only - identifier used to save and restore the window position and size") public static String COCOA_FRAME_NAME = "minecraft"; + public static String CONFIG_ANY_TIME_VERSION = "3.0"; + public static String MIXIN_BOOTER_VERSION = "10.5"; + + @Config.Comment(""" + Mods in this list have one or more of the problems list below: + - Integrated into Cleanroom so shouldn't load it from mods + - Too invasive or hacky that it is unpatchable + - Have a better replacement that compats e.g. JEID vs REID + """) + public static String[] LOADING_PLUGIN_BLACKLIST = new String[] { + "com.cleanroommc.configanytime.ConfigAnytimePlugin", + "zone.rong.mixinbooter.MixinBooterPlugin", + "ilib.asm.Loader", + "org.dimdev.jeid.JEIDLoadingPlugin", + "lain.mods.skins.init.forge.asm.Plugin", + "advancedshader.core.Core", + "net.shadowfacts.forgelin.preloader.ForgelinPlugin", + }; + + public static CategoryOpenAlContext OPENAL_CONTEXT = new CategoryOpenAlContext(); + public static class CategoryOpenAlContext{ + @Config.Comment("Enable HRTF sound support") + public boolean ENABLE_HRTF = false; + } + public static String[] DISABLED_MOD_FOLDER = new String[]{ "disabled", "optional" }; diff --git a/src/main/java/net/minecraftforge/common/ForgeHooks.java b/src/main/java/net/minecraftforge/common/ForgeHooks.java index 6a4278d08..3aaf57048 100644 --- a/src/main/java/net/minecraftforge/common/ForgeHooks.java +++ b/src/main/java/net/minecraftforge/common/ForgeHooks.java @@ -42,6 +42,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import net.minecraft.advancements.Advancement; import net.minecraft.advancements.AdvancementManager; import net.minecraft.block.Block; @@ -51,6 +52,7 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.crash.CrashReport; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -165,6 +167,9 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; +import org.spongepowered.asm.mixin.extensibility.IMixinInfo; +import org.spongepowered.asm.mixin.transformer.ClassInfo; +import org.spongepowered.asm.mixin.transformer.MixinInfo; public class ForgeHooks { @@ -1518,4 +1523,48 @@ public static int getSerializerId(DataSerializer serializer, IntIdentityHashB } return id; } + + public static String gatherMixinInfo(Throwable throwable){ + StackTraceElement[] stacktrace = throwable.getStackTrace(); + if (stacktrace.length > 0) { + try { + StringBuilder mixinMetadataBuilder = null; + ObjectOpenHashSet classes = new ObjectOpenHashSet<>(); + for (StackTraceElement stackTraceElement : stacktrace) { + classes.add(stackTraceElement.getClassName()); + } + for (String className : classes) { + ClassInfo classInfo = ClassInfo.fromCache(className); + if (classInfo != null) { + java.util.Set mixinInfos = classInfo.getMixins(); + if (!mixinInfos.isEmpty()) { + if (mixinMetadataBuilder == null) { + mixinMetadataBuilder = new StringBuilder("\n(MixinBooter) Mixins in Stacktrace:"); + } + mixinMetadataBuilder.append("\n\t"); + mixinMetadataBuilder.append(className); + mixinMetadataBuilder.append(":"); + for (IMixinInfo mixinInfo : mixinInfos) { + mixinMetadataBuilder.append("\n\t\t"); + mixinMetadataBuilder.append(mixinInfo.getClassName()); + mixinMetadataBuilder.append(" ("); + mixinMetadataBuilder.append(mixinInfo.getConfig().getName()); + mixinMetadataBuilder.append(")"); + } + } + } + } + + if (mixinMetadataBuilder == null) { + return "No Mixin Metadata is found in the Stacktrace.\n"; + } else { + return mixinMetadataBuilder.toString(); + } + } catch (Throwable t) { + return "Failed to find Mixin Metadata in Stacktrace:\n" + t; + } + } + + return ""; + } } diff --git a/src/main/java/net/minecraftforge/common/ForgeModContainer.java b/src/main/java/net/minecraftforge/common/ForgeModContainer.java index 150eabf4a..1d5f218d9 100644 --- a/src/main/java/net/minecraftforge/common/ForgeModContainer.java +++ b/src/main/java/net/minecraftforge/common/ForgeModContainer.java @@ -114,6 +114,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC public static boolean disableVersionCheck = false; public static boolean forgeLightPipelineEnabled = true; public static boolean selectiveResourceReloadEnabled = false; + public static String[] inputMethodGuiWhiteList = new String[] {""}; @Deprecated // TODO remove in 1.13 public static boolean replaceVanillaBucketModel = true; public static boolean zoomInMissingModelTextInGui = false; @@ -370,6 +371,12 @@ private static void syncConfig(boolean load) prop.setLanguageKey("forge.configgui.selectiveResourceReloadEnabled"); propOrder.add(prop.getName()); + prop = config.get(Configuration.CATEGORY_CLIENT, "inputMethodGuiWhiteList", new String[]{}, + "A list of modded gui classes considered as input method suitable."); + inputMethodGuiWhiteList = prop.getStringList(); + prop.setLanguageKey("forge.configgui.inputMethodGuiWhiteList"); + propOrder.add(prop.getName()); + var categoryHudId = CATEGORY_CLIENT + Configuration.CATEGORY_SPLITTER + "hud"; var categoryHud = config.getCategory(categoryHudId); categoryHud.setComment("Controls rendering of various HUD elements"); diff --git a/src/main/java/net/minecraftforge/common/config/ConfigManager.java b/src/main/java/net/minecraftforge/common/config/ConfigManager.java index e5170ad0b..279a4d7c8 100644 --- a/src/main/java/net/minecraftforge/common/config/ConfigManager.java +++ b/src/main/java/net/minecraftforge/common/config/ConfigManager.java @@ -395,7 +395,7 @@ public static void register(Class configClass) { modConfigClasses.add(configClass); File configDir = new File(Launch.minecraftHome, "config"); String name = config.name(); - File configFile = new File(configDir, Strings.isNullOrEmpty(name) ? config.modid() : name + ".cfg"); + File configFile = new File(configDir, (Strings.isNullOrEmpty(name) ? config.modid() : name) + ".cfg"); Configuration cfg = CONFIGS.get(configFile.getAbsolutePath()); if (cfg == null) { cfg = new Configuration(configFile); diff --git a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java index ea0bc120f..f948621de 100644 --- a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java +++ b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java @@ -119,6 +119,7 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.FormattedMessage; import org.lwjgl.LWJGLUtil; +import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.Display; @@ -266,6 +267,8 @@ public void beginMinecraftLoading(Minecraft minecraft, List resou } } + Keyboard.populateKeyLookupTables(); + @SuppressWarnings("unchecked") Map> sharedModList = (Map>) Launch.blackboard.get("modList"); if (sharedModList == null) diff --git a/src/main/java/net/minecraftforge/fml/client/GuiDupesFound.java b/src/main/java/net/minecraftforge/fml/client/GuiDupesFound.java index 5fc16ea28..cbfd064c7 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiDupesFound.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiDupesFound.java @@ -19,6 +19,7 @@ package net.minecraftforge.fml.client; +import net.minecraft.client.resources.I18n; import net.minecraftforge.fml.common.DuplicateModsFoundException; import net.minecraftforge.fml.common.ModContainer; @@ -40,9 +41,9 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); int offset = Math.max(85 - dupes.dupes.size() * 10, 10); - this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.load.problem.found"), this.width / 2, offset, 0xFFFFFF); offset+=10; - this.drawCenteredString(this.fontRenderer, "You have mod sources that are duplicate within your system", this.width / 2, offset, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, "You have duplicate mods installed. Please remove duplicates to avoid conflicts.", this.width / 2, offset, 0xFFFFFF); offset+=10; this.drawCenteredString(this.fontRenderer, "Mod Id : File name", this.width / 2, offset, 0xFFFFFF); offset+=5; diff --git a/src/main/java/net/minecraftforge/fml/client/GuiSortingProblem.java b/src/main/java/net/minecraftforge/fml/client/GuiSortingProblem.java index e4c6ba539..c6493268a 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiSortingProblem.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiSortingProblem.java @@ -20,6 +20,7 @@ package net.minecraftforge.fml.client; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; import net.minecraftforge.fml.common.ModContainer; import net.minecraftforge.fml.common.toposort.ModSortingException; import net.minecraftforge.fml.common.toposort.ModSortingException.SortingExceptionData; @@ -43,7 +44,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); int offset = Math.max(85 - (failedList.getVisitedNodes().size() + 3) * 10, 10); - this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF); + this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.load.problem.found"), this.width / 2, offset, 0xFFFFFF); offset+=10; this.drawCenteredString(this.fontRenderer, "A mod sorting cycle was detected and loading cannot continue", this.width / 2, offset, 0xFFFFFF); offset+=10; diff --git a/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java b/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java index cec9e7bcc..dc98963c5 100644 --- a/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java +++ b/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java @@ -122,16 +122,27 @@ public class FMLCommonHandler private FMLCommonHandler() { + registerCrashCallable(new ICrashCallable() { + @Override + public String call() { + return com.cleanroommc.common.CleanroomVersion.BUILD_VERSION; + } + + @Override + public String getLabel() { + return "Cleanroom Version"; + } + }); + registerCrashCallable(new ICrashCallable() { @Override - public String call() throws Exception - { + public String call() { StringBuilder builder = new StringBuilder(); Joiner joiner = Joiner.on("\n "); for(String coreMod : CoreModManager.getTransformers().keySet()) { - builder.append("\n" + coreMod + "\n ").append(joiner.join(CoreModManager.getTransformers().get(coreMod))); + builder.append("\n").append(coreMod).append("\n ").append(joiner.join(CoreModManager.getTransformers().get(coreMod))); } return builder.toString(); } @@ -146,7 +157,7 @@ public String getLabel() /** * The FML event bus. Subscribe here for FML related events * - * @Deprecated Use {@link MinecraftForge#EVENT_BUS} they're the same thing now + * @deprecated Use {@link MinecraftForge#EVENT_BUS} they're the same thing now * @return the event bus */ @Deprecated diff --git a/src/main/java/net/minecraftforge/fml/common/FMLContextQuery.java b/src/main/java/net/minecraftforge/fml/common/FMLContextQuery.java index 23c4f428e..30754cd8b 100644 --- a/src/main/java/net/minecraftforge/fml/common/FMLContextQuery.java +++ b/src/main/java/net/minecraftforge/fml/common/FMLContextQuery.java @@ -29,7 +29,7 @@ private FMLContextQuery() { modApiManager$dataTable.setAccessible(true); asmDataTable = (ASMDataTable) modApiManager$dataTable.get(ModAPIManager.INSTANCE); } catch (ReflectiveOperationException e) { - MixinBooterPlugin.LOGGER.fatal("Not able to reflect ModAPIManager#dataTable", e); + FMLLog.log.fatal("Not able to reflect ModAPIManager#dataTable", e); } this.asmDataTable = asmDataTable; } diff --git a/src/main/java/net/minecraftforge/fml/common/LoadController.java b/src/main/java/net/minecraftforge/fml/common/LoadController.java index 0e995baa4..f77f8f594 100644 --- a/src/main/java/net/minecraftforge/fml/common/LoadController.java +++ b/src/main/java/net/minecraftforge/fml/common/LoadController.java @@ -36,15 +36,18 @@ import net.minecraftforge.fml.common.versioning.ArtifactVersion; import net.minecraftforge.fml.relauncher.MixinBooterPlugin; import net.minecraftforge.fml.relauncher.libraries.LibraryManager; -import net.minecraftforge.fml.relauncher.mixinfix.MixinFixer; import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.message.FormattedMessage; + import org.spongepowered.asm.mixin.MixinEnvironment; import org.spongepowered.asm.mixin.Mixins; +import org.spongepowered.asm.mixin.ModUtil; +import org.spongepowered.asm.mixin.transformer.Config; import org.spongepowered.asm.mixin.transformer.Proxy; import org.spongepowered.asm.service.MixinService; import org.spongepowered.asm.service.mojang.MixinServiceLaunchWrapper; import org.spongepowered.asm.util.Constants; +import zone.rong.mixinbooter.Context; import zone.rong.mixinbooter.ILateMixinLoader; import javax.annotation.Nullable; @@ -52,8 +55,8 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.net.URL; import java.util.*; +import java.util.function.Supplier; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.stream.Collectors; @@ -166,44 +169,55 @@ public void distributeStateMessage(LoaderState state, Object... eventData) } FMLContextQuery.init(); // Initialize FMLContextQuery and add it to the global list - boolean log = false; - - MixinBooterPlugin.LOGGER.info("Instantiating all ILateMixinLoader implemented classes..."); + // Load late mixins + FMLLog.log.info("Instantiating all ILateMixinLoader implemented classes..."); for (ASMDataTable.ASMData asmData : asmDataTable.getAll(ILateMixinLoader.class.getName().replace('.', '/'))) { - if (!log) { - MixinBooterPlugin.LOGGER.info("Instantiating all ILateMixinLoader implemented classes..."); - log = true; - } - modClassLoader.addFile(asmData.getCandidate().getModContainer()); // Add to path before `newInstance` - Class clazz = Class.forName(asmData.getClassName().replace('/', '.')); - MixinBooterPlugin.LOGGER.info("Instantiating {} for its mixins.", clazz); - ILateMixinLoader loader = (ILateMixinLoader) clazz.newInstance(); - for (String mixinConfig : loader.getMixinConfigs()) { - if (loader.shouldMixinConfigQueue(mixinConfig)) { - MixinBooterPlugin.LOGGER.info("Adding {} mixin configuration.", mixinConfig); - Mixins.addConfiguration(mixinConfig); - loader.onMixinConfigQueued(mixinConfig); + try { + modClassLoader.addFile(asmData.getCandidate().getModContainer()); // Add to path before `newInstance` + Class clazz = Class.forName(asmData.getClassName().replace('/', '.')); + FMLLog.log.info("Instantiating {} for its mixins.", clazz); + @SuppressWarnings("deprecation") + ILateMixinLoader loader = (ILateMixinLoader) clazz.getConstructor().newInstance(); + for (String mixinConfig : loader.getMixinConfigs()) { + @SuppressWarnings("deprecation") + Context context = new Context(mixinConfig); + if (loader.shouldMixinConfigQueue(context)) { + try { + FMLLog.log.info("Adding {} mixin configuration.", mixinConfig); + Mixins.addConfiguration(mixinConfig); + loader.onMixinConfigQueued(context); + } catch (Throwable t) { + FMLLog.log.error("Error adding mixin configuration for {}", mixinConfig, t); + } + } } + } catch (ClassNotFoundException | ClassCastException | InstantiationException | IllegalAccessException e) { + FMLLog.log.error("Unable to load the ILateMixinLoader", e); } } - log = false; - - // Append all non-conventional mixin configurations gathered via MixinFixer - for (String mixinConfig : MixinFixer.retrieveLateMixinConfigs()) { - if (!log) { - MixinBooterPlugin.LOGGER.info("Appending non-conventional mixin configurations..."); - log = true; + // mark config owners : for earlys, lates, and mfAttributes. + for (Config config : Mixins.getConfigs()) { + if (!config.getConfig().hasDecoration(ModUtil.OWNER_DECORATOR)) { + String pkg = config.getConfig().getMixinPackage(); + pkg = pkg.charAt(pkg.length() - 1) == '.' ? pkg.substring(0, pkg.length() - 1) : pkg; + List owners = getPackageOwners(pkg); + if (owners.isEmpty()) { + config.getConfig().decorate(ModUtil.OWNER_DECORATOR, (Supplier) () -> ModUtil.UNKNOWN_OWNER); + } else { + final String owner = owners.get(0).getModId(); // better assign ? + config.getConfig().decorate(ModUtil.OWNER_DECORATOR, (Supplier) () -> owner); + } } - MixinBooterPlugin.LOGGER.info("Adding {} mixin configuration.", mixinConfig); - Mixins.addConfiguration(mixinConfig); } for (ModContainer container : this.loader.getActiveModList()) { modClassLoader.addFile(container.getSource()); } - } catch (Throwable ignored) {} + } catch (Throwable t) { + FMLLog.log.error("Error loading Mods", t); + } if (MixinService.getService() instanceof MixinServiceLaunchWrapper) { ((MixinServiceLaunchWrapper) MixinService.getService()).setDelegatedTransformers(null); } @@ -435,8 +449,7 @@ private ModContainer findActiveContainerFromStack() return StackWalker.getInstance() .walk(frames -> frames.map(StackWalker.StackFrame::getClassName) .filter(name -> name.lastIndexOf('.') != -1) - .map(name -> name.substring(0, name.lastIndexOf('.'))) - .map(pkg -> packageOwners.get(pkg)) + .map(name -> packageOwners.get(name.substring(0, name.lastIndexOf('.')))) .filter(l -> !l.isEmpty()) .findFirst() .map(List::getFirst) @@ -444,6 +457,12 @@ private ModContainer findActiveContainerFromStack() ); } + @Nullable + public List getPackageOwners(String pkg) + { + return packageOwners.get(pkg); + } + LoaderState getState() { return state; diff --git a/src/main/java/net/minecraftforge/fml/common/Loader.java b/src/main/java/net/minecraftforge/fml/common/Loader.java index 9e603a3c5..b907a27b8 100644 --- a/src/main/java/net/minecraftforge/fml/common/Loader.java +++ b/src/main/java/net/minecraftforge/fml/common/Loader.java @@ -582,7 +582,7 @@ public void loadMods(List injectedModContainers) { if (nonMod.isFile()) { - FMLLog.log.info("FML has found a non-mod file {} in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName()); + FMLLog.log.info("FML has found a non-mod file {} in your mods directory. It will now be injected into your classpath.", nonMod.getName()); try { modClassLoader.addFile(nonMod); diff --git a/src/main/java/net/minecraftforge/fml/common/MixinContainer.java b/src/main/java/net/minecraftforge/fml/common/MixinContainer.java index c940ed5d3..764924a1a 100644 --- a/src/main/java/net/minecraftforge/fml/common/MixinContainer.java +++ b/src/main/java/net/minecraftforge/fml/common/MixinContainer.java @@ -1,6 +1,7 @@ package net.minecraftforge.fml.common; import com.google.common.eventbus.EventBus; +import net.minecraftforge.common.ForgeEarlyConfig; import net.minecraftforge.fml.common.asm.FMLSanityChecker; import java.io.File; @@ -12,19 +13,17 @@ public MixinContainer() { meta.modId = "mixinbooter"; meta.name = "MixinBooter"; meta.description = "A Mixin library and loader."; - meta.version = "10.0"; + meta.version = ForgeEarlyConfig.MIXIN_BOOTER_VERSION; meta.authorList.add("Rongmario"); } @Override public boolean registerBus(EventBus bus, LoadController controller) { - bus.register(this); return true; } @Override - public File getSource() - { + public File getSource() { return FMLSanityChecker.fmlLocation; } } diff --git a/src/main/java/net/minecraftforge/fml/common/ModClassLoader.java b/src/main/java/net/minecraftforge/fml/common/ModClassLoader.java index 7e3e347ad..d7240878e 100644 --- a/src/main/java/net/minecraftforge/fml/common/ModClassLoader.java +++ b/src/main/java/net/minecraftforge/fml/common/ModClassLoader.java @@ -166,7 +166,7 @@ public void clearNegativeCacheFor(Set classList) public ModAPITransformer addModAPITransformer(ASMDataTable dataTable) { ModAPITransformer modAPI = new ModAPITransformer(); - TransformerDelegate.registerTransformerByInstance(modAPI); + TransformerDelegate.registerTransformer(modAPI); modAPI.initTable(dataTable); return modAPI; } diff --git a/src/main/java/net/minecraftforge/fml/common/ProgressManager.java b/src/main/java/net/minecraftforge/fml/common/ProgressManager.java index e500222fa..7665db96e 100644 --- a/src/main/java/net/minecraftforge/fml/common/ProgressManager.java +++ b/src/main/java/net/minecraftforge/fml/common/ProgressManager.java @@ -26,20 +26,24 @@ import com.google.common.base.Joiner; /** - * Not a fully fleshed out API, may change in future MC versions. - * However feel free to use and suggest additions. + * ProgressManager allows you to create loading bars + * that appear durning Mod Loading */ public class ProgressManager { private static final List bars = new CopyOnWriteArrayList(); + /** - * Not a fully fleshed out API, may change in future MC versions. - * However feel free to use and suggest additions. + * Create a progress bar with a title and number of steps + * + * @param title The title of the bar + * @param steps The ammout of steps */ public static ProgressBar push(String title, int steps) { return push(title, steps, false); } + /** * Not a fully fleshed out API, may change in future MC versions. * However feel free to use and suggest additions. @@ -118,6 +122,11 @@ public void step(Class classToName, String... extra) step(ClassNameUtils.shortName(classToName)+Joiner.on(' ').join(extra)); } + /** + * Move to the next step in a bar. + * + * @param message The message to display inside a the bar + */ public void step(String message) { if(step >= steps) throw new IllegalStateException("too much steps for ProgressBar " + title); @@ -157,4 +166,4 @@ public void timeEachStep() this.timeEachStep = true; } } -} \ No newline at end of file +} diff --git a/src/main/java/net/minecraftforge/fml/common/asm/transformers/EventSubscriptionTransformer.java b/src/main/java/net/minecraftforge/fml/common/asm/transformers/EventSubscriptionTransformer.java index 5e342214a..41b777c6c 100644 --- a/src/main/java/net/minecraftforge/fml/common/asm/transformers/EventSubscriptionTransformer.java +++ b/src/main/java/net/minecraftforge/fml/common/asm/transformers/EventSubscriptionTransformer.java @@ -64,6 +64,7 @@ public class EventSubscriptionTransformer implements IClassTransformer { public EventSubscriptionTransformer() { + new Event(); // make sure the base event class loaded and initialized. } @Override diff --git a/src/main/java/net/minecraftforge/fml/common/asm/transformers/JavaxTransformer.java b/src/main/java/net/minecraftforge/fml/common/asm/transformers/JavaxTransformer.java deleted file mode 100644 index d7679ca7d..000000000 --- a/src/main/java/net/minecraftforge/fml/common/asm/transformers/JavaxTransformer.java +++ /dev/null @@ -1,67 +0,0 @@ -package net.minecraftforge.fml.common.asm.transformers; - -import net.minecraft.launchwrapper.IClassTransformer; -import net.minecraftforge.fml.common.FMLLog; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.commons.ClassRemapper; -import org.objectweb.asm.commons.Remapper; - -import java.util.Set; -import java.util.TreeSet; -import java.util.jar.Attributes; -import java.util.jar.Manifest; - -public class JavaxTransformer implements IClassTransformer { - public static JavaxTransformer instance = null; - public static final Attributes.Name MANIFEST_SAFE_ATTRIBUTE = new Attributes.Name("Cleanroom-Compat"); - public static Set javaxlist = new TreeSet<>(); - public JavaxTransformer () { - instance = this; - } - - @Override - public byte[] transform(String s, String s1, byte[] bytes) { - if (this != instance) { - return bytes; - } - if (bytes == null) { - return null; - } - ClassReader reader = new ClassReader(bytes); - ClassWriter writer = new ClassWriter(0); - ClassVisitor visitor = new ClassRemapper(writer, new JavaxRemapper()); - try { - reader.accept(visitor, ClassReader.EXPAND_FRAMES); - } catch (Exception e) { - FMLLog.log.warn("Couldn't remap class {}", s1, e); - return bytes; - } - return writer.toByteArray(); - } - - static class JavaxRemapper extends Remapper { - final String[] fromPrefixes = new String[] { "javax/xml/bind/", "javax/xml/ws/", "javax/ws/", "javax/activation/", "javax/soap/", "javax/jws/" , "sun/reflect/Reflection"}; - - final String[] toPrefixes = new String[] { "jakarta/xml/bind/", "jakarta/xml/ws/", "jakarta/ws/", "jakarta/activation/", "jakarta/soap/", "jakarta/jws/", "com/cleanroommc/hackery/Reflection"}; - - @Override - public String map(String typeName) { - if (typeName == null) { - return null; - } - for (int pfx = 0; pfx < fromPrefixes.length; pfx++) { - if (typeName.startsWith(fromPrefixes[pfx])) { - if (!javaxlist.contains(typeName)){ - javaxlist.add(typeName); - FMLLog.log.warn( "A mod is using javax classes: " + typeName + ", please find it out using recaf or similar and report to its mod author."); - } - return toPrefixes[pfx] + typeName.substring(fromPrefixes[pfx].length()); - } - } - - return typeName; - } - } -} diff --git a/src/main/java/net/minecraftforge/fml/common/asm/transformers/LWJGLTransformer.java b/src/main/java/net/minecraftforge/fml/common/asm/transformers/LWJGLTransformer.java new file mode 100644 index 000000000..4337d8602 --- /dev/null +++ b/src/main/java/net/minecraftforge/fml/common/asm/transformers/LWJGLTransformer.java @@ -0,0 +1,86 @@ +package net.minecraftforge.fml.common.asm.transformers; + +import net.minecraft.launchwrapper.IClassTransformer; +import net.minecraft.launchwrapper.Launch; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.commons.ClassRemapper; +import org.objectweb.asm.commons.Remapper; +import org.objectweb.asm.tree.ClassNode; + +import java.io.IOException; +import java.util.Set; +import java.util.stream.Collectors; + +public class LWJGLTransformer implements IClassTransformer { + private static final LWJGLXRemapper INSTANCE = new LWJGLXRemapper(); + @Override + public byte[] transform(String s, String s1, byte[] bytes) { + if (!s1.startsWith("org.lwjgl.")) { + return bytes; + } + String lwjglxName = s.replace("org.lwjgl.", "org.lwjglx."); + byte[] lwjglxBytes; + try { + lwjglxBytes = Launch.classLoader.testGetClassBytes(lwjglxName); + } catch (IOException e) { + return bytes; + } + if (lwjglxBytes == null) { + return bytes; + } + ClassReader lwjglxReader = new ClassReader(lwjglxBytes); + ClassWriter writer = new ClassWriter(0); + ClassVisitor classVisitor = new ClassRemapper(writer, INSTANCE); + lwjglxReader.accept(classVisitor, 0); + lwjglxBytes = writer.toByteArray(); + if (bytes == null) { + return lwjglxBytes; + } + + ClassNode lwjglNode = new ClassNode(); + ClassReader lwjglReader = new ClassReader(bytes); + lwjglReader.accept(lwjglNode, 0); + + lwjglxReader = new ClassReader(lwjglxBytes); + ClassNode lwjglxNode = new ClassNode(); + lwjglxReader.accept(lwjglxNode, 0); + Set methods = lwjglNode.methods.stream().map(m -> m.name + m.desc).collect(Collectors.toSet()); + lwjglxNode.methods.forEach(m -> { + if (!methods.contains(m.name + m.desc)) { + lwjglNode.methods.add(m); + } + }); + Set fields = lwjglNode.fields.stream().map(f -> f.name + f.desc).collect(Collectors.toSet()); + lwjglxNode.fields.forEach(f -> { + if (!fields.contains(f.name + f.desc)) { + lwjglNode.fields.add(f); + } + }); + if (s1.equals("org.lwjgl.openal.AL")) { + lwjglNode.methods.removeIf(m -> m.name.equals("destroy")); + lwjglxNode.methods.stream().filter(m -> m.name.equals("destroy")).forEach(m -> lwjglNode.methods.add(m)); + } + ClassWriter out = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); + lwjglNode.accept(out); + return out.toByteArray(); + } + + static class LWJGLXRemapper extends Remapper { + + @Override + public String map(String typeName) { + if (typeName == null) { + return null; + } + if (typeName.startsWith("org/lwjgl3/") || typeName.startsWith("org/lwjglx/")) { + return "org/lwjgl/" + typeName.substring(11); + } + + return typeName; + } + + } + +} diff --git a/src/main/java/net/minecraftforge/fml/common/asm/transformers/SideTransformer.java b/src/main/java/net/minecraftforge/fml/common/asm/transformers/SideTransformer.java index e299b44aa..0297a9f4a 100644 --- a/src/main/java/net/minecraftforge/fml/common/asm/transformers/SideTransformer.java +++ b/src/main/java/net/minecraftforge/fml/common/asm/transformers/SideTransformer.java @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.ListIterator; import net.minecraft.launchwrapper.IClassTransformer; import net.minecraftforge.fml.relauncher.FMLLaunchHandler; @@ -42,7 +41,7 @@ public class SideTransformer implements IClassTransformer { - private static String SIDE = FMLLaunchHandler.side().name(); + private static final String SIDE = FMLLaunchHandler.side().name(); private static final boolean DEBUG = false; @Override public byte[] transform(String name, String transformedName, byte[] bytes) @@ -57,9 +56,9 @@ public byte[] transform(String name, String transformedName, byte[] bytes) { if (DEBUG) { - System.out.println(String.format("Attempted to load class %s for invalid side %s", classNode.name, SIDE)); + System.out.printf("Attempted to load class %s/%s for invalid side %s%n", name, transformedName, SIDE); } - throw new RuntimeException(String.format("Attempted to load class %s for invalid side %s", classNode.name, SIDE)); + throw new RuntimeException(String.format("Attempted to load class %s/%s for invalid side %s", name, transformedName, SIDE)); } Iterator fields = classNode.fields.iterator(); @@ -70,7 +69,7 @@ public byte[] transform(String name, String transformedName, byte[] bytes) { if (DEBUG) { - System.out.println(String.format("Removing Field: %s.%s", classNode.name, field.name)); + System.out.printf("Removing Field: %s.%s%n", classNode.name, field.name); } fields.remove(); } @@ -85,7 +84,7 @@ public byte[] transform(String name, String transformedName, byte[] bytes) { if (DEBUG) { - System.out.println(String.format("Removing Method: %s.%s%s", classNode.name, method.name, method.desc)); + System.out.printf("Removing Method: %s.%s%s%n", classNode.name, method.name, method.desc); } methods.remove(); lambdaGatherer.accept(method); @@ -166,12 +165,8 @@ public LambdaGatherer() { } public void accept(MethodNode method) { - ListIterator insnNodeIterator = method.instructions.iterator(); - while (insnNodeIterator.hasNext()) - { - AbstractInsnNode insnNode = insnNodeIterator.next(); - if (insnNode.getType() == AbstractInsnNode.INVOKE_DYNAMIC_INSN) - { + for (AbstractInsnNode insnNode : method.instructions) { + if (insnNode.getType() == AbstractInsnNode.INVOKE_DYNAMIC_INSN) { insnNode.accept(this); } } diff --git a/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java b/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java index af6c9149f..4857400d2 100644 --- a/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java +++ b/src/main/java/net/minecraftforge/fml/common/discovery/asm/ASMModParser.java @@ -55,7 +55,7 @@ public ASMModParser(InputStream stream) throws IOException try { ClassReader reader = new ClassReader(stream); - reader.accept(new ModClassVisitor(this), 0); + reader.accept(new ModClassVisitor(this), ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES); } catch (Exception ex) { diff --git a/src/main/java/net/minecraftforge/fml/common/launcher/FMLServerTweaker.java b/src/main/java/net/minecraftforge/fml/common/launcher/FMLServerTweaker.java index 5ef5303dc..be9449bdd 100644 --- a/src/main/java/net/minecraftforge/fml/common/launcher/FMLServerTweaker.java +++ b/src/main/java/net/minecraftforge/fml/common/launcher/FMLServerTweaker.java @@ -51,14 +51,6 @@ public String getLaunchTarget() @Override public void injectIntoClassLoader(LaunchClassLoader classLoader) { - // The log4j2 queue is excluded so it is correctly visible from the obfuscated - // and deobfuscated parts of the code. Without, the UI won't show anything - classLoader.addClassLoaderExclusion("com.mojang.util.QueueLogAppender"); - - classLoader.addClassLoaderExclusion("org.jline."); - classLoader.addClassLoaderExclusion("com.sun.jna."); - classLoader.addClassLoaderExclusion("net.minecraftforge.server.terminalconsole."); - FMLLaunchHandler.configureForServerLaunch(classLoader, this); FMLLaunchHandler.appendCoreMods(); } diff --git a/src/main/java/net/minecraftforge/fml/common/launcher/FMLTweaker.java b/src/main/java/net/minecraftforge/fml/common/launcher/FMLTweaker.java index 9e896f730..e530a1852 100644 --- a/src/main/java/net/minecraftforge/fml/common/launcher/FMLTweaker.java +++ b/src/main/java/net/minecraftforge/fml/common/launcher/FMLTweaker.java @@ -27,6 +27,8 @@ import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraftforge.fml.relauncher.FMLLaunchHandler; import org.apache.logging.log4j.LogManager; + +import org.spongepowered.asm.launch.GlobalProperties; import org.spongepowered.asm.launch.MixinBootstrap; import java.io.File; @@ -35,6 +37,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -55,6 +58,8 @@ public FMLTweaker() MixinBootstrap.init(); LogManager.getLogger("FML.TWEAK").info("Initializing MixinExtras..."); MixinExtrasBootstrap.init(); + + GlobalProperties.put(GlobalProperties.Keys.CLEANROOM_DISABLE_MIXIN_CONFIGS, new HashSet<>()); } @SuppressWarnings("unchecked") @Override diff --git a/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java b/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java index 0dabab34b..a1c99ed24 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java @@ -25,6 +25,7 @@ import net.minecraft.launchwrapper.ITweaker; import net.minecraft.launchwrapper.Launch; import net.minecraft.launchwrapper.LaunchClassLoader; +import net.minecraftforge.common.ForgeEarlyConfig; import net.minecraftforge.common.ForgeVersion; import net.minecraftforge.fml.common.CertificateHelper; import net.minecraftforge.fml.common.FMLLog; @@ -42,6 +43,8 @@ import org.spongepowered.asm.mixin.Mixins; import org.spongepowered.asm.service.mojang.MixinServiceLaunchWrapper; import org.spongepowered.asm.util.Constants; +import zone.rong.mixinbooter.IEarlyMixinLoader; +import zone.rong.mixinbooter.IMixinConfigHijacker; import java.io.*; import java.net.MalformedURLException; @@ -351,7 +354,7 @@ private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader) String configs; String cascadedTweaker; File mods_ver = new File(new File(Launch.minecraftHome, "mods"), ForgeVersion.mcVersion); - boolean containNonMods = false; + boolean containNonMods = false, ignoreMods = false; try { File manifest = new File(coreMod.getAbsolutePath() + ".meta"); @@ -416,6 +419,17 @@ private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader) continue; } fmlCorePlugin = mfAttributes.getValue("FMLCorePlugin"); + for (String plugin : ForgeEarlyConfig.LOADING_PLUGIN_BLACKLIST) { + if (plugin.equals(fmlCorePlugin)) { + ignoreMods = true; + break; + } + } + if (ignoreMods) { + ignoredModFiles.add(coreMod.getName()); + FMLLog.log.warn("The mod with loading plugin {} is in blacklist and won't be loaded. Check forge_early.cfg for more info.", fmlCorePlugin); + continue; + } if (fmlCorePlugin == null) { // Not a coremod @@ -609,6 +623,7 @@ else if (deobfuscatedEnvironment && location == null) // This is probably a mod FMLPluginWrapper wrap = new FMLPluginWrapper(coreModName, plugin, location, sortIndex, dependencies); loadPlugins.add(wrap); FMLLog.log.debug("Enqueued coremod {}", coreModName); + MixinBooterPlugin.queneEarlyMixinLoader(plugin); return wrap; } catch (ClassNotFoundException cnfe) diff --git a/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java b/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java index 889d97815..8c3128a14 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java @@ -33,7 +33,7 @@ public String[] getASMTransformerClass() "net.minecraftforge.fml.common.asm.transformers.EventSubscriptionTransformer", "net.minecraftforge.fml.common.asm.transformers.EventSubscriberTransformer", "net.minecraftforge.fml.common.asm.transformers.SoundEngineFixTransformer", - //"net.minecraftforge.fml.common.asm.transformers.JavaxTransformer", + "net.minecraftforge.fml.common.asm.transformers.LWJGLTransformer", }; } diff --git a/src/main/java/net/minecraftforge/fml/relauncher/MixinBooterPlugin.java b/src/main/java/net/minecraftforge/fml/relauncher/MixinBooterPlugin.java index ce89ebf19..798d313c3 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/MixinBooterPlugin.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/MixinBooterPlugin.java @@ -2,22 +2,34 @@ import net.minecraft.launchwrapper.Launch; import net.minecraftforge.common.ForgeVersion; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import net.minecraftforge.fml.common.FMLLog; + +import com.google.gson.*; + import org.spongepowered.asm.mixin.Mixins; +import org.spongepowered.asm.launch.GlobalProperties; +import zone.rong.mixinbooter.Context; import zone.rong.mixinbooter.IEarlyMixinLoader; +import zone.rong.mixinbooter.IMixinConfigHijacker; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.List; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.Set; import java.util.Map; +import java.util.Enumeration; +import java.io.InputStreamReader; +import java.net.URL; + +@SuppressWarnings("deprecation") @IFMLLoadingPlugin.Name("MixinBooter") @IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion) @IFMLLoadingPlugin.SortingIndex(1) public final class MixinBooterPlugin implements IFMLLoadingPlugin { - public static final Logger LOGGER = LogManager.getLogger("MixinBooter"); + static Set earlyMixinLoaders = new HashSet<>(); public MixinBooterPlugin() { } @@ -34,36 +46,13 @@ public String getModContainerClass() { @Override public String getSetupClass() { - return "net.minecraftforge.fml.relauncher.MixinSetup"; + return null; } @Override public void injectData(Map data) { - Object coremodList = data.get("coremodList"); - if (coremodList instanceof List) { - Field fmlPluginWrapper$coreModInstance = null; - for (Object coremod : (List) coremodList) { - try { - if (fmlPluginWrapper$coreModInstance == null) { - fmlPluginWrapper$coreModInstance = coremod.getClass().getField("coreModInstance"); - fmlPluginWrapper$coreModInstance.setAccessible(true); - } - Object theMod = fmlPluginWrapper$coreModInstance.get(coremod); - if (theMod instanceof IEarlyMixinLoader loader) { - LOGGER.info("Grabbing {} for its mixins.", loader.getClass()); - for (String mixinConfig : loader.getMixinConfigs()) { - if (loader.shouldMixinConfigQueue(mixinConfig)) { - LOGGER.info("Adding {} mixin configuration.", mixinConfig); - Mixins.addConfiguration(mixinConfig); - loader.onMixinConfigQueued(mixinConfig);; - } - } - } - } catch (Throwable t) { - LOGGER.error("Unexpected error", t); - } - } - } + loadEarlyLoaders(earlyMixinLoaders); + earlyMixinLoaders = null; } @Override @@ -71,6 +60,87 @@ public String getAccessTransformerClass() { return null; } + static void queneEarlyMixinLoader(IFMLLoadingPlugin plugin) { + if (plugin instanceof IEarlyMixinLoader earlyMixinLoader) earlyMixinLoaders.add(earlyMixinLoader); + if (plugin instanceof IMixinConfigHijacker hijacker) { + Collection disabledConfigs = GlobalProperties.get(GlobalProperties.Keys.CLEANROOM_DISABLE_MIXIN_CONFIGS); + Context context = new Context(null, Collections.emptySet()); + FMLLog.log.info("Loading config hijacker {}.", hijacker.getClass().getName()); + for (String hijacked : hijacker.getHijackedMixinConfigs(context)) { + disabledConfigs.add(hijacked); + FMLLog.log.info("{} will hijack the mixin config {}", hijacker.getClass().getName(), hijacked); + } + } + } + + private static void loadEarlyLoaders(Collection queuedLoaders) { + Set modlist = speculatedModList(); + for (IEarlyMixinLoader queuedLoader : queuedLoaders) { + FMLLog.log.info("Loading early loader {} for its mixins.", queuedLoader.getClass().getName()); + for (String mixinConfig : queuedLoader.getMixinConfigs()) { + Context context = new Context(mixinConfig, modlist); + if (queuedLoader.shouldMixinConfigQueue(context)) { + FMLLog.log.info("Adding {} mixin configuration.", mixinConfig); + Mixins.addConfiguration(mixinConfig); + queuedLoader.onMixinConfigQueued(context); + } + } + } + } + + public static Set speculatedModList() { + HashSet presentMods = new HashSet<>(); + + // buildIn mods : + presentMods.add("minecraft"); + presentMods.add("fml"); + presentMods.add("forge"); + presentMods.add("mixinbooter"); + presentMods.add("configanytime"); + + // mcmod.info + try { + Enumeration resources = Launch.classLoader.getResources("mcmod.info"); + while (resources.hasMoreElements()) { + presentMods.addAll(parseMcmodInfo(resources.nextElement())); + } + } catch (Exception e) { + throw new RuntimeException("Failed to gather present mods from mcmod.info (s)", e); + } + + // optifine : + if (Launch.classLoader.isClassExist("optifine.OptiFineTweaker")) { + presentMods.add("optifine"); + } + + return presentMods; + + } + + private static Set parseMcmodInfo(URL url) { + try { + HashSet ids = new HashSet<>(); + JsonElement root = JsonParser.parseReader(new InputStreamReader(url.openStream())); + if (root.isJsonArray()) { + for (JsonElement element : root.getAsJsonArray()) { + if (element.isJsonObject()) { + ids.add(element.getAsJsonObject().get("modid").getAsString()); + } + } + } else { + for (JsonElement element : root.getAsJsonObject().get("modList").getAsJsonArray()) { + if (element.isJsonObject()) { + ids.add(element.getAsJsonObject().get("modid").getAsString()); + } + } + } + return ids; + } catch (Throwable t) { + FMLLog.log.error("Failed to parse mcmod.info for " + url, t); + } + return Collections.emptySet(); + } + } diff --git a/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java b/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java deleted file mode 100644 index 5555c3fb8..000000000 --- a/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.minecraftforge.fml.relauncher; - -import com.llamalad7.mixinextras.MixinExtrasBootstrap; -import net.minecraft.launchwrapper.Launch; -import net.minecraftforge.fml.relauncher.mixinfix.MixinFixer; -import org.spongepowered.asm.launch.GlobalProperties; -import org.spongepowered.asm.launch.MixinBootstrap; - -import java.util.HashSet; -import java.util.Map; - -public class MixinSetup implements IFMLCallHook { - - @Override - public void injectData(Map data) { - initialize(); - MixinFixer.patchAncientModMixinsLoadingMethod(); - } - - @Override - public Void call() throws Exception { - return null; - } - - - private void initialize() { - GlobalProperties.put(GlobalProperties.Keys.CLEANROOM_DISABLE_MIXIN_CONFIGS, new HashSet<>()); - } -} \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/fml/relauncher/mixinfix/MixinFixer.java b/src/main/java/net/minecraftforge/fml/relauncher/mixinfix/MixinFixer.java deleted file mode 100644 index dcb8bd815..000000000 --- a/src/main/java/net/minecraftforge/fml/relauncher/mixinfix/MixinFixer.java +++ /dev/null @@ -1,155 +0,0 @@ -package net.minecraftforge.fml.relauncher.mixinfix; - -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -import net.minecraft.launchwrapper.Launch; -import net.minecraftforge.fml.relauncher.MixinBooterPlugin; -import org.spongepowered.asm.mixin.extensibility.IMixinInfo; -import org.spongepowered.asm.mixin.transformer.ClassInfo; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; -import java.util.AbstractList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -public class MixinFixer { - - static Unsafe unsafe; - static boolean registered = false; - static Set queuedLateMixinConfigs = new ObjectOpenHashSet<>(); - - /** - * For internal usage - */ - public static Set retrieveLateMixinConfigs() { - Set ret = queuedLateMixinConfigs; - queuedLateMixinConfigs = null; - return ret; - } - - public static void patchAncientModMixinsLoadingMethod() { - if (registered) { - return; - } - registered = true; - ClassInfo.registerCallback(ci -> { - if (!ci.isMixin() && "net/minecraftforge/fml/common/Loader".equals(ci.getName())) { - try { - // OpenJ9 Compatibility - Field unsafe$theUnsafe = Unsafe.class.getDeclaredField("theUnsafe"); - unsafe$theUnsafe.setAccessible(true); - unsafe = (Unsafe) unsafe$theUnsafe.get(null); - Field classInfo$mixinsField = ClassInfo.class.getDeclaredField("mixins"); - classInfo$mixinsField.setAccessible(true); - unsafe.putObject(ci, unsafe.objectFieldOffset(classInfo$mixinsField), new NotifiableMixinSet()); - } catch (ReflectiveOperationException e) { - throw new RuntimeException("Unable to patch for compatibility with older mixin mods", e); - } - } - }); - } - - private static class NotifiableMixinSet extends HashSet { - - private static Field mixinInfo$targetClassNames; - static long mixinInfo$targetClassNames$offset = 0L; - - @Override - public boolean add(IMixinInfo mixinInfo) { - if (mixinInfo$targetClassNames == null) { - try { - mixinInfo$targetClassNames = mixinInfo.getClass().getDeclaredField("targetClassNames"); - mixinInfo$targetClassNames.setAccessible(true); - mixinInfo$targetClassNames$offset = unsafe.objectFieldOffset(mixinInfo$targetClassNames); - } catch (NoSuchFieldException e) { - throw new RuntimeException("Unable to patch for compatibility with older mixin mods", e); - } - } - switch (mixinInfo.getConfig().getName()) { - // Integrated Proxy compatibility - case "mixins.integrated_proxy.loader.json": - MixinFixer.queuedLateMixinConfigs.add("mixins.integrated_proxy.mod.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - return true; - // Just Enough IDs/Roughly Enough IDs compatibility - case "mixins.jeid.init.json": - MixinFixer.queuedLateMixinConfigs.add("mixins.jeid.modsupport.json"); - MixinFixer.queuedLateMixinConfigs.add("mixins.jeid.twilightforest.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - return true; - // DJ2 Addons compatibility - case "mixins.dj2addons.bootstrap.json": - MixinFixer.queuedLateMixinConfigs.add("mixins.dj2addons.def.api.json"); - MixinFixer.queuedLateMixinConfigs.add("mixins.dj2addons.def.custom.json"); - MixinFixer.queuedLateMixinConfigs.add("mixins.dj2addons.def.optimizations.json"); - MixinFixer.queuedLateMixinConfigs.add("mixins.dj2addons.def.patches.json"); - MixinFixer.queuedLateMixinConfigs.add("mixins.dj2addons.def.tweaks.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - correctingDj2Addons(); - return true; - case "mixins.dj2addons.init.json": // Backwards Compat - MixinFixer.queuedLateMixinConfigs.add("mixins.dj2addons.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - correctingDj2Addons(); - return true; - case "mixins.thaumicfixes.init.json": - MixinFixer.queuedLateMixinConfigs.add("mixins.thaumicfixes.modsupport.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - return true; - // ErebusFix compatibility - case "mixins.loader.json": - switch (mixinInfo.getConfig().getMixinPackage()) { - case "noobanidus.mods.erebusfix.mixins.": - MixinFixer.queuedLateMixinConfigs.add("mixins.erebusfix.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - return true; - case "doomanidus.mods.uncraftingblacklist.mixins.": - MixinFixer.queuedLateMixinConfigs.add("mixins.uncraftingblacklist.json"); - unsafe.putObject(mixinInfo, mixinInfo$targetClassNames$offset, new EmptyAbsorbingList()); - return true; - } - } - return super.add(mixinInfo); - } - - private void correctingDj2Addons() { - // If you're bored and want to be enlightened, start here: - // https://discord.com/channels/926486493562814515/926783373232447509/1168057816691507260 - try { - // New (unreleased) - Class.forName("btpos.dj2addons.common.CoreInfo", true, Launch.classLoader).getMethod("onLoadCore").invoke(null); - } catch (ReflectiveOperationException e1) { - try { - // CurseForge release (older) - Class.forName("org.btpos.dj2addons.core.DJ2AddonsCore", true, Launch.classLoader).getMethod("onLoadCore").invoke(null); - } catch (ClassNotFoundException | NoClassDefFoundError ignored) { - // Skip when no classes are found, that cannot be the case unless an old dj2addons is installed - } catch (ReflectiveOperationException e2) { - MixinBooterPlugin.LOGGER.fatal("DJ2Addons compatibility patch failed.", e2); - } - } - } - - } - - private static class EmptyAbsorbingList extends AbstractList { - - @Override - public boolean addAll(Collection c) { - return true; - } - - @Override - public String get(int index) { - return null; - } - - @Override - public int size() { - return 0; - } - - } - -} \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/registries/ForgeRegistry.java b/src/main/java/net/minecraftforge/registries/ForgeRegistry.java index 5b45d13a4..b4c957c6f 100644 --- a/src/main/java/net/minecraftforge/registries/ForgeRegistry.java +++ b/src/main/java/net/minecraftforge/registries/ForgeRegistry.java @@ -480,7 +480,7 @@ void sync(ResourceLocation name, ForgeRegistry from) if (DEBUG) FMLLog.log.debug("Registry {} Sync: {} -> {}", this.superType.getSimpleName(), this.stage.getName(), from.stage.getName()); if (this == from) - throw new IllegalArgumentException("WTF We are the same!?!?!"); + throw new IllegalArgumentException("Attempted to sync the same registry instance!"); if (from.superType != this.superType) throw new IllegalArgumentException("Attempted to copy to incompatible registry: " + name + " " + from.superType + " -> " + this.superType); diff --git a/src/main/java/net/minecraftforge/server/terminalconsole/TerminalConsoleAppender.java b/src/main/java/net/minecraftforge/server/terminalconsole/TerminalConsoleAppender.java index edb854db5..54cf122b4 100644 --- a/src/main/java/net/minecraftforge/server/terminalconsole/TerminalConsoleAppender.java +++ b/src/main/java/net/minecraftforge/server/terminalconsole/TerminalConsoleAppender.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.PrintStream; import java.io.Serializable; +import java.nio.charset.Charset; import org.apache.logging.log4j.core.Appender; import org.apache.logging.log4j.core.Core; @@ -299,10 +300,17 @@ public void append(LogEvent event) if (reader != null) { // Draw the prompt line again if a reader is available - reader.callWidget(LineReader.CLEAR); - terminal.writer().print(getLayout().toSerializable(event)); - reader.callWidget(LineReader.REDRAW_LINE); - reader.callWidget(LineReader.REDISPLAY); + synchronized (reader) { + if (reader.isReading()) { + reader.callWidget(LineReader.CLEAR); + terminal.writer().println(getLayout().toSerializable(event)); + reader.callWidget(LineReader.REDRAW_LINE); + reader.callWidget(LineReader.REDISPLAY); + } else { + // No need to redraw prompt + terminal.writer().println(getLayout().toSerializable(event)); + } + } } else { diff --git a/src/main/java/org/lwjgl/BufferChecks.java b/src/main/java/org/lwjgl/BufferChecks.java deleted file mode 100644 index 31a11703e..000000000 --- a/src/main/java/org/lwjgl/BufferChecks.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -import java.nio.*; - -/** - *

- * A class to check buffer boundaries in general. If there is unsufficient space in the buffer when the call is made - * then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security risk. - * - * Internal class, don't use. - *

- * - * @author cix_foo - * @author elias_naur - * @version $Revision$ $Id$ - */ -public class BufferChecks { - - /** Static methods only! */ - private BufferChecks() {} - - /** - * Helper methods to ensure a function pointer is not-null (0) - */ - public static void checkFunctionAddress(long pointer) { - if (LWJGLUtil.CHECKS && pointer == 0) { - throw new IllegalStateException("Function is not supported"); - } - } - - /** - * Helper methods to ensure a ByteBuffer is null-terminated - */ - public static void checkNullTerminated(ByteBuffer buf) { - if (LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - public static void checkNullTerminated(ByteBuffer buf, int count) { - if (LWJGLUtil.CHECKS) { - int nullFound = 0; - for (int i = buf.position(); i < buf.limit(); i++) { - if (buf.get(i) == 0) nullFound++; - } - - if (nullFound < count) throw new IllegalArgumentException("Missing null termination"); - } - } - - /** Helper method to ensure an IntBuffer is null-terminated */ - public static void checkNullTerminated(IntBuffer buf) { - if (LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - /** Helper method to ensure a LongBuffer is null-terminated */ - public static void checkNullTerminated(LongBuffer buf) { - if (LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - /** Helper method to ensure a PointerBuffer is null-terminated */ - public static void checkNullTerminated(PointerBuffer buf) { - if (LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - public static void checkNotNull(Object o) { - if (LWJGLUtil.CHECKS && o == null) throw new IllegalArgumentException("Null argument"); - } - - /** - * Helper methods to ensure a buffer is direct (and, implicitly, non-null). - */ - public static void checkDirect(ByteBuffer buf) { - if (LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("ByteBuffer is not direct"); - } - } - - public static void checkDirect(ShortBuffer buf) { - if (LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("ShortBuffer is not direct"); - } - } - - public static void checkDirect(IntBuffer buf) { - if (LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("IntBuffer is not direct"); - } - } - - public static void checkDirect(LongBuffer buf) { - if (LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("LongBuffer is not direct"); - } - } - - public static void checkDirect(FloatBuffer buf) { - if (LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("FloatBuffer is not direct"); - } - } - - public static void checkDirect(DoubleBuffer buf) { - if (LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("DoubleBuffer is not direct"); - } - } - - public static void checkDirect(PointerBuffer buf) { - // NO-OP, PointerBuffer is always direct. - } - - public static void checkArray(Object[] array) { - if (LWJGLUtil.CHECKS && (array == null || array.length == 0)) - throw new IllegalArgumentException("Invalid array"); - } - - /** - * This is a separate call to help inline checkBufferSize. - */ - private static void throwBufferSizeException(Buffer buf, int size) { - throw new IllegalArgumentException( - "Number of remaining buffer elements is " + buf.remaining() - + ", must be at least " - + size - + ". Because at most " - + size - + " elements can be returned, a buffer with at least " - + size - + " elements is required, regardless of actual returned element count"); - } - - private static void throwBufferSizeException(PointerBuffer buf, int size) { - throw new IllegalArgumentException( - "Number of remaining pointer buffer elements is " + buf.remaining() + ", must be at least " + size); - } - - private static void throwArraySizeException(Object[] array, int size) { - throw new IllegalArgumentException( - "Number of array elements is " + array.length + ", must be at least " + size); - } - - private static void throwArraySizeException(long[] array, int size) { - throw new IllegalArgumentException( - "Number of array elements is " + array.length + ", must be at least " + size); - } - - /** - * Helper method to ensure a buffer is big enough to receive data from a glGet* operation. - * - * @param buf The buffer to check - * @param size The minimum buffer size - * @throws IllegalArgumentException - */ - public static void checkBufferSize(Buffer buf, int size) { - if (LWJGLUtil.CHECKS && buf.remaining() < size) { - throwBufferSizeException(buf, size); - } - } - - /** - * Detects the buffer type and performs the corresponding check and also returns the buffer position in bytes. - * - * @param buffer the buffer to check - * @param size the size to check - * - * @return the buffer position in bytes - */ - public static int checkBuffer(final Buffer buffer, final int size) { - final int posShift; - if (buffer instanceof ByteBuffer) { - BufferChecks.checkBuffer((ByteBuffer) buffer, size); - posShift = 0; - } else if (buffer instanceof ShortBuffer) { - BufferChecks.checkBuffer((ShortBuffer) buffer, size); - posShift = 1; - } else if (buffer instanceof IntBuffer) { - BufferChecks.checkBuffer((IntBuffer) buffer, size); - posShift = 2; - } else if (buffer instanceof LongBuffer) { - BufferChecks.checkBuffer((LongBuffer) buffer, size); - posShift = 4; - } else if (buffer instanceof FloatBuffer) { - BufferChecks.checkBuffer((FloatBuffer) buffer, size); - posShift = 2; - } else if (buffer instanceof DoubleBuffer) { - BufferChecks.checkBuffer((DoubleBuffer) buffer, size); - posShift = 4; - } else throw new IllegalArgumentException("Unsupported Buffer type specified: " + buffer.getClass()); - - return buffer.position() << posShift; - } - - public static void checkBuffer(ByteBuffer buf, int size) { - if (LWJGLUtil.CHECKS) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(ShortBuffer buf, int size) { - if (LWJGLUtil.CHECKS) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(IntBuffer buf, int size) { - if (LWJGLUtil.CHECKS) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(LongBuffer buf, int size) { - if (LWJGLUtil.CHECKS) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(FloatBuffer buf, int size) { - if (LWJGLUtil.CHECKS) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(DoubleBuffer buf, int size) { - if (LWJGLUtil.CHECKS) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(PointerBuffer buf, int size) { - if (LWJGLUtil.CHECKS && buf.remaining() < size) { - throwBufferSizeException(buf, size); - } - } - - public static void checkArray(Object[] array, int size) { - if (LWJGLUtil.CHECKS && array.length < size) throwArraySizeException(array, size); - } - - public static void checkArray(long[] array, int size) { - if (LWJGLUtil.CHECKS && array.length < size) throwArraySizeException(array, size); - } -} diff --git a/src/main/java/org/lwjgl/BufferUtils.java b/src/main/java/org/lwjgl/BufferUtils.java deleted file mode 100644 index 2fa8688ad..000000000 --- a/src/main/java/org/lwjgl/BufferUtils.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.CharBuffer; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; -import java.nio.ShortBuffer; - -/** - * Some often-used Buffer code for creating native buffers of the appropriate size. - * - * @author $Author: spasi $ - * @version $Revision: 3528 $ $Id: BufferUtils.java 3528 2011-05-11 00:12:52Z spasi $ - */ -public final class BufferUtils { - - /** - * Construct a direct native-ordered bytebuffer with the specified size. - * - * @param size The size, in bytes - * @return a ByteBuffer - */ - public static ByteBuffer createByteBuffer(int size) { - return ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()); - } - - /** - * Construct a direct native-order shortbuffer with the specified number of elements. - * - * @param size The size, in shorts - * @return a ShortBuffer - */ - public static ShortBuffer createShortBuffer(int size) { - return createByteBuffer(size << 1).asShortBuffer(); - } - - /** - * Construct a direct native-order charbuffer with the specified number of elements. - * - * @param size The size, in chars - * @return an CharBuffer - */ - public static CharBuffer createCharBuffer(int size) { - return createByteBuffer(size << 1).asCharBuffer(); - } - - /** - * Construct a direct native-order intbuffer with the specified number of elements. - * - * @param size The size, in ints - * @return an IntBuffer - */ - public static IntBuffer createIntBuffer(int size) { - return createByteBuffer(size << 2).asIntBuffer(); - } - - /** - * Construct a direct native-order longbuffer with the specified number of elements. - * - * @param size The size, in longs - * @return an LongBuffer - */ - public static LongBuffer createLongBuffer(int size) { - return createByteBuffer(size << 3).asLongBuffer(); - } - - /** - * Construct a direct native-order floatbuffer with the specified number of elements. - * - * @param size The size, in floats - * @return a FloatBuffer - */ - public static FloatBuffer createFloatBuffer(int size) { - return createByteBuffer(size << 2).asFloatBuffer(); - } - - /** - * Construct a direct native-order doublebuffer with the specified number of elements. - * - * @param size The size, in floats - * @return a FloatBuffer - */ - public static DoubleBuffer createDoubleBuffer(int size) { - return createByteBuffer(size << 3).asDoubleBuffer(); - } - - /** - * Construct a PointerBuffer with the specified number of elements. - * - * @param size The size, in memory addresses - * @return a PointerBuffer - */ - public static PointerBuffer createPointerBuffer(int size) { - return PointerBuffer.allocateDirect(size); - } - - /** - * @return n, where buffer_element_size=2^n. - */ - public static int getElementSizeExponent(Buffer buf) { - if (buf instanceof ByteBuffer) return 0; - else if (buf instanceof ShortBuffer || buf instanceof CharBuffer) return 1; - else if (buf instanceof FloatBuffer || buf instanceof IntBuffer) return 2; - else if (buf instanceof LongBuffer || buf instanceof DoubleBuffer) return 3; - else throw new IllegalStateException("Unsupported buffer type: " + buf); - } - - /** - * A helper function which is used to get the byte offset in an arbitrary buffer based on its position - * - * @return the position of the buffer, in BYTES - */ - public static int getOffset(Buffer buffer) { - return buffer.position() << getElementSizeExponent(buffer); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(ByteBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(ShortBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(CharBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(IntBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(FloatBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(LongBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } - - /** Fill buffer with zeros from position to remaining */ - public static void zeroBuffer(DoubleBuffer b) { - org.lwjgl3.BufferUtils.zeroBuffer(b); - } -} diff --git a/src/main/java/org/lwjgl/LWJGLException.java b/src/main/java/org/lwjgl/LWJGLException.java deleted file mode 100644 index 7184ac1c7..000000000 --- a/src/main/java/org/lwjgl/LWJGLException.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -/** - *

- * This exception is supplied to make exception handling more generic for LWJGL specific exceptions - *

- * - * @author Brian Matzon - * @version $Revision$ $Id$ - */ -public class LWJGLException extends Exception { - - private static final long serialVersionUID = 1L; - - /** - * Plain c'tor - */ - public LWJGLException() { - super(); - } - - /** - * Creates a new LWJGLException - * - * @param msg String identifier for exception - */ - public LWJGLException(String msg) { - super(msg); - } - - /** - * @param message - * @param cause - */ - public LWJGLException(String message, Throwable cause) { - super(message, cause); - } - - /** - * @param cause - */ - public LWJGLException(Throwable cause) { - super(cause); - } -} diff --git a/src/main/java/org/lwjgl/LWJGLUtil.java b/src/main/java/org/lwjgl/LWJGLUtil.java deleted file mode 100644 index f38c2beaa..000000000 --- a/src/main/java/org/lwjgl/LWJGLUtil.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -import org.lwjgl3.system.Platform; - -import java.io.File; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.nio.ByteBuffer; -import java.util.*; - -/** - *

- * Internal library methods - *

- * - * @author Brian Matzon - * @version $Revision: 3608 $ $Id: LWJGLUtil.java 3608 2011-08-10 16:05:46Z spasi $ - */ -@SuppressWarnings("rawtypes") -public class LWJGLUtil { - - public static final int PLATFORM_LINUX = 1; - public static final int PLATFORM_MACOSX = 2; - public static final int PLATFORM_WINDOWS = 3; - public static final String PLATFORM_LINUX_NAME = "linux"; - public static final String PLATFORM_MACOSX_NAME = "macosx"; - public static final String PLATFORM_WINDOWS_NAME = "windows"; - - private static final String LWJGL_ICON_DATA_16x16 = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377" - + "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377" - + "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377" - + "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377" - + "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377" - + "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377" - + "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377" - + "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377" - + "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377" - + "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377" - + "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377" - + "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377" - + "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377" - + "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377" - + "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377" - + "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377" - + "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377" - + "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377" - + "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377" - + "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377" - + "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377" - + "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377" - + "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377" - + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377" - + "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377" - + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377" - + "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377" - + "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377" - + "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377" - + "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377" - + "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377" - + "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377" - + "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377" - + "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377" - + "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" - + "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377" - + "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377" - + "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377" - + "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377"; - - private static final String LWJGL_ICON_DATA_32x32 = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377" - + "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377" - + "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377" - + "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377" - + "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377" - + "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377" - + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377" - + "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" - + "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377" - + "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377" - + "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377" - + "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377" - + "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377" - + "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377" - + "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377" - + "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377" - + "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377" - + "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377" - + "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377" - + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377" - + "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377" - + "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377" - + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377" - + "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377" - + "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377" - + "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377" - + "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377" - + "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377" - + "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377" - + "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377" - + "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377" - + "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377" - + "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377" - + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377" - + "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377" - + "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377" - + "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377" - + "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377" - + "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377" - + "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377" - + "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377" - + "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377" - + "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377" - + "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"; - - /** LWJGL Logo - 16 by 16 pixels */ - public static final ByteBuffer LWJGLIcon16x16 = loadIcon(LWJGL_ICON_DATA_16x16); - - /** LWJGL Logo - 32 by 32 pixels */ - public static final ByteBuffer LWJGLIcon32x32 = loadIcon(LWJGL_ICON_DATA_32x32); - - /** Debug flag. */ - public static final boolean DEBUG = getPrivilegedBoolean("org.lwjgl3.util.Debug"); - - public static final boolean CHECKS = !getPrivilegedBoolean("org.lwjgl3.util.NoChecks"); - - private static final int PLATFORM; - - static { - switch (Platform.get()) { - case WINDOWS -> PLATFORM = PLATFORM_WINDOWS; - case LINUX -> PLATFORM = PLATFORM_LINUX; - case MACOSX -> PLATFORM = PLATFORM_MACOSX; - default -> throw new LinkageError("Unknown platform: " + Platform.get()); - } - } - - private static ByteBuffer loadIcon(String data) { - int len = data.length(); - ByteBuffer bb = BufferUtils.createByteBuffer(len); - for (int i = 0; i < len; i++) { - bb.put(i, (byte) data.charAt(i)); - } - return bb.asReadOnlyBuffer(); - } - - /** - * @see #PLATFORM_WINDOWS - * @see #PLATFORM_LINUX - * @see #PLATFORM_MACOSX - * @return the current platform type - */ - public static int getPlatform() { - return PLATFORM; - } - - /** - * @see #PLATFORM_WINDOWS_NAME - * @see #PLATFORM_LINUX_NAME - * @see #PLATFORM_MACOSX_NAME - * @return current platform name - */ - public static String getPlatformName() { - return switch (LWJGLUtil.getPlatform()) { - case LWJGLUtil.PLATFORM_LINUX -> PLATFORM_LINUX_NAME; - case LWJGLUtil.PLATFORM_MACOSX -> PLATFORM_MACOSX_NAME; - case LWJGLUtil.PLATFORM_WINDOWS -> PLATFORM_WINDOWS_NAME; - default -> "unknown"; - }; - } - - /** - * Locates the paths required by a library. - * - * @param libname Local Library Name to search the classloader with ("openal"). - * @param platform_lib_name The native library name ("libopenal.so") - * @param classloader The classloader to ask for library paths - * @return Paths to located libraries, if any - */ - public static String[] getLibraryPaths(String libname, String platform_lib_name, ClassLoader classloader) { - return getLibraryPaths(libname, new String[] { platform_lib_name }, classloader); - } - - /** - * Locates the paths required by a library. - * - * @param libname Local Library Name to search the classloader with ("openal"). - * @param platform_lib_names The list of possible library names ("libopenal.so") - * @param classloader The classloader to ask for library paths - * @return Paths to located libraries, if any - */ - public static String[] getLibraryPaths(String libname, String[] platform_lib_names, ClassLoader classloader) { - // need to pass path of possible locations of library to native side - List possible_paths = new ArrayList<>(); - - String classloader_path = getPathFromClassLoader(libname, classloader); - if (classloader_path != null) { - log("getPathFromClassLoader: Path found: " + classloader_path); - possible_paths.add(classloader_path); - } - - for (String platform_lib_name : platform_lib_names) { - String lwjgl_classloader_path = getPathFromClassLoader("lwjgl", classloader); - if (lwjgl_classloader_path != null) { - log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); - possible_paths.add( - lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator - + platform_lib_name); - } - - // add Installer path - String alternative_path = getPrivilegedProperty("org.lwjgl3.librarypath"); - if (alternative_path != null) { - possible_paths.add(alternative_path + File.separator + platform_lib_name); - } - - // Add all possible paths from java.library.path - String java_library_path = getPrivilegedProperty("java.library.path"); - - StringTokenizer st = new StringTokenizer(java_library_path, File.pathSeparator); - while (st.hasMoreTokens()) { - String path = st.nextToken(); - possible_paths.add(path + File.separator + platform_lib_name); - } - - // add current path - String current_dir = getPrivilegedProperty("user.dir"); - possible_paths.add(current_dir + File.separator + platform_lib_name); - - // add pure library (no path, let OS search) - possible_paths.add(platform_lib_name); - } - - // create needed string array - return possible_paths.toArray(new String[possible_paths.size()]); - } - - private static String getPrivilegedProperty(final String property_name) { - return System.getProperty(property_name); - } - - /** - * Tries to locate named library from the current ClassLoader This method exists because native libraries are loaded - * from native code, and as such is exempt from ClassLoader library loading rutines. It therefore always fails. We - * therefore invoke the protected method of the ClassLoader to see if it can locate it. - * - * @param libname Name of library to search for - * @param classloader Classloader to use - * @return Absolute path to library if found, otherwise null - */ - private static String getPathFromClassLoader(final String libname, final ClassLoader classloader) { - try { - log("getPathFromClassLoader: searching for: " + libname); - Class c = classloader.getClass(); - while (c != null) { - final Class clazz = c; - Method findLibrary = clazz.getDeclaredMethod("findLibrary", String.class); - findLibrary.setAccessible(true); - String path = (String) findLibrary.invoke(classloader, libname); - return path; - } - } catch (Exception e) { - log("Failure locating " + e + " using classloader:" + e); - } - return null; - } - - /** - * Gets a boolean property as a privileged action. - */ - public static boolean getPrivilegedBoolean(final String property_name) { - return Boolean.getBoolean(property_name); - } - - /** - * Gets an integer property as a privileged action. - * - * @param property_name the integer property name - * - * @return the property value - */ - public static Integer getPrivilegedInteger(final String property_name) { - return Integer.getInteger(property_name); - } - - /** - * Gets an integer property as a privileged action. - * - * @param property_name the integer property name - * @param default_val the default value to use if the property is not defined - * - * @return the property value - */ - public static Integer getPrivilegedInteger(final String property_name, final int default_val) { - return Integer.getInteger(property_name, default_val); - } - - /** - * Prints the given message to System.err if DEBUG is true. - * - * @param msg Message to print - */ - public static void log(CharSequence msg) { - if (DEBUG) { - System.err.println("[LWJGL] " + msg); - } - } - - /** - * Method to determine if the current system is running a version of Mac OS X better than the given version. This is - * only useful for Mac OS X specific code and will not work for any other platform. - */ - public static boolean isMacOSXEqualsOrBetterThan(int major_required, int minor_required) { - String os_version = getPrivilegedProperty("os.version"); - StringTokenizer version_tokenizer = new StringTokenizer(os_version, "."); - int major; - int minor; - try { - String major_str = version_tokenizer.nextToken(); - String minor_str = version_tokenizer.nextToken(); - major = Integer.parseInt(major_str); - minor = Integer.parseInt(minor_str); - } catch (Exception e) { - LWJGLUtil.log("Exception occurred while trying to determine OS version: " + e); - // Best guess, no - return false; - } - return major > major_required || (major == major_required && minor >= minor_required); - } - - /** - * Returns a map of public static final integer fields in the specified classes, to their String representations. An - * optional filter can be specified to only include specific fields. The target map may be null, in which case a new - * map is allocated and returned. - *

- * This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. - * - * @param filter the filter to use (optional) - * @param target the target map (optional) - * @param tokenClasses an array of classes to get tokens from - * - * @return the token map - */ - public static Map getClassTokens(final TokenFilter filter, final Map target, - final Class... tokenClasses) { - return getClassTokens(filter, target, Arrays.asList(tokenClasses)); - } - - /** - * Returns a map of public static final integer fields in the specified classes, to their String representations. An - * optional filter can be specified to only include specific fields. The target map may be null, in which case a new - * map is allocated and returned. - *

- * This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. - * - * @param filter the filter to use (optional) - * @param target the target map (optional) - * @param tokenClasses the classes to get tokens from - * - * @return the token map - */ - public static Map getClassTokens(final TokenFilter filter, Map target, - final Iterable tokenClasses) { - if (target == null) target = new HashMap<>(); - - final int TOKEN_MODIFIERS = Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL; - - for (final Class tokenClass : tokenClasses) { - for (final Field field : tokenClass.getDeclaredFields()) { - // Get only fields. - if ((field.getModifiers() & TOKEN_MODIFIERS) == TOKEN_MODIFIERS && field.getType() == int.class) { - try { - final int value = field.getInt(null); - if (filter != null && !filter.accept(field, value)) continue; - - if (target.containsKey(value)) // Print colliding tokens in their hex representation. - target.put(value, toHexString(value)); - else target.put(value, field.getName()); - } catch (IllegalAccessException e) { - // Ignore - } - } - } - } - - return target; - } - - /** - * Returns a string representation of the integer argument as an unsigned integer in base 16. The string will - * be uppercase and will have a leading '0x'. - * - * @param value the integer value - * - * @return the hex string representation - */ - public static String toHexString(final int value) { - return "0x" + Integer.toHexString(value).toUpperCase(); - } - - /** Simple interface for Field filtering. */ - public interface TokenFilter { - - /** - * Should return true if the specified Field passes the filter. - * - * @param field the Field to test - * @param value the integer value of the field - * - * @result true if the Field is accepted - */ - boolean accept(Field field, int value); - } - - public static String mapLibraryName(String libName) { - return Platform.mapLibraryNameBundled(libName); - } -} diff --git a/src/main/java/org/lwjgl/MemoryUtil.java b/src/main/java/org/lwjgl/MemoryUtil.java deleted file mode 100644 index f8c9bdb9e..000000000 --- a/src/main/java/org/lwjgl/MemoryUtil.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2002-2011 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -import java.nio.*; - -/** - * [INTERNAL USE ONLY] - *

- * This class provides utility methods for passing buffers to JNI API calls. - * - * @author Spasi - */ -public final class MemoryUtil { - - private MemoryUtil() {} - - /** - * Returns the memory address of the specified buffer. [INTERNAL USE ONLY] - * - * @param buffer the buffer - * - * @return the memory address - */ - public static long getAddress0(Buffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress0Safe(Buffer buffer) { - return buffer == null ? 0 : org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress0(PointerBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress0Safe(PointerBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - // --- [ API utilities ] --- - - public static long getAddress(ByteBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(ByteBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(ShortBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(ShortBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(CharBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(CharBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(IntBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(IntBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(FloatBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(FloatBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(LongBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(LongBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(DoubleBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(DoubleBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - public static long getAddress(PointerBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer); - } - - public static long getAddress(PointerBuffer buffer, int position) { - return org.lwjgl3.system.MemoryUtil.memAddress(buffer, position); - } - - // --- [ API utilities - Safe ] --- - - public static long getAddressSafe(ByteBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(ByteBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(ShortBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(ShortBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(CharBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(CharBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(IntBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(IntBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(FloatBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(FloatBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(LongBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(LongBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(DoubleBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(DoubleBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - public static long getAddressSafe(PointerBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memAddressSafe(buffer); - } - - public static long getAddressSafe(PointerBuffer buffer, int position) { - return buffer == null ? 0L : getAddress(buffer, position); - } - - // --- [ String utilities ] --- - - /** - * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. If text is null, null is - * returned. - * - * @param text the text to encode - * - * @return the encoded text or null - * - * @see String#getBytes() - */ - public static ByteBuffer encodeASCII(final CharSequence text) { - return org.lwjgl3.system.MemoryUtil.memASCII(text); - } - - /** - * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. If text is null, null is - * returned. - * - * @param text the text to encode - * - * @return the encoded text or null - * - * @see String#getBytes() - */ - public static ByteBuffer encodeUTF8(final CharSequence text) { - return org.lwjgl3.system.MemoryUtil.memUTF8(text); - } - - /** - * Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated. If text is null, null is - * returned. - * - * @param text the text to encode - * - * @return the encoded text - */ - public static ByteBuffer encodeUTF16(final CharSequence text) { - return org.lwjgl3.system.MemoryUtil.memUTF16(text); - } - - public static String decodeASCII(final ByteBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memASCII(buffer); - } - - public static String decodeUTF8(final ByteBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memUTF8(buffer); - } - - public static String decodeUTF16(final ByteBuffer buffer) { - return org.lwjgl3.system.MemoryUtil.memUTF16(buffer); - } -} diff --git a/src/main/java/org/lwjgl/PointerBuffer.java b/src/main/java/org/lwjgl/PointerBuffer.java deleted file mode 100644 index c7653cfed..000000000 --- a/src/main/java/org/lwjgl/PointerBuffer.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2002-2010 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -import java.lang.reflect.Field; -import java.nio.*; - -import javax.annotation.Nullable; - -public class PointerBuffer extends org.lwjgl3.PointerBuffer { - - private static final Field containerAccess; - - static { - Class pbClass = org.lwjgl3.PointerBuffer.class; - try { - containerAccess = pbClass.getDeclaredField("container"); - } catch (NoSuchFieldException e) { - throw new RuntimeException(e); - } - } - - private static ByteBuffer getContainer(org.lwjgl3.PointerBuffer buffer) { - try { - return (ByteBuffer) containerAccess.get(buffer); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - protected PointerBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit, - int capacity) { - super(address, container, mark, position, limit, capacity); - } - - protected PointerBuffer(org.lwjgl3.PointerBuffer ver3) { - super(ver3.address(), getContainer(ver3), ver3.position(), ver3.position(), ver3.limit(), ver3.capacity()); - } - - /** - * Allocates a new pointer buffer. - * - *

- * The new buffer's position will be zero, its limit will be its capacity, and its mark will be undefined. - *

- * - * @param capacity the new buffer's capacity, in pointers - * - * @return the new pointer buffer - * - * @throws IllegalArgumentException If the {@code capacity} is a negative integer - */ - public static PointerBuffer allocateDirect(int capacity) { - return new PointerBuffer(org.lwjgl3.PointerBuffer.allocateDirect(capacity)); - } - - /** - * Creates a new PointerBuffer that starts at the specified memory address and has the specified capacity. - * - * @param address the starting memory address - * @param capacity the buffer capacity, in number of pointers - */ - public static PointerBuffer create(long address, int capacity) { - return new PointerBuffer(org.lwjgl3.PointerBuffer.create(address, capacity)); - } - - /** - * Creates a new PointerBuffer using the specified ByteBuffer as its pointer data source. - * - * @param source the source buffer - */ - public static PointerBuffer create(ByteBuffer source) { - return new PointerBuffer(org.lwjgl3.PointerBuffer.create(source)); - } -} diff --git a/src/main/java/org/lwjgl/PointerWrapper.java b/src/main/java/org/lwjgl/PointerWrapper.java deleted file mode 100644 index 981b0ea2b..000000000 --- a/src/main/java/org/lwjgl/PointerWrapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -import org.lwjgl3.system.Pointer; - -/** - * A common interface for classes that wrap pointer addresses. - * - * @author Spasi - */ -public interface PointerWrapper extends Pointer { - - long getPointer(); - - @Override - default long address() { - return getPointer(); - } -} diff --git a/src/main/java/org/lwjgl/PointerWrapperAbstract.java b/src/main/java/org/lwjgl/PointerWrapperAbstract.java deleted file mode 100644 index dadeac868..000000000 --- a/src/main/java/org/lwjgl/PointerWrapperAbstract.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2002-2010 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl; - -/** - * Base PointerWrapper implementation. - * - * @author Spasi - */ -public abstract class PointerWrapperAbstract implements PointerWrapper { - - protected final long pointer; - - protected PointerWrapperAbstract(final long pointer) { - this.pointer = pointer; - } - - /** - * Returns true if this object represents a valid pointer. The pointer might be invalid because it is NULL or - * because some other action has deleted the object that this pointer represents. - * - * @return true if the pointer is valid - */ - public boolean isValid() { - return pointer != 0; - } - - /** - * Checks if the pointer is valid and throws an IllegalStateException if it is not. This method is a NO-OP, unless - * the org.lwjgl3.util.Debug property has been set to true. - */ - public final void checkValid() { - if (LWJGLUtil.DEBUG && !isValid()) - throw new IllegalStateException("This " + getClass().getSimpleName() + " pointer is not valid."); - } - - public final long getPointer() { - checkValid(); - return pointer; - } - - public boolean equals(final Object o) { - if (this == o) return true; - if (!(o instanceof PointerWrapperAbstract)) return false; - - final PointerWrapperAbstract that = (PointerWrapperAbstract) o; - - if (pointer != that.pointer) return false; - - return true; - } - - public int hashCode() { - return (int) (pointer ^ (pointer >>> 32)); - } - - public String toString() { - return getClass().getSimpleName() + " pointer (0x" + Long.toHexString(pointer).toUpperCase() + ")"; - } -} diff --git a/src/main/java/org/lwjgl/Sys.java b/src/main/java/org/lwjgl/Sys.java deleted file mode 100644 index a64971e46..000000000 --- a/src/main/java/org/lwjgl/Sys.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.lwjgl; - -import static org.lwjgl3.glfw.GLFW.glfwInit; - -import java.awt.*; -import java.net.URI; - -import javax.swing.JOptionPane; -import javax.swing.UIManager; - -import org.lwjgl3.Version; -import org.lwjgl3.glfw.GLFW; -import org.lwjgl3.system.Configuration; -import org.lwjgl3.system.Platform; -import org.lwjgl.opengl.Display; - -public class Sys { - - static { - if (Platform.get() == Platform.MACOSX) { - Configuration.GLFW_LIBRARY_NAME.set("glfw_async"); - Configuration.GLFW_CHECK_THREAD0.set(false); - Toolkit.getDefaultToolkit(); - } - if (!glfwInit()) { - throw new IllegalStateException("Unable to initialize glfw"); - } - } - - public static void initialize() {} - - /** Returns the LWJGL version. */ - public static String getVersion() { - return Version.getVersion(); - } - - /** - * Obtains the number of ticks that the hires timer does in a second. This method is fast; it should be called as - * frequently as possible, as it recalibrates the timer. - * - * @return timer resolution in ticks per second or 0 if no timer is present. - */ - public static long getTimerResolution() { - return 1000; - } - - /** - * Gets the current value of the hires timer, in ticks. When the Sys class is first loaded the hires timer is reset - * to 0. If no hires timer is present then this method will always return 0. - *

- * NOTEZ BIEN that the hires timer WILL wrap around. - * - * @return the current hires time, in ticks (always >= 0) - */ - public static long getTime() { - return (long) (GLFW.glfwGetTime() * 1000); - } - - public static long getNanoTime() { - return (long) (GLFW.glfwGetTime() * (1000L * 1000L * 1000L)); - } - - public static boolean openURL(String url) { - if (!Desktop.isDesktopSupported()) return false; - - Desktop desktop = Desktop.getDesktop(); - if (!desktop.isSupported(Desktop.Action.BROWSE)) return false; - - try { - desktop.browse(new URI(url)); - return true; - } catch (Exception ex) { - return false; - } - } - - public static void alert(String title, String message) { - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { - LWJGLUtil.log("Caught exception while setting LAF: " + e); - } - JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); - } - - public static boolean is64Bit() { - return Platform.getArchitecture().toString().endsWith("64"); - } - - public String getClipboard() { - return GLFW.glfwGetClipboardString(Display.getWindow()); - } -} diff --git a/src/main/java/org/lwjgl/input/Cursor.java b/src/main/java/org/lwjgl/input/Cursor.java deleted file mode 100644 index 03c647ea4..000000000 --- a/src/main/java/org/lwjgl/input/Cursor.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.input; - -import java.nio.IntBuffer; - -import org.lwjgl.LWJGLException; - -/** - * - * A class representing a native cursor. Instances of this class can be used with Mouse.setCursor(), if available. - * - * @author elias_naur - * @version $Revision$ $Id$ - */ -public class Cursor { - - /** 1 bit transparency for native cursor */ - public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1; - - /** 8 bit alhpa native cursor */ - public static final int CURSOR_8_BIT_ALPHA = 2; - - /** animation native cursor */ - public static final int CURSOR_ANIMATION = 4; - - /** First element to display */ - private final CursorElement[] cursors; - - /** Index into list of cursors */ - private int index; - - private boolean destroyed; - - /** - * Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create Cursor - * objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported. So to - * maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values. The - * constructor will copy the images and delays, so there's no need to keep them around. - * - * @param width cursor image width - * @param height cursor image height - * @param xHotspot the x coordinate of the cursor hotspot - * @param yHotspot the y coordinate of the cursor hotspot - * @param numImages number of cursor images specified. Must be 1 if animations are not supported. - * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. - * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null - * @throws LWJGLException if the cursor could not be created for any reason - */ - public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) - throws LWJGLException { - // TODO - cursors = null; - } - - /** - * Gets the minimum size of a native cursor. Can only be called if The Mouse is created and cursor caps includes at - * least CURSOR_ONE_BIT_TRANSPARANCY. - * - * @return the maximum size of a native cursor - */ - public static int getMinCursorSize() { - // TODO - return 0; - } - - /** - * Gets the maximum size of a native cursor. Can only be called if The Mouse is created and cursor caps includes at - * least CURSOR_ONE_BIT_TRANSPARANCY. - * - * @return the maximum size of a native cursor - */ - public static int getMaxCursorSize() { - // TODO - return 0; - } - - /** - * Get the capabilities of the native cursor. Return a bit mask of the native cursor capabilities. The - * CURSOR_ONE_BIT_TRANSPARANCY indicates support for cursors with one bit transparancy, the CURSOR_8_BIT_ALPHA - * indicates support for 8 bit alpha and CURSOR_ANIMATION indicates support for cursor animations. - * - * @return A bit mask with native cursor capabilities. - */ - public static int getCapabilities() { - // TODO - return 0; - } - - /** - * Creates the actual cursor, using a platform specific class - */ - private static CursorElement[] createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, - IntBuffer images, IntBuffer delays) throws LWJGLException { - // TODO - return null; - } - - /** - * Convert an IntBuffer image of ARGB format into ABGR - * - * @param imageBuffer image to convert - */ - private static void convertARGBtoABGR(IntBuffer imageBuffer) { - for (int i = 0; i < imageBuffer.limit(); i++) { - int argbColor = imageBuffer.get(i); - - byte alpha = (byte) (argbColor >>> 24); - byte blue = (byte) (argbColor >>> 16); - byte green = (byte) (argbColor >>> 8); - byte red = (byte) argbColor; - - int abgrColor = ((alpha & 0xff) << 24) + ((red & 0xff) << 16) + ((green & 0xff) << 8) + ((blue & 0xff)); - - imageBuffer.put(i, abgrColor); - } - } - - /** - * Flips the images so they're oriented according to opengl - * - * @param width Width of image - * @param height Height of images - * @param numImages How many images to flip - * @param images Source images - * @param images_copy Destination images - */ - private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) { - for (int i = 0; i < numImages; i++) { - int start_index = i * width * height; - flipImage(width, height, start_index, images, images_copy); - } - } - - /** - * @param width Width of image - * @param height Height of images - * @param start_index index into source buffer to copy to - * @param images Source images - * @param images_copy Destination images - */ - private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) { - for (int y = 0; y < height >> 1; y++) { - int index_y_1 = y * width + start_index; - int index_y_2 = (height - y - 1) * width + start_index; - for (int x = 0; x < width; x++) { - int index1 = index_y_1 + x; - int index2 = index_y_2 + x; - int temp_pixel = images.get(index1 + images.position()); - images_copy.put(index1, images.get(index2 + images.position())); - images_copy.put(index2, temp_pixel); - } - } - } - - /** - * Gets the native handle associated with the cursor object. - */ - Object getHandle() { - checkValid(); - return cursors[index].cursorHandle; - } - - private void checkValid() { - if (destroyed) throw new IllegalStateException("The cursor is destroyed"); - } - - /** - * Destroy the native cursor. If the cursor is current, the current native cursor is set to null (the default OS - * cursor) - */ - public void destroy() { - // TODO - } - - /** - * Sets the timout property to the time it should be changed - */ - protected void setTimeout() { - checkValid(); - cursors[index].timeout = System.currentTimeMillis() + cursors[index].delay; - } - - /** - * Determines whether this cursor has timed out - * - * @return true if the this cursor has timed out, false if not - */ - protected boolean hasTimedOut() { - checkValid(); - return cursors.length > 1 && cursors[index].timeout < System.currentTimeMillis(); - } - - /** - * Changes to the next cursor - */ - protected void nextCursor() { - checkValid(); - index = ++index % cursors.length; - } - - /** - * A single cursor element, used when animating - */ - private static class CursorElement { - - /** Handle to cursor */ - final Object cursorHandle; - - /** How long a delay this element should have */ - final long delay; - - /** Absolute time this element times out */ - long timeout; - - CursorElement(Object cursorHandle, long delay, long timeout) { - this.cursorHandle = cursorHandle; - this.delay = delay; - this.timeout = timeout; - } - } -} diff --git a/src/main/java/org/lwjgl/input/EventQueue.java b/src/main/java/org/lwjgl/input/EventQueue.java deleted file mode 100644 index e24c8e1c8..000000000 --- a/src/main/java/org/lwjgl/input/EventQueue.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.lwjgl.input; - -/** - * Internal utility class to keep track of event positions in an array. When the array is full the position will wrap to - * the beginning. - */ -class EventQueue { - - private int maxEvents = 32; - private int eventCount = 0; - private int readEventPos = 0; - private int writeEventPos = 1; - private long lastDroppedMessageMs = 0; - - EventQueue(int maxEvents) { - this.maxEvents = maxEvents; - } - - /** - * add event to the queue - */ - synchronized void add() { - eventCount++; // increment event count - if (eventCount > maxEvents) { - eventCount = maxEvents; // cap max events - long ms = System.currentTimeMillis(); - if (ms - lastDroppedMessageMs > 1000) { - lastDroppedMessageMs = ms; - System.out.println("Dropping LWJGL input events due to not frequent enough polling"); - } - } - - writeEventPos++; // increment next event position - if (writeEventPos >= maxEvents) writeEventPos = 0; // wrap next event position - - if (writeEventPos == readEventPos) { - readEventPos++; - eventCount--; - } // skip oldest event is queue full - if (readEventPos >= maxEvents) readEventPos = 0; // wrap current event position - } - - /** - * Increment the event queue - * - * @return - true if there is an event available - */ - synchronized boolean next() { - if (eventCount == 0) return false; - - eventCount--; // decrement event count - readEventPos++; // increment current event position - if (readEventPos >= maxEvents) readEventPos = 0; // wrap current event position - - return true; - } - - int getEventCount() { - return eventCount; - } - - int getMaxEvents() { - return maxEvents; - } - - int getCurrentPos() { - return readEventPos; - } - - int getNextPos() { - return writeEventPos; - } -} diff --git a/src/main/java/org/lwjgl/input/KeyCodes.java b/src/main/java/org/lwjgl/input/KeyCodes.java deleted file mode 100644 index 05180f144..000000000 --- a/src/main/java/org/lwjgl/input/KeyCodes.java +++ /dev/null @@ -1,302 +0,0 @@ -package org.lwjgl.input; - -import org.lwjgl3.glfw.GLFW; - -public class KeyCodes { - - public static int toLwjglKey(int glfwKeyCode) { - if (glfwKeyCode > GLFW.GLFW_KEY_LAST) { - return glfwKeyCode; - } - return switch (glfwKeyCode) { - case GLFW.GLFW_KEY_UNKNOWN -> Keyboard.KEY_UNLABELED; // arbitrary mapping to fix text input here - case GLFW.GLFW_KEY_ESCAPE -> Keyboard.KEY_ESCAPE; - case GLFW.GLFW_KEY_BACKSPACE -> Keyboard.KEY_BACK; - case GLFW.GLFW_KEY_TAB -> Keyboard.KEY_TAB; - case GLFW.GLFW_KEY_ENTER -> Keyboard.KEY_RETURN; - case GLFW.GLFW_KEY_SPACE -> Keyboard.KEY_SPACE; - case GLFW.GLFW_KEY_LEFT_CONTROL -> Keyboard.KEY_LCONTROL; - case GLFW.GLFW_KEY_LEFT_SHIFT -> Keyboard.KEY_LSHIFT; - case GLFW.GLFW_KEY_LEFT_ALT -> Keyboard.KEY_LMENU; - case GLFW.GLFW_KEY_LEFT_SUPER -> Keyboard.KEY_LMETA; - case GLFW.GLFW_KEY_RIGHT_CONTROL -> Keyboard.KEY_RCONTROL; - case GLFW.GLFW_KEY_RIGHT_SHIFT -> Keyboard.KEY_RSHIFT; - case GLFW.GLFW_KEY_RIGHT_ALT -> Keyboard.KEY_RMENU; - case GLFW.GLFW_KEY_RIGHT_SUPER -> Keyboard.KEY_RMETA; - case GLFW.GLFW_KEY_1 -> Keyboard.KEY_1; - case GLFW.GLFW_KEY_2 -> Keyboard.KEY_2; - case GLFW.GLFW_KEY_3 -> Keyboard.KEY_3; - case GLFW.GLFW_KEY_4 -> Keyboard.KEY_4; - case GLFW.GLFW_KEY_5 -> Keyboard.KEY_5; - case GLFW.GLFW_KEY_6 -> Keyboard.KEY_6; - case GLFW.GLFW_KEY_7 -> Keyboard.KEY_7; - case GLFW.GLFW_KEY_8 -> Keyboard.KEY_8; - case GLFW.GLFW_KEY_9 -> Keyboard.KEY_9; - case GLFW.GLFW_KEY_0 -> Keyboard.KEY_0; - case GLFW.GLFW_KEY_A -> Keyboard.KEY_A; - case GLFW.GLFW_KEY_B -> Keyboard.KEY_B; - case GLFW.GLFW_KEY_C -> Keyboard.KEY_C; - case GLFW.GLFW_KEY_D -> Keyboard.KEY_D; - case GLFW.GLFW_KEY_E -> Keyboard.KEY_E; - case GLFW.GLFW_KEY_F -> Keyboard.KEY_F; - case GLFW.GLFW_KEY_G -> Keyboard.KEY_G; - case GLFW.GLFW_KEY_H -> Keyboard.KEY_H; - case GLFW.GLFW_KEY_I -> Keyboard.KEY_I; - case GLFW.GLFW_KEY_J -> Keyboard.KEY_J; - case GLFW.GLFW_KEY_K -> Keyboard.KEY_K; - case GLFW.GLFW_KEY_L -> Keyboard.KEY_L; - case GLFW.GLFW_KEY_M -> Keyboard.KEY_M; - case GLFW.GLFW_KEY_N -> Keyboard.KEY_N; - case GLFW.GLFW_KEY_O -> Keyboard.KEY_O; - case GLFW.GLFW_KEY_P -> Keyboard.KEY_P; - case GLFW.GLFW_KEY_Q -> Keyboard.KEY_Q; - case GLFW.GLFW_KEY_R -> Keyboard.KEY_R; - case GLFW.GLFW_KEY_S -> Keyboard.KEY_S; - case GLFW.GLFW_KEY_T -> Keyboard.KEY_T; - case GLFW.GLFW_KEY_U -> Keyboard.KEY_U; - case GLFW.GLFW_KEY_V -> Keyboard.KEY_V; - case GLFW.GLFW_KEY_W -> Keyboard.KEY_W; - case GLFW.GLFW_KEY_X -> Keyboard.KEY_X; - case GLFW.GLFW_KEY_Y -> Keyboard.KEY_Y; - case GLFW.GLFW_KEY_Z -> Keyboard.KEY_Z; - case GLFW.GLFW_KEY_UP -> Keyboard.KEY_UP; - case GLFW.GLFW_KEY_DOWN -> Keyboard.KEY_DOWN; - case GLFW.GLFW_KEY_LEFT -> Keyboard.KEY_LEFT; - case GLFW.GLFW_KEY_RIGHT -> Keyboard.KEY_RIGHT; - case GLFW.GLFW_KEY_INSERT -> Keyboard.KEY_INSERT; - case GLFW.GLFW_KEY_DELETE -> Keyboard.KEY_DELETE; - case GLFW.GLFW_KEY_HOME -> Keyboard.KEY_HOME; - case GLFW.GLFW_KEY_END -> Keyboard.KEY_END; - case GLFW.GLFW_KEY_PAGE_UP -> Keyboard.KEY_PRIOR; - case GLFW.GLFW_KEY_PAGE_DOWN -> Keyboard.KEY_NEXT; - case GLFW.GLFW_KEY_F1 -> Keyboard.KEY_F1; - case GLFW.GLFW_KEY_F2 -> Keyboard.KEY_F2; - case GLFW.GLFW_KEY_F3 -> Keyboard.KEY_F3; - case GLFW.GLFW_KEY_F4 -> Keyboard.KEY_F4; - case GLFW.GLFW_KEY_F5 -> Keyboard.KEY_F5; - case GLFW.GLFW_KEY_F6 -> Keyboard.KEY_F6; - case GLFW.GLFW_KEY_F7 -> Keyboard.KEY_F7; - case GLFW.GLFW_KEY_F8 -> Keyboard.KEY_F8; - case GLFW.GLFW_KEY_F9 -> Keyboard.KEY_F9; - case GLFW.GLFW_KEY_F10 -> Keyboard.KEY_F10; - case GLFW.GLFW_KEY_F11 -> Keyboard.KEY_F11; - case GLFW.GLFW_KEY_F12 -> Keyboard.KEY_F12; - case GLFW.GLFW_KEY_F13 -> Keyboard.KEY_F13; - case GLFW.GLFW_KEY_F14 -> Keyboard.KEY_F14; - case GLFW.GLFW_KEY_F15 -> Keyboard.KEY_F15; - case GLFW.GLFW_KEY_F16 -> Keyboard.KEY_F16; - case GLFW.GLFW_KEY_F17 -> Keyboard.KEY_F17; - case GLFW.GLFW_KEY_F18 -> Keyboard.KEY_F18; - case GLFW.GLFW_KEY_F19 -> Keyboard.KEY_F19; - case GLFW.GLFW_KEY_KP_1 -> Keyboard.KEY_NUMPAD1; - case GLFW.GLFW_KEY_KP_2 -> Keyboard.KEY_NUMPAD2; - case GLFW.GLFW_KEY_KP_3 -> Keyboard.KEY_NUMPAD3; - case GLFW.GLFW_KEY_KP_4 -> Keyboard.KEY_NUMPAD4; - case GLFW.GLFW_KEY_KP_5 -> Keyboard.KEY_NUMPAD5; - case GLFW.GLFW_KEY_KP_6 -> Keyboard.KEY_NUMPAD6; - case GLFW.GLFW_KEY_KP_7 -> Keyboard.KEY_NUMPAD7; - case GLFW.GLFW_KEY_KP_8 -> Keyboard.KEY_NUMPAD8; - case GLFW.GLFW_KEY_KP_9 -> Keyboard.KEY_NUMPAD9; - case GLFW.GLFW_KEY_KP_0 -> Keyboard.KEY_NUMPAD0; - case GLFW.GLFW_KEY_KP_ADD -> Keyboard.KEY_ADD; - case GLFW.GLFW_KEY_KP_SUBTRACT -> Keyboard.KEY_SUBTRACT; - case GLFW.GLFW_KEY_KP_MULTIPLY -> Keyboard.KEY_MULTIPLY; - case GLFW.GLFW_KEY_KP_DIVIDE -> Keyboard.KEY_DIVIDE; - case GLFW.GLFW_KEY_KP_DECIMAL -> Keyboard.KEY_DECIMAL; - case GLFW.GLFW_KEY_KP_EQUAL -> Keyboard.KEY_NUMPADEQUALS; - case GLFW.GLFW_KEY_KP_ENTER -> Keyboard.KEY_NUMPADENTER; - case GLFW.GLFW_KEY_NUM_LOCK -> Keyboard.KEY_NUMLOCK; - case GLFW.GLFW_KEY_SEMICOLON -> Keyboard.KEY_SEMICOLON; - case GLFW.GLFW_KEY_BACKSLASH -> Keyboard.KEY_BACKSLASH; - case GLFW.GLFW_KEY_COMMA -> Keyboard.KEY_COMMA; - case GLFW.GLFW_KEY_PERIOD -> Keyboard.KEY_PERIOD; - case GLFW.GLFW_KEY_SLASH -> Keyboard.KEY_SLASH; - case GLFW.GLFW_KEY_GRAVE_ACCENT -> Keyboard.KEY_GRAVE; - case GLFW.GLFW_KEY_CAPS_LOCK -> Keyboard.KEY_CAPITAL; - case GLFW.GLFW_KEY_SCROLL_LOCK -> Keyboard.KEY_SCROLL; - case GLFW.GLFW_KEY_WORLD_1 -> Keyboard.KEY_CIRCUMFLEX; // "World" keys could be anything depending on - // keyboard layout, pick something arbitrary - case GLFW.GLFW_KEY_WORLD_2 -> Keyboard.KEY_YEN; - case GLFW.GLFW_KEY_PAUSE -> Keyboard.KEY_PAUSE; - case GLFW.GLFW_KEY_MINUS -> Keyboard.KEY_MINUS; - case GLFW.GLFW_KEY_EQUAL -> Keyboard.KEY_EQUALS; - case GLFW.GLFW_KEY_LEFT_BRACKET -> Keyboard.KEY_LBRACKET; - case GLFW.GLFW_KEY_RIGHT_BRACKET -> Keyboard.KEY_RBRACKET; - case GLFW.GLFW_KEY_APOSTROPHE -> Keyboard.KEY_APOSTROPHE; - // public static final int KEY_AT = 0x91; /* (NEC PC98) */ - // public static final int KEY_COLON = 0x92; /* (NEC PC98) */ - // public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ - - // public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ - // public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ - // public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ - // public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ - // public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ - // public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ - // public static final int KEY_STOP = 0x95; /* (NEC PC98) */ - // public static final int KEY_AX = 0x96; /* (Japan AX) */ - // public static final int KEY_UNLABELED = 0x97; /* (J3100) */ - // public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ - // public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ - // public static final int KEY_SYSRQ = 0xB7; - // public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ - // public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ - - // public static final int KEY_APPS = 0xDD; /* AppMenu key */ - // public static final int KEY_POWER = 0xDE; - // public static final int KEY_SLEEP = 0xDF; - - default -> Keyboard.KEY_NONE; - }; - } - - public static int toGlfwKey(int lwjglKeyCode) { - if (lwjglKeyCode > GLFW.GLFW_KEY_LAST) { - return lwjglKeyCode; - } - return switch (lwjglKeyCode) { - case Keyboard.KEY_NONE -> 0; - case Keyboard.KEY_UNLABELED -> GLFW.GLFW_KEY_UNKNOWN; // arbitrary mapping to fix text input here - case Keyboard.KEY_ESCAPE -> GLFW.GLFW_KEY_ESCAPE; - case Keyboard.KEY_BACK -> GLFW.GLFW_KEY_BACKSPACE; - case Keyboard.KEY_TAB -> GLFW.GLFW_KEY_TAB; - case Keyboard.KEY_RETURN -> GLFW.GLFW_KEY_ENTER; - case Keyboard.KEY_SPACE -> GLFW.GLFW_KEY_SPACE; - case Keyboard.KEY_LCONTROL -> GLFW.GLFW_KEY_LEFT_CONTROL; - case Keyboard.KEY_LSHIFT -> GLFW.GLFW_KEY_LEFT_SHIFT; - case Keyboard.KEY_LMENU -> GLFW.GLFW_KEY_LEFT_ALT; - case Keyboard.KEY_LMETA -> GLFW.GLFW_KEY_LEFT_SUPER; - case Keyboard.KEY_RCONTROL -> GLFW.GLFW_KEY_RIGHT_CONTROL; - case Keyboard.KEY_RSHIFT -> GLFW.GLFW_KEY_RIGHT_SHIFT; - case Keyboard.KEY_RMENU -> GLFW.GLFW_KEY_RIGHT_ALT; - case Keyboard.KEY_RMETA -> GLFW.GLFW_KEY_RIGHT_SUPER; - case Keyboard.KEY_1 -> GLFW.GLFW_KEY_1; - case Keyboard.KEY_2 -> GLFW.GLFW_KEY_2; - case Keyboard.KEY_3 -> GLFW.GLFW_KEY_3; - case Keyboard.KEY_4 -> GLFW.GLFW_KEY_4; - case Keyboard.KEY_5 -> GLFW.GLFW_KEY_5; - case Keyboard.KEY_6 -> GLFW.GLFW_KEY_6; - case Keyboard.KEY_7 -> GLFW.GLFW_KEY_7; - case Keyboard.KEY_8 -> GLFW.GLFW_KEY_8; - case Keyboard.KEY_9 -> GLFW.GLFW_KEY_9; - case Keyboard.KEY_0 -> GLFW.GLFW_KEY_0; - case Keyboard.KEY_A -> GLFW.GLFW_KEY_A; - case Keyboard.KEY_B -> GLFW.GLFW_KEY_B; - case Keyboard.KEY_C -> GLFW.GLFW_KEY_C; - case Keyboard.KEY_D -> GLFW.GLFW_KEY_D; - case Keyboard.KEY_E -> GLFW.GLFW_KEY_E; - case Keyboard.KEY_F -> GLFW.GLFW_KEY_F; - case Keyboard.KEY_G -> GLFW.GLFW_KEY_G; - case Keyboard.KEY_H -> GLFW.GLFW_KEY_H; - case Keyboard.KEY_I -> GLFW.GLFW_KEY_I; - case Keyboard.KEY_J -> GLFW.GLFW_KEY_J; - case Keyboard.KEY_K -> GLFW.GLFW_KEY_K; - case Keyboard.KEY_L -> GLFW.GLFW_KEY_L; - case Keyboard.KEY_M -> GLFW.GLFW_KEY_M; - case Keyboard.KEY_N -> GLFW.GLFW_KEY_N; - case Keyboard.KEY_O -> GLFW.GLFW_KEY_O; - case Keyboard.KEY_P -> GLFW.GLFW_KEY_P; - case Keyboard.KEY_Q -> GLFW.GLFW_KEY_Q; - case Keyboard.KEY_R -> GLFW.GLFW_KEY_R; - case Keyboard.KEY_S -> GLFW.GLFW_KEY_S; - case Keyboard.KEY_T -> GLFW.GLFW_KEY_T; - case Keyboard.KEY_U -> GLFW.GLFW_KEY_U; - case Keyboard.KEY_V -> GLFW.GLFW_KEY_V; - case Keyboard.KEY_W -> GLFW.GLFW_KEY_W; - case Keyboard.KEY_X -> GLFW.GLFW_KEY_X; - case Keyboard.KEY_Y -> GLFW.GLFW_KEY_Y; - case Keyboard.KEY_Z -> GLFW.GLFW_KEY_Z; - case Keyboard.KEY_UP -> GLFW.GLFW_KEY_UP; - case Keyboard.KEY_DOWN -> GLFW.GLFW_KEY_DOWN; - case Keyboard.KEY_LEFT -> GLFW.GLFW_KEY_LEFT; - case Keyboard.KEY_RIGHT -> GLFW.GLFW_KEY_RIGHT; - case Keyboard.KEY_INSERT -> GLFW.GLFW_KEY_INSERT; - case Keyboard.KEY_DELETE -> GLFW.GLFW_KEY_DELETE; - case Keyboard.KEY_HOME -> GLFW.GLFW_KEY_HOME; - case Keyboard.KEY_END -> GLFW.GLFW_KEY_END; - case Keyboard.KEY_PRIOR -> GLFW.GLFW_KEY_PAGE_UP; - case Keyboard.KEY_NEXT -> GLFW.GLFW_KEY_PAGE_DOWN; - case Keyboard.KEY_F1 -> GLFW.GLFW_KEY_F1; - case Keyboard.KEY_F2 -> GLFW.GLFW_KEY_F2; - case Keyboard.KEY_F3 -> GLFW.GLFW_KEY_F3; - case Keyboard.KEY_F4 -> GLFW.GLFW_KEY_F4; - case Keyboard.KEY_F5 -> GLFW.GLFW_KEY_F5; - case Keyboard.KEY_F6 -> GLFW.GLFW_KEY_F6; - case Keyboard.KEY_F7 -> GLFW.GLFW_KEY_F7; - case Keyboard.KEY_F8 -> GLFW.GLFW_KEY_F8; - case Keyboard.KEY_F9 -> GLFW.GLFW_KEY_F9; - case Keyboard.KEY_F10 -> GLFW.GLFW_KEY_F10; - case Keyboard.KEY_F11 -> GLFW.GLFW_KEY_F11; - case Keyboard.KEY_F12 -> GLFW.GLFW_KEY_F12; - case Keyboard.KEY_F13 -> GLFW.GLFW_KEY_F13; - case Keyboard.KEY_F14 -> GLFW.GLFW_KEY_F14; - case Keyboard.KEY_F15 -> GLFW.GLFW_KEY_F15; - case Keyboard.KEY_F16 -> GLFW.GLFW_KEY_F16; - case Keyboard.KEY_F17 -> GLFW.GLFW_KEY_F17; - case Keyboard.KEY_F18 -> GLFW.GLFW_KEY_F18; - case Keyboard.KEY_F19 -> GLFW.GLFW_KEY_F19; - case Keyboard.KEY_NUMPAD1 -> GLFW.GLFW_KEY_KP_1; - case Keyboard.KEY_NUMPAD2 -> GLFW.GLFW_KEY_KP_2; - case Keyboard.KEY_NUMPAD3 -> GLFW.GLFW_KEY_KP_3; - case Keyboard.KEY_NUMPAD4 -> GLFW.GLFW_KEY_KP_4; - case Keyboard.KEY_NUMPAD5 -> GLFW.GLFW_KEY_KP_5; - case Keyboard.KEY_NUMPAD6 -> GLFW.GLFW_KEY_KP_6; - case Keyboard.KEY_NUMPAD7 -> GLFW.GLFW_KEY_KP_7; - case Keyboard.KEY_NUMPAD8 -> GLFW.GLFW_KEY_KP_8; - case Keyboard.KEY_NUMPAD9 -> GLFW.GLFW_KEY_KP_9; - case Keyboard.KEY_NUMPAD0 -> GLFW.GLFW_KEY_KP_0; - case Keyboard.KEY_ADD -> GLFW.GLFW_KEY_KP_ADD; - case Keyboard.KEY_SUBTRACT -> GLFW.GLFW_KEY_KP_SUBTRACT; - case Keyboard.KEY_MULTIPLY -> GLFW.GLFW_KEY_KP_MULTIPLY; - case Keyboard.KEY_DIVIDE -> GLFW.GLFW_KEY_KP_DIVIDE; - case Keyboard.KEY_DECIMAL -> GLFW.GLFW_KEY_KP_DECIMAL; - case Keyboard.KEY_NUMPADEQUALS -> GLFW.GLFW_KEY_KP_EQUAL; - case Keyboard.KEY_NUMPADENTER -> GLFW.GLFW_KEY_KP_ENTER; - case Keyboard.KEY_NUMLOCK -> GLFW.GLFW_KEY_NUM_LOCK; - case Keyboard.KEY_SEMICOLON -> GLFW.GLFW_KEY_SEMICOLON; - case Keyboard.KEY_BACKSLASH -> GLFW.GLFW_KEY_BACKSLASH; - case Keyboard.KEY_COMMA -> GLFW.GLFW_KEY_COMMA; - case Keyboard.KEY_PERIOD -> GLFW.GLFW_KEY_PERIOD; - case Keyboard.KEY_SLASH -> GLFW.GLFW_KEY_SLASH; - case Keyboard.KEY_GRAVE -> GLFW.GLFW_KEY_GRAVE_ACCENT; - case Keyboard.KEY_CAPITAL -> GLFW.GLFW_KEY_CAPS_LOCK; - case Keyboard.KEY_SCROLL -> GLFW.GLFW_KEY_SCROLL_LOCK; - case Keyboard.KEY_PAUSE -> GLFW.GLFW_KEY_PAUSE; - case Keyboard.KEY_CIRCUMFLEX -> GLFW.GLFW_KEY_WORLD_1; // "World" keys could be anything depending on - // keyboard layout, pick something arbitrary - case Keyboard.KEY_YEN -> GLFW.GLFW_KEY_WORLD_2; - - case Keyboard.KEY_MINUS -> GLFW.GLFW_KEY_MINUS; - case Keyboard.KEY_EQUALS -> GLFW.GLFW_KEY_EQUAL; - case Keyboard.KEY_LBRACKET -> GLFW.GLFW_KEY_LEFT_BRACKET; - case Keyboard.KEY_RBRACKET -> GLFW.GLFW_KEY_RIGHT_BRACKET; - case Keyboard.KEY_APOSTROPHE -> GLFW.GLFW_KEY_APOSTROPHE; - // public static final int KEY_AT = 0x91; /* (NEC PC98) */ - // public static final int KEY_COLON = 0x92; /* (NEC PC98) */ - // public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ - - // public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ - // public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ - // public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ - // public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ - - // public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ - // public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ - // public static final int KEY_STOP = 0x95; /* (NEC PC98) */ - // public static final int KEY_AX = 0x96; /* (Japan AX) */ - // public static final int KEY_UNLABELED = 0x97; /* (J3100) */ - // public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ - // public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ - // public static final int KEY_SYSRQ = 0xB7; - // public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ - - // public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ - - // public static final int KEY_APPS = 0xDD; /* AppMenu key */ - // public static final int KEY_POWER = 0xDE; - // public static final int KEY_SLEEP = 0xDF; - - default -> GLFW.GLFW_KEY_UNKNOWN; - }; - } -} diff --git a/src/main/java/org/lwjgl/input/KeyEvent.java b/src/main/java/org/lwjgl/input/KeyEvent.java deleted file mode 100644 index 5ef3bb182..000000000 --- a/src/main/java/org/lwjgl/input/KeyEvent.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.lwjgl.input; - -public class KeyEvent { - - public int key; - public char aChar; - public KeyState state; - public long nano; - - public KeyEvent(int key, char c, KeyState state, long nano) { - this.key = key; - this.aChar = c; - this.state = state; - this.nano = nano; - } -} diff --git a/src/main/java/org/lwjgl/input/KeyState.java b/src/main/java/org/lwjgl/input/KeyState.java deleted file mode 100644 index 5bfe3ede6..000000000 --- a/src/main/java/org/lwjgl/input/KeyState.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.input; - -public enum KeyState { - - PRESS(true), - RELEASE(false), - REPEAT(true); - - public final boolean isPressed; - - KeyState(boolean isPressed) { - this.isPressed = isPressed; - } -} diff --git a/src/main/java/org/lwjgl/input/Keyboard.java b/src/main/java/org/lwjgl/input/Keyboard.java deleted file mode 100644 index 6a5443bdf..000000000 --- a/src/main/java/org/lwjgl/input/Keyboard.java +++ /dev/null @@ -1,313 +0,0 @@ -package org.lwjgl.input; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.HashMap; -import java.util.Map; -import java.util.Queue; -import java.util.concurrent.ArrayBlockingQueue; - -import org.apache.commons.lang3.StringUtils; -import org.lwjgl3.glfw.GLFW; -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; -import org.lwjgl.opengl.Display; - -public class Keyboard { - - /** - * The special character meaning that no character was translated for the event. - */ - public static final int CHAR_NONE = '\0'; - - /** - * The special keycode meaning that only the translated character is valid. - */ - public static final int KEY_NONE = 0x00; - - public static final int KEY_ESCAPE = 0x01; - public static final int KEY_1 = 0x02; - public static final int KEY_2 = 0x03; - public static final int KEY_3 = 0x04; - public static final int KEY_4 = 0x05; - public static final int KEY_5 = 0x06; - public static final int KEY_6 = 0x07; - public static final int KEY_7 = 0x08; - public static final int KEY_8 = 0x09; - public static final int KEY_9 = 0x0A; - public static final int KEY_0 = 0x0B; - public static final int KEY_MINUS = 0x0C; /* - on main keyboard */ - public static final int KEY_EQUALS = 0x0D; - public static final int KEY_BACK = 0x0E; /* backspace */ - public static final int KEY_TAB = 0x0F; - public static final int KEY_Q = 0x10; - public static final int KEY_W = 0x11; - public static final int KEY_E = 0x12; - public static final int KEY_R = 0x13; - public static final int KEY_T = 0x14; - public static final int KEY_Y = 0x15; - public static final int KEY_U = 0x16; - public static final int KEY_I = 0x17; - public static final int KEY_O = 0x18; - public static final int KEY_P = 0x19; - public static final int KEY_LBRACKET = 0x1A; - public static final int KEY_RBRACKET = 0x1B; - public static final int KEY_RETURN = 0x1C; /* Enter on main keyboard */ - public static final int KEY_LCONTROL = 0x1D; - public static final int KEY_A = 0x1E; - public static final int KEY_S = 0x1F; - public static final int KEY_D = 0x20; - public static final int KEY_F = 0x21; - public static final int KEY_G = 0x22; - public static final int KEY_H = 0x23; - public static final int KEY_J = 0x24; - public static final int KEY_K = 0x25; - public static final int KEY_L = 0x26; - public static final int KEY_SEMICOLON = 0x27; - public static final int KEY_APOSTROPHE = 0x28; - public static final int KEY_GRAVE = 0x29; /* accent grave */ - public static final int KEY_LSHIFT = 0x2A; - public static final int KEY_BACKSLASH = 0x2B; - public static final int KEY_Z = 0x2C; - public static final int KEY_X = 0x2D; - public static final int KEY_C = 0x2E; - public static final int KEY_V = 0x2F; - public static final int KEY_B = 0x30; - public static final int KEY_N = 0x31; - public static final int KEY_M = 0x32; - public static final int KEY_COMMA = 0x33; - public static final int KEY_PERIOD = 0x34; /* . on main keyboard */ - public static final int KEY_SLASH = 0x35; /* / on main keyboard */ - public static final int KEY_RSHIFT = 0x36; - public static final int KEY_MULTIPLY = 0x37; /* * on numeric keypad */ - public static final int KEY_LMENU = 0x38; /* left Alt */ - public static final int KEY_SPACE = 0x39; - public static final int KEY_CAPITAL = 0x3A; - public static final int KEY_F1 = 0x3B; - public static final int KEY_F2 = 0x3C; - public static final int KEY_F3 = 0x3D; - public static final int KEY_F4 = 0x3E; - public static final int KEY_F5 = 0x3F; - public static final int KEY_F6 = 0x40; - public static final int KEY_F7 = 0x41; - public static final int KEY_F8 = 0x42; - public static final int KEY_F9 = 0x43; - public static final int KEY_F10 = 0x44; - public static final int KEY_NUMLOCK = 0x45; - public static final int KEY_SCROLL = 0x46; /* Scroll Lock */ - public static final int KEY_NUMPAD7 = 0x47; - public static final int KEY_NUMPAD8 = 0x48; - public static final int KEY_NUMPAD9 = 0x49; - public static final int KEY_SUBTRACT = 0x4A; /* - on numeric keypad */ - public static final int KEY_NUMPAD4 = 0x4B; - public static final int KEY_NUMPAD5 = 0x4C; - public static final int KEY_NUMPAD6 = 0x4D; - public static final int KEY_ADD = 0x4E; /* + on numeric keypad */ - public static final int KEY_NUMPAD1 = 0x4F; - public static final int KEY_NUMPAD2 = 0x50; - public static final int KEY_NUMPAD3 = 0x51; - public static final int KEY_NUMPAD0 = 0x52; - public static final int KEY_DECIMAL = 0x53; /* . on numeric keypad */ - public static final int KEY_F11 = 0x57; - public static final int KEY_F12 = 0x58; - public static final int KEY_F13 = 0x64; /* (NEC PC98) */ - public static final int KEY_F14 = 0x65; /* (NEC PC98) */ - public static final int KEY_F15 = 0x66; /* (NEC PC98) */ - public static final int KEY_F16 = 0x67; /* Extended Function keys - (Mac) */ - public static final int KEY_F17 = 0x68; - public static final int KEY_F18 = 0x69; - public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ - public static final int KEY_F19 = 0x71; /* Extended Function keys - (Mac) */ - public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ - public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ - public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ - public static final int KEY_NUMPADEQUALS = 0x8D; /* = on numeric keypad (NEC PC98) */ - public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ - public static final int KEY_AT = 0x91; /* (NEC PC98) */ - public static final int KEY_COLON = 0x92; /* (NEC PC98) */ - public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ - public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ - public static final int KEY_STOP = 0x95; /* (NEC PC98) */ - public static final int KEY_AX = 0x96; /* (Japan AX) */ - public static final int KEY_UNLABELED = 0x97; /* (J3100) */ - public static final int KEY_NUMPADENTER = 0x9C; /* Enter on numeric keypad */ - public static final int KEY_RCONTROL = 0x9D; - public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ - public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ - public static final int KEY_DIVIDE = 0xB5; /* / on numeric keypad */ - public static final int KEY_SYSRQ = 0xB7; - public static final int KEY_RMENU = 0xB8; /* right Alt */ - public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ - public static final int KEY_PAUSE = 0xC5; /* Pause */ - public static final int KEY_HOME = 0xC7; /* Home on arrow keypad */ - public static final int KEY_UP = 0xC8; /* UpArrow on arrow keypad */ - public static final int KEY_PRIOR = 0xC9; /* PgUp on arrow keypad */ - public static final int KEY_LEFT = 0xCB; /* LeftArrow on arrow keypad */ - public static final int KEY_RIGHT = 0xCD; /* RightArrow on arrow keypad */ - public static final int KEY_END = 0xCF; /* End on arrow keypad */ - public static final int KEY_DOWN = 0xD0; /* DownArrow on arrow keypad */ - public static final int KEY_NEXT = 0xD1; /* PgDn on arrow keypad */ - public static final int KEY_INSERT = 0xD2; /* Insert on arrow keypad */ - public static final int KEY_DELETE = 0xD3; /* Delete on arrow keypad */ - public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ - public static final int KEY_LMETA = 0xDB; /* Left Windows/Option key */ - public static final int KEY_LWIN = KEY_LMETA; /* Left Windows key */ - public static final int KEY_RMETA = 0xDC; /* Right Windows/Option key */ - public static final int KEY_RWIN = KEY_RMETA; /* Right Windows key */ - public static final int KEY_APPS = 0xDD; /* AppMenu key */ - public static final int KEY_POWER = 0xDE; - public static final int KEY_SLEEP = 0xDF; - - public static final int keyCount; - private static final Queue queue = new ArrayBlockingQueue<>(128); - - - private static boolean doRepeatEvents = true; - - public static final int KEYBOARD_SIZE = Short.MAX_VALUE; - - private static final String[] keyName = new String[Short.MAX_VALUE]; - private static final Map keyMap = new HashMap<>(Short.MAX_VALUE); - - static { - // Use reflection to find out key names - Field[] fields = Keyboard.class.getFields(); - int keyCounter = 0; - try { - for (Field field : fields) { - if (Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers()) - && Modifier.isFinal(field.getModifiers()) - && field.getType().equals(int.class) - && field.getName().startsWith("KEY_") - && !field.getName().endsWith("WIN")) { - /* Don't use deprecated names */ - int key = field.getInt(null); - String name = field.getName().substring(4); - keyName[key] = name; - keyCounter++; - } - } - } catch (Exception e) {} - keyCount = keyCounter; - for (int i = 0; i < keyName.length; i++) { - if (keyName[i] == null) { - keyName[i] = "Key " + i; - } - keyMap.put(keyName[i], i); - } - queue.add(new KeyEvent(0, '\0', KeyState.RELEASE, Sys.getNanoTime())); - } - - public static void addGlfwKeyEvent(long window, int key, int scancode, int action, int mods, char c) { - final KeyState state; - switch (action) { - case GLFW.GLFW_PRESS -> state = KeyState.PRESS; - case GLFW.GLFW_RELEASE -> state = KeyState.RELEASE; - case GLFW.GLFW_REPEAT -> { - state = KeyState.REPEAT; - if (!doRepeatEvents) { - return; - } - } - default -> state = KeyState.RELEASE; - } - try { - queue.add(new KeyEvent(KeyCodes.toLwjglKey(key), c, state, Sys.getNanoTime())); - } catch (IllegalStateException ignored) {} - } - - public static void addKeyEvent(int key, boolean pressed) { - try { - queue.add(new KeyEvent(key, '\0', pressed ? KeyState.PRESS : KeyState.RELEASE, Sys.getNanoTime())); - } catch (IllegalStateException ignored) {} - } - public static void addKeyEvent(KeyEvent event) { - try { - queue.add(event); - } catch (IllegalStateException ignored) {} - } - - public static void addCharEvent(int key, char c) { - try { - queue.add(new KeyEvent(KEY_NONE, c, KeyState.PRESS, Sys.getNanoTime())); - } catch (IllegalStateException ignored) {} - } - - public static void create() throws LWJGLException {} - - public static boolean isKeyDown(int key) { - return GLFW.glfwGetKey(Display.getWindow(), KeyCodes.toGlfwKey(key)) == GLFW.GLFW_PRESS; - } - - public static void poll() { - // no-op - } - - public static void enableRepeatEvents(boolean enable) { - doRepeatEvents = enable; - } - - public static boolean areRepeatEventsEnabled() { - return doRepeatEvents; - } - - public static int getKeyCount() { - return keyCount; - } - - public static int getNumKeyboardEvents() { - return queue.size(); - } - - public static boolean isRepeatEvent() { - return queue.peek().state == KeyState.REPEAT; - } - - public static boolean next() { - boolean next = queue.size() > 1; - if (next) { - queue.remove(); - } - return next; - } - - public static int getEventKey() { - return queue.peek().key; - } - - public static char getEventCharacter() { - return queue.peek().aChar; - } - - public static boolean getEventKeyState() { - return queue.peek().state.isPressed; - } - - public static long getEventNanoseconds() { - return queue.peek().nano; - } - - public static String getKeyName(int key) { - if (key >= 0 && key < keyName.length) { - return keyName[key]; - } else { - return "Key " + key; - } - } - - public static int getKeyIndex(java.lang.String keyName) { - Integer ret = keyMap.get(keyName); - if (ret == null) { - if (keyName.matches("Key -?[0-9]+]")) { - return Integer.parseInt(StringUtils.removeStart(keyName, "Key ")); - } - return KEY_NONE; - } else return ret; - } - - public static boolean isCreated() { - return Display.isCreated(); - } - - public static void destroy() {} -} diff --git a/src/main/java/org/lwjgl/input/Mouse.java b/src/main/java/org/lwjgl/input/Mouse.java deleted file mode 100644 index 5126c601e..000000000 --- a/src/main/java/org/lwjgl/input/Mouse.java +++ /dev/null @@ -1,325 +0,0 @@ -package org.lwjgl.input; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import net.minecraftforge.common.ForgeEarlyConfig; - -import org.apache.commons.lang3.StringUtils; -import org.lwjgl3.BufferUtils; -import org.lwjgl3.glfw.GLFW; -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; -import org.lwjgl.opengl.Display; - -public class Mouse { - - // Fields for reflection compatibility with lwjgl2 - public static final int EVENT_SIZE = 1 + 1 + 4 + 4 + 4 + 8; - private static ByteBuffer buttons = BufferUtils.createByteBuffer(32); - private static IntBuffer coord_buffer = BufferUtils.createIntBuffer(32); - private static ByteBuffer readBuffer = BufferUtils.createByteBuffer(32); - - private static boolean grabbed = false; - - private static int lastEventX = 0; - private static int lastEventY = 0; - - private static int latestX = 0; - private static int latestY = 0; - - private static int x = 0; - private static int y = 0; - - private static int dx = 0, dy = 0, dwheel = 0; - - private static EventQueue queue = new EventQueue(128); - - private static int[] buttonEvents = new int[queue.getMaxEvents()]; - private static boolean[] buttonEventStates = new boolean[queue.getMaxEvents()]; - private static int[] xEvents = new int[queue.getMaxEvents()]; - private static int[] yEvents = new int[queue.getMaxEvents()]; - private static int[] wheelEvents = new int[queue.getMaxEvents()]; - private static int[] lastxEvents = new int[queue.getMaxEvents()]; - private static int[] lastyEvents = new int[queue.getMaxEvents()]; - private static long[] nanoTimeEvents = new long[queue.getMaxEvents()]; - - private static boolean clipPostionToDisplay = true; - private static int ignoreNextDelta = 0; - private static int ignoreNextMove = 0; - - public static void addMoveEvent(double mouseX, double mouseY) { - if (ignoreNextMove > 0) { - ignoreNextMove--; - return; - } - dx += (int) mouseX - latestX; - dy += Display.getHeight() - (int) mouseY - latestY; - latestX = (int) mouseX; - latestY = Display.getHeight() - (int) mouseY; - if (ignoreNextDelta > 0) { - ignoreNextDelta--; - x = latestX; - y = latestY; - lastEventX = latestX; - lastEventY = latestY; - dx = 0; - dy = 0; - } - - lastxEvents[queue.getNextPos()] = lastEventX; - lastyEvents[queue.getNextPos()] = lastEventY; - lastEventX = latestX; - lastEventY = latestY; - - xEvents[queue.getNextPos()] = latestX; - yEvents[queue.getNextPos()] = latestY; - - wheelEvents[queue.getNextPos()] = 0; - - buttonEvents[queue.getNextPos()] = -1; - buttonEventStates[queue.getNextPos()] = false; - - nanoTimeEvents[queue.getNextPos()] = Sys.getNanoTime(); - - queue.add(); - } - - public static void addButtonEvent(int button, boolean pressed) { - lastxEvents[queue.getNextPos()] = lastEventX; - lastyEvents[queue.getNextPos()] = lastEventY; - lastEventX = latestX; - lastEventY = latestY; - - xEvents[queue.getNextPos()] = latestX; - yEvents[queue.getNextPos()] = latestY; - - wheelEvents[queue.getNextPos()] = 0; - - buttonEvents[queue.getNextPos()] = button; - buttonEventStates[queue.getNextPos()] = pressed; - - nanoTimeEvents[queue.getNextPos()] = Sys.getNanoTime(); - - queue.add(); - } - - static double fractionalWheelPosition = 0.0; - // Used for our config screen for ease of access - public static double totalScrollAmount = 0.0; - - public static void addWheelEvent(double delta) { - if (ForgeEarlyConfig.INPUT_INVERT_WHEEL) { - delta = -delta; - } - delta *= ForgeEarlyConfig.INPUT_SCROLL_SPEED; - - final int lastWheel = (int) fractionalWheelPosition; - fractionalWheelPosition += delta; - totalScrollAmount += delta; - final int newWheel = (int) fractionalWheelPosition; - if (newWheel != lastWheel) { - lastxEvents[queue.getNextPos()] = lastEventX; - lastyEvents[queue.getNextPos()] = lastEventY; - - lastEventX = latestX; - lastEventY = latestY; - - dwheel += newWheel - lastWheel; - - xEvents[queue.getNextPos()] = latestX; - yEvents[queue.getNextPos()] = latestY; - - wheelEvents[queue.getNextPos()] = newWheel - lastWheel; - - buttonEvents[queue.getNextPos()] = -1; - buttonEventStates[queue.getNextPos()] = false; - - nanoTimeEvents[queue.getNextPos()] = Sys.getNanoTime(); - - queue.add(); - } - fractionalWheelPosition = fractionalWheelPosition % 1; - } - - public static void poll() { - if (!grabbed && clipPostionToDisplay) { - if (latestX < 0) latestX = 0; - if (latestY < 0) latestY = 0; - if (latestX > Display.getWidth() - 1) latestX = Display.getWidth() - 1; - if (latestY > Display.getHeight() - 1) latestY = Display.getHeight() - 1; - } - - x = latestX; - y = latestY; - } - - public static void create() throws LWJGLException {} - - public static boolean isCreated() { - return Display.isCreated(); - } - - public static void setGrabbed(boolean grab) { - if (grabbed == grab) { - return; - } - GLFW.glfwSetInputMode( - Display.getWindow(), - GLFW.GLFW_CURSOR, - grab ? GLFW.GLFW_CURSOR_DISABLED : GLFW.GLFW_CURSOR_NORMAL); - grabbed = grab; - if (!grab) { - // The old cursor position is sent instead of the new one in the events following mouse ungrab. - ignoreNextMove += 2; - setCursorPosition(Display.getWidth() / 2, Display.getHeight() / 2); - // Movement events are not properly sent when toggling mouse grab mode. - // Trick the game into getting the correct mouse position if no new events appear. - latestX = Display.getWidth() / 2; - latestY = Display.getHeight() / 2; - lastEventX = latestX; - lastEventY = latestY; - x = latestX; - y = latestY; - - xEvents[queue.getNextPos()] = latestX; - yEvents[queue.getNextPos()] = latestY; - lastxEvents[queue.getNextPos()] = latestX; - lastyEvents[queue.getNextPos()] = latestY; - wheelEvents[queue.getNextPos()] = 0; - buttonEvents[queue.getNextPos()] = -1; - buttonEventStates[queue.getNextPos()] = false; - nanoTimeEvents[queue.getNextPos()] = Sys.getNanoTime(); - queue.add(); - } else { - ignoreNextDelta++; // Prevent camera rapidly rotating when closing GUIs. - dx = 0; - dy = 0; - } - } - - public static boolean isGrabbed() { - return grabbed; - } - - public static boolean isButtonDown(int button) { - return GLFW.glfwGetMouseButton(Display.getWindow(), button) == GLFW.GLFW_PRESS; - } - - public static boolean next() { - return queue.next(); - } - - public static int getEventX() { - return xEvents[queue.getCurrentPos()]; - } - - public static int getEventY() { - return yEvents[queue.getCurrentPos()]; - } - - public static int getEventDX() { - return xEvents[queue.getCurrentPos()] - lastxEvents[queue.getCurrentPos()]; - } - - public static int getEventDY() { - return yEvents[queue.getCurrentPos()] - lastyEvents[queue.getCurrentPos()]; - } - - public static long getEventNanoseconds() { - return nanoTimeEvents[queue.getCurrentPos()]; - } - - public static int getEventButton() { - return buttonEvents[queue.getCurrentPos()]; - } - - public static boolean getEventButtonState() { - return buttonEventStates[queue.getCurrentPos()]; - } - - public static int getEventDWheel() { - return wheelEvents[queue.getCurrentPos()]; - } - - public static int getX() { - return x; - } - - public static int getY() { - return y; - } - - public static int getDX() { - int value = dx; - dx = 0; - return value; - } - - public static int getDY() { - int value = dy; - dy = 0; - return value; - } - - public static int getDWheel() { - int value = dwheel; - dwheel = 0; - return value; - } - - public static int getButtonCount() { - return 8; // max mouse buttons supported by GLFW - } - - public static void setClipMouseCoordinatesToWindow(boolean clip) { - clipPostionToDisplay = clip; - } - - public static void setCursorPosition(int new_x, int new_y) { - if (grabbed) { - return; - } - GLFW.glfwSetCursorPos(Display.getWindow(), new_x, new_y); - addMoveEvent(new_x, new_y); - } - - public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { - // no-op - return null; - } - - public static void destroy() {} - - public static int getButtonIndex(String buttonName) { - if (buttonName.matches("BUTTON[0-9]+")) { - return Integer.parseInt(StringUtils.removeStart(buttonName, "BUTTON")); - } else { - return -1; - } - } - - public static String getButtonName(int button) { - return "BUTTON" + button; - } - - public static Cursor getNativeCursor() { - return null; - } - - public static boolean hasWheel() { - return true; - } - - public static boolean isClipMouseCoordinatesToWindow() { - return clipPostionToDisplay; - } - - public static boolean isInsideWindow() { - return Display.isVisible(); - } - - public static void updateCursor() { - // no-op - } -} diff --git a/src/main/java/org/lwjgl/lwjgl3ify/BufferCasts.java b/src/main/java/org/lwjgl/lwjgl3ify/BufferCasts.java deleted file mode 100644 index 5c453063f..000000000 --- a/src/main/java/org/lwjgl/lwjgl3ify/BufferCasts.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.lwjgl.lwjgl3ify; - -import java.nio.*; - -import org.lwjgl3.system.MemoryUtil; - -public class BufferCasts { - - public static ByteBuffer toByteBuffer(CharBuffer buffer) { - return MemoryUtil.memByteBuffer(buffer); - } - - public static ByteBuffer toByteBuffer(ShortBuffer buffer) { - return MemoryUtil.memByteBuffer(buffer); - } - - public static ByteBuffer toByteBuffer(IntBuffer buffer) { - return MemoryUtil.memByteBuffer(buffer); - } - - public static ByteBuffer toByteBuffer(LongBuffer buffer) { - return MemoryUtil.memByteBuffer(buffer); - } - - public static ByteBuffer toByteBuffer(FloatBuffer buffer) { - return MemoryUtil.memByteBuffer(buffer); - } - - public static ByteBuffer toByteBuffer(DoubleBuffer buffer) { - return MemoryUtil.memByteBuffer(buffer); - } - - public static void updateBuffer(CharBuffer destination, ByteBuffer source) {} - - public static void updateBuffer(ShortBuffer destination, ByteBuffer source) {} - - public static void updateBuffer(IntBuffer destination, ByteBuffer source) {} - - public static void updateBuffer(LongBuffer destination, ByteBuffer source) {} - - public static void updateBuffer(FloatBuffer destination, ByteBuffer source) {} - - public static void updateBuffer(DoubleBuffer destination, ByteBuffer source) {} - - public static CharSequence bufferToCharSeq(ByteBuffer buffer) { - return MemoryUtil.memUTF8(buffer); - } -} diff --git a/src/main/java/org/lwjgl/openal/AL.java b/src/main/java/org/lwjgl/openal/AL.java deleted file mode 100644 index 7bb899320..000000000 --- a/src/main/java/org/lwjgl/openal/AL.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.lwjgl.openal; - -import java.nio.IntBuffer; - -import org.lwjgl3.openal.ALC10; -import org.lwjgl3.openal.ALCCapabilities; -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; - -public class AL { - - static ALCdevice alcDevice; - static ALCcontext alcContext; - - private static boolean created = false; - - static { - Sys.initialize(); // init using dummy sys method - } - - public static void create() throws LWJGLException { - create(null, 44100, 60, false); - } - - public static void create(String deviceArguments, int contextFrequency, int contextRefresh, - boolean contextSynchronized) { - create(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, true); - } - - public static void create(String deviceArguments, int contextFrequency, int contextRefresh, - boolean contextSynchronized, boolean openDevice) { - IntBuffer attribs = BufferUtils.createIntBuffer(16); - - attribs.put(org.lwjgl3.openal.ALC10.ALC_FREQUENCY); - attribs.put(contextFrequency); - - attribs.put(org.lwjgl3.openal.ALC10.ALC_REFRESH); - attribs.put(contextRefresh); - - attribs.put(org.lwjgl3.openal.ALC10.ALC_SYNC); - attribs.put(contextSynchronized ? org.lwjgl3.openal.ALC10.ALC_TRUE : org.lwjgl3.openal.ALC10.ALC_FALSE); - - attribs.put(org.lwjgl3.openal.EXTEfx.ALC_MAX_AUXILIARY_SENDS); - attribs.put(4); - - attribs.put(0); - attribs.flip(); - - String defaultDevice = org.lwjgl3.openal.ALC10.alcGetString(0, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER); - - long deviceHandle = org.lwjgl3.openal.ALC10.alcOpenDevice(defaultDevice); - - alcDevice = new ALCdevice(deviceHandle); - - final ALCCapabilities deviceCaps = org.lwjgl3.openal.ALC.createCapabilities(deviceHandle); - - long contextHandle = org.lwjgl3.openal.ALC10.alcCreateContext(AL.getDevice().device, attribs); - alcContext = new ALCcontext(contextHandle); - org.lwjgl3.openal.ALC10.alcMakeContextCurrent(contextHandle); - org.lwjgl3.openal.AL.createCapabilities(deviceCaps); - - created = true; - } - - public static boolean isCreated() { - return created; - } - - public static void destroy() { - org.lwjgl3.openal.ALC10.alcDestroyContext(alcContext.context); - org.lwjgl3.openal.ALC10.alcCloseDevice(alcDevice.device); - alcContext = null; - alcDevice = null; - created = false; - } - - public static org.lwjgl.openal.ALCcontext getContext() { - return alcContext; - } - - public static ALCdevice getDevice() { - return alcDevice; - } -} diff --git a/src/main/java/org/lwjgl/openal/AL10.java b/src/main/java/org/lwjgl/openal/AL10.java deleted file mode 100644 index f9e205d33..000000000 --- a/src/main/java/org/lwjgl/openal/AL10.java +++ /dev/null @@ -1,304 +0,0 @@ -package org.lwjgl.openal; - -public class AL10 { - - public static final int AL_INVALID = org.lwjgl3.openal.AL10.AL_INVALID; - public static final int AL_NONE = org.lwjgl3.openal.AL10.AL_NONE; - public static final int AL_FALSE = org.lwjgl3.openal.AL10.AL_FALSE; - public static final int AL_TRUE = org.lwjgl3.openal.AL10.AL_TRUE; - public static final int AL_SOURCE_TYPE = org.lwjgl3.openal.AL10.AL_SOURCE_TYPE; - public static final int AL_SOURCE_ABSOLUTE = org.lwjgl3.openal.AL10.AL_SOURCE_ABSOLUTE; - public static final int AL_SOURCE_RELATIVE = org.lwjgl3.openal.AL10.AL_SOURCE_RELATIVE; - public static final int AL_CONE_INNER_ANGLE = org.lwjgl3.openal.AL10.AL_CONE_INNER_ANGLE; - public static final int AL_CONE_OUTER_ANGLE = org.lwjgl3.openal.AL10.AL_CONE_OUTER_ANGLE; - public static final int AL_PITCH = org.lwjgl3.openal.AL10.AL_PITCH; - public static final int AL_POSITION = org.lwjgl3.openal.AL10.AL_POSITION; - public static final int AL_DIRECTION = org.lwjgl3.openal.AL10.AL_DIRECTION; - public static final int AL_VELOCITY = org.lwjgl3.openal.AL10.AL_VELOCITY; - public static final int AL_LOOPING = org.lwjgl3.openal.AL10.AL_LOOPING; - public static final int AL_BUFFER = org.lwjgl3.openal.AL10.AL_BUFFER; - public static final int AL_GAIN = org.lwjgl3.openal.AL10.AL_GAIN; - public static final int AL_MIN_GAIN = org.lwjgl3.openal.AL10.AL_MIN_GAIN; - public static final int AL_MAX_GAIN = org.lwjgl3.openal.AL10.AL_MAX_GAIN; - public static final int AL_ORIENTATION = org.lwjgl3.openal.AL10.AL_ORIENTATION, - AL_REFERENCE_DISTANCE = org.lwjgl3.openal.AL10.AL_REFERENCE_DISTANCE; - public static final int AL_ROLLOFF_FACTOR = org.lwjgl3.openal.AL10.AL_ROLLOFF_FACTOR; - public static final int AL_CONE_OUTER_GAIN = org.lwjgl3.openal.AL10.AL_CONE_OUTER_GAIN; - public static final int AL_MAX_DISTANCE = org.lwjgl3.openal.AL10.AL_MAX_DISTANCE; - public static final int AL_CHANNEL_MASK = 0x3000; - public static final int AL_SOURCE_STATE = org.lwjgl3.openal.AL10.AL_SOURCE_STATE, - AL_INITIAL = org.lwjgl3.openal.AL10.AL_INITIAL, - AL_PLAYING = org.lwjgl3.openal.AL10.AL_PLAYING, - AL_PAUSED = org.lwjgl3.openal.AL10.AL_PAUSED, - AL_STOPPED = org.lwjgl3.openal.AL10.AL_STOPPED; - public static final int AL_BUFFERS_QUEUED = org.lwjgl3.openal.AL10.AL_BUFFERS_QUEUED, - AL_BUFFERS_PROCESSED = org.lwjgl3.openal.AL10.AL_BUFFERS_PROCESSED; - public static final int AL_FORMAT_MONO8 = org.lwjgl3.openal.AL10.AL_FORMAT_MONO8, - AL_FORMAT_MONO16 = org.lwjgl3.openal.AL10.AL_FORMAT_MONO16, - AL_FORMAT_STEREO8 = org.lwjgl3.openal.AL10.AL_FORMAT_STEREO8, - AL_FORMAT_STEREO16 = org.lwjgl3.openal.AL10.AL_FORMAT_STEREO16; - public static final int AL_FORMAT_VORBIS_EXT = 0x10003; - public static final int AL_FREQUENCY = org.lwjgl3.openal.AL10.AL_FREQUENCY; - public static final int AL_BITS = org.lwjgl3.openal.AL10.AL_BITS; - public static final int AL_CHANNELS = org.lwjgl3.openal.AL10.AL_CHANNELS; - public static final int AL_SIZE = org.lwjgl3.openal.AL10.AL_SIZE; - public static final int AL_DATA = 0x2005; - public static final int AL_UNUSED = org.lwjgl3.openal.AL10.AL_UNUSED, - AL_PENDING = org.lwjgl3.openal.AL10.AL_PENDING, - AL_PROCESSED = org.lwjgl3.openal.AL10.AL_PROCESSED; - public static final int AL_NO_ERROR = 0x0; - public static final int AL_INVALID_NAME = org.lwjgl3.openal.AL10.AL_INVALID_NAME; - public static final int AL_INVALID_ENUM = org.lwjgl3.openal.AL10.AL_INVALID_ENUM; - public static final int AL_INVALID_VALUE = org.lwjgl3.openal.AL10.AL_INVALID_VALUE; - public static final int AL_INVALID_OPERATION = org.lwjgl3.openal.AL10.AL_INVALID_OPERATION; - public static final int AL_OUT_OF_MEMORY = org.lwjgl3.openal.AL10.AL_OUT_OF_MEMORY; - public static final int AL_VENDOR = org.lwjgl3.openal.AL10.AL_VENDOR; - public static final int AL_VERSION = org.lwjgl3.openal.AL10.AL_VERSION; - public static final int AL_RENDERER = org.lwjgl3.openal.AL10.AL_RENDERER; - public static final int AL_EXTENSIONS = org.lwjgl3.openal.AL10.AL_EXTENSIONS; - public static final int AL_DOPPLER_FACTOR = org.lwjgl3.openal.AL10.AL_DOPPLER_FACTOR; - public static final int AL_DOPPLER_VELOCITY = org.lwjgl3.openal.AL10.AL_DOPPLER_FACTOR; - public static final int AL_DISTANCE_MODEL = org.lwjgl3.openal.AL10.AL_DISTANCE_MODEL; - public static final int AL_INVERSE_DISTANCE = org.lwjgl3.openal.AL10.AL_INVERSE_DISTANCE, - AL_INVERSE_DISTANCE_CLAMPED = org.lwjgl3.openal.AL10.AL_INVERSE_DISTANCE_CLAMPED; - - public static void alBufferData(int buffer, int format, java.nio.ByteBuffer data, int freq) { - org.lwjgl3.openal.AL10.alBufferData(buffer, format, data, freq); - } - - public static void alBufferData(int buffer, int format, java.nio.IntBuffer data, int freq) { - org.lwjgl3.openal.AL10.alBufferData(buffer, format, data, freq); - } - - public static void alBufferData(int buffer, int format, java.nio.ShortBuffer data, int freq) { - org.lwjgl3.openal.AL10.alBufferData(buffer, format, data, freq); - } - public static void alcCloseDevice(ALCdevice alCdevice) { - org.lwjgl3.openal.ALC10.alcCloseDevice(alCdevice.device); - } - public static void alDeleteBuffers(int buffer) { - org.lwjgl3.openal.AL10.alDeleteBuffers(buffer); - } - - public static void alDeleteBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.openal.AL10.alDeleteBuffers(buffers); - } - - public static void alDeleteSources(int source) { - org.lwjgl3.openal.AL10.alDeleteSources(source); - } - - public static void alDeleteSources(java.nio.IntBuffer sources) { - org.lwjgl3.openal.AL10.alDeleteSources(sources); - } - - public static void alDisable(int capability) { - org.lwjgl3.openal.AL10.alDisable(capability); - } - - public static void alDistanceModel(int value) { - org.lwjgl3.openal.AL10.alDistanceModel(value); - } - - public static void alDopplerFactor(float value) { - org.lwjgl3.openal.AL10.alDopplerFactor(value); - } - - public static void alDopplerVelocity(float value) { - org.lwjgl3.openal.AL10.alDopplerVelocity(value); - } - - public static void alEnable(int capability) { - org.lwjgl3.openal.AL10.alEnable(capability); - } - - public static int alGenBuffers() { - return org.lwjgl3.openal.AL10.alGenBuffers(); - } - - public static void alGenBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.openal.AL10.alGenBuffers(buffers); - } - - public static int alGenSources() { - return org.lwjgl3.openal.AL10.alGenSources(); - } - - public static void alGenSources(java.nio.IntBuffer sources) { - org.lwjgl3.openal.AL10.alGenSources(sources); - } - - public static boolean alGetBoolean(int pname) { - return org.lwjgl3.openal.AL10.alGetBoolean(pname); - } - - public static float alGetBufferf(int buffer, int pname) { - return org.lwjgl3.openal.AL10.alGetBufferf(buffer, pname); - } - - public static int alGetBufferi(int buffer, int pname) { - return org.lwjgl3.openal.AL10.alGetBufferi(buffer, pname); - } - - public static double alGetDouble(int pname) { - return org.lwjgl3.openal.AL10.alGetDouble(pname); - } - - public static void alGetDouble(int pname, java.nio.DoubleBuffer data) { - org.lwjgl3.openal.AL10.alGetDoublev(pname, data); - } - - public static int alGetEnumValue(java.lang.String ename) { - - int returnValue = org.lwjgl3.openal.AL10.alGetEnumValue(ename); - - return returnValue; - } - - public static int alGetError() { - return org.lwjgl3.openal.AL10.alGetError(); - } - - public static float alGetFloat(int pname) { - return org.lwjgl3.openal.AL10.alGetFloat(pname); - } - - public static void alGetFloat(int pname, java.nio.FloatBuffer data) { - org.lwjgl3.openal.AL10.alGetFloatv(pname, data); - } - - public static int alGetInteger(int pname) { - return org.lwjgl3.openal.AL10.alGetInteger(pname); - } - - public static void alGetInteger(int pname, java.nio.IntBuffer data) { - org.lwjgl3.openal.AL10.alGetIntegerv(pname, data); - } - - public static void alGetListener(int pname, java.nio.FloatBuffer floatdata) { - org.lwjgl3.openal.AL10.alGetListenerfv(pname, floatdata); - } - - public static float alGetListenerf(int pname) { - return org.lwjgl3.openal.AL10.alGetListenerf(pname); - } - - public static int alGetListeneri(int pname) { - return org.lwjgl3.openal.AL10.alGetListeneri(pname); - } - - public static void alGetSource(int source, int pname, java.nio.FloatBuffer floatdata) { - org.lwjgl3.openal.AL10.alGetSourcefv(source, pname, floatdata); - } - - public static float alGetSourcef(int source, int pname) { - return org.lwjgl3.openal.AL10.alGetSourcef(source, pname); - } - - public static int alGetSourcei(int source, int pname) { - return org.lwjgl3.openal.AL10.alGetSourcei(source, pname); - } - - public static java.lang.String alGetString(int pname) { - return org.lwjgl3.openal.AL10.alGetString(pname); - } - - public static boolean alIsBuffer(int buffer) { - return org.lwjgl3.openal.AL10.alIsBuffer(buffer); - } - - public static boolean alIsEnabled(int capability) { - return org.lwjgl3.openal.AL10.alIsEnabled(capability); - } - - public static boolean alIsExtensionPresent(java.lang.String fname) { - - boolean returnValue = org.lwjgl3.openal.AL10.alIsExtensionPresent(fname); - - return returnValue; - } - - public static boolean alIsSource(int id) { - return org.lwjgl3.openal.AL10.alIsSource(id); - } - - public static void alListener3f(int pname, float v1, float v2, float v3) { - org.lwjgl3.openal.AL10.alListener3f(pname, v1, v2, v3); - } - - public static void alListener(int pname, java.nio.FloatBuffer value) { - org.lwjgl3.openal.AL10.alListenerfv(pname, value); - } - - public static void alListenerf(int pname, float value) { - org.lwjgl3.openal.AL10.alListenerf(pname, value); - } - - public static void alListeneri(int pname, int value) { - org.lwjgl3.openal.AL10.alListeneri(pname, value); - } - - public static void alSource3f(int source, int pname, float v1, float v2, float v3) { - org.lwjgl3.openal.AL10.alSource3f(source, pname, v1, v2, v3); - } - - public static void alSource(int source, int pname, java.nio.FloatBuffer value) { - org.lwjgl3.openal.AL10.alSourcefv(source, pname, value); - } - - public static void alSourcePause(int source) { - org.lwjgl3.openal.AL10.alSourcePause(source); - } - - public static void alSourcePause(java.nio.IntBuffer sources) { - org.lwjgl3.openal.AL10.alSourcePausev(sources); - } - - public static void alSourcePlay(int source) { - org.lwjgl3.openal.AL10.alSourcePlay(source); - } - - public static void alSourcePlay(java.nio.IntBuffer sources) { - org.lwjgl3.openal.AL10.alSourcePlayv(sources); - } - - public static void alSourceQueueBuffers(int source, int buffer) { - org.lwjgl3.openal.AL10.alSourceQueueBuffers(source, buffer); - } - - public static void alSourceQueueBuffers(int source, java.nio.IntBuffer buffers) { - org.lwjgl3.openal.AL10.alSourceQueueBuffers(source, buffers); - } - - public static void alSourceRewind(int source) { - org.lwjgl3.openal.AL10.alSourceRewind(source); - } - - public static void alSourceRewind(java.nio.IntBuffer sources) { - org.lwjgl3.openal.AL10.alSourceRewindv(sources); - } - - public static void alSourceStop(int source) { - org.lwjgl3.openal.AL10.alSourceStop(source); - } - - public static void alSourceStop(java.nio.IntBuffer sources) { - org.lwjgl3.openal.AL10.alSourceStopv(sources); - } - - public static int alSourceUnqueueBuffers(int source) { - return org.lwjgl3.openal.AL10.alSourceUnqueueBuffers(source); - } - - public static void alSourceUnqueueBuffers(int source, java.nio.IntBuffer buffers) { - org.lwjgl3.openal.AL10.alSourceUnqueueBuffers(source, buffers); - } - - public static void alSourcef(int source, int pname, float value) { - org.lwjgl3.openal.AL10.alSourcef(source, pname, value); - } - - public static void alSourcei(int source, int pname, int value) { - org.lwjgl3.openal.AL10.alSourcei(source, pname, value); - } -} diff --git a/src/main/java/org/lwjgl/openal/AL11.java b/src/main/java/org/lwjgl/openal/AL11.java deleted file mode 100644 index 8cd3b221b..000000000 --- a/src/main/java/org/lwjgl/openal/AL11.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.lwjgl.openal; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class AL11 { - - public static final int AL_BYTE_OFFSET = (int) 4134; - public static final int AL_EXPONENT_DISTANCE = (int) 53253; - public static final int AL_EXPONENT_DISTANCE_CLAMPED = (int) 53254; - public static final int AL_ILLEGAL_COMMAND = (int) 40964; - public static final int AL_LINEAR_DISTANCE = (int) 53251; - public static final int AL_LINEAR_DISTANCE_CLAMPED = (int) 53252; - public static final int AL_SAMPLE_OFFSET = (int) 4133; - public static final int AL_SEC_OFFSET = (int) 4132; - public static final int AL_SPEED_OF_SOUND = (int) 49155; - public static final int AL_STATIC = (int) 4136; - public static final int AL_STREAMING = (int) 4137; - public static final int AL_UNDETERMINED = (int) 4144; - - public static void alBuffer3f(int buffer, int pname, float v1, float v2, float v3) { - org.lwjgl3.openal.AL11.alBuffer3f(buffer, pname, v1, v2, v3); - } - - public static void alBuffer3i(int buffer, int pname, int v1, int v2, int v3) { - org.lwjgl3.openal.AL11.alBuffer3i(buffer, pname, v1, v2, v3); - } - - public static void alBuffer(int buffer, int pname, java.nio.FloatBuffer value) { - org.lwjgl3.openal.AL11.alBufferfv(buffer, pname, value); - } - - public static void alBuffer(int buffer, int pname, java.nio.IntBuffer value) { - org.lwjgl3.openal.AL11.alBufferiv(buffer, pname, value); - } - - public static void alBufferf(int buffer, int pname, float value) { - org.lwjgl3.openal.AL11.alBufferf(buffer, pname, value); - } - - public static void alBufferi(int buffer, int pname, int value) { - org.lwjgl3.openal.AL11.alBufferi(buffer, pname, value); - } - - public static void alGetBuffer(int buffer, int pname, java.nio.FloatBuffer values) { - org.lwjgl3.openal.AL11.alGetBufferfv(buffer, pname, values); - } - - public static void alGetBuffer(int buffer, int pname, java.nio.IntBuffer values) { - org.lwjgl3.openal.AL11.alGetBufferiv(buffer, pname, values); - } - - public static float alGetBufferf(int buffer, int pname) { - return org.lwjgl3.openal.AL11.alGetBufferf(buffer, pname); - } - - public static int alGetBufferi(int buffer, int pname) { - return org.lwjgl3.openal.AL11.alGetBufferi(buffer, pname); - } - - public static void alGetListeneri(int pname, java.nio.FloatBuffer intdata) { - final java.nio.ByteBuffer wrappedArg1 = BufferCasts.toByteBuffer(intdata); - - org.lwjgl3.openal.AL11.alGetListeneriv(pname, wrappedArg1.asIntBuffer()); - BufferCasts.updateBuffer(intdata, wrappedArg1); - } - - public static void alListener3i(int pname, int v1, int v2, int v3) { - org.lwjgl3.openal.AL11.alListener3i(pname, v1, v2, v3); - } - - public static void alSource3i(int source, int pname, int v1, int v2, int v3) { - org.lwjgl3.openal.AL11.alSource3i(source, pname, v1, v2, v3); - } - - public static void alSource(int source, int pname, java.nio.IntBuffer value) { - org.lwjgl3.openal.AL11.alSourceiv(source, pname, value); - } - - public static void alSpeedOfSound(float value) { - org.lwjgl3.openal.AL11.alSpeedOfSound(value); - } -} diff --git a/src/main/java/org/lwjgl/openal/ALC10.java b/src/main/java/org/lwjgl/openal/ALC10.java deleted file mode 100644 index df4562008..000000000 --- a/src/main/java/org/lwjgl/openal/ALC10.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.lwjgl.openal; - -import org.lwjgl.MemoryUtil; - -import java.nio.ByteBuffer; - -public class ALC10 { - - static ALCcontext alcContext; - - public static final int ALC_FREQUENCY = org.lwjgl3.openal.ALC10.ALC_FREQUENCY; - public static final int ALC_REFRESH = org.lwjgl3.openal.ALC10.ALC_REFRESH; - public static final int ALC_SYNC = org.lwjgl3.openal.ALC10.ALC_SYNC; - public static final int ALC_NO_ERROR = org.lwjgl3.openal.ALC10.ALC_NO_ERROR; - public static final int ALC_DEFAULT_DEVICE_SPECIFIER = org.lwjgl3.openal.ALC10.ALC_DEFAULT_DEVICE_SPECIFIER; - public static final int ALC_DEVICE_SPECIFIER = org.lwjgl3.openal.ALC10.ALC_DEVICE_SPECIFIER; - - public static int alcGetError(ALCdevice device) { - if (device == null) { - return org.lwjgl3.openal.ALC10.alcGetError(AL.alcDevice.device); - } - - return org.lwjgl3.openal.ALC10.alcGetError(device.device); - } - - public static java.lang.String alcGetString(ALCdevice device, int pname) { - if (device == null) { - return org.lwjgl3.openal.ALC10.alcGetString(AL.alcDevice.device, pname); - } - - return org.lwjgl3.openal.ALC10.alcGetString(device.device, pname); - } - - public static ALCdevice alcOpenDevice(String devicename) { - long device_address = org.lwjgl3.openal.ALC10.alcOpenDevice(devicename); - if(device_address != 0) { - return new ALCdevice(device_address); - } - return null; - } - - public static boolean alcIsExtensionPresent(ALCdevice device, java.lang.String extName) { - if (device == null) { - return org.lwjgl3.openal.ALC10.alcIsExtensionPresent(AL.alcDevice.device, extName); - } - - return org.lwjgl3.openal.ALC10.alcIsExtensionPresent(device.device, extName); - } - - public static ALCcontext alcCreateContext(ALCdevice device, java.nio.IntBuffer attrList) { - long alContextHandle = org.lwjgl3.openal.ALC10.alcCreateContext(device.device, attrList); - alcContext = new ALCcontext(alContextHandle); - return alcContext; - } - - public static boolean alcCloseDevice(ALCdevice alCdevice) { - return org.lwjgl3.openal.ALC10.alcCloseDevice(alCdevice.device); - } - - public static ALCcontext alcGetCurrentContext() { - return alcContext; - } - - public static ALCdevice alcGetContextsDevice(ALCcontext context) { - return AL.alcDevice; - } - - public static void alcGetInteger(ALCdevice device, int pname, java.nio.IntBuffer integerdata) { - org.lwjgl3.openal.ALC10.alcGetIntegerv(device.device, pname, integerdata); - } -} diff --git a/src/main/java/org/lwjgl/openal/ALC11.java b/src/main/java/org/lwjgl/openal/ALC11.java deleted file mode 100644 index 627afa178..000000000 --- a/src/main/java/org/lwjgl/openal/ALC11.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.lwjgl.openal; - -public class ALC11 { - - public static final int ALC_ALL_DEVICES_SPECIFIER = (int) 4115; - public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = (int) 785; - public static final int ALC_CAPTURE_DEVICE_SPECIFIER = (int) 784; - public static final int ALC_CAPTURE_SAMPLES = (int) 786; - public static final int ALC_DEFAULT_ALL_DEVICES_SPECIFIER = (int) 4114; - public static final int ALC_MONO_SOURCES = (int) 4112; - public static final int ALC_STEREO_SOURCES = (int) 4113; - - public static boolean alcCaptureCloseDevice(org.lwjgl.openal.ALCdevice device) { - - boolean returnValue = org.lwjgl3.openal.ALC11.alcCaptureCloseDevice(device.device); - - return returnValue; - } - - public static org.lwjgl.openal.ALCdevice alcCaptureOpenDevice(java.lang.String arg0, int arg1, int frequency, - int format) { - - org.lwjgl.openal.ALCdevice returnValue = new org.lwjgl.openal.ALCdevice( - org.lwjgl3.openal.ALC11.alcCaptureOpenDevice(arg0, arg1, frequency, format)); - - return returnValue; - } - - public static void alcCaptureSamples(org.lwjgl.openal.ALCdevice device, java.nio.ByteBuffer buffer, int samples) { - - org.lwjgl3.openal.ALC11.alcCaptureSamples(device.device, buffer, samples); - } - - public static void alcCaptureStart(org.lwjgl.openal.ALCdevice device) { - - org.lwjgl3.openal.ALC11.alcCaptureStart(device.device); - } - - public static void alcCaptureStop(org.lwjgl.openal.ALCdevice device) { - - org.lwjgl3.openal.ALC11.alcCaptureStop(device.device); - } -} diff --git a/src/main/java/org/lwjgl/openal/ALCcontext.java b/src/main/java/org/lwjgl/openal/ALCcontext.java deleted file mode 100644 index 86754bbbb..000000000 --- a/src/main/java/org/lwjgl/openal/ALCcontext.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.openal; - -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; - -/** - * The ALCcontext class represents a context opened in OpenAL space. - * - * All operations of the AL core API affect a current AL context. Within the scope of AL, the ALC is implied - it is not - * visible as a handle or function parameter. Only one AL Context per process can be current at a time. Applications - * maintaining multiple AL Contexts, whether threaded or not, have to set the current context accordingly. Applications - * can have multiple threads that share one more or contexts. In other words, AL and ALC are threadsafe. - * - * @author Brian Matzon - * @version $Revision$ $Id$ - */ -public final class ALCcontext { - - /** Address of actual context */ - final long context; - - /** Whether this context is valid */ - private boolean valid; - - /** - * Creates a new instance of ALCcontext - * - * @param context address of actual context - */ - ALCcontext(long context) { - this.context = context; - this.valid = true; - } - - /* - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object context) { - if (context instanceof ALCcontext) { - return ((ALCcontext) context).context == this.context; - } - return super.equals(context); - } - - /** - * Creates an attribute list in a ByteBuffer - * - * @param contextFrequency Frequency to add - * @param contextRefresh Refresh rate to add - * @param contextSynchronized Whether to synchronize the context - * @return - */ - static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { - IntBuffer attribList = BufferUtils.createIntBuffer(7); - - attribList.put(ALC10.ALC_FREQUENCY); - attribList.put(contextFrequency); - attribList.put(ALC10.ALC_REFRESH); - attribList.put(contextRefresh); - attribList.put(ALC10.ALC_SYNC); - attribList.put(contextSynchronized); - attribList.put(0); // terminating int - - return attribList; - } - - /** - * Marks this context as invalid - * - */ - void setInvalid() { - valid = false; - } - - /** - * @return true if this context is still valid - */ - public boolean isValid() { - return valid; - } -} diff --git a/src/main/java/org/lwjgl/openal/ALCdevice.java b/src/main/java/org/lwjgl/openal/ALCdevice.java deleted file mode 100644 index b10f7e39b..000000000 --- a/src/main/java/org/lwjgl/openal/ALCdevice.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.openal; - -import java.util.HashMap; - -/** - * The ALCdevice class represents a device opened in OpenAL space. - * - * ALC introduces the notion of a Device. A Device can be, depending on the implementation, a hardware device, or a - * daemon/OS service/actual server. This mechanism also permits different drivers (and hardware) to coexist within the - * same system, as well as allowing several applications to share system resources for audio, including a single - * hardware output device. The details are left to the implementation, which has to map the available backends to unique - * device specifiers. - * - * @author Brian Matzon - * @version $Revision$ $Id$ - */ -public final class ALCdevice { - - /** Address of actual device */ - public final long device; - - /** Whether this device is valid */ - private boolean valid; - - /** List of contexts belonging to the device */ - private final HashMap contexts = new HashMap<>(); - - /** - * Creates a new instance of ALCdevice - * - * @param device address of actual device - */ - ALCdevice(long device) { - this.device = device; - this.valid = true; - } - - public static long alcOpenDevice(String deviceSpecifier) { - return org.lwjgl3.openal.ALC10.alcOpenDevice(deviceSpecifier); - } - - /* - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object device) { - if (device instanceof ALCdevice) { - return ((ALCdevice) device).device == this.device; - } - return super.equals(device); - } - - /** - * Adds a context to the device - * - * @param context context to add to the list of contexts for this device - */ - void addContext(ALCcontext context) { - synchronized (contexts) { - contexts.put(context.context, context); - } - } - - /** - * Remove context associated with device - * - * @param context Context to disassociate with device - */ - void removeContext(ALCcontext context) { - synchronized (contexts) { - contexts.remove(context.context); - } - } - - /** - * Marks this device and all of its contexts invalid - */ - void setInvalid() { - valid = false; - synchronized (contexts) { - for (ALCcontext context : contexts.values()) context.setInvalid(); - } - contexts.clear(); - } - - /** - * @return true if this device is still valid - */ - public boolean isValid() { - return valid; - } -} diff --git a/src/main/java/org/lwjgl/openal/EFX10.java b/src/main/java/org/lwjgl/openal/EFX10.java deleted file mode 100644 index 0b351d110..000000000 --- a/src/main/java/org/lwjgl/openal/EFX10.java +++ /dev/null @@ -1,643 +0,0 @@ -package org.lwjgl.openal; - -import org.lwjgl3.openal.EXTEfx; - -@SuppressWarnings("unused") -public class EFX10 { - - public static final int ALC_EFX_MAJOR_VERSION = (int) 131073; - public static final int ALC_EFX_MINOR_VERSION = (int) 131074; - public static final java.lang.String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; - public static final int ALC_MAX_AUXILIARY_SENDS = (int) 131075; - public static final int AL_AIR_ABSORPTION_FACTOR = (int) 131079; - public static final int AL_AUTOWAH_ATTACK_TIME = (int) 1; - public static final float AL_AUTOWAH_DEFAULT_ATTACK_TIME = (float) 0.06F; - public static final float AL_AUTOWAH_DEFAULT_PEAK_GAIN = (float) 11.22F; - public static final float AL_AUTOWAH_DEFAULT_RELEASE_TIME = (float) 0.06F; - public static final float AL_AUTOWAH_DEFAULT_RESONANCE = (float) 1000.0F; - public static final float AL_AUTOWAH_MAX_ATTACK_TIME = (float) 1.0F; - public static final float AL_AUTOWAH_MAX_PEAK_GAIN = (float) 31621.0F; - public static final float AL_AUTOWAH_MAX_RELEASE_TIME = (float) 1.0F; - public static final float AL_AUTOWAH_MAX_RESONANCE = (float) 1000.0F; - public static final float AL_AUTOWAH_MIN_ATTACK_TIME = (float) 1.0E-4F; - public static final float AL_AUTOWAH_MIN_PEAK_GAIN = (float) 3.0E-5F; - public static final float AL_AUTOWAH_MIN_RELEASE_TIME = (float) 1.0E-4F; - public static final float AL_AUTOWAH_MIN_RESONANCE = (float) 2.0F; - public static final int AL_AUTOWAH_PEAK_GAIN = (int) 4; - public static final int AL_AUTOWAH_RELEASE_TIME = (int) 2; - public static final int AL_AUTOWAH_RESONANCE = (int) 3; - public static final int AL_AUXILIARY_SEND_FILTER = (int) 131078; - public static final int AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 131084; - public static final int AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 131083; - public static final int AL_BANDPASS_GAIN = (int) 1; - public static final int AL_BANDPASS_GAINHF = (int) 3; - public static final int AL_BANDPASS_GAINLF = (int) 2; - public static final float AL_CHORUS_DEFAULT_DELAY = (float) 0.016F; - public static final float AL_CHORUS_DEFAULT_DEPTH = (float) 0.1F; - public static final float AL_CHORUS_DEFAULT_FEEDBACK = (float) 0.25F; - public static final int AL_CHORUS_DEFAULT_PHASE = (int) 90; - public static final float AL_CHORUS_DEFAULT_RATE = (float) 1.1F; - public static final int AL_CHORUS_DEFAULT_WAVEFORM = (int) 1; - public static final int AL_CHORUS_DELAY = (int) 6; - public static final int AL_CHORUS_DEPTH = (int) 4; - public static final int AL_CHORUS_FEEDBACK = (int) 5; - public static final float AL_CHORUS_MAX_DELAY = (float) 0.016F; - public static final float AL_CHORUS_MAX_DEPTH = (float) 1.0F; - public static final float AL_CHORUS_MAX_FEEDBACK = (float) 1.0F; - public static final int AL_CHORUS_MAX_PHASE = (int) 180; - public static final float AL_CHORUS_MAX_RATE = (float) 10.0F; - public static final int AL_CHORUS_MAX_WAVEFORM = (int) 1; - public static final float AL_CHORUS_MIN_DELAY = (float) 0.0F; - public static final float AL_CHORUS_MIN_DEPTH = (float) 0.0F; - public static final float AL_CHORUS_MIN_FEEDBACK = (float) -1.0F; - public static final int AL_CHORUS_MIN_PHASE = (int) -180; - public static final float AL_CHORUS_MIN_RATE = (float) 0.0F; - public static final int AL_CHORUS_MIN_WAVEFORM = (int) 0; - public static final int AL_CHORUS_PHASE = (int) 2; - public static final int AL_CHORUS_RATE = (int) 3; - public static final int AL_CHORUS_WAVEFORM = (int) 1; - public static final int AL_CHORUS_WAVEFORM_SINUSOID = (int) 0; - public static final int AL_CHORUS_WAVEFORM_TRIANGLE = (int) 1; - public static final int AL_COMPRESSOR_DEFAULT_ONOFF = (int) 1; - public static final int AL_COMPRESSOR_MAX_ONOFF = (int) 1; - public static final int AL_COMPRESSOR_MIN_ONOFF = (int) 0; - public static final int AL_COMPRESSOR_ONOFF = (int) 1; - public static final int AL_CONE_OUTER_GAINHF = (int) 131081; - public static final float AL_DEFAULT_AIR_ABSORPTION_FACTOR = (float) 0.0F; - public static final int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 1; - public static final int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 1; - public static final float AL_DEFAULT_CONE_OUTER_GAINHF = (float) 1.0F; - public static final int AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = (int) 1; - public static final float AL_DEFAULT_METERS_PER_UNIT = (float) 1.0F; - public static final float AL_DEFAULT_ROOM_ROLLOFF_FACTOR = (float) 0.0F; - public static final int AL_DIRECT_FILTER = (int) 131077; - public static final int AL_DIRECT_FILTER_GAINHF_AUTO = (int) 131082; - public static final float AL_DISTORTION_DEFAULT_EDGE = (float) 0.2F; - public static final float AL_DISTORTION_DEFAULT_EQBANDWIDTH = (float) 3600.0F; - public static final float AL_DISTORTION_DEFAULT_EQCENTER = (float) 3600.0F; - public static final float AL_DISTORTION_DEFAULT_GAIN = (float) 0.05F; - public static final float AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF = (float) 8000.0F; - public static final int AL_DISTORTION_EDGE = (int) 1; - public static final int AL_DISTORTION_EQBANDWIDTH = (int) 5; - public static final int AL_DISTORTION_EQCENTER = (int) 4; - public static final int AL_DISTORTION_GAIN = (int) 2; - public static final int AL_DISTORTION_LOWPASS_CUTOFF = (int) 3; - public static final float AL_DISTORTION_MAX_EDGE = (float) 1.0F; - public static final float AL_DISTORTION_MAX_EQBANDWIDTH = (float) 24000.0F; - public static final float AL_DISTORTION_MAX_EQCENTER = (float) 24000.0F; - public static final float AL_DISTORTION_MAX_GAIN = (float) 1.0F; - public static final float AL_DISTORTION_MAX_LOWPASS_CUTOFF = (float) 24000.0F; - public static final float AL_DISTORTION_MIN_EDGE = (float) 0.0F; - public static final float AL_DISTORTION_MIN_EQBANDWIDTH = (float) 80.0F; - public static final float AL_DISTORTION_MIN_EQCENTER = (float) 80.0F; - public static final float AL_DISTORTION_MIN_GAIN = (float) 0.01F; - public static final float AL_DISTORTION_MIN_LOWPASS_CUTOFF = (float) 80.0F; - public static final int AL_EAXREVERB_AIR_ABSORPTION_GAINHF = (int) 19; - public static final int AL_EAXREVERB_DECAY_HFLIMIT = (int) 23; - public static final int AL_EAXREVERB_DECAY_HFRATIO = (int) 7; - public static final int AL_EAXREVERB_DECAY_LFRATIO = (int) 8; - public static final int AL_EAXREVERB_DECAY_TIME = (int) 6; - public static final float AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = (float) 0.994F; - public static final int AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = (int) 1; - public static final float AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = (float) 0.83F; - public static final float AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = (float) 1.0F; - public static final float AL_EAXREVERB_DEFAULT_DECAY_TIME = (float) 1.49F; - public static final float AL_EAXREVERB_DEFAULT_DENSITY = (float) 1.0F; - public static final float AL_EAXREVERB_DEFAULT_DIFFUSION = (float) 1.0F; - public static final float AL_EAXREVERB_DEFAULT_ECHO_DEPTH = (float) 0.0F; - public static final float AL_EAXREVERB_DEFAULT_ECHO_TIME = (float) 0.25F; - public static final float AL_EAXREVERB_DEFAULT_GAIN = (float) 0.32F; - public static final float AL_EAXREVERB_DEFAULT_GAINHF = (float) 0.89F; - public static final float AL_EAXREVERB_DEFAULT_GAINLF = (float) 1.0F; - public static final float AL_EAXREVERB_DEFAULT_HFREFERENCE = (float) 5000.0F; - public static final float AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = (float) 0.011F; - public static final float AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = (float) 1.26F; - public static final float AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = (float) 0.0F; - public static final float AL_EAXREVERB_DEFAULT_LFREFERENCE = (float) 250.0F; - public static final float AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = (float) 0.0F; - public static final float AL_EAXREVERB_DEFAULT_MODULATION_TIME = (float) 0.25F; - public static final float AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = (float) 0.007F; - public static final float AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = (float) 0.05F; - public static final float AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = (float) 0.0F; - public static final float AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = (float) 0.0F; - public static final int AL_EAXREVERB_DENSITY = (int) 1; - public static final int AL_EAXREVERB_DIFFUSION = (int) 2; - public static final int AL_EAXREVERB_ECHO_DEPTH = (int) 16; - public static final int AL_EAXREVERB_ECHO_TIME = (int) 15; - public static final int AL_EAXREVERB_GAIN = (int) 3; - public static final int AL_EAXREVERB_GAINHF = (int) 4; - public static final int AL_EAXREVERB_GAINLF = (int) 5; - public static final int AL_EAXREVERB_HFREFERENCE = (int) 20; - public static final int AL_EAXREVERB_LATE_REVERB_DELAY = (int) 13; - public static final int AL_EAXREVERB_LATE_REVERB_GAIN = (int) 12; - public static final int AL_EAXREVERB_LATE_REVERB_PAN = (int) 14; - public static final int AL_EAXREVERB_LFREFERENCE = (int) 21; - public static final float AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = (float) 1.0F; - public static final int AL_EAXREVERB_MAX_DECAY_HFLIMIT = (int) 1; - public static final float AL_EAXREVERB_MAX_DECAY_HFRATIO = (float) 2.0F; - public static final float AL_EAXREVERB_MAX_DECAY_LFRATIO = (float) 2.0F; - public static final float AL_EAXREVERB_MAX_DECAY_TIME = (float) 20.0F; - public static final float AL_EAXREVERB_MAX_DENSITY = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_DIFFUSION = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_ECHO_DEPTH = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_ECHO_TIME = (float) 0.25F; - public static final float AL_EAXREVERB_MAX_GAIN = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_GAINHF = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_GAINLF = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_HFREFERENCE = (float) 20000.0F; - public static final float AL_EAXREVERB_MAX_LATE_REVERB_DELAY = (float) 0.1F; - public static final float AL_EAXREVERB_MAX_LATE_REVERB_GAIN = (float) 10.0F; - public static final float AL_EAXREVERB_MAX_LFREFERENCE = (float) 1000.0F; - public static final float AL_EAXREVERB_MAX_MODULATION_DEPTH = (float) 1.0F; - public static final float AL_EAXREVERB_MAX_MODULATION_TIME = (float) 4.0F; - public static final float AL_EAXREVERB_MAX_REFLECTIONS_DELAY = (float) 0.3F; - public static final float AL_EAXREVERB_MAX_REFLECTIONS_GAIN = (float) 3.16F; - public static final float AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = (float) 10.0F; - public static final float AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = (float) 0.892F; - public static final int AL_EAXREVERB_MIN_DECAY_HFLIMIT = (int) 0; - public static final float AL_EAXREVERB_MIN_DECAY_HFRATIO = (float) 0.1F; - public static final float AL_EAXREVERB_MIN_DECAY_LFRATIO = (float) 0.1F; - public static final float AL_EAXREVERB_MIN_DECAY_TIME = (float) 0.1F; - public static final float AL_EAXREVERB_MIN_DENSITY = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_DIFFUSION = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_ECHO_DEPTH = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_ECHO_TIME = (float) 0.075F; - public static final float AL_EAXREVERB_MIN_GAIN = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_GAINHF = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_GAINLF = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_HFREFERENCE = (float) 1000.0F; - public static final float AL_EAXREVERB_MIN_LATE_REVERB_DELAY = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_LATE_REVERB_GAIN = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_LFREFERENCE = (float) 20.0F; - public static final float AL_EAXREVERB_MIN_MODULATION_DEPTH = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_MODULATION_TIME = (float) 0.04F; - public static final float AL_EAXREVERB_MIN_REFLECTIONS_DELAY = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_REFLECTIONS_GAIN = (float) 0.0F; - public static final float AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = (float) 0.0F; - public static final int AL_EAXREVERB_MODULATION_DEPTH = (int) 18; - public static final int AL_EAXREVERB_MODULATION_TIME = (int) 17; - public static final int AL_EAXREVERB_REFLECTIONS_DELAY = (int) 10; - public static final int AL_EAXREVERB_REFLECTIONS_GAIN = (int) 9; - public static final int AL_EAXREVERB_REFLECTIONS_PAN = (int) 11; - public static final int AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = (int) 22; - public static final int AL_ECHO_DAMPING = (int) 3; - public static final float AL_ECHO_DEFAULT_DAMPING = (float) 0.5F; - public static final float AL_ECHO_DEFAULT_DELAY = (float) 0.1F; - public static final float AL_ECHO_DEFAULT_FEEDBACK = (float) 0.5F; - public static final float AL_ECHO_DEFAULT_LRDELAY = (float) 0.1F; - public static final float AL_ECHO_DEFAULT_SPREAD = (float) -1.0F; - public static final int AL_ECHO_DELAY = (int) 1; - public static final int AL_ECHO_FEEDBACK = (int) 4; - public static final int AL_ECHO_LRDELAY = (int) 2; - public static final float AL_ECHO_MAX_DAMPING = (float) 0.99F; - public static final float AL_ECHO_MAX_DELAY = (float) 0.207F; - public static final float AL_ECHO_MAX_FEEDBACK = (float) 1.0F; - public static final float AL_ECHO_MAX_LRDELAY = (float) 0.404F; - public static final float AL_ECHO_MAX_SPREAD = (float) 1.0F; - public static final float AL_ECHO_MIN_DAMPING = (float) 0.0F; - public static final float AL_ECHO_MIN_DELAY = (float) 0.0F; - public static final float AL_ECHO_MIN_FEEDBACK = (float) 0.0F; - public static final float AL_ECHO_MIN_LRDELAY = (float) 0.0F; - public static final float AL_ECHO_MIN_SPREAD = (float) -1.0F; - public static final int AL_ECHO_SPREAD = (int) 5; - public static final int AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = (int) 3; - public static final int AL_EFFECTSLOT_EFFECT = (int) 1; - public static final int AL_EFFECTSLOT_GAIN = (int) 2; - public static final int AL_EFFECTSLOT_NULL = (int) 0; - public static final int AL_EFFECT_AUTOWAH = (int) 10; - public static final int AL_EFFECT_CHORUS = (int) 2; - public static final int AL_EFFECT_COMPRESSOR = (int) 11; - public static final int AL_EFFECT_DISTORTION = (int) 3; - public static final int AL_EFFECT_EAXREVERB = (int) 32768; - public static final int AL_EFFECT_ECHO = (int) 4; - public static final int AL_EFFECT_EQUALIZER = (int) 12; - public static final int AL_EFFECT_FIRST_PARAMETER = (int) 0; - public static final int AL_EFFECT_FLANGER = (int) 5; - public static final int AL_EFFECT_FREQUENCY_SHIFTER = (int) 6; - public static final int AL_EFFECT_LAST_PARAMETER = (int) 32768; - public static final int AL_EFFECT_NULL = (int) 0; - public static final int AL_EFFECT_PITCH_SHIFTER = (int) 8; - public static final int AL_EFFECT_REVERB = (int) 1; - public static final int AL_EFFECT_RING_MODULATOR = (int) 9; - public static final int AL_EFFECT_TYPE = (int) 32769; - public static final int AL_EFFECT_VOCAL_MORPHER = (int) 7; - public static final float AL_EQUALIZER_DEFAULT_HIGH_CUTOFF = (float) 6000.0F; - public static final float AL_EQUALIZER_DEFAULT_HIGH_GAIN = (float) 1.0F; - public static final float AL_EQUALIZER_DEFAULT_LOW_CUTOFF = (float) 200.0F; - public static final float AL_EQUALIZER_DEFAULT_LOW_GAIN = (float) 1.0F; - public static final float AL_EQUALIZER_DEFAULT_MID1_CENTER = (float) 500.0F; - public static final float AL_EQUALIZER_DEFAULT_MID1_GAIN = (float) 1.0F; - public static final float AL_EQUALIZER_DEFAULT_MID1_WIDTH = (float) 1.0F; - public static final float AL_EQUALIZER_DEFAULT_MID2_CENTER = (float) 3000.0F; - public static final float AL_EQUALIZER_DEFAULT_MID2_GAIN = (float) 1.0F; - public static final float AL_EQUALIZER_DEFAULT_MID2_WIDTH = (float) 1.0F; - public static final int AL_EQUALIZER_HIGH_CUTOFF = (int) 10; - public static final int AL_EQUALIZER_HIGH_GAIN = (int) 9; - public static final int AL_EQUALIZER_LOW_CUTOFF = (int) 2; - public static final int AL_EQUALIZER_LOW_GAIN = (int) 1; - public static final float AL_EQUALIZER_MAX_HIGH_CUTOFF = (float) 16000.0F; - public static final float AL_EQUALIZER_MAX_HIGH_GAIN = (float) 7.943F; - public static final float AL_EQUALIZER_MAX_LOW_CUTOFF = (float) 800.0F; - public static final float AL_EQUALIZER_MAX_LOW_GAIN = (float) 7.943F; - public static final float AL_EQUALIZER_MAX_MID1_CENTER = (float) 3000.0F; - public static final float AL_EQUALIZER_MAX_MID1_GAIN = (float) 7.943F; - public static final float AL_EQUALIZER_MAX_MID1_WIDTH = (float) 1.0F; - public static final float AL_EQUALIZER_MAX_MID2_CENTER = (float) 8000.0F; - public static final float AL_EQUALIZER_MAX_MID2_GAIN = (float) 7.943F; - public static final float AL_EQUALIZER_MAX_MID2_WIDTH = (float) 1.0F; - public static final int AL_EQUALIZER_MID1_CENTER = (int) 4; - public static final int AL_EQUALIZER_MID1_GAIN = (int) 3; - public static final int AL_EQUALIZER_MID1_WIDTH = (int) 5; - public static final int AL_EQUALIZER_MID2_CENTER = (int) 7; - public static final int AL_EQUALIZER_MID2_GAIN = (int) 6; - public static final int AL_EQUALIZER_MID2_WIDTH = (int) 8; - public static final float AL_EQUALIZER_MIN_HIGH_CUTOFF = (float) 4000.0F; - public static final float AL_EQUALIZER_MIN_HIGH_GAIN = (float) 0.126F; - public static final float AL_EQUALIZER_MIN_LOW_CUTOFF = (float) 50.0F; - public static final float AL_EQUALIZER_MIN_LOW_GAIN = (float) 0.126F; - public static final float AL_EQUALIZER_MIN_MID1_CENTER = (float) 200.0F; - public static final float AL_EQUALIZER_MIN_MID1_GAIN = (float) 0.126F; - public static final float AL_EQUALIZER_MIN_MID1_WIDTH = (float) 0.01F; - public static final float AL_EQUALIZER_MIN_MID2_CENTER = (float) 1000.0F; - public static final float AL_EQUALIZER_MIN_MID2_GAIN = (float) 0.126F; - public static final float AL_EQUALIZER_MIN_MID2_WIDTH = (float) 0.01F; - public static final int AL_FILTER_BANDPASS = (int) 3; - public static final int AL_FILTER_FIRST_PARAMETER = (int) 0; - public static final int AL_FILTER_HIGHPASS = (int) 2; - public static final int AL_FILTER_LAST_PARAMETER = (int) 32768; - public static final int AL_FILTER_LOWPASS = (int) 1; - public static final int AL_FILTER_NULL = (int) 0; - public static final int AL_FILTER_TYPE = (int) 32769; - public static final float AL_FLANGER_DEFAULT_DELAY = (float) 0.002F; - public static final float AL_FLANGER_DEFAULT_DEPTH = (float) 1.0F; - public static final float AL_FLANGER_DEFAULT_FEEDBACK = (float) -0.5F; - public static final int AL_FLANGER_DEFAULT_PHASE = (int) 0; - public static final float AL_FLANGER_DEFAULT_RATE = (float) 0.27F; - public static final int AL_FLANGER_DEFAULT_WAVEFORM = (int) 1; - public static final int AL_FLANGER_DELAY = (int) 6; - public static final int AL_FLANGER_DEPTH = (int) 4; - public static final int AL_FLANGER_FEEDBACK = (int) 5; - public static final float AL_FLANGER_MAX_DELAY = (float) 0.004F; - public static final float AL_FLANGER_MAX_DEPTH = (float) 1.0F; - public static final float AL_FLANGER_MAX_FEEDBACK = (float) 1.0F; - public static final int AL_FLANGER_MAX_PHASE = (int) 180; - public static final float AL_FLANGER_MAX_RATE = (float) 10.0F; - public static final int AL_FLANGER_MAX_WAVEFORM = (int) 1; - public static final float AL_FLANGER_MIN_DELAY = (float) 0.0F; - public static final float AL_FLANGER_MIN_DEPTH = (float) 0.0F; - public static final float AL_FLANGER_MIN_FEEDBACK = (float) -1.0F; - public static final int AL_FLANGER_MIN_PHASE = (int) -180; - public static final float AL_FLANGER_MIN_RATE = (float) 0.0F; - public static final int AL_FLANGER_MIN_WAVEFORM = (int) 0; - public static final int AL_FLANGER_PHASE = (int) 2; - public static final int AL_FLANGER_RATE = (int) 3; - public static final int AL_FLANGER_WAVEFORM = (int) 1; - public static final int AL_FLANGER_WAVEFORM_SINUSOID = (int) 0; - public static final int AL_FLANGER_WAVEFORM_TRIANGLE = (int) 1; - public static final float AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY = (float) 0.0F; - public static final int AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION = (int) 0; - public static final int AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION = (int) 0; - public static final int AL_FREQUENCY_SHIFTER_DIRECTION_DOWN = (int) 0; - public static final int AL_FREQUENCY_SHIFTER_DIRECTION_OFF = (int) 2; - public static final int AL_FREQUENCY_SHIFTER_DIRECTION_UP = (int) 1; - public static final int AL_FREQUENCY_SHIFTER_FREQUENCY = (int) 1; - public static final int AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = (int) 2; - public static final float AL_FREQUENCY_SHIFTER_MAX_FREQUENCY = (float) 24000.0F; - public static final int AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION = (int) 2; - public static final int AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION = (int) 2; - public static final float AL_FREQUENCY_SHIFTER_MIN_FREQUENCY = (float) 0.0F; - public static final int AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION = (int) 0; - public static final int AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION = (int) 0; - public static final int AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = (int) 3; - public static final int AL_HIGHPASS_GAIN = (int) 1; - public static final int AL_HIGHPASS_GAINLF = (int) 2; - public static final int AL_LOWPASS_GAIN = (int) 1; - public static final int AL_LOWPASS_GAINHF = (int) 2; - public static final float AL_MAX_AIR_ABSORPTION_FACTOR = (float) 10.0F; - public static final int AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 1; - public static final int AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 1; - public static final float AL_MAX_CONE_OUTER_GAINHF = (float) 1.0F; - public static final int AL_MAX_DIRECT_FILTER_GAINHF_AUTO = (int) 1; - public static final float AL_MAX_METERS_PER_UNIT = (float) 3.4028235E38F; - public static final float AL_MAX_ROOM_ROLLOFF_FACTOR = (float) 10.0F; - public static final int AL_METERS_PER_UNIT = (int) 131076; - public static final float AL_MIN_AIR_ABSORPTION_FACTOR = (float) 0.0F; - public static final int AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 0; - public static final int AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 0; - public static final float AL_MIN_CONE_OUTER_GAINHF = (float) 0.0F; - public static final int AL_MIN_DIRECT_FILTER_GAINHF_AUTO = (int) 0; - public static final float AL_MIN_METERS_PER_UNIT = (float) 1.4E-45F; - public static final float AL_MIN_ROOM_ROLLOFF_FACTOR = (float) 0.0F; - public static final int AL_PITCH_SHIFTER_COARSE_TUNE = (int) 1; - public static final int AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE = (int) 12; - public static final int AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE = (int) 0; - public static final int AL_PITCH_SHIFTER_FINE_TUNE = (int) 2; - public static final int AL_PITCH_SHIFTER_MAX_COARSE_TUNE = (int) 12; - public static final int AL_PITCH_SHIFTER_MAX_FINE_TUNE = (int) 50; - public static final int AL_PITCH_SHIFTER_MIN_COARSE_TUNE = (int) -12; - public static final int AL_PITCH_SHIFTER_MIN_FINE_TUNE = (int) -50; - public static final int AL_REVERB_AIR_ABSORPTION_GAINHF = (int) 11; - public static final int AL_REVERB_DECAY_HFLIMIT = (int) 13; - public static final int AL_REVERB_DECAY_HFRATIO = (int) 6; - public static final int AL_REVERB_DECAY_TIME = (int) 5; - public static final float AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = (float) 0.994F; - public static final int AL_REVERB_DEFAULT_DECAY_HFLIMIT = (int) 1; - public static final float AL_REVERB_DEFAULT_DECAY_HFRATIO = (float) 0.83F; - public static final float AL_REVERB_DEFAULT_DECAY_TIME = (float) 1.49F; - public static final float AL_REVERB_DEFAULT_DENSITY = (float) 1.0F; - public static final float AL_REVERB_DEFAULT_DIFFUSION = (float) 1.0F; - public static final float AL_REVERB_DEFAULT_GAIN = (float) 0.32F; - public static final float AL_REVERB_DEFAULT_GAINHF = (float) 0.89F; - public static final float AL_REVERB_DEFAULT_LATE_REVERB_DELAY = (float) 0.011F; - public static final float AL_REVERB_DEFAULT_LATE_REVERB_GAIN = (float) 1.26F; - public static final float AL_REVERB_DEFAULT_REFLECTIONS_DELAY = (float) 0.007F; - public static final float AL_REVERB_DEFAULT_REFLECTIONS_GAIN = (float) 0.05F; - public static final float AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = (float) 0.0F; - public static final int AL_REVERB_DENSITY = (int) 1; - public static final int AL_REVERB_DIFFUSION = (int) 2; - public static final int AL_REVERB_GAIN = (int) 3; - public static final int AL_REVERB_GAINHF = (int) 4; - public static final int AL_REVERB_LATE_REVERB_DELAY = (int) 10; - public static final int AL_REVERB_LATE_REVERB_GAIN = (int) 9; - public static final float AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = (float) 1.0F; - public static final int AL_REVERB_MAX_DECAY_HFLIMIT = (int) 1; - public static final float AL_REVERB_MAX_DECAY_HFRATIO = (float) 2.0F; - public static final float AL_REVERB_MAX_DECAY_TIME = (float) 20.0F; - public static final float AL_REVERB_MAX_DENSITY = (float) 1.0F; - public static final float AL_REVERB_MAX_DIFFUSION = (float) 1.0F; - public static final float AL_REVERB_MAX_GAIN = (float) 1.0F; - public static final float AL_REVERB_MAX_GAINHF = (float) 1.0F; - public static final float AL_REVERB_MAX_LATE_REVERB_DELAY = (float) 0.1F; - public static final float AL_REVERB_MAX_LATE_REVERB_GAIN = (float) 10.0F; - public static final float AL_REVERB_MAX_REFLECTIONS_DELAY = (float) 0.3F; - public static final float AL_REVERB_MAX_REFLECTIONS_GAIN = (float) 3.16F; - public static final float AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = (float) 10.0F; - public static final float AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = (float) 0.892F; - public static final int AL_REVERB_MIN_DECAY_HFLIMIT = (int) 0; - public static final float AL_REVERB_MIN_DECAY_HFRATIO = (float) 0.1F; - public static final float AL_REVERB_MIN_DECAY_TIME = (float) 0.1F; - public static final float AL_REVERB_MIN_DENSITY = (float) 0.0F; - public static final float AL_REVERB_MIN_DIFFUSION = (float) 0.0F; - public static final float AL_REVERB_MIN_GAIN = (float) 0.0F; - public static final float AL_REVERB_MIN_GAINHF = (float) 0.0F; - public static final float AL_REVERB_MIN_LATE_REVERB_DELAY = (float) 0.0F; - public static final float AL_REVERB_MIN_LATE_REVERB_GAIN = (float) 0.0F; - public static final float AL_REVERB_MIN_REFLECTIONS_DELAY = (float) 0.0F; - public static final float AL_REVERB_MIN_REFLECTIONS_GAIN = (float) 0.0F; - public static final float AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = (float) 0.0F; - public static final int AL_REVERB_REFLECTIONS_DELAY = (int) 8; - public static final int AL_REVERB_REFLECTIONS_GAIN = (int) 7; - public static final int AL_REVERB_ROOM_ROLLOFF_FACTOR = (int) 12; - public static final float AL_RING_MODULATOR_DEFAULT_FREQUENCY = (float) 440.0F; - public static final float AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF = (float) 800.0F; - public static final int AL_RING_MODULATOR_DEFAULT_WAVEFORM = (int) 0; - public static final int AL_RING_MODULATOR_FREQUENCY = (int) 1; - public static final int AL_RING_MODULATOR_HIGHPASS_CUTOFF = (int) 2; - public static final float AL_RING_MODULATOR_MAX_FREQUENCY = (float) 8000.0F; - public static final float AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = (float) 24000.0F; - public static final int AL_RING_MODULATOR_MAX_WAVEFORM = (int) 2; - public static final float AL_RING_MODULATOR_MIN_FREQUENCY = (float) 0.0F; - public static final float AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = (float) 0.0F; - public static final int AL_RING_MODULATOR_MIN_WAVEFORM = (int) 0; - public static final int AL_RING_MODULATOR_SAWTOOTH = (int) 1; - public static final int AL_RING_MODULATOR_SINUSOID = (int) 0; - public static final int AL_RING_MODULATOR_SQUARE = (int) 2; - public static final int AL_RING_MODULATOR_WAVEFORM = (int) 3; - public static final int AL_ROOM_ROLLOFF_FACTOR = (int) 131080; - public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA = (int) 0; - public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING = (int) 0; - public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB = (int) 10; - public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING = (int) 0; - public static final float AL_VOCAL_MORPHER_DEFAULT_RATE = (float) 1.41F; - public static final int AL_VOCAL_MORPHER_DEFAULT_WAVEFORM = (int) 0; - public static final int AL_VOCAL_MORPHER_MAX_PHONEMEA = (int) 29; - public static final int AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING = (int) 24; - public static final int AL_VOCAL_MORPHER_MAX_PHONEMEB = (int) 29; - public static final int AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING = (int) 24; - public static final float AL_VOCAL_MORPHER_MAX_RATE = (float) 10.0F; - public static final int AL_VOCAL_MORPHER_MAX_WAVEFORM = (int) 2; - public static final int AL_VOCAL_MORPHER_MIN_PHONEMEA = (int) 0; - public static final int AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING = (int) -24; - public static final int AL_VOCAL_MORPHER_MIN_PHONEMEB = (int) 0; - public static final int AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING = (int) -24; - public static final float AL_VOCAL_MORPHER_MIN_RATE = (float) 0.0F; - public static final int AL_VOCAL_MORPHER_MIN_WAVEFORM = (int) 0; - public static final int AL_VOCAL_MORPHER_PHONEMEA = (int) 1; - public static final int AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = (int) 2; - public static final int AL_VOCAL_MORPHER_PHONEMEB = (int) 3; - public static final int AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = (int) 4; - public static final int AL_VOCAL_MORPHER_PHONEME_A = (int) 0; - public static final int AL_VOCAL_MORPHER_PHONEME_AA = (int) 5; - public static final int AL_VOCAL_MORPHER_PHONEME_AE = (int) 6; - public static final int AL_VOCAL_MORPHER_PHONEME_AH = (int) 7; - public static final int AL_VOCAL_MORPHER_PHONEME_AO = (int) 8; - public static final int AL_VOCAL_MORPHER_PHONEME_B = (int) 15; - public static final int AL_VOCAL_MORPHER_PHONEME_D = (int) 16; - public static final int AL_VOCAL_MORPHER_PHONEME_E = (int) 1; - public static final int AL_VOCAL_MORPHER_PHONEME_EH = (int) 9; - public static final int AL_VOCAL_MORPHER_PHONEME_ER = (int) 10; - public static final int AL_VOCAL_MORPHER_PHONEME_F = (int) 17; - public static final int AL_VOCAL_MORPHER_PHONEME_G = (int) 18; - public static final int AL_VOCAL_MORPHER_PHONEME_I = (int) 2; - public static final int AL_VOCAL_MORPHER_PHONEME_IH = (int) 11; - public static final int AL_VOCAL_MORPHER_PHONEME_IY = (int) 12; - public static final int AL_VOCAL_MORPHER_PHONEME_J = (int) 19; - public static final int AL_VOCAL_MORPHER_PHONEME_K = (int) 20; - public static final int AL_VOCAL_MORPHER_PHONEME_L = (int) 21; - public static final int AL_VOCAL_MORPHER_PHONEME_M = (int) 22; - public static final int AL_VOCAL_MORPHER_PHONEME_N = (int) 23; - public static final int AL_VOCAL_MORPHER_PHONEME_O = (int) 3; - public static final int AL_VOCAL_MORPHER_PHONEME_P = (int) 24; - public static final int AL_VOCAL_MORPHER_PHONEME_R = (int) 25; - public static final int AL_VOCAL_MORPHER_PHONEME_S = (int) 26; - public static final int AL_VOCAL_MORPHER_PHONEME_T = (int) 27; - public static final int AL_VOCAL_MORPHER_PHONEME_U = (int) 4; - public static final int AL_VOCAL_MORPHER_PHONEME_UH = (int) 13; - public static final int AL_VOCAL_MORPHER_PHONEME_UW = (int) 14; - public static final int AL_VOCAL_MORPHER_PHONEME_V = (int) 28; - public static final int AL_VOCAL_MORPHER_PHONEME_Z = (int) 29; - public static final int AL_VOCAL_MORPHER_RATE = (int) 6; - public static final int AL_VOCAL_MORPHER_WAVEFORM = (int) 5; - public static final int AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH = (int) 2; - public static final int AL_VOCAL_MORPHER_WAVEFORM_SINUSOID = (int) 0; - public static final int AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE = (int) 1; - public static final float BANDPASS_DEFAULT_GAIN = (float) 1.0F; - public static final float BANDPASS_DEFAULT_GAINHF = (float) 1.0F; - public static final float BANDPASS_DEFAULT_GAINLF = (float) 1.0F; - public static final float BANDPASS_MAX_GAIN = (float) 1.0F; - public static final float BANDPASS_MAX_GAINHF = (float) 1.0F; - public static final float BANDPASS_MAX_GAINLF = (float) 1.0F; - public static final float BANDPASS_MIN_GAIN = (float) 0.0F; - public static final float BANDPASS_MIN_GAINHF = (float) 0.0F; - public static final float BANDPASS_MIN_GAINLF = (float) 0.0F; - public static final float HIGHPASS_DEFAULT_GAIN = (float) 1.0F; - public static final float HIGHPASS_DEFAULT_GAINLF = (float) 1.0F; - public static final float HIGHPASS_MAX_GAIN = (float) 1.0F; - public static final float HIGHPASS_MAX_GAINLF = (float) 1.0F; - public static final float HIGHPASS_MIN_GAIN = (float) 0.0F; - public static final float HIGHPASS_MIN_GAINLF = (float) 0.0F; - public static final float LOWPASS_DEFAULT_GAIN = (float) 1.0F; - public static final float LOWPASS_DEFAULT_GAINHF = (float) 1.0F; - public static final float LOWPASS_MAX_GAIN = (float) 1.0F; - public static final float LOWPASS_MAX_GAINHF = (float) 1.0F; - public static final float LOWPASS_MIN_GAIN = (float) 0.0F; - public static final float LOWPASS_MIN_GAINHF = (float) 0.0F; - - public static void alAuxiliaryEffectSlot(int arg0, int arg1, java.nio.FloatBuffer arg2) { - EXTEfx.alAuxiliaryEffectSlotfv(arg0, arg1, arg2); - } - - public static void alAuxiliaryEffectSlot(int arg0, int arg1, java.nio.IntBuffer arg2) { - EXTEfx.alAuxiliaryEffectSlotiv(arg0, arg1, arg2); - } - - public static void alAuxiliaryEffectSlotf(int arg0, int arg1, float arg2) { - EXTEfx.alAuxiliaryEffectSlotf(arg0, arg1, arg2); - } - - public static void alAuxiliaryEffectSloti(int arg0, int arg1, int arg2) { - EXTEfx.alAuxiliaryEffectSloti(arg0, arg1, arg2); - } - - public static void alDeleteAuxiliaryEffectSlots(int arg0) { - EXTEfx.alDeleteAuxiliaryEffectSlots(arg0); - } - - public static void alDeleteAuxiliaryEffectSlots(java.nio.IntBuffer arg0) { - EXTEfx.alDeleteAuxiliaryEffectSlots(arg0); - } - - public static void alDeleteEffects(int arg0) { - EXTEfx.alDeleteEffects(arg0); - } - - public static void alDeleteEffects(java.nio.IntBuffer arg0) { - EXTEfx.alDeleteEffects(arg0); - } - - public static void alDeleteFilters(int arg0) { - EXTEfx.alDeleteFilters(arg0); - } - - public static void alDeleteFilters(java.nio.IntBuffer arg0) { - EXTEfx.alDeleteFilters(arg0); - } - - public static void alEffect(int arg0, int arg1, java.nio.FloatBuffer arg2) { - EXTEfx.alEffectfv(arg0, arg1, arg2); - } - - public static void alEffect(int arg0, int arg1, java.nio.IntBuffer arg2) { - EXTEfx.alEffectiv(arg0, arg1, arg2); - } - - public static void alEffectf(int arg0, int arg1, float arg2) { - EXTEfx.alEffectf(arg0, arg1, arg2); - } - - public static void alEffecti(int arg0, int arg1, int arg2) { - EXTEfx.alEffecti(arg0, arg1, arg2); - } - - // HERE - public static void alFilter(int arg0, int arg1, java.nio.FloatBuffer arg2) { - EXTEfx.alFilterfv(arg0, arg1, arg2); - } - - public static void alFilter(int arg0, int arg1, java.nio.IntBuffer arg2) { - EXTEfx.alFilteriv(arg0, arg1, arg2); - } - - public static void alFilterf(int arg0, int arg1, float arg2) { - EXTEfx.alFilterf(arg0, arg1, arg2); - } - - public static void alFilteri(int arg0, int arg1, int arg2) { - EXTEfx.alFilteri(arg0, arg1, arg2); - } - - public static int alGenAuxiliaryEffectSlots() { - return EXTEfx.alGenAuxiliaryEffectSlots(); - } - - public static void alGenAuxiliaryEffectSlots(java.nio.IntBuffer arg0) { - EXTEfx.alGenAuxiliaryEffectSlots(arg0); - } - - public static int alGenEffects() { - return EXTEfx.alGenEffects(); - } - - public static void alGenEffects(java.nio.IntBuffer arg0) { - EXTEfx.alGenEffects(arg0); - } - - public static int alGenFilters() { - return EXTEfx.alGenFilters(); - } - - public static void alGenFilters(java.nio.IntBuffer arg0) { - EXTEfx.alGenFilters(arg0); - } - - public static void alGetAuxiliaryEffectSlot(int arg0, int arg1, java.nio.FloatBuffer arg2) { - EXTEfx.alGetAuxiliaryEffectSlotfv(arg0, arg1, arg2); - } - - public static void alGetAuxiliaryEffectSlot(int arg0, int arg1, java.nio.IntBuffer arg2) { - EXTEfx.alGetAuxiliaryEffectSlotiv(arg0, arg1, arg2); - } - - public static float alGetAuxiliaryEffectSlotf(int arg0, int arg1) { - return EXTEfx.alGetAuxiliaryEffectSlotf(arg0, arg1); - } - - public static int alGetAuxiliaryEffectSloti(int arg0, int arg1) { - return EXTEfx.alGetAuxiliaryEffectSloti(arg0, arg1); - } - - public static void alGetEffect(int arg0, int arg1, java.nio.FloatBuffer arg2) { - EXTEfx.alGetEffectfv(arg0, arg1, arg2); - } - - public static void alGetEffect(int arg0, int arg1, java.nio.IntBuffer arg2) { - EXTEfx.alGetEffectiv(arg0, arg1, arg2); - } - - public static float alGetEffectf(int arg0, int arg1) { - return EXTEfx.alGetEffectf(arg0, arg1); - } - - public static int alGetEffecti(int arg0, int arg1) { - return EXTEfx.alGetEffecti(arg0, arg1); - } - - public static void alGetFilter(int arg0, int arg1, java.nio.FloatBuffer arg2) { - EXTEfx.alGetFilterfv(arg0, arg1, arg2); - } - - public static void alGetFilter(int arg0, int arg1, java.nio.IntBuffer arg2) { - EXTEfx.alGetFilteriv(arg0, arg1, arg2); - } - - public static float alGetFilterf(int arg0, int arg1) { - return EXTEfx.alGetFilterf(arg0, arg1); - } - - public static int alGetFilteri(int arg0, int arg1) { - return EXTEfx.alGetFilteri(arg0, arg1); - } - - public static boolean alIsAuxiliaryEffectSlot(int arg0) { - return EXTEfx.alIsAuxiliaryEffectSlot(arg0); - } - - public static boolean alIsEffect(int arg0) { - return EXTEfx.alIsEffect(arg0); - } - - public static boolean alIsFilter(int arg0) { - return EXTEfx.alIsFilter(arg0); - } - -} diff --git a/src/main/java/org/lwjgl/openal/EFXUtil.java b/src/main/java/org/lwjgl/openal/EFXUtil.java deleted file mode 100644 index 9541d0187..000000000 --- a/src/main/java/org/lwjgl/openal/EFXUtil.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. License terms: http://lwjgl.org/license.php - */ -package org.lwjgl.openal; - -import static org.lwjgl3.openal.AL10.*; -import static org.lwjgl3.openal.EXTEfx.*; - -import org.lwjgl3.openal.ALC; - -/** - * Utility class for the OpenAL extension AL_EXT_EFX. Provides functions to check for the extension and support of - * various effects and filters. - *

- * Currently supports AL_EXT_EFX version 1.0 effects and filters. - * - * @author Ciardhubh - */ -public final class EFXUtil { - - /** Constant for testSupportGeneric to check an effect. */ - private static final int EFFECT = 1111; - /** Constant for testSupportGeneric to check a filter. */ - private static final int FILTER = 2222; - - /** Utility class, hidden contructor. */ - private EFXUtil() {} - - /** - * Checks if OpenAL implementation is loaded and supports AL_EXT_EFX. - * - * @return True if AL_EXT_EFX is supported, false if not. - * - * @throws org.lwjgl3.openal.OpenALException If OpenAL has not been created yet. - */ - public static boolean isEfxSupported() { - return ALC.getCapabilities().ALC_EXT_EFX; - } - - /** - * Tests OpenAL to see whether the given effect type is supported. This is done by creating an effect of the given - * type. If creation succeeds the effect is supported. - * - * @param effectType Type of effect whose support is to be tested, e.g. AL_EFFECT_REVERB. - * - * @return True if it is supported, false if not. - * - * @throws org.lwjgl3.openal.OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has not - * been created yet. - * @throws IllegalArgumentException effectType is not a valid effect type. - */ - public static boolean isEffectSupported(int effectType) { - // Make sure type is a real effect. - switch (effectType) { - case AL_EFFECT_NULL: - case AL_EFFECT_EAXREVERB: - case AL_EFFECT_REVERB: - case AL_EFFECT_CHORUS: - case AL_EFFECT_DISTORTION: - case AL_EFFECT_ECHO: - case AL_EFFECT_FLANGER: - case AL_EFFECT_FREQUENCY_SHIFTER: - case AL_EFFECT_VOCAL_MORPHER: - case AL_EFFECT_PITCH_SHIFTER: - case AL_EFFECT_RING_MODULATOR: - case AL_EFFECT_AUTOWAH: - case AL_EFFECT_COMPRESSOR: - case AL_EFFECT_EQUALIZER: - break; - default: - throw new IllegalArgumentException("Unknown or invalid effect type: " + effectType); - } - - return testSupportGeneric(EFFECT, effectType); - } - - /** - * Tests OpenAL to see whether the given filter type is supported. This is done by creating a filter of the given - * type. If creation succeeds the filter is supported. - * - * @param filterType Type of filter whose support is to be tested, e.g. AL_FILTER_LOWPASS. - * - * @return True if it is supported, false if not. - * - * @throws org.lwjgl3.openal.OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has not - * been created yet. - * @throws IllegalArgumentException filterType is not a valid filter type. - */ - public static boolean isFilterSupported(int filterType) { - // Make sure type is a real filter. - switch (filterType) { - case AL_FILTER_NULL: - case AL_FILTER_LOWPASS: - case AL_FILTER_HIGHPASS: - case AL_FILTER_BANDPASS: - break; - default: - throw new IllegalArgumentException("Unknown or invalid filter type: " + filterType); - } - - return testSupportGeneric(FILTER, filterType); - } - - /** - * Generic test function to see if an EFX object supports a given kind of type. Works for effects and filters. - * - * @param objectType Type of object to test. Must be either EFXUtil.EFFECT or EFXUtil.FILTER. - * @param typeValue OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS or - * AL_EFFECT_REVERB. - * - * @return True if object supports typeValue, false else. - */ - private static boolean testSupportGeneric(int objectType, int typeValue) { - // Check for supported objectType. - switch (objectType) { - case EFFECT: - case FILTER: - break; - default: - throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - - boolean supported = false; - if (isEfxSupported()) { - - // Try to create object in order to check AL's response. - alGetError(); - int genError; - int testObject = 0; - try { - testObject = switch (objectType) { // Create object based on type - case EFFECT -> alGenEffects(); - case FILTER -> alGenFilters(); - default -> throw new IllegalArgumentException("Invalid objectType: " + objectType); - }; - genError = alGetError(); - } catch (OpenALException debugBuildException) { - // Hack because OpenALException hides the original error code (short of parsing the - // error message String which would break if it gets changed). - if (debugBuildException.getMessage().contains("AL_OUT_OF_MEMORY")) { - genError = AL_OUT_OF_MEMORY; - } else { - genError = AL_INVALID_OPERATION; - } - } - - if (genError == AL_NO_ERROR) { - // Successfully created, now try to set type. - alGetError(); - int setError; - try { - switch (objectType) { // Set based on object type - case EFFECT -> alEffecti(testObject, AL_EFFECT_TYPE, typeValue); - case FILTER -> alFilteri(testObject, AL_FILTER_TYPE, typeValue); - default -> throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - setError = alGetError(); - } catch (OpenALException debugBuildException) { - // Hack because OpenALException hides the original error code (short of parsing - // the error message String which would break when it gets changed). - setError = AL_INVALID_VALUE; - } - - if (setError == AL_NO_ERROR) { - supported = true; - } - - // Cleanup - try { - switch (objectType) { // Set based on object type - case EFFECT -> alDeleteEffects(testObject); - case FILTER -> alDeleteFilters(testObject); - default -> throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - } catch (OpenALException debugBuildException) { - // Don't care about cleanup errors. - } - - } else if (genError == AL_OUT_OF_MEMORY) { - throw new OpenALException(AL10.alGetString(genError)); - } - } - - return supported; - } -} diff --git a/src/main/java/org/lwjgl/openal/OpenALException.java b/src/main/java/org/lwjgl/openal/OpenALException.java deleted file mode 100644 index 44d07e13a..000000000 --- a/src/main/java/org/lwjgl/openal/OpenALException.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.openal; - -/** - *
- * Thrown by the debug build library of the LWJGL if any OpenAL operation causes an error. - * - * @author Brian Matzon - * @version $Revision$ $Id$ - */ -public class OpenALException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - /** - * Constructor for OpenALException. - */ - public OpenALException() { - super(); - } - - /** - * Constructor that takes an AL error number - */ - public OpenALException(int error_code) { - super("OpenAL error: " + org.lwjgl3.openal.AL10.alGetString(error_code) + " (" + error_code + ")"); - } - - /** - * Constructor for OpenALException. - * - * @param message - */ - public OpenALException(String message) { - super(message); - } - - /** - * Constructor for OpenALException. - * - * @param message - * @param cause - */ - public OpenALException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructor for OpenALException. - * - * @param cause - */ - public OpenALException(Throwable cause) { - super(cause); - } -} diff --git a/src/main/java/org/lwjgl/openal/Util.java b/src/main/java/org/lwjgl/openal/Util.java deleted file mode 100644 index e0a443487..000000000 --- a/src/main/java/org/lwjgl/openal/Util.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.openal; - -/** - * Simple utility class for checking AL/ALC errors - * - * @author cix_foo - * @author Brian Matzon - * @version $Revision$ - */ -public final class Util { - - /** No c'tor */ - private Util() {} - - /** - * Checks for any ALC errors and throws an unchecked exception on errors - * - * @param device Device for which to check ALC errors - */ - public static void checkALCError(ALCdevice device) { - int err = ALC10.alcGetError(device); - if (err != ALC10.ALC_NO_ERROR) throw new OpenALException(ALC10.alcGetString(AL.getDevice(), err)); - } - - /** - * Checks for any AL errors and throws an unchecked exception on errors - */ - public static void checkALError() { - int err = AL10.alGetError(); - if (err != AL10.AL_NO_ERROR) throw new OpenALException(err); - } - - /** - * Checks for a valid device - * - * @param device ALCdevice to check the validity of - */ - public static void checkALCValidDevice(ALCdevice device) { - if (!device.isValid()) { - throw new OpenALException("Invalid device: " + device); - } - } - - /** - * Checks for a valid context - * - * @param context ALCcontext to check the validity of - */ - public static void checkALCValidContext(ALCcontext context) { - if (!context.isValid()) { - throw new OpenALException("Invalid context: " + context); - } - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDBlendMinmaxFactor.java b/src/main/java/org/lwjgl/opengl/AMDBlendMinmaxFactor.java deleted file mode 100644 index f8c03320a..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDBlendMinmaxFactor.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDBlendMinmaxFactor { - - public static final int GL_FACTOR_MAX_AMD = (int) 36893; - public static final int GL_FACTOR_MIN_AMD = (int) 36892; -} diff --git a/src/main/java/org/lwjgl/opengl/AMDDebugOutput.java b/src/main/java/org/lwjgl/opengl/AMDDebugOutput.java deleted file mode 100644 index a01687727..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDDebugOutput.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDDebugOutput { - - public static final int GL_DEBUG_CATEGORY_API_ERROR_AMD = (int) 37193; - public static final int GL_DEBUG_CATEGORY_APPLICATION_AMD = (int) 37199; - public static final int GL_DEBUG_CATEGORY_DEPRECATION_AMD = (int) 37195; - public static final int GL_DEBUG_CATEGORY_OTHER_AMD = (int) 37200; - public static final int GL_DEBUG_CATEGORY_PERFORMANCE_AMD = (int) 37197; - public static final int GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = (int) 37198; - public static final int GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = (int) 37196; - public static final int GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = (int) 37194; - public static final int GL_DEBUG_LOGGED_MESSAGES_AMD = (int) 37189; - public static final int GL_DEBUG_SEVERITY_HIGH_AMD = (int) 37190; - public static final int GL_DEBUG_SEVERITY_LOW_AMD = (int) 37192; - public static final int GL_DEBUG_SEVERITY_MEDIUM_AMD = (int) 37191; - public static final int GL_MAX_DEBUG_LOGGED_MESSAGES_AMD = (int) 37188; - public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_AMD = (int) 37187; - - public static void glDebugMessageEnableAMD(int category, int severity, java.nio.IntBuffer ids, boolean enabled) { - org.lwjgl3.opengl.AMDDebugOutput.glDebugMessageEnableAMD(category, severity, ids, enabled); - } - - public static void glDebugMessageInsertAMD(int category, int severity, int id, java.lang.CharSequence buf) { - org.lwjgl3.opengl.AMDDebugOutput.glDebugMessageInsertAMD(category, severity, id, buf); - } - - public static void glDebugMessageInsertAMD(int category, int severity, int id, java.nio.ByteBuffer buf) { - org.lwjgl3.opengl.AMDDebugOutput.glDebugMessageInsertAMD(category, severity, id, buf); - } - - public static int glGetDebugMessageLogAMD(int count, java.nio.IntBuffer categories, java.nio.IntBuffer severities, - java.nio.IntBuffer ids, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog) { - return org.lwjgl3.opengl.AMDDebugOutput - .glGetDebugMessageLogAMD(count, categories, severities, ids, lengths, messageLog); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDDepthClampSeparate.java b/src/main/java/org/lwjgl/opengl/AMDDepthClampSeparate.java deleted file mode 100644 index d4296e26f..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDDepthClampSeparate.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDDepthClampSeparate { - - public static final int GL_DEPTH_CLAMP_FAR_AMD = (int) 36895; - public static final int GL_DEPTH_CLAMP_NEAR_AMD = (int) 36894; -} diff --git a/src/main/java/org/lwjgl/opengl/AMDDrawBuffersBlend.java b/src/main/java/org/lwjgl/opengl/AMDDrawBuffersBlend.java deleted file mode 100644 index cd0006b89..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDDrawBuffersBlend.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDDrawBuffersBlend { - - public static void glBlendEquationIndexedAMD(int buf, int mode) { - org.lwjgl3.opengl.AMDDrawBuffersBlend.glBlendEquationIndexedAMD(buf, mode); - } - - public static void glBlendEquationSeparateIndexedAMD(int buf, int modeRGB, int modeAlpha) { - org.lwjgl3.opengl.AMDDrawBuffersBlend.glBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha); - } - - public static void glBlendFuncIndexedAMD(int buf, int src, int dst) { - org.lwjgl3.opengl.AMDDrawBuffersBlend.glBlendFuncIndexedAMD(buf, src, dst); - } - - public static void glBlendFuncSeparateIndexedAMD(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { - org.lwjgl3.opengl.AMDDrawBuffersBlend.glBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDInterleavedElements.java b/src/main/java/org/lwjgl/opengl/AMDInterleavedElements.java deleted file mode 100644 index ff856dba9..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDInterleavedElements.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDInterleavedElements { - - public static final int GL_VERTEX_ELEMENT_SWIZZLE_AMD = (int) 37284; - public static final int GL_VERTEX_ID_SWIZZLE_AMD = (int) 37285; - - public static void glVertexAttribParameteriAMD(int index, int pname, int param) { - org.lwjgl3.opengl.AMDInterleavedElements.glVertexAttribParameteriAMD(index, pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDPerformanceMonitor.java b/src/main/java/org/lwjgl/opengl/AMDPerformanceMonitor.java deleted file mode 100644 index 73ae1773f..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDPerformanceMonitor.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDPerformanceMonitor { - - public static final int GL_COUNTER_RANGE_AMD = (int) 35777; - public static final int GL_COUNTER_TYPE_AMD = (int) 35776; - public static final int GL_PERCENTAGE_AMD = (int) 35779; - public static final int GL_PERFMON_RESULT_AMD = (int) 35782; - public static final int GL_PERFMON_RESULT_AVAILABLE_AMD = (int) 35780; - public static final int GL_PERFMON_RESULT_SIZE_AMD = (int) 35781; - public static final int GL_UNSIGNED_INT64_AMD = (int) 35778; - - public static void glBeginPerfMonitorAMD(int monitor) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glBeginPerfMonitorAMD(monitor); - } - - public static void glDeletePerfMonitorsAMD(int monitor) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glDeletePerfMonitorsAMD(monitor); - } - - public static void glDeletePerfMonitorsAMD(java.nio.IntBuffer monitors) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glDeletePerfMonitorsAMD(monitors); - } - - public static void glEndPerfMonitorAMD(int monitor) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glEndPerfMonitorAMD(monitor); - } - - public static int glGenPerfMonitorsAMD() { - return org.lwjgl3.opengl.AMDPerformanceMonitor.glGenPerfMonitorsAMD(); - } - - public static void glGenPerfMonitorsAMD(java.nio.IntBuffer monitors) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glGenPerfMonitorsAMD(monitors); - } - - public static void glGetPerfMonitorCounterDataAMD(int monitor, int pname, java.nio.IntBuffer data, - java.nio.IntBuffer bytesWritten) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glGetPerfMonitorCounterDataAMD(monitor, pname, data, bytesWritten); - } - - public static void glGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data); - } - - public static void glGetPerfMonitorCounterStringAMD(int group, int counter, java.nio.IntBuffer length, - java.nio.ByteBuffer counterString) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glGetPerfMonitorCounterStringAMD(group, counter, length, counterString); - } - - public static void glGetPerfMonitorCountersAMD(int group, java.nio.IntBuffer numCounters, - java.nio.IntBuffer maxActiveCounters, java.nio.IntBuffer counters) { - org.lwjgl3.opengl.AMDPerformanceMonitor - .glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counters); - } - - public static void glGetPerfMonitorGroupStringAMD(int group, java.nio.IntBuffer length, - java.nio.ByteBuffer groupString) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glGetPerfMonitorGroupStringAMD(group, length, groupString); - } - - public static void glGetPerfMonitorGroupsAMD(java.nio.IntBuffer numGroups, java.nio.IntBuffer groups) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glGetPerfMonitorGroupsAMD(numGroups, groups); - } - - public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int counter) { - - org.lwjgl3.opengl.AMDPerformanceMonitor - .glSelectPerfMonitorCountersAMD(monitor, enable, group, new int[] { counter }); - } - - public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, - java.nio.IntBuffer counterList) { - org.lwjgl3.opengl.AMDPerformanceMonitor.glSelectPerfMonitorCountersAMD(monitor, enable, group, counterList); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDPinnedMemory.java b/src/main/java/org/lwjgl/opengl/AMDPinnedMemory.java deleted file mode 100644 index 434b6e939..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDPinnedMemory.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDPinnedMemory { - - public static final int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = (int) 37216; -} diff --git a/src/main/java/org/lwjgl/opengl/AMDQueryBufferObject.java b/src/main/java/org/lwjgl/opengl/AMDQueryBufferObject.java deleted file mode 100644 index f96aff532..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDQueryBufferObject.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDQueryBufferObject { - - public static final int GL_QUERY_BUFFER_AMD = (int) 37266; - public static final int GL_QUERY_BUFFER_BINDING_AMD = (int) 37267; - public static final int GL_QUERY_RESULT_NO_WAIT_AMD = (int) 37268; -} diff --git a/src/main/java/org/lwjgl/opengl/AMDSamplePositions.java b/src/main/java/org/lwjgl/opengl/AMDSamplePositions.java deleted file mode 100644 index 7cc6dce8c..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDSamplePositions.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDSamplePositions { - - public static final int GL_SUBSAMPLE_DISTANCE_AMD = (int) 34879; - - public static void glSetMultisampleAMD(int pname, int index, java.nio.FloatBuffer val) { - org.lwjgl3.opengl.AMDSamplePositions.glSetMultisamplefvAMD(pname, index, val); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java b/src/main/java/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java deleted file mode 100644 index d949d60b9..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDSeamlessCubemapPerTexture { - - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; -} diff --git a/src/main/java/org/lwjgl/opengl/AMDSparseTexture.java b/src/main/java/org/lwjgl/opengl/AMDSparseTexture.java deleted file mode 100644 index 4487bb69f..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDSparseTexture.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDSparseTexture { - - public static final int GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD = (int) 37273; - public static final int GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS = (int) 37274; - public static final int GL_MAX_SPARSE_TEXTURE_SIZE_AMD = (int) 37272; - public static final int GL_MIN_LOD_WARNING_AMD = (int) 37276; - public static final int GL_MIN_SPARSE_LEVEL_AMD = (int) 37275; - public static final int GL_TEXTURE_STORAGE_SPARSE_BIT_AMD = (int) 1; - public static final int GL_VIRTUAL_PAGE_SIZE_X_AMD = (int) 37269; - public static final int GL_VIRTUAL_PAGE_SIZE_Y_AMD = (int) 37270; - public static final int GL_VIRTUAL_PAGE_SIZE_Z_AMD = (int) 37271; - - public static void glTexStorageSparseAMD(int target, int internalFormat, int width, int height, int depth, - int layers, int flags) { - org.lwjgl3.opengl.AMDSparseTexture - .glTexStorageSparseAMD(target, internalFormat, width, height, depth, layers, flags); - } - - public static void glTextureStorageSparseAMD(int texture, int target, int internalFormat, int width, int height, - int depth, int layers, int flags) { - org.lwjgl3.opengl.AMDSparseTexture - .glTextureStorageSparseAMD(texture, target, internalFormat, width, height, depth, layers, flags); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDStencilOperationExtended.java b/src/main/java/org/lwjgl/opengl/AMDStencilOperationExtended.java deleted file mode 100644 index 00ba024e7..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDStencilOperationExtended.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDStencilOperationExtended { - - public static final int GL_REPLACE_VALUE_AMD = (int) 34635; - public static final int GL_SET_AMD = (int) 34634; - public static final int GL_STENCIL_BACK_OP_VALUE_AMD = (int) 34637; - public static final int GL_STENCIL_OP_VALUE_AMD = (int) 34636; - - public static void glStencilOpValueAMD(int face, int value) { - org.lwjgl3.opengl.AMDStencilOperationExtended.glStencilOpValueAMD(face, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/AMDVertexShaderTessellator.java b/src/main/java/org/lwjgl/opengl/AMDVertexShaderTessellator.java deleted file mode 100644 index 6e736761b..000000000 --- a/src/main/java/org/lwjgl/opengl/AMDVertexShaderTessellator.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class AMDVertexShaderTessellator { - - public static final int GL_CONTINUOUS_AMD = (int) 36871; - public static final int GL_DISCRETE_AMD = (int) 36870; - public static final int GL_INT_SAMPLER_BUFFER_AMD = (int) 36866; - public static final int GL_SAMPLER_BUFFER_AMD = (int) 36865; - public static final int GL_TESSELLATION_FACTOR_AMD = (int) 36869; - public static final int GL_TESSELLATION_MODE_AMD = (int) 36868; - public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = (int) 36867; - - public static void glTessellationFactorAMD(float factor) { - org.lwjgl3.opengl.AMDVertexShaderTessellator.glTessellationFactorAMD(factor); - } - - public static void glTessellationModeAMD(int mode) { - org.lwjgl3.opengl.AMDVertexShaderTessellator.glTessellationModeAMD(mode); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBBaseInstance.java b/src/main/java/org/lwjgl/opengl/ARBBaseInstance.java deleted file mode 100644 index 1d65d810c..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBBaseInstance.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBBaseInstance { - - public static void glDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, - int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, - long indices_buffer_offset, int primcount, int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance( - mode, - indices_count, - type, - indices_buffer_offset, - primcount, - baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ByteBuffer indices, int primcount, - int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.IntBuffer indices, int primcount, - int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ShortBuffer indices, int primcount, - int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, - long indices_buffer_offset, int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance.glDrawElementsInstancedBaseVertexBaseInstance( - mode, - indices_count, - type, - indices_buffer_offset, - primcount, - basevertex, - baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ByteBuffer indices, - int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance - .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.IntBuffer indices, - int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance - .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ShortBuffer indices, - int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.ARBBaseInstance - .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBBindlessTexture.java b/src/main/java/org/lwjgl/opengl/ARBBindlessTexture.java deleted file mode 100644 index 1d540acd5..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBBindlessTexture.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBBindlessTexture { - - public static final int GL_UNSIGNED_INT64_ARB = (int) 5135; - - public static long glGetImageHandleARB(int texture, int level, boolean layered, int layer, int format) { - return org.lwjgl3.opengl.ARBBindlessTexture.glGetImageHandleARB(texture, level, layered, layer, format); - } - - public static long glGetTextureHandleARB(int texture) { - return org.lwjgl3.opengl.ARBBindlessTexture.glGetTextureHandleARB(texture); - } - - public static long glGetTextureSamplerHandleARB(int texture, int sampler) { - return org.lwjgl3.opengl.ARBBindlessTexture.glGetTextureSamplerHandleARB(texture, sampler); - } - - public static void glGetVertexAttribLuARB(int index, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.ARBBindlessTexture.glGetVertexAttribLui64vARB(index, pname, params); - } - - public static boolean glIsImageHandleResidentARB(long handle) { - return org.lwjgl3.opengl.ARBBindlessTexture.glIsImageHandleResidentARB(handle); - } - - public static boolean glIsTextureHandleResidentARB(long handle) { - return org.lwjgl3.opengl.ARBBindlessTexture.glIsTextureHandleResidentARB(handle); - } - - public static void glMakeImageHandleNonResidentARB(long handle) { - org.lwjgl3.opengl.ARBBindlessTexture.glMakeImageHandleNonResidentARB(handle); - } - - public static void glMakeImageHandleResidentARB(long handle, int access) { - org.lwjgl3.opengl.ARBBindlessTexture.glMakeImageHandleResidentARB(handle, access); - } - - public static void glMakeTextureHandleNonResidentARB(long handle) { - org.lwjgl3.opengl.ARBBindlessTexture.glMakeTextureHandleNonResidentARB(handle); - } - - public static void glMakeTextureHandleResidentARB(long handle) { - org.lwjgl3.opengl.ARBBindlessTexture.glMakeTextureHandleResidentARB(handle); - } - - public static void glProgramUniformHandleuARB(int program, int location, java.nio.LongBuffer values) { - org.lwjgl3.opengl.ARBBindlessTexture.glProgramUniformHandleui64vARB(program, location, values); - } - - public static void glProgramUniformHandleui64ARB(int program, int location, long value) { - org.lwjgl3.opengl.ARBBindlessTexture.glProgramUniformHandleui64ARB(program, location, value); - } - - public static void glUniformHandleuARB(int location, java.nio.LongBuffer value) { - org.lwjgl3.opengl.ARBBindlessTexture.glUniformHandleui64vARB(location, value); - } - - public static void glUniformHandleui64ARB(int location, long value) { - org.lwjgl3.opengl.ARBBindlessTexture.glUniformHandleui64ARB(location, value); - } - - public static void glVertexAttribL1uARB(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.ARBBindlessTexture.glVertexAttribL1ui64vARB(index, v); - } - - public static void glVertexAttribL1ui64ARB(int index, long x) { - org.lwjgl3.opengl.ARBBindlessTexture.glVertexAttribL1ui64ARB(index, x); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBBlendFuncExtended.java b/src/main/java/org/lwjgl/opengl/ARBBlendFuncExtended.java deleted file mode 100644 index 164e82f8e..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBBlendFuncExtended.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBBlendFuncExtended { - - public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = (int) 35068; - public static final int GL_ONE_MINUS_SRC1_ALPHA = (int) 35067; - public static final int GL_ONE_MINUS_SRC1_COLOR = (int) 35066; - public static final int GL_SRC1_ALPHA = (int) 34185; - public static final int GL_SRC1_COLOR = (int) 35065; - - public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, - java.lang.CharSequence name) { - org.lwjgl3.opengl.ARBBlendFuncExtended.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, - java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBBlendFuncExtended.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - public static int glGetFragDataIndex(int program, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBBlendFuncExtended.glGetFragDataIndex(program, name); - } - - public static int glGetFragDataIndex(int program, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBBlendFuncExtended.glGetFragDataIndex(program, name); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBBufferObject.java deleted file mode 100644 index dae8b1ac0..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBBufferObject.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl3.opengl.ARBVertexBufferObject; - -import java.nio.*; - -public class ARBBufferObject { - /** - * Accepted by the <usage> parameter of BufferDataARB: - */ - public static final int GL_STREAM_DRAW_ARB = 0x88E0, - GL_STREAM_READ_ARB = 0x88E1, - GL_STREAM_COPY_ARB = 0x88E2, - GL_STATIC_DRAW_ARB = 0x88E4, - GL_STATIC_READ_ARB = 0x88E5, - GL_STATIC_COPY_ARB = 0x88E6, - GL_DYNAMIC_DRAW_ARB = 0x88E8, - GL_DYNAMIC_READ_ARB = 0x88E9, - GL_DYNAMIC_COPY_ARB = 0x88EA; - - - public static final int GL_READ_ONLY_ARB = 0x88B8, - GL_WRITE_ONLY_ARB = 0x88B9, - GL_READ_WRITE_ARB = 0x88BA; - - - public static final int GL_BUFFER_SIZE_ARB = 0x8764, - GL_BUFFER_USAGE_ARB = 0x8765, - GL_BUFFER_ACCESS_ARB = 0x88BB, - GL_BUFFER_MAPPED_ARB = 0x88BC, - GL_BUFFER_MAP_POINTER_ARB = 0x88BD; - - - public static void glBindBufferARB(int target, int buffer) { - ARBVertexBufferObject.glBindBufferARB(target, buffer); - } - static native void nglBindBufferARB(int target, int buffer, long function_pointer); - - public static void glDeleteBuffersARB(IntBuffer buffers) { - ARBVertexBufferObject.glDeleteBuffersARB(buffers); - } - static native void nglDeleteBuffersARB(int buffers_n, long buffers, long function_pointer); - - - public static void glDeleteBuffersARB(int buffer) { - ARBVertexBufferObject.glDeleteBuffersARB(buffer); - } - - public static void glGenBuffersARB(IntBuffer buffers) { - ARBVertexBufferObject.glGenBuffersARB(buffers); - } - static native void nglGenBuffersARB(int buffers_n, long buffers, long function_pointer); - - - public static int glGenBuffersARB() { - return ARBVertexBufferObject.glGenBuffersARB(); - } - - public static boolean glIsBufferARB(int buffer) { - return ARBVertexBufferObject.glIsBufferARB(buffer); - } - static native boolean nglIsBufferARB(int buffer, long function_pointer); - - public static void glBufferDataARB(int target, long data_size, int usage) { - ARBVertexBufferObject.glBufferDataARB(target, data_size, usage); - } - public static void glBufferDataARB(int target, ByteBuffer data, int usage) { - ARBVertexBufferObject.glBufferDataARB(target, data, usage); - } - public static void glBufferDataARB(int target, DoubleBuffer data, int usage) { - ARBVertexBufferObject.glBufferDataARB(target, data, usage); - } - public static void glBufferDataARB(int target, FloatBuffer data, int usage) { - ARBVertexBufferObject.glBufferDataARB(target, data, usage); - } - public static void glBufferDataARB(int target, IntBuffer data, int usage) { - ARBVertexBufferObject.glBufferDataARB(target, data, usage); - } - public static void glBufferDataARB(int target, ShortBuffer data, int usage) { - ARBVertexBufferObject.glBufferDataARB(target, data, usage); - } - static native void nglBufferDataARB(int target, long data_size, long data, int usage, long function_pointer); - - public static void glBufferSubDataARB(int target, long offset, ByteBuffer data) { - ARBVertexBufferObject.glBufferSubDataARB(target, offset, data); - } - public static void glBufferSubDataARB(int target, long offset, DoubleBuffer data) { - ARBVertexBufferObject.glBufferSubDataARB(target, offset, data); - } - public static void glBufferSubDataARB(int target, long offset, FloatBuffer data) { - ARBVertexBufferObject.glBufferSubDataARB(target, offset, data); - } - public static void glBufferSubDataARB(int target, long offset, IntBuffer data) { - ARBVertexBufferObject.glBufferSubDataARB(target, offset, data); - } - public static void glBufferSubDataARB(int target, long offset, ShortBuffer data) { - ARBVertexBufferObject.glBufferSubDataARB(target, offset, data); - } - static native void nglBufferSubDataARB(int target, long offset, long data_size, long data, long function_pointer); - - public static void glGetBufferSubDataARB(int target, long offset, ByteBuffer data) { - ARBVertexBufferObject.glGetBufferSubDataARB(target, offset, data); - } - public static void glGetBufferSubDataARB(int target, long offset, DoubleBuffer data) { - ARBVertexBufferObject.glGetBufferSubDataARB(target, offset, data); - } - public static void glGetBufferSubDataARB(int target, long offset, FloatBuffer data) { - ARBVertexBufferObject.glGetBufferSubDataARB(target, offset, data); - } - public static void glGetBufferSubDataARB(int target, long offset, IntBuffer data) { - ARBVertexBufferObject.glGetBufferSubDataARB(target, offset, data); - } - public static void glGetBufferSubDataARB(int target, long offset, ShortBuffer data) { - ARBVertexBufferObject.glGetBufferSubDataARB(target, offset, data); - } - static native void nglGetBufferSubDataARB(int target, long offset, long data_size, long data, long function_pointer); - - public static ByteBuffer glMapBufferARB(int target, int access, ByteBuffer old_buffer) { - return ARBVertexBufferObject.glMapBufferARB(target, access, old_buffer); - } - - public static ByteBuffer glMapBufferARB(int target, int access, long length, ByteBuffer old_buffer) { - return ARBVertexBufferObject.glMapBufferARB(target, access, length, old_buffer); - } - static native ByteBuffer nglMapBufferARB(int target, int access, long result_size, ByteBuffer old_buffer, long function_pointer); - - public static boolean glUnmapBufferARB(int target) { - return ARBVertexBufferObject.glUnmapBufferARB(target); - } - static native boolean nglUnmapBufferARB(int target, long function_pointer); - - public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) { - ARBVertexBufferObject.glGetBufferParameterivARB(target, pname, params); - } - static native void nglGetBufferParameterivARB(int target, int pname, long params, long function_pointer); - - @Deprecated - public static int glGetBufferParameterARB(int target, int pname) { - return ARBBufferObject.glGetBufferParameteriARB(target, pname); - } - - /** Overloads glGetBufferParameterivARB. */ - public static int glGetBufferParameteriARB(int target, int pname) { - return ARBVertexBufferObject.glGetBufferParameteriARB(target, pname); - } - - public static long glGetBufferPointerARB(int target, int pname) { - return ARBVertexBufferObject.glGetBufferPointerARB(target, pname); - } - static native ByteBuffer nglGetBufferPointervARB(int target, int pname, long result_size, long function_pointer); -} diff --git a/src/main/java/org/lwjgl/opengl/ARBBufferStorage.java b/src/main/java/org/lwjgl/opengl/ARBBufferStorage.java deleted file mode 100644 index 790744b40..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBBufferStorage.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBBufferStorage { - - public static final int GL_BUFFER_IMMUTABLE_STORAGE = (int) 33311; - public static final int GL_BUFFER_STORAGE_FLAGS = (int) 33312; - public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = (int) 16384; - public static final int GL_CLIENT_STORAGE_BIT = (int) 512; - public static final int GL_DYNAMIC_STORAGE_BIT = (int) 256; - public static final int GL_MAP_COHERENT_BIT = (int) 128; - public static final int GL_MAP_PERSISTENT_BIT = (int) 64; - - public static void glBufferStorage(int target, long size, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glBufferStorage(target, size, flags); - } - - public static void glBufferStorage(int target, java.nio.ByteBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.DoubleBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.FloatBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.IntBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.ShortBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glBufferStorage(target, data, flags); - } - - public static void glNamedBufferStorageEXT(int buffer, long size, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glNamedBufferStorageEXT(buffer, size, flags); - } - - public static void glNamedBufferStorageEXT(int buffer, java.nio.ByteBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glNamedBufferStorageEXT(buffer, data, flags); - } - - public static void glNamedBufferStorageEXT(int buffer, java.nio.DoubleBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glNamedBufferStorageEXT(buffer, data, flags); - } - - public static void glNamedBufferStorageEXT(int buffer, java.nio.FloatBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glNamedBufferStorageEXT(buffer, data, flags); - } - - public static void glNamedBufferStorageEXT(int buffer, java.nio.IntBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glNamedBufferStorageEXT(buffer, data, flags); - } - - public static void glNamedBufferStorageEXT(int buffer, java.nio.ShortBuffer data, int flags) { - org.lwjgl3.opengl.ARBBufferStorage.glNamedBufferStorageEXT(buffer, data, flags); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBClearBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBClearBufferObject.java deleted file mode 100644 index 27e429e77..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBClearBufferObject.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBClearBufferObject { - - public static void glClearBufferData(int target, int internalformat, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBClearBufferObject.glClearBufferData(target, internalformat, format, type, data); - } - - public static void glClearBufferSubData(int target, int internalformat, long offset, long size, int format, - int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBClearBufferObject - .glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - public static void glClearNamedBufferDataEXT(int buffer, int internalformat, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBClearBufferObject.glClearNamedBufferDataEXT(buffer, internalformat, format, type, data); - } - - public static void glClearNamedBufferSubDataEXT(int buffer, int internalformat, long offset, long size, int format, - int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBClearBufferObject - .glClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, data); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBClearTexture.java b/src/main/java/org/lwjgl/opengl/ARBClearTexture.java deleted file mode 100644 index c9070f93b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBClearTexture.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBClearTexture { - - public static final int GL_CLEAR_TEXTURE = (int) 37733; - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.IntBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.ARBClearTexture.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBClipControl.java b/src/main/java/org/lwjgl/opengl/ARBClipControl.java deleted file mode 100644 index 881bc544a..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBClipControl.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBClipControl { - - public static final int GL_CLIP_DEPTH_MODE = (int) 37725; - public static final int GL_CLIP_ORIGIN = (int) 37724; - public static final int GL_LOWER_LEFT = (int) 36001; - public static final int GL_NEGATIVE_ONE_TO_ONE = (int) 37726; - public static final int GL_UPPER_LEFT = (int) 36002; - public static final int GL_ZERO_TO_ONE = (int) 37727; - - public static void glClipControl(int origin, int depth) { - org.lwjgl3.opengl.ARBClipControl.glClipControl(origin, depth); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBColorBufferFloat.java b/src/main/java/org/lwjgl/opengl/ARBColorBufferFloat.java deleted file mode 100644 index 623e6e505..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBColorBufferFloat.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBColorBufferFloat { - - public static final int GLX_RGBA_FLOAT_BIT = (int) 4; - public static final int GLX_RGBA_FLOAT_TYPE = (int) 8377; - public static final int GL_CLAMP_FRAGMENT_COLOR_ARB = (int) 35099; - public static final int GL_CLAMP_READ_COLOR_ARB = (int) 35100; - public static final int GL_CLAMP_VERTEX_COLOR_ARB = (int) 35098; - public static final int GL_FIXED_ONLY_ARB = (int) 35101; - public static final int GL_RGBA_FLOAT_MODE_ARB = (int) 34848; - public static final int WGL_TYPE_RGBA_FLOAT_ARB = (int) 8608; - - public static void glClampColorARB(int target, int clamp) { - org.lwjgl3.opengl.ARBColorBufferFloat.glClampColorARB(target, clamp); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java b/src/main/java/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java deleted file mode 100644 index 94c1a5e3d..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBCompressedTexturePixelStorage { - - public static final int GL_PACK_COMPRESSED_BLOCK_DEPTH = (int) 37165; - public static final int GL_PACK_COMPRESSED_BLOCK_HEIGHT = (int) 37164; - public static final int GL_PACK_COMPRESSED_BLOCK_SIZE = (int) 37166; - public static final int GL_PACK_COMPRESSED_BLOCK_WIDTH = (int) 37163; - public static final int GL_UNPACK_COMPRESSED_BLOCK_DEPTH = (int) 37161; - public static final int GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = (int) 37160; - public static final int GL_UNPACK_COMPRESSED_BLOCK_SIZE = (int) 37162; - public static final int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = (int) 37159; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBComputeShader.java b/src/main/java/org/lwjgl/opengl/ARBComputeShader.java deleted file mode 100644 index a20787bd3..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBComputeShader.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBComputeShader { - - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = (int) 37101; - public static final int GL_COMPUTE_SHADER = (int) 37305; - public static final int GL_COMPUTE_SHADER_BIT = (int) 32; - public static final int GL_COMPUTE_WORK_GROUP_SIZE = (int) 33383; - public static final int GL_DISPATCH_INDIRECT_BUFFER = (int) 37102; - public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = (int) 37103; - public static final int GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = (int) 33382; - public static final int GL_MAX_COMPUTE_ATOMIC_COUNTERS = (int) 33381; - public static final int GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = (int) 33380; - public static final int GL_MAX_COMPUTE_IMAGE_UNIFORMS = (int) 37309; - public static final int GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = (int) 33378; - public static final int GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = (int) 37308; - public static final int GL_MAX_COMPUTE_UNIFORM_BLOCKS = (int) 37307; - public static final int GL_MAX_COMPUTE_UNIFORM_COMPONENTS = (int) 33379; - public static final int GL_MAX_COMPUTE_WORK_GROUP_COUNT = (int) 37310; - public static final int GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = (int) 37099; - public static final int GL_MAX_COMPUTE_WORK_GROUP_SIZE = (int) 37311; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = (int) 37100; - - public static void glDispatchCompute(int num_groups_x, int num_groups_y, int num_groups_z) { - org.lwjgl3.opengl.ARBComputeShader.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); - } - - public static void glDispatchComputeIndirect(long indirect) { - org.lwjgl3.opengl.ARBComputeShader.glDispatchComputeIndirect(indirect); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBComputeVariableGroupSize.java b/src/main/java/org/lwjgl/opengl/ARBComputeVariableGroupSize.java deleted file mode 100644 index 9ed5f2469..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBComputeVariableGroupSize.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBComputeVariableGroupSize { - - public static final int GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = (int) 37099; - public static final int GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = (int) 37311; - public static final int GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = (int) 37700; - public static final int GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = (int) 37701; - - public static void glDispatchComputeGroupSizeARB(int num_groups_x, int num_groups_y, int num_groups_z, - int group_size_x, int group_size_y, int group_size_z) { - org.lwjgl3.opengl.ARBComputeVariableGroupSize.glDispatchComputeGroupSizeARB( - num_groups_x, - num_groups_y, - num_groups_z, - group_size_x, - group_size_y, - group_size_z); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBConditionalRenderInverted.java b/src/main/java/org/lwjgl/opengl/ARBConditionalRenderInverted.java deleted file mode 100644 index a013607d4..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBConditionalRenderInverted.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBConditionalRenderInverted { - - public static final int GL_QUERY_BY_REGION_NO_WAIT_INVERTED = (int) 36378; - public static final int GL_QUERY_BY_REGION_WAIT_INVERTED = (int) 36377; - public static final int GL_QUERY_NO_WAIT_INVERTED = (int) 36376; - public static final int GL_QUERY_WAIT_INVERTED = (int) 36375; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBCopyBuffer.java b/src/main/java/org/lwjgl/opengl/ARBCopyBuffer.java deleted file mode 100644 index 2d4efdba9..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBCopyBuffer.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBCopyBuffer { - - public static final int GL_COPY_READ_BUFFER = (int) 36662; - public static final int GL_COPY_WRITE_BUFFER = (int) 36663; - - public static void glCopyBufferSubData(int readTarget, int writeTarget, long readOffset, long writeOffset, - long size) { - org.lwjgl3.opengl.ARBCopyBuffer.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBCopyImage.java b/src/main/java/org/lwjgl/opengl/ARBCopyImage.java deleted file mode 100644 index 0693073e5..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBCopyImage.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBCopyImage { - - public static void glCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, - int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, - int srcDepth) { - org.lwjgl3.opengl.ARBCopyImage.glCopyImageSubData( - srcName, - srcTarget, - srcLevel, - srcX, - srcY, - srcZ, - dstName, - dstTarget, - dstLevel, - dstX, - dstY, - dstZ, - srcWidth, - srcHeight, - srcDepth); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBCullDistance.java b/src/main/java/org/lwjgl/opengl/ARBCullDistance.java deleted file mode 100644 index a8cf574e7..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBCullDistance.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBCullDistance { - - public static final int GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = (int) 33530; - public static final int GL_MAX_CULL_DISTANCES = (int) 33529; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDebugOutput.java b/src/main/java/org/lwjgl/opengl/ARBDebugOutput.java deleted file mode 100644 index 5cb208ed8..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDebugOutput.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDebugOutput { - - public static final int GL_DEBUG_CALLBACK_FUNCTION_ARB = (int) 33348; - public static final int GL_DEBUG_CALLBACK_USER_PARAM_ARB = (int) 33349; - public static final int GL_DEBUG_LOGGED_MESSAGES_ARB = (int) 37189; - public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = (int) 33347; - public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = (int) 33346; - public static final int GL_DEBUG_SEVERITY_HIGH_ARB = (int) 37190; - public static final int GL_DEBUG_SEVERITY_LOW_ARB = (int) 37192; - public static final int GL_DEBUG_SEVERITY_MEDIUM_ARB = (int) 37191; - public static final int GL_DEBUG_SOURCE_API_ARB = (int) 33350; - public static final int GL_DEBUG_SOURCE_APPLICATION_ARB = (int) 33354; - public static final int GL_DEBUG_SOURCE_OTHER_ARB = (int) 33355; - public static final int GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = (int) 33352; - public static final int GL_DEBUG_SOURCE_THIRD_PARTY_ARB = (int) 33353; - public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = (int) 33351; - public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = (int) 33357; - public static final int GL_DEBUG_TYPE_ERROR_ARB = (int) 33356; - public static final int GL_DEBUG_TYPE_OTHER_ARB = (int) 33361; - public static final int GL_DEBUG_TYPE_PERFORMANCE_ARB = (int) 33360; - public static final int GL_DEBUG_TYPE_PORTABILITY_ARB = (int) 33359; - public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = (int) 33358; - public static final int GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = (int) 37188; - public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = (int) 37187; - - public static void glDebugMessageControlARB(int source, int type, int severity, java.nio.IntBuffer ids, - boolean enabled) { - org.lwjgl3.opengl.ARBDebugOutput.glDebugMessageControlARB(source, type, severity, ids, enabled); - } - - public static void glDebugMessageInsertARB(int source, int type, int id, int severity, java.lang.CharSequence buf) { - org.lwjgl3.opengl.ARBDebugOutput.glDebugMessageInsertARB(source, type, id, severity, buf); - } - - public static void glDebugMessageInsertARB(int source, int type, int id, int severity, java.nio.ByteBuffer buf) { - org.lwjgl3.opengl.ARBDebugOutput.glDebugMessageInsertARB(source, type, id, severity, buf); - } - - public static int glGetDebugMessageLogARB(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, - java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, - java.nio.ByteBuffer messageLog) { - return org.lwjgl3.opengl.ARBDebugOutput - .glGetDebugMessageLogARB(count, sources, types, ids, severities, lengths, messageLog); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDepthBufferFloat.java b/src/main/java/org/lwjgl/opengl/ARBDepthBufferFloat.java deleted file mode 100644 index e056b1338..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDepthBufferFloat.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDepthBufferFloat { - - public static final int GL_DEPTH32F_STENCIL8 = (int) 36013; - public static final int GL_DEPTH_COMPONENT32F = (int) 36012; - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = (int) 36269; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDepthClamp.java b/src/main/java/org/lwjgl/opengl/ARBDepthClamp.java deleted file mode 100644 index 08725d4b0..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDepthClamp.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDepthClamp { - - public static final int GL_DEPTH_CLAMP = (int) 34383; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDepthTexture.java b/src/main/java/org/lwjgl/opengl/ARBDepthTexture.java deleted file mode 100644 index 2426fb66d..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDepthTexture.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDepthTexture { - - public static final int GL_DEPTH_COMPONENT16_ARB = (int) 33189; - public static final int GL_DEPTH_COMPONENT24_ARB = (int) 33190; - public static final int GL_DEPTH_COMPONENT32_ARB = (int) 33191; - public static final int GL_DEPTH_TEXTURE_MODE_ARB = (int) 34891; - public static final int GL_TEXTURE_DEPTH_SIZE_ARB = (int) 34890; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDirectStateAccess.java b/src/main/java/org/lwjgl/opengl/ARBDirectStateAccess.java deleted file mode 100644 index ff3aec207..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDirectStateAccess.java +++ /dev/null @@ -1,708 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDirectStateAccess { - - public static final int GL_QUERY_TARGET = (int) 33514; - public static final int GL_TEXTURE_BINDING = (int) 33515; - public static final int GL_TEXTURE_TARGET = (int) 4102; - - public static void glBindTextureUnit(int unit, int texture) { - org.lwjgl3.opengl.ARBDirectStateAccess.glBindTextureUnit(unit, texture); - } - - public static void glBlitNamedFramebuffer(int readFramebuffer, int drawFramebuffer, int srcX0, int srcY0, int srcX1, - int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { - org.lwjgl3.opengl.ARBDirectStateAccess.glBlitNamedFramebuffer( - readFramebuffer, - drawFramebuffer, - srcX0, - srcY0, - srcX1, - srcY1, - dstX0, - dstY0, - dstX1, - dstY1, - mask, - filter); - } - - public static int glCheckNamedFramebufferStatus(int framebuffer, int target) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCheckNamedFramebufferStatus(framebuffer, target); - } - - public static void glClearNamedBufferData(int buffer, int internalformat, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - public static void glClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, - int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, - int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCompressedTextureSubImage1D( - texture, - level, - xoffset, - width, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glCompressedTextureSubImage1D(texture, level, xoffset, width, format, data); - } - - public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, - int height, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCompressedTextureSubImage2D( - texture, - level, - xoffset, - yoffset, - width, - height, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, - int height, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data); - } - - public static void glCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCompressedTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - imageSize, - data_buffer_offset); - } - - public static void glCopyNamedBufferSubData(int readBuffer, int writeBuffer, long readOffset, long writeOffset, - long size) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); - } - - public static void glCopyTextureSubImage1D(int texture, int level, int xoffset, int x, int y, int width) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); - } - - public static void glCopyTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int x, int y, - int width, int height) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); - } - - public static void glCopyTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int x, - int y, int width, int height) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - public static int glCreateBuffers() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateBuffers(); - } - - public static void glCreateBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateBuffers(buffers); - } - - public static int glCreateFramebuffers() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateFramebuffers(); - } - - public static void glCreateFramebuffers(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateFramebuffers(framebuffers); - } - - public static int glCreateProgramPipelines() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateProgramPipelines(); - } - - public static void glCreateProgramPipelines(java.nio.IntBuffer pipelines) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateProgramPipelines(pipelines); - } - - public static int glCreateQueries(int target) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateQueries(target); - } - - public static void glCreateQueries(int target, java.nio.IntBuffer ids) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateQueries(target, ids); - } - - public static int glCreateRenderbuffers() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateRenderbuffers(); - } - - public static void glCreateRenderbuffers(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateRenderbuffers(renderbuffers); - } - - public static int glCreateSamplers() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateSamplers(); - } - - public static void glCreateSamplers(java.nio.IntBuffer samplers) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateSamplers(samplers); - } - - public static int glCreateTextures(int target) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateTextures(target); - } - - public static void glCreateTextures(int target, java.nio.IntBuffer textures) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateTextures(target, textures); - } - - public static int glCreateTransformFeedbacks() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateTransformFeedbacks(); - } - - public static void glCreateTransformFeedbacks(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateTransformFeedbacks(ids); - } - - public static int glCreateVertexArrays() { - return org.lwjgl3.opengl.ARBDirectStateAccess.glCreateVertexArrays(); - } - - public static void glCreateVertexArrays(java.nio.IntBuffer arrays) { - org.lwjgl3.opengl.ARBDirectStateAccess.glCreateVertexArrays(arrays); - } - - public static void glDisableVertexArrayAttrib(int vaobj, int index) { - org.lwjgl3.opengl.ARBDirectStateAccess.glDisableVertexArrayAttrib(vaobj, index); - } - - public static void glEnableVertexArrayAttrib(int vaobj, int index) { - org.lwjgl3.opengl.ARBDirectStateAccess.glEnableVertexArrayAttrib(vaobj, index); - } - - public static void glFlushMappedNamedBufferRange(int buffer, long offset, long length) { - org.lwjgl3.opengl.ARBDirectStateAccess.glFlushMappedNamedBufferRange(buffer, offset, length); - } - - public static void glGenerateTextureMipmap(int texture) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGenerateTextureMipmap(texture); - } - - public static void glGetCompressedTextureImage(int texture, int level, int pixels_bufSize, - long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glGetCompressedTextureImage(texture, level, pixels_bufSize, pixels_buffer_offset); - } - - public static void glGetCompressedTextureImage(int texture, int level, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetCompressedTextureImage(texture, level, pixels); - } - - public static long glGetNamedBufferParameteri64(int buffer, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferParameteri64(buffer, pname); - } - - public static int glGetNamedBufferParameteri(int buffer, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferParameteri(buffer, pname); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, int pixels_bufSize, - long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glGetTextureImage(texture, level, format, type, pixels_bufSize, pixels_buffer_offset); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureImage(texture, level, format, type, pixels); - } - - public static float glGetTextureLevelParameterf(int texture, int level, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureLevelParameterf(texture, level, pname); - } - - public static int glGetTextureLevelParameteri(int texture, int level, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureLevelParameteri(texture, level, pname); - } - - public static int glGetTextureParameterIi(int texture, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureParameterIi(texture, pname); - } - - public static int glGetTextureParameterIui(int texture, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureParameterIui(texture, pname); - } - - public static float glGetTextureParameterf(int texture, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureParameterf(texture, pname); - } - - public static int glGetTextureParameteri(int texture, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTextureParameteri(texture, pname); - } - - public static long glGetTransformFeedbacki64(int xfb, int pname, int index) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTransformFeedbacki64(xfb, pname, index); - } - - public static int glGetTransformFeedbacki(int xfb, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTransformFeedbacki(xfb, pname); - } - - public static int glGetTransformFeedbacki(int xfb, int pname, int index) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetTransformFeedbacki(xfb, pname, index); - } - - public static long glGetVertexArrayIndexed64i(int vaobj, int index, int pname) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glGetVertexArrayIndexed64i(vaobj, index, pname); - } - - public static void glInvalidateNamedFramebufferData(int framebuffer, java.nio.IntBuffer attachments) { - org.lwjgl3.opengl.ARBDirectStateAccess.glInvalidateNamedFramebufferData(framebuffer, attachments); - } - - public static void glInvalidateNamedFramebufferSubData(int framebuffer, java.nio.IntBuffer attachments, int x, - int y, int width, int height) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); - } - - public static java.nio.ByteBuffer glMapNamedBuffer(int buffer, int access, long length, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glMapNamedBuffer(buffer, access, length, old_buffer); - } - - public static java.nio.ByteBuffer glMapNamedBuffer(int buffer, int access, java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glMapNamedBuffer(buffer, access, old_buffer); - } - - public static java.nio.ByteBuffer glMapNamedBufferRange(int buffer, long offset, long length, int access, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glMapNamedBufferRange(buffer, offset, length, access, old_buffer); - } - - public static void glNamedBufferData(int buffer, long data_size, int usage) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferData(buffer, data_size, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.ByteBuffer data, int usage) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.DoubleBuffer data, int usage) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.FloatBuffer data, int usage) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.IntBuffer data, int usage) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.ShortBuffer data, int usage) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferStorage(int buffer, long size, int flags) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferStorage(buffer, size, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.ByteBuffer data, int flags) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.DoubleBuffer data, int flags) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.FloatBuffer data, int flags) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.IntBuffer data, int flags) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.ShortBuffer data, int flags) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedFramebufferDrawBuffer(int framebuffer, int mode) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedFramebufferDrawBuffer(framebuffer, mode); - } - - public static void glNamedFramebufferDrawBuffers(int framebuffer, java.nio.IntBuffer bufs) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedFramebufferDrawBuffers(framebuffer, bufs); - } - - public static void glNamedFramebufferParameteri(int framebuffer, int pname, int param) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedFramebufferParameteri(framebuffer, pname, param); - } - - public static void glNamedFramebufferReadBuffer(int framebuffer, int mode) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedFramebufferReadBuffer(framebuffer, mode); - } - - public static void glNamedFramebufferRenderbuffer(int framebuffer, int attachment, int renderbuffertarget, - int renderbuffer) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); - } - - public static void glNamedFramebufferTexture(int framebuffer, int attachment, int texture, int level) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedFramebufferTexture(framebuffer, attachment, texture, level); - } - - public static void glNamedFramebufferTextureLayer(int framebuffer, int attachment, int texture, int level, - int layer) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); - } - - public static void glNamedRenderbufferStorage(int renderbuffer, int internalformat, int width, int height) { - org.lwjgl3.opengl.ARBDirectStateAccess.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); - } - - public static void glNamedRenderbufferStorageMultisample(int renderbuffer, int samples, int internalformat, - int width, int height) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); - } - - public static void glTextureBuffer(int texture, int internalformat, int buffer) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureBuffer(texture, internalformat, buffer); - } - - public static void glTextureBufferRange(int texture, int internalformat, int buffer, long offset, long size) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureBufferRange(texture, internalformat, buffer, offset, size); - } - - public static void glTextureParameterf(int texture, int pname, float param) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureParameterf(texture, pname, param); - } - - public static void glTextureParameteri(int texture, int pname, int param) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureParameteri(texture, pname, param); - } - - public static void glTextureStorage1D(int texture, int levels, int internalformat, int width) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureStorage1D(texture, levels, internalformat, width); - } - - public static void glTextureStorage2D(int texture, int levels, int internalformat, int width, int height) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureStorage2D(texture, levels, internalformat, width, height); - } - - public static void glTextureStorage2DMultisample(int texture, int samples, int internalformat, int width, - int height, boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTextureStorage3D(int texture, int levels, int internalformat, int width, int height, - int depth) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureStorage3D(texture, levels, internalformat, width, height, depth); - } - - public static void glTextureStorage3DMultisample(int texture, int samples, int internalformat, int width, - int height, int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureStorage3DMultisample( - texture, - samples, - internalformat, - width, - height, - depth, - fixedsamplelocations); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels_buffer_offset); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, - level, - xoffset, - yoffset, - width, - height, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTransformFeedbackBufferBase(int xfb, int index, int buffer) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTransformFeedbackBufferBase(xfb, index, buffer); - } - - public static void glTransformFeedbackBufferRange(int xfb, int index, int buffer, long offset, long size) { - org.lwjgl3.opengl.ARBDirectStateAccess.glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); - } - - public static boolean glUnmapNamedBuffer(int buffer) { - return org.lwjgl3.opengl.ARBDirectStateAccess.glUnmapNamedBuffer(buffer); - } - - public static void glVertexArrayAttribBinding(int vaobj, int attribindex, int bindingindex) { - org.lwjgl3.opengl.ARBDirectStateAccess.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); - } - - public static void glVertexArrayAttribFormat(int vaobj, int attribindex, int size, int type, boolean normalized, - int relativeoffset) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); - } - - public static void glVertexArrayAttribIFormat(int vaobj, int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); - } - - public static void glVertexArrayAttribLFormat(int vaobj, int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.ARBDirectStateAccess - .glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); - } - - public static void glVertexArrayBindingDivisor(int vaobj, int bindingindex, int divisor) { - org.lwjgl3.opengl.ARBDirectStateAccess.glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); - } - - public static void glVertexArrayElementBuffer(int vaobj, int buffer) { - org.lwjgl3.opengl.ARBDirectStateAccess.glVertexArrayElementBuffer(vaobj, buffer); - } - - public static void glVertexArrayVertexBuffer(int vaobj, int bindingindex, int buffer, long offset, int stride) { - org.lwjgl3.opengl.ARBDirectStateAccess.glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDrawBuffers.java b/src/main/java/org/lwjgl/opengl/ARBDrawBuffers.java deleted file mode 100644 index 336c67392..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDrawBuffers.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDrawBuffers { - - public static final int GL_DRAW_BUFFER0_ARB = (int) 34853; - public static final int GL_DRAW_BUFFER10_ARB = (int) 34863; - public static final int GL_DRAW_BUFFER11_ARB = (int) 34864; - public static final int GL_DRAW_BUFFER12_ARB = (int) 34865; - public static final int GL_DRAW_BUFFER13_ARB = (int) 34866; - public static final int GL_DRAW_BUFFER14_ARB = (int) 34867; - public static final int GL_DRAW_BUFFER15_ARB = (int) 34868; - public static final int GL_DRAW_BUFFER1_ARB = (int) 34854; - public static final int GL_DRAW_BUFFER2_ARB = (int) 34855; - public static final int GL_DRAW_BUFFER3_ARB = (int) 34856; - public static final int GL_DRAW_BUFFER4_ARB = (int) 34857; - public static final int GL_DRAW_BUFFER5_ARB = (int) 34858; - public static final int GL_DRAW_BUFFER6_ARB = (int) 34859; - public static final int GL_DRAW_BUFFER7_ARB = (int) 34860; - public static final int GL_DRAW_BUFFER8_ARB = (int) 34861; - public static final int GL_DRAW_BUFFER9_ARB = (int) 34862; - public static final int GL_MAX_DRAW_BUFFERS_ARB = (int) 34852; - - public static void glDrawBuffersARB(int buffer) { - - org.lwjgl3.opengl.ARBDrawBuffers.glDrawBuffersARB(new int[] { buffer }); - } - - public static void glDrawBuffersARB(java.nio.IntBuffer buffers) { - org.lwjgl3.opengl.ARBDrawBuffers.glDrawBuffersARB(buffers); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDrawBuffersBlend.java b/src/main/java/org/lwjgl/opengl/ARBDrawBuffersBlend.java deleted file mode 100644 index f74e11963..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDrawBuffersBlend.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDrawBuffersBlend { - - public static void glBlendEquationSeparateiARB(int buf, int modeRGB, int modeAlpha) { - org.lwjgl3.opengl.ARBDrawBuffersBlend.glBlendEquationSeparateiARB(buf, modeRGB, modeAlpha); - } - - public static void glBlendEquationiARB(int buf, int mode) { - org.lwjgl3.opengl.ARBDrawBuffersBlend.glBlendEquationiARB(buf, mode); - } - - public static void glBlendFuncSeparateiARB(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { - org.lwjgl3.opengl.ARBDrawBuffersBlend.glBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); - } - - public static void glBlendFunciARB(int buf, int src, int dst) { - org.lwjgl3.opengl.ARBDrawBuffersBlend.glBlendFunciARB(buf, src, dst); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java b/src/main/java/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java deleted file mode 100644 index b558fdb5b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDrawElementsBaseVertex { - - public static void glDrawElementsBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex - .glDrawElementsBaseVertex(mode, indices_count, type, indices_buffer_offset, basevertex); - } - - public static void glDrawElementsBaseVertex(int mode, java.nio.ByteBuffer indices, int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - public static void glDrawElementsBaseVertex(int mode, java.nio.IntBuffer indices, int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - public static void glDrawElementsBaseVertex(int mode, java.nio.ShortBuffer indices, int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, - long indices_buffer_offset, int primcount, int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawElementsInstancedBaseVertex( - mode, - indices_count, - type, - indices_buffer_offset, - primcount, - basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ByteBuffer indices, int primcount, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex - .glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.IntBuffer indices, int primcount, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex - .glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ShortBuffer indices, int primcount, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex - .glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, - long indices_buffer_offset, int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex( - mode, - start, - end, - indices_count, - type, - indices_buffer_offset, - basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ByteBuffer indices, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.IntBuffer indices, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ShortBuffer indices, - int basevertex) { - org.lwjgl3.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDrawIndirect.java b/src/main/java/org/lwjgl/opengl/ARBDrawIndirect.java deleted file mode 100644 index 7adfc3744..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDrawIndirect.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDrawIndirect { - - public static final int GL_DRAW_INDIRECT_BUFFER = (int) 36671; - public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = (int) 36675; - - public static void glDrawArraysIndirect(int mode, long indirect_buffer_offset) { - org.lwjgl3.opengl.ARBDrawIndirect.glDrawArraysIndirect(mode, indirect_buffer_offset); - } - - public static void glDrawArraysIndirect(int mode, java.nio.ByteBuffer indirect) { - org.lwjgl3.opengl.ARBDrawIndirect.glDrawArraysIndirect(mode, indirect); - } - - public static void glDrawArraysIndirect(int mode, java.nio.IntBuffer indirect) { - org.lwjgl3.opengl.ARBDrawIndirect.glDrawArraysIndirect(mode, indirect); - } - - public static void glDrawElementsIndirect(int mode, int type, long indirect_buffer_offset) { - org.lwjgl3.opengl.ARBDrawIndirect.glDrawElementsIndirect(mode, type, indirect_buffer_offset); - } - - public static void glDrawElementsIndirect(int mode, int type, java.nio.ByteBuffer indirect) { - org.lwjgl3.opengl.ARBDrawIndirect.glDrawElementsIndirect(mode, type, indirect); - } - - public static void glDrawElementsIndirect(int mode, int type, java.nio.IntBuffer indirect) { - org.lwjgl3.opengl.ARBDrawIndirect.glDrawElementsIndirect(mode, type, indirect); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBDrawInstanced.java b/src/main/java/org/lwjgl/opengl/ARBDrawInstanced.java deleted file mode 100644 index 179398fbe..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBDrawInstanced.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBDrawInstanced { - - public static void glDrawArraysInstancedARB(int mode, int first, int count, int primcount) { - org.lwjgl3.opengl.ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount); - } - - public static void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, - int primcount) { - org.lwjgl3.opengl.ARBDrawInstanced - .glDrawElementsInstancedARB(mode, indices_count, type, indices_buffer_offset, primcount); - } - - public static void glDrawElementsInstancedARB(int mode, java.nio.ByteBuffer indices, int primcount) { - org.lwjgl3.opengl.ARBDrawInstanced.glDrawElementsInstancedARB(mode, indices, primcount); - } - - public static void glDrawElementsInstancedARB(int mode, java.nio.IntBuffer indices, int primcount) { - org.lwjgl3.opengl.ARBDrawInstanced.glDrawElementsInstancedARB(mode, indices, primcount); - } - - public static void glDrawElementsInstancedARB(int mode, java.nio.ShortBuffer indices, int primcount) { - org.lwjgl3.opengl.ARBDrawInstanced.glDrawElementsInstancedARB(mode, indices, primcount); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBES2Compatibility.java b/src/main/java/org/lwjgl/opengl/ARBES2Compatibility.java deleted file mode 100644 index 354d6b58b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBES2Compatibility.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBES2Compatibility { - - public static final int GL_FIXED = (int) 5132; - public static final int GL_HIGH_FLOAT = (int) 36338; - public static final int GL_HIGH_INT = (int) 36341; - public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT = (int) 35739; - public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE = (int) 35738; - public static final int GL_LOW_FLOAT = (int) 36336; - public static final int GL_LOW_INT = (int) 36339; - public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = (int) 36349; - public static final int GL_MAX_VARYING_VECTORS = (int) 36348; - public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = (int) 36347; - public static final int GL_MEDIUM_FLOAT = (int) 36337; - public static final int GL_MEDIUM_INT = (int) 36340; - public static final int GL_NUM_SHADER_BINARY_FORMATS = (int) 36345; - public static final int GL_RGB565 = (int) 36194; - public static final int GL_SHADER_COMPILER = (int) 36346; - - public static void glClearDepthf(float d) { - org.lwjgl3.opengl.ARBES2Compatibility.glClearDepthf(d); - } - - public static void glDepthRangef(float n, float f) { - org.lwjgl3.opengl.ARBES2Compatibility.glDepthRangef(n, f); - } - - public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, java.nio.IntBuffer range, - java.nio.IntBuffer precision) { - org.lwjgl3.opengl.ARBES2Compatibility.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - public static void glReleaseShaderCompiler() { - org.lwjgl3.opengl.ARBES2Compatibility.glReleaseShaderCompiler(); - } - - public static void glShaderBinary(java.nio.IntBuffer shaders, int binaryformat, java.nio.ByteBuffer binary) { - org.lwjgl3.opengl.ARBES2Compatibility.glShaderBinary(shaders, binaryformat, binary); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBES31Compatibility.java b/src/main/java/org/lwjgl/opengl/ARBES31Compatibility.java deleted file mode 100644 index b1cbb224d..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBES31Compatibility.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBES31Compatibility { - - public static void glMemoryBarrierByRegion(int barriers) { - org.lwjgl3.opengl.ARBES31Compatibility.glMemoryBarrierByRegion(barriers); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBES3Compatibility.java b/src/main/java/org/lwjgl/opengl/ARBES3Compatibility.java deleted file mode 100644 index 96645ff02..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBES3Compatibility.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBES3Compatibility { - - public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = (int) 36202; - public static final int GL_COMPRESSED_R11_EAC = (int) 37488; - public static final int GL_COMPRESSED_RG11_EAC = (int) 37490; - public static final int GL_COMPRESSED_RGB8_ETC2 = (int) 37492; - public static final int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = (int) 37494; - public static final int GL_COMPRESSED_RGBA8_ETC2_EAC = (int) 37496; - public static final int GL_COMPRESSED_SIGNED_R11_EAC = (int) 37489; - public static final int GL_COMPRESSED_SIGNED_RG11_EAC = (int) 37491; - public static final int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = (int) 37497; - public static final int GL_COMPRESSED_SRGB8_ETC2 = (int) 37493; - public static final int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = (int) 37495; - public static final int GL_MAX_ELEMENT_INDEX = (int) 36203; - public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = (int) 36201; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBEnhancedLayouts.java b/src/main/java/org/lwjgl/opengl/ARBEnhancedLayouts.java deleted file mode 100644 index 8c369b516..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBEnhancedLayouts.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBEnhancedLayouts { - - public static final int GL_LOCATION_COMPONENT = (int) 37706; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = (int) 37707; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = (int) 37708; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBExplicitUniformLocation.java b/src/main/java/org/lwjgl/opengl/ARBExplicitUniformLocation.java deleted file mode 100644 index ee9489a2a..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBExplicitUniformLocation.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBExplicitUniformLocation { - - public static final int GL_MAX_UNIFORM_LOCATIONS = (int) 33390; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBFragmentProgram.java b/src/main/java/org/lwjgl/opengl/ARBFragmentProgram.java deleted file mode 100644 index 1dbf09f09..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBFragmentProgram.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBFragmentProgram extends org.lwjgl.opengl.ARBProgram { - - public static final int GL_FRAGMENT_PROGRAM_ARB = (int) 34820; - public static final int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = (int) 34827; - public static final int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = (int) 34830; - public static final int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = (int) 34832; - public static final int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = (int) 34831; - public static final int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = (int) 34829; - public static final int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = (int) 34828; - public static final int GL_MAX_TEXTURE_COORDS_ARB = (int) 34929; - public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = (int) 34930; - public static final int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = (int) 34821; - public static final int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = (int) 34824; - public static final int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = (int) 34826; - public static final int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = (int) 34825; - public static final int GL_PROGRAM_TEX_INDIRECTIONS_ARB = (int) 34823; - public static final int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = (int) 34822; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBFragmentShader.java b/src/main/java/org/lwjgl/opengl/ARBFragmentShader.java deleted file mode 100644 index 78a7b09f9..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBFragmentShader.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBFragmentShader { - - public static final int GL_FRAGMENT_SHADER_ARB = (int) 35632; - public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = (int) 35723; - public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = (int) 35657; - public static final int GL_MAX_TEXTURE_COORDS_ARB = (int) 34929; - public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = (int) 34930; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBFramebufferNoAttachments.java b/src/main/java/org/lwjgl/opengl/ARBFramebufferNoAttachments.java deleted file mode 100644 index 392e50667..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBFramebufferNoAttachments.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBFramebufferNoAttachments { - - public static final int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = (int) 37652; - public static final int GL_FRAMEBUFFER_DEFAULT_HEIGHT = (int) 37649; - public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = (int) 37650; - public static final int GL_FRAMEBUFFER_DEFAULT_SAMPLES = (int) 37651; - public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH = (int) 37648; - public static final int GL_MAX_FRAMEBUFFER_HEIGHT = (int) 37654; - public static final int GL_MAX_FRAMEBUFFER_LAYERS = (int) 37655; - public static final int GL_MAX_FRAMEBUFFER_SAMPLES = (int) 37656; - public static final int GL_MAX_FRAMEBUFFER_WIDTH = (int) 37653; - - public static void glFramebufferParameteri(int target, int pname, int param) { - org.lwjgl3.opengl.ARBFramebufferNoAttachments.glFramebufferParameteri(target, pname, param); - } - - public static int glGetFramebufferParameteri(int target, int pname) { - return org.lwjgl3.opengl.ARBFramebufferNoAttachments.glGetFramebufferParameteri(target, pname); - } - - public static void glGetNamedFramebufferParameterEXT(int framebuffer, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBFramebufferNoAttachments.glGetNamedFramebufferParameterivEXT(framebuffer, pname, params); - } - - public static void glNamedFramebufferParameteriEXT(int framebuffer, int pname, int param) { - org.lwjgl3.opengl.ARBFramebufferNoAttachments.glNamedFramebufferParameteriEXT(framebuffer, pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBFramebufferObject.java b/src/main/java/org/lwjgl/opengl/ARBFramebufferObject.java deleted file mode 100644 index c2de35595..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBFramebufferObject.java +++ /dev/null @@ -1,182 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBFramebufferObject { - - public static final int GL_COLOR_ATTACHMENT0 = (int) 36064; - public static final int GL_COLOR_ATTACHMENT10 = (int) 36074; - public static final int GL_COLOR_ATTACHMENT11 = (int) 36075; - public static final int GL_COLOR_ATTACHMENT12 = (int) 36076; - public static final int GL_COLOR_ATTACHMENT13 = (int) 36077; - public static final int GL_COLOR_ATTACHMENT14 = (int) 36078; - public static final int GL_COLOR_ATTACHMENT15 = (int) 36079; - public static final int GL_COLOR_ATTACHMENT1 = (int) 36065; - public static final int GL_COLOR_ATTACHMENT2 = (int) 36066; - public static final int GL_COLOR_ATTACHMENT3 = (int) 36067; - public static final int GL_COLOR_ATTACHMENT4 = (int) 36068; - public static final int GL_COLOR_ATTACHMENT5 = (int) 36069; - public static final int GL_COLOR_ATTACHMENT6 = (int) 36070; - public static final int GL_COLOR_ATTACHMENT7 = (int) 36071; - public static final int GL_COLOR_ATTACHMENT8 = (int) 36072; - public static final int GL_COLOR_ATTACHMENT9 = (int) 36073; - public static final int GL_DEPTH24_STENCIL8 = (int) 35056; - public static final int GL_DEPTH_ATTACHMENT = (int) 36096; - public static final int GL_DEPTH_STENCIL = (int) 34041; - public static final int GL_DEPTH_STENCIL_ATTACHMENT = (int) 33306; - public static final int GL_DRAW_FRAMEBUFFER = (int) 36009; - public static final int GL_DRAW_FRAMEBUFFER_BINDING = (int) 36006; - public static final int GL_FRAMEBUFFER = (int) 36160; - public static final int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = (int) 33301; - public static final int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = (int) 33300; - public static final int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = (int) 33296; - public static final int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = (int) 33297; - public static final int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = (int) 33302; - public static final int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = (int) 33299; - public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = (int) 36049; - public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = (int) 36048; - public static final int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = (int) 33298; - public static final int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = (int) 33303; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = (int) 36051; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = (int) 36052; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = (int) 36050; - public static final int GL_FRAMEBUFFER_BINDING = (int) 36006; - public static final int GL_FRAMEBUFFER_COMPLETE = (int) 36053; - public static final int GL_FRAMEBUFFER_DEFAULT = (int) 33304; - public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = (int) 36054; - public static final int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = (int) 36059; - public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = (int) 36055; - public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = (int) 36182; - public static final int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = (int) 36060; - public static final int GL_FRAMEBUFFER_UNDEFINED = (int) 33305; - public static final int GL_FRAMEBUFFER_UNSUPPORTED = (int) 36061; - public static final int GL_INDEX = (int) 33314; - public static final int GL_INVALID_FRAMEBUFFER_OPERATION = (int) 1286; - public static final int GL_MAX_COLOR_ATTACHMENTS = (int) 36063; - public static final int GL_MAX_RENDERBUFFER_SIZE = (int) 34024; - public static final int GL_MAX_SAMPLES = (int) 36183; - public static final int GL_READ_FRAMEBUFFER = (int) 36008; - public static final int GL_READ_FRAMEBUFFER_BINDING = (int) 36010; - public static final int GL_RENDERBUFFER = (int) 36161; - public static final int GL_RENDERBUFFER_ALPHA_SIZE = (int) 36179; - public static final int GL_RENDERBUFFER_BINDING = (int) 36007; - public static final int GL_RENDERBUFFER_BLUE_SIZE = (int) 36178; - public static final int GL_RENDERBUFFER_DEPTH_SIZE = (int) 36180; - public static final int GL_RENDERBUFFER_GREEN_SIZE = (int) 36177; - public static final int GL_RENDERBUFFER_HEIGHT = (int) 36163; - public static final int GL_RENDERBUFFER_INTERNAL_FORMAT = (int) 36164; - public static final int GL_RENDERBUFFER_RED_SIZE = (int) 36176; - public static final int GL_RENDERBUFFER_SAMPLES = (int) 36011; - public static final int GL_RENDERBUFFER_STENCIL_SIZE = (int) 36181; - public static final int GL_RENDERBUFFER_WIDTH = (int) 36162; - public static final int GL_SRGB = (int) 35904; - public static final int GL_STENCIL_ATTACHMENT = (int) 36128; - public static final int GL_STENCIL_INDEX16 = (int) 36169; - public static final int GL_STENCIL_INDEX1 = (int) 36166; - public static final int GL_STENCIL_INDEX4 = (int) 36167; - public static final int GL_STENCIL_INDEX8 = (int) 36168; - public static final int GL_TEXTURE_STENCIL_SIZE = (int) 35057; - public static final int GL_UNSIGNED_INT_24_8 = (int) 34042; - public static final int GL_UNSIGNED_NORMALIZED = (int) 35863; - - public static void glBindFramebuffer(int target, int framebuffer) { - org.lwjgl3.opengl.ARBFramebufferObject.glBindFramebuffer(target, framebuffer); - } - - public static void glBindRenderbuffer(int target, int renderbuffer) { - org.lwjgl3.opengl.ARBFramebufferObject.glBindRenderbuffer(target, renderbuffer); - } - - public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, - int dstY1, int mask, int filter) { - org.lwjgl3.opengl.ARBFramebufferObject - .glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } - - public static int glCheckFramebufferStatus(int target) { - return org.lwjgl3.opengl.ARBFramebufferObject.glCheckFramebufferStatus(target); - } - - public static void glDeleteFramebuffers(int framebuffer) { - org.lwjgl3.opengl.ARBFramebufferObject.glDeleteFramebuffers(framebuffer); - } - - public static void glDeleteFramebuffers(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.ARBFramebufferObject.glDeleteFramebuffers(framebuffers); - } - - public static void glDeleteRenderbuffers(int renderbuffer) { - org.lwjgl3.opengl.ARBFramebufferObject.glDeleteRenderbuffers(renderbuffer); - } - - public static void glDeleteRenderbuffers(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.ARBFramebufferObject.glDeleteRenderbuffers(renderbuffers); - } - - public static void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) { - org.lwjgl3.opengl.ARBFramebufferObject - .glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - } - - public static void glFramebufferTexture1D(int target, int attachment, int textarget, int texture, int level) { - org.lwjgl3.opengl.ARBFramebufferObject.glFramebufferTexture1D(target, attachment, textarget, texture, level); - } - - public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) { - org.lwjgl3.opengl.ARBFramebufferObject.glFramebufferTexture2D(target, attachment, textarget, texture, level); - } - - public static void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, - int layer) { - org.lwjgl3.opengl.ARBFramebufferObject - .glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); - } - - public static void glFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer) { - org.lwjgl3.opengl.ARBFramebufferObject.glFramebufferTextureLayer(target, attachment, texture, level, layer); - } - - public static int glGenFramebuffers() { - return org.lwjgl3.opengl.ARBFramebufferObject.glGenFramebuffers(); - } - - public static void glGenFramebuffers(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.ARBFramebufferObject.glGenFramebuffers(framebuffers); - } - - public static int glGenRenderbuffers() { - return org.lwjgl3.opengl.ARBFramebufferObject.glGenRenderbuffers(); - } - - public static void glGenRenderbuffers(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.ARBFramebufferObject.glGenRenderbuffers(renderbuffers); - } - - public static void glGenerateMipmap(int target) { - org.lwjgl3.opengl.ARBFramebufferObject.glGenerateMipmap(target); - } - - public static int glGetFramebufferAttachmentParameteri(int target, int attachment, int pname) { - return org.lwjgl3.opengl.ARBFramebufferObject.glGetFramebufferAttachmentParameteri(target, attachment, pname); - } - - public static int glGetRenderbufferParameteri(int target, int pname) { - return org.lwjgl3.opengl.ARBFramebufferObject.glGetRenderbufferParameteri(target, pname); - } - - public static boolean glIsFramebuffer(int framebuffer) { - return org.lwjgl3.opengl.ARBFramebufferObject.glIsFramebuffer(framebuffer); - } - - public static boolean glIsRenderbuffer(int renderbuffer) { - return org.lwjgl3.opengl.ARBFramebufferObject.glIsRenderbuffer(renderbuffer); - } - - public static void glRenderbufferStorage(int target, int internalformat, int width, int height) { - org.lwjgl3.opengl.ARBFramebufferObject.glRenderbufferStorage(target, internalformat, width, height); - } - - public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, - int height) { - org.lwjgl3.opengl.ARBFramebufferObject - .glRenderbufferStorageMultisample(target, samples, internalformat, width, height); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBFramebufferSRGB.java b/src/main/java/org/lwjgl/opengl/ARBFramebufferSRGB.java deleted file mode 100644 index 5d9b3edeb..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBFramebufferSRGB.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBFramebufferSRGB { - - public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB = (int) 8370; - public static final int GL_FRAMEBUFFER_SRGB_ARB = (int) 36281; - public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_ARB = (int) 36282; - public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = (int) 8361; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBGeometryShader4.java b/src/main/java/org/lwjgl/opengl/ARBGeometryShader4.java deleted file mode 100644 index e98e26dfc..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBGeometryShader4.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBGeometryShader4 { - - public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = (int) 36263; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_ARB = (int) 36052; - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = (int) 36265; - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = (int) 36264; - public static final int GL_GEOMETRY_INPUT_TYPE_ARB = (int) 36315; - public static final int GL_GEOMETRY_OUTPUT_TYPE_ARB = (int) 36316; - public static final int GL_GEOMETRY_SHADER_ARB = (int) 36313; - public static final int GL_GEOMETRY_VERTICES_OUT_ARB = (int) 36314; - public static final int GL_LINES_ADJACENCY_ARB = (int) 10; - public static final int GL_LINE_STRIP_ADJACENCY_ARB = (int) 11; - public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = (int) 36320; - public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = (int) 35881; - public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = (int) 36321; - public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = (int) 36319; - public static final int GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = (int) 36317; - public static final int GL_MAX_VARYING_COMPONENTS_ARB = (int) 35659; - public static final int GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = (int) 36318; - public static final int GL_PROGRAM_POINT_SIZE_ARB = (int) 34370; - public static final int GL_TRIANGLES_ADJACENCY_ARB = (int) 12; - public static final int GL_TRIANGLE_STRIP_ADJACENCY_ARB = (int) 13; - - public static void glFramebufferTextureARB(int target, int attachment, int texture, int level) { - org.lwjgl3.opengl.ARBGeometryShader4.glFramebufferTextureARB(target, attachment, texture, level); - } - - public static void glFramebufferTextureFaceARB(int target, int attachment, int texture, int level, int face) { - org.lwjgl3.opengl.ARBGeometryShader4.glFramebufferTextureFaceARB(target, attachment, texture, level, face); - } - - public static void glFramebufferTextureLayerARB(int target, int attachment, int texture, int level, int layer) { - org.lwjgl3.opengl.ARBGeometryShader4.glFramebufferTextureLayerARB(target, attachment, texture, level, layer); - } - - public static void glProgramParameteriARB(int program, int pname, int value) { - org.lwjgl3.opengl.ARBGeometryShader4.glProgramParameteriARB(program, pname, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBGetProgramBinary.java b/src/main/java/org/lwjgl/opengl/ARBGetProgramBinary.java deleted file mode 100644 index 0b48498fa..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBGetProgramBinary.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBGetProgramBinary { - - public static final int GL_NUM_PROGRAM_BINARY_FORMATS = (int) 34814; - public static final int GL_PROGRAM_BINARY_FORMATS = (int) 34815; - public static final int GL_PROGRAM_BINARY_LENGTH = (int) 34625; - public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = (int) 33367; - - public static void glGetProgramBinary(int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, - java.nio.ByteBuffer binary) { - org.lwjgl3.opengl.ARBGetProgramBinary.glGetProgramBinary(program, length, binaryFormat, binary); - } - - public static void glProgramBinary(int program, int binaryFormat, java.nio.ByteBuffer binary) { - org.lwjgl3.opengl.ARBGetProgramBinary.glProgramBinary(program, binaryFormat, binary); - } - - public static void glProgramParameteri(int program, int pname, int value) { - org.lwjgl3.opengl.ARBGetProgramBinary.glProgramParameteri(program, pname, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBGetTextureSubImage.java b/src/main/java/org/lwjgl/opengl/ARBGetTextureSubImage.java deleted file mode 100644 index 98d0d6f26..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBGetTextureSubImage.java +++ /dev/null @@ -1,186 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBGetTextureSubImage { - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels_bufSize, - pixels_buffer_offset); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_bufSize, - pixels_buffer_offset); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBHalfFloatPixel.java b/src/main/java/org/lwjgl/opengl/ARBHalfFloatPixel.java deleted file mode 100644 index f0d45fb89..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBHalfFloatPixel.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBHalfFloatPixel { - - public static final int GL_HALF_FLOAT_ARB = (int) 5131; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBHalfFloatVertex.java b/src/main/java/org/lwjgl/opengl/ARBHalfFloatVertex.java deleted file mode 100644 index fa0abe97b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBHalfFloatVertex.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBHalfFloatVertex { - - public static final int GL_HALF_FLOAT = (int) 5131; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBImaging.java b/src/main/java/org/lwjgl/opengl/ARBImaging.java deleted file mode 100644 index 704bf9518..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBImaging.java +++ /dev/null @@ -1,1850 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class ARBImaging { - - public static final int GL_BLEND_COLOR = (int) 32773; - public static final int GL_BLEND_EQUATION = (int) 32777; - public static final int GL_COLOR_MATRIX = (int) 32945; - public static final int GL_COLOR_MATRIX_STACK_DEPTH = (int) 32946; - public static final int GL_COLOR_TABLE = (int) 32976; - public static final int GL_COLOR_TABLE_ALPHA_SIZE = (int) 32989; - public static final int GL_COLOR_TABLE_BIAS = (int) 32983; - public static final int GL_COLOR_TABLE_BLUE_SIZE = (int) 32988; - public static final int GL_COLOR_TABLE_FORMAT = (int) 32984; - public static final int GL_COLOR_TABLE_GREEN_SIZE = (int) 32987; - public static final int GL_COLOR_TABLE_INTENSITY_SIZE = (int) 32991; - public static final int GL_COLOR_TABLE_LUMINANCE_SIZE = (int) 32990; - public static final int GL_COLOR_TABLE_RED_SIZE = (int) 32986; - public static final int GL_COLOR_TABLE_SCALE = (int) 32982; - public static final int GL_COLOR_TABLE_WIDTH = (int) 32985; - public static final int GL_CONSTANT_BORDER = (int) 33105; - public static final int GL_CONVOLUTION_1D = (int) 32784; - public static final int GL_CONVOLUTION_2D = (int) 32785; - public static final int GL_CONVOLUTION_BORDER_COLOR = (int) 33108; - public static final int GL_CONVOLUTION_BORDER_MODE = (int) 32787; - public static final int GL_CONVOLUTION_FILTER_BIAS = (int) 32789; - public static final int GL_CONVOLUTION_FILTER_SCALE = (int) 32788; - public static final int GL_CONVOLUTION_FORMAT = (int) 32791; - public static final int GL_CONVOLUTION_HEIGHT = (int) 32793; - public static final int GL_CONVOLUTION_WIDTH = (int) 32792; - public static final int GL_FUNC_ADD = (int) 32774; - public static final int GL_FUNC_REVERSE_SUBTRACT = (int) 32779; - public static final int GL_FUNC_SUBTRACT = (int) 32778; - public static final int GL_HISTOGRAM = (int) 32804; - public static final int GL_HISTOGRAM_ALPHA_SIZE = (int) 32811; - public static final int GL_HISTOGRAM_BLUE_SIZE = (int) 32810; - public static final int GL_HISTOGRAM_FORMAT = (int) 32807; - public static final int GL_HISTOGRAM_GREEN_SIZE = (int) 32809; - public static final int GL_HISTOGRAM_LUMINANCE_SIZE = (int) 32812; - public static final int GL_HISTOGRAM_RED_SIZE = (int) 32808; - public static final int GL_HISTOGRAM_SINK = (int) 32813; - public static final int GL_HISTOGRAM_WIDTH = (int) 32806; - public static final int GL_IGNORE_BORDER = (int) 33104; - public static final int GL_MAX = (int) 32776; - public static final int GL_MAX_COLOR_MATRIX_STACK_DEPTH = (int) 32947; - public static final int GL_MAX_CONVOLUTION_HEIGHT = (int) 32795; - public static final int GL_MAX_CONVOLUTION_WIDTH = (int) 32794; - public static final int GL_MIN = (int) 32775; - public static final int GL_MINMAX = (int) 32814; - public static final int GL_MINMAX_FORMAT = (int) 32815; - public static final int GL_MINMAX_SINK = (int) 32816; - public static final int GL_POST_COLOR_MATRIX_ALPHA_BIAS = (int) 32955; - public static final int GL_POST_COLOR_MATRIX_ALPHA_SCALE = (int) 32951; - public static final int GL_POST_COLOR_MATRIX_BLUE_BIAS = (int) 32954; - public static final int GL_POST_COLOR_MATRIX_BLUE_SCALE = (int) 32950; - public static final int GL_POST_COLOR_MATRIX_COLOR_TABLE = (int) 32978; - public static final int GL_POST_COLOR_MATRIX_GREEN_BIAS = (int) 32953; - public static final int GL_POST_COLOR_MATRIX_GREEN_SCALE = (int) 32949; - public static final int GL_POST_COLOR_MATRIX_RED_BIAS = (int) 32952; - public static final int GL_POST_COLOR_MATRIX_RED_SCALE = (int) 32948; - public static final int GL_POST_CONVOLUTION_ALPHA_BIAS = (int) 32803; - public static final int GL_POST_CONVOLUTION_ALPHA_SCALE = (int) 32799; - public static final int GL_POST_CONVOLUTION_BLUE_BIAS = (int) 32802; - public static final int GL_POST_CONVOLUTION_BLUE_SCALE = (int) 32798; - public static final int GL_POST_CONVOLUTION_COLOR_TABLE = (int) 32977; - public static final int GL_POST_CONVOLUTION_GREEN_BIAS = (int) 32801; - public static final int GL_POST_CONVOLUTION_GREEN_SCALE = (int) 32797; - public static final int GL_POST_CONVOLUTION_RED_BIAS = (int) 32800; - public static final int GL_POST_CONVOLUTION_RED_SCALE = (int) 32796; - public static final int GL_PROXY_COLOR_TABLE = (int) 32979; - public static final int GL_PROXY_HISTOGRAM = (int) 32805; - public static final int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = (int) 32981; - public static final int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = (int) 32980; - public static final int GL_REDUCE = (int) 32790; - public static final int GL_REPLICATE_BORDER = (int) 33107; - public static final int GL_SEPARABLE_2D = (int) 32786; - public static final int GL_TABLE_TOO_LARGE = (int) 32817; - - public static void glBlendColor(float red, float green, float blue, float alpha) { - org.lwjgl3.opengl.ARBImaging.glBlendColor(red, green, blue, alpha); - } - - public static void glBlendEquation(int mode) { - org.lwjgl3.opengl.ARBImaging.glBlendEquation(mode); - } - - public static void glColorSubTable(int target, int start, int count, int format, int type, - long data_buffer_offset) { - org.lwjgl3.opengl.ARBImaging.glColorSubTable(target, start, count, format, type, data_buffer_offset); - } - - public static void glColorSubTable(int target, int start, int count, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBImaging.glColorSubTable(target, start, count, format, type, data); - } - - public static void glColorSubTable(int target, int start, int count, int format, int type, - java.nio.DoubleBuffer data) { - - org.lwjgl3.opengl.ARBImaging - .glColorSubTable(target, start, count, format, type, org.lwjgl.MemoryUtil.getAddress(data)); - } - - public static void glColorSubTable(int target, int start, int count, int format, int type, - java.nio.FloatBuffer data) { - - org.lwjgl3.opengl.ARBImaging - .glColorSubTable(target, start, count, format, type, org.lwjgl.MemoryUtil.getAddress(data)); - } - - public static void glColorTable(int target, int internalFormat, int width, int format, int type, - long data_buffer_offset) { - org.lwjgl3.opengl.ARBImaging.glColorTable(target, internalFormat, width, format, type, data_buffer_offset); - } - - public static void glColorTable(int target, int internalFormat, int width, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBImaging.glColorTable(target, internalFormat, width, format, type, data); - } - - public static void glColorTable(int target, int internalFormat, int width, int format, int type, - java.nio.DoubleBuffer data) { - - org.lwjgl3.opengl.ARBImaging - .glColorTable(target, internalFormat, width, format, type, org.lwjgl.MemoryUtil.getAddress(data)); - } - - public static void glColorTable(int target, int internalFormat, int width, int format, int type, - java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBImaging.glColorTable(target, internalFormat, width, format, type, data); - } - - public static void glColorTableParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBImaging.glColorTableParameterfv(target, pname, params); - } - - public static void glColorTableParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBImaging.glColorTableParameteriv(target, pname, params); - } - - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, - long image_buffer_offset) { - org.lwjgl3.opengl.ARBImaging - .glConvolutionFilter1D(target, internalformat, width, format, type, image_buffer_offset); - } - - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, - java.nio.ByteBuffer image) { - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter1D(target, internalformat, width, format, type, image); - } - - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, - java.nio.DoubleBuffer image) { - - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter1D( - target, - internalformat, - width, - format, - type, - org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, - java.nio.FloatBuffer image) { - - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter1D( - target, - internalformat, - width, - format, - type, - org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, - java.nio.IntBuffer image) { - - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter1D( - target, - internalformat, - width, - format, - type, - org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, - java.nio.ShortBuffer image) { - - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter1D( - target, - internalformat, - width, - format, - type, - org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, - int type, long image_buffer_offset) { - org.lwjgl3.opengl.ARBImaging - .glConvolutionFilter2D(target, internalformat, width, height, format, type, image_buffer_offset); - } - - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, - int type, java.nio.ByteBuffer image) { - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter2D(target, internalformat, width, height, format, type, image); - } - - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, - int type, java.nio.IntBuffer image) { - - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, - int type, java.nio.ShortBuffer image) { - - org.lwjgl3.opengl.ARBImaging.glConvolutionFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glConvolutionParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBImaging.glConvolutionParameterfv(target, pname, params); - } - - public static void glConvolutionParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBImaging.glConvolutionParameteriv(target, pname, params); - } - - public static void glConvolutionParameterf(int target, int pname, float params) { - org.lwjgl3.opengl.ARBImaging.glConvolutionParameterf(target, pname, params); - } - - public static void glConvolutionParameteri(int target, int pname, int params) { - org.lwjgl3.opengl.ARBImaging.glConvolutionParameteri(target, pname, params); - } - - public static void glCopyColorSubTable(int target, int start, int x, int y, int width) { - org.lwjgl3.opengl.ARBImaging.glCopyColorSubTable(target, start, x, y, width); - } - - public static void glCopyColorTable(int target, int internalformat, int x, int y, int width) { - org.lwjgl3.opengl.ARBImaging.glCopyColorTable(target, internalformat, x, y, width); - } - - public static void glCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width) { - org.lwjgl3.opengl.ARBImaging.glCopyConvolutionFilter1D(target, internalformat, x, y, width); - } - - public static void glCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height) { - org.lwjgl3.opengl.ARBImaging.glCopyConvolutionFilter2D(target, internalformat, x, y, width, height); - } - - public static void glGetColorTable(int target, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBImaging.glGetColorTable(target, format, type, data); - } - - public static void glGetColorTable(int target, int format, int type, java.nio.DoubleBuffer data) { - - org.lwjgl3.opengl.ARBImaging.glGetColorTable(target, format, type, org.lwjgl.MemoryUtil.getAddress(data)); - } - - public static void glGetColorTable(int target, int format, int type, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBImaging.glGetColorTable(target, format, type, data); - } - - public static void glGetColorTableParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetColorTableParameterfv(target, pname, params); - } - - public static void glGetColorTableParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetColorTableParameteriv(target, pname, params); - } - - public static void glGetConvolutionFilter(int target, int format, int type, long image_buffer_offset) { - org.lwjgl3.opengl.ARBImaging.glGetConvolutionFilter(target, format, type, image_buffer_offset); - } - - public static void glGetConvolutionFilter(int target, int format, int type, java.nio.ByteBuffer image) { - org.lwjgl3.opengl.ARBImaging.glGetConvolutionFilter(target, format, type, image); - } - - public static void glGetConvolutionFilter(int target, int format, int type, java.nio.DoubleBuffer image) { - - org.lwjgl3.opengl.ARBImaging - .glGetConvolutionFilter(target, format, type, org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glGetConvolutionFilter(int target, int format, int type, java.nio.FloatBuffer image) { - - org.lwjgl3.opengl.ARBImaging - .glGetConvolutionFilter(target, format, type, org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glGetConvolutionFilter(int target, int format, int type, java.nio.IntBuffer image) { - - org.lwjgl3.opengl.ARBImaging - .glGetConvolutionFilter(target, format, type, org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glGetConvolutionFilter(int target, int format, int type, java.nio.ShortBuffer image) { - - org.lwjgl3.opengl.ARBImaging - .glGetConvolutionFilter(target, format, type, org.lwjgl.MemoryUtil.getAddress(image)); - } - - public static void glGetConvolutionParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetConvolutionParameterfv(target, pname, params); - } - - public static void glGetConvolutionParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetConvolutionParameteriv(target, pname, params); - } - - public static void glGetHistogram(int target, boolean reset, int format, int type, long values_buffer_offset) { - org.lwjgl3.opengl.ARBImaging.glGetHistogram(target, reset, format, type, values_buffer_offset); - } - - public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.ByteBuffer values) { - org.lwjgl3.opengl.ARBImaging.glGetHistogram(target, reset, format, type, values); - } - - public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.DoubleBuffer values) { - - org.lwjgl3.opengl.ARBImaging - .glGetHistogram(target, reset, format, type, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.FloatBuffer values) { - - org.lwjgl3.opengl.ARBImaging - .glGetHistogram(target, reset, format, type, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.IntBuffer values) { - - org.lwjgl3.opengl.ARBImaging - .glGetHistogram(target, reset, format, type, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.ShortBuffer values) { - - org.lwjgl3.opengl.ARBImaging - .glGetHistogram(target, reset, format, type, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetHistogramParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetHistogramParameterfv(target, pname, params); - } - - public static void glGetHistogramParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetHistogramParameteriv(target, pname, params); - } - - public static void glGetMinmax(int target, boolean reset, int format, int types, long values_buffer_offset) { - org.lwjgl3.opengl.ARBImaging.glGetMinmax(target, reset, format, types, values_buffer_offset); - } - - public static void glGetMinmax(int target, boolean reset, int format, int types, java.nio.ByteBuffer values) { - org.lwjgl3.opengl.ARBImaging.glGetMinmax(target, reset, format, types, values); - } - - public static void glGetMinmax(int target, boolean reset, int format, int types, java.nio.DoubleBuffer values) { - - org.lwjgl3.opengl.ARBImaging.glGetMinmax(target, reset, format, types, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetMinmax(int target, boolean reset, int format, int types, java.nio.FloatBuffer values) { - - org.lwjgl3.opengl.ARBImaging.glGetMinmax(target, reset, format, types, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetMinmax(int target, boolean reset, int format, int types, java.nio.IntBuffer values) { - - org.lwjgl3.opengl.ARBImaging.glGetMinmax(target, reset, format, types, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetMinmax(int target, boolean reset, int format, int types, java.nio.ShortBuffer values) { - - org.lwjgl3.opengl.ARBImaging.glGetMinmax(target, reset, format, types, org.lwjgl.MemoryUtil.getAddress(values)); - } - - public static void glGetMinmaxParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetMinmaxParameterfv(target, pname, params); - } - - public static void glGetMinmaxParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBImaging.glGetMinmaxParameteriv(target, pname, params); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ByteBuffer column, java.nio.ByteBuffer span) { - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter(target, format, type, row, column, span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ByteBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ByteBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.IntBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.IntBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.IntBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.IntBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ShortBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ShortBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ShortBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.IntBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.IntBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.IntBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.IntBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ByteBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ByteBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ByteBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.IntBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.IntBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.IntBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.IntBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ShortBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ShortBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, - java.nio.ShortBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ByteBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ByteBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ByteBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.DoubleBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.IntBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.IntBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.IntBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.IntBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ShortBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ShortBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, - java.nio.ShortBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ByteBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ByteBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ByteBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.IntBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.IntBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.IntBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.IntBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ShortBuffer column, java.nio.ByteBuffer span) { - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - span); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ShortBuffer column, java.nio.IntBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, - java.nio.ShortBuffer column, java.nio.ShortBuffer span) { - final java.nio.ByteBuffer wrappedArg5 = BufferCasts.toByteBuffer(span); - - org.lwjgl3.opengl.ARBImaging.glGetSeparableFilter( - target, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column), - wrappedArg5); - BufferCasts.updateBuffer(span, wrappedArg5); - } - - public static void glHistogram(int target, int width, int internalformat, boolean sink) { - org.lwjgl3.opengl.ARBImaging.glHistogram(target, width, internalformat, sink); - } - - public static void glMinmax(int target, int internalformat, boolean sink) { - org.lwjgl3.opengl.ARBImaging.glMinmax(target, internalformat, sink); - } - - public static void glResetHistogram(int target) { - org.lwjgl3.opengl.ARBImaging.glResetHistogram(target); - } - - public static void glResetMinmax(int target) { - org.lwjgl3.opengl.ARBImaging.glResetMinmax(target); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - long row_buffer_offset, long column_buffer_offset) { - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - row_buffer_offset, - column_buffer_offset); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ByteBuffer row, java.nio.ByteBuffer column) { - org.lwjgl3.opengl.ARBImaging - .glSeparableFilter2D(target, internalformat, width, height, format, type, row, column); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ByteBuffer row, java.nio.DoubleBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ByteBuffer row, java.nio.FloatBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ByteBuffer row, java.nio.IntBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ByteBuffer row, java.nio.ShortBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.DoubleBuffer row, java.nio.ByteBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.DoubleBuffer row, java.nio.DoubleBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.DoubleBuffer row, java.nio.FloatBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.DoubleBuffer row, java.nio.IntBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.DoubleBuffer row, java.nio.ShortBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.FloatBuffer row, java.nio.ByteBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.FloatBuffer row, java.nio.DoubleBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.FloatBuffer row, java.nio.FloatBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.FloatBuffer row, java.nio.IntBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.FloatBuffer row, java.nio.ShortBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.IntBuffer row, java.nio.ByteBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.IntBuffer row, java.nio.DoubleBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.IntBuffer row, java.nio.FloatBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.IntBuffer row, java.nio.IntBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.IntBuffer row, java.nio.ShortBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ShortBuffer row, java.nio.ByteBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ShortBuffer row, java.nio.DoubleBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ShortBuffer row, java.nio.FloatBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ShortBuffer row, java.nio.IntBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } - - public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, - java.nio.ShortBuffer row, java.nio.ShortBuffer column) { - - org.lwjgl3.opengl.ARBImaging.glSeparableFilter2D( - target, - internalformat, - width, - height, - format, - type, - org.lwjgl.MemoryUtil.getAddress(row), - org.lwjgl.MemoryUtil.getAddress(column)); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBIndirectParameters.java b/src/main/java/org/lwjgl/opengl/ARBIndirectParameters.java deleted file mode 100644 index cec1cd9c0..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBIndirectParameters.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBIndirectParameters { - - public static final int GL_PARAMETER_BUFFER_ARB = (int) 33006; - public static final int GL_PARAMETER_BUFFER_BINDING_ARB = (int) 33007; - - public static void glMultiDrawArraysIndirectCountARB(int mode, long indirect_buffer_offset, long drawcount, - int maxdrawcount, int stride) { - org.lwjgl3.opengl.ARBIndirectParameters - .glMultiDrawArraysIndirectCountARB(mode, indirect_buffer_offset, drawcount, maxdrawcount, stride); - } - - public static void glMultiDrawArraysIndirectCountARB(int mode, java.nio.ByteBuffer indirect, long drawcount, - int maxdrawcount, int stride) { - org.lwjgl3.opengl.ARBIndirectParameters - .glMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); - } - - public static void glMultiDrawArraysIndirectCountARB(int mode, java.nio.IntBuffer indirect, long drawcount, - int maxdrawcount, int stride) { - org.lwjgl3.opengl.ARBIndirectParameters - .glMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); - } - - public static void glMultiDrawElementsIndirectCountARB(int mode, int type, long indirect_buffer_offset, - long drawcount, int maxdrawcount, int stride) { - org.lwjgl3.opengl.ARBIndirectParameters.glMultiDrawElementsIndirectCountARB( - mode, - type, - indirect_buffer_offset, - drawcount, - maxdrawcount, - stride); - } - - public static void glMultiDrawElementsIndirectCountARB(int mode, int type, java.nio.ByteBuffer indirect, - long drawcount, int maxdrawcount, int stride) { - org.lwjgl3.opengl.ARBIndirectParameters - .glMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - public static void glMultiDrawElementsIndirectCountARB(int mode, int type, java.nio.IntBuffer indirect, - long drawcount, int maxdrawcount, int stride) { - org.lwjgl3.opengl.ARBIndirectParameters - .glMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBInstancedArrays.java b/src/main/java/org/lwjgl/opengl/ARBInstancedArrays.java deleted file mode 100644 index 1921268f2..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBInstancedArrays.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBInstancedArrays { - - public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = (int) 35070; - - public static void glVertexAttribDivisorARB(int index, int divisor) { - org.lwjgl3.opengl.ARBInstancedArrays.glVertexAttribDivisorARB(index, divisor); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery.java b/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery.java deleted file mode 100644 index 54980fc2c..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBInternalformatQuery { - - public static final int GL_NUM_SAMPLE_COUNTS = (int) 37760; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery2.java b/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery2.java deleted file mode 100644 index 8d7955bf1..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery2.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBInternalformatQuery2 { - - public static final int GL_AUTO_GENERATE_MIPMAP = (int) 33429; - public static final int GL_CAVEAT_SUPPORT = (int) 33464; - public static final int GL_CLEAR_BUFFER = (int) 33460; - public static final int GL_COLOR_COMPONENTS = (int) 33411; - public static final int GL_COLOR_ENCODING = (int) 33430; - public static final int GL_COLOR_RENDERABLE = (int) 33414; - public static final int GL_COMPUTE_TEXTURE = (int) 33440; - public static final int GL_DEPTH_COMPONENTS = (int) 33412; - public static final int GL_DEPTH_RENDERABLE = (int) 33415; - public static final int GL_FILTER = (int) 33434; - public static final int GL_FRAGMENT_TEXTURE = (int) 33439; - public static final int GL_FRAMEBUFFER_BLEND = (int) 33419; - public static final int GL_FRAMEBUFFER_RENDERABLE = (int) 33417; - public static final int GL_FRAMEBUFFER_RENDERABLE_LAYERED = (int) 33418; - public static final int GL_FULL_SUPPORT = (int) 33463; - public static final int GL_GEOMETRY_TEXTURE = (int) 33438; - public static final int GL_GET_TEXTURE_IMAGE_FORMAT = (int) 33425; - public static final int GL_GET_TEXTURE_IMAGE_TYPE = (int) 33426; - public static final int GL_IMAGE_CLASS_10_10_10_2 = (int) 33475; - public static final int GL_IMAGE_CLASS_11_11_10 = (int) 33474; - public static final int GL_IMAGE_CLASS_1_X_16 = (int) 33470; - public static final int GL_IMAGE_CLASS_1_X_32 = (int) 33467; - public static final int GL_IMAGE_CLASS_1_X_8 = (int) 33473; - public static final int GL_IMAGE_CLASS_2_X_16 = (int) 33469; - public static final int GL_IMAGE_CLASS_2_X_32 = (int) 33466; - public static final int GL_IMAGE_CLASS_2_X_8 = (int) 33472; - public static final int GL_IMAGE_CLASS_4_X_16 = (int) 33468; - public static final int GL_IMAGE_CLASS_4_X_32 = (int) 33465; - public static final int GL_IMAGE_CLASS_4_X_8 = (int) 33471; - public static final int GL_IMAGE_COMPATIBILITY_CLASS = (int) 33448; - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = (int) 37063; - public static final int GL_IMAGE_PIXEL_FORMAT = (int) 33449; - public static final int GL_IMAGE_PIXEL_TYPE = (int) 33450; - public static final int GL_IMAGE_TEXEL_SIZE = (int) 33447; - public static final int GL_INTERNALFORMAT_ALPHA_SIZE = (int) 33396; - public static final int GL_INTERNALFORMAT_ALPHA_TYPE = (int) 33403; - public static final int GL_INTERNALFORMAT_BLUE_SIZE = (int) 33395; - public static final int GL_INTERNALFORMAT_BLUE_TYPE = (int) 33402; - public static final int GL_INTERNALFORMAT_DEPTH_SIZE = (int) 33397; - public static final int GL_INTERNALFORMAT_DEPTH_TYPE = (int) 33404; - public static final int GL_INTERNALFORMAT_GREEN_SIZE = (int) 33394; - public static final int GL_INTERNALFORMAT_GREEN_TYPE = (int) 33401; - public static final int GL_INTERNALFORMAT_PREFERRED = (int) 33392; - public static final int GL_INTERNALFORMAT_RED_SIZE = (int) 33393; - public static final int GL_INTERNALFORMAT_RED_TYPE = (int) 33400; - public static final int GL_INTERNALFORMAT_SHARED_SIZE = (int) 33399; - public static final int GL_INTERNALFORMAT_STENCIL_SIZE = (int) 33398; - public static final int GL_INTERNALFORMAT_STENCIL_TYPE = (int) 33405; - public static final int GL_INTERNALFORMAT_SUPPORTED = (int) 33391; - public static final int GL_MANUAL_GENERATE_MIPMAP = (int) 33428; - public static final int GL_MAX_COMBINED_DIMENSIONS = (int) 33410; - public static final int GL_MAX_DEPTH = (int) 33408; - public static final int GL_MAX_HEIGHT = (int) 33407; - public static final int GL_MAX_LAYERS = (int) 33409; - public static final int GL_MAX_WIDTH = (int) 33406; - public static final int GL_MIPMAP = (int) 33427; - public static final int GL_NUM_SAMPLE_COUNTS = (int) 37760; - public static final int GL_READ_PIXELS = (int) 33420; - public static final int GL_READ_PIXELS_FORMAT = (int) 33421; - public static final int GL_READ_PIXELS_TYPE = (int) 33422; - public static final int GL_RENDERBUFFER = (int) 36161; - public static final int GL_SHADER_IMAGE_ATOMIC = (int) 33446; - public static final int GL_SHADER_IMAGE_LOAD = (int) 33444; - public static final int GL_SHADER_IMAGE_STORE = (int) 33445; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = (int) 33452; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = (int) 33454; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = (int) 33453; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = (int) 33455; - public static final int GL_SRGB_DECODE_ARB = (int) 33433; - public static final int GL_SRGB_READ = (int) 33431; - public static final int GL_SRGB_WRITE = (int) 33432; - public static final int GL_STENCIL_COMPONENTS = (int) 33413; - public static final int GL_STENCIL_RENDERABLE = (int) 33416; - public static final int GL_TESS_CONTROL_TEXTURE = (int) 33436; - public static final int GL_TESS_EVALUATION_TEXTURE = (int) 33437; - public static final int GL_TEXTURE_1D_ARRAY = (int) 35864; - public static final int GL_TEXTURE_2D_ARRAY = (int) 35866; - public static final int GL_TEXTURE_2D_MULTISAMPLE = (int) 37120; - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = (int) 37122; - public static final int GL_TEXTURE_BUFFER = (int) 35882; - public static final int GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = (int) 33458; - public static final int GL_TEXTURE_COMPRESSED_BLOCK_SIZE = (int) 33459; - public static final int GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = (int) 33457; - public static final int GL_TEXTURE_CUBE_MAP_ARRAY = (int) 36873; - public static final int GL_TEXTURE_GATHER = (int) 33442; - public static final int GL_TEXTURE_GATHER_SHADOW = (int) 33443; - public static final int GL_TEXTURE_IMAGE_FORMAT = (int) 33423; - public static final int GL_TEXTURE_IMAGE_TYPE = (int) 33424; - public static final int GL_TEXTURE_RECTANGLE = (int) 34037; - public static final int GL_TEXTURE_SHADOW = (int) 33441; - public static final int GL_TEXTURE_VIEW = (int) 33461; - public static final int GL_VERTEX_TEXTURE = (int) 33435; - public static final int GL_VIEW_CLASS_128_BITS = (int) 33476; - public static final int GL_VIEW_CLASS_16_BITS = (int) 33482; - public static final int GL_VIEW_CLASS_24_BITS = (int) 33481; - public static final int GL_VIEW_CLASS_32_BITS = (int) 33480; - public static final int GL_VIEW_CLASS_48_BITS = (int) 33479; - public static final int GL_VIEW_CLASS_64_BITS = (int) 33478; - public static final int GL_VIEW_CLASS_8_BITS = (int) 33483; - public static final int GL_VIEW_CLASS_96_BITS = (int) 33477; - public static final int GL_VIEW_CLASS_BPTC_FLOAT = (int) 33491; - public static final int GL_VIEW_CLASS_BPTC_UNORM = (int) 33490; - public static final int GL_VIEW_CLASS_RGTC1_RED = (int) 33488; - public static final int GL_VIEW_CLASS_RGTC2_RG = (int) 33489; - public static final int GL_VIEW_CLASS_S3TC_DXT1_RGB = (int) 33484; - public static final int GL_VIEW_CLASS_S3TC_DXT1_RGBA = (int) 33485; - public static final int GL_VIEW_CLASS_S3TC_DXT3_RGBA = (int) 33486; - public static final int GL_VIEW_CLASS_S3TC_DXT5_RGBA = (int) 33487; - public static final int GL_VIEW_COMPATIBILITY_CLASS = (int) 33462; - - public static long glGetInternalformati64(int target, int internalformat, int pname) { - return org.lwjgl3.opengl.ARBInternalformatQuery2.glGetInternalformati64(target, internalformat, pname); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBInvalidateSubdata.java b/src/main/java/org/lwjgl/opengl/ARBInvalidateSubdata.java deleted file mode 100644 index 1ca616887..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBInvalidateSubdata.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBInvalidateSubdata { - - public static void glInvalidateBufferData(int buffer) { - org.lwjgl3.opengl.ARBInvalidateSubdata.glInvalidateBufferData(buffer); - } - - public static void glInvalidateBufferSubData(int buffer, long offset, long length) { - org.lwjgl3.opengl.ARBInvalidateSubdata.glInvalidateBufferSubData(buffer, offset, length); - } - - public static void glInvalidateFramebuffer(int target, java.nio.IntBuffer attachments) { - org.lwjgl3.opengl.ARBInvalidateSubdata.glInvalidateFramebuffer(target, attachments); - } - - public static void glInvalidateSubFramebuffer(int target, java.nio.IntBuffer attachments, int x, int y, int width, - int height) { - org.lwjgl3.opengl.ARBInvalidateSubdata.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); - } - - public static void glInvalidateTexImage(int texture, int level) { - org.lwjgl3.opengl.ARBInvalidateSubdata.glInvalidateTexImage(texture, level); - } - - public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth) { - org.lwjgl3.opengl.ARBInvalidateSubdata - .glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMapBufferAlignment.java b/src/main/java/org/lwjgl/opengl/ARBMapBufferAlignment.java deleted file mode 100644 index b321d316f..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMapBufferAlignment.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMapBufferAlignment { - - public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = (int) 37052; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMapBufferRange.java b/src/main/java/org/lwjgl/opengl/ARBMapBufferRange.java deleted file mode 100644 index 84f3f81d6..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMapBufferRange.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMapBufferRange { - - public static final int GL_MAP_FLUSH_EXPLICIT_BIT = (int) 16; - public static final int GL_MAP_INVALIDATE_BUFFER_BIT = (int) 8; - public static final int GL_MAP_INVALIDATE_RANGE_BIT = (int) 4; - public static final int GL_MAP_READ_BIT = (int) 1; - public static final int GL_MAP_UNSYNCHRONIZED_BIT = (int) 32; - public static final int GL_MAP_WRITE_BIT = (int) 2; - - public static void glFlushMappedBufferRange(int target, long offset, long length) { - org.lwjgl3.opengl.ARBMapBufferRange.glFlushMappedBufferRange(target, offset, length); - } - - public static java.nio.ByteBuffer glMapBufferRange(int target, long offset, long length, int access, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.ARBMapBufferRange.glMapBufferRange(target, offset, length, access, old_buffer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMatrixPalette.java b/src/main/java/org/lwjgl/opengl/ARBMatrixPalette.java deleted file mode 100644 index 685c56f76..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMatrixPalette.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMatrixPalette { - - public static final int GL_CURRENT_MATRIX_INDEX_ARB = (int) 34885; - public static final int GL_CURRENT_PALETTE_MATRIX_ARB = (int) 34883; - public static final int GL_MATRIX_INDEX_ARRAY_ARB = (int) 34884; - public static final int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = (int) 34889; - public static final int GL_MATRIX_INDEX_ARRAY_SIZE_ARB = (int) 34886; - public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = (int) 34888; - public static final int GL_MATRIX_INDEX_ARRAY_TYPE_ARB = (int) 34887; - public static final int GL_MATRIX_PALETTE_ARB = (int) 34880; - public static final int GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = (int) 34881; - public static final int GL_MAX_PALETTE_MATRICES_ARB = (int) 34882; - - public static void glCurrentPaletteMatrixARB(int index) { - org.lwjgl3.opengl.ARBMatrixPalette.glCurrentPaletteMatrixARB(index); - } - - public static void glMatrixIndexPointerARB(int size, int type, int stride, long pPointer_buffer_offset) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexPointerARB(size, type, stride, pPointer_buffer_offset); - } - - public static void glMatrixIndexPointerARB(int size, int stride, java.nio.ByteBuffer pPointer) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexPointerARB(size, stride, pPointer); - } - - public static void glMatrixIndexPointerARB(int size, int stride, java.nio.IntBuffer pPointer) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexPointerARB(size, stride, pPointer); - } - - public static void glMatrixIndexPointerARB(int size, int stride, java.nio.ShortBuffer pPointer) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexPointerARB(size, stride, pPointer); - } - - public static void glMatrixIndexuARB(java.nio.ByteBuffer pIndices) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexubvARB(pIndices); - } - - public static void glMatrixIndexuARB(java.nio.IntBuffer pIndices) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexuivARB(pIndices); - } - - public static void glMatrixIndexuARB(java.nio.ShortBuffer pIndices) { - org.lwjgl3.opengl.ARBMatrixPalette.glMatrixIndexusvARB(pIndices); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMultiBind.java b/src/main/java/org/lwjgl/opengl/ARBMultiBind.java deleted file mode 100644 index fa920a369..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMultiBind.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMultiBind { -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMultiDrawIndirect.java b/src/main/java/org/lwjgl/opengl/ARBMultiDrawIndirect.java deleted file mode 100644 index 2eed9b482..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMultiDrawIndirect.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMultiDrawIndirect { - - public static void glMultiDrawArraysIndirect(int mode, long indirect_buffer_offset, int primcount, int stride) { - org.lwjgl3.opengl.ARBMultiDrawIndirect - .glMultiDrawArraysIndirect(mode, indirect_buffer_offset, primcount, stride); - } - - public static void glMultiDrawArraysIndirect(int mode, java.nio.ByteBuffer indirect, int primcount, int stride) { - org.lwjgl3.opengl.ARBMultiDrawIndirect.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); - } - - public static void glMultiDrawArraysIndirect(int mode, java.nio.IntBuffer indirect, int primcount, int stride) { - org.lwjgl3.opengl.ARBMultiDrawIndirect.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); - } - - public static void glMultiDrawElementsIndirect(int mode, int type, long indirect_buffer_offset, int primcount, - int stride) { - org.lwjgl3.opengl.ARBMultiDrawIndirect - .glMultiDrawElementsIndirect(mode, type, indirect_buffer_offset, primcount, stride); - } - - public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.ByteBuffer indirect, int primcount, - int stride) { - org.lwjgl3.opengl.ARBMultiDrawIndirect.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); - } - - public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.IntBuffer indirect, int primcount, - int stride) { - org.lwjgl3.opengl.ARBMultiDrawIndirect.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMultisample.java b/src/main/java/org/lwjgl/opengl/ARBMultisample.java deleted file mode 100644 index 8061f7f28..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMultisample.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMultisample { - - public static final int GL_MULTISAMPLE_ARB = (int) 32925; - public static final int GL_MULTISAMPLE_BIT_ARB = (int) 536870912; - public static final int GL_SAMPLES_ARB = (int) 32937; - public static final int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = (int) 32926; - public static final int GL_SAMPLE_ALPHA_TO_ONE_ARB = (int) 32927; - public static final int GL_SAMPLE_BUFFERS_ARB = (int) 32936; - public static final int GL_SAMPLE_COVERAGE_ARB = (int) 32928; - public static final int GL_SAMPLE_COVERAGE_INVERT_ARB = (int) 32939; - public static final int GL_SAMPLE_COVERAGE_VALUE_ARB = (int) 32938; - - public static void glSampleCoverageARB(float value, boolean invert) { - org.lwjgl3.opengl.ARBMultisample.glSampleCoverageARB(value, invert); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBMultitexture.java b/src/main/java/org/lwjgl/opengl/ARBMultitexture.java deleted file mode 100644 index bdd99d696..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBMultitexture.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBMultitexture { - - public static final int GL_ACTIVE_TEXTURE_ARB = (int) 34016; - public static final int GL_CLIENT_ACTIVE_TEXTURE_ARB = (int) 34017; - public static final int GL_MAX_TEXTURE_UNITS_ARB = (int) 34018; - public static final int GL_TEXTURE0_ARB = (int) 33984; - public static final int GL_TEXTURE10_ARB = (int) 33994; - public static final int GL_TEXTURE11_ARB = (int) 33995; - public static final int GL_TEXTURE12_ARB = (int) 33996; - public static final int GL_TEXTURE13_ARB = (int) 33997; - public static final int GL_TEXTURE14_ARB = (int) 33998; - public static final int GL_TEXTURE15_ARB = (int) 33999; - public static final int GL_TEXTURE16_ARB = (int) 34000; - public static final int GL_TEXTURE17_ARB = (int) 34001; - public static final int GL_TEXTURE18_ARB = (int) 34002; - public static final int GL_TEXTURE19_ARB = (int) 34003; - public static final int GL_TEXTURE1_ARB = (int) 33985; - public static final int GL_TEXTURE20_ARB = (int) 34004; - public static final int GL_TEXTURE21_ARB = (int) 34005; - public static final int GL_TEXTURE22_ARB = (int) 34006; - public static final int GL_TEXTURE23_ARB = (int) 34007; - public static final int GL_TEXTURE24_ARB = (int) 34008; - public static final int GL_TEXTURE25_ARB = (int) 34009; - public static final int GL_TEXTURE26_ARB = (int) 34010; - public static final int GL_TEXTURE27_ARB = (int) 34011; - public static final int GL_TEXTURE28_ARB = (int) 34012; - public static final int GL_TEXTURE29_ARB = (int) 34013; - public static final int GL_TEXTURE2_ARB = (int) 33986; - public static final int GL_TEXTURE30_ARB = (int) 34014; - public static final int GL_TEXTURE31_ARB = (int) 34015; - public static final int GL_TEXTURE3_ARB = (int) 33987; - public static final int GL_TEXTURE4_ARB = (int) 33988; - public static final int GL_TEXTURE5_ARB = (int) 33989; - public static final int GL_TEXTURE6_ARB = (int) 33990; - public static final int GL_TEXTURE7_ARB = (int) 33991; - public static final int GL_TEXTURE8_ARB = (int) 33992; - public static final int GL_TEXTURE9_ARB = (int) 33993; - - public static void glActiveTextureARB(int texture) { - org.lwjgl3.opengl.ARBMultitexture.glActiveTextureARB(texture); - } - - public static void glClientActiveTextureARB(int texture) { - org.lwjgl3.opengl.ARBMultitexture.glClientActiveTextureARB(texture); - } - - public static void glMultiTexCoord1dARB(int target, double s) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord1dARB(target, s); - } - - public static void glMultiTexCoord1fARB(int target, float s) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord1fARB(target, s); - } - - public static void glMultiTexCoord1iARB(int target, int s) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord1iARB(target, s); - } - - public static void glMultiTexCoord1sARB(int target, short s) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord1sARB(target, s); - } - - public static void glMultiTexCoord2dARB(int target, double s, double t) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord2dARB(target, s, t); - } - - public static void glMultiTexCoord2fARB(int target, float s, float t) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord2fARB(target, s, t); - } - - public static void glMultiTexCoord2iARB(int target, int s, int t) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord2iARB(target, s, t); - } - - public static void glMultiTexCoord2sARB(int target, short s, short t) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord2sARB(target, s, t); - } - - public static void glMultiTexCoord3dARB(int target, double s, double t, double r) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord3dARB(target, s, t, r); - } - - public static void glMultiTexCoord3fARB(int target, float s, float t, float r) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord3fARB(target, s, t, r); - } - - public static void glMultiTexCoord3iARB(int target, int s, int t, int r) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord3iARB(target, s, t, r); - } - - public static void glMultiTexCoord3sARB(int target, short s, short t, short r) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord3sARB(target, s, t, r); - } - - public static void glMultiTexCoord4dARB(int target, double s, double t, double r, double q) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord4dARB(target, s, t, r, q); - } - - public static void glMultiTexCoord4fARB(int target, float s, float t, float r, float q) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord4fARB(target, s, t, r, q); - } - - public static void glMultiTexCoord4iARB(int target, int s, int t, int r, int q) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord4iARB(target, s, t, r, q); - } - - public static void glMultiTexCoord4sARB(int target, short s, short t, short r, short q) { - org.lwjgl3.opengl.ARBMultitexture.glMultiTexCoord4sARB(target, s, t, r, q); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery.java b/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery.java deleted file mode 100644 index fd09bf060..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBOcclusionQuery { - - public static final int GL_CURRENT_QUERY_ARB = (int) 34917; - public static final int GL_QUERY_COUNTER_BITS_ARB = (int) 34916; - public static final int GL_QUERY_RESULT_ARB = (int) 34918; - public static final int GL_QUERY_RESULT_AVAILABLE_ARB = (int) 34919; - public static final int GL_SAMPLES_PASSED_ARB = (int) 35092; - - public static void glBeginQueryARB(int target, int id) { - org.lwjgl3.opengl.ARBOcclusionQuery.glBeginQueryARB(target, id); - } - - public static void glDeleteQueriesARB(int id) { - org.lwjgl3.opengl.ARBOcclusionQuery.glDeleteQueriesARB(id); - } - - public static void glDeleteQueriesARB(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.ARBOcclusionQuery.glDeleteQueriesARB(ids); - } - - public static void glEndQueryARB(int target) { - org.lwjgl3.opengl.ARBOcclusionQuery.glEndQueryARB(target); - } - - public static int glGenQueriesARB() { - return org.lwjgl3.opengl.ARBOcclusionQuery.glGenQueriesARB(); - } - - public static void glGenQueriesARB(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.ARBOcclusionQuery.glGenQueriesARB(ids); - } - - public static void glGetQueryARB(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBOcclusionQuery.glGetQueryivARB(target, pname, params); - } - - public static void glGetQueryObjectARB(int id, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBOcclusionQuery.glGetQueryObjectivARB(id, pname, params); - } - - public static int glGetQueryObjectiARB(int id, int pname) { - return org.lwjgl3.opengl.ARBOcclusionQuery.glGetQueryObjectiARB(id, pname); - } - - public static void glGetQueryObjectuARB(int id, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBOcclusionQuery.glGetQueryObjectuivARB(id, pname, params); - } - - public static int glGetQueryObjectuiARB(int id, int pname) { - return org.lwjgl3.opengl.ARBOcclusionQuery.glGetQueryObjectuiARB(id, pname); - } - - public static int glGetQueryiARB(int target, int pname) { - return org.lwjgl3.opengl.ARBOcclusionQuery.glGetQueryiARB(target, pname); - } - - public static boolean glIsQueryARB(int id) { - return org.lwjgl3.opengl.ARBOcclusionQuery.glIsQueryARB(id); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery2.java b/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery2.java deleted file mode 100644 index cb2f1fd8f..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery2.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBOcclusionQuery2 { - - public static final int GL_ANY_SAMPLES_PASSED = (int) 35887; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBPipelineStatisticsQuery.java b/src/main/java/org/lwjgl/opengl/ARBPipelineStatisticsQuery.java deleted file mode 100644 index 9108097bd..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBPipelineStatisticsQuery.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBPipelineStatisticsQuery { - - public static final int GL_CLIPPING_INPUT_PRIMITIVES_ARB = (int) 33526; - public static final int GL_CLIPPING_OUTPUT_PRIMITIVES_ARB = (int) 33527; - public static final int GL_COMPUTE_SHADER_INVOCATIONS_ARB = (int) 33525; - public static final int GL_FRAGMENT_SHADER_INVOCATIONS_ARB = (int) 33524; - public static final int GL_GEOMETRY_SHADER_INVOCATIONS = (int) 34943; - public static final int GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = (int) 33523; - public static final int GL_PRIMITIVES_SUBMITTED_ARB = (int) 33519; - public static final int GL_TESS_CONTROL_SHADER_PATCHES_ARB = (int) 33521; - public static final int GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB = (int) 33522; - public static final int GL_VERTEX_SHADER_INVOCATIONS_ARB = (int) 33520; - public static final int GL_VERTICES_SUBMITTED_ARB = (int) 33518; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBPixelBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBPixelBufferObject.java deleted file mode 100644 index 1cc6daa93..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBPixelBufferObject.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBPixelBufferObject extends org.lwjgl.opengl.ARBBufferObject { - - public static final int GL_PIXEL_PACK_BUFFER_ARB = (int) 35051; - public static final int GL_PIXEL_PACK_BUFFER_BINDING_ARB = (int) 35053; - public static final int GL_PIXEL_UNPACK_BUFFER_ARB = (int) 35052; - public static final int GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = (int) 35055; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBPointParameters.java b/src/main/java/org/lwjgl/opengl/ARBPointParameters.java deleted file mode 100644 index 8c45666ec..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBPointParameters.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBPointParameters { - - public static final int GL_POINT_DISTANCE_ATTENUATION_ARB = (int) 33065; - public static final int GL_POINT_FADE_THRESHOLD_SIZE_ARB = (int) 33064; - public static final int GL_POINT_SIZE_MAX_ARB = (int) 33063; - public static final int GL_POINT_SIZE_MIN_ARB = (int) 33062; - - public static void glPointParameterARB(int pname, java.nio.FloatBuffer pfParams) { - org.lwjgl3.opengl.ARBPointParameters.glPointParameterfvARB(pname, pfParams); - } - - public static void glPointParameterfARB(int pname, float param) { - org.lwjgl3.opengl.ARBPointParameters.glPointParameterfARB(pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBPointSprite.java b/src/main/java/org/lwjgl/opengl/ARBPointSprite.java deleted file mode 100644 index 22b2d645b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBPointSprite.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBPointSprite { - - public static final int GL_COORD_REPLACE_ARB = (int) 34914; - public static final int GL_POINT_SPRITE_ARB = (int) 34913; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBProgram.java b/src/main/java/org/lwjgl/opengl/ARBProgram.java deleted file mode 100644 index a925c5033..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBProgram.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBProgram { -} diff --git a/src/main/java/org/lwjgl/opengl/ARBProgramInterfaceQuery.java b/src/main/java/org/lwjgl/opengl/ARBProgramInterfaceQuery.java deleted file mode 100644 index b6d1b6473..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBProgramInterfaceQuery.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBProgramInterfaceQuery { - - public static final int GL_ACTIVE_RESOURCES = (int) 37621; - public static final int GL_ACTIVE_VARIABLES = (int) 37637; - public static final int GL_ARRAY_SIZE = (int) 37627; - public static final int GL_ARRAY_STRIDE = (int) 37630; - public static final int GL_ATOMIC_COUNTER_BUFFER_INDEX = (int) 37633; - public static final int GL_BLOCK_INDEX = (int) 37629; - public static final int GL_BUFFER_BINDING = (int) 37634; - public static final int GL_BUFFER_DATA_SIZE = (int) 37635; - public static final int GL_BUFFER_VARIABLE = (int) 37605; - public static final int GL_COMPUTE_SUBROUTINE = (int) 37613; - public static final int GL_COMPUTE_SUBROUTINE_UNIFORM = (int) 37619; - public static final int GL_FRAGMENT_SUBROUTINE = (int) 37612; - public static final int GL_FRAGMENT_SUBROUTINE_UNIFORM = (int) 37618; - public static final int GL_GEOMETRY_SUBROUTINE = (int) 37611; - public static final int GL_GEOMETRY_SUBROUTINE_UNIFORM = (int) 37617; - public static final int GL_IS_PER_PATCH = (int) 37607; - public static final int GL_IS_ROW_MAJOR = (int) 37632; - public static final int GL_LOCATION = (int) 37646; - public static final int GL_LOCATION_INDEX = (int) 37647; - public static final int GL_MATRIX_STRIDE = (int) 37631; - public static final int GL_MAX_NAME_LENGTH = (int) 37622; - public static final int GL_MAX_NUM_ACTIVE_VARIABLES = (int) 37623; - public static final int GL_MAX_NUM_COMPATIBLE_SUBROUTINES = (int) 37624; - public static final int GL_NAME_LENGTH = (int) 37625; - public static final int GL_NUM_ACTIVE_VARIABLES = (int) 37636; - public static final int GL_OFFSET = (int) 37628; - public static final int GL_PROGRAM_INPUT = (int) 37603; - public static final int GL_PROGRAM_OUTPUT = (int) 37604; - public static final int GL_REFERENCED_BY_COMPUTE_SHADER = (int) 37643; - public static final int GL_REFERENCED_BY_FRAGMENT_SHADER = (int) 37642; - public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = (int) 37641; - public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = (int) 37639; - public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = (int) 37640; - public static final int GL_REFERENCED_BY_VERTEX_SHADER = (int) 37638; - public static final int GL_SHADER_STORAGE_BLOCK = (int) 37606; - public static final int GL_TESS_CONTROL_SUBROUTINE = (int) 37609; - public static final int GL_TESS_CONTROL_SUBROUTINE_UNIFORM = (int) 37615; - public static final int GL_TESS_EVALUATION_SUBROUTINE = (int) 37610; - public static final int GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = (int) 37616; - public static final int GL_TOP_LEVEL_ARRAY_SIZE = (int) 37644; - public static final int GL_TOP_LEVEL_ARRAY_STRIDE = (int) 37645; - public static final int GL_TRANSFORM_FEEDBACK_VARYING = (int) 37620; - public static final int GL_TYPE = (int) 37626; - public static final int GL_UNIFORM = (int) 37601; - public static final int GL_UNIFORM_BLOCK = (int) 37602; - public static final int GL_VERTEX_SUBROUTINE = (int) 37608; - public static final int GL_VERTEX_SUBROUTINE_UNIFORM = (int) 37614; - - public static int glGetProgramInterfacei(int program, int programInterface, int pname) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery.glGetProgramInterfacei(program, programInterface, pname); - } - - public static int glGetProgramResourceIndex(int program, int programInterface, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery.glGetProgramResourceIndex(program, programInterface, name); - } - - public static int glGetProgramResourceIndex(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery.glGetProgramResourceIndex(program, programInterface, name); - } - - public static int glGetProgramResourceLocation(int program, int programInterface, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery.glGetProgramResourceLocation(program, programInterface, name); - } - - public static int glGetProgramResourceLocation(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery.glGetProgramResourceLocation(program, programInterface, name); - } - - public static int glGetProgramResourceLocationIndex(int program, int programInterface, - java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery - .glGetProgramResourceLocationIndex(program, programInterface, name); - } - - public static int glGetProgramResourceLocationIndex(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery - .glGetProgramResourceLocationIndex(program, programInterface, name); - } - - public static java.lang.String glGetProgramResourceName(int program, int programInterface, int index, int bufSize) { - return org.lwjgl3.opengl.ARBProgramInterfaceQuery - .glGetProgramResourceName(program, programInterface, index, bufSize); - } - - public static void glGetProgramResourceName(int program, int programInterface, int index, java.nio.IntBuffer length, - java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBProgramInterfaceQuery - .glGetProgramResourceName(program, programInterface, index, length, name); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBProvokingVertex.java b/src/main/java/org/lwjgl/opengl/ARBProvokingVertex.java deleted file mode 100644 index 905daae27..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBProvokingVertex.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBProvokingVertex { - - public static final int GL_FIRST_VERTEX_CONVENTION = (int) 36429; - public static final int GL_LAST_VERTEX_CONVENTION = (int) 36430; - public static final int GL_PROVOKING_VERTEX = (int) 36431; - public static final int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = (int) 36428; - - public static void glProvokingVertex(int mode) { - org.lwjgl3.opengl.ARBProvokingVertex.glProvokingVertex(mode); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBQueryBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBQueryBufferObject.java deleted file mode 100644 index 17241e1e7..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBQueryBufferObject.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBQueryBufferObject { - - public static final int GL_QUERY_BUFFER = (int) 37266; - public static final int GL_QUERY_BUFFER_BARRIER_BIT = (int) 32768; - public static final int GL_QUERY_BUFFER_BINDING = (int) 37267; - public static final int GL_QUERY_RESULT_NO_WAIT = (int) 37268; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBRobustness.java b/src/main/java/org/lwjgl/opengl/ARBRobustness.java deleted file mode 100644 index af6bdd865..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBRobustness.java +++ /dev/null @@ -1,162 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBRobustness { - - public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = (int) 4; - public static final int GL_GUILTY_CONTEXT_RESET_ARB = (int) 33363; - public static final int GL_INNOCENT_CONTEXT_RESET_ARB = (int) 33364; - public static final int GL_LOSE_CONTEXT_ON_RESET_ARB = (int) 33362; - public static final int GL_NO_RESET_NOTIFICATION_ARB = (int) 33377; - public static final int GL_RESET_NOTIFICATION_STRATEGY_ARB = (int) 33366; - public static final int GL_UNKNOWN_CONTEXT_RESET_ARB = (int) 33365; - - public static int glGetGraphicsResetStatusARB() { - return org.lwjgl3.opengl.ARBRobustness.glGetGraphicsResetStatusARB(); - } - - public static void glGetnColorTableARB(int target, int format, int type, java.nio.ByteBuffer table) { - org.lwjgl3.opengl.ARBRobustness.glGetnColorTableARB(target, format, type, table); - } - - public static void glGetnColorTableARB(int target, int format, int type, java.nio.FloatBuffer table) { - org.lwjgl3.opengl.ARBRobustness.glGetnColorTableARB(target, format, type, table); - } - - public static void glGetnCompressedTexImageARB(int target, int lod, int img_bufSize, long img_buffer_offset) { - org.lwjgl3.opengl.ARBRobustness.glGetnCompressedTexImageARB(target, lod, img_bufSize, img_buffer_offset); - } - - public static void glGetnCompressedTexImageARB(int target, int lod, java.nio.ByteBuffer img) { - org.lwjgl3.opengl.ARBRobustness.glGetnCompressedTexImageARB(target, lod, img); - } - - public static void glGetnConvolutionFilterARB(int target, int format, int type, int image_bufSize, - long image_buffer_offset) { - org.lwjgl3.opengl.ARBRobustness - .glGetnConvolutionFilterARB(target, format, type, image_bufSize, image_buffer_offset); - } - - public static void glGetnConvolutionFilterARB(int target, int format, int type, java.nio.ByteBuffer image) { - org.lwjgl3.opengl.ARBRobustness.glGetnConvolutionFilterARB(target, format, type, image); - } - - public static void glGetnHistogramARB(int target, boolean reset, int format, int type, int values_bufSize, - long values_buffer_offset) { - org.lwjgl3.opengl.ARBRobustness - .glGetnHistogramARB(target, reset, format, type, values_bufSize, values_buffer_offset); - } - - public static void glGetnHistogramARB(int target, boolean reset, int format, int type, java.nio.ByteBuffer values) { - org.lwjgl3.opengl.ARBRobustness.glGetnHistogramARB(target, reset, format, type, values); - } - - public static void glGetnMapdvARB(int target, int query, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.ARBRobustness.glGetnMapdvARB(target, query, v); - } - - public static void glGetnMapfvARB(int target, int query, java.nio.FloatBuffer v) { - org.lwjgl3.opengl.ARBRobustness.glGetnMapfvARB(target, query, v); - } - - public static void glGetnMapivARB(int target, int query, java.nio.IntBuffer v) { - org.lwjgl3.opengl.ARBRobustness.glGetnMapivARB(target, query, v); - } - - public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, int values_bufSize, - long values_buffer_offset) { - org.lwjgl3.opengl.ARBRobustness - .glGetnMinmaxARB(target, reset, format, type, values_bufSize, values_buffer_offset); - } - - public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, java.nio.ByteBuffer values) { - org.lwjgl3.opengl.ARBRobustness.glGetnMinmaxARB(target, reset, format, type, values); - } - - public static void glGetnPixelMapfvARB(int map, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.ARBRobustness.glGetnPixelMapfvARB(map, values); - } - - public static void glGetnPixelMapuivARB(int map, java.nio.IntBuffer values) { - org.lwjgl3.opengl.ARBRobustness.glGetnPixelMapuivARB(map, values); - } - - public static void glGetnPixelMapusvARB(int map, java.nio.ShortBuffer values) { - org.lwjgl3.opengl.ARBRobustness.glGetnPixelMapusvARB(map, values); - } - - public static void glGetnPolygonStippleARB(java.nio.ByteBuffer pattern) { - org.lwjgl3.opengl.ARBRobustness.glGetnPolygonStippleARB(pattern); - } - - public static void glGetnSeparableFilterARB(int target, int format, int type, java.nio.ByteBuffer row, - java.nio.ByteBuffer column, java.nio.ByteBuffer span) { - org.lwjgl3.opengl.ARBRobustness.glGetnSeparableFilterARB(target, format, type, row, column, span); - } - - public static void glGetnTexImageARB(int target, int level, int format, int type, int img_bufSize, - long img_buffer_offset) { - org.lwjgl3.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img_bufSize, img_buffer_offset); - } - - public static void glGetnTexImageARB(int target, int level, int format, int type, java.nio.ByteBuffer img) { - org.lwjgl3.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img); - } - - public static void glGetnTexImageARB(int target, int level, int format, int type, java.nio.DoubleBuffer img) { - org.lwjgl3.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img); - } - - public static void glGetnTexImageARB(int target, int level, int format, int type, java.nio.FloatBuffer img) { - org.lwjgl3.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img); - } - - public static void glGetnTexImageARB(int target, int level, int format, int type, java.nio.IntBuffer img) { - org.lwjgl3.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img); - } - - public static void glGetnTexImageARB(int target, int level, int format, int type, java.nio.ShortBuffer img) { - org.lwjgl3.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img); - } - - public static void glGetnUniformdvARB(int program, int location, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.ARBRobustness.glGetnUniformdvARB(program, location, params); - } - - public static void glGetnUniformfvARB(int program, int location, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBRobustness.glGetnUniformfvARB(program, location, params); - } - - public static void glGetnUniformivARB(int program, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBRobustness.glGetnUniformivARB(program, location, params); - } - - public static void glGetnUniformuivARB(int program, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBRobustness.glGetnUniformuivARB(program, location, params); - } - - public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, int data_bufSize, - long data_buffer_offset) { - org.lwjgl3.opengl.ARBRobustness - .glReadnPixelsARB(x, y, width, height, format, type, data_bufSize, data_buffer_offset); - } - - public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); - } - - public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, - java.nio.FloatBuffer data) { - org.lwjgl3.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); - } - - public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, - java.nio.IntBuffer data) { - org.lwjgl3.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); - } - - public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, - java.nio.ShortBuffer data) { - org.lwjgl3.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSampleShading.java b/src/main/java/org/lwjgl/opengl/ARBSampleShading.java deleted file mode 100644 index 19a4a3e90..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSampleShading.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSampleShading { - - public static final int GL_MIN_SAMPLE_SHADING_VALUE_ARB = (int) 35895; - public static final int GL_SAMPLE_SHADING_ARB = (int) 35894; - - public static void glMinSampleShadingARB(float value) { - org.lwjgl3.opengl.ARBSampleShading.glMinSampleShadingARB(value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSamplerObjects.java b/src/main/java/org/lwjgl/opengl/ARBSamplerObjects.java deleted file mode 100644 index 0354b5697..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSamplerObjects.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSamplerObjects { - - public static final int GL_SAMPLER_BINDING = (int) 35097; - - public static void glBindSampler(int unit, int sampler) { - org.lwjgl3.opengl.ARBSamplerObjects.glBindSampler(unit, sampler); - } - - public static void glDeleteSamplers(int sampler) { - org.lwjgl3.opengl.ARBSamplerObjects.glDeleteSamplers(sampler); - } - - public static void glDeleteSamplers(java.nio.IntBuffer samplers) { - org.lwjgl3.opengl.ARBSamplerObjects.glDeleteSamplers(samplers); - } - - public static int glGenSamplers() { - return org.lwjgl3.opengl.ARBSamplerObjects.glGenSamplers(); - } - - public static void glGenSamplers(java.nio.IntBuffer samplers) { - org.lwjgl3.opengl.ARBSamplerObjects.glGenSamplers(samplers); - } - - public static int glGetSamplerParameterIi(int sampler, int pname) { - return org.lwjgl3.opengl.ARBSamplerObjects.glGetSamplerParameterIi(sampler, pname); - } - - public static int glGetSamplerParameterIui(int sampler, int pname) { - return org.lwjgl3.opengl.ARBSamplerObjects.glGetSamplerParameterIui(sampler, pname); - } - - public static float glGetSamplerParameterf(int sampler, int pname) { - return org.lwjgl3.opengl.ARBSamplerObjects.glGetSamplerParameterf(sampler, pname); - } - - public static int glGetSamplerParameteri(int sampler, int pname) { - return org.lwjgl3.opengl.ARBSamplerObjects.glGetSamplerParameteri(sampler, pname); - } - - public static boolean glIsSampler(int sampler) { - return org.lwjgl3.opengl.ARBSamplerObjects.glIsSampler(sampler); - } - - public static void glSamplerParameterf(int sampler, int pname, float param) { - org.lwjgl3.opengl.ARBSamplerObjects.glSamplerParameterf(sampler, pname, param); - } - - public static void glSamplerParameteri(int sampler, int pname, int param) { - org.lwjgl3.opengl.ARBSamplerObjects.glSamplerParameteri(sampler, pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSeamlessCubeMap.java b/src/main/java/org/lwjgl/opengl/ARBSeamlessCubeMap.java deleted file mode 100644 index 6aa16cdce..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSeamlessCubeMap.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSeamlessCubeMap { - - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java b/src/main/java/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java deleted file mode 100644 index 7066f9661..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSeamlessCubemapPerTexture { - - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSeparateShaderObjects.java b/src/main/java/org/lwjgl/opengl/ARBSeparateShaderObjects.java deleted file mode 100644 index 473dcf71e..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSeparateShaderObjects.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSeparateShaderObjects { - - public static final int GL_ACTIVE_PROGRAM = (int) 33369; - public static final int GL_ALL_SHADER_BITS = (int) -1; - public static final int GL_FRAGMENT_SHADER_BIT = (int) 2; - public static final int GL_GEOMETRY_SHADER_BIT = (int) 4; - public static final int GL_PROGRAM_PIPELINE_BINDING = (int) 33370; - public static final int GL_PROGRAM_SEPARABLE = (int) 33368; - public static final int GL_TESS_CONTROL_SHADER_BIT = (int) 8; - public static final int GL_TESS_EVALUATION_SHADER_BIT = (int) 16; - public static final int GL_VERTEX_SHADER_BIT = (int) 1; - - public static void glActiveShaderProgram(int pipeline, int program) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glActiveShaderProgram(pipeline, program); - } - - public static void glBindProgramPipeline(int pipeline) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glBindProgramPipeline(pipeline); - } - - public static void glDeleteProgramPipelines(int pipeline) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glDeleteProgramPipelines(pipeline); - } - - public static void glDeleteProgramPipelines(java.nio.IntBuffer pipelines) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glDeleteProgramPipelines(pipelines); - } - - public static int glGenProgramPipelines() { - return org.lwjgl3.opengl.ARBSeparateShaderObjects.glGenProgramPipelines(); - } - - public static void glGenProgramPipelines(java.nio.IntBuffer pipelines) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glGenProgramPipelines(pipelines); - } - - public static java.lang.String glGetProgramPipelineInfoLog(int pipeline, int bufSize) { - return org.lwjgl3.opengl.ARBSeparateShaderObjects.glGetProgramPipelineInfoLog(pipeline, bufSize); - } - - public static void glGetProgramPipelineInfoLog(int pipeline, java.nio.IntBuffer length, - java.nio.ByteBuffer infoLog) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glGetProgramPipelineInfoLog(pipeline, length, infoLog); - } - - public static int glGetProgramPipelinei(int pipeline, int pname) { - return org.lwjgl3.opengl.ARBSeparateShaderObjects.glGetProgramPipelinei(pipeline, pname); - } - - public static boolean glIsProgramPipeline(int pipeline) { - return org.lwjgl3.opengl.ARBSeparateShaderObjects.glIsProgramPipeline(pipeline); - } - - public static void glProgramParameteri(int program, int pname, int value) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramParameteri(program, pname, value); - } - - public static void glProgramUniform1d(int program, int location, double v0) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform1d(program, location, v0); - } - - public static void glProgramUniform1f(int program, int location, float v0) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform1f(program, location, v0); - } - - public static void glProgramUniform1i(int program, int location, int v0) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform1i(program, location, v0); - } - - public static void glProgramUniform1ui(int program, int location, int v0) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform1ui(program, location, v0); - } - - public static void glProgramUniform2d(int program, int location, double v0, double v1) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform2d(program, location, v0, v1); - } - - public static void glProgramUniform2f(int program, int location, float v0, float v1) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform2f(program, location, v0, v1); - } - - public static void glProgramUniform2i(int program, int location, int v0, int v1) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform2i(program, location, v0, v1); - } - - public static void glProgramUniform2ui(int program, int location, int v0, int v1) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform2ui(program, location, v0, v1); - } - - public static void glProgramUniform3d(int program, int location, double v0, double v1, double v2) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform3d(program, location, v0, v1, v2); - } - - public static void glProgramUniform3f(int program, int location, float v0, float v1, float v2) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform3f(program, location, v0, v1, v2); - } - - public static void glProgramUniform3i(int program, int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform3i(program, location, v0, v1, v2); - } - - public static void glProgramUniform3ui(int program, int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform3ui(program, location, v0, v1, v2); - } - - public static void glProgramUniform4d(int program, int location, double v0, double v1, double v2, double v3) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform4d(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4f(int program, int location, float v0, float v1, float v2, float v3) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform4f(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4i(int program, int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform4i(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4ui(int program, int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glProgramUniform4ui(program, location, v0, v1, v2, v3); - } - - public static void glUseProgramStages(int pipeline, int stages, int program) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glUseProgramStages(pipeline, stages, program); - } - - public static void glValidateProgramPipeline(int pipeline) { - org.lwjgl3.opengl.ARBSeparateShaderObjects.glValidateProgramPipeline(pipeline); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShaderAtomicCounters.java b/src/main/java/org/lwjgl/opengl/ARBShaderAtomicCounters.java deleted file mode 100644 index 5868e14a4..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShaderAtomicCounters.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShaderAtomicCounters { - - public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = (int) 37593; - public static final int GL_ATOMIC_COUNTER_BUFFER = (int) 37568; - public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = (int) 37573; - public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = (int) 37574; - public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = (int) 37569; - public static final int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = (int) 37572; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = (int) 37579; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = (int) 37578; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = (int) 37576; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = (int) 37577; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = (int) 37575; - public static final int GL_ATOMIC_COUNTER_BUFFER_SIZE = (int) 37571; - public static final int GL_ATOMIC_COUNTER_BUFFER_START = (int) 37570; - public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = (int) 37596; - public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = (int) 37592; - public static final int GL_MAX_COMBINED_ATOMIC_COUNTERS = (int) 37591; - public static final int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = (int) 37585; - public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTERS = (int) 37590; - public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = (int) 37584; - public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = (int) 37589; - public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = (int) 37583; - public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = (int) 37587; - public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = (int) 37581; - public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = (int) 37588; - public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = (int) 37582; - public static final int GL_MAX_VERTEX_ATOMIC_COUNTERS = (int) 37586; - public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = (int) 37580; - public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = (int) 37594; - public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = (int) 37595; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShaderImageLoadStore.java b/src/main/java/org/lwjgl/opengl/ARBShaderImageLoadStore.java deleted file mode 100644 index 16b0679a2..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShaderImageLoadStore.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShaderImageLoadStore { - - public static final int GL_ALL_BARRIER_BITS = (int) -1; - public static final int GL_ATOMIC_COUNTER_BARRIER_BIT = (int) 4096; - public static final int GL_BUFFER_UPDATE_BARRIER_BIT = (int) 512; - public static final int GL_COMMAND_BARRIER_BIT = (int) 64; - public static final int GL_ELEMENT_ARRAY_BARRIER_BIT = (int) 2; - public static final int GL_FRAMEBUFFER_BARRIER_BIT = (int) 1024; - public static final int GL_IMAGE_1D = (int) 36940; - public static final int GL_IMAGE_1D_ARRAY = (int) 36946; - public static final int GL_IMAGE_2D = (int) 36941; - public static final int GL_IMAGE_2D_ARRAY = (int) 36947; - public static final int GL_IMAGE_2D_MULTISAMPLE = (int) 36949; - public static final int GL_IMAGE_2D_MULTISAMPLE_ARRAY = (int) 36950; - public static final int GL_IMAGE_2D_RECT = (int) 36943; - public static final int GL_IMAGE_3D = (int) 36942; - public static final int GL_IMAGE_BINDING_ACCESS = (int) 36670; - public static final int GL_IMAGE_BINDING_FORMAT = (int) 36974; - public static final int GL_IMAGE_BINDING_LAYER = (int) 36669; - public static final int GL_IMAGE_BINDING_LAYERED = (int) 36668; - public static final int GL_IMAGE_BINDING_LEVEL = (int) 36667; - public static final int GL_IMAGE_BINDING_NAME = (int) 36666; - public static final int GL_IMAGE_BUFFER = (int) 36945; - public static final int GL_IMAGE_CUBE = (int) 36944; - public static final int GL_IMAGE_CUBE_MAP_ARRAY = (int) 36948; - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = (int) 37064; - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = (int) 37063; - public static final int GL_INT_IMAGE_1D = (int) 36951; - public static final int GL_INT_IMAGE_1D_ARRAY = (int) 36957; - public static final int GL_INT_IMAGE_2D = (int) 36952; - public static final int GL_INT_IMAGE_2D_ARRAY = (int) 36958; - public static final int GL_INT_IMAGE_2D_MULTISAMPLE = (int) 36960; - public static final int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = (int) 36961; - public static final int GL_INT_IMAGE_2D_RECT = (int) 36954; - public static final int GL_INT_IMAGE_3D = (int) 36953; - public static final int GL_INT_IMAGE_BUFFER = (int) 36956; - public static final int GL_INT_IMAGE_CUBE = (int) 36955; - public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = (int) 36959; - public static final int GL_MAX_COMBINED_IMAGE_UNIFORMS = (int) 37071; - public static final int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = (int) 36665; - public static final int GL_MAX_FRAGMENT_IMAGE_UNIFORMS = (int) 37070; - public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = (int) 37069; - public static final int GL_MAX_IMAGE_SAMPLES = (int) 36973; - public static final int GL_MAX_IMAGE_UNITS = (int) 36664; - public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = (int) 37067; - public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = (int) 37068; - public static final int GL_MAX_VERTEX_IMAGE_UNIFORMS = (int) 37066; - public static final int GL_PIXEL_BUFFER_BARRIER_BIT = (int) 128; - public static final int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = (int) 32; - public static final int GL_TEXTURE_FETCH_BARRIER_BIT = (int) 8; - public static final int GL_TEXTURE_UPDATE_BARRIER_BIT = (int) 256; - public static final int GL_TRANSFORM_FEEDBACK_BARRIER_BIT = (int) 2048; - public static final int GL_UNIFORM_BARRIER_BIT = (int) 4; - public static final int GL_UNSIGNED_INT_IMAGE_1D = (int) 36962; - public static final int GL_UNSIGNED_INT_IMAGE_1D_ARRAY = (int) 36968; - public static final int GL_UNSIGNED_INT_IMAGE_2D = (int) 36963; - public static final int GL_UNSIGNED_INT_IMAGE_2D_ARRAY = (int) 36969; - public static final int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = (int) 36971; - public static final int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = (int) 36972; - public static final int GL_UNSIGNED_INT_IMAGE_2D_RECT = (int) 36965; - public static final int GL_UNSIGNED_INT_IMAGE_3D = (int) 36964; - public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = (int) 36967; - public static final int GL_UNSIGNED_INT_IMAGE_CUBE = (int) 36966; - public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = (int) 36970; - public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = (int) 1; - public static final int IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = (int) 37065; - - public static void glBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, - int format) { - org.lwjgl3.opengl.ARBShaderImageLoadStore - .glBindImageTexture(unit, texture, level, layered, layer, access, format); - } - - public static void glMemoryBarrier(int barriers) { - org.lwjgl3.opengl.ARBShaderImageLoadStore.glMemoryBarrier(barriers); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShaderObjects.java b/src/main/java/org/lwjgl/opengl/ARBShaderObjects.java deleted file mode 100644 index 633d8e537..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShaderObjects.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class ARBShaderObjects { - - public static final int GL_BOOL_ARB = (int) 35670; - public static final int GL_BOOL_VEC2_ARB = (int) 35671; - public static final int GL_BOOL_VEC3_ARB = (int) 35672; - public static final int GL_BOOL_VEC4_ARB = (int) 35673; - public static final int GL_FLOAT_MAT2_ARB = (int) 35674; - public static final int GL_FLOAT_MAT3_ARB = (int) 35675; - public static final int GL_FLOAT_MAT4_ARB = (int) 35676; - public static final int GL_FLOAT_VEC2_ARB = (int) 35664; - public static final int GL_FLOAT_VEC3_ARB = (int) 35665; - public static final int GL_FLOAT_VEC4_ARB = (int) 35666; - public static final int GL_INT_VEC2_ARB = (int) 35667; - public static final int GL_INT_VEC3_ARB = (int) 35668; - public static final int GL_INT_VEC4_ARB = (int) 35669; - public static final int GL_OBJECT_ACTIVE_UNIFORMS_ARB = (int) 35718; - public static final int GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = (int) 35719; - public static final int GL_OBJECT_ATTACHED_OBJECTS_ARB = (int) 35717; - public static final int GL_OBJECT_COMPILE_STATUS_ARB = (int) 35713; - public static final int GL_OBJECT_DELETE_STATUS_ARB = (int) 35712; - public static final int GL_OBJECT_INFO_LOG_LENGTH_ARB = (int) 35716; - public static final int GL_OBJECT_LINK_STATUS_ARB = (int) 35714; - public static final int GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = (int) 35720; - public static final int GL_OBJECT_SUBTYPE_ARB = (int) 35663; - public static final int GL_OBJECT_TYPE_ARB = (int) 35662; - public static final int GL_OBJECT_VALIDATE_STATUS_ARB = (int) 35715; - public static final int GL_PROGRAM_OBJECT_ARB = (int) 35648; - public static final int GL_SAMPLER_1D_ARB = (int) 35677; - public static final int GL_SAMPLER_1D_SHADOW_ARB = (int) 35681; - public static final int GL_SAMPLER_2D_ARB = (int) 35678; - public static final int GL_SAMPLER_2D_RECT_ARB = (int) 35683; - public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = (int) 35684; - public static final int GL_SAMPLER_2D_SHADOW_ARB = (int) 35682; - public static final int GL_SAMPLER_3D_ARB = (int) 35679; - public static final int GL_SAMPLER_CUBE_ARB = (int) 35680; - public static final int GL_SHADER_OBJECT_ARB = (int) 35656; - - public static void glAttachObjectARB(int containerObj, int obj) { - org.lwjgl3.opengl.ARBShaderObjects.glAttachObjectARB(containerObj, obj); - } - - public static void glCompileShaderARB(int shaderObj) { - org.lwjgl3.opengl.ARBShaderObjects.glCompileShaderARB(shaderObj); - } - - public static int glCreateProgramObjectARB() { - return org.lwjgl3.opengl.ARBShaderObjects.glCreateProgramObjectARB(); - } - - public static int glCreateShaderObjectARB(int shaderType) { - return org.lwjgl3.opengl.ARBShaderObjects.glCreateShaderObjectARB(shaderType); - } - - public static void glDeleteObjectARB(int obj) { - org.lwjgl3.opengl.ARBShaderObjects.glDeleteObjectARB(obj); - } - - public static void glDetachObjectARB(int containerObj, int attachedObj) { - org.lwjgl3.opengl.ARBShaderObjects.glDetachObjectARB(containerObj, attachedObj); - } - - public static void glGetActiveUniformARB(int programObj, int index, java.nio.IntBuffer length, - java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBShaderObjects.glGetActiveUniformARB(programObj, index, length, size, type, name); - } - - public static void glGetAttachedObjectsARB(int containerObj, java.nio.IntBuffer count, java.nio.IntBuffer obj) { - org.lwjgl3.opengl.ARBShaderObjects.glGetAttachedObjectsARB(containerObj, count, obj); - } - - public static int glGetHandleARB(int pname) { - return org.lwjgl3.opengl.ARBShaderObjects.glGetHandleARB(pname); - } - - public static java.lang.String glGetInfoLogARB(int obj, int maxLength) { - return org.lwjgl3.opengl.ARBShaderObjects.glGetInfoLogARB(obj, maxLength); - } - - public static void glGetInfoLogARB(int obj, java.nio.IntBuffer length, java.nio.ByteBuffer infoLog) { - org.lwjgl3.opengl.ARBShaderObjects.glGetInfoLogARB(obj, length, infoLog); - } - - public static void glGetObjectParameterARB(int obj, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBShaderObjects.glGetObjectParameterfvARB(obj, pname, params); - } - - public static void glGetObjectParameterARB(int obj, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBShaderObjects.glGetObjectParameterivARB(obj, pname, params); - } - - public static int glGetObjectParameteriARB(int obj, int pname) { - return org.lwjgl3.opengl.ARBShaderObjects.glGetObjectParameteriARB(obj, pname); - } - - public static java.lang.String glGetShaderSourceARB(int obj, int maxLength) { - return org.lwjgl3.opengl.ARBShaderObjects.glGetShaderSourceARB(obj, maxLength); - } - - public static void glGetShaderSourceARB(int obj, java.nio.IntBuffer length, java.nio.ByteBuffer source) { - org.lwjgl3.opengl.ARBShaderObjects.glGetShaderSourceARB(obj, length, source); - } - - public static void glGetUniformARB(int programObj, int location, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBShaderObjects.glGetUniformfvARB(programObj, location, params); - } - - public static void glGetUniformARB(int programObj, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBShaderObjects.glGetUniformivARB(programObj, location, params); - } - - public static int glGetUniformLocationARB(int programObj, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBShaderObjects.glGetUniformLocationARB(programObj, name); - } - - public static int glGetUniformLocationARB(int programObj, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBShaderObjects.glGetUniformLocationARB(programObj, name); - } - - public static void glLinkProgramARB(int programObj) { - org.lwjgl3.opengl.ARBShaderObjects.glLinkProgramARB(programObj); - } - - public static void glShaderSourceARB(int shader, java.lang.CharSequence string) { - org.lwjgl3.opengl.ARBShaderObjects.glShaderSourceARB(shader, string); - } - - public static void glShaderSourceARB(int shader, java.nio.ByteBuffer string) { - - org.lwjgl3.opengl.ARBShaderObjects - .glShaderSourceARB(shader, BufferCasts.bufferToCharSeq(string)); - } - - public static void glShaderSourceARB(int shader, java.lang.CharSequence[] strings) { - org.lwjgl3.opengl.ARBShaderObjects.glShaderSourceARB(shader, strings); - } - - public static void glUniform1ARB(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform1fvARB(location, values); - } - - public static void glUniform1ARB(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform1ivARB(location, values); - } - - public static void glUniform1fARB(int location, float v0) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform1fARB(location, v0); - } - - public static void glUniform1iARB(int location, int v0) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform1iARB(location, v0); - } - - public static void glUniform2ARB(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform2fvARB(location, values); - } - - public static void glUniform2ARB(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform2ivARB(location, values); - } - - public static void glUniform2fARB(int location, float v0, float v1) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform2fARB(location, v0, v1); - } - - public static void glUniform2iARB(int location, int v0, int v1) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform2iARB(location, v0, v1); - } - - public static void glUniform3ARB(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform3fvARB(location, values); - } - - public static void glUniform3ARB(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform3ivARB(location, values); - } - - public static void glUniform3fARB(int location, float v0, float v1, float v2) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform3fARB(location, v0, v1, v2); - } - - public static void glUniform3iARB(int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform3iARB(location, v0, v1, v2); - } - - public static void glUniform4ARB(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform4fvARB(location, values); - } - - public static void glUniform4ARB(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform4ivARB(location, values); - } - - public static void glUniform4fARB(int location, float v0, float v1, float v2, float v3) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform4fARB(location, v0, v1, v2, v3); - } - - public static void glUniform4iARB(int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.ARBShaderObjects.glUniform4iARB(location, v0, v1, v2, v3); - } - - public static void glUniformMatrix2ARB(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.ARBShaderObjects.glUniformMatrix2fvARB(location, transpose, matrices); - } - - public static void glUniformMatrix3ARB(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.ARBShaderObjects.glUniformMatrix3fvARB(location, transpose, matrices); - } - - public static void glUniformMatrix4ARB(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.ARBShaderObjects.glUniformMatrix4fvARB(location, transpose, matrices); - } - - public static void glUseProgramObjectARB(int programObj) { - org.lwjgl3.opengl.ARBShaderObjects.glUseProgramObjectARB(programObj); - } - - public static void glValidateProgramARB(int programObj) { - org.lwjgl3.opengl.ARBShaderObjects.glValidateProgramARB(programObj); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShaderStorageBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBShaderStorageBufferObject.java deleted file mode 100644 index ad13aa691..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShaderStorageBufferObject.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShaderStorageBufferObject { - - public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = (int) 36665; - public static final int GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = (int) 37084; - public static final int GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = (int) 37083; - public static final int GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = (int) 37082; - public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = (int) 37079; - public static final int GL_MAX_SHADER_STORAGE_BLOCK_SIZE = (int) 37086; - public static final int GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = (int) 37085; - public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = (int) 37080; - public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = (int) 37081; - public static final int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = (int) 37078; - public static final int GL_SHADER_STORAGE_BARRIER_BIT = (int) 8192; - public static final int GL_SHADER_STORAGE_BUFFER = (int) 37074; - public static final int GL_SHADER_STORAGE_BUFFER_BINDING = (int) 37075; - public static final int GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = (int) 37087; - public static final int GL_SHADER_STORAGE_BUFFER_SIZE = (int) 37077; - public static final int GL_SHADER_STORAGE_BUFFER_START = (int) 37076; - - public static void glShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding) { - org.lwjgl3.opengl.ARBShaderStorageBufferObject - .glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShaderSubroutine.java b/src/main/java/org/lwjgl/opengl/ARBShaderSubroutine.java deleted file mode 100644 index a4a35c048..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShaderSubroutine.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShaderSubroutine { - - public static final int GL_ACTIVE_SUBROUTINES = (int) 36325; - public static final int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = (int) 36424; - public static final int GL_ACTIVE_SUBROUTINE_UNIFORMS = (int) 36326; - public static final int GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = (int) 36423; - public static final int GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = (int) 36425; - public static final int GL_COMPATIBLE_SUBROUTINES = (int) 36427; - public static final int GL_MAX_SUBROUTINES = (int) 36327; - public static final int GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = (int) 36328; - public static final int GL_NUM_COMPATIBLE_SUBROUTINES = (int) 36426; - - public static java.lang.String glGetActiveSubroutineName(int program, int shadertype, int index, int bufsize) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetActiveSubroutineName(program, shadertype, index, bufsize); - } - - public static void glGetActiveSubroutineName(int program, int shadertype, int index, java.nio.IntBuffer length, - java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBShaderSubroutine.glGetActiveSubroutineName(program, shadertype, index, length, name); - } - - public static java.lang.String glGetActiveSubroutineUniformName(int program, int shadertype, int index, - int bufsize) { - return org.lwjgl3.opengl.ARBShaderSubroutine - .glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); - } - - public static void glGetActiveSubroutineUniformName(int program, int shadertype, int index, - java.nio.IntBuffer length, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBShaderSubroutine.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); - } - - public static int glGetActiveSubroutineUniformi(int program, int shadertype, int index, int pname) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetActiveSubroutineUniformi(program, shadertype, index, pname); - } - - public static int glGetProgramStagei(int program, int shadertype, int pname) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetProgramStagei(program, shadertype, pname); - } - - public static int glGetSubroutineIndex(int program, int shadertype, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetSubroutineIndex(program, shadertype, name); - } - - public static int glGetSubroutineIndex(int program, int shadertype, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetSubroutineIndex(program, shadertype, name); - } - - public static int glGetSubroutineUniformLocation(int program, int shadertype, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetSubroutineUniformLocation(program, shadertype, name); - } - - public static int glGetSubroutineUniformLocation(int program, int shadertype, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetSubroutineUniformLocation(program, shadertype, name); - } - - public static int glGetUniformSubroutineui(int shadertype, int location) { - return org.lwjgl3.opengl.ARBShaderSubroutine.glGetUniformSubroutineui(shadertype, location); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShadingLanguage100.java b/src/main/java/org/lwjgl/opengl/ARBShadingLanguage100.java deleted file mode 100644 index 501dabebd..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShadingLanguage100.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShadingLanguage100 { - - public static final int GL_SHADING_LANGUAGE_VERSION_ARB = (int) 35724; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShadingLanguageInclude.java b/src/main/java/org/lwjgl/opengl/ARBShadingLanguageInclude.java deleted file mode 100644 index 73021b8ce..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShadingLanguageInclude.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShadingLanguageInclude { - - public static final int GL_NAMED_STRING_LENGTH_ARB = (int) 36329; - public static final int GL_NAMED_STRING_TYPE_ARB = (int) 36330; - public static final int GL_SHADER_INCLUDE_ARB = (int) 36270; - - public static void glDeleteNamedStringARB(java.lang.CharSequence name) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glDeleteNamedStringARB(name); - } - - public static void glDeleteNamedStringARB(java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glDeleteNamedStringARB(name); - } - - public static java.lang.String glGetNamedStringARB(java.lang.CharSequence name, int bufSize) { - return org.lwjgl3.opengl.ARBShadingLanguageInclude.glGetNamedStringARB(name, bufSize); - } - - public static void glGetNamedStringARB(java.lang.CharSequence name, java.nio.IntBuffer stringlen, - java.nio.ByteBuffer string) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glGetNamedStringARB(name, stringlen, string); - } - - public static void glGetNamedStringARB(java.nio.ByteBuffer name, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glGetNamedStringivARB(name, pname, params); - } - - public static void glGetNamedStringARB(java.nio.ByteBuffer name, java.nio.IntBuffer stringlen, - java.nio.ByteBuffer string) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glGetNamedStringARB(name, stringlen, string); - } - - public static int glGetNamedStringiARB(java.lang.CharSequence name, int pname) { - return org.lwjgl3.opengl.ARBShadingLanguageInclude.glGetNamedStringiARB(name, pname); - } - - public static void glGetNamedStringiARB(java.lang.CharSequence name, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glGetNamedStringivARB(name, pname, params); - } - - public static boolean glIsNamedStringARB(java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBShadingLanguageInclude.glIsNamedStringARB(name); - } - - public static boolean glIsNamedStringARB(java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBShadingLanguageInclude.glIsNamedStringARB(name); - } - - public static void glNamedStringARB(int type, java.lang.CharSequence name, java.lang.CharSequence string) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glNamedStringARB(type, name, string); - } - - public static void glNamedStringARB(int type, java.nio.ByteBuffer name, java.nio.ByteBuffer string) { - org.lwjgl3.opengl.ARBShadingLanguageInclude.glNamedStringARB(type, name, string); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShadow.java b/src/main/java/org/lwjgl/opengl/ARBShadow.java deleted file mode 100644 index 61b5208ac..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShadow.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShadow { - - public static final int GL_COMPARE_R_TO_TEXTURE_ARB = (int) 34894; - public static final int GL_TEXTURE_COMPARE_FUNC_ARB = (int) 34893; - public static final int GL_TEXTURE_COMPARE_MODE_ARB = (int) 34892; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBShadowAmbient.java b/src/main/java/org/lwjgl/opengl/ARBShadowAmbient.java deleted file mode 100644 index 798e6d894..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBShadowAmbient.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBShadowAmbient { - - public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = (int) 32959; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSparseBuffer.java b/src/main/java/org/lwjgl/opengl/ARBSparseBuffer.java deleted file mode 100644 index 1115a8b93..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSparseBuffer.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSparseBuffer { - - public static final int GL_SPARSE_BUFFER_PAGE_SIZE_ARB = (int) 33528; - public static final int GL_SPARSE_STORAGE_BIT_ARB = (int) 1024; - - public static void glBufferPageCommitmentARB(int target, long offset, long size, boolean commit) { - org.lwjgl3.opengl.ARBSparseBuffer.glBufferPageCommitmentARB(target, offset, size, commit); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSparseTexture.java b/src/main/java/org/lwjgl/opengl/ARBSparseTexture.java deleted file mode 100644 index e4ca94b77..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSparseTexture.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSparseTexture { - - public static final int GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB = (int) 37273; - public static final int GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = (int) 37274; - public static final int GL_MAX_SPARSE_TEXTURE_SIZE_ARB = (int) 37272; - public static final int GL_NUM_SPARSE_LEVELS_ARB = (int) 37290; - public static final int GL_NUM_VIRTUAL_PAGE_SIZES_ARB = (int) 37288; - public static final int GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = (int) 37289; - public static final int GL_TEXTURE_SPARSE_ARB = (int) 37286; - public static final int GL_VIRTUAL_PAGE_SIZE_INDEX_ARB = (int) 37287; - public static final int GL_VIRTUAL_PAGE_SIZE_X_ARB = (int) 37269; - public static final int GL_VIRTUAL_PAGE_SIZE_Y_ARB = (int) 37270; - public static final int GL_VIRTUAL_PAGE_SIZE_Z_ARB = (int) 37271; - - public static void glTexPageCommitmentARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, boolean commit) { - org.lwjgl3.opengl.ARBSparseTexture - .glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBStencilTexturing.java b/src/main/java/org/lwjgl/opengl/ARBStencilTexturing.java deleted file mode 100644 index 7017d70a4..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBStencilTexturing.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBStencilTexturing { - - public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = (int) 37098; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBSync.java b/src/main/java/org/lwjgl/opengl/ARBSync.java deleted file mode 100644 index 4c01e2300..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBSync.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBSync { - - public static final int GL_ALREADY_SIGNALED = (int) 37146; - public static final int GL_CONDITION_SATISFIED = (int) 37148; - public static final int GL_MAX_SERVER_WAIT_TIMEOUT = (int) 37137; - public static final int GL_OBJECT_TYPE = (int) 37138; - public static final int GL_SIGNALED = (int) 37145; - public static final int GL_SYNC_CONDITION = (int) 37139; - public static final int GL_SYNC_FENCE = (int) 37142; - public static final int GL_SYNC_FLAGS = (int) 37141; - public static final int GL_SYNC_FLUSH_COMMANDS_BIT = (int) 1; - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = (int) 37143; - public static final int GL_SYNC_STATUS = (int) 37140; - public static final int GL_TIMEOUT_EXPIRED = (int) 37147; - public static final long GL_TIMEOUT_IGNORED = (long) -1; - public static final int GL_UNSIGNALED = (int) 37144; - public static final int GL_WAIT_FAILED = (int) 37149; - - public static long glGetInteger64(int pname) { - return org.lwjgl3.opengl.ARBSync.glGetInteger64(pname); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTessellationShader.java b/src/main/java/org/lwjgl/opengl/ARBTessellationShader.java deleted file mode 100644 index e92dfd529..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTessellationShader.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTessellationShader { - - public static final int GL_FRACTIONAL_EVEN = (int) 36476; - public static final int GL_FRACTIONAL_ODD = (int) 36475; - public static final int GL_ISOLINES = (int) 36474; - public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = (int) 36382; - public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = (int) 36383; - public static final int GL_MAX_PATCH_VERTICES = (int) 36477; - public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = (int) 34924; - public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = (int) 36483; - public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = (int) 36481; - public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = (int) 36485; - public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = (int) 36489; - public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = (int) 36479; - public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = (int) 34925; - public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = (int) 36486; - public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = (int) 36482; - public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = (int) 36490; - public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = (int) 36480; - public static final int GL_MAX_TESS_GEN_LEVEL = (int) 36478; - public static final int GL_MAX_TESS_PATCH_COMPONENTS = (int) 36484; - public static final int GL_PATCHES = (int) 14; - public static final int GL_PATCH_DEFAULT_INNER_LEVEL = (int) 36467; - public static final int GL_PATCH_DEFAULT_OUTER_LEVEL = (int) 36468; - public static final int GL_PATCH_VERTICES = (int) 36466; - public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = (int) 36469; - public static final int GL_TESS_CONTROL_SHADER = (int) 36488; - public static final int GL_TESS_EVALUATION_SHADER = (int) 36487; - public static final int GL_TESS_GEN_MODE = (int) 36470; - public static final int GL_TESS_GEN_POINT_MODE = (int) 36473; - public static final int GL_TESS_GEN_SPACING = (int) 36471; - public static final int GL_TESS_GEN_VERTEX_ORDER = (int) 36472; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = (int) 34032; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = (int) 34033; - - public static void glPatchParameteri(int pname, int value) { - org.lwjgl3.opengl.ARBTessellationShader.glPatchParameteri(pname, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureBarrier.java b/src/main/java/org/lwjgl/opengl/ARBTextureBarrier.java deleted file mode 100644 index feea2173e..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureBarrier.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureBarrier { - - public static void glTextureBarrier() { - org.lwjgl3.opengl.ARBTextureBarrier.glTextureBarrier(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureBorderClamp.java b/src/main/java/org/lwjgl/opengl/ARBTextureBorderClamp.java deleted file mode 100644 index 71ac85f9b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureBorderClamp.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureBorderClamp { - - public static final int GL_CLAMP_TO_BORDER_ARB = (int) 33069; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBTextureBufferObject.java deleted file mode 100644 index f8702c9cc..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureBufferObject.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureBufferObject { - - public static final int GL_MAX_TEXTURE_BUFFER_SIZE_ARB = (int) 35883; - public static final int GL_TEXTURE_BINDING_BUFFER_ARB = (int) 35884; - public static final int GL_TEXTURE_BUFFER_ARB = (int) 35882; - public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = (int) 35885; - public static final int GL_TEXTURE_BUFFER_FORMAT_ARB = (int) 35886; - - public static void glTexBufferARB(int target, int internalformat, int buffer) { - org.lwjgl3.opengl.ARBTextureBufferObject.glTexBufferARB(target, internalformat, buffer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureBufferRange.java b/src/main/java/org/lwjgl/opengl/ARBTextureBufferRange.java deleted file mode 100644 index a36297f9c..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureBufferRange.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureBufferRange { - - public static final int GL_TEXTURE_BUFFER_OFFSET = (int) 37277; - public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = (int) 37279; - public static final int GL_TEXTURE_BUFFER_SIZE = (int) 37278; - - public static void glTexBufferRange(int target, int internalformat, int buffer, long offset, long size) { - org.lwjgl3.opengl.ARBTextureBufferRange.glTexBufferRange(target, internalformat, buffer, offset, size); - } - - public static void glTextureBufferRangeEXT(int texture, int target, int internalformat, int buffer, long offset, - long size) { - org.lwjgl3.opengl.ARBTextureBufferRange - .glTextureBufferRangeEXT(texture, target, internalformat, buffer, offset, size); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureCompression.java b/src/main/java/org/lwjgl/opengl/ARBTextureCompression.java deleted file mode 100644 index e3d11871d..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureCompression.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureCompression { - - public static final int GL_COMPRESSED_ALPHA_ARB = (int) 34025; - public static final int GL_COMPRESSED_INTENSITY_ARB = (int) 34028; - public static final int GL_COMPRESSED_LUMINANCE_ALPHA_ARB = (int) 34027; - public static final int GL_COMPRESSED_LUMINANCE_ARB = (int) 34026; - public static final int GL_COMPRESSED_RGBA_ARB = (int) 34030; - public static final int GL_COMPRESSED_RGB_ARB = (int) 34029; - public static final int GL_COMPRESSED_TEXTURE_FORMATS_ARB = (int) 34467; - public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = (int) 34466; - public static final int GL_TEXTURE_COMPRESSED_ARB = (int) 34465; - public static final int GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = (int) 34464; - public static final int GL_TEXTURE_COMPRESSION_HINT_ARB = (int) 34031; - - public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, - int pData_imageSize, long pData_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexImage1DARB( - target, - level, - internalformat, - width, - border, - pData_imageSize, - pData_buffer_offset); - } - - public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, - int border, int pData_imageSize, long pData_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexImage2DARB( - target, - level, - internalformat, - width, - height, - border, - pData_imageSize, - pData_buffer_offset); - } - - public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, - int depth, int border, int pData_imageSize, long pData_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexImage3DARB( - target, - level, - internalformat, - width, - height, - depth, - border, - pData_imageSize, - pData_buffer_offset); - } - - public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, - int pData_imageSize, long pData_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexSubImage1DARB( - target, - level, - xoffset, - width, - format, - pData_imageSize, - pData_buffer_offset); - } - - public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, - java.nio.ByteBuffer pData) { - org.lwjgl3.opengl.ARBTextureCompression - .glCompressedTexSubImage1DARB(target, level, xoffset, width, format, pData); - } - - public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, - int height, int format, int pData_imageSize, long pData_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexSubImage2DARB( - target, - level, - xoffset, - yoffset, - width, - height, - format, - pData_imageSize, - pData_buffer_offset); - } - - public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, - int height, int format, java.nio.ByteBuffer pData) { - org.lwjgl3.opengl.ARBTextureCompression - .glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, pData); - } - - public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int pData_imageSize, long pData_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexSubImage3DARB( - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - pData_imageSize, - pData_buffer_offset); - } - - public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, java.nio.ByteBuffer pData) { - org.lwjgl3.opengl.ARBTextureCompression.glCompressedTexSubImage3DARB( - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - pData); - } - - public static void glGetCompressedTexImageARB(int target, int lod, long pImg_buffer_offset) { - org.lwjgl3.opengl.ARBTextureCompression.glGetCompressedTexImageARB(target, lod, pImg_buffer_offset); - } - - public static void glGetCompressedTexImageARB(int target, int lod, java.nio.ByteBuffer pImg) { - org.lwjgl3.opengl.ARBTextureCompression.glGetCompressedTexImageARB(target, lod, pImg); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureCompressionBPTC.java b/src/main/java/org/lwjgl/opengl/ARBTextureCompressionBPTC.java deleted file mode 100644 index f5911ce85..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureCompressionBPTC.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureCompressionBPTC { - - public static final int GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = (int) 36492; - public static final int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = (int) 36494; - public static final int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = (int) 36495; - public static final int GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = (int) 36493; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureCompressionRGTC.java b/src/main/java/org/lwjgl/opengl/ARBTextureCompressionRGTC.java deleted file mode 100644 index a184d2de5..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureCompressionRGTC.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureCompressionRGTC { - - public static final int GL_COMPRESSED_RED_RGTC1 = (int) 36283; - public static final int GL_COMPRESSED_RG_RGTC2 = (int) 36285; - public static final int GL_COMPRESSED_SIGNED_RED_RGTC1 = (int) 36284; - public static final int GL_COMPRESSED_SIGNED_RG_RGTC2 = (int) 36286; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureCubeMap.java b/src/main/java/org/lwjgl/opengl/ARBTextureCubeMap.java deleted file mode 100644 index 5cced2557..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureCubeMap.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureCubeMap { - - public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = (int) 34076; - public static final int GL_NORMAL_MAP_ARB = (int) 34065; - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARB = (int) 34075; - public static final int GL_REFLECTION_MAP_ARB = (int) 34066; - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARB = (int) 34068; - public static final int GL_TEXTURE_CUBE_MAP_ARB = (int) 34067; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = (int) 34070; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = (int) 34072; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = (int) 34074; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = (int) 34069; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = (int) 34071; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = (int) 34073; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureCubeMapArray.java b/src/main/java/org/lwjgl/opengl/ARBTextureCubeMapArray.java deleted file mode 100644 index e9a3f4a69..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureCubeMapArray.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureCubeMapArray { - - public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = (int) 36878; - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = (int) 36875; - public static final int GL_SAMPLER_CUBE_MAP_ARRAY_ARB = (int) 36876; - public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = (int) 36877; - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = (int) 36874; - public static final int GL_TEXTURE_CUBE_MAP_ARRAY_ARB = (int) 36873; - public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = (int) 36879; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureEnvCombine.java b/src/main/java/org/lwjgl/opengl/ARBTextureEnvCombine.java deleted file mode 100644 index a17aac928..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureEnvCombine.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureEnvCombine { - - public static final int GL_ADD_SIGNED_ARB = (int) 34164; - public static final int GL_COMBINE_ALPHA_ARB = (int) 34162; - public static final int GL_COMBINE_ARB = (int) 34160; - public static final int GL_COMBINE_RGB_ARB = (int) 34161; - public static final int GL_CONSTANT_ARB = (int) 34166; - public static final int GL_INTERPOLATE_ARB = (int) 34165; - public static final int GL_OPERAND0_ALPHA_ARB = (int) 34200; - public static final int GL_OPERAND0_RGB_ARB = (int) 34192; - public static final int GL_OPERAND1_ALPHA_ARB = (int) 34201; - public static final int GL_OPERAND1_RGB_ARB = (int) 34193; - public static final int GL_OPERAND2_ALPHA_ARB = (int) 34202; - public static final int GL_OPERAND2_RGB_ARB = (int) 34194; - public static final int GL_PREVIOUS_ARB = (int) 34168; - public static final int GL_PRIMARY_COLOR_ARB = (int) 34167; - public static final int GL_RGB_SCALE_ARB = (int) 34163; - public static final int GL_SOURCE0_ALPHA_ARB = (int) 34184; - public static final int GL_SOURCE0_RGB_ARB = (int) 34176; - public static final int GL_SOURCE1_ALPHA_ARB = (int) 34185; - public static final int GL_SOURCE1_RGB_ARB = (int) 34177; - public static final int GL_SOURCE2_ALPHA_ARB = (int) 34186; - public static final int GL_SOURCE2_RGB_ARB = (int) 34178; - public static final int GL_SUBTRACT_ARB = (int) 34023; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureEnvDot3.java b/src/main/java/org/lwjgl/opengl/ARBTextureEnvDot3.java deleted file mode 100644 index 336224502..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureEnvDot3.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureEnvDot3 { - - public static final int GL_DOT3_RGBA_ARB = (int) 34479; - public static final int GL_DOT3_RGB_ARB = (int) 34478; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureFloat.java b/src/main/java/org/lwjgl/opengl/ARBTextureFloat.java deleted file mode 100644 index 8cad02ae6..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureFloat.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureFloat { - - public static final int GL_ALPHA16F_ARB = (int) 34844; - public static final int GL_ALPHA32F_ARB = (int) 34838; - public static final int GL_INTENSITY16F_ARB = (int) 34845; - public static final int GL_INTENSITY32F_ARB = (int) 34839; - public static final int GL_LUMINANCE16F_ARB = (int) 34846; - public static final int GL_LUMINANCE32F_ARB = (int) 34840; - public static final int GL_LUMINANCE_ALPHA16F_ARB = (int) 34847; - public static final int GL_LUMINANCE_ALPHA32F_ARB = (int) 34841; - public static final int GL_RGB16F_ARB = (int) 34843; - public static final int GL_RGB32F_ARB = (int) 34837; - public static final int GL_RGBA16F_ARB = (int) 34842; - public static final int GL_RGBA32F_ARB = (int) 34836; - public static final int GL_TEXTURE_ALPHA_TYPE_ARB = (int) 35859; - public static final int GL_TEXTURE_BLUE_TYPE_ARB = (int) 35858; - public static final int GL_TEXTURE_DEPTH_TYPE_ARB = (int) 35862; - public static final int GL_TEXTURE_GREEN_TYPE_ARB = (int) 35857; - public static final int GL_TEXTURE_INTENSITY_TYPE_ARB = (int) 35861; - public static final int GL_TEXTURE_LUMINANCE_TYPE_ARB = (int) 35860; - public static final int GL_TEXTURE_RED_TYPE_ARB = (int) 35856; - public static final int GL_UNSIGNED_NORMALIZED_ARB = (int) 35863; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureGather.java b/src/main/java/org/lwjgl/opengl/ARBTextureGather.java deleted file mode 100644 index 0e1a71a77..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureGather.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureGather { - - public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = (int) 36767; - public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = (int) 36447; - public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = (int) 36446; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java b/src/main/java/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java deleted file mode 100644 index a4253246f..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureMirrorClampToEdge { - - public static final int GL_MIRROR_CLAMP_TO_EDGE = (int) 34627; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureMirroredRepeat.java b/src/main/java/org/lwjgl/opengl/ARBTextureMirroredRepeat.java deleted file mode 100644 index 8b18fca94..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureMirroredRepeat.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureMirroredRepeat { - - public static final int GL_MIRRORED_REPEAT_ARB = (int) 33648; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureMultisample.java b/src/main/java/org/lwjgl/opengl/ARBTextureMultisample.java deleted file mode 100644 index 80d10bc8c..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureMultisample.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureMultisample { - - public static final int GL_INT_SAMPLER_2D_MULTISAMPLE = (int) 37129; - public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37132; - public static final int GL_MAX_COLOR_TEXTURE_SAMPLES = (int) 37134; - public static final int GL_MAX_DEPTH_TEXTURE_SAMPLES = (int) 37135; - public static final int GL_MAX_INTEGER_SAMPLES = (int) 37136; - public static final int GL_MAX_SAMPLE_MASK_WORDS = (int) 36441; - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = (int) 37121; - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = (int) 37123; - public static final int GL_SAMPLER_2D_MULTISAMPLE = (int) 37128; - public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37131; - public static final int GL_SAMPLE_MASK = (int) 36433; - public static final int GL_SAMPLE_MASK_VALUE = (int) 36434; - public static final int GL_SAMPLE_POSITION = (int) 36432; - public static final int GL_TEXTURE_2D_MULTISAMPLE = (int) 37120; - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = (int) 37122; - public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE = (int) 37124; - public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = (int) 37125; - public static final int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = (int) 37127; - public static final int GL_TEXTURE_SAMPLES = (int) 37126; - public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = (int) 37130; - public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37133; - - public static void glSampleMaski(int index, int mask) { - org.lwjgl3.opengl.ARBTextureMultisample.glSampleMaski(index, mask); - } - - public static void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, - boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBTextureMultisample - .glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, - int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBTextureMultisample - .glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java b/src/main/java/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java deleted file mode 100644 index 47926c00e..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureRGB10_A2UI { - - public static final int GL_RGB10_A2UI = (int) 36975; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureRectangle.java b/src/main/java/org/lwjgl/opengl/ARBTextureRectangle.java deleted file mode 100644 index 18555c49e..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureRectangle.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureRectangle { - - public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = (int) 34040; - public static final int GL_PROXY_TEXTURE_RECTANGLE_ARB = (int) 34039; - public static final int GL_SAMPLER_2D_RECT_ARB = (int) 35683; - public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = (int) 35684; - public static final int GL_TEXTURE_BINDING_RECTANGLE_ARB = (int) 34038; - public static final int GL_TEXTURE_RECTANGLE_ARB = (int) 34037; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureStorage.java b/src/main/java/org/lwjgl/opengl/ARBTextureStorage.java deleted file mode 100644 index 970d04490..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureStorage.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureStorage { - - public static final int GL_TEXTURE_IMMUTABLE_FORMAT = (int) 37167; - - public static void glTexStorage1D(int target, int levels, int internalformat, int width) { - org.lwjgl3.opengl.ARBTextureStorage.glTexStorage1D(target, levels, internalformat, width); - } - - public static void glTexStorage2D(int target, int levels, int internalformat, int width, int height) { - org.lwjgl3.opengl.ARBTextureStorage.glTexStorage2D(target, levels, internalformat, width, height); - } - - public static void glTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth) { - org.lwjgl3.opengl.ARBTextureStorage.glTexStorage3D(target, levels, internalformat, width, height, depth); - } - - public static void glTextureStorage1DEXT(int texture, int target, int levels, int internalformat, int width) { - org.lwjgl3.opengl.ARBTextureStorage.glTextureStorage1DEXT(texture, target, levels, internalformat, width); - } - - public static void glTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, - int height) { - org.lwjgl3.opengl.ARBTextureStorage - .glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); - } - - public static void glTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, - int height, int depth) { - org.lwjgl3.opengl.ARBTextureStorage - .glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureStorageMultisample.java b/src/main/java/org/lwjgl/opengl/ARBTextureStorageMultisample.java deleted file mode 100644 index 832fbc0e1..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureStorageMultisample.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureStorageMultisample { - - public static void glTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, - boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBTextureStorageMultisample - .glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, - int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBTextureStorageMultisample - .glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - public static void glTextureStorage2DMultisampleEXT(int texture, int target, int samples, int internalformat, - int width, int height, boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBTextureStorageMultisample.glTextureStorage2DMultisampleEXT( - texture, - target, - samples, - internalformat, - width, - height, - fixedsamplelocations); - } - - public static void glTextureStorage3DMultisampleEXT(int texture, int target, int samples, int internalformat, - int width, int height, int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.ARBTextureStorageMultisample.glTextureStorage3DMultisampleEXT( - texture, - target, - samples, - internalformat, - width, - height, - depth, - fixedsamplelocations); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureSwizzle.java b/src/main/java/org/lwjgl/opengl/ARBTextureSwizzle.java deleted file mode 100644 index fd49a4aa3..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureSwizzle.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureSwizzle { - - public static final int GL_TEXTURE_SWIZZLE_A = (int) 36421; - public static final int GL_TEXTURE_SWIZZLE_B = (int) 36420; - public static final int GL_TEXTURE_SWIZZLE_G = (int) 36419; - public static final int GL_TEXTURE_SWIZZLE_R = (int) 36418; - public static final int GL_TEXTURE_SWIZZLE_RGBA = (int) 36422; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTextureView.java b/src/main/java/org/lwjgl/opengl/ARBTextureView.java deleted file mode 100644 index aeaa5a5a4..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTextureView.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTextureView { - - public static final int GL_TEXTURE_IMMUTABLE_LEVELS = (int) 33503; - public static final int GL_TEXTURE_VIEW_MIN_LAYER = (int) 33501; - public static final int GL_TEXTURE_VIEW_MIN_LEVEL = (int) 33499; - public static final int GL_TEXTURE_VIEW_NUM_LAYERS = (int) 33502; - public static final int GL_TEXTURE_VIEW_NUM_LEVELS = (int) 33500; - - public static void glTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, - int numlevels, int minlayer, int numlayers) { - org.lwjgl3.opengl.ARBTextureView - .glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTimerQuery.java b/src/main/java/org/lwjgl/opengl/ARBTimerQuery.java deleted file mode 100644 index 44839df5d..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTimerQuery.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTimerQuery { - - public static final int GL_TIMESTAMP = (int) 36392; - public static final int GL_TIME_ELAPSED = (int) 35007; - - public static long glGetQueryObjecti64(int id, int pname) { - return org.lwjgl3.opengl.ARBTimerQuery.glGetQueryObjecti64(id, pname); - } - - public static long glGetQueryObjectui64(int id, int pname) { - return org.lwjgl3.opengl.ARBTimerQuery.glGetQueryObjectui64(id, pname); - } - - public static void glQueryCounter(int id, int target) { - org.lwjgl3.opengl.ARBTimerQuery.glQueryCounter(id, target); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTransformFeedback2.java b/src/main/java/org/lwjgl/opengl/ARBTransformFeedback2.java deleted file mode 100644 index c55fee5f8..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTransformFeedback2.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTransformFeedback2 { - - public static final int GL_TRANSFORM_FEEDBACK = (int) 36386; - public static final int GL_TRANSFORM_FEEDBACK_BINDING = (int) 36389; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = (int) 36388; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = (int) 36387; - - public static void glBindTransformFeedback(int target, int id) { - org.lwjgl3.opengl.ARBTransformFeedback2.glBindTransformFeedback(target, id); - } - - public static void glDeleteTransformFeedbacks(int id) { - org.lwjgl3.opengl.ARBTransformFeedback2.glDeleteTransformFeedbacks(id); - } - - public static void glDeleteTransformFeedbacks(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.ARBTransformFeedback2.glDeleteTransformFeedbacks(ids); - } - - public static void glDrawTransformFeedback(int mode, int id) { - org.lwjgl3.opengl.ARBTransformFeedback2.glDrawTransformFeedback(mode, id); - } - - public static int glGenTransformFeedbacks() { - return org.lwjgl3.opengl.ARBTransformFeedback2.glGenTransformFeedbacks(); - } - - public static void glGenTransformFeedbacks(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.ARBTransformFeedback2.glGenTransformFeedbacks(ids); - } - - public static boolean glIsTransformFeedback(int id) { - return org.lwjgl3.opengl.ARBTransformFeedback2.glIsTransformFeedback(id); - } - - public static void glPauseTransformFeedback() { - org.lwjgl3.opengl.ARBTransformFeedback2.glPauseTransformFeedback(); - } - - public static void glResumeTransformFeedback() { - org.lwjgl3.opengl.ARBTransformFeedback2.glResumeTransformFeedback(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTransformFeedback3.java b/src/main/java/org/lwjgl/opengl/ARBTransformFeedback3.java deleted file mode 100644 index f0b5b693d..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTransformFeedback3.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTransformFeedback3 { - - public static final int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = (int) 36464; - public static final int GL_MAX_VERTEX_STREAMS = (int) 36465; - - public static void glBeginQueryIndexed(int target, int index, int id) { - org.lwjgl3.opengl.ARBTransformFeedback3.glBeginQueryIndexed(target, index, id); - } - - public static void glDrawTransformFeedbackStream(int mode, int id, int stream) { - org.lwjgl3.opengl.ARBTransformFeedback3.glDrawTransformFeedbackStream(mode, id, stream); - } - - public static void glEndQueryIndexed(int target, int index) { - org.lwjgl3.opengl.ARBTransformFeedback3.glEndQueryIndexed(target, index); - } - - public static int glGetQueryIndexedi(int target, int index, int pname) { - return org.lwjgl3.opengl.ARBTransformFeedback3.glGetQueryIndexedi(target, index, pname); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java b/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java deleted file mode 100644 index 445220a4a..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTransformFeedbackInstanced { - - public static void glDrawTransformFeedbackInstanced(int mode, int id, int primcount) { - org.lwjgl3.opengl.ARBTransformFeedbackInstanced.glDrawTransformFeedbackInstanced(mode, id, primcount); - } - - public static void glDrawTransformFeedbackStreamInstanced(int mode, int id, int stream, int primcount) { - org.lwjgl3.opengl.ARBTransformFeedbackInstanced - .glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackOverflowQuery.java b/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackOverflowQuery.java deleted file mode 100644 index dcf230475..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackOverflowQuery.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTransformFeedbackOverflowQuery { - - public static final int GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB = (int) 33516; - public static final int GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB = (int) 33517; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBTransposeMatrix.java b/src/main/java/org/lwjgl/opengl/ARBTransposeMatrix.java deleted file mode 100644 index c295be405..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBTransposeMatrix.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBTransposeMatrix { - - public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = (int) 34022; - public static final int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = (int) 34019; - public static final int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = (int) 34020; - public static final int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = (int) 34021; - - public static void glLoadTransposeMatrixARB(java.nio.FloatBuffer pfMtx) { - org.lwjgl3.opengl.ARBTransposeMatrix.glLoadTransposeMatrixfARB(pfMtx); - } - - public static void glMultTransposeMatrixARB(java.nio.FloatBuffer pfMtx) { - org.lwjgl3.opengl.ARBTransposeMatrix.glMultTransposeMatrixfARB(pfMtx); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBUniformBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBUniformBufferObject.java deleted file mode 100644 index 0b75e1f3b..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBUniformBufferObject.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBUniformBufferObject { - - public static final int GL_ACTIVE_UNIFORM_BLOCKS = (int) 35382; - public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = (int) 35381; - public static final int GL_INVALID_INDEX = (int) -1; - public static final int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = (int) 35379; - public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = (int) 35378; - public static final int GL_MAX_COMBINED_UNIFORM_BLOCKS = (int) 35374; - public static final int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = (int) 35377; - public static final int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = (int) 35373; - public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = (int) 35372; - public static final int GL_MAX_UNIFORM_BLOCK_SIZE = (int) 35376; - public static final int GL_MAX_UNIFORM_BUFFER_BINDINGS = (int) 35375; - public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = (int) 35371; - public static final int GL_UNIFORM_ARRAY_STRIDE = (int) 35388; - public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = (int) 35394; - public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = (int) 35395; - public static final int GL_UNIFORM_BLOCK_BINDING = (int) 35391; - public static final int GL_UNIFORM_BLOCK_DATA_SIZE = (int) 35392; - public static final int GL_UNIFORM_BLOCK_INDEX = (int) 35386; - public static final int GL_UNIFORM_BLOCK_NAME_LENGTH = (int) 35393; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = (int) 35398; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = (int) 35397; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = (int) 35396; - public static final int GL_UNIFORM_BUFFER = (int) 35345; - public static final int GL_UNIFORM_BUFFER_BINDING = (int) 35368; - public static final int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = (int) 35380; - public static final int GL_UNIFORM_BUFFER_SIZE = (int) 35370; - public static final int GL_UNIFORM_BUFFER_START = (int) 35369; - public static final int GL_UNIFORM_IS_ROW_MAJOR = (int) 35390; - public static final int GL_UNIFORM_MATRIX_STRIDE = (int) 35389; - public static final int GL_UNIFORM_NAME_LENGTH = (int) 35385; - public static final int GL_UNIFORM_OFFSET = (int) 35387; - public static final int GL_UNIFORM_SIZE = (int) 35384; - public static final int GL_UNIFORM_TYPE = (int) 35383; - - public static void glBindBufferBase(int target, int index, int buffer) { - org.lwjgl3.opengl.ARBUniformBufferObject.glBindBufferBase(target, index, buffer); - } - - public static void glBindBufferRange(int target, int index, int buffer, long offset, long size) { - org.lwjgl3.opengl.ARBUniformBufferObject.glBindBufferRange(target, index, buffer, offset, size); - } - - public static java.lang.String glGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize) { - return org.lwjgl3.opengl.ARBUniformBufferObject.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); - } - - public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, java.nio.IntBuffer length, - java.nio.ByteBuffer uniformBlockName) { - org.lwjgl3.opengl.ARBUniformBufferObject - .glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); - } - - public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname) { - return org.lwjgl3.opengl.ARBUniformBufferObject.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); - } - - public static java.lang.String glGetActiveUniformName(int program, int uniformIndex, int bufSize) { - return org.lwjgl3.opengl.ARBUniformBufferObject.glGetActiveUniformName(program, uniformIndex, bufSize); - } - - public static void glGetActiveUniformName(int program, int uniformIndex, java.nio.IntBuffer length, - java.nio.ByteBuffer uniformName) { - org.lwjgl3.opengl.ARBUniformBufferObject.glGetActiveUniformName(program, uniformIndex, length, uniformName); - } - - public static int glGetActiveUniformsi(int program, int uniformIndex, int pname) { - return org.lwjgl3.opengl.ARBUniformBufferObject.glGetActiveUniformsi(program, uniformIndex, pname); - } - - public static int glGetUniformBlockIndex(int program, java.lang.CharSequence uniformBlockName) { - return org.lwjgl3.opengl.ARBUniformBufferObject.glGetUniformBlockIndex(program, uniformBlockName); - } - - public static int glGetUniformBlockIndex(int program, java.nio.ByteBuffer uniformBlockName) { - return org.lwjgl3.opengl.ARBUniformBufferObject.glGetUniformBlockIndex(program, uniformBlockName); - } - - public static void glGetUniformIndices(int program, java.lang.CharSequence[] uniformNames, - java.nio.IntBuffer uniformIndices) { - org.lwjgl3.opengl.ARBUniformBufferObject.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - public static void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) { - org.lwjgl3.opengl.ARBUniformBufferObject.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexArrayObject.java b/src/main/java/org/lwjgl/opengl/ARBVertexArrayObject.java deleted file mode 100644 index 8a0f8d550..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexArrayObject.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBVertexArrayObject { - - public static final int GL_VERTEX_ARRAY_BINDING = (int) 34229; - - public static void glBindVertexArray(int array) { - org.lwjgl3.opengl.ARBVertexArrayObject.glBindVertexArray(array); - } - - public static void glDeleteVertexArrays(int array) { - org.lwjgl3.opengl.ARBVertexArrayObject.glDeleteVertexArrays(array); - } - - public static void glDeleteVertexArrays(java.nio.IntBuffer arrays) { - org.lwjgl3.opengl.ARBVertexArrayObject.glDeleteVertexArrays(arrays); - } - - public static int glGenVertexArrays() { - return org.lwjgl3.opengl.ARBVertexArrayObject.glGenVertexArrays(); - } - - public static void glGenVertexArrays(java.nio.IntBuffer arrays) { - org.lwjgl3.opengl.ARBVertexArrayObject.glGenVertexArrays(arrays); - } - - public static boolean glIsVertexArray(int array) { - return org.lwjgl3.opengl.ARBVertexArrayObject.glIsVertexArray(array); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexAttribBinding.java b/src/main/java/org/lwjgl/opengl/ARBVertexAttribBinding.java deleted file mode 100644 index ccd19d1fc..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexAttribBinding.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBVertexAttribBinding { - - public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS = (int) 33498; - public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = (int) 33497; - public static final int GL_VERTEX_ATTRIB_BINDING = (int) 33492; - public static final int GL_VERTEX_ATTRIB_RELATIVE_OFFSET = (int) 33493; - public static final int GL_VERTEX_BINDING_DIVISOR = (int) 33494; - public static final int GL_VERTEX_BINDING_OFFSET = (int) 33495; - public static final int GL_VERTEX_BINDING_STRIDE = (int) 33496; - - public static void glBindVertexBuffer(int bindingindex, int buffer, long offset, int stride) { - org.lwjgl3.opengl.ARBVertexAttribBinding.glBindVertexBuffer(bindingindex, buffer, offset, stride); - } - - public static void glVertexAttribBinding(int attribindex, int bindingindex) { - org.lwjgl3.opengl.ARBVertexAttribBinding.glVertexAttribBinding(attribindex, bindingindex); - } - - public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, - int relativeoffset) { - org.lwjgl3.opengl.ARBVertexAttribBinding - .glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); - } - - public static void glVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.ARBVertexAttribBinding.glVertexAttribIFormat(attribindex, size, type, relativeoffset); - } - - public static void glVertexAttribLFormat(int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.ARBVertexAttribBinding.glVertexAttribLFormat(attribindex, size, type, relativeoffset); - } - - public static void glVertexBindingDivisor(int bindingindex, int divisor) { - org.lwjgl3.opengl.ARBVertexAttribBinding.glVertexBindingDivisor(bindingindex, divisor); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexBlend.java b/src/main/java/org/lwjgl/opengl/ARBVertexBlend.java deleted file mode 100644 index 7d50f2c49..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexBlend.java +++ /dev/null @@ -1,130 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class ARBVertexBlend { - - public static final int GL_ACTIVE_VERTEX_UNITS_ARB = (int) 34469; - public static final int GL_CURRENT_WEIGHT_ARB = (int) 34472; - public static final int GL_MAX_VERTEX_UNITS_ARB = (int) 34468; - public static final int GL_MODELVIEW0_ARB = (int) 5888; - public static final int GL_MODELVIEW10_ARB = (int) 34602; - public static final int GL_MODELVIEW11_ARB = (int) 34603; - public static final int GL_MODELVIEW12_ARB = (int) 34604; - public static final int GL_MODELVIEW13_ARB = (int) 34605; - public static final int GL_MODELVIEW14_ARB = (int) 34606; - public static final int GL_MODELVIEW15_ARB = (int) 34607; - public static final int GL_MODELVIEW16_ARB = (int) 34608; - public static final int GL_MODELVIEW17_ARB = (int) 34609; - public static final int GL_MODELVIEW18_ARB = (int) 34610; - public static final int GL_MODELVIEW19_ARB = (int) 34611; - public static final int GL_MODELVIEW1_ARB = (int) 34058; - public static final int GL_MODELVIEW20_ARB = (int) 34612; - public static final int GL_MODELVIEW21_ARB = (int) 34613; - public static final int GL_MODELVIEW22_ARB = (int) 34614; - public static final int GL_MODELVIEW23_ARB = (int) 34615; - public static final int GL_MODELVIEW24_ARB = (int) 34616; - public static final int GL_MODELVIEW25_ARB = (int) 34617; - public static final int GL_MODELVIEW26_ARB = (int) 34618; - public static final int GL_MODELVIEW27_ARB = (int) 34619; - public static final int GL_MODELVIEW28_ARB = (int) 34620; - public static final int GL_MODELVIEW29_ARB = (int) 34621; - public static final int GL_MODELVIEW2_ARB = (int) 34594; - public static final int GL_MODELVIEW30_ARB = (int) 34622; - public static final int GL_MODELVIEW31_ARB = (int) 34623; - public static final int GL_MODELVIEW3_ARB = (int) 34595; - public static final int GL_MODELVIEW4_ARB = (int) 34596; - public static final int GL_MODELVIEW5_ARB = (int) 34597; - public static final int GL_MODELVIEW6_ARB = (int) 34598; - public static final int GL_MODELVIEW7_ARB = (int) 34599; - public static final int GL_MODELVIEW8_ARB = (int) 34600; - public static final int GL_MODELVIEW9_ARB = (int) 34601; - public static final int GL_VERTEX_BLEND_ARB = (int) 34471; - public static final int GL_WEIGHT_ARRAY_ARB = (int) 34477; - public static final int GL_WEIGHT_ARRAY_POINTER_ARB = (int) 34476; - public static final int GL_WEIGHT_ARRAY_SIZE_ARB = (int) 34475; - public static final int GL_WEIGHT_ARRAY_STRIDE_ARB = (int) 34474; - public static final int GL_WEIGHT_ARRAY_TYPE_ARB = (int) 34473; - public static final int GL_WEIGHT_SUM_UNITY_ARB = (int) 34470; - - public static void glVertexBlendARB(int count) { - org.lwjgl3.opengl.ARBVertexBlend.glVertexBlendARB(count); - } - - public static void glWeightARB(java.nio.ByteBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightbvARB(pWeights); - } - - public static void glWeightARB(java.nio.DoubleBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightdvARB(pWeights); - } - - public static void glWeightARB(java.nio.FloatBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightfvARB(pWeights); - } - - public static void glWeightARB(java.nio.IntBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightivARB(pWeights); - } - - public static void glWeightARB(java.nio.ShortBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightsvARB(pWeights); - } - - public static void glWeightPointerARB(int size, int type, int stride, long pPointer_buffer_offset) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightPointerARB(size, type, stride, pPointer_buffer_offset); - } - - public static void glWeightPointerARB(int size, int stride, java.nio.DoubleBuffer pPointer) { - - org.lwjgl3.opengl.ARBVertexBlend.glWeightPointerARB( - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pPointer)); - } - - public static void glWeightPointerARB(int size, int stride, java.nio.FloatBuffer pPointer) { - - org.lwjgl3.opengl.ARBVertexBlend.glWeightPointerARB(size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pPointer); - } - - public static void glWeightPointerARB(int size, boolean unsigned, int stride, java.nio.ByteBuffer pPointer) { - - org.lwjgl3.opengl.ARBVertexBlend.glWeightPointerARB( - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl3.opengl.GL11.GL_BYTE), - stride, - org.lwjgl.MemoryUtil.getAddress(pPointer)); - } - - public static void glWeightPointerARB(int size, boolean unsigned, int stride, java.nio.IntBuffer pPointer) { - - org.lwjgl3.opengl.ARBVertexBlend.glWeightPointerARB( - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_INT : org.lwjgl3.opengl.GL11.GL_INT), - stride, - org.lwjgl.MemoryUtil.getAddress(pPointer)); - } - - public static void glWeightPointerARB(int size, boolean unsigned, int stride, java.nio.ShortBuffer pPointer) { - - org.lwjgl3.opengl.ARBVertexBlend.glWeightPointerARB( - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_SHORT : org.lwjgl3.opengl.GL11.GL_SHORT), - stride, - org.lwjgl.MemoryUtil.getAddress(pPointer)); - } - - public static void glWeightuARB(java.nio.ByteBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightubvARB(pWeights); - } - - public static void glWeightuARB(java.nio.IntBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightuivARB(pWeights); - } - - public static void glWeightuARB(java.nio.ShortBuffer pWeights) { - org.lwjgl3.opengl.ARBVertexBlend.glWeightusvARB(pWeights); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexBufferObject.java b/src/main/java/org/lwjgl/opengl/ARBVertexBufferObject.java deleted file mode 100644 index a1dfeaf78..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexBufferObject.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBVertexBufferObject extends org.lwjgl.opengl.ARBBufferObject { - - public static final int GL_ARRAY_BUFFER_ARB = (int) 34962; - public static final int GL_ARRAY_BUFFER_BINDING_ARB = (int) 34964; - public static final int GL_COLOR_ARRAY_BUFFER_BINDING_ARB = (int) 34968; - public static final int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = (int) 34971; - public static final int GL_ELEMENT_ARRAY_BUFFER_ARB = (int) 34963; - public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = (int) 34965; - public static final int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = (int) 34973; - public static final int GL_INDEX_ARRAY_BUFFER_BINDING_ARB = (int) 34969; - public static final int GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = (int) 34967; - public static final int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = (int) 34972; - public static final int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = (int) 34970; - public static final int GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = (int) 34966; - public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = (int) 34975; - public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = (int) 34974; -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexProgram.java b/src/main/java/org/lwjgl/opengl/ARBVertexProgram.java deleted file mode 100644 index e9afd4e48..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexProgram.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBVertexProgram extends org.lwjgl.opengl.ARBProgram { - - public static final int GL_COLOR_SUM_ARB = (int) 33880; - public static final int GL_CURRENT_VERTEX_ATTRIB_ARB = (int) 34342; - public static final int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = (int) 34993; - public static final int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = (int) 34995; - public static final int GL_MAX_VERTEX_ATTRIBS_ARB = (int) 34921; - public static final int GL_PROGRAM_ADDRESS_REGISTERS_ARB = (int) 34992; - public static final int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = (int) 34994; - public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = (int) 34338; - public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = (int) 34922; - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = (int) 34373; - public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = (int) 34339; - public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = (int) 34340; - public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = (int) 34341; - public static final int GL_VERTEX_PROGRAM_ARB = (int) 34336; - public static final int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = (int) 34370; - public static final int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = (int) 34371; - - public static void glDisableVertexAttribArrayARB(int index) { - org.lwjgl3.opengl.ARBVertexProgram.glDisableVertexAttribArrayARB(index); - } - - public static void glEnableVertexAttribArrayARB(int index) { - org.lwjgl3.opengl.ARBVertexProgram.glEnableVertexAttribArrayARB(index); - } - - public static void glVertexAttrib1dARB(int index, double x) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib1dARB(index, x); - } - - public static void glVertexAttrib1fARB(int index, float x) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib1fARB(index, x); - } - - public static void glVertexAttrib1sARB(int index, short x) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib1sARB(index, x); - } - - public static void glVertexAttrib2dARB(int index, double x, double y) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib2dARB(index, x, y); - } - - public static void glVertexAttrib2fARB(int index, float x, float y) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib2fARB(index, x, y); - } - - public static void glVertexAttrib2sARB(int index, short x, short y) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib2sARB(index, x, y); - } - - public static void glVertexAttrib3dARB(int index, double x, double y, double z) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib3dARB(index, x, y, z); - } - - public static void glVertexAttrib3fARB(int index, float x, float y, float z) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib3fARB(index, x, y, z); - } - - public static void glVertexAttrib3sARB(int index, short x, short y, short z) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib3sARB(index, x, y, z); - } - - public static void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib4NubARB(index, x, y, z, w); - } - - public static void glVertexAttrib4dARB(int index, double x, double y, double z, double w) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib4dARB(index, x, y, z, w); - } - - public static void glVertexAttrib4fARB(int index, float x, float y, float z, float w) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib4fARB(index, x, y, z, w); - } - - public static void glVertexAttrib4sARB(int index, short x, short y, short z, short w) { - org.lwjgl3.opengl.ARBVertexProgram.glVertexAttrib4sARB(index, x, y, z, w); - } - - public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, - long buffer_buffer_offset) { - org.lwjgl3.opengl.ARBVertexProgram - .glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_buffer_offset); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexShader.java b/src/main/java/org/lwjgl/opengl/ARBVertexShader.java deleted file mode 100644 index 3fe1def19..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexShader.java +++ /dev/null @@ -1,191 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class ARBVertexShader { - - public static final int GL_CURRENT_VERTEX_ATTRIB_ARB = (int) 34342; - public static final int GL_FLOAT_MAT2_ARB = (int) 35674; - public static final int GL_FLOAT_MAT3_ARB = (int) 35675; - public static final int GL_FLOAT_MAT4_ARB = (int) 35676; - public static final int GL_FLOAT_VEC2_ARB = (int) 35664; - public static final int GL_FLOAT_VEC3_ARB = (int) 35665; - public static final int GL_FLOAT_VEC4_ARB = (int) 35666; - public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = (int) 35661; - public static final int GL_MAX_TEXTURE_COORDS_ARB = (int) 34929; - public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = (int) 34930; - public static final int GL_MAX_VARYING_FLOATS_ARB = (int) 35659; - public static final int GL_MAX_VERTEX_ATTRIBS_ARB = (int) 34921; - public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = (int) 35660; - public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = (int) 35658; - public static final int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = (int) 35721; - public static final int GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = (int) 35722; - public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = (int) 34338; - public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = (int) 34922; - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = (int) 34373; - public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = (int) 34339; - public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = (int) 34340; - public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = (int) 34341; - public static final int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = (int) 34370; - public static final int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = (int) 34371; - public static final int GL_VERTEX_SHADER_ARB = (int) 35633; - - public static void glBindAttribLocationARB(int programObj, int index, java.lang.CharSequence name) { - org.lwjgl3.opengl.ARBVertexShader.glBindAttribLocationARB(programObj, index, name); - } - - public static void glBindAttribLocationARB(int programObj, int index, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBVertexShader.glBindAttribLocationARB(programObj, index, name); - } - - public static void glDisableVertexAttribArrayARB(int index) { - org.lwjgl3.opengl.ARBVertexShader.glDisableVertexAttribArrayARB(index); - } - - public static void glEnableVertexAttribArrayARB(int index) { - org.lwjgl3.opengl.ARBVertexShader.glEnableVertexAttribArrayARB(index); - } - - public static void glGetActiveAttribARB(int programObj, int index, java.nio.IntBuffer length, - java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.ARBVertexShader.glGetActiveAttribARB(programObj, index, length, size, type, name); - } - - public static int glGetAttribLocationARB(int programObj, java.lang.CharSequence name) { - return org.lwjgl3.opengl.ARBVertexShader.glGetAttribLocationARB(programObj, name); - } - - public static int glGetAttribLocationARB(int programObj, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.ARBVertexShader.glGetAttribLocationARB(programObj, name); - } - - public static void glGetVertexAttribARB(int index, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.ARBVertexShader.glGetVertexAttribdvARB(index, pname, params); - } - - public static void glGetVertexAttribARB(int index, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.ARBVertexShader.glGetVertexAttribfvARB(index, pname, params); - } - - public static void glGetVertexAttribARB(int index, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.ARBVertexShader.glGetVertexAttribivARB(index, pname, params); - } - - public static void glVertexAttrib1dARB(int index, double v0) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib1dARB(index, v0); - } - - public static void glVertexAttrib1fARB(int index, float v0) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib1fARB(index, v0); - } - - public static void glVertexAttrib1sARB(int index, short v0) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib1sARB(index, v0); - } - - public static void glVertexAttrib2dARB(int index, double v0, double v1) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib2dARB(index, v0, v1); - } - - public static void glVertexAttrib2fARB(int index, float v0, float v1) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib2fARB(index, v0, v1); - } - - public static void glVertexAttrib2sARB(int index, short v0, short v1) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib2sARB(index, v0, v1); - } - - public static void glVertexAttrib3dARB(int index, double v0, double v1, double v2) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib3dARB(index, v0, v1, v2); - } - - public static void glVertexAttrib3fARB(int index, float v0, float v1, float v2) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib3fARB(index, v0, v1, v2); - } - - public static void glVertexAttrib3sARB(int index, short v0, short v1, short v2) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib3sARB(index, v0, v1, v2); - } - - public static void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib4NubARB(index, x, y, z, w); - } - - public static void glVertexAttrib4dARB(int index, double v0, double v1, double v2, double v3) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib4dARB(index, v0, v1, v2, v3); - } - - public static void glVertexAttrib4fARB(int index, float v0, float v1, float v2, float v3) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib4fARB(index, v0, v1, v2, v3); - } - - public static void glVertexAttrib4sARB(int index, short v0, short v1, short v2, short v3) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttrib4sARB(index, v0, v1, v2, v3); - } - - public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, - long buffer_buffer_offset) { - org.lwjgl3.opengl.ARBVertexShader - .glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_buffer_offset); - } - - public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, - java.nio.ByteBuffer buffer) { - org.lwjgl3.opengl.ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, buffer); - } - - public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, - java.nio.DoubleBuffer buffer) { - - org.lwjgl3.opengl.ARBVertexShader.glVertexAttribPointerARB( - index, - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - normalized, - stride, - BufferCasts.toByteBuffer(buffer)); - } - - public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, - java.nio.FloatBuffer buffer) { - - org.lwjgl3.opengl.ARBVertexShader - .glVertexAttribPointerARB(index, size, org.lwjgl3.opengl.GL11.GL_FLOAT, normalized, stride, buffer); - } - - public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, - java.nio.ByteBuffer buffer) { - - org.lwjgl3.opengl.ARBVertexShader.glVertexAttribPointerARB( - index, - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl3.opengl.GL11.GL_BYTE), - normalized, - stride, - org.lwjgl.MemoryUtil.getAddress(buffer)); - } - - public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, - java.nio.IntBuffer buffer) { - - org.lwjgl3.opengl.ARBVertexShader.glVertexAttribPointerARB( - index, - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_INT : org.lwjgl3.opengl.GL11.GL_INT), - normalized, - stride, - org.lwjgl.MemoryUtil.getAddress(buffer)); - } - - public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, - java.nio.ShortBuffer buffer) { - - org.lwjgl3.opengl.ARBVertexShader.glVertexAttribPointerARB( - index, - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_SHORT : org.lwjgl3.opengl.GL11.GL_SHORT), - normalized, - stride, - org.lwjgl.MemoryUtil.getAddress(buffer)); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java b/src/main/java/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java deleted file mode 100644 index dd89a53d1..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBVertexType2_10_10_10_REV { - - public static final int GL_INT_2_10_10_10_REV = (int) 36255; - public static final int GL_UNSIGNED_INT_2_10_10_10_REV = (int) 33640; - - public static void glColorP3ui(int type, int color) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glColorP3ui(type, color); - } - - public static void glColorP4ui(int type, int color) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glColorP4ui(type, color); - } - - public static void glMultiTexCoordP1ui(int texture, int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glMultiTexCoordP1ui(texture, type, coords); - } - - public static void glMultiTexCoordP2ui(int texture, int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glMultiTexCoordP2ui(texture, type, coords); - } - - public static void glMultiTexCoordP3ui(int texture, int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glMultiTexCoordP3ui(texture, type, coords); - } - - public static void glMultiTexCoordP4ui(int texture, int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glMultiTexCoordP4ui(texture, type, coords); - } - - public static void glNormalP3ui(int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glNormalP3ui(type, coords); - } - - public static void glSecondaryColorP3ui(int type, int color) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glSecondaryColorP3ui(type, color); - } - - public static void glTexCoordP1ui(int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glTexCoordP1ui(type, coords); - } - - public static void glTexCoordP2ui(int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glTexCoordP2ui(type, coords); - } - - public static void glTexCoordP3ui(int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glTexCoordP3ui(type, coords); - } - - public static void glTexCoordP4ui(int type, int coords) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glTexCoordP4ui(type, coords); - } - - public static void glVertexAttribP1ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexAttribP1ui(index, type, normalized, value); - } - - public static void glVertexAttribP2ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexAttribP2ui(index, type, normalized, value); - } - - public static void glVertexAttribP3ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexAttribP3ui(index, type, normalized, value); - } - - public static void glVertexAttribP4ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexAttribP4ui(index, type, normalized, value); - } - - public static void glVertexP2ui(int type, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexP2ui(type, value); - } - - public static void glVertexP3ui(int type, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexP3ui(type, value); - } - - public static void glVertexP4ui(int type, int value) { - org.lwjgl3.opengl.ARBVertexType2_10_10_10_REV.glVertexP4ui(type, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBViewportArray.java b/src/main/java/org/lwjgl/opengl/ARBViewportArray.java deleted file mode 100644 index 523bf0f48..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBViewportArray.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBViewportArray { - - public static final int GL_FIRST_VERTEX_CONVENTION = (int) 36429; - public static final int GL_LAST_VERTEX_CONVENTION = (int) 36430; - public static final int GL_LAYER_PROVOKING_VERTEX = (int) 33374; - public static final int GL_MAX_VIEWPORTS = (int) 33371; - public static final int GL_PROVOKING_VERTEX = (int) 36431; - public static final int GL_UNDEFINED_VERTEX = (int) 33376; - public static final int GL_VIEWPORT_BOUNDS_RANGE = (int) 33373; - public static final int GL_VIEWPORT_INDEX_PROVOKING_VERTEX = (int) 33375; - public static final int GL_VIEWPORT_SUBPIXEL_BITS = (int) 33372; - - public static void glDepthRangeIndexed(int index, double n, double f) { - org.lwjgl3.opengl.ARBViewportArray.glDepthRangeIndexed(index, n, f); - } - - public static void glScissorIndexed(int index, int left, int bottom, int width, int height) { - org.lwjgl3.opengl.ARBViewportArray.glScissorIndexed(index, left, bottom, width, height); - } - - public static void glViewportIndexedf(int index, float x, float y, float w, float h) { - org.lwjgl3.opengl.ARBViewportArray.glViewportIndexedf(index, x, y, w, h); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ARBWindowPos.java b/src/main/java/org/lwjgl/opengl/ARBWindowPos.java deleted file mode 100644 index 4bc189789..000000000 --- a/src/main/java/org/lwjgl/opengl/ARBWindowPos.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBWindowPos { - - public static void glWindowPos2dARB(double x, double y) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos2dARB(x, y); - } - - public static void glWindowPos2fARB(float x, float y) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos2fARB(x, y); - } - - public static void glWindowPos2iARB(int x, int y) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos2iARB(x, y); - } - - public static void glWindowPos2sARB(short x, short y) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos2sARB(x, y); - } - - public static void glWindowPos3dARB(double x, double y, double z) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos3dARB(x, y, z); - } - - public static void glWindowPos3fARB(float x, float y, float z) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos3fARB(x, y, z); - } - - public static void glWindowPos3iARB(int x, int y, int z) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos3iARB(x, y, z); - } - - public static void glWindowPos3sARB(short x, short y, short z) { - org.lwjgl3.opengl.ARBWindowPos.glWindowPos3sARB(x, y, z); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ATIMeminfo.java b/src/main/java/org/lwjgl/opengl/ATIMeminfo.java deleted file mode 100644 index cd532b2fe..000000000 --- a/src/main/java/org/lwjgl/opengl/ATIMeminfo.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class ATIMeminfo { - - public static final int GL_RENDERBUFFER_FREE_MEMORY_ATI = (int) 34813; - public static final int GL_TEXTURE_FREE_MEMORY_ATI = (int) 34812; - public static final int GL_VBO_FREE_MEMORY_ATI = (int) 34811; -} diff --git a/src/main/java/org/lwjgl/opengl/ATITextureCompression3DC.java b/src/main/java/org/lwjgl/opengl/ATITextureCompression3DC.java deleted file mode 100644 index c312e9f84..000000000 --- a/src/main/java/org/lwjgl/opengl/ATITextureCompression3DC.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class ATITextureCompression3DC { - - public static final int GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI = (int) 34871; -} diff --git a/src/main/java/org/lwjgl/opengl/AWTGLCanvas.java b/src/main/java/org/lwjgl/opengl/AWTGLCanvas.java deleted file mode 100644 index b5bb0f7a5..000000000 --- a/src/main/java/org/lwjgl/opengl/AWTGLCanvas.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import java.awt.*; -import java.awt.event.ComponentEvent; -import java.awt.event.ComponentListener; -import java.awt.event.HierarchyEvent; -import java.awt.event.HierarchyListener; - -import org.lwjgl.LWJGLException; -import org.lwjgl.PointerBuffer; - -public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener, HierarchyListener { - - private static final long serialVersionUID = 1L; - - public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { - throw new UnsupportedOperationException(); - } - - public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { - throw new UnsupportedOperationException(); - } - - public PixelFormatLWJGL getPixelFormat() { - return null; - } - - public ContextGL getContext() { - return null; - } - - public ContextGL createSharedContext() throws LWJGLException { - return null; - } - - public void checkGLError() {} - - public void initContext(final float r, final float g, final float b) {} - - public AWTGLCanvas() throws LWJGLException {} - - public AWTGLCanvas(PixelFormat pixel_format) throws LWJGLException {} - - public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException {} - - public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable) throws LWJGLException {} - - public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable, ContextAttribs attribs) - throws LWJGLException {} - - public void addNotify() {} - - public void removeNotify() {} - - public void setSwapInterval(int swap_interval) {} - - public void setVSyncEnabled(boolean enabled) {} - - public void swapBuffers() throws LWJGLException {} - - public boolean isCurrent() throws LWJGLException { - return false; - } - - public void makeCurrent() throws LWJGLException {} - - public void releaseContext() throws LWJGLException {} - - public final void destroy() {} - - public final void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException {} - - protected void initGL() {} - - protected void paintGL() {} - - public final void paint(Graphics g) {} - - protected void exceptionOccurred(LWJGLException exception) {} - - public void update(Graphics g) {} - - public void componentShown(ComponentEvent e) {} - - public void componentHidden(ComponentEvent e) {} - - public void componentResized(ComponentEvent e) {} - - public void componentMoved(ComponentEvent e) {} - - public void setLocation(int x, int y) {} - - public void setLocation(Point p) {} - - public void setSize(Dimension d) {} - - public void setSize(int width, int height) {} - - public void setBounds(int x, int y, int width, int height) {} - - public void hierarchyChanged(HierarchyEvent e) {} -} diff --git a/src/main/java/org/lwjgl/opengl/CallbackUtil.java b/src/main/java/org/lwjgl/opengl/CallbackUtil.java deleted file mode 100644 index 17a44af6c..000000000 --- a/src/main/java/org/lwjgl/opengl/CallbackUtil.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2002-2010 LWJGL Project - * 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. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 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 OWNER 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.lwjgl.opengl; - -import java.util.HashMap; -import java.util.Map; - -/** - * Utility class that handles OpenGL API callbacks. - * - * @author Spasi - */ -final class CallbackUtil { - - /** Context -> Long */ - private static final Map contextUserParamsARB = new HashMap(); - /** Context -> Long */ - private static final Map contextUserParamsAMD = new HashMap(); - /** Context -> Long */ - private static final Map contextUserParamsKHR = new HashMap(); - - private CallbackUtil() {} - - /** - * Creates a new global reference to the specified Object. - * - * @param obj the Object - * - * @return the GlobalRef memory address or 0 if the Object is null. - */ - static long createGlobalRef(final Object obj) { - return obj == null ? 0 : ncreateGlobalRef(obj); - } - - /** - * Creates a new global reference to the specified Object. - * - * @param obj the Object - * - * @return the GlobalRef memory address. - */ - private static long ncreateGlobalRef(Object obj) { - return 0; - } - - /** - * Deletes a global reference. - * - * @param ref the GlobalRef memory address. - */ - private static void deleteGlobalRef(long ref) { - } - - // --------- [ XXX_debug_output ] --------- - - /** - * Associates the current OpenGL context with the specified global reference. If there - * is no context current, the global reference is deleted and an exception is thrown. - * Any previous callback registrations will be cleared. - * - * @param userParam the global reference pointer - */ - private static void registerContextCallback(final long userParam, final Map contextUserData) { - ContextCapabilities caps = GLContext.getCapabilities(); - if ( caps == null ) { - deleteGlobalRef(userParam); - throw new IllegalStateException("No context is current."); - } - - final Long userParam_old = contextUserData.remove(caps); - if ( userParam_old != null ) - deleteGlobalRef(userParam_old); - - if ( userParam != 0 ) - contextUserData.put(caps, userParam); - } - - /** - * Releases references to any callbacks associated with the specified GL context. - * - * @param context the Context to unregister - */ - static void unregisterCallbacks(final Object context) { - // TODO: This is never called for custom contexts. Need to fix for LWJGL 3.0 - final ContextCapabilities caps = GLContext.getCapabilities(); - - Long userParam = contextUserParamsARB.remove(caps); - if ( userParam != null ) - deleteGlobalRef(userParam); - - userParam = contextUserParamsAMD.remove(caps); - if ( userParam != null ) - deleteGlobalRef(userParam); - - userParam = contextUserParamsKHR.remove(caps); - if ( userParam != null ) - deleteGlobalRef(userParam); - } - - // --------- [ ARB_debug_output ] --------- - - /** - * Returns the memory address of the native function we pass to glDebugMessageCallbackARB. - * - * @return the callback function address - */ - static long getDebugOutputCallbackARB() { - return 0; - } - - /** - * Associates the current OpenGL context with the specified global reference. If there - * is no context current, the global reference is deleted and an exception is thrown. - * Any previous callback registrations will be cleared. - * - * @param userParam the global reference pointer - */ - static void registerContextCallbackARB(final long userParam) { - registerContextCallback(userParam, contextUserParamsARB); - } - - // --------- [ AMD_debug_output ] --------- - - /** - * Returns the memory address of the native function we pass to glDebugMessageCallbackAMD. - * - * @return the callback function address - */ - static long getDebugOutputCallbackAMD() { - return 0; - } - - /** - * Associates the current OpenGL context with the specified global reference. If there - * is no context current, the global reference is deleted and an exception is thrown. - * Any previous callback registrations will be cleared. - * - * @param userParam the global reference pointer - */ - static void registerContextCallbackAMD(final long userParam) { - registerContextCallback(userParam, contextUserParamsAMD); - } - - // --------- [ KHR_debug ] --------- - - /** - * Returns the memory address of the native function we pass to glDebugMessageCallback. - * - * @return the callback function address - */ - static long getDebugCallbackKHR() { - return 0; - } - - /** - * Associates the current OpenGL context with the specified global reference. If there - * is no context current, the global reference is deleted and an exception is thrown. - * Any previous callback registrations will be cleared. - * - * @param userParam the global reference pointer - */ - static void registerContextCallbackKHR(final long userParam) { - registerContextCallback(userParam, contextUserParamsKHR); - } - -} \ No newline at end of file diff --git a/src/main/java/org/lwjgl/opengl/Context.java b/src/main/java/org/lwjgl/opengl/Context.java deleted file mode 100644 index cff4a206c..000000000 --- a/src/main/java/org/lwjgl/opengl/Context.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2002-2011 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.LWJGLException; - -/** - * @author Spasi - * @since 14/5/2011 - */ -interface Context { - - boolean isCurrent() throws LWJGLException; - - void makeCurrent() throws LWJGLException; - - void releaseCurrent() throws LWJGLException; - - void releaseDrawable() throws LWJGLException; -} diff --git a/src/main/java/org/lwjgl/opengl/ContextAttribs.java b/src/main/java/org/lwjgl/opengl/ContextAttribs.java deleted file mode 100644 index 8772fce3e..000000000 --- a/src/main/java/org/lwjgl/opengl/ContextAttribs.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -public final class ContextAttribs { - - public ContextAttribs() {} - - public ContextAttribs(final int majorVersion, final int minorVersion) {} - - public int getMajorVersion() { - return 0; - } - - public int getMinorVersion() { - return 0; - } - - public int getLayerPlane() { - return 0; - } - - public boolean isDebug() { - return false; - } - - public boolean isForwardCompatible() { - return false; - } - - public boolean isProfileCore() { - return false; - } - - public boolean isProfileCompatibility() { - return false; - } - - public boolean isProfileES() { - return false; - } - - public ContextAttribs withLayer(final int layerPlane) { - return null; - } - - public ContextAttribs withDebug(final boolean debug) { - return null; - } - - public ContextAttribs withForwardCompatible(final boolean forwardCompatible) { - return null; - } - - public ContextAttribs withProfileCore(final boolean profileCore) { - return null; - } - - public ContextAttribs withProfileCompatibility(final boolean profileCompatibility) { - return null; - } - - public ContextAttribs withProfileES(final boolean profileES) { - return null; - } - - public ContextAttribs withLoseContextOnReset(final boolean loseContextOnReset) { - return null; - } - - public ContextAttribs withContextResetIsolation(final boolean contextResetIsolation) { - return null; - } - - public String toString() { - return null; - } -} diff --git a/src/main/java/org/lwjgl/opengl/ContextCapabilities.java b/src/main/java/org/lwjgl/opengl/ContextCapabilities.java deleted file mode 100644 index e17189621..000000000 --- a/src/main/java/org/lwjgl/opengl/ContextCapabilities.java +++ /dev/null @@ -1,401 +0,0 @@ -package org.lwjgl.opengl; - -import java.lang.reflect.Field; - -public class ContextCapabilities { - - org.lwjgl3.opengl.GLCapabilities cap = org.lwjgl3.opengl.GL.getCapabilities(); - - public ContextCapabilities() { - - Field[] fields = org.lwjgl3.opengl.GLCapabilities.class.getFields(); - - try { - for (Field field : fields) { - - String name = field.getName(); - - if (name.startsWith("GL_") || name.startsWith("OpenGL")) { - - boolean value = field.getBoolean(cap); - - try { - Field f = this.getClass().getField(name); - f.setBoolean(this, value); - } catch (Exception e) {} - } - } - } catch (Exception e) { - System.out.println(e); - } - } - - public boolean GL_AMD_blend_minmax_factor; - public boolean GL_AMD_conservative_depth; - public boolean GL_AMD_debug_output; - public boolean GL_AMD_depth_clamp_separate; - public boolean GL_AMD_draw_buffers_blend; - public boolean GL_AMD_interleaved_elements; - public boolean GL_AMD_multi_draw_indirect; - public boolean GL_AMD_name_gen_delete; - public boolean GL_AMD_performance_monitor; - public boolean GL_AMD_pinned_memory; - public boolean GL_AMD_query_buffer_object; - public boolean GL_AMD_sample_positions; - public boolean GL_AMD_seamless_cubemap_per_texture; - public boolean GL_AMD_shader_atomic_counter_ops; - public boolean GL_AMD_shader_stencil_export; - public boolean GL_AMD_shader_trinary_minmax; - public boolean GL_AMD_sparse_texture; - public boolean GL_AMD_stencil_operation_extended; - public boolean GL_AMD_texture_texture4; - public boolean GL_AMD_transform_feedback3_lines_triangles; - public boolean GL_AMD_vertex_shader_layer; - public boolean GL_AMD_vertex_shader_tessellator; - public boolean GL_AMD_vertex_shader_viewport_index; - public boolean GL_APPLE_aux_depth_stencil; - public boolean GL_APPLE_client_storage; - public boolean GL_APPLE_element_array; - public boolean GL_APPLE_fence; - public boolean GL_APPLE_float_pixels; - public boolean GL_APPLE_flush_buffer_range; - public boolean GL_APPLE_object_purgeable; - public boolean GL_APPLE_packed_pixels; - public boolean GL_APPLE_rgb_422; - public boolean GL_APPLE_row_bytes; - public boolean GL_APPLE_texture_range; - public boolean GL_APPLE_vertex_array_object; - public boolean GL_APPLE_vertex_array_range; - public boolean GL_APPLE_vertex_program_evaluators; - public boolean GL_APPLE_ycbcr_422; - public boolean GL_ARB_ES2_compatibility; - public boolean GL_ARB_ES3_compatibility; - public boolean GL_ARB_arrays_of_arrays; - public boolean GL_ARB_base_instance; - public boolean GL_ARB_bindless_texture; - public boolean GL_ARB_blend_func_extended; - public boolean GL_ARB_buffer_storage; - public boolean GL_ARB_cl_event; - public boolean GL_ARB_clear_buffer_object; - public boolean GL_ARB_clear_texture; - public boolean GL_ARB_color_buffer_float; - public boolean GL_ARB_compatibility; - public boolean GL_ARB_compressed_texture_pixel_storage; - public boolean GL_ARB_compute_shader; - public boolean GL_ARB_compute_variable_group_size; - public boolean GL_ARB_conservative_depth; - public boolean GL_ARB_copy_buffer; - public boolean GL_ARB_copy_image; - public boolean GL_ARB_debug_output; - public boolean GL_ARB_depth_buffer_float; - public boolean GL_ARB_depth_clamp; - public boolean GL_ARB_depth_texture; - public boolean GL_ARB_draw_buffers; - public boolean GL_ARB_draw_buffers_blend; - public boolean GL_ARB_draw_elements_base_vertex; - public boolean GL_ARB_draw_indirect; - public boolean GL_ARB_draw_instanced; - public boolean GL_ARB_enhanced_layouts; - public boolean GL_ARB_explicit_attrib_location; - public boolean GL_ARB_explicit_uniform_location; - public boolean GL_ARB_fragment_coord_conventions; - public boolean GL_ARB_fragment_layer_viewport; - public boolean GL_ARB_fragment_program; - public boolean GL_ARB_fragment_program_shadow; - public boolean GL_ARB_fragment_shader; - public boolean GL_ARB_framebuffer_no_attachments; - public boolean GL_ARB_framebuffer_object; - public boolean GL_ARB_framebuffer_sRGB; - public boolean GL_ARB_geometry_shader4; - public boolean GL_ARB_get_program_binary; - public boolean GL_ARB_gpu_shader5; - public boolean GL_ARB_gpu_shader_fp64; - public boolean GL_ARB_half_float_pixel; - public boolean GL_ARB_half_float_vertex; - public boolean GL_ARB_imaging; - public boolean GL_ARB_indirect_parameters; - public boolean GL_ARB_instanced_arrays; - public boolean GL_ARB_internalformat_query; - public boolean GL_ARB_internalformat_query2; - public boolean GL_ARB_invalidate_subdata; - public boolean GL_ARB_map_buffer_alignment; - public boolean GL_ARB_map_buffer_range; - public boolean GL_ARB_matrix_palette; - public boolean GL_ARB_multi_bind; - public boolean GL_ARB_multi_draw_indirect; - public boolean GL_ARB_multisample; - public boolean GL_ARB_multitexture; - public boolean GL_ARB_occlusion_query; - public boolean GL_ARB_occlusion_query2; - public boolean GL_ARB_pixel_buffer_object; - public boolean GL_ARB_point_parameters; - public boolean GL_ARB_point_sprite; - public boolean GL_ARB_program_interface_query; - public boolean GL_ARB_provoking_vertex; - public boolean GL_ARB_query_buffer_object; - public boolean GL_ARB_robust_buffer_access_behavior; - public boolean GL_ARB_robustness; - public boolean GL_ARB_robustness_isolation; - public boolean GL_ARB_sample_shading; - public boolean GL_ARB_sampler_objects; - public boolean GL_ARB_seamless_cube_map; - public boolean GL_ARB_seamless_cubemap_per_texture; - public boolean GL_ARB_separate_shader_objects; - public boolean GL_ARB_shader_atomic_counters; - public boolean GL_ARB_shader_bit_encoding; - public boolean GL_ARB_shader_draw_parameters; - public boolean GL_ARB_shader_group_vote; - public boolean GL_ARB_shader_image_load_store; - public boolean GL_ARB_shader_image_size; - public boolean GL_ARB_shader_objects; - public boolean GL_ARB_shader_precision; - public boolean GL_ARB_shader_stencil_export; - public boolean GL_ARB_shader_storage_buffer_object; - public boolean GL_ARB_shader_subroutine; - public boolean GL_ARB_shader_texture_lod; - public boolean GL_ARB_shading_language_100; - public boolean GL_ARB_shading_language_420pack; - public boolean GL_ARB_shading_language_include; - public boolean GL_ARB_shading_language_packing; - public boolean GL_ARB_shadow; - public boolean GL_ARB_shadow_ambient; - public boolean GL_ARB_sparse_texture; - public boolean GL_ARB_stencil_texturing; - public boolean GL_ARB_sync; - public boolean GL_ARB_tessellation_shader; - public boolean GL_ARB_texture_border_clamp; - public boolean GL_ARB_texture_buffer_object; - public boolean GL_ARB_texture_buffer_object_rgb32; - public boolean GL_ARB_texture_buffer_range; - public boolean GL_ARB_texture_compression; - public boolean GL_ARB_texture_compression_bptc; - public boolean GL_ARB_texture_compression_rgtc; - public boolean GL_ARB_texture_cube_map; - public boolean GL_ARB_texture_cube_map_array; - public boolean GL_ARB_texture_env_add; - public boolean GL_ARB_texture_env_combine; - public boolean GL_ARB_texture_env_crossbar; - public boolean GL_ARB_texture_env_dot3; - public boolean GL_ARB_texture_float;; - public boolean GL_ARB_texture_gather; - public boolean GL_ARB_texture_mirror_clamp_to_edge; - public boolean GL_ARB_texture_mirrored_repeat; - public boolean GL_ARB_texture_multisample; - public boolean GL_ARB_texture_non_power_of_two; - public boolean GL_ARB_texture_query_levels; - public boolean GL_ARB_texture_query_lod; - public boolean GL_ARB_texture_rectangle; - public boolean GL_ARB_texture_rg; - public boolean GL_ARB_texture_rgb10_a2ui; - public boolean GL_ARB_texture_stencil8; - public boolean GL_ARB_texture_storage; - public boolean GL_ARB_texture_storage_multisample; - public boolean GL_ARB_texture_swizzle; - public boolean GL_ARB_texture_view; - public boolean GL_ARB_timer_query; - public boolean GL_ARB_transform_feedback2; - public boolean GL_ARB_transform_feedback3; - public boolean GL_ARB_transform_feedback_instanced; - public boolean GL_ARB_transpose_matrix; - public boolean GL_ARB_uniform_buffer_object; - public boolean GL_ARB_vertex_array_bgra; - public boolean GL_ARB_vertex_array_object; - public boolean GL_ARB_vertex_attrib_64bit; - public boolean GL_ARB_vertex_attrib_binding; - public boolean GL_ARB_vertex_blend; - public boolean GL_ARB_vertex_buffer_object; - public boolean GL_ARB_vertex_program; - public boolean GL_ARB_vertex_shader; - public boolean GL_ARB_vertex_type_10f_11f_11f_rev; - public boolean GL_ARB_vertex_type_2_10_10_10_rev; - public boolean GL_ARB_viewport_array; - public boolean GL_ARB_window_pos; - public boolean GL_ATI_draw_buffers; - public boolean GL_ATI_element_array; - public boolean GL_ATI_envmap_bumpmap; - public boolean GL_ATI_fragment_shader; - public boolean GL_ATI_map_object_buffer; - public boolean GL_ATI_meminfo; - public boolean GL_ATI_pn_triangles; - public boolean GL_ATI_separate_stencil; - public boolean GL_ATI_shader_texture_lod; - public boolean GL_ATI_text_fragment_shader; - public boolean GL_ATI_texture_compression_3dc; - public boolean GL_ATI_texture_env_combine3; - public boolean GL_ATI_texture_float; - public boolean GL_ATI_texture_mirror_once; - public boolean GL_ATI_vertex_array_object; - public boolean GL_ATI_vertex_attrib_array_object; - public boolean GL_ATI_vertex_streams; - public boolean GL_EXT_abgr; - public boolean GL_EXT_bgra; - public boolean GL_EXT_bindable_uniform; - public boolean GL_EXT_blend_color; - public boolean GL_EXT_blend_equation_separate; - public boolean GL_EXT_blend_func_separate; - public boolean GL_EXT_blend_minmax; - public boolean GL_EXT_blend_subtract; - public boolean GL_EXT_Cg_shader; - public boolean GL_EXT_compiled_vertex_array; - public boolean GL_EXT_depth_bounds_test; - public boolean GL_EXT_direct_state_access; - public boolean GL_EXT_draw_buffers2; - public boolean GL_EXT_draw_instanced; - public boolean GL_EXT_draw_range_elements; - public boolean GL_EXT_fog_coord; - public boolean GL_EXT_framebuffer_blit; - public boolean GL_EXT_framebuffer_multisample; - public boolean GL_EXT_framebuffer_multisample_blit_scaled; - public boolean GL_EXT_framebuffer_object; - public boolean GL_EXT_framebuffer_sRGB; - public boolean GL_EXT_geometry_shader4; - public boolean GL_EXT_gpu_program_parameters; - public boolean GL_EXT_gpu_shader4; - public boolean GL_EXT_multi_draw_arrays; - public boolean GL_EXT_packed_depth_stencil; - public boolean GL_EXT_packed_float; - public boolean GL_EXT_packed_pixels; - public boolean GL_EXT_paletted_texture; - public boolean GL_EXT_pixel_buffer_object; - public boolean GL_EXT_point_parameters; - public boolean GL_EXT_provoking_vertex; - public boolean GL_EXT_rescale_normal; - public boolean GL_EXT_secondary_color; - public boolean GL_EXT_separate_shader_objects; - public boolean GL_EXT_separate_specular_color; - public boolean GL_EXT_shader_image_load_store; - public boolean GL_EXT_shadow_funcs; - public boolean GL_EXT_shared_texture_palette; - public boolean GL_EXT_stencil_clear_tag; - public boolean GL_EXT_stencil_two_side; - public boolean GL_EXT_stencil_wrap; - public boolean GL_EXT_texture_3d; - public boolean GL_EXT_texture_array; - public boolean GL_EXT_texture_buffer_object; - public boolean GL_EXT_texture_compression_latc; - public boolean GL_EXT_texture_compression_rgtc; - public boolean GL_EXT_texture_compression_s3tc; - public boolean GL_EXT_texture_env_combine; - public boolean GL_EXT_texture_env_dot3; - public boolean GL_EXT_texture_filter_anisotropic; - public boolean GL_EXT_texture_integer; - public boolean GL_EXT_texture_lod_bias; - public boolean GL_EXT_texture_mirror_clamp; - public boolean GL_EXT_texture_rectangle; - public boolean GL_EXT_texture_sRGB; - public boolean GL_EXT_texture_sRGB_decode; - public boolean GL_EXT_texture_shared_exponent; - public boolean GL_EXT_texture_snorm; - public boolean GL_EXT_texture_swizzle; - public boolean GL_EXT_timer_query; - public boolean GL_EXT_transform_feedback; - public boolean GL_EXT_vertex_array_bgra; - public boolean GL_EXT_vertex_attrib_64bit; - public boolean GL_EXT_vertex_shader; - public boolean GL_EXT_vertex_weighting; - public boolean OpenGL11; - public boolean OpenGL12; - public boolean OpenGL13; - public boolean OpenGL14; - public boolean OpenGL15; - public boolean OpenGL20; - public boolean OpenGL21; - public boolean OpenGL30; - public boolean OpenGL31; - public boolean OpenGL32; - public boolean OpenGL33; - public boolean OpenGL40; - public boolean OpenGL41; - public boolean OpenGL42; - public boolean OpenGL43; - public boolean OpenGL44; - public boolean OpenGL45; - public boolean GL_GREMEDY_frame_terminator; - public boolean GL_GREMEDY_string_marker; - public boolean GL_HP_occlusion_test; - public boolean GL_IBM_rasterpos_clip; - public boolean GL_INTEL_map_texture; - public boolean GL_KHR_debug; - public boolean GL_KHR_texture_compression_astc_ldr; - public boolean GL_NVX_gpu_memory_info; - public boolean GL_NV_bindless_multi_draw_indirect; - public boolean GL_NV_bindless_texture; - public boolean GL_NV_blend_equation_advanced; - public boolean GL_NV_blend_square; - public boolean GL_NV_compute_program5; - public boolean GL_NV_conditional_render; - public boolean GL_NV_copy_depth_to_color; - public boolean GL_NV_copy_image; - public boolean GL_NV_deep_texture3D; - public boolean GL_NV_depth_buffer_float; - public boolean GL_NV_depth_clamp; - public boolean GL_NV_draw_texture; - public boolean GL_NV_evaluators; - public boolean GL_NV_explicit_multisample; - public boolean GL_NV_fence; - public boolean GL_NV_float_buffer; - public boolean GL_NV_fog_distance; - public boolean GL_NV_fragment_program; - public boolean GL_NV_fragment_program2; - public boolean GL_NV_fragment_program4; - public boolean GL_NV_fragment_program_option; - public boolean GL_NV_framebuffer_multisample_coverage; - public boolean GL_NV_geometry_program4; - public boolean GL_NV_geometry_shader4; - public boolean GL_NV_gpu_program4; - public boolean GL_NV_gpu_program5; - public boolean GL_NV_gpu_program5_mem_extended; - public boolean GL_NV_gpu_shader5; - public boolean GL_NV_half_float; - public boolean GL_NV_light_max_exponent; - public boolean GL_NV_multisample_coverage; - public boolean GL_NV_multisample_filter_hint; - public boolean GL_NV_occlusion_query; - public boolean GL_NV_packed_depth_stencil; - public boolean GL_NV_parameter_buffer_object; - public boolean GL_NV_parameter_buffer_object2; - public boolean GL_NV_path_rendering; - public boolean GL_NV_pixel_data_range; - public boolean GL_NV_point_sprite; - public boolean GL_NV_present_video; - public boolean GL_NV_primitive_restart; - public boolean GL_NV_register_combiners; - public boolean GL_NV_register_combiners2; - public boolean GL_NV_shader_atomic_counters; - public boolean GL_NV_shader_atomic_float; - public boolean GL_NV_shader_buffer_load; - public boolean GL_NV_shader_buffer_store; - public boolean GL_NV_shader_storage_buffer_object; - public boolean GL_NV_tessellation_program5; - public boolean GL_NV_texgen_reflection; - public boolean GL_NV_texture_barrier; - public boolean GL_NV_texture_compression_vtc; - public boolean GL_NV_texture_env_combine4; - public boolean GL_NV_texture_expand_normal; - public boolean GL_NV_texture_multisample; - public boolean GL_NV_texture_rectangle; - public boolean GL_NV_texture_shader; - public boolean GL_NV_texture_shader2; - public boolean GL_NV_texture_shader3; - public boolean GL_NV_transform_feedback; - public boolean GL_NV_transform_feedback2; - public boolean GL_NV_vertex_array_range; - public boolean GL_NV_vertex_array_range2; - public boolean GL_NV_vertex_attrib_integer_64bit; - public boolean GL_NV_vertex_buffer_unified_memory; - public boolean GL_NV_vertex_program; - public boolean GL_NV_vertex_program1_1; - public boolean GL_NV_vertex_program2; - public boolean GL_NV_vertex_program2_option; - public boolean GL_NV_vertex_program3; - public boolean GL_NV_vertex_program4; - public boolean GL_NV_video_capture; - public boolean GL_SGIS_generate_mipmap; - public boolean GL_SGIS_texture_lod; - public boolean GL_SUN_slice_accum; - - public static void main(String[] arg) { - System.out.println("START!"); - new ContextCapabilities(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/ContextGL.java b/src/main/java/org/lwjgl/opengl/ContextGL.java deleted file mode 100644 index 3c0045128..000000000 --- a/src/main/java/org/lwjgl/opengl/ContextGL.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl3.glfw.GLFW; -import org.lwjgl3.opengl.GL; -import org.lwjgl.LWJGLException; -import org.lwjgl.PointerBuffer; - -/** - *

- * Context encapsulates an OpenGL context. - *

- *

- * This class is thread-safe. - * - * @author elias_naur - * @version $Revision$ $Id$ - */ -public final class ContextGL implements Context { - - public long glfwWindow = Long.MIN_VALUE; - public final boolean shared; - - public ContextGL(long glfwWindow, boolean shared) { - this.glfwWindow = glfwWindow; - this.shared = shared; - } - - public void releaseCurrent() throws LWJGLException { - GLFW.glfwMakeContextCurrent(0); - GL.setCapabilities(null); - } - - public synchronized void releaseDrawable() throws LWJGLException {} - - public synchronized void update() {} - - public static void swapBuffers() throws LWJGLException { - GLFW.glfwSwapBuffers(Display.getWindow()); - } - - public synchronized void makeCurrent() throws LWJGLException { - GLFW.glfwMakeContextCurrent(glfwWindow); - GL.createCapabilities(); - } - - public synchronized boolean isCurrent() throws LWJGLException { - return GLFW.glfwGetCurrentContext() == glfwWindow; - } - - public static void setSwapInterval(int value) { - GLFW.glfwSwapInterval(value); - } - - public synchronized void forceDestroy() throws LWJGLException { - destroy(); - } - - public synchronized void destroy() throws LWJGLException { - if (shared && glfwWindow > 0) { - GLFW.glfwDestroyWindow(glfwWindow); - glfwWindow = -1; - } - } - - public synchronized void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException {} -} diff --git a/src/main/java/org/lwjgl/opengl/Display.java b/src/main/java/org/lwjgl/opengl/Display.java deleted file mode 100644 index 3ce9dc9eb..000000000 --- a/src/main/java/org/lwjgl/opengl/Display.java +++ /dev/null @@ -1,623 +0,0 @@ -package org.lwjgl.opengl; - -import net.minecraftforge.common.ForgeEarlyConfig; -import org.lwjgl.input.*; -import org.lwjgl3.glfw.GLFW; -import org.lwjgl3.glfw.*; -import org.lwjgl3.opengl.GL; -import org.lwjgl3.opengl.GL11; -import org.lwjgl.BufferUtils; -import org.lwjgl.Sys; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import static org.lwjgl3.glfw.GLFW.*; -import static org.lwjgl3.system.MemoryUtil.NULL; - -public class Display { - - private static String windowTitle = "Game"; - - private static boolean displayCreated = false; - private static boolean displayFocused = false; - private static boolean displayVisible = true; - private static boolean displayDirty = false; - private static boolean displayResizable = false; - private static boolean startFullscreen = false; - - private static DisplayMode mode = new DisplayMode(854, 480); - private static DisplayMode desktopDisplayMode; - - private static int latestEventKey = 0; - - private static int displayX = 0; - private static int displayY = 0; - - private static boolean displayResized = false; - private static int displayWidth = 0; - private static int displayHeight = 0; - private static int displayFramebufferWidth = 0; - private static int displayFramebufferHeight = 0; - - private static boolean latestResized = false; - private static int latestWidth = 0; - private static int latestHeight = 0; - private static ByteBuffer[] savedIcons; - private static boolean cancelNextChar = false; - private static KeyEvent ingredientKeyEvent; - - static { - Sys.initialize(); // init using dummy sys method - - long monitor = glfwGetPrimaryMonitor(); - GLFWVidMode vidmode = glfwGetVideoMode(monitor); - - int monitorWidth = vidmode.width(); - int monitorHeight = vidmode.height(); - int monitorBitPerPixel = vidmode.redBits() + vidmode.greenBits() + vidmode.blueBits(); - int monitorRefreshRate = vidmode.refreshRate(); - - desktopDisplayMode = new DisplayMode(monitorWidth, monitorHeight, monitorBitPerPixel, monitorRefreshRate); - } - - /** - * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed context are - * not supported on the platform, the display mode will be switched to the mode returned by getDisplayMode(), and a - * fullscreen context will be created. If isFullscreen() is false, a windowed context will be created with the - * dimensions given in the mode returned by getDisplayMode(). If a context can't be created with the given - * parameters, a LWJGLException will be thrown. - *

- *

- * The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. - * - * @param pixel_format Describes the minimum specifications the context must fulfill. - * @param shared_drawable The Drawable to share context with. (optional, may be null) - * @throws org.lwjgl.LWJGLException - */ - public static void create(PixelFormat pixel_format, Drawable shared_drawable) { - System.out.println("TODO: Implement Display.create(PixelFormat, Drawable)"); // TODO - create(); - } - - public static void create(PixelFormat pixel_format, ContextAttribs attribs) { - System.out.println("TODO: Implement Display.create(PixelFormat, ContextAttribs)"); // TODO - create(); - } - - public static void create(PixelFormat pixel_format) { - System.out.println("TODO: Implement Display.create(PixelFormat)"); // TODO - create(); - } - - public static void create() { - if (displayCreated) { - return; - } - - glfwDefaultWindowHints(); - glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE); - glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); - - glfwWindowHint(GLFW_MAXIMIZED, ForgeEarlyConfig.WINDOW_START_MAXIMIZED ? GLFW_TRUE : GLFW_FALSE); - glfwWindowHint(GLFW_FOCUSED, ForgeEarlyConfig.WINDOW_START_FOCUSED ? GLFW_TRUE : GLFW_FALSE); - displayFocused = ForgeEarlyConfig.WINDOW_START_FOCUSED; - glfwWindowHint(GLFW_ICONIFIED, ForgeEarlyConfig.WINDOW_START_ICONIFIED ? GLFW_TRUE : GLFW_FALSE); - displayVisible = !ForgeEarlyConfig.WINDOW_START_ICONIFIED; - glfwWindowHint(GLFW_DECORATED, ForgeEarlyConfig.WINDOW_DECORATED ? GLFW_TRUE : GLFW_FALSE); - - displayX = (desktopDisplayMode.getWidth() - mode.getWidth()) / 2; - displayY = (desktopDisplayMode.getHeight() - mode.getHeight()) / 2; - glfwWindowHint(GLFW_POSITION_X, displayX); - glfwWindowHint(GLFW_POSITION_Y, displayY); - glfwWindowHint(GLFW_REFRESH_RATE, desktopDisplayMode.getFrequency()); - - glfwWindowHint(GLFW_SRGB_CAPABLE, ForgeEarlyConfig.OPENGL_SRGB_CONTEXT ? GLFW_TRUE : GLFW_FALSE); - glfwWindowHint(GLFW_DOUBLEBUFFER, ForgeEarlyConfig.OPENGL_DOUBLEBUFFER ? GLFW_TRUE : GLFW_FALSE); - glfwWindowHint(GLFW_CONTEXT_NO_ERROR, ForgeEarlyConfig.OPENGL_CONTEXT_NO_ERROR ? GLFW_TRUE : GLFW_FALSE); - glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, ForgeEarlyConfig.OPENGL_DEBUG_CONTEXT ? GLFW_TRUE : GLFW_FALSE); - glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, ForgeEarlyConfig.OPENGL_DEBUG_CONTEXT ? GLFW_TRUE : GLFW_FALSE); - - glfwWindowHintString(GLFW_X11_CLASS_NAME, ForgeEarlyConfig.X11_CLASS_NAME); - glfwWindowHintString(GLFW_COCOA_FRAME_NAME, ForgeEarlyConfig.COCOA_FRAME_NAME); - - glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE); // request a non-hidpi framebuffer on Retina displays - // on MacOS - - Window.handle = glfwCreateWindow(mode.getWidth(), mode.getHeight(), windowTitle, NULL, NULL); - if (Window.handle == 0L) { - throw new IllegalStateException("Failed to create Display window"); - } - - if (org.lwjgl3.glfw.GLFW.glfwRawMouseMotionSupported() && ForgeEarlyConfig.RAW_INPUT) { - GLFW.glfwSetInputMode(Window.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE); - } - - Window.keyCallback = new GLFWKeyCallback() { - - @Override - public void invoke(long window, int key, int scancode, int action, int mods) { - cancelNextChar = false; - if (key > GLFW_KEY_SPACE && key <= GLFW_KEY_GRAVE_ACCENT) { // Handle keys have a char. Exclude space to - // avoid extra input when switching IME - if ((GLFW_MOD_CONTROL & mods) != 0) { // Handle ctrl + x/c/v. - Keyboard.addGlfwKeyEvent(window, key, scancode, action, mods, (char) (key & 0x1f)); - cancelNextChar = true; // Cancel char event from ctrl key since its already handled here - } else if (action > 0) { // Delay press and repeat key event to actual char input. There is ALWAYS a - // char after them - ingredientKeyEvent = new KeyEvent( - KeyCodes.toLwjglKey(key), - '\0', - action > 1 ? KeyState.REPEAT : KeyState.PRESS, - Sys.getNanoTime()); - } else { // Release event - Keyboard.addGlfwKeyEvent(window, key, scancode, action, mods, '\0'); - } - } else { // Other key with no char associated - Keyboard.addGlfwKeyEvent(window, key, scancode, action, mods, '\0'); - } - } - }; - - Window.charCallback = new GLFWCharCallback() { - @Override - public void invoke(long window, int codepoint) { - if (cancelNextChar) { // Char event being cancelled - cancelNextChar = false; - } else { - Keyboard.addCharEvent(0, (char) codepoint); // Non-ASCII chars - } - } - }; - - // TODO: Preferably handle with only GLFWCharCallback - // TODO: Perhaps recognise ALT keypresses in GLFWKeyCallback instead - Window.charModsCallback = new GLFWCharModsCallback() { - - @Override - public void invoke(long window, int codepoint, int mods) { - if (cancelNextChar) { // Char event being cancelled - cancelNextChar = false; - } else if (ingredientKeyEvent != null) { - ingredientKeyEvent.aChar = (char) codepoint; // Send char with ASCII key event here - Keyboard.addKeyEvent(ingredientKeyEvent); - ingredientKeyEvent = null; - cancelNextChar = true; // Cancel char event for GLFWCharCallback - } - - // Non-ASCII chars are handled in GLFWCharCallback - } - }; - - Window.cursorPosCallback = new GLFWCursorPosCallback() { - - @Override - public void invoke(long window, double xpos, double ypos) { - - Mouse.addMoveEvent(xpos, ypos); - } - }; - - Window.mouseButtonCallback = new GLFWMouseButtonCallback() { - - @Override - public void invoke(long window, int button, int action, int mods) { - - Mouse.addButtonEvent(button, action == GLFW.GLFW_PRESS ? true : false); - } - }; - - Window.scrollCallback = new GLFWScrollCallback() { - - @Override - public void invoke(long window, double xoffset, double yoffset) { - - Mouse.addWheelEvent(yoffset == 0 ? xoffset : yoffset); - } - }; - - Window.windowFocusCallback = new GLFWWindowFocusCallback() { - - @Override - public void invoke(long window, boolean focused) { - - displayFocused = focused; - } - }; - - Window.windowIconifyCallback = new GLFWWindowIconifyCallback() { - - @Override - public void invoke(long window, boolean iconified) { - - displayVisible = !iconified; - } - }; - - Window.windowSizeCallback = new GLFWWindowSizeCallback() { - - @Override - public void invoke(long window, int width, int height) { - - if (width != 0 && height != 0) { - latestResized = true; - latestWidth = width; - latestHeight = height; - } - } - }; - - Window.windowPosCallback = new GLFWWindowPosCallback() { - - @Override - public void invoke(long window, int xpos, int ypos) { - displayX = xpos; - displayY = ypos; - } - }; - - Window.windowRefreshCallback = new GLFWWindowRefreshCallback() { - - @Override - public void invoke(long window) { - displayDirty = true; - } - }; - - Window.framebufferSizeCallback = new GLFWFramebufferSizeCallback() { - - @Override - public void invoke(long window, int width, int height) { - - displayFramebufferWidth = width; - displayFramebufferHeight = height; - } - }; - - Window.setCallbacks(); - - displayWidth = desktopDisplayMode.getWidth(); - displayHeight = desktopDisplayMode.getHeight(); - - IntBuffer fbw = BufferUtils.createIntBuffer(1); - IntBuffer fbh = BufferUtils.createIntBuffer(1); - GLFW.glfwGetFramebufferSize(Window.handle, fbw, fbh); - displayFramebufferWidth = fbw.get(0); - displayFramebufferHeight = fbh.get(0); - - glfwMakeContextCurrent(Window.handle); - drawable = new DrawableGL(); - GL.createCapabilities(); - - if (savedIcons != null) { - setIcon(savedIcons); - savedIcons = null; - } - - glfwSwapInterval(1); - - displayCreated = true; - - if (startFullscreen) { - setFullscreen(true); - } - - int[] x = new int[1], y = new int[1]; - GLFW.glfwGetWindowSize(Window.handle, x, y); - Window.windowSizeCallback.invoke(Window.handle, x[0], y[0]); - GLFW.glfwGetFramebufferSize(Window.handle, x, y); - Window.framebufferSizeCallback.invoke(Window.handle, x[0], y[0]); - } - - public static boolean isCreated() { - return displayCreated; - } - - public static boolean isActive() { - return displayFocused; - } - - public static boolean isVisible() { - return displayVisible; - } - - public static void setLocation(int new_x, int new_y) { - System.out.println("TODO: Implement Display.setLocation(int, int)"); - } - - public static void setVSyncEnabled(boolean sync) { - glfwSwapInterval(sync ? 1 : 0); - } - - public static long getWindow() { - return Window.handle; - } - - public static void update() { - update(true); - } - - public static void update(boolean processMessages) { - swapBuffers(); - displayDirty = false; - - if (processMessages) processMessages(); - } - - public static void processMessages() { - glfwPollEvents(); - Keyboard.poll(); - Mouse.poll(); - - if (latestResized) { - latestResized = false; - displayResized = true; - displayWidth = latestWidth; - displayHeight = latestHeight; - } else { - displayResized = false; - } - } - - public static void swapBuffers() { - glfwSwapBuffers(Window.handle); - } - - public static void destroy() { - Window.releaseCallbacks(); - glfwDestroyWindow(Window.handle); - - /* - * try { glfwTerminate(); } catch (Throwable t) { t.printStackTrace(); } - */ - displayCreated = false; - } - - public static void setDisplayMode(DisplayMode dm) { - mode = dm; - } - - public static DisplayMode getDisplayMode() { - return mode; - } - - public static DisplayMode[] getAvailableDisplayModes() { - IntBuffer count = BufferUtils.createIntBuffer(1); - GLFWVidMode.Buffer modes = GLFW.glfwGetVideoModes(glfwGetPrimaryMonitor()); - - DisplayMode[] displayModes = new DisplayMode[count.get(0)]; - - for (int i = 0; i < count.get(0); i++) { - modes.position(i * GLFWVidMode.SIZEOF); - - int w = modes.width(); - int h = modes.height(); - int b = modes.redBits() + modes.greenBits() + modes.blueBits(); - int r = modes.refreshRate(); - - displayModes[i] = new DisplayMode(w, h, b, r); - } - - return displayModes; - } - - public static DisplayMode getDesktopDisplayMode() { - return desktopDisplayMode; - } - - public static boolean wasResized() { - return displayResized; - } - - public static int getX() { - return displayX; - } - - public static int getY() { - return displayY; - } - - public static int getWidth() { - return displayWidth; - } - - public static int getHeight() { - return displayHeight; - } - - public static int getFramebufferWidth() { - return displayFramebufferWidth; - } - - public static int getFramebufferHeight() { - return displayFramebufferHeight; - } - - public static String getTitle() { - return windowTitle; - } - - public static void setTitle(String title) { - if (getWindow() != 0) { - org.lwjgl3.glfw.GLFW.glfwSetWindowTitle(Window.handle, title); - } - windowTitle = title; - } - - public static boolean isCloseRequested() { - return glfwWindowShouldClose(Window.handle); - } - - public static boolean isDirty() { - return displayDirty; - } - - public static void setInitialBackground(float red, float green, float blue) { - // no-op - } - - public static int setIcon(java.nio.ByteBuffer[] icons) { - if (getWindow() == 0) { - savedIcons = icons; - return 0; - } - GLFWImage.Buffer glfwImages = GLFWImage.calloc(icons.length); - ByteBuffer[] nativeBuffers = new ByteBuffer[icons.length]; - for (int icon = 0; icon < icons.length; icon++) { - nativeBuffers[icon] = org.lwjgl3.BufferUtils.createByteBuffer(icons[icon].capacity()); - nativeBuffers[icon].put(icons[icon]); - nativeBuffers[icon].flip(); - int dimension = (int) Math.sqrt(nativeBuffers[icon].limit() / 4D); - if (dimension * dimension * 4 != nativeBuffers[icon].limit()) { - throw new IllegalStateException(); - } - glfwImages.put(icon, GLFWImage.create().set(dimension, dimension, nativeBuffers[icon])); - } - GLFW.glfwSetWindowIcon(getWindow(), glfwImages); - glfwImages.free(); - return 0; - } - - public static void setResizable(boolean resizable) { - displayResizable = resizable; - // Ignore the request because why would you make the game window non-resizable - } - - public static boolean isResizable() { - return displayResizable; - } - - public static void setDisplayModeAndFullscreen(DisplayMode mode) { - // TODO - System.out.println("TODO: Implement Display.setDisplayModeAndFullscreen(DisplayMode)"); - } - - private static int savedX[] = new int[1], savedY[] = new int[1]; - private static int savedW[] = new int[1], savedH[] = new int[1]; - - public static void setFullscreen(boolean fullscreen) { - final long window = getWindow(); - if (window == 0) { - startFullscreen = fullscreen; - return; - } - final boolean currentState = isFullscreen(); - if (currentState == fullscreen) { - return; - } - if (fullscreen) { - glfwGetWindowPos(window, savedX, savedY); - glfwGetWindowSize(window, savedW, savedH); - long monitorId = glfwGetPrimaryMonitor(); - final GLFWVidMode vidMode = glfwGetVideoMode(monitorId); - glfwSetWindowMonitor(window, monitorId, 0, 0, vidMode.width(), vidMode.height(), vidMode.refreshRate()); - } else { - glfwSetWindowMonitor(window, NULL, savedX[0], savedY[0], savedW[0], savedH[0], 0); - } - } - - public static boolean isFullscreen() { - if (getWindow() != 0) { - return glfwGetWindowMonitor(getWindow()) != NULL; - } - return false; - } - - public static void setParent(java.awt.Canvas parent) { - // Do nothing as set parent not supported - } - - public static void releaseContext() { - glfwMakeContextCurrent(0); - } - - public static boolean isCurrent() { - return true; - } - - public static void makeCurrent() { - glfwMakeContextCurrent(Window.handle); - } - - public static java.lang.String getAdapter() { - if (isCreated()) { - return GL11.glGetString(GL11.GL_VENDOR); - } - return "Unknown"; - } - - public static java.lang.String getVersion() { - if (isCreated()) { - return GL11.glGetString(GL11.GL_VERSION); - } - return "Unknown"; - } - - /** - * An accurate sync method that will attempt to run at a constant frame rate. It should be called once every frame. - * - * @param fps - the desired frame rate, in frames per second - */ - public static void sync(int fps) { - Sync.sync(fps); - } - - protected static DrawableGL drawable = null; - - public static Drawable getDrawable() { - return drawable; - } - - static DisplayImplementation getImplementation() { - return null; - } - - private static class Window { - - static long handle; - - static GLFWKeyCallback keyCallback; - static GLFWCharCallback charCallback; - static GLFWCharModsCallback charModsCallback; - static GLFWCursorPosCallback cursorPosCallback; - static GLFWMouseButtonCallback mouseButtonCallback; - static GLFWScrollCallback scrollCallback; - static GLFWWindowFocusCallback windowFocusCallback; - static GLFWWindowIconifyCallback windowIconifyCallback; - static GLFWWindowSizeCallback windowSizeCallback; - static GLFWWindowPosCallback windowPosCallback; - static GLFWWindowRefreshCallback windowRefreshCallback; - static GLFWFramebufferSizeCallback framebufferSizeCallback; - - public static void setCallbacks() { - GLFW.glfwSetKeyCallback(handle, keyCallback); - GLFW.glfwSetCharCallback(handle, charCallback); - GLFW.glfwSetCharModsCallback(handle, charModsCallback); - GLFW.glfwSetCursorPosCallback(handle, cursorPosCallback); - GLFW.glfwSetMouseButtonCallback(handle, mouseButtonCallback); - GLFW.glfwSetScrollCallback(handle, scrollCallback); - GLFW.glfwSetWindowFocusCallback(handle, windowFocusCallback); - GLFW.glfwSetWindowIconifyCallback(handle, windowIconifyCallback); - GLFW.glfwSetWindowSizeCallback(handle, windowSizeCallback); - GLFW.glfwSetWindowPosCallback(handle, windowPosCallback); - GLFW.glfwSetWindowRefreshCallback(handle, windowRefreshCallback); - GLFW.glfwSetFramebufferSizeCallback(handle, framebufferSizeCallback); - } - - public static void releaseCallbacks() { - keyCallback.free(); - charCallback.free(); - cursorPosCallback.free(); - mouseButtonCallback.free(); - scrollCallback.free(); - windowFocusCallback.free(); - windowIconifyCallback.free(); - windowSizeCallback.free(); - windowPosCallback.free(); - windowRefreshCallback.free(); - framebufferSizeCallback.free(); - } - } -} diff --git a/src/main/java/org/lwjgl/opengl/DisplayImplementation.java b/src/main/java/org/lwjgl/opengl/DisplayImplementation.java deleted file mode 100644 index 253c94813..000000000 --- a/src/main/java/org/lwjgl/opengl/DisplayImplementation.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - * This is the Display implementation interface. Display delegates to implementors of this interface. There is one - * DisplayImplementation for each supported platform. - * - * @author elias_naur - */ -import java.awt.Canvas; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -import org.lwjgl.LWJGLException; - -interface DisplayImplementation extends InputImplementation { - - void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException; - - void destroyWindow(); - - void switchDisplayMode(DisplayMode mode) throws LWJGLException; - - /** - * Reset the display mode to whatever it was when LWJGL was initialized. Fails silently. - */ - void resetDisplayMode(); - - /** - * Return the length of the gamma ramp arrays. Returns 0 if gamma settings are unsupported. - * - * @return the length of each gamma ramp array, or 0 if gamma settings are unsupported. - */ - int getGammaRampLength(); - - /** - * Method to set the gamma ramp. - */ - void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; - - /** - * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", - * "PS2", "Radeon9700". If the adapter cannot be determined, this function returns null. - * - * @return a String - */ - String getAdapter(); - - /** - * Get the driver version. This is a vendor/adapter specific version string. If the version cannot be determined, - * this function returns null. - * - * @return a String - */ - String getVersion(); - - /** - * Initialize and return the current display mode. - */ - DisplayMode init() throws LWJGLException; - - /** - * Implementation of setTitle(). This will read the window's title member and stash it in the native title of the - * window. - */ - void setTitle(String title); - - boolean isCloseRequested(); - - boolean isVisible(); - - boolean isActive(); - - boolean isDirty(); - - /** - * Create the native PeerInfo. - * - * @throws LWJGLException - */ - PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException; - - // void destroyPeerInfo(); - - /** - * Updates the windows internal state. This must be called at least once per video frame to handle window close - * requests, moves, paints, etc. - */ - void update(); - - void reshape(int x, int y, int width, int height); - - /** - * Method for getting displaymodes - */ - DisplayMode[] getAvailableDisplayModes() throws LWJGLException; - - /* Pbuffer */ - int getPbufferCapabilities(); - - /** - * Method to test for buffer integrity - */ - boolean isBufferLost(PeerInfo handle); - - /** - * Method to create a Pbuffer - */ - PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, - IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException; - - void setPbufferAttrib(PeerInfo handle, int attrib, int value); - - void bindTexImageToPbuffer(PeerInfo handle, int buffer); - - void releaseTexImageFromPbuffer(PeerInfo handle, int buffer); - - /** - * Sets one or more icons for the Display. - *

    - *
  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • - *
  • Linux (and similar platforms) expect one 32x32 icon.
  • - *
  • Mac OS X should be supplied one 128x128 icon
  • - *
- * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions - * nescesarry for the specific platform. - * - * @param icons Array of icons in RGBA mode - * @return number of icons used. - */ - int setIcon(ByteBuffer[] icons); - - /** - * Enable or disable the Display window to be resized. - * - * @param resizable set to true to make the Display window resizable; false to disable resizing on the Display - * window. - */ - void setResizable(boolean resizable); - - /** - * @return true if the Display window has been resized since this method was last called. - */ - boolean wasResized(); - - /** - * @return this method will return the width of the Display window. - */ - int getWidth(); - - /** - * @return this method will return the height of the Display window. - */ - int getHeight(); - - /** - * @return this method will return the top-left x position of the Display window. - */ - int getX(); - - /** - * @return this method will return the top-left y position of the Display window. - */ - int getY(); - - /** - * @return this method will return the pixel scale factor of the Display window useful for high resolution modes. - */ - float getPixelScaleFactor(); -} diff --git a/src/main/java/org/lwjgl/opengl/DisplayMode.java b/src/main/java/org/lwjgl/opengl/DisplayMode.java deleted file mode 100644 index 614d9f70e..000000000 --- a/src/main/java/org/lwjgl/opengl/DisplayMode.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - * - * This class encapsulates the properties for a given display mode. This class is not instantiable, and is aquired from - * the Display. - * getAvailableDisplayModes() method. - * - * @author cix_foo - * @version $Revision$ $Id$ - */ -public final class DisplayMode { - - /** properties of the display mode */ - private final int width, height, bpp, freq; - /** If true, this instance can be used for fullscreen modes */ - private final boolean fullscreen; - - /** - * Construct a display mode. DisplayModes constructed through the public constructor can only be used to specify the - * dimensions of the Display in windowed mode. To get the available DisplayModes for fullscreen modes, use - * Display.getAvailableDisplayModes(). - * - * @param width The Display width. - * @param height The Display height. - * @see Display - */ - public DisplayMode(int width, int height) { - this(width, height, 0, 0, false); - } - - DisplayMode(int width, int height, int bpp, int freq) { - this(width, height, bpp, freq, true); - } - - private DisplayMode(int width, int height, int bpp, int freq, boolean fullscreen) { - this.width = width; - this.height = height; - this.bpp = bpp; - this.freq = freq; - this.fullscreen = fullscreen; - } - - /** True if this instance can be used for fullscreen modes */ - public boolean isFullscreenCapable() { - return fullscreen; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - public int getBitsPerPixel() { - return bpp; - } - - public int getFrequency() { - return freq; - } - - /** - * Tests for DisplayMode equality - * - * @see java.lang.Object#equals(Object) - */ - public boolean equals(Object obj) { - if (obj == null || !(obj instanceof DisplayMode dm)) { - return false; - } - - return dm.width == width && dm.height == height && dm.bpp == bpp && dm.freq == freq; - } - - /** - * Retrieves the hashcode for this object - * - * @see java.lang.Object#hashCode() - */ - public int hashCode() { - return width ^ height ^ freq ^ bpp; - } - - /** - * Retrieves a String representation of this DisplayMode - * - * @see java.lang.Object#toString() - */ - public String toString() { - StringBuilder sb = new StringBuilder(32); - sb.append(width); - sb.append(" x "); - sb.append(height); - sb.append(" x "); - sb.append(bpp); - sb.append(" @"); - sb.append(freq); - sb.append("Hz"); - return sb.toString(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/Drawable.java b/src/main/java/org/lwjgl/opengl/Drawable.java deleted file mode 100644 index ef26bf13e..000000000 --- a/src/main/java/org/lwjgl/opengl/Drawable.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.PointerBuffer; - -/** - * The Drawable interface describes an OpenGL drawable with an associated Context. - * - * @author elias_naur - */ -public interface Drawable { - - /** Returns true if the Drawable's context is current in the current thread. */ - boolean isCurrent() throws LWJGLException; - - /** - * Makes the Drawable's context current in the current thread. - * - * @throws LWJGLException - */ - void makeCurrent() throws LWJGLException; - - /** - * If the Drawable's context is current in the current thread, no context will be current after a call to this - * method. - * - * @throws LWJGLException - */ - void releaseContext() throws LWJGLException; - - /** Destroys the Drawable. */ - void destroy(); - - /** - * Sets the appropriate khr_gl_sharing properties in the target PointerBuffer, so that if it is used in - * a clCreateContext(FromType) call, the created CL context will be sharing objects with this - * Drawable's GL context. After a call to this method, the target buffer position will have advanced by - * 2 to 4 positions, depending on the implementation. - * - * @param properties The target properties buffer. It must have at least 4 positions remaining. - */ - void setCLSharingProperties(PointerBuffer properties) throws LWJGLException; -} diff --git a/src/main/java/org/lwjgl/opengl/DrawableGL.java b/src/main/java/org/lwjgl/opengl/DrawableGL.java deleted file mode 100644 index 214a9ce83..000000000 --- a/src/main/java/org/lwjgl/opengl/DrawableGL.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2002-2011 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import static org.lwjgl3.glfw.GLFW.GLFW_FALSE; -import static org.lwjgl3.glfw.GLFW.GLFW_VISIBLE; -import static org.lwjgl3.glfw.GLFW.glfwWindowHint; -import static org.lwjgl3.opengl.GL11.*; - -import org.lwjgl3.glfw.GLFW; -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.PointerBuffer; - -/** @author Spasi */ -public class DrawableGL implements DrawableLWJGL { - - /** The PixelFormat used to create the drawable. */ - protected PixelFormat pixel_format; - - /** Handle to the native GL rendering context */ - protected PeerInfo peer_info; - - /** The OpenGL Context. */ - protected ContextGL context; - - protected DrawableGL() { - context = new ContextGL(Display.getWindow(), false); - } - - public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { - throw new UnsupportedOperationException(); - } - - public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { - this.pixel_format = (PixelFormat) pf; - // this.peer_info = Display.getImplementation().createPeerInfo(pixel_format, attribs); - } - - public PixelFormatLWJGL getPixelFormat() { - return pixel_format; - } - - public ContextGL getContext() { - synchronized (GlobalLock.lock) { - return context; - } - } - - public ContextGL createSharedContext() throws LWJGLException { - synchronized (GlobalLock.lock) { - glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); - long hiddenWindow = GLFW.glfwCreateWindow(16, 16, "MC - Shared Drawable", 0, this.context.glfwWindow); - if (hiddenWindow == 0) { - throw new LWJGLException("Couldn't create shared context hidden window"); - } - return new ContextGL(hiddenWindow, true); - } - } - - public void checkGLError() { - Util.checkGLError(); - } - - public void setSwapInterval(final int swap_interval) { - ContextGL.setSwapInterval(swap_interval); - } - - public void swapBuffers() throws LWJGLException { - ContextGL.swapBuffers(); - } - - public void initContext(final float r, final float g, final float b) { - // set background clear color - glClearColor(r, g, b, 0.0f); - // Clear window to avoid the desktop "showing through" - glClear(GL_COLOR_BUFFER_BIT); - } - - public boolean isCurrent() throws LWJGLException { - synchronized (GlobalLock.lock) { - checkDestroyed(); - return context.isCurrent(); - } - } - - public void makeCurrent() throws LWJGLException { - synchronized (GlobalLock.lock) { - checkDestroyed(); - context.makeCurrent(); - } - } - - public void releaseContext() throws LWJGLException { - synchronized (GlobalLock.lock) { - checkDestroyed(); - if (context.isCurrent()) context.releaseCurrent(); - } - } - - public void destroy() { - synchronized (GlobalLock.lock) { - if (context == null) return; - - try { - releaseContext(); - - context.forceDestroy(); - context = null; - - if (peer_info != null) { - peer_info.destroy(); - peer_info = null; - } - } catch (LWJGLException e) { - LWJGLUtil.log("Exception occurred while destroying Drawable: " + e); - } - } - } - - public void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { - synchronized (GlobalLock.lock) { - checkDestroyed(); - context.setCLSharingProperties(properties); - } - } - - protected final void checkDestroyed() { - if (context == null) throw new IllegalStateException("The Drawable has no context available."); - } -} diff --git a/src/main/java/org/lwjgl/opengl/DrawableLWJGL.java b/src/main/java/org/lwjgl/opengl/DrawableLWJGL.java deleted file mode 100644 index 4b9d426a7..000000000 --- a/src/main/java/org/lwjgl/opengl/DrawableLWJGL.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2002-2011 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.LWJGLException; - -/** - * [INTERNAL USE ONLY] - * - * @author Spasi - */ -interface DrawableLWJGL extends Drawable { - - void setPixelFormat(PixelFormatLWJGL pf) throws LWJGLException; - - void setPixelFormat(PixelFormatLWJGL pf, ContextAttribs attribs) throws LWJGLException; - - PixelFormatLWJGL getPixelFormat(); - - /** - * [INTERNAL USE ONLY] Returns the Drawable's Context. - * - * @return the Drawable's Context - */ - Context getContext(); - - /** - * [INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context. - * - * @return a Context shared with the Drawable's Context. - */ - Context createSharedContext() throws LWJGLException; - - void checkGLError(); - - void setSwapInterval(int swap_interval); - - void swapBuffers() throws LWJGLException; - - void initContext(final float r, final float g, final float b); -} diff --git a/src/main/java/org/lwjgl/opengl/EXTBindableUniform.java b/src/main/java/org/lwjgl/opengl/EXTBindableUniform.java deleted file mode 100644 index 9dd2f8cb1..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTBindableUniform.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTBindableUniform { - - public static final int GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = (int) 36333; - public static final int GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = (int) 36323; - public static final int GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = (int) 36324; - public static final int GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = (int) 36322; - public static final int GL_UNIFORM_BUFFER_BINDING_EXT = (int) 36335; - public static final int GL_UNIFORM_BUFFER_EXT = (int) 36334; - - public static int glGetUniformBufferSizeEXT(int program, int location) { - return org.lwjgl3.opengl.EXTBindableUniform.glGetUniformBufferSizeEXT(program, location); - } - - public static long glGetUniformOffsetEXT(int program, int location) { - return org.lwjgl3.opengl.EXTBindableUniform.glGetUniformOffsetEXT(program, location); - } - - public static void glUniformBufferEXT(int program, int location, int buffer) { - org.lwjgl3.opengl.EXTBindableUniform.glUniformBufferEXT(program, location, buffer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTBlendColor.java b/src/main/java/org/lwjgl/opengl/EXTBlendColor.java deleted file mode 100644 index e4dac8ee0..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTBlendColor.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTBlendColor { - - public static final int GL_BLEND_COLOR_EXT = (int) 32773; - public static final int GL_CONSTANT_ALPHA_EXT = (int) 32771; - public static final int GL_CONSTANT_COLOR_EXT = (int) 32769; - public static final int GL_ONE_MINUS_CONSTANT_ALPHA_EXT = (int) 32772; - public static final int GL_ONE_MINUS_CONSTANT_COLOR_EXT = (int) 32770; - - public static void glBlendColorEXT(float red, float green, float blue, float alpha) { - org.lwjgl3.opengl.EXTBlendColor.glBlendColorEXT(red, green, blue, alpha); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java b/src/main/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java deleted file mode 100644 index c04919c2e..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTBlendEquationSeparate { - - public static final int GL_BLEND_EQUATION_ALPHA_EXT = (int) 34877; - public static final int GL_BLEND_EQUATION_RGB_EXT = (int) 32777; - - public static void glBlendEquationSeparateEXT(int modeRGB, int modeAlpha) { - org.lwjgl3.opengl.EXTBlendEquationSeparate.glBlendEquationSeparateEXT(modeRGB, modeAlpha); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java b/src/main/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java deleted file mode 100644 index cec99fd74..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTBlendFuncSeparate { - - public static final int GL_BLEND_DST_ALPHA_EXT = (int) 32970; - public static final int GL_BLEND_DST_RGB_EXT = (int) 32968; - public static final int GL_BLEND_SRC_ALPHA_EXT = (int) 32971; - public static final int GL_BLEND_SRC_RGB_EXT = (int) 32969; - - public static void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) { - org.lwjgl3.opengl.EXTBlendFuncSeparate - .glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTBlendMinmax.java b/src/main/java/org/lwjgl/opengl/EXTBlendMinmax.java deleted file mode 100644 index 856e70e84..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTBlendMinmax.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTBlendMinmax { - - public static final int GL_BLEND_EQUATION_EXT = (int) 32777; - public static final int GL_FUNC_ADD_EXT = (int) 32774; - public static final int GL_MAX_EXT = (int) 32776; - public static final int GL_MIN_EXT = (int) 32775; - - public static void glBlendEquationEXT(int mode) { - org.lwjgl3.opengl.EXTBlendMinmax.glBlendEquationEXT(mode); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTBlendSubtract.java b/src/main/java/org/lwjgl/opengl/EXTBlendSubtract.java deleted file mode 100644 index 760bda879..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTBlendSubtract.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTBlendSubtract { - - public static final int GL_FUNC_REVERSE_SUBTRACT_EXT = (int) 32779; - public static final int GL_FUNC_SUBTRACT_EXT = (int) 32778; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTCompiledVertexArray.java b/src/main/java/org/lwjgl/opengl/EXTCompiledVertexArray.java deleted file mode 100644 index bd0b25327..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTCompiledVertexArray.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTCompiledVertexArray { - - public static final int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = (int) 33193; - public static final int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = (int) 33192; - - public static void glLockArraysEXT(int first, int count) { - org.lwjgl3.opengl.EXTCompiledVertexArray.glLockArraysEXT(first, count); - } - - public static void glUnlockArraysEXT() { - org.lwjgl3.opengl.EXTCompiledVertexArray.glUnlockArraysEXT(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTDepthBoundsTest.java b/src/main/java/org/lwjgl/opengl/EXTDepthBoundsTest.java deleted file mode 100644 index 51b74fd71..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTDepthBoundsTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTDepthBoundsTest { - - public static final int GL_DEPTH_BOUNDS_EXT = (int) 34961; - public static final int GL_DEPTH_BOUNDS_TEST_EXT = (int) 34960; - - public static void glDepthBoundsEXT(double zmin, double zmax) { - org.lwjgl3.opengl.EXTDepthBoundsTest.glDepthBoundsEXT(zmin, zmax); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTDirectStateAccess.java b/src/main/java/org/lwjgl/opengl/EXTDirectStateAccess.java deleted file mode 100644 index 6cda2b9f1..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTDirectStateAccess.java +++ /dev/null @@ -1,2220 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class EXTDirectStateAccess { - - public static final int GL_PROGRAM_MATRIX_EXT = (int) 36397; - public static final int GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = (int) 36399; - public static final int GL_TRANSPOSE_PROGRAM_MATRIX_EXT = (int) 36398; - - public static void glBindMultiTextureEXT(int texunit, int target, int texture) { - org.lwjgl3.opengl.EXTDirectStateAccess.glBindMultiTextureEXT(texunit, target, texture); - } - - public static int glCheckNamedFramebufferStatusEXT(int framebuffer, int target) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glCheckNamedFramebufferStatusEXT(framebuffer, target); - } - - public static void glClientAttribDefaultEXT(int mask) { - org.lwjgl3.opengl.EXTDirectStateAccess.glClientAttribDefaultEXT(mask); - } - - public static void glCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexImage1DEXT( - texunit, - target, - level, - internalformat, - width, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, data); - } - - public static void glCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, data); - } - - public static void glCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - data); - } - - public static void glCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, - int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage1DEXT( - texunit, - target, - level, - xoffset, - width, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, - int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, data); - } - - public static void glCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int width, int height, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage2DEXT( - texunit, - target, - level, - xoffset, - yoffset, - width, - height, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int width, int height, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage2DEXT( - texunit, - target, - level, - xoffset, - yoffset, - width, - height, - format, - data); - } - - public static void glCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - data); - } - - public static void glCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureImage1DEXT( - texture, - target, - level, - internalformat, - width, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, data); - } - - public static void glCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, data); - } - - public static void glCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - data); - } - - public static void glCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, - int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureSubImage1DEXT( - texture, - target, - level, - xoffset, - width, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, - int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, data); - } - - public static void glCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, - int width, int height, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureSubImage2DEXT( - texture, - target, - level, - xoffset, - yoffset, - width, - height, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, - int width, int height, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureSubImage2DEXT( - texture, - target, - level, - xoffset, - yoffset, - width, - height, - format, - data); - } - - public static void glCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCompressedTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - data); - } - - public static void glCopyMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int x, int y, - int width, int border) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border); - } - - public static void glCopyMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int x, int y, - int width, int height, int border) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border); - } - - public static void glCopyMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int x, int y, - int width) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width); - } - - public static void glCopyMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int x, - int y, int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height); - } - - public static void glCopyMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int x, int y, int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - public static void glCopyTextureImage1DEXT(int texture, int target, int level, int internalformat, int x, int y, - int width, int border) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border); - } - - public static void glCopyTextureImage2DEXT(int texture, int target, int level, int internalformat, int x, int y, - int width, int height, int border) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border); - } - - public static void glCopyTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int x, int y, - int width) { - org.lwjgl3.opengl.EXTDirectStateAccess.glCopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width); - } - - public static void glCopyTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int x, - int y, int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height); - } - - public static void glCopyTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, - int zoffset, int x, int y, int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glCopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - public static void glDisableClientStateIndexedEXT(int array, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glDisableClientStateIndexedEXT(array, index); - } - - public static void glDisableClientStateiEXT(int array, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glDisableClientStateiEXT(array, index); - } - - public static void glDisableIndexedEXT(int cap, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glDisableIndexedEXT(cap, index); - } - - public static void glDisableVertexArrayAttribEXT(int vaobj, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glDisableVertexArrayAttribEXT(vaobj, index); - } - - public static void glDisableVertexArrayEXT(int vaobj, int array) { - org.lwjgl3.opengl.EXTDirectStateAccess.glDisableVertexArrayEXT(vaobj, array); - } - - public static void glEnableClientStateIndexedEXT(int array, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glEnableClientStateIndexedEXT(array, index); - } - - public static void glEnableClientStateiEXT(int array, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glEnableClientStateiEXT(array, index); - } - - public static void glEnableIndexedEXT(int cap, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glEnableIndexedEXT(cap, index); - } - - public static void glEnableVertexArrayAttribEXT(int vaobj, int index) { - org.lwjgl3.opengl.EXTDirectStateAccess.glEnableVertexArrayAttribEXT(vaobj, index); - } - - public static void glEnableVertexArrayEXT(int vaobj, int array) { - org.lwjgl3.opengl.EXTDirectStateAccess.glEnableVertexArrayEXT(vaobj, array); - } - - public static void glFlushMappedNamedBufferRangeEXT(int buffer, long offset, long length) { - org.lwjgl3.opengl.EXTDirectStateAccess.glFlushMappedNamedBufferRangeEXT(buffer, offset, length); - } - - public static void glFramebufferDrawBufferEXT(int framebuffer, int mode) { - org.lwjgl3.opengl.EXTDirectStateAccess.glFramebufferDrawBufferEXT(framebuffer, mode); - } - - public static void glFramebufferDrawBuffersEXT(int framebuffer, java.nio.IntBuffer bufs) { - org.lwjgl3.opengl.EXTDirectStateAccess.glFramebufferDrawBuffersEXT(framebuffer, bufs); - } - - public static void glFramebufferReadBufferEXT(int framebuffer, int mode) { - org.lwjgl3.opengl.EXTDirectStateAccess.glFramebufferReadBufferEXT(framebuffer, mode); - } - - public static void glGenerateMultiTexMipmapEXT(int texunit, int target) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGenerateMultiTexMipmapEXT(texunit, target); - } - - public static void glGenerateTextureMipmapEXT(int texture, int target) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGenerateTextureMipmapEXT(texture, target); - } - - public static boolean glGetBooleanIndexedEXT(int pname, int index) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetBooleanIndexedEXT(pname, index); - } - - public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, long img_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetCompressedMultiTexImageEXT(texunit, target, level, img_buffer_offset); - } - - public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, java.nio.ByteBuffer img) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetCompressedMultiTexImageEXT(texunit, target, level, img); - } - - public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, java.nio.IntBuffer img) { - - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetCompressedMultiTexImageEXT(texunit, target, level, org.lwjgl.MemoryUtil.getAddress(img)); - } - - public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, java.nio.ShortBuffer img) { - - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetCompressedMultiTexImageEXT(texunit, target, level, org.lwjgl.MemoryUtil.getAddress(img)); - } - - public static void glGetCompressedTextureImageEXT(int texture, int target, int level, long img_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetCompressedTextureImageEXT(texture, target, level, img_buffer_offset); - } - - public static void glGetCompressedTextureImageEXT(int texture, int target, int level, java.nio.ByteBuffer img) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetCompressedTextureImageEXT(texture, target, level, img); - } - - public static void glGetCompressedTextureImageEXT(int texture, int target, int level, java.nio.IntBuffer img) { - - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetCompressedTextureImageEXT(texture, target, level, org.lwjgl.MemoryUtil.getAddress(img)); - } - - public static void glGetCompressedTextureImageEXT(int texture, int target, int level, java.nio.ShortBuffer img) { - - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetCompressedTextureImageEXT(texture, target, level, org.lwjgl.MemoryUtil.getAddress(img)); - } - - public static void glGetDoubleEXT(int pname, int index, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetDoublei_vEXT(pname, index, params); - } - - public static double glGetDoubleIndexedEXT(int pname, int index) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetDoubleIndexedEXT(pname, index); - } - - public static void glGetDoubleIndexedEXT(int pname, int index, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetDoubleIndexedvEXT(pname, index, params); - } - - public static void glGetFloatEXT(int pname, int index, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetFloati_vEXT(pname, index, params); - } - - public static float glGetFloatIndexedEXT(int pname, int index) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetFloatIndexedEXT(pname, index); - } - - public static void glGetFloatIndexedEXT(int pname, int index, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetFloatIndexedvEXT(pname, index, params); - } - - public static void glGetFramebufferParameterEXT(int framebuffer, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetFramebufferParameterivEXT(framebuffer, pname, param); - } - - public static int glGetIntegerIndexedEXT(int pname, int index) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetIntegerIndexedEXT(pname, index); - } - - public static void glGetMultiTexEnvEXT(int texunit, int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexEnvfvEXT(texunit, target, pname, params); - } - - public static void glGetMultiTexEnvEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexEnvivEXT(texunit, target, pname, params); - } - - public static void glGetMultiTexGenEXT(int texunit, int coord, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexGendvEXT(texunit, coord, pname, params); - } - - public static void glGetMultiTexGenEXT(int texunit, int coord, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexGenfvEXT(texunit, coord, pname, params); - } - - public static void glGetMultiTexGenEXT(int texunit, int coord, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexGenivEXT(texunit, coord, pname, params); - } - - public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, - long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetMultiTexImageEXT(texunit, target, level, format, type, pixels_buffer_offset); - } - - public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); - } - - public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); - } - - public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); - } - - public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); - } - - public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); - } - - public static void glGetMultiTexLevelParameterEXT(int texunit, int target, int level, int pname, - java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params); - } - - public static void glGetMultiTexLevelParameterEXT(int texunit, int target, int level, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexLevelParameterivEXT(texunit, target, level, pname, params); - } - - public static float glGetMultiTexLevelParameterfEXT(int texunit, int target, int level, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexLevelParameterfEXT(texunit, target, level, pname); - } - - public static int glGetMultiTexLevelParameteriEXT(int texunit, int target, int level, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexLevelParameteriEXT(texunit, target, level, pname); - } - - public static void glGetMultiTexParameterEXT(int texunit, int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterfvEXT(texunit, target, pname, params); - } - - public static void glGetMultiTexParameterEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterivEXT(texunit, target, pname, params); - } - - public static void glGetMultiTexParameterIEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterIivEXT(texunit, target, pname, params); - } - - public static int glGetMultiTexParameterIiEXT(int texunit, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterIiEXT(texunit, target, pname); - } - - public static void glGetMultiTexParameterIuEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterIuivEXT(texunit, target, pname, params); - } - - public static int glGetMultiTexParameterIuiEXT(int texunit, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterIuiEXT(texunit, target, pname); - } - - public static float glGetMultiTexParameterfEXT(int texunit, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameterfEXT(texunit, target, pname); - } - - public static int glGetMultiTexParameteriEXT(int texunit, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetMultiTexParameteriEXT(texunit, target, pname); - } - - public static void glGetNamedBufferParameterEXT(int buffer, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedBufferParameterivEXT(buffer, pname, params); - } - - public static void glGetNamedBufferSubDataEXT(int buffer, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glGetNamedBufferSubDataEXT(int buffer, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glGetNamedBufferSubDataEXT(int buffer, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glGetNamedBufferSubDataEXT(int buffer, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glGetNamedBufferSubDataEXT(int buffer, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glGetNamedFramebufferAttachmentParameterEXT(int framebuffer, int attachment, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params); - } - - public static void glGetNamedProgramEXT(int program, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedProgramivEXT(program, target, pname, params); - } - - public static void glGetNamedProgramLocalParameterEXT(int program, int target, int index, - java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterdvEXT(program, target, index, params); - } - - public static void glGetNamedProgramLocalParameterEXT(int program, int target, int index, - java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterfvEXT(program, target, index, params); - } - - public static void glGetNamedProgramLocalParameterIEXT(int program, int target, int index, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterIivEXT(program, target, index, params); - } - - public static void glGetNamedProgramLocalParameterIuEXT(int program, int target, int index, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterIuivEXT(program, target, index, params); - } - - public static void glGetNamedProgramStringEXT(int program, int target, int pname, java.nio.ByteBuffer string) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedProgramStringEXT(program, target, pname, string); - } - - public static void glGetNamedRenderbufferParameterEXT(int renderbuffer, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetNamedRenderbufferParameterivEXT(renderbuffer, pname, params); - } - - public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, - long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glGetTextureImageEXT(texture, target, level, format, type, pixels_buffer_offset); - } - - public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); - } - - public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); - } - - public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); - } - - public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); - } - - public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); - } - - public static void glGetTextureLevelParameterEXT(int texture, int target, int level, int pname, - java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureLevelParameterfvEXT(texture, target, level, pname, params); - } - - public static void glGetTextureLevelParameterEXT(int texture, int target, int level, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureLevelParameterivEXT(texture, target, level, pname, params); - } - - public static float glGetTextureLevelParameterfEXT(int texture, int target, int level, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureLevelParameterfEXT(texture, target, level, pname); - } - - public static int glGetTextureLevelParameteriEXT(int texture, int target, int level, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureLevelParameteriEXT(texture, target, level, pname); - } - - public static void glGetTextureParameterEXT(int texture, int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterfvEXT(texture, target, pname, params); - } - - public static void glGetTextureParameterEXT(int texture, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterivEXT(texture, target, pname, params); - } - - public static void glGetTextureParameterIEXT(int texture, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterIivEXT(texture, target, pname, params); - } - - public static int glGetTextureParameterIiEXT(int texture, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterIiEXT(texture, target, pname); - } - - public static void glGetTextureParameterIuEXT(int texture, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterIuivEXT(texture, target, pname, params); - } - - public static int glGetTextureParameterIuiEXT(int texture, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterIuiEXT(texture, target, pname); - } - - public static float glGetTextureParameterfEXT(int texture, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameterfEXT(texture, target, pname); - } - - public static int glGetTextureParameteriEXT(int texture, int target, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetTextureParameteriEXT(texture, target, pname); - } - - public static int glGetVertexArrayIntegerEXT(int vaobj, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetVertexArrayIntegerEXT(vaobj, pname); - } - - public static void glGetVertexArrayIntegerEXT(int vaobj, int index, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetVertexArrayIntegeri_vEXT(vaobj, index, pname, param); - } - - public static void glGetVertexArrayIntegerEXT(int vaobj, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glGetVertexArrayIntegervEXT(vaobj, pname, param); - } - - public static int glGetVertexArrayIntegeriEXT(int vaobj, int index, int pname) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glGetVertexArrayIntegeriEXT(vaobj, index, pname); - } - - public static boolean glIsEnabledIndexedEXT(int cap, int index) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glIsEnabledIndexedEXT(cap, index); - } - - public static java.nio.ByteBuffer glMapNamedBufferEXT(int buffer, int access, long length, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glMapNamedBufferEXT(buffer, access, length, old_buffer); - } - - public static java.nio.ByteBuffer glMapNamedBufferEXT(int buffer, int access, java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glMapNamedBufferEXT(buffer, access, old_buffer); - } - - public static java.nio.ByteBuffer glMapNamedBufferRangeEXT(int buffer, long offset, long length, int access, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.EXTDirectStateAccess - .glMapNamedBufferRangeEXT(buffer, offset, length, access, old_buffer); - } - - public static void glMatrixFrustumEXT(int matrixMode, double l, double r, double b, double t, double n, double f) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixFrustumEXT(matrixMode, l, r, b, t, n, f); - } - - public static void glMatrixLoadEXT(int matrixMode, java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixLoaddEXT(matrixMode, m); - } - - public static void glMatrixLoadEXT(int matrixMode, java.nio.FloatBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixLoadfEXT(matrixMode, m); - } - - public static void glMatrixLoadIdentityEXT(int matrixMode) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixLoadIdentityEXT(matrixMode); - } - - public static void glMatrixLoadTransposeEXT(int matrixMode, java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixLoadTransposedEXT(matrixMode, m); - } - - public static void glMatrixLoadTransposeEXT(int matrixMode, java.nio.FloatBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixLoadTransposefEXT(matrixMode, m); - } - - public static void glMatrixMultEXT(int matrixMode, java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixMultdEXT(matrixMode, m); - } - - public static void glMatrixMultEXT(int matrixMode, java.nio.FloatBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixMultfEXT(matrixMode, m); - } - - public static void glMatrixMultTransposeEXT(int matrixMode, java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixMultTransposedEXT(matrixMode, m); - } - - public static void glMatrixMultTransposeEXT(int matrixMode, java.nio.FloatBuffer m) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixMultTransposefEXT(matrixMode, m); - } - - public static void glMatrixOrthoEXT(int matrixMode, double l, double r, double b, double t, double n, double f) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixOrthoEXT(matrixMode, l, r, b, t, n, f); - } - - public static void glMatrixPopEXT(int matrixMode) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixPopEXT(matrixMode); - } - - public static void glMatrixPushEXT(int matrixMode) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixPushEXT(matrixMode); - } - - public static void glMatrixRotatedEXT(int matrixMode, double angle, double x, double y, double z) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixRotatedEXT(matrixMode, angle, x, y, z); - } - - public static void glMatrixRotatefEXT(int matrixMode, float angle, float x, float y, float z) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixRotatefEXT(matrixMode, angle, x, y, z); - } - - public static void glMatrixScaledEXT(int matrixMode, double x, double y, double z) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixScaledEXT(matrixMode, x, y, z); - } - - public static void glMatrixScalefEXT(int matrixMode, float x, float y, float z) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixScalefEXT(matrixMode, x, y, z); - } - - public static void glMatrixTranslatedEXT(int matrixMode, double x, double y, double z) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixTranslatedEXT(matrixMode, x, y, z); - } - - public static void glMatrixTranslatefEXT(int matrixMode, float x, float y, float z) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMatrixTranslatefEXT(matrixMode, x, y, z); - } - - public static void glMultiTexBufferEXT(int texunit, int target, int internalformat, int buffer) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexBufferEXT(texunit, target, internalformat, buffer); - } - - public static void glMultiTexCoordPointerEXT(int texunit, int size, int type, int stride, - long pointer_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexCoordPointerEXT(texunit, size, type, stride, pointer_buffer_offset); - } - - public static void glMultiTexCoordPointerEXT(int texunit, int size, int stride, java.nio.DoubleBuffer pointer) { - - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexCoordPointerEXT( - texunit, - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pointer)); - } - - public static void glMultiTexCoordPointerEXT(int texunit, int size, int stride, java.nio.FloatBuffer pointer) { - - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexCoordPointerEXT(texunit, size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pointer); - } - - public static void glMultiTexEnvEXT(int texunit, int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexEnvfvEXT(texunit, target, pname, params); - } - - public static void glMultiTexEnvEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexEnvivEXT(texunit, target, pname, params); - } - - public static void glMultiTexEnvfEXT(int texunit, int target, int pname, float param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexEnvfEXT(texunit, target, pname, param); - } - - public static void glMultiTexEnviEXT(int texunit, int target, int pname, int param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexEnviEXT(texunit, target, pname, param); - } - - public static void glMultiTexGenEXT(int texunit, int coord, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexGendvEXT(texunit, coord, pname, params); - } - - public static void glMultiTexGenEXT(int texunit, int coord, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexGenfvEXT(texunit, coord, pname, params); - } - - public static void glMultiTexGenEXT(int texunit, int coord, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexGenivEXT(texunit, coord, pname, params); - } - - public static void glMultiTexGendEXT(int texunit, int coord, int pname, double param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexGendEXT(texunit, coord, pname, param); - } - - public static void glMultiTexGenfEXT(int texunit, int coord, int pname, float param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexGenfEXT(texunit, coord, pname, param); - } - - public static void glMultiTexGeniEXT(int texunit, int coord, int pname, int param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexGeniEXT(texunit, coord, pname, param); - } - - public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, - target, - level, - internalformat, - width, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glMultiTexParameterEXT(int texunit, int target, int pname, java.nio.FloatBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterfvEXT(texunit, target, pname, param); - } - - public static void glMultiTexParameterEXT(int texunit, int target, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterivEXT(texunit, target, pname, param); - } - - public static void glMultiTexParameterIEXT(int texunit, int target, int pname, int param) { - - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterIivEXT(texunit, target, pname, new int[] { param }); - } - - public static void glMultiTexParameterIEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterIivEXT(texunit, target, pname, params); - } - - public static void glMultiTexParameterIuEXT(int texunit, int target, int pname, int param) { - - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterIuivEXT(texunit, target, pname, new int[] { param }); - } - - public static void glMultiTexParameterIuEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterIuivEXT(texunit, target, pname, params); - } - - public static void glMultiTexParameterfEXT(int texunit, int target, int pname, float param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameterfEXT(texunit, target, pname, param); - } - - public static void glMultiTexParameteriEXT(int texunit, int target, int pname, int param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexParameteriEXT(texunit, target, pname, param); - } - - public static void glMultiTexRenderbufferEXT(int texunit, int target, int renderbuffer) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexRenderbufferEXT(texunit, target, renderbuffer); - } - - public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, - int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels_buffer_offset); - } - - public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, - int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); - } - - public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, - int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); - } - - public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, - int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); - } - - public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, - int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); - } - - public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, - int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); - } - - public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, - target, - level, - xoffset, - yoffset, - width, - height, - format, - type, - pixels_buffer_offset); - } - - public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_buffer_offset); - } - - public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, - int zoffset, int width, int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glNamedBufferDataEXT(int buffer, long data_size, int usage) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferDataEXT(buffer, data_size, usage); - } - - public static void glNamedBufferDataEXT(int buffer, java.nio.ByteBuffer data, int usage) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferDataEXT(buffer, data, usage); - } - - public static void glNamedBufferDataEXT(int buffer, java.nio.DoubleBuffer data, int usage) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferDataEXT(buffer, data, usage); - } - - public static void glNamedBufferDataEXT(int buffer, java.nio.FloatBuffer data, int usage) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferDataEXT(buffer, data, usage); - } - - public static void glNamedBufferDataEXT(int buffer, java.nio.IntBuffer data, int usage) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferDataEXT(buffer, data, usage); - } - - public static void glNamedBufferDataEXT(int buffer, java.nio.ShortBuffer data, int usage) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferDataEXT(buffer, data, usage); - } - - public static void glNamedBufferSubDataEXT(int buffer, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glNamedBufferSubDataEXT(int buffer, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glNamedBufferSubDataEXT(int buffer, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glNamedBufferSubDataEXT(int buffer, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glNamedBufferSubDataEXT(int buffer, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedBufferSubDataEXT(buffer, offset, data); - } - - public static void glNamedCopyBufferSubDataEXT(int readBuffer, int writeBuffer, long readoffset, long writeoffset, - long size) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedCopyBufferSubDataEXT(readBuffer, writeBuffer, readoffset, writeoffset, size); - } - - public static void glNamedFramebufferRenderbufferEXT(int framebuffer, int attachment, int renderbuffertarget, - int renderbuffer) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer); - } - - public static void glNamedFramebufferTexture1DEXT(int framebuffer, int attachment, int textarget, int texture, - int level) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level); - } - - public static void glNamedFramebufferTexture2DEXT(int framebuffer, int attachment, int textarget, int texture, - int level) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level); - } - - public static void glNamedFramebufferTexture3DEXT(int framebuffer, int attachment, int textarget, int texture, - int level, int zoffset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset); - } - - public static void glNamedFramebufferTextureEXT(int framebuffer, int attachment, int texture, int level) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedFramebufferTextureEXT(framebuffer, attachment, texture, level); - } - - public static void glNamedFramebufferTextureFaceEXT(int framebuffer, int attachment, int texture, int level, - int face) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face); - } - - public static void glNamedFramebufferTextureLayerEXT(int framebuffer, int attachment, int texture, int level, - int layer) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer); - } - - public static void glNamedProgramLocalParameter4EXT(int program, int target, int index, - java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4dvEXT(program, target, index, params); - } - - public static void glNamedProgramLocalParameter4EXT(int program, int target, int index, - java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4fvEXT(program, target, index, params); - } - - public static void glNamedProgramLocalParameter4dEXT(int program, int target, int index, double x, double y, - double z, double w) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w); - } - - public static void glNamedProgramLocalParameter4fEXT(int program, int target, int index, float x, float y, float z, - float w) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w); - } - - public static void glNamedProgramLocalParameterI4EXT(int program, int target, int index, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4ivEXT(program, target, index, params); - } - - public static void glNamedProgramLocalParameterI4iEXT(int program, int target, int index, int x, int y, int z, - int w) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w); - } - - public static void glNamedProgramLocalParameterI4uEXT(int program, int target, int index, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4uivEXT(program, target, index, params); - } - - public static void glNamedProgramLocalParameterI4uiEXT(int program, int target, int index, int x, int y, int z, - int w) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w); - } - - public static void glNamedProgramLocalParameters4EXT(int program, int target, int index, - java.nio.FloatBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParameters4fvEXT(program, target, index, params); - } - - public static void glNamedProgramLocalParametersI4EXT(int program, int target, int index, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParametersI4ivEXT(program, target, index, params); - } - - public static void glNamedProgramLocalParametersI4uEXT(int program, int target, int index, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramLocalParametersI4uivEXT(program, target, index, params); - } - - public static void glNamedProgramStringEXT(int program, int target, int format, java.nio.ByteBuffer string) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedProgramStringEXT(program, target, format, string); - } - - public static void glNamedRenderbufferStorageEXT(int renderbuffer, int internalformat, int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height); - } - - public static void glNamedRenderbufferStorageMultisampleCoverageEXT(int renderbuffer, int coverageSamples, - int colorSamples, int internalformat, int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess.glNamedRenderbufferStorageMultisampleCoverageEXT( - renderbuffer, - coverageSamples, - colorSamples, - internalformat, - width, - height); - } - - public static void glNamedRenderbufferStorageMultisampleEXT(int renderbuffer, int samples, int internalformat, - int width, int height) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glNamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height); - } - - public static void glProgramUniform1EXT(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform1fvEXT(program, location, value); - } - - public static void glProgramUniform1EXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform1ivEXT(program, location, value); - } - - public static void glProgramUniform1fEXT(int program, int location, float v0) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform1fEXT(program, location, v0); - } - - public static void glProgramUniform1iEXT(int program, int location, int v0) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform1iEXT(program, location, v0); - } - - public static void glProgramUniform1uEXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform1uivEXT(program, location, value); - } - - public static void glProgramUniform1uiEXT(int program, int location, int v0) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform1uiEXT(program, location, v0); - } - - public static void glProgramUniform2EXT(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform2fvEXT(program, location, value); - } - - public static void glProgramUniform2EXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform2ivEXT(program, location, value); - } - - public static void glProgramUniform2fEXT(int program, int location, float v0, float v1) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform2fEXT(program, location, v0, v1); - } - - public static void glProgramUniform2iEXT(int program, int location, int v0, int v1) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform2iEXT(program, location, v0, v1); - } - - public static void glProgramUniform2uEXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform2uivEXT(program, location, value); - } - - public static void glProgramUniform2uiEXT(int program, int location, int v0, int v1) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform2uiEXT(program, location, v0, v1); - } - - public static void glProgramUniform3EXT(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform3fvEXT(program, location, value); - } - - public static void glProgramUniform3EXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform3ivEXT(program, location, value); - } - - public static void glProgramUniform3fEXT(int program, int location, float v0, float v1, float v2) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform3fEXT(program, location, v0, v1, v2); - } - - public static void glProgramUniform3iEXT(int program, int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform3iEXT(program, location, v0, v1, v2); - } - - public static void glProgramUniform3uEXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform3uivEXT(program, location, value); - } - - public static void glProgramUniform3uiEXT(int program, int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform3uiEXT(program, location, v0, v1, v2); - } - - public static void glProgramUniform4EXT(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform4fvEXT(program, location, value); - } - - public static void glProgramUniform4EXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform4ivEXT(program, location, value); - } - - public static void glProgramUniform4fEXT(int program, int location, float v0, float v1, float v2, float v3) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform4fEXT(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4iEXT(int program, int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform4iEXT(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4uEXT(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform4uivEXT(program, location, value); - } - - public static void glProgramUniform4uiEXT(int program, int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniform4uiEXT(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniformMatrix2EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix2fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2x3EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix2x3fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2x4EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix2x4fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix3fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3x2EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix3x2fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3x4EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix3x4fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix4fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4x2EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix4x2fvEXT(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4x3EXT(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.EXTDirectStateAccess.glProgramUniformMatrix4x3fvEXT(program, location, transpose, value); - } - - public static void glPushClientAttribDefaultEXT(int mask) { - org.lwjgl3.opengl.EXTDirectStateAccess.glPushClientAttribDefaultEXT(mask); - } - - public static void glTextureBufferEXT(int texture, int target, int internalformat, int buffer) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureBufferEXT(texture, target, internalformat, buffer); - } - - public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, - target, - level, - internalformat, - width, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, - int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, - int height, int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, - target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - } - - public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, - int height, int depth, int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, - target, - level, - internalformat, - width, - height, - depth, - border, - format, - type, - pixels); - } - - public static void glTextureParameterEXT(int texture, int target, int pname, java.nio.FloatBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterfvEXT(texture, target, pname, param); - } - - public static void glTextureParameterEXT(int texture, int target, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterivEXT(texture, target, pname, param); - } - - public static void glTextureParameterIEXT(int texture, int target, int pname, int param) { - - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterIivEXT(texture, target, pname, new int[] { param }); - } - - public static void glTextureParameterIEXT(int texture, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterIivEXT(texture, target, pname, params); - } - - public static void glTextureParameterIuEXT(int texture, int target, int pname, int param) { - - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterIuivEXT(texture, target, pname, new int[] { param }); - } - - public static void glTextureParameterIuEXT(int texture, int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterIuivEXT(texture, target, pname, params); - } - - public static void glTextureParameterfEXT(int texture, int target, int pname, float param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameterfEXT(texture, target, pname, param); - } - - public static void glTextureParameteriEXT(int texture, int target, int pname, int param) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureParameteriEXT(texture, target, pname, param); - } - - public static void glTextureRenderbufferEXT(int texture, int target, int renderbuffer) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureRenderbufferEXT(texture, target, renderbuffer); - } - - public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, - int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels_buffer_offset); - } - - public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, - int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, - int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, - int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, - int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, - int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, - target, - level, - xoffset, - yoffset, - width, - height, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, - int height, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static boolean glUnmapNamedBufferEXT(int buffer) { - return org.lwjgl3.opengl.EXTDirectStateAccess.glUnmapNamedBufferEXT(buffer); - } - - public static void glVertexArrayColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayColorOffsetEXT(vaobj, buffer, size, type, stride, offset); - } - - public static void glVertexArrayEdgeFlagOffsetEXT(int vaobj, int buffer, int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayEdgeFlagOffsetEXT(vaobj, buffer, stride, offset); - } - - public static void glVertexArrayFogCoordOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayFogCoordOffsetEXT(vaobj, buffer, type, stride, offset); - } - - public static void glVertexArrayIndexOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayIndexOffsetEXT(vaobj, buffer, type, stride, offset); - } - - public static void glVertexArrayMultiTexCoordOffsetEXT(int vaobj, int buffer, int texunit, int size, int type, - int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glVertexArrayMultiTexCoordOffsetEXT(vaobj, buffer, texunit, size, type, stride, offset); - } - - public static void glVertexArrayNormalOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayNormalOffsetEXT(vaobj, buffer, type, stride, offset); - } - - public static void glVertexArraySecondaryColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, - long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glVertexArraySecondaryColorOffsetEXT(vaobj, buffer, size, type, stride, offset); - } - - public static void glVertexArrayTexCoordOffsetEXT(int vaobj, int buffer, int size, int type, int stride, - long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayTexCoordOffsetEXT(vaobj, buffer, size, type, stride, offset); - } - - public static void glVertexArrayVertexAttribIOffsetEXT(int vaobj, int buffer, int index, int size, int type, - int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glVertexArrayVertexAttribIOffsetEXT(vaobj, buffer, index, size, type, stride, offset); - } - - public static void glVertexArrayVertexAttribOffsetEXT(int vaobj, int buffer, int index, int size, int type, - boolean normalized, int stride, long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess - .glVertexArrayVertexAttribOffsetEXT(vaobj, buffer, index, size, type, normalized, stride, offset); - } - - public static void glVertexArrayVertexOffsetEXT(int vaobj, int buffer, int size, int type, int stride, - long offset) { - org.lwjgl3.opengl.EXTDirectStateAccess.glVertexArrayVertexOffsetEXT(vaobj, buffer, size, type, stride, offset); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTDrawBuffers2.java b/src/main/java/org/lwjgl/opengl/EXTDrawBuffers2.java deleted file mode 100644 index 032d5d71f..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTDrawBuffers2.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTDrawBuffers2 { - - public static void glColorMaskIndexedEXT(int buf, boolean r, boolean g, boolean b, boolean a) { - org.lwjgl3.opengl.EXTDrawBuffers2.glColorMaskIndexedEXT(buf, r, g, b, a); - } - - public static void glDisableIndexedEXT(int target, int index) { - org.lwjgl3.opengl.EXTDrawBuffers2.glDisableIndexedEXT(target, index); - } - - public static void glEnableIndexedEXT(int target, int index) { - org.lwjgl3.opengl.EXTDrawBuffers2.glEnableIndexedEXT(target, index); - } - - public static boolean glGetBooleanIndexedEXT(int value, int index) { - return org.lwjgl3.opengl.EXTDrawBuffers2.glGetBooleanIndexedEXT(value, index); - } - - public static void glGetBooleanIndexedEXT(int value, int index, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.EXTDrawBuffers2.glGetBooleanIndexedvEXT(value, index, data); - } - - public static int glGetIntegerIndexedEXT(int value, int index) { - return org.lwjgl3.opengl.EXTDrawBuffers2.glGetIntegerIndexedEXT(value, index); - } - - public static void glGetIntegerIndexedEXT(int value, int index, java.nio.IntBuffer data) { - org.lwjgl3.opengl.EXTDrawBuffers2.glGetIntegerIndexedvEXT(value, index, data); - } - - public static boolean glIsEnabledIndexedEXT(int target, int index) { - return org.lwjgl3.opengl.EXTDrawBuffers2.glIsEnabledIndexedEXT(target, index); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTDrawInstanced.java b/src/main/java/org/lwjgl/opengl/EXTDrawInstanced.java deleted file mode 100644 index 9445e5117..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTDrawInstanced.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTDrawInstanced { - - public static void glDrawArraysInstancedEXT(int mode, int first, int count, int primcount) { - org.lwjgl3.opengl.EXTDrawInstanced.glDrawArraysInstancedEXT(mode, first, count, primcount); - } - - public static void glDrawElementsInstancedEXT(int mode, int indices_count, int type, long indices_buffer_offset, - int primcount) { - org.lwjgl3.opengl.EXTDrawInstanced - .glDrawElementsInstancedEXT(mode, indices_count, type, indices_buffer_offset, primcount); - } - - public static void glDrawElementsInstancedEXT(int mode, java.nio.ByteBuffer indices, int primcount) { - org.lwjgl3.opengl.EXTDrawInstanced.glDrawElementsInstancedEXT(mode, indices, primcount); - } - - public static void glDrawElementsInstancedEXT(int mode, java.nio.IntBuffer indices, int primcount) { - org.lwjgl3.opengl.EXTDrawInstanced.glDrawElementsInstancedEXT(mode, indices, primcount); - } - - public static void glDrawElementsInstancedEXT(int mode, java.nio.ShortBuffer indices, int primcount) { - org.lwjgl3.opengl.EXTDrawInstanced.glDrawElementsInstancedEXT(mode, indices, primcount); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTFramebufferBlit.java b/src/main/java/org/lwjgl/opengl/EXTFramebufferBlit.java deleted file mode 100644 index f231060eb..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTFramebufferBlit.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTFramebufferBlit { - - public static final int GL_DRAW_FRAMEBUFFER_BINDING_EXT = (int) 36006; - public static final int GL_DRAW_FRAMEBUFFER_EXT = (int) 36009; - public static final int GL_READ_FRAMEBUFFER_BINDING_EXT = (int) 36010; - public static final int GL_READ_FRAMEBUFFER_EXT = (int) 36008; - - public static void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, - int dstY1, int mask, int filter) { - org.lwjgl3.opengl.EXTFramebufferBlit - .glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisample.java b/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisample.java deleted file mode 100644 index 7831ac818..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisample.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTFramebufferMultisample { - - public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = (int) 36182; - public static final int GL_MAX_SAMPLES_EXT = (int) 36183; - public static final int GL_RENDERBUFFER_SAMPLES_EXT = (int) 36011; - - public static void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, - int height) { - org.lwjgl3.opengl.EXTFramebufferMultisample - .glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java b/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java deleted file mode 100644 index 8f3da65ce..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTFramebufferMultisampleBlitScaled { - - public static final int GL_SCALED_RESOLVE_FASTEST_EXT = (int) 37050; - public static final int GL_SCALED_RESOLVE_NICEST_EXT = (int) 37051; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTFramebufferObject.java b/src/main/java/org/lwjgl/opengl/EXTFramebufferObject.java deleted file mode 100644 index e55d079b4..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTFramebufferObject.java +++ /dev/null @@ -1,154 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTFramebufferObject { - - public static final int GL_COLOR_ATTACHMENT0_EXT = (int) 36064; - public static final int GL_COLOR_ATTACHMENT10_EXT = (int) 36074; - public static final int GL_COLOR_ATTACHMENT11_EXT = (int) 36075; - public static final int GL_COLOR_ATTACHMENT12_EXT = (int) 36076; - public static final int GL_COLOR_ATTACHMENT13_EXT = (int) 36077; - public static final int GL_COLOR_ATTACHMENT14_EXT = (int) 36078; - public static final int GL_COLOR_ATTACHMENT15_EXT = (int) 36079; - public static final int GL_COLOR_ATTACHMENT1_EXT = (int) 36065; - public static final int GL_COLOR_ATTACHMENT2_EXT = (int) 36066; - public static final int GL_COLOR_ATTACHMENT3_EXT = (int) 36067; - public static final int GL_COLOR_ATTACHMENT4_EXT = (int) 36068; - public static final int GL_COLOR_ATTACHMENT5_EXT = (int) 36069; - public static final int GL_COLOR_ATTACHMENT6_EXT = (int) 36070; - public static final int GL_COLOR_ATTACHMENT7_EXT = (int) 36071; - public static final int GL_COLOR_ATTACHMENT8_EXT = (int) 36072; - public static final int GL_COLOR_ATTACHMENT9_EXT = (int) 36073; - public static final int GL_DEPTH_ATTACHMENT_EXT = (int) 36096; - public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = (int) 36049; - public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = (int) 36048; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = (int) 36052; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = (int) 36051; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = (int) 36050; - public static final int GL_FRAMEBUFFER_BINDING_EXT = (int) 36006; - public static final int GL_FRAMEBUFFER_COMPLETE_EXT = (int) 36053; - public static final int GL_FRAMEBUFFER_EXT = (int) 36160; - public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = (int) 36054; - public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = (int) 36057; - public static final int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = (int) 36059; - public static final int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = (int) 36058; - public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = (int) 36055; - public static final int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = (int) 36060; - public static final int GL_FRAMEBUFFER_UNSUPPORTED_EXT = (int) 36061; - public static final int GL_INVALID_FRAMEBUFFER_OPERATION_EXT = (int) 1286; - public static final int GL_MAX_COLOR_ATTACHMENTS_EXT = (int) 36063; - public static final int GL_MAX_RENDERBUFFER_SIZE_EXT = (int) 34024; - public static final int GL_RENDERBUFFER_ALPHA_SIZE_EXT = (int) 36179; - public static final int GL_RENDERBUFFER_BINDING_EXT = (int) 36007; - public static final int GL_RENDERBUFFER_BLUE_SIZE_EXT = (int) 36178; - public static final int GL_RENDERBUFFER_DEPTH_SIZE_EXT = (int) 36180; - public static final int GL_RENDERBUFFER_EXT = (int) 36161; - public static final int GL_RENDERBUFFER_GREEN_SIZE_EXT = (int) 36177; - public static final int GL_RENDERBUFFER_HEIGHT_EXT = (int) 36163; - public static final int GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = (int) 36164; - public static final int GL_RENDERBUFFER_RED_SIZE_EXT = (int) 36176; - public static final int GL_RENDERBUFFER_STENCIL_SIZE_EXT = (int) 36181; - public static final int GL_RENDERBUFFER_WIDTH_EXT = (int) 36162; - public static final int GL_STENCIL_ATTACHMENT_EXT = (int) 36128; - public static final int GL_STENCIL_INDEX16_EXT = (int) 36169; - public static final int GL_STENCIL_INDEX1_EXT = (int) 36166; - public static final int GL_STENCIL_INDEX4_EXT = (int) 36167; - public static final int GL_STENCIL_INDEX8_EXT = (int) 36168; - - public static void glBindFramebufferEXT(int target, int framebuffer) { - org.lwjgl3.opengl.EXTFramebufferObject.glBindFramebufferEXT(target, framebuffer); - } - - public static void glBindRenderbufferEXT(int target, int renderbuffer) { - org.lwjgl3.opengl.EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer); - } - - public static int glCheckFramebufferStatusEXT(int target) { - return org.lwjgl3.opengl.EXTFramebufferObject.glCheckFramebufferStatusEXT(target); - } - - public static void glDeleteFramebuffersEXT(int framebuffer) { - org.lwjgl3.opengl.EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffer); - } - - public static void glDeleteFramebuffersEXT(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffers); - } - - public static void glDeleteRenderbuffersEXT(int renderbuffer) { - org.lwjgl3.opengl.EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer); - } - - public static void glDeleteRenderbuffersEXT(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffers); - } - - public static void glFramebufferRenderbufferEXT(int target, int attachment, int renderbuffertarget, - int renderbuffer) { - org.lwjgl3.opengl.EXTFramebufferObject - .glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); - } - - public static void glFramebufferTexture1DEXT(int target, int attachment, int textarget, int texture, int level) { - org.lwjgl3.opengl.EXTFramebufferObject.glFramebufferTexture1DEXT(target, attachment, textarget, texture, level); - } - - public static void glFramebufferTexture2DEXT(int target, int attachment, int textarget, int texture, int level) { - org.lwjgl3.opengl.EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); - } - - public static void glFramebufferTexture3DEXT(int target, int attachment, int textarget, int texture, int level, - int zoffset) { - org.lwjgl3.opengl.EXTFramebufferObject - .glFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset); - } - - public static int glGenFramebuffersEXT() { - return org.lwjgl3.opengl.EXTFramebufferObject.glGenFramebuffersEXT(); - } - - public static void glGenFramebuffersEXT(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.EXTFramebufferObject.glGenFramebuffersEXT(framebuffers); - } - - public static int glGenRenderbuffersEXT() { - return org.lwjgl3.opengl.EXTFramebufferObject.glGenRenderbuffersEXT(); - } - - public static void glGenRenderbuffersEXT(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.EXTFramebufferObject.glGenRenderbuffersEXT(renderbuffers); - } - - public static void glGenerateMipmapEXT(int target) { - org.lwjgl3.opengl.EXTFramebufferObject.glGenerateMipmapEXT(target); - } - - public static void glGetFramebufferAttachmentParameterEXT(int target, int attachment, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTFramebufferObject - .glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params); - } - - public static int glGetFramebufferAttachmentParameteriEXT(int target, int attachment, int pname) { - return org.lwjgl3.opengl.EXTFramebufferObject.glGetFramebufferAttachmentParameteriEXT(target, attachment, pname); - } - - public static void glGetRenderbufferParameterEXT(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTFramebufferObject.glGetRenderbufferParameterivEXT(target, pname, params); - } - - public static int glGetRenderbufferParameteriEXT(int target, int pname) { - return org.lwjgl3.opengl.EXTFramebufferObject.glGetRenderbufferParameteriEXT(target, pname); - } - - public static boolean glIsFramebufferEXT(int framebuffer) { - return org.lwjgl3.opengl.EXTFramebufferObject.glIsFramebufferEXT(framebuffer); - } - - public static boolean glIsRenderbufferEXT(int renderbuffer) { - return org.lwjgl3.opengl.EXTFramebufferObject.glIsRenderbufferEXT(renderbuffer); - } - - public static void glRenderbufferStorageEXT(int target, int internalformat, int width, int height) { - org.lwjgl3.opengl.EXTFramebufferObject.glRenderbufferStorageEXT(target, internalformat, width, height); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTFramebufferSRGB.java b/src/main/java/org/lwjgl/opengl/EXTFramebufferSRGB.java deleted file mode 100644 index e7e9f32f9..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTFramebufferSRGB.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTFramebufferSRGB { - - public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = (int) 8370; - public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = (int) 36282; - public static final int GL_FRAMEBUFFER_SRGB_EXT = (int) 36281; - public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = (int) 8361; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTGeometryShader4.java b/src/main/java/org/lwjgl/opengl/EXTGeometryShader4.java deleted file mode 100644 index daead0162..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTGeometryShader4.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTGeometryShader4 { - - public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = (int) 36263; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = (int) 36052; - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = (int) 36265; - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = (int) 36264; - public static final int GL_GEOMETRY_INPUT_TYPE_EXT = (int) 36315; - public static final int GL_GEOMETRY_OUTPUT_TYPE_EXT = (int) 36316; - public static final int GL_GEOMETRY_SHADER_EXT = (int) 36313; - public static final int GL_GEOMETRY_VERTICES_OUT_EXT = (int) 36314; - public static final int GL_LINES_ADJACENCY_EXT = (int) 10; - public static final int GL_LINE_STRIP_ADJACENCY_EXT = (int) 11; - public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = (int) 36320; - public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = (int) 35881; - public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = (int) 36321; - public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = (int) 36319; - public static final int GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT = (int) 36317; - public static final int GL_MAX_VARYING_COMPONENTS_EXT = (int) 35659; - public static final int GL_MAX_VERTEX_VARYING_COMPONENTS_EXT = (int) 36318; - public static final int GL_PROGRAM_POINT_SIZE_EXT = (int) 34370; - public static final int GL_TRIANGLES_ADJACENCY_EXT = (int) 12; - public static final int GL_TRIANGLE_STRIP_ADJACENCY_EXT = (int) 13; - - public static void glFramebufferTextureEXT(int target, int attachment, int texture, int level) { - org.lwjgl3.opengl.EXTGeometryShader4.glFramebufferTextureEXT(target, attachment, texture, level); - } - - public static void glFramebufferTextureFaceEXT(int target, int attachment, int texture, int level, int face) { - org.lwjgl3.opengl.EXTGeometryShader4.glFramebufferTextureFaceEXT(target, attachment, texture, level, face); - } - - public static void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer) { - org.lwjgl3.opengl.EXTGeometryShader4.glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); - } - - public static void glProgramParameteriEXT(int program, int pname, int value) { - org.lwjgl3.opengl.EXTGeometryShader4.glProgramParameteriEXT(program, pname, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTPackedDepthStencil.java b/src/main/java/org/lwjgl/opengl/EXTPackedDepthStencil.java deleted file mode 100644 index c86c3214b..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTPackedDepthStencil.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTPackedDepthStencil { - - public static final int GL_DEPTH24_STENCIL8_EXT = (int) 35056; - public static final int GL_DEPTH_STENCIL_EXT = (int) 34041; - public static final int GL_TEXTURE_STENCIL_SIZE_EXT = (int) 35057; - public static final int GL_UNSIGNED_INT_24_8_EXT = (int) 34042; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTPackedFloat.java b/src/main/java/org/lwjgl/opengl/EXTPackedFloat.java deleted file mode 100644 index 642bc5258..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTPackedFloat.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTPackedFloat { - - public static final int GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = (int) 8; - public static final int GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = (int) 8369; - public static final int GL_R11F_G11F_B10F_EXT = (int) 35898; - public static final int GL_RGBA_SIGNED_COMPONENTS_EXT = (int) 35900; - public static final int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = (int) 35899; - public static final int WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = (int) 8360; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTPixelBufferObject.java b/src/main/java/org/lwjgl/opengl/EXTPixelBufferObject.java deleted file mode 100644 index b86543d63..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTPixelBufferObject.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTPixelBufferObject extends org.lwjgl.opengl.ARBBufferObject { - - public static final int GL_PIXEL_PACK_BUFFER_BINDING_EXT = (int) 35053; - public static final int GL_PIXEL_PACK_BUFFER_EXT = (int) 35051; - public static final int GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = (int) 35055; - public static final int GL_PIXEL_UNPACK_BUFFER_EXT = (int) 35052; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTPointParameters.java b/src/main/java/org/lwjgl/opengl/EXTPointParameters.java deleted file mode 100644 index 598316bbe..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTPointParameters.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTPointParameters { - - public static final int GL_DISTANCE_ATTENUATION_EXT = (int) 33065; - public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = (int) 33064; - public static final int GL_POINT_SIZE_MAX_EXT = (int) 33063; - public static final int GL_POINT_SIZE_MIN_EXT = (int) 33062; - - public static void glPointParameterEXT(int pname, java.nio.FloatBuffer pfParams) { - org.lwjgl3.opengl.EXTPointParameters.glPointParameterfvEXT(pname, pfParams); - } - - public static void glPointParameterfEXT(int pname, float param) { - org.lwjgl3.opengl.EXTPointParameters.glPointParameterfEXT(pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTProvokingVertex.java b/src/main/java/org/lwjgl/opengl/EXTProvokingVertex.java deleted file mode 100644 index 5d041add6..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTProvokingVertex.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTProvokingVertex { - - public static final int GL_FIRST_VERTEX_CONVENTION_EXT = (int) 36429; - public static final int GL_LAST_VERTEX_CONVENTION_EXT = (int) 36430; - public static final int GL_PROVOKING_VERTEX_EXT = (int) 36431; - public static final int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = (int) 36428; - - public static void glProvokingVertexEXT(int mode) { - org.lwjgl3.opengl.EXTProvokingVertex.glProvokingVertexEXT(mode); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTSecondaryColor.java b/src/main/java/org/lwjgl/opengl/EXTSecondaryColor.java deleted file mode 100644 index 42a3c4ff6..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTSecondaryColor.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class EXTSecondaryColor { - - public static final int GL_COLOR_SUM_EXT = (int) 33880; - public static final int GL_CURRENT_SECONDARY_COLOR_EXT = (int) 33881; - public static final int GL_SECONDARY_COLOR_ARRAY_EXT = (int) 33886; - public static final int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = (int) 33885; - public static final int GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = (int) 33882; - public static final int GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = (int) 33884; - public static final int GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = (int) 33883; - - public static void glSecondaryColor3bEXT(byte red, byte green, byte blue) { - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColor3bEXT(red, green, blue); - } - - public static void glSecondaryColor3dEXT(double red, double green, double blue) { - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColor3dEXT(red, green, blue); - } - - public static void glSecondaryColor3fEXT(float red, float green, float blue) { - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColor3fEXT(red, green, blue); - } - - public static void glSecondaryColor3ubEXT(byte red, byte green, byte blue) { - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColor3ubEXT(red, green, blue); - } - - public static void glSecondaryColorPointerEXT(int size, int type, int stride, long pPointer_buffer_offset) { - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColorPointerEXT(size, type, stride, pPointer_buffer_offset); - } - - public static void glSecondaryColorPointerEXT(int size, int stride, java.nio.DoubleBuffer pPointer) { - - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColorPointerEXT( - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pPointer)); - } - - public static void glSecondaryColorPointerEXT(int size, int stride, java.nio.FloatBuffer pPointer) { - - org.lwjgl3.opengl.EXTSecondaryColor - .glSecondaryColorPointerEXT(size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pPointer); - } - - public static void glSecondaryColorPointerEXT(int size, boolean unsigned, int stride, - java.nio.ByteBuffer pPointer) { - - org.lwjgl3.opengl.EXTSecondaryColor.glSecondaryColorPointerEXT( - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl3.opengl.GL11.GL_BYTE), - stride, - org.lwjgl.MemoryUtil.getAddress(pPointer)); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTSeparateShaderObjects.java b/src/main/java/org/lwjgl/opengl/EXTSeparateShaderObjects.java deleted file mode 100644 index e309c63ec..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTSeparateShaderObjects.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTSeparateShaderObjects { - - public static final int GL_ACTIVE_PROGRAM_EXT = (int) 35725; - - public static void glActiveProgramEXT(int program) { - org.lwjgl3.opengl.EXTSeparateShaderObjects.glActiveProgramEXT(program); - } - - public static int glCreateShaderProgramEXT(int type, java.lang.CharSequence string) { - return org.lwjgl3.opengl.EXTSeparateShaderObjects.glCreateShaderProgramEXT(type, string); - } - - public static int glCreateShaderProgramEXT(int type, java.nio.ByteBuffer string) { - return org.lwjgl3.opengl.EXTSeparateShaderObjects.glCreateShaderProgramEXT(type, string); - } - - public static void glUseShaderProgramEXT(int type, int program) { - org.lwjgl3.opengl.EXTSeparateShaderObjects.glUseShaderProgramEXT(type, program); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTShaderImageLoadStore.java b/src/main/java/org/lwjgl/opengl/EXTShaderImageLoadStore.java deleted file mode 100644 index fccf0b563..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTShaderImageLoadStore.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTShaderImageLoadStore { - - public static final int GL_ALL_BARRIER_BITS_EXT = (int) -1; - public static final int GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = (int) 4096; - public static final int GL_BUFFER_UPDATE_BARRIER_BIT_EXT = (int) 512; - public static final int GL_COMMAND_BARRIER_BIT_EXT = (int) 64; - public static final int GL_ELEMENT_ARRAY_BARRIER_BIT_EXT = (int) 2; - public static final int GL_FRAMEBUFFER_BARRIER_BIT_EXT = (int) 1024; - public static final int GL_IMAGE_1D_ARRAY_EXT = (int) 36946; - public static final int GL_IMAGE_1D_EXT = (int) 36940; - public static final int GL_IMAGE_2D_ARRAY_EXT = (int) 36947; - public static final int GL_IMAGE_2D_EXT = (int) 36941; - public static final int GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = (int) 36950; - public static final int GL_IMAGE_2D_MULTISAMPLE_EXT = (int) 36949; - public static final int GL_IMAGE_2D_RECT_EXT = (int) 36943; - public static final int GL_IMAGE_3D_EXT = (int) 36942; - public static final int GL_IMAGE_BINDING_ACCESS_EXT = (int) 36670; - public static final int GL_IMAGE_BINDING_FORMAT_EXT = (int) 36974; - public static final int GL_IMAGE_BINDING_LAYERED_EXT = (int) 36668; - public static final int GL_IMAGE_BINDING_LAYER_EXT = (int) 36669; - public static final int GL_IMAGE_BINDING_LEVEL_EXT = (int) 36667; - public static final int GL_IMAGE_BINDING_NAME_EXT = (int) 36666; - public static final int GL_IMAGE_BUFFER_EXT = (int) 36945; - public static final int GL_IMAGE_CUBE_EXT = (int) 36944; - public static final int GL_IMAGE_CUBE_MAP_ARRAY_EXT = (int) 36948; - public static final int GL_INT_IMAGE_1D_ARRAY_EXT = (int) 36957; - public static final int GL_INT_IMAGE_1D_EXT = (int) 36951; - public static final int GL_INT_IMAGE_2D_ARRAY_EXT = (int) 36958; - public static final int GL_INT_IMAGE_2D_EXT = (int) 36952; - public static final int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = (int) 36961; - public static final int GL_INT_IMAGE_2D_MULTISAMPLE_EXT = (int) 36960; - public static final int GL_INT_IMAGE_2D_RECT_EXT = (int) 36954; - public static final int GL_INT_IMAGE_3D_EXT = (int) 36953; - public static final int GL_INT_IMAGE_BUFFER_EXT = (int) 36956; - public static final int GL_INT_IMAGE_CUBE_EXT = (int) 36955; - public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = (int) 36959; - public static final int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = (int) 36665; - public static final int GL_MAX_IMAGE_SAMPLES_EXT = (int) 36973; - public static final int GL_MAX_IMAGE_UNITS_EXT = (int) 36664; - public static final int GL_PIXEL_BUFFER_BARRIER_BIT_EXT = (int) 128; - public static final int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = (int) 32; - public static final int GL_TEXTURE_FETCH_BARRIER_BIT_EXT = (int) 8; - public static final int GL_TEXTURE_UPDATE_BARRIER_BIT_EXT = (int) 256; - public static final int GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = (int) 2048; - public static final int GL_UNIFORM_BARRIER_BIT_EXT = (int) 4; - public static final int GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = (int) 36968; - public static final int GL_UNSIGNED_INT_IMAGE_1D_EXT = (int) 36962; - public static final int GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = (int) 36969; - public static final int GL_UNSIGNED_INT_IMAGE_2D_EXT = (int) 36963; - public static final int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = (int) 36972; - public static final int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = (int) 36971; - public static final int GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT = (int) 36965; - public static final int GL_UNSIGNED_INT_IMAGE_3D_EXT = (int) 36964; - public static final int GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = (int) 36967; - public static final int GL_UNSIGNED_INT_IMAGE_CUBE_EXT = (int) 36966; - public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = (int) 36970; - public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = (int) 1; - - public static void glBindImageTextureEXT(int index, int texture, int level, boolean layered, int layer, int access, - int format) { - org.lwjgl3.opengl.EXTShaderImageLoadStore - .glBindImageTextureEXT(index, texture, level, layered, layer, access, format); - } - - public static void glMemoryBarrierEXT(int barriers) { - org.lwjgl3.opengl.EXTShaderImageLoadStore.glMemoryBarrierEXT(barriers); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTSharedTexturePalette.java b/src/main/java/org/lwjgl/opengl/EXTSharedTexturePalette.java deleted file mode 100644 index 22473293d..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTSharedTexturePalette.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTSharedTexturePalette { - - public static final int GL_SHARED_TEXTURE_PALETTE_EXT = (int) 33275; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTStencilClearTag.java b/src/main/java/org/lwjgl/opengl/EXTStencilClearTag.java deleted file mode 100644 index dcc3c4f65..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTStencilClearTag.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTStencilClearTag { - - public static final int GL_STENCIL_CLEAR_TAG_VALUE_EXT = (int) 35059; - public static final int GL_STENCIL_TAG_BITS_EXT = (int) 35058; - - public static void glStencilClearTagEXT(int stencilTagBits, int stencilClearTag) { - org.lwjgl3.opengl.EXTStencilClearTag.glStencilClearTagEXT(stencilTagBits, stencilClearTag); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTStencilTwoSide.java b/src/main/java/org/lwjgl/opengl/EXTStencilTwoSide.java deleted file mode 100644 index efc4c8059..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTStencilTwoSide.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTStencilTwoSide { - - public static final int GL_ACTIVE_STENCIL_FACE_EXT = (int) 35089; - public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = (int) 35088; - - public static void glActiveStencilFaceEXT(int face) { - org.lwjgl3.opengl.EXTStencilTwoSide.glActiveStencilFaceEXT(face); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTStencilWrap.java b/src/main/java/org/lwjgl/opengl/EXTStencilWrap.java deleted file mode 100644 index f0b0f4193..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTStencilWrap.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTStencilWrap { - - public static final int GL_DECR_WRAP_EXT = (int) 34056; - public static final int GL_INCR_WRAP_EXT = (int) 34055; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureArray.java b/src/main/java/org/lwjgl/opengl/EXTTextureArray.java deleted file mode 100644 index 645f6ca00..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureArray.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureArray { - - public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = (int) 34894; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = (int) 36052; - public static final int GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = (int) 35071; - public static final int GL_PROXY_TEXTURE_1D_ARRAY_EXT = (int) 35865; - public static final int GL_PROXY_TEXTURE_2D_ARRAY_EXT = (int) 35867; - public static final int GL_SAMPLER_1D_ARRAY_EXT = (int) 36288; - public static final int GL_SAMPLER_1D_ARRAY_SHADOW_EXT = (int) 36291; - public static final int GL_SAMPLER_2D_ARRAY_EXT = (int) 36289; - public static final int GL_SAMPLER_2D_ARRAY_SHADOW_EXT = (int) 36292; - public static final int GL_TEXTURE_1D_ARRAY_EXT = (int) 35864; - public static final int GL_TEXTURE_2D_ARRAY_EXT = (int) 35866; - public static final int GL_TEXTURE_BINDING_1D_ARRAY_EXT = (int) 35868; - public static final int GL_TEXTURE_BINDING_2D_ARRAY_EXT = (int) 35869; - - public static void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer) { - org.lwjgl3.opengl.EXTTextureArray.glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureBufferObject.java b/src/main/java/org/lwjgl/opengl/EXTTextureBufferObject.java deleted file mode 100644 index 730e808c7..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureBufferObject.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureBufferObject { - - public static final int GL_MAX_TEXTURE_BUFFER_SIZE_EXT = (int) 35883; - public static final int GL_TEXTURE_BINDING_BUFFER_EXT = (int) 35884; - public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = (int) 35885; - public static final int GL_TEXTURE_BUFFER_EXT = (int) 35882; - public static final int GL_TEXTURE_BUFFER_FORMAT_EXT = (int) 35886; - - public static void glTexBufferEXT(int target, int internalformat, int buffer) { - org.lwjgl3.opengl.EXTTextureBufferObject.glTexBufferEXT(target, internalformat, buffer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureCompressionLATC.java b/src/main/java/org/lwjgl/opengl/EXTTextureCompressionLATC.java deleted file mode 100644 index afbca45e4..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureCompressionLATC.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureCompressionLATC { - - public static final int GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = (int) 35954; - public static final int GL_COMPRESSED_LUMINANCE_LATC1_EXT = (int) 35952; - public static final int GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = (int) 35955; - public static final int GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = (int) 35953; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureCompressionRGTC.java b/src/main/java/org/lwjgl/opengl/EXTTextureCompressionRGTC.java deleted file mode 100644 index 4d2d50b19..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureCompressionRGTC.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureCompressionRGTC { - - public static final int GL_COMPRESSED_RED_GREEN_RGTC2_EXT = (int) 36285; - public static final int GL_COMPRESSED_RED_RGTC1_EXT = (int) 36283; - public static final int GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = (int) 36286; - public static final int GL_COMPRESSED_SIGNED_RED_RGTC1_EXT = (int) 36284; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java b/src/main/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java deleted file mode 100644 index 137b08817..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureCompressionS3TC { - - public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = (int) 33777; - public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = (int) 33778; - public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = (int) 33779; - public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = (int) 33776; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java b/src/main/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java deleted file mode 100644 index ed328ec34..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureFilterAnisotropic { - - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = (int) 34047; - public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = (int) 34046; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureInteger.java b/src/main/java/org/lwjgl/opengl/EXTTextureInteger.java deleted file mode 100644 index 401c59212..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureInteger.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureInteger { - - public static final int GL_ALPHA16I_EXT = (int) 36234; - public static final int GL_ALPHA16UI_EXT = (int) 36216; - public static final int GL_ALPHA32I_EXT = (int) 36228; - public static final int GL_ALPHA32UI_EXT = (int) 36210; - public static final int GL_ALPHA8I_EXT = (int) 36240; - public static final int GL_ALPHA8UI_EXT = (int) 36222; - public static final int GL_ALPHA_INTEGER_EXT = (int) 36247; - public static final int GL_BGRA_INTEGER_EXT = (int) 36251; - public static final int GL_BGR_INTEGER_EXT = (int) 36250; - public static final int GL_BLUE_INTEGER_EXT = (int) 36246; - public static final int GL_GREEN_INTEGER_EXT = (int) 36245; - public static final int GL_INTENSITY16I_EXT = (int) 36235; - public static final int GL_INTENSITY16UI_EXT = (int) 36217; - public static final int GL_INTENSITY32I_EXT = (int) 36229; - public static final int GL_INTENSITY32UI_EXT = (int) 36211; - public static final int GL_INTENSITY8I_EXT = (int) 36241; - public static final int GL_INTENSITY8UI_EXT = (int) 36223; - public static final int GL_LUMINANCE16I_EXT = (int) 36236; - public static final int GL_LUMINANCE16UI_EXT = (int) 36218; - public static final int GL_LUMINANCE32I_EXT = (int) 36230; - public static final int GL_LUMINANCE32UI_EXT = (int) 36212; - public static final int GL_LUMINANCE8I_EXT = (int) 36242; - public static final int GL_LUMINANCE8UI_EXT = (int) 36224; - public static final int GL_LUMINANCE_ALPHA16I_EXT = (int) 36237; - public static final int GL_LUMINANCE_ALPHA16UI_EXT = (int) 36219; - public static final int GL_LUMINANCE_ALPHA32I_EXT = (int) 36231; - public static final int GL_LUMINANCE_ALPHA32UI_EXT = (int) 36213; - public static final int GL_LUMINANCE_ALPHA8I_EXT = (int) 36243; - public static final int GL_LUMINANCE_ALPHA8UI_EXT = (int) 36225; - public static final int GL_LUMINANCE_ALPHA_INTEGER_EXT = (int) 36253; - public static final int GL_LUMINANCE_INTEGER_EXT = (int) 36252; - public static final int GL_RED_INTEGER_EXT = (int) 36244; - public static final int GL_RGB16I_EXT = (int) 36233; - public static final int GL_RGB16UI_EXT = (int) 36215; - public static final int GL_RGB32I_EXT = (int) 36227; - public static final int GL_RGB32UI_EXT = (int) 36209; - public static final int GL_RGB8I_EXT = (int) 36239; - public static final int GL_RGB8UI_EXT = (int) 36221; - public static final int GL_RGBA16I_EXT = (int) 36232; - public static final int GL_RGBA16UI_EXT = (int) 36214; - public static final int GL_RGBA32I_EXT = (int) 36226; - public static final int GL_RGBA32UI_EXT = (int) 36208; - public static final int GL_RGBA8I_EXT = (int) 36238; - public static final int GL_RGBA8UI_EXT = (int) 36220; - public static final int GL_RGBA_INTEGER_EXT = (int) 36249; - public static final int GL_RGBA_INTEGER_MODE_EXT = (int) 36254; - public static final int GL_RGB_INTEGER_EXT = (int) 36248; - - public static void glClearColorIiEXT(int r, int g, int b, int a) { - org.lwjgl3.opengl.EXTTextureInteger.glClearColorIiEXT(r, g, b, a); - } - - public static void glClearColorIuiEXT(int r, int g, int b, int a) { - org.lwjgl3.opengl.EXTTextureInteger.glClearColorIuiEXT(r, g, b, a); - } - - public static void glGetTexParameterIEXT(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTTextureInteger.glGetTexParameterIivEXT(target, pname, params); - } - - public static int glGetTexParameterIiEXT(int target, int pname) { - return org.lwjgl3.opengl.EXTTextureInteger.glGetTexParameterIiEXT(target, pname); - } - - public static void glGetTexParameterIuEXT(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTTextureInteger.glGetTexParameterIuivEXT(target, pname, params); - } - - public static int glGetTexParameterIuiEXT(int target, int pname) { - return org.lwjgl3.opengl.EXTTextureInteger.glGetTexParameterIuiEXT(target, pname); - } - - public static void glTexParameterIEXT(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTTextureInteger.glTexParameterIivEXT(target, pname, params); - } - - public static void glTexParameterIiEXT(int target, int pname, int param) { - org.lwjgl3.opengl.EXTTextureInteger.glTexParameterIiEXT(target, pname, param); - } - - public static void glTexParameterIuEXT(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.EXTTextureInteger.glTexParameterIuivEXT(target, pname, params); - } - - public static void glTexParameterIuiEXT(int target, int pname, int param) { - org.lwjgl3.opengl.EXTTextureInteger.glTexParameterIuiEXT(target, pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java b/src/main/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java deleted file mode 100644 index a8043eb0d..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureMirrorClamp { - - public static final int GL_MIRROR_CLAMP_EXT = (int) 34626; - public static final int GL_MIRROR_CLAMP_TO_BORDER_EXT = (int) 35090; - public static final int GL_MIRROR_CLAMP_TO_EDGE_EXT = (int) 34627; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureSRGB.java b/src/main/java/org/lwjgl/opengl/EXTTextureSRGB.java deleted file mode 100644 index 71e442f4d..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureSRGB.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureSRGB { - - public static final int GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = (int) 35915; - public static final int GL_COMPRESSED_SLUMINANCE_EXT = (int) 35914; - public static final int GL_COMPRESSED_SRGB_ALPHA_EXT = (int) 35913; - public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = (int) 35917; - public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = (int) 35918; - public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = (int) 35919; - public static final int GL_COMPRESSED_SRGB_EXT = (int) 35912; - public static final int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = (int) 35916; - public static final int GL_SLUMINANCE8_ALPHA8_EXT = (int) 35909; - public static final int GL_SLUMINANCE8_EXT = (int) 35911; - public static final int GL_SLUMINANCE_ALPHA_EXT = (int) 35908; - public static final int GL_SLUMINANCE_EXT = (int) 35910; - public static final int GL_SRGB8_ALPHA8_EXT = (int) 35907; - public static final int GL_SRGB8_EXT = (int) 35905; - public static final int GL_SRGB_ALPHA_EXT = (int) 35906; - public static final int GL_SRGB_EXT = (int) 35904; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureSRGBDecode.java b/src/main/java/org/lwjgl/opengl/EXTTextureSRGBDecode.java deleted file mode 100644 index 2ad4bce51..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureSRGBDecode.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureSRGBDecode { - - public static final int GL_DECODE_EXT = (int) 35401; - public static final int GL_SKIP_DECODE_EXT = (int) 35402; - public static final int GL_TEXTURE_SRGB_DECODE_EXT = (int) 35400; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureSharedExponent.java b/src/main/java/org/lwjgl/opengl/EXTTextureSharedExponent.java deleted file mode 100644 index a61e9b816..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureSharedExponent.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureSharedExponent { - - public static final int GL_RGB9_E5_EXT = (int) 35901; - public static final int GL_TEXTURE_SHARED_SIZE_EXT = (int) 35903; - public static final int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = (int) 35902; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureSnorm.java b/src/main/java/org/lwjgl/opengl/EXTTextureSnorm.java deleted file mode 100644 index 6061e3f48..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureSnorm.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureSnorm { - - public static final int GL_ALPHA16_SNORM = (int) 36888; - public static final int GL_ALPHA8_SNORM = (int) 36884; - public static final int GL_ALPHA_SNORM = (int) 36880; - public static final int GL_INTENSITY16_SNORM = (int) 36891; - public static final int GL_INTENSITY8_SNORM = (int) 36887; - public static final int GL_INTENSITY_SNORM = (int) 36883; - public static final int GL_LUMINANCE16_ALPHA16_SNORM = (int) 36890; - public static final int GL_LUMINANCE16_SNORM = (int) 36889; - public static final int GL_LUMINANCE8_ALPHA8_SNORM = (int) 36886; - public static final int GL_LUMINANCE8_SNORM = (int) 36885; - public static final int GL_LUMINANCE_ALPHA_SNORM = (int) 36882; - public static final int GL_LUMINANCE_SNORM = (int) 36881; - public static final int GL_R16_SNORM = (int) 36760; - public static final int GL_R8_SNORM = (int) 36756; - public static final int GL_RED_SNORM = (int) 36752; - public static final int GL_RG16_SNORM = (int) 36761; - public static final int GL_RG8_SNORM = (int) 36757; - public static final int GL_RGB16_SNORM = (int) 36762; - public static final int GL_RGB8_SNORM = (int) 36758; - public static final int GL_RGBA16_SNORM = (int) 36763; - public static final int GL_RGBA8_SNORM = (int) 36759; - public static final int GL_RGBA_SNORM = (int) 36755; - public static final int GL_RGB_SNORM = (int) 36754; - public static final int GL_RG_SNORM = (int) 36753; - public static final int GL_SIGNED_NORMALIZED = (int) 36764; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTextureSwizzle.java b/src/main/java/org/lwjgl/opengl/EXTTextureSwizzle.java deleted file mode 100644 index d815dd104..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTextureSwizzle.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTextureSwizzle { - - public static final int GL_TEXTURE_SWIZZLE_A_EXT = (int) 36421; - public static final int GL_TEXTURE_SWIZZLE_B_EXT = (int) 36420; - public static final int GL_TEXTURE_SWIZZLE_G_EXT = (int) 36419; - public static final int GL_TEXTURE_SWIZZLE_RGBA_EXT = (int) 36422; - public static final int GL_TEXTURE_SWIZZLE_R_EXT = (int) 36418; -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTimerQuery.java b/src/main/java/org/lwjgl/opengl/EXTTimerQuery.java deleted file mode 100644 index 40a30491b..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTimerQuery.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTimerQuery { - - public static final int GL_TIME_ELAPSED_EXT = (int) 35007; - - public static void glGetQueryObjectEXT(int id, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.EXTTimerQuery.glGetQueryObjecti64vEXT(id, pname, params); - } - - public static void glGetQueryObjectuEXT(int id, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.EXTTimerQuery.glGetQueryObjectui64vEXT(id, pname, params); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTTransformFeedback.java b/src/main/java/org/lwjgl/opengl/EXTTransformFeedback.java deleted file mode 100644 index 1aae8f949..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTTransformFeedback.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTTransformFeedback { - - public static final int GL_INTERLEAVED_ATTRIBS_EXT = (int) 35980; - public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = (int) 35978; - public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = (int) 35979; - public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = (int) 35968; - public static final int GL_PRIMITIVES_GENERATED_EXT = (int) 35975; - public static final int GL_RASTERIZER_DISCARD_EXT = (int) 35977; - public static final int GL_SEPARATE_ATTRIBS_EXT = (int) 35981; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = (int) 35983; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_EXT = (int) 35982; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = (int) 35967; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = (int) 35973; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = (int) 35972; - public static final int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = (int) 35976; - public static final int GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = (int) 35971; - public static final int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = (int) 35958; - - public static void glBeginTransformFeedbackEXT(int primitiveMode) { - org.lwjgl3.opengl.EXTTransformFeedback.glBeginTransformFeedbackEXT(primitiveMode); - } - - public static void glBindBufferBaseEXT(int target, int index, int buffer) { - org.lwjgl3.opengl.EXTTransformFeedback.glBindBufferBaseEXT(target, index, buffer); - } - - public static void glBindBufferOffsetEXT(int target, int index, int buffer, long offset) { - org.lwjgl3.opengl.EXTTransformFeedback.glBindBufferOffsetEXT(target, index, buffer, offset); - } - - public static void glBindBufferRangeEXT(int target, int index, int buffer, long offset, long size) { - org.lwjgl3.opengl.EXTTransformFeedback.glBindBufferRangeEXT(target, index, buffer, offset, size); - } - - public static void glEndTransformFeedbackEXT() { - org.lwjgl3.opengl.EXTTransformFeedback.glEndTransformFeedbackEXT(); - } - - public static java.lang.String glGetTransformFeedbackVaryingEXT(int program, int index, int bufSize, - java.nio.IntBuffer size, java.nio.IntBuffer type) { - return org.lwjgl3.opengl.EXTTransformFeedback - .glGetTransformFeedbackVaryingEXT(program, index, bufSize, size, type); - } - - public static void glGetTransformFeedbackVaryingEXT(int program, int index, java.nio.IntBuffer length, - java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.EXTTransformFeedback - .glGetTransformFeedbackVaryingEXT(program, index, length, size, type, name); - } - - public static void glTransformFeedbackVaryingsEXT(int program, java.lang.CharSequence[] varyings, int bufferMode) { - org.lwjgl3.opengl.EXTTransformFeedback.glTransformFeedbackVaryingsEXT(program, varyings, bufferMode); - } -} diff --git a/src/main/java/org/lwjgl/opengl/EXTVertexAttrib64bit.java b/src/main/java/org/lwjgl/opengl/EXTVertexAttrib64bit.java deleted file mode 100644 index 71b2d9dce..000000000 --- a/src/main/java/org/lwjgl/opengl/EXTVertexAttrib64bit.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.lwjgl.opengl; - -public class EXTVertexAttrib64bit { - - public static final int GL_DOUBLE_MAT2_EXT = (int) 36678; - public static final int GL_DOUBLE_MAT2x3_EXT = (int) 36681; - public static final int GL_DOUBLE_MAT2x4_EXT = (int) 36682; - public static final int GL_DOUBLE_MAT3_EXT = (int) 36679; - public static final int GL_DOUBLE_MAT3x2_EXT = (int) 36683; - public static final int GL_DOUBLE_MAT3x4_EXT = (int) 36684; - public static final int GL_DOUBLE_MAT4_EXT = (int) 36680; - public static final int GL_DOUBLE_MAT4x2_EXT = (int) 36685; - public static final int GL_DOUBLE_MAT4x3_EXT = (int) 36686; - public static final int GL_DOUBLE_VEC2_EXT = (int) 36860; - public static final int GL_DOUBLE_VEC3_EXT = (int) 36861; - public static final int GL_DOUBLE_VEC4_EXT = (int) 36862; - - public static void glGetVertexAttribLEXT(int index, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glGetVertexAttribLdvEXT(index, pname, params); - } - - public static void glVertexArrayVertexAttribLOffsetEXT(int vaobj, int buffer, int index, int size, int type, - int stride, long offset) { - org.lwjgl3.opengl.EXTVertexAttrib64bit - .glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); - } - - public static void glVertexAttribL1EXT(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL1dvEXT(index, v); - } - - public static void glVertexAttribL1dEXT(int index, double x) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL1dEXT(index, x); - } - - public static void glVertexAttribL2EXT(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL2dvEXT(index, v); - } - - public static void glVertexAttribL2dEXT(int index, double x, double y) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL2dEXT(index, x, y); - } - - public static void glVertexAttribL3EXT(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL3dvEXT(index, v); - } - - public static void glVertexAttribL3dEXT(int index, double x, double y, double z) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL3dEXT(index, x, y, z); - } - - public static void glVertexAttribL4EXT(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL4dvEXT(index, v); - } - - public static void glVertexAttribL4dEXT(int index, double x, double y, double z, double w) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribL4dEXT(index, x, y, z, w); - } - - public static void glVertexAttribLPointerEXT(int index, int size, int stride, java.nio.DoubleBuffer pointer) { - org.lwjgl3.opengl.EXTVertexAttrib64bit.glVertexAttribLPointerEXT(index, size, stride, pointer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL11.java b/src/main/java/org/lwjgl/opengl/GL11.java deleted file mode 100644 index 4edbc3881..000000000 --- a/src/main/java/org/lwjgl/opengl/GL11.java +++ /dev/null @@ -1,1888 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class GL11 { - - public static final int GL_2D = (int) 1536; - public static final int GL_2_BYTES = (int) 5127; - public static final int GL_3D = (int) 1537; - public static final int GL_3D_COLOR = (int) 1538; - public static final int GL_3D_COLOR_TEXTURE = (int) 1539; - public static final int GL_3_BYTES = (int) 5128; - public static final int GL_4D_COLOR_TEXTURE = (int) 1540; - public static final int GL_4_BYTES = (int) 5129; - public static final int GL_ACCUM = (int) 256; - public static final int GL_ACCUM_ALPHA_BITS = (int) 3419; - public static final int GL_ACCUM_BLUE_BITS = (int) 3418; - public static final int GL_ACCUM_BUFFER_BIT = (int) 512; - public static final int GL_ACCUM_CLEAR_VALUE = (int) 2944; - public static final int GL_ACCUM_GREEN_BITS = (int) 3417; - public static final int GL_ACCUM_RED_BITS = (int) 3416; - public static final int GL_ADD = (int) 260; - public static final int GL_ALL_ATTRIB_BITS = (int) 1048575; - public static final int GL_ALL_CLIENT_ATTRIB_BITS = (int) -1; - public static final int GL_ALPHA12 = (int) 32829; - public static final int GL_ALPHA16 = (int) 32830; - public static final int GL_ALPHA4 = (int) 32827; - public static final int GL_ALPHA8 = (int) 32828; - public static final int GL_ALPHA = (int) 6406; - public static final int GL_ALPHA_BIAS = (int) 3357; - public static final int GL_ALPHA_BITS = (int) 3413; - public static final int GL_ALPHA_SCALE = (int) 3356; - public static final int GL_ALPHA_TEST = (int) 3008; - public static final int GL_ALPHA_TEST_FUNC = (int) 3009; - public static final int GL_ALPHA_TEST_REF = (int) 3010; - public static final int GL_ALWAYS = (int) 519; - public static final int GL_AMBIENT = (int) 4608; - public static final int GL_AMBIENT_AND_DIFFUSE = (int) 5634; - public static final int GL_AND = (int) 5377; - public static final int GL_AND_INVERTED = (int) 5380; - public static final int GL_AND_REVERSE = (int) 5378; - public static final int GL_ATTRIB_STACK_DEPTH = (int) 2992; - public static final int GL_AUTO_NORMAL = (int) 3456; - public static final int GL_AUX0 = (int) 1033; - public static final int GL_AUX1 = (int) 1034; - public static final int GL_AUX2 = (int) 1035; - public static final int GL_AUX3 = (int) 1036; - public static final int GL_AUX_BUFFERS = (int) 3072; - public static final int GL_BACK = (int) 1029; - public static final int GL_BACK_LEFT = (int) 1026; - public static final int GL_BACK_RIGHT = (int) 1027; - public static final int GL_BITMAP = (int) 6656; - public static final int GL_BITMAP_TOKEN = (int) 1796; - public static final int GL_BLEND = (int) 3042; - public static final int GL_BLEND_DST = (int) 3040; - public static final int GL_BLEND_SRC = (int) 3041; - public static final int GL_BLUE = (int) 6405; - public static final int GL_BLUE_BIAS = (int) 3355; - public static final int GL_BLUE_BITS = (int) 3412; - public static final int GL_BLUE_SCALE = (int) 3354; - public static final int GL_BYTE = (int) 5120; - public static final int GL_C3F_V3F = (int) 10788; - public static final int GL_C4F_N3F_V3F = (int) 10790; - public static final int GL_C4UB_V2F = (int) 10786; - public static final int GL_C4UB_V3F = (int) 10787; - public static final int GL_CCW = (int) 2305; - public static final int GL_CLAMP = (int) 10496; - public static final int GL_CLEAR = (int) 5376; - public static final int GL_CLIENT_ATTRIB_STACK_DEPTH = (int) 2993; - public static final int GL_CLIENT_PIXEL_STORE_BIT = (int) 1; - public static final int GL_CLIENT_VERTEX_ARRAY_BIT = (int) 2; - public static final int GL_CLIP_PLANE0 = (int) 12288; - public static final int GL_CLIP_PLANE1 = (int) 12289; - public static final int GL_CLIP_PLANE2 = (int) 12290; - public static final int GL_CLIP_PLANE3 = (int) 12291; - public static final int GL_CLIP_PLANE4 = (int) 12292; - public static final int GL_CLIP_PLANE5 = (int) 12293; - public static final int GL_COEFF = (int) 2560; - public static final int GL_COLOR = (int) 6144; - public static final int GL_COLOR_ARRAY = (int) 32886; - public static final int GL_COLOR_ARRAY_POINTER = (int) 32912; - public static final int GL_COLOR_ARRAY_SIZE = (int) 32897; - public static final int GL_COLOR_ARRAY_STRIDE = (int) 32899; - public static final int GL_COLOR_ARRAY_TYPE = (int) 32898; - public static final int GL_COLOR_BUFFER_BIT = (int) 16384; - public static final int GL_COLOR_CLEAR_VALUE = (int) 3106; - public static final int GL_COLOR_INDEX = (int) 6400; - public static final int GL_COLOR_INDEXES = (int) 5635; - public static final int GL_COLOR_LOGIC_OP = (int) 3058; - public static final int GL_COLOR_MATERIAL = (int) 2903; - public static final int GL_COLOR_MATERIAL_FACE = (int) 2901; - public static final int GL_COLOR_MATERIAL_PARAMETER = (int) 2902; - public static final int GL_COLOR_WRITEMASK = (int) 3107; - public static final int GL_COMPILE = (int) 4864; - public static final int GL_COMPILE_AND_EXECUTE = (int) 4865; - public static final int GL_CONSTANT_ALPHA = (int) 32771; - public static final int GL_CONSTANT_ATTENUATION = (int) 4615; - public static final int GL_CONSTANT_COLOR = (int) 32769; - public static final int GL_COPY = (int) 5379; - public static final int GL_COPY_INVERTED = (int) 5388; - public static final int GL_COPY_PIXEL_TOKEN = (int) 1798; - public static final int GL_CULL_FACE = (int) 2884; - public static final int GL_CULL_FACE_MODE = (int) 2885; - public static final int GL_CURRENT_BIT = (int) 1; - public static final int GL_CURRENT_COLOR = (int) 2816; - public static final int GL_CURRENT_INDEX = (int) 2817; - public static final int GL_CURRENT_NORMAL = (int) 2818; - public static final int GL_CURRENT_RASTER_COLOR = (int) 2820; - public static final int GL_CURRENT_RASTER_DISTANCE = (int) 2825; - public static final int GL_CURRENT_RASTER_INDEX = (int) 2821; - public static final int GL_CURRENT_RASTER_POSITION = (int) 2823; - public static final int GL_CURRENT_RASTER_POSITION_VALID = (int) 2824; - public static final int GL_CURRENT_RASTER_TEXTURE_COORDS = (int) 2822; - public static final int GL_CURRENT_TEXTURE_COORDS = (int) 2819; - public static final int GL_CW = (int) 2304; - public static final int GL_DECAL = (int) 8449; - public static final int GL_DECR = (int) 7683; - public static final int GL_DEPTH = (int) 6145; - public static final int GL_DEPTH_BIAS = (int) 3359; - public static final int GL_DEPTH_BITS = (int) 3414; - public static final int GL_DEPTH_BUFFER_BIT = (int) 256; - public static final int GL_DEPTH_CLEAR_VALUE = (int) 2931; - public static final int GL_DEPTH_COMPONENT = (int) 6402; - public static final int GL_DEPTH_FUNC = (int) 2932; - public static final int GL_DEPTH_RANGE = (int) 2928; - public static final int GL_DEPTH_SCALE = (int) 3358; - public static final int GL_DEPTH_TEST = (int) 2929; - public static final int GL_DEPTH_WRITEMASK = (int) 2930; - public static final int GL_DIFFUSE = (int) 4609; - public static final int GL_DITHER = (int) 3024; - public static final int GL_DOMAIN = (int) 2562; - public static final int GL_DONT_CARE = (int) 4352; - public static final int GL_DOUBLE = (int) 5130; - public static final int GL_DOUBLEBUFFER = (int) 3122; - public static final int GL_DRAW_BUFFER = (int) 3073; - public static final int GL_DRAW_PIXEL_TOKEN = (int) 1797; - public static final int GL_DST_ALPHA = (int) 772; - public static final int GL_DST_COLOR = (int) 774; - public static final int GL_EDGE_FLAG = (int) 2883; - public static final int GL_EDGE_FLAG_ARRAY = (int) 32889; - public static final int GL_EDGE_FLAG_ARRAY_POINTER = (int) 32915; - public static final int GL_EDGE_FLAG_ARRAY_STRIDE = (int) 32908; - public static final int GL_EMISSION = (int) 5632; - public static final int GL_ENABLE_BIT = (int) 8192; - public static final int GL_EQUAL = (int) 514; - public static final int GL_EQUIV = (int) 5385; - public static final int GL_EVAL_BIT = (int) 65536; - public static final int GL_EXP2 = (int) 2049; - public static final int GL_EXP = (int) 2048; - public static final int GL_EXTENSIONS = (int) 7939; - public static final int GL_EYE_LINEAR = (int) 9216; - public static final int GL_EYE_PLANE = (int) 9474; - public static final int GL_FALSE = (int) 0; - public static final int GL_FASTEST = (int) 4353; - public static final int GL_FEEDBACK = (int) 7169; - public static final int GL_FEEDBACK_BUFFER_POINTER = (int) 3568; - public static final int GL_FEEDBACK_BUFFER_SIZE = (int) 3569; - public static final int GL_FEEDBACK_BUFFER_TYPE = (int) 3570; - public static final int GL_FILL = (int) 6914; - public static final int GL_FLAT = (int) 7424; - public static final int GL_FLOAT = (int) 5126; - public static final int GL_FOG = (int) 2912; - public static final int GL_FOG_BIT = (int) 128; - public static final int GL_FOG_COLOR = (int) 2918; - public static final int GL_FOG_DENSITY = (int) 2914; - public static final int GL_FOG_END = (int) 2916; - public static final int GL_FOG_HINT = (int) 3156; - public static final int GL_FOG_INDEX = (int) 2913; - public static final int GL_FOG_MODE = (int) 2917; - public static final int GL_FOG_START = (int) 2915; - public static final int GL_FRONT = (int) 1028; - public static final int GL_FRONT_AND_BACK = (int) 1032; - public static final int GL_FRONT_FACE = (int) 2886; - public static final int GL_FRONT_LEFT = (int) 1024; - public static final int GL_FRONT_RIGHT = (int) 1025; - public static final int GL_GEQUAL = (int) 518; - public static final int GL_GREATER = (int) 516; - public static final int GL_GREEN = (int) 6404; - public static final int GL_GREEN_BIAS = (int) 3353; - public static final int GL_GREEN_BITS = (int) 3411; - public static final int GL_GREEN_SCALE = (int) 3352; - public static final int GL_HINT_BIT = (int) 32768; - public static final int GL_INCR = (int) 7682; - public static final int GL_INDEX_ARRAY = (int) 32887; - public static final int GL_INDEX_ARRAY_POINTER = (int) 32913; - public static final int GL_INDEX_ARRAY_STRIDE = (int) 32902; - public static final int GL_INDEX_ARRAY_TYPE = (int) 32901; - public static final int GL_INDEX_BITS = (int) 3409; - public static final int GL_INDEX_CLEAR_VALUE = (int) 3104; - public static final int GL_INDEX_LOGIC_OP = (int) 3057; - public static final int GL_INDEX_MODE = (int) 3120; - public static final int GL_INDEX_OFFSET = (int) 3347; - public static final int GL_INDEX_SHIFT = (int) 3346; - public static final int GL_INDEX_WRITEMASK = (int) 3105; - public static final int GL_INT = (int) 5124; - public static final int GL_INTENSITY12 = (int) 32844; - public static final int GL_INTENSITY16 = (int) 32845; - public static final int GL_INTENSITY4 = (int) 32842; - public static final int GL_INTENSITY8 = (int) 32843; - public static final int GL_INTENSITY = (int) 32841; - public static final int GL_INVALID_ENUM = (int) 1280; - public static final int GL_INVALID_OPERATION = (int) 1282; - public static final int GL_INVALID_VALUE = (int) 1281; - public static final int GL_INVERT = (int) 5386; - public static final int GL_KEEP = (int) 7680; - public static final int GL_LEFT = (int) 1030; - public static final int GL_LEQUAL = (int) 515; - public static final int GL_LESS = (int) 513; - public static final int GL_LIGHT0 = (int) 16384; - public static final int GL_LIGHT1 = (int) 16385; - public static final int GL_LIGHT2 = (int) 16386; - public static final int GL_LIGHT3 = (int) 16387; - public static final int GL_LIGHT4 = (int) 16388; - public static final int GL_LIGHT5 = (int) 16389; - public static final int GL_LIGHT6 = (int) 16390; - public static final int GL_LIGHT7 = (int) 16391; - public static final int GL_LIGHTING = (int) 2896; - public static final int GL_LIGHTING_BIT = (int) 64; - public static final int GL_LIGHT_MODEL_AMBIENT = (int) 2899; - public static final int GL_LIGHT_MODEL_LOCAL_VIEWER = (int) 2897; - public static final int GL_LIGHT_MODEL_TWO_SIDE = (int) 2898; - public static final int GL_LINE = (int) 6913; - public static final int GL_LINEAR = (int) 9729; - public static final int GL_LINEAR_ATTENUATION = (int) 4616; - public static final int GL_LINEAR_MIPMAP_LINEAR = (int) 9987; - public static final int GL_LINEAR_MIPMAP_NEAREST = (int) 9985; - public static final int GL_LINES = (int) 1; - public static final int GL_LINE_BIT = (int) 4; - public static final int GL_LINE_LOOP = (int) 2; - public static final int GL_LINE_RESET_TOKEN = (int) 1799; - public static final int GL_LINE_SMOOTH = (int) 2848; - public static final int GL_LINE_SMOOTH_HINT = (int) 3154; - public static final int GL_LINE_STIPPLE = (int) 2852; - public static final int GL_LINE_STIPPLE_PATTERN = (int) 2853; - public static final int GL_LINE_STIPPLE_REPEAT = (int) 2854; - public static final int GL_LINE_STRIP = (int) 3; - public static final int GL_LINE_TOKEN = (int) 1794; - public static final int GL_LINE_WIDTH = (int) 2849; - public static final int GL_LINE_WIDTH_GRANULARITY = (int) 2851; - public static final int GL_LINE_WIDTH_RANGE = (int) 2850; - public static final int GL_LIST_BASE = (int) 2866; - public static final int GL_LIST_BIT = (int) 131072; - public static final int GL_LIST_INDEX = (int) 2867; - public static final int GL_LIST_MODE = (int) 2864; - public static final int GL_LOAD = (int) 257; - public static final int GL_LOGIC_OP = (int) 3057; - public static final int GL_LOGIC_OP_MODE = (int) 3056; - public static final int GL_LUMINANCE12 = (int) 32833; - public static final int GL_LUMINANCE12_ALPHA12 = (int) 32839; - public static final int GL_LUMINANCE12_ALPHA4 = (int) 32838; - public static final int GL_LUMINANCE16 = (int) 32834; - public static final int GL_LUMINANCE16_ALPHA16 = (int) 32840; - public static final int GL_LUMINANCE4 = (int) 32831; - public static final int GL_LUMINANCE4_ALPHA4 = (int) 32835; - public static final int GL_LUMINANCE6_ALPHA2 = (int) 32836; - public static final int GL_LUMINANCE8 = (int) 32832; - public static final int GL_LUMINANCE8_ALPHA8 = (int) 32837; - public static final int GL_LUMINANCE = (int) 6409; - public static final int GL_LUMINANCE_ALPHA = (int) 6410; - public static final int GL_MAP1_COLOR_4 = (int) 3472; - public static final int GL_MAP1_GRID_DOMAIN = (int) 3536; - public static final int GL_MAP1_GRID_SEGMENTS = (int) 3537; - public static final int GL_MAP1_INDEX = (int) 3473; - public static final int GL_MAP1_NORMAL = (int) 3474; - public static final int GL_MAP1_TEXTURE_COORD_1 = (int) 3475; - public static final int GL_MAP1_TEXTURE_COORD_2 = (int) 3476; - public static final int GL_MAP1_TEXTURE_COORD_3 = (int) 3477; - public static final int GL_MAP1_TEXTURE_COORD_4 = (int) 3478; - public static final int GL_MAP1_VERTEX_3 = (int) 3479; - public static final int GL_MAP1_VERTEX_4 = (int) 3480; - public static final int GL_MAP2_COLOR_4 = (int) 3504; - public static final int GL_MAP2_GRID_DOMAIN = (int) 3538; - public static final int GL_MAP2_GRID_SEGMENTS = (int) 3539; - public static final int GL_MAP2_INDEX = (int) 3505; - public static final int GL_MAP2_NORMAL = (int) 3506; - public static final int GL_MAP2_TEXTURE_COORD_1 = (int) 3507; - public static final int GL_MAP2_TEXTURE_COORD_2 = (int) 3508; - public static final int GL_MAP2_TEXTURE_COORD_3 = (int) 3509; - public static final int GL_MAP2_TEXTURE_COORD_4 = (int) 3510; - public static final int GL_MAP2_VERTEX_3 = (int) 3511; - public static final int GL_MAP2_VERTEX_4 = (int) 3512; - public static final int GL_MAP_COLOR = (int) 3344; - public static final int GL_MAP_STENCIL = (int) 3345; - public static final int GL_MATRIX_MODE = (int) 2976; - public static final int GL_MAX_ATTRIB_STACK_DEPTH = (int) 3381; - public static final int GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = (int) 3387; - public static final int GL_MAX_CLIP_PLANES = (int) 3378; - public static final int GL_MAX_EVAL_ORDER = (int) 3376; - public static final int GL_MAX_LIGHTS = (int) 3377; - public static final int GL_MAX_LIST_NESTING = (int) 2865; - public static final int GL_MAX_MODELVIEW_STACK_DEPTH = (int) 3382; - public static final int GL_MAX_NAME_STACK_DEPTH = (int) 3383; - public static final int GL_MAX_PIXEL_MAP_TABLE = (int) 3380; - public static final int GL_MAX_PROJECTION_STACK_DEPTH = (int) 3384; - public static final int GL_MAX_TEXTURE_SIZE = (int) 3379; - public static final int GL_MAX_TEXTURE_STACK_DEPTH = (int) 3385; - public static final int GL_MAX_VIEWPORT_DIMS = (int) 3386; - public static final int GL_MODELVIEW = (int) 5888; - public static final int GL_MODELVIEW_MATRIX = (int) 2982; - public static final int GL_MODELVIEW_STACK_DEPTH = (int) 2979; - public static final int GL_MODULATE = (int) 8448; - public static final int GL_MULT = (int) 259; - public static final int GL_N3F_V3F = (int) 10789; - public static final int GL_NAME_STACK_DEPTH = (int) 3440; - public static final int GL_NAND = (int) 5390; - public static final int GL_NEAREST = (int) 9728; - public static final int GL_NEAREST_MIPMAP_LINEAR = (int) 9986; - public static final int GL_NEAREST_MIPMAP_NEAREST = (int) 9984; - public static final int GL_NEVER = (int) 512; - public static final int GL_NICEST = (int) 4354; - public static final int GL_NONE = (int) 0; - public static final int GL_NOOP = (int) 5381; - public static final int GL_NOR = (int) 5384; - public static final int GL_NORMALIZE = (int) 2977; - public static final int GL_NORMAL_ARRAY = (int) 32885; - public static final int GL_NORMAL_ARRAY_POINTER = (int) 32911; - public static final int GL_NORMAL_ARRAY_STRIDE = (int) 32895; - public static final int GL_NORMAL_ARRAY_TYPE = (int) 32894; - public static final int GL_NOTEQUAL = (int) 517; - public static final int GL_NO_ERROR = (int) 0; - public static final int GL_OBJECT_LINEAR = (int) 9217; - public static final int GL_OBJECT_PLANE = (int) 9473; - public static final int GL_ONE = (int) 1; - public static final int GL_ONE_MINUS_CONSTANT_ALPHA = (int) 32772; - public static final int GL_ONE_MINUS_CONSTANT_COLOR = (int) 32770; - public static final int GL_ONE_MINUS_DST_ALPHA = (int) 773; - public static final int GL_ONE_MINUS_DST_COLOR = (int) 775; - public static final int GL_ONE_MINUS_SRC_ALPHA = (int) 771; - public static final int GL_ONE_MINUS_SRC_COLOR = (int) 769; - public static final int GL_OR = (int) 5383; - public static final int GL_ORDER = (int) 2561; - public static final int GL_OR_INVERTED = (int) 5389; - public static final int GL_OR_REVERSE = (int) 5387; - public static final int GL_OUT_OF_MEMORY = (int) 1285; - public static final int GL_PACK_ALIGNMENT = (int) 3333; - public static final int GL_PACK_LSB_FIRST = (int) 3329; - public static final int GL_PACK_ROW_LENGTH = (int) 3330; - public static final int GL_PACK_SKIP_PIXELS = (int) 3332; - public static final int GL_PACK_SKIP_ROWS = (int) 3331; - public static final int GL_PACK_SWAP_BYTES = (int) 3328; - public static final int GL_PASS_THROUGH_TOKEN = (int) 1792; - public static final int GL_PERSPECTIVE_CORRECTION_HINT = (int) 3152; - public static final int GL_PIXEL_MAP_A_TO_A = (int) 3193; - public static final int GL_PIXEL_MAP_A_TO_A_SIZE = (int) 3257; - public static final int GL_PIXEL_MAP_B_TO_B = (int) 3192; - public static final int GL_PIXEL_MAP_B_TO_B_SIZE = (int) 3256; - public static final int GL_PIXEL_MAP_G_TO_G = (int) 3191; - public static final int GL_PIXEL_MAP_G_TO_G_SIZE = (int) 3255; - public static final int GL_PIXEL_MAP_I_TO_A = (int) 3189; - public static final int GL_PIXEL_MAP_I_TO_A_SIZE = (int) 3253; - public static final int GL_PIXEL_MAP_I_TO_B = (int) 3188; - public static final int GL_PIXEL_MAP_I_TO_B_SIZE = (int) 3252; - public static final int GL_PIXEL_MAP_I_TO_G = (int) 3187; - public static final int GL_PIXEL_MAP_I_TO_G_SIZE = (int) 3251; - public static final int GL_PIXEL_MAP_I_TO_I = (int) 3184; - public static final int GL_PIXEL_MAP_I_TO_I_SIZE = (int) 3248; - public static final int GL_PIXEL_MAP_I_TO_R = (int) 3186; - public static final int GL_PIXEL_MAP_I_TO_R_SIZE = (int) 3250; - public static final int GL_PIXEL_MAP_R_TO_R = (int) 3190; - public static final int GL_PIXEL_MAP_R_TO_R_SIZE = (int) 3254; - public static final int GL_PIXEL_MAP_S_TO_S = (int) 3185; - public static final int GL_PIXEL_MAP_S_TO_S_SIZE = (int) 3249; - public static final int GL_PIXEL_MODE_BIT = (int) 32; - public static final int GL_POINT = (int) 6912; - public static final int GL_POINTS = (int) 0; - public static final int GL_POINT_BIT = (int) 2; - public static final int GL_POINT_SIZE = (int) 2833; - public static final int GL_POINT_SIZE_GRANULARITY = (int) 2835; - public static final int GL_POINT_SIZE_RANGE = (int) 2834; - public static final int GL_POINT_SMOOTH = (int) 2832; - public static final int GL_POINT_SMOOTH_HINT = (int) 3153; - public static final int GL_POINT_TOKEN = (int) 1793; - public static final int GL_POLYGON = (int) 9; - public static final int GL_POLYGON_BIT = (int) 8; - public static final int GL_POLYGON_MODE = (int) 2880; - public static final int GL_POLYGON_OFFSET_FACTOR = (int) 32824; - public static final int GL_POLYGON_OFFSET_FILL = (int) 32823; - public static final int GL_POLYGON_OFFSET_LINE = (int) 10754; - public static final int GL_POLYGON_OFFSET_POINT = (int) 10753; - public static final int GL_POLYGON_OFFSET_UNITS = (int) 10752; - public static final int GL_POLYGON_SMOOTH = (int) 2881; - public static final int GL_POLYGON_SMOOTH_HINT = (int) 3155; - public static final int GL_POLYGON_STIPPLE = (int) 2882; - public static final int GL_POLYGON_STIPPLE_BIT = (int) 16; - public static final int GL_POLYGON_TOKEN = (int) 1795; - public static final int GL_POSITION = (int) 4611; - public static final int GL_PROJECTION = (int) 5889; - public static final int GL_PROJECTION_MATRIX = (int) 2983; - public static final int GL_PROJECTION_STACK_DEPTH = (int) 2980; - public static final int GL_PROXY_TEXTURE_1D = (int) 32867; - public static final int GL_PROXY_TEXTURE_2D = (int) 32868; - public static final int GL_Q = (int) 8195; - public static final int GL_QUADRATIC_ATTENUATION = (int) 4617; - public static final int GL_QUADS = (int) 7; - public static final int GL_QUAD_STRIP = (int) 8; - public static final int GL_R3_G3_B2 = (int) 10768; - public static final int GL_R = (int) 8194; - public static final int GL_READ_BUFFER = (int) 3074; - public static final int GL_RED = (int) 6403; - public static final int GL_RED_BIAS = (int) 3349; - public static final int GL_RED_BITS = (int) 3410; - public static final int GL_RED_SCALE = (int) 3348; - public static final int GL_RENDER = (int) 7168; - public static final int GL_RENDERER = (int) 7937; - public static final int GL_RENDER_MODE = (int) 3136; - public static final int GL_REPEAT = (int) 10497; - public static final int GL_REPLACE = (int) 7681; - public static final int GL_RETURN = (int) 258; - public static final int GL_RGB10 = (int) 32850; - public static final int GL_RGB10_A2 = (int) 32857; - public static final int GL_RGB12 = (int) 32851; - public static final int GL_RGB16 = (int) 32852; - public static final int GL_RGB4 = (int) 32847; - public static final int GL_RGB5 = (int) 32848; - public static final int GL_RGB5_A1 = (int) 32855; - public static final int GL_RGB8 = (int) 32849; - public static final int GL_RGB = (int) 6407; - public static final int GL_RGBA12 = (int) 32858; - public static final int GL_RGBA16 = (int) 32859; - public static final int GL_RGBA2 = (int) 32853; - public static final int GL_RGBA4 = (int) 32854; - public static final int GL_RGBA8 = (int) 32856; - public static final int GL_RGBA = (int) 6408; - public static final int GL_RGBA_MODE = (int) 3121; - public static final int GL_RIGHT = (int) 1031; - public static final int GL_S = (int) 8192; - public static final int GL_SCISSOR_BIT = (int) 524288; - public static final int GL_SCISSOR_BOX = (int) 3088; - public static final int GL_SCISSOR_TEST = (int) 3089; - public static final int GL_SELECT = (int) 7170; - public static final int GL_SELECTION_BUFFER_POINTER = (int) 3571; - public static final int GL_SELECTION_BUFFER_SIZE = (int) 3572; - public static final int GL_SET = (int) 5391; - public static final int GL_SHADE_MODEL = (int) 2900; - public static final int GL_SHININESS = (int) 5633; - public static final int GL_SHORT = (int) 5122; - public static final int GL_SMOOTH = (int) 7425; - public static final int GL_SPECULAR = (int) 4610; - public static final int GL_SPHERE_MAP = (int) 9218; - public static final int GL_SPOT_CUTOFF = (int) 4614; - public static final int GL_SPOT_DIRECTION = (int) 4612; - public static final int GL_SPOT_EXPONENT = (int) 4613; - public static final int GL_SRC_ALPHA = (int) 770; - public static final int GL_SRC_ALPHA_SATURATE = (int) 776; - public static final int GL_SRC_COLOR = (int) 768; - public static final int GL_STACK_OVERFLOW = (int) 1283; - public static final int GL_STACK_UNDERFLOW = (int) 1284; - public static final int GL_STENCIL = (int) 6146; - public static final int GL_STENCIL_BITS = (int) 3415; - public static final int GL_STENCIL_BUFFER_BIT = (int) 1024; - public static final int GL_STENCIL_CLEAR_VALUE = (int) 2961; - public static final int GL_STENCIL_FAIL = (int) 2964; - public static final int GL_STENCIL_FUNC = (int) 2962; - public static final int GL_STENCIL_INDEX = (int) 6401; - public static final int GL_STENCIL_PASS_DEPTH_FAIL = (int) 2965; - public static final int GL_STENCIL_PASS_DEPTH_PASS = (int) 2966; - public static final int GL_STENCIL_REF = (int) 2967; - public static final int GL_STENCIL_TEST = (int) 2960; - public static final int GL_STENCIL_VALUE_MASK = (int) 2963; - public static final int GL_STENCIL_WRITEMASK = (int) 2968; - public static final int GL_STEREO = (int) 3123; - public static final int GL_SUBPIXEL_BITS = (int) 3408; - public static final int GL_T2F_C3F_V3F = (int) 10794; - public static final int GL_T2F_C4F_N3F_V3F = (int) 10796; - public static final int GL_T2F_C4UB_V3F = (int) 10793; - public static final int GL_T2F_N3F_V3F = (int) 10795; - public static final int GL_T2F_V3F = (int) 10791; - public static final int GL_T4F_C4F_N3F_V4F = (int) 10797; - public static final int GL_T4F_V4F = (int) 10792; - public static final int GL_T = (int) 8193; - public static final int GL_TEXTURE = (int) 5890; - public static final int GL_TEXTURE_1D = (int) 3552; - public static final int GL_TEXTURE_2D = (int) 3553; - public static final int GL_TEXTURE_ALPHA_SIZE = (int) 32863; - public static final int GL_TEXTURE_BINDING_1D = (int) 32872; - public static final int GL_TEXTURE_BINDING_2D = (int) 32873; - public static final int GL_TEXTURE_BIT = (int) 262144; - public static final int GL_TEXTURE_BLUE_SIZE = (int) 32862; - public static final int GL_TEXTURE_BORDER = (int) 4101; - public static final int GL_TEXTURE_BORDER_COLOR = (int) 4100; - public static final int GL_TEXTURE_COMPONENTS = (int) 4099; - public static final int GL_TEXTURE_COORD_ARRAY = (int) 32888; - public static final int GL_TEXTURE_COORD_ARRAY_POINTER = (int) 32914; - public static final int GL_TEXTURE_COORD_ARRAY_SIZE = (int) 32904; - public static final int GL_TEXTURE_COORD_ARRAY_STRIDE = (int) 32906; - public static final int GL_TEXTURE_COORD_ARRAY_TYPE = (int) 32905; - public static final int GL_TEXTURE_ENV = (int) 8960; - public static final int GL_TEXTURE_ENV_COLOR = (int) 8705; - public static final int GL_TEXTURE_ENV_MODE = (int) 8704; - public static final int GL_TEXTURE_GEN_MODE = (int) 9472; - public static final int GL_TEXTURE_GEN_Q = (int) 3171; - public static final int GL_TEXTURE_GEN_R = (int) 3170; - public static final int GL_TEXTURE_GEN_S = (int) 3168; - public static final int GL_TEXTURE_GEN_T = (int) 3169; - public static final int GL_TEXTURE_GREEN_SIZE = (int) 32861; - public static final int GL_TEXTURE_HEIGHT = (int) 4097; - public static final int GL_TEXTURE_INTENSITY_SIZE = (int) 32865; - public static final int GL_TEXTURE_INTERNAL_FORMAT = (int) 4099; - public static final int GL_TEXTURE_LUMINANCE_SIZE = (int) 32864; - public static final int GL_TEXTURE_MAG_FILTER = (int) 10240; - public static final int GL_TEXTURE_MATRIX = (int) 2984; - public static final int GL_TEXTURE_MIN_FILTER = (int) 10241; - public static final int GL_TEXTURE_PRIORITY = (int) 32870; - public static final int GL_TEXTURE_RED_SIZE = (int) 32860; - public static final int GL_TEXTURE_RESIDENT = (int) 32871; - public static final int GL_TEXTURE_STACK_DEPTH = (int) 2981; - public static final int GL_TEXTURE_WIDTH = (int) 4096; - public static final int GL_TEXTURE_WRAP_S = (int) 10242; - public static final int GL_TEXTURE_WRAP_T = (int) 10243; - public static final int GL_TRANSFORM_BIT = (int) 4096; - public static final int GL_TRIANGLES = (int) 4; - public static final int GL_TRIANGLE_FAN = (int) 6; - public static final int GL_TRIANGLE_STRIP = (int) 5; - public static final int GL_TRUE = (int) 1; - public static final int GL_UNPACK_ALIGNMENT = (int) 3317; - public static final int GL_UNPACK_LSB_FIRST = (int) 3313; - public static final int GL_UNPACK_ROW_LENGTH = (int) 3314; - public static final int GL_UNPACK_SKIP_PIXELS = (int) 3316; - public static final int GL_UNPACK_SKIP_ROWS = (int) 3315; - public static final int GL_UNPACK_SWAP_BYTES = (int) 3312; - public static final int GL_UNSIGNED_BYTE = (int) 5121; - public static final int GL_UNSIGNED_INT = (int) 5125; - public static final int GL_UNSIGNED_SHORT = (int) 5123; - public static final int GL_V2F = (int) 10784; - public static final int GL_V3F = (int) 10785; - public static final int GL_VENDOR = (int) 7936; - public static final int GL_VERSION = (int) 7938; - public static final int GL_VERTEX_ARRAY = (int) 32884; - public static final int GL_VERTEX_ARRAY_POINTER = (int) 32910; - public static final int GL_VERTEX_ARRAY_SIZE = (int) 32890; - public static final int GL_VERTEX_ARRAY_STRIDE = (int) 32892; - public static final int GL_VERTEX_ARRAY_TYPE = (int) 32891; - public static final int GL_VIEWPORT = (int) 2978; - public static final int GL_VIEWPORT_BIT = (int) 2048; - public static final int GL_XOR = (int) 5382; - public static final int GL_ZERO = (int) 0; - public static final int GL_ZOOM_X = (int) 3350; - public static final int GL_ZOOM_Y = (int) 3351; - - public static void glAccum(int op, float value) { - org.lwjgl3.opengl.GL11.glAccum(op, value); - } - - public static void glAlphaFunc(int func, float ref) { - org.lwjgl3.opengl.GL11.glAlphaFunc(func, ref); - } - - public static boolean glAreTexturesResident(java.nio.IntBuffer textures, java.nio.ByteBuffer residences) { - return org.lwjgl3.opengl.GL11.glAreTexturesResident(textures, residences); - } - - public static void glArrayElement(int i) { - org.lwjgl3.opengl.GL11.glArrayElement(i); - } - - public static void glBegin(int mode) { - org.lwjgl3.opengl.GL11.glBegin(mode); - } - - public static void glBindTexture(int target, int texture) { - org.lwjgl3.opengl.GL11.glBindTexture(target, texture); - } - - public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, - long bitmap_buffer_offset) { - org.lwjgl3.opengl.GL11.glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap_buffer_offset); - } - - public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, - java.nio.ByteBuffer bitmap) { - org.lwjgl3.opengl.GL11.glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap); - } - - public static void glBlendFunc(int sfactor, int dfactor) { - org.lwjgl3.opengl.GL11.glBlendFunc(sfactor, dfactor); - } - - public static void glCallList(int list) { - org.lwjgl3.opengl.GL11.glCallList(list); - } - - public static void glCallLists(java.nio.ByteBuffer lists) { - org.lwjgl3.opengl.GL11.glCallLists(lists); - } - - public static void glCallLists(java.nio.IntBuffer lists) { - org.lwjgl3.opengl.GL11.glCallLists(lists); - } - - public static void glCallLists(java.nio.ShortBuffer lists) { - org.lwjgl3.opengl.GL11.glCallLists(lists); - } - - public static void glClear(int mask) { - org.lwjgl3.opengl.GL11.glClear(mask); - } - - public static void glClearAccum(float red, float green, float blue, float alpha) { - org.lwjgl3.opengl.GL11.glClearAccum(red, green, blue, alpha); - } - - public static void glClearColor(float red, float green, float blue, float alpha) { - org.lwjgl3.opengl.GL11.glClearColor(red, green, blue, alpha); - } - - public static void glClearDepth(double depth) { - org.lwjgl3.opengl.GL11.glClearDepth(depth); - } - - public static void glClearStencil(int s) { - org.lwjgl3.opengl.GL11.glClearStencil(s); - } - - public static void glClipPlane(int plane, java.nio.DoubleBuffer equation) { - org.lwjgl3.opengl.GL11.glClipPlane(plane, equation); - } - - public static void glColor3b(byte red, byte green, byte blue) { - org.lwjgl3.opengl.GL11.glColor3b(red, green, blue); - } - - public static void glColor3d(double red, double green, double blue) { - org.lwjgl3.opengl.GL11.glColor3d(red, green, blue); - } - - public static void glColor3f(float red, float green, float blue) { - org.lwjgl3.opengl.GL11.glColor3f(red, green, blue); - } - - private static final int UNSIGNED_BYTE_TO_INT_RATIO = Integer.MAX_VALUE / 255; - - public static void glColor3ub(byte red, byte green, byte blue) { - org.lwjgl3.opengl.GL11.glColor3i( - (red & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO, - (green & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO, - (blue & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO); - } - - public static void glColor4b(byte red, byte green, byte blue, byte alpha) { - org.lwjgl3.opengl.GL11.glColor4b(red, green, blue, alpha); - } - - public static void glColor4d(double red, double green, double blue, double alpha) { - org.lwjgl3.opengl.GL11.glColor4d(red, green, blue, alpha); - } - - public static void glColor4f(float red, float green, float blue, float alpha) { - org.lwjgl3.opengl.GL11.glColor4f(red, green, blue, alpha); - } - - public static void glColor4ub(byte red, byte green, byte blue, byte alpha) { - org.lwjgl3.opengl.GL11.glColor4i( - (red & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO, - (green & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO, - (blue & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO, - (alpha & 0xff) * UNSIGNED_BYTE_TO_INT_RATIO); - } - - public static void glColorMask(boolean red, boolean green, boolean blue, boolean alpha) { - org.lwjgl3.opengl.GL11.glColorMask(red, green, blue, alpha); - } - - public static void glColorMaterial(int face, int mode) { - org.lwjgl3.opengl.GL11.glColorMaterial(face, mode); - } - - public static void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) { - org.lwjgl3.opengl.GL11.glColorPointer(size, type, stride, pointer_buffer_offset); - } - - public static void glColorPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) { - org.lwjgl3.opengl.GL11.glColorPointer(size, type, stride, pointer); - } - - public static void glColorPointer(int size, int stride, java.nio.DoubleBuffer pointer) { - - org.lwjgl3.opengl.GL11.glColorPointer( - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pointer)); - } - - public static void glColorPointer(int size, int stride, java.nio.FloatBuffer pointer) { - - org.lwjgl3.opengl.GL11.glColorPointer(size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pointer); - } - - public static void glColorPointer(int size, boolean unsigned, int stride, java.nio.ByteBuffer pointer) { - - org.lwjgl3.opengl.GL11.glColorPointer( - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl3.opengl.GL11.GL_BYTE), - stride, - org.lwjgl.MemoryUtil.getAddress(pointer)); - } - - public static void glCopyPixels(int x, int y, int width, int height, int type) { - org.lwjgl3.opengl.GL11.glCopyPixels(x, y, width, height, type); - } - - public static void glCopyTexImage1D(int target, int level, int internalFormat, int x, int y, int width, - int border) { - org.lwjgl3.opengl.GL11.glCopyTexImage1D(target, level, internalFormat, x, y, width, border); - } - - public static void glCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, - int border) { - org.lwjgl3.opengl.GL11.glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border); - } - - public static void glCopyTexSubImage1D(int target, int level, int xoffset, int x, int y, int width) { - org.lwjgl3.opengl.GL11.glCopyTexSubImage1D(target, level, xoffset, x, y, width); - } - - public static void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, - int height) { - org.lwjgl3.opengl.GL11.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); - } - - public static void glCullFace(int mode) { - org.lwjgl3.opengl.GL11.glCullFace(mode); - } - - public static void glDeleteLists(int list, int range) { - org.lwjgl3.opengl.GL11.glDeleteLists(list, range); - } - - public static void glDeleteTextures(int texture) { - org.lwjgl3.opengl.GL11.glDeleteTextures(texture); - } - - public static void glDeleteTextures(java.nio.IntBuffer textures) { - org.lwjgl3.opengl.GL11.glDeleteTextures(textures); - } - - public static void glDepthFunc(int func) { - org.lwjgl3.opengl.GL11.glDepthFunc(func); - } - - public static void glDepthMask(boolean flag) { - org.lwjgl3.opengl.GL11.glDepthMask(flag); - } - - public static void glDepthRange(double zNear, double zFar) { - org.lwjgl3.opengl.GL11.glDepthRange(zNear, zFar); - } - - public static void glDisable(int cap) { - org.lwjgl3.opengl.GL11.glDisable(cap); - } - - public static void glDisableClientState(int cap) { - org.lwjgl3.opengl.GL11.glDisableClientState(cap); - } - - public static void glDrawArrays(int mode, int first, int count) { - org.lwjgl3.opengl.GL11.glDrawArrays(mode, first, count); - } - - public static void glDrawBuffer(int mode) { - org.lwjgl3.opengl.GL11.glDrawBuffer(mode); - } - - public static void glDrawElements(int mode, int indices_count, int type, long indices_buffer_offset) { - org.lwjgl3.opengl.GL11.glDrawElements(mode, indices_count, type, indices_buffer_offset); - } - - public static void glDrawElements(int mode, int count, int type, java.nio.ByteBuffer indices) { - - org.lwjgl3.opengl.GL11.glDrawElements(mode, count, type, org.lwjgl.MemoryUtil.getAddress(indices)); - } - - public static void glDrawElements(int mode, java.nio.ByteBuffer indices) { - org.lwjgl3.opengl.GL11.glDrawElements(mode, indices); - } - - public static void glDrawElements(int mode, java.nio.IntBuffer indices) { - org.lwjgl3.opengl.GL11.glDrawElements(mode, indices); - } - - public static void glDrawElements(int mode, java.nio.ShortBuffer indices) { - org.lwjgl3.opengl.GL11.glDrawElements(mode, indices); - } - - public static void glDrawPixels(int width, int height, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11.glDrawPixels(width, height, format, type, pixels_buffer_offset); - } - - public static void glDrawPixels(int width, int height, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glDrawPixels(width, height, format, type, pixels); - } - - public static void glDrawPixels(int width, int height, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glDrawPixels(width, height, format, type, pixels); - } - - public static void glDrawPixels(int width, int height, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glDrawPixels(width, height, format, type, pixels); - } - - public static void glEdgeFlag(boolean flag) { - org.lwjgl3.opengl.GL11.glEdgeFlag(flag); - } - - public static void glEdgeFlagPointer(int stride, long pointer_buffer_offset) { - org.lwjgl3.opengl.GL11.glEdgeFlagPointer(stride, pointer_buffer_offset); - } - - public static void glEdgeFlagPointer(int stride, java.nio.ByteBuffer pointer) { - org.lwjgl3.opengl.GL11.glEdgeFlagPointer(stride, pointer); - } - - public static void glEnable(int cap) { - org.lwjgl3.opengl.GL11.glEnable(cap); - } - - public static void glEnableClientState(int cap) { - org.lwjgl3.opengl.GL11.glEnableClientState(cap); - } - - public static void glEnd() { - org.lwjgl3.opengl.GL11.glEnd(); - } - - public static void glEndList() { - org.lwjgl3.opengl.GL11.glEndList(); - } - - public static void glEvalCoord1d(double u) { - org.lwjgl3.opengl.GL11.glEvalCoord1d(u); - } - - public static void glEvalCoord1f(float u) { - org.lwjgl3.opengl.GL11.glEvalCoord1f(u); - } - - public static void glEvalCoord2d(double u, double v) { - org.lwjgl3.opengl.GL11.glEvalCoord2d(u, v); - } - - public static void glEvalCoord2f(float u, float v) { - org.lwjgl3.opengl.GL11.glEvalCoord2f(u, v); - } - - public static void glEvalMesh1(int mode, int i1, int i2) { - org.lwjgl3.opengl.GL11.glEvalMesh1(mode, i1, i2); - } - - public static void glEvalMesh2(int mode, int i1, int i2, int j1, int j2) { - org.lwjgl3.opengl.GL11.glEvalMesh2(mode, i1, i2, j1, j2); - } - - public static void glEvalPoint1(int i) { - org.lwjgl3.opengl.GL11.glEvalPoint1(i); - } - - public static void glEvalPoint2(int i, int j) { - org.lwjgl3.opengl.GL11.glEvalPoint2(i, j); - } - - public static void glFeedbackBuffer(int type, java.nio.FloatBuffer buffer) { - org.lwjgl3.opengl.GL11.glFeedbackBuffer(type, buffer); - } - - public static void glFinish() { - org.lwjgl3.opengl.GL11.glFinish(); - } - - public static void glFlush() { - org.lwjgl3.opengl.GL11.glFlush(); - } - - public static void glFog(int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glFogfv(pname, params); - } - - public static void glFog(int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glFogiv(pname, params); - } - - public static void glFogf(int pname, float param) { - org.lwjgl3.opengl.GL11.glFogf(pname, param); - } - - public static void glFogi(int pname, int param) { - org.lwjgl3.opengl.GL11.glFogi(pname, param); - } - - public static void glFrontFace(int mode) { - org.lwjgl3.opengl.GL11.glFrontFace(mode); - } - - public static void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { - org.lwjgl3.opengl.GL11.glFrustum(left, right, bottom, top, zNear, zFar); - } - - public static int glGenLists(int range) { - return org.lwjgl3.opengl.GL11.glGenLists(range); - } - - public static int glGenTextures() { - return org.lwjgl3.opengl.GL11.glGenTextures(); - } - - public static void glGenTextures(java.nio.IntBuffer textures) { - org.lwjgl3.opengl.GL11.glGenTextures(textures); - } - - public static boolean glGetBoolean(int pname) { - return org.lwjgl3.opengl.GL11.glGetBoolean(pname); - } - - public static void glGetBoolean(int pname, java.nio.ByteBuffer params) { - org.lwjgl3.opengl.GL11.glGetBooleanv(pname, params); - } - - public static void glGetClipPlane(int plane, java.nio.DoubleBuffer equation) { - org.lwjgl3.opengl.GL11.glGetClipPlane(plane, equation); - } - - public static double glGetDouble(int pname) { - return org.lwjgl3.opengl.GL11.glGetDouble(pname); - } - - public static void glGetDouble(int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.GL11.glGetDoublev(pname, params); - } - - public static int glGetError() { - return org.lwjgl3.opengl.GL11.glGetError(); - } - - public static float glGetFloat(int pname) { - return org.lwjgl3.opengl.GL11.glGetFloat(pname); - } - - public static void glGetFloat(int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetFloatv(pname, params); - } - - public static int glGetInteger(int pname) { - return org.lwjgl3.opengl.GL11.glGetInteger(pname); - } - - public static void glGetInteger(int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetIntegerv(pname, params); - } - - public static void glGetLight(int light, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetLightfv(light, pname, params); - } - - public static void glGetLight(int light, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetLightiv(light, pname, params); - } - - public static void glGetMap(int target, int query, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.GL11.glGetMapdv(target, query, v); - } - - public static void glGetMap(int target, int query, java.nio.FloatBuffer v) { - org.lwjgl3.opengl.GL11.glGetMapfv(target, query, v); - } - - public static void glGetMap(int target, int query, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL11.glGetMapiv(target, query, v); - } - - public static void glGetMaterial(int face, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetMaterialfv(face, pname, params); - } - - public static void glGetMaterial(int face, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetMaterialiv(face, pname, params); - } - - public static void glGetPixelMap(int map, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL11.glGetPixelMapfv(map, values); - } - - public static void glGetPixelMapfv(int map, long values_buffer_offset) { - org.lwjgl3.opengl.GL11.glGetPixelMapfv(map, values_buffer_offset); - } - - public static void glGetPixelMapu(int map, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL11.glGetPixelMapuiv(map, values); - } - - public static void glGetPixelMapu(int map, java.nio.ShortBuffer values) { - org.lwjgl3.opengl.GL11.glGetPixelMapusv(map, values); - } - - public static void glGetPixelMapuiv(int map, long values_buffer_offset) { - org.lwjgl3.opengl.GL11.glGetPixelMapuiv(map, values_buffer_offset); - } - - public static void glGetPixelMapusv(int map, long values_buffer_offset) { - org.lwjgl3.opengl.GL11.glGetPixelMapusv(map, values_buffer_offset); - } - - public static void glGetPolygonStipple(long mask_buffer_offset) { - org.lwjgl3.opengl.GL11.glGetPolygonStipple(mask_buffer_offset); - } - - public static void glGetPolygonStipple(java.nio.ByteBuffer mask) { - org.lwjgl3.opengl.GL11.glGetPolygonStipple(mask); - } - - public static java.lang.String glGetString(int name) { - return org.lwjgl3.opengl.GL11.glGetString(name); - } - - public static void glGetTexEnv(int coord, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexEnvfv(coord, pname, params); - } - - public static void glGetTexEnv(int coord, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexEnviv(coord, pname, params); - } - - public static float glGetTexEnvf(int coord, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexEnvf(coord, pname); - } - - public static int glGetTexEnvi(int coord, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexEnvi(coord, pname); - } - - public static void glGetTexGen(int coord, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexGendv(coord, pname, params); - } - - public static void glGetTexGen(int coord, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexGenfv(coord, pname, params); - } - - public static void glGetTexGen(int coord, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexGeniv(coord, pname, params); - } - - public static double glGetTexGend(int coord, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexGend(coord, pname); - } - - public static float glGetTexGenf(int coord, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexGenf(coord, pname); - } - - public static int glGetTexGeni(int coord, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexGeni(coord, pname); - } - - public static void glGetTexImage(int target, int level, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11.glGetTexImage(target, level, format, type, pixels_buffer_offset); - } - - public static void glGetTexImage(int target, int level, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glGetTexImage(target, level, format, type, pixels); - } - - public static void glGetTexImage(int target, int level, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL11.glGetTexImage(target, level, format, type, pixels); - } - - public static void glGetTexImage(int target, int level, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL11.glGetTexImage(target, level, format, type, pixels); - } - - public static void glGetTexImage(int target, int level, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glGetTexImage(target, level, format, type, pixels); - } - - public static void glGetTexImage(int target, int level, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glGetTexImage(target, level, format, type, pixels); - } - - public static void glGetTexLevelParameter(int target, int level, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexLevelParameterfv(target, level, pname, params); - } - - public static void glGetTexLevelParameter(int target, int level, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexLevelParameteriv(target, level, pname, params); - } - - public static float glGetTexLevelParameterf(int target, int level, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexLevelParameterf(target, level, pname); - } - - public static int glGetTexLevelParameteri(int target, int level, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexLevelParameteri(target, level, pname); - } - - public static void glGetTexParameter(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexParameterfv(target, pname, params); - } - - public static void glGetTexParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glGetTexParameteriv(target, pname, params); - } - - public static float glGetTexParameterf(int target, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexParameterf(target, pname); - } - - public static int glGetTexParameteri(int target, int pname) { - return org.lwjgl3.opengl.GL11.glGetTexParameteri(target, pname); - } - - public static void glHint(int target, int mode) { - org.lwjgl3.opengl.GL11.glHint(target, mode); - } - - public static void glInitNames() { - org.lwjgl3.opengl.GL11.glInitNames(); - } - - public static void glInterleavedArrays(int format, int stride, long pointer_buffer_offset) { - org.lwjgl3.opengl.GL11.glInterleavedArrays(format, stride, pointer_buffer_offset); - } - - public static void glInterleavedArrays(int format, int stride, java.nio.ByteBuffer pointer) { - org.lwjgl3.opengl.GL11.glInterleavedArrays(format, stride, pointer); - } - - public static void glInterleavedArrays(int format, int stride, java.nio.DoubleBuffer pointer) { - org.lwjgl3.opengl.GL11.glInterleavedArrays(format, stride, pointer); - } - - public static void glInterleavedArrays(int format, int stride, java.nio.FloatBuffer pointer) { - org.lwjgl3.opengl.GL11.glInterleavedArrays(format, stride, pointer); - } - - public static void glInterleavedArrays(int format, int stride, java.nio.IntBuffer pointer) { - org.lwjgl3.opengl.GL11.glInterleavedArrays(format, stride, pointer); - } - - public static void glInterleavedArrays(int format, int stride, java.nio.ShortBuffer pointer) { - org.lwjgl3.opengl.GL11.glInterleavedArrays(format, stride, pointer); - } - - public static boolean glIsEnabled(int cap) { - return org.lwjgl3.opengl.GL11.glIsEnabled(cap); - } - - public static boolean glIsList(int list) { - return org.lwjgl3.opengl.GL11.glIsList(list); - } - - public static boolean glIsTexture(int texture) { - return org.lwjgl3.opengl.GL11.glIsTexture(texture); - } - - public static void glLight(int light, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glLightfv(light, pname, params); - } - - public static void glLight(int light, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glLightiv(light, pname, params); - } - - public static void glLightModel(int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glLightModelfv(pname, params); - } - - public static void glLightModel(int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glLightModeliv(pname, params); - } - - public static void glLightModelf(int pname, float param) { - org.lwjgl3.opengl.GL11.glLightModelf(pname, param); - } - - public static void glLightModeli(int pname, int param) { - org.lwjgl3.opengl.GL11.glLightModeli(pname, param); - } - - public static void glLightf(int light, int pname, float param) { - org.lwjgl3.opengl.GL11.glLightf(light, pname, param); - } - - public static void glLighti(int light, int pname, int param) { - org.lwjgl3.opengl.GL11.glLighti(light, pname, param); - } - - public static void glLineStipple(int factor, short pattern) { - org.lwjgl3.opengl.GL11.glLineStipple(factor, pattern); - } - - public static void glLineWidth(float width) { - org.lwjgl3.opengl.GL11.glLineWidth(width); - } - - public static void glListBase(int base) { - org.lwjgl3.opengl.GL11.glListBase(base); - } - - public static void glLoadIdentity() { - org.lwjgl3.opengl.GL11.glLoadIdentity(); - } - - public static void glLoadMatrix(java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.GL11.glLoadMatrixd(m); - } - - public static void glLoadMatrix(java.nio.FloatBuffer m) { - org.lwjgl3.opengl.GL11.glLoadMatrixf(m); - } - - public static void glLoadName(int name) { - org.lwjgl3.opengl.GL11.glLoadName(name); - } - - public static void glLogicOp(int opcode) { - org.lwjgl3.opengl.GL11.glLogicOp(opcode); - } - - public static void glMap1d(int target, double u1, double u2, int stride, int order, java.nio.DoubleBuffer points) { - org.lwjgl3.opengl.GL11.glMap1d(target, u1, u2, stride, order, points); - } - - public static void glMap1f(int target, float u1, float u2, int stride, int order, java.nio.FloatBuffer points) { - org.lwjgl3.opengl.GL11.glMap1f(target, u1, u2, stride, order, points); - } - - public static void glMap2d(int target, double u1, double u2, int ustride, int uorder, double v1, double v2, - int vstride, int vorder, java.nio.DoubleBuffer points) { - org.lwjgl3.opengl.GL11.glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); - } - - public static void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, - int vorder, java.nio.FloatBuffer points) { - org.lwjgl3.opengl.GL11.glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); - } - - public static void glMapGrid1d(int un, double u1, double u2) { - org.lwjgl3.opengl.GL11.glMapGrid1d(un, u1, u2); - } - - public static void glMapGrid1f(int un, float u1, float u2) { - org.lwjgl3.opengl.GL11.glMapGrid1f(un, u1, u2); - } - - public static void glMapGrid2d(int un, double u1, double u2, int vn, double v1, double v2) { - org.lwjgl3.opengl.GL11.glMapGrid2d(un, u1, u2, vn, v1, v2); - } - - public static void glMapGrid2f(int un, float u1, float u2, int vn, float v1, float v2) { - org.lwjgl3.opengl.GL11.glMapGrid2f(un, u1, u2, vn, v1, v2); - } - - public static void glMaterial(int face, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glMaterialfv(face, pname, params); - } - - public static void glMaterial(int face, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glMaterialiv(face, pname, params); - } - - public static void glMaterialf(int face, int pname, float param) { - org.lwjgl3.opengl.GL11.glMaterialf(face, pname, param); - } - - public static void glMateriali(int face, int pname, int param) { - org.lwjgl3.opengl.GL11.glMateriali(face, pname, param); - } - - public static void glMatrixMode(int mode) { - org.lwjgl3.opengl.GL11.glMatrixMode(mode); - } - - public static void glMultMatrix(java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.GL11.glMultMatrixd(m); - } - - public static void glMultMatrix(java.nio.FloatBuffer m) { - org.lwjgl3.opengl.GL11.glMultMatrixf(m); - } - - public static void glNewList(int list, int mode) { - org.lwjgl3.opengl.GL11.glNewList(list, mode); - } - - public static void glNormal3b(byte nx, byte ny, byte nz) { - org.lwjgl3.opengl.GL11.glNormal3b(nx, ny, nz); - } - - public static void glNormal3d(double nx, double ny, double nz) { - org.lwjgl3.opengl.GL11.glNormal3d(nx, ny, nz); - } - - public static void glNormal3f(float nx, float ny, float nz) { - org.lwjgl3.opengl.GL11.glNormal3f(nx, ny, nz); - } - - public static void glNormal3i(int nx, int ny, int nz) { - org.lwjgl3.opengl.GL11.glNormal3i(nx, ny, nz); - } - - public static void glNormalPointer(int type, int stride, long pointer_buffer_offset) { - org.lwjgl3.opengl.GL11.glNormalPointer(type, stride, pointer_buffer_offset); - } - - public static void glNormalPointer(int type, int stride, java.nio.ByteBuffer pointer) { - org.lwjgl3.opengl.GL11.glNormalPointer(type, stride, pointer); - } - - public static void glNormalPointer(int stride, java.nio.ByteBuffer pointer) { - - org.lwjgl3.opengl.GL11.glNormalPointer(org.lwjgl3.opengl.GL11.GL_BYTE, stride, pointer); - } - - public static void glNormalPointer(int stride, java.nio.DoubleBuffer pointer) { - - org.lwjgl3.opengl.GL11.glNormalPointer( - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pointer)); - } - - public static void glNormalPointer(int stride, java.nio.FloatBuffer pointer) { - - org.lwjgl3.opengl.GL11.glNormalPointer(org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pointer); - } - - public static void glNormalPointer(int stride, java.nio.IntBuffer pointer) { - - org.lwjgl3.opengl.GL11.glNormalPointer(org.lwjgl3.opengl.GL11.GL_INT, stride, pointer); - } - - public static void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { - org.lwjgl3.opengl.GL11.glOrtho(left, right, bottom, top, zNear, zFar); - } - - public static void glPassThrough(float token) { - org.lwjgl3.opengl.GL11.glPassThrough(token); - } - - public static void glPixelMap(int map, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL11.glPixelMapfv(map, values); - } - - public static void glPixelMapfv(int map, int values_mapsize, long values_buffer_offset) { - org.lwjgl3.opengl.GL11.glPixelMapfv(map, values_mapsize, values_buffer_offset); - } - - public static void glPixelMapu(int map, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL11.glPixelMapuiv(map, values); - } - - public static void glPixelMapu(int map, java.nio.ShortBuffer values) { - org.lwjgl3.opengl.GL11.glPixelMapusv(map, values); - } - - public static void glPixelMapuiv(int map, int values_mapsize, long values_buffer_offset) { - org.lwjgl3.opengl.GL11.glPixelMapuiv(map, values_mapsize, values_buffer_offset); - } - - public static void glPixelMapusv(int map, int values_mapsize, long values_buffer_offset) { - org.lwjgl3.opengl.GL11.glPixelMapusv(map, values_mapsize, values_buffer_offset); - } - - public static void glPixelStoref(int pname, float param) { - org.lwjgl3.opengl.GL11.glPixelStoref(pname, param); - } - - public static void glPixelStorei(int pname, int param) { - org.lwjgl3.opengl.GL11.glPixelStorei(pname, param); - } - - public static void glPixelTransferf(int pname, float param) { - org.lwjgl3.opengl.GL11.glPixelTransferf(pname, param); - } - - public static void glPixelTransferi(int pname, int param) { - org.lwjgl3.opengl.GL11.glPixelTransferi(pname, param); - } - - public static void glPixelZoom(float xfactor, float yfactor) { - org.lwjgl3.opengl.GL11.glPixelZoom(xfactor, yfactor); - } - - public static void glPointSize(float size) { - org.lwjgl3.opengl.GL11.glPointSize(size); - } - - public static void glPolygonMode(int face, int mode) { - org.lwjgl3.opengl.GL11.glPolygonMode(face, mode); - } - - public static void glPolygonOffset(float factor, float units) { - org.lwjgl3.opengl.GL11.glPolygonOffset(factor, units); - } - - public static void glPolygonStipple(long mask_buffer_offset) { - org.lwjgl3.opengl.GL11.glPolygonStipple(mask_buffer_offset); - } - - public static void glPolygonStipple(java.nio.ByteBuffer mask) { - org.lwjgl3.opengl.GL11.glPolygonStipple(mask); - } - - public static void glPopAttrib() { - org.lwjgl3.opengl.GL11.glPopAttrib(); - } - - public static void glPopClientAttrib() { - org.lwjgl3.opengl.GL11.glPopClientAttrib(); - } - - public static void glPopMatrix() { - org.lwjgl3.opengl.GL11.glPopMatrix(); - } - - public static void glPopName() { - org.lwjgl3.opengl.GL11.glPopName(); - } - - public static void glPrioritizeTextures(java.nio.IntBuffer textures, java.nio.FloatBuffer priorities) { - org.lwjgl3.opengl.GL11.glPrioritizeTextures(textures, priorities); - } - - public static void glPushAttrib(int mask) { - org.lwjgl3.opengl.GL11.glPushAttrib(mask); - } - - public static void glPushClientAttrib(int mask) { - org.lwjgl3.opengl.GL11.glPushClientAttrib(mask); - } - - public static void glPushMatrix() { - org.lwjgl3.opengl.GL11.glPushMatrix(); - } - - public static void glPushName(int name) { - org.lwjgl3.opengl.GL11.glPushName(name); - } - - public static void glRasterPos2d(double x, double y) { - org.lwjgl3.opengl.GL11.glRasterPos2d(x, y); - } - - public static void glRasterPos2f(float x, float y) { - org.lwjgl3.opengl.GL11.glRasterPos2f(x, y); - } - - public static void glRasterPos2i(int x, int y) { - org.lwjgl3.opengl.GL11.glRasterPos2i(x, y); - } - - public static void glRasterPos3d(double x, double y, double z) { - org.lwjgl3.opengl.GL11.glRasterPos3d(x, y, z); - } - - public static void glRasterPos3f(float x, float y, float z) { - org.lwjgl3.opengl.GL11.glRasterPos3f(x, y, z); - } - - public static void glRasterPos3i(int x, int y, int z) { - org.lwjgl3.opengl.GL11.glRasterPos3i(x, y, z); - } - - public static void glRasterPos4d(double x, double y, double z, double w) { - org.lwjgl3.opengl.GL11.glRasterPos4d(x, y, z, w); - } - - public static void glRasterPos4f(float x, float y, float z, float w) { - org.lwjgl3.opengl.GL11.glRasterPos4f(x, y, z, w); - } - - public static void glRasterPos4i(int x, int y, int z, int w) { - org.lwjgl3.opengl.GL11.glRasterPos4i(x, y, z, w); - } - - public static void glReadBuffer(int mode) { - org.lwjgl3.opengl.GL11.glReadBuffer(mode); - } - - public static void glReadPixels(int x, int y, int width, int height, int format, int type, - long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels_buffer_offset); - } - - public static void glReadPixels(int x, int y, int width, int height, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadPixels(int x, int y, int width, int height, int format, int type, - java.nio.DoubleBuffer pixels) { - - org.lwjgl3.opengl.GL11.glReadPixels(x, y, width, height, format, type, org.lwjgl.MemoryUtil.getAddress(pixels)); - } - - public static void glReadPixels(int x, int y, int width, int height, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadPixels(int x, int y, int width, int height, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadPixels(int x, int y, int width, int height, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); - } - - public static void glRectd(double x1, double y1, double x2, double y2) { - org.lwjgl3.opengl.GL11.glRectd(x1, y1, x2, y2); - } - - public static void glRectf(float x1, float y1, float x2, float y2) { - org.lwjgl3.opengl.GL11.glRectf(x1, y1, x2, y2); - } - - public static void glRecti(int x1, int y1, int x2, int y2) { - org.lwjgl3.opengl.GL11.glRecti(x1, y1, x2, y2); - } - - public static int glRenderMode(int mode) { - return org.lwjgl3.opengl.GL11.glRenderMode(mode); - } - - public static void glRotated(double angle, double x, double y, double z) { - org.lwjgl3.opengl.GL11.glRotated(angle, x, y, z); - } - - public static void glRotatef(float angle, float x, float y, float z) { - org.lwjgl3.opengl.GL11.glRotatef(angle, x, y, z); - } - - public static void glScaled(double x, double y, double z) { - org.lwjgl3.opengl.GL11.glScaled(x, y, z); - } - - public static void glScalef(float x, float y, float z) { - org.lwjgl3.opengl.GL11.glScalef(x, y, z); - } - - public static void glScissor(int x, int y, int width, int height) { - org.lwjgl3.opengl.GL11.glScissor(x, y, width, height); - } - - public static void glSelectBuffer(java.nio.IntBuffer buffer) { - org.lwjgl3.opengl.GL11.glSelectBuffer(buffer); - } - - public static void glShadeModel(int mode) { - org.lwjgl3.opengl.GL11.glShadeModel(mode); - } - - public static void glStencilFunc(int func, int ref, int mask) { - org.lwjgl3.opengl.GL11.glStencilFunc(func, ref, mask); - } - - public static void glStencilMask(int mask) { - org.lwjgl3.opengl.GL11.glStencilMask(mask); - } - - public static void glStencilOp(int fail, int zfail, int zpass) { - org.lwjgl3.opengl.GL11.glStencilOp(fail, zfail, zpass); - } - - public static void glTexCoord1d(double s) { - org.lwjgl3.opengl.GL11.glTexCoord1d(s); - } - - public static void glTexCoord1f(float s) { - org.lwjgl3.opengl.GL11.glTexCoord1f(s); - } - - public static void glTexCoord2d(double s, double t) { - org.lwjgl3.opengl.GL11.glTexCoord2d(s, t); - } - - public static void glTexCoord2f(float s, float t) { - org.lwjgl3.opengl.GL11.glTexCoord2f(s, t); - } - - public static void glTexCoord3d(double s, double t, double r) { - org.lwjgl3.opengl.GL11.glTexCoord3d(s, t, r); - } - - public static void glTexCoord3f(float s, float t, float r) { - org.lwjgl3.opengl.GL11.glTexCoord3f(s, t, r); - } - - public static void glTexCoord4d(double s, double t, double r, double q) { - org.lwjgl3.opengl.GL11.glTexCoord4d(s, t, r, q); - } - - public static void glTexCoord4f(float s, float t, float r, float q) { - org.lwjgl3.opengl.GL11.glTexCoord4f(s, t, r, q); - } - - public static void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) { - org.lwjgl3.opengl.GL11.glTexCoordPointer(size, type, stride, pointer_buffer_offset); - } - - public static void glTexCoordPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) { - org.lwjgl3.opengl.GL11.glTexCoordPointer(size, type, stride, pointer); - } - - public static void glTexCoordPointer(int size, int stride, java.nio.DoubleBuffer pointer) { - - org.lwjgl3.opengl.GL11.glTexCoordPointer( - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pointer)); - } - - public static void glTexCoordPointer(int size, int stride, java.nio.FloatBuffer pointer) { - - org.lwjgl3.opengl.GL11.glTexCoordPointer(size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pointer); - } - - public static void glTexCoordPointer(int size, int stride, java.nio.IntBuffer pointer) { - - org.lwjgl3.opengl.GL11.glTexCoordPointer(size, org.lwjgl3.opengl.GL11.GL_INT, stride, pointer); - } - - public static void glTexCoordPointer(int size, int stride, java.nio.ShortBuffer pointer) { - - org.lwjgl3.opengl.GL11.glTexCoordPointer(size, org.lwjgl3.opengl.GL11.GL_SHORT, stride, pointer); - } - - public static void glTexEnv(int target, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glTexEnvfv(target, pname, params); - } - - public static void glTexEnv(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glTexEnviv(target, pname, params); - } - - public static void glTexEnvf(int target, int pname, float param) { - org.lwjgl3.opengl.GL11.glTexEnvf(target, pname, param); - } - - public static void glTexEnvi(int target, int pname, int param) { - org.lwjgl3.opengl.GL11.glTexEnvi(target, pname, param); - } - - public static void glTexGen(int coord, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.GL11.glTexGendv(coord, pname, params); - } - - public static void glTexGen(int coord, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL11.glTexGenfv(coord, pname, params); - } - - public static void glTexGen(int coord, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL11.glTexGeniv(coord, pname, params); - } - - public static void glTexGend(int coord, int pname, double param) { - org.lwjgl3.opengl.GL11.glTexGend(coord, pname, param); - } - - public static void glTexGenf(int coord, int pname, float param) { - org.lwjgl3.opengl.GL11.glTexGenf(coord, pname, param); - } - - public static void glTexGeni(int coord, int pname, int param) { - org.lwjgl3.opengl.GL11.glTexGeni(coord, pname, param); - } - - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, - int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11 - .glTexImage1D(target, level, internalformat, width, border, format, type, pixels_buffer_offset); - } - - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, - int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, - int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, - int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, - int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, - int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, - int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11 - .glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels_buffer_offset); - } - - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, - int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, - int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, - int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, - int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, - int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glTexParameter(int target, int pname, java.nio.FloatBuffer param) { - org.lwjgl3.opengl.GL11.glTexParameterfv(target, pname, param); - } - - public static void glTexParameter(int target, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.GL11.glTexParameteriv(target, pname, param); - } - - public static void glTexParameterf(int target, int pname, float param) { - org.lwjgl3.opengl.GL11.glTexParameterf(target, pname, param); - } - - public static void glTexParameteri(int target, int pname, int param) { - org.lwjgl3.opengl.GL11.glTexParameteri(target, pname, param); - } - - public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, - long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels_buffer_offset); - } - - public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL11 - .glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); - } - - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTranslated(double x, double y, double z) { - org.lwjgl3.opengl.GL11.glTranslated(x, y, z); - } - - public static void glTranslatef(float x, float y, float z) { - org.lwjgl3.opengl.GL11.glTranslatef(x, y, z); - } - - public static void glVertex2d(double x, double y) { - org.lwjgl3.opengl.GL11.glVertex2d(x, y); - } - - public static void glVertex2f(float x, float y) { - org.lwjgl3.opengl.GL11.glVertex2f(x, y); - } - - public static void glVertex2i(int x, int y) { - org.lwjgl3.opengl.GL11.glVertex2i(x, y); - } - - public static void glVertex3d(double x, double y, double z) { - org.lwjgl3.opengl.GL11.glVertex3d(x, y, z); - } - - public static void glVertex3f(float x, float y, float z) { - org.lwjgl3.opengl.GL11.glVertex3f(x, y, z); - } - - public static void glVertex3i(int x, int y, int z) { - org.lwjgl3.opengl.GL11.glVertex3i(x, y, z); - } - - public static void glVertex4d(double x, double y, double z, double w) { - org.lwjgl3.opengl.GL11.glVertex4d(x, y, z, w); - } - - public static void glVertex4f(float x, float y, float z, float w) { - org.lwjgl3.opengl.GL11.glVertex4f(x, y, z, w); - } - - public static void glVertex4i(int x, int y, int z, int w) { - org.lwjgl3.opengl.GL11.glVertex4i(x, y, z, w); - } - - public static void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) { - org.lwjgl3.opengl.GL11.glVertexPointer(size, type, stride, pointer_buffer_offset); - } - - public static void glVertexPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) { - org.lwjgl3.opengl.GL11.glVertexPointer(size, type, stride, pointer); - } - - public static void glVertexPointer(int size, int stride, java.nio.DoubleBuffer pointer) { - - org.lwjgl3.opengl.GL11.glVertexPointer( - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(pointer)); - } - - public static void glVertexPointer(int size, int stride, java.nio.FloatBuffer pointer) { - - org.lwjgl3.opengl.GL11.glVertexPointer(size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, pointer); - } - - public static void glVertexPointer(int size, int stride, java.nio.IntBuffer pointer) { - - org.lwjgl3.opengl.GL11.glVertexPointer(size, org.lwjgl3.opengl.GL11.GL_INT, stride, pointer); - } - - public static void glVertexPointer(int size, int stride, java.nio.ShortBuffer pointer) { - - org.lwjgl3.opengl.GL11.glVertexPointer(size, org.lwjgl3.opengl.GL11.GL_SHORT, stride, pointer); - } - - public static void glViewport(int x, int y, int width, int height) { - org.lwjgl3.opengl.GL11.glViewport(x, y, width, height); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL12.java b/src/main/java/org/lwjgl/opengl/GL12.java deleted file mode 100644 index 1389deb09..000000000 --- a/src/main/java/org/lwjgl/opengl/GL12.java +++ /dev/null @@ -1,159 +0,0 @@ -package org.lwjgl.opengl; - -public class GL12 { - - public static final int GL_ALIASED_LINE_WIDTH_RANGE = (int) 33902; - public static final int GL_ALIASED_POINT_SIZE_RANGE = (int) 33901; - public static final int GL_BGR = (int) 32992; - public static final int GL_BGRA = (int) 32993; - public static final int GL_CLAMP_TO_EDGE = (int) 33071; - public static final int GL_LIGHT_MODEL_COLOR_CONTROL = (int) 33272; - public static final int GL_MAX_3D_TEXTURE_SIZE = (int) 32883; - public static final int GL_MAX_ELEMENTS_INDICES = (int) 33001; - public static final int GL_MAX_ELEMENTS_VERTICES = (int) 33000; - public static final int GL_PACK_IMAGE_HEIGHT = (int) 32876; - public static final int GL_PACK_SKIP_IMAGES = (int) 32875; - public static final int GL_PROXY_TEXTURE_3D = (int) 32880; - public static final int GL_RESCALE_NORMAL = (int) 32826; - public static final int GL_SEPARATE_SPECULAR_COLOR = (int) 33274; - public static final int GL_SINGLE_COLOR = (int) 33273; - public static final int GL_SMOOTH_LINE_WIDTH_GRANULARITY = (int) 2851; - public static final int GL_SMOOTH_LINE_WIDTH_RANGE = (int) 2850; - public static final int GL_SMOOTH_POINT_SIZE_GRANULARITY = (int) 2835; - public static final int GL_SMOOTH_POINT_SIZE_RANGE = (int) 2834; - public static final int GL_TEXTURE_3D = (int) 32879; - public static final int GL_TEXTURE_BASE_LEVEL = (int) 33084; - public static final int GL_TEXTURE_BINDING_3D = (int) 32874; - public static final int GL_TEXTURE_DEPTH = (int) 32881; - public static final int GL_TEXTURE_MAX_LEVEL = (int) 33085; - public static final int GL_TEXTURE_MAX_LOD = (int) 33083; - public static final int GL_TEXTURE_MIN_LOD = (int) 33082; - public static final int GL_TEXTURE_WRAP_R = (int) 32882; - public static final int GL_UNPACK_IMAGE_HEIGHT = (int) 32878; - public static final int GL_UNPACK_SKIP_IMAGES = (int) 32877; - public static final int GL_UNSIGNED_BYTE_2_3_3_REV = (int) 33634; - public static final int GL_UNSIGNED_BYTE_3_3_2 = (int) 32818; - public static final int GL_UNSIGNED_INT_10_10_10_2 = (int) 32822; - public static final int GL_UNSIGNED_INT_2_10_10_10_REV = (int) 33640; - public static final int GL_UNSIGNED_INT_8_8_8_8 = (int) 32821; - public static final int GL_UNSIGNED_INT_8_8_8_8_REV = (int) 33639; - public static final int GL_UNSIGNED_SHORT_1_5_5_5_REV = (int) 33638; - public static final int GL_UNSIGNED_SHORT_4_4_4_4 = (int) 32819; - public static final int GL_UNSIGNED_SHORT_4_4_4_4_REV = (int) 33637; - public static final int GL_UNSIGNED_SHORT_5_5_5_1 = (int) 32820; - public static final int GL_UNSIGNED_SHORT_5_6_5 = (int) 33635; - public static final int GL_UNSIGNED_SHORT_5_6_5_REV = (int) 33636; - - public static void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, - int width, int height) { - org.lwjgl3.opengl.GL12.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - public static void glDrawRangeElements(int mode, int start, int end, int indices_count, int type, - long indices_buffer_offset) { - org.lwjgl3.opengl.GL12.glDrawRangeElements(mode, start, end, indices_count, type, indices_buffer_offset); - } - - public static void glDrawRangeElements(int mode, int start, int end, java.nio.ByteBuffer indices) { - org.lwjgl3.opengl.GL12.glDrawRangeElements(mode, start, end, indices); - } - - public static void glDrawRangeElements(int mode, int start, int end, java.nio.IntBuffer indices) { - org.lwjgl3.opengl.GL12.glDrawRangeElements(mode, start, end, indices); - } - - public static void glDrawRangeElements(int mode, int start, int end, java.nio.ShortBuffer indices) { - org.lwjgl3.opengl.GL12.glDrawRangeElements(mode, start, end, indices); - } - - public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, - int border, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL12.glTexImage3D( - target, - level, - internalFormat, - width, - height, - depth, - border, - format, - type, - pixels_buffer_offset); - } - - public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, - int border, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); - } - - public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, - int border, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); - } - - public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, - int border, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); - } - - public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, - int border, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); - } - - public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, - int border, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); - } - - public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL12.glTexSubImage3D( - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_buffer_offset); - } - - public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL12 - .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL13.java b/src/main/java/org/lwjgl/opengl/GL13.java deleted file mode 100644 index ee750d116..000000000 --- a/src/main/java/org/lwjgl/opengl/GL13.java +++ /dev/null @@ -1,294 +0,0 @@ -package org.lwjgl.opengl; - -public class GL13 { - - public static final int GL_ACTIVE_TEXTURE = (int) 34016; - public static final int GL_ADD_SIGNED = (int) 34164; - public static final int GL_CLAMP_TO_BORDER = (int) 33069; - public static final int GL_CLIENT_ACTIVE_TEXTURE = (int) 34017; - public static final int GL_COMBINE = (int) 34160; - public static final int GL_COMBINE_ALPHA = (int) 34162; - public static final int GL_COMBINE_RGB = (int) 34161; - public static final int GL_COMPRESSED_ALPHA = (int) 34025; - public static final int GL_COMPRESSED_INTENSITY = (int) 34028; - public static final int GL_COMPRESSED_LUMINANCE = (int) 34026; - public static final int GL_COMPRESSED_LUMINANCE_ALPHA = (int) 34027; - public static final int GL_COMPRESSED_RGB = (int) 34029; - public static final int GL_COMPRESSED_RGBA = (int) 34030; - public static final int GL_COMPRESSED_TEXTURE_FORMATS = (int) 34467; - public static final int GL_CONSTANT = (int) 34166; - public static final int GL_DOT3_RGB = (int) 34478; - public static final int GL_DOT3_RGBA = (int) 34479; - public static final int GL_INTERPOLATE = (int) 34165; - public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = (int) 34076; - public static final int GL_MAX_TEXTURE_UNITS = (int) 34018; - public static final int GL_MULTISAMPLE = (int) 32925; - public static final int GL_MULTISAMPLE_BIT = (int) 536870912; - public static final int GL_NORMAL_MAP = (int) 34065; - public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = (int) 34466; - public static final int GL_OPERAND0_ALPHA = (int) 34200; - public static final int GL_OPERAND0_RGB = (int) 34192; - public static final int GL_OPERAND1_ALPHA = (int) 34201; - public static final int GL_OPERAND1_RGB = (int) 34193; - public static final int GL_OPERAND2_ALPHA = (int) 34202; - public static final int GL_OPERAND2_RGB = (int) 34194; - public static final int GL_PREVIOUS = (int) 34168; - public static final int GL_PRIMARY_COLOR = (int) 34167; - public static final int GL_PROXY_TEXTURE_CUBE_MAP = (int) 34075; - public static final int GL_REFLECTION_MAP = (int) 34066; - public static final int GL_RGB_SCALE = (int) 34163; - public static final int GL_SAMPLES = (int) 32937; - public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = (int) 32926; - public static final int GL_SAMPLE_ALPHA_TO_ONE = (int) 32927; - public static final int GL_SAMPLE_BUFFERS = (int) 32936; - public static final int GL_SAMPLE_COVERAGE = (int) 32928; - public static final int GL_SAMPLE_COVERAGE_INVERT = (int) 32939; - public static final int GL_SAMPLE_COVERAGE_VALUE = (int) 32938; - public static final int GL_SOURCE0_ALPHA = (int) 34184; - public static final int GL_SOURCE0_RGB = (int) 34176; - public static final int GL_SOURCE1_ALPHA = (int) 34185; - public static final int GL_SOURCE1_RGB = (int) 34177; - public static final int GL_SOURCE2_ALPHA = (int) 34186; - public static final int GL_SOURCE2_RGB = (int) 34178; - public static final int GL_SUBTRACT = (int) 34023; - public static final int GL_TEXTURE0 = (int) 33984; - public static final int GL_TEXTURE10 = (int) 33994; - public static final int GL_TEXTURE11 = (int) 33995; - public static final int GL_TEXTURE12 = (int) 33996; - public static final int GL_TEXTURE13 = (int) 33997; - public static final int GL_TEXTURE14 = (int) 33998; - public static final int GL_TEXTURE15 = (int) 33999; - public static final int GL_TEXTURE16 = (int) 34000; - public static final int GL_TEXTURE17 = (int) 34001; - public static final int GL_TEXTURE18 = (int) 34002; - public static final int GL_TEXTURE19 = (int) 34003; - public static final int GL_TEXTURE1 = (int) 33985; - public static final int GL_TEXTURE20 = (int) 34004; - public static final int GL_TEXTURE21 = (int) 34005; - public static final int GL_TEXTURE22 = (int) 34006; - public static final int GL_TEXTURE23 = (int) 34007; - public static final int GL_TEXTURE24 = (int) 34008; - public static final int GL_TEXTURE25 = (int) 34009; - public static final int GL_TEXTURE26 = (int) 34010; - public static final int GL_TEXTURE27 = (int) 34011; - public static final int GL_TEXTURE28 = (int) 34012; - public static final int GL_TEXTURE29 = (int) 34013; - public static final int GL_TEXTURE2 = (int) 33986; - public static final int GL_TEXTURE30 = (int) 34014; - public static final int GL_TEXTURE31 = (int) 34015; - public static final int GL_TEXTURE3 = (int) 33987; - public static final int GL_TEXTURE4 = (int) 33988; - public static final int GL_TEXTURE5 = (int) 33989; - public static final int GL_TEXTURE6 = (int) 33990; - public static final int GL_TEXTURE7 = (int) 33991; - public static final int GL_TEXTURE8 = (int) 33992; - public static final int GL_TEXTURE9 = (int) 33993; - public static final int GL_TEXTURE_BINDING_CUBE_MAP = (int) 34068; - public static final int GL_TEXTURE_COMPRESSED = (int) 34465; - public static final int GL_TEXTURE_COMPRESSED_IMAGE_SIZE = (int) 34464; - public static final int GL_TEXTURE_COMPRESSION_HINT = (int) 34031; - public static final int GL_TEXTURE_CUBE_MAP = (int) 34067; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = (int) 34070; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = (int) 34072; - public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = (int) 34074; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = (int) 34069; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = (int) 34071; - public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = (int) 34073; - public static final int GL_TRANSPOSE_COLOR_MATRIX = (int) 34022; - public static final int GL_TRANSPOSE_MODELVIEW_MATRIX = (int) 34019; - public static final int GL_TRANSPOSE_PROJECTION_MATRIX = (int) 34020; - public static final int GL_TRANSPOSE_TEXTURE_MATRIX = (int) 34021; - - public static void glActiveTexture(int texture) { - org.lwjgl3.opengl.GL13.glActiveTexture(texture); - } - - public static void glClientActiveTexture(int texture) { - org.lwjgl3.opengl.GL13.glClientActiveTexture(texture); - } - - public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, - int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL13.glCompressedTexImage1D( - target, - level, - internalformat, - width, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL13.glCompressedTexImage1D(target, level, internalformat, width, border, data); - } - - public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, - int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL13.glCompressedTexImage2D( - target, - level, - internalformat, - width, - height, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, - int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL13.glCompressedTexImage2D(target, level, internalformat, width, height, border, data); - } - - public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, - int depth, int border, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL13.glCompressedTexImage3D( - target, - level, - internalformat, - width, - height, - depth, - border, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, - int depth, int border, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL13.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, data); - } - - public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, - int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL13 - .glCompressedTexSubImage1D(target, level, xoffset, width, format, data_imageSize, data_buffer_offset); - } - - public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL13.glCompressedTexSubImage1D(target, level, xoffset, width, format, data); - } - - public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL13.glCompressedTexSubImage2D( - target, - level, - xoffset, - yoffset, - width, - height, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, - int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL13.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); - } - - public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL13.glCompressedTexSubImage3D( - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL13.glCompressedTexSubImage3D( - target, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - data); - } - - public static void glGetCompressedTexImage(int target, int lod, long img_buffer_offset) { - org.lwjgl3.opengl.GL13.glGetCompressedTexImage(target, lod, img_buffer_offset); - } - - public static void glGetCompressedTexImage(int target, int lod, java.nio.ByteBuffer img) { - org.lwjgl3.opengl.GL13.glGetCompressedTexImage(target, lod, img); - } - - public static void glGetCompressedTexImage(int target, int lod, java.nio.IntBuffer img) { - - org.lwjgl3.opengl.GL13.glGetCompressedTexImage(target, lod, org.lwjgl.MemoryUtil.getAddress(img)); - } - - public static void glGetCompressedTexImage(int target, int lod, java.nio.ShortBuffer img) { - - org.lwjgl3.opengl.GL13.glGetCompressedTexImage(target, lod, org.lwjgl.MemoryUtil.getAddress(img)); - } - - public static void glLoadTransposeMatrix(java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.GL13.glLoadTransposeMatrixd(m); - } - - public static void glLoadTransposeMatrix(java.nio.FloatBuffer m) { - org.lwjgl3.opengl.GL13.glLoadTransposeMatrixf(m); - } - - public static void glMultTransposeMatrix(java.nio.DoubleBuffer m) { - org.lwjgl3.opengl.GL13.glMultTransposeMatrixd(m); - } - - public static void glMultTransposeMatrix(java.nio.FloatBuffer m) { - org.lwjgl3.opengl.GL13.glMultTransposeMatrixf(m); - } - - public static void glMultiTexCoord1d(int target, double s) { - org.lwjgl3.opengl.GL13.glMultiTexCoord1d(target, s); - } - - public static void glMultiTexCoord1f(int target, float s) { - org.lwjgl3.opengl.GL13.glMultiTexCoord1f(target, s); - } - - public static void glMultiTexCoord2d(int target, double s, double t) { - org.lwjgl3.opengl.GL13.glMultiTexCoord2d(target, s, t); - } - - public static void glMultiTexCoord2f(int target, float s, float t) { - org.lwjgl3.opengl.GL13.glMultiTexCoord2f(target, s, t); - } - - public static void glMultiTexCoord3d(int target, double s, double t, double r) { - org.lwjgl3.opengl.GL13.glMultiTexCoord3d(target, s, t, r); - } - - public static void glMultiTexCoord3f(int target, float s, float t, float r) { - org.lwjgl3.opengl.GL13.glMultiTexCoord3f(target, s, t, r); - } - - public static void glMultiTexCoord4d(int target, double s, double t, double r, double q) { - org.lwjgl3.opengl.GL13.glMultiTexCoord4d(target, s, t, r, q); - } - - public static void glMultiTexCoord4f(int target, float s, float t, float r, float q) { - org.lwjgl3.opengl.GL13.glMultiTexCoord4f(target, s, t, r, q); - } - - public static void glSampleCoverage(float value, boolean invert) { - org.lwjgl3.opengl.GL13.glSampleCoverage(value, invert); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL14.java b/src/main/java/org/lwjgl/opengl/GL14.java deleted file mode 100644 index fd12b128d..000000000 --- a/src/main/java/org/lwjgl/opengl/GL14.java +++ /dev/null @@ -1,177 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class GL14 { - - public static final int GL_BLEND_COLOR = (int) 32773; - public static final int GL_BLEND_DST_ALPHA = (int) 32970; - public static final int GL_BLEND_DST_RGB = (int) 32968; - public static final int GL_BLEND_EQUATION = (int) 32777; - public static final int GL_BLEND_SRC_ALPHA = (int) 32971; - public static final int GL_BLEND_SRC_RGB = (int) 32969; - public static final int GL_COLOR_SUM = (int) 33880; - public static final int GL_COMPARE_R_TO_TEXTURE = (int) 34894; - public static final int GL_CURRENT_FOG_COORDINATE = (int) 33875; - public static final int GL_CURRENT_SECONDARY_COLOR = (int) 33881; - public static final int GL_DECR_WRAP = (int) 34056; - public static final int GL_DEPTH_COMPONENT16 = (int) 33189; - public static final int GL_DEPTH_COMPONENT24 = (int) 33190; - public static final int GL_DEPTH_COMPONENT32 = (int) 33191; - public static final int GL_DEPTH_TEXTURE_MODE = (int) 34891; - public static final int GL_FOG_COORDINATE = (int) 33873; - public static final int GL_FOG_COORDINATE_ARRAY = (int) 33879; - public static final int GL_FOG_COORDINATE_ARRAY_POINTER = (int) 33878; - public static final int GL_FOG_COORDINATE_ARRAY_STRIDE = (int) 33877; - public static final int GL_FOG_COORDINATE_ARRAY_TYPE = (int) 33876; - public static final int GL_FOG_COORDINATE_SOURCE = (int) 33872; - public static final int GL_FRAGMENT_DEPTH = (int) 33874; - public static final int GL_FUNC_ADD = (int) 32774; - public static final int GL_FUNC_REVERSE_SUBTRACT = (int) 32779; - public static final int GL_FUNC_SUBTRACT = (int) 32778; - public static final int GL_GENERATE_MIPMAP = (int) 33169; - public static final int GL_GENERATE_MIPMAP_HINT = (int) 33170; - public static final int GL_INCR_WRAP = (int) 34055; - public static final int GL_MAX = (int) 32776; - public static final int GL_MAX_TEXTURE_LOD_BIAS = (int) 34045; - public static final int GL_MIN = (int) 32775; - public static final int GL_MIRRORED_REPEAT = (int) 33648; - public static final int GL_POINT_DISTANCE_ATTENUATION = (int) 33065; - public static final int GL_POINT_FADE_THRESHOLD_SIZE = (int) 33064; - public static final int GL_POINT_SIZE_MAX = (int) 33063; - public static final int GL_POINT_SIZE_MIN = (int) 33062; - public static final int GL_SECONDARY_COLOR_ARRAY = (int) 33886; - public static final int GL_SECONDARY_COLOR_ARRAY_POINTER = (int) 33885; - public static final int GL_SECONDARY_COLOR_ARRAY_SIZE = (int) 33882; - public static final int GL_SECONDARY_COLOR_ARRAY_STRIDE = (int) 33884; - public static final int GL_SECONDARY_COLOR_ARRAY_TYPE = (int) 33883; - public static final int GL_TEXTURE_COMPARE_FUNC = (int) 34893; - public static final int GL_TEXTURE_COMPARE_MODE = (int) 34892; - public static final int GL_TEXTURE_DEPTH_SIZE = (int) 34890; - public static final int GL_TEXTURE_FILTER_CONTROL = (int) 34048; - public static final int GL_TEXTURE_LOD_BIAS = (int) 34049; - - public static void glBlendColor(float red, float green, float blue, float alpha) { - org.lwjgl3.opengl.GL14.glBlendColor(red, green, blue, alpha); - } - - public static void glBlendEquation(int mode) { - org.lwjgl3.opengl.GL14.glBlendEquation(mode); - } - - public static void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) { - org.lwjgl3.opengl.GL14.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); - } - - public static void glFogCoordPointer(int type, int stride, long data_buffer_offset) { - org.lwjgl3.opengl.GL14.glFogCoordPointer(type, stride, data_buffer_offset); - } - - public static void glFogCoordPointer(int stride, java.nio.DoubleBuffer data) { - - org.lwjgl3.opengl.GL14.glFogCoordPointer( - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(data)); - } - - public static void glFogCoordPointer(int stride, java.nio.FloatBuffer data) { - - org.lwjgl3.opengl.GL14.glFogCoordPointer(org.lwjgl3.opengl.GL11.GL_FLOAT, stride, data); - } - - public static void glFogCoordd(double coord) { - org.lwjgl3.opengl.GL14.glFogCoordd(coord); - } - - public static void glFogCoordf(float coord) { - org.lwjgl3.opengl.GL14.glFogCoordf(coord); - } - - public static void glMultiDrawArrays(int mode, java.nio.IntBuffer piFirst, java.nio.IntBuffer piCount) { - org.lwjgl3.opengl.GL14.glMultiDrawArrays(mode, piFirst, piCount); - } - - public static void glPointParameter(int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL14.glPointParameterfv(pname, params); - } - - public static void glPointParameter(int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL14.glPointParameteriv(pname, params); - } - - public static void glPointParameterf(int pname, float param) { - org.lwjgl3.opengl.GL14.glPointParameterf(pname, param); - } - - public static void glPointParameteri(int pname, int param) { - org.lwjgl3.opengl.GL14.glPointParameteri(pname, param); - } - - public static void glSecondaryColor3b(byte red, byte green, byte blue) { - org.lwjgl3.opengl.GL14.glSecondaryColor3b(red, green, blue); - } - - public static void glSecondaryColor3d(double red, double green, double blue) { - org.lwjgl3.opengl.GL14.glSecondaryColor3d(red, green, blue); - } - - public static void glSecondaryColor3f(float red, float green, float blue) { - org.lwjgl3.opengl.GL14.glSecondaryColor3f(red, green, blue); - } - - public static void glSecondaryColor3ub(byte red, byte green, byte blue) { - org.lwjgl3.opengl.GL14.glSecondaryColor3ub(red, green, blue); - } - - public static void glSecondaryColorPointer(int size, int type, int stride, long data_buffer_offset) { - org.lwjgl3.opengl.GL14.glSecondaryColorPointer(size, type, stride, data_buffer_offset); - } - - public static void glSecondaryColorPointer(int size, int stride, java.nio.DoubleBuffer data) { - - org.lwjgl3.opengl.GL14.glSecondaryColorPointer( - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - stride, - BufferCasts.toByteBuffer(data)); - } - - public static void glSecondaryColorPointer(int size, int stride, java.nio.FloatBuffer data) { - - org.lwjgl3.opengl.GL14.glSecondaryColorPointer(size, org.lwjgl3.opengl.GL11.GL_FLOAT, stride, data); - } - - public static void glSecondaryColorPointer(int size, boolean unsigned, int stride, java.nio.ByteBuffer data) { - - org.lwjgl3.opengl.GL14.glSecondaryColorPointer( - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl3.opengl.GL11.GL_BYTE), - stride, - org.lwjgl.MemoryUtil.getAddress(data)); - } - - public static void glWindowPos2d(double x, double y) { - org.lwjgl3.opengl.GL14.glWindowPos2d(x, y); - } - - public static void glWindowPos2f(float x, float y) { - org.lwjgl3.opengl.GL14.glWindowPos2f(x, y); - } - - public static void glWindowPos2i(int x, int y) { - org.lwjgl3.opengl.GL14.glWindowPos2i(x, y); - } - - public static void glWindowPos3d(double x, double y, double z) { - org.lwjgl3.opengl.GL14.glWindowPos3d(x, y, z); - } - - public static void glWindowPos3f(float x, float y, float z) { - org.lwjgl3.opengl.GL14.glWindowPos3f(x, y, z); - } - - public static void glWindowPos3i(int x, int y, int z) { - org.lwjgl3.opengl.GL14.glWindowPos3i(x, y, z); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL15.java b/src/main/java/org/lwjgl/opengl/GL15.java deleted file mode 100644 index cdb16438a..000000000 --- a/src/main/java/org/lwjgl/opengl/GL15.java +++ /dev/null @@ -1,215 +0,0 @@ -package org.lwjgl.opengl; - -public class GL15 { - - public static final int GL_ARRAY_BUFFER = (int) 34962; - public static final int GL_ARRAY_BUFFER_BINDING = (int) 34964; - public static final int GL_BUFFER_ACCESS = (int) 35003; - public static final int GL_BUFFER_MAPPED = (int) 35004; - public static final int GL_BUFFER_MAP_POINTER = (int) 35005; - public static final int GL_BUFFER_SIZE = (int) 34660; - public static final int GL_BUFFER_USAGE = (int) 34661; - public static final int GL_COLOR_ARRAY_BUFFER_BINDING = (int) 34968; - public static final int GL_CURRENT_FOG_COORD = (int) 33875; - public static final int GL_CURRENT_QUERY = (int) 34917; - public static final int GL_DYNAMIC_COPY = (int) 35050; - public static final int GL_DYNAMIC_DRAW = (int) 35048; - public static final int GL_DYNAMIC_READ = (int) 35049; - public static final int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = (int) 34971; - public static final int GL_ELEMENT_ARRAY_BUFFER = (int) 34963; - public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = (int) 34965; - public static final int GL_FOG_COORD = (int) 33873; - public static final int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = (int) 34973; - public static final int GL_FOG_COORD_ARRAY = (int) 33879; - public static final int GL_FOG_COORD_ARRAY_BUFFER_BINDING = (int) 34973; - public static final int GL_FOG_COORD_ARRAY_POINTER = (int) 33878; - public static final int GL_FOG_COORD_ARRAY_STRIDE = (int) 33877; - public static final int GL_FOG_COORD_ARRAY_TYPE = (int) 33876; - public static final int GL_FOG_COORD_SRC = (int) 33872; - public static final int GL_INDEX_ARRAY_BUFFER_BINDING = (int) 34969; - public static final int GL_NORMAL_ARRAY_BUFFER_BINDING = (int) 34967; - public static final int GL_QUERY_COUNTER_BITS = (int) 34916; - public static final int GL_QUERY_RESULT = (int) 34918; - public static final int GL_QUERY_RESULT_AVAILABLE = (int) 34919; - public static final int GL_READ_ONLY = (int) 35000; - public static final int GL_READ_WRITE = (int) 35002; - public static final int GL_SAMPLES_PASSED = (int) 35092; - public static final int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = (int) 34972; - public static final int GL_SRC0_ALPHA = (int) 34184; - public static final int GL_SRC0_RGB = (int) 34176; - public static final int GL_SRC1_ALPHA = (int) 34185; - public static final int GL_SRC1_RGB = (int) 34177; - public static final int GL_SRC2_ALPHA = (int) 34186; - public static final int GL_SRC2_RGB = (int) 34178; - public static final int GL_STATIC_COPY = (int) 35046; - public static final int GL_STATIC_DRAW = (int) 35044; - public static final int GL_STATIC_READ = (int) 35045; - public static final int GL_STREAM_COPY = (int) 35042; - public static final int GL_STREAM_DRAW = (int) 35040; - public static final int GL_STREAM_READ = (int) 35041; - public static final int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = (int) 34970; - public static final int GL_VERTEX_ARRAY_BUFFER_BINDING = (int) 34966; - public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = (int) 34975; - public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING = (int) 34974; - public static final int GL_WRITE_ONLY = (int) 35001; - - public static void glBeginQuery(int target, int id) { - org.lwjgl3.opengl.GL15.glBeginQuery(target, id); - } - - public static void glBindBuffer(int target, int buffer) { - org.lwjgl3.opengl.GL15.glBindBuffer(target, buffer); - } - - public static void glBufferData(int target, long data_size, int usage) { - org.lwjgl3.opengl.GL15.glBufferData(target, data_size, usage); - } - - public static void glBufferData(int target, java.nio.ByteBuffer data, int usage) { - org.lwjgl3.opengl.GL15.glBufferData(target, data, usage); - } - - public static void glBufferData(int target, java.nio.DoubleBuffer data, int usage) { - org.lwjgl3.opengl.GL15.glBufferData(target, data, usage); - } - - public static void glBufferData(int target, java.nio.FloatBuffer data, int usage) { - org.lwjgl3.opengl.GL15.glBufferData(target, data, usage); - } - - public static void glBufferData(int target, java.nio.IntBuffer data, int usage) { - org.lwjgl3.opengl.GL15.glBufferData(target, data, usage); - } - - public static void glBufferData(int target, java.nio.ShortBuffer data, int usage) { - org.lwjgl3.opengl.GL15.glBufferData(target, data, usage); - } - - public static void glBufferSubData(int target, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL15.glBufferSubData(target, offset, data); - } - - public static void glBufferSubData(int target, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL15.glBufferSubData(target, offset, data); - } - - public static void glBufferSubData(int target, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL15.glBufferSubData(target, offset, data); - } - - public static void glBufferSubData(int target, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL15.glBufferSubData(target, offset, data); - } - - public static void glBufferSubData(int target, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.GL15.glBufferSubData(target, offset, data); - } - - public static void glDeleteBuffers(int buffer) { - org.lwjgl3.opengl.GL15.glDeleteBuffers(buffer); - } - - public static void glDeleteBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.opengl.GL15.glDeleteBuffers(buffers); - } - - public static void glDeleteQueries(int id) { - org.lwjgl3.opengl.GL15.glDeleteQueries(id); - } - - public static void glDeleteQueries(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.GL15.glDeleteQueries(ids); - } - - public static void glEndQuery(int target) { - org.lwjgl3.opengl.GL15.glEndQuery(target); - } - - public static int glGenBuffers() { - return org.lwjgl3.opengl.GL15.glGenBuffers(); - } - - public static void glGenBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.opengl.GL15.glGenBuffers(buffers); - } - - public static int glGenQueries() { - return org.lwjgl3.opengl.GL15.glGenQueries(); - } - - public static void glGenQueries(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.GL15.glGenQueries(ids); - } - - public static void glGetBufferParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL15.glGetBufferParameteriv(target, pname, params); - } - - public static int glGetBufferParameteri(int target, int pname) { - return org.lwjgl3.opengl.GL15.glGetBufferParameteri(target, pname); - } - - public static void glGetBufferSubData(int target, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL15.glGetBufferSubData(target, offset, data); - } - - public static void glGetBufferSubData(int target, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL15.glGetBufferSubData(target, offset, data); - } - - public static void glGetBufferSubData(int target, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL15.glGetBufferSubData(target, offset, data); - } - - public static void glGetBufferSubData(int target, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL15.glGetBufferSubData(target, offset, data); - } - - public static void glGetBufferSubData(int target, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.GL15.glGetBufferSubData(target, offset, data); - } - - public static void glGetQuery(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL15.glGetQueryiv(target, pname, params); - } - - public static void glGetQueryObject(int id, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL15.glGetQueryObjectiv(id, pname, params); - } - - public static int glGetQueryObjecti(int id, int pname) { - return org.lwjgl3.opengl.GL15.glGetQueryObjecti(id, pname); - } - - public static void glGetQueryObjectu(int id, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL15.glGetQueryObjectuiv(id, pname, params); - } - - public static int glGetQueryObjectui(int id, int pname) { - return org.lwjgl3.opengl.GL15.glGetQueryObjectui(id, pname); - } - - public static int glGetQueryi(int target, int pname) { - return org.lwjgl3.opengl.GL15.glGetQueryi(target, pname); - } - - public static boolean glIsBuffer(int buffer) { - return org.lwjgl3.opengl.GL15.glIsBuffer(buffer); - } - - public static boolean glIsQuery(int id) { - return org.lwjgl3.opengl.GL15.glIsQuery(id); - } - - public static java.nio.ByteBuffer glMapBuffer(int target, int access, long length, java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.GL15.glMapBuffer(target, access, length, old_buffer); - } - - public static java.nio.ByteBuffer glMapBuffer(int target, int access, java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.GL15.glMapBuffer(target, access, old_buffer); - } - - public static boolean glUnmapBuffer(int target) { - return org.lwjgl3.opengl.GL15.glUnmapBuffer(target); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL15x.java b/src/main/java/org/lwjgl/opengl/GL15x.java deleted file mode 100644 index f3ee36c9f..000000000 --- a/src/main/java/org/lwjgl/opengl/GL15x.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.lwjgl.opengl; - -import java.nio.ByteBuffer; - -import org.lwjgl3.BufferUtils; -import org.lwjgl3.PointerBuffer; -import org.lwjgl3.opengl.GL15; - -public class GL15x { - - public static ByteBuffer glGetBufferPointer(int target, int pname) { - int size = GL15.glGetBufferParameteri(target, GL15.GL_BUFFER_SIZE); - - PointerBuffer pb = BufferUtils.createPointerBuffer(1); - GL15.glGetBufferPointerv(target, pname, pb); - - return pb.getByteBuffer(0, size); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL20.java b/src/main/java/org/lwjgl/opengl/GL20.java deleted file mode 100644 index 67eee3fb2..000000000 --- a/src/main/java/org/lwjgl/opengl/GL20.java +++ /dev/null @@ -1,480 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class GL20 { - - public static final int GL_ACTIVE_ATTRIBUTES = (int) 35721; - public static final int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = (int) 35722; - public static final int GL_ACTIVE_UNIFORMS = (int) 35718; - public static final int GL_ACTIVE_UNIFORM_MAX_LENGTH = (int) 35719; - public static final int GL_ATTACHED_SHADERS = (int) 35717; - public static final int GL_BLEND_EQUATION_ALPHA = (int) 34877; - public static final int GL_BLEND_EQUATION_RGB = (int) 32777; - public static final int GL_BOOL = (int) 35670; - public static final int GL_BOOL_VEC2 = (int) 35671; - public static final int GL_BOOL_VEC3 = (int) 35672; - public static final int GL_BOOL_VEC4 = (int) 35673; - public static final int GL_COMPILE_STATUS = (int) 35713; - public static final int GL_COORD_REPLACE = (int) 34914; - public static final int GL_CURRENT_PROGRAM = (int) 35725; - public static final int GL_CURRENT_VERTEX_ATTRIB = (int) 34342; - public static final int GL_DELETE_STATUS = (int) 35712; - public static final int GL_DRAW_BUFFER0 = (int) 34853; - public static final int GL_DRAW_BUFFER10 = (int) 34863; - public static final int GL_DRAW_BUFFER11 = (int) 34864; - public static final int GL_DRAW_BUFFER12 = (int) 34865; - public static final int GL_DRAW_BUFFER13 = (int) 34866; - public static final int GL_DRAW_BUFFER14 = (int) 34867; - public static final int GL_DRAW_BUFFER15 = (int) 34868; - public static final int GL_DRAW_BUFFER1 = (int) 34854; - public static final int GL_DRAW_BUFFER2 = (int) 34855; - public static final int GL_DRAW_BUFFER3 = (int) 34856; - public static final int GL_DRAW_BUFFER4 = (int) 34857; - public static final int GL_DRAW_BUFFER5 = (int) 34858; - public static final int GL_DRAW_BUFFER6 = (int) 34859; - public static final int GL_DRAW_BUFFER7 = (int) 34860; - public static final int GL_DRAW_BUFFER8 = (int) 34861; - public static final int GL_DRAW_BUFFER9 = (int) 34862; - public static final int GL_FLOAT_MAT2 = (int) 35674; - public static final int GL_FLOAT_MAT3 = (int) 35675; - public static final int GL_FLOAT_MAT4 = (int) 35676; - public static final int GL_FLOAT_VEC2 = (int) 35664; - public static final int GL_FLOAT_VEC3 = (int) 35665; - public static final int GL_FLOAT_VEC4 = (int) 35666; - public static final int GL_FRAGMENT_SHADER = (int) 35632; - public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = (int) 35723; - public static final int GL_INFO_LOG_LENGTH = (int) 35716; - public static final int GL_INT_VEC2 = (int) 35667; - public static final int GL_INT_VEC3 = (int) 35668; - public static final int GL_INT_VEC4 = (int) 35669; - public static final int GL_LINK_STATUS = (int) 35714; - public static final int GL_LOWER_LEFT = (int) 36001; - public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = (int) 35661; - public static final int GL_MAX_DRAW_BUFFERS = (int) 34852; - public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = (int) 35657; - public static final int GL_MAX_TEXTURE_COORDS = (int) 34929; - public static final int GL_MAX_TEXTURE_IMAGE_UNITS = (int) 34930; - public static final int GL_MAX_VARYING_FLOATS = (int) 35659; - public static final int GL_MAX_VERTEX_ATTRIBS = (int) 34921; - public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = (int) 35660; - public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = (int) 35658; - public static final int GL_POINT_SPRITE = (int) 34913; - public static final int GL_POINT_SPRITE_COORD_ORIGIN = (int) 36000; - public static final int GL_SAMPLER_1D = (int) 35677; - public static final int GL_SAMPLER_1D_SHADOW = (int) 35681; - public static final int GL_SAMPLER_2D = (int) 35678; - public static final int GL_SAMPLER_2D_SHADOW = (int) 35682; - public static final int GL_SAMPLER_3D = (int) 35679; - public static final int GL_SAMPLER_CUBE = (int) 35680; - public static final int GL_SHADER_OBJECT = (int) 35656; - public static final int GL_SHADER_SOURCE_LENGTH = (int) 35720; - public static final int GL_SHADER_TYPE = (int) 35663; - public static final int GL_SHADING_LANGUAGE_VERSION = (int) 35724; - public static final int GL_STENCIL_BACK_FAIL = (int) 34817; - public static final int GL_STENCIL_BACK_FUNC = (int) 34816; - public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL = (int) 34818; - public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS = (int) 34819; - public static final int GL_STENCIL_BACK_REF = (int) 36003; - public static final int GL_STENCIL_BACK_VALUE_MASK = (int) 36004; - public static final int GL_STENCIL_BACK_WRITEMASK = (int) 36005; - public static final int GL_UPPER_LEFT = (int) 36002; - public static final int GL_VALIDATE_STATUS = (int) 35715; - public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED = (int) 34338; - public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = (int) 34922; - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = (int) 34373; - public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE = (int) 34339; - public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE = (int) 34340; - public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE = (int) 34341; - public static final int GL_VERTEX_PROGRAM_POINT_SIZE = (int) 34370; - public static final int GL_VERTEX_PROGRAM_TWO_SIDE = (int) 34371; - public static final int GL_VERTEX_SHADER = (int) 35633; - - public static void glAttachShader(int program, int shader) { - org.lwjgl3.opengl.GL20.glAttachShader(program, shader); - } - - public static void glBindAttribLocation(int program, int index, java.lang.CharSequence name) { - org.lwjgl3.opengl.GL20.glBindAttribLocation(program, index, name); - } - - public static void glBindAttribLocation(int program, int index, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL20.glBindAttribLocation(program, index, name); - } - - public static void glBlendEquationSeparate(int modeRGB, int modeAlpha) { - org.lwjgl3.opengl.GL20.glBlendEquationSeparate(modeRGB, modeAlpha); - } - - public static void glCompileShader(int shader) { - org.lwjgl3.opengl.GL20.glCompileShader(shader); - } - - public static int glCreateProgram() { - return org.lwjgl3.opengl.GL20.glCreateProgram(); - } - - public static int glCreateShader(int type) { - return org.lwjgl3.opengl.GL20.glCreateShader(type); - } - - public static void glDeleteProgram(int program) { - org.lwjgl3.opengl.GL20.glDeleteProgram(program); - } - - public static void glDeleteShader(int shader) { - org.lwjgl3.opengl.GL20.glDeleteShader(shader); - } - - public static void glDetachShader(int program, int shader) { - org.lwjgl3.opengl.GL20.glDetachShader(program, shader); - } - - public static void glDisableVertexAttribArray(int index) { - org.lwjgl3.opengl.GL20.glDisableVertexAttribArray(index); - } - - public static void glDrawBuffers(int buffer) { - org.lwjgl3.opengl.GL20.glDrawBuffers(buffer); - } - - public static void glDrawBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.opengl.GL20.glDrawBuffers(buffers); - } - - public static void glEnableVertexAttribArray(int index) { - org.lwjgl3.opengl.GL20.glEnableVertexAttribArray(index); - } - - public static void glGetActiveAttrib(int program, int index, java.nio.IntBuffer length, java.nio.IntBuffer size, - java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL20.glGetActiveAttrib(program, index, length, size, type, name); - } - - public static String glGetActiveUniform(int program, int index, int maxLength) { - return org.lwjgl3.opengl.GL31C.glGetActiveUniformName(program, index, maxLength); - } - - public static void glGetActiveUniform(int program, int index, java.nio.IntBuffer length, java.nio.IntBuffer size, - java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL20.glGetActiveUniform(program, index, length, size, type, name); - } - - public static void glGetAttachedShaders(int program, java.nio.IntBuffer count, java.nio.IntBuffer shaders) { - org.lwjgl3.opengl.GL20.glGetAttachedShaders(program, count, shaders); - } - - public static int glGetAttribLocation(int program, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL20.glGetAttribLocation(program, name); - } - - public static int glGetAttribLocation(int program, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL20.glGetAttribLocation(program, name); - } - - public static void glGetProgram(int program, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL20.glGetProgramiv(program, pname, params); - } - - public static java.lang.String glGetProgramInfoLog(int program, int maxLength) { - return org.lwjgl3.opengl.GL20.glGetProgramInfoLog(program, maxLength); - } - - public static void glGetProgramInfoLog(int program, java.nio.IntBuffer length, java.nio.ByteBuffer infoLog) { - org.lwjgl3.opengl.GL20.glGetProgramInfoLog(program, length, infoLog); - } - - public static int glGetProgrami(int program, int pname) { - return org.lwjgl3.opengl.GL20.glGetProgrami(program, pname); - } - - public static void glGetShader(int shader, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL20.glGetShaderiv(shader, pname, params); - } - - public static java.lang.String glGetShaderInfoLog(int shader, int maxLength) { - return org.lwjgl3.opengl.GL20.glGetShaderInfoLog(shader, maxLength); - } - - public static void glGetShaderInfoLog(int shader, java.nio.IntBuffer length, java.nio.ByteBuffer infoLog) { - org.lwjgl3.opengl.GL20.glGetShaderInfoLog(shader, length, infoLog); - } - - public static java.lang.String glGetShaderSource(int shader, int maxLength) { - return org.lwjgl3.opengl.GL20.glGetShaderSource(shader, maxLength); - } - - public static void glGetShaderSource(int shader, java.nio.IntBuffer length, java.nio.ByteBuffer source) { - org.lwjgl3.opengl.GL20.glGetShaderSource(shader, length, source); - } - - public static int glGetShaderi(int shader, int pname) { - return org.lwjgl3.opengl.GL20.glGetShaderi(shader, pname); - } - - public static void glGetUniform(int program, int location, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL20.glGetUniformfv(program, location, params); - } - - public static void glGetUniform(int program, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL20.glGetUniformiv(program, location, params); - } - - public static int glGetUniformLocation(int program, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL20.glGetUniformLocation(program, name); - } - - public static int glGetUniformLocation(int program, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL20.glGetUniformLocation(program, name); - } - - public static void glGetVertexAttrib(int index, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.GL20.glGetVertexAttribdv(index, pname, params); - } - - public static void glGetVertexAttrib(int index, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL20.glGetVertexAttribfv(index, pname, params); - } - - public static void glGetVertexAttrib(int index, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL20.glGetVertexAttribiv(index, pname, params); - } - - public static boolean glIsProgram(int program) { - return org.lwjgl3.opengl.GL20.glIsProgram(program); - } - - public static boolean glIsShader(int shader) { - return org.lwjgl3.opengl.GL20.glIsShader(shader); - } - - public static void glLinkProgram(int program) { - org.lwjgl3.opengl.GL20.glLinkProgram(program); - } - - public static void glShaderSource(int shader, java.lang.CharSequence string) { - org.lwjgl3.opengl.GL20.glShaderSource(shader, string); - } - - public static void glShaderSource(int shader, java.nio.ByteBuffer string) { - - org.lwjgl3.opengl.GL20.glShaderSource(shader, BufferCasts.bufferToCharSeq(string)); - } - - public static void glShaderSource(int shader, java.lang.CharSequence[] strings) { - org.lwjgl3.opengl.GL20.glShaderSource(shader, strings); - } - - public static void glStencilFuncSeparate(int face, int func, int ref, int mask) { - org.lwjgl3.opengl.GL20.glStencilFuncSeparate(face, func, ref, mask); - } - - public static void glStencilMaskSeparate(int face, int mask) { - org.lwjgl3.opengl.GL20.glStencilMaskSeparate(face, mask); - } - - public static void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass) { - org.lwjgl3.opengl.GL20.glStencilOpSeparate(face, sfail, dpfail, dppass); - } - - public static void glUniform1(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL20.glUniform1fv(location, values); - } - - public static void glUniform1(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL20.glUniform1iv(location, values); - } - - public static void glUniform1f(int location, float v0) { - org.lwjgl3.opengl.GL20.glUniform1f(location, v0); - } - - public static void glUniform1i(int location, int v0) { - org.lwjgl3.opengl.GL20.glUniform1i(location, v0); - } - - public static void glUniform2(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL20.glUniform2fv(location, values); - } - - public static void glUniform2(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL20.glUniform2iv(location, values); - } - - public static void glUniform2f(int location, float v0, float v1) { - org.lwjgl3.opengl.GL20.glUniform2f(location, v0, v1); - } - - public static void glUniform2i(int location, int v0, int v1) { - org.lwjgl3.opengl.GL20.glUniform2i(location, v0, v1); - } - - public static void glUniform3(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL20.glUniform3fv(location, values); - } - - public static void glUniform3(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL20.glUniform3iv(location, values); - } - - public static void glUniform3f(int location, float v0, float v1, float v2) { - org.lwjgl3.opengl.GL20.glUniform3f(location, v0, v1, v2); - } - - public static void glUniform3i(int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.GL20.glUniform3i(location, v0, v1, v2); - } - - public static void glUniform4(int location, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL20.glUniform4fv(location, values); - } - - public static void glUniform4(int location, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL20.glUniform4iv(location, values); - } - - public static void glUniform4f(int location, float v0, float v1, float v2, float v3) { - org.lwjgl3.opengl.GL20.glUniform4f(location, v0, v1, v2, v3); - } - - public static void glUniform4i(int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.GL20.glUniform4i(location, v0, v1, v2, v3); - } - - public static void glUniformMatrix2(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL20.glUniformMatrix2fv(location, transpose, matrices); - } - - public static void glUniformMatrix3(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL20.glUniformMatrix3fv(location, transpose, matrices); - } - - public static void glUniformMatrix4(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL20.glUniformMatrix4fv(location, transpose, matrices); - } - - public static void glUseProgram(int program) { - org.lwjgl3.opengl.GL20.glUseProgram(program); - } - - public static void glValidateProgram(int program) { - org.lwjgl3.opengl.GL20.glValidateProgram(program); - } - - public static void glVertexAttrib1d(int index, double x) { - org.lwjgl3.opengl.GL20.glVertexAttrib1d(index, x); - } - - public static void glVertexAttrib1f(int index, float x) { - org.lwjgl3.opengl.GL20.glVertexAttrib1f(index, x); - } - - public static void glVertexAttrib1s(int index, short x) { - org.lwjgl3.opengl.GL20.glVertexAttrib1s(index, x); - } - - public static void glVertexAttrib2d(int index, double x, double y) { - org.lwjgl3.opengl.GL20.glVertexAttrib2d(index, x, y); - } - - public static void glVertexAttrib2f(int index, float x, float y) { - org.lwjgl3.opengl.GL20.glVertexAttrib2f(index, x, y); - } - - public static void glVertexAttrib2s(int index, short x, short y) { - org.lwjgl3.opengl.GL20.glVertexAttrib2s(index, x, y); - } - - public static void glVertexAttrib3d(int index, double x, double y, double z) { - org.lwjgl3.opengl.GL20.glVertexAttrib3d(index, x, y, z); - } - - public static void glVertexAttrib3f(int index, float x, float y, float z) { - org.lwjgl3.opengl.GL20.glVertexAttrib3f(index, x, y, z); - } - - public static void glVertexAttrib3s(int index, short x, short y, short z) { - org.lwjgl3.opengl.GL20.glVertexAttrib3s(index, x, y, z); - } - - public static void glVertexAttrib4Nub(int index, byte x, byte y, byte z, byte w) { - org.lwjgl3.opengl.GL20.glVertexAttrib4Nub(index, x, y, z, w); - } - - public static void glVertexAttrib4d(int index, double x, double y, double z, double w) { - org.lwjgl3.opengl.GL20.glVertexAttrib4d(index, x, y, z, w); - } - - public static void glVertexAttrib4f(int index, float x, float y, float z, float w) { - org.lwjgl3.opengl.GL20.glVertexAttrib4f(index, x, y, z, w); - } - - public static void glVertexAttrib4s(int index, short x, short y, short z, short w) { - org.lwjgl3.opengl.GL20.glVertexAttrib4s(index, x, y, z, w); - } - - public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, - long buffer_buffer_offset) { - org.lwjgl3.opengl.GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer_buffer_offset); - } - - public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, - java.nio.ByteBuffer buffer) { - org.lwjgl3.opengl.GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer); - } - - public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, - java.nio.DoubleBuffer buffer) { - - org.lwjgl3.opengl.GL20.glVertexAttribPointer( - index, - size, - org.lwjgl3.opengl.GL11.GL_DOUBLE, - normalized, - stride, - BufferCasts.toByteBuffer(buffer)); - } - - public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, - java.nio.FloatBuffer buffer) { - - org.lwjgl3.opengl.GL20 - .glVertexAttribPointer(index, size, org.lwjgl3.opengl.GL11.GL_FLOAT, normalized, stride, buffer); - } - - public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, - java.nio.ByteBuffer buffer) { - - org.lwjgl3.opengl.GL20.glVertexAttribPointer( - index, - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl3.opengl.GL11.GL_BYTE), - normalized, - stride, - org.lwjgl.MemoryUtil.getAddress(buffer)); - } - - public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, - java.nio.IntBuffer buffer) { - - org.lwjgl3.opengl.GL20.glVertexAttribPointer( - index, - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_INT : org.lwjgl3.opengl.GL11.GL_INT), - normalized, - stride, - org.lwjgl.MemoryUtil.getAddress(buffer)); - } - - public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, - java.nio.ShortBuffer buffer) { - - org.lwjgl3.opengl.GL20.glVertexAttribPointer( - index, - size, - (unsigned ? org.lwjgl3.opengl.GL11.GL_UNSIGNED_SHORT : org.lwjgl3.opengl.GL11.GL_SHORT), - normalized, - stride, - org.lwjgl.MemoryUtil.getAddress(buffer)); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL20x.java b/src/main/java/org/lwjgl/opengl/GL20x.java deleted file mode 100644 index c42b3eb25..000000000 --- a/src/main/java/org/lwjgl/opengl/GL20x.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.lwjgl.opengl; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import java.nio.ShortBuffer; - -import org.lwjgl3.BufferUtils; -import org.lwjgl3.PointerBuffer; -import org.lwjgl3.opengl.GL11; -import org.lwjgl3.opengl.GL20; -import org.lwjgl3.system.MemoryUtil; - -public class GL20x { - - public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, - ByteBuffer buffer) { - int type = unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE; - GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer); - } - - public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, - ShortBuffer buffer) { - int type = unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT; - GL20.nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.memAddress(buffer)); - } - - public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, - IntBuffer buffer) { - int type = unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT; - GL20.nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.memAddress(buffer)); - } - - public static String glGetActiveAttrib(int program, int index, int maxLength, IntBuffer sizeType) { - // TODO check if correct - IntBuffer type = BufferUtils.createIntBuffer(1); - String s = GL20.glGetActiveAttrib(program, index, maxLength, sizeType, type); - sizeType.put(type.get(0)); - return s; - } - - public static String glGetActiveUniform(int program, int index, int maxLength, IntBuffer sizeType) { - // TODO if correct - IntBuffer type = BufferUtils.createIntBuffer(1); - String s = GL20.glGetActiveUniform(program, index, maxLength, sizeType, type); - sizeType.put(type.get(0)); - return s; - } - - public static void glShaderSource(int shader, java.nio.ByteBuffer string) { - PointerBuffer strings = BufferUtils.createPointerBuffer(1); - IntBuffer lengths = BufferUtils.createIntBuffer(1); - - strings.put(0, string); - lengths.put(0, new String(string.array()).length()); // source.length()); - org.lwjgl3.opengl.GL20.glShaderSource(shader, strings, lengths); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL21.java b/src/main/java/org/lwjgl/opengl/GL21.java deleted file mode 100644 index 7e06787eb..000000000 --- a/src/main/java/org/lwjgl/opengl/GL21.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.lwjgl.opengl; - -public class GL21 { - - public static final int GL_COMPRESSED_SLUMINANCE = (int) 35914; - public static final int GL_COMPRESSED_SLUMINANCE_ALPHA = (int) 35915; - public static final int GL_COMPRESSED_SRGB = (int) 35912; - public static final int GL_COMPRESSED_SRGB_ALPHA = (int) 35913; - public static final int GL_CURRENT_RASTER_SECONDARY_COLOR = (int) 33887; - public static final int GL_FLOAT_MAT2x3 = (int) 35685; - public static final int GL_FLOAT_MAT2x4 = (int) 35686; - public static final int GL_FLOAT_MAT3x2 = (int) 35687; - public static final int GL_FLOAT_MAT3x4 = (int) 35688; - public static final int GL_FLOAT_MAT4x2 = (int) 35689; - public static final int GL_FLOAT_MAT4x3 = (int) 35690; - public static final int GL_PIXEL_PACK_BUFFER = (int) 35051; - public static final int GL_PIXEL_PACK_BUFFER_BINDING = (int) 35053; - public static final int GL_PIXEL_UNPACK_BUFFER = (int) 35052; - public static final int GL_PIXEL_UNPACK_BUFFER_BINDING = (int) 35055; - public static final int GL_SLUMINANCE8 = (int) 35911; - public static final int GL_SLUMINANCE8_ALPHA8 = (int) 35909; - public static final int GL_SLUMINANCE = (int) 35910; - public static final int GL_SLUMINANCE_ALPHA = (int) 35908; - public static final int GL_SRGB8 = (int) 35905; - public static final int GL_SRGB8_ALPHA8 = (int) 35907; - public static final int GL_SRGB = (int) 35904; - public static final int GL_SRGB_ALPHA = (int) 35906; - - public static void glUniformMatrix2x3(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL21.glUniformMatrix2x3fv(location, transpose, matrices); - } - - public static void glUniformMatrix2x4(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL21.glUniformMatrix2x4fv(location, transpose, matrices); - } - - public static void glUniformMatrix3x2(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL21.glUniformMatrix3x2fv(location, transpose, matrices); - } - - public static void glUniformMatrix3x4(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL21.glUniformMatrix3x4fv(location, transpose, matrices); - } - - public static void glUniformMatrix4x2(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL21.glUniformMatrix4x2fv(location, transpose, matrices); - } - - public static void glUniformMatrix4x3(int location, boolean transpose, java.nio.FloatBuffer matrices) { - org.lwjgl3.opengl.GL21.glUniformMatrix4x3fv(location, transpose, matrices); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL30.java b/src/main/java/org/lwjgl/opengl/GL30.java deleted file mode 100644 index 6ad277cde..000000000 --- a/src/main/java/org/lwjgl/opengl/GL30.java +++ /dev/null @@ -1,659 +0,0 @@ -package org.lwjgl.opengl; - -public class GL30 { - - public static final int GL_ALPHA16F = (int) 34844; - public static final int GL_ALPHA16I = (int) 36234; - public static final int GL_ALPHA16UI = (int) 36216; - public static final int GL_ALPHA32F = (int) 34838; - public static final int GL_ALPHA32I = (int) 36228; - public static final int GL_ALPHA32UI = (int) 36210; - public static final int GL_ALPHA8I = (int) 36240; - public static final int GL_ALPHA8UI = (int) 36222; - public static final int GL_ALPHA_INTEGER = (int) 36247; - public static final int GL_BGRA_INTEGER = (int) 36251; - public static final int GL_BGR_INTEGER = (int) 36250; - public static final int GL_BLUE_INTEGER = (int) 36246; - public static final int GL_BUFFER_ACCESS_FLAGS = (int) 37151; - public static final int GL_BUFFER_MAP_LENGTH = (int) 37152; - public static final int GL_BUFFER_MAP_OFFSET = (int) 37153; - public static final int GL_CLAMP_FRAGMENT_COLOR = (int) 35099; - public static final int GL_CLAMP_READ_COLOR = (int) 35100; - public static final int GL_CLAMP_VERTEX_COLOR = (int) 35098; - public static final int GL_CLIP_DISTANCE0 = (int) 12288; - public static final int GL_CLIP_DISTANCE1 = (int) 12289; - public static final int GL_CLIP_DISTANCE2 = (int) 12290; - public static final int GL_CLIP_DISTANCE3 = (int) 12291; - public static final int GL_CLIP_DISTANCE4 = (int) 12292; - public static final int GL_CLIP_DISTANCE5 = (int) 12293; - public static final int GL_CLIP_DISTANCE6 = (int) 12294; - public static final int GL_CLIP_DISTANCE7 = (int) 12295; - public static final int GL_COLOR_ATTACHMENT0 = (int) 36064; - public static final int GL_COLOR_ATTACHMENT10 = (int) 36074; - public static final int GL_COLOR_ATTACHMENT11 = (int) 36075; - public static final int GL_COLOR_ATTACHMENT12 = (int) 36076; - public static final int GL_COLOR_ATTACHMENT13 = (int) 36077; - public static final int GL_COLOR_ATTACHMENT14 = (int) 36078; - public static final int GL_COLOR_ATTACHMENT15 = (int) 36079; - public static final int GL_COLOR_ATTACHMENT1 = (int) 36065; - public static final int GL_COLOR_ATTACHMENT2 = (int) 36066; - public static final int GL_COLOR_ATTACHMENT3 = (int) 36067; - public static final int GL_COLOR_ATTACHMENT4 = (int) 36068; - public static final int GL_COLOR_ATTACHMENT5 = (int) 36069; - public static final int GL_COLOR_ATTACHMENT6 = (int) 36070; - public static final int GL_COLOR_ATTACHMENT7 = (int) 36071; - public static final int GL_COLOR_ATTACHMENT8 = (int) 36072; - public static final int GL_COLOR_ATTACHMENT9 = (int) 36073; - public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE = (int) 34894; - public static final int GL_COMPARE_REF_TO_TEXTURE = (int) 34894; - public static final int GL_COMPRESSED_RED = (int) 33317; - public static final int GL_COMPRESSED_RED_RGTC1 = (int) 36283; - public static final int GL_COMPRESSED_RG = (int) 33318; - public static final int GL_COMPRESSED_RG_RGTC2 = (int) 36285; - public static final int GL_COMPRESSED_SIGNED_RED_RGTC1 = (int) 36284; - public static final int GL_COMPRESSED_SIGNED_RG_RGTC2 = (int) 36286; - public static final int GL_CONTEXT_FLAGS = (int) 33310; - public static final int GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = (int) 1; - public static final int GL_DEPTH24_STENCIL8 = (int) 35056; - public static final int GL_DEPTH32F_STENCIL8 = (int) 36013; - public static final int GL_DEPTH_ATTACHMENT = (int) 36096; - public static final int GL_DEPTH_BUFFER = (int) 33315; - public static final int GL_DEPTH_COMPONENT32F = (int) 36012; - public static final int GL_DEPTH_STENCIL = (int) 34041; - public static final int GL_DEPTH_STENCIL_ATTACHMENT = (int) 33306; - public static final int GL_DRAW_FRAMEBUFFER = (int) 36009; - public static final int GL_DRAW_FRAMEBUFFER_BINDING = (int) 36006; - public static final int GL_FIXED_ONLY = (int) 35101; - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = (int) 36269; - public static final int GL_FRAMEBUFFER = (int) 36160; - public static final int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = (int) 33301; - public static final int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = (int) 33300; - public static final int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = (int) 33296; - public static final int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = (int) 33297; - public static final int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = (int) 33302; - public static final int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = (int) 33299; - public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = (int) 36049; - public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = (int) 36048; - public static final int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = (int) 33298; - public static final int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = (int) 33303; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = (int) 36051; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = (int) 36052; - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = (int) 36050; - public static final int GL_FRAMEBUFFER_BINDING = (int) 36006; - public static final int GL_FRAMEBUFFER_COMPLETE = (int) 36053; - public static final int GL_FRAMEBUFFER_DEFAULT = (int) 33304; - public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = (int) 36054; - public static final int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = (int) 36059; - public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = (int) 36055; - public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = (int) 36182; - public static final int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = (int) 36060; - public static final int GL_FRAMEBUFFER_SRGB = (int) 36281; - public static final int GL_FRAMEBUFFER_SRGB_CAPABLE = (int) 36282; - public static final int GL_FRAMEBUFFER_UNDEFINED = (int) 33305; - public static final int GL_FRAMEBUFFER_UNSUPPORTED = (int) 36061; - public static final int GL_GREEN_INTEGER = (int) 36245; - public static final int GL_HALF_FLOAT = (int) 5131; - public static final int GL_INDEX = (int) 33314; - public static final int GL_INTERLEAVED_ATTRIBS = (int) 35980; - public static final int GL_INT_SAMPLER_1D = (int) 36297; - public static final int GL_INT_SAMPLER_1D_ARRAY = (int) 36302; - public static final int GL_INT_SAMPLER_2D = (int) 36298; - public static final int GL_INT_SAMPLER_2D_ARRAY = (int) 36303; - public static final int GL_INT_SAMPLER_2D_RECT = (int) 36301; - public static final int GL_INT_SAMPLER_3D = (int) 36299; - public static final int GL_INT_SAMPLER_BUFFER = (int) 36304; - public static final int GL_INT_SAMPLER_CUBE = (int) 36300; - public static final int GL_INVALID_FRAMEBUFFER_OPERATION = (int) 1286; - public static final int GL_MAJOR_VERSION = (int) 33307; - public static final int GL_MAP_FLUSH_EXPLICIT_BIT = (int) 16; - public static final int GL_MAP_INVALIDATE_BUFFER_BIT = (int) 8; - public static final int GL_MAP_INVALIDATE_RANGE_BIT = (int) 4; - public static final int GL_MAP_READ_BIT = (int) 1; - public static final int GL_MAP_UNSYNCHRONIZED_BIT = (int) 32; - public static final int GL_MAP_WRITE_BIT = (int) 2; - public static final int GL_MAX_ARRAY_TEXTURE_LAYERS = (int) 35071; - public static final int GL_MAX_CLIP_DISTANCES = (int) 3378; - public static final int GL_MAX_COLOR_ATTACHMENTS = (int) 36063; - public static final int GL_MAX_PROGRAM_TEXEL_OFFSET = (int) 35077; - public static final int GL_MAX_RENDERBUFFER_SIZE = (int) 34024; - public static final int GL_MAX_SAMPLES = (int) 36183; - public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = (int) 35978; - public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = (int) 35979; - public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = (int) 35968; - public static final int GL_MAX_VARYING_COMPONENTS = (int) 35659; - public static final int GL_MINOR_VERSION = (int) 33308; - public static final int GL_MIN_PROGRAM_TEXEL_OFFSET = (int) 35076; - public static final int GL_NUM_EXTENSIONS = (int) 33309; - public static final int GL_PRIMITIVES_GENERATED = (int) 35975; - public static final int GL_PROXY_TEXTURE_1D_ARRAY = (int) 35865; - public static final int GL_PROXY_TEXTURE_2D_ARRAY = (int) 35867; - public static final int GL_QUERY_BY_REGION_NO_WAIT = (int) 36374; - public static final int GL_QUERY_BY_REGION_WAIT = (int) 36373; - public static final int GL_QUERY_NO_WAIT = (int) 36372; - public static final int GL_QUERY_WAIT = (int) 36371; - public static final int GL_R11F_G11F_B10F = (int) 35898; - public static final int GL_R16 = (int) 33322; - public static final int GL_R16F = (int) 33325; - public static final int GL_R16I = (int) 33331; - public static final int GL_R16UI = (int) 33332; - public static final int GL_R32F = (int) 33326; - public static final int GL_R32I = (int) 33333; - public static final int GL_R32UI = (int) 33334; - public static final int GL_R8 = (int) 33321; - public static final int GL_R8I = (int) 33329; - public static final int GL_R8UI = (int) 33330; - public static final int GL_RASTERIZER_DISCARD = (int) 35977; - public static final int GL_READ_FRAMEBUFFER = (int) 36008; - public static final int GL_READ_FRAMEBUFFER_BINDING = (int) 36010; - public static final int GL_RED_INTEGER = (int) 36244; - public static final int GL_RENDERBUFFER = (int) 36161; - public static final int GL_RENDERBUFFER_ALPHA_SIZE = (int) 36179; - public static final int GL_RENDERBUFFER_BINDING = (int) 36007; - public static final int GL_RENDERBUFFER_BLUE_SIZE = (int) 36178; - public static final int GL_RENDERBUFFER_DEPTH_SIZE = (int) 36180; - public static final int GL_RENDERBUFFER_GREEN_SIZE = (int) 36177; - public static final int GL_RENDERBUFFER_HEIGHT = (int) 36163; - public static final int GL_RENDERBUFFER_INTERNAL_FORMAT = (int) 36164; - public static final int GL_RENDERBUFFER_RED_SIZE = (int) 36176; - public static final int GL_RENDERBUFFER_SAMPLES = (int) 36011; - public static final int GL_RENDERBUFFER_STENCIL_SIZE = (int) 36181; - public static final int GL_RENDERBUFFER_WIDTH = (int) 36162; - public static final int GL_RG16 = (int) 33324; - public static final int GL_RG16F = (int) 33327; - public static final int GL_RG16I = (int) 33337; - public static final int GL_RG16UI = (int) 33338; - public static final int GL_RG32F = (int) 33328; - public static final int GL_RG32I = (int) 33339; - public static final int GL_RG32UI = (int) 33340; - public static final int GL_RG8 = (int) 33323; - public static final int GL_RG8I = (int) 33335; - public static final int GL_RG8UI = (int) 33336; - public static final int GL_RG = (int) 33319; - public static final int GL_RGB16F = (int) 34843; - public static final int GL_RGB16I = (int) 36233; - public static final int GL_RGB16UI = (int) 36215; - public static final int GL_RGB32F = (int) 34837; - public static final int GL_RGB32I = (int) 36227; - public static final int GL_RGB32UI = (int) 36209; - public static final int GL_RGB8I = (int) 36239; - public static final int GL_RGB8UI = (int) 36221; - public static final int GL_RGB9_E5 = (int) 35901; - public static final int GL_RGBA16F = (int) 34842; - public static final int GL_RGBA16I = (int) 36232; - public static final int GL_RGBA16UI = (int) 36214; - public static final int GL_RGBA32F = (int) 34836; - public static final int GL_RGBA32I = (int) 36226; - public static final int GL_RGBA32UI = (int) 36208; - public static final int GL_RGBA8I = (int) 36238; - public static final int GL_RGBA8UI = (int) 36220; - public static final int GL_RGBA_INTEGER = (int) 36249; - public static final int GL_RGBA_INTEGER_MODE = (int) 36254; - public static final int GL_RGB_INTEGER = (int) 36248; - public static final int GL_RG_INTEGER = (int) 33320; - public static final int GL_SAMPLER_1D_ARRAY = (int) 36288; - public static final int GL_SAMPLER_1D_ARRAY_SHADOW = (int) 36291; - public static final int GL_SAMPLER_2D_ARRAY = (int) 36289; - public static final int GL_SAMPLER_2D_ARRAY_SHADOW = (int) 36292; - public static final int GL_SAMPLER_BUFFER = (int) 36290; - public static final int GL_SAMPLER_CUBE_SHADOW = (int) 36293; - public static final int GL_SEPARATE_ATTRIBS = (int) 35981; - public static final int GL_STENCIL_ATTACHMENT = (int) 36128; - public static final int GL_STENCIL_BUFFER = (int) 33316; - public static final int GL_STENCIL_INDEX16 = (int) 36169; - public static final int GL_STENCIL_INDEX1 = (int) 36166; - public static final int GL_STENCIL_INDEX4 = (int) 36167; - public static final int GL_STENCIL_INDEX8 = (int) 36168; - public static final int GL_TEXTURE_1D_ARRAY = (int) 35864; - public static final int GL_TEXTURE_2D_ARRAY = (int) 35866; - public static final int GL_TEXTURE_ALPHA_TYPE = (int) 35859; - public static final int GL_TEXTURE_BINDING_1D_ARRAY = (int) 35868; - public static final int GL_TEXTURE_BINDING_2D_ARRAY = (int) 35869; - public static final int GL_TEXTURE_BLUE_TYPE = (int) 35858; - public static final int GL_TEXTURE_DEPTH_TYPE = (int) 35862; - public static final int GL_TEXTURE_GREEN_TYPE = (int) 35857; - public static final int GL_TEXTURE_INTENSITY_TYPE = (int) 35861; - public static final int GL_TEXTURE_LUMINANCE_TYPE = (int) 35860; - public static final int GL_TEXTURE_RED_TYPE = (int) 35856; - public static final int GL_TEXTURE_SHARED_SIZE = (int) 35903; - public static final int GL_TEXTURE_STENCIL_SIZE = (int) 35057; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER = (int) 35982; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = (int) 35983; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = (int) 35967; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = (int) 35973; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START = (int) 35972; - public static final int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = (int) 35976; - public static final int GL_TRANSFORM_FEEDBACK_VARYINGS = (int) 35971; - public static final int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = (int) 35958; - public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = (int) 35899; - public static final int GL_UNSIGNED_INT_24_8 = (int) 34042; - public static final int GL_UNSIGNED_INT_5_9_9_9_REV = (int) 35902; - public static final int GL_UNSIGNED_INT_SAMPLER_1D = (int) 36305; - public static final int GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = (int) 36310; - public static final int GL_UNSIGNED_INT_SAMPLER_2D = (int) 36306; - public static final int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = (int) 36311; - public static final int GL_UNSIGNED_INT_SAMPLER_2D_RECT = (int) 36309; - public static final int GL_UNSIGNED_INT_SAMPLER_3D = (int) 36307; - public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER = (int) 36312; - public static final int GL_UNSIGNED_INT_SAMPLER_CUBE = (int) 36308; - public static final int GL_UNSIGNED_INT_VEC2 = (int) 36294; - public static final int GL_UNSIGNED_INT_VEC3 = (int) 36295; - public static final int GL_UNSIGNED_INT_VEC4 = (int) 36296; - public static final int GL_UNSIGNED_NORMALIZED = (int) 35863; - public static final int GL_VERTEX_ARRAY_BINDING = (int) 34229; - public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = (int) 35069; - - public static void glBeginConditionalRender(int id, int mode) { - org.lwjgl3.opengl.GL30.glBeginConditionalRender(id, mode); - } - - public static void glBeginTransformFeedback(int primitiveMode) { - org.lwjgl3.opengl.GL30.glBeginTransformFeedback(primitiveMode); - } - - public static void glBindBufferBase(int target, int index, int buffer) { - org.lwjgl3.opengl.GL30.glBindBufferBase(target, index, buffer); - } - - public static void glBindBufferRange(int target, int index, int buffer, long offset, long size) { - org.lwjgl3.opengl.GL30.glBindBufferRange(target, index, buffer, offset, size); - } - - public static void glBindFragDataLocation(int program, int colorNumber, java.lang.CharSequence name) { - org.lwjgl3.opengl.GL30.glBindFragDataLocation(program, colorNumber, name); - } - - public static void glBindFragDataLocation(int program, int colorNumber, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL30.glBindFragDataLocation(program, colorNumber, name); - } - - public static void glBindFramebuffer(int target, int framebuffer) { - org.lwjgl3.opengl.GL30.glBindFramebuffer(target, framebuffer); - } - - public static void glBindRenderbuffer(int target, int renderbuffer) { - org.lwjgl3.opengl.GL30.glBindRenderbuffer(target, renderbuffer); - } - - public static void glBindVertexArray(int array) { - org.lwjgl3.opengl.GL30.glBindVertexArray(array); - } - - public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, - int dstY1, int mask, int filter) { - org.lwjgl3.opengl.GL30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } - - public static int glCheckFramebufferStatus(int target) { - return org.lwjgl3.opengl.GL30.glCheckFramebufferStatus(target); - } - - public static void glClampColor(int target, int clamp) { - org.lwjgl3.opengl.GL30.glClampColor(target, clamp); - } - - public static void glClearBuffer(int buffer, int drawbuffer, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL30.glClearBufferfv(buffer, drawbuffer, value); - } - - public static void glClearBuffer(int buffer, int drawbuffer, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL30.glClearBufferiv(buffer, drawbuffer, value); - } - - public static void glClearBufferfi(int buffer, int drawbuffer, float depth, int stencil) { - org.lwjgl3.opengl.GL30.glClearBufferfi(buffer, drawbuffer, depth, stencil); - } - - public static void glClearBufferu(int buffer, int drawbuffer, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL30.glClearBufferuiv(buffer, drawbuffer, value); - } - - public static void glColorMaski(int buf, boolean r, boolean g, boolean b, boolean a) { - org.lwjgl3.opengl.GL30.glColorMaski(buf, r, g, b, a); - } - - public static void glDeleteFramebuffers(int framebuffer) { - org.lwjgl3.opengl.GL30.glDeleteFramebuffers(framebuffer); - } - - public static void glDeleteFramebuffers(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.GL30.glDeleteFramebuffers(framebuffers); - } - - public static void glDeleteRenderbuffers(int renderbuffer) { - org.lwjgl3.opengl.GL30.glDeleteRenderbuffers(renderbuffer); - } - - public static void glDeleteRenderbuffers(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.GL30.glDeleteRenderbuffers(renderbuffers); - } - - public static void glDeleteVertexArrays(int array) { - org.lwjgl3.opengl.GL30.glDeleteVertexArrays(array); - } - - public static void glDeleteVertexArrays(java.nio.IntBuffer arrays) { - org.lwjgl3.opengl.GL30.glDeleteVertexArrays(arrays); - } - - public static void glDisablei(int target, int index) { - org.lwjgl3.opengl.GL30.glDisablei(target, index); - } - - public static void glEnablei(int target, int index) { - org.lwjgl3.opengl.GL30.glEnablei(target, index); - } - - public static void glEndConditionalRender() { - org.lwjgl3.opengl.GL30.glEndConditionalRender(); - } - - public static void glEndTransformFeedback() { - org.lwjgl3.opengl.GL30.glEndTransformFeedback(); - } - - public static void glFlushMappedBufferRange(int target, long offset, long length) { - org.lwjgl3.opengl.GL30.glFlushMappedBufferRange(target, offset, length); - } - - public static void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) { - org.lwjgl3.opengl.GL30.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - } - - public static void glFramebufferTexture1D(int target, int attachment, int textarget, int texture, int level) { - org.lwjgl3.opengl.GL30.glFramebufferTexture1D(target, attachment, textarget, texture, level); - } - - public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) { - org.lwjgl3.opengl.GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); - } - - public static void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, - int zoffset) { - org.lwjgl3.opengl.GL30.glFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset); - } - - public static void glFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer) { - org.lwjgl3.opengl.GL30.glFramebufferTextureLayer(target, attachment, texture, level, layer); - } - - public static int glGenFramebuffers() { - return org.lwjgl3.opengl.GL30.glGenFramebuffers(); - } - - public static void glGenFramebuffers(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.GL30.glGenFramebuffers(framebuffers); - } - - public static int glGenRenderbuffers() { - return org.lwjgl3.opengl.GL30.glGenRenderbuffers(); - } - - public static void glGenRenderbuffers(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.GL30.glGenRenderbuffers(renderbuffers); - } - - public static int glGenVertexArrays() { - return org.lwjgl3.opengl.GL30.glGenVertexArrays(); - } - - public static void glGenVertexArrays(java.nio.IntBuffer arrays) { - org.lwjgl3.opengl.GL30.glGenVertexArrays(arrays); - } - - public static void glGenerateMipmap(int target) { - org.lwjgl3.opengl.GL30.glGenerateMipmap(target); - } - - public static void glGetBoolean(int value, int index, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL30.glGetBooleani_v(value, index, data); - } - - public static int glGetFragDataLocation(int program, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL30.glGetFragDataLocation(program, name); - } - - public static int glGetFragDataLocation(int program, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL30.glGetFragDataLocation(program, name); - } - - public static void glGetFramebufferAttachmentParameter(int target, int attachment, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - - public static int glGetFramebufferAttachmentParameteri(int target, int attachment, int pname) { - return org.lwjgl3.opengl.GL30.glGetFramebufferAttachmentParameteri(target, attachment, pname); - } - - public static void glGetInteger(int value, int index, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL30.glGetIntegeri_v(value, index, data); - } - - public static void glGetRenderbufferParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetRenderbufferParameteriv(target, pname, params); - } - - public static int glGetRenderbufferParameteri(int target, int pname) { - return org.lwjgl3.opengl.GL30.glGetRenderbufferParameteri(target, pname); - } - - public static java.lang.String glGetStringi(int name, int index) { - return org.lwjgl3.opengl.GL30.glGetStringi(name, index); - } - - public static void glGetTexParameterI(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetTexParameterIiv(target, pname, params); - } - - public static int glGetTexParameterIi(int target, int pname) { - return org.lwjgl3.opengl.GL30.glGetTexParameterIi(target, pname); - } - - public static void glGetTexParameterIu(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetTexParameterIuiv(target, pname, params); - } - - public static int glGetTexParameterIui(int target, int pname) { - return org.lwjgl3.opengl.GL30.glGetTexParameterIui(target, pname); - } - - public static java.lang.String glGetTransformFeedbackVarying(int program, int index, int bufSize, - java.nio.IntBuffer size, java.nio.IntBuffer type) { - return org.lwjgl3.opengl.GL30.glGetTransformFeedbackVarying(program, index, bufSize, size, type); - } - - public static void glGetTransformFeedbackVarying(int program, int index, java.nio.IntBuffer length, - java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL30.glGetTransformFeedbackVarying(program, index, length, size, type, name); - } - - public static void glGetUniformu(int program, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetUniformuiv(program, location, params); - } - - public static void glGetVertexAttribI(int index, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetVertexAttribIiv(index, pname, params); - } - - public static void glGetVertexAttribIu(int index, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glGetVertexAttribIuiv(index, pname, params); - } - - public static boolean glIsEnabledi(int target, int index) { - return org.lwjgl3.opengl.GL30.glIsEnabledi(target, index); - } - - public static boolean glIsFramebuffer(int framebuffer) { - return org.lwjgl3.opengl.GL30.glIsFramebuffer(framebuffer); - } - - public static boolean glIsRenderbuffer(int renderbuffer) { - return org.lwjgl3.opengl.GL30.glIsRenderbuffer(renderbuffer); - } - - public static boolean glIsVertexArray(int array) { - return org.lwjgl3.opengl.GL30.glIsVertexArray(array); - } - - public static java.nio.ByteBuffer glMapBufferRange(int target, long offset, long length, int access, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.GL30.glMapBufferRange(target, offset, length, access, old_buffer); - } - - public static void glRenderbufferStorage(int target, int internalformat, int width, int height) { - org.lwjgl3.opengl.GL30.glRenderbufferStorage(target, internalformat, width, height); - } - - public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, - int height) { - org.lwjgl3.opengl.GL30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); - } - - public static void glTexParameterI(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glTexParameterIiv(target, pname, params); - } - - public static void glTexParameterIi(int target, int pname, int param) { - org.lwjgl3.opengl.GL30.glTexParameterIi(target, pname, param); - } - - public static void glTexParameterIu(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL30.glTexParameterIuiv(target, pname, params); - } - - public static void glTexParameterIui(int target, int pname, int param) { - org.lwjgl3.opengl.GL30.glTexParameterIui(target, pname, param); - } - - public static void glTransformFeedbackVaryings(int program, java.lang.CharSequence[] varyings, int bufferMode) { - org.lwjgl3.opengl.GL30.glTransformFeedbackVaryings(program, varyings, bufferMode); - } - - public static void glUniform1u(int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL30.glUniform1uiv(location, value); - } - - public static void glUniform1ui(int location, int v0) { - org.lwjgl3.opengl.GL30.glUniform1ui(location, v0); - } - - public static void glUniform2u(int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL30.glUniform2uiv(location, value); - } - - public static void glUniform2ui(int location, int v0, int v1) { - org.lwjgl3.opengl.GL30.glUniform2ui(location, v0, v1); - } - - public static void glUniform3u(int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL30.glUniform3uiv(location, value); - } - - public static void glUniform3ui(int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.GL30.glUniform3ui(location, v0, v1, v2); - } - - public static void glUniform4u(int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL30.glUniform4uiv(location, value); - } - - public static void glUniform4ui(int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.GL30.glUniform4ui(location, v0, v1, v2, v3); - } - - public static void glVertexAttribI1(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI1iv(index, v); - } - - public static void glVertexAttribI1i(int index, int x) { - org.lwjgl3.opengl.GL30.glVertexAttribI1i(index, x); - } - - public static void glVertexAttribI1u(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI1uiv(index, v); - } - - public static void glVertexAttribI1ui(int index, int x) { - org.lwjgl3.opengl.GL30.glVertexAttribI1ui(index, x); - } - - public static void glVertexAttribI2(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI2iv(index, v); - } - - public static void glVertexAttribI2i(int index, int x, int y) { - org.lwjgl3.opengl.GL30.glVertexAttribI2i(index, x, y); - } - - public static void glVertexAttribI2u(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI2uiv(index, v); - } - - public static void glVertexAttribI2ui(int index, int x, int y) { - org.lwjgl3.opengl.GL30.glVertexAttribI2ui(index, x, y); - } - - public static void glVertexAttribI3(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI3iv(index, v); - } - - public static void glVertexAttribI3i(int index, int x, int y, int z) { - org.lwjgl3.opengl.GL30.glVertexAttribI3i(index, x, y, z); - } - - public static void glVertexAttribI3u(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI3uiv(index, v); - } - - public static void glVertexAttribI3ui(int index, int x, int y, int z) { - org.lwjgl3.opengl.GL30.glVertexAttribI3ui(index, x, y, z); - } - - public static void glVertexAttribI4(int index, java.nio.ByteBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI4bv(index, v); - } - - public static void glVertexAttribI4(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI4iv(index, v); - } - - public static void glVertexAttribI4(int index, java.nio.ShortBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI4sv(index, v); - } - - public static void glVertexAttribI4i(int index, int x, int y, int z, int w) { - org.lwjgl3.opengl.GL30.glVertexAttribI4i(index, x, y, z, w); - } - - public static void glVertexAttribI4u(int index, java.nio.ByteBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI4ubv(index, v); - } - - public static void glVertexAttribI4u(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI4uiv(index, v); - } - - public static void glVertexAttribI4u(int index, java.nio.ShortBuffer v) { - org.lwjgl3.opengl.GL30.glVertexAttribI4usv(index, v); - } - - public static void glVertexAttribI4ui(int index, int x, int y, int z, int w) { - org.lwjgl3.opengl.GL30.glVertexAttribI4ui(index, x, y, z, w); - } - - public static void glVertexAttribIPointer(int index, int size, int type, int stride, long buffer_buffer_offset) { - org.lwjgl3.opengl.GL30.glVertexAttribIPointer(index, size, type, stride, buffer_buffer_offset); - } - - public static void glVertexAttribIPointer(int index, int size, int type, int stride, java.nio.ByteBuffer buffer) { - org.lwjgl3.opengl.GL30.glVertexAttribIPointer(index, size, type, stride, buffer); - } - - public static void glVertexAttribIPointer(int index, int size, int type, int stride, java.nio.IntBuffer buffer) { - org.lwjgl3.opengl.GL30.glVertexAttribIPointer(index, size, type, stride, buffer); - } - - public static void glVertexAttribIPointer(int index, int size, int type, int stride, java.nio.ShortBuffer buffer) { - org.lwjgl3.opengl.GL30.glVertexAttribIPointer(index, size, type, stride, buffer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL31.java b/src/main/java/org/lwjgl/opengl/GL31.java deleted file mode 100644 index c7517dcdf..000000000 --- a/src/main/java/org/lwjgl/opengl/GL31.java +++ /dev/null @@ -1,155 +0,0 @@ -package org.lwjgl.opengl; - -public class GL31 { - - public static final int GL_ACTIVE_UNIFORM_BLOCKS = (int) 35382; - public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = (int) 35381; - public static final int GL_COPY_READ_BUFFER = (int) 36662; - public static final int GL_COPY_READ_BUFFER_BINDING = (int) 36662; - public static final int GL_COPY_WRITE_BUFFER = (int) 36663; - public static final int GL_COPY_WRITE_BUFFER_BINDING = (int) 36663; - public static final int GL_INVALID_INDEX = (int) -1; - public static final int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = (int) 35379; - public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = (int) 35378; - public static final int GL_MAX_COMBINED_UNIFORM_BLOCKS = (int) 35374; - public static final int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = (int) 35377; - public static final int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = (int) 35373; - public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = (int) 35372; - public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE = (int) 34040; - public static final int GL_MAX_TEXTURE_BUFFER_SIZE = (int) 35883; - public static final int GL_MAX_UNIFORM_BLOCK_SIZE = (int) 35376; - public static final int GL_MAX_UNIFORM_BUFFER_BINDINGS = (int) 35375; - public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = (int) 35371; - public static final int GL_PRIMITIVE_RESTART = (int) 36765; - public static final int GL_PRIMITIVE_RESTART_INDEX = (int) 36766; - public static final int GL_PROXY_TEXTURE_RECTANGLE = (int) 34039; - public static final int GL_R16_SNORM = (int) 36760; - public static final int GL_R8_SNORM = (int) 36756; - public static final int GL_RED_SNORM = (int) 36752; - public static final int GL_RG16_SNORM = (int) 36761; - public static final int GL_RG8_SNORM = (int) 36757; - public static final int GL_RGB16_SNORM = (int) 36762; - public static final int GL_RGB8_SNORM = (int) 36758; - public static final int GL_RGBA16_SNORM = (int) 36763; - public static final int GL_RGBA8_SNORM = (int) 36759; - public static final int GL_RGBA_SNORM = (int) 36755; - public static final int GL_RGB_SNORM = (int) 36754; - public static final int GL_RG_SNORM = (int) 36753; - public static final int GL_SAMPLER_2D_RECT = (int) 35683; - public static final int GL_SAMPLER_2D_RECT_SHADOW = (int) 35684; - public static final int GL_SIGNED_NORMALIZED = (int) 36764; - public static final int GL_TEXTURE_BINDING_BUFFER = (int) 35884; - public static final int GL_TEXTURE_BINDING_RECTANGLE = (int) 34038; - public static final int GL_TEXTURE_BUFFER = (int) 35882; - public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = (int) 35885; - public static final int GL_TEXTURE_BUFFER_FORMAT = (int) 35886; - public static final int GL_TEXTURE_RECTANGLE = (int) 34037; - public static final int GL_UNIFORM_ARRAY_STRIDE = (int) 35388; - public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = (int) 35394; - public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = (int) 35395; - public static final int GL_UNIFORM_BLOCK_BINDING = (int) 35391; - public static final int GL_UNIFORM_BLOCK_DATA_SIZE = (int) 35392; - public static final int GL_UNIFORM_BLOCK_INDEX = (int) 35386; - public static final int GL_UNIFORM_BLOCK_NAME_LENGTH = (int) 35393; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = (int) 35398; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = (int) 35397; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = (int) 35396; - public static final int GL_UNIFORM_BUFFER = (int) 35345; - public static final int GL_UNIFORM_BUFFER_BINDING = (int) 35368; - public static final int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = (int) 35380; - public static final int GL_UNIFORM_BUFFER_SIZE = (int) 35370; - public static final int GL_UNIFORM_BUFFER_START = (int) 35369; - public static final int GL_UNIFORM_IS_ROW_MAJOR = (int) 35390; - public static final int GL_UNIFORM_MATRIX_STRIDE = (int) 35389; - public static final int GL_UNIFORM_NAME_LENGTH = (int) 35385; - public static final int GL_UNIFORM_OFFSET = (int) 35387; - public static final int GL_UNIFORM_SIZE = (int) 35384; - public static final int GL_UNIFORM_TYPE = (int) 35383; - - public static void glCopyBufferSubData(int readtarget, int writetarget, long readoffset, long writeoffset, - long size) { - org.lwjgl3.opengl.GL31.glCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size); - } - - public static void glDrawArraysInstanced(int mode, int first, int count, int primcount) { - org.lwjgl3.opengl.GL31.glDrawArraysInstanced(mode, first, count, primcount); - } - - public static void glDrawElementsInstanced(int mode, int indices_count, int type, long indices_buffer_offset, - int primcount) { - org.lwjgl3.opengl.GL31.glDrawElementsInstanced(mode, indices_count, type, indices_buffer_offset, primcount); - } - - public static void glDrawElementsInstanced(int mode, java.nio.ByteBuffer indices, int primcount) { - org.lwjgl3.opengl.GL31.glDrawElementsInstanced(mode, indices, primcount); - } - - public static void glDrawElementsInstanced(int mode, java.nio.IntBuffer indices, int primcount) { - org.lwjgl3.opengl.GL31.glDrawElementsInstanced(mode, indices, primcount); - } - - public static void glDrawElementsInstanced(int mode, java.nio.ShortBuffer indices, int primcount) { - org.lwjgl3.opengl.GL31.glDrawElementsInstanced(mode, indices, primcount); - } - - public static void glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL31.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - public static java.lang.String glGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize) { - return org.lwjgl3.opengl.GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); - } - - public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, java.nio.IntBuffer length, - java.nio.ByteBuffer uniformBlockName) { - org.lwjgl3.opengl.GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); - } - - public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname) { - return org.lwjgl3.opengl.GL31.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); - } - - public static java.lang.String glGetActiveUniformName(int program, int uniformIndex, int bufSize) { - return org.lwjgl3.opengl.GL31.glGetActiveUniformName(program, uniformIndex, bufSize); - } - - public static void glGetActiveUniformName(int program, int uniformIndex, java.nio.IntBuffer length, - java.nio.ByteBuffer uniformName) { - org.lwjgl3.opengl.GL31.glGetActiveUniformName(program, uniformIndex, length, uniformName); - } - - public static void glGetActiveUniforms(int program, java.nio.IntBuffer uniformIndices, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL31.glGetActiveUniformsiv(program, uniformIndices, pname, params); - } - - public static int glGetActiveUniformsi(int program, int uniformIndex, int pname) { - return org.lwjgl3.opengl.GL31.glGetActiveUniformsi(program, uniformIndex, pname); - } - - public static int glGetUniformBlockIndex(int program, java.lang.CharSequence uniformBlockName) { - return org.lwjgl3.opengl.GL31.glGetUniformBlockIndex(program, uniformBlockName); - } - - public static int glGetUniformBlockIndex(int program, java.nio.ByteBuffer uniformBlockName) { - return org.lwjgl3.opengl.GL31.glGetUniformBlockIndex(program, uniformBlockName); - } - - public static void glGetUniformIndices(int program, java.lang.CharSequence[] uniformNames, - java.nio.IntBuffer uniformIndices) { - org.lwjgl3.opengl.GL31.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - public static void glPrimitiveRestartIndex(int index) { - org.lwjgl3.opengl.GL31.glPrimitiveRestartIndex(index); - } - - public static void glTexBuffer(int target, int internalformat, int buffer) { - org.lwjgl3.opengl.GL31.glTexBuffer(target, internalformat, buffer); - } - - public static void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) { - org.lwjgl3.opengl.GL31.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL32.java b/src/main/java/org/lwjgl/opengl/GL32.java deleted file mode 100644 index b121ecc11..000000000 --- a/src/main/java/org/lwjgl/opengl/GL32.java +++ /dev/null @@ -1,195 +0,0 @@ -package org.lwjgl.opengl; - -public class GL32 { - - public static final int GL_ALREADY_SIGNALED = (int) 37146; - public static final int GL_CONDITION_SATISFIED = (int) 37148; - public static final int GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = (int) 2; - public static final int GL_CONTEXT_CORE_PROFILE_BIT = (int) 1; - public static final int GL_CONTEXT_PROFILE_MASK = (int) 37158; - public static final int GL_DEPTH_CLAMP = (int) 34383; - public static final int GL_FIRST_VERTEX_CONVENTION = (int) 36429; - public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = (int) 36263; - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = (int) 36264; - public static final int GL_GEOMETRY_INPUT_TYPE = (int) 36315; - public static final int GL_GEOMETRY_OUTPUT_TYPE = (int) 36316; - public static final int GL_GEOMETRY_SHADER = (int) 36313; - public static final int GL_GEOMETRY_VERTICES_OUT = (int) 36314; - public static final int GL_INT_SAMPLER_2D_MULTISAMPLE = (int) 37129; - public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37132; - public static final int GL_LAST_VERTEX_CONVENTION = (int) 36430; - public static final int GL_LINES_ADJACENCY = (int) 10; - public static final int GL_LINE_STRIP_ADJACENCY = (int) 11; - public static final int GL_MAX_COLOR_TEXTURE_SAMPLES = (int) 37134; - public static final int GL_MAX_DEPTH_TEXTURE_SAMPLES = (int) 37135; - public static final int GL_MAX_FRAGMENT_INPUT_COMPONENTS = (int) 37157; - public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS = (int) 37155; - public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = (int) 37156; - public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES = (int) 36320; - public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = (int) 35881; - public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = (int) 36321; - public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = (int) 36319; - public static final int GL_MAX_INTEGER_SAMPLES = (int) 37136; - public static final int GL_MAX_SAMPLE_MASK_WORDS = (int) 36441; - public static final int GL_MAX_SERVER_WAIT_TIMEOUT = (int) 37137; - public static final int GL_MAX_VERTEX_OUTPUT_COMPONENTS = (int) 37154; - public static final int GL_OBJECT_TYPE = (int) 37138; - public static final int GL_PROGRAM_POINT_SIZE = (int) 34370; - public static final int GL_PROVOKING_VERTEX = (int) 36431; - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = (int) 37121; - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = (int) 37123; - public static final int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = (int) 36428; - public static final int GL_SAMPLER_2D_MULTISAMPLE = (int) 37128; - public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37131; - public static final int GL_SAMPLE_MASK = (int) 36433; - public static final int GL_SAMPLE_MASK_VALUE = (int) 36434; - public static final int GL_SAMPLE_POSITION = (int) 36432; - public static final int GL_SIGNALED = (int) 37145; - public static final int GL_SYNC_CONDITION = (int) 37139; - public static final int GL_SYNC_FENCE = (int) 37142; - public static final int GL_SYNC_FLAGS = (int) 37141; - public static final int GL_SYNC_FLUSH_COMMANDS_BIT = (int) 1; - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = (int) 37143; - public static final int GL_SYNC_STATUS = (int) 37140; - public static final int GL_TEXTURE_2D_MULTISAMPLE = (int) 37120; - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = (int) 37122; - public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE = (int) 37124; - public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = (int) 37125; - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; - public static final int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = (int) 37127; - public static final int GL_TEXTURE_SAMPLES = (int) 37126; - public static final int GL_TIMEOUT_EXPIRED = (int) 37147; - public static final long GL_TIMEOUT_IGNORED = (long) -1; - public static final int GL_TRIANGLES_ADJACENCY = (int) 12; - public static final int GL_TRIANGLE_STRIP_ADJACENCY = (int) 13; - public static final int GL_UNSIGNALED = (int) 37144; - public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = (int) 37130; - public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37133; - public static final int GL_WAIT_FAILED = (int) 37149; - - public static void glDrawElementsBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsBaseVertex(mode, indices_count, type, indices_buffer_offset, basevertex); - } - - public static void glDrawElementsBaseVertex(int mode, java.nio.ByteBuffer indices, int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - public static void glDrawElementsBaseVertex(int mode, java.nio.IntBuffer indices, int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - public static void glDrawElementsBaseVertex(int mode, java.nio.ShortBuffer indices, int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, - long indices_buffer_offset, int primcount, int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsInstancedBaseVertex( - mode, - indices_count, - type, - indices_buffer_offset, - primcount, - basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ByteBuffer indices, int primcount, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.IntBuffer indices, int primcount, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ShortBuffer indices, int primcount, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, - long indices_buffer_offset, int basevertex) { - org.lwjgl3.opengl.GL32.glDrawRangeElementsBaseVertex( - mode, - start, - end, - indices_count, - type, - indices_buffer_offset, - basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ByteBuffer indices, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.IntBuffer indices, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ShortBuffer indices, - int basevertex) { - org.lwjgl3.opengl.GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - public static org.lwjgl.opengl.GLSync glFenceSync(int condition, int flags) { - - org.lwjgl.opengl.GLSync returnValue = new org.lwjgl.opengl.GLSync( - org.lwjgl3.opengl.GL32.glFenceSync(condition, flags)); - - return returnValue; - } - - public static void glFramebufferTexture(int target, int attachment, int texture, int level) { - org.lwjgl3.opengl.GL32.glFramebufferTexture(target, attachment, texture, level); - } - - public static void glGetBufferParameter(int target, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.GL32.glGetBufferParameteri64v(target, pname, params); - } - - public static long glGetBufferParameteri64(int target, int pname) { - return org.lwjgl3.opengl.GL32.glGetBufferParameteri64(target, pname); - } - - public static long glGetInteger64(int pname) { - return org.lwjgl3.opengl.GL32.glGetInteger64(pname); - } - - public static void glGetInteger64(int value, int index, java.nio.LongBuffer data) { - org.lwjgl3.opengl.GL32.glGetInteger64i_v(value, index, data); - } - - public static void glGetInteger64(int pname, java.nio.LongBuffer data) { - org.lwjgl3.opengl.GL32.glGetInteger64v(pname, data); - } - - public static void glGetMultisample(int pname, int index, java.nio.FloatBuffer val) { - org.lwjgl3.opengl.GL32.glGetMultisamplefv(pname, index, val); - } - - public static void glProvokingVertex(int mode) { - org.lwjgl3.opengl.GL32.glProvokingVertex(mode); - } - - public static void glSampleMaski(int index, int mask) { - org.lwjgl3.opengl.GL32.glSampleMaski(index, mask); - } - - public static void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, - boolean fixedsamplelocations) { - org.lwjgl3.opengl.GL32 - .glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, - int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.GL32 - .glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL33.java b/src/main/java/org/lwjgl/opengl/GL33.java deleted file mode 100644 index a09b95cff..000000000 --- a/src/main/java/org/lwjgl/opengl/GL33.java +++ /dev/null @@ -1,295 +0,0 @@ -package org.lwjgl.opengl; - -public class GL33 { - - public static final int GL_ANY_SAMPLES_PASSED = (int) 35887; - public static final int GL_INT_2_10_10_10_REV = (int) 36255; - public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = (int) 35068; - public static final int GL_ONE_MINUS_SRC1_ALPHA = (int) 35067; - public static final int GL_ONE_MINUS_SRC1_COLOR = (int) 35066; - public static final int GL_RGB10_A2UI = (int) 36975; - public static final int GL_SAMPLER_BINDING = (int) 35097; - public static final int GL_SRC1_COLOR = (int) 35065; - public static final int GL_TEXTURE_SWIZZLE_A = (int) 36421; - public static final int GL_TEXTURE_SWIZZLE_B = (int) 36420; - public static final int GL_TEXTURE_SWIZZLE_G = (int) 36419; - public static final int GL_TEXTURE_SWIZZLE_R = (int) 36418; - public static final int GL_TEXTURE_SWIZZLE_RGBA = (int) 36422; - public static final int GL_TIMESTAMP = (int) 36392; - public static final int GL_TIME_ELAPSED = (int) 35007; - public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = (int) 35070; - - public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, - java.lang.CharSequence name) { - org.lwjgl3.opengl.GL33.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, - java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL33.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - public static void glBindSampler(int unit, int sampler) { - org.lwjgl3.opengl.GL33.glBindSampler(unit, sampler); - } - - public static void glColorP3u(int type, java.nio.IntBuffer color) { - org.lwjgl3.opengl.GL33.glColorP3uiv(type, color); - } - - public static void glColorP3ui(int type, int color) { - org.lwjgl3.opengl.GL33.glColorP3ui(type, color); - } - - public static void glColorP4u(int type, java.nio.IntBuffer color) { - org.lwjgl3.opengl.GL33.glColorP4uiv(type, color); - } - - public static void glColorP4ui(int type, int color) { - org.lwjgl3.opengl.GL33.glColorP4ui(type, color); - } - - public static void glDeleteSamplers(int sampler) { - org.lwjgl3.opengl.GL33.glDeleteSamplers(sampler); - } - - public static void glDeleteSamplers(java.nio.IntBuffer samplers) { - org.lwjgl3.opengl.GL33.glDeleteSamplers(samplers); - } - - public static int glGenSamplers() { - return org.lwjgl3.opengl.GL33.glGenSamplers(); - } - - public static void glGenSamplers(java.nio.IntBuffer samplers) { - org.lwjgl3.opengl.GL33.glGenSamplers(samplers); - } - - public static int glGetFragDataIndex(int program, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL33.glGetFragDataIndex(program, name); - } - - public static int glGetFragDataIndex(int program, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL33.glGetFragDataIndex(program, name); - } - - public static void glGetQueryObject(int id, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.GL33.glGetQueryObjecti64v(id, pname, params); - } - - public static long glGetQueryObjecti64(int id, int pname) { - return org.lwjgl3.opengl.GL33.glGetQueryObjecti64(id, pname); - } - - public static void glGetQueryObjectu(int id, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.GL33.glGetQueryObjectui64v(id, pname, params); - } - - public static long glGetQueryObjectui64(int id, int pname) { - return org.lwjgl3.opengl.GL33.glGetQueryObjectui64(id, pname); - } - - public static void glGetSamplerParameter(int sampler, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL33.glGetSamplerParameterfv(sampler, pname, params); - } - - public static void glGetSamplerParameter(int sampler, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL33.glGetSamplerParameteriv(sampler, pname, params); - } - - public static void glGetSamplerParameterI(int sampler, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL33.glGetSamplerParameterIiv(sampler, pname, params); - } - - public static int glGetSamplerParameterIi(int sampler, int pname) { - return org.lwjgl3.opengl.GL33.glGetSamplerParameterIi(sampler, pname); - } - - public static void glGetSamplerParameterIu(int sampler, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL33.glGetSamplerParameterIuiv(sampler, pname, params); - } - - public static int glGetSamplerParameterIui(int sampler, int pname) { - return org.lwjgl3.opengl.GL33.glGetSamplerParameterIui(sampler, pname); - } - - public static float glGetSamplerParameterf(int sampler, int pname) { - return org.lwjgl3.opengl.GL33.glGetSamplerParameterf(sampler, pname); - } - - public static int glGetSamplerParameteri(int sampler, int pname) { - return org.lwjgl3.opengl.GL33.glGetSamplerParameteri(sampler, pname); - } - - public static boolean glIsSampler(int sampler) { - return org.lwjgl3.opengl.GL33.glIsSampler(sampler); - } - - public static void glMultiTexCoordP1u(int texture, int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP1uiv(texture, type, coords); - } - - public static void glMultiTexCoordP1ui(int texture, int type, int coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP1ui(texture, type, coords); - } - - public static void glMultiTexCoordP2u(int texture, int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP2uiv(texture, type, coords); - } - - public static void glMultiTexCoordP2ui(int texture, int type, int coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP2ui(texture, type, coords); - } - - public static void glMultiTexCoordP3u(int texture, int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP3uiv(texture, type, coords); - } - - public static void glMultiTexCoordP3ui(int texture, int type, int coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP3ui(texture, type, coords); - } - - public static void glMultiTexCoordP4u(int texture, int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP4uiv(texture, type, coords); - } - - public static void glMultiTexCoordP4ui(int texture, int type, int coords) { - org.lwjgl3.opengl.GL33.glMultiTexCoordP4ui(texture, type, coords); - } - - public static void glNormalP3u(int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glNormalP3uiv(type, coords); - } - - public static void glNormalP3ui(int type, int coords) { - org.lwjgl3.opengl.GL33.glNormalP3ui(type, coords); - } - - public static void glQueryCounter(int id, int target) { - org.lwjgl3.opengl.GL33.glQueryCounter(id, target); - } - - public static void glSamplerParameter(int sampler, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL33.glSamplerParameterfv(sampler, pname, params); - } - - public static void glSamplerParameter(int sampler, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL33.glSamplerParameteriv(sampler, pname, params); - } - - public static void glSamplerParameterI(int sampler, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL33.glSamplerParameterIiv(sampler, pname, params); - } - - public static void glSamplerParameterIu(int sampler, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL33.glSamplerParameterIuiv(sampler, pname, params); - } - - public static void glSamplerParameterf(int sampler, int pname, float param) { - org.lwjgl3.opengl.GL33.glSamplerParameterf(sampler, pname, param); - } - - public static void glSamplerParameteri(int sampler, int pname, int param) { - org.lwjgl3.opengl.GL33.glSamplerParameteri(sampler, pname, param); - } - - public static void glSecondaryColorP3u(int type, java.nio.IntBuffer color) { - org.lwjgl3.opengl.GL33.glSecondaryColorP3uiv(type, color); - } - - public static void glSecondaryColorP3ui(int type, int color) { - org.lwjgl3.opengl.GL33.glSecondaryColorP3ui(type, color); - } - - public static void glTexCoordP1u(int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glTexCoordP1uiv(type, coords); - } - - public static void glTexCoordP1ui(int type, int coords) { - org.lwjgl3.opengl.GL33.glTexCoordP1ui(type, coords); - } - - public static void glTexCoordP2u(int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glTexCoordP2uiv(type, coords); - } - - public static void glTexCoordP2ui(int type, int coords) { - org.lwjgl3.opengl.GL33.glTexCoordP2ui(type, coords); - } - - public static void glTexCoordP3u(int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glTexCoordP3uiv(type, coords); - } - - public static void glTexCoordP3ui(int type, int coords) { - org.lwjgl3.opengl.GL33.glTexCoordP3ui(type, coords); - } - - public static void glTexCoordP4u(int type, java.nio.IntBuffer coords) { - org.lwjgl3.opengl.GL33.glTexCoordP4uiv(type, coords); - } - - public static void glTexCoordP4ui(int type, int coords) { - org.lwjgl3.opengl.GL33.glTexCoordP4ui(type, coords); - } - - public static void glVertexAttribDivisor(int index, int divisor) { - org.lwjgl3.opengl.GL33.glVertexAttribDivisor(index, divisor); - } - - public static void glVertexAttribP1u(int index, int type, boolean normalized, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexAttribP1uiv(index, type, normalized, value); - } - - public static void glVertexAttribP1ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.GL33.glVertexAttribP1ui(index, type, normalized, value); - } - - public static void glVertexAttribP2u(int index, int type, boolean normalized, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexAttribP2uiv(index, type, normalized, value); - } - - public static void glVertexAttribP2ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.GL33.glVertexAttribP2ui(index, type, normalized, value); - } - - public static void glVertexAttribP3u(int index, int type, boolean normalized, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexAttribP3uiv(index, type, normalized, value); - } - - public static void glVertexAttribP3ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.GL33.glVertexAttribP3ui(index, type, normalized, value); - } - - public static void glVertexAttribP4u(int index, int type, boolean normalized, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexAttribP4uiv(index, type, normalized, value); - } - - public static void glVertexAttribP4ui(int index, int type, boolean normalized, int value) { - org.lwjgl3.opengl.GL33.glVertexAttribP4ui(index, type, normalized, value); - } - - public static void glVertexP2u(int type, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexP2uiv(type, value); - } - - public static void glVertexP2ui(int type, int value) { - org.lwjgl3.opengl.GL33.glVertexP2ui(type, value); - } - - public static void glVertexP3u(int type, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexP3uiv(type, value); - } - - public static void glVertexP3ui(int type, int value) { - org.lwjgl3.opengl.GL33.glVertexP3ui(type, value); - } - - public static void glVertexP4u(int type, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL33.glVertexP4uiv(type, value); - } - - public static void glVertexP4ui(int type, int value) { - org.lwjgl3.opengl.GL33.glVertexP4ui(type, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL40.java b/src/main/java/org/lwjgl/opengl/GL40.java deleted file mode 100644 index b6f775f10..000000000 --- a/src/main/java/org/lwjgl/opengl/GL40.java +++ /dev/null @@ -1,329 +0,0 @@ -package org.lwjgl.opengl; - -public class GL40 { - - public static final int GL_ACTIVE_SUBROUTINES = (int) 36325; - public static final int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = (int) 36424; - public static final int GL_ACTIVE_SUBROUTINE_UNIFORMS = (int) 36326; - public static final int GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = (int) 36423; - public static final int GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = (int) 36425; - public static final int GL_COMPATIBLE_SUBROUTINES = (int) 36427; - public static final int GL_DOUBLE_MAT2 = (int) 36678; - public static final int GL_DOUBLE_MAT2x3 = (int) 36681; - public static final int GL_DOUBLE_MAT2x4 = (int) 36682; - public static final int GL_DOUBLE_MAT3 = (int) 36679; - public static final int GL_DOUBLE_MAT3x2 = (int) 36683; - public static final int GL_DOUBLE_MAT3x4 = (int) 36684; - public static final int GL_DOUBLE_MAT4 = (int) 36680; - public static final int GL_DOUBLE_MAT4x2 = (int) 36685; - public static final int GL_DOUBLE_MAT4x3 = (int) 36686; - public static final int GL_DOUBLE_VEC2 = (int) 36860; - public static final int GL_DOUBLE_VEC3 = (int) 36861; - public static final int GL_DOUBLE_VEC4 = (int) 36862; - public static final int GL_DRAW_INDIRECT_BUFFER = (int) 36671; - public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = (int) 36675; - public static final int GL_FRACTIONAL_EVEN = (int) 36476; - public static final int GL_FRACTIONAL_ODD = (int) 36475; - public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = (int) 36445; - public static final int GL_GEOMETRY_SHADER_INVOCATIONS = (int) 34943; - public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY = (int) 36878; - public static final int GL_ISOLINES = (int) 36474; - public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = (int) 36382; - public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = (int) 36383; - public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = (int) 36444; - public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = (int) 36442; - public static final int GL_MAX_PATCH_VERTICES = (int) 36477; - public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = (int) 36767; - public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = (int) 36447; - public static final int GL_MAX_SUBROUTINES = (int) 36327; - public static final int GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = (int) 36328; - public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = (int) 34924; - public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = (int) 36483; - public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = (int) 36481; - public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = (int) 36485; - public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = (int) 36489; - public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = (int) 36479; - public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = (int) 34925; - public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = (int) 36486; - public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = (int) 36482; - public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = (int) 36490; - public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = (int) 36480; - public static final int GL_MAX_TESS_GEN_LEVEL = (int) 36478; - public static final int GL_MAX_TESS_PATCH_COMPONENTS = (int) 36484; - public static final int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = (int) 36464; - public static final int GL_MAX_VERTEX_STREAMS = (int) 36465; - public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = (int) 36443; - public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = (int) 36446; - public static final int GL_MIN_SAMPLE_SHADING_VALUE = (int) 35895; - public static final int GL_NUM_COMPATIBLE_SUBROUTINES = (int) 36426; - public static final int GL_PATCHES = (int) 14; - public static final int GL_PATCH_DEFAULT_INNER_LEVEL = (int) 36467; - public static final int GL_PATCH_DEFAULT_OUTER_LEVEL = (int) 36468; - public static final int GL_PATCH_VERTICES = (int) 36466; - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = (int) 36875; - public static final int GL_SAMPLER_CUBE_MAP_ARRAY = (int) 36876; - public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = (int) 36877; - public static final int GL_SAMPLE_SHADING = (int) 35894; - public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = (int) 36469; - public static final int GL_TESS_CONTROL_SHADER = (int) 36488; - public static final int GL_TESS_EVALUATION_SHADER = (int) 36487; - public static final int GL_TESS_GEN_MODE = (int) 36470; - public static final int GL_TESS_GEN_POINT_MODE = (int) 36473; - public static final int GL_TESS_GEN_SPACING = (int) 36471; - public static final int GL_TESS_GEN_VERTEX_ORDER = (int) 36472; - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = (int) 36874; - public static final int GL_TEXTURE_CUBE_MAP_ARRAY = (int) 36873; - public static final int GL_TRANSFORM_FEEDBACK = (int) 36386; - public static final int GL_TRANSFORM_FEEDBACK_ACTIVE = (int) 36388; - public static final int GL_TRANSFORM_FEEDBACK_BINDING = (int) 36389; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = (int) 36388; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = (int) 36387; - public static final int GL_TRANSFORM_FEEDBACK_PAUSED = (int) 36387; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = (int) 34032; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = (int) 34033; - public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = (int) 36879; - - public static void glBeginQueryIndexed(int target, int index, int id) { - org.lwjgl3.opengl.GL40.glBeginQueryIndexed(target, index, id); - } - - public static void glBindTransformFeedback(int target, int id) { - org.lwjgl3.opengl.GL40.glBindTransformFeedback(target, id); - } - - public static void glBlendEquationSeparatei(int buf, int modeRGB, int modeAlpha) { - org.lwjgl3.opengl.GL40.glBlendEquationSeparatei(buf, modeRGB, modeAlpha); - } - - public static void glBlendEquationi(int buf, int mode) { - org.lwjgl3.opengl.GL40.glBlendEquationi(buf, mode); - } - - public static void glBlendFuncSeparatei(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { - org.lwjgl3.opengl.GL40.glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); - } - - public static void glBlendFunci(int buf, int src, int dst) { - org.lwjgl3.opengl.GL40.glBlendFunci(buf, src, dst); - } - - public static void glDeleteTransformFeedbacks(int id) { - org.lwjgl3.opengl.GL40.glDeleteTransformFeedbacks(id); - } - - public static void glDeleteTransformFeedbacks(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.GL40.glDeleteTransformFeedbacks(ids); - } - - public static void glDrawArraysIndirect(int mode, long indirect_buffer_offset) { - org.lwjgl3.opengl.GL40.glDrawArraysIndirect(mode, indirect_buffer_offset); - } - - public static void glDrawArraysIndirect(int mode, java.nio.ByteBuffer indirect) { - org.lwjgl3.opengl.GL40.glDrawArraysIndirect(mode, indirect); - } - - public static void glDrawArraysIndirect(int mode, java.nio.IntBuffer indirect) { - org.lwjgl3.opengl.GL40.glDrawArraysIndirect(mode, indirect); - } - - public static void glDrawElementsIndirect(int mode, int type, long indirect_buffer_offset) { - org.lwjgl3.opengl.GL40.glDrawElementsIndirect(mode, type, indirect_buffer_offset); - } - - public static void glDrawElementsIndirect(int mode, int type, java.nio.ByteBuffer indirect) { - org.lwjgl3.opengl.GL40.glDrawElementsIndirect(mode, type, indirect); - } - - public static void glDrawElementsIndirect(int mode, int type, java.nio.IntBuffer indirect) { - org.lwjgl3.opengl.GL40.glDrawElementsIndirect(mode, type, indirect); - } - - public static void glDrawTransformFeedback(int mode, int id) { - org.lwjgl3.opengl.GL40.glDrawTransformFeedback(mode, id); - } - - public static void glDrawTransformFeedbackStream(int mode, int id, int stream) { - org.lwjgl3.opengl.GL40.glDrawTransformFeedbackStream(mode, id, stream); - } - - public static void glEndQueryIndexed(int target, int index) { - org.lwjgl3.opengl.GL40.glEndQueryIndexed(target, index); - } - - public static int glGenTransformFeedbacks() { - return org.lwjgl3.opengl.GL40.glGenTransformFeedbacks(); - } - - public static void glGenTransformFeedbacks(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.GL40.glGenTransformFeedbacks(ids); - } - - public static java.lang.String glGetActiveSubroutineName(int program, int shadertype, int index, int bufsize) { - return org.lwjgl3.opengl.GL40.glGetActiveSubroutineName(program, shadertype, index, bufsize); - } - - public static void glGetActiveSubroutineName(int program, int shadertype, int index, java.nio.IntBuffer length, - java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL40.glGetActiveSubroutineName(program, shadertype, index, length, name); - } - - public static void glGetActiveSubroutineUniform(int program, int shadertype, int index, int pname, - java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL40.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - public static java.lang.String glGetActiveSubroutineUniformName(int program, int shadertype, int index, - int bufsize) { - return org.lwjgl3.opengl.GL40.glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); - } - - public static void glGetActiveSubroutineUniformName(int program, int shadertype, int index, - java.nio.IntBuffer length, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL40.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); - } - - public static int glGetActiveSubroutineUniformi(int program, int shadertype, int index, int pname) { - return org.lwjgl3.opengl.GL40.glGetActiveSubroutineUniformi(program, shadertype, index, pname); - } - - public static void glGetProgramStage(int program, int shadertype, int pname, java.nio.IntBuffer values) { - org.lwjgl3.opengl.GL40.glGetProgramStageiv(program, shadertype, pname, values); - } - - public static int glGetProgramStagei(int program, int shadertype, int pname) { - return org.lwjgl3.opengl.GL40.glGetProgramStagei(program, shadertype, pname); - } - - public static void glGetQueryIndexed(int target, int index, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL40.glGetQueryIndexediv(target, index, pname, params); - } - - public static int glGetQueryIndexedi(int target, int index, int pname) { - return org.lwjgl3.opengl.GL40.glGetQueryIndexedi(target, index, pname); - } - - public static int glGetSubroutineIndex(int program, int shadertype, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL40.glGetSubroutineIndex(program, shadertype, name); - } - - public static int glGetSubroutineIndex(int program, int shadertype, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL40.glGetSubroutineIndex(program, shadertype, name); - } - - public static int glGetSubroutineUniformLocation(int program, int shadertype, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL40.glGetSubroutineUniformLocation(program, shadertype, name); - } - - public static int glGetSubroutineUniformLocation(int program, int shadertype, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL40.glGetSubroutineUniformLocation(program, shadertype, name); - } - - public static void glGetUniform(int program, int location, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.GL40.glGetUniformdv(program, location, params); - } - - public static void glGetUniformSubroutineu(int shadertype, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL40.glGetUniformSubroutineuiv(shadertype, location, params); - } - - public static int glGetUniformSubroutineui(int shadertype, int location) { - return org.lwjgl3.opengl.GL40.glGetUniformSubroutineui(shadertype, location); - } - - public static boolean glIsTransformFeedback(int id) { - return org.lwjgl3.opengl.GL40.glIsTransformFeedback(id); - } - - public static void glMinSampleShading(float value) { - org.lwjgl3.opengl.GL40.glMinSampleShading(value); - } - - public static void glPatchParameter(int pname, java.nio.FloatBuffer values) { - org.lwjgl3.opengl.GL40.glPatchParameterfv(pname, values); - } - - public static void glPatchParameteri(int pname, int value) { - org.lwjgl3.opengl.GL40.glPatchParameteri(pname, value); - } - - public static void glPauseTransformFeedback() { - org.lwjgl3.opengl.GL40.glPauseTransformFeedback(); - } - - public static void glResumeTransformFeedback() { - org.lwjgl3.opengl.GL40.glResumeTransformFeedback(); - } - - public static void glUniform1(int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniform1dv(location, value); - } - - public static void glUniform1d(int location, double x) { - org.lwjgl3.opengl.GL40.glUniform1d(location, x); - } - - public static void glUniform2(int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniform2dv(location, value); - } - - public static void glUniform2d(int location, double x, double y) { - org.lwjgl3.opengl.GL40.glUniform2d(location, x, y); - } - - public static void glUniform3(int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniform3dv(location, value); - } - - public static void glUniform3d(int location, double x, double y, double z) { - org.lwjgl3.opengl.GL40.glUniform3d(location, x, y, z); - } - - public static void glUniform4(int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniform4dv(location, value); - } - - public static void glUniform4d(int location, double x, double y, double z, double w) { - org.lwjgl3.opengl.GL40.glUniform4d(location, x, y, z, w); - } - - public static void glUniformMatrix2(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix2dv(location, transpose, value); - } - - public static void glUniformMatrix2x3(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix2x3dv(location, transpose, value); - } - - public static void glUniformMatrix2x4(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix2x4dv(location, transpose, value); - } - - public static void glUniformMatrix3(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix3dv(location, transpose, value); - } - - public static void glUniformMatrix3x2(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix3x2dv(location, transpose, value); - } - - public static void glUniformMatrix3x4(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix3x4dv(location, transpose, value); - } - - public static void glUniformMatrix4(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix4dv(location, transpose, value); - } - - public static void glUniformMatrix4x2(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix4x2dv(location, transpose, value); - } - - public static void glUniformMatrix4x3(int location, boolean transpose, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL40.glUniformMatrix4x3dv(location, transpose, value); - } - - public static void glUniformSubroutinesu(int shadertype, java.nio.IntBuffer indices) { - org.lwjgl3.opengl.GL40.glUniformSubroutinesuiv(shadertype, indices); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL41.java b/src/main/java/org/lwjgl/opengl/GL41.java deleted file mode 100644 index 478f7df45..000000000 --- a/src/main/java/org/lwjgl/opengl/GL41.java +++ /dev/null @@ -1,438 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class GL41 { - - public static final int GL_ACTIVE_PROGRAM = (int) 33369; - public static final int GL_ALL_SHADER_BITS = (int) -1; - public static final int GL_FIXED = (int) 5132; - public static final int GL_FRAGMENT_SHADER_BIT = (int) 2; - public static final int GL_GEOMETRY_SHADER_BIT = (int) 4; - public static final int GL_HIGH_FLOAT = (int) 36338; - public static final int GL_HIGH_INT = (int) 36341; - public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT = (int) 35739; - public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE = (int) 35738; - public static final int GL_LAYER_PROVOKING_VERTEX = (int) 33374; - public static final int GL_LOW_FLOAT = (int) 36336; - public static final int GL_LOW_INT = (int) 36339; - public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = (int) 36349; - public static final int GL_MAX_VARYING_VECTORS = (int) 36348; - public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = (int) 36347; - public static final int GL_MAX_VIEWPORTS = (int) 33371; - public static final int GL_MEDIUM_FLOAT = (int) 36337; - public static final int GL_MEDIUM_INT = (int) 36340; - public static final int GL_NUM_PROGRAM_BINARY_FORMATS = (int) 34814; - public static final int GL_NUM_SHADER_BINARY_FORMATS = (int) 36345; - public static final int GL_PROGRAM_BINARY_FORMATS = (int) 34815; - public static final int GL_PROGRAM_BINARY_LENGTH = (int) 34625; - public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = (int) 33367; - public static final int GL_PROGRAM_PIPELINE_BINDING = (int) 33370; - public static final int GL_PROGRAM_SEPARABLE = (int) 33368; - public static final int GL_RGB565 = (int) 36194; - public static final int GL_SHADER_COMPILER = (int) 36346; - public static final int GL_TESS_CONTROL_SHADER_BIT = (int) 8; - public static final int GL_TESS_EVALUATION_SHADER_BIT = (int) 16; - public static final int GL_UNDEFINED_VERTEX = (int) 33376; - public static final int GL_VERTEX_SHADER_BIT = (int) 1; - public static final int GL_VIEWPORT_BOUNDS_RANGE = (int) 33373; - public static final int GL_VIEWPORT_INDEX_PROVOKING_VERTEX = (int) 33375; - public static final int GL_VIEWPORT_SUBPIXEL_BITS = (int) 33372; - - public static void glActiveShaderProgram(int pipeline, int program) { - org.lwjgl3.opengl.GL41.glActiveShaderProgram(pipeline, program); - } - - public static void glBindProgramPipeline(int pipeline) { - org.lwjgl3.opengl.GL41.glBindProgramPipeline(pipeline); - } - - public static void glClearDepthf(float d) { - org.lwjgl3.opengl.GL41.glClearDepthf(d); - } - - public static int glCreateShaderProgram(int type, java.lang.CharSequence string) { - return org.lwjgl3.opengl.GL41.glCreateShaderProgramv(type, string); - } - - public static int glCreateShaderProgram(int type, java.nio.ByteBuffer string) { - - int returnValue = org.lwjgl3.opengl.GL41 - .glCreateShaderProgramv(type, BufferCasts.bufferToCharSeq(string)); - - return returnValue; - } - - public static void glDeleteProgramPipelines(int pipeline) { - org.lwjgl3.opengl.GL41.glDeleteProgramPipelines(pipeline); - } - - public static void glDeleteProgramPipelines(java.nio.IntBuffer pipelines) { - org.lwjgl3.opengl.GL41.glDeleteProgramPipelines(pipelines); - } - - public static void glDepthRangeArray(int first, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.GL41.glDepthRangeArrayv(first, v); - } - - public static void glDepthRangeIndexed(int index, double n, double f) { - org.lwjgl3.opengl.GL41.glDepthRangeIndexed(index, n, f); - } - - public static void glDepthRangef(float n, float f) { - org.lwjgl3.opengl.GL41.glDepthRangef(n, f); - } - - public static int glGenProgramPipelines() { - return org.lwjgl3.opengl.GL41.glGenProgramPipelines(); - } - - public static void glGenProgramPipelines(java.nio.IntBuffer pipelines) { - org.lwjgl3.opengl.GL41.glGenProgramPipelines(pipelines); - } - - public static void glGetDouble(int target, int index, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL41.glGetDoublei_v(target, index, data); - } - - public static void glGetFloat(int target, int index, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL41.glGetFloati_v(target, index, data); - } - - public static void glGetProgramBinary(int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, - java.nio.ByteBuffer binary) { - org.lwjgl3.opengl.GL41.glGetProgramBinary(program, length, binaryFormat, binary); - } - - public static void glGetProgramPipeline(int pipeline, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL41.glGetProgramPipelineiv(pipeline, pname, params); - } - - public static java.lang.String glGetProgramPipelineInfoLog(int pipeline, int bufSize) { - return org.lwjgl3.opengl.GL41.glGetProgramPipelineInfoLog(pipeline, bufSize); - } - - public static void glGetProgramPipelineInfoLog(int pipeline, java.nio.IntBuffer length, - java.nio.ByteBuffer infoLog) { - org.lwjgl3.opengl.GL41.glGetProgramPipelineInfoLog(pipeline, length, infoLog); - } - - public static int glGetProgramPipelinei(int pipeline, int pname) { - return org.lwjgl3.opengl.GL41.glGetProgramPipelinei(pipeline, pname); - } - - public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, java.nio.IntBuffer range, - java.nio.IntBuffer precision) { - org.lwjgl3.opengl.GL41.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - public static void glGetVertexAttribL(int index, int pname, java.nio.DoubleBuffer params) { - org.lwjgl3.opengl.GL41.glGetVertexAttribLdv(index, pname, params); - } - - public static boolean glIsProgramPipeline(int pipeline) { - return org.lwjgl3.opengl.GL41.glIsProgramPipeline(pipeline); - } - - public static void glProgramBinary(int program, int binaryFormat, java.nio.ByteBuffer binary) { - org.lwjgl3.opengl.GL41.glProgramBinary(program, binaryFormat, binary); - } - - public static void glProgramParameteri(int program, int pname, int value) { - org.lwjgl3.opengl.GL41.glProgramParameteri(program, pname, value); - } - - public static void glProgramUniform1(int program, int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform1dv(program, location, value); - } - - public static void glProgramUniform1(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform1fv(program, location, value); - } - - public static void glProgramUniform1(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform1iv(program, location, value); - } - - public static void glProgramUniform1d(int program, int location, double v0) { - org.lwjgl3.opengl.GL41.glProgramUniform1d(program, location, v0); - } - - public static void glProgramUniform1f(int program, int location, float v0) { - org.lwjgl3.opengl.GL41.glProgramUniform1f(program, location, v0); - } - - public static void glProgramUniform1i(int program, int location, int v0) { - org.lwjgl3.opengl.GL41.glProgramUniform1i(program, location, v0); - } - - public static void glProgramUniform1u(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform1uiv(program, location, value); - } - - public static void glProgramUniform1ui(int program, int location, int v0) { - org.lwjgl3.opengl.GL41.glProgramUniform1ui(program, location, v0); - } - - public static void glProgramUniform2(int program, int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform2dv(program, location, value); - } - - public static void glProgramUniform2(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform2fv(program, location, value); - } - - public static void glProgramUniform2(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform2iv(program, location, value); - } - - public static void glProgramUniform2d(int program, int location, double v0, double v1) { - org.lwjgl3.opengl.GL41.glProgramUniform2d(program, location, v0, v1); - } - - public static void glProgramUniform2f(int program, int location, float v0, float v1) { - org.lwjgl3.opengl.GL41.glProgramUniform2f(program, location, v0, v1); - } - - public static void glProgramUniform2i(int program, int location, int v0, int v1) { - org.lwjgl3.opengl.GL41.glProgramUniform2i(program, location, v0, v1); - } - - public static void glProgramUniform2u(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform2uiv(program, location, value); - } - - public static void glProgramUniform2ui(int program, int location, int v0, int v1) { - org.lwjgl3.opengl.GL41.glProgramUniform2ui(program, location, v0, v1); - } - - public static void glProgramUniform3(int program, int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform3dv(program, location, value); - } - - public static void glProgramUniform3(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform3fv(program, location, value); - } - - public static void glProgramUniform3(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform3iv(program, location, value); - } - - public static void glProgramUniform3d(int program, int location, double v0, double v1, double v2) { - org.lwjgl3.opengl.GL41.glProgramUniform3d(program, location, v0, v1, v2); - } - - public static void glProgramUniform3f(int program, int location, float v0, float v1, float v2) { - org.lwjgl3.opengl.GL41.glProgramUniform3f(program, location, v0, v1, v2); - } - - public static void glProgramUniform3i(int program, int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.GL41.glProgramUniform3i(program, location, v0, v1, v2); - } - - public static void glProgramUniform3u(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform3uiv(program, location, value); - } - - public static void glProgramUniform3ui(int program, int location, int v0, int v1, int v2) { - org.lwjgl3.opengl.GL41.glProgramUniform3ui(program, location, v0, v1, v2); - } - - public static void glProgramUniform4(int program, int location, java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform4dv(program, location, value); - } - - public static void glProgramUniform4(int program, int location, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform4fv(program, location, value); - } - - public static void glProgramUniform4(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform4iv(program, location, value); - } - - public static void glProgramUniform4d(int program, int location, double v0, double v1, double v2, double v3) { - org.lwjgl3.opengl.GL41.glProgramUniform4d(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4f(int program, int location, float v0, float v1, float v2, float v3) { - org.lwjgl3.opengl.GL41.glProgramUniform4f(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4i(int program, int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.GL41.glProgramUniform4i(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniform4u(int program, int location, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniform4uiv(program, location, value); - } - - public static void glProgramUniform4ui(int program, int location, int v0, int v1, int v2, int v3) { - org.lwjgl3.opengl.GL41.glProgramUniform4ui(program, location, v0, v1, v2, v3); - } - - public static void glProgramUniformMatrix2(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix2dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix2fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix2x3dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix2x3fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix2x4dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix2x4fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix3dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix3fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix3x2dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix3x2fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix3x4dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix3x4fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix4dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix4fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix4x2dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix4x2fv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, - java.nio.DoubleBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix4x3dv(program, location, transpose, value); - } - - public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL41.glProgramUniformMatrix4x3fv(program, location, transpose, value); - } - - public static void glReleaseShaderCompiler() { - org.lwjgl3.opengl.GL41.glReleaseShaderCompiler(); - } - - public static void glScissorArray(int first, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL41.glScissorArrayv(first, v); - } - - public static void glScissorIndexed(int index, int left, int bottom, int width, int height) { - org.lwjgl3.opengl.GL41.glScissorIndexed(index, left, bottom, width, height); - } - - public static void glScissorIndexed(int index, java.nio.IntBuffer v) { - org.lwjgl3.opengl.GL41.glScissorIndexedv(index, v); - } - - public static void glShaderBinary(java.nio.IntBuffer shaders, int binaryformat, java.nio.ByteBuffer binary) { - org.lwjgl3.opengl.GL41.glShaderBinary(shaders, binaryformat, binary); - } - - public static void glUseProgramStages(int pipeline, int stages, int program) { - org.lwjgl3.opengl.GL41.glUseProgramStages(pipeline, stages, program); - } - - public static void glValidateProgramPipeline(int pipeline) { - org.lwjgl3.opengl.GL41.glValidateProgramPipeline(pipeline); - } - - public static void glVertexAttribL1(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.GL41.glVertexAttribL1dv(index, v); - } - - public static void glVertexAttribL1d(int index, double x) { - org.lwjgl3.opengl.GL41.glVertexAttribL1d(index, x); - } - - public static void glVertexAttribL2(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.GL41.glVertexAttribL2dv(index, v); - } - - public static void glVertexAttribL2d(int index, double x, double y) { - org.lwjgl3.opengl.GL41.glVertexAttribL2d(index, x, y); - } - - public static void glVertexAttribL3(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.GL41.glVertexAttribL3dv(index, v); - } - - public static void glVertexAttribL3d(int index, double x, double y, double z) { - org.lwjgl3.opengl.GL41.glVertexAttribL3d(index, x, y, z); - } - - public static void glVertexAttribL4(int index, java.nio.DoubleBuffer v) { - org.lwjgl3.opengl.GL41.glVertexAttribL4dv(index, v); - } - - public static void glVertexAttribL4d(int index, double x, double y, double z, double w) { - org.lwjgl3.opengl.GL41.glVertexAttribL4d(index, x, y, z, w); - } - - public static void glVertexAttribLPointer(int index, int size, int stride, java.nio.DoubleBuffer pointer) { - org.lwjgl3.opengl.GL41.glVertexAttribLPointer(index, size, stride, pointer); - } - - public static void glViewportArray(int first, java.nio.FloatBuffer v) { - org.lwjgl3.opengl.GL41.glViewportArrayv(first, v); - } - - public static void glViewportIndexed(int index, java.nio.FloatBuffer v) { - org.lwjgl3.opengl.GL41.glViewportIndexedfv(index, v); - } - - public static void glViewportIndexedf(int index, float x, float y, float w, float h) { - org.lwjgl3.opengl.GL41.glViewportIndexedf(index, x, y, w, h); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL42.java b/src/main/java/org/lwjgl/opengl/GL42.java deleted file mode 100644 index b95d95df1..000000000 --- a/src/main/java/org/lwjgl/opengl/GL42.java +++ /dev/null @@ -1,212 +0,0 @@ -package org.lwjgl.opengl; - -public class GL42 { - - public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = (int) 37593; - public static final int GL_ALL_BARRIER_BITS = (int) -1; - public static final int GL_ATOMIC_COUNTER_BARRIER_BIT = (int) 4096; - public static final int GL_ATOMIC_COUNTER_BUFFER = (int) 37568; - public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = (int) 37573; - public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = (int) 37574; - public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = (int) 37569; - public static final int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = (int) 37572; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = (int) 37579; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = (int) 37578; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = (int) 37576; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = (int) 37577; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = (int) 37575; - public static final int GL_ATOMIC_COUNTER_BUFFER_SIZE = (int) 37571; - public static final int GL_ATOMIC_COUNTER_BUFFER_START = (int) 37570; - public static final int GL_BUFFER_UPDATE_BARRIER_BIT = (int) 512; - public static final int GL_COMMAND_BARRIER_BIT = (int) 64; - public static final int GL_COMPRESSED_RGBA_BPTC_UNORM = (int) 36492; - public static final int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = (int) 36494; - public static final int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = (int) 36495; - public static final int GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = (int) 36493; - public static final int GL_ELEMENT_ARRAY_BARRIER_BIT = (int) 2; - public static final int GL_FRAMEBUFFER_BARRIER_BIT = (int) 1024; - public static final int GL_IMAGE_1D = (int) 36940; - public static final int GL_IMAGE_1D_ARRAY = (int) 36946; - public static final int GL_IMAGE_2D = (int) 36941; - public static final int GL_IMAGE_2D_ARRAY = (int) 36947; - public static final int GL_IMAGE_2D_MULTISAMPLE = (int) 36949; - public static final int GL_IMAGE_2D_MULTISAMPLE_ARRAY = (int) 36950; - public static final int GL_IMAGE_2D_RECT = (int) 36943; - public static final int GL_IMAGE_3D = (int) 36942; - public static final int GL_IMAGE_BINDING_ACCESS = (int) 36670; - public static final int GL_IMAGE_BINDING_FORMAT = (int) 36974; - public static final int GL_IMAGE_BINDING_LAYER = (int) 36669; - public static final int GL_IMAGE_BINDING_LAYERED = (int) 36668; - public static final int GL_IMAGE_BINDING_LEVEL = (int) 36667; - public static final int GL_IMAGE_BINDING_NAME = (int) 36666; - public static final int GL_IMAGE_BUFFER = (int) 36945; - public static final int GL_IMAGE_CUBE = (int) 36944; - public static final int GL_IMAGE_CUBE_MAP_ARRAY = (int) 36948; - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = (int) 37064; - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = (int) 37063; - public static final int GL_INT_IMAGE_1D = (int) 36951; - public static final int GL_INT_IMAGE_1D_ARRAY = (int) 36957; - public static final int GL_INT_IMAGE_2D = (int) 36952; - public static final int GL_INT_IMAGE_2D_ARRAY = (int) 36958; - public static final int GL_INT_IMAGE_2D_MULTISAMPLE = (int) 36960; - public static final int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = (int) 36961; - public static final int GL_INT_IMAGE_2D_RECT = (int) 36954; - public static final int GL_INT_IMAGE_3D = (int) 36953; - public static final int GL_INT_IMAGE_BUFFER = (int) 36956; - public static final int GL_INT_IMAGE_CUBE = (int) 36955; - public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY = (int) 36959; - public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = (int) 37596; - public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = (int) 37592; - public static final int GL_MAX_COMBINED_ATOMIC_COUNTERS = (int) 37591; - public static final int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = (int) 37585; - public static final int GL_MAX_COMBINED_IMAGE_UNIFORMS = (int) 37071; - public static final int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = (int) 36665; - public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTERS = (int) 37590; - public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = (int) 37584; - public static final int GL_MAX_FRAGMENT_IMAGE_UNIFORMS = (int) 37070; - public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = (int) 37589; - public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = (int) 37583; - public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = (int) 37069; - public static final int GL_MAX_IMAGE_SAMPLES = (int) 36973; - public static final int GL_MAX_IMAGE_UNITS = (int) 36664; - public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = (int) 37587; - public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = (int) 37581; - public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = (int) 37067; - public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = (int) 37588; - public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = (int) 37582; - public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = (int) 37068; - public static final int GL_MAX_VERTEX_ATOMIC_COUNTERS = (int) 37586; - public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = (int) 37580; - public static final int GL_MAX_VERTEX_IMAGE_UNIFORMS = (int) 37066; - public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = (int) 37052; - public static final int GL_NUM_SAMPLE_COUNTS = (int) 37760; - public static final int GL_PACK_COMPRESSED_BLOCK_DEPTH = (int) 37165; - public static final int GL_PACK_COMPRESSED_BLOCK_HEIGHT = (int) 37164; - public static final int GL_PACK_COMPRESSED_BLOCK_SIZE = (int) 37166; - public static final int GL_PACK_COMPRESSED_BLOCK_WIDTH = (int) 37163; - public static final int GL_PIXEL_BUFFER_BARRIER_BIT = (int) 128; - public static final int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = (int) 32; - public static final int GL_TEXTURE_FETCH_BARRIER_BIT = (int) 8; - public static final int GL_TEXTURE_IMMUTABLE_FORMAT = (int) 37167; - public static final int GL_TEXTURE_UPDATE_BARRIER_BIT = (int) 256; - public static final int GL_TRANSFORM_FEEDBACK_BARRIER_BIT = (int) 2048; - public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = (int) 37594; - public static final int GL_UNIFORM_BARRIER_BIT = (int) 4; - public static final int GL_UNPACK_COMPRESSED_BLOCK_DEPTH = (int) 37161; - public static final int GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = (int) 37160; - public static final int GL_UNPACK_COMPRESSED_BLOCK_SIZE = (int) 37162; - public static final int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = (int) 37159; - public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = (int) 37595; - public static final int GL_UNSIGNED_INT_IMAGE_1D = (int) 36962; - public static final int GL_UNSIGNED_INT_IMAGE_1D_ARRAY = (int) 36968; - public static final int GL_UNSIGNED_INT_IMAGE_2D = (int) 36963; - public static final int GL_UNSIGNED_INT_IMAGE_2D_ARRAY = (int) 36969; - public static final int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = (int) 36971; - public static final int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = (int) 36972; - public static final int GL_UNSIGNED_INT_IMAGE_2D_RECT = (int) 36965; - public static final int GL_UNSIGNED_INT_IMAGE_3D = (int) 36964; - public static final int GL_UNSIGNED_INT_IMAGE_BUFFER = (int) 36967; - public static final int GL_UNSIGNED_INT_IMAGE_CUBE = (int) 36966; - public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = (int) 36970; - public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = (int) 1; - public static final int IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = (int) 37065; - - public static void glBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, - int format) { - org.lwjgl3.opengl.GL42.glBindImageTexture(unit, texture, level, layered, layer, access, format); - } - - public static void glDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, - int baseinstance) { - org.lwjgl3.opengl.GL42.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, - long indices_buffer_offset, int primcount, int baseinstance) { - org.lwjgl3.opengl.GL42.glDrawElementsInstancedBaseInstance( - mode, - indices_count, - type, - indices_buffer_offset, - primcount, - baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ByteBuffer indices, int primcount, - int baseinstance) { - org.lwjgl3.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.IntBuffer indices, int primcount, - int baseinstance) { - org.lwjgl3.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ShortBuffer indices, int primcount, - int baseinstance) { - org.lwjgl3.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, - long indices_buffer_offset, int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.GL42.glDrawElementsInstancedBaseVertexBaseInstance( - mode, - indices_count, - type, - indices_buffer_offset, - primcount, - basevertex, - baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ByteBuffer indices, - int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.GL42 - .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.IntBuffer indices, - int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.GL42 - .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ShortBuffer indices, - int primcount, int basevertex, int baseinstance) { - org.lwjgl3.opengl.GL42 - .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - public static void glDrawTransformFeedbackInstanced(int mode, int id, int primcount) { - org.lwjgl3.opengl.GL42.glDrawTransformFeedbackInstanced(mode, id, primcount); - } - - public static void glDrawTransformFeedbackStreamInstanced(int mode, int id, int stream, int primcount) { - org.lwjgl3.opengl.GL42.glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); - } - - public static void glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL42.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - - public static void glGetInternalformat(int target, int internalformat, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL42.glGetInternalformativ(target, internalformat, pname, params); - } - - public static void glMemoryBarrier(int barriers) { - org.lwjgl3.opengl.GL42.glMemoryBarrier(barriers); - } - - public static void glTexStorage1D(int target, int levels, int internalformat, int width) { - org.lwjgl3.opengl.GL42.glTexStorage1D(target, levels, internalformat, width); - } - - public static void glTexStorage2D(int target, int levels, int internalformat, int width, int height) { - org.lwjgl3.opengl.GL42.glTexStorage2D(target, levels, internalformat, width, height); - } - - public static void glTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth) { - org.lwjgl3.opengl.GL42.glTexStorage3D(target, levels, internalformat, width, height, depth); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL43.java b/src/main/java/org/lwjgl/opengl/GL43.java deleted file mode 100644 index b086d510c..000000000 --- a/src/main/java/org/lwjgl/opengl/GL43.java +++ /dev/null @@ -1,531 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.BufferChecks; -import org.lwjgl3.opengl.GLDebugMessageCallbackI; - -public class GL43 { - - public static final int GL_ACTIVE_RESOURCES = (int) 37621; - public static final int GL_ACTIVE_VARIABLES = (int) 37637; - public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = (int) 36202; - public static final int GL_ARRAY_SIZE = (int) 37627; - public static final int GL_ARRAY_STRIDE = (int) 37630; - public static final int GL_ATOMIC_COUNTER_BUFFER_INDEX = (int) 37633; - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = (int) 37101; - public static final int GL_AUTO_GENERATE_MIPMAP = (int) 33429; - public static final int GL_BLOCK_INDEX = (int) 37629; - public static final int GL_BUFFER = (int) 33504; - public static final int GL_BUFFER_BINDING = (int) 37634; - public static final int GL_BUFFER_DATA_SIZE = (int) 37635; - public static final int GL_BUFFER_VARIABLE = (int) 37605; - public static final int GL_CAVEAT_SUPPORT = (int) 33464; - public static final int GL_CLEAR_BUFFER = (int) 33460; - public static final int GL_COLOR_COMPONENTS = (int) 33411; - public static final int GL_COLOR_ENCODING = (int) 33430; - public static final int GL_COLOR_RENDERABLE = (int) 33414; - public static final int GL_COMPRESSED_R11_EAC = (int) 37488; - public static final int GL_COMPRESSED_RG11_EAC = (int) 37490; - public static final int GL_COMPRESSED_RGB8_ETC2 = (int) 37492; - public static final int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = (int) 37494; - public static final int GL_COMPRESSED_RGBA8_ETC2_EAC = (int) 37496; - public static final int GL_COMPRESSED_SIGNED_R11_EAC = (int) 37489; - public static final int GL_COMPRESSED_SIGNED_RG11_EAC = (int) 37491; - public static final int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = (int) 37497; - public static final int GL_COMPRESSED_SRGB8_ETC2 = (int) 37493; - public static final int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = (int) 37495; - public static final int GL_COMPUTE_SHADER = (int) 37305; - public static final int GL_COMPUTE_SHADER_BIT = (int) 32; - public static final int GL_COMPUTE_SUBROUTINE = (int) 37613; - public static final int GL_COMPUTE_SUBROUTINE_UNIFORM = (int) 37619; - public static final int GL_COMPUTE_TEXTURE = (int) 33440; - public static final int GL_COMPUTE_WORK_GROUP_SIZE = (int) 33383; - public static final int GL_CONTEXT_FLAG_DEBUG_BIT = (int) 2; - public static final int GL_DEBUG_CALLBACK_FUNCTION = (int) 33348; - public static final int GL_DEBUG_CALLBACK_USER_PARAM = (int) 33349; - public static final int GL_DEBUG_GROUP_STACK_DEPTH = (int) 33389; - public static final int GL_DEBUG_LOGGED_MESSAGES = (int) 37189; - public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = (int) 33347; - public static final int GL_DEBUG_OUTPUT = (int) 37600; - public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = (int) 33346; - public static final int GL_DEBUG_SEVERITY_HIGH = (int) 37190; - public static final int GL_DEBUG_SEVERITY_LOW = (int) 37192; - public static final int GL_DEBUG_SEVERITY_MEDIUM = (int) 37191; - public static final int GL_DEBUG_SEVERITY_NOTIFICATION = (int) 33387; - public static final int GL_DEBUG_SOURCE_API = (int) 33350; - public static final int GL_DEBUG_SOURCE_APPLICATION = (int) 33354; - public static final int GL_DEBUG_SOURCE_OTHER = (int) 33355; - public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = (int) 33352; - public static final int GL_DEBUG_SOURCE_THIRD_PARTY = (int) 33353; - public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = (int) 33351; - public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = (int) 33357; - public static final int GL_DEBUG_TYPE_ERROR = (int) 33356; - public static final int GL_DEBUG_TYPE_MARKER = (int) 33384; - public static final int GL_DEBUG_TYPE_OTHER = (int) 33361; - public static final int GL_DEBUG_TYPE_PERFORMANCE = (int) 33360; - public static final int GL_DEBUG_TYPE_POP_GROUP = (int) 33386; - public static final int GL_DEBUG_TYPE_PORTABILITY = (int) 33359; - public static final int GL_DEBUG_TYPE_PUSH_GROUP = (int) 33385; - public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = (int) 33358; - public static final int GL_DEPTH_COMPONENTS = (int) 33412; - public static final int GL_DEPTH_RENDERABLE = (int) 33415; - public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = (int) 37098; - public static final int GL_DISPATCH_INDIRECT_BUFFER = (int) 37102; - public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = (int) 37103; - public static final int GL_DISPLAY_LIST = (int) 33511; - public static final int GL_FILTER = (int) 33434; - public static final int GL_FRAGMENT_SUBROUTINE = (int) 37612; - public static final int GL_FRAGMENT_SUBROUTINE_UNIFORM = (int) 37618; - public static final int GL_FRAGMENT_TEXTURE = (int) 33439; - public static final int GL_FRAMEBUFFER_BLEND = (int) 33419; - public static final int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = (int) 37652; - public static final int GL_FRAMEBUFFER_DEFAULT_HEIGHT = (int) 37649; - public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = (int) 37650; - public static final int GL_FRAMEBUFFER_DEFAULT_SAMPLES = (int) 37651; - public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH = (int) 37648; - public static final int GL_FRAMEBUFFER_RENDERABLE = (int) 33417; - public static final int GL_FRAMEBUFFER_RENDERABLE_LAYERED = (int) 33418; - public static final int GL_FULL_SUPPORT = (int) 33463; - public static final int GL_GEOMETRY_SUBROUTINE = (int) 37611; - public static final int GL_GEOMETRY_SUBROUTINE_UNIFORM = (int) 37617; - public static final int GL_GEOMETRY_TEXTURE = (int) 33438; - public static final int GL_GET_TEXTURE_IMAGE_FORMAT = (int) 33425; - public static final int GL_GET_TEXTURE_IMAGE_TYPE = (int) 33426; - public static final int GL_IMAGE_CLASS_10_10_10_2 = (int) 33475; - public static final int GL_IMAGE_CLASS_11_11_10 = (int) 33474; - public static final int GL_IMAGE_CLASS_1_X_16 = (int) 33470; - public static final int GL_IMAGE_CLASS_1_X_32 = (int) 33467; - public static final int GL_IMAGE_CLASS_1_X_8 = (int) 33473; - public static final int GL_IMAGE_CLASS_2_X_16 = (int) 33469; - public static final int GL_IMAGE_CLASS_2_X_32 = (int) 33466; - public static final int GL_IMAGE_CLASS_2_X_8 = (int) 33472; - public static final int GL_IMAGE_CLASS_4_X_16 = (int) 33468; - public static final int GL_IMAGE_CLASS_4_X_32 = (int) 33465; - public static final int GL_IMAGE_CLASS_4_X_8 = (int) 33471; - public static final int GL_IMAGE_COMPATIBILITY_CLASS = (int) 33448; - public static final int GL_IMAGE_PIXEL_FORMAT = (int) 33449; - public static final int GL_IMAGE_PIXEL_TYPE = (int) 33450; - public static final int GL_IMAGE_TEXEL_SIZE = (int) 33447; - public static final int GL_INTERNALFORMAT_ALPHA_SIZE = (int) 33396; - public static final int GL_INTERNALFORMAT_ALPHA_TYPE = (int) 33403; - public static final int GL_INTERNALFORMAT_BLUE_SIZE = (int) 33395; - public static final int GL_INTERNALFORMAT_BLUE_TYPE = (int) 33402; - public static final int GL_INTERNALFORMAT_DEPTH_SIZE = (int) 33397; - public static final int GL_INTERNALFORMAT_DEPTH_TYPE = (int) 33404; - public static final int GL_INTERNALFORMAT_GREEN_SIZE = (int) 33394; - public static final int GL_INTERNALFORMAT_GREEN_TYPE = (int) 33401; - public static final int GL_INTERNALFORMAT_PREFERRED = (int) 33392; - public static final int GL_INTERNALFORMAT_RED_SIZE = (int) 33393; - public static final int GL_INTERNALFORMAT_RED_TYPE = (int) 33400; - public static final int GL_INTERNALFORMAT_SHARED_SIZE = (int) 33399; - public static final int GL_INTERNALFORMAT_STENCIL_SIZE = (int) 33398; - public static final int GL_INTERNALFORMAT_STENCIL_TYPE = (int) 33405; - public static final int GL_INTERNALFORMAT_SUPPORTED = (int) 33391; - public static final int GL_IS_PER_PATCH = (int) 37607; - public static final int GL_IS_ROW_MAJOR = (int) 37632; - public static final int GL_LOCATION = (int) 37646; - public static final int GL_LOCATION_INDEX = (int) 37647; - public static final int GL_MANUAL_GENERATE_MIPMAP = (int) 33428; - public static final int GL_MATRIX_STRIDE = (int) 37631; - public static final int GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = (int) 33382; - public static final int GL_MAX_COMBINED_DIMENSIONS = (int) 33410; - public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = (int) 36665; - public static final int GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = (int) 37084; - public static final int GL_MAX_COMPUTE_ATOMIC_COUNTERS = (int) 33381; - public static final int GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = (int) 33380; - public static final int GL_MAX_COMPUTE_IMAGE_UNIFORMS = (int) 37309; - public static final int GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = (int) 37083; - public static final int GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = (int) 33378; - public static final int GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = (int) 37308; - public static final int GL_MAX_COMPUTE_UNIFORM_BLOCKS = (int) 37307; - public static final int GL_MAX_COMPUTE_UNIFORM_COMPONENTS = (int) 33379; - public static final int GL_MAX_COMPUTE_WORK_GROUP_COUNT = (int) 37310; - public static final int GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = (int) 37099; - public static final int GL_MAX_COMPUTE_WORK_GROUP_SIZE = (int) 37311; - public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = (int) 33388; - public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = (int) 37188; - public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = (int) 37187; - public static final int GL_MAX_DEPTH = (int) 33408; - public static final int GL_MAX_ELEMENT_INDEX = (int) 36203; - public static final int GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = (int) 37082; - public static final int GL_MAX_FRAMEBUFFER_HEIGHT = (int) 37654; - public static final int GL_MAX_FRAMEBUFFER_LAYERS = (int) 37655; - public static final int GL_MAX_FRAMEBUFFER_SAMPLES = (int) 37656; - public static final int GL_MAX_FRAMEBUFFER_WIDTH = (int) 37653; - public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = (int) 37079; - public static final int GL_MAX_HEIGHT = (int) 33407; - public static final int GL_MAX_LABEL_LENGTH = (int) 33512; - public static final int GL_MAX_LAYERS = (int) 33409; - public static final int GL_MAX_NAME_LENGTH = (int) 37622; - public static final int GL_MAX_NUM_ACTIVE_VARIABLES = (int) 37623; - public static final int GL_MAX_NUM_COMPATIBLE_SUBROUTINES = (int) 37624; - public static final int GL_MAX_SHADER_STORAGE_BLOCK_SIZE = (int) 37086; - public static final int GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = (int) 37085; - public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = (int) 37080; - public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = (int) 37081; - public static final int GL_MAX_UNIFORM_LOCATIONS = (int) 33390; - public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS = (int) 33498; - public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = (int) 33497; - public static final int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = (int) 37078; - public static final int GL_MAX_WIDTH = (int) 33406; - public static final int GL_MIPMAP = (int) 33427; - public static final int GL_NAME_LENGTH = (int) 37625; - public static final int GL_NUM_ACTIVE_VARIABLES = (int) 37636; - public static final int GL_NUM_SHADING_LANGUAGE_VERSIONS = (int) 33513; - public static final int GL_OFFSET = (int) 37628; - public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = (int) 36201; - public static final int GL_PROGRAM = (int) 33506; - public static final int GL_PROGRAM_INPUT = (int) 37603; - public static final int GL_PROGRAM_OUTPUT = (int) 37604; - public static final int GL_PROGRAM_PIPELINE = (int) 33508; - public static final int GL_QUERY = (int) 33507; - public static final int GL_READ_PIXELS = (int) 33420; - public static final int GL_READ_PIXELS_FORMAT = (int) 33421; - public static final int GL_READ_PIXELS_TYPE = (int) 33422; - public static final int GL_REFERENCED_BY_COMPUTE_SHADER = (int) 37643; - public static final int GL_REFERENCED_BY_FRAGMENT_SHADER = (int) 37642; - public static final int GL_REFERENCED_BY_GEOMETRY_SHADER = (int) 37641; - public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER = (int) 37639; - public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = (int) 37640; - public static final int GL_REFERENCED_BY_VERTEX_SHADER = (int) 37638; - public static final int GL_SAMPLER = (int) 33510; - public static final int GL_SHADER = (int) 33505; - public static final int GL_SHADER_IMAGE_ATOMIC = (int) 33446; - public static final int GL_SHADER_IMAGE_LOAD = (int) 33444; - public static final int GL_SHADER_IMAGE_STORE = (int) 33445; - public static final int GL_SHADER_STORAGE_BARRIER_BIT = (int) 8192; - public static final int GL_SHADER_STORAGE_BLOCK = (int) 37606; - public static final int GL_SHADER_STORAGE_BUFFER = (int) 37074; - public static final int GL_SHADER_STORAGE_BUFFER_BINDING = (int) 37075; - public static final int GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = (int) 37087; - public static final int GL_SHADER_STORAGE_BUFFER_SIZE = (int) 37077; - public static final int GL_SHADER_STORAGE_BUFFER_START = (int) 37076; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = (int) 33452; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = (int) 33454; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = (int) 33453; - public static final int GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = (int) 33455; - public static final int GL_SRGB_DECODE_ARB = (int) 33433; - public static final int GL_SRGB_READ = (int) 33431; - public static final int GL_SRGB_WRITE = (int) 33432; - public static final int GL_STENCIL_COMPONENTS = (int) 33413; - public static final int GL_STENCIL_RENDERABLE = (int) 33416; - public static final int GL_TESS_CONTROL_SUBROUTINE = (int) 37609; - public static final int GL_TESS_CONTROL_SUBROUTINE_UNIFORM = (int) 37615; - public static final int GL_TESS_CONTROL_TEXTURE = (int) 33436; - public static final int GL_TESS_EVALUATION_SUBROUTINE = (int) 37610; - public static final int GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = (int) 37616; - public static final int GL_TESS_EVALUATION_TEXTURE = (int) 33437; - public static final int GL_TEXTURE_BUFFER_OFFSET = (int) 37277; - public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = (int) 37279; - public static final int GL_TEXTURE_BUFFER_SIZE = (int) 37278; - public static final int GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = (int) 33458; - public static final int GL_TEXTURE_COMPRESSED_BLOCK_SIZE = (int) 33459; - public static final int GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = (int) 33457; - public static final int GL_TEXTURE_GATHER = (int) 33442; - public static final int GL_TEXTURE_GATHER_SHADOW = (int) 33443; - public static final int GL_TEXTURE_IMAGE_FORMAT = (int) 33423; - public static final int GL_TEXTURE_IMAGE_TYPE = (int) 33424; - public static final int GL_TEXTURE_IMMUTABLE_LEVELS = (int) 33503; - public static final int GL_TEXTURE_SHADOW = (int) 33441; - public static final int GL_TEXTURE_VIEW = (int) 33461; - public static final int GL_TEXTURE_VIEW_MIN_LAYER = (int) 33501; - public static final int GL_TEXTURE_VIEW_MIN_LEVEL = (int) 33499; - public static final int GL_TEXTURE_VIEW_NUM_LAYERS = (int) 33502; - public static final int GL_TEXTURE_VIEW_NUM_LEVELS = (int) 33500; - public static final int GL_TOP_LEVEL_ARRAY_SIZE = (int) 37644; - public static final int GL_TOP_LEVEL_ARRAY_STRIDE = (int) 37645; - public static final int GL_TRANSFORM_FEEDBACK_VARYING = (int) 37620; - public static final int GL_TYPE = (int) 37626; - public static final int GL_UNIFORM = (int) 37601; - public static final int GL_UNIFORM_BLOCK = (int) 37602; - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = (int) 37100; - public static final int GL_VERTEX_ATTRIB_ARRAY_LONG = (int) 34638; - public static final int GL_VERTEX_ATTRIB_BINDING = (int) 33492; - public static final int GL_VERTEX_ATTRIB_RELATIVE_OFFSET = (int) 33493; - public static final int GL_VERTEX_BINDING_DIVISOR = (int) 33494; - public static final int GL_VERTEX_BINDING_OFFSET = (int) 33495; - public static final int GL_VERTEX_BINDING_STRIDE = (int) 33496; - public static final int GL_VERTEX_SUBROUTINE = (int) 37608; - public static final int GL_VERTEX_SUBROUTINE_UNIFORM = (int) 37614; - public static final int GL_VERTEX_TEXTURE = (int) 33435; - public static final int GL_VIEW_CLASS_128_BITS = (int) 33476; - public static final int GL_VIEW_CLASS_16_BITS = (int) 33482; - public static final int GL_VIEW_CLASS_24_BITS = (int) 33481; - public static final int GL_VIEW_CLASS_32_BITS = (int) 33480; - public static final int GL_VIEW_CLASS_48_BITS = (int) 33479; - public static final int GL_VIEW_CLASS_64_BITS = (int) 33478; - public static final int GL_VIEW_CLASS_8_BITS = (int) 33483; - public static final int GL_VIEW_CLASS_96_BITS = (int) 33477; - public static final int GL_VIEW_CLASS_BPTC_FLOAT = (int) 33491; - public static final int GL_VIEW_CLASS_BPTC_UNORM = (int) 33490; - public static final int GL_VIEW_CLASS_RGTC1_RED = (int) 33488; - public static final int GL_VIEW_CLASS_RGTC2_RG = (int) 33489; - public static final int GL_VIEW_CLASS_S3TC_DXT1_RGB = (int) 33484; - public static final int GL_VIEW_CLASS_S3TC_DXT1_RGBA = (int) 33485; - public static final int GL_VIEW_CLASS_S3TC_DXT3_RGBA = (int) 33486; - public static final int GL_VIEW_CLASS_S3TC_DXT5_RGBA = (int) 33487; - public static final int GL_VIEW_COMPATIBILITY_CLASS = (int) 33462; - - public static void glBindVertexBuffer(int bindingindex, int buffer, long offset, int stride) { - org.lwjgl3.opengl.GL43.glBindVertexBuffer(bindingindex, buffer, offset, stride); - } - - public static void glClearBufferData(int target, int internalformat, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL43.glClearBufferData(target, internalformat, format, type, data); - } - - public static void glClearBufferSubData(int target, int internalformat, long offset, long size, int format, - int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL43.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - public static void glCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, - int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, - int srcDepth) { - org.lwjgl3.opengl.GL43.glCopyImageSubData( - srcName, - srcTarget, - srcLevel, - srcX, - srcY, - srcZ, - dstName, - dstTarget, - dstLevel, - dstX, - dstY, - dstZ, - srcWidth, - srcHeight, - srcDepth); - } - - public static void glDebugMessageCallback(KHRDebugCallback callback) { - long userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler()); - CallbackUtil.registerContextCallbackKHR(userParam); - org.lwjgl3.opengl.GL43.nglDebugMessageCallback(callback == null ? 0 : callback.getPointer(), userParam); - } - - public static void glDebugMessageControl(int source, int type, int severity, java.nio.IntBuffer ids, - boolean enabled) { - org.lwjgl3.opengl.GL43.glDebugMessageControl(source, type, severity, ids, enabled); - } - - public static void glDebugMessageInsert(int source, int type, int id, int severity, java.lang.CharSequence buf) { - org.lwjgl3.opengl.GL43.glDebugMessageInsert(source, type, id, severity, buf); - } - - public static void glDebugMessageInsert(int source, int type, int id, int severity, java.nio.ByteBuffer buf) { - org.lwjgl3.opengl.GL43.glDebugMessageInsert(source, type, id, severity, buf); - } - - public static void glDispatchCompute(int num_groups_x, int num_groups_y, int num_groups_z) { - org.lwjgl3.opengl.GL43.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); - } - - public static void glDispatchComputeIndirect(long indirect) { - org.lwjgl3.opengl.GL43.glDispatchComputeIndirect(indirect); - } - - public static void glFramebufferParameteri(int target, int pname, int param) { - org.lwjgl3.opengl.GL43.glFramebufferParameteri(target, pname, param); - } - - public static int glGetDebugMessageLog(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, - java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, - java.nio.ByteBuffer messageLog) { - return org.lwjgl3.opengl.GL43.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); - } - - public static void glGetFramebufferParameter(int target, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL43.glGetFramebufferParameteriv(target, pname, params); - } - - public static int glGetFramebufferParameteri(int target, int pname) { - return org.lwjgl3.opengl.GL43.glGetFramebufferParameteri(target, pname); - } - - public static void glGetInternalformat(int target, int internalformat, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.GL43.glGetInternalformati64v(target, internalformat, pname, params); - } - - public static long glGetInternalformati64(int target, int internalformat, int pname) { - return org.lwjgl3.opengl.GL43.glGetInternalformati64(target, internalformat, pname); - } - - public static java.lang.String glGetObjectLabel(int identifier, int name, int bufSize) { - return org.lwjgl3.opengl.GL43.glGetObjectLabel(identifier, name, bufSize); - } - - public static void glGetObjectLabel(int identifier, int name, java.nio.IntBuffer length, - java.nio.ByteBuffer label) { - org.lwjgl3.opengl.GL43.glGetObjectLabel(identifier, name, length, label); - } - - public static void glGetProgramInterface(int program, int programInterface, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL43.glGetProgramInterfaceiv(program, programInterface, pname, params); - } - - public static int glGetProgramInterfacei(int program, int programInterface, int pname) { - return org.lwjgl3.opengl.GL43.glGetProgramInterfacei(program, programInterface, pname); - } - - public static void glGetProgramResource(int program, int programInterface, int index, java.nio.IntBuffer props, - java.nio.IntBuffer length, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL43.glGetProgramResourceiv(program, programInterface, index, props, length, params); - } - - public static int glGetProgramResourceIndex(int program, int programInterface, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceIndex(program, programInterface, name); - } - - public static int glGetProgramResourceIndex(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceIndex(program, programInterface, name); - } - - public static int glGetProgramResourceLocation(int program, int programInterface, java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceLocation(program, programInterface, name); - } - - public static int glGetProgramResourceLocation(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceLocation(program, programInterface, name); - } - - public static int glGetProgramResourceLocationIndex(int program, int programInterface, - java.lang.CharSequence name) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceLocationIndex(program, programInterface, name); - } - - public static int glGetProgramResourceLocationIndex(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceLocationIndex(program, programInterface, name); - } - - public static java.lang.String glGetProgramResourceName(int program, int programInterface, int index, int bufSize) { - return org.lwjgl3.opengl.GL43.glGetProgramResourceName(program, programInterface, index, bufSize); - } - - public static void glGetProgramResourceName(int program, int programInterface, int index, java.nio.IntBuffer length, - java.nio.ByteBuffer name) { - org.lwjgl3.opengl.GL43.glGetProgramResourceName(program, programInterface, index, length, name); - } - - public static void glInvalidateBufferData(int buffer) { - org.lwjgl3.opengl.GL43.glInvalidateBufferData(buffer); - } - - public static void glInvalidateBufferSubData(int buffer, long offset, long length) { - org.lwjgl3.opengl.GL43.glInvalidateBufferSubData(buffer, offset, length); - } - - public static void glInvalidateFramebuffer(int target, java.nio.IntBuffer attachments) { - org.lwjgl3.opengl.GL43.glInvalidateFramebuffer(target, attachments); - } - - public static void glInvalidateSubFramebuffer(int target, java.nio.IntBuffer attachments, int x, int y, int width, - int height) { - org.lwjgl3.opengl.GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); - } - - public static void glInvalidateTexImage(int texture, int level) { - org.lwjgl3.opengl.GL43.glInvalidateTexImage(texture, level); - } - - public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth) { - org.lwjgl3.opengl.GL43.glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); - } - - public static void glMultiDrawArraysIndirect(int mode, long indirect_buffer_offset, int primcount, int stride) { - org.lwjgl3.opengl.GL43.glMultiDrawArraysIndirect(mode, indirect_buffer_offset, primcount, stride); - } - - public static void glMultiDrawArraysIndirect(int mode, java.nio.ByteBuffer indirect, int primcount, int stride) { - org.lwjgl3.opengl.GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); - } - - public static void glMultiDrawArraysIndirect(int mode, java.nio.IntBuffer indirect, int primcount, int stride) { - org.lwjgl3.opengl.GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); - } - - public static void glMultiDrawElementsIndirect(int mode, int type, long indirect_buffer_offset, int primcount, - int stride) { - org.lwjgl3.opengl.GL43.glMultiDrawElementsIndirect(mode, type, indirect_buffer_offset, primcount, stride); - } - - public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.ByteBuffer indirect, int primcount, - int stride) { - org.lwjgl3.opengl.GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); - } - - public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.IntBuffer indirect, int primcount, - int stride) { - org.lwjgl3.opengl.GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); - } - - public static void glObjectLabel(int identifier, int name, java.lang.CharSequence label) { - org.lwjgl3.opengl.GL43.glObjectLabel(identifier, name, label); - } - - public static void glObjectLabel(int identifier, int name, java.nio.ByteBuffer label) { - org.lwjgl3.opengl.GL43.glObjectLabel(identifier, name, label); - } - - public static void glPopDebugGroup() { - org.lwjgl3.opengl.GL43.glPopDebugGroup(); - } - - public static void glPushDebugGroup(int source, int id, java.lang.CharSequence message) { - org.lwjgl3.opengl.GL43.glPushDebugGroup(source, id, message); - } - - public static void glPushDebugGroup(int source, int id, java.nio.ByteBuffer message) { - org.lwjgl3.opengl.GL43.glPushDebugGroup(source, id, message); - } - - public static void glShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding) { - org.lwjgl3.opengl.GL43.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); - } - - public static void glTexBufferRange(int target, int internalformat, int buffer, long offset, long size) { - org.lwjgl3.opengl.GL43.glTexBufferRange(target, internalformat, buffer, offset, size); - } - - public static void glTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, - boolean fixedsamplelocations) { - org.lwjgl3.opengl.GL43 - .glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, - int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.GL43 - .glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - public static void glTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, - int numlevels, int minlayer, int numlayers) { - org.lwjgl3.opengl.GL43 - .glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); - } - - public static void glVertexAttribBinding(int attribindex, int bindingindex) { - org.lwjgl3.opengl.GL43.glVertexAttribBinding(attribindex, bindingindex); - } - - public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, - int relativeoffset) { - org.lwjgl3.opengl.GL43.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); - } - - public static void glVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.GL43.glVertexAttribIFormat(attribindex, size, type, relativeoffset); - } - - public static void glVertexAttribLFormat(int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.GL43.glVertexAttribLFormat(attribindex, size, type, relativeoffset); - } - - public static void glVertexBindingDivisor(int bindingindex, int divisor) { - org.lwjgl3.opengl.GL43.glVertexBindingDivisor(bindingindex, divisor); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL44.java b/src/main/java/org/lwjgl/opengl/GL44.java deleted file mode 100644 index 0c75703f4..000000000 --- a/src/main/java/org/lwjgl/opengl/GL44.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class GL44 { - - public static final int GL_BUFFER_IMMUTABLE_STORAGE = (int) 33311; - public static final int GL_BUFFER_STORAGE_FLAGS = (int) 33312; - public static final int GL_CLEAR_TEXTURE = (int) 37733; - public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = (int) 16384; - public static final int GL_CLIENT_STORAGE_BIT = (int) 512; - public static final int GL_DYNAMIC_STORAGE_BIT = (int) 256; - public static final int GL_LOCATION_COMPONENT = (int) 37706; - public static final int GL_MAP_COHERENT_BIT = (int) 128; - public static final int GL_MAP_PERSISTENT_BIT = (int) 64; - public static final int GL_MAX_VERTEX_ATTRIB_STRIDE = (int) 33509; - public static final int GL_MIRROR_CLAMP_TO_EDGE = (int) 34627; - public static final int GL_QUERY_BUFFER = (int) 37266; - public static final int GL_QUERY_BUFFER_BARRIER_BIT = (int) 32768; - public static final int GL_QUERY_BUFFER_BINDING = (int) 37267; - public static final int GL_QUERY_RESULT_NO_WAIT = (int) 37268; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = (int) 37707; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = (int) 37708; - - public static void glBufferStorage(int target, long size, int flags) { - org.lwjgl3.opengl.GL44.glBufferStorage(target, size, flags); - } - - public static void glBufferStorage(int target, java.nio.ByteBuffer data, int flags) { - org.lwjgl3.opengl.GL44.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.DoubleBuffer data, int flags) { - org.lwjgl3.opengl.GL44.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.FloatBuffer data, int flags) { - org.lwjgl3.opengl.GL44.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.IntBuffer data, int flags) { - org.lwjgl3.opengl.GL44.glBufferStorage(target, data, flags); - } - - public static void glBufferStorage(int target, java.nio.ShortBuffer data, int flags) { - org.lwjgl3.opengl.GL44.glBufferStorage(target, data, flags); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.LongBuffer data) { - final java.nio.ByteBuffer wrappedArg4 = BufferCasts.toByteBuffer(data); - - org.lwjgl3.opengl.GL44.glClearTexImage(texture, level, format, type, wrappedArg4); - BufferCasts.updateBuffer(data, wrappedArg4); - } - - public static void glClearTexImage(int texture, int level, int format, int type, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexImage(texture, level, format, type, data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.LongBuffer data) { - final java.nio.ByteBuffer wrappedArg10 = BufferCasts.toByteBuffer(data); - - org.lwjgl3.opengl.GL44.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - wrappedArg10); - BufferCasts.updateBuffer(data, wrappedArg10); - } - - public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.GL44.glClearTexSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - data); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GL45.java b/src/main/java/org/lwjgl/opengl/GL45.java deleted file mode 100644 index 7019d03c7..000000000 --- a/src/main/java/org/lwjgl/opengl/GL45.java +++ /dev/null @@ -1,1064 +0,0 @@ -package org.lwjgl.opengl; - -public class GL45 { - - public static final int GL_CLIP_DEPTH_MODE = (int) 37725; - public static final int GL_CLIP_ORIGIN = (int) 37724; - public static final int GL_CONTEXT_LOST = (int) 1287; - public static final int GL_CONTEXT_RELEASE_BEHAVIOR = (int) 33531; - public static final int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = (int) 33532; - public static final int GL_CONTEXT_ROBUST_ACCESS = (int) 37107; - public static final int GL_GUILTY_CONTEXT_RESET = (int) 33363; - public static final int GL_INNOCENT_CONTEXT_RESET = (int) 33364; - public static final int GL_LOSE_CONTEXT_ON_RESET = (int) 33362; - public static final int GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = (int) 33530; - public static final int GL_MAX_CULL_DISTANCES = (int) 33529; - public static final int GL_NEGATIVE_ONE_TO_ONE = (int) 37726; - public static final int GL_NO_RESET_NOTIFICATION = (int) 33377; - public static final int GL_QUERY_BY_REGION_NO_WAIT_INVERTED = (int) 36378; - public static final int GL_QUERY_BY_REGION_WAIT_INVERTED = (int) 36377; - public static final int GL_QUERY_NO_WAIT_INVERTED = (int) 36376; - public static final int GL_QUERY_TARGET = (int) 33514; - public static final int GL_QUERY_WAIT_INVERTED = (int) 36375; - public static final int GL_RESET_NOTIFICATION_STRATEGY = (int) 33366; - public static final int GL_TEXTURE_BINDING = (int) 33515; - public static final int GL_TEXTURE_TARGET = (int) 4102; - public static final int GL_UNKNOWN_CONTEXT_RESET = (int) 33365; - public static final int GL_ZERO_TO_ONE = (int) 37727; - - public static void glBindTextureUnit(int unit, int texture) { - org.lwjgl3.opengl.GL45.glBindTextureUnit(unit, texture); - } - - public static void glBlitNamedFramebuffer(int readFramebuffer, int drawFramebuffer, int srcX0, int srcY0, int srcX1, - int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { - org.lwjgl3.opengl.GL45.glBlitNamedFramebuffer( - readFramebuffer, - drawFramebuffer, - srcX0, - srcY0, - srcX1, - srcY1, - dstX0, - dstY0, - dstX1, - dstY1, - mask, - filter); - } - - public static int glCheckNamedFramebufferStatus(int framebuffer, int target) { - return org.lwjgl3.opengl.GL45.glCheckNamedFramebufferStatus(framebuffer, target); - } - - public static void glClearNamedBufferData(int buffer, int internalformat, int format, int type, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL45.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - public static void glClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, - int type, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL45.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - public static void glClearNamedFramebuffer(int framebuffer, int buffer, int drawbuffer, - java.nio.FloatBuffer value) { - org.lwjgl3.opengl.GL45.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - public static void glClearNamedFramebuffer(int framebuffer, int buffer, int drawbuffer, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL45.glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - public static void glClearNamedFramebufferu(int framebuffer, int buffer, int drawbuffer, java.nio.IntBuffer value) { - org.lwjgl3.opengl.GL45.glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - public static void glClipControl(int origin, int depth) { - org.lwjgl3.opengl.GL45.glClipControl(origin, depth); - } - - public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, - int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL45.glCompressedTextureSubImage1D( - texture, - level, - xoffset, - width, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, - java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL45.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, data); - } - - public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, - int height, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL45.glCompressedTextureSubImage2D( - texture, - level, - xoffset, - yoffset, - width, - height, - format, - data_imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, - int height, int format, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL45 - .glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data); - } - - public static void glCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int imageSize, long data_buffer_offset) { - org.lwjgl3.opengl.GL45.glCompressedTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - imageSize, - data_buffer_offset); - } - - public static void glCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int format, int imageSize, java.nio.ByteBuffer data) { - - org.lwjgl3.opengl.GL45.glCompressedTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - imageSize, - org.lwjgl.MemoryUtil.getAddress(data)); - } - - public static void glCopyNamedBufferSubData(int readBuffer, int writeBuffer, long readOffset, long writeOffset, - long size) { - org.lwjgl3.opengl.GL45.glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); - } - - public static void glCopyTextureSubImage1D(int texture, int level, int xoffset, int x, int y, int width) { - org.lwjgl3.opengl.GL45.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); - } - - public static void glCopyTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int x, int y, - int width, int height) { - org.lwjgl3.opengl.GL45.glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); - } - - public static void glCopyTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int x, - int y, int width, int height) { - org.lwjgl3.opengl.GL45.glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - public static int glCreateBuffers() { - return org.lwjgl3.opengl.GL45.glCreateBuffers(); - } - - public static void glCreateBuffers(java.nio.IntBuffer buffers) { - org.lwjgl3.opengl.GL45.glCreateBuffers(buffers); - } - - public static int glCreateFramebuffers() { - return org.lwjgl3.opengl.GL45.glCreateFramebuffers(); - } - - public static void glCreateFramebuffers(java.nio.IntBuffer framebuffers) { - org.lwjgl3.opengl.GL45.glCreateFramebuffers(framebuffers); - } - - public static int glCreateProgramPipelines() { - return org.lwjgl3.opengl.GL45.glCreateProgramPipelines(); - } - - public static void glCreateProgramPipelines(java.nio.IntBuffer pipelines) { - org.lwjgl3.opengl.GL45.glCreateProgramPipelines(pipelines); - } - - public static int glCreateQueries(int target) { - return org.lwjgl3.opengl.GL45.glCreateQueries(target); - } - - public static void glCreateQueries(int target, java.nio.IntBuffer ids) { - org.lwjgl3.opengl.GL45.glCreateQueries(target, ids); - } - - public static int glCreateRenderbuffers() { - return org.lwjgl3.opengl.GL45.glCreateRenderbuffers(); - } - - public static void glCreateRenderbuffers(java.nio.IntBuffer renderbuffers) { - org.lwjgl3.opengl.GL45.glCreateRenderbuffers(renderbuffers); - } - - public static int glCreateSamplers() { - return org.lwjgl3.opengl.GL45.glCreateSamplers(); - } - - public static void glCreateSamplers(java.nio.IntBuffer samplers) { - org.lwjgl3.opengl.GL45.glCreateSamplers(samplers); - } - - public static int glCreateTextures(int target) { - return org.lwjgl3.opengl.GL45.glCreateTextures(target); - } - - public static void glCreateTextures(int target, java.nio.IntBuffer textures) { - org.lwjgl3.opengl.GL45.glCreateTextures(target, textures); - } - - public static int glCreateTransformFeedbacks() { - return org.lwjgl3.opengl.GL45.glCreateTransformFeedbacks(); - } - - public static void glCreateTransformFeedbacks(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.GL45.glCreateTransformFeedbacks(ids); - } - - public static int glCreateVertexArrays() { - return org.lwjgl3.opengl.GL45.glCreateVertexArrays(); - } - - public static void glCreateVertexArrays(java.nio.IntBuffer arrays) { - org.lwjgl3.opengl.GL45.glCreateVertexArrays(arrays); - } - - public static void glDisableVertexArrayAttrib(int vaobj, int index) { - org.lwjgl3.opengl.GL45.glDisableVertexArrayAttrib(vaobj, index); - } - - public static void glEnableVertexArrayAttrib(int vaobj, int index) { - org.lwjgl3.opengl.GL45.glEnableVertexArrayAttrib(vaobj, index); - } - - public static void glFlushMappedNamedBufferRange(int buffer, long offset, long length) { - org.lwjgl3.opengl.GL45.glFlushMappedNamedBufferRange(buffer, offset, length); - } - - public static void glGenerateTextureMipmap(int texture) { - org.lwjgl3.opengl.GL45.glGenerateTextureMipmap(texture); - } - - public static void glGetCompressedTextureImage(int texture, int level, int pixels_bufSize, - long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureImage(texture, level, pixels_bufSize, pixels_buffer_offset); - } - - public static void glGetCompressedTextureImage(int texture, int level, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureImage(texture, level, pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels_bufSize, - pixels_buffer_offset); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, - int width, int height, int depth, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetCompressedTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - pixels); - } - - public static int glGetGraphicsResetStatus() { - return org.lwjgl3.opengl.GL45.glGetGraphicsResetStatus(); - } - - public static void glGetNamedBufferParameter(int buffer, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetNamedBufferParameteriv(buffer, pname, params); - } - - public static void glGetNamedBufferParameter(int buffer, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.GL45.glGetNamedBufferParameteri64v(buffer, pname, params); - } - - public static long glGetNamedBufferParameteri64(int buffer, int pname) { - return org.lwjgl3.opengl.GL45.glGetNamedBufferParameteri64(buffer, pname); - } - - public static int glGetNamedBufferParameteri(int buffer, int pname) { - return org.lwjgl3.opengl.GL45.glGetNamedBufferParameteri(buffer, pname); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL45.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL45.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL45.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL45.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedBufferSubData(int buffer, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.GL45.glGetNamedBufferSubData(buffer, offset, data); - } - - public static void glGetNamedFramebufferAttachmentParameter(int framebuffer, int attachment, int pname, - java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - public static void glGetNamedFramebufferParameter(int framebuffer, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - public static void glGetNamedRenderbufferParameter(int renderbuffer, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, int pixels_bufSize, - long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels_bufSize, pixels_buffer_offset); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels); - } - - public static void glGetTextureLevelParameter(int texture, int level, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL45.glGetTextureLevelParameterfv(texture, level, pname, params); - } - - public static void glGetTextureLevelParameter(int texture, int level, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetTextureLevelParameteriv(texture, level, pname, params); - } - - public static float glGetTextureLevelParameterf(int texture, int level, int pname) { - return org.lwjgl3.opengl.GL45.glGetTextureLevelParameterf(texture, level, pname); - } - - public static int glGetTextureLevelParameteri(int texture, int level, int pname) { - return org.lwjgl3.opengl.GL45.glGetTextureLevelParameteri(texture, level, pname); - } - - public static void glGetTextureParameter(int texture, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL45.glGetTextureParameterfv(texture, pname, params); - } - - public static void glGetTextureParameter(int texture, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetTextureParameteriv(texture, pname, params); - } - - public static void glGetTextureParameterI(int texture, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetTextureParameterIiv(texture, pname, params); - } - - public static int glGetTextureParameterIi(int texture, int pname) { - return org.lwjgl3.opengl.GL45.glGetTextureParameterIi(texture, pname); - } - - public static void glGetTextureParameterIu(int texture, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetTextureParameterIuiv(texture, pname, params); - } - - public static int glGetTextureParameterIui(int texture, int pname) { - return org.lwjgl3.opengl.GL45.glGetTextureParameterIui(texture, pname); - } - - public static float glGetTextureParameterf(int texture, int pname) { - return org.lwjgl3.opengl.GL45.glGetTextureParameterf(texture, pname); - } - - public static int glGetTextureParameteri(int texture, int pname) { - return org.lwjgl3.opengl.GL45.glGetTextureParameteri(texture, pname); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_bufSize, - pixels_buffer_offset); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45.glGetTextureSubImage( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glGetTransformFeedback(int xfb, int pname, int index, java.nio.IntBuffer param) { - org.lwjgl3.opengl.GL45.glGetTransformFeedbacki_v(xfb, pname, index, param); - } - - public static void glGetTransformFeedback(int xfb, int pname, int index, java.nio.LongBuffer param) { - org.lwjgl3.opengl.GL45.glGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - public static void glGetTransformFeedback(int xfb, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.GL45.glGetTransformFeedbackiv(xfb, pname, param); - } - - public static long glGetTransformFeedbacki64(int xfb, int pname, int index) { - return org.lwjgl3.opengl.GL45.glGetTransformFeedbacki64(xfb, pname, index); - } - - public static int glGetTransformFeedbacki(int xfb, int pname) { - return org.lwjgl3.opengl.GL45.glGetTransformFeedbacki(xfb, pname); - } - - public static int glGetTransformFeedbacki(int xfb, int pname, int index) { - return org.lwjgl3.opengl.GL45.glGetTransformFeedbacki(xfb, pname, index); - } - - public static void glGetVertexArray(int vaobj, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.GL45.glGetVertexArrayiv(vaobj, pname, param); - } - - public static long glGetVertexArrayIndexed64i(int vaobj, int index, int pname) { - return org.lwjgl3.opengl.GL45.glGetVertexArrayIndexed64i(vaobj, index, pname); - } - - public static void glGetVertexArrayIndexed64i(int vaobj, int index, int pname, java.nio.LongBuffer param) { - org.lwjgl3.opengl.GL45.glGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - public static void glGetVertexArrayIndexed(int vaobj, int index, int pname, java.nio.IntBuffer param) { - org.lwjgl3.opengl.GL45.glGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - public static void glGetnUniform(int program, int location, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL45.glGetnUniformfv(program, location, params); - } - - public static void glGetnUniform(int program, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetnUniformiv(program, location, params); - } - - public static void glGetnUniformu(int program, int location, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glGetnUniformuiv(program, location, params); - } - - public static void glInvalidateNamedFramebufferData(int framebuffer, java.nio.IntBuffer attachments) { - org.lwjgl3.opengl.GL45.glInvalidateNamedFramebufferData(framebuffer, attachments); - } - - public static void glInvalidateNamedFramebufferSubData(int framebuffer, java.nio.IntBuffer attachments, int x, - int y, int width, int height) { - org.lwjgl3.opengl.GL45.glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); - } - - public static java.nio.ByteBuffer glMapNamedBuffer(int buffer, int access, long length, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.GL45.glMapNamedBuffer(buffer, access, length, old_buffer); - } - - public static java.nio.ByteBuffer glMapNamedBuffer(int buffer, int access, java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.GL45.glMapNamedBuffer(buffer, access, old_buffer); - } - - public static java.nio.ByteBuffer glMapNamedBufferRange(int buffer, long offset, long length, int access, - java.nio.ByteBuffer old_buffer) { - return org.lwjgl3.opengl.GL45.glMapNamedBufferRange(buffer, offset, length, access, old_buffer); - } - - public static void glMemoryBarrierByRegion(int barriers) { - org.lwjgl3.opengl.GL45.glMemoryBarrierByRegion(barriers); - } - - public static void glNamedBufferData(int buffer, long data_size, int usage) { - org.lwjgl3.opengl.GL45.glNamedBufferData(buffer, data_size, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.ByteBuffer data, int usage) { - org.lwjgl3.opengl.GL45.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.DoubleBuffer data, int usage) { - org.lwjgl3.opengl.GL45.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.FloatBuffer data, int usage) { - org.lwjgl3.opengl.GL45.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.IntBuffer data, int usage) { - org.lwjgl3.opengl.GL45.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferData(int buffer, java.nio.ShortBuffer data, int usage) { - org.lwjgl3.opengl.GL45.glNamedBufferData(buffer, data, usage); - } - - public static void glNamedBufferStorage(int buffer, long size, int flags) { - org.lwjgl3.opengl.GL45.glNamedBufferStorage(buffer, size, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.ByteBuffer data, int flags) { - org.lwjgl3.opengl.GL45.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.DoubleBuffer data, int flags) { - org.lwjgl3.opengl.GL45.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.FloatBuffer data, int flags) { - org.lwjgl3.opengl.GL45.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.IntBuffer data, int flags) { - org.lwjgl3.opengl.GL45.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferStorage(int buffer, java.nio.ShortBuffer data, int flags) { - org.lwjgl3.opengl.GL45.glNamedBufferStorage(buffer, data, flags); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.GL45.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.DoubleBuffer data) { - org.lwjgl3.opengl.GL45.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.FloatBuffer data) { - org.lwjgl3.opengl.GL45.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.IntBuffer data) { - org.lwjgl3.opengl.GL45.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedBufferSubData(int buffer, long offset, java.nio.ShortBuffer data) { - org.lwjgl3.opengl.GL45.glNamedBufferSubData(buffer, offset, data); - } - - public static void glNamedFramebufferDrawBuffer(int framebuffer, int mode) { - org.lwjgl3.opengl.GL45.glNamedFramebufferDrawBuffer(framebuffer, mode); - } - - public static void glNamedFramebufferDrawBuffers(int framebuffer, java.nio.IntBuffer bufs) { - org.lwjgl3.opengl.GL45.glNamedFramebufferDrawBuffers(framebuffer, bufs); - } - - public static void glNamedFramebufferParameteri(int framebuffer, int pname, int param) { - org.lwjgl3.opengl.GL45.glNamedFramebufferParameteri(framebuffer, pname, param); - } - - public static void glNamedFramebufferReadBuffer(int framebuffer, int mode) { - org.lwjgl3.opengl.GL45.glNamedFramebufferReadBuffer(framebuffer, mode); - } - - public static void glNamedFramebufferRenderbuffer(int framebuffer, int attachment, int renderbuffertarget, - int renderbuffer) { - org.lwjgl3.opengl.GL45.glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); - } - - public static void glNamedFramebufferTexture(int framebuffer, int attachment, int texture, int level) { - org.lwjgl3.opengl.GL45.glNamedFramebufferTexture(framebuffer, attachment, texture, level); - } - - public static void glNamedFramebufferTextureLayer(int framebuffer, int attachment, int texture, int level, - int layer) { - org.lwjgl3.opengl.GL45.glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); - } - - public static void glNamedRenderbufferStorage(int renderbuffer, int internalformat, int width, int height) { - org.lwjgl3.opengl.GL45.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); - } - - public static void glNamedRenderbufferStorageMultisample(int renderbuffer, int samples, int internalformat, - int width, int height) { - org.lwjgl3.opengl.GL45 - .glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, int pixels_bufSize, - long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels_bufSize, pixels_buffer_offset); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glTextureBarrier() { - org.lwjgl3.opengl.GL45.glTextureBarrier(); - } - - public static void glTextureBuffer(int texture, int internalformat, int buffer) { - org.lwjgl3.opengl.GL45.glTextureBuffer(texture, internalformat, buffer); - } - - public static void glTextureBufferRange(int texture, int internalformat, int buffer, long offset, long size) { - org.lwjgl3.opengl.GL45.glTextureBufferRange(texture, internalformat, buffer, offset, size); - } - - public static void glTextureParameter(int texture, int pname, java.nio.FloatBuffer params) { - org.lwjgl3.opengl.GL45.glTextureParameterfv(texture, pname, params); - } - - public static void glTextureParameter(int texture, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glTextureParameteriv(texture, pname, params); - } - - public static void glTextureParameterI(int texture, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glTextureParameterIiv(texture, pname, params); - } - - public static void glTextureParameterIu(int texture, int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.GL45.glTextureParameterIuiv(texture, pname, params); - } - - public static void glTextureParameterf(int texture, int pname, float param) { - org.lwjgl3.opengl.GL45.glTextureParameterf(texture, pname, param); - } - - public static void glTextureParameteri(int texture, int pname, int param) { - org.lwjgl3.opengl.GL45.glTextureParameteri(texture, pname, param); - } - - public static void glTextureStorage1D(int texture, int levels, int internalformat, int width) { - org.lwjgl3.opengl.GL45.glTextureStorage1D(texture, levels, internalformat, width); - } - - public static void glTextureStorage2D(int texture, int levels, int internalformat, int width, int height) { - org.lwjgl3.opengl.GL45.glTextureStorage2D(texture, levels, internalformat, width, height); - } - - public static void glTextureStorage2DMultisample(int texture, int samples, int internalformat, int width, - int height, boolean fixedsamplelocations) { - org.lwjgl3.opengl.GL45 - .glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTextureStorage3D(int texture, int levels, int internalformat, int width, int height, - int depth) { - org.lwjgl3.opengl.GL45.glTextureStorage3D(texture, levels, internalformat, width, height, depth); - } - - public static void glTextureStorage3DMultisample(int texture, int samples, int internalformat, int width, - int height, int depth, boolean fixedsamplelocations) { - org.lwjgl3.opengl.GL45.glTextureStorage3DMultisample( - texture, - samples, - internalformat, - width, - height, - depth, - fixedsamplelocations); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels_buffer_offset); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glTextureSubImage2D( - texture, - level, - xoffset, - yoffset, - width, - height, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45 - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL45 - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45 - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45 - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, - int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45 - .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, long pixels_buffer_offset) { - org.lwjgl3.opengl.GL45.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels_buffer_offset); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, - int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.GL45.glTextureSubImage3D( - texture, - level, - xoffset, - yoffset, - zoffset, - width, - height, - depth, - format, - type, - pixels); - } - - public static void glTransformFeedbackBufferBase(int xfb, int index, int buffer) { - org.lwjgl3.opengl.GL45.glTransformFeedbackBufferBase(xfb, index, buffer); - } - - public static void glTransformFeedbackBufferRange(int xfb, int index, int buffer, long offset, long size) { - org.lwjgl3.opengl.GL45.glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); - } - - public static boolean glUnmapNamedBuffer(int buffer) { - return org.lwjgl3.opengl.GL45.glUnmapNamedBuffer(buffer); - } - - public static void glVertexArrayAttribBinding(int vaobj, int attribindex, int bindingindex) { - org.lwjgl3.opengl.GL45.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); - } - - public static void glVertexArrayAttribFormat(int vaobj, int attribindex, int size, int type, boolean normalized, - int relativeoffset) { - org.lwjgl3.opengl.GL45.glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); - } - - public static void glVertexArrayAttribIFormat(int vaobj, int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.GL45.glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); - } - - public static void glVertexArrayAttribLFormat(int vaobj, int attribindex, int size, int type, int relativeoffset) { - org.lwjgl3.opengl.GL45.glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); - } - - public static void glVertexArrayBindingDivisor(int vaobj, int bindingindex, int divisor) { - org.lwjgl3.opengl.GL45.glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); - } - - public static void glVertexArrayElementBuffer(int vaobj, int buffer) { - org.lwjgl3.opengl.GL45.glVertexArrayElementBuffer(vaobj, buffer); - } - - public static void glVertexArrayVertexBuffer(int vaobj, int bindingindex, int buffer, long offset, int stride) { - org.lwjgl3.opengl.GL45.glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GLContext.java b/src/main/java/org/lwjgl/opengl/GLContext.java deleted file mode 100644 index 70093d1ec..000000000 --- a/src/main/java/org/lwjgl/opengl/GLContext.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.lwjgl.opengl; - -public class GLContext { - - private static ContextCapabilities contextCapabilities = new ContextCapabilities(); - - public static ContextCapabilities getCapabilities() { - return contextCapabilities; - } -} diff --git a/src/main/java/org/lwjgl/opengl/GLSync.java b/src/main/java/org/lwjgl/opengl/GLSync.java deleted file mode 100644 index 647e1f28c..000000000 --- a/src/main/java/org/lwjgl/opengl/GLSync.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.PointerWrapperAbstract; - -/** - * This class is a wrapper around a GLsync pointer. - * - * @author spasi - */ -public final class GLSync extends PointerWrapperAbstract { - - GLSync(final long sync) { - super(sync); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GREMEDYFrameTerminator.java b/src/main/java/org/lwjgl/opengl/GREMEDYFrameTerminator.java deleted file mode 100644 index 9cbfbe0e8..000000000 --- a/src/main/java/org/lwjgl/opengl/GREMEDYFrameTerminator.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class GREMEDYFrameTerminator { - - public static void glFrameTerminatorGREMEDY() { - org.lwjgl3.opengl.GREMEDYFrameTerminator.glFrameTerminatorGREMEDY(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GREMEDYStringMarker.java b/src/main/java/org/lwjgl/opengl/GREMEDYStringMarker.java deleted file mode 100644 index 3c8f71bc4..000000000 --- a/src/main/java/org/lwjgl/opengl/GREMEDYStringMarker.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.lwjgl.opengl; - -public class GREMEDYStringMarker { - - public static void glStringMarkerGREMEDY(java.lang.CharSequence string) { - org.lwjgl3.opengl.GREMEDYStringMarker.glStringMarkerGREMEDY(string); - } - - public static void glStringMarkerGREMEDY(java.nio.ByteBuffer string) { - org.lwjgl3.opengl.GREMEDYStringMarker.glStringMarkerGREMEDY(string); - } -} diff --git a/src/main/java/org/lwjgl/opengl/GlobalLock.java b/src/main/java/org/lwjgl/opengl/GlobalLock.java deleted file mode 100644 index 1ae3488a6..000000000 --- a/src/main/java/org/lwjgl/opengl/GlobalLock.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - * This class contains the global lock that LWJGL will use to synchronize access to Display. - */ -final class GlobalLock { - - static final Object lock = new Object(); -} diff --git a/src/main/java/org/lwjgl/opengl/INTELMapTexture.java b/src/main/java/org/lwjgl/opengl/INTELMapTexture.java deleted file mode 100644 index 92cc87b67..000000000 --- a/src/main/java/org/lwjgl/opengl/INTELMapTexture.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class INTELMapTexture { - - public static final int GL_LAYOUT_DEFAULT_INTEL = (int) 0; - public static final int GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = (int) 2; - public static final int GL_LAYOUT_LINEAR_INTEL = (int) 1; - public static final int GL_TEXTURE_MEMORY_LAYOUT_INTEL = (int) 33791; - - public static void glSyncTextureINTEL(int texture) { - org.lwjgl3.opengl.INTELMapTexture.glSyncTextureINTEL(texture); - } - - public static void glUnmapTexture2DINTEL(int texture, int level) { - org.lwjgl3.opengl.INTELMapTexture.glUnmapTexture2DINTEL(texture, level); - } -} diff --git a/src/main/java/org/lwjgl/opengl/InputImplementation.java b/src/main/java/org/lwjgl/opengl/InputImplementation.java deleted file mode 100644 index ccb7cce12..000000000 --- a/src/main/java/org/lwjgl/opengl/InputImplementation.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - * This is the input implementation interface. Mouse and Keyboard delegates to implementors of this interface. There is - * one InputImplementation for each supported platform. - * - * @author elias_naur - */ -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import org.lwjgl.LWJGLException; - -public interface InputImplementation { - - /* - * Mouse methods - */ - /** Query of wheel support */ - boolean hasWheel(); - - /** Query of button count */ - int getButtonCount(); - - /** - * Method to create the mouse. - */ - void createMouse() throws LWJGLException; - - /** - * Method the destroy the mouse - */ - void destroyMouse(); - - /** - * Method to poll the mouse - */ - void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); - - /** - * Method to read the keyboard buffer - */ - void readMouse(ByteBuffer buffer); - - void grabMouse(boolean grab); - - /** - * Function to determine native cursor support - */ - int getNativeCursorCapabilities(); - - /** Method to set the native cursor position */ - void setCursorPosition(int x, int y); - - /** Method to set the native cursor */ - void setNativeCursor(Object handle) throws LWJGLException; - - /** Method returning the minimum cursor size */ - int getMinCursorSize(); - - /** Method returning the maximum cursor size */ - int getMaxCursorSize(); - - /* - * Keyboard methods - */ - - /** - * Method to create the keyboard - */ - void createKeyboard() throws LWJGLException; - - /** - * Method to destroy the keyboard - */ - void destroyKeyboard(); - - /** - * Method to poll the keyboard. - * - * @param keyDownBuffer the address of a 256-byte buffer to place key states in. - */ - void pollKeyboard(ByteBuffer keyDownBuffer); - - /** - * Method to read the keyboard buffer - */ - void readKeyboard(ByteBuffer buffer); - - // int isStateKeySet(int key); - - /** Native cursor handles */ - Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, - IntBuffer delays) throws LWJGLException; - - void destroyCursor(Object cursor_handle); - - int getWidth(); - - int getHeight(); - - boolean isInsideWindow(); -} diff --git a/src/main/java/org/lwjgl/opengl/KHRContextFlushControl.java b/src/main/java/org/lwjgl/opengl/KHRContextFlushControl.java deleted file mode 100644 index e76ec47b5..000000000 --- a/src/main/java/org/lwjgl/opengl/KHRContextFlushControl.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class KHRContextFlushControl { - - public static final int GL_CONTEXT_RELEASE_BEHAVIOR = (int) 33531; - public static final int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = (int) 33532; -} diff --git a/src/main/java/org/lwjgl/opengl/KHRDebug.java b/src/main/java/org/lwjgl/opengl/KHRDebug.java deleted file mode 100644 index 76a43db08..000000000 --- a/src/main/java/org/lwjgl/opengl/KHRDebug.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.lwjgl.opengl; - -public class KHRDebug { - - public static final int GL_BUFFER = (int) 33504; - public static final int GL_CONTEXT_FLAG_DEBUG_BIT = (int) 2; - public static final int GL_DEBUG_CALLBACK_FUNCTION = (int) 33348; - public static final int GL_DEBUG_CALLBACK_USER_PARAM = (int) 33349; - public static final int GL_DEBUG_GROUP_STACK_DEPTH = (int) 33389; - public static final int GL_DEBUG_LOGGED_MESSAGES = (int) 37189; - public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = (int) 33347; - public static final int GL_DEBUG_OUTPUT = (int) 37600; - public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS = (int) 33346; - public static final int GL_DEBUG_SEVERITY_HIGH = (int) 37190; - public static final int GL_DEBUG_SEVERITY_LOW = (int) 37192; - public static final int GL_DEBUG_SEVERITY_MEDIUM = (int) 37191; - public static final int GL_DEBUG_SEVERITY_NOTIFICATION = (int) 33387; - public static final int GL_DEBUG_SOURCE_API = (int) 33350; - public static final int GL_DEBUG_SOURCE_APPLICATION = (int) 33354; - public static final int GL_DEBUG_SOURCE_OTHER = (int) 33355; - public static final int GL_DEBUG_SOURCE_SHADER_COMPILER = (int) 33352; - public static final int GL_DEBUG_SOURCE_THIRD_PARTY = (int) 33353; - public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM = (int) 33351; - public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = (int) 33357; - public static final int GL_DEBUG_TYPE_ERROR = (int) 33356; - public static final int GL_DEBUG_TYPE_MARKER = (int) 33384; - public static final int GL_DEBUG_TYPE_OTHER = (int) 33361; - public static final int GL_DEBUG_TYPE_PERFORMANCE = (int) 33360; - public static final int GL_DEBUG_TYPE_POP_GROUP = (int) 33386; - public static final int GL_DEBUG_TYPE_PORTABILITY = (int) 33359; - public static final int GL_DEBUG_TYPE_PUSH_GROUP = (int) 33385; - public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = (int) 33358; - public static final int GL_DISPLAY_LIST = (int) 33511; - public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH = (int) 33388; - public static final int GL_MAX_DEBUG_LOGGED_MESSAGES = (int) 37188; - public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = (int) 37187; - public static final int GL_MAX_LABEL_LENGTH = (int) 33512; - public static final int GL_PROGRAM = (int) 33506; - public static final int GL_PROGRAM_PIPELINE = (int) 33508; - public static final int GL_QUERY = (int) 33507; - public static final int GL_SAMPLER = (int) 33510; - public static final int GL_SHADER = (int) 33505; - - public static void glDebugMessageControl(int source, int type, int severity, java.nio.IntBuffer ids, - boolean enabled) { - org.lwjgl3.opengl.KHRDebug.glDebugMessageControl(source, type, severity, ids, enabled); - } - - public static void glDebugMessageInsert(int source, int type, int id, int severity, java.lang.CharSequence buf) { - org.lwjgl3.opengl.KHRDebug.glDebugMessageInsert(source, type, id, severity, buf); - } - - public static void glDebugMessageInsert(int source, int type, int id, int severity, java.nio.ByteBuffer buf) { - org.lwjgl3.opengl.KHRDebug.glDebugMessageInsert(source, type, id, severity, buf); - } - - public static int glGetDebugMessageLog(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, - java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, - java.nio.ByteBuffer messageLog) { - return org.lwjgl3.opengl.KHRDebug - .glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); - } - - public static java.lang.String glGetObjectLabel(int identifier, int name, int bufSize) { - return org.lwjgl3.opengl.KHRDebug.glGetObjectLabel(identifier, name, bufSize); - } - - public static void glGetObjectLabel(int identifier, int name, java.nio.IntBuffer length, - java.nio.ByteBuffer label) { - org.lwjgl3.opengl.KHRDebug.glGetObjectLabel(identifier, name, length, label); - } - - public static void glObjectLabel(int identifier, int name, java.lang.CharSequence label) { - org.lwjgl3.opengl.KHRDebug.glObjectLabel(identifier, name, label); - } - - public static void glObjectLabel(int identifier, int name, java.nio.ByteBuffer label) { - org.lwjgl3.opengl.KHRDebug.glObjectLabel(identifier, name, label); - } - - public static void glPopDebugGroup() { - org.lwjgl3.opengl.KHRDebug.glPopDebugGroup(); - } - - public static void glPushDebugGroup(int source, int id, java.lang.CharSequence message) { - org.lwjgl3.opengl.KHRDebug.glPushDebugGroup(source, id, message); - } - - public static void glPushDebugGroup(int source, int id, java.nio.ByteBuffer message) { - org.lwjgl3.opengl.KHRDebug.glPushDebugGroup(source, id, message); - } -} diff --git a/src/main/java/org/lwjgl/opengl/KHRDebugCallback.java b/src/main/java/org/lwjgl/opengl/KHRDebugCallback.java deleted file mode 100644 index 1c42ffd0e..000000000 --- a/src/main/java/org/lwjgl/opengl/KHRDebugCallback.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * 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. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.PointerWrapperAbstract; - -/** - * Instances of this class are needed to use the callback functionality of the KHR_debug extension. - * Users of this class may provide implementations of the {@code Handler} interface to receive notifications. - * The same {@code Handler} instance may be used by different contexts but it is not recommended. - * Handler notifications are synchronized. - * - * @author Spasi - */ -public final class KHRDebugCallback extends PointerWrapperAbstract { - - /** Severity levels. */ - private static final int - GL_DEBUG_SEVERITY_HIGH = 0x9146, - GL_DEBUG_SEVERITY_MEDIUM = 0x9147, - GL_DEBUG_SEVERITY_LOW = 0x9148, - GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; - - /** Sources. */ - private static final int - GL_DEBUG_SOURCE_API = 0x8246, - GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, - GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, - GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, - GL_DEBUG_SOURCE_APPLICATION = 0x824A, - GL_DEBUG_SOURCE_OTHER = 0x824B; - - /** Types. */ - private static final int - GL_DEBUG_TYPE_ERROR = 0x824C, - GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, - GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, - GL_DEBUG_TYPE_PORTABILITY = 0x824F, - GL_DEBUG_TYPE_PERFORMANCE = 0x8250, - GL_DEBUG_TYPE_OTHER = 0x8251, - GL_DEBUG_TYPE_MARKER = 0x8268; - - private static final long CALLBACK_POINTER; - - static { - long pointer = 0; - try { - // Call reflectively so that we can compile this class for the Generator. - pointer = (Long)Class.forName("org.lwjgl.opengl.CallbackUtil").getDeclaredMethod("getDebugCallbackKHR").invoke(null); - } catch (Exception e) { - // ignore - } - CALLBACK_POINTER = pointer; - } - - private final Handler handler; - - /** - * Creates an KHRebugCallback with a default callback handler. - * The default handler will simply print the message on System.err. - */ - public KHRDebugCallback() { - this(new Handler() { - public void handleMessage(final int source, final int type, final int id, final int severity, final String message) { - System.err.println("[LWJGL] KHR_debug message"); - System.err.println("\tID: " + id); - - String description; - switch ( source ) { - case GL_DEBUG_SOURCE_API: - description = "API"; - break; - case GL_DEBUG_SOURCE_WINDOW_SYSTEM: - description = "WINDOW SYSTEM"; - break; - case GL_DEBUG_SOURCE_SHADER_COMPILER: - description = "SHADER COMPILER"; - break; - case GL_DEBUG_SOURCE_THIRD_PARTY: - description = "THIRD PARTY"; - break; - case GL_DEBUG_SOURCE_APPLICATION: - description = "APPLICATION"; - break; - case GL_DEBUG_SOURCE_OTHER: - description = "OTHER"; - break; - default: - description = printUnknownToken(source); - } - System.err.println("\tSource: " + description); - - switch ( type ) { - case GL_DEBUG_TYPE_ERROR: - description = "ERROR"; - break; - case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: - description = "DEPRECATED BEHAVIOR"; - break; - case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: - description = "UNDEFINED BEHAVIOR"; - break; - case GL_DEBUG_TYPE_PORTABILITY: - description = "PORTABILITY"; - break; - case GL_DEBUG_TYPE_PERFORMANCE: - description = "PERFORMANCE"; - break; - case GL_DEBUG_TYPE_OTHER: - description = "OTHER"; - break; - case GL_DEBUG_TYPE_MARKER: - description = "MARKER"; - break; - default: - description = printUnknownToken(type); - } - System.err.println("\tType: " + description); - - switch ( severity ) { - case GL_DEBUG_SEVERITY_HIGH: - description = "HIGH"; - break; - case GL_DEBUG_SEVERITY_MEDIUM: - description = "MEDIUM"; - break; - case GL_DEBUG_SEVERITY_LOW: - description = "LOW"; - break; - case GL_DEBUG_SEVERITY_NOTIFICATION: - description = "NOTIFICATION"; - break; - default: - description = printUnknownToken(severity); - } - System.err.println("\tSeverity: " + description); - - System.err.println("\tMessage: " + message); - } - - private String printUnknownToken(final int token) { - return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")"; - } - }); - } - - /** - * Creates an ARBDebugOutputCallback with the specified callback handler. - * The handler's {@code handleMessage} method will be called whenever - * debug output is generated by the GL. - * - * @param handler the callback handler - */ - public KHRDebugCallback(final Handler handler) { - super(CALLBACK_POINTER); - - this.handler = handler; - } - - Handler getHandler() { - return handler; - } - - /** Implementations of this interface can be used to receive ARB_debug_output notifications. */ - public interface Handler { - - /** - * This method will be called when an ARB_debug_output message is generated. - * - * @param source the message source - * @param type the message type - * @param id the message ID - * @param severity the message severity - * @param message the string representation of the message. - */ - void handleMessage(int source, int type, int id, int severity, String message); - - } - -} \ No newline at end of file diff --git a/src/main/java/org/lwjgl/opengl/KHRRobustness.java b/src/main/java/org/lwjgl/opengl/KHRRobustness.java deleted file mode 100644 index 0906b6358..000000000 --- a/src/main/java/org/lwjgl/opengl/KHRRobustness.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.lwjgl.opengl; - -public class KHRRobustness { - - public static final int GL_CONTEXT_LOST = (int) 1287; - public static final int GL_CONTEXT_ROBUST_ACCESS = (int) 37107; - public static final int GL_GUILTY_CONTEXT_RESET = (int) 33363; - public static final int GL_INNOCENT_CONTEXT_RESET = (int) 33364; - public static final int GL_LOSE_CONTEXT_ON_RESET = (int) 33362; - public static final int GL_NO_RESET_NOTIFICATION = (int) 33377; - public static final int GL_RESET_NOTIFICATION_STRATEGY = (int) 33366; - public static final int GL_UNKNOWN_CONTEXT_RESET = (int) 33365; - - public static int glGetGraphicsResetStatus() { - return org.lwjgl3.opengl.KHRRobustness.glGetGraphicsResetStatus(); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, int pixels_bufSize, - long pixels_buffer_offset) { - org.lwjgl3.opengl.KHRRobustness - .glReadnPixels(x, y, width, height, format, type, pixels_bufSize, pixels_buffer_offset); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.ByteBuffer pixels) { - org.lwjgl3.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.FloatBuffer pixels) { - org.lwjgl3.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.IntBuffer pixels) { - org.lwjgl3.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); - } - - public static void glReadnPixels(int x, int y, int width, int height, int format, int type, - java.nio.ShortBuffer pixels) { - org.lwjgl3.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java b/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java deleted file mode 100644 index 9de6d78fa..000000000 --- a/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.lwjgl.opengl; - -public class NVBindlessMultiDrawIndirect { - - public static void glMultiDrawArraysIndirectBindlessNV(int mode, long indirect_buffer_offset, int drawCount, - int stride, int vertexBufferCount) { - org.lwjgl3.opengl.NVBindlessMultiDrawIndirect.glMultiDrawArraysIndirectBindlessNV( - mode, - indirect_buffer_offset, - drawCount, - stride, - vertexBufferCount); - } - - public static void glMultiDrawArraysIndirectBindlessNV(int mode, java.nio.ByteBuffer indirect, int drawCount, - int stride, int vertexBufferCount) { - org.lwjgl3.opengl.NVBindlessMultiDrawIndirect - .glMultiDrawArraysIndirectBindlessNV(mode, indirect, drawCount, stride, vertexBufferCount); - } - - public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect_buffer_offset, - int drawCount, int stride, int vertexBufferCount) { - org.lwjgl3.opengl.NVBindlessMultiDrawIndirect.glMultiDrawElementsIndirectBindlessNV( - mode, - type, - indirect_buffer_offset, - drawCount, - stride, - vertexBufferCount); - } - - public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, java.nio.ByteBuffer indirect, - int drawCount, int stride, int vertexBufferCount) { - org.lwjgl3.opengl.NVBindlessMultiDrawIndirect - .glMultiDrawElementsIndirectBindlessNV(mode, type, indirect, drawCount, stride, vertexBufferCount); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVBindlessTexture.java b/src/main/java/org/lwjgl/opengl/NVBindlessTexture.java deleted file mode 100644 index d3ba28402..000000000 --- a/src/main/java/org/lwjgl/opengl/NVBindlessTexture.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.lwjgl.opengl; - -public class NVBindlessTexture { - - public static long glGetImageHandleNV(int texture, int level, boolean layered, int layer, int format) { - return org.lwjgl3.opengl.NVBindlessTexture.glGetImageHandleNV(texture, level, layered, layer, format); - } - - public static long glGetTextureHandleNV(int texture) { - return org.lwjgl3.opengl.NVBindlessTexture.glGetTextureHandleNV(texture); - } - - public static long glGetTextureSamplerHandleNV(int texture, int sampler) { - return org.lwjgl3.opengl.NVBindlessTexture.glGetTextureSamplerHandleNV(texture, sampler); - } - - public static boolean glIsImageHandleResidentNV(long handle) { - return org.lwjgl3.opengl.NVBindlessTexture.glIsImageHandleResidentNV(handle); - } - - public static boolean glIsTextureHandleResidentNV(long handle) { - return org.lwjgl3.opengl.NVBindlessTexture.glIsTextureHandleResidentNV(handle); - } - - public static void glMakeImageHandleNonResidentNV(long handle) { - org.lwjgl3.opengl.NVBindlessTexture.glMakeImageHandleNonResidentNV(handle); - } - - public static void glMakeImageHandleResidentNV(long handle, int access) { - org.lwjgl3.opengl.NVBindlessTexture.glMakeImageHandleResidentNV(handle, access); - } - - public static void glMakeTextureHandleNonResidentNV(long handle) { - org.lwjgl3.opengl.NVBindlessTexture.glMakeTextureHandleNonResidentNV(handle); - } - - public static void glMakeTextureHandleResidentNV(long handle) { - org.lwjgl3.opengl.NVBindlessTexture.glMakeTextureHandleResidentNV(handle); - } - - public static void glProgramUniformHandleuNV(int program, int location, java.nio.LongBuffer values) { - org.lwjgl3.opengl.NVBindlessTexture.glProgramUniformHandleui64vNV(program, location, values); - } - - public static void glProgramUniformHandleui64NV(int program, int location, long value) { - org.lwjgl3.opengl.NVBindlessTexture.glProgramUniformHandleui64NV(program, location, value); - } - - public static void glUniformHandleuNV(int location, java.nio.LongBuffer value) { - org.lwjgl3.opengl.NVBindlessTexture.glUniformHandleui64vNV(location, value); - } - - public static void glUniformHandleui64NV(int location, long value) { - org.lwjgl3.opengl.NVBindlessTexture.glUniformHandleui64NV(location, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvanced.java b/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvanced.java deleted file mode 100644 index ee973d486..000000000 --- a/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvanced.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.lwjgl.opengl; - -public class NVBlendEquationAdvanced { - - public static final int GL_BLEND_ADVANCED_COHERENT_NV = (int) 37509; - public static final int GL_BLEND_OVERLAP_NV = (int) 37505; - public static final int GL_BLEND_PREMULTIPLIED_SRC_NV = (int) 37504; - public static final int GL_COLORBURN_NV = (int) 37530; - public static final int GL_COLORDODGE_NV = (int) 37529; - public static final int GL_CONJOINT_NV = (int) 37508; - public static final int GL_CONTRAST_NV = (int) 37537; - public static final int GL_DARKEN_NV = (int) 37527; - public static final int GL_DIFFERENCE_NV = (int) 37534; - public static final int GL_DISJOINT_NV = (int) 37507; - public static final int GL_DST_ATOP_NV = (int) 37519; - public static final int GL_DST_IN_NV = (int) 37515; - public static final int GL_DST_NV = (int) 37511; - public static final int GL_DST_OUT_NV = (int) 37517; - public static final int GL_DST_OVER_NV = (int) 37513; - public static final int GL_EXCLUSION_NV = (int) 37536; - public static final int GL_HARDLIGHT_NV = (int) 37531; - public static final int GL_HARDMIX_NV = (int) 37545; - public static final int GL_HSL_COLOR_NV = (int) 37551; - public static final int GL_HSL_HUE_NV = (int) 37549; - public static final int GL_HSL_LUMINOSITY_NV = (int) 37552; - public static final int GL_HSL_SATURATION_NV = (int) 37550; - public static final int GL_INVERT_OVG_NV = (int) 37556; - public static final int GL_INVERT_RGB_NV = (int) 37539; - public static final int GL_LIGHTEN_NV = (int) 37528; - public static final int GL_LINEARBURN_NV = (int) 37541; - public static final int GL_LINEARDODGE_NV = (int) 37540; - public static final int GL_LINEARLIGHT_NV = (int) 37543; - public static final int GL_MINUS_CLAMPED_NV = (int) 37555; - public static final int GL_MINUS_NV = (int) 37535; - public static final int GL_MULTIPLY_NV = (int) 37524; - public static final int GL_OVERLAY_NV = (int) 37526; - public static final int GL_PINLIGHT_NV = (int) 37544; - public static final int GL_PLUS_CLAMPED_ALPHA_NV = (int) 37554; - public static final int GL_PLUS_CLAMPED_NV = (int) 37553; - public static final int GL_PLUS_DARKER_NV = (int) 37522; - public static final int GL_PLUS_NV = (int) 37521; - public static final int GL_SCREEN_NV = (int) 37525; - public static final int GL_SOFTLIGHT_NV = (int) 37532; - public static final int GL_SRC_ATOP_NV = (int) 37518; - public static final int GL_SRC_IN_NV = (int) 37514; - public static final int GL_SRC_NV = (int) 37510; - public static final int GL_SRC_OUT_NV = (int) 37516; - public static final int GL_SRC_OVER_NV = (int) 37512; - public static final int GL_UNCORRELATED_NV = (int) 37506; - public static final int GL_VIVIDLIGHT_NV = (int) 37542; - - public static void glBlendBarrierNV() { - org.lwjgl3.opengl.NVBlendEquationAdvanced.glBlendBarrierNV(); - } - - public static void glBlendParameteriNV(int pname, int value) { - org.lwjgl3.opengl.NVBlendEquationAdvanced.glBlendParameteriNV(pname, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVConditionalRender.java b/src/main/java/org/lwjgl/opengl/NVConditionalRender.java deleted file mode 100644 index 4668275c8..000000000 --- a/src/main/java/org/lwjgl/opengl/NVConditionalRender.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.lwjgl.opengl; - -public class NVConditionalRender { - - public static final int GL_QUERY_BY_REGION_NO_WAIT_NV = (int) 36374; - public static final int GL_QUERY_BY_REGION_WAIT_NV = (int) 36373; - public static final int GL_QUERY_NO_WAIT_NV = (int) 36372; - public static final int GL_QUERY_WAIT_NV = (int) 36371; - - public static void glBeginConditionalRenderNV(int id, int mode) { - org.lwjgl3.opengl.NVConditionalRender.glBeginConditionalRenderNV(id, mode); - } - - public static void glEndConditionalRenderNV() { - org.lwjgl3.opengl.NVConditionalRender.glEndConditionalRenderNV(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVCopyDepthToColor.java b/src/main/java/org/lwjgl/opengl/NVCopyDepthToColor.java deleted file mode 100644 index 7c7add0b2..000000000 --- a/src/main/java/org/lwjgl/opengl/NVCopyDepthToColor.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class NVCopyDepthToColor { - - public static final int GL_DEPTH_STENCIL_TO_BGRA_NV = (int) 34927; - public static final int GL_DEPTH_STENCIL_TO_RGBA_NV = (int) 34926; -} diff --git a/src/main/java/org/lwjgl/opengl/NVCopyImage.java b/src/main/java/org/lwjgl/opengl/NVCopyImage.java deleted file mode 100644 index de8b7c4c7..000000000 --- a/src/main/java/org/lwjgl/opengl/NVCopyImage.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.lwjgl.opengl; - -public class NVCopyImage { - - public static void glCopyImageSubDataNV(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, - int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int width, int height, int depth) { - org.lwjgl3.opengl.NVCopyImage.glCopyImageSubDataNV( - srcName, - srcTarget, - srcLevel, - srcX, - srcY, - srcZ, - dstName, - dstTarget, - dstLevel, - dstX, - dstY, - dstZ, - width, - height, - depth); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVDeepTexture3D.java b/src/main/java/org/lwjgl/opengl/NVDeepTexture3D.java deleted file mode 100644 index 5d7308f53..000000000 --- a/src/main/java/org/lwjgl/opengl/NVDeepTexture3D.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class NVDeepTexture3D { - - public static final int GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV = (int) 37073; - public static final int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = (int) 37072; -} diff --git a/src/main/java/org/lwjgl/opengl/NVDepthBufferFloat.java b/src/main/java/org/lwjgl/opengl/NVDepthBufferFloat.java deleted file mode 100644 index 6e1cf8c82..000000000 --- a/src/main/java/org/lwjgl/opengl/NVDepthBufferFloat.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.lwjgl.opengl; - -public class NVDepthBufferFloat { - - public static final int GL_DEPTH32F_STENCIL8_NV = (int) 36268; - public static final int GL_DEPTH_BUFFER_FLOAT_MODE_NV = (int) 36271; - public static final int GL_DEPTH_COMPONENT32F_NV = (int) 36267; - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV = (int) 36269; - - public static void glClearDepthdNV(double d) { - org.lwjgl3.opengl.NVDepthBufferFloat.glClearDepthdNV(d); - } - - public static void glDepthBoundsdNV(double zmin, double zmax) { - org.lwjgl3.opengl.NVDepthBufferFloat.glDepthBoundsdNV(zmin, zmax); - } - - public static void glDepthRangedNV(double n, double f) { - org.lwjgl3.opengl.NVDepthBufferFloat.glDepthRangedNV(n, f); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVDepthClamp.java b/src/main/java/org/lwjgl/opengl/NVDepthClamp.java deleted file mode 100644 index 3bb9067d2..000000000 --- a/src/main/java/org/lwjgl/opengl/NVDepthClamp.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class NVDepthClamp { - - public static final int GL_DEPTH_CLAMP_NV = (int) 34383; -} diff --git a/src/main/java/org/lwjgl/opengl/NVDrawTexture.java b/src/main/java/org/lwjgl/opengl/NVDrawTexture.java deleted file mode 100644 index da65f7a1d..000000000 --- a/src/main/java/org/lwjgl/opengl/NVDrawTexture.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.lwjgl.opengl; - -public class NVDrawTexture { - - public static void glDrawTextureNV(int texture, int sampler, float x0, float y0, float x1, float y1, float z, - float s0, float t0, float s1, float t1) { - org.lwjgl3.opengl.NVDrawTexture.glDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVExplicitMultisample.java b/src/main/java/org/lwjgl/opengl/NVExplicitMultisample.java deleted file mode 100644 index 51d16389e..000000000 --- a/src/main/java/org/lwjgl/opengl/NVExplicitMultisample.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.lwjgl.opengl; - -public class NVExplicitMultisample { - - public static final int GL_INT_SAMPLER_RENDERBUFFER_NV = (int) 36439; - public static final int GL_MAX_SAMPLE_MASK_WORDS_NV = (int) 36441; - public static final int GL_SAMPLER_RENDERBUFFER_NV = (int) 36438; - public static final int GL_SAMPLE_MASK_NV = (int) 36433; - public static final int GL_SAMPLE_MASK_VALUE_NV = (int) 36434; - public static final int GL_SAMPLE_POSITION_NV = (int) 36432; - public static final int GL_TEXTURE_BINDING_RENDERBUFFER_NV = (int) 36435; - public static final int GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = (int) 36436; - public static final int GL_TEXTURE_RENDERBUFFER_NV = (int) 36437; - public static final int GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = (int) 36440; - - public static void glGetMultisampleNV(int pname, int index, java.nio.FloatBuffer val) { - org.lwjgl3.opengl.NVExplicitMultisample.glGetMultisamplefvNV(pname, index, val); - } - - public static void glSampleMaskIndexedNV(int index, int mask) { - org.lwjgl3.opengl.NVExplicitMultisample.glSampleMaskIndexedNV(index, mask); - } - - public static void glTexRenderbufferNV(int target, int renderbuffer) { - org.lwjgl3.opengl.NVExplicitMultisample.glTexRenderbufferNV(target, renderbuffer); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVFence.java b/src/main/java/org/lwjgl/opengl/NVFence.java deleted file mode 100644 index b412d14f3..000000000 --- a/src/main/java/org/lwjgl/opengl/NVFence.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.lwjgl.opengl; - -public class NVFence { - - public static final int GL_ALL_COMPLETED_NV = (int) 34034; - public static final int GL_FENCE_CONDITION_NV = (int) 34036; - public static final int GL_FENCE_STATUS_NV = (int) 34035; - - public static void glDeleteFencesNV(int fence) { - org.lwjgl3.opengl.NVFence.glDeleteFencesNV(fence); - } - - public static void glDeleteFencesNV(java.nio.IntBuffer piFences) { - org.lwjgl3.opengl.NVFence.glDeleteFencesNV(piFences); - } - - public static void glFinishFenceNV(int fence) { - org.lwjgl3.opengl.NVFence.glFinishFenceNV(fence); - } - - public static int glGenFencesNV() { - return org.lwjgl3.opengl.NVFence.glGenFencesNV(); - } - - public static void glGenFencesNV(java.nio.IntBuffer piFences) { - org.lwjgl3.opengl.NVFence.glGenFencesNV(piFences); - } - - public static void glGetFenceivNV(int fence, int pname, java.nio.IntBuffer piParams) { - org.lwjgl3.opengl.NVFence.glGetFenceivNV(fence, pname, piParams); - } - - public static boolean glIsFenceNV(int fence) { - return org.lwjgl3.opengl.NVFence.glIsFenceNV(fence); - } - - public static void glSetFenceNV(int fence, int condition) { - org.lwjgl3.opengl.NVFence.glSetFenceNV(fence, condition); - } - - public static boolean glTestFenceNV(int fence) { - return org.lwjgl3.opengl.NVFence.glTestFenceNV(fence); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVFloatBuffer.java b/src/main/java/org/lwjgl/opengl/NVFloatBuffer.java deleted file mode 100644 index bbd74300b..000000000 --- a/src/main/java/org/lwjgl/opengl/NVFloatBuffer.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class NVFloatBuffer { - - public static final int GL_FLOAT_CLEAR_COLOR_VALUE_NV = (int) 34957; - public static final int GL_FLOAT_R16_NV = (int) 34948; - public static final int GL_FLOAT_R32_NV = (int) 34949; - public static final int GL_FLOAT_RG16_NV = (int) 34950; - public static final int GL_FLOAT_RG32_NV = (int) 34951; - public static final int GL_FLOAT_RGB16_NV = (int) 34952; - public static final int GL_FLOAT_RGB32_NV = (int) 34953; - public static final int GL_FLOAT_RGBA16_NV = (int) 34954; - public static final int GL_FLOAT_RGBA32_NV = (int) 34955; - public static final int GL_FLOAT_RGBA_MODE_NV = (int) 34958; - public static final int GL_FLOAT_RGBA_NV = (int) 34947; - public static final int GL_FLOAT_RGB_NV = (int) 34946; - public static final int GL_FLOAT_RG_NV = (int) 34945; - public static final int GL_FLOAT_R_NV = (int) 34944; - public static final int GL_TEXTURE_FLOAT_COMPONENTS_NV = (int) 34956; -} diff --git a/src/main/java/org/lwjgl/opengl/NVFogDistance.java b/src/main/java/org/lwjgl/opengl/NVFogDistance.java deleted file mode 100644 index 9d40551bb..000000000 --- a/src/main/java/org/lwjgl/opengl/NVFogDistance.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class NVFogDistance { - - public static final int GL_EYE_PLANE_ABSOLUTE_NV = (int) 34140; - public static final int GL_EYE_RADIAL_NV = (int) 34139; - public static final int GL_FOG_DISTANCE_MODE_NV = (int) 34138; -} diff --git a/src/main/java/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java b/src/main/java/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java deleted file mode 100644 index 04d929bda..000000000 --- a/src/main/java/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.lwjgl.opengl; - -public class NVFramebufferMultisampleCoverage { - - public static final int GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV = (int) 36369; - public static final int GL_MULTISAMPLE_COVERAGE_MODES_NV = (int) 36370; - public static final int GL_RENDERBUFFER_COLOR_SAMPLES_NV = (int) 36368; - public static final int GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = (int) 36011; - - public static void glRenderbufferStorageMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, - int internalformat, int width, int height) { - org.lwjgl3.opengl.NVFramebufferMultisampleCoverage.glRenderbufferStorageMultisampleCoverageNV( - target, - coverageSamples, - colorSamples, - internalformat, - width, - height); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVHalfFloat.java b/src/main/java/org/lwjgl/opengl/NVHalfFloat.java deleted file mode 100644 index cba6cfe1e..000000000 --- a/src/main/java/org/lwjgl/opengl/NVHalfFloat.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.lwjgl.opengl; - -public class NVHalfFloat { - - public static final int GL_HALF_FLOAT_NV = (int) 5131; - - public static void glColor3hNV(short red, short green, short blue) { - org.lwjgl3.opengl.NVHalfFloat.glColor3hNV(red, green, blue); - } - - public static void glColor4hNV(short red, short green, short blue, short alpha) { - org.lwjgl3.opengl.NVHalfFloat.glColor4hNV(red, green, blue, alpha); - } - - public static void glFogCoordhNV(short fog) { - org.lwjgl3.opengl.NVHalfFloat.glFogCoordhNV(fog); - } - - public static void glMultiTexCoord1hNV(int target, short s) { - org.lwjgl3.opengl.NVHalfFloat.glMultiTexCoord1hNV(target, s); - } - - public static void glMultiTexCoord2hNV(int target, short s, short t) { - org.lwjgl3.opengl.NVHalfFloat.glMultiTexCoord2hNV(target, s, t); - } - - public static void glMultiTexCoord3hNV(int target, short s, short t, short r) { - org.lwjgl3.opengl.NVHalfFloat.glMultiTexCoord3hNV(target, s, t, r); - } - - public static void glMultiTexCoord4hNV(int target, short s, short t, short r, short q) { - org.lwjgl3.opengl.NVHalfFloat.glMultiTexCoord4hNV(target, s, t, r, q); - } - - public static void glNormal3hNV(short nx, short ny, short nz) { - org.lwjgl3.opengl.NVHalfFloat.glNormal3hNV(nx, ny, nz); - } - - public static void glSecondaryColor3hNV(short red, short green, short blue) { - org.lwjgl3.opengl.NVHalfFloat.glSecondaryColor3hNV(red, green, blue); - } - - public static void glTexCoord1hNV(short s) { - org.lwjgl3.opengl.NVHalfFloat.glTexCoord1hNV(s); - } - - public static void glTexCoord2hNV(short s, short t) { - org.lwjgl3.opengl.NVHalfFloat.glTexCoord2hNV(s, t); - } - - public static void glTexCoord3hNV(short s, short t, short r) { - org.lwjgl3.opengl.NVHalfFloat.glTexCoord3hNV(s, t, r); - } - - public static void glTexCoord4hNV(short s, short t, short r, short q) { - org.lwjgl3.opengl.NVHalfFloat.glTexCoord4hNV(s, t, r, q); - } - - public static void glVertex2hNV(short x, short y) { - org.lwjgl3.opengl.NVHalfFloat.glVertex2hNV(x, y); - } - - public static void glVertex3hNV(short x, short y, short z) { - org.lwjgl3.opengl.NVHalfFloat.glVertex3hNV(x, y, z); - } - - public static void glVertex4hNV(short x, short y, short z, short w) { - org.lwjgl3.opengl.NVHalfFloat.glVertex4hNV(x, y, z, w); - } - - public static void glVertexAttrib1hNV(int index, short x) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttrib1hNV(index, x); - } - - public static void glVertexAttrib2hNV(int index, short x, short y) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttrib2hNV(index, x, y); - } - - public static void glVertexAttrib3hNV(int index, short x, short y, short z) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttrib3hNV(index, x, y, z); - } - - public static void glVertexAttrib4hNV(int index, short x, short y, short z, short w) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttrib4hNV(index, x, y, z, w); - } - - public static void glVertexAttribs1NV(int index, java.nio.ShortBuffer attribs) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttribs1hvNV(index, attribs); - } - - public static void glVertexAttribs2NV(int index, java.nio.ShortBuffer attribs) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttribs2hvNV(index, attribs); - } - - public static void glVertexAttribs3NV(int index, java.nio.ShortBuffer attribs) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttribs3hvNV(index, attribs); - } - - public static void glVertexAttribs4NV(int index, java.nio.ShortBuffer attribs) { - org.lwjgl3.opengl.NVHalfFloat.glVertexAttribs4hvNV(index, attribs); - } - - public static void glVertexWeighthNV(short weight) { - org.lwjgl3.opengl.NVHalfFloat.glVertexWeighthNV(weight); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVLightMaxExponent.java b/src/main/java/org/lwjgl/opengl/NVLightMaxExponent.java deleted file mode 100644 index c1f41b3e4..000000000 --- a/src/main/java/org/lwjgl/opengl/NVLightMaxExponent.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class NVLightMaxExponent { - - public static final int GL_MAX_SHININESS_NV = (int) 34052; - public static final int GL_MAX_SPOT_EXPONENT_NV = (int) 34053; -} diff --git a/src/main/java/org/lwjgl/opengl/NVMultisampleCoverage.java b/src/main/java/org/lwjgl/opengl/NVMultisampleCoverage.java deleted file mode 100644 index 7e72f091e..000000000 --- a/src/main/java/org/lwjgl/opengl/NVMultisampleCoverage.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class NVMultisampleCoverage { - - public static final int GL_COLOR_SAMPLES_NV = (int) 36384; - public static final int GL_COVERAGE_SAMPLES_NV = (int) 32937; -} diff --git a/src/main/java/org/lwjgl/opengl/NVMultisampleFilterHint.java b/src/main/java/org/lwjgl/opengl/NVMultisampleFilterHint.java deleted file mode 100644 index 53e7e88ac..000000000 --- a/src/main/java/org/lwjgl/opengl/NVMultisampleFilterHint.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class NVMultisampleFilterHint { - - public static final int GL_MULTISAMPLE_FILTER_HINT_NV = (int) 34100; -} diff --git a/src/main/java/org/lwjgl/opengl/NVPackedDepthStencil.java b/src/main/java/org/lwjgl/opengl/NVPackedDepthStencil.java deleted file mode 100644 index 94657f289..000000000 --- a/src/main/java/org/lwjgl/opengl/NVPackedDepthStencil.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class NVPackedDepthStencil { - - public static final int GL_DEPTH_STENCIL_NV = (int) 34041; - public static final int GL_UNSIGNED_INT_24_8_NV = (int) 34042; -} diff --git a/src/main/java/org/lwjgl/opengl/NVPathRendering.java b/src/main/java/org/lwjgl/opengl/NVPathRendering.java deleted file mode 100644 index bd6aa37b8..000000000 --- a/src/main/java/org/lwjgl/opengl/NVPathRendering.java +++ /dev/null @@ -1,405 +0,0 @@ -package org.lwjgl.opengl; - -public class NVPathRendering { - - public static final int GL_ACCUM_ADJACENT_PAIRS_NV = (int) 37037; - public static final int GL_ADJACENT_PAIRS_NV = (int) 37038; - public static final int GL_AFFINE_2D_NV = (int) 37010; - public static final int GL_AFFINE_3D_NV = (int) 37012; - public static final int GL_ARC_TO_NV = (int) 254; - public static final int GL_BEVEL_NV = (int) 37030; - public static final int GL_BOLD_BIT_NV = (int) 1; - public static final int GL_BOUNDING_BOX_NV = (int) 37005; - public static final int GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV = (int) 37020; - public static final int GL_CIRCULAR_CCW_ARC_TO_NV = (int) 248; - public static final int GL_CIRCULAR_CW_ARC_TO_NV = (int) 250; - public static final int GL_CIRCULAR_TANGENT_ARC_TO_NV = (int) 252; - public static final int GL_CLOSE_PATH_NV = (int) 0; - public static final int GL_CONVEX_HULL_NV = (int) 37003; - public static final int GL_COUNT_DOWN_NV = (int) 37001; - public static final int GL_COUNT_UP_NV = (int) 37000; - public static final int GL_CUBIC_CURVE_TO_NV = (int) 12; - public static final int GL_FILE_NAME_NV = (int) 36980; - public static final int GL_FIRST_TO_REST_NV = (int) 37039; - public static final int GL_FONT_ASCENDER_NV = (int) 2097152; - public static final int GL_FONT_DESCENDER_NV = (int) 4194304; - public static final int GL_FONT_HAS_KERNING_NV = (int) 268435456; - public static final int GL_FONT_HEIGHT_NV = (int) 8388608; - public static final int GL_FONT_MAX_ADVANCE_HEIGHT_NV = (int) 33554432; - public static final int GL_FONT_MAX_ADVANCE_WIDTH_NV = (int) 16777216; - public static final int GL_FONT_UNDERLINE_POSITION_NV = (int) 67108864; - public static final int GL_FONT_UNDERLINE_THICKNESS_NV = (int) 134217728; - public static final int GL_FONT_UNITS_PER_EM_NV = (int) 1048576; - public static final int GL_FONT_X_MAX_BOUNDS_NV = (int) 262144; - public static final int GL_FONT_X_MIN_BOUNDS_NV = (int) 65536; - public static final int GL_FONT_Y_MAX_BOUNDS_NV = (int) 524288; - public static final int GL_FONT_Y_MIN_BOUNDS_NV = (int) 131072; - public static final int GL_GLYPH_HAS_KERNING_NV = (int) 256; - public static final int GL_GLYPH_HEIGHT_BIT_NV = (int) 2; - public static final int GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = (int) 16; - public static final int GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV = (int) 4; - public static final int GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = (int) 8; - public static final int GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = (int) 128; - public static final int GL_GLYPH_VERTICAL_BEARING_X_BIT_NV = (int) 32; - public static final int GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV = (int) 64; - public static final int GL_GLYPH_WIDTH_BIT_NV = (int) 1; - public static final int GL_HORIZONTAL_LINE_TO_NV = (int) 6; - public static final int GL_ITALIC_BIT_NV = (int) 2; - public static final int GL_LARGE_CCW_ARC_TO_NV = (int) 22; - public static final int GL_LARGE_CW_ARC_TO_NV = (int) 24; - public static final int GL_LINE_TO_NV = (int) 4; - public static final int GL_MITER_REVERT_NV = (int) 37031; - public static final int GL_MITER_TRUNCATE_NV = (int) 37032; - public static final int GL_MOVE_TO_CONTINUES_NV = (int) 37046; - public static final int GL_MOVE_TO_NV = (int) 2; - public static final int GL_MOVE_TO_RESETS_NV = (int) 37045; - public static final int GL_PATH_CLIENT_LENGTH_NV = (int) 36991; - public static final int GL_PATH_COMMAND_COUNT_NV = (int) 37021; - public static final int GL_PATH_COMPUTED_LENGTH_NV = (int) 37024; - public static final int GL_PATH_COORD_COUNT_NV = (int) 37022; - public static final int GL_PATH_COVER_DEPTH_FUNC_NV = (int) 37055; - public static final int GL_PATH_DASH_ARRAY_COUNT_NV = (int) 37023; - public static final int GL_PATH_DASH_CAPS_NV = (int) 36987; - public static final int GL_PATH_DASH_OFFSET_NV = (int) 36990; - public static final int GL_PATH_DASH_OFFSET_RESET_NV = (int) 37044; - public static final int GL_PATH_END_CAPS_NV = (int) 36982; - public static final int GL_PATH_ERROR_POSITION_NV = (int) 37035; - public static final int GL_PATH_FILL_BOUNDING_BOX_NV = (int) 37025; - public static final int GL_PATH_FILL_COVER_MODE_NV = (int) 36994; - public static final int GL_PATH_FILL_MASK_NV = (int) 36993; - public static final int GL_PATH_FILL_MODE_NV = (int) 36992; - public static final int GL_PATH_FOG_GEN_MODE_NV = (int) 37036; - public static final int GL_PATH_FORMAT_PS_NV = (int) 36977; - public static final int GL_PATH_FORMAT_SVG_NV = (int) 36976; - public static final int GL_PATH_GEN_COEFF_NV = (int) 37041; - public static final int GL_PATH_GEN_COLOR_FORMAT_NV = (int) 37042; - public static final int GL_PATH_GEN_COMPONENTS_NV = (int) 37043; - public static final int GL_PATH_GEN_MODE_NV = (int) 37040; - public static final int GL_PATH_INITIAL_DASH_CAP_NV = (int) 36988; - public static final int GL_PATH_INITIAL_END_CAP_NV = (int) 36983; - public static final int GL_PATH_JOIN_STYLE_NV = (int) 36985; - public static final int GL_PATH_MITER_LIMIT_NV = (int) 36986; - public static final int GL_PATH_OBJECT_BOUNDING_BOX_NV = (int) 37002; - public static final int GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = (int) 37053; - public static final int GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = (int) 37054; - public static final int GL_PATH_STENCIL_FUNC_NV = (int) 37047; - public static final int GL_PATH_STENCIL_REF_NV = (int) 37048; - public static final int GL_PATH_STENCIL_VALUE_MASK_NV = (int) 37049; - public static final int GL_PATH_STROKE_BOUNDING_BOX_NV = (int) 37026; - public static final int GL_PATH_STROKE_COVER_MODE_NV = (int) 36995; - public static final int GL_PATH_STROKE_MASK_NV = (int) 36996; - public static final int GL_PATH_STROKE_WIDTH_NV = (int) 36981; - public static final int GL_PATH_TERMINAL_DASH_CAP_NV = (int) 36989; - public static final int GL_PATH_TERMINAL_END_CAP_NV = (int) 36984; - public static final int GL_PRIMARY_COLOR = (int) 34167; - public static final int GL_PRIMARY_COLOR_NV = (int) 34092; - public static final int GL_QUADRATIC_CURVE_TO_NV = (int) 10; - public static final int GL_RELATIVE_ARC_TO_NV = (int) 255; - public static final int GL_RELATIVE_CUBIC_CURVE_TO_NV = (int) 13; - public static final int GL_RELATIVE_HORIZONTAL_LINE_TO_NV = (int) 7; - public static final int GL_RELATIVE_LARGE_CCW_ARC_TO_NV = (int) 23; - public static final int GL_RELATIVE_LARGE_CW_ARC_TO_NV = (int) 25; - public static final int GL_RELATIVE_LINE_TO_NV = (int) 5; - public static final int GL_RELATIVE_MOVE_TO_NV = (int) 3; - public static final int GL_RELATIVE_QUADRATIC_CURVE_TO_NV = (int) 11; - public static final int GL_RELATIVE_SMALL_CCW_ARC_TO_NV = (int) 19; - public static final int GL_RELATIVE_SMALL_CW_ARC_TO_NV = (int) 21; - public static final int GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = (int) 17; - public static final int GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = (int) 15; - public static final int GL_RELATIVE_VERTICAL_LINE_TO_NV = (int) 9; - public static final int GL_ROUND_NV = (int) 37028; - public static final int GL_SECONDARY_COLOR_NV = (int) 34093; - public static final int GL_SKIP_MISSING_GLYPH_NV = (int) 37033; - public static final int GL_SMALL_CCW_ARC_TO_NV = (int) 18; - public static final int GL_SMALL_CW_ARC_TO_NV = (int) 20; - public static final int GL_SMOOTH_CUBIC_CURVE_TO_NV = (int) 16; - public static final int GL_SMOOTH_QUADRATIC_CURVE_TO_NV = (int) 14; - public static final int GL_SQUARE_NV = (int) 37027; - public static final int GL_STANDARD_FONT_NAME_NV = (int) 36978; - public static final int GL_SYSTEM_FONT_NAME_NV = (int) 36979; - public static final int GL_TRANSLATE_2D_NV = (int) 37008; - public static final int GL_TRANSLATE_3D_NV = (int) 37009; - public static final int GL_TRANSLATE_X_NV = (int) 37006; - public static final int GL_TRANSLATE_Y_NV = (int) 37007; - public static final int GL_TRANSPOSE_AFFINE_2D_NV = (int) 37014; - public static final int GL_TRANSPOSE_AFFINE_3D_NV = (int) 37016; - public static final int GL_TRIANGULAR_NV = (int) 37029; - public static final int GL_USE_MISSING_GLYPH_NV = (int) 37034; - public static final int GL_UTF16_NV = (int) 37019; - public static final int GL_UTF8_NV = (int) 37018; - public static final int GL_VERTICAL_LINE_TO_NV = (int) 8; - - public static void glCopyPathNV(int resultPath, int srcPath) { - org.lwjgl3.opengl.NVPathRendering.glCopyPathNV(resultPath, srcPath); - } - - public static void glCoverFillPathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, - int coverMode, int transformType, java.nio.FloatBuffer transformValues) { - org.lwjgl3.opengl.NVPathRendering - .glCoverFillPathInstancedNV(pathNameType, paths, pathBase, coverMode, transformType, transformValues); - } - - public static void glCoverFillPathNV(int path, int coverMode) { - org.lwjgl3.opengl.NVPathRendering.glCoverFillPathNV(path, coverMode); - } - - public static void glCoverStrokePathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, - int coverMode, int transformType, java.nio.FloatBuffer transformValues) { - org.lwjgl3.opengl.NVPathRendering - .glCoverStrokePathInstancedNV(pathNameType, paths, pathBase, coverMode, transformType, transformValues); - } - - public static void glCoverStrokePathNV(int name, int coverMode) { - org.lwjgl3.opengl.NVPathRendering.glCoverStrokePathNV(name, coverMode); - } - - public static void glDeletePathsNV(int path, int range) { - org.lwjgl3.opengl.NVPathRendering.glDeletePathsNV(path, range); - } - - public static int glGenPathsNV(int range) { - return org.lwjgl3.opengl.NVPathRendering.glGenPathsNV(range); - } - - public static void glGetPathColorGenNV(int color, int pname, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glGetPathColorGenfvNV(color, pname, value); - } - - public static void glGetPathColorGenNV(int color, int pname, java.nio.IntBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glGetPathColorGenivNV(color, pname, value); - } - - public static float glGetPathColorGenfNV(int color, int pname) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathColorGenfNV(color, pname); - } - - public static int glGetPathColorGeniNV(int color, int pname) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathColorGeniNV(color, pname); - } - - public static void glGetPathCommandsNV(int name, java.nio.ByteBuffer commands) { - org.lwjgl3.opengl.NVPathRendering.glGetPathCommandsNV(name, commands); - } - - public static void glGetPathCoordsNV(int name, java.nio.FloatBuffer coords) { - org.lwjgl3.opengl.NVPathRendering.glGetPathCoordsNV(name, coords); - } - - public static void glGetPathDashArrayNV(int name, java.nio.FloatBuffer dashArray) { - org.lwjgl3.opengl.NVPathRendering.glGetPathDashArrayNV(name, dashArray); - } - - public static float glGetPathLengthNV(int path, int startSegment, int numSegments) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathLengthNV(path, startSegment, numSegments); - } - - public static void glGetPathMetricRangeNV(int metricQueryMask, int fistPathName, int numPaths, int stride, - java.nio.FloatBuffer metrics) { - org.lwjgl3.opengl.NVPathRendering - .glGetPathMetricRangeNV(metricQueryMask, fistPathName, numPaths, stride, metrics); - } - - public static void glGetPathMetricsNV(int metricQueryMask, int pathNameType, java.nio.ByteBuffer paths, - int pathBase, int stride, java.nio.FloatBuffer metrics) { - org.lwjgl3.opengl.NVPathRendering - .glGetPathMetricsNV(metricQueryMask, pathNameType, paths, pathBase, stride, metrics); - } - - public static void glGetPathParameterNV(int name, int param, java.nio.IntBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glGetPathParameterivNV(name, param, value); - } - - public static float glGetPathParameterfNV(int name, int param) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathParameterfNV(name, param); - } - - public static void glGetPathParameterfvNV(int name, int param, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glGetPathParameterfvNV(name, param, value); - } - - public static int glGetPathParameteriNV(int name, int param) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathParameteriNV(name, param); - } - - public static void glGetPathSpacingNV(int pathListMode, int pathNameType, java.nio.ByteBuffer paths, int pathBase, - float advanceScale, float kerningScale, int transformType, java.nio.FloatBuffer returnedSpacing) { - org.lwjgl3.opengl.NVPathRendering.glGetPathSpacingNV( - pathListMode, - pathNameType, - paths, - pathBase, - advanceScale, - kerningScale, - transformType, - returnedSpacing); - } - - public static void glGetPathTexGenNV(int texCoordSet, int pname, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glGetPathTexGenfvNV(texCoordSet, pname, value); - } - - public static void glGetPathTexGenNV(int texCoordSet, int pname, java.nio.IntBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glGetPathTexGenivNV(texCoordSet, pname, value); - } - - public static float glGetPathTexGenfNV(int texCoordSet, int pname) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathTexGenfNV(texCoordSet, pname); - } - - public static int glGetPathTexGeniNV(int texCoordSet, int pname) { - return org.lwjgl3.opengl.NVPathRendering.glGetPathTexGeniNV(texCoordSet, pname); - } - - public static void glInterpolatePathsNV(int resultPath, int pathA, int pathB, float weight) { - org.lwjgl3.opengl.NVPathRendering.glInterpolatePathsNV(resultPath, pathA, pathB, weight); - } - - public static boolean glIsPathNV(int path) { - return org.lwjgl3.opengl.NVPathRendering.glIsPathNV(path); - } - - public static boolean glIsPointInFillPathNV(int path, int mask, float x, float y) { - return org.lwjgl3.opengl.NVPathRendering.glIsPointInFillPathNV(path, mask, x, y); - } - - public static boolean glIsPointInStrokePathNV(int path, float x, float y) { - return org.lwjgl3.opengl.NVPathRendering.glIsPointInStrokePathNV(path, x, y); - } - - public static void glPathColorGenNV(int color, int genMode, int colorFormat, java.nio.FloatBuffer coeffs) { - org.lwjgl3.opengl.NVPathRendering.glPathColorGenNV(color, genMode, colorFormat, coeffs); - } - - public static void glPathCommandsNV(int path, java.nio.ByteBuffer commands, int coordType, - java.nio.ByteBuffer coords) { - org.lwjgl3.opengl.NVPathRendering.glPathCommandsNV(path, commands, coordType, coords); - } - - public static void glPathCoordsNV(int path, int coordType, java.nio.ByteBuffer coords) { - org.lwjgl3.opengl.NVPathRendering.glPathCoordsNV(path, coordType, coords); - } - - public static void glPathCoverDepthFuncNV(int zfunc) { - org.lwjgl3.opengl.NVPathRendering.glPathCoverDepthFuncNV(zfunc); - } - - public static void glPathDashArrayNV(int path, java.nio.FloatBuffer dashArray) { - org.lwjgl3.opengl.NVPathRendering.glPathDashArrayNV(path, dashArray); - } - - public static void glPathFogGenNV(int genMode) { - org.lwjgl3.opengl.NVPathRendering.glPathFogGenNV(genMode); - } - - public static void glPathGlyphRangeNV(int firstPathName, int fontTarget, java.nio.ByteBuffer fontName, - int fontStyle, int firstGlyph, int numGlyphs, int handleMissingGlyphs, int pathParameterTemplate, - float emScale) { - org.lwjgl3.opengl.NVPathRendering.glPathGlyphRangeNV( - firstPathName, - fontTarget, - fontName, - fontStyle, - firstGlyph, - numGlyphs, - handleMissingGlyphs, - pathParameterTemplate, - emScale); - } - - public static void glPathGlyphsNV(int firstPathName, int fontTarget, java.nio.ByteBuffer fontName, int fontStyle, - int type, java.nio.ByteBuffer charcodes, int handleMissingGlyphs, int pathParameterTemplate, - float emScale) { - org.lwjgl3.opengl.NVPathRendering.glPathGlyphsNV( - firstPathName, - fontTarget, - fontName, - fontStyle, - type, - charcodes, - handleMissingGlyphs, - pathParameterTemplate, - emScale); - } - - public static void glPathParameterNV(int path, int pname, java.nio.FloatBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glPathParameterfvNV(path, pname, value); - } - - public static void glPathParameterNV(int path, int pname, java.nio.IntBuffer value) { - org.lwjgl3.opengl.NVPathRendering.glPathParameterivNV(path, pname, value); - } - - public static void glPathParameterfNV(int path, int pname, float value) { - org.lwjgl3.opengl.NVPathRendering.glPathParameterfNV(path, pname, value); - } - - public static void glPathParameteriNV(int path, int pname, int value) { - org.lwjgl3.opengl.NVPathRendering.glPathParameteriNV(path, pname, value); - } - - public static void glPathStencilFuncNV(int func, int ref, int mask) { - org.lwjgl3.opengl.NVPathRendering.glPathStencilFuncNV(func, ref, mask); - } - - public static void glPathStringNV(int path, int format, java.nio.ByteBuffer pathString) { - org.lwjgl3.opengl.NVPathRendering.glPathStringNV(path, format, pathString); - } - - public static void glPathSubCommandsNV(int path, int commandStart, int commandsToDelete, - java.nio.ByteBuffer commands, int coordType, java.nio.ByteBuffer coords) { - org.lwjgl3.opengl.NVPathRendering - .glPathSubCommandsNV(path, commandStart, commandsToDelete, commands, coordType, coords); - } - - public static void glPathSubCoordsNV(int path, int coordStart, int coordType, java.nio.ByteBuffer coords) { - org.lwjgl3.opengl.NVPathRendering.glPathSubCoordsNV(path, coordStart, coordType, coords); - } - - public static boolean glPointAlongPathNV(int path, int startSegment, int numSegments, float distance, - java.nio.FloatBuffer x, java.nio.FloatBuffer y, java.nio.FloatBuffer tangentX, - java.nio.FloatBuffer tangentY) { - return org.lwjgl3.opengl.NVPathRendering - .glPointAlongPathNV(path, startSegment, numSegments, distance, x, y, tangentX, tangentY); - } - - public static void glStencilFillPathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, - int fillMode, int mask, int transformType, java.nio.FloatBuffer transformValues) { - org.lwjgl3.opengl.NVPathRendering.glStencilFillPathInstancedNV( - pathNameType, - paths, - pathBase, - fillMode, - mask, - transformType, - transformValues); - } - - public static void glStencilFillPathNV(int path, int fillMode, int mask) { - org.lwjgl3.opengl.NVPathRendering.glStencilFillPathNV(path, fillMode, mask); - } - - public static void glStencilStrokePathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, - int reference, int mask, int transformType, java.nio.FloatBuffer transformValues) { - org.lwjgl3.opengl.NVPathRendering.glStencilStrokePathInstancedNV( - pathNameType, - paths, - pathBase, - reference, - mask, - transformType, - transformValues); - } - - public static void glStencilStrokePathNV(int path, int reference, int mask) { - org.lwjgl3.opengl.NVPathRendering.glStencilStrokePathNV(path, reference, mask); - } - - public static void glTransformPathNV(int resultPath, int srcPath, int transformType, - java.nio.FloatBuffer transformValues) { - org.lwjgl3.opengl.NVPathRendering.glTransformPathNV(resultPath, srcPath, transformType, transformValues); - } - - public static void glWeightPathsNV(int resultPath, java.nio.IntBuffer paths, java.nio.FloatBuffer weights) { - org.lwjgl3.opengl.NVPathRendering.glWeightPathsNV(resultPath, paths, weights); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVPixelDataRange.java b/src/main/java/org/lwjgl/opengl/NVPixelDataRange.java deleted file mode 100644 index bdd7ec5f5..000000000 --- a/src/main/java/org/lwjgl/opengl/NVPixelDataRange.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class NVPixelDataRange { - - public static final int GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = (int) 34939; - public static final int GL_READ_PIXEL_DATA_RANGE_NV = (int) 34937; - public static final int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = (int) 34941; - public static final int GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = (int) 34938; - public static final int GL_WRITE_PIXEL_DATA_RANGE_NV = (int) 34936; - public static final int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = (int) 34940; - - public static void glFlushPixelDataRangeNV(int target) { - org.lwjgl3.opengl.NVPixelDataRange.glFlushPixelDataRangeNV(target); - } - - public static void glPixelDataRangeNV(int target, java.nio.ByteBuffer data) { - org.lwjgl3.opengl.NVPixelDataRange.glPixelDataRangeNV(target, data); - } - - public static void glPixelDataRangeNV(int target, java.nio.DoubleBuffer data) { - final java.nio.ByteBuffer wrappedArg1 = BufferCasts.toByteBuffer(data); - - org.lwjgl3.opengl.NVPixelDataRange.glPixelDataRangeNV(target, wrappedArg1); - BufferCasts.updateBuffer(data, wrappedArg1); - } - - public static void glPixelDataRangeNV(int target, java.nio.FloatBuffer data) { - final java.nio.ByteBuffer wrappedArg1 = BufferCasts.toByteBuffer(data); - - org.lwjgl3.opengl.NVPixelDataRange.glPixelDataRangeNV(target, wrappedArg1); - BufferCasts.updateBuffer(data, wrappedArg1); - } - - public static void glPixelDataRangeNV(int target, java.nio.IntBuffer data) { - final java.nio.ByteBuffer wrappedArg1 = BufferCasts.toByteBuffer(data); - - org.lwjgl3.opengl.NVPixelDataRange.glPixelDataRangeNV(target, wrappedArg1); - BufferCasts.updateBuffer(data, wrappedArg1); - } - - public static void glPixelDataRangeNV(int target, java.nio.ShortBuffer data) { - final java.nio.ByteBuffer wrappedArg1 = BufferCasts.toByteBuffer(data); - - org.lwjgl3.opengl.NVPixelDataRange.glPixelDataRangeNV(target, wrappedArg1); - BufferCasts.updateBuffer(data, wrappedArg1); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVPointSprite.java b/src/main/java/org/lwjgl/opengl/NVPointSprite.java deleted file mode 100644 index e92b551cd..000000000 --- a/src/main/java/org/lwjgl/opengl/NVPointSprite.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.lwjgl.opengl; - -public class NVPointSprite { - - public static final int GL_COORD_REPLACE_NV = (int) 34914; - public static final int GL_POINT_SPRITE_NV = (int) 34913; - public static final int GL_POINT_SPRITE_R_MODE_NV = (int) 34915; - - public static void glPointParameterNV(int pname, java.nio.IntBuffer params) { - org.lwjgl3.opengl.NVPointSprite.glPointParameterivNV(pname, params); - } - - public static void glPointParameteriNV(int pname, int param) { - org.lwjgl3.opengl.NVPointSprite.glPointParameteriNV(pname, param); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVPrimitiveRestart.java b/src/main/java/org/lwjgl/opengl/NVPrimitiveRestart.java deleted file mode 100644 index b6901fe0d..000000000 --- a/src/main/java/org/lwjgl/opengl/NVPrimitiveRestart.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.lwjgl.opengl; - -public class NVPrimitiveRestart { - - public static final int GL_PRIMITIVE_RESTART_INDEX_NV = (int) 34137; - public static final int GL_PRIMITIVE_RESTART_NV = (int) 34136; - - public static void glPrimitiveRestartIndexNV(int index) { - org.lwjgl3.opengl.NVPrimitiveRestart.glPrimitiveRestartIndexNV(index); - } - - public static void glPrimitiveRestartNV() { - org.lwjgl3.opengl.NVPrimitiveRestart.glPrimitiveRestartNV(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVShaderBufferLoad.java b/src/main/java/org/lwjgl/opengl/NVShaderBufferLoad.java deleted file mode 100644 index eb0078aa2..000000000 --- a/src/main/java/org/lwjgl/opengl/NVShaderBufferLoad.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.lwjgl.opengl; - -public class NVShaderBufferLoad { - - public static final int GL_BUFFER_GPU_ADDRESS_NV = (int) 36637; - public static final int GL_GPU_ADDRESS_NV = (int) 36660; - public static final int GL_MAX_SHADER_BUFFER_ADDRESS_NV = (int) 36661; - - public static void glGetBufferParameteruNV(int target, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.NVShaderBufferLoad.glGetBufferParameterui64vNV(target, pname, params); - } - - public static long glGetBufferParameterui64NV(int target, int pname) { - return org.lwjgl3.opengl.NVShaderBufferLoad.glGetBufferParameterui64NV(target, pname); - } - - public static void glGetIntegeruNV(int value, java.nio.LongBuffer result) { - org.lwjgl3.opengl.NVShaderBufferLoad.glGetIntegerui64vNV(value, result); - } - - public static long glGetIntegerui64NV(int value) { - return org.lwjgl3.opengl.NVShaderBufferLoad.glGetIntegerui64NV(value); - } - - public static void glGetNamedBufferParameteruNV(int buffer, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.NVShaderBufferLoad.glGetNamedBufferParameterui64vNV(buffer, pname, params); - } - - public static long glGetNamedBufferParameterui64NV(int buffer, int pname) { - return org.lwjgl3.opengl.NVShaderBufferLoad.glGetNamedBufferParameterui64NV(buffer, pname); - } - - public static boolean glIsBufferResidentNV(int target) { - return org.lwjgl3.opengl.NVShaderBufferLoad.glIsBufferResidentNV(target); - } - - public static boolean glIsNamedBufferResidentNV(int buffer) { - return org.lwjgl3.opengl.NVShaderBufferLoad.glIsNamedBufferResidentNV(buffer); - } - - public static void glMakeBufferNonResidentNV(int target) { - org.lwjgl3.opengl.NVShaderBufferLoad.glMakeBufferNonResidentNV(target); - } - - public static void glMakeBufferResidentNV(int target, int access) { - org.lwjgl3.opengl.NVShaderBufferLoad.glMakeBufferResidentNV(target, access); - } - - public static void glMakeNamedBufferNonResidentNV(int buffer) { - org.lwjgl3.opengl.NVShaderBufferLoad.glMakeNamedBufferNonResidentNV(buffer); - } - - public static void glMakeNamedBufferResidentNV(int buffer, int access) { - org.lwjgl3.opengl.NVShaderBufferLoad.glMakeNamedBufferResidentNV(buffer, access); - } - - public static void glProgramUniformuNV(int program, int location, java.nio.LongBuffer value) { - org.lwjgl3.opengl.NVShaderBufferLoad.glProgramUniformui64vNV(program, location, value); - } - - public static void glProgramUniformui64NV(int program, int location, long value) { - org.lwjgl3.opengl.NVShaderBufferLoad.glProgramUniformui64NV(program, location, value); - } - - public static void glUniformuNV(int location, java.nio.LongBuffer value) { - org.lwjgl3.opengl.NVShaderBufferLoad.glUniformui64vNV(location, value); - } - - public static void glUniformui64NV(int location, long value) { - org.lwjgl3.opengl.NVShaderBufferLoad.glUniformui64NV(location, value); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVShaderBufferStore.java b/src/main/java/org/lwjgl/opengl/NVShaderBufferStore.java deleted file mode 100644 index 6da426463..000000000 --- a/src/main/java/org/lwjgl/opengl/NVShaderBufferStore.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class NVShaderBufferStore { - - public static final int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = (int) 16; -} diff --git a/src/main/java/org/lwjgl/opengl/NVTexgenReflection.java b/src/main/java/org/lwjgl/opengl/NVTexgenReflection.java deleted file mode 100644 index d02400395..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTexgenReflection.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTexgenReflection { - - public static final int GL_NORMAL_MAP_NV = (int) 34065; - public static final int GL_REFLECTION_MAP_NV = (int) 34066; -} diff --git a/src/main/java/org/lwjgl/opengl/NVTextureBarrier.java b/src/main/java/org/lwjgl/opengl/NVTextureBarrier.java deleted file mode 100644 index 16e049598..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTextureBarrier.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTextureBarrier { - - public static void glTextureBarrierNV() { - org.lwjgl3.opengl.NVTextureBarrier.glTextureBarrierNV(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVTextureMultisample.java b/src/main/java/org/lwjgl/opengl/NVTextureMultisample.java deleted file mode 100644 index 980c01658..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTextureMultisample.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTextureMultisample { - - public static final int GL_TEXTURE_COLOR_SAMPLES_NV = (int) 36934; - public static final int GL_TEXTURE_COVERAGE_SAMPLES_NV = (int) 36933; - - public static void glTexImage2DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, - int internalFormat, int width, int height, boolean fixedSampleLocations) { - org.lwjgl3.opengl.NVTextureMultisample.glTexImage2DMultisampleCoverageNV( - target, - coverageSamples, - colorSamples, - internalFormat, - width, - height, - fixedSampleLocations); - } - - public static void glTexImage3DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, - int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { - org.lwjgl3.opengl.NVTextureMultisample.glTexImage3DMultisampleCoverageNV( - target, - coverageSamples, - colorSamples, - internalFormat, - width, - height, - depth, - fixedSampleLocations); - } - - public static void glTextureImage2DMultisampleCoverageNV(int texture, int target, int coverageSamples, - int colorSamples, int internalFormat, int width, int height, boolean fixedSampleLocations) { - org.lwjgl3.opengl.NVTextureMultisample.glTextureImage2DMultisampleCoverageNV( - texture, - target, - coverageSamples, - colorSamples, - internalFormat, - width, - height, - fixedSampleLocations); - } - - public static void glTextureImage2DMultisampleNV(int texture, int target, int samples, int internalFormat, - int width, int height, boolean fixedSampleLocations) { - org.lwjgl3.opengl.NVTextureMultisample.glTextureImage2DMultisampleNV( - texture, - target, - samples, - internalFormat, - width, - height, - fixedSampleLocations); - } - - public static void glTextureImage3DMultisampleCoverageNV(int texture, int target, int coverageSamples, - int colorSamples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { - org.lwjgl3.opengl.NVTextureMultisample.glTextureImage3DMultisampleCoverageNV( - texture, - target, - coverageSamples, - colorSamples, - internalFormat, - width, - height, - depth, - fixedSampleLocations); - } - - public static void glTextureImage3DMultisampleNV(int texture, int target, int samples, int internalFormat, - int width, int height, int depth, boolean fixedSampleLocations) { - org.lwjgl3.opengl.NVTextureMultisample.glTextureImage3DMultisampleNV( - texture, - target, - samples, - internalFormat, - width, - height, - depth, - fixedSampleLocations); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVTextureShader.java b/src/main/java/org/lwjgl/opengl/NVTextureShader.java deleted file mode 100644 index be0772d73..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTextureShader.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTextureShader { - - public static final int GL_CONST_EYE_NV = (int) 34533; - public static final int GL_CULL_FRAGMENT_NV = (int) 34535; - public static final int GL_CULL_MODES_NV = (int) 34528; - public static final int GL_DEPENDENT_AR_TEXTURE_2D_NV = (int) 34537; - public static final int GL_DEPENDENT_GB_TEXTURE_2D_NV = (int) 34538; - public static final int GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = (int) 34547; - public static final int GL_DOT_PRODUCT_DEPTH_REPLACE_NV = (int) 34541; - public static final int GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = (int) 34545; - public static final int GL_DOT_PRODUCT_NV = (int) 34540; - public static final int GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = (int) 34546; - public static final int GL_DOT_PRODUCT_TEXTURE_2D_NV = (int) 34542; - public static final int GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = (int) 34544; - public static final int GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = (int) 34382; - public static final int GL_DSDT8_MAG8_INTENSITY8_NV = (int) 34571; - public static final int GL_DSDT8_MAG8_NV = (int) 34570; - public static final int GL_DSDT8_NV = (int) 34569; - public static final int GL_DSDT_MAG_INTENSITY_NV = (int) 34524; - public static final int GL_DSDT_MAG_NV = (int) 34550; - public static final int GL_DSDT_MAG_VIB_NV = (int) 34551; - public static final int GL_DSDT_NV = (int) 34549; - public static final int GL_DS_BIAS_NV = (int) 34582; - public static final int GL_DS_SCALE_NV = (int) 34576; - public static final int GL_DT_BIAS_NV = (int) 34583; - public static final int GL_DT_SCALE_NV = (int) 34577; - public static final int GL_HILO16_NV = (int) 34552; - public static final int GL_HILO_NV = (int) 34548; - public static final int GL_HI_BIAS_NV = (int) 34580; - public static final int GL_HI_SCALE_NV = (int) 34574; - public static final int GL_LO_BIAS_NV = (int) 34581; - public static final int GL_LO_SCALE_NV = (int) 34575; - public static final int GL_MAGNITUDE_BIAS_NV = (int) 34584; - public static final int GL_MAGNITUDE_SCALE_NV = (int) 34578; - public static final int GL_OFFSET_TEXTURE_2D_BIAS_NV = (int) 34531; - public static final int GL_OFFSET_TEXTURE_2D_MATRIX_NV = (int) 34529; - public static final int GL_OFFSET_TEXTURE_2D_NV = (int) 34536; - public static final int GL_OFFSET_TEXTURE_2D_SCALE_NV = (int) 34530; - public static final int GL_OFFSET_TEXTURE_BIAS_NV = (int) 34531; - public static final int GL_OFFSET_TEXTURE_MATRIX_NV = (int) 34529; - public static final int GL_OFFSET_TEXTURE_RECTANGLE_NV = (int) 34380; - public static final int GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = (int) 34381; - public static final int GL_OFFSET_TEXTURE_SCALE_NV = (int) 34530; - public static final int GL_PASS_THROUGH_NV = (int) 34534; - public static final int GL_PREVIOUS_TEXTURE_INPUT_NV = (int) 34532; - public static final int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = (int) 34521; - public static final int GL_SHADER_CONSISTENT_NV = (int) 34525; - public static final int GL_SHADER_OPERATION_NV = (int) 34527; - public static final int GL_SIGNED_ALPHA8_NV = (int) 34566; - public static final int GL_SIGNED_ALPHA_NV = (int) 34565; - public static final int GL_SIGNED_HILO16_NV = (int) 34554; - public static final int GL_SIGNED_HILO_NV = (int) 34553; - public static final int GL_SIGNED_INTENSITY8_NV = (int) 34568; - public static final int GL_SIGNED_INTENSITY_NV = (int) 34567; - public static final int GL_SIGNED_LUMINANCE8_ALPHA8_NV = (int) 34564; - public static final int GL_SIGNED_LUMINANCE8_NV = (int) 34562; - public static final int GL_SIGNED_LUMINANCE_ALPHA_NV = (int) 34563; - public static final int GL_SIGNED_LUMINANCE_NV = (int) 34561; - public static final int GL_SIGNED_RGB8_NV = (int) 34559; - public static final int GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = (int) 34573; - public static final int GL_SIGNED_RGBA8_NV = (int) 34556; - public static final int GL_SIGNED_RGBA_NV = (int) 34555; - public static final int GL_SIGNED_RGB_NV = (int) 34558; - public static final int GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = (int) 34572; - public static final int GL_TEXTURE_BORDER_VALUES_NV = (int) 34586; - public static final int GL_TEXTURE_DS_SIZE_NV = (int) 34589; - public static final int GL_TEXTURE_DT_SIZE_NV = (int) 34590; - public static final int GL_TEXTURE_HI_SIZE_NV = (int) 34587; - public static final int GL_TEXTURE_LO_SIZE_NV = (int) 34588; - public static final int GL_TEXTURE_MAG_SIZE_NV = (int) 34591; - public static final int GL_TEXTURE_SHADER_NV = (int) 34526; - public static final int GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = (int) 34523; - public static final int GL_UNSIGNED_INT_S8_S8_8_8_NV = (int) 34522; - public static final int GL_VIBRANCE_BIAS_NV = (int) 34585; - public static final int GL_VIBRANCE_SCALE_NV = (int) 34579; -} diff --git a/src/main/java/org/lwjgl/opengl/NVTextureShader2.java b/src/main/java/org/lwjgl/opengl/NVTextureShader2.java deleted file mode 100644 index ec3555fe6..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTextureShader2.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTextureShader2 { - - public static final int GL_DOT_PRODUCT_TEXTURE_3D_NV = (int) 34543; - public static final int GL_DSDT8_MAG8_INTENSITY8_NV = (int) 34571; - public static final int GL_DSDT8_MAG8_NV = (int) 34570; - public static final int GL_DSDT8_NV = (int) 34569; - public static final int GL_DSDT_MAG_INTENSITY_NV = (int) 34524; - public static final int GL_DSDT_MAG_NV = (int) 34550; - public static final int GL_DSDT_MAG_VIB_NV = (int) 34551; - public static final int GL_DSDT_NV = (int) 34549; - public static final int GL_HILO16_NV = (int) 34552; - public static final int GL_HILO_NV = (int) 34548; - public static final int GL_SIGNED_ALPHA8_NV = (int) 34566; - public static final int GL_SIGNED_ALPHA_NV = (int) 34565; - public static final int GL_SIGNED_HILO16_NV = (int) 34554; - public static final int GL_SIGNED_HILO_NV = (int) 34553; - public static final int GL_SIGNED_INTENSITY8_NV = (int) 34568; - public static final int GL_SIGNED_INTENSITY_NV = (int) 34567; - public static final int GL_SIGNED_LUMINANCE8_ALPHA8_NV = (int) 34564; - public static final int GL_SIGNED_LUMINANCE8_NV = (int) 34562; - public static final int GL_SIGNED_LUMINANCE_ALPHA_NV = (int) 34563; - public static final int GL_SIGNED_LUMINANCE_NV = (int) 34561; - public static final int GL_SIGNED_RGB8_NV = (int) 34559; - public static final int GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = (int) 34573; - public static final int GL_SIGNED_RGBA8_NV = (int) 34556; - public static final int GL_SIGNED_RGBA_NV = (int) 34555; - public static final int GL_SIGNED_RGB_NV = (int) 34558; - public static final int GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = (int) 34572; - public static final int GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = (int) 34523; - public static final int GL_UNSIGNED_INT_S8_S8_8_8_NV = (int) 34522; -} diff --git a/src/main/java/org/lwjgl/opengl/NVTextureShader3.java b/src/main/java/org/lwjgl/opengl/NVTextureShader3.java deleted file mode 100644 index 5a1312481..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTextureShader3.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTextureShader3 { - - public static final int GL_DEPENDENT_HILO_TEXTURE_2D_NV = (int) 34904; - public static final int GL_DEPENDENT_RGB_TEXTURE_3D_NV = (int) 34905; - public static final int GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = (int) 34906; - public static final int GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = (int) 34909; - public static final int GL_DOT_PRODUCT_PASS_THROUGH_NV = (int) 34907; - public static final int GL_DOT_PRODUCT_TEXTURE_1D_NV = (int) 34908; - public static final int GL_FORCE_BLUE_TO_ONE_NV = (int) 34912; - public static final int GL_HILO8_NV = (int) 34910; - public static final int GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = (int) 34902; - public static final int GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = (int) 34903; - public static final int GL_OFFSET_HILO_TEXTURE_2D_NV = (int) 34900; - public static final int GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = (int) 34901; - public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = (int) 34896; - public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = (int) 34897; - public static final int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = (int) 34898; - public static final int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = (int) 34899; - public static final int GL_SIGNED_HILO8_NV = (int) 34911; -} diff --git a/src/main/java/org/lwjgl/opengl/NVTransformFeedback.java b/src/main/java/org/lwjgl/opengl/NVTransformFeedback.java deleted file mode 100644 index 57aa03bf2..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTransformFeedback.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTransformFeedback { - - public static final int GL_ACTIVE_VARYINGS_NV = (int) 35969; - public static final int GL_ACTIVE_VARYING_MAX_LENGTH_NV = (int) 35970; - public static final int GL_BACK_PRIMARY_COLOR_NV = (int) 35959; - public static final int GL_BACK_SECONDARY_COLOR_NV = (int) 35960; - public static final int GL_CLIP_DISTANCE_NV = (int) 35962; - public static final int GL_GENERIC_ATTRIB_NV = (int) 35965; - public static final int GL_INTERLEAVED_ATTRIBS_NV = (int) 35980; - public static final int GL_LAYER_NV = (int) 36266; - public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = (int) 35978; - public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = (int) 35979; - public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = (int) 35968; - public static final int GL_PRIMITIVES_GENERATED_NV = (int) 35975; - public static final int GL_PRIMITIVE_ID_NV = (int) 35964; - public static final int GL_RASTERIZER_DISCARD_NV = (int) 35977; - public static final int GL_SEPARATE_ATTRIBS_NV = (int) 35981; - public static final int GL_TEXTURE_COORD_NV = (int) 35961; - public static final int GL_TRANSFORM_FEEDBACK_ATTRIBS_NV = (int) 35966; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = (int) 35983; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV = (int) 35967; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_NV = (int) 35982; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = (int) 35973; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START_NV = (int) 35972; - public static final int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = (int) 35976; - public static final int GL_TRANSFORM_FEEDBACK_RECORD_NV = (int) 35974; - public static final int GL_TRANSFORM_FEEDBACK_VARYINGS_NV = (int) 35971; - public static final int GL_VERTEX_ID_NV = (int) 35963; - - public static void glActiveVaryingNV(int program, java.lang.CharSequence name) { - org.lwjgl3.opengl.NVTransformFeedback.glActiveVaryingNV(program, name); - } - - public static void glActiveVaryingNV(int program, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.NVTransformFeedback.glActiveVaryingNV(program, name); - } - - public static void glBeginTransformFeedbackNV(int primitiveMode) { - org.lwjgl3.opengl.NVTransformFeedback.glBeginTransformFeedbackNV(primitiveMode); - } - - public static void glBindBufferBaseNV(int target, int index, int buffer) { - org.lwjgl3.opengl.NVTransformFeedback.glBindBufferBaseNV(target, index, buffer); - } - - public static void glBindBufferOffsetNV(int target, int index, int buffer, long offset) { - org.lwjgl3.opengl.NVTransformFeedback.glBindBufferOffsetNV(target, index, buffer, offset); - } - - public static void glBindBufferRangeNV(int target, int index, int buffer, long offset, long size) { - org.lwjgl3.opengl.NVTransformFeedback.glBindBufferRangeNV(target, index, buffer, offset, size); - } - - public static void glEndTransformFeedbackNV() { - org.lwjgl3.opengl.NVTransformFeedback.glEndTransformFeedbackNV(); - } - - public static void glGetActiveVaryingNV(int program, int index, java.nio.IntBuffer length, java.nio.IntBuffer size, - java.nio.IntBuffer type, java.nio.ByteBuffer name) { - org.lwjgl3.opengl.NVTransformFeedback.glGetActiveVaryingNV(program, index, length, size, type, name); - } - - public static int glGetTransformFeedbackVaryingNV(int program, int index) { - return org.lwjgl3.opengl.NVTransformFeedback.glGetTransformFeedbackVaryingNV(program, index); - } - - public static void glGetTransformFeedbackVaryingNV(int program, int index, java.nio.IntBuffer location) { - org.lwjgl3.opengl.NVTransformFeedback.glGetTransformFeedbackVaryingNV(program, index, location); - } - - public static int glGetVaryingLocationNV(int program, java.lang.CharSequence name) { - return org.lwjgl3.opengl.NVTransformFeedback.glGetVaryingLocationNV(program, name); - } - - public static int glGetVaryingLocationNV(int program, java.nio.ByteBuffer name) { - return org.lwjgl3.opengl.NVTransformFeedback.glGetVaryingLocationNV(program, name); - } - - public static void glTransformFeedbackAttribsNV(java.nio.IntBuffer attribs, int bufferMode) { - org.lwjgl3.opengl.NVTransformFeedback.glTransformFeedbackAttribsNV(attribs, bufferMode); - } - - public static void glTransformFeedbackVaryingsNV(int program, java.nio.IntBuffer locations, int bufferMode) { - org.lwjgl3.opengl.NVTransformFeedback.glTransformFeedbackVaryingsNV(program, locations, bufferMode); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVTransformFeedback2.java b/src/main/java/org/lwjgl/opengl/NVTransformFeedback2.java deleted file mode 100644 index 894235f54..000000000 --- a/src/main/java/org/lwjgl/opengl/NVTransformFeedback2.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.lwjgl.opengl; - -public class NVTransformFeedback2 { - - public static final int GL_TRANSFORM_FEEDBACK_BINDING_NV = (int) 36389; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = (int) 36388; - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = (int) 36387; - public static final int GL_TRANSFORM_FEEDBACK_NV = (int) 36386; - - public static void glBindTransformFeedbackNV(int target, int id) { - org.lwjgl3.opengl.NVTransformFeedback2.glBindTransformFeedbackNV(target, id); - } - - public static void glDeleteTransformFeedbacksNV(int id) { - org.lwjgl3.opengl.NVTransformFeedback2.glDeleteTransformFeedbacksNV(id); - } - - public static void glDeleteTransformFeedbacksNV(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.NVTransformFeedback2.glDeleteTransformFeedbacksNV(ids); - } - - public static void glDrawTransformFeedbackNV(int mode, int id) { - org.lwjgl3.opengl.NVTransformFeedback2.glDrawTransformFeedbackNV(mode, id); - } - - public static int glGenTransformFeedbacksNV() { - return org.lwjgl3.opengl.NVTransformFeedback2.glGenTransformFeedbacksNV(); - } - - public static void glGenTransformFeedbacksNV(java.nio.IntBuffer ids) { - org.lwjgl3.opengl.NVTransformFeedback2.glGenTransformFeedbacksNV(ids); - } - - public static boolean glIsTransformFeedbackNV(int id) { - return org.lwjgl3.opengl.NVTransformFeedback2.glIsTransformFeedbackNV(id); - } - - public static void glPauseTransformFeedbackNV() { - org.lwjgl3.opengl.NVTransformFeedback2.glPauseTransformFeedbackNV(); - } - - public static void glResumeTransformFeedbackNV() { - org.lwjgl3.opengl.NVTransformFeedback2.glResumeTransformFeedbackNV(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVVertexArrayRange.java b/src/main/java/org/lwjgl/opengl/NVVertexArrayRange.java deleted file mode 100644 index 4756bd16d..000000000 --- a/src/main/java/org/lwjgl/opengl/NVVertexArrayRange.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.lwjgl.opengl; - -import org.lwjgl.lwjgl3ify.BufferCasts; - -public class NVVertexArrayRange { - - public static final int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = (int) 34080; - public static final int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = (int) 34078; - public static final int GL_VERTEX_ARRAY_RANGE_NV = (int) 34077; - public static final int GL_VERTEX_ARRAY_RANGE_POINTER_NV = (int) 34081; - public static final int GL_VERTEX_ARRAY_RANGE_VALID_NV = (int) 34079; - - public static void glFlushVertexArrayRangeNV() { - org.lwjgl3.opengl.NVVertexArrayRange.glFlushVertexArrayRangeNV(); - } - - public static void glVertexArrayRangeNV(java.nio.ByteBuffer pPointer) { - org.lwjgl3.opengl.NVVertexArrayRange.glVertexArrayRangeNV(pPointer); - } - - public static void glVertexArrayRangeNV(java.nio.DoubleBuffer pPointer) { - final java.nio.ByteBuffer wrappedArg0 = BufferCasts.toByteBuffer(pPointer); - - org.lwjgl3.opengl.NVVertexArrayRange.glVertexArrayRangeNV(wrappedArg0); - BufferCasts.updateBuffer(pPointer, wrappedArg0); - } - - public static void glVertexArrayRangeNV(java.nio.FloatBuffer pPointer) { - final java.nio.ByteBuffer wrappedArg0 = BufferCasts.toByteBuffer(pPointer); - - org.lwjgl3.opengl.NVVertexArrayRange.glVertexArrayRangeNV(wrappedArg0); - BufferCasts.updateBuffer(pPointer, wrappedArg0); - } - - public static void glVertexArrayRangeNV(java.nio.IntBuffer pPointer) { - final java.nio.ByteBuffer wrappedArg0 = BufferCasts.toByteBuffer(pPointer); - - org.lwjgl3.opengl.NVVertexArrayRange.glVertexArrayRangeNV(wrappedArg0); - BufferCasts.updateBuffer(pPointer, wrappedArg0); - } - - public static void glVertexArrayRangeNV(java.nio.ShortBuffer pPointer) { - final java.nio.ByteBuffer wrappedArg0 = BufferCasts.toByteBuffer(pPointer); - - org.lwjgl3.opengl.NVVertexArrayRange.glVertexArrayRangeNV(wrappedArg0); - BufferCasts.updateBuffer(pPointer, wrappedArg0); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVVertexArrayRange2.java b/src/main/java/org/lwjgl/opengl/NVVertexArrayRange2.java deleted file mode 100644 index 85f270fe9..000000000 --- a/src/main/java/org/lwjgl/opengl/NVVertexArrayRange2.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.lwjgl.opengl; - -public class NVVertexArrayRange2 { - - public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = (int) 34099; -} diff --git a/src/main/java/org/lwjgl/opengl/NVVertexAttribInteger64bit.java b/src/main/java/org/lwjgl/opengl/NVVertexAttribInteger64bit.java deleted file mode 100644 index edce38cf4..000000000 --- a/src/main/java/org/lwjgl/opengl/NVVertexAttribInteger64bit.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.lwjgl.opengl; - -public class NVVertexAttribInteger64bit { - - public static final int GL_INT64_NV = (int) 5134; - public static final int GL_UNSIGNED_INT64_NV = (int) 5135; - - public static void glGetVertexAttribLNV(int index, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glGetVertexAttribLi64vNV(index, pname, params); - } - - public static void glGetVertexAttribLuNV(int index, int pname, java.nio.LongBuffer params) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glGetVertexAttribLui64vNV(index, pname, params); - } - - public static void glVertexAttribL1NV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL1i64vNV(index, v); - } - - public static void glVertexAttribL1i64NV(int index, long x) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL1i64NV(index, x); - } - - public static void glVertexAttribL1uNV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL1ui64vNV(index, v); - } - - public static void glVertexAttribL1ui64NV(int index, long x) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL1ui64NV(index, x); - } - - public static void glVertexAttribL2NV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL2i64vNV(index, v); - } - - public static void glVertexAttribL2i64NV(int index, long x, long y) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL2i64NV(index, x, y); - } - - public static void glVertexAttribL2uNV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL2ui64vNV(index, v); - } - - public static void glVertexAttribL2ui64NV(int index, long x, long y) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL2ui64NV(index, x, y); - } - - public static void glVertexAttribL3NV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL3i64vNV(index, v); - } - - public static void glVertexAttribL3i64NV(int index, long x, long y, long z) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL3i64NV(index, x, y, z); - } - - public static void glVertexAttribL3uNV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL3ui64vNV(index, v); - } - - public static void glVertexAttribL3ui64NV(int index, long x, long y, long z) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL3ui64NV(index, x, y, z); - } - - public static void glVertexAttribL4NV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL4i64vNV(index, v); - } - - public static void glVertexAttribL4i64NV(int index, long x, long y, long z, long w) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL4i64NV(index, x, y, z, w); - } - - public static void glVertexAttribL4uNV(int index, java.nio.LongBuffer v) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL4ui64vNV(index, v); - } - - public static void glVertexAttribL4ui64NV(int index, long x, long y, long z, long w) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribL4ui64NV(index, x, y, z, w); - } - - public static void glVertexAttribLFormatNV(int index, int size, int type, int stride) { - org.lwjgl3.opengl.NVVertexAttribInteger64bit.glVertexAttribLFormatNV(index, size, type, stride); - } -} diff --git a/src/main/java/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java b/src/main/java/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java deleted file mode 100644 index 3a3255b35..000000000 --- a/src/main/java/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.lwjgl.opengl; - -public class NVVertexBufferUnifiedMemory { - - public static final int GL_COLOR_ARRAY_ADDRESS_NV = (int) 36643; - public static final int GL_COLOR_ARRAY_LENGTH_NV = (int) 36653; - public static final int GL_EDGE_FLAG_ARRAY_ADDRESS_NV = (int) 36646; - public static final int GL_EDGE_FLAG_ARRAY_LENGTH_NV = (int) 36656; - public static final int GL_ELEMENT_ARRAY_ADDRESS_NV = (int) 36649; - public static final int GL_ELEMENT_ARRAY_LENGTH_NV = (int) 36659; - public static final int GL_ELEMENT_ARRAY_UNIFIED_NV = (int) 36639; - public static final int GL_FOG_COORD_ARRAY_ADDRESS_NV = (int) 36648; - public static final int GL_FOG_COORD_ARRAY_LENGTH_NV = (int) 36658; - public static final int GL_INDEX_ARRAY_ADDRESS_NV = (int) 36644; - public static final int GL_INDEX_ARRAY_LENGTH_NV = (int) 36654; - public static final int GL_NORMAL_ARRAY_ADDRESS_NV = (int) 36642; - public static final int GL_NORMAL_ARRAY_LENGTH_NV = (int) 36652; - public static final int GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV = (int) 36647; - public static final int GL_SECONDARY_COLOR_ARRAY_LENGTH_NV = (int) 36657; - public static final int GL_TEXTURE_COORD_ARRAY_ADDRESS_NV = (int) 36645; - public static final int GL_TEXTURE_COORD_ARRAY_LENGTH_NV = (int) 36655; - public static final int GL_VERTEX_ARRAY_ADDRESS_NV = (int) 36641; - public static final int GL_VERTEX_ARRAY_LENGTH_NV = (int) 36651; - public static final int GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV = (int) 36640; - public static final int GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV = (int) 36650; - public static final int GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV = (int) 36638; - - public static void glBufferAddressRangeNV(int pname, int index, long address, long length) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glBufferAddressRangeNV(pname, index, address, length); - } - - public static void glColorFormatNV(int size, int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glColorFormatNV(size, type, stride); - } - - public static void glEdgeFlagFormatNV(int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glEdgeFlagFormatNV(stride); - } - - public static void glFogCoordFormatNV(int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glFogCoordFormatNV(type, stride); - } - - public static void glGetIntegeruNV(int value, int index, java.nio.LongBuffer result) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glGetIntegerui64i_vNV(value, index, result); - } - - public static void glIndexFormatNV(int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glIndexFormatNV(type, stride); - } - - public static void glNormalFormatNV(int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glNormalFormatNV(type, stride); - } - - public static void glSecondaryColorFormatNV(int size, int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glSecondaryColorFormatNV(size, type, stride); - } - - public static void glTexCoordFormatNV(int size, int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glTexCoordFormatNV(size, type, stride); - } - - public static void glVertexAttribFormatNV(int index, int size, int type, boolean normalized, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glVertexAttribFormatNV(index, size, type, normalized, stride); - } - - public static void glVertexAttribIFormatNV(int index, int size, int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glVertexAttribIFormatNV(index, size, type, stride); - } - - public static void glVertexFormatNV(int size, int type, int stride) { - org.lwjgl3.opengl.NVVertexBufferUnifiedMemory.glVertexFormatNV(size, type, stride); - } -} diff --git a/src/main/java/org/lwjgl/opengl/OpenGLException.java b/src/main/java/org/lwjgl/opengl/OpenGLException.java deleted file mode 100644 index 64f86b4e1..000000000 --- a/src/main/java/org/lwjgl/opengl/OpenGLException.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - *

- * Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error. - * - * @author cix_foo - * @version $Revision$ $Id$ - */ -public class OpenGLException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - /** Constructor for OpenGLException. */ - public OpenGLException(int gl_error_code) { - this(createErrorMessage(gl_error_code)); - } - - private static String createErrorMessage(int gl_error_code) { - String error_string = Util.translateGLErrorString(gl_error_code); - return error_string + " (" + gl_error_code + ")"; - } - - /** Constructor for OpenGLException. */ - public OpenGLException() { - super(); - } - - /** - * Constructor for OpenGLException. - * - * @param message - */ - public OpenGLException(String message) { - super(message); - } - - /** - * Constructor for OpenGLException. - * - * @param message - * @param cause - */ - public OpenGLException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructor for OpenGLException. - * - * @param cause - */ - public OpenGLException(Throwable cause) { - super(cause); - } -} diff --git a/src/main/java/org/lwjgl/opengl/Pbuffer.java b/src/main/java/org/lwjgl/opengl/Pbuffer.java deleted file mode 100644 index f816916ba..000000000 --- a/src/main/java/org/lwjgl/opengl/Pbuffer.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; - -/** - *

- * Pbuffer encapsulates an OpenGL pbuffer. - *

- * - * This class is thread-safe. - * - * @author elias_naur - * @version $Revision$ $Id$ - */ -public final class Pbuffer extends DrawableGL { - - /** - * Indicates that Pbuffers can be created. - */ - public static final int PBUFFER_SUPPORTED = 0; // mark as not supported 1 << 0; - - /** - * Indicates that Pbuffers can be used as render-textures. - */ - public static final int RENDER_TEXTURE_SUPPORTED = 1 << 1; - - /** - * Indicates that Pbuffers can be used as non-power-of-two render-textures. - */ - public static final int RENDER_TEXTURE_RECTANGLE_SUPPORTED = 1 << 2; - - /** - * Indicates that Pbuffers can be used as depth render-textures. - */ - public static final int RENDER_DEPTH_TEXTURE_SUPPORTED = 1 << 3; - - /** - * The render-to-texture mipmap level attribute. - */ - public static final int MIPMAP_LEVEL = RenderTexture.WGL_MIPMAP_LEVEL_ARB; - - /** - * The render-to-texture cube map face attribute. - */ - public static final int CUBE_MAP_FACE = RenderTexture.WGL_CUBE_MAP_FACE_ARB; - - /** - * The render-to-texture cube map positive X face value. - */ - public static final int TEXTURE_CUBE_MAP_POSITIVE_X = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; - - /** - * The render-to-texture cube map negative X face value. - */ - public static final int TEXTURE_CUBE_MAP_NEGATIVE_X = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; - - /** - * The render-to-texture cube map positive Y face value. - */ - public static final int TEXTURE_CUBE_MAP_POSITIVE_Y = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB; - - /** - * The render-to-texture cube map negative Y face value. - */ - public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB; - - /** - * The render-to-texture cube map positive Z face value. - */ - public static final int TEXTURE_CUBE_MAP_POSITIVE_Z = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB; - - /** - * The render-to-texture cube map negative Z face value. - */ - public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB; - - /** - * The Pbuffer front left buffer. - */ - public static final int FRONT_LEFT_BUFFER = RenderTexture.WGL_FRONT_LEFT_ARB; - - /** - * The Pbuffer front right buffer. - */ - public static final int FRONT_RIGHT_BUFFER = RenderTexture.WGL_FRONT_RIGHT_ARB; - - /** - * The Pbuffer back left buffer. - */ - public static final int BACK_LEFT_BUFFER = RenderTexture.WGL_BACK_LEFT_ARB; - - /** - * The Pbuffer back right buffer. - */ - public static final int BACK_RIGHT_BUFFER = RenderTexture.WGL_BACK_RIGHT_ARB; - - /** - * The Pbuffer depth buffer. - */ - public static final int DEPTH_BUFFER = RenderTexture.WGL_DEPTH_COMPONENT_NV; - - /** - * Width - */ - private final int width; - - /** - * Height - */ - private final int height; - - static { - Sys.initialize(); - } - - /** - * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. - *

- * NOTE: The Pbuffer will have its own context that shares display lists and textures with - * shared_context, or, if shared_context is null, the Display context if it - * is created. The Pbuffer will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in - * the window context and vice versa. - *

- * - * @param width Pbuffer width - * @param height Pbuffer height - * @param pixel_format Minimum Pbuffer context properties - * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the - * Pbuffer will share with the Display context (if created). - */ - public Pbuffer(int width, int height, PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException { - this(width, height, pixel_format, null, shared_drawable); - } - - /** - * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. - *

- * NOTE: The Pbuffer will have its own context that shares display lists and textures with - * shared_context, or, if shared_context is null, the Display context if it - * is created. The Pbuffer will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in - * the window context and vice versa. - *

- * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is - * null, render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be - * queried to ensure that it is supported. Currently only windows platform can support this feature, so it is - * recommended that EXT_framebuffer_object or similar is used if available, for maximum portability. - *

- * - * @param width Pbuffer width - * @param height Pbuffer height - * @param pixel_format Minimum Pbuffer context properties - * @param renderTexture - * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the - * Pbuffer will share with the Display context (if created). - */ - public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, - Drawable shared_drawable) throws LWJGLException { - this(width, height, pixel_format, renderTexture, shared_drawable, null); - } - - /** - * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. - *

- * NOTE: The Pbuffer will have its own context that shares display lists and textures with - * shared_context, or, if shared_context is null, the Display context if it - * is created. The Pbuffer will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in - * the window context and vice versa. - *

- * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is - * null, render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be - * queried to ensure that it is supported. Currently only windows platform can support this feature, so it is - * recommended that EXT_framebuffer_object or similar is used if available, for maximum portability. - *

- * - * @param width Pbuffer width - * @param height Pbuffer height - * @param pixel_format Minimum Pbuffer context properties - * @param renderTexture - * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the - * Pbuffer will share with the Display context (if created). - * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) - */ - public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, - Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException { - if (pixel_format == null) throw new NullPointerException("Pixel format must be non-null"); - this.width = width; - this.height = height; - this.peer_info = createPbuffer(width, height, pixel_format, attribs, renderTexture); - Context shared_context = null; - if (shared_drawable == null) shared_drawable = Display.getDrawable(); // May be null - if (shared_drawable != null) shared_context = ((DrawableLWJGL) shared_drawable).getContext(); - // this.context = new ContextGL(peer_info, attribs, (ContextGL)shared_context); - } - - private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, - RenderTexture renderTexture) throws LWJGLException { - if (renderTexture == null) { - // Though null is a perfectly valid argument, Matrox Parhelia drivers expect - // a 0 terminated list, or else they crash. Supplying NULL or 0, should - // cause the drivers to use default settings - IntBuffer defaultAttribs = BufferUtils.createIntBuffer(1); - return Display.getImplementation() - .createPbuffer(width, height, pixel_format, attribs, null, defaultAttribs); - } else return Display.getImplementation().createPbuffer( - width, - height, - pixel_format, - attribs, - renderTexture.pixelFormatCaps, - renderTexture.pBufferAttribs); - } - - /** - * Method to test for validity of the buffer. If this function returns true, the buffer contents is lost. The buffer - * can still be used, but the results are undefined. The application is expected to release the buffer if needed, - * destroy it and recreate a new buffer. - * - * @return true if the buffer is lost and destroyed, false if the buffer is valid. - */ - public synchronized boolean isBufferLost() { - checkDestroyed(); - return Display.getImplementation().isBufferLost(peer_info); - } - - /** - * Gets the Pbuffer capabilities. - * - * @return a bitmask of Pbuffer capabilities. - */ - public static int getCapabilities() { - return Display.getImplementation().getPbufferCapabilities(); - } - - // ----------------------------------------------------------------------------------------- - // ------------------------------- Render-to-Texture Methods ------------------------------- - // ----------------------------------------------------------------------------------------- - - /** - * Sets a render-to-texture attribute. - *

- * The attrib parameter can be one of MIPMAP_LEVEL and CUBE_MAP_FACE. When the attrib parameter is CUBE_MAP_FACE - * then the value parameter can be on of the following: - *

- * TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y - * TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z - * - * @param attrib - * @param value - */ - public synchronized void setAttrib(int attrib, int value) { - checkDestroyed(); - Display.getImplementation().setPbufferAttrib(peer_info, attrib, value); - } - - /** - * Binds the currently bound texture to the buffer specified. The buffer can be one of the following: - *

- * FRONT_LEFT_BUFFER FRONT_RIGHT_BUFFER BACK_LEFT_BUFFER BACK_RIGHT_BUFFER DEPTH_BUFFER - * - * @param buffer - */ - public synchronized void bindTexImage(int buffer) { - checkDestroyed(); - Display.getImplementation().bindTexImageToPbuffer(peer_info, buffer); - } - - /** - * Releases the currently bound texture from the buffer specified. - * - * @param buffer - */ - public synchronized void releaseTexImage(int buffer) { - checkDestroyed(); - Display.getImplementation().releaseTexImageFromPbuffer(peer_info, buffer); - } - - /** - * @return Returns the height. - */ - public synchronized int getHeight() { - checkDestroyed(); - return height; - } - - /** - * @return Returns the width. - */ - public synchronized int getWidth() { - checkDestroyed(); - return width; - } -} diff --git a/src/main/java/org/lwjgl/opengl/PeerInfo.java b/src/main/java/org/lwjgl/opengl/PeerInfo.java deleted file mode 100644 index 4007ab4ca..000000000 --- a/src/main/java/org/lwjgl/opengl/PeerInfo.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import java.nio.ByteBuffer; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; - -/** - * - * @author elias_naur - * @version $Revision$ $Id$ - */ -abstract class PeerInfo { - - private final ByteBuffer handle; - private Thread locking_thread; // Thread that has locked this PeerInfo - private int lock_count; - - protected PeerInfo(ByteBuffer handle) { - this.handle = handle; - } - - private void lockAndInitHandle() throws LWJGLException { - doLockAndInitHandle(); - } - - public final synchronized void unlock() throws LWJGLException { - if (lock_count <= 0) throw new IllegalStateException("PeerInfo not locked!"); - if (Thread.currentThread() != locking_thread) - throw new IllegalStateException("PeerInfo already locked by " + locking_thread); - lock_count--; - if (lock_count == 0) { - doUnlock(); - locking_thread = null; - notify(); - } - } - - protected abstract void doLockAndInitHandle() throws LWJGLException; - - protected abstract void doUnlock() throws LWJGLException; - - public final synchronized ByteBuffer lockAndGetHandle() throws LWJGLException { - Thread this_thread = Thread.currentThread(); - while (locking_thread != null && locking_thread != this_thread) { - try { - wait(); - } catch (InterruptedException e) { - LWJGLUtil.log("Interrupted while waiting for PeerInfo lock: " + e); - } - } - if (lock_count == 0) { - locking_thread = this_thread; - doLockAndInitHandle(); - } - lock_count++; - return getHandle(); - } - - protected final ByteBuffer getHandle() { - return handle; - } - - public void destroy() {} -} diff --git a/src/main/java/org/lwjgl/opengl/PixelFormat.java b/src/main/java/org/lwjgl/opengl/PixelFormat.java deleted file mode 100644 index 0af132acc..000000000 --- a/src/main/java/org/lwjgl/opengl/PixelFormat.java +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - * This class describes pixel format properties for an OpenGL context. Instances of this class is used as arguments to - * Display.create(), Pbuffer.create() and AWTGLCanvas, to indicate minimum required properties. - *

- * Instants of this class are immutable. An example of the expected way to set the PixelFormat property values is the - * following: PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true); - *

- * WARNING: Some pixel formats are known to cause troubles on certain buggy drivers. Example: Under Windows, specifying - * samples != 0 will enable the ARB pixel format selection path, which could trigger a crash. - * - * @author elias_naur@sourceforge.net - * @version $Revision$ - */ -public final class PixelFormat implements PixelFormatLWJGL { - - /** - * The number of bits per pixel, exluding alpha. This parameter is ignored in Display.create(). - */ - private int bpp; - /** The number of alpha bits. */ - private int alpha; - /** The number of depth buffer bits */ - private int depth; - /** The number of stencil bits */ - private int stencil; - /** - * The number of samples to use in anti-aliasing. 0 means that anti-aliasing is disabled. - */ - private int samples; - /** - * The number of COLOR_SAMPLES_NV to use for Coverage Sample Anti-aliasing (CSAA). When this number is greater than - * 0, the {@code samples} property will be treated as if it were the COVERAGE_SAMPLES_NV property. - *

- * This property is currently a no-op for the MacOS implementation. - */ - private int colorSamples; - /** The number of auxiliary buffers */ - private int num_aux_buffers; - /** The number of bits per pixel in the accumulation buffer */ - private int accum_bpp; - /** The number of alpha bits in the accumulation buffer */ - private int accum_alpha; - /** Whether this format requires a stereo buffer */ - private boolean stereo; - /** Whether this format specifies a floating point format */ - private boolean floating_point; - /** - * Whether this format specifies a packed floating point format (32 bit unsigned - R11F_G11F_B10F) This property is - * currently a no-op for the MacOS implementation. - */ - private boolean floating_point_packed; - /** - * Whether this format specifies an sRGB format This property is currently a no-op for the MacOS implementation. - */ - private boolean sRGB; - - /** - * Default pixel format is minimum 8 bits depth, and no alpha nor stencil requirements. - */ - public PixelFormat() { - this(0, 8, 0); - } - - public PixelFormat(int alpha, int depth, int stencil) { - this(alpha, depth, stencil, 0); - } - - public PixelFormat(int alpha, int depth, int stencil, int samples) { - this(0, alpha, depth, stencil, samples); - } - - public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples) { - this(bpp, alpha, depth, stencil, samples, 0, 0, 0, false); - } - - public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, - int accum_alpha, boolean stereo) { - this(bpp, alpha, depth, stencil, samples, num_aux_buffers, accum_bpp, accum_alpha, stereo, false); - } - - public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, - int accum_alpha, boolean stereo, boolean floating_point) { - this.bpp = bpp; - this.alpha = alpha; - this.depth = depth; - this.stencil = stencil; - - this.samples = samples; - - this.num_aux_buffers = num_aux_buffers; - - this.accum_bpp = accum_bpp; - this.accum_alpha = accum_alpha; - - this.stereo = stereo; - - this.floating_point = floating_point; - this.floating_point_packed = false; - this.sRGB = false; - } - - private PixelFormat(final PixelFormat pf) { - this.bpp = pf.bpp; - this.alpha = pf.alpha; - this.depth = pf.depth; - this.stencil = pf.stencil; - - this.samples = pf.samples; - this.colorSamples = pf.colorSamples; - - this.num_aux_buffers = pf.num_aux_buffers; - - this.accum_bpp = pf.accum_bpp; - this.accum_alpha = pf.accum_alpha; - - this.stereo = pf.stereo; - - this.floating_point = pf.floating_point; - this.floating_point_packed = pf.floating_point_packed; - this.sRGB = pf.sRGB; - } - - public int getBitsPerPixel() { - return bpp; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel value. - * - * @param bpp the new bits per pixel value. - * - * @return the new PixelFormat - */ - public PixelFormat withBitsPerPixel(final int bpp) { - if (bpp < 0) throw new IllegalArgumentException("Invalid number of bits per pixel specified: " + bpp); - - final PixelFormat pf = new PixelFormat(this); - pf.bpp = bpp; - return pf; - } - - public int getAlphaBits() { - return alpha; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits value. - * - * @param alpha the new alpha bits value. - * - * @return the new PixelFormat - */ - public PixelFormat withAlphaBits(final int alpha) { - if (alpha < 0) throw new IllegalArgumentException("Invalid number of alpha bits specified: " + alpha); - - final PixelFormat pf = new PixelFormat(this); - pf.alpha = alpha; - return pf; - } - - public int getDepthBits() { - return depth; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new depth bits value. - * - * @param depth the new depth bits value. - * - * @return the new PixelFormat - */ - public PixelFormat withDepthBits(final int depth) { - if (depth < 0) throw new IllegalArgumentException("Invalid number of depth bits specified: " + depth); - - final PixelFormat pf = new PixelFormat(this); - pf.depth = depth; - return pf; - } - - public int getStencilBits() { - return stencil; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new stencil bits value. - * - * @param stencil the new stencil bits value. - * - * @return the new PixelFormat - */ - public PixelFormat withStencilBits(final int stencil) { - if (stencil < 0) throw new IllegalArgumentException("Invalid number of stencil bits specified: " + stencil); - - final PixelFormat pf = new PixelFormat(this); - pf.stencil = stencil; - return pf; - } - - public int getSamples() { - return samples; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new samples value. - * - * @param samples the new samples value. - * - * @return the new PixelFormat - */ - public PixelFormat withSamples(final int samples) { - if (samples < 0) throw new IllegalArgumentException("Invalid number of samples specified: " + samples); - - final PixelFormat pf = new PixelFormat(this); - pf.samples = samples; - return pf; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples values. A - * value greater than 0 is valid only if the {@code samples} property is also greater than 0. Additionally, the - * color samples value needs to be lower than or equal to the {@code samples} property. - * - * @param colorSamples the new color samples value. - * - * @return the new PixelFormat - */ - public PixelFormat withCoverageSamples(final int colorSamples) { - return withCoverageSamples(colorSamples, samples); - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples and - * coverage samples values. - * - * @param colorSamples the new color samples value. This value must be lower than or equal to the coverage - * samples value. - * @param coverageSamples the new coverage samples value. - * - * @return the new PixelFormat - */ - public PixelFormat withCoverageSamples(final int colorSamples, final int coverageSamples) { - if (coverageSamples < 0 || colorSamples < 0 - || (coverageSamples == 0 && 0 < colorSamples) - || coverageSamples < colorSamples) - throw new IllegalArgumentException( - "Invalid number of coverage samples specified: " + coverageSamples + " - " + colorSamples); - - final PixelFormat pf = new PixelFormat(this); - pf.samples = coverageSamples; - pf.colorSamples = colorSamples; - return pf; - } - - public int getAuxBuffers() { - return num_aux_buffers; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new auxiliary buffers - * value. - * - * @param num_aux_buffers the new auxiliary buffers value. - * - * @return the new PixelFormat - */ - public PixelFormat withAuxBuffers(final int num_aux_buffers) { - if (num_aux_buffers < 0) - throw new IllegalArgumentException("Invalid number of auxiliary buffers specified: " + num_aux_buffers); - - final PixelFormat pf = new PixelFormat(this); - pf.num_aux_buffers = num_aux_buffers; - return pf; - } - - public int getAccumulationBitsPerPixel() { - return accum_bpp; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel in the - * accumulation buffer value. - * - * @param accum_bpp the new bits per pixel in the accumulation buffer value. - * - * @return the new PixelFormat - */ - public PixelFormat withAccumulationBitsPerPixel(final int accum_bpp) { - if (accum_bpp < 0) throw new IllegalArgumentException( - "Invalid number of bits per pixel in the accumulation buffer specified: " + accum_bpp); - - final PixelFormat pf = new PixelFormat(this); - pf.accum_bpp = accum_bpp; - return pf; - } - - public int getAccumulationAlpha() { - return accum_alpha; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits in the - * accumulation buffer value. - * - * @param accum_alpha the new alpha bits in the accumulation buffer value. - * - * @return the new PixelFormat - */ - public PixelFormat withAccumulationAlpha(final int accum_alpha) { - if (accum_alpha < 0) throw new IllegalArgumentException( - "Invalid number of alpha bits in the accumulation buffer specified: " + accum_alpha); - - final PixelFormat pf = new PixelFormat(this); - pf.accum_alpha = accum_alpha; - return pf; - } - - public boolean isStereo() { - return stereo; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new stereo value. - * - * @param stereo the new stereo value. - * - * @return the new PixelFormat - */ - public PixelFormat withStereo(final boolean stereo) { - final PixelFormat pf = new PixelFormat(this); - pf.stereo = stereo; - return pf; - } - - public boolean isFloatingPoint() { - return floating_point; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new floating point value. - * If floating_point is true, floating_point_packed will be reset to false. - * - * @param floating_point the new floating point value. - * - * @return the new PixelFormat - */ - public PixelFormat withFloatingPoint(final boolean floating_point) { - final PixelFormat pf = new PixelFormat(this); - pf.floating_point = floating_point; - if (floating_point) pf.floating_point_packed = false; - return pf; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new packed floating point - * value. If floating_point_packed is true, floating_point will be reset to false. - * - * @param floating_point_packed the new packed floating point value. - * - * @return the new PixelFormat - */ - public PixelFormat withFloatingPointPacked(final boolean floating_point_packed) { - final PixelFormat pf = new PixelFormat(this); - pf.floating_point_packed = floating_point_packed; - if (floating_point_packed) pf.floating_point = false; - return pf; - } - - public boolean isSRGB() { - return sRGB; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new sRGB value. - * - * @param sRGB the new floating point value. - * - * @return the new PixelFormat - */ - public PixelFormat withSRGB(final boolean sRGB) { - final PixelFormat pf = new PixelFormat(this); - pf.sRGB = sRGB; - return pf; - } -} diff --git a/src/main/java/org/lwjgl/opengl/PixelFormatLWJGL.java b/src/main/java/org/lwjgl/opengl/PixelFormatLWJGL.java deleted file mode 100644 index 9747eb3a4..000000000 --- a/src/main/java/org/lwjgl/opengl/PixelFormatLWJGL.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2002-2011 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -/** - * [INTERNAL USE ONLY] - * - * @author Spasi - */ -public interface PixelFormatLWJGL { - // Marker interface -} diff --git a/src/main/java/org/lwjgl/opengl/RenderTexture.java b/src/main/java/org/lwjgl/opengl/RenderTexture.java deleted file mode 100644 index 70f1b5ac1..000000000 --- a/src/main/java/org/lwjgl/opengl/RenderTexture.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import static org.lwjgl3.opengl.GL11.*; - -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; - -/** This class represents the state necessary for render-to-texture. */ -public final class RenderTexture { - - // ---------------------------------------------------------------------------------- - // ----------------------------- WGL_ARB_render_texture ----------------------------- - // ---------------------------------------------------------------------------------- - - /* - * Accepted by the parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the - * and parameters of wglChoosePixelFormatARB: - */ - private static final int WGL_BIND_TO_TEXTURE_RGB_ARB = 0x2070; - private static final int WGL_BIND_TO_TEXTURE_RGBA_ARB = 0x2071; - - /* - * Accepted by the parameter of wglCreatePbufferARB and by the parameter of - * wglQueryPbufferARB: - */ - private static final int WGL_TEXTURE_FORMAT_ARB = 0x2072; - private static final int WGL_TEXTURE_TARGET_ARB = 0x2073; - private static final int WGL_MIPMAP_TEXTURE_ARB = 0x2074; - - /* - * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of - * wglQueryPbufferARB when is WGL_TEXTURE_FORMAT_ARB: - */ - private static final int WGL_TEXTURE_RGB_ARB = 0x2075; - private static final int WGL_TEXTURE_RGBA_ARB = 0x2076; - - /* - * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of - * wglQueryPbufferARB when is WGL_TEXTURE_TARGET_ARB: - */ - private static final int WGL_TEXTURE_CUBE_MAP_ARB = 0x2078; - private static final int WGL_TEXTURE_1D_ARB = 0x2079; - private static final int WGL_TEXTURE_2D_ARB = 0x207A; - private static final int WGL_NO_TEXTURE_ARB = 0x2077; - - /* - * Accepted by the parameter of wglSetPbufferAttribARB and by the parameter of - * wglQueryPbufferARB: - */ - static final int WGL_MIPMAP_LEVEL_ARB = 0x207B; - static final int WGL_CUBE_MAP_FACE_ARB = 0x207C; - - /* - * Accepted as a value in the parameter of wglSetPbufferAttribARB and returned in the value parameter - * of wglQueryPbufferARB when is WGL_CUBE_MAP_FACE_ARB: - */ - static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x207D; - static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x207E; - static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x207F; - static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x2080; - static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x2081; - static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082; - - /* - * Accepted by the parameter of wglBindTexImageARB and wglReleaseTexImageARB: - */ - static final int WGL_FRONT_LEFT_ARB = 0x2083; - static final int WGL_FRONT_RIGHT_ARB = 0x2084; - static final int WGL_BACK_LEFT_ARB = 0x2085; - static final int WGL_BACK_RIGHT_ARB = 0x2086; - - /* - * private static final int WGL_AUX0_ARB = 0x2087; private static final int WGL_AUX1_ARB = 0x2088; private static - * final int WGL_AUX2_ARB = 0x2089; private static final int WGL_AUX3_ARB = 0x208A; private static final int - * WGL_AUX4_ARB = 0x208B; private static final int WGL_AUX5_ARB = 0x208C; private static final int WGL_AUX6_ARB = - * 0x208D; private static final int WGL_AUX7_ARB = 0x208E; private static final int WGL_AUX8_ARB = 0x208F; private - * static final int WGL_AUX9_ARB = 0x2090; - */ - - // ------------------------------------------------------------------------------------------- - // ----------------------------- WGL_NV_render_texture_rectangle ----------------------------- - // ------------------------------------------------------------------------------------------- - - /* - * Accepted by the parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the - * and parameters of wglChoosePixelFormatARB: - */ - private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = 0x20A0; - private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = 0x20A1; - - /* - * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of - * wglQueryPbufferARB when is WGL_TEXTURE_TARGET_ARB: - */ - private static final int WGL_TEXTURE_RECTANGLE_NV = 0x20A2; - - // --------------------------------------------------------------------------------------- - // ----------------------------- WGL_NV_render_depth_texture ----------------------------- - // --------------------------------------------------------------------------------------- - - /* - * Accepted by the parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the - * and parameters of wglChoosePixelFormatARB: - */ - private static final int WGL_BIND_TO_TEXTURE_DEPTH_NV = 0x20A3; - private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = 0x20A4; - - /* - * Accepted by the parameter of wglCreatePbufferARB and by the parameter of - * wglQueryPbufferARB: - */ - private static final int WGL_DEPTH_TEXTURE_FORMAT_NV = 0x20A5; - - /* - * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of - * wglQueryPbufferARB when is WGL_DEPTH_TEXTURE_FORMAT_NV: - */ - private static final int WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6; - - /* - * Accepted by the parameter of wglBindTexImageARB: - */ - static final int WGL_DEPTH_COMPONENT_NV = 0x20A7; - - /** The TEXTURE_1D target. */ - public static final int RENDER_TEXTURE_1D = WGL_TEXTURE_1D_ARB; - - /** The TEXTURE_2D target. */ - public static final int RENDER_TEXTURE_2D = WGL_TEXTURE_2D_ARB; - - /** The TEXTURE_RECTANGLE target. */ - public static final int RENDER_TEXTURE_RECTANGLE = WGL_TEXTURE_RECTANGLE_NV; - - /** The TEXTURE_CUBE_MAP target. */ - public static final int RENDER_TEXTURE_CUBE_MAP = WGL_TEXTURE_CUBE_MAP_ARB; - - IntBuffer pixelFormatCaps; - IntBuffer pBufferAttribs; - - /** - * Creates a RenderTexture object for enabling render-to-texture on a P-buffer. - *

- * NOTE: Only one of useRGB and useRGBA can be true at the same time. - *

- * NOTE: useRGB(A) and useDepth can be true at the same time, thus allowing two different render textures. - *

- * NOTE: The target parameter can be one of the following: - *

- * RENDER_TEXTURE_1D RENDER_TEXTURE_2D RENDER_TEXTURE_RECTANGLE RENDER_TEXTURE_CUBE_MAP - * - * @param useRGB - When true the P-buffer can be used as an RGB render texture. - * @param useRGBA - When true the P-buffer can be used as an RGBA render texture. - * @param useDepth - When true the P-buffer can be used as a depth render texture. - * @param isRectangle - When true rectangle textures will be allowed on the P-buffer. - * @param target - The texture target of the render texture. - * @param mipmaps - How many mipmap levels to allocate on the P-buffer. - */ - public RenderTexture(boolean useRGB, boolean useRGBA, boolean useDepth, boolean isRectangle, int target, - int mipmaps) { - if (useRGB && useRGBA) throw new IllegalArgumentException("A RenderTexture can't be both RGB and RGBA."); - - if (mipmaps < 0) throw new IllegalArgumentException("The mipmap levels can't be negative."); - - if (isRectangle && target != RENDER_TEXTURE_RECTANGLE) throw new IllegalArgumentException( - "When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE."); - - pixelFormatCaps = BufferUtils.createIntBuffer(4); - pBufferAttribs = BufferUtils.createIntBuffer(8); - - if (useRGB) { - pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGL_BIND_TO_TEXTURE_RGB_ARB); - pixelFormatCaps.put(GL_TRUE); - - pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB); - pBufferAttribs.put(WGL_TEXTURE_RGB_ARB); - } else if (useRGBA) { - pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV : WGL_BIND_TO_TEXTURE_RGBA_ARB); - pixelFormatCaps.put(GL_TRUE); - - pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB); - pBufferAttribs.put(WGL_TEXTURE_RGBA_ARB); - } - - if (useDepth) { - pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV : WGL_BIND_TO_TEXTURE_DEPTH_NV); - pixelFormatCaps.put(GL_TRUE); - - pBufferAttribs.put(WGL_DEPTH_TEXTURE_FORMAT_NV); - pBufferAttribs.put(WGL_TEXTURE_DEPTH_COMPONENT_NV); - } - - pBufferAttribs.put(WGL_TEXTURE_TARGET_ARB); - pBufferAttribs.put(target); - - if (mipmaps != 0) { - pBufferAttribs.put(WGL_MIPMAP_TEXTURE_ARB); - pBufferAttribs.put(mipmaps); - } - - pixelFormatCaps.flip(); - pBufferAttribs.flip(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/SharedDrawable.java b/src/main/java/org/lwjgl/opengl/SharedDrawable.java deleted file mode 100644 index 159146327..000000000 --- a/src/main/java/org/lwjgl/opengl/SharedDrawable.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.LWJGLException; - -/** - * @author Spasi - */ - -/** - * A Drawable implementation that shares its context with another Drawable. This is useful for background loading of - * resources. See org.lwjgl3.test.opengl.multithread.BackgroundLoad for an example. - * - * @author Spasi - */ -public final class SharedDrawable extends DrawableGL { - - public SharedDrawable(final Drawable drawable) throws LWJGLException { - this.context = (ContextGL) ((DrawableLWJGL) drawable).createSharedContext(); - } - - public ContextGL createSharedContext() { - throw new UnsupportedOperationException(); - } -} diff --git a/src/main/java/org/lwjgl/opengl/Sync.java b/src/main/java/org/lwjgl/opengl/Sync.java deleted file mode 100644 index ce0f89b34..000000000 --- a/src/main/java/org/lwjgl/opengl/Sync.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2002-2012 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import org.lwjgl.Sys; - -/** - * A highly accurate sync method that continually adapts to the system it runs on to provide reliable results. - * - * @author Riven - * @author kappaOne - */ -class Sync { - - /** number of nano seconds in a second */ - private static final long NANOS_IN_SECOND = 1000L * 1000L * 1000L; - - /** The time to sleep/yield until the next frame */ - private static long nextFrame = 0; - - /** whether the initialisation code has run */ - private static boolean initialised = false; - - /** for calculating the averages the previous sleep/yield times are stored */ - private static RunningAvg sleepDurations = new RunningAvg(10); - - private static RunningAvg yieldDurations = new RunningAvg(10); - - /** - * An accurate sync method that will attempt to run at a constant frame rate. It should be called once every frame. - * - * @param fps - the desired frame rate, in frames per second - */ - public static void sync(int fps) { - if (fps <= 0) return; - if (!initialised) initialise(); - - try { - // sleep until the average sleep time is greater than the time remaining till nextFrame - for (long t0 = getTime(), t1; (nextFrame - t0) > sleepDurations.avg(); t0 = t1) { - Thread.sleep(1); - sleepDurations.add((t1 = getTime()) - t0); // update average sleep time - } - - // slowly dampen sleep average if too high to avoid yielding too much - sleepDurations.dampenForLowResTicker(); - - // yield until the average yield time is greater than the time remaining till nextFrame - for (long t0 = getTime(), t1; (nextFrame - t0) > yieldDurations.avg(); t0 = t1) { - Thread.yield(); - yieldDurations.add((t1 = getTime()) - t0); // update average yield time - } - } catch (InterruptedException e) { - - } - - // schedule next frame, drop frame(s) if already too late for next frame - nextFrame = Math.max(nextFrame + NANOS_IN_SECOND / fps, getTime()); - } - - /** - * This method will initialise the sync method by setting initial values for sleepDurations/yieldDurations and - * nextFrame. - * - * If running on windows it will start the sleep timer fix. - */ - private static void initialise() { - initialised = true; - - sleepDurations.init(1000 * 1000); - yieldDurations.init((int) (-(getTime() - getTime()) * 1.333)); - - nextFrame = getTime(); - - String osName = System.getProperty("os.name"); - - if (osName.startsWith("Win")) { - // On windows the sleep functions can be highly inaccurate by - // over 10ms making in unusable. However it can be forced to - // be a bit more accurate by running a separate sleeping daemon - // thread. - Thread timerAccuracyThread = new Thread(() -> { - try { - Thread.sleep(Long.MAX_VALUE); - } catch (Exception e) {} - }); - - timerAccuracyThread.setName("LWJGL Timer"); - timerAccuracyThread.setDaemon(true); - timerAccuracyThread.start(); - } - } - - /** - * Get the system time in nano seconds - * - * @return will return the current time in nano's - */ - private static long getTime() { - return (Sys.getTime() * NANOS_IN_SECOND) / Sys.getTimerResolution(); - } - - private static class RunningAvg { - - private final long[] slots; - private int offset; - - private static final long DAMPEN_THRESHOLD = 10 * 1000L * 1000L; // 10ms - private static final float DAMPEN_FACTOR = 0.9f; // don't change: 0.9f is exactly right! - - public RunningAvg(int slotCount) { - this.slots = new long[slotCount]; - this.offset = 0; - } - - public void init(long value) { - while (this.offset < this.slots.length) { - this.slots[this.offset++] = value; - } - } - - public void add(long value) { - this.slots[this.offset++ % this.slots.length] = value; - this.offset %= this.slots.length; - } - - public long avg() { - long sum = 0; - for (long slot : this.slots) { - sum += slot; - } - return sum / this.slots.length; - } - - public void dampenForLowResTicker() { - if (this.avg() > DAMPEN_THRESHOLD) { - for (int i = 0; i < this.slots.length; i++) { - this.slots[i] *= DAMPEN_FACTOR; - } - } - } - } -} diff --git a/src/main/java/org/lwjgl/opengl/Util.java b/src/main/java/org/lwjgl/opengl/Util.java deleted file mode 100644 index 2baeffdeb..000000000 --- a/src/main/java/org/lwjgl/opengl/Util.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.opengl; - -import static org.lwjgl3.opengl.ARBImaging.*; -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl3.opengl.GL30.*; - -/** - * Simple utility class. - * - * @author cix_foo - * @version $Revision$ - */ -public final class Util { - - /** No c'tor */ - private Util() {} - - /** - * Throws OpenGLException if glGetError() returns anything else than GL_NO_ERROR - * - */ - public static void checkGLError() throws OpenGLException {} - - /** - * Translate a GL error code to a String describing the error - */ - public static String translateGLErrorString(int error_code) { - return switch (error_code) { - case GL_NO_ERROR -> "No error"; - case GL_INVALID_ENUM -> "Invalid enum"; - case GL_INVALID_VALUE -> "Invalid value"; - case GL_INVALID_OPERATION -> "Invalid operation"; - case GL_STACK_OVERFLOW -> "Stack overflow"; - case GL_STACK_UNDERFLOW -> "Stack underflow"; - case GL_OUT_OF_MEMORY -> "Out of memory"; - case GL_TABLE_TOO_LARGE -> "Table too large"; - case GL_INVALID_FRAMEBUFFER_OPERATION -> "Invalid framebuffer operation"; - default -> null; - }; - } -} diff --git a/src/main/java/org/lwjgl/test/opengl/Gears.java b/src/main/java/org/lwjgl/test/opengl/Gears.java deleted file mode 100644 index 824fe0aa3..000000000 --- a/src/main/java/org/lwjgl/test/opengl/Gears.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * 3-D gear wheels. Originally by Brian Paul - */ -package org.lwjgl.test.opengl; - -import static org.lwjgl3.opengl.ARBTransposeMatrix.*; -import static org.lwjgl3.opengl.GL11.*; - -import java.nio.FloatBuffer; - -import org.lwjgl3.Version; -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.DisplayMode; -import org.lwjgl.opengl.GLContext; - -/** - *

- * This is the OpenGL "standard" Gears demo, originally by Brian Paul - *

- * - * @author Brian Matzon - * @version $Revision: 3418 $ $Id: Gears.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public class Gears { - - private float view_rotx = 20.0f; - - private float view_roty = 30.0f; - - private float view_rotz; - - private int gear1; - - private int gear2; - - private int gear3; - - private float angle; - - public static void main(String[] args) { - new Gears().execute(); - System.exit(0); - } - - /** - * - */ - private void execute() { - try { - init(); - } catch (LWJGLException le) { - le.printStackTrace(); - System.out.println("Failed to initialize Gears."); - return; - } - - loop(); - - destroy(); - } - - /** - * - */ - private void destroy() { - Display.destroy(); - } - - /** - * - */ - private void loop() { - long startTime = System.currentTimeMillis() + 5000; - long fps = 0; - - while (!Display.isCloseRequested()) { - angle += 2.0f; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); - glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); - glRotatef(view_roty, 0.0f, 1.0f, 0.0f); - glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); - - glPushMatrix(); - glTranslatef(-3.0f, -2.0f, 0.0f); - glRotatef(angle, 0.0f, 0.0f, 1.0f); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(3.1f, -2.0f, 0.0f); - glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef(-3.1f, 4.2f, 0.0f); - glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); - glCallList(gear3); - glPopMatrix(); - - glPopMatrix(); - - Display.update(); - if (startTime > System.currentTimeMillis()) { - fps++; - } else { - long timeUsed = 5000 + (startTime - System.currentTimeMillis()); - startTime = System.currentTimeMillis() + 5000; - System.out.println(fps + " frames in " + timeUsed / 1000f + " seconds = " + (fps / (timeUsed / 1000f))); - fps = 0; - } - } - } - - /** - * - */ - private void init() throws LWJGLException { - // create Window of size 300x300 - Display.setLocation( - (Display.getDisplayMode().getWidth() - 300) / 2, - (Display.getDisplayMode().getHeight() - 300) / 2); - Display.setDisplayMode(new DisplayMode(300, 300)); - Display.setTitle("Gears"); - Display.create(); - - // setup ogl - FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f }); - FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f }); - FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f }); - FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f }); - - pos.flip(); - red.flip(); - green.flip(); - blue.flip(); - - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); - - /* make the gears */ - gear1 = glGenLists(1); - glNewList(gear1, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); - gear(1.0f, 4.0f, 1.0f, 20, 0.7f); - glEndList(); - - gear2 = glGenLists(1); - glNewList(gear2, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); - gear(0.5f, 2.0f, 2.0f, 10, 0.7f); - glEndList(); - - gear3 = glGenLists(1); - glNewList(gear3, GL_COMPILE); - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); - gear(1.3f, 2.0f, 0.5f, 10, 0.7f); - glEndList(); - - glEnable(GL_NORMALIZE); - - glMatrixMode(GL_PROJECTION); - - System.err.println("LWJGL: " + Version.getVersion() + " / " + LWJGLUtil.getPlatformName()); - System.err.println("GL_VENDOR: " + glGetString(GL_VENDOR)); - System.err.println("GL_RENDERER: " + glGetString(GL_RENDERER)); - System.err.println("GL_VERSION: " + glGetString(GL_VERSION)); - System.err.println(); - System.err.println( - "glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix); - if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) { - // --- not using extensions - glLoadIdentity(); - } else { - // --- using extensions - final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16) - .put(new float[] { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }); - identityTranspose.flip(); - glLoadTransposeMatrixfARB(identityTranspose); - } - - float h = (float) 300 / (float) 300; - glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0f, 0.0f, -40.0f); - } - - /** - * Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of - * trig here. - * - * @param inner_radius radius of hole at center - * @param outer_radius radius at center of teeth - * @param width width of gear - * @param teeth number of teeth - * @param tooth_depth depth of tooth - */ - private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { - int i; - float r0, r1, r2; - float angle, da; - float u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth / 2.0f; - r2 = outer_radius + tooth_depth / 2.0f; - - da = 2.0f * (float) Math.PI / teeth / 4.0f; - - glShadeModel(GL_FLAT); - - glNormal3f(0.0f, 0.0f, 1.0f); - - /* draw front face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0f * (float) Math.PI / teeth; - glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); - glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); - if (i < teeth) { - glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); - glVertex3f( - r1 * (float) Math.cos(angle + 3.0f * da), - r1 * (float) Math.sin(angle + 3.0f * da), - width * 0.5f); - } - } - glEnd(); - - /* draw front sides of teeth */ - glBegin(GL_QUADS); - for (i = 0; i < teeth; i++) { - angle = i * 2.0f * (float) Math.PI / teeth; - glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); - glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); - glVertex3f( - r2 * (float) Math.cos(angle + 2.0f * da), - r2 * (float) Math.sin(angle + 2.0f * da), - width * 0.5f); - glVertex3f( - r1 * (float) Math.cos(angle + 3.0f * da), - r1 * (float) Math.sin(angle + 3.0f * da), - width * 0.5f); - } - glEnd(); - - /* draw back face */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0f * (float) Math.PI / teeth; - glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); - glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); - glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); - glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); - } - glEnd(); - - /* draw back sides of teeth */ - glBegin(GL_QUADS); - for (i = 0; i < teeth; i++) { - angle = i * 2.0f * (float) Math.PI / teeth; - glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); - glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); - glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); - glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); - } - glEnd(); - - /* draw outward faces of teeth */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i < teeth; i++) { - angle = i * 2.0f * (float) Math.PI / teeth; - glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); - glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); - u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle); - v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle); - len = (float) Math.sqrt(u * u + v * v); - u /= len; - v /= len; - glNormal3f(v, -u, 0.0f); - glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); - glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); - glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); - glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f); - glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); - u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da); - v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da); - glNormal3f(v, -u, 0.0f); - glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f); - glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); - glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); - } - glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f); - glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f); - glEnd(); - - glShadeModel(GL_SMOOTH); - - /* draw inside radius cylinder */ - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= teeth; i++) { - angle = i * 2.0f * (float) Math.PI / teeth; - glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f); - glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); - glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); - } - glEnd(); - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/AlienEntity.java b/src/main/java/org/lwjgl/test/spaceinvaders/AlienEntity.java deleted file mode 100644 index 250f655c3..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/AlienEntity.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -/** - * An entity which represents one of our space invader aliens. - * - * @author Kevin Glass - * @author Brian Matzon - */ -public class AlienEntity extends Entity { - - /** Movement made downwards when a border is hit */ - private static final int DOWNWARD_MOVEMENT = 10; - - /** Border at which player dies */ - private static final int BOTTOM_BORDER = 570; - - /** Right border at which to shift direction */ - private static final int RIGHT_BORDER = 750; - - /** Left border at which to shift direction */ - private static final int LEFT_BORDER = 10; - - /** The speed at which the alient moves horizontally */ - private float moveSpeed = 75; - - /** The game in which the entity exists */ - private Game game; - - /** The animation frames */ - private Sprite[] frames = new Sprite[4]; - - /** The time since the last frame change took place */ - private long lastFrameChange; - - /** The frame duration in milliseconds, i.e. how long any given frame of animation lasts */ - private long frameDuration = 250; - - /** The current frame of animation being displayed */ - private int frameNumber; - - /** - * Create a new alien entity - * - * @param game The game in which this entity is being created - * @param x The intial x location of this alien - * @param y The intial y location of this alient - */ - public AlienEntity(Game game, int x, int y) { - super(game.getSprite("alien.gif"), x, y); - - // setup the animatin frames - frames[0] = sprite; - frames[1] = game.getSprite("alien2.gif"); - frames[2] = sprite; - frames[3] = game.getSprite("alien3.gif"); - - this.game = game; - dx = -moveSpeed; - } - - /** - * Request that this alien moved based on time elapsed - * - * @param delta The time that has elapsed since last move - */ - public void move(long delta) { - // since the move tells us how much time has passed - // by we can use it to drive the animation, however - // its the not the prettiest solution - lastFrameChange += delta; - - // if we need to change the frame, update the frame number - // and flip over the sprite in use - if (lastFrameChange > frameDuration) { - // reset our frame change time counter - lastFrameChange = 0; - - // update the frame - frameNumber++; - if (frameNumber >= frames.length) { - frameNumber = 0; - } - - sprite = frames[frameNumber]; - } - - // if we have reached the left hand side of the screen and - // are moving left then request a logic update - if ((dx < 0) && (x < LEFT_BORDER)) { - game.updateLogic(); - } - // and vice vesa, if we have reached the right hand side of - // the screen and are moving right, request a logic update - if ((dx > 0) && (x > RIGHT_BORDER)) { - game.updateLogic(); - } - - // proceed with normal move - super.move(delta); - } - - /** - * Update the game logic related to aliens - */ - public void doLogic() { - // swap over horizontal movement and move down the - // screen a bit - dx = -dx; - y += DOWNWARD_MOVEMENT; - - // if we've reached the bottom of the screen then the player - // dies - if (y > BOTTOM_BORDER) { - game.notifyDeath(); - } - } - - /** - * Notification that this alien has collided with another entity - * - * @param other The other entity - */ - public void collidedWith(Entity other) { - // collisions with aliens are handled elsewhere - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/Entity.java b/src/main/java/org/lwjgl/test/spaceinvaders/Entity.java deleted file mode 100644 index 29175e42e..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/Entity.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -import java.awt.Rectangle; - -/** - * An entity represents any element that appears in the game. The entity is responsible for resolving collisions and - * movement based on a set of properties defined either by subclass or externally. - * - * Note that doubles are used for positions. This may seem strange given that pixels locations are integers. However, - * using double means that an entity can move a partial pixel. It doesn't of course mean that they will be display half - * way through a pixel but allows us not lose accuracy as we move. - * - * @author Kevin Glass - */ -public abstract class Entity { - - /** The current x location of this entity */ - protected float x; - - /** The current y location of this entity */ - protected float y; - - /** The sprite that represents this entity */ - protected Sprite sprite; - - /** The current speed of this entity horizontally (pixels/sec) */ - protected float dx; - - /** The current speed of this entity vertically (pixels/sec) */ - protected float dy; - - /** The rectangle used for this entity during collisions resolution */ - private Rectangle me = new Rectangle(); - - /** The rectangle used for other entities during collision resolution */ - private Rectangle him = new Rectangle(); - - /** - * Construct a entity based on a sprite image and a location. - * - * @param sprite The reference to the image to be displayed for this entity - * @param x The initial x location of this entity - * @param y The initial y location of this entity - */ - protected Entity(Sprite sprite, int x, int y) { - this.sprite = sprite; - this.x = x; - this.y = y; - } - - /** - * Request that this entity move itself based on a certain ammount of time passing. - * - * @param delta The ammount of time that has passed in milliseconds - */ - public void move(long delta) { - // update the location of the entity based on move speeds - x += (delta * dx) / 1000; - y += (delta * dy) / 1000; - } - - /** - * Set the horizontal speed of this entity - * - * @param dx The horizontal speed of this entity (pixels/sec) - */ - public void setHorizontalMovement(float dx) { - this.dx = dx; - } - - /** - * Set the vertical speed of this entity - * - * @param dy The vertical speed of this entity (pixels/sec) - */ - public void setVerticalMovement(float dy) { - this.dy = dy; - } - - /** - * Get the horizontal speed of this entity - * - * @return The horizontal speed of this entity (pixels/sec) - */ - public float getHorizontalMovement() { - return dx; - } - - /** - * Get the vertical speed of this entity - * - * @return The vertical speed of this entity (pixels/sec) - */ - public float getVerticalMovement() { - return dy; - } - - /** - * Draw this entity to the graphics context provided - */ - public void draw() { - sprite.draw((int) x, (int) y); - } - - /** - * Do the logic associated with this entity. This method will be called periodically based on game events - */ - public void doLogic() {} - - /** - * Get the x location of this entity - * - * @return The x location of this entity - */ - public int getX() { - return (int) x; - } - - /** - * Get the y location of this entity - * - * @return The y location of this entity - */ - public int getY() { - return (int) y; - } - - /** - * Check if this entity collised with another. - * - * @param other The other entity to check collision against - * @return True if the entities collide with each other - */ - public boolean collidesWith(Entity other) { - me.setBounds((int) x, (int) y, sprite.getWidth(), sprite.getHeight()); - him.setBounds((int) other.x, (int) other.y, other.sprite.getWidth(), other.sprite.getHeight()); - - return me.intersects(him); - } - - /** - * Notification that this entity collided with another. - * - * @param other The entity with which this entity collided. - */ - public abstract void collidedWith(Entity other); -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/Game.java b/src/main/java/org/lwjgl/test/spaceinvaders/Game.java deleted file mode 100644 index 586945a89..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/Game.java +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -import static org.lwjgl3.opengl.GL11.*; - -import java.util.ArrayList; - -import org.lwjgl.Sys; -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.DisplayMode; - -/** - * The main hook of our game. This class with both act as a manager for the display and central mediator for the game - * logic. - * - * Display management will consist of a loop that cycles round all entities in the game asking them to move and then - * drawing them in the appropriate place. With the help of an inner class it will also allow the player to control the - * main ship. - * - * As a mediator it will be informed when entities within our game detect events (e.g. alient killed, played died) and - * will take appropriate game actions. - * - *

- * NOTE:
- * This game is a LWJGLized implementation of the Space Invaders game by Kevin Glass. The original implementation is - * renderer agnostic and supports other OpenGL implementations as well as Java2D. This version has been made specific - * for LWJGL, and has added input control as well as sound (which the original doesn't, at the time of writing). You can - * find the original article here:
- * http://www.cokeandcode.com - *

- * - * @author Kevin Glass - * @author Brian Matzon - */ -public class Game { - - /** The normal title of the window */ - private String WINDOW_TITLE = "Space Invaders 104 (for LWJGL)"; - - /** The width of the game display area */ - private int width = 800; - - /** The height of the game display area */ - private int height = 600; - - /** The loader responsible for converting images into OpenGL textures */ - private TextureLoader textureLoader; - - /** The list of all the entities that exist in our game */ - private ArrayList entities = new ArrayList<>(); - - /** The list of entities that need to be removed from the game this loop */ - private ArrayList removeList = new ArrayList<>(); - - /** The entity representing the player */ - private ShipEntity ship; - - /** List of shots */ - private ShotEntity[] shots; - - /** The message to display which waiting for a key press */ - private Sprite message; - - /** The sprite containing the "Press Any Key" message */ - private Sprite pressAnyKey; - - /** The sprite containing the "You win!" message */ - private Sprite youWin; - - /** The sprite containing the "You lose!" message */ - private Sprite gotYou; - - /** Last shot index */ - private int shotIndex; - - /** The speed at which the player's ship should move (pixels/sec) */ - private float moveSpeed = 300; - - /** The time at which last fired a shot */ - private long lastFire; - - /** The interval between our players shot (ms) */ - private long firingInterval = 500; - - /** The number of aliens left on the screen */ - private int alienCount; - - /** True if we're holding up game play until a key has been pressed */ - private boolean waitingForKeyPress = true; - - /** True if game logic needs to be applied this loop, normally as a result of a game event */ - private boolean logicRequiredThisLoop; - - /** The time at which the last rendering looped started from the point of view of the game logic */ - private long lastLoopTime = getTime(); - - /** True if the fire key has been released */ - private boolean fireHasBeenReleased; - - /** The time since the last record of fps */ - private long lastFpsTime; - - /** The recorded fps */ - private int fps; - - private static long timerTicksPerSecond = Sys.getTimerResolution(); - - /** True if the game is currently "running", i.e. the game loop is looping */ - public static boolean gameRunning = true; - - /** SoundManager to make sound with */ - private SoundManager soundManager; - - /** Whether we're running in fullscreen mode */ - private boolean fullscreen; - - /** ID of shot effect */ - private int SOUND_SHOT; - - /** ID of hit effect */ - private int SOUND_HIT; - - /** ID of start sound */ - private int SOUND_START; - - /** ID of win sound */ - private int SOUND_WIN; - - /** ID of loose sound */ - private int SOUND_LOOSE; - - /** Mouse movement on x axis */ - private int mouseX; - - /** Is this an application or applet */ - private static boolean isApplication; - - /** - * Construct our game and set it running. - * - * @param fullscreen - * - */ - public Game(boolean fullscreen) { - this.fullscreen = fullscreen; - initialize(); - } - - /** - * Get the high resolution time in milliseconds - * - * @return The high resolution time in milliseconds - */ - public static long getTime() { - // we get the "timer ticks" from the high resolution timer - // multiply by 1000 so our end result is in milliseconds - // then divide by the number of ticks in a second giving - // us a nice clear time in milliseconds - return (Sys.getTime() * 1000) / timerTicksPerSecond; - } - - /** - * Sleep for a fixed number of milliseconds. - * - * @param duration The amount of time in milliseconds to sleep for - */ - public static void sleep(long duration) { - try { - Thread.sleep((duration * timerTicksPerSecond) / 1000); - } catch (InterruptedException inte) {} - } - - /** - * Intialise the common elements for the game - */ - public void initialize() { - // initialize the window beforehand - setDisplayMode(); - Display.setTitle(WINDOW_TITLE); - Display.setFullscreen(fullscreen); - Display.create(); - - // grab the mouse, dont want that hideous cursor when we're playing! - if (isApplication) { - Mouse.setGrabbed(true); - } - - // enable textures since we're going to use these for our sprites - glEnable(GL_TEXTURE_2D); - - // disable the OpenGL depth test since we're rendering 2D graphics - glDisable(GL_DEPTH_TEST); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glOrtho(0, width, height, 0, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glViewport(0, 0, Display.getFramebufferWidth(), Display.getFramebufferHeight()); - - textureLoader = new TextureLoader(); - - // create our sound manager, and initialize it with 7 channels - // 1 channel for sounds, 6 for effects - this should be enough - // since we have a most 4 shots on screen at any one time, which leaves - // us with 2 channels for explosions. - soundManager = new SoundManager(); - soundManager.initialize(8); - - // load our sound data - SOUND_SHOT = soundManager.addSound("shot.wav"); - SOUND_HIT = soundManager.addSound("hit.wav"); - SOUND_START = soundManager.addSound("start.wav"); - SOUND_WIN = soundManager.addSound("win.wav"); - SOUND_LOOSE = soundManager.addSound("loose.wav"); - - // get our sprites - gotYou = getSprite("gotyou.gif"); - pressAnyKey = getSprite("pressanykey.gif"); - youWin = getSprite("youwin.gif"); - - message = pressAnyKey; - - // setup 5 shots - shots = new ShotEntity[5]; - for (int i = 0; i < shots.length; i++) { - shots[i] = new ShotEntity(this, "shot.gif", 0, 0); - } - - // setup the initial game state - startGame(); - } - - /** - * Sets the display mode for fullscreen mode - */ - private boolean setDisplayMode() { - try { - // get modes - DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(width, height, -1, -1, -1, -1, 60, 60); - - org.lwjgl.util.Display.setDisplayMode( - dm, - new String[] { "width=" + width, "height=" + height, "freq=" + 60, - "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel() }); - return true; - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Unable to enter fullscreen, continuing in windowed mode"); - } - - return false; - } - - /** - * Start a fresh game, this should clear out any old data and create a new set. - */ - private void startGame() { - // clear out any existing entities and intialise a new set - entities.clear(); - initEntities(); - } - - /** - * Initialise the starting state of the entities (ship and aliens). Each entitiy will be added to the overall list - * of entities in the game. - */ - private void initEntities() { - // create the player ship and place it roughly in the center of the screen - ship = new ShipEntity(this, "ship.gif", 370, 550); - entities.add(ship); - - // create a block of aliens (5 rows, by 12 aliens, spaced evenly) - alienCount = 0; - for (int row = 0; row < 5; row++) { - for (int x = 0; x < 12; x++) { - Entity alien = new AlienEntity(this, 100 + (x * 50), (50) + row * 30); - entities.add(alien); - alienCount++; - } - } - } - - /** - * Notification from a game entity that the logic of the game should be run at the next opportunity (normally as a - * result of some game event) - */ - public void updateLogic() { - logicRequiredThisLoop = true; - } - - /** - * Remove an entity from the game. The entity removed will no longer move or be drawn. - * - * @param entity The entity that should be removed - */ - public void removeEntity(Entity entity) { - removeList.add(entity); - } - - /** - * Notification that the player has died. - */ - public void notifyDeath() { - if (!waitingForKeyPress) { - soundManager.playSound(SOUND_LOOSE); - } - message = gotYou; - waitingForKeyPress = true; - } - - /** - * Notification that the player has won since all the aliens are dead. - */ - public void notifyWin() { - message = youWin; - waitingForKeyPress = true; - soundManager.playSound(SOUND_WIN); - } - - /** - * Notification that an alien has been killed - */ - public void notifyAlienKilled() { - // reduce the alient count, if there are none left, the player has won! - alienCount--; - - if (alienCount == 0) { - notifyWin(); - } - - // if there are still some aliens left then they all need to get faster, so - // speed up all the existing aliens - for (Entity entity : entities) { - if (entity instanceof AlienEntity) { - // speed up by 2% - entity.setHorizontalMovement(entity.getHorizontalMovement() * 1.02f); - } - } - - soundManager.playEffect(SOUND_HIT); - } - - /** - * Attempt to fire a shot from the player. Its called "try" since we must first check that the player can fire at - * this point, i.e. has he/she waited long enough between shots - */ - public void tryToFire() { - // check that we have waiting long enough to fire - if (System.currentTimeMillis() - lastFire < firingInterval) { - return; - } - - // if we waited long enough, create the shot entity, and record the time. - lastFire = System.currentTimeMillis(); - ShotEntity shot = shots[shotIndex++ % shots.length]; - shot.reinitialize(ship.getX() + 10, ship.getY() - 30); - entities.add(shot); - - soundManager.playEffect(SOUND_SHOT); - } - - /** - * Run the main game loop. This method keeps rendering the scene and requesting that the callback update its screen. - */ - private void gameLoop() { - while (Game.gameRunning) { - // clear screen - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - // let subsystem paint - frameRendering(); - - // update window contents - Display.update(); - } - - // clean up - soundManager.destroy(); - Display.destroy(); - } - - /** - * Notification that a frame is being rendered. Responsible for running game logic and rendering the scene. - */ - public void frameRendering() { - // SystemTimer.sleep(lastLoopTime+10-SystemTimer.getTime()); - Display.sync(60); - - // work out how long its been since the last update, this - // will be used to calculate how far the entities should - // move this loop - long delta = getTime() - lastLoopTime; - lastLoopTime = getTime(); - lastFpsTime += delta; - fps++; - - // update our FPS counter if a second has passed - if (lastFpsTime >= 1000) { - Display.setTitle(WINDOW_TITLE + " (FPS: " + fps + ")"); - lastFpsTime = 0; - fps = 0; - } - - // cycle round asking each entity to move itself - if (!waitingForKeyPress && !soundManager.isPlayingSound()) { - for (Entity entity : entities) { - entity.move(delta); - } - } - - // cycle round drawing all the entities we have in the game - for (Entity entity : entities) { - entity.draw(); - } - - // brute force collisions, compare every entity against - // every other entity. If any of them collide notify - // both entities that the collision has occured - for (int p = 0; p < entities.size(); p++) { - for (int s = p + 1; s < entities.size(); s++) { - Entity me = entities.get(p); - Entity him = entities.get(s); - - if (me.collidesWith(him)) { - me.collidedWith(him); - him.collidedWith(me); - } - } - } - - // remove any entity that has been marked for clear up - entities.removeAll(removeList); - removeList.clear(); - - // if a game event has indicated that game logic should - // be resolved, cycle round every entity requesting that - // their personal logic should be considered. - if (logicRequiredThisLoop) { - for (Entity entity : entities) { - entity.doLogic(); - } - - logicRequiredThisLoop = false; - } - - // if we're waiting for an "any key" press then draw the - // current message - if (waitingForKeyPress) { - message.draw(325, 250); - } - - // resolve the movemfent of the ship. First assume the ship - // isn't moving. If either cursor key is pressed then - // update the movement appropraitely - ship.setHorizontalMovement(0); - - // get mouse movement on x axis. We need to get it now, since - // we can only call getDX ONCE! - secondary calls will yield 0, since - // there haven't been any movement since last call. - mouseX = Mouse.getDX(); - - // we delegate input checking to submethod since we want to check - // for keyboard, mouse & controller - boolean leftPressed = hasInput(Keyboard.KEY_LEFT); - boolean rightPressed = hasInput(Keyboard.KEY_RIGHT); - boolean firePressed = hasInput(Keyboard.KEY_SPACE); - - if (!waitingForKeyPress && !soundManager.isPlayingSound()) { - if ((leftPressed) && (!rightPressed)) { - ship.setHorizontalMovement(-moveSpeed); - } else if ((rightPressed) && (!leftPressed)) { - ship.setHorizontalMovement(moveSpeed); - } - - // if we're pressing fire, attempt to fire - if (firePressed) { - tryToFire(); - } - } else { - if (!firePressed) { - fireHasBeenReleased = true; - } - if ((firePressed) && (fireHasBeenReleased) && !soundManager.isPlayingSound()) { - waitingForKeyPress = false; - fireHasBeenReleased = false; - startGame(); - soundManager.playSound(SOUND_START); - } - } - - // if escape has been pressed, stop the game - if ((Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) && isApplication) { - Game.gameRunning = false; - } - } - - /** - * @param direction - * @return - */ - private boolean hasInput(int direction) { - return switch (direction) { - case Keyboard.KEY_LEFT -> Keyboard.isKeyDown(Keyboard.KEY_LEFT) || mouseX < 0; - case Keyboard.KEY_RIGHT -> Keyboard.isKeyDown(Keyboard.KEY_RIGHT) || mouseX > 0; - case Keyboard.KEY_SPACE -> Keyboard.isKeyDown(Keyboard.KEY_SPACE) || Mouse.isButtonDown(0); - default -> false; - }; - } - - /** - * The entry point into the game. We'll simply create an instance of class which will start the display and game - * loop. - * - * @param argv The arguments that are passed into our game - */ - public static void main(String argv[]) { - isApplication = true; - System.out.println("Use -fullscreen for fullscreen mode"); - new Game((argv.length > 0 && "-fullscreen".equalsIgnoreCase(argv[0]))).execute(); - System.exit(0); - } - - /** - * - */ - public void execute() { - gameLoop(); - } - - /** - * Create or get a sprite which displays the image that is pointed to in the classpath by "ref" - * - * @param ref A reference to the image to load - * @return A sprite that can be drawn onto the current graphics context. - */ - public Sprite getSprite(String ref) { - return new Sprite(textureLoader, ref); - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/ShipEntity.java b/src/main/java/org/lwjgl/test/spaceinvaders/ShipEntity.java deleted file mode 100644 index d668e3598..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/ShipEntity.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -/** - * The entity that represents the players ship - * - * @author Kevin Glass - * @author Brian Matzon - */ -public class ShipEntity extends Entity { - - /** Right border at which to disallow further movement */ - private static final int RIGHT_BORDER = 750; - - /** Left border at which to disallow further movement */ - private static final int LEFT_BORDER = 10; - - /** The game in which the ship exists */ - private Game game; - - /** - * Create a new entity to represent the players ship - * - * @param game The game in which the ship is being created - * @param ref The reference to the sprite to show for the ship - * @param x The initial x location of the player's ship - * @param y The initial y location of the player's ship - */ - public ShipEntity(Game game, String ref, int x, int y) { - super(game.getSprite(ref), x, y); - - this.game = game; - } - - /** - * Request that the ship move itself based on an elapsed ammount of time - * - * @param delta The time that has elapsed since last move (ms) - */ - public void move(long delta) { - // if we're moving left and have reached the left hand side - // of the screen, don't move - if ((dx < 0) && (x < LEFT_BORDER)) { - return; - } - // if we're moving right and have reached the right hand side - // of the screen, don't move - if ((dx > 0) && (x > RIGHT_BORDER)) { - return; - } - - super.move(delta); - } - - /** - * Notification that the player's ship has collided with something - * - * @param other The entity with which the ship has collided - */ - public void collidedWith(Entity other) { - // if its an alien, notify the game that the player - // is dead - if (other instanceof AlienEntity) { - game.notifyDeath(); - } - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/ShotEntity.java b/src/main/java/org/lwjgl/test/spaceinvaders/ShotEntity.java deleted file mode 100644 index 56b43c824..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/ShotEntity.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -/** - * An entity representing a shot fired by the player's ship - * - * @author Kevin Glass - * @author Brian Matzon - */ -public class ShotEntity extends Entity { - - /** Top border at which shots are outside */ - private static final int TOP_BORDER = -100; - - /** The vertical speed at which the players shot moves */ - private float moveSpeed = -300; - - /** The game in which this entity exists */ - private Game game; - - /** True if this shot has been "used", i.e. its hit something */ - private boolean used; - - /** - * Create a new shot from the player - * - * @param game The game in which the shot has been created - * @param sprite The sprite representing this shot - * @param x The initial x location of the shot - * @param y The initial y location of the shot - */ - public ShotEntity(Game game, String sprite, int x, int y) { - super(game.getSprite(sprite), x, y); - - this.game = game; - dy = moveSpeed; - } - - /** - * Reinitializes this entity, for reuse - * - * @param x new x coordinate - * @param y new y coordinate - */ - public void reinitialize(int x, int y) { - this.x = x; - this.y = y; - used = false; - } - - /** - * Request that this shot moved based on time elapsed - * - * @param delta The time that has elapsed since last move - */ - public void move(long delta) { - // proceed with normal move - super.move(delta); - - // if we shot off the screen, remove ourselfs - if (y < TOP_BORDER) { - game.removeEntity(this); - } - } - - /** - * Notification that this shot has collided with another entity - * - * @param other The other entity with which we've collided - */ - public void collidedWith(Entity other) { - // prevents double kills, if we've already hit something, - // don't collide - if (used) { - return; - } - - // if we've hit an alien, kill it! - if (other instanceof AlienEntity) { - // remove the affected entities - game.removeEntity(this); - game.removeEntity(other); - - // notify the game that the alien has been killed - game.notifyAlienKilled(); - used = true; - } - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/SoundManager.java b/src/main/java/org/lwjgl/test/spaceinvaders/SoundManager.java deleted file mode 100644 index 7718291d5..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/SoundManager.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.openal.AL; -import org.lwjgl.openal.AL10; -import org.lwjgl.util.WaveData; - -/** - *

- * Simple sound manager for OpenAL using n sources accessed in a round robin schedule. Source n is reserved for a single - * buffer and checking for whether it's playing. - *

- * - * @author Brian Matzon - * @version $Revision$ $Id$ - */ -public class SoundManager { - - /** We support at most 256 buffers */ - private int[] buffers = new int[256]; - - /** Number of sources is limited tby user (and hardware) */ - private int[] sources; - - /** Our internal scratch buffer */ - private IntBuffer scratchBuffer = BufferUtils.createIntBuffer(256); - - /** Whether we're running in no sound mode */ - private boolean soundOutput; - - /** Current index in our buffers */ - private int bufferIndex; - - /** Current index in our source list */ - private int sourceIndex; - - /** - * Creates a new SoundManager - */ - public SoundManager() {} - - /** - * Plays a sound effect - * - * @param buffer Buffer index to play gotten from addSound - */ - public void playEffect(int buffer) { - if (soundOutput) { - // make sure we never choose last channel, since it is used for special sounds - int channel = sources[(sourceIndex++ % (sources.length - 1))]; - - // link buffer and source, and play it - AL10.alSourcei(channel, AL10.AL_BUFFER, buffers[buffer]); - AL10.alSourcePlay(channel); - } - } - - /** - * Plays a sound on last source - * - * @param buffer Buffer index to play gotten from addSound - */ - public void playSound(int buffer) { - if (soundOutput) { - AL10.alSourcei(sources[sources.length - 1], AL10.AL_BUFFER, buffers[buffer]); - AL10.alSourcePlay(sources[sources.length - 1]); - } - } - - /** - * Whether a sound is playing on last source - * - * @return true if a source is playing right now on source n - */ - public boolean isPlayingSound() { - return AL10.alGetSourcei(sources[sources.length - 1], AL10.AL_SOURCE_STATE) == AL10.AL_PLAYING; - } - - /** - * Initializes the SoundManager - * - * @param channels Number of channels to create - */ - public void initialize(int channels) { - try { - AL.create(); - - // allocate sources - scratchBuffer.limit(channels); - AL10.alGenSources(scratchBuffer); - scratchBuffer.rewind(); - scratchBuffer.get(sources = new int[channels]); - - // could we allocate all channels? - if (AL10.alGetError() != AL10.AL_NO_ERROR) { - throw new LWJGLException("Unable to allocate " + channels + " sources"); - } - - // we have sound - soundOutput = true; - } catch (LWJGLException le) { - le.printStackTrace(); - System.out.println("Sound disabled"); - } - } - - /** - * Adds a sound to the Sound Managers pool - * - * @param path Path to file to load - * @return index into SoundManagers buffer list - */ - public int addSound(String path) { - // Generate 1 buffer entry - scratchBuffer.rewind().position(0).limit(1); - AL10.alGenBuffers(scratchBuffer); - buffers[bufferIndex] = scratchBuffer.get(0); - - // load wave data from buffer - WaveData wavefile = WaveData.create("spaceinvaders/" + path); - - // copy to buffers - AL10.alBufferData(buffers[bufferIndex], wavefile.format, wavefile.data, wavefile.samplerate); - - // unload file again - wavefile.dispose(); - - // return index for this sound - return bufferIndex++; - } - - /** - * Destroy this SoundManager - */ - public void destroy() { - if (soundOutput) { - - // stop playing sounds - scratchBuffer.position(0).limit(sources.length); - scratchBuffer.put(sources).flip(); - AL10.alSourceStop(scratchBuffer); - - // destroy sources - AL10.alDeleteSources(scratchBuffer); - - // destroy buffers - scratchBuffer.position(0).limit(bufferIndex); - scratchBuffer.put(buffers, 0, bufferIndex).flip(); - AL10.alDeleteBuffers(scratchBuffer); - - // destory OpenAL - AL.destroy(); - } - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/Sprite.java b/src/main/java/org/lwjgl/test/spaceinvaders/Sprite.java deleted file mode 100644 index 66c724eda..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/Sprite.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -import static org.lwjgl3.opengl.GL11.*; - -import java.io.IOException; - -/** - * Implementation of sprite that uses an OpenGL quad and a texture to render a given image to the screen. - * - * @author Kevin Glass - * @author Brian Matzon - */ -public class Sprite { - - /** The texture that stores the image for this sprite */ - private Texture texture; - - /** The width in pixels of this sprite */ - private int width; - - /** The height in pixels of this sprite */ - private int height; - - /** - * Create a new sprite from a specified image. - * - * @param loader the texture loader to use - * @param ref A reference to the image on which this sprite should be based - */ - public Sprite(TextureLoader loader, String ref) { - try { - texture = loader.getTexture("spaceinvaders/" + ref); - width = texture.getImageWidth(); - height = texture.getImageHeight(); - } catch (IOException ioe) { - ioe.printStackTrace(); - System.exit(-1); - } - } - - /** - * Get the width of this sprite in pixels - * - * @return The width of this sprite in pixels - */ - public int getWidth() { - return texture.getImageWidth(); - } - - /** - * Get the height of this sprite in pixels - * - * @return The height of this sprite in pixels - */ - public int getHeight() { - return texture.getImageHeight(); - } - - /** - * Draw the sprite at the specified location - * - * @param x The x location at which to draw this sprite - * @param y The y location at which to draw this sprite - */ - public void draw(int x, int y) { - // store the current model matrix - glPushMatrix(); - - // bind to the appropriate texture for this sprite - texture.bind(); - - // translate to the right location and prepare to draw - glTranslatef(x, y, 0); - - // draw a quad textured to match the sprite - glBegin(GL_QUADS); - { - glTexCoord2f(0, 0); - glVertex2f(0, 0); - - glTexCoord2f(0, texture.getHeight()); - glVertex2f(0, height); - - glTexCoord2f(texture.getWidth(), texture.getHeight()); - glVertex2f(width, height); - - glTexCoord2f(texture.getWidth(), 0); - glVertex2f(width, 0); - } - glEnd(); - - // restore the model view matrix to prevent contamination - glPopMatrix(); - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/Texture.java b/src/main/java/org/lwjgl/test/spaceinvaders/Texture.java deleted file mode 100644 index 944cf997d..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/Texture.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -import static org.lwjgl3.opengl.GL11.*; - -/** - * A texture to be bound within OpenGL. This object is responsible for keeping track of a given OpenGL texture and for - * calculating the texturing mapping coordinates of the full image. - * - * Since textures need to be powers of 2 the actual texture may be considerably bigged that the source image and hence - * the texture mapping coordinates need to be adjusted to matchup drawing the sprite against the texture. - * - * @author Kevin Glass - * @author Brian Matzon - */ -public class Texture { - - /** The GL target type */ - private int target; - - /** The GL texture ID */ - private int textureID; - - /** The height of the image */ - private int height; - - /** The width of the image */ - private int width; - - /** The width of the texture */ - private int texWidth; - - /** The height of the texture */ - private int texHeight; - - /** The ratio of the width of the image to the texture */ - private float widthRatio; - - /** The ratio of the height of the image to the texture */ - private float heightRatio; - - /** - * Create a new texture - * - * @param target The GL target - * @param textureID The GL texture ID - */ - public Texture(int target, int textureID) { - this.target = target; - this.textureID = textureID; - } - - /** - * Bind the specified GL context to a texture - */ - public void bind() { - glBindTexture(target, textureID); - } - - /** - * Set the height of the image - * - * @param height The height of the image - */ - public void setHeight(int height) { - this.height = height; - setHeight(); - } - - /** - * Set the width of the image - * - * @param width The width of the image - */ - public void setWidth(int width) { - this.width = width; - setWidth(); - } - - /** - * Get the height of the original image - * - * @return The height of the original image - */ - public int getImageHeight() { - return height; - } - - /** - * Get the width of the original image - * - * @return The width of the original image - */ - public int getImageWidth() { - return width; - } - - /** - * Get the height of the physical texture - * - * @return The height of physical texture - */ - public float getHeight() { - return heightRatio; - } - - /** - * Get the width of the physical texture - * - * @return The width of physical texture - */ - public float getWidth() { - return widthRatio; - } - - /** - * Set the height of this texture - * - * @param texHeight The height of the texture - */ - public void setTextureHeight(int texHeight) { - this.texHeight = texHeight; - setHeight(); - } - - /** - * Set the width of this texture - * - * @param texWidth The width of the texture - */ - public void setTextureWidth(int texWidth) { - this.texWidth = texWidth; - setWidth(); - } - - /** - * Set the height of the texture. This will update the ratio also. - */ - private void setHeight() { - if (texHeight != 0) { - heightRatio = ((float) height) / texHeight; - } - } - - /** - * Set the width of the texture. This will update the ratio also. - */ - private void setWidth() { - if (texWidth != 0) { - widthRatio = ((float) width) / texWidth; - } - } -} diff --git a/src/main/java/org/lwjgl/test/spaceinvaders/TextureLoader.java b/src/main/java/org/lwjgl/test/spaceinvaders/TextureLoader.java deleted file mode 100644 index b7de91648..000000000 --- a/src/main/java/org/lwjgl/test/spaceinvaders/TextureLoader.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.test.spaceinvaders; - -import static org.lwjgl3.opengl.GL11.*; - -import java.awt.Color; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.color.ColorSpace; -import java.awt.image.BufferedImage; -import java.awt.image.ColorModel; -import java.awt.image.ComponentColorModel; -import java.awt.image.DataBuffer; -import java.awt.image.DataBufferByte; -import java.awt.image.Raster; -import java.awt.image.WritableRaster; -import java.io.IOException; -import java.net.URL; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.IntBuffer; -import java.util.HashMap; -import java.util.Hashtable; - -import javax.swing.ImageIcon; - -import org.lwjgl.BufferUtils; - -/** - * A utility class to load textures for OpenGL. This source is based on a texture that can be found in the Java Gaming - * (www.javagaming.org) Wiki. It has been simplified slightly for explicit 2D graphics use. - * - * OpenGL uses a particular image format. Since the images that are loaded from disk may not match this format this - * loader introduces a intermediate image which the source image is copied into. In turn, this image is used as source - * for the OpenGL texture. - * - * @author Kevin Glass - * @author Brian Matzon - */ -public class TextureLoader { - - /** The table of textures that have been loaded in this loader */ - private HashMap table = new HashMap<>(); - - /** The colour model including alpha for the GL image */ - private ColorModel glAlphaColorModel; - - /** The colour model for the GL image */ - private ColorModel glColorModel; - - /** Scratch buffer for texture ID's */ - private IntBuffer textureIDBuffer = BufferUtils.createIntBuffer(1); - - /** - * Create a new texture loader based on the game panel - */ - public TextureLoader() { - glAlphaColorModel = new ComponentColorModel( - ColorSpace.getInstance(ColorSpace.CS_sRGB), - new int[] { 8, 8, 8, 8 }, - true, - false, - ComponentColorModel.TRANSLUCENT, - DataBuffer.TYPE_BYTE); - - glColorModel = new ComponentColorModel( - ColorSpace.getInstance(ColorSpace.CS_sRGB), - new int[] { 8, 8, 8, 0 }, - false, - false, - ComponentColorModel.OPAQUE, - DataBuffer.TYPE_BYTE); - } - - /** - * Create a new texture ID - * - * @return A new texture ID - */ - private int createTextureID() { - glGenTextures(textureIDBuffer); - return textureIDBuffer.get(0); - } - - /** - * Load a texture - * - * @param resourceName The location of the resource to load - * @return The loaded texture - * @throws IOException Indicates a failure to access the resource - */ - public Texture getTexture(String resourceName) throws IOException { - Texture tex = table.get(resourceName); - - if (tex != null) { - return tex; - } - - tex = getTexture( - resourceName, - GL_TEXTURE_2D, // target - GL_RGBA, // dst pixel format - GL_LINEAR, // min filter (unused) - GL_LINEAR); - - table.put(resourceName, tex); - - return tex; - } - - /** - * Load a texture into OpenGL from a image reference on disk. - * - * @param resourceName The location of the resource to load - * @param target The GL target to load the texture against - * @param dstPixelFormat The pixel format of the screen - * @param minFilter The minimising filter - * @param magFilter The magnification filter - * @return The loaded texture - * @throws IOException Indicates a failure to access the resource - */ - public Texture getTexture(String resourceName, int target, int dstPixelFormat, int minFilter, int magFilter) - throws IOException { - int srcPixelFormat; - - // create the texture ID for this texture - int textureID = createTextureID(); - Texture texture = new Texture(target, textureID); - - // bind this texture - glBindTexture(target, textureID); - - BufferedImage bufferedImage = loadImage(resourceName); - texture.setWidth(bufferedImage.getWidth()); - texture.setHeight(bufferedImage.getHeight()); - - if (bufferedImage.getColorModel().hasAlpha()) { - srcPixelFormat = GL_RGBA; - } else { - srcPixelFormat = GL_RGB; - } - - // convert that image into a byte buffer of texture data - ByteBuffer textureBuffer = convertImageData(bufferedImage, texture); - - if (target == GL_TEXTURE_2D) { - glTexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilter); - glTexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilter); - } - - // produce a texture from the byte buffer - glTexImage2D( - target, - 0, - dstPixelFormat, - get2Fold(bufferedImage.getWidth()), - get2Fold(bufferedImage.getHeight()), - 0, - srcPixelFormat, - GL_UNSIGNED_BYTE, - textureBuffer); - - return texture; - } - - /** - * Get the closest greater power of 2 to the fold number - * - * @param fold The target number - * @return The power of 2 - */ - private static int get2Fold(int fold) { - int ret = 2; - while (ret < fold) { - ret *= 2; - } - return ret; - } - - /** - * Convert the buffered image to a texture - * - * @param bufferedImage The image to convert to a texture - * @param texture The texture to store the data into - * @return A buffer containing the data - */ - private ByteBuffer convertImageData(BufferedImage bufferedImage, Texture texture) { - ByteBuffer imageBuffer; - WritableRaster raster; - BufferedImage texImage; - - int texWidth = 2; - int texHeight = 2; - - // find the closest power of 2 for the width and height - // of the produced texture - while (texWidth < bufferedImage.getWidth()) { - texWidth *= 2; - } - while (texHeight < bufferedImage.getHeight()) { - texHeight *= 2; - } - - texture.setTextureHeight(texHeight); - texture.setTextureWidth(texWidth); - - // create a raster that can be used by OpenGL as a source - // for a texture - if (bufferedImage.getColorModel().hasAlpha()) { - raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, texWidth, texHeight, 4, null); - texImage = new BufferedImage(glAlphaColorModel, raster, false, new Hashtable<>()); - } else { - raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, texWidth, texHeight, 3, null); - texImage = new BufferedImage(glColorModel, raster, false, new Hashtable<>()); - } - - // copy the source image into the produced image - Graphics g = texImage.getGraphics(); - g.setColor(new Color(0f, 0f, 0f, 0f)); - g.fillRect(0, 0, texWidth, texHeight); - g.drawImage(bufferedImage, 0, 0, null); - - // build a byte buffer from the temporary image - // that be used by OpenGL to produce a texture. - byte[] data = ((DataBufferByte) texImage.getRaster().getDataBuffer()).getData(); - - imageBuffer = ByteBuffer.allocateDirect(data.length); - imageBuffer.order(ByteOrder.nativeOrder()); - imageBuffer.put(data, 0, data.length); - imageBuffer.flip(); - - return imageBuffer; - } - - /** - * Load a given resource as a buffered image - * - * @param ref The location of the resource to load - * @return The loaded buffered image - * @throws IOException Indicates a failure to find a resource - */ - private BufferedImage loadImage(String ref) throws IOException { - URL url = TextureLoader.class.getClassLoader().getResource(ref); - - if (url == null) { - throw new IOException("Cannot find: " + ref); - } - - // due to an issue with ImageIO and mixed signed code - // we are now using good oldfashioned ImageIcon to load - // images and the paint it on top of a new BufferedImage - Image img = new ImageIcon(url).getImage(); - BufferedImage bufferedImage = new BufferedImage( - img.getWidth(null), - img.getHeight(null), - BufferedImage.TYPE_INT_RGB); - Graphics g = bufferedImage.getGraphics(); - g.drawImage(img, 0, 0, null); - g.dispose(); - - return bufferedImage; - } -} diff --git a/src/main/java/org/lwjgl/util/Color.java b/src/main/java/org/lwjgl/util/Color.java deleted file mode 100644 index c9663468d..000000000 --- a/src/main/java/org/lwjgl/util/Color.java +++ /dev/null @@ -1,486 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.io.Serializable; -import java.nio.ByteBuffer; - -/** - * A mutable Color class - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public final class Color implements ReadableColor, Serializable, WritableColor { - - static final long serialVersionUID = 1L; - - /** Color components, publicly accessible */ - private byte red, green, blue, alpha; - - /** - * Constructor for Color. - */ - public Color() { - this(0, 0, 0, 255); - } - - /** - * Constructor for Color. Alpha defaults to 255. - */ - public Color(int r, int g, int b) { - this(r, g, b, 255); - } - - /** - * Constructor for Color. Alpha defaults to 255. - */ - public Color(byte r, byte g, byte b) { - this(r, g, b, (byte) 255); - } - - /** - * Constructor for Color. - */ - public Color(int r, int g, int b, int a) { - set(r, g, b, a); - } - - /** - * Constructor for Color. - */ - public Color(byte r, byte g, byte b, byte a) { - set(r, g, b, a); - } - - /** - * Constructor for Color - */ - public Color(ReadableColor c) { - setColor(c); - } - - /** - * Set a color - */ - public void set(int r, int g, int b, int a) { - red = (byte) r; - green = (byte) g; - blue = (byte) b; - alpha = (byte) a; - } - - /** - * Set a color - */ - public void set(byte r, byte g, byte b, byte a) { - this.red = r; - this.green = g; - this.blue = b; - this.alpha = a; - } - - /** - * Set a color - */ - public void set(int r, int g, int b) { - set(r, g, b, 255); - } - - /** - * Set a color - */ - public void set(byte r, byte g, byte b) { - set(r, g, b, (byte) 255); - } - - /** - * Accessor - */ - public int getRed() { - return red & 0xFF; - } - - /** - * Accessor - */ - public int getGreen() { - return green & 0xFF; - } - - /** - * Accessor - */ - public int getBlue() { - return blue & 0xFF; - } - - /** - * Accessor - */ - public int getAlpha() { - return alpha & 0xFF; - } - - /** - * Set the Red component - */ - public void setRed(int red) { - this.red = (byte) red; - } - - /** - * Set the Green component - */ - public void setGreen(int green) { - this.green = (byte) green; - } - - /** - * Set the Blue component - */ - public void setBlue(int blue) { - this.blue = (byte) blue; - } - - /** - * Set the Alpha component - */ - public void setAlpha(int alpha) { - this.alpha = (byte) alpha; - } - - /** - * Set the Red component - */ - public void setRed(byte red) { - this.red = red; - } - - /** - * Set the Green component - */ - public void setGreen(byte green) { - this.green = green; - } - - /** - * Set the Blue component - */ - public void setBlue(byte blue) { - this.blue = blue; - } - - /** - * Set the Alpha component - */ - public void setAlpha(byte alpha) { - this.alpha = alpha; - } - - /** - * Stringify - */ - public String toString() { - return "Color [" + getRed() + ", " + getGreen() + ", " + getBlue() + ", " + getAlpha() + "]"; - } - - /** - * Equals - */ - public boolean equals(Object o) { - return (o != null) && (o instanceof ReadableColor) - && (((ReadableColor) o).getRed() == this.getRed()) - && (((ReadableColor) o).getGreen() == this.getGreen()) - && (((ReadableColor) o).getBlue() == this.getBlue()) - && (((ReadableColor) o).getAlpha() == this.getAlpha()); - } - - /** - * Hashcode - */ - public int hashCode() { - return (red << 24) | (green << 16) | (blue << 8) | alpha; - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getAlphaByte() - */ - public byte getAlphaByte() { - return alpha; - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getBlueByte() - */ - public byte getBlueByte() { - return blue; - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getGreenByte() - */ - public byte getGreenByte() { - return green; - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getRedByte() - */ - public byte getRedByte() { - return red; - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeRGBA(java.nio.ByteBuffer) - */ - public void writeRGBA(ByteBuffer dest) { - dest.put(red); - dest.put(green); - dest.put(blue); - dest.put(alpha); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeRGB(java.nio.ByteBuffer) - */ - public void writeRGB(ByteBuffer dest) { - dest.put(red); - dest.put(green); - dest.put(blue); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeABGR(java.nio.ByteBuffer) - */ - public void writeABGR(ByteBuffer dest) { - dest.put(alpha); - dest.put(blue); - dest.put(green); - dest.put(red); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeARGB(java.nio.ByteBuffer) - */ - public void writeARGB(ByteBuffer dest) { - dest.put(alpha); - dest.put(red); - dest.put(green); - dest.put(blue); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeBGR(java.nio.ByteBuffer) - */ - public void writeBGR(ByteBuffer dest) { - dest.put(blue); - dest.put(green); - dest.put(red); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeBGRA(java.nio.ByteBuffer) - */ - public void writeBGRA(ByteBuffer dest) { - dest.put(blue); - dest.put(green); - dest.put(red); - dest.put(alpha); - } - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - public void readRGBA(ByteBuffer src) { - red = src.get(); - green = src.get(); - blue = src.get(); - alpha = src.get(); - } - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - public void readRGB(ByteBuffer src) { - red = src.get(); - green = src.get(); - blue = src.get(); - } - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - public void readARGB(ByteBuffer src) { - alpha = src.get(); - red = src.get(); - green = src.get(); - blue = src.get(); - } - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - public void readBGRA(ByteBuffer src) { - blue = src.get(); - green = src.get(); - red = src.get(); - alpha = src.get(); - } - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - public void readBGR(ByteBuffer src) { - blue = src.get(); - green = src.get(); - red = src.get(); - } - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - public void readABGR(ByteBuffer src) { - alpha = src.get(); - blue = src.get(); - green = src.get(); - red = src.get(); - } - - /** - * Set this color's color by copying another color - * - * @param src The source color - */ - public void setColor(ReadableColor src) { - red = src.getRedByte(); - green = src.getGreenByte(); - blue = src.getBlueByte(); - alpha = src.getAlphaByte(); - } - - /** - * HSB to RGB conversion, pinched from java.awt.Color. - * - * @param hue (0..1.0f) - * @param saturation (0..1.0f) - * @param brightness (0..1.0f) - */ - public void fromHSB(float hue, float saturation, float brightness) { - if (saturation == 0.0F) { - red = green = blue = (byte) (brightness * 255F + 0.5F); - } else { - float f3 = (hue - (float) Math.floor(hue)) * 6F; - float f4 = f3 - (float) Math.floor(f3); - float f5 = brightness * (1.0F - saturation); - float f6 = brightness * (1.0F - saturation * f4); - float f7 = brightness * (1.0F - saturation * (1.0F - f4)); - switch ((int) f3) { - case 0 -> { - red = (byte) (brightness * 255F + 0.5F); - green = (byte) (f7 * 255F + 0.5F); - blue = (byte) (f5 * 255F + 0.5F); - } - case 1 -> { - red = (byte) (f6 * 255F + 0.5F); - green = (byte) (brightness * 255F + 0.5F); - blue = (byte) (f5 * 255F + 0.5F); - } - case 2 -> { - red = (byte) (f5 * 255F + 0.5F); - green = (byte) (brightness * 255F + 0.5F); - blue = (byte) (f7 * 255F + 0.5F); - } - case 3 -> { - red = (byte) (f5 * 255F + 0.5F); - green = (byte) (f6 * 255F + 0.5F); - blue = (byte) (brightness * 255F + 0.5F); - } - case 4 -> { - red = (byte) (f7 * 255F + 0.5F); - green = (byte) (f5 * 255F + 0.5F); - blue = (byte) (brightness * 255F + 0.5F); - } - case 5 -> { - red = (byte) (brightness * 255F + 0.5F); - green = (byte) (f5 * 255F + 0.5F); - blue = (byte) (f6 * 255F + 0.5F); - } - } - } - } - - /** - * RGB to HSB conversion, pinched from java.awt.Color. The HSB value is returned in dest[] if dest[] is supplied. - * Values range from 0..1 - * - * @param dest Destination floats, or null - * @return dest, or a new float array - */ - public float[] toHSB(float dest[]) { - int r = getRed(); - int g = getGreen(); - int b = getBlue(); - if (dest == null) dest = new float[3]; - int l = r <= g ? g : r; - if (b > l) l = b; - int i1 = r >= g ? g : r; - if (b < i1) i1 = b; - float brightness = l / 255F; - float saturation; - if (l != 0) saturation = (float) (l - i1) / (float) l; - else saturation = 0.0F; - float hue; - if (saturation == 0.0F) { - hue = 0.0F; - } else { - float f3 = (float) (l - r) / (float) (l - i1); - float f4 = (float) (l - g) / (float) (l - i1); - float f5 = (float) (l - b) / (float) (l - i1); - if (r == l) hue = f5 - f4; - else if (g == l) hue = (2.0F + f3) - f5; - else hue = (4F + f4) - f3; - hue /= 6F; - if (hue < 0.0F) hue++; - } - dest[0] = hue; - dest[1] = saturation; - dest[2] = brightness; - return dest; - } -} diff --git a/src/main/java/org/lwjgl/util/Dimension.java b/src/main/java/org/lwjgl/util/Dimension.java deleted file mode 100644 index d86eaa67e..000000000 --- a/src/main/java/org/lwjgl/util/Dimension.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.io.Serializable; - -/** - * A 2D integer Dimension class, which looks remarkably like an AWT one. - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public final class Dimension implements Serializable, ReadableDimension, WritableDimension { - - static final long serialVersionUID = 1L; - - /** The dimensions! */ - private int width, height; - - /** - * Constructor for Dimension. - */ - public Dimension() { - super(); - } - - /** - * Constructor for Dimension. - */ - public Dimension(int w, int h) { - this.width = w; - this.height = h; - } - - /** - * Constructor for Dimension. - */ - public Dimension(ReadableDimension d) { - setSize(d); - } - - public void setSize(int w, int h) { - this.width = w; - this.height = h; - } - - public void setSize(ReadableDimension d) { - this.width = d.getWidth(); - this.height = d.getHeight(); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) - */ - public void getSize(WritableDimension dest) { - dest.setSize(this); - } - - /** - * Checks whether two dimension objects have equal values. - */ - public boolean equals(Object obj) { - if (obj instanceof ReadableDimension d) { - return (width == d.getWidth()) && (height == d.getHeight()); - } - return false; - } - - /** - * Returns the hash code for this Dimension. - * - * @return a hash code for this Dimension - */ - public int hashCode() { - int sum = width + height; - return sum * (sum + 1) / 2 + width; - } - - /** - * Returns a string representation of the values of this Dimension object's height and - * width fields. This method is intended to be used only for debugging purposes, and the content and - * format of the returned string may vary between implementations. The returned string may be empty but may not be - * null. - * - * @return a string representation of this Dimension object - */ - public String toString() { - return getClass().getName() + "[width=" + width + ",height=" + height + "]"; - } - - /** - * Gets the height. - * - * @return Returns a int - */ - public int getHeight() { - return height; - } - - /** - * Sets the height. - * - * @param height The height to set - */ - public void setHeight(int height) { - this.height = height; - } - - /** - * Gets the width. - * - * @return Returns a int - */ - public int getWidth() { - return width; - } - - /** - * Sets the width. - * - * @param width The width to set - */ - public void setWidth(int width) { - this.width = width; - } -} diff --git a/src/main/java/org/lwjgl/util/Display.java b/src/main/java/org/lwjgl/util/Display.java deleted file mode 100644 index 13514cccb..000000000 --- a/src/main/java/org/lwjgl/util/Display.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.opengl.DisplayMode; - -/** - * Display initialization utility, that can be used to find display modes and pick one for you based on your criteria. - * - * @author $Author: spasi $ - * @version $Revision: 3418 $ $Id: Display.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public final class Display { - - private static final boolean DEBUG = false; - - /** - * Determine the available display modes that match the specified minimum and maximum criteria. If any given - * criterium is specified as -1 then it is ignored. - * - * @param minWidth the minimum display resolution in pixels - * @param minHeight the minimum display resolution in pixels - * @param maxWidth the maximum display resolution in pixels - * @param maxHeight the maximum display resolution in pixels - * @param minBPP the minimum bit depth per pixel - * @param maxBPP the maximum bit depth per pixel - * @param minFreq the minimum display frequency in Hz - * @param maxFreq the maximum display frequency in Hz - * @return an array of matching display modes - */ - public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, - int minBPP, int maxBPP, int minFreq, int maxFreq) throws LWJGLException { - // First get the available display modes - DisplayMode[] modes = org.lwjgl.opengl.Display.getAvailableDisplayModes(); - - if (LWJGLUtil.DEBUG || DEBUG) { - System.out.println("Available screen modes:"); - for (DisplayMode mode : modes) { - System.out.println(mode); - } - } - - ArrayList matches = new ArrayList<>(modes.length); - - for (int i = 0; i < modes.length; i++) { - assert modes[i] != null : "" + i + " " + modes.length; - if (minWidth != -1 && modes[i].getWidth() < minWidth) continue; - if (maxWidth != -1 && modes[i].getWidth() > maxWidth) continue; - if (minHeight != -1 && modes[i].getHeight() < minHeight) continue; - if (maxHeight != -1 && modes[i].getHeight() > maxHeight) continue; - if (minBPP != -1 && modes[i].getBitsPerPixel() < minBPP) continue; - if (maxBPP != -1 && modes[i].getBitsPerPixel() > maxBPP) continue; - // if (modes[i].bpp == 24) - // continue; - if (modes[i].getFrequency() != 0) { - if (minFreq != -1 && modes[i].getFrequency() < minFreq) continue; - if (maxFreq != -1 && modes[i].getFrequency() > maxFreq) continue; - } - matches.add(modes[i]); - } - - DisplayMode[] ret = new DisplayMode[matches.size()]; - matches.toArray(ret); - if (LWJGLUtil.DEBUG && DEBUG) { - System.out.println("Filtered screen modes:"); - for (DisplayMode mode : ret) { - System.out.println(mode); - } - } - - return ret; - } - - /** - * Create the display by choosing from a list of display modes based on an order of preference. You must supply a - * list of allowable display modes, probably by calling getAvailableDisplayModes(), and an array with the order in - * which you would like them sorted in descending order. This method attempts to create the topmost display mode; if - * that fails, it will try the next one, and so on, until there are no modes left. If no mode is set at the end, an - * exception is thrown. - * - * @param dm a list of display modes to choose from - * @param param the names of the DisplayMode fields in the order in which you would like them sorted. - * @return the chosen display mode - * @throws NoSuchFieldException if one of the params is not a field in DisplayMode - * @throws Exception if no display mode could be set - * @see org.lwjgl3.opengl.DisplayMode - */ - public static DisplayMode setDisplayMode(DisplayMode[] dm, final String[] param) throws Exception { - - class FieldAccessor { - - final String fieldName; - final int order; - final int preferred; - final boolean usePreferred; - - FieldAccessor(String fieldName, int order, int preferred, boolean usePreferred) { - this.fieldName = fieldName; - this.order = order; - this.preferred = preferred; - this.usePreferred = usePreferred; - } - - int getInt(DisplayMode mode) { - if ("width".equals(fieldName)) { - return mode.getWidth(); - } - if ("height".equals(fieldName)) { - return mode.getHeight(); - } - if ("freq".equals(fieldName)) { - return mode.getFrequency(); - } - if ("bpp".equals(fieldName)) { - return mode.getBitsPerPixel(); - } - throw new IllegalArgumentException("Unknown field " + fieldName); - } - } - - class Sorter implements Comparator { - - final FieldAccessor[] accessors; - - Sorter() { - accessors = new FieldAccessor[param.length]; - for (int i = 0; i < accessors.length; i++) { - int idx = param[i].indexOf('='); - if (idx > 0) { - accessors[i] = new FieldAccessor( - param[i].substring(0, idx), - 0, - Integer.parseInt(param[i].substring(idx + 1, param[i].length())), - true); - } else if (param[i].charAt(0) == '-') { - accessors[i] = new FieldAccessor(param[i].substring(1), -1, 0, false); - } else { - accessors[i] = new FieldAccessor(param[i], 1, 0, false); - } - } - } - - /** - * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) - */ - public int compare(DisplayMode dm1, DisplayMode dm2) { - for (FieldAccessor accessor : accessors) { - int f1 = accessor.getInt(dm1); - int f2 = accessor.getInt(dm2); - - if (accessor.usePreferred && f1 != f2) { - if (f1 == accessor.preferred) return -1; - else if (f2 == accessor.preferred) return 1; - else { - // Score according to the difference between the values - int absf1 = Math.abs(f1 - accessor.preferred); - int absf2 = Math.abs(f2 - accessor.preferred); - if (absf1 < absf2) return -1; - else if (absf1 > absf2) return 1; - else continue; - } - } else if (f1 < f2) return accessor.order; - else if (f1 == f2) continue; - else return -accessor.order; - } - - return 0; - } - } - - // Sort the display modes - Arrays.sort(dm, new Sorter()); - - // Try them out in the appropriate order - if (LWJGLUtil.DEBUG || DEBUG) { - System.out.println("Sorted display modes:"); - for (DisplayMode aDm : dm) { - System.out.println(aDm); - } - } - for (DisplayMode aDm : dm) { - try { - if (LWJGLUtil.DEBUG || DEBUG) System.out.println("Attempting to set displaymode: " + aDm); - org.lwjgl.opengl.Display.setDisplayMode(aDm); - return aDm; - } catch (Exception e) { - if (LWJGLUtil.DEBUG || DEBUG) { - System.out.println("Failed to set display mode to " + aDm); - e.printStackTrace(); - } - } - } - - throw new Exception("Failed to set display mode."); - } -} diff --git a/src/main/java/org/lwjgl/util/Point.java b/src/main/java/org/lwjgl/util/Point.java deleted file mode 100644 index d271ce298..000000000 --- a/src/main/java/org/lwjgl/util/Point.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.io.Serializable; - -/** - * A 2D integer point class, which looks remarkably like an AWT one. - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public final class Point implements ReadablePoint, WritablePoint, Serializable { - - static final long serialVersionUID = 1L; - - /** The location */ - private int x, y; - - /** - * Constructor for Point. - */ - public Point() { - super(); - } - - /** - * Constructor for Point. - */ - public Point(int x, int y) { - setLocation(x, y); - } - - /** - * Constructor for Point. - */ - public Point(ReadablePoint p) { - setLocation(p); - } - - public void setLocation(int x, int y) { - this.x = x; - this.y = y; - } - - public void setLocation(ReadablePoint p) { - this.x = p.getX(); - this.y = p.getY(); - } - - public void setX(int x) { - this.x = x; - } - - public void setY(int y) { - this.y = y; - } - - /** - * Translate a point. - * - * @param dx The translation to apply - * @param dy The translation to apply - */ - public void translate(int dx, int dy) { - this.x += dx; - this.y += dy; - } - - /** - * Translate a point. - * - * @param p The translation to apply - */ - public void translate(ReadablePoint p) { - this.x += p.getX(); - this.y += p.getY(); - } - - /** - * Un-translate a point. - * - * @param p The translation to apply - */ - public void untranslate(ReadablePoint p) { - this.x -= p.getX(); - this.y -= p.getY(); - } - - /** - * Determines whether an instance of Point2D is equal to this point. Two instances of - * Point2D are equal if the values of their x and y member fields, - * representing their position in the coordinate space, are the same. - * - * @param obj an object to be compared with this point - * @return true if the object to be compared is an instance of Point and has the same - * values; false otherwise - */ - public boolean equals(Object obj) { - if (obj instanceof Point pt) { - return (x == pt.x) && (y == pt.y); - } - return super.equals(obj); - } - - /** - * Returns a string representation of this point and its location in the (xy) coordinate space. - * This method is intended to be used only for debugging purposes, and the content and format of the returned string - * may vary between implementations. The returned string may be empty but may not be null. - * - * @return a string representation of this point - */ - public String toString() { - return getClass().getName() + "[x=" + x + ",y=" + y + "]"; - } - - /** - * Returns the hash code for this Point. - * - * @return a hash code for this Point - */ - public int hashCode() { - int sum = x + y; - return sum * (sum + 1) / 2 + x; - } - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public void getLocation(WritablePoint dest) { - dest.setLocation(x, y); - } -} diff --git a/src/main/java/org/lwjgl/util/ReadableColor.java b/src/main/java/org/lwjgl/util/ReadableColor.java deleted file mode 100644 index 2a4634893..000000000 --- a/src/main/java/org/lwjgl/util/ReadableColor.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.nio.ByteBuffer; - -/** - * Readonly interface for Colors - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface ReadableColor { - - /** - * Return the red component (0..255) - * - * @return int - */ - int getRed(); - - /** - * Return the red component (0..255) - * - * @return int - */ - int getGreen(); - - /** - * Return the red component (0..255) - * - * @return int - */ - int getBlue(); - - /** - * Return the red component (0..255) - * - * @return int - */ - int getAlpha(); - - /** - * Return the red component - * - * @return int - */ - byte getRedByte(); - - /** - * Return the red component - * - * @return int - */ - byte getGreenByte(); - - /** - * Return the red component - * - * @return int - */ - byte getBlueByte(); - - /** - * Return the red component - * - * @return int - */ - byte getAlphaByte(); - - /** - * Write the RGBA color directly out to a ByteBuffer - * - * @param dest the buffer to write to - */ - void writeRGBA(ByteBuffer dest); - - /** - * Write the RGB color directly out to a ByteBuffer - * - * @param dest the buffer to write to - */ - void writeRGB(ByteBuffer dest); - - /** - * Write the ABGR color directly out to a ByteBuffer - * - * @param dest the buffer to write to - */ - void writeABGR(ByteBuffer dest); - - /** - * Write the BGR color directly out to a ByteBuffer - * - * @param dest the buffer to write to - */ - void writeBGR(ByteBuffer dest); - - /** - * Write the BGRA color directly out to a ByteBuffer - * - * @param dest the buffer to write to - */ - void writeBGRA(ByteBuffer dest); - - /** - * Write the ARGB color directly out to a ByteBuffer - * - * @param dest the buffer to write to - */ - void writeARGB(ByteBuffer dest); - - /* - * Some standard colors - */ - ReadableColor RED = new Color(255, 0, 0); - ReadableColor ORANGE = new Color(255, 128, 0); - ReadableColor YELLOW = new Color(255, 255, 0); - ReadableColor GREEN = new Color(0, 255, 0); - ReadableColor CYAN = new Color(0, 255, 255); - ReadableColor BLUE = new Color(0, 0, 255); - ReadableColor PURPLE = new Color(255, 0, 255); - ReadableColor WHITE = new Color(255, 255, 255); - ReadableColor BLACK = new Color(0, 0, 0); - ReadableColor LTGREY = new Color(192, 192, 192); - ReadableColor DKGREY = new Color(64, 64, 64); - ReadableColor GREY = new Color(128, 128, 128); -} diff --git a/src/main/java/org/lwjgl/util/ReadableDimension.java b/src/main/java/org/lwjgl/util/ReadableDimension.java deleted file mode 100644 index 36db70a3e..000000000 --- a/src/main/java/org/lwjgl/util/ReadableDimension.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * Readonly interface for Dimensions - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface ReadableDimension { - - /** - * Get the width - * - * @return int - */ - int getWidth(); - - /** - * Get the height - * - * @return int - */ - int getHeight(); - - /** - * Copy this ReadableDimension into a destination Dimension - * - * @param dest The destination - */ - void getSize(WritableDimension dest); -} diff --git a/src/main/java/org/lwjgl/util/ReadablePoint.java b/src/main/java/org/lwjgl/util/ReadablePoint.java deleted file mode 100644 index d171863e2..000000000 --- a/src/main/java/org/lwjgl/util/ReadablePoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * Readonly interface for Points - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface ReadablePoint { - - /** - * @return int - */ - int getX(); - - /** - * @return int - */ - int getY(); - - /** - * Copy this ReadablePoint into a destination Point - * - * @param dest The destination Point, or null, to create a new Point - */ - void getLocation(WritablePoint dest); -} diff --git a/src/main/java/org/lwjgl/util/ReadableRectangle.java b/src/main/java/org/lwjgl/util/ReadableRectangle.java deleted file mode 100644 index df7e9721a..000000000 --- a/src/main/java/org/lwjgl/util/ReadableRectangle.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * Readonly interface for Rectangles - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface ReadableRectangle extends ReadableDimension, ReadablePoint { - - /** - * Copy this readable rectangle's bounds into a destination Rectangle - * - * @param dest The destination Rectangle, or null, to create a new Rectangle - */ - void getBounds(WritableRectangle dest); -} diff --git a/src/main/java/org/lwjgl/util/Rectangle.java b/src/main/java/org/lwjgl/util/Rectangle.java deleted file mode 100644 index 8b350152c..000000000 --- a/src/main/java/org/lwjgl/util/Rectangle.java +++ /dev/null @@ -1,537 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.io.Serializable; - -/** - * A 2D integer Rectangle class which looks remarkably like an AWT one. - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public final class Rectangle implements ReadableRectangle, WritableRectangle, Serializable { - - static final long serialVersionUID = 1L; - - /** Rectangle's bounds */ - private int x, y, width, height; - - /** - * Constructor for Rectangle. - */ - public Rectangle() { - super(); - } - - /** - * Constructor for Rectangle. - */ - public Rectangle(int x, int y, int w, int h) { - this.x = x; - this.y = y; - this.width = w; - this.height = h; - } - - /** - * Constructor for Rectangle. - */ - public Rectangle(ReadablePoint p, ReadableDimension d) { - x = p.getX(); - y = p.getY(); - width = d.getWidth(); - height = d.getHeight(); - } - - /** - * Constructor for Rectangle. - */ - public Rectangle(ReadableRectangle r) { - x = r.getX(); - y = r.getY(); - width = r.getWidth(); - height = r.getHeight(); - } - - public void setLocation(int x, int y) { - this.x = x; - this.y = y; - } - - public void setLocation(ReadablePoint p) { - this.x = p.getX(); - this.y = p.getY(); - } - - public void setSize(int w, int h) { - this.width = w; - this.height = h; - } - - public void setSize(ReadableDimension d) { - this.width = d.getWidth(); - this.height = d.getHeight(); - } - - public void setBounds(int x, int y, int w, int h) { - this.x = x; - this.y = y; - this.width = w; - this.height = h; - } - - public void setBounds(ReadablePoint p, ReadableDimension d) { - x = p.getX(); - y = p.getY(); - width = d.getWidth(); - height = d.getHeight(); - } - - public void setBounds(ReadableRectangle r) { - x = r.getX(); - y = r.getY(); - width = r.getWidth(); - height = r.getHeight(); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableRectangle#getBounds(com.shavenpuppy.jglib.Rectangle) - */ - public void getBounds(WritableRectangle dest) { - dest.setBounds(x, y, width, height); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadablePoint#getLocation(com.shavenpuppy.jglib.Point) - */ - public void getLocation(WritablePoint dest) { - dest.setLocation(x, y); - } - - /* - * (Overrides) - * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) - */ - public void getSize(WritableDimension dest) { - dest.setSize(width, height); - } - - /** - * Translate the rectangle by an amount. - * - * @param x The translation amount on the x axis - * @param y The translation amount on the y axis - */ - public void translate(int x, int y) { - this.x += x; - this.y += y; - } - - /** - * Translate the rectangle by an amount. - * - * @param point The translation amount - */ - public void translate(ReadablePoint point) { - this.x += point.getX(); - this.y += point.getY(); - } - - /** - * Un-translate the rectangle by an amount. - * - * @param point The translation amount - */ - public void untranslate(ReadablePoint point) { - this.x -= point.getX(); - this.y -= point.getY(); - } - - /** - * Checks whether or not this Rectangle contains the specified Point. - * - * @param p the Point to test - * @return true if the Point (xy) is inside this - * Rectangle; false otherwise. - */ - public boolean contains(ReadablePoint p) { - return contains(p.getX(), p.getY()); - } - - /** - * Checks whether or not this Rectangle contains the point at the specified location - * (xy). - * - * @param X the specified x coordinate - * @param Y the specified y coordinate - * @return true if the point (xy) is inside this Rectangle; - * false otherwise. - */ - public boolean contains(int X, int Y) { - int w = this.width; - int h = this.height; - if ((w | h) < 0) { - // At least one of the dimensions is negative... - return false; - } - // Note: if either dimension is zero, tests below must return false... - int x = this.x; - int y = this.y; - if (X < x || Y < y) { - return false; - } - w += x; - h += y; - // overflow || intersect - return ((w < x || w > X) && (h < y || h > Y)); - } - - /** - * Checks whether or not this Rectangle entirely contains the specified Rectangle. - * - * @param r the specified Rectangle - * @return true if the Rectangle is contained entirely inside this Rectangle; - * false otherwise. - */ - public boolean contains(ReadableRectangle r) { - return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight()); - } - - /** - * Checks whether this Rectangle entirely contains the Rectangle at the specified location - * (XY) with the specified dimensions (WH). - * - * @param X the specified x coordinate - * @param Y the specified y coordinate - * @param W the width of the Rectangle - * @param H the height of the Rectangle - * @return true if the Rectangle specified by - * (XYWH) is entirely enclosed inside this - * Rectangle; false otherwise. - */ - public boolean contains(int X, int Y, int W, int H) { - int w = this.width; - int h = this.height; - if ((w | h | W | H) < 0) { - // At least one of the dimensions is negative... - return false; - } - // Note: if any dimension is zero, tests below must return false... - int x = this.x; - int y = this.y; - if (X < x || Y < y) { - return false; - } - w += x; - W += X; - if (W <= X) { - // X+W overflowed or W was zero, return false if... - // either original w or W was zero or - // x+w did not overflow or - // the overflowed x+w is smaller than the overflowed X+W - if (w >= x || W > w) return false; - } else { - // X+W did not overflow and W was not zero, return false if... - // original w was zero or - // x+w did not overflow and x+w is smaller than X+W - if (w >= x && W > w) return false; - } - h += y; - H += Y; - if (H <= Y) { - if (h >= y || H > h) return false; - } else { - if (h >= y && H > h) return false; - } - return true; - } - - /** - * Determines whether or not this Rectangle and the specified Rectangle intersect. Two - * rectangles intersect if their intersection is nonempty. - * - * @param r the specified Rectangle - * @return true if the specified Rectangle and this Rectangle intersect; - * false otherwise. - */ - public boolean intersects(ReadableRectangle r) { - int tw = this.width; - int th = this.height; - int rw = r.getWidth(); - int rh = r.getHeight(); - if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) { - return false; - } - int tx = this.x; - int ty = this.y; - int rx = r.getX(); - int ry = r.getY(); - rw += rx; - rh += ry; - tw += tx; - th += ty; - // overflow || intersect - return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry)); - } - - /** - * Computes the intersection of this Rectangle with the specified Rectangle. Returns a new - * Rectangle that represents the intersection of the two rectangles. If the two rectangles do not - * intersect, the result will be an empty rectangle. - * - * @param r the specified Rectangle - * @return the largest Rectangle contained in both the specified Rectangle and in this - * Rectangle; or if the rectangles do not intersect, an empty rectangle. - */ - public Rectangle intersection(ReadableRectangle r, Rectangle dest) { - int tx1 = this.x; - int ty1 = this.y; - int rx1 = r.getX(); - int ry1 = r.getY(); - long tx2 = tx1; - tx2 += this.width; - long ty2 = ty1; - ty2 += this.height; - long rx2 = rx1; - rx2 += r.getWidth(); - long ry2 = ry1; - ry2 += r.getHeight(); - if (tx1 < rx1) tx1 = rx1; - if (ty1 < ry1) ty1 = ry1; - if (tx2 > rx2) tx2 = rx2; - if (ty2 > ry2) ty2 = ry2; - tx2 -= tx1; - ty2 -= ty1; - // tx2,ty2 will never overflow (they will never be - // larger than the smallest of the two source w,h) - // they might underflow, though... - if (tx2 < Integer.MIN_VALUE) tx2 = Integer.MIN_VALUE; - if (ty2 < Integer.MIN_VALUE) ty2 = Integer.MIN_VALUE; - if (dest == null) dest = new Rectangle(tx1, ty1, (int) tx2, (int) ty2); - else dest.setBounds(tx1, ty1, (int) tx2, (int) ty2); - return dest; - } - - /** - * Computes the union of this Rectangle with the specified Rectangle. Returns a new - * Rectangle that represents the union of the two rectangles - * - * @param r the specified Rectangle - * @return the smallest Rectangle containing both the specified Rectangle and this - * Rectangle. - */ - public WritableRectangle union(ReadableRectangle r, WritableRectangle dest) { - int x1 = Math.min(x, r.getX()); - int x2 = Math.max(x + width, r.getX() + r.getWidth()); - int y1 = Math.min(y, r.getY()); - int y2 = Math.max(y + height, r.getY() + r.getHeight()); - dest.setBounds(x1, y1, x2 - x1, y2 - y1); - return dest; - } - - /** - * Adds a point, specified by the integer arguments newx and newy, to this - * Rectangle. The resulting Rectangle is the smallest Rectangle that contains - * both the original Rectangle and the specified point. - *

- * After adding a point, a call to contains with the added point as an argument does not necessarily - * return true. The contains method does not return true for points on the - * right or bottom edges of a Rectangle. Therefore, if the added point falls on the right or bottom - * edge of the enlarged Rectangle, contains returns false for that point. - * - * @param newx the x coordinates of the new point - * @param newy the y coordinates of the new point - */ - public void add(int newx, int newy) { - int x1 = Math.min(x, newx); - int x2 = Math.max(x + width, newx); - int y1 = Math.min(y, newy); - int y2 = Math.max(y + height, newy); - x = x1; - y = y1; - width = x2 - x1; - height = y2 - y1; - } - - /** - * Adds the specified Point to this Rectangle. The resulting Rectangle is the - * smallest Rectangle that contains both the original Rectangle and the specified - * Point. - *

- * After adding a Point, a call to contains with the added Point as an - * argument does not necessarily return true. The contains method does not return - * true for points on the right or bottom edges of a Rectangle. Therefore if the added - * Point falls on the right or bottom edge of the enlarged Rectangle, - * contains returns false for that Point. - * - * @param pt the new Point to add to this Rectangle - */ - public void add(ReadablePoint pt) { - add(pt.getX(), pt.getY()); - } - - /** - * Adds a Rectangle to this Rectangle. The resulting Rectangle is the union - * of the two rectangles. - * - * @param r the specified Rectangle - */ - public void add(ReadableRectangle r) { - int x1 = Math.min(x, r.getX()); - int x2 = Math.max(x + width, r.getX() + r.getWidth()); - int y1 = Math.min(y, r.getY()); - int y2 = Math.max(y + height, r.getY() + r.getHeight()); - x = x1; - y = y1; - width = x2 - x1; - height = y2 - y1; - } - - /** - * Resizes the Rectangle both horizontally and vertically. - *

- * This method modifies the Rectangle so that it is h units larger on both the left and - * right side, and v units larger at both the top and bottom. - *

- * The new Rectangle has (x - h, y - v) as its top-left - * corner, a width of width + 2h, and a height of - * height + 2v. - *

- * If negative values are supplied for h and v, the size of the Rectangle - * decreases accordingly. The grow method does not check whether the resulting values of - * width and height are non-negative. - * - * @param h the horizontal expansion - * @param v the vertical expansion - */ - public void grow(int h, int v) { - x -= h; - y -= v; - width += h * 2; - height += v * 2; - } - - /** - * Determines whether or not this Rectangle is empty. A Rectangle is empty if its width or - * its height is less than or equal to zero. - * - * @return true if this Rectangle is empty; false otherwise. - */ - public boolean isEmpty() { - return (width <= 0) || (height <= 0); - } - - /** - * Checks whether two rectangles are equal. - *

- * The result is true if and only if the argument is not null and is a - * Rectangle object that has the same top-left corner, width, and height as this - * Rectangle. - * - * @param obj the Object to compare with this Rectangle - * @return true if the objects are equal; false otherwise. - */ - public boolean equals(Object obj) { - if (obj instanceof Rectangle r) { - return ((x == r.x) && (y == r.y) && (width == r.width) && (height == r.height)); - } - return super.equals(obj); - } - - /** - * Debugging - * - * @return a String - */ - public String toString() { - return getClass().getName() + "[x=" + x + ",y=" + y + ",width=" + width + ",height=" + height + "]"; - } - - /** - * Gets the height. - * - * @return Returns a int - */ - public int getHeight() { - return height; - } - - /** - * Sets the height. - * - * @param height The height to set - */ - public void setHeight(int height) { - this.height = height; - } - - /** - * Gets the width. - * - * @return Returns a int - */ - public int getWidth() { - return width; - } - - /** - * Sets the width. - * - * @param width The width to set - */ - public void setWidth(int width) { - this.width = width; - } - - /** - * Gets the x. - * - * @return Returns a int - */ - public int getX() { - return x; - } - - /** - * Sets the x. - * - * @param x The x to set - */ - public void setX(int x) { - this.x = x; - } - - /** - * Gets the y. - * - * @return Returns a int - */ - public int getY() { - return y; - } - - /** - * Sets the y. - * - * @param y The y to set - */ - public void setY(int y) { - this.y = y; - } -} diff --git a/src/main/java/org/lwjgl/util/Renderable.java b/src/main/java/org/lwjgl/util/Renderable.java deleted file mode 100644 index d237fc571..000000000 --- a/src/main/java/org/lwjgl/util/Renderable.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * - * Simple interface to things that can be Rendered. - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface Renderable { - - /** - * "Render" this thing. This will involve calls to the GL. - */ - void render(); -} diff --git a/src/main/java/org/lwjgl/util/Timer.java b/src/main/java/org/lwjgl/util/Timer.java deleted file mode 100644 index 203654de5..000000000 --- a/src/main/java/org/lwjgl/util/Timer.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import org.lwjgl.Sys; - -/** - * - * A hires timer. This measures time in seconds as floating point values. All Timers created are updated simultaneously - * by calling the static method tick(). This ensures that within a single iteration of a game loop that all timers are - * updated consistently with each other. - * - * @author cix_foo - * @version $Revision$ $Id$ - */ -public class Timer { - - // Record the timer resolution on classload - private static long resolution = Sys.getTimerResolution(); - - // Every so often we will re-query the timer resolution - private static final int QUERY_INTERVAL = 50; // in calls to tick() - private static int queryCount; - - // Globally keeps track of time for all instances of Timer - private static long currentTime; - - // When the timer was started - private long startTime; - - // The last time recorded by getTime() - private long lastTime; - - // Whether the timer is paused - private boolean paused; - - static { - tick(); - } - - /** - * Constructs a timer. The timer will be reset to 0.0 and resumed immediately. - */ - public Timer() { - reset(); - resume(); - } - - /** - * @return the time in seconds, as a float - */ - public float getTime() { - if (!paused) { - lastTime = currentTime - startTime; - } - - return (float) ((double) lastTime / (double) resolution); - } - - /** - * @return whether this timer is paused - */ - public boolean isPaused() { - return paused; - } - - /** - * Pause the timer. Whilst paused the time will not change for this timer when tick() is called. - * - * @see #resume() - */ - public void pause() { - paused = true; - } - - /** - * Reset the timer. Equivalent to set(0.0f); - * - * @see #set(float) - */ - public void reset() { - set(0.0f); - } - - /** - * Resume the timer. - * - * @see #pause() - */ - public void resume() { - paused = false; - startTime = currentTime - lastTime; - } - - /** - * Set the time of this timer - * - * @param newTime the new time, in seconds - */ - public void set(float newTime) { - long newTimeInTicks = (long) ((double) newTime * (double) resolution); - startTime = currentTime - newTimeInTicks; - lastTime = newTimeInTicks; - } - - /** - * Get the next time update from the system's hires timer. This method should be called once per main loop - * iteration; all timers are updated simultaneously from it. - */ - public static void tick() { - currentTime = Sys.getTime(); - - // Periodically refresh the timer resolution: - queryCount++; - if (queryCount > QUERY_INTERVAL) { - queryCount = 0; - resolution = Sys.getTimerResolution(); - } - } - - /** - * Debug output. - */ - public String toString() { - return "Timer[Time=" + getTime() + ", Paused=" + paused + "]"; - } -} diff --git a/src/main/java/org/lwjgl/util/WaveData.java b/src/main/java/org/lwjgl/util/WaveData.java deleted file mode 100644 index 51483b88e..000000000 --- a/src/main/java/org/lwjgl/util/WaveData.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.ShortBuffer; - -import javax.sound.sampled.AudioFormat; -import javax.sound.sampled.AudioInputStream; -import javax.sound.sampled.AudioSystem; - -import org.lwjgl3.openal.AL11; - -// import com.sun.media.sound.WaveFileReader; - -/** - * - * Utitlity class for loading wavefiles. - * - * @author Brian Matzon - * @version $Revision$ $Id$ - */ -public class WaveData { - - /** actual wave data */ - public final ByteBuffer data; - - /** format type of data */ - public final int format; - - /** sample rate of data */ - public final int samplerate; - - /** - * Creates a new WaveData - * - * @param data actual wavedata - * @param format format of wave data - * @param samplerate sample rate of data - */ - private WaveData(ByteBuffer data, int format, int samplerate) { - this.data = data; - this.format = format; - this.samplerate = samplerate; - } - - /** - * Disposes the wavedata - */ - public void dispose() { - data.clear(); - } - - /** - * Creates a WaveData container from the specified url - * - * @param path URL to file - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(URL path) { - try { - // due to an issue with AudioSystem.getAudioInputStream - // and mixing unsigned and signed code - // we will use the reader directly - return create(AudioSystem.getAudioInputStream(path)); - // WaveFileReader wfr = new WaveFileReader(); - // return create(wfr.getAudioInputStream(new BufferedInputStream(path.openStream()))); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from: " + path + ", " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified in the classpath - * - * @param path path to file (relative, and in classpath) - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(String path) { - return create(Thread.currentThread().getContextClassLoader().getResource(path)); - } - - /** - * Creates a WaveData container from the specified inputstream - * - * @param is InputStream to read from - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(InputStream is) { - try { - return create(AudioSystem.getAudioInputStream(is)); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from inputstream, " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified bytes - * - * @param buffer array of bytes containing the complete wave file - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(byte[] buffer) { - try { - return create(AudioSystem.getAudioInputStream(new BufferedInputStream(new ByteArrayInputStream(buffer)))); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from byte array, " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified ByetBuffer. If the buffer is backed by an array, it will be used - * directly, else the contents of the buffer will be copied using get(byte[]). - * - * @param buffer ByteBuffer containing sound file - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(ByteBuffer buffer) { - try { - byte[] bytes = null; - - if (buffer.hasArray()) { - bytes = buffer.array(); - } else { - bytes = new byte[buffer.capacity()]; - buffer.get(bytes); - } - return create(bytes); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from ByteBuffer, " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified stream - * - * @param ais AudioInputStream to read from - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(AudioInputStream ais) { - // get format of data - AudioFormat audioformat = ais.getFormat(); - - // get channels - int channels = 0; - if (audioformat.getChannels() == 1) { - if (audioformat.getSampleSizeInBits() == 8) { - channels = AL11.AL_FORMAT_MONO8; - } else if (audioformat.getSampleSizeInBits() == 16) { - channels = AL11.AL_FORMAT_MONO16; - } else { - assert false : "Illegal sample size"; - } - } else if (audioformat.getChannels() == 2) { - if (audioformat.getSampleSizeInBits() == 8) { - channels = AL11.AL_FORMAT_STEREO8; - } else if (audioformat.getSampleSizeInBits() == 16) { - channels = AL11.AL_FORMAT_STEREO16; - } else { - assert false : "Illegal sample size"; - } - } else { - assert false : "Only mono or stereo is supported"; - } - - // read data into buffer - ByteBuffer buffer = null; - try { - int available = ais.available(); - if (available <= 0) { - available = ais.getFormat().getChannels() * (int) ais.getFrameLength() - * ais.getFormat().getSampleSizeInBits() - / 8; - } - byte[] buf = new byte[ais.available()]; - int read = 0, total = 0; - while ((read = ais.read(buf, total, buf.length - total)) != -1 && total < buf.length) { - total += read; - } - buffer = convertAudioBytes( - buf, - audioformat.getSampleSizeInBits() == 16, - audioformat.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); - } catch (IOException ioe) { - return null; - } - - // create our result - WaveData wavedata = new WaveData(buffer, channels, (int) audioformat.getSampleRate()); - - // close stream - try { - ais.close(); - } catch (IOException ioe) {} - - return wavedata; - } - - private static ByteBuffer convertAudioBytes(byte[] audio_bytes, boolean two_bytes_data, ByteOrder order) { - ByteBuffer dest = ByteBuffer.allocateDirect(audio_bytes.length); - dest.order(ByteOrder.nativeOrder()); - ByteBuffer src = ByteBuffer.wrap(audio_bytes); - src.order(order); - if (two_bytes_data) { - ShortBuffer dest_short = dest.asShortBuffer(); - ShortBuffer src_short = src.asShortBuffer(); - while (src_short.hasRemaining()) dest_short.put(src_short.get()); - } else { - while (src.hasRemaining()) dest.put(src.get()); - } - dest.rewind(); - return dest; - } -} diff --git a/src/main/java/org/lwjgl/util/WritableColor.java b/src/main/java/org/lwjgl/util/WritableColor.java deleted file mode 100644 index f38ac6ced..000000000 --- a/src/main/java/org/lwjgl/util/WritableColor.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.nio.ByteBuffer; - -/** - * Write interface for Colors - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface WritableColor { - - /** - * Set a color - */ - void set(int r, int g, int b, int a); - - /** - * Set a color - */ - void set(byte r, byte g, byte b, byte a); - - /** - * Set a color - */ - void set(int r, int g, int b); - - /** - * Set a color - */ - void set(byte r, byte g, byte b); - - /** - * Set the Red component - */ - void setRed(int red); - - /** - * Set the Green component - */ - void setGreen(int green); - - /** - * Set the Blue component - */ - void setBlue(int blue); - - /** - * Set the Alpha component - */ - void setAlpha(int alpha); - - /** - * Set the Red component - */ - void setRed(byte red); - - /** - * Set the Green component - */ - void setGreen(byte green); - - /** - * Set the Blue component - */ - void setBlue(byte blue); - - /** - * Set the Alpha component - */ - void setAlpha(byte alpha); - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - void readRGBA(ByteBuffer src); - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - void readRGB(ByteBuffer src); - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - void readARGB(ByteBuffer src); - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - void readBGRA(ByteBuffer src); - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - void readBGR(ByteBuffer src); - - /** - * Read a color from a byte buffer - * - * @param src The source buffer - */ - void readABGR(ByteBuffer src); - - /** - * Set this color's color by copying another color - * - * @param src The source color - */ - void setColor(ReadableColor src); -} diff --git a/src/main/java/org/lwjgl/util/WritableDimension.java b/src/main/java/org/lwjgl/util/WritableDimension.java deleted file mode 100644 index be69f091d..000000000 --- a/src/main/java/org/lwjgl/util/WritableDimension.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * Write interface for Dimensions - * - * @author $Author$ - * @version $Revision$ $Id$ - * - */ -public interface WritableDimension { - - void setSize(int w, int h); - - void setSize(ReadableDimension d); - - /** - * Sets the height. - * - * @param height The height to set - */ - void setHeight(int height); - - /** - * Sets the width. - * - * @param width The width to set - */ - void setWidth(int width); -} diff --git a/src/main/java/org/lwjgl/util/WritablePoint.java b/src/main/java/org/lwjgl/util/WritablePoint.java deleted file mode 100644 index f5c170093..000000000 --- a/src/main/java/org/lwjgl/util/WritablePoint.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * Write interface for Points - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface WritablePoint { - - void setLocation(int x, int y); - - void setLocation(ReadablePoint p); - - void setX(int x); - - void setY(int y); -} diff --git a/src/main/java/org/lwjgl/util/WritableRectangle.java b/src/main/java/org/lwjgl/util/WritableRectangle.java deleted file mode 100644 index 91ee49e93..000000000 --- a/src/main/java/org/lwjgl/util/WritableRectangle.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -/** - * Write interface for Rectangles - * - * @author $Author$ - * @version $Revision$ $Id$ - */ -public interface WritableRectangle extends WritablePoint, WritableDimension { - - /** - * Sets the bounds of the rectangle - * - * @param x Position of rectangle on x axis - * @param y Position of rectangle on y axis - * @param width Width of rectangle - * @param height Height of rectangle - */ - void setBounds(int x, int y, int width, int height); - - /** - * Sets the bounds of the rectangle - * - * @param location - * @param size - */ - void setBounds(ReadablePoint location, ReadableDimension size); - - /** - * Sets the bounds of the rectangle - * - * @param src - */ - void setBounds(ReadableRectangle src); -} diff --git a/src/main/java/org/lwjgl/util/XPMFile.java b/src/main/java/org/lwjgl/util/XPMFile.java deleted file mode 100644 index 76a1d65cc..000000000 --- a/src/main/java/org/lwjgl/util/XPMFile.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util; - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.LineNumberReader; -import java.util.HashMap; -import java.util.StringTokenizer; - -/** - *

- * NOTE: This simple XPM reader does not support extensions nor hotspots - *

- * - * @author Brian Matzon - * @author Jos Hirth - * @version $Revision$ $Id$ - */ -public class XPMFile { - - /** Array of bytes (RGBA) */ - private byte bytes[]; - - private static final int WIDTH = 0; - - private static final int HEIGHT = 1; - - private static final int NUMBER_OF_COLORS = 2; - - private static final int CHARACTERS_PER_PIXEL = 3; - - private static int[] format = new int[4]; - - /* - * Private constructor, use load(String filename) - */ - private XPMFile() {} - - /** - * Loads the XPM file - * - * @param file path to file - * @return XPMFile loaded, or exception - * @throws IOException If any IO exceptions occurs while reading file - */ - public static XPMFile load(String file) throws IOException { - return load(new FileInputStream(new File(file))); - } - - /** - * Loads the XPM file - * - * @param is InputStream to read file from - * @return XPMFile loaded, or exception - */ - public static XPMFile load(InputStream is) { - XPMFile xFile = new XPMFile(); - xFile.readImage(is); - return xFile; - } - - /** - * @return the height of the image. - */ - public int getHeight() { - return format[HEIGHT]; - } - - /** - * @return the width of the image. - */ - public int getWidth() { - return format[WIDTH]; - } - - /** - * @return The data of the image. - */ - public byte[] getBytes() { - return bytes; - } - - /** - * Read the image from the specified file. - */ - private void readImage(InputStream is) { - try { - LineNumberReader reader = new LineNumberReader(new InputStreamReader(is)); - HashMap colors = new HashMap<>(); - - format = parseFormat(nextLineOfInterest(reader)); - - // setup color mapping - for (int i = 0; i < format[NUMBER_OF_COLORS]; i++) { - Object[] colorDefinition = parseColor(nextLineOfInterest(reader)); - colors.put((String) colorDefinition[0], (Integer) colorDefinition[1]); - } - - // read actual image (convert to RGBA) - bytes = new byte[format[WIDTH] * format[HEIGHT] * 4]; - for (int i = 0; i < format[HEIGHT]; i++) { - parseImageLine(nextLineOfInterest(reader), format, colors, i); - } - } catch (Exception e) { - e.printStackTrace(); - throw new IllegalArgumentException("Unable to parse XPM File"); - } - } - - /** - * Finds the next interesting line of text. - * - * @param reader The LineNumberReader to read from - * @return The next interesting String (with stripped quotes) - * @throws IOException If any IO exceptions occurs while reading file - */ - private static String nextLineOfInterest(LineNumberReader reader) throws IOException { - String ret; - do { - ret = reader.readLine(); - } while (!ret.startsWith("\"")); - // lacks sanity check - return ret.substring(1, ret.lastIndexOf('\"')); - } - - /** - * Parses the format of the xpm file given a format string - * - * @param format String to parse - * @return Array specifying width, height, colors, characters per pixel - */ - private static int[] parseFormat(String format) { - // format should look like this: - // 16 16 122 2 - - // tokenize it - StringTokenizer st = new StringTokenizer(format); - - return new int[] { Integer.parseInt(st.nextToken()), /* width */ - Integer.parseInt(st.nextToken()), /* height */ - Integer.parseInt(st.nextToken()), /* colors */ - Integer.parseInt(st.nextToken()) /* chars per pixel */ - }; - } - - /** - * Given a line defining a color/pixel, parses this into an array containing a key and a color - * - * @param line Line to parse - * @return Array containing a key (String) and a color (Integer) - */ - private static Object[] parseColor(String line) { - // line should look like this: - // # c #0A0A0A - - // NOTE: will break if the color is something like "black" or "gray50" - // etc (instead of #rrggbb). - - String key = line.substring(0, format[CHARACTERS_PER_PIXEL]); - // since we always assume color as type we dont need to read it - // String type = line.substring(format[CHARACTERS_PER_PIXEL] + 1, - // format[CHARACTERS_PER_PIXEL] + 2); - String color = line.substring(format[CHARACTERS_PER_PIXEL] + 4); - - // we always assume type is color, and supplied as # - return new Object[] { key, Integer.parseInt(color, 16) }; - } - - /** - * Parses an Image line into its byte values - * - * @param line Line of chars to parse - * @param format Format to expext it in - * @param colors Colors to lookup - * @param index current index into lines, we've reached - */ - private void parseImageLine(String line, int[] format, HashMap colors, int index) { - // offset for next line - int offset = index * 4 * format[WIDTH]; - - // read characters times, - // each iteration equals one pixel - for (int i = 0; i < format[WIDTH]; i++) { - String key = line.substring( - i * format[CHARACTERS_PER_PIXEL], - (i * format[CHARACTERS_PER_PIXEL] + format[CHARACTERS_PER_PIXEL])); - int color = colors.get(key); - bytes[offset + (i * 4)] = (byte) ((color & 0x00ff0000) >> 16); - bytes[offset + ((i * 4) + 1)] = (byte) ((color & 0x0000ff00) >> 8); - bytes[offset + ((i * 4) + 2)] = (byte) ((color & 0x000000ff) >> 0); // looks - // better - // :) - bytes[offset + ((i * 4) + 3)] = (byte) 0xff; // always 0xff alpha - } - } - - /** - * @param args - */ - public static void main(String[] args) { - if (args.length != 1) { - System.out.println("usage:\nXPMFile "); - } - - try { - String out = args[0].substring(0, args[0].indexOf(".")) + ".raw"; - XPMFile file = XPMFile.load(args[0]); - BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File(out))); - bos.write(file.getBytes()); - bos.close(); - - // showResult(file.getBytes()); - } catch (Exception e) { - e.printStackTrace(); - } - } - /* - * private static void showResult(byte[] bytes) { final BufferedImage i = new BufferedImage(16, 16, - * BufferedImage.TYPE_INT_ARGB); int c = 0; for (int y = 0; y < 16; y++) { for (int x = 0; x < 16; x++) { - * i.setRGB(x, y, (bytes[c] << 16) + (bytes[c + 1] << 8) + (bytes[c + 2] << 0) + (bytes[c + 3] << - * 24));//+(128<<24));// c += 4; } } final Frame frame = new Frame("XPM Result"); frame.add(new Canvas() { public - * void paint(Graphics g) { g.drawImage(i, 0, 0, frame); } }); frame.addWindowListener(new WindowAdapter() { public - * void windowClosing(WindowEvent e) { frame.dispose(); } }); frame.setSize(100, 100); frame.setVisible(true); } - */ -} diff --git a/src/main/java/org/lwjgl/util/glu/Cylinder.java b/src/main/java/org/lwjgl/util/glu/Cylinder.java deleted file mode 100644 index 2dabc70d5..000000000 --- a/src/main/java/org/lwjgl/util/glu/Cylinder.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl.util.glu.GLU.*; - -/** - * Cylinder.java - * - * - * Created 23-dec-2003 - * - * @author Erik Duijs - */ -public class Cylinder extends Quadric { - - /** - * Constructor for Cylinder. - */ - public Cylinder() { - super(); - } - - /** - * draws a cylinder oriented along the z axis. The base of the cylinder is placed at z = 0, and the top at z=height. - * Like a sphere, a cylinder is subdivided around the z axis into slices, and along the z axis into stacks. - * - * Note that if topRadius is set to zero, then this routine will generate a cone. - * - * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then any generated normals point away - * from the z axis. Otherwise, they point toward the z axis. - * - * If texturing is turned on (with glu.quadricTexture), then texture coordinates are generated so that t ranges - * linearly from 0.0 at z = 0 to 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x axis, to - * 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis. - * - * @param baseRadius Specifies the radius of the cylinder at z = 0. - * @param topRadius Specifies the radius of the cylinder at z = height. - * @param height Specifies the height of the cylinder. - * @param slices Specifies the number of subdivisions around the z axis. - * @param stacks Specifies the number of subdivisions along the z axis. - */ - public void draw(float baseRadius, float topRadius, float height, int slices, int stacks) { - - float da, r, dr, dz; - float x, y, z, nz, nsign; - int i, j; - - if (super.orientation == GLU_INSIDE) { - nsign = -1.0f; - } else { - nsign = 1.0f; - } - - da = 2.0f * PI / slices; - dr = (topRadius - baseRadius) / stacks; - dz = height / stacks; - nz = (baseRadius - topRadius) / height; - // Z component of normal vectors - - if (super.drawStyle == GLU_POINT) { - glBegin(GL_POINTS); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - - z = 0.0f; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glVertex3f((x * r), (y * r), z); - z += dz; - r += dr; - } - } - glEnd(); - } else if (super.drawStyle == GLU_LINE || super.drawStyle == GLU_SILHOUETTE) { - // Draw rings - if (super.drawStyle == GLU_LINE) { - z = 0.0f; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * r), (y * r), z); - } - glEnd(); - z += dz; - r += dr; - } - } else { - // draw one ring at each end - if (baseRadius != 0.0) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * baseRadius), (y * baseRadius), 0.0f); - } - glEnd(); - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * topRadius), (y * topRadius), height); - } - glEnd(); - } - } - // draw length lines - glBegin(GL_LINES); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * baseRadius), (y * baseRadius), 0.0f); - glVertex3f((x * topRadius), (y * topRadius), (height)); - } - glEnd(); - } else if (super.drawStyle == GLU_FILL) { - float ds = 1.0f / slices; - float dt = 1.0f / stacks; - float t = 0.0f; - z = 0.0f; - r = baseRadius; - for (j = 0; j < stacks; j++) { - float s = 0.0f; - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - if (i == slices) { - x = sin(0.0f); - y = cos(0.0f); - } else { - x = sin((i * da)); - y = cos((i * da)); - } - if (nsign == 1.0f) { - normal3f((x * nsign), (y * nsign), (nz * nsign)); - TXTR_COORD(s, t); - glVertex3f((x * r), (y * r), z); - normal3f((x * nsign), (y * nsign), (nz * nsign)); - TXTR_COORD(s, t + dt); - glVertex3f((x * (r + dr)), (y * (r + dr)), (z + dz)); - } else { - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t); - glVertex3f((x * r), (y * r), z); - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t + dt); - glVertex3f((x * (r + dr)), (y * (r + dr)), (z + dz)); - } - s += ds; - } // for slices - glEnd(); - r += dr; - t += dt; - z += dz; - } // for stacks - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/Disk.java b/src/main/java/org/lwjgl/util/glu/Disk.java deleted file mode 100644 index e336965e0..000000000 --- a/src/main/java/org/lwjgl/util/glu/Disk.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl.util.glu.GLU.*; - -/** - * Disk.java - * - * - * Created 23-dec-2003 - * - * @author Erik Duijs - */ -public class Disk extends Quadric { - - /** - * Constructor for Disk. - */ - public Disk() { - super(); - } - - /** - * renders a disk on the z = 0 plane. The disk has a radius of outerRadius, and contains a concentric circular hole - * with a radius of innerRadius. If innerRadius is 0, then no hole is generated. The disk is subdivided around the z - * axis into slices (like pizza slices), and also about the z axis into rings (as specified by slices and loops, - * respectively). - * - * With respect to orientation, the +z side of the disk is considered to be "outside" (see glu.quadricOrientation). - * This means that if the orientation is set to GLU.OUTSIDE, then any normals generated point along the +z axis. - * Otherwise, they point along the -z axis. - * - * If texturing is turned on (with glu.quadricTexture), texture coordinates are generated linearly such that where - * r=outerRadius, the value at (r, 0, 0) is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and - * at (0, -r, 0) it is (0.5, 0). - */ - public void draw(float innerRadius, float outerRadius, int slices, int loops) { - float da, dr; - - /* Normal vectors */ - if (super.normals != GLU_NONE) { - if (super.orientation == GLU_OUTSIDE) { - glNormal3f(0.0f, 0.0f, +1.0f); - } else { - glNormal3f(0.0f, 0.0f, -1.0f); - } - } - - da = 2.0f * PI / slices; - dr = (outerRadius - innerRadius) / loops; - - switch (super.drawStyle) { - case GLU_FILL -> { - /* - * texture of a gluDisk is a cut out of the texture unit square x, y in [-outerRadius, +outerRadius]; s, - * t in [0, 1] (linear mapping) - */ - float dtc = 2.0f * outerRadius; - float sa, ca; - float r1 = innerRadius; - int l; - for (l = 0; l < loops; l++) { - float r2 = r1 + dr; - if (super.orientation == GLU_OUTSIDE) { - int s; - glBegin(GL_QUAD_STRIP); - for (s = 0; s <= slices; s++) { - float a; - if (s == slices) a = 0.0f; - else a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5f + sa * r2 / dtc, 0.5f + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5f + sa * r1 / dtc, 0.5f + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } else { - int s; - glBegin(GL_QUAD_STRIP); - for (s = slices; s >= 0; s--) { - float a; - if (s == slices) a = 0.0f; - else a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5f - sa * r2 / dtc, 0.5f + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5f - sa * r1 / dtc, 0.5f + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - r1 = r2; - } - } - case GLU_LINE -> { - int l, s; - /* draw loops */ - for (l = 0; l <= loops; l++) { - float r = innerRadius + l * dr; - glBegin(GL_LINE_LOOP); - for (s = 0; s < slices; s++) { - float a = s * da; - glVertex2f(r * sin(a), r * cos(a)); - } - glEnd(); - } - /* draw spokes */ - for (s = 0; s < slices; s++) { - float a = s * da; - float x = sin(a); - float y = cos(a); - glBegin(GL_LINE_STRIP); - for (l = 0; l <= loops; l++) { - float r = innerRadius + l * dr; - glVertex2f(r * x, r * y); - } - glEnd(); - } - } - case GLU_POINT -> { - int s; - glBegin(GL_POINTS); - for (s = 0; s < slices; s++) { - float a = s * da; - float x = sin(a); - float y = cos(a); - int l; - for (l = 0; l <= loops; l++) { - float r = innerRadius * l * dr; - glVertex2f(r * x, r * y); - } - } - glEnd(); - } - case GLU_SILHOUETTE -> { - if (innerRadius != 0.0) { - float a; - glBegin(GL_LINE_LOOP); - for (a = 0.0f; a < 2.0 * PI; a += da) { - float x = innerRadius * sin(a); - float y = innerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - { - float a; - glBegin(GL_LINE_LOOP); - for (a = 0; a < 2.0f * PI; a += da) { - float x = outerRadius * sin(a); - float y = outerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - } - default -> { - return; - } - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/GLU.java b/src/main/java/org/lwjgl/util/glu/GLU.java deleted file mode 100644 index 287c5aeec..000000000 --- a/src/main/java/org/lwjgl/util/glu/GLU.java +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; - -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -import org.lwjgl.opengl.Util; -import org.lwjgl.util.glu.tessellation.GLUtessellatorImpl; - -/** - * GLU.java - * - * - * Created 23-dec-2003 - * - * @author Erik Duijs - */ -public class GLU { - - static final float PI = (float) Math.PI; - - /* Errors: (return value 0 = no error) */ - public static final int GLU_INVALID_ENUM = 100900; - public static final int GLU_INVALID_VALUE = 100901; - public static final int GLU_OUT_OF_MEMORY = 100902; - public static final int GLU_INCOMPATIBLE_GL_VERSION = 100903; - - /* StringName */ - public static final int GLU_VERSION = 100800; - public static final int GLU_EXTENSIONS = 100801; - - /* Boolean */ - public static final boolean GLU_TRUE = true; - public static final boolean GLU_FALSE = false; - - /**** Quadric constants ****/ - - /* QuadricNormal */ - public static final int GLU_SMOOTH = 100000; - - public static final int GLU_FLAT = 100001; - public static final int GLU_NONE = 100002; - - /* QuadricDrawStyle */ - public static final int GLU_POINT = 100010; - public static final int GLU_LINE = 100011; - public static final int GLU_FILL = 100012; - public static final int GLU_SILHOUETTE = 100013; - - /* QuadricOrientation */ - public static final int GLU_OUTSIDE = 100020; - public static final int GLU_INSIDE = 100021; - - /* Callback types: */ - /* ERROR = 100103 */ - - /**** Tesselation constants ****/ - public static final double GLU_TESS_MAX_COORD = 1.0e150; - - public static final double TESS_MAX_COORD = 1.0e150; - - /* TessProperty */ - public static final int GLU_TESS_WINDING_RULE = 100140; - public static final int GLU_TESS_BOUNDARY_ONLY = 100141; - public static final int GLU_TESS_TOLERANCE = 100142; - - /* TessWinding */ - public static final int GLU_TESS_WINDING_ODD = 100130; - public static final int GLU_TESS_WINDING_NONZERO = 100131; - public static final int GLU_TESS_WINDING_POSITIVE = 100132; - public static final int GLU_TESS_WINDING_NEGATIVE = 100133; - public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; - - /* TessCallback */ - public static final int GLU_TESS_BEGIN = 100100; /* void (CALLBACK*)(GLenum type) */ - public static final int GLU_TESS_VERTEX = 100101; /* void (CALLBACK*)(void *data) */ - public static final int GLU_TESS_END = 100102; /* void (CALLBACK*)(void) */ - public static final int GLU_TESS_ERROR = 100103; /* void (CALLBACK*)(GLenum errno) */ - public static final int GLU_TESS_EDGE_FLAG = 100104; /* void (CALLBACK*)(GLboolean boundaryEdge) */ - public static final int GLU_TESS_COMBINE = 100105; /* - * void (CALLBACK*)(GLdouble coords[3], void *data[4], GLfloat - * weight[4], void **dataOut) - */ - public static final int GLU_TESS_BEGIN_DATA = 100106; /* - * void (CALLBACK*)(GLenum type, void *polygon_data) - */ - public static final int GLU_TESS_VERTEX_DATA = 100107; /* - * void (CALLBACK*)(void *data, void *polygon_data) - */ - public static final int GLU_TESS_END_DATA = 100108; /* void (CALLBACK*)(void *polygon_data) */ - public static final int GLU_TESS_ERROR_DATA = 100109; /* - * void (CALLBACK*)(GLenum errno, void *polygon_data) - */ - public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; /* - * void (CALLBACK*)(GLboolean boundaryEdge, void - * *polygon_data) - */ - public static final int GLU_TESS_COMBINE_DATA = 100111; /* - * void (CALLBACK*)(GLdouble coords[3], void *data[4], - * GLfloat weight[4], void **dataOut, void *polygon_data) - */ - - /* TessError */ - public static final int GLU_TESS_ERROR1 = 100151; - public static final int GLU_TESS_ERROR2 = 100152; - public static final int GLU_TESS_ERROR3 = 100153; - public static final int GLU_TESS_ERROR4 = 100154; - public static final int GLU_TESS_ERROR5 = 100155; - public static final int GLU_TESS_ERROR6 = 100156; - public static final int GLU_TESS_ERROR7 = 100157; - public static final int GLU_TESS_ERROR8 = 100158; - - public static final int GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1; - public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2; - public static final int GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3; - public static final int GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4; - public static final int GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5; - public static final int GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6; - - /**** NURBS constants ****/ - - /* NurbsProperty */ - public static final int GLU_AUTO_LOAD_MATRIX = 100200; - - public static final int GLU_CULLING = 100201; - public static final int GLU_SAMPLING_TOLERANCE = 100203; - public static final int GLU_DISPLAY_MODE = 100204; - public static final int GLU_PARAMETRIC_TOLERANCE = 100202; - public static final int GLU_SAMPLING_METHOD = 100205; - public static final int GLU_U_STEP = 100206; - public static final int GLU_V_STEP = 100207; - - /* NurbsSampling */ - public static final int GLU_PATH_LENGTH = 100215; - public static final int GLU_PARAMETRIC_ERROR = 100216; - public static final int GLU_DOMAIN_DISTANCE = 100217; - - /* NurbsTrim */ - public static final int GLU_MAP1_TRIM_2 = 100210; - public static final int GLU_MAP1_TRIM_3 = 100211; - - /* NurbsDisplay */ - /* FILL = 100012 */ - public static final int GLU_OUTLINE_POLYGON = 100240; - public static final int GLU_OUTLINE_PATCH = 100241; - - /* NurbsCallback */ - /* ERROR = 100103 */ - - /* NurbsErrors */ - public static final int GLU_NURBS_ERROR1 = 100251; - public static final int GLU_NURBS_ERROR2 = 100252; - public static final int GLU_NURBS_ERROR3 = 100253; - public static final int GLU_NURBS_ERROR4 = 100254; - public static final int GLU_NURBS_ERROR5 = 100255; - public static final int GLU_NURBS_ERROR6 = 100256; - public static final int GLU_NURBS_ERROR7 = 100257; - public static final int GLU_NURBS_ERROR8 = 100258; - public static final int GLU_NURBS_ERROR9 = 100259; - public static final int GLU_NURBS_ERROR10 = 100260; - public static final int GLU_NURBS_ERROR11 = 100261; - public static final int GLU_NURBS_ERROR12 = 100262; - public static final int GLU_NURBS_ERROR13 = 100263; - public static final int GLU_NURBS_ERROR14 = 100264; - public static final int GLU_NURBS_ERROR15 = 100265; - public static final int GLU_NURBS_ERROR16 = 100266; - public static final int GLU_NURBS_ERROR17 = 100267; - public static final int GLU_NURBS_ERROR18 = 100268; - public static final int GLU_NURBS_ERROR19 = 100269; - public static final int GLU_NURBS_ERROR20 = 100270; - public static final int GLU_NURBS_ERROR21 = 100271; - public static final int GLU_NURBS_ERROR22 = 100272; - public static final int GLU_NURBS_ERROR23 = 100273; - public static final int GLU_NURBS_ERROR24 = 100274; - public static final int GLU_NURBS_ERROR25 = 100275; - public static final int GLU_NURBS_ERROR26 = 100276; - public static final int GLU_NURBS_ERROR27 = 100277; - public static final int GLU_NURBS_ERROR28 = 100278; - public static final int GLU_NURBS_ERROR29 = 100279; - public static final int GLU_NURBS_ERROR30 = 100280; - public static final int GLU_NURBS_ERROR31 = 100281; - public static final int GLU_NURBS_ERROR32 = 100282; - public static final int GLU_NURBS_ERROR33 = 100283; - public static final int GLU_NURBS_ERROR34 = 100284; - public static final int GLU_NURBS_ERROR35 = 100285; - public static final int GLU_NURBS_ERROR36 = 100286; - public static final int GLU_NURBS_ERROR37 = 100287; - - /* Contours types -- obsolete! */ - public static final int GLU_CW = 100120; - public static final int GLU_CCW = 100121; - public static final int GLU_INTERIOR = 100122; - public static final int GLU_EXTERIOR = 100123; - public static final int GLU_UNKNOWN = 100124; - - /* Names without "TESS_" prefix */ - public static final int GLU_BEGIN = GLU_TESS_BEGIN; - public static final int GLU_VERTEX = GLU_TESS_VERTEX; - public static final int GLU_END = GLU_TESS_END; - public static final int GLU_ERROR = GLU_TESS_ERROR; - public static final int GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG; - - /** - * Method gluLookAt - * - * @param eyex - * @param eyey - * @param eyez - * @param centerx - * @param centery - * @param centerz - * @param upx - * @param upy - * @param upz - */ - public static void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz, - float upx, float upy, float upz) { - - Project.gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz); - } - - /** - * Method gluOrtho2D - * - * @param left - * @param right - * @param bottom - * @param top - */ - public static void gluOrtho2D(float left, float right, float bottom, float top) { - - glOrtho(left, right, bottom, top, -1.0, 1.0); - } - - /** - * Method gluPerspective - * - * @param fovy - * @param aspect - * @param zNear - * @param zFar - */ - public static void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - - Project.gluPerspective(fovy, aspect, zNear, zFar); - } - - /** - * Method gluProject - * - * @param objx - * @param objy - * @param objz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param win_pos - */ - public static boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix, - FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) { - return Project.gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, win_pos); - } - - /** - * Method gluUnproject - * - * @param winx - * @param winy - * @param winz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param obj_pos - */ - public static boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix, - FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) { - return Project.gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, obj_pos); - } - - /** - * Method gluPickMatrix - * - * @param x - * @param y - * @param width - * @param height - * @param viewport - */ - public static void gluPickMatrix(float x, float y, float width, float height, IntBuffer viewport) { - - Project.gluPickMatrix(x, y, width, height, viewport); - } - - /** - * Method gluGetString. - * - * @param name - * @return String - */ - public static String gluGetString(int name) { - return Registry.gluGetString(name); - } - - /** - * Method gluCheckExtension. - * - * @param extName - * @param extString - * @return boolean - */ - public static boolean gluCheckExtension(String extName, String extString) { - return Registry.gluCheckExtension(extName, extString); - } - - /** - * Method gluBuild2DMipmaps - * - * @param target - * @param components - * @param width - * @param height - * @param format - * @param type - * @param data - * @return int - */ - public static int gluBuild2DMipmaps(int target, int components, int width, int height, int format, int type, - ByteBuffer data) { - - return MipMap.gluBuild2DMipmaps(target, components, width, height, format, type, data); - } - - /** - * Method gluScaleImage. - * - * @param format - * @param widthIn - * @param heightIn - * @param typeIn - * @param dataIn - * @param widthOut - * @param heightOut - * @param typeOut - * @param dataOut - * @return int - */ - public static int gluScaleImage(int format, int widthIn, int heightIn, int typeIn, ByteBuffer dataIn, int widthOut, - int heightOut, int typeOut, ByteBuffer dataOut) { - - return MipMap.gluScaleImage(format, widthIn, heightIn, typeIn, dataIn, widthOut, heightOut, typeOut, dataOut); - } - - public static String gluErrorString(int error_code) { - return switch (error_code) { - case GLU_INVALID_ENUM -> "Invalid enum (glu)"; - case GLU_INVALID_VALUE -> "Invalid value (glu)"; - case GLU_OUT_OF_MEMORY -> "Out of memory (glu)"; - default -> Util.translateGLErrorString(error_code); - }; - } - - public static GLUtessellator gluNewTess() { - return new GLUtessellatorImpl(); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/GLUtessellator.java b/src/main/java/org/lwjgl/util/glu/GLUtessellator.java deleted file mode 100644 index 2a5826cda..000000000 --- a/src/main/java/org/lwjgl/util/glu/GLUtessellator.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -public interface GLUtessellator { - - void gluDeleteTess(); - - void gluTessProperty(int which, double value); - - /* Returns tessellator property */ - void gluGetTessProperty(int which, double[] value, int value_offset); /* gluGetTessProperty() */ - - void gluTessNormal(double x, double y, double z); - - void gluTessCallback(int which, GLUtessellatorCallback aCallback); - - void gluTessVertex(double[] coords, int coords_offset, Object vertexData); - - void gluTessBeginPolygon(Object data); - - void gluTessBeginContour(); - - void gluTessEndContour(); - - void gluTessEndPolygon(); - - /*******************************************************/ - - /* Obsolete calls -- for backward compatibility */ - - void gluBeginPolygon(); - - /* ARGSUSED */ - void gluNextContour(int type); - - void gluEndPolygon(); -} diff --git a/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallback.java b/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallback.java deleted file mode 100644 index fff371af7..000000000 --- a/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallback.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu; - -/** - * GLUtessellatorCallback interface provides methods that the user will override to define the callbacks for a - * tessellation object. - * - * @author Eric Veach, July 1994 - * @author Java Port: Pepijn Van Eeckhoudt, July 2003 - * @author Java Port: Nathan Parker Burg, August 2003 - */ -public interface GLUtessellatorCallback { - - /** - * The begin callback method is invoked like {@link javax.media.opengl.GL#glBegin glBegin} to indicate the - * start of a (triangle) primitive. The method takes a single argument of type int. If the - * GLU_TESS_BOUNDARY_ONLY property is set to GL_FALSE, then the argument is set to either - * GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, or GL_TRIANGLES. If the GLU_TESS_BOUNDARY_ONLY - * property is set to GL_TRUE, then the argument will be set to GL_LINE_LOOP. - * - * @param type Specifics the type of begin/end pair being defined. The following values are valid: - * GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES or GL_LINE_LOOP. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #end end - * @see #begin begin - */ - void begin(int type); - - /** - * The same as the {@link #begin begin} callback method except that it takes an additional reference argument. This - * reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} - * was called. - * - * @param type Specifics the type of begin/end pair being defined. The following values are valid: - * GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES or GL_LINE_LOOP. - * @param polygonData Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #endData endData - * @see #begin begin - */ - void beginData(int type, Object polygonData); - - /** - * The edgeFlag callback method is similar to {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method - * takes a single boolean boundaryEdge that indicates which edges lie on the polygon boundary. If the boundaryEdge - * is GL_TRUE, then each vertex that follows begins an edge that lies on the polygon boundary, that is, an - * edge that separates an interior region from an exterior one. If the boundaryEdge is GL_FALSE, then each - * vertex that follows begins an edge that lies in the polygon interior. The edge flag callback (if defined) is - * invoked before the first vertex callback. - *

- * - * Since triangle fans and triangle strips do not support edge flags, the begin callback is not called with - * GL_TRIANGLE_FAN or GL_TRIANGLE_STRIP if a non-null edge flag callback is provided. (If the callback - * is initialized to null, there is no impact on performance). Instead, the fans and strips are converted to - * independent triangles. - * - * @param boundaryEdge Specifics which edges lie on the polygon boundary. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #edgeFlagData edgeFlagData - */ - void edgeFlag(boolean boundaryEdge); - - /** - * The same as the {@link #edgeFlag edgeFlage} callback method except that it takes an additional reference - * argument. This reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon - * gluTessBeginPolygon} was called. - * - * @param boundaryEdge Specifics which edges lie on the polygon boundary. - * @param polygonData Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #edgeFlag edgeFlag - */ - void edgeFlagData(boolean boundaryEdge, Object polygonData); - - /** - * The vertex callback method is invoked between the {@link #begin begin} and {@link #end end} callback - * methods. It is similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, and it defines the vertices of the - * triangles created by the tessellation process. The method takes a reference as its only argument. This reference - * is identical to the opaque reference provided by the user when the vertex was described (see - * {@link GLU#gluTessVertex gluTessVertex}). - * - * @param vertexData Specifics a reference to the vertices of the triangles created byt the tessellatin process. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #vertexData vertexData - */ - void vertex(Object vertexData); - - /** - * The same as the {@link #vertex vertex} callback method except that it takes an additional reference argument. - * This reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon - * gluTessBeginPolygon} was called. - * - * @param vertexData Specifics a reference to the vertices of the triangles created byt the tessellatin process. - * @param polygonData Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #vertex vertex - */ - void vertexData(Object vertexData, Object polygonData); - - /** - * The end callback serves the same purpose as {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a - * primitive and it takes no arguments. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #begin begin - * @see #endData endData - */ - void end(); - - /** - * The same as the {@link #end end} callback method except that it takes an additional reference argument. This - * reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} - * was called. - * - * @param polygonData Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #beginData beginData - * @see #end end - */ - void endData(Object polygonData); - - /** - * The combine callback method is called to create a new vertex when the tessellation detects an - * intersection, or wishes to merge features. The method takes four arguments: an array of three elements each of - * type double, an array of four references, an array of four elements each of type float, and a reference to a - * reference. - *

- * - * The vertex is defined as a linear combination of up to four existing vertices, stored in data. The - * coefficients of the linear combination are given by weight; these weights always add up to 1. All vertex - * pointers are valid even when some of the weights are 0. coords gives the location of the new vertex. - *

- * - * The user must allocate another vertex, interpolate parameters using data and weight, and return the - * new vertex pointer in outData. This handle is supplied during rendering callbacks. The user is responsible - * for freeing the memory some time after {@link GLU#gluTessEndPolygon gluTessEndPolygon} is called. - *

- * - * For example, if the polygon lies in an arbitrary plane in 3-space, and a color is associated with each vertex, - * the GLU_TESS_COMBINE callback might look like this: - * - * - *

-     * 
-     * void myCombine(double[] coords, Object[] data, float[] weight, Object[] outData) {
-     *     MyVertex newVertex = new MyVertex();
-     *
-     *     newVertex.x = coords[0];
-     *     newVertex.y = coords[1];
-     *     newVertex.z = coords[2];
-     *     newVertex.r = weight[0] * data[0].r + weight[1] * data[1].r + weight[2] * data[2].r + weight[3] * data[3].r;
-     *     newVertex.g = weight[0] * data[0].g + weight[1] * data[1].g + weight[2] * data[2].g + weight[3] * data[3].g;
-     *     newVertex.b = weight[0] * data[0].b + weight[1] * data[1].b + weight[2] * data[2].b + weight[3] * data[3].b;
-     *     newVertex.a = weight[0] * data[0].a + weight[1] * data[1].a + weight[2] * data[2].a + weight[3] * data[3].a;
-     *     outData = newVertex;
-     * }
-     * 
- * - * @param coords Specifics the location of the new vertex. - * @param data Specifics the vertices used to create the new vertex. - * @param weight Specifics the weights used to create the new vertex. - * @param outData Reference user the put the coodinates of the new vertex. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #combineData combineData - */ - void combine(double[] coords, Object[] data, float[] weight, Object[] outData); - - /** - * The same as the {@link #combine combine} callback method except that it takes an additional reference argument. - * This reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon - * gluTessBeginPolygon} was called. - * - * @param coords Specifics the location of the new vertex. - * @param data Specifics the vertices used to create the new vertex. - * @param weight Specifics the weights used to create the new vertex. - * @param outData Reference user the put the coodinates of the new vertex. - * @param polygonData Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #combine combine - */ - void combineData(double[] coords, Object[] data, float[] weight, Object[] outData, Object polygonData); - - /** - * The error callback method is called when an error is encountered. The one argument is of type int; it - * indicates the specific error that occurred and will be set to one of GLU_TESS_MISSING_BEGIN_POLYGON, - * GLU_TESS_MISSING_END_POLYGON, GLU_TESS_MISSING_BEGIN_CONTOUR, GLU_TESS_MISSING_END_CONTOUR, - * GLU_TESS_COORD_TOO_LARGE, GLU_TESS_NEED_COMBINE_CALLBACK or GLU_OUT_OF_MEMORY. Character - * strings describing these errors can be retrieved with the {@link GLU#gluErrorString gluErrorString} call. - *

- * - * The GLU library will recover from the first four errors by inserting the missing call(s). - * GLU_TESS_COORD_TOO_LARGE indicates that some vertex coordinate exceeded the predefined constant - * GLU_TESS_MAX_COORD in absolute value, and that the value has been clamped. (Coordinate values must be - * small enough so that two can be multiplied together without overflow.) GLU_TESS_NEED_COMBINE_CALLBACK - * indicates that the tessellation detected an intersection between two edges in the input data, and the - * GLU_TESS_COMBINE or GLU_TESS_COMBINE_DATA callback was not provided. No output is generated. - * GLU_OUT_OF_MEMORY indicates that there is not enough memory so no output is generated. - * - * @param errnum Specifics the error number code. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #errorData errorData - */ - void error(int errnum); - - /** - * The same as the {@link #error error} callback method except that it takes an additional reference argument. This - * reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} - * was called. - * - * @param errnum Specifics the error number code. - * @param polygonData Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #error error - */ - void errorData(int errnum, Object polygonData); - - // void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh); -} diff --git a/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java b/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java deleted file mode 100644 index 14d822788..000000000 --- a/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu; - -/** - * The GLUtessellatorCallbackAdapter provides a default implementation of {@link GLUtessellatorCallback - * GLUtessellatorCallback} with empty callback methods. This class can be extended to provide user defined callback - * methods. - * - * @author Eric Veach, July 1994 - * @author Java Port: Pepijn Van Eechhoudt, July 2003 - * @author Java Port: Nathan Parker Burg, August 2003 - */ -public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback { - - public void begin(int type) {} - - public void edgeFlag(boolean boundaryEdge) {} - - public void vertex(Object vertexData) {} - - public void end() {} - - // public void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh) {} - public void error(int errnum) {} - - public void combine(double[] coords, Object[] data, float[] weight, Object[] outData) {} - - public void beginData(int type, Object polygonData) {} - - public void edgeFlagData(boolean boundaryEdge, Object polygonData) {} - - public void vertexData(Object vertexData, Object polygonData) {} - - public void endData(Object polygonData) {} - - public void errorData(int errnum, Object polygonData) {} - - public void combineData(double[] coords, Object[] data, float[] weight, Object[] outData, Object polygonData) {} -} diff --git a/src/main/java/org/lwjgl/util/glu/MipMap.java b/src/main/java/org/lwjgl/util/glu/MipMap.java deleted file mode 100644 index 0bf612982..000000000 --- a/src/main/java/org/lwjgl/util/glu/MipMap.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl3.stb.STBImageResize.*; -import static org.lwjgl.util.glu.GLU.*; - -import java.nio.ByteBuffer; - -import org.lwjgl.BufferUtils; - -/** - * MipMap.java - * - * - * Created 11-jan-2004 - * - * @author Erik Duijs - */ -public class MipMap extends Util { - - /** - * Method gluBuild2DMipmaps - * - * @param target - * @param components - * @param width - * @param height - * @param format - * @param type - * @param data - * @return int - */ - public static int gluBuild2DMipmaps(final int target, final int components, final int width, final int height, - final int format, final int type, final ByteBuffer data) { - if (width < 1 || height < 1) return GLU_INVALID_VALUE; - - final int bpp = bytesPerPixel(format, type); - if (bpp == 0) return GLU_INVALID_ENUM; - - final int maxSize = glGetIntegerv(GL_MAX_TEXTURE_SIZE); - - int w = nearestPower(width); - if (w > maxSize) w = maxSize; - - int h = nearestPower(height); - if (h > maxSize) h = maxSize; - - ByteBuffer image; - int retVal = 0; - boolean done = false; - - if (w != width || h != height) { - // must rescale image to get "top" mipmap texture image - image = BufferUtils.createByteBuffer((w + 4) * h * bpp); - int error = gluScaleImage(format, width, height, type, data, w, h, type, image); - if (error != 0) { - retVal = error; - done = true; - } - - } else { - image = data; - } - - ByteBuffer bufferA = null; - ByteBuffer bufferB = null; - - int level = 0; - while (!done) { - glTexImage2D(target, level, components, w, h, 0, format, type, image); - - if (w == 1 && h == 1) break; - - final int newW = (w < 2) ? 1 : w >> 1; - final int newH = (h < 2) ? 1 : h >> 1; - - final ByteBuffer newImage; - - if (bufferA == null) newImage = (bufferA = BufferUtils.createByteBuffer((newW + 4) * newH * bpp)); - else if (bufferB == null) newImage = (bufferB = BufferUtils.createByteBuffer((newW + 4) * newH * bpp)); - else newImage = bufferB; - - int error = gluScaleImage(format, w, h, type, image, newW, newH, type, newImage); - if (error != 0) { - retVal = error; - done = true; - } - - image = newImage; - if (bufferB != null) bufferB = bufferA; - - w = newW; - h = newH; - level++; - } - - return retVal; - } - - /** - * Method gluScaleImage. - * - * @param format - * @param widthIn - * @param heightIn - * @param typein - * @param dataIn - * @param widthOut - * @param heightOut - * @param typeOut - * @param dataOut - * @return int - */ - public static int gluScaleImage(int format, int widthIn, int heightIn, int typein, ByteBuffer dataIn, int widthOut, - int heightOut, int typeOut, ByteBuffer dataOut) { - - final int components = compPerPix(format); - final int alphaIdx = formatAlphaIndex(format); - if (components == -1) return GLU_INVALID_ENUM; - final int strideIn = widthIn * components; - final int strideOut = widthOut * components; - - if (typein != typeOut) { - // We don't care about float->int resizing unless proven otherwise - return GLU_INVALID_ENUM; - } - - // Determine bytes per input type - switch (typein) { - case GL_UNSIGNED_BYTE -> { - if (null == stbir_resize_uint8_srgb( - dataIn, - widthIn, - heightIn, - strideIn, - dataOut, - widthOut, - heightOut, - strideOut, - 0)) { - throw new RuntimeException("Couldn't resize image with stbir"); - } - } - case GL_FLOAT -> { - if (null != stbir_resize_float_linear( - dataIn.asFloatBuffer(), - widthIn, - heightIn, - strideIn * 4, - dataOut.asFloatBuffer(), - widthOut, - heightOut, - strideOut * 4, - 0)) { - throw new RuntimeException("Couldn't resize image with stbir"); - } - } - default -> { - return GL_INVALID_ENUM; - } - } - - return 0; - } -} diff --git a/src/main/java/org/lwjgl/util/glu/PartialDisk.java b/src/main/java/org/lwjgl/util/glu/PartialDisk.java deleted file mode 100644 index 9f5ca3a34..000000000 --- a/src/main/java/org/lwjgl/util/glu/PartialDisk.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl.util.glu.GLU.*; - -/** - * PartialDisk.java - * - * - * Created 23-dec-2003 - * - * @author Erik Duijs - */ -public class PartialDisk extends Quadric { - - private static final int CACHE_SIZE = 240; - - /** - * Constructor for PartialDisk. - */ - public PartialDisk() { - super(); - } - - /** - * renders a partial disk on the z=0 plane. A partial disk is similar to a full disk, except that only the subset of - * the disk from startAngle through startAngle + sweepAngle is included (where 0 degrees is along the +y axis, 90 - * degrees along the +x axis, 180 along the -y axis, and 270 along the -x axis). - * - * The partial disk has a radius of outerRadius, and contains a concentric circular hole with a radius of - * innerRadius. If innerRadius is zero, then no hole is generated. The partial disk is subdivided around the z axis - * into slices (like pizza slices), and also about the z axis into rings (as specified by slices and loops, - * respectively). - * - * With respect to orientation, the +z side of the partial disk is considered to be outside (see - * gluQuadricOrientation). This means that if the orientation is set to GLU.GLU_OUTSIDE, then any normals generated - * point along the +z axis. Otherwise, they point along the -z axis. - * - * If texturing is turned on (with gluQuadricTexture), texture coordinates are generated linearly such that where - * r=outerRadius, the value at (r, 0, 0) is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and - * at (0, -r, 0) it is (0.5, 0). - */ - public void draw(float innerRadius, float outerRadius, int slices, int loops, float startAngle, float sweepAngle) { - - int i, j; - float[] sinCache = new float[CACHE_SIZE]; - float[] cosCache = new float[CACHE_SIZE]; - float angle; - float sintemp, costemp; - float deltaRadius; - float radiusLow, radiusHigh; - float texLow = 0, texHigh = 0; - float angleOffset; - int slices2; - int finish; - - if (slices >= CACHE_SIZE) slices = CACHE_SIZE - 1; - if (slices < 2 || loops < 1 || outerRadius <= 0.0f || innerRadius < 0.0f || innerRadius > outerRadius) { - // gluQuadricError(qobj, GLU.GLU_INVALID_VALUE); - System.err.println("PartialDisk: GLU_INVALID_VALUE"); - return; - } - - if (sweepAngle < -360.0f) sweepAngle = 360.0f; - if (sweepAngle > 360.0f) sweepAngle = 360.0f; - if (sweepAngle < 0) { - startAngle += sweepAngle; - sweepAngle = -sweepAngle; - } - - if (sweepAngle == 360.0f) { - slices2 = slices; - } else { - slices2 = slices + 1; - } - - /* Compute length (needed for normal calculations) */ - deltaRadius = outerRadius - innerRadius; - - /* Cache is the vertex locations cache */ - - angleOffset = startAngle / 180.0f * PI; - for (i = 0; i <= slices; i++) { - angle = angleOffset + ((PI * sweepAngle) / 180.0f) * i / slices; - sinCache[i] = sin(angle); - cosCache[i] = cos(angle); - } - - if (sweepAngle == 360.0f) { - sinCache[slices] = sinCache[0]; - cosCache[slices] = cosCache[0]; - } - - switch (super.normals) { - case GLU_FLAT: - case GLU_SMOOTH: - if (super.orientation == GLU_OUTSIDE) { - glNormal3f(0.0f, 0.0f, 1.0f); - } else { - glNormal3f(0.0f, 0.0f, -1.0f); - } - break; - default: - case GLU_NONE: - break; - } - - switch (super.drawStyle) { - case GLU_FILL -> { - if (innerRadius == .0f) { - finish = loops - 1; - /* Triangle strip for inner polygons */ - glBegin(GL_TRIANGLE_FAN); - if (super.textureFlag) { - glTexCoord2f(0.5f, 0.5f); - } - glVertex3f(0.0f, 0.0f, 0.0f); - radiusLow = outerRadius - deltaRadius * ((float) (loops - 1) / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - if (super.orientation == GLU_OUTSIDE) { - for (i = slices; i >= 0; i--) { - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - } else { - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - } - glEnd(); - } else { - finish = loops; - } - for (j = 0; j < finish; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - radiusHigh = outerRadius - deltaRadius * ((float) (j + 1) / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - texHigh = radiusHigh / outerRadius / 2; - } - - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - if (super.orientation == GLU_OUTSIDE) { - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - - if (super.textureFlag) { - glTexCoord2f(texHigh * sinCache[i] + 0.5f, texHigh * cosCache[i] + 0.5f); - } - glVertex3f(radiusHigh * sinCache[i], radiusHigh * cosCache[i], 0.0f); - } else { - if (super.textureFlag) { - glTexCoord2f(texHigh * sinCache[i] + 0.5f, texHigh * cosCache[i] + 0.5f); - } - glVertex3f(radiusHigh * sinCache[i], radiusHigh * cosCache[i], 0.0f); - - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - } - glEnd(); - } - } - case GLU_POINT -> { - glBegin(GL_POINTS); - for (i = 0; i < slices2; i++) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); - } - } - glEnd(); - } - case GLU_LINE -> { - if (innerRadius == outerRadius) { - glBegin(GL_LINE_STRIP); - - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f(sinCache[i] / 2 + 0.5f, cosCache[i] / 2 + 0.5f); - } - glVertex3f(innerRadius * sinCache[i], innerRadius * cosCache[i], 0.0f); - } - glEnd(); - break; - } - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - glEnd(); - } - for (i = 0; i < slices2; i++) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); - } - glEnd(); - } - } - case GLU_SILHOUETTE -> { - if (sweepAngle < 360.0f) { - for (i = 0; i <= slices; i += slices) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); - } - glEnd(); - } - } - for (j = 0; j <= loops; j += loops) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f(texLow * sinCache[i] + 0.5f, texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - glEnd(); - if (innerRadius == outerRadius) break; - } - } - default -> {} - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/PixelStoreState.java b/src/main/java/org/lwjgl/util/glu/PixelStoreState.java deleted file mode 100644 index 0fdd7175e..000000000 --- a/src/main/java/org/lwjgl/util/glu/PixelStoreState.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; - -/** - * PixelStoreState.java - * - * - * Created 11-jan-2004 - * - * @author Erik Duijs - */ -class PixelStoreState extends Util { - - public int unpackRowLength; - public int unpackAlignment; - public int unpackSkipRows; - public int unpackSkipPixels; - public int packRowLength; - public int packAlignment; - public int packSkipRows; - public int packSkipPixels; - - /** - * Constructor for PixelStoreState. - */ - PixelStoreState() { - super(); - load(); - } - - public void load() { - unpackRowLength = glGetIntegerv(GL_UNPACK_ROW_LENGTH); - unpackAlignment = glGetIntegerv(GL_UNPACK_ALIGNMENT); - unpackSkipRows = glGetIntegerv(GL_UNPACK_SKIP_ROWS); - unpackSkipPixels = glGetIntegerv(GL_UNPACK_SKIP_PIXELS); - packRowLength = glGetIntegerv(GL_PACK_ROW_LENGTH); - packAlignment = glGetIntegerv(GL_PACK_ALIGNMENT); - packSkipRows = glGetIntegerv(GL_PACK_SKIP_ROWS); - packSkipPixels = glGetIntegerv(GL_PACK_SKIP_PIXELS); - } - - public void save() { - glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackRowLength); - glPixelStorei(GL_UNPACK_ALIGNMENT, unpackAlignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackSkipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackSkipPixels); - glPixelStorei(GL_PACK_ROW_LENGTH, packRowLength); - glPixelStorei(GL_PACK_ALIGNMENT, packAlignment); - glPixelStorei(GL_PACK_SKIP_ROWS, packSkipRows); - glPixelStorei(GL_PACK_SKIP_PIXELS, packSkipPixels); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/Project.java b/src/main/java/org/lwjgl/util/glu/Project.java deleted file mode 100644 index 85c33a6fa..000000000 --- a/src/main/java/org/lwjgl/util/glu/Project.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; - -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; - -/** - * Project.java - *

- *

- * Created 11-jan-2004 - * - * @author Erik Duijs - */ -public class Project extends Util { - - private static final float[] IDENTITY_MATRIX = new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; - - private static final FloatBuffer matrix = BufferUtils.createFloatBuffer(16); - private static final FloatBuffer finalMatrix = BufferUtils.createFloatBuffer(16); - - private static final FloatBuffer tempMatrix = BufferUtils.createFloatBuffer(16); - private static final float[] in = new float[4]; - private static final float[] out = new float[4]; - - private static final float[] forward = new float[3]; - private static final float[] side = new float[3]; - private static final float[] up = new float[3]; - - /** - * Make matrix an identity matrix - */ - private static void __gluMakeIdentityf(FloatBuffer m) { - int oldPos = m.position(); - m.put(IDENTITY_MATRIX); - m.position(oldPos); - } - - /** - * Method __gluMultMatrixVecf - * - * @param finalMatrix - * @param in - * @param out - */ - private static void __gluMultMatrixVecf(FloatBuffer m, float[] in, float[] out) { - for (int i = 0; i < 4; i++) { - out[i] = in[0] * m.get(m.position() + 0 * 4 + i) + in[1] * m.get(m.position() + 1 * 4 + i) - + in[2] * m.get(m.position() + 2 * 4 + i) - + in[3] * m.get(m.position() + 3 * 4 + i); - } - } - - /** - * @param src - * @param inverse - * - * @return - */ - private static boolean __gluInvertMatrixf(FloatBuffer src, FloatBuffer inverse) { - int i, j, k, swap; - float t; - FloatBuffer temp = Project.tempMatrix; - - for (i = 0; i < 16; i++) { - temp.put(i, src.get(i + src.position())); - } - __gluMakeIdentityf(inverse); - - for (i = 0; i < 4; i++) { - /* - * * Look for largest element in column - */ - swap = i; - for (j = i + 1; j < 4; j++) { - /* - * if (fabs(temp[j][i]) > fabs(temp[i][i])) { swap = j; - */ - if (Math.abs(temp.get(j * 4 + i)) > Math.abs(temp.get(i * 4 + i))) { - swap = j; - } - } - - if (swap != i) { - /* - * * Swap rows. - */ - for (k = 0; k < 4; k++) { - t = temp.get(i * 4 + k); - temp.put(i * 4 + k, temp.get(swap * 4 + k)); - temp.put(swap * 4 + k, t); - - t = inverse.get(i * 4 + k); - inverse.put(i * 4 + k, inverse.get(swap * 4 + k)); - // inverse.put((i << 2) + k, inverse.get((swap << 2) + k)); - inverse.put(swap * 4 + k, t); - // inverse.put((swap << 2) + k, t); - } - } - - if (temp.get(i * 4 + i) == 0) { - /* - * * No non-zero pivot. The matrix is singular, which shouldn't * happen. This means the user gave us a - * bad matrix. - */ - return false; - } - - t = temp.get(i * 4 + i); - for (k = 0; k < 4; k++) { - temp.put(i * 4 + k, temp.get(i * 4 + k) / t); - inverse.put(i * 4 + k, inverse.get(i * 4 + k) / t); - } - for (j = 0; j < 4; j++) { - if (j != i) { - t = temp.get(j * 4 + i); - for (k = 0; k < 4; k++) { - temp.put(j * 4 + k, temp.get(j * 4 + k) - temp.get(i * 4 + k) * t); - inverse.put(j * 4 + k, inverse.get(j * 4 + k) - inverse.get(i * 4 + k) * t); - /* - * inverse.put( (j << 2) + k, inverse.get((j << 2) + k) - inverse.get((i << 2) + k) * t); - */ - } - } - } - } - return true; - } - - /** - * @param a - * @param b - * @param r - */ - private static void __gluMultMatricesf(FloatBuffer a, FloatBuffer b, FloatBuffer r) { - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - r.put( - r.position() + i * 4 + j, - a.get(a.position() + i * 4 + 0) * b.get(b.position() + 0 * 4 + j) - + a.get(a.position() + i * 4 + 1) * b.get(b.position() + 1 * 4 + j) - + a.get(a.position() + i * 4 + 2) * b.get(b.position() + 2 * 4 + j) - + a.get(a.position() + i * 4 + 3) * b.get(b.position() + 3 * 4 + j)); - } - } - } - - /** - * Method gluPerspective. - * - * @param fovy - * @param aspect - * @param zNear - * @param zFar - */ - public static void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - float sine, cotangent, deltaZ; - float radians = fovy / 2 * GLU.PI / 180; - - deltaZ = zFar - zNear; - sine = (float) Math.sin(radians); - - if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) { - return; - } - - cotangent = (float) Math.cos(radians) / sine; - - __gluMakeIdentityf(matrix); - - matrix.put(0 * 4 + 0, cotangent / aspect); - matrix.put(1 * 4 + 1, cotangent); - matrix.put(2 * 4 + 2, -(zFar + zNear) / deltaZ); - matrix.put(2 * 4 + 3, -1); - matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ); - matrix.put(3 * 4 + 3, 0); - - glMultMatrixf(matrix); - } - - /** - * Method gluLookAt - * - * @param eyex - * @param eyey - * @param eyez - * @param centerx - * @param centery - * @param centerz - * @param upx - * @param upy - * @param upz - */ - public static void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz, - float upx, float upy, float upz) { - float[] forward = Project.forward; - float[] side = Project.side; - float[] up = Project.up; - - forward[0] = centerx - eyex; - forward[1] = centery - eyey; - forward[2] = centerz - eyez; - - up[0] = upx; - up[1] = upy; - up[2] = upz; - - normalize(forward); - - /* Side = forward x up */ - cross(forward, up, side); - normalize(side); - - /* Recompute up as: up = side x forward */ - cross(side, forward, up); - - __gluMakeIdentityf(matrix); - matrix.put(0 * 4 + 0, side[0]); - matrix.put(1 * 4 + 0, side[1]); - matrix.put(2 * 4 + 0, side[2]); - - matrix.put(0 * 4 + 1, up[0]); - matrix.put(1 * 4 + 1, up[1]); - matrix.put(2 * 4 + 1, up[2]); - - matrix.put(0 * 4 + 2, -forward[0]); - matrix.put(1 * 4 + 2, -forward[1]); - matrix.put(2 * 4 + 2, -forward[2]); - - glMultMatrixf(matrix); - glTranslatef(-eyex, -eyey, -eyez); - } - - /** - * Method gluProject - * - * @param objx - * @param objy - * @param objz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param win_pos - */ - public static boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix, - FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) { - - float[] in = Project.in; - float[] out = Project.out; - - in[0] = objx; - in[1] = objy; - in[2] = objz; - in[3] = 1.0f; - - __gluMultMatrixVecf(modelMatrix, in, out); - __gluMultMatrixVecf(projMatrix, out, in); - - if (in[3] == 0.0) return false; - - in[3] = (1.0f / in[3]) * 0.5f; - - // Map x, y and z to range 0-1 - in[0] = in[0] * in[3] + 0.5f; - in[1] = in[1] * in[3] + 0.5f; - in[2] = in[2] * in[3] + 0.5f; - - // Map x,y to viewport - win_pos.put(0, in[0] * viewport.get(viewport.position() + 2) + viewport.get(viewport.position() + 0)); - win_pos.put(1, in[1] * viewport.get(viewport.position() + 3) + viewport.get(viewport.position() + 1)); - win_pos.put(2, in[2]); - - return true; - } - - /** - * Method gluUnproject - * - * @param winx - * @param winy - * @param winz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param obj_pos - */ - public static boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix, - FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) { - float[] in = Project.in; - float[] out = Project.out; - - __gluMultMatricesf(modelMatrix, projMatrix, finalMatrix); - - if (!__gluInvertMatrixf(finalMatrix, finalMatrix)) return false; - - in[0] = winx; - in[1] = winy; - in[2] = winz; - in[3] = 1.0f; - - // Map x and y from window coordinates - in[0] = (in[0] - viewport.get(viewport.position() + 0)) / viewport.get(viewport.position() + 2); - in[1] = (in[1] - viewport.get(viewport.position() + 1)) / viewport.get(viewport.position() + 3); - - // Map to range -1 to 1 - in[0] = in[0] * 2 - 1; - in[1] = in[1] * 2 - 1; - in[2] = in[2] * 2 - 1; - - __gluMultMatrixVecf(finalMatrix, in, out); - - if (out[3] == 0.0) return false; - - out[3] = 1.0f / out[3]; - - obj_pos.put(obj_pos.position() + 0, out[0] * out[3]); - obj_pos.put(obj_pos.position() + 1, out[1] * out[3]); - obj_pos.put(obj_pos.position() + 2, out[2] * out[3]); - - return true; - } - - /** - * Method gluPickMatrix - * - * @param x - * @param y - * @param deltaX - * @param deltaY - * @param viewport - */ - public static void gluPickMatrix(float x, float y, float deltaX, float deltaY, IntBuffer viewport) { - if (deltaX <= 0 || deltaY <= 0) { - return; - } - - /* Translate and scale the picked region to the entire window */ - glTranslatef( - (viewport.get(viewport.position() + 2) - 2 * (x - viewport.get(viewport.position() + 0))) / deltaX, - (viewport.get(viewport.position() + 3) - 2 * (y - viewport.get(viewport.position() + 1))) / deltaY, - 0); - glScalef(viewport.get(viewport.position() + 2) / deltaX, viewport.get(viewport.position() + 3) / deltaY, 1.0f); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/Quadric.java b/src/main/java/org/lwjgl/util/glu/Quadric.java deleted file mode 100644 index f05457d69..000000000 --- a/src/main/java/org/lwjgl/util/glu/Quadric.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl.util.glu.GLU.*; - -/** - * Quadric.java - * - * - * Created 22-dec-2003 - * - * @author Erik Duijs - */ -public class Quadric { - - protected int drawStyle; - protected int orientation; - protected boolean textureFlag; - protected int normals; - - /** - * Constructor for Quadric. - */ - public Quadric() { - super(); - - drawStyle = GLU_FILL; - orientation = GLU_OUTSIDE; - textureFlag = false; - normals = GLU_SMOOTH; - } - - /** - * Call glNormal3f after scaling normal to unit length. - * - * @param x - * @param y - * @param z - */ - protected void normal3f(float x, float y, float z) { - float mag; - - mag = (float) Math.sqrt(x * x + y * y + z * z); - if (mag > 0.00001F) { - x /= mag; - y /= mag; - z /= mag; - } - glNormal3f(x, y, z); - } - - /** - * specifies the draw style for quadrics. - * - * The legal values are as follows: - * - * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons are drawn in a counterclockwise fashion - * with respect to their normals (as defined with glu.quadricOrientation). - * - * GLU.LINE: Quadrics are rendered as a set of lines. - * - * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges separating coplanar faces will not be - * drawn. - * - * GLU.POINT: Quadrics are rendered as a set of points. - * - * @param drawStyle The drawStyle to set - */ - public void setDrawStyle(int drawStyle) { - this.drawStyle = drawStyle; - } - - /** - * specifies what kind of normals are desired for quadrics. The legal values are as follows: - * - * GLU.NONE: No normals are generated. - * - * GLU.FLAT: One normal is generated for every facet of a quadric. - * - * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This is the default. - * - * @param normals The normals to set - */ - public void setNormals(int normals) { - this.normals = normals; - } - - /** - * specifies what kind of orientation is desired for. The orientation values are as follows: - * - * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. - * - * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. - * - * Note that the interpretation of outward and inward depends on the quadric being drawn. - * - * @param orientation The orientation to set - */ - public void setOrientation(int orientation) { - this.orientation = orientation; - } - - /** - * specifies if texture coordinates should be generated for quadrics rendered with qobj. If the value of - * textureCoords is true, then texture coordinates are generated, and if textureCoords is false, they are not.. The - * default is false. - * - * The manner in which texture coordinates are generated depends upon the specific quadric rendered. - * - * @param textureFlag The textureFlag to set - */ - public void setTextureFlag(boolean textureFlag) { - this.textureFlag = textureFlag; - } - - /** - * Returns the drawStyle. - * - * @return int - */ - public int getDrawStyle() { - return drawStyle; - } - - /** - * Returns the normals. - * - * @return int - */ - public int getNormals() { - return normals; - } - - /** - * Returns the orientation. - * - * @return int - */ - public int getOrientation() { - return orientation; - } - - /** - * Returns the textureFlag. - * - * @return boolean - */ - public boolean getTextureFlag() { - return textureFlag; - } - - protected void TXTR_COORD(float x, float y) { - if (textureFlag) glTexCoord2f(x, y); - } - - protected float sin(float r) { - return (float) Math.sin(r); - } - - protected float cos(float r) { - return (float) Math.cos(r); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/Registry.java b/src/main/java/org/lwjgl/util/glu/Registry.java deleted file mode 100644 index 5bc37628d..000000000 --- a/src/main/java/org/lwjgl/util/glu/Registry.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl.util.glu.GLU.*; - -/** - * Registry.java - * - * - * Created 11-jan-2004 - * - * @author Erik Duijs - */ -public class Registry extends Util { - - private static final String versionString = "1.3"; - private static final String extensionString = "GLU_EXT_nurbs_tessellator " + "GLU_EXT_object_space_tess "; - - /** - * Method gluGetString - * - * @param name - * @return String - */ - public static String gluGetString(int name) { - - if (name == GLU_VERSION) { - return versionString; - } else if (name == GLU_EXTENSIONS) { - return extensionString; - } - return null; - } - - /** - * Method gluCheckExtension - * - * @param extName is an extension name. - * @param extString is a string of extensions separated by blank(s). There may or may not be leading or trailing - * blank(s) in extString. This works in cases of extensions being prefixes of another like - * GL_EXT_texture and GL_EXT_texture3D. - * @return boolean true if extName is found otherwise it returns false. - */ - public static boolean gluCheckExtension(String extName, String extString) { - if (extString == null || extName == null) return false; - - return extString.indexOf(extName) != -1; - } -} diff --git a/src/main/java/org/lwjgl/util/glu/Sphere.java b/src/main/java/org/lwjgl/util/glu/Sphere.java deleted file mode 100644 index 67e0435ea..000000000 --- a/src/main/java/org/lwjgl/util/glu/Sphere.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl.util.glu.GLU.*; - -/** - * Sphere.java - * - * - * Created 23-dec-2003 - * - * @author Erik Duijs - */ -public class Sphere extends Quadric { - - /** - * Constructor - */ - public Sphere() { - super(); - } - - /** - * draws a sphere of the given radius centered around the origin. The sphere is subdivided around the z axis into - * slices and along the z axis into stacks (similar to lines of longitude and latitude). - * - * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then any normals generated point away - * from the center of the sphere. Otherwise, they point toward the center of the sphere. - * - * If texturing is turned on (with glu.quadricTexture), then texture coordinates are generated so that t ranges from - * 0.0 at z=-radius to 1.0 at z=radius (t increases linearly along longitudinal lines), and s ranges from 0.0 at the - * +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis. - */ - public void draw(float radius, int slices, int stacks) { - // TODO - - float rho, drho, theta, dtheta; - float x, y, z; - float s, t, ds, dt; - int i, j, imin, imax; - boolean normals; - float nsign; - - normals = super.normals != GLU_NONE; - - if (super.orientation == GLU_INSIDE) { - nsign = -1.0f; - } else { - nsign = 1.0f; - } - - drho = PI / stacks; - dtheta = 2.0f * PI / slices; - - if (super.drawStyle == GLU_FILL) { - if (!super.textureFlag) { - // draw +Z end as a triangle fan - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0f, 0.0f, 1.0f); - glVertex3f(0.0f, 0.0f, nsign * radius); - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0f : j * dtheta; - x = -sin(theta) * sin(drho); - y = cos(theta) * sin(drho); - z = nsign * cos(drho); - if (normals) { - glNormal3f(x * nsign, y * nsign, z * nsign); - } - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - - ds = 1.0f / slices; - dt = 1.0f / stacks; - t = 1.0f; // because loop now runs from 0 - if (super.textureFlag) { - imin = 0; - imax = stacks; - } else { - imin = 1; - imax = stacks - 1; - } - - // draw intermediate stacks as quad strips - for (i = imin; i < imax; i++) { - rho = i * drho; - glBegin(GL_QUAD_STRIP); - s = 0.0f; - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0f : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - if (normals) { - glNormal3f(x * nsign, y * nsign, z * nsign); - } - TXTR_COORD(s, t); - glVertex3f(x * radius, y * radius, z * radius); - x = -sin(theta) * sin(rho + drho); - y = cos(theta) * sin(rho + drho); - z = nsign * cos(rho + drho); - if (normals) { - glNormal3f(x * nsign, y * nsign, z * nsign); - } - TXTR_COORD(s, t - dt); - s += ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - t -= dt; - } - - if (!super.textureFlag) { - // draw -Z end as a triangle fan - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0f, 0.0f, -1.0f); - glVertex3f(0.0f, 0.0f, -radius * nsign); - rho = PI - drho; - s = 1.0f; - for (j = slices; j >= 0; j--) { - theta = (j == slices) ? 0.0f : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - if (normals) glNormal3f(x * nsign, y * nsign, z * nsign); - s -= ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } else if (super.drawStyle == GLU_LINE || super.drawStyle == GLU_SILHOUETTE) { - // draw stack lines - for (i = 1; i < stacks; i++) { // stack line at i==stacks-1 was missing here - rho = i * drho; - glBegin(GL_LINE_LOOP); - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - // draw slice lines - for (j = 0; j < slices; j++) { - theta = j * dtheta; - glBegin(GL_LINE_STRIP); - for (i = 0; i <= stacks; i++) { - rho = i * drho; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } else if (super.drawStyle == GLU_POINT) { - // top and bottom-most points - glBegin(GL_POINTS); - if (normals) glNormal3f(0.0f, 0.0f, nsign); - glVertex3f(0.0f, 0.0f, radius); - if (normals) glNormal3f(0.0f, 0.0f, -nsign); - glVertex3f(0.0f, 0.0f, -radius); - - // loop over stacks - for (i = 1; i < stacks - 1; i++) { - rho = i * drho; - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - } - glEnd(); - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/Util.java b/src/main/java/org/lwjgl/util/glu/Util.java deleted file mode 100644 index 04c1048ca..000000000 --- a/src/main/java/org/lwjgl/util/glu/Util.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.glu; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl3.opengl.GL12.*; - -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; - -/** - * Util.java - *

- *

- * Created 7-jan-2004 - * - * @author Erik Duijs - */ -public class Util { - - /** - * temp IntBuffer of one for getting an int from some GL functions - */ - private static IntBuffer scratch = BufferUtils.createIntBuffer(16); - - /** - * Return ceiling of integer division - * - * @param a - * @param b - * - * @return int - */ - protected static int ceil(int a, int b) { - return (a % b == 0 ? a / b : a / b + 1); - } - - /** - * Normalize vector - * - * @param v - * - * @return float[] - */ - protected static float[] normalize(float[] v) { - float r; - - r = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - if (r == 0.0) return v; - - r = 1.0f / r; - - v[0] *= r; - v[1] *= r; - v[2] *= r; - - return v; - } - - /** - * Calculate cross-product - * - * @param v1 - * @param v2 - * @param result - */ - protected static void cross(float[] v1, float[] v2, float[] result) { - result[0] = v1[1] * v2[2] - v1[2] * v2[1]; - result[1] = v1[2] * v2[0] - v1[0] * v2[2]; - result[2] = v1[0] * v2[1] - v1[1] * v2[0]; - } - - /** - * Method compPerPix. - * - * @param format - * - * @return int - */ - protected static int compPerPix(int format) { - /* Determine number of components per pixel */ - return switch (format) { - case GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE -> 1; - case GL_LUMINANCE_ALPHA -> 2; - case GL_RGB, GL_BGR -> 3; - case GL_RGBA, GL_BGRA -> 4; - default -> -1; - }; - } - - /** - * @param format OpenGL image format - * @return Index of the alpha channel, or -1 if not found - */ - protected static int formatAlphaIndex(int format) { - return switch (format) { - case GL_ALPHA -> 0; - case GL_LUMINANCE_ALPHA -> 1; - case GL_RGBA, GL_BGRA -> 3; - default -> -1; - }; - } - - /** - * Method nearestPower. - *

- * Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well. - * - * @param value - * - * @return int - */ - protected static int nearestPower(int value) { - int i; - - i = 1; - - /* Error! */ - if (value == 0) return -1; - - for (;;) { - if (value == 1) { - return i; - } else if (value == 3) { - return i << 2; - } - value >>= 1; - i <<= 1; - } - } - - /** - * Method bytesPerPixel. - * - * @param format - * @param type - * - * @return int - */ - protected static int bytesPerPixel(int format, int type) { - int n, m; - - n = switch (format) { - case GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE -> 1; - case GL_LUMINANCE_ALPHA -> 2; - case GL_RGB, GL_BGR -> 3; - case GL_RGBA, GL_BGRA -> 4; - default -> 0; - }; - - m = switch (type) { - case GL_UNSIGNED_BYTE -> 1; - case GL_BYTE -> 1; - case GL_BITMAP -> 1; - case GL_UNSIGNED_SHORT -> 2; - case GL_SHORT -> 2; - case GL_UNSIGNED_INT -> 4; - case GL_INT -> 4; - case GL_FLOAT -> 4; - default -> 0; - }; - - return n * m; - } - - /** - * Convenience method for returning an int, rather than getting it out of a buffer yourself. - * - * @param what - * - * @return int - */ - protected static int glGetIntegerv(int what) { - scratch.rewind(); - org.lwjgl3.opengl.GL11.glGetIntegerv(what, scratch); - return scratch.get(); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java b/src/main/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java deleted file mode 100644 index 56d8091ed..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class ActiveRegion { - - GLUhalfEdge eUp; /* upper edge, directed right to left */ - DictNode nodeUp; /* dictionary node corresponding to eUp */ - int windingNumber; /* - * used to determine which regions are inside the polygon - */ - boolean inside; /* is this region inside the polygon? */ - boolean sentinel; /* marks fake edges at t = +/-infinity */ - boolean dirty; /* - * marks regions where the upper or lower edge has changed, but we haven't checked whether they - * intersect yet - */ - boolean fixUpperEdge; /* - * marks temporary edges introduced when we process a "right vertex" (one without any edges - * leaving to the right) - */ -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/CachedVertex.java b/src/main/java/org/lwjgl/util/glu/tessellation/CachedVertex.java deleted file mode 100644 index 4333a8a00..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/CachedVertex.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class CachedVertex { - - public double[] coords = new double[3]; - public Object data; -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/Dict.java b/src/main/java/org/lwjgl/util/glu/tessellation/Dict.java deleted file mode 100644 index f51b2fce4..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/Dict.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class Dict { - - DictNode head; - Object frame; - DictLeq leq; - - private Dict() {} - - static Dict dictNewDict(Object frame, DictLeq leq) { - Dict dict = new Dict(); - dict.head = new DictNode(); - - dict.head.key = null; - dict.head.next = dict.head; - dict.head.prev = dict.head; - - dict.frame = frame; - dict.leq = leq; - - return dict; - } - - static void dictDeleteDict(Dict dict) { - dict.head = null; - dict.frame = null; - dict.leq = null; - } - - static DictNode dictInsert(Dict dict, Object key) { - return dictInsertBefore(dict, dict.head, key); - } - - static DictNode dictInsertBefore(Dict dict, DictNode node, Object key) { - do { - node = node.prev; - } while (node.key != null && !dict.leq.leq(dict.frame, node.key, key)); - - DictNode newNode = new DictNode(); - newNode.key = key; - newNode.next = node.next; - node.next.prev = newNode; - newNode.prev = node; - node.next = newNode; - - return newNode; - } - - static Object dictKey(DictNode aNode) { - return aNode.key; - } - - static DictNode dictSucc(DictNode aNode) { - return aNode.next; - } - - static DictNode dictPred(DictNode aNode) { - return aNode.prev; - } - - static DictNode dictMin(Dict aDict) { - return aDict.head.next; - } - - static DictNode dictMax(Dict aDict) { - return aDict.head.prev; - } - - static void dictDelete(Dict dict, DictNode node) { - node.next.prev = node.prev; - node.prev.next = node.next; - } - - static DictNode dictSearch(Dict dict, Object key) { - DictNode node = dict.head; - - do { - node = node.next; - } while (node.key != null && !(dict.leq.leq(dict.frame, key, node.key))); - - return node; - } - - public interface DictLeq { - - boolean leq(Object frame, Object key1, Object key2); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/DictNode.java b/src/main/java/org/lwjgl/util/glu/tessellation/DictNode.java deleted file mode 100644 index d1c3a1fdb..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/DictNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class DictNode { - - Object key; - DictNode next; - DictNode prev; -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/GLUface.java b/src/main/java/org/lwjgl/util/glu/tessellation/GLUface.java deleted file mode 100644 index a3bdbb198..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/GLUface.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class GLUface { - - public GLUface next; /* next face (never NULL) */ - public GLUface prev; /* previous face (never NULL) */ - public GLUhalfEdge anEdge; /* a half edge with this left face */ - public Object data; /* room for client's data */ - - /* Internal data (keep hidden) */ - public GLUface trail; /* "stack" for conversion to strips */ - public boolean marked; /* flag for conversion to strips */ - public boolean inside; /* this face is in the polygon interior */ -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java b/src/main/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java deleted file mode 100644 index c5c0b1829..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class GLUhalfEdge { - - public GLUhalfEdge next; /* doubly-linked list (prev==Sym->next) */ - public GLUhalfEdge Sym; /* same edge, opposite direction */ - public GLUhalfEdge Onext; /* next edge CCW around origin */ - public GLUhalfEdge Lnext; /* next edge CCW around left face */ - public GLUvertex Org; /* origin vertex (Overtex too long) */ - public GLUface Lface; /* left face */ - - /* Internal data (keep hidden) */ - public ActiveRegion activeRegion; /* a region with this upper edge (sweep.c) */ - public int winding; /* change in winding number when crossing */ - public boolean first; - - GLUhalfEdge(boolean first) { - this.first = first; - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/GLUmesh.java b/src/main/java/org/lwjgl/util/glu/tessellation/GLUmesh.java deleted file mode 100644 index bbb6018cd..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/GLUmesh.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class GLUmesh { - - GLUvertex vHead = new GLUvertex(); /* dummy header for vertex list */ - GLUface fHead = new GLUface(); /* dummy header for face list */ - GLUhalfEdge eHead = new GLUhalfEdge(true); /* dummy header for edge list */ - GLUhalfEdge eHeadSym = new GLUhalfEdge(false); /* and its symmetric counterpart */ -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java b/src/main/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java deleted file mode 100644 index c5b3c5c6f..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java +++ /dev/null @@ -1,618 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -import static org.lwjgl.util.glu.GLU.*; - -import org.lwjgl.util.glu.GLUtessellator; -import org.lwjgl.util.glu.GLUtessellatorCallback; -import org.lwjgl.util.glu.GLUtessellatorCallbackAdapter; - -public class GLUtessellatorImpl implements GLUtessellator { - - public static final int TESS_MAX_CACHE = 100; - - private int state; /* what begin/end calls have we seen? */ - - private GLUhalfEdge lastEdge; /* lastEdge->Org is the most recent vertex */ - GLUmesh mesh; /* - * stores the input contours, and eventually the tessellation itself - */ - - /*** state needed for projecting onto the sweep plane ***/ - double[] normal = new double[3]; /* user-specified normal (if provided) */ - - double[] sUnit = new double[3]; /* unit vector in s-direction (debugging) */ - double[] tUnit = new double[3]; /* unit vector in t-direction (debugging) */ - - /*** state needed for the line sweep ***/ - private double relTolerance; /* tolerance for merging features */ - - int windingRule; /* rule for determining polygon interior */ - boolean fatalError; /* fatal error: needed combine callback */ - - Dict dict; /* edge dictionary for sweep line */ - PriorityQ pq; /* priority queue of vertex events */ - GLUvertex event; /* current sweep event being processed */ - - /*** state needed for rendering callbacks (see render.c) ***/ - boolean flagBoundary; /* mark boundary edges (use EdgeFlag) */ - - boolean boundaryOnly; /* Extract contours, not triangles */ - GLUface lonelyTriList; - /* list of triangles which could not be rendered as strips or fans */ - - /*** state needed to cache single-contour polygons for renderCache() */ - private boolean flushCacheOnNextVertex; /* empty cache on next vertex() call */ - - int cacheCount; /* number of cached vertices */ - CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE]; /* the vertex data */ - - /*** rendering callbacks that also pass polygon data ***/ - private Object polygonData; /* client data for current polygon */ - - private GLUtessellatorCallback callBegin; - private GLUtessellatorCallback callEdgeFlag; - private GLUtessellatorCallback callVertex; - private GLUtessellatorCallback callEnd; - // private GLUtessellatorCallback callMesh; - private GLUtessellatorCallback callError; - private GLUtessellatorCallback callCombine; - - private GLUtessellatorCallback callBeginData; - private GLUtessellatorCallback callEdgeFlagData; - private GLUtessellatorCallback callVertexData; - private GLUtessellatorCallback callEndData; - // private GLUtessellatorCallback callMeshData; - private GLUtessellatorCallback callErrorData; - private GLUtessellatorCallback callCombineData; - - private static final double GLU_TESS_DEFAULT_TOLERANCE = 0.0; - // private static final int GLU_TESS_MESH = 100112; /* void (*)(GLUmesh *mesh) */ - private static GLUtessellatorCallback NULL_CB = new GLUtessellatorCallbackAdapter(); - - // #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ - // MAX(sizeof(GLUvertex),sizeof(GLUface)))) - - public GLUtessellatorImpl() { - state = TessState.T_DORMANT; - - normal[0] = 0; - normal[1] = 0; - normal[2] = 0; - - relTolerance = GLU_TESS_DEFAULT_TOLERANCE; - windingRule = GLU_TESS_WINDING_ODD; - flagBoundary = false; - boundaryOnly = false; - - callBegin = NULL_CB; - callEdgeFlag = NULL_CB; - callVertex = NULL_CB; - callEnd = NULL_CB; - callError = NULL_CB; - callCombine = NULL_CB; - // callMesh = NULL_CB; - - callBeginData = NULL_CB; - callEdgeFlagData = NULL_CB; - callVertexData = NULL_CB; - callEndData = NULL_CB; - callErrorData = NULL_CB; - callCombineData = NULL_CB; - - polygonData = null; - - for (int i = 0; i < cache.length; i++) { - cache[i] = new CachedVertex(); - } - } - - public static GLUtessellator gluNewTess() { - return new GLUtessellatorImpl(); - } - - private void makeDormant() { - /* Return the tessellator to its original dormant state. */ - - if (mesh != null) { - Mesh.__gl_meshDeleteMesh(mesh); - } - state = TessState.T_DORMANT; - lastEdge = null; - mesh = null; - } - - private void requireState(int newState) { - if (state != newState) gotoState(newState); - } - - private void gotoState(int newState) { - while (state != newState) { - /* - * We change the current state one level at a time, to get to the desired state. - */ - if (state < newState) { - if (state == TessState.T_DORMANT) { - callErrorOrErrorData(GLU_TESS_MISSING_BEGIN_POLYGON); - gluTessBeginPolygon(null); - } else if (state == TessState.T_IN_POLYGON) { - callErrorOrErrorData(GLU_TESS_MISSING_BEGIN_CONTOUR); - gluTessBeginContour(); - } - } else { - if (state == TessState.T_IN_CONTOUR) { - callErrorOrErrorData(GLU_TESS_MISSING_END_CONTOUR); - gluTessEndContour(); - } else if (state == TessState.T_IN_POLYGON) { - callErrorOrErrorData(GLU_TESS_MISSING_END_POLYGON); - /* gluTessEndPolygon( tess ) is too much work! */ - makeDormant(); - } - } - } - } - - public void gluDeleteTess() { - requireState(TessState.T_DORMANT); - } - - public void gluTessProperty(int which, double value) { - switch (which) { - case GLU_TESS_TOLERANCE: - if (value < 0.0 || value > 1.0) break; - relTolerance = value; - return; - - case GLU_TESS_WINDING_RULE: - int windingRule = (int) value; - if (windingRule != value) break; /* not an integer */ - - switch (windingRule) { - case GLU_TESS_WINDING_ODD, GLU_TESS_WINDING_NONZERO, GLU_TESS_WINDING_POSITIVE, GLU_TESS_WINDING_NEGATIVE, GLU_TESS_WINDING_ABS_GEQ_TWO -> { - this.windingRule = windingRule; - return; - } - default -> {} - } - - case GLU_TESS_BOUNDARY_ONLY: - boundaryOnly = (value != 0); - return; - - default: - callErrorOrErrorData(GLU_INVALID_ENUM); - return; - } - callErrorOrErrorData(GLU_INVALID_VALUE); - } - - /* Returns tessellator property */ - public void gluGetTessProperty(int which, double[] value, int value_offset) { - switch (which) { - case GLU_TESS_TOLERANCE -> { - /* tolerance should be in range [0..1] */ - assert (0.0 <= relTolerance && relTolerance <= 1.0); - value[value_offset] = relTolerance; - } - case GLU_TESS_WINDING_RULE -> { - assert (windingRule == GLU_TESS_WINDING_ODD || windingRule == GLU_TESS_WINDING_NONZERO - || windingRule == GLU_TESS_WINDING_POSITIVE - || windingRule == GLU_TESS_WINDING_NEGATIVE - || windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO); - value[value_offset] = windingRule; - } - case GLU_TESS_BOUNDARY_ONLY -> { - assert (boundaryOnly == true || boundaryOnly == false); - value[value_offset] = boundaryOnly ? 1 : 0; - } - default -> { - value[value_offset] = 0.0; - callErrorOrErrorData(GLU_INVALID_ENUM); - } - } - } /* gluGetTessProperty() */ - - public void gluTessNormal(double x, double y, double z) { - normal[0] = x; - normal[1] = y; - normal[2] = z; - } - - public void gluTessCallback(int which, GLUtessellatorCallback aCallback) { - switch (which) { - case GLU_TESS_BEGIN -> { - callBegin = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_BEGIN_DATA -> { - callBeginData = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_EDGE_FLAG -> { - callEdgeFlag = aCallback == null ? NULL_CB : aCallback; - /* - * If the client wants boundary edges to be flagged, we render everything as separate triangles (no - * strips or fans). - */ - flagBoundary = aCallback != null; - return; - } - case GLU_TESS_EDGE_FLAG_DATA -> { - callEdgeFlagData = callBegin = aCallback == null ? NULL_CB : aCallback; - /* - * If the client wants boundary edges to be flagged, we render everything as separate triangles (no - * strips or fans). - */ - flagBoundary = (aCallback != null); - return; - } - case GLU_TESS_VERTEX -> { - callVertex = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_VERTEX_DATA -> { - callVertexData = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_END -> { - callEnd = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_END_DATA -> { - callEndData = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_ERROR -> { - callError = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_ERROR_DATA -> { - callErrorData = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_COMBINE -> { - callCombine = aCallback == null ? NULL_CB : aCallback; - return; - } - case GLU_TESS_COMBINE_DATA -> { - callCombineData = aCallback == null ? NULL_CB : aCallback; - return; - } - // case GLU_TESS_MESH: - // callMesh = aCallback == null ? NULL_CB : aCallback; - // return; - default -> { - callErrorOrErrorData(GLU_INVALID_ENUM); - return; - } - } - } - - private boolean addVertex(double[] coords, Object vertexData) { - GLUhalfEdge e; - - e = lastEdge; - if (e == null) { - /* Make a self-loop (one vertex, one edge). */ - - e = Mesh.__gl_meshMakeEdge(mesh); - if (e == null) return false; - if (!Mesh.__gl_meshSplice(e, e.Sym)) return false; - } else { - /* - * Create a new vertex and edge which immediately follow e in the ordering around the left face. - */ - if (Mesh.__gl_meshSplitEdge(e) == null) return false; - e = e.Lnext; - } - - /* The new vertex is now e.Org. */ - e.Org.data = vertexData; - e.Org.coords[0] = coords[0]; - e.Org.coords[1] = coords[1]; - e.Org.coords[2] = coords[2]; - - /* - * The winding of an edge says how the winding number changes as we cross from the edge''s right face to its - * left face. We add the vertices in such an order that a CCW contour will add +1 to the winding number of the - * region inside the contour. - */ - e.winding = 1; - e.Sym.winding = -1; - - lastEdge = e; - - return true; - } - - private void cacheVertex(double[] coords, Object vertexData) { - if (cache[cacheCount] == null) { - cache[cacheCount] = new CachedVertex(); - } - - CachedVertex v = cache[cacheCount]; - - v.data = vertexData; - v.coords[0] = coords[0]; - v.coords[1] = coords[1]; - v.coords[2] = coords[2]; - ++cacheCount; - } - - private boolean flushCache() { - CachedVertex[] v = cache; - - mesh = Mesh.__gl_meshNewMesh(); - if (mesh == null) return false; - - for (int i = 0; i < cacheCount; i++) { - CachedVertex vertex = v[i]; - if (!addVertex(vertex.coords, vertex.data)) return false; - } - cacheCount = 0; - flushCacheOnNextVertex = false; - - return true; - } - - public void gluTessVertex(double[] coords, int coords_offset, Object vertexData) { - int i; - boolean tooLarge = false; - double x; - double[] clamped = new double[3]; - - requireState(TessState.T_IN_CONTOUR); - - if (flushCacheOnNextVertex) { - if (!flushCache()) { - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - return; - } - lastEdge = null; - } - for (i = 0; i < 3; ++i) { - x = coords[i + coords_offset]; - if (x < -GLU_TESS_MAX_COORD) { - x = -GLU_TESS_MAX_COORD; - tooLarge = true; - } - if (x > GLU_TESS_MAX_COORD) { - x = GLU_TESS_MAX_COORD; - tooLarge = true; - } - clamped[i] = x; - } - if (tooLarge) { - callErrorOrErrorData(GLU_TESS_COORD_TOO_LARGE); - } - - if (mesh == null) { - if (cacheCount < TESS_MAX_CACHE) { - cacheVertex(clamped, vertexData); - return; - } - if (!flushCache()) { - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - return; - } - } - - if (!addVertex(clamped, vertexData)) { - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - } - } - - public void gluTessBeginPolygon(Object data) { - requireState(TessState.T_DORMANT); - - state = TessState.T_IN_POLYGON; - cacheCount = 0; - flushCacheOnNextVertex = false; - mesh = null; - - polygonData = data; - } - - public void gluTessBeginContour() { - requireState(TessState.T_IN_POLYGON); - - state = TessState.T_IN_CONTOUR; - lastEdge = null; - if (cacheCount > 0) { - /* - * Just set a flag so we don't get confused by empty contours -- these can be generated accidentally with - * the obsolete NextContour() interface. - */ - flushCacheOnNextVertex = true; - } - } - - public void gluTessEndContour() { - requireState(TessState.T_IN_CONTOUR); - state = TessState.T_IN_POLYGON; - } - - public void gluTessEndPolygon() { - GLUmesh mesh; - - try { - requireState(TessState.T_IN_POLYGON); - state = TessState.T_DORMANT; - - if (this.mesh == null) { - if (!flagBoundary /* && callMesh == NULL_CB */) { - - /* - * Try some special code to make the easy cases go quickly (eg. convex polygons). This code does NOT - * handle multiple contours, intersections, edge flags, and of course it does not generate an - * explicit mesh either. - */ - if (Render.__gl_renderCache(this)) { - polygonData = null; - return; - } - } - if (!flushCache()) throw new RuntimeException(); /* could've used a label */ - } - - /* - * Determine the polygon normal and project vertices onto the plane of the polygon. - */ - Normal.__gl_projectPolygon(this); - - /* - * __gl_computeInterior( tess ) computes the planar arrangement specified by the given contours, and further - * subdivides this arrangement into regions. Each region is marked "inside" if it belongs to the polygon, - * according to the rule given by windingRule. Each interior region is guaranteed be monotone. - */ - if (!Sweep.__gl_computeInterior(this)) { - throw new RuntimeException(); /* could've used a label */ - } - - mesh = this.mesh; - if (!fatalError) { - boolean rc = true; - - /* - * If the user wants only the boundary contours, we throw away all edges except those which separate the - * interior from the exterior. Otherwise we tessellate all the regions marked "inside". - */ - if (boundaryOnly) { - rc = TessMono.__gl_meshSetWindingNumber(mesh, 1, true); - } else { - rc = TessMono.__gl_meshTessellateInterior(mesh); - } - if (!rc) throw new RuntimeException(); /* could've used a label */ - - Mesh.__gl_meshCheckMesh(mesh); - - if (callBegin != NULL_CB || callEnd != NULL_CB - || callVertex != NULL_CB - || callEdgeFlag != NULL_CB - || callBeginData != NULL_CB - || callEndData != NULL_CB - || callVertexData != NULL_CB - || callEdgeFlagData != NULL_CB) { - if (boundaryOnly) { - Render.__gl_renderBoundary(this, mesh); /* output boundary contours */ - } else { - Render.__gl_renderMesh(this, mesh); /* output strips and fans */ - } - } - // if (callMesh != NULL_CB) { - // - /// * Throw away the exterior faces, so that all faces are interior. - // * This way the user doesn't have to check the "inside" flag, - // * and we don't need to even reveal its existence. It also leaves - // * the freedom for an implementation to not generate the exterior - // * faces in the first place. - // */ - // TessMono.__gl_meshDiscardExterior(mesh); - // callMesh.mesh(mesh); /* user wants the mesh itself */ - // mesh = null; - // polygonData = null; - // return; - // } - } - Mesh.__gl_meshDeleteMesh(mesh); - polygonData = null; - mesh = null; - } catch (Exception e) { - e.printStackTrace(); - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - } - } - - /*******************************************************/ - - /* Obsolete calls -- for backward compatibility */ - - public void gluBeginPolygon() { - gluTessBeginPolygon(null); - gluTessBeginContour(); - } - - /* ARGSUSED */ - public void gluNextContour(int type) { - gluTessEndContour(); - gluTessBeginContour(); - } - - public void gluEndPolygon() { - gluTessEndContour(); - gluTessEndPolygon(); - } - - void callBeginOrBeginData(int a) { - if (callBeginData != NULL_CB) callBeginData.beginData(a, polygonData); - else callBegin.begin(a); - } - - void callVertexOrVertexData(Object a) { - if (callVertexData != NULL_CB) callVertexData.vertexData(a, polygonData); - else callVertex.vertex(a); - } - - void callEdgeFlagOrEdgeFlagData(boolean a) { - if (callEdgeFlagData != NULL_CB) callEdgeFlagData.edgeFlagData(a, polygonData); - else callEdgeFlag.edgeFlag(a); - } - - void callEndOrEndData() { - if (callEndData != NULL_CB) callEndData.endData(polygonData); - else callEnd.end(); - } - - void callCombineOrCombineData(double[] coords, Object[] vertexData, float[] weights, Object[] outData) { - if (callCombineData != NULL_CB) callCombineData.combineData(coords, vertexData, weights, outData, polygonData); - else callCombine.combine(coords, vertexData, weights, outData); - } - - void callErrorOrErrorData(int a) { - if (callErrorData != NULL_CB) callErrorData.errorData(a, polygonData); - else callError.error(a); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/GLUvertex.java b/src/main/java/org/lwjgl/util/glu/tessellation/GLUvertex.java deleted file mode 100644 index cc8fd1c4a..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/GLUvertex.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class GLUvertex { - - public GLUvertex next; /* next vertex (never NULL) */ - public GLUvertex prev; /* previous vertex (never NULL) */ - public GLUhalfEdge anEdge; /* a half-edge with this origin */ - public Object data; /* client's data */ - - /* Internal data (keep hidden) */ - public double[] coords = new double[3]; /* vertex location in 3D */ - public double s, t; /* projection onto the sweep plane */ - public int pqHandle; /* to allow deletion from priority queue */ -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/Geom.java b/src/main/java/org/lwjgl/util/glu/tessellation/Geom.java deleted file mode 100644 index e9aac580b..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/Geom.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class Geom { - - private Geom() {} - - /* - * Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), evaluates the t-coord of the edge uw at the - * s-coord of the vertex v. Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. If uw is vertical (and - * thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even when v is very - * close to u or w. In particular if we set v->t = 0 and let r be the negated result (this evaluates (uw)(v->s)), - * then r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t). - */ - static double EdgeEval(GLUvertex u, GLUvertex v, GLUvertex w) { - double gapL, gapR; - - assert (VertLeq(u, v) && VertLeq(v, w)); - - gapL = v.s - u.s; - gapR = w.s - v.s; - - if (gapL + gapR > 0) { - if (gapL < gapR) { - return (v.t - u.t) + (u.t - w.t) * (gapL / (gapL + gapR)); - } else { - return (v.t - w.t) + (w.t - u.t) * (gapR / (gapL + gapR)); - } - } - /* vertical line */ - return 0; - } - - static double EdgeSign(GLUvertex u, GLUvertex v, GLUvertex w) { - double gapL, gapR; - - assert (VertLeq(u, v) && VertLeq(v, w)); - - gapL = v.s - u.s; - gapR = w.s - v.s; - - if (gapL + gapR > 0) { - return (v.t - w.t) * gapL + (v.t - u.t) * gapR; - } - /* vertical line */ - return 0; - } - - /*********************************************************************** - * Define versions of EdgeSign, EdgeEval with s and t transposed. - */ - static double TransEval(GLUvertex u, GLUvertex v, GLUvertex w) { - /* - * Given three vertices u,v,w such that TransLeq(u,v) && TransLeq(v,w), evaluates the t-coord of the edge uw at - * the s-coord of the vertex v. Returns v->s - (uw)(v->t), ie. the signed distance from uw to v. If uw is - * vertical (and thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even - * when v is very close to u or w. In particular if we set v->s = 0 and let r be the negated result (this - * evaluates (uw)(v->t)), then r is guaranteed to satisfy MIN(u->s,w->s) <= r <= MAX(u->s,w->s). - */ - double gapL, gapR; - - assert (TransLeq(u, v) && TransLeq(v, w)); - - gapL = v.t - u.t; - gapR = w.t - v.t; - - if (gapL + gapR > 0) { - if (gapL < gapR) { - return (v.s - u.s) + (u.s - w.s) * (gapL / (gapL + gapR)); - } else { - return (v.s - w.s) + (w.s - u.s) * (gapR / (gapL + gapR)); - } - } - /* vertical line */ - return 0; - } - - static double TransSign(GLUvertex u, GLUvertex v, GLUvertex w) { - /* - * Returns a number whose sign matches TransEval(u,v,w) but which is cheaper to evaluate. Returns > 0, == 0 , or - * < 0 as v is above, on, or below the edge uw. - */ - double gapL, gapR; - - assert (TransLeq(u, v) && TransLeq(v, w)); - - gapL = v.t - u.t; - gapR = w.t - v.t; - - if (gapL + gapR > 0) { - return (v.s - w.s) * gapL + (v.s - u.s) * gapR; - } - /* vertical line */ - return 0; - } - - static boolean VertCCW(GLUvertex u, GLUvertex v, GLUvertex w) { - /* - * For almost-degenerate situations, the results are not reliable. Unless the floating-point arithmetic can be - * performed without rounding errors, *any* implementation will give incorrect results on some degenerate - * inputs, so the client must have some way to handle this situation. - */ - return (u.s * (v.t - w.t) + v.s * (w.t - u.t) + w.s * (u.t - v.t)) >= 0; - } - - /* - * Given parameters a,x,b,y returns the value (b*x+a*y)/(a+b), or (x+y)/2 if a==b==0. It requires that a,b >= 0, and - * enforces this in the rare case that one argument is slightly negative. The implementation is extremely stable - * numerically. In particular it guarantees that the result r satisfies MIN(x,y) <= r <= MAX(x,y), and the results - * are very accurate even when a and b differ greatly in magnitude. - */ - static double Interpolate(double a, double x, double b, double y) { - a = (a < 0) ? 0 : a; - b = (b < 0) ? 0 : b; - if (a <= b) { - if (b == 0) { - return (x + y) / 2.0; - } else { - return (x + (y - x) * (a / (a + b))); - } - } else { - return (y + (x - y) * (b / (a + b))); - } - } - - static void EdgeIntersect(GLUvertex o1, GLUvertex d1, GLUvertex o2, GLUvertex d2, GLUvertex v) - /* - * Given edges (o1,d1) and (o2,d2), compute their point of intersection. The computed point is guaranteed to lie in - * the intersection of the bounding rectangles defined by each edge. - */ { - double z1, z2; - - /* - * This is certainly not the most efficient way to find the intersection of two line segments, but it is very - * numerically stable. Strategy: find the two middle vertices in the VertLeq ordering, and interpolate the - * intersection s-value from these. Then repeat using the TransLeq ordering to find the intersection t-value. - */ - - if (!VertLeq(o1, d1)) { - GLUvertex temp = o1; - o1 = d1; - d1 = temp; - } - if (!VertLeq(o2, d2)) { - GLUvertex temp = o2; - o2 = d2; - d2 = temp; - } - if (!VertLeq(o1, o2)) { - GLUvertex temp = o1; - o1 = o2; - o2 = temp; - temp = d1; - d1 = d2; - d2 = temp; - } - - if (!VertLeq(o2, d1)) { - /* Technically, no intersection -- do our best */ - v.s = (o2.s + d1.s) / 2.0; - } else if (VertLeq(d1, d2)) { - /* Interpolate between o2 and d1 */ - z1 = EdgeEval(o1, o2, d1); - z2 = EdgeEval(o2, d1, d2); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.s = Interpolate(z1, o2.s, z2, d1.s); - } else { - /* Interpolate between o2 and d2 */ - z1 = EdgeSign(o1, o2, d1); - z2 = -EdgeSign(o1, d2, d1); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.s = Interpolate(z1, o2.s, z2, d2.s); - } - - /* Now repeat the process for t */ - - if (!TransLeq(o1, d1)) { - GLUvertex temp = o1; - o1 = d1; - d1 = temp; - } - if (!TransLeq(o2, d2)) { - GLUvertex temp = o2; - o2 = d2; - d2 = temp; - } - if (!TransLeq(o1, o2)) { - GLUvertex temp = o2; - o2 = o1; - o1 = temp; - temp = d2; - d2 = d1; - d1 = temp; - } - - if (!TransLeq(o2, d1)) { - /* Technically, no intersection -- do our best */ - v.t = (o2.t + d1.t) / 2.0; - } else if (TransLeq(d1, d2)) { - /* Interpolate between o2 and d1 */ - z1 = TransEval(o1, o2, d1); - z2 = TransEval(o2, d1, d2); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.t = Interpolate(z1, o2.t, z2, d1.t); - } else { - /* Interpolate between o2 and d2 */ - z1 = TransSign(o1, o2, d1); - z2 = -TransSign(o1, d2, d1); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.t = Interpolate(z1, o2.t, z2, d2.t); - } - } - - static boolean VertEq(GLUvertex u, GLUvertex v) { - return u.s == v.s && u.t == v.t; - } - - static boolean VertLeq(GLUvertex u, GLUvertex v) { - return u.s < v.s || (u.s == v.s && u.t <= v.t); - } - - /* Versions of VertLeq, EdgeSign, EdgeEval with s and t transposed. */ - - static boolean TransLeq(GLUvertex u, GLUvertex v) { - return u.t < v.t || (u.t == v.t && u.s <= v.s); - } - - static boolean EdgeGoesLeft(GLUhalfEdge e) { - return VertLeq(e.Sym.Org, e.Org); - } - - static boolean EdgeGoesRight(GLUhalfEdge e) { - return VertLeq(e.Org, e.Sym.Org); - } - - static double VertL1dist(GLUvertex u, GLUvertex v) { - return Math.abs(u.s - v.s) + Math.abs(u.t - v.t); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/Mesh.java b/src/main/java/org/lwjgl/util/glu/tessellation/Mesh.java deleted file mode 100644 index 21261b01c..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/Mesh.java +++ /dev/null @@ -1,705 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class Mesh { - - private Mesh() {} - - /************************ Utility Routines ************************/ - /* - * MakeEdge creates a new pair of half-edges which form their own loop. No vertex or face structures are allocated, - * but these must be assigned before the current edge operation is completed. - */ - static GLUhalfEdge MakeEdge(GLUhalfEdge eNext) { - GLUhalfEdge e; - GLUhalfEdge eSym; - GLUhalfEdge ePrev; - - // EdgePair * pair = (EdgePair *) - // memAlloc(sizeof(EdgePair)); - // if (pair == NULL) return NULL; - // - // e = &pair - > e; - e = new GLUhalfEdge(true); - // eSym = &pair - > eSym; - eSym = new GLUhalfEdge(false); - - /* Make sure eNext points to the first edge of the edge pair */ - if (!eNext.first) { - eNext = eNext.Sym; - } - - /* - * Insert in circular doubly-linked list before eNext. Note that the prev pointer is stored in Sym->next. - */ - ePrev = eNext.Sym.next; - eSym.next = ePrev; - ePrev.Sym.next = e; - e.next = eNext; - eNext.Sym.next = eSym; - - e.Sym = eSym; - e.Onext = e; - e.Lnext = eSym; - e.Org = null; - e.Lface = null; - e.winding = 0; - e.activeRegion = null; - - eSym.Sym = e; - eSym.Onext = eSym; - eSym.Lnext = e; - eSym.Org = null; - eSym.Lface = null; - eSym.winding = 0; - eSym.activeRegion = null; - - return e; - } - - /* - * Splice( a, b ) is best described by the Guibas/Stolfi paper or the CS348a notes (see mesh.h). Basically it - * modifies the mesh so that a->Onext and b->Onext are exchanged. This can have various effects depending on whether - * a and b belong to different face or vertex rings. For more explanation see __gl_meshSplice() below. - */ - static void Splice(GLUhalfEdge a, GLUhalfEdge b) { - GLUhalfEdge aOnext = a.Onext; - GLUhalfEdge bOnext = b.Onext; - - aOnext.Sym.Lnext = b; - bOnext.Sym.Lnext = a; - a.Onext = bOnext; - b.Onext = aOnext; - } - - /* - * MakeVertex( newVertex, eOrig, vNext ) attaches a new vertex and makes it the origin of all edges in the vertex - * loop to which eOrig belongs. "vNext" gives a place to insert the new vertex in the global vertex list. We insert - * the new vertex *before* vNext so that algorithms which walk the vertex list will not see the newly created - * vertices. - */ - static void MakeVertex(GLUvertex newVertex, GLUhalfEdge eOrig, GLUvertex vNext) { - GLUhalfEdge e; - GLUvertex vPrev; - GLUvertex vNew = newVertex; - - assert (vNew != null); - - /* insert in circular doubly-linked list before vNext */ - vPrev = vNext.prev; - vNew.prev = vPrev; - vPrev.next = vNew; - vNew.next = vNext; - vNext.prev = vNew; - - vNew.anEdge = eOrig; - vNew.data = null; - /* leave coords, s, t undefined */ - - /* fix other edges on this vertex loop */ - e = eOrig; - do { - e.Org = vNew; - e = e.Onext; - } while (e != eOrig); - } - - /* - * MakeFace( newFace, eOrig, fNext ) attaches a new face and makes it the left face of all edges in the face loop to - * which eOrig belongs. "fNext" gives a place to insert the new face in the global face list. We insert the new face - * *before* fNext so that algorithms which walk the face list will not see the newly created faces. - */ - static void MakeFace(GLUface newFace, GLUhalfEdge eOrig, GLUface fNext) { - GLUhalfEdge e; - GLUface fPrev; - GLUface fNew = newFace; - - assert (fNew != null); - - /* insert in circular doubly-linked list before fNext */ - fPrev = fNext.prev; - fNew.prev = fPrev; - fPrev.next = fNew; - fNew.next = fNext; - fNext.prev = fNew; - - fNew.anEdge = eOrig; - fNew.data = null; - fNew.trail = null; - fNew.marked = false; - - /* - * The new face is marked "inside" if the old one was. This is a convenience for the common case where a face - * has been split in two. - */ - fNew.inside = fNext.inside; - - /* fix other edges on this face loop */ - e = eOrig; - do { - e.Lface = fNew; - e = e.Lnext; - } while (e != eOrig); - } - - /* - * KillEdge( eDel ) destroys an edge (the half-edges eDel and eDel->Sym), and removes from the global edge list. - */ - static void KillEdge(GLUhalfEdge eDel) { - GLUhalfEdge ePrev, eNext; - - /* Half-edges are allocated in pairs, see EdgePair above */ - if (!eDel.first) { - eDel = eDel.Sym; - } - - /* delete from circular doubly-linked list */ - eNext = eDel.next; - ePrev = eDel.Sym.next; - eNext.Sym.next = ePrev; - ePrev.Sym.next = eNext; - } - - /* - * KillVertex( vDel ) destroys a vertex and removes it from the global vertex list. It updates the vertex loop to - * point to a given new vertex. - */ - static void KillVertex(GLUvertex vDel, GLUvertex newOrg) { - GLUhalfEdge e, eStart = vDel.anEdge; - GLUvertex vPrev, vNext; - - /* change the origin of all affected edges */ - e = eStart; - do { - e.Org = newOrg; - e = e.Onext; - } while (e != eStart); - - /* delete from circular doubly-linked list */ - vPrev = vDel.prev; - vNext = vDel.next; - vNext.prev = vPrev; - vPrev.next = vNext; - } - - /* - * KillFace( fDel ) destroys a face and removes it from the global face list. It updates the face loop to point to a - * given new face. - */ - static void KillFace(GLUface fDel, GLUface newLface) { - GLUhalfEdge e, eStart = fDel.anEdge; - GLUface fPrev, fNext; - - /* change the left face of all affected edges */ - e = eStart; - do { - e.Lface = newLface; - e = e.Lnext; - } while (e != eStart); - - /* delete from circular doubly-linked list */ - fPrev = fDel.prev; - fNext = fDel.next; - fNext.prev = fPrev; - fPrev.next = fNext; - } - - /****************** Basic Edge Operations **********************/ - - /* - * __gl_meshMakeEdge creates one edge, two vertices, and a loop (face). The loop consists of the two new half-edges. - */ - public static GLUhalfEdge __gl_meshMakeEdge(GLUmesh mesh) { - GLUvertex newVertex1 = new GLUvertex(); - GLUvertex newVertex2 = new GLUvertex(); - GLUface newFace = new GLUface(); - GLUhalfEdge e; - - e = MakeEdge(mesh.eHead); - if (e == null) return null; - - MakeVertex(newVertex1, e, mesh.vHead); - MakeVertex(newVertex2, e.Sym, mesh.vHead); - MakeFace(newFace, e, mesh.fHead); - return e; - } - - /* - * __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the mesh connectivity and topology. It changes - * the mesh so that eOrg->Onext <- OLD( eDst->Onext ) eDst->Onext <- OLD( eOrg->Onext ) where OLD(...) means the - * value before the meshSplice operation. This can have two effects on the vertex structure: - if eOrg->Org != - * eDst->Org, the two vertices are merged together - if eOrg->Org == eDst->Org, the origin is split into two - * vertices In both cases, eDst->Org is changed and eOrg->Org is untouched. Similarly (and independently) for the - * face structure, - if eOrg->Lface == eDst->Lface, one loop is split into two - if eOrg->Lface != eDst->Lface, two - * distinct loops are joined into one In both cases, eDst->Lface is changed and eOrg->Lface is unaffected. Some - * special cases: If eDst == eOrg, the operation has no effect. If eDst == eOrg->Lnext, the new face will have a - * single edge. If eDst == eOrg->Lprev, the old face will have a single edge. If eDst == eOrg->Onext, the new vertex - * will have a single edge. If eDst == eOrg->Oprev, the old vertex will have a single edge. - */ - public static boolean __gl_meshSplice(GLUhalfEdge eOrg, GLUhalfEdge eDst) { - boolean joiningLoops = false; - boolean joiningVertices = false; - - if (eOrg == eDst) return true; - - if (eDst.Org != eOrg.Org) { - /* We are merging two disjoint vertices -- destroy eDst->Org */ - joiningVertices = true; - KillVertex(eDst.Org, eOrg.Org); - } - if (eDst.Lface != eOrg.Lface) { - /* We are connecting two disjoint loops -- destroy eDst.Lface */ - joiningLoops = true; - KillFace(eDst.Lface, eOrg.Lface); - } - - /* Change the edge structure */ - Splice(eDst, eOrg); - - if (!joiningVertices) { - GLUvertex newVertex = new GLUvertex(); - - /* - * We split one vertex into two -- the new vertex is eDst.Org. Make sure the old vertex points to a valid - * half-edge. - */ - MakeVertex(newVertex, eDst, eOrg.Org); - eOrg.Org.anEdge = eOrg; - } - if (!joiningLoops) { - GLUface newFace = new GLUface(); - - /* - * We split one loop into two -- the new loop is eDst.Lface. Make sure the old face points to a valid - * half-edge. - */ - MakeFace(newFace, eDst, eOrg.Lface); - eOrg.Lface.anEdge = eOrg; - } - - return true; - } - - /* - * __gl_meshDelete( eDel ) removes the edge eDel. There are several cases: if (eDel.Lface != eDel.Rface), we join - * two loops into one; the loop eDel.Lface is deleted. Otherwise, we are splitting one loop into two; the newly - * created loop will contain eDel.Dst. If the deletion of eDel would create isolated vertices, those are deleted as - * well. This function could be implemented as two calls to __gl_meshSplice plus a few calls to memFree, but this - * would allocate and delete unnecessary vertices and faces. - */ - static boolean __gl_meshDelete(GLUhalfEdge eDel) { - GLUhalfEdge eDelSym = eDel.Sym; - boolean joiningLoops = false; - - /* - * First step: disconnect the origin vertex eDel.Org. We make all changes to get a consistent mesh in this - * "intermediate" state. - */ - if (eDel.Lface != eDel.Sym.Lface) { - /* We are joining two loops into one -- remove the left face */ - joiningLoops = true; - KillFace(eDel.Lface, eDel.Sym.Lface); - } - - if (eDel.Onext == eDel) { - KillVertex(eDel.Org, null); - } else { - /* Make sure that eDel.Org and eDel.Sym.Lface point to valid half-edges */ - eDel.Sym.Lface.anEdge = eDel.Sym.Lnext; - eDel.Org.anEdge = eDel.Onext; - - Splice(eDel, eDel.Sym.Lnext); - if (!joiningLoops) { - GLUface newFace = new GLUface(); - - /* We are splitting one loop into two -- create a new loop for eDel. */ - MakeFace(newFace, eDel, eDel.Lface); - } - } - - /* - * Claim: the mesh is now in a consistent state, except that eDel.Org may have been deleted. Now we disconnect - * eDel.Dst. - */ - if (eDelSym.Onext == eDelSym) { - KillVertex(eDelSym.Org, null); - KillFace(eDelSym.Lface, null); - } else { - /* Make sure that eDel.Dst and eDel.Lface point to valid half-edges */ - eDel.Lface.anEdge = eDelSym.Sym.Lnext; - eDelSym.Org.anEdge = eDelSym.Onext; - Splice(eDelSym, eDelSym.Sym.Lnext); - } - - /* Any isolated vertices or faces have already been freed. */ - KillEdge(eDel); - - return true; - } - - /******************** Other Edge Operations **********************/ - - /* - * All these routines can be implemented with the basic edge operations above. They are provided for convenience and - * efficiency. - */ - - /* - * __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that eNew == eOrg.Lnext, and eNew.Dst is a newly - * created vertex. eOrg and eNew will have the same left face. - */ - static GLUhalfEdge __gl_meshAddEdgeVertex(GLUhalfEdge eOrg) { - GLUhalfEdge eNewSym; - GLUhalfEdge eNew = MakeEdge(eOrg); - - eNewSym = eNew.Sym; - - /* Connect the new edge appropriately */ - Splice(eNew, eOrg.Lnext); - - /* Set the vertex and face information */ - eNew.Org = eOrg.Sym.Org; - { - GLUvertex newVertex = new GLUvertex(); - - MakeVertex(newVertex, eNewSym, eNew.Org); - } - eNew.Lface = eNewSym.Lface = eOrg.Lface; - - return eNew; - } - - /* - * __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew, such that eNew == eOrg.Lnext. The new vertex - * is eOrg.Sym.Org == eNew.Org. eOrg and eNew will have the same left face. - */ - public static GLUhalfEdge __gl_meshSplitEdge(GLUhalfEdge eOrg) { - GLUhalfEdge eNew; - GLUhalfEdge tempHalfEdge = __gl_meshAddEdgeVertex(eOrg); - - eNew = tempHalfEdge.Sym; - - /* Disconnect eOrg from eOrg.Sym.Org and connect it to eNew.Org */ - Splice(eOrg.Sym, eOrg.Sym.Sym.Lnext); - Splice(eOrg.Sym, eNew); - - /* Set the vertex and face information */ - eOrg.Sym.Org = eNew.Org; - eNew.Sym.Org.anEdge = eNew.Sym; /* may have pointed to eOrg.Sym */ - eNew.Sym.Lface = eOrg.Sym.Lface; - eNew.winding = eOrg.winding; /* copy old winding information */ - eNew.Sym.winding = eOrg.Sym.winding; - - return eNew; - } - - /* - * __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg.Sym.Org to eDst.Org, and returns the corresponding - * half-edge eNew. If eOrg.Lface == eDst.Lface, this splits one loop into two, and the newly created loop is - * eNew.Lface. Otherwise, two disjoint loops are merged into one, and the loop eDst.Lface is destroyed. If (eOrg == - * eDst), the new face will have only two edges. If (eOrg.Lnext == eDst), the old face is reduced to a single edge. - * If (eOrg.Lnext.Lnext == eDst), the old face is reduced to two edges. - */ - static GLUhalfEdge __gl_meshConnect(GLUhalfEdge eOrg, GLUhalfEdge eDst) { - GLUhalfEdge eNewSym; - boolean joiningLoops = false; - GLUhalfEdge eNew = MakeEdge(eOrg); - - eNewSym = eNew.Sym; - - if (eDst.Lface != eOrg.Lface) { - /* We are connecting two disjoint loops -- destroy eDst.Lface */ - joiningLoops = true; - KillFace(eDst.Lface, eOrg.Lface); - } - - /* Connect the new edge appropriately */ - Splice(eNew, eOrg.Lnext); - Splice(eNewSym, eDst); - - /* Set the vertex and face information */ - eNew.Org = eOrg.Sym.Org; - eNewSym.Org = eDst.Org; - eNew.Lface = eNewSym.Lface = eOrg.Lface; - - /* Make sure the old face points to a valid half-edge */ - eOrg.Lface.anEdge = eNewSym; - - if (!joiningLoops) { - GLUface newFace = new GLUface(); - - /* We split one loop into two -- the new loop is eNew.Lface */ - MakeFace(newFace, eNew, eOrg.Lface); - } - return eNew; - } - - /******************** Other Operations **********************/ - - /* - * __gl_meshZapFace( fZap ) destroys a face and removes it from the global face list. All edges of fZap will have a - * null pointer as their left face. Any edges which also have a null pointer as their right face are deleted - * entirely (along with any isolated vertices this produces). An entire mesh can be deleted by zapping its faces, - * one at a time, in any order. Zapped faces cannot be used in further mesh operations! - */ - static void __gl_meshZapFace(GLUface fZap) { - GLUhalfEdge eStart = fZap.anEdge; - GLUhalfEdge e, eNext, eSym; - GLUface fPrev, fNext; - - /* walk around face, deleting edges whose right face is also null */ - eNext = eStart.Lnext; - do { - e = eNext; - eNext = e.Lnext; - - e.Lface = null; - if (e.Sym.Lface == null) { - /* delete the edge -- see __gl_MeshDelete above */ - - if (e.Onext == e) { - KillVertex(e.Org, null); - } else { - /* Make sure that e.Org points to a valid half-edge */ - e.Org.anEdge = e.Onext; - Splice(e, e.Sym.Lnext); - } - eSym = e.Sym; - if (eSym.Onext == eSym) { - KillVertex(eSym.Org, null); - } else { - /* Make sure that eSym.Org points to a valid half-edge */ - eSym.Org.anEdge = eSym.Onext; - Splice(eSym, eSym.Sym.Lnext); - } - KillEdge(e); - } - } while (e != eStart); - - /* delete from circular doubly-linked list */ - fPrev = fZap.prev; - fNext = fZap.next; - fNext.prev = fPrev; - fPrev.next = fNext; - } - - /* - * __gl_meshNewMesh() creates a new mesh with no edges, no vertices, and no loops (what we usually call a "face"). - */ - public static GLUmesh __gl_meshNewMesh() { - GLUvertex v; - GLUface f; - GLUhalfEdge e; - GLUhalfEdge eSym; - GLUmesh mesh = new GLUmesh(); - - v = mesh.vHead; - f = mesh.fHead; - e = mesh.eHead; - eSym = mesh.eHeadSym; - - v.next = v.prev = v; - v.anEdge = null; - v.data = null; - - f.next = f.prev = f; - f.anEdge = null; - f.data = null; - f.trail = null; - f.marked = false; - f.inside = false; - - e.next = e; - e.Sym = eSym; - e.Onext = null; - e.Lnext = null; - e.Org = null; - e.Lface = null; - e.winding = 0; - e.activeRegion = null; - - eSym.next = eSym; - eSym.Sym = e; - eSym.Onext = null; - eSym.Lnext = null; - eSym.Org = null; - eSym.Lface = null; - eSym.winding = 0; - eSym.activeRegion = null; - - return mesh; - } - - /* - * __gl_meshUnion( mesh1, mesh2 ) forms the union of all structures in both meshes, and returns the new mesh (the - * old meshes are destroyed). - */ - static GLUmesh __gl_meshUnion(GLUmesh mesh1, GLUmesh mesh2) { - GLUface f1 = mesh1.fHead; - GLUvertex v1 = mesh1.vHead; - GLUhalfEdge e1 = mesh1.eHead; - GLUface f2 = mesh2.fHead; - GLUvertex v2 = mesh2.vHead; - GLUhalfEdge e2 = mesh2.eHead; - - /* Add the faces, vertices, and edges of mesh2 to those of mesh1 */ - if (f2.next != f2) { - f1.prev.next = f2.next; - f2.next.prev = f1.prev; - f2.prev.next = f1; - f1.prev = f2.prev; - } - - if (v2.next != v2) { - v1.prev.next = v2.next; - v2.next.prev = v1.prev; - v2.prev.next = v1; - v1.prev = v2.prev; - } - - if (e2.next != e2) { - e1.Sym.next.Sym.next = e2.next; - e2.next.Sym.next = e1.Sym.next; - e2.Sym.next.Sym.next = e1; - e1.Sym.next = e2.Sym.next; - } - - return mesh1; - } - - /* - * __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - */ - static void __gl_meshDeleteMeshZap(GLUmesh mesh) { - GLUface fHead = mesh.fHead; - - while (fHead.next != fHead) { - __gl_meshZapFace(fHead.next); - } - assert (mesh.vHead.next == mesh.vHead); - } - - /* - * __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - */ - public static void __gl_meshDeleteMesh(GLUmesh mesh) { - GLUface f, fNext; - GLUvertex v, vNext; - GLUhalfEdge e, eNext; - - for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { - fNext = f.next; - } - - for (v = mesh.vHead.next; v != mesh.vHead; v = vNext) { - vNext = v.next; - } - - for (e = mesh.eHead.next; e != mesh.eHead; e = eNext) { - /* One call frees both e and e.Sym (see EdgePair above) */ - eNext = e.next; - } - } - - /* - * __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. - */ - public static void __gl_meshCheckMesh(GLUmesh mesh) { - GLUface fHead = mesh.fHead; - GLUvertex vHead = mesh.vHead; - GLUhalfEdge eHead = mesh.eHead; - GLUface f, fPrev; - GLUvertex v, vPrev; - GLUhalfEdge e, ePrev; - - fPrev = fHead; - for (fPrev = fHead; (f = fPrev.next) != fHead; fPrev = f) { - assert (f.prev == fPrev); - e = f.anEdge; - do { - assert (e.Sym != e); - assert (e.Sym.Sym == e); - assert (e.Lnext.Onext.Sym == e); - assert (e.Onext.Sym.Lnext == e); - assert (e.Lface == f); - e = e.Lnext; - } while (e != f.anEdge); - } - assert (f.prev == fPrev && f.anEdge == null && f.data == null); - - vPrev = vHead; - for (vPrev = vHead; (v = vPrev.next) != vHead; vPrev = v) { - assert (v.prev == vPrev); - e = v.anEdge; - do { - assert (e.Sym != e); - assert (e.Sym.Sym == e); - assert (e.Lnext.Onext.Sym == e); - assert (e.Onext.Sym.Lnext == e); - assert (e.Org == v); - e = e.Onext; - } while (e != v.anEdge); - } - assert (v.prev == vPrev && v.anEdge == null && v.data == null); - - ePrev = eHead; - for (ePrev = eHead; (e = ePrev.next) != eHead; ePrev = e) { - assert (e.Sym.next == ePrev.Sym); - assert (e.Sym != e); - assert (e.Sym.Sym == e); - assert (e.Org != null); - assert (e.Sym.Org != null); - assert (e.Lnext.Onext.Sym == e); - assert (e.Onext.Sym.Lnext == e); - } - assert (e.Sym.next == ePrev.Sym && e.Sym == mesh.eHeadSym - && e.Sym.Sym == e - && e.Org == null - && e.Sym.Org == null - && e.Lface == null - && e.Sym.Lface == null); - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/Normal.java b/src/main/java/org/lwjgl/util/glu/tessellation/Normal.java deleted file mode 100644 index 51d515f9e..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/Normal.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -import org.lwjgl.util.glu.GLU; - -class Normal { - - private Normal() {} - - static boolean SLANTED_SWEEP; - static double S_UNIT_X; /* Pre-normalized */ - static double S_UNIT_Y; - private static final boolean TRUE_PROJECT = false; - - static { - if (SLANTED_SWEEP) { - /* - * The "feature merging" is not intended to be complete. There are special cases where edges are nearly - * parallel to the sweep line which are not implemented. The algorithm should still behave robustly (ie. - * produce a reasonable tesselation) in the presence of such edges, however it may miss features which could - * have been merged. We could minimize this effect by choosing the sweep line direction to be something - * unusual (ie. not parallel to one of the coordinate axes). - */ - S_UNIT_X = 0.50941539564955385; /* Pre-normalized */ - S_UNIT_Y = 0.86052074622010633; - } else { - S_UNIT_X = 1.0; - S_UNIT_Y = 0.0; - } - } - - private static double Dot(double[] u, double[] v) { - return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]); - } - - static void Normalize(double[] v) { - double len = v[0] * v[0] + v[1] * v[1] + v[2] * v[2]; - - assert (len > 0); - len = Math.sqrt(len); - v[0] /= len; - v[1] /= len; - v[2] /= len; - } - - static int LongAxis(double[] v) { - int i = 0; - - if (Math.abs(v[1]) > Math.abs(v[0])) { - i = 1; - } - if (Math.abs(v[2]) > Math.abs(v[i])) { - i = 2; - } - return i; - } - - static void ComputeNormal(GLUtessellatorImpl tess, double[] norm) { - GLUvertex v, v1, v2; - double c, tLen2, maxLen2; - double[] maxVal, minVal, d1, d2, tNorm; - GLUvertex[] maxVert, minVert; - GLUvertex vHead = tess.mesh.vHead; - int i; - - maxVal = new double[3]; - minVal = new double[3]; - minVert = new GLUvertex[3]; - maxVert = new GLUvertex[3]; - d1 = new double[3]; - d2 = new double[3]; - tNorm = new double[3]; - - maxVal[0] = maxVal[1] = maxVal[2] = -2 * GLU.TESS_MAX_COORD; - minVal[0] = minVal[1] = minVal[2] = 2 * GLU.TESS_MAX_COORD; - - for (v = vHead.next; v != vHead; v = v.next) { - for (i = 0; i < 3; ++i) { - c = v.coords[i]; - if (c < minVal[i]) { - minVal[i] = c; - minVert[i] = v; - } - if (c > maxVal[i]) { - maxVal[i] = c; - maxVert[i] = v; - } - } - } - - /* - * Find two vertices separated by at least 1/sqrt(3) of the maximum distance between any two vertices - */ - i = 0; - if (maxVal[1] - minVal[1] > maxVal[0] - minVal[0]) { - i = 1; - } - if (maxVal[2] - minVal[2] > maxVal[i] - minVal[i]) { - i = 2; - } - if (minVal[i] >= maxVal[i]) { - /* All vertices are the same -- normal doesn't matter */ - norm[0] = 0; - norm[1] = 0; - norm[2] = 1; - return; - } - - /* - * Look for a third vertex which forms the triangle with maximum area (Length of normal == twice the triangle - * area) - */ - maxLen2 = 0; - v1 = minVert[i]; - v2 = maxVert[i]; - d1[0] = v1.coords[0] - v2.coords[0]; - d1[1] = v1.coords[1] - v2.coords[1]; - d1[2] = v1.coords[2] - v2.coords[2]; - for (v = vHead.next; v != vHead; v = v.next) { - d2[0] = v.coords[0] - v2.coords[0]; - d2[1] = v.coords[1] - v2.coords[1]; - d2[2] = v.coords[2] - v2.coords[2]; - tNorm[0] = d1[1] * d2[2] - d1[2] * d2[1]; - tNorm[1] = d1[2] * d2[0] - d1[0] * d2[2]; - tNorm[2] = d1[0] * d2[1] - d1[1] * d2[0]; - tLen2 = tNorm[0] * tNorm[0] + tNorm[1] * tNorm[1] + tNorm[2] * tNorm[2]; - if (tLen2 > maxLen2) { - maxLen2 = tLen2; - norm[0] = tNorm[0]; - norm[1] = tNorm[1]; - norm[2] = tNorm[2]; - } - } - - if (maxLen2 <= 0) { - /* All points lie on a single line -- any decent normal will do */ - norm[0] = norm[1] = norm[2] = 0; - norm[LongAxis(d1)] = 1; - } - } - - static void CheckOrientation(GLUtessellatorImpl tess) { - double area; - GLUface f, fHead = tess.mesh.fHead; - GLUvertex v, vHead = tess.mesh.vHead; - GLUhalfEdge e; - - /* - * When we compute the normal automatically, we choose the orientation so that the the sum of the signed areas - * of all contours is non-negative. - */ - area = 0; - for (f = fHead.next; f != fHead; f = f.next) { - e = f.anEdge; - if (e.winding <= 0) continue; - do { - area += (e.Org.s - e.Sym.Org.s) * (e.Org.t + e.Sym.Org.t); - e = e.Lnext; - } while (e != f.anEdge); - } - if (area < 0) { - /* Reverse the orientation by flipping all the t-coordinates */ - for (v = vHead.next; v != vHead; v = v.next) { - v.t = -v.t; - } - tess.tUnit[0] = -tess.tUnit[0]; - tess.tUnit[1] = -tess.tUnit[1]; - tess.tUnit[2] = -tess.tUnit[2]; - } - } - - /* - * Determine the polygon normal and project vertices onto the plane of the polygon. - */ - public static void __gl_projectPolygon(GLUtessellatorImpl tess) { - GLUvertex v, vHead = tess.mesh.vHead; - double w; - double[] norm = new double[3]; - double[] sUnit, tUnit; - int i; - boolean computedNormal = false; - - norm[0] = tess.normal[0]; - norm[1] = tess.normal[1]; - norm[2] = tess.normal[2]; - if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) { - ComputeNormal(tess, norm); - computedNormal = true; - } - sUnit = tess.sUnit; - tUnit = tess.tUnit; - i = LongAxis(norm); - - if (TRUE_PROJECT) { - /* - * Choose the initial sUnit vector to be approximately perpendicular to the normal. - */ - Normalize(norm); - - sUnit[i] = 0; - sUnit[(i + 1) % 3] = S_UNIT_X; - sUnit[(i + 2) % 3] = S_UNIT_Y; - - /* Now make it exactly perpendicular */ - w = Dot(sUnit, norm); - sUnit[0] -= w * norm[0]; - sUnit[1] -= w * norm[1]; - sUnit[2] -= w * norm[2]; - Normalize(sUnit); - - /* Choose tUnit so that (sUnit,tUnit,norm) form a right-handed frame */ - tUnit[0] = norm[1] * sUnit[2] - norm[2] * sUnit[1]; - tUnit[1] = norm[2] * sUnit[0] - norm[0] * sUnit[2]; - tUnit[2] = norm[0] * sUnit[1] - norm[1] * sUnit[0]; - Normalize(tUnit); - } else { - /* Project perpendicular to a coordinate axis -- better numerically */ - sUnit[i] = 0; - sUnit[(i + 1) % 3] = S_UNIT_X; - sUnit[(i + 2) % 3] = S_UNIT_Y; - - tUnit[i] = 0; - tUnit[(i + 1) % 3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y; - tUnit[(i + 2) % 3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X; - } - - /* Project the vertices onto the sweep plane */ - for (v = vHead.next; v != vHead; v = v.next) { - v.s = Dot(v.coords, sUnit); - v.t = Dot(v.coords, tUnit); - } - if (computedNormal) { - CheckOrientation(tess); - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQ.java b/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQ.java deleted file mode 100644 index 06cc877f3..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQ.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -abstract class PriorityQ { - - public static final int INIT_SIZE = 32; - - public static class PQnode { - - int handle; - } - - public static class PQhandleElem { - - Object key; - int node; - } - - public interface Leq { - - boolean leq(Object key1, Object key2); - } - - // #ifdef FOR_TRITE_TEST_PROGRAM - // private static boolean LEQ(PriorityQCommon.Leq leq, Object x,Object y) { - // return pq.leq.leq(x,y); - // } - // #else - /* Violates modularity, but a little faster */ - // #include "geom.h" - public static boolean LEQ(Leq leq, Object x, Object y) { - return Geom.VertLeq((GLUvertex) x, (GLUvertex) y); - } - - static PriorityQ pqNewPriorityQ(Leq leq) { - return new PriorityQSort(leq); - } - - abstract void pqDeletePriorityQ(); - - abstract boolean pqInit(); - - abstract int pqInsert(Object keyNew); - - abstract Object pqExtractMin(); - - abstract void pqDelete(int hCurr); - - abstract Object pqMinimum(); - - abstract boolean pqIsEmpty(); - // #endif -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java b/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java deleted file mode 100644 index 5cd90e02b..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class PriorityQHeap extends PriorityQ { - - PriorityQ.PQnode[] nodes; - PriorityQ.PQhandleElem[] handles; - int size, max; - int freeList; - boolean initialized; - PriorityQ.Leq leq; - - /* really __gl_pqHeapNewPriorityQ */ - PriorityQHeap(PriorityQ.Leq leq) { - size = 0; - max = PriorityQ.INIT_SIZE; - nodes = new PriorityQ.PQnode[PriorityQ.INIT_SIZE + 1]; - for (int i = 0; i < nodes.length; i++) { - nodes[i] = new PQnode(); - } - handles = new PriorityQ.PQhandleElem[PriorityQ.INIT_SIZE + 1]; - for (int i = 0; i < handles.length; i++) { - handles[i] = new PQhandleElem(); - } - initialized = false; - freeList = 0; - this.leq = leq; - - nodes[1].handle = 1; /* so that Minimum() returns NULL */ - handles[1].key = null; - } - - /* really __gl_pqHeapDeletePriorityQ */ - void pqDeletePriorityQ() { - handles = null; - nodes = null; - } - - void FloatDown(int curr) { - PriorityQ.PQnode[] n = nodes; - PriorityQ.PQhandleElem[] h = handles; - int hCurr, hChild; - int child; - - hCurr = n[curr].handle; - for (;;) { - child = curr << 1; - if (child < size && LEQ(leq, h[n[child + 1].handle].key, h[n[child].handle].key)) { - ++child; - } - - assert (child <= max); - - hChild = n[child].handle; - if (child > size || LEQ(leq, h[hCurr].key, h[hChild].key)) { - n[curr].handle = hCurr; - h[hCurr].node = curr; - break; - } - n[curr].handle = hChild; - h[hChild].node = curr; - curr = child; - } - } - - void FloatUp(int curr) { - PriorityQ.PQnode[] n = nodes; - PriorityQ.PQhandleElem[] h = handles; - int hCurr, hParent; - int parent; - - hCurr = n[curr].handle; - for (;;) { - parent = curr >> 1; - hParent = n[parent].handle; - if (parent == 0 || LEQ(leq, h[hParent].key, h[hCurr].key)) { - n[curr].handle = hCurr; - h[hCurr].node = curr; - break; - } - n[curr].handle = hParent; - h[hParent].node = curr; - curr = parent; - } - } - - /* really __gl_pqHeapInit */ - boolean pqInit() { - int i; - - /* This method of building a heap is O(n), rather than O(n lg n). */ - - for (i = size; i >= 1; --i) { - FloatDown(i); - } - initialized = true; - - return true; - } - - /* really __gl_pqHeapInsert */ - /* returns LONG_MAX iff out of memory */ - int pqInsert(Object keyNew) { - int curr; - int free; - - curr = ++size; - if ((curr * 2) > max) { - PriorityQ.PQnode[] saveNodes = nodes; - PriorityQ.PQhandleElem[] saveHandles = handles; - - /* If the heap overflows, double its size. */ - max <<= 1; - // pq->nodes = (PQnode *)memRealloc( pq->nodes, (size_t) ((pq->max + 1) * sizeof( pq->nodes[0] - // ))); - PriorityQ.PQnode[] pqNodes = new PriorityQ.PQnode[max + 1]; - System.arraycopy(nodes, 0, pqNodes, 0, nodes.length); - for (int i = nodes.length; i < pqNodes.length; i++) { - pqNodes[i] = new PQnode(); - } - nodes = pqNodes; - if (nodes == null) { - nodes = saveNodes; /* restore ptr to free upon return */ - return Integer.MAX_VALUE; - } - - // pq->handles = (PQhandleElem *)memRealloc( pq->handles,(size_t)((pq->max + 1) * sizeof( - // pq->handles[0] ))); - PriorityQ.PQhandleElem[] pqHandles = new PriorityQ.PQhandleElem[max + 1]; - System.arraycopy(handles, 0, pqHandles, 0, handles.length); - for (int i = handles.length; i < pqHandles.length; i++) { - pqHandles[i] = new PQhandleElem(); - } - handles = pqHandles; - if (handles == null) { - handles = saveHandles; /* restore ptr to free upon return */ - return Integer.MAX_VALUE; - } - } - - if (freeList == 0) { - free = curr; - } else { - free = freeList; - freeList = handles[free].node; - } - - nodes[curr].handle = free; - handles[free].node = curr; - handles[free].key = keyNew; - - if (initialized) { - FloatUp(curr); - } - assert (free != Integer.MAX_VALUE); - return free; - } - - /* really __gl_pqHeapExtractMin */ - Object pqExtractMin() { - PriorityQ.PQnode[] n = nodes; - PriorityQ.PQhandleElem[] h = handles; - int hMin = n[1].handle; - Object min = h[hMin].key; - - if (size > 0) { - n[1].handle = n[size].handle; - h[n[1].handle].node = 1; - - h[hMin].key = null; - h[hMin].node = freeList; - freeList = hMin; - - if (--size > 0) { - FloatDown(1); - } - } - return min; - } - - /* really __gl_pqHeapDelete */ - void pqDelete(int hCurr) { - PriorityQ.PQnode[] n = nodes; - PriorityQ.PQhandleElem[] h = handles; - int curr; - - assert (hCurr >= 1 && hCurr <= max && h[hCurr].key != null); - - curr = h[hCurr].node; - n[curr].handle = n[size].handle; - h[n[curr].handle].node = curr; - - if (curr <= --size) { - if (curr <= 1 || LEQ(leq, h[n[curr >> 1].handle].key, h[n[curr].handle].key)) { - FloatDown(curr); - } else { - FloatUp(curr); - } - } - h[hCurr].key = null; - h[hCurr].node = freeList; - freeList = hCurr; - } - - Object pqMinimum() { - return handles[nodes[1].handle].key; - } - - boolean pqIsEmpty() { - return size == 0; - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java b/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java deleted file mode 100644 index 97051f59d..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class PriorityQSort extends PriorityQ { - - PriorityQHeap heap; - Object[] keys; - - // JAVA: 'order' contains indices into the keys array. - // This simulates the indirect pointers used in the original C code - // (from Frank Suykens, Luciad.com). - int[] order; - int size, max; - boolean initialized; - PriorityQ.Leq leq; - - PriorityQSort(PriorityQ.Leq leq) { - heap = new PriorityQHeap(leq); - - keys = new Object[PriorityQ.INIT_SIZE]; - - size = 0; - max = PriorityQ.INIT_SIZE; - initialized = false; - this.leq = leq; - } - - /* really __gl_pqSortDeletePriorityQ */ - void pqDeletePriorityQ() { - if (heap != null) heap.pqDeletePriorityQ(); - order = null; - keys = null; - } - - private static boolean LT(PriorityQ.Leq leq, Object x, Object y) { - return (!PriorityQHeap.LEQ(leq, y, x)); - } - - private static boolean GT(PriorityQ.Leq leq, Object x, Object y) { - return (!PriorityQHeap.LEQ(leq, x, y)); - } - - private static void Swap(int[] array, int a, int b) { - if (true) { - int tmp = array[a]; - array[a] = array[b]; - array[b] = tmp; - } - } - - private static class Stack { - - int p, r; - } - - /* really __gl_pqSortInit */ - boolean pqInit() { - int p, r, i, j; - int piv; - Stack[] stack = new Stack[50]; - for (int k = 0; k < stack.length; k++) { - stack[k] = new Stack(); - } - int top = 0; - - int seed = 2016473283; - - /* - * Create an array of indirect pointers to the keys, so that we the handles we have returned are still valid. - */ - order = new int[size + 1]; - /* the previous line is a patch to compensate for the fact that IBM */ - /* machines return a null on a malloc of zero bytes (unlike SGI), */ - /* so we have to put in this defense to guard against a memory */ - /* fault four lines down. from fossum@austin.ibm.com. */ - p = 0; - r = size - 1; - for (piv = 0, i = p; i <= r; ++piv, ++i) { - // indirect pointers: keep an index into the keys array, not a direct pointer to its contents - order[i] = piv; - } - - /* - * Sort the indirect pointers in descending order, using randomized Quicksort - */ - stack[top].p = p; - stack[top].r = r; - ++top; - while (--top >= 0) { - p = stack[top].p; - r = stack[top].r; - while (r > p + 10) { - seed = Math.abs(seed * 1539415821 + 1); - i = p + seed % (r - p + 1); - piv = order[i]; - order[i] = order[p]; - order[p] = piv; - i = p - 1; - j = r + 1; - do { - do { - ++i; - } while (GT(leq, keys[order[i]], keys[piv])); - do { - --j; - } while (LT(leq, keys[order[j]], keys[piv])); - Swap(order, i, j); - } while (i < j); - Swap(order, i, j); /* Undo last swap */ - if (i - p < r - j) { - stack[top].p = j + 1; - stack[top].r = r; - ++top; - r = i - 1; - } else { - stack[top].p = p; - stack[top].r = i - 1; - ++top; - p = j + 1; - } - } - /* Insertion sort small lists */ - for (i = p + 1; i <= r; ++i) { - piv = order[i]; - for (j = i; j > p && LT(leq, keys[order[j - 1]], keys[piv]); --j) { - order[j] = order[j - 1]; - } - order[j] = piv; - } - } - max = size; - initialized = true; - heap.pqInit(); /* always succeeds */ - - /* - * #ifndef NDEBUG p = order; r = p + size - 1; for (i = p; i < r; ++i) { Assertion.doAssert(LEQ( * * (i + 1), - * **i )); } #endif - */ - - return true; - } - - /* really __gl_pqSortInsert */ - /* returns LONG_MAX iff out of memory */ - int pqInsert(Object keyNew) { - int curr; - - if (initialized) { - return heap.pqInsert(keyNew); - } - curr = size; - if (++size >= max) { - Object[] saveKey = keys; - - /* If the heap overflows, double its size. */ - max <<= 1; - // pq->keys = (PQHeapKey *)memRealloc( pq->keys,(size_t)(pq->max * sizeof( pq->keys[0] ))); - Object[] pqKeys = new Object[max]; - System.arraycopy(keys, 0, pqKeys, 0, keys.length); - keys = pqKeys; - if (keys == null) { - keys = saveKey; /* restore ptr to free upon return */ - return Integer.MAX_VALUE; - } - } - assert curr != Integer.MAX_VALUE; - keys[curr] = keyNew; - - /* Negative handles index the sorted array. */ - return -(curr + 1); - } - - /* really __gl_pqSortExtractMin */ - Object pqExtractMin() { - Object sortMin, heapMin; - - if (size == 0) { - return heap.pqExtractMin(); - } - sortMin = keys[order[size - 1]]; - if (!heap.pqIsEmpty()) { - heapMin = heap.pqMinimum(); - if (LEQ(leq, heapMin, sortMin)) { - return heap.pqExtractMin(); - } - } - do { - --size; - } while (size > 0 && keys[order[size - 1]] == null); - return sortMin; - } - - /* really __gl_pqSortMinimum */ - Object pqMinimum() { - Object sortMin, heapMin; - - if (size == 0) { - return heap.pqMinimum(); - } - sortMin = keys[order[size - 1]]; - if (!heap.pqIsEmpty()) { - heapMin = heap.pqMinimum(); - if (PriorityQHeap.LEQ(leq, heapMin, sortMin)) { - return heapMin; - } - } - return sortMin; - } - - /* really __gl_pqSortIsEmpty */ - boolean pqIsEmpty() { - return (size == 0) && heap.pqIsEmpty(); - } - - /* really __gl_pqSortDelete */ - void pqDelete(int curr) { - if (curr >= 0) { - heap.pqDelete(curr); - return; - } - curr = -(curr + 1); - assert curr < max && keys[curr] != null; - - keys[curr] = null; - while (size > 0 && keys[order[size - 1]] == null) { - --size; - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/Render.java b/src/main/java/org/lwjgl/util/glu/tessellation/Render.java deleted file mode 100644 index 7a77afd5f..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/Render.java +++ /dev/null @@ -1,535 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -import static org.lwjgl3.opengl.GL11.*; -import static org.lwjgl.util.glu.GLU.*; - -class Render { - - private static final boolean USE_OPTIMIZED_CODE_PATH = false; - - private Render() {} - - private static final RenderFan renderFan = new RenderFan(); - private static final RenderStrip renderStrip = new RenderStrip(); - private static final RenderTriangle renderTriangle = new RenderTriangle(); - - /* - * This structure remembers the information we need about a primitive to be able to render it later, once we have - * determined which primitive is able to use the most triangles. - */ - private static class FaceCount { - - private FaceCount() {} - - private FaceCount(long size, GLUhalfEdge eStart, renderCallBack render) { - this.size = size; - this.eStart = eStart; - this.render = render; - } - - long size; /* number of triangles used */ - GLUhalfEdge eStart; /* edge where this primitive starts */ - renderCallBack render; - }; - - private interface renderCallBack { - - void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size); - } - - /************************ Strips and Fans decomposition ******************/ - - /* - * __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle fans, strips, and separate triangles. A - * substantial effort is made to use as few rendering primitives as possible (ie. to make the fans and strips as - * large as possible). The rendering output is provided as callbacks (see the api). - */ - public static void __gl_renderMesh(GLUtessellatorImpl tess, GLUmesh mesh) { - GLUface f; - - /* Make a list of separate triangles so we can render them all at once */ - tess.lonelyTriList = null; - - for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { - f.marked = false; - } - for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { - - /* - * We examine all faces in an arbitrary order. Whenever we find an unprocessed face F, we output a group of - * faces including F whose size is maximum. - */ - if (f.inside && !f.marked) { - RenderMaximumFaceGroup(tess, f); - assert (f.marked); - } - } - if (tess.lonelyTriList != null) { - RenderLonelyTriangles(tess, tess.lonelyTriList); - tess.lonelyTriList = null; - } - } - - static void RenderMaximumFaceGroup(GLUtessellatorImpl tess, GLUface fOrig) { - /* - * We want to find the largest triangle fan or strip of unmarked faces which includes the given face fOrig. - * There are 3 possible fans passing through fOrig (one centered at each vertex), and 3 possible strips (one for - * each CCW permutation of the vertices). Our strategy is to try all of these, and take the primitive which uses - * the most triangles (a greedy approach). - */ - GLUhalfEdge e = fOrig.anEdge; - FaceCount max = new FaceCount(); - FaceCount newFace; - - max.size = 1; - max.eStart = e; - max.render = renderTriangle; - - if (!tess.flagBoundary) { - newFace = MaximumFan(e); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumFan(e.Lnext); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumFan(e.Onext.Sym); - if (newFace.size > max.size) { - max = newFace; - } - - newFace = MaximumStrip(e); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumStrip(e.Lnext); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumStrip(e.Onext.Sym); - if (newFace.size > max.size) { - max = newFace; - } - } - max.render.render(tess, max.eStart, max.size); - } - - /* - * Macros which keep track of faces we have marked temporarily, and allow us to backtrack when necessary. With - * triangle fans, this is not really necessary, since the only awkward case is a loop of triangles around a single - * origin vertex. However with strips the situation is more complicated, and we need a general tracking method like - * the one here. - */ - private static boolean Marked(GLUface f) { - return !f.inside || f.marked; - } - - private static GLUface AddToTrail(GLUface f, GLUface t) { - f.trail = t; - f.marked = true; - return f; - } - - private static void FreeTrail(GLUface t) { - if (true) { - while (t != null) { - t.marked = false; - t = t.trail; - } - } - - /* else absorb trailing semicolon */ - } - - static FaceCount MaximumFan(GLUhalfEdge eOrig) { - /* - * eOrig.Lface is the face we want to render. We want to find the size of a maximal fan around eOrig.Org. To do - * this we just walk around the origin vertex as far as possible in both directions. - */ - FaceCount newFace = new FaceCount(0, null, renderFan); - GLUface trail = null; - GLUhalfEdge e; - - for (e = eOrig; !Marked(e.Lface); e = e.Onext) { - trail = AddToTrail(e.Lface, trail); - ++newFace.size; - } - for (e = eOrig; !Marked(e.Sym.Lface); e = e.Sym.Lnext) { - trail = AddToTrail(e.Sym.Lface, trail); - ++newFace.size; - } - newFace.eStart = e; - /* LINTED */ - FreeTrail(trail); - return newFace; - } - - private static boolean IsEven(long n) { - return (n & 0x1L) == 0; - } - - static FaceCount MaximumStrip(GLUhalfEdge eOrig) { - /* - * Here we are looking for a maximal strip that contains the vertices eOrig.Org, eOrig.Dst, eOrig.Lnext.Dst (in - * that order or the reverse, such that all triangles are oriented CCW). Again we walk forward and backward as - * far as possible. However for strips there is a twist: to get CCW orientations, there must be an *even* number - * of triangles in the strip on one side of eOrig. We walk the strip starting on a side with an even number of - * triangles; if both side have an odd number, we are forced to shorten one side. - */ - FaceCount newFace = new FaceCount(0, null, renderStrip); - long headSize = 0, tailSize = 0; - GLUface trail = null; - GLUhalfEdge e, eTail, eHead; - - for (e = eOrig; !Marked(e.Lface); ++tailSize, e = e.Onext) { - trail = AddToTrail(e.Lface, trail); - ++tailSize; - e = e.Lnext.Sym; - if (Marked(e.Lface)) break; - trail = AddToTrail(e.Lface, trail); - } - eTail = e; - - for (e = eOrig; !Marked(e.Sym.Lface); ++headSize, e = e.Sym.Onext.Sym) { - trail = AddToTrail(e.Sym.Lface, trail); - ++headSize; - e = e.Sym.Lnext; - if (Marked(e.Sym.Lface)) break; - trail = AddToTrail(e.Sym.Lface, trail); - } - eHead = e; - - newFace.size = tailSize + headSize; - if (IsEven(tailSize)) { - newFace.eStart = eTail.Sym; - } else if (IsEven(headSize)) { - newFace.eStart = eHead; - } else { - /* - * Both sides have odd length, we must shorten one of them. In fact, we must start from eHead to guarantee - * inclusion of eOrig.Lface. - */ - --newFace.size; - newFace.eStart = eHead.Onext; - } - /* LINTED */ - FreeTrail(trail); - return newFace; - } - - private static class RenderTriangle implements renderCallBack { - - public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { - /* - * Just add the triangle to a triangle list, so we can render all the separate triangles at once. - */ - assert (size == 1); - tess.lonelyTriList = AddToTrail(e.Lface, tess.lonelyTriList); - } - } - - static void RenderLonelyTriangles(GLUtessellatorImpl tess, GLUface f) { - /* - * Now we render all the separate triangles which could not be grouped into a triangle fan or strip. - */ - GLUhalfEdge e; - int newState; - int edgeState = -1; /* force edge state output for first vertex */ - - tess.callBeginOrBeginData(GL_TRIANGLES); - - for (; f != null; f = f.trail) { - /* Loop once for each edge (there will always be 3 edges) */ - - e = f.anEdge; - do { - if (tess.flagBoundary) { - /* - * Set the "edge state" to true just before we output the first vertex of each edge on the polygon - * boundary. - */ - newState = (!e.Sym.Lface.inside) ? 1 : 0; - if (edgeState != newState) { - edgeState = newState; - tess.callEdgeFlagOrEdgeFlagData(edgeState != 0); - } - } - tess.callVertexOrVertexData(e.Org.data); - - e = e.Lnext; - } while (e != f.anEdge); - } - tess.callEndOrEndData(); - } - - private static class RenderFan implements renderCallBack { - - public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { - /* - * Render as many CCW triangles as possible in a fan starting from edge "e". The fan *should* contain - * exactly "size" triangles (otherwise we've goofed up somewhere). - */ - tess.callBeginOrBeginData(GL_TRIANGLE_FAN); - tess.callVertexOrVertexData(e.Org.data); - tess.callVertexOrVertexData(e.Sym.Org.data); - - while (!Marked(e.Lface)) { - e.Lface.marked = true; - --size; - e = e.Onext; - tess.callVertexOrVertexData(e.Sym.Org.data); - } - - assert (size == 0); - tess.callEndOrEndData(); - } - } - - private static class RenderStrip implements renderCallBack { - - public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { - /* - * Render as many CCW triangles as possible in a strip starting from edge "e". The strip *should* contain - * exactly "size" triangles (otherwise we've goofed up somewhere). - */ - tess.callBeginOrBeginData(GL_TRIANGLE_STRIP); - tess.callVertexOrVertexData(e.Org.data); - tess.callVertexOrVertexData(e.Sym.Org.data); - - while (!Marked(e.Lface)) { - e.Lface.marked = true; - --size; - e = e.Lnext.Sym; - tess.callVertexOrVertexData(e.Org.data); - if (Marked(e.Lface)) break; - - e.Lface.marked = true; - --size; - e = e.Onext; - tess.callVertexOrVertexData(e.Sym.Org.data); - } - - assert (size == 0); - tess.callEndOrEndData(); - } - } - - /************************ Boundary contour decomposition ******************/ - - /* - * __gl_renderBoundary( tess, mesh ) takes a mesh, and outputs one contour for each face marked "inside". The - * rendering output is provided as callbacks (see the api). - */ - public static void __gl_renderBoundary(GLUtessellatorImpl tess, GLUmesh mesh) { - GLUface f; - GLUhalfEdge e; - - for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { - if (f.inside) { - tess.callBeginOrBeginData(GL_LINE_LOOP); - e = f.anEdge; - do { - tess.callVertexOrVertexData(e.Org.data); - e = e.Lnext; - } while (e != f.anEdge); - tess.callEndOrEndData(); - } - } - } - - /************************ Quick-and-dirty decomposition ******************/ - private static final int SIGN_INCONSISTENT = 2; - - static int ComputeNormal(GLUtessellatorImpl tess, double[] norm, - boolean check) /* - * If check==false, we compute the polygon normal and place it in norm[]. If check==true, we - * check that each triangle in the fan from v0 has a consistent orientation with respect to - * norm[]. If triangles are consistently oriented CCW, return 1; if CW, return -1; if all - * triangles are degenerate return 0; otherwise (no consistent orientation) return - * SIGN_INCONSISTENT. - */ { - CachedVertex[] v = tess.cache; - // CachedVertex vn = v0 + tess.cacheCount; - int vn = tess.cacheCount; - // CachedVertex vc; - int vc; - double dot, xc, yc, zc, xp, yp, zp; - double[] n = new double[3]; - int sign = 0; - - /* - * Find the polygon normal. It is important to get a reasonable normal even when the polygon is - * self-intersecting (eg. a bowtie). Otherwise, the computed normal could be very tiny, but perpendicular to the - * true plane of the polygon due to numerical noise. Then all the triangles would appear to be degenerate and we - * would incorrectly decompose the polygon as a fan (or simply not render it at all). We use a sum-of-triangles - * normal algorithm rather than the more efficient sum-of-trapezoids method (used in CheckOrientation() in - * normal.c). This lets us explicitly reverse the signed area of some triangles to get a reasonable normal in - * the self-intersecting case. - */ - if (!check) { - norm[0] = norm[1] = norm[2] = 0.0; - } - - vc = 1; - xc = v[vc].coords[0] - v[0].coords[0]; - yc = v[vc].coords[1] - v[0].coords[1]; - zc = v[vc].coords[2] - v[0].coords[2]; - while (++vc < vn) { - xp = xc; - yp = yc; - zp = zc; - xc = v[vc].coords[0] - v[0].coords[0]; - yc = v[vc].coords[1] - v[0].coords[1]; - zc = v[vc].coords[2] - v[0].coords[2]; - - /* Compute (vp - v0) cross (vc - v0) */ - n[0] = yp * zc - zp * yc; - n[1] = zp * xc - xp * zc; - n[2] = xp * yc - yp * xc; - - dot = n[0] * norm[0] + n[1] * norm[1] + n[2] * norm[2]; - if (!check) { - /* - * Reverse the contribution of back-facing triangles to get a reasonable normal for self-intersecting - * polygons (see above) - */ - if (dot >= 0) { - norm[0] += n[0]; - norm[1] += n[1]; - norm[2] += n[2]; - } else { - norm[0] -= n[0]; - norm[1] -= n[1]; - norm[2] -= n[2]; - } - } else if (dot != 0) { - /* Check the new orientation for consistency with previous triangles */ - if (dot > 0) { - if (sign < 0) return SIGN_INCONSISTENT; - sign = 1; - } else { - if (sign > 0) return SIGN_INCONSISTENT; - sign = -1; - } - } - } - return sign; - } - - /* - * __gl_renderCache( tess ) takes a single contour and tries to render it as a triangle fan. This handles convex - * polygons, as well as some non-convex polygons if we get lucky. Returns true if the polygon was successfully - * rendered. The rendering output is provided as callbacks (see the api). - */ - public static boolean __gl_renderCache(GLUtessellatorImpl tess) { - CachedVertex[] v = tess.cache; - // CachedVertex vn = v0 + tess.cacheCount; - int vn = tess.cacheCount; - // CachedVertex vc; - int vc; - double[] norm = new double[3]; - int sign; - - if (tess.cacheCount < 3) { - /* Degenerate contour -- no output */ - return true; - } - - norm[0] = tess.normal[0]; - norm[1] = tess.normal[1]; - norm[2] = tess.normal[2]; - if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) { - ComputeNormal(tess, norm, false); - } - - sign = ComputeNormal(tess, norm, true); - if (sign == SIGN_INCONSISTENT) { - /* Fan triangles did not have a consistent orientation */ - return false; - } - if (sign == 0) { - /* All triangles were degenerate */ - return true; - } - - if (!USE_OPTIMIZED_CODE_PATH) { - return false; - } else { - /* Make sure we do the right thing for each winding rule */ - switch (tess.windingRule) { - case GLU_TESS_WINDING_ODD: - case GLU_TESS_WINDING_NONZERO: - break; - case GLU_TESS_WINDING_POSITIVE: - if (sign < 0) return true; - break; - case GLU_TESS_WINDING_NEGATIVE: - if (sign > 0) return true; - break; - case GLU_TESS_WINDING_ABS_GEQ_TWO: - return true; - } - - tess.callBeginOrBeginData( - tess.boundaryOnly ? GL_LINE_LOOP : (tess.cacheCount > 3) ? GL_TRIANGLE_FAN : GL_TRIANGLES); - - tess.callVertexOrVertexData(v[0].data); - if (sign > 0) { - for (vc = 1; vc < vn; ++vc) { - tess.callVertexOrVertexData(v[vc].data); - } - } else { - for (vc = vn - 1; vc > 0; --vc) { - tess.callVertexOrVertexData(v[vc].data); - } - } - tess.callEndOrEndData(); - return true; - } - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/Sweep.java b/src/main/java/org/lwjgl/util/glu/tessellation/Sweep.java deleted file mode 100644 index 267cd4dd5..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/Sweep.java +++ /dev/null @@ -1,1248 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -import static org.lwjgl.util.glu.GLU.*; - -class Sweep { - - private Sweep() {} - - // #ifdef FOR_TRITE_TEST_PROGRAM - // extern void DebugEvent( GLUtessellator *tess ); - // #else - private static void DebugEvent(GLUtessellatorImpl tess) {} - - // #endif - - /* - * Invariants for the Edge Dictionary. - each pair of adjacent edges e2=Succ(e1) satisfies EdgeLeq(e1,e2) at any - * valid location of the sweep event - if EdgeLeq(e2,e1) as well (at any valid sweep event), then e1 and e2 share a - * common endpoint - for each e, e.Dst has been processed, but not e.Org - each edge e satisfies - * VertLeq(e.Dst,event) && VertLeq(event,e.Org) where "event" is the current sweep line event. - no edge e has zero - * length Invariants for the Mesh (the processed portion). - the portion of the mesh left of the sweep line is a - * planar graph, ie. there is *some* way to embed it in the plane - no processed edge has zero length - no two - * processed vertices have identical coordinates - each "inside" region is monotone, ie. can be broken into two - * chains of monotonically increasing vertices according to VertLeq(v1,v2) - a non-invariant: these chains may - * intersect (very slightly) Invariants for the Sweep. - if none of the edges incident to the event vertex have an - * activeRegion (ie. none of these edges are in the edge dictionary), then the vertex has only right-going edges. - - * if an edge is marked "fixUpperEdge" (it is a temporary edge introduced by ConnectRightVertex), then it is the - * only right-going edge from its associated vertex. (This says that these edges exist only when it is necessary.) - */ - - /* - * When we merge two edges into one, we need to compute the combined winding of the new edge. - */ - private static void AddWinding(GLUhalfEdge eDst, GLUhalfEdge eSrc) { - eDst.winding += eSrc.winding; - eDst.Sym.winding += eSrc.Sym.winding; - } - - private static ActiveRegion RegionBelow(ActiveRegion r) { - return ((ActiveRegion) Dict.dictKey(Dict.dictPred(r.nodeUp))); - } - - private static ActiveRegion RegionAbove(ActiveRegion r) { - return ((ActiveRegion) Dict.dictKey(Dict.dictSucc(r.nodeUp))); - } - - static boolean EdgeLeq(GLUtessellatorImpl tess, ActiveRegion reg1, - ActiveRegion reg2) /* - * Both edges must be directed from right to left (this is the canonical direction for - * the upper edge of each region). The strategy is to evaluate a "t" value for each edge - * at the current sweep line position, given by tess.event. The calculations are designed - * to be very stable, but of course they are not perfect. Special case: if both edge - * destinations are at the sweep event, we sort the edges by slope (they would otherwise - * compare equally). - */ { - GLUvertex event = tess.event; - GLUhalfEdge e1, e2; - double t1, t2; - - e1 = reg1.eUp; - e2 = reg2.eUp; - - if (e1.Sym.Org == event) { - if (e2.Sym.Org == event) { - /* - * Two edges right of the sweep line which meet at the sweep event. Sort them by slope. - */ - if (Geom.VertLeq(e1.Org, e2.Org)) { - return Geom.EdgeSign(e2.Sym.Org, e1.Org, e2.Org) <= 0; - } - return Geom.EdgeSign(e1.Sym.Org, e2.Org, e1.Org) >= 0; - } - return Geom.EdgeSign(e2.Sym.Org, event, e2.Org) <= 0; - } - if (e2.Sym.Org == event) { - return Geom.EdgeSign(e1.Sym.Org, event, e1.Org) >= 0; - } - - /* General case - compute signed distance *from* e1, e2 to event */ - t1 = Geom.EdgeEval(e1.Sym.Org, event, e1.Org); - t2 = Geom.EdgeEval(e2.Sym.Org, event, e2.Org); - return (t1 >= t2); - } - - static void DeleteRegion(GLUtessellatorImpl tess, ActiveRegion reg) { - if (reg.fixUpperEdge) { - /* - * It was created with zero winding number, so it better be deleted with zero winding number (ie. it better - * not get merged with a real edge). - */ - assert (reg.eUp.winding == 0); - } - reg.eUp.activeRegion = null; - Dict.dictDelete(tess.dict, reg.nodeUp); /* __gl_dictListDelete */ - } - - static boolean FixUpperEdge(ActiveRegion reg, - GLUhalfEdge newEdge) /* - * Replace an upper edge which needs fixing (see ConnectRightVertex). - */ { - assert (reg.fixUpperEdge); - if (!Mesh.__gl_meshDelete(reg.eUp)) return false; - reg.fixUpperEdge = false; - reg.eUp = newEdge; - newEdge.activeRegion = reg; - - return true; - } - - static ActiveRegion TopLeftRegion(ActiveRegion reg) { - GLUvertex org = reg.eUp.Org; - GLUhalfEdge e; - - /* Find the region above the uppermost edge with the same origin */ - do { - reg = RegionAbove(reg); - } while (reg.eUp.Org == org); - - /* - * If the edge above was a temporary edge introduced by ConnectRightVertex, now is the time to fix it. - */ - if (reg.fixUpperEdge) { - e = Mesh.__gl_meshConnect(RegionBelow(reg).eUp.Sym, reg.eUp.Lnext); - if (e == null) return null; - if (!FixUpperEdge(reg, e)) return null; - reg = RegionAbove(reg); - } - return reg; - } - - static ActiveRegion TopRightRegion(ActiveRegion reg) { - GLUvertex dst = reg.eUp.Sym.Org; - - /* Find the region above the uppermost edge with the same destination */ - do { - reg = RegionAbove(reg); - } while (reg.eUp.Sym.Org == dst); - return reg; - } - - static ActiveRegion AddRegionBelow(GLUtessellatorImpl tess, ActiveRegion regAbove, - GLUhalfEdge eNewUp) /* - * Add a new active region to the sweep line, *somewhere* below "regAbove" (according to - * where the new edge belongs in the sweep-line dictionary). The upper edge of the new - * region will be "eNewUp". Winding number and "inside" flag are not updated. - */ { - ActiveRegion regNew = new ActiveRegion(); - // if (regNew == null) throw new RuntimeException(); - - regNew.eUp = eNewUp; - /* __gl_dictListInsertBefore */ - regNew.nodeUp = Dict.dictInsertBefore(tess.dict, regAbove.nodeUp, regNew); - if (regNew.nodeUp == null) throw new RuntimeException(); - regNew.fixUpperEdge = false; - regNew.sentinel = false; - regNew.dirty = false; - - eNewUp.activeRegion = regNew; - return regNew; - } - - static boolean IsWindingInside(GLUtessellatorImpl tess, int n) { - switch (tess.windingRule) { - case GLU_TESS_WINDING_ODD -> { - return (n & 1) != 0; - } - case GLU_TESS_WINDING_NONZERO -> { - return (n != 0); - } - case GLU_TESS_WINDING_POSITIVE -> { - return (n > 0); - } - case GLU_TESS_WINDING_NEGATIVE -> { - return (n < 0); - } - case GLU_TESS_WINDING_ABS_GEQ_TWO -> { - return (n >= 2) || (n <= -2); - } - } - /* LINTED */ - // assert (false); - throw new InternalError(); - /* NOTREACHED */ - } - - static void ComputeWinding(GLUtessellatorImpl tess, ActiveRegion reg) { - reg.windingNumber = RegionAbove(reg).windingNumber + reg.eUp.winding; - reg.inside = IsWindingInside(tess, reg.windingNumber); - } - - static void FinishRegion(GLUtessellatorImpl tess, - ActiveRegion reg) /* - * Delete a region from the sweep line. This happens when the upper and lower chains of a - * region meet (at a vertex on the sweep line). The "inside" flag is copied to the - * appropriate mesh face (we could not do this before -- since the structure of the mesh - * is always changing, this face may not have even existed until now). - */ { - GLUhalfEdge e = reg.eUp; - GLUface f = e.Lface; - - f.inside = reg.inside; - f.anEdge = e; /* optimization for __gl_meshTessellateMonoRegion() */ - DeleteRegion(tess, reg); - } - - static GLUhalfEdge FinishLeftRegions(GLUtessellatorImpl tess, ActiveRegion regFirst, - ActiveRegion regLast) /* - * We are given a vertex with one or more left-going edges. All affected edges should - * be in the edge dictionary. Starting at regFirst.eUp, we walk down deleting all - * regions where both edges have the same origin vOrg. At the same time we copy the - * "inside" flag from the active region to the face, since at this point each face - * will belong to at most one region (this was not necessarily true until this point - * in the sweep). The walk stops at the region above regLast; if regLast is null we - * walk as far as possible. At the same time we relink the mesh if necessary, so that - * the ordering of edges around vOrg is the same as in the dictionary. - */ { - ActiveRegion reg, regPrev; - GLUhalfEdge e, ePrev; - - regPrev = regFirst; - ePrev = regFirst.eUp; - while (regPrev != regLast) { - regPrev.fixUpperEdge = false; /* placement was OK */ - reg = RegionBelow(regPrev); - e = reg.eUp; - if (e.Org != ePrev.Org) { - if (!reg.fixUpperEdge) { - /* - * Remove the last left-going edge. Even though there are no further edges in the dictionary with - * this origin, there may be further such edges in the mesh (if we are adding left edges to a vertex - * that has already been processed). Thus it is important to call FinishRegion rather than just - * DeleteRegion. - */ - FinishRegion(tess, regPrev); - break; - } - /* - * If the edge below was a temporary edge introduced by ConnectRightVertex, now is the time to fix it. - */ - e = Mesh.__gl_meshConnect(ePrev.Onext.Sym, e.Sym); - if (e == null) throw new RuntimeException(); - if (!FixUpperEdge(reg, e)) throw new RuntimeException(); - } - - /* Relink edges so that ePrev.Onext == e */ - if (ePrev.Onext != e) { - if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(ePrev, e)) throw new RuntimeException(); - } - FinishRegion(tess, regPrev); /* may change reg.eUp */ - ePrev = reg.eUp; - regPrev = reg; - } - return ePrev; - } - - static void AddRightEdges(GLUtessellatorImpl tess, ActiveRegion regUp, GLUhalfEdge eFirst, GLUhalfEdge eLast, - GLUhalfEdge eTopLeft, boolean cleanUp) - /* - * Purpose: insert right-going edges into the edge dictionary, and update winding numbers and mesh connectivity - * appropriately. All right-going edges share a common origin vOrg. Edges are inserted CCW starting at eFirst; the - * last edge inserted is eLast.Sym.Lnext. If vOrg has any left-going edges already processed, then eTopLeft must be - * the edge such that an imaginary upward vertical segment from vOrg would be contained between eTopLeft.Sym.Lnext - * and eTopLeft; otherwise eTopLeft should be null. - */ { - ActiveRegion reg, regPrev; - GLUhalfEdge e, ePrev; - boolean firstTime = true; - - /* Insert the new right-going edges in the dictionary */ - e = eFirst; - do { - assert (Geom.VertLeq(e.Org, e.Sym.Org)); - AddRegionBelow(tess, regUp, e.Sym); - e = e.Onext; - } while (e != eLast); - - /* - * Walk *all* right-going edges from e.Org, in the dictionary order, updating the winding numbers of each - * region, and re-linking the mesh edges to match the dictionary ordering (if necessary). - */ - if (eTopLeft == null) { - eTopLeft = RegionBelow(regUp).eUp.Sym.Onext; - } - regPrev = regUp; - ePrev = eTopLeft; - for (;;) { - reg = RegionBelow(regPrev); - e = reg.eUp.Sym; - if (e.Org != ePrev.Org) break; - - if (e.Onext != ePrev) { - /* Unlink e from its current position, and relink below ePrev */ - if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(ePrev.Sym.Lnext, e)) throw new RuntimeException(); - } - /* Compute the winding number and "inside" flag for the new regions */ - reg.windingNumber = regPrev.windingNumber - e.winding; - reg.inside = IsWindingInside(tess, reg.windingNumber); - - /* - * Check for two outgoing edges with same slope -- process these before any intersection tests (see example - * in __gl_computeInterior). - */ - regPrev.dirty = true; - if (!firstTime && CheckForRightSplice(tess, regPrev)) { - AddWinding(e, ePrev); - DeleteRegion(tess, regPrev); - if (!Mesh.__gl_meshDelete(ePrev)) throw new RuntimeException(); - } - firstTime = false; - regPrev = reg; - ePrev = e; - } - regPrev.dirty = true; - assert (regPrev.windingNumber - e.winding == reg.windingNumber); - - if (cleanUp) { - /* Check for intersections between newly adjacent edges. */ - WalkDirtyRegions(tess, regPrev); - } - } - - static void CallCombine(GLUtessellatorImpl tess, GLUvertex isect, Object[] data, float[] weights, boolean needed) { - double[] coords = new double[3]; - - /* Copy coord data in case the callback changes it. */ - coords[0] = isect.coords[0]; - coords[1] = isect.coords[1]; - coords[2] = isect.coords[2]; - - Object[] outData = new Object[1]; - tess.callCombineOrCombineData(coords, data, weights, outData); - isect.data = outData[0]; - if (isect.data == null) { - if (!needed) { - isect.data = data[0]; - } else if (!tess.fatalError) { - /* - * The only way fatal error is when two edges are found to intersect, but the user has not provided the - * callback necessary to handle generated intersection points. - */ - tess.callErrorOrErrorData(GLU_TESS_NEED_COMBINE_CALLBACK); - tess.fatalError = true; - } - } - } - - static void SpliceMergeVertices(GLUtessellatorImpl tess, GLUhalfEdge e1, - GLUhalfEdge e2) /* - * Two vertices with idential coordinates are combined into one. e1.Org is kept, while - * e2.Org is discarded. - */ { - Object[] data = new Object[4]; - float[] weights = new float[] { 0.5f, 0.5f, 0.0f, 0.0f }; - - data[0] = e1.Org.data; - data[1] = e2.Org.data; - CallCombine(tess, e1.Org, data, weights, false); - if (!Mesh.__gl_meshSplice(e1, e2)) throw new RuntimeException(); - } - - static void VertexWeights(GLUvertex isect, GLUvertex org, GLUvertex dst, - float[] weights) /* - * Find some weights which describe how the intersection vertex is a linear combination of - * "org" and "dest". Each of the two edges which generated "isect" is allocated 50% of the - * weight; each edge splits the weight between its org and dst according to the relative - * distance to "isect". - */ { - double t1 = Geom.VertL1dist(org, isect); - double t2 = Geom.VertL1dist(dst, isect); - - weights[0] = (float) (0.5 * t2 / (t1 + t2)); - weights[1] = (float) (0.5 * t1 / (t1 + t2)); - isect.coords[0] += weights[0] * org.coords[0] + weights[1] * dst.coords[0]; - isect.coords[1] += weights[0] * org.coords[1] + weights[1] * dst.coords[1]; - isect.coords[2] += weights[0] * org.coords[2] + weights[1] * dst.coords[2]; - } - - static void GetIntersectData(GLUtessellatorImpl tess, GLUvertex isect, GLUvertex orgUp, GLUvertex dstUp, - GLUvertex orgLo, GLUvertex dstLo) - /* - * We've computed a new intersection point, now we need a "data" pointer from the user so that we can refer to this - * new vertex in the rendering callbacks. - */ { - Object[] data = new Object[4]; - float[] weights = new float[4]; - float[] weights1 = new float[2]; - float[] weights2 = new float[2]; - - data[0] = orgUp.data; - data[1] = dstUp.data; - data[2] = orgLo.data; - data[3] = dstLo.data; - - isect.coords[0] = isect.coords[1] = isect.coords[2] = 0; - VertexWeights(isect, orgUp, dstUp, weights1); - VertexWeights(isect, orgLo, dstLo, weights2); - System.arraycopy(weights1, 0, weights, 0, 2); - System.arraycopy(weights2, 0, weights, 2, 2); - - CallCombine(tess, isect, data, weights, true); - } - - static boolean CheckForRightSplice(GLUtessellatorImpl tess, - ActiveRegion regUp) /* - * Check the upper and lower edge of "regUp", to make sure that the eUp.Org is above - * eLo, or eLo.Org is below eUp (depending on which origin is leftmost). The main - * purpose is to splice right-going edges with the same dest vertex and nearly identical - * slopes (ie. we can't distinguish the slopes numerically). However the splicing can - * also help us to recover from numerical errors. For example, suppose at one point we - * checked eUp and eLo, and decided that eUp.Org is barely above eLo. Then later, we - * split eLo into two edges (eg. from a splice operation like this one). This can change - * the result of our test so that now eUp.Org is incident to eLo, or barely below it. We - * must correct this condition to maintain the dictionary invariants. One possibility is - * to check these edges for intersection again (ie. CheckForIntersect). This is what we - * do if possible. However CheckForIntersect requires that tess.event lies between eUp - * and eLo, so that it has something to fall back on when the intersection calculation - * gives us an unusable answer. So, for those cases where we can't check for - * intersection, this routine fixes the problem by just splicing the offending vertex - * into the other edge. This is a guaranteed solution, no matter how degenerate things - * get. Basically this is a combinatorial solution to a numerical problem. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - - if (Geom.VertLeq(eUp.Org, eLo.Org)) { - if (Geom.EdgeSign(eLo.Sym.Org, eUp.Org, eLo.Org) > 0) return false; - - /* eUp.Org appears to be below eLo */ - if (!Geom.VertEq(eUp.Org, eLo.Org)) { - /* Splice eUp.Org into eLo */ - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eUp, eLo.Sym.Lnext)) throw new RuntimeException(); - regUp.dirty = regLo.dirty = true; - - } else if (eUp.Org != eLo.Org) { - /* merge the two vertices, discarding eUp.Org */ - tess.pq.pqDelete(eUp.Org.pqHandle); /* __gl_pqSortDelete */ - SpliceMergeVertices(tess, eLo.Sym.Lnext, eUp); - } - } else { - if (Geom.EdgeSign(eUp.Sym.Org, eLo.Org, eUp.Org) < 0) return false; - - /* eLo.Org appears to be above eUp, so splice eLo.Org into eUp */ - RegionAbove(regUp).dirty = regUp.dirty = true; - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym.Lnext, eUp)) throw new RuntimeException(); - } - return true; - } - - static boolean CheckForLeftSplice(GLUtessellatorImpl tess, - ActiveRegion regUp) /* - * Check the upper and lower edge of "regUp", to make sure that the eUp.Sym.Org is above - * eLo, or eLo.Sym.Org is below eUp (depending on which destination is rightmost). - * Theoretically, this should always be true. However, splitting an edge into two pieces - * can change the results of previous tests. For example, suppose at one point we - * checked eUp and eLo, and decided that eUp.Sym.Org is barely above eLo. Then later, we - * split eLo into two edges (eg. from a splice operation like this one). This can change - * the result of the test so that now eUp.Sym.Org is incident to eLo, or barely below - * it. We must correct this condition to maintain the dictionary invariants (otherwise - * new edges might get inserted in the wrong place in the dictionary, and bad stuff will - * happen). We fix the problem by just splicing the offending vertex into the other - * edge. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - GLUhalfEdge e; - - assert (!Geom.VertEq(eUp.Sym.Org, eLo.Sym.Org)); - - if (Geom.VertLeq(eUp.Sym.Org, eLo.Sym.Org)) { - if (Geom.EdgeSign(eUp.Sym.Org, eLo.Sym.Org, eUp.Org) < 0) return false; - - /* eLo.Sym.Org is above eUp, so splice eLo.Sym.Org into eUp */ - RegionAbove(regUp).dirty = regUp.dirty = true; - e = Mesh.__gl_meshSplitEdge(eUp); - if (e == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym, e)) throw new RuntimeException(); - e.Lface.inside = regUp.inside; - } else { - if (Geom.EdgeSign(eLo.Sym.Org, eUp.Sym.Org, eLo.Org) > 0) return false; - - /* eUp.Sym.Org is below eLo, so splice eUp.Sym.Org into eLo */ - regUp.dirty = regLo.dirty = true; - e = Mesh.__gl_meshSplitEdge(eLo); - if (e == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eUp.Lnext, eLo.Sym)) throw new RuntimeException(); - e.Sym.Lface.inside = regUp.inside; - } - return true; - } - - static boolean CheckForIntersect(GLUtessellatorImpl tess, - ActiveRegion regUp) /* - * Check the upper and lower edges of the given region to see if they intersect. If so, - * create the intersection and add it to the data structures. Returns true if adding the - * new intersection resulted in a recursive call to AddRightEdges(); in this case all - * "dirty" regions have been checked for intersections, and possibly regUp has been - * deleted. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - GLUvertex orgUp = eUp.Org; - GLUvertex orgLo = eLo.Org; - GLUvertex dstUp = eUp.Sym.Org; - GLUvertex dstLo = eLo.Sym.Org; - double tMinUp, tMaxLo; - GLUvertex isect = new GLUvertex(); - GLUvertex orgMin; - GLUhalfEdge e; - - assert (!Geom.VertEq(dstLo, dstUp)); - assert (Geom.EdgeSign(dstUp, tess.event, orgUp) <= 0); - assert (Geom.EdgeSign(dstLo, tess.event, orgLo) >= 0); - assert (orgUp != tess.event && orgLo != tess.event); - assert (!regUp.fixUpperEdge && !regLo.fixUpperEdge); - - if (orgUp == orgLo) return false; /* right endpoints are the same */ - - tMinUp = Math.min(orgUp.t, dstUp.t); - tMaxLo = Math.max(orgLo.t, dstLo.t); - if (tMinUp > tMaxLo) return false; /* t ranges do not overlap */ - - if (Geom.VertLeq(orgUp, orgLo)) { - if (Geom.EdgeSign(dstLo, orgUp, orgLo) > 0) return false; - } else { - if (Geom.EdgeSign(dstUp, orgLo, orgUp) < 0) return false; - } - - /* At this point the edges intersect, at least marginally */ - DebugEvent(tess); - - Geom.EdgeIntersect(dstUp, orgUp, dstLo, orgLo, isect); - /* The following properties are guaranteed: */ - assert (Math.min(orgUp.t, dstUp.t) <= isect.t); - assert (isect.t <= Math.max(orgLo.t, dstLo.t)); - assert (Math.min(dstLo.s, dstUp.s) <= isect.s); - assert (isect.s <= Math.max(orgLo.s, orgUp.s)); - - if (Geom.VertLeq(isect, tess.event)) { - /* - * The intersection point lies slightly to the left of the sweep line, so move it until it''s slightly to - * the right of the sweep line. (If we had perfect numerical precision, this would never happen in the first - * place). The easiest and safest thing to do is replace the intersection by tess.event. - */ - isect.s = tess.event.s; - isect.t = tess.event.t; - } - /* - * Similarly, if the computed intersection lies to the right of the rightmost origin (which should rarely - * happen), it can cause unbelievable inefficiency on sufficiently degenerate inputs. (If you have the test - * program, try running test54.d with the "X zoom" option turned on). - */ - orgMin = Geom.VertLeq(orgUp, orgLo) ? orgUp : orgLo; - if (Geom.VertLeq(orgMin, isect)) { - isect.s = orgMin.s; - isect.t = orgMin.t; - } - - if (Geom.VertEq(isect, orgUp) || Geom.VertEq(isect, orgLo)) { - /* Easy case -- intersection at one of the right endpoints */ - CheckForRightSplice(tess, regUp); - return false; - } - - if ((!Geom.VertEq(dstUp, tess.event) && Geom.EdgeSign(dstUp, tess.event, isect) >= 0) - || (!Geom.VertEq(dstLo, tess.event) && Geom.EdgeSign(dstLo, tess.event, isect) <= 0)) { - /* - * Very unusual -- the new upper or lower edge would pass on the wrong side of the sweep event, or through - * it. This can happen due to very small numerical errors in the intersection calculation. - */ - if (dstLo == tess.event) { - /* Splice dstLo into eUp, and process the new region(s) */ - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym, eUp)) throw new RuntimeException(); - regUp = TopLeftRegion(regUp); - if (regUp == null) throw new RuntimeException(); - eUp = RegionBelow(regUp).eUp; - FinishLeftRegions(tess, RegionBelow(regUp), regLo); - AddRightEdges(tess, regUp, eUp.Sym.Lnext, eUp, eUp, true); - return true; - } - if (dstUp == tess.event) { - /* Splice dstUp into eLo, and process the new region(s) */ - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eUp.Lnext, eLo.Sym.Lnext)) throw new RuntimeException(); - regLo = regUp; - regUp = TopRightRegion(regUp); - e = RegionBelow(regUp).eUp.Sym.Onext; - regLo.eUp = eLo.Sym.Lnext; - eLo = FinishLeftRegions(tess, regLo, null); - AddRightEdges(tess, regUp, eLo.Onext, eUp.Sym.Onext, e, true); - return true; - } - /* - * Special case: called from ConnectRightVertex. If either edge passes on the wrong side of tess.event, - * split it (and wait for ConnectRightVertex to splice it appropriately). - */ - if (Geom.EdgeSign(dstUp, tess.event, isect) >= 0) { - RegionAbove(regUp).dirty = regUp.dirty = true; - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - eUp.Org.s = tess.event.s; - eUp.Org.t = tess.event.t; - } - if (Geom.EdgeSign(dstLo, tess.event, isect) <= 0) { - regUp.dirty = regLo.dirty = true; - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - eLo.Org.s = tess.event.s; - eLo.Org.t = tess.event.t; - } - /* leave the rest for ConnectRightVertex */ - return false; - } - - /* - * General case -- split both edges, splice into new vertex. When we do the splice operation, the order of the - * arguments is arbitrary as far as correctness goes. However, when the operation creates a new face, the work - * done is proportional to the size of the new face. We expect the faces in the processed part of the mesh (ie. - * eUp.Lface) to be smaller than the faces in the unprocessed original contours (which will be - * eLo.Sym.Lnext.Lface). - */ - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym.Lnext, eUp)) throw new RuntimeException(); - eUp.Org.s = isect.s; - eUp.Org.t = isect.t; - eUp.Org.pqHandle = tess.pq.pqInsert(eUp.Org); /* __gl_pqSortInsert */ - if (eUp.Org.pqHandle == Long.MAX_VALUE) { - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ - tess.pq = null; - throw new RuntimeException(); - } - GetIntersectData(tess, eUp.Org, orgUp, dstUp, orgLo, dstLo); - RegionAbove(regUp).dirty = regUp.dirty = regLo.dirty = true; - return false; - } - - static void WalkDirtyRegions(GLUtessellatorImpl tess, - ActiveRegion regUp) /* - * When the upper or lower edge of any region changes, the region is marked "dirty". - * This routine walks through all the dirty regions and makes sure that the dictionary - * invariants are satisfied (see the comments at the beginning of this file). Of course - * new dirty regions can be created as we make changes to restore the invariants. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp, eLo; - - for (;;) { - /* Find the lowest dirty region (we walk from the bottom up). */ - while (regLo.dirty) { - regUp = regLo; - regLo = RegionBelow(regLo); - } - if (!regUp.dirty) { - regLo = regUp; - regUp = RegionAbove(regUp); - if (regUp == null || !regUp.dirty) { - /* We've walked all the dirty regions */ - return; - } - } - regUp.dirty = false; - eUp = regUp.eUp; - eLo = regLo.eUp; - - if (eUp.Sym.Org != eLo.Sym.Org) { - /* Check that the edge ordering is obeyed at the Dst vertices. */ - if (CheckForLeftSplice(tess, regUp)) { - - /* - * If the upper or lower edge was marked fixUpperEdge, then we no longer need it (since these edges - * are needed only for vertices which otherwise have no right-going edges). - */ - if (regLo.fixUpperEdge) { - DeleteRegion(tess, regLo); - if (!Mesh.__gl_meshDelete(eLo)) throw new RuntimeException(); - regLo = RegionBelow(regUp); - eLo = regLo.eUp; - } else if (regUp.fixUpperEdge) { - DeleteRegion(tess, regUp); - if (!Mesh.__gl_meshDelete(eUp)) throw new RuntimeException(); - regUp = RegionAbove(regLo); - eUp = regUp.eUp; - } - } - } - if (eUp.Org != eLo.Org) { - if (eUp.Sym.Org != eLo.Sym.Org && !regUp.fixUpperEdge - && !regLo.fixUpperEdge - && (eUp.Sym.Org == tess.event || eLo.Sym.Org == tess.event)) { - /* - * When all else fails in CheckForIntersect(), it uses tess.event as the intersection location. To - * make this possible, it requires that tess.event lie between the upper and lower edges, and also - * that neither of these is marked fixUpperEdge (since in the worst case it might splice one of - * these edges into tess.event, and violate the invariant that fixable edges are the only - * right-going edge from their associated vertex). - */ - if (CheckForIntersect(tess, regUp)) { - /* WalkDirtyRegions() was called recursively; we're done */ - return; - } - } else { - /* - * Even though we can't use CheckForIntersect(), the Org vertices may violate the dictionary edge - * ordering. Check and correct this. - */ - CheckForRightSplice(tess, regUp); - } - } - if (eUp.Org == eLo.Org && eUp.Sym.Org == eLo.Sym.Org) { - /* A degenerate loop consisting of only two edges -- delete it. */ - AddWinding(eLo, eUp); - DeleteRegion(tess, regUp); - if (!Mesh.__gl_meshDelete(eUp)) throw new RuntimeException(); - regUp = RegionAbove(regLo); - } - } - } - - static void ConnectRightVertex(GLUtessellatorImpl tess, ActiveRegion regUp, - GLUhalfEdge eBottomLeft) /* - * Purpose: connect a "right" vertex vEvent (one where all edges go left) to the - * unprocessed portion of the mesh. Since there are no right-going edges, two - * regions (one above vEvent and one below) are being merged into one. "regUp" is - * the upper of these two regions. There are two reasons for doing this (adding a - * right-going edge): - if the two regions being merged are "inside", we must add - * an edge to keep them separated (the combined region would not be monotone). - in - * any case, we must leave some record of vEvent in the dictionary, so that we can - * merge vEvent with features that we have not seen yet. For example, maybe there - * is a vertical edge which passes just to the right of vEvent; we would like to - * splice vEvent into this edge. However, we don't want to connect vEvent to just - * any vertex. We don''t want the new edge to cross any other edges; otherwise we - * will create intersection vertices even when the input data had no - * self-intersections. (This is a bad thing; if the user's input data has no - * intersections, we don't want to generate any false intersections ourselves.) Our - * eventual goal is to connect vEvent to the leftmost unprocessed vertex of the - * combined region (the union of regUp and regLo). But because of unseen vertices - * with all right-going edges, and also new vertices which may be created by edge - * intersections, we don''t know where that leftmost unprocessed vertex is. In the - * meantime, we connect vEvent to the closest vertex of either chain, and mark the - * region as "fixUpperEdge". This flag says to delete and reconnect this edge to - * the next processed vertex on the boundary of the combined region. Quite possibly - * the vertex we connected to will turn out to be the closest one, in which case we - * won''t need to make any changes. - */ { - GLUhalfEdge eNew; - GLUhalfEdge eTopLeft = eBottomLeft.Onext; - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - boolean degenerate = false; - - if (eUp.Sym.Org != eLo.Sym.Org) { - CheckForIntersect(tess, regUp); - } - - /* - * Possible new degeneracies: upper or lower edge of regUp may pass through vEvent, or may coincide with new - * intersection vertex - */ - if (Geom.VertEq(eUp.Org, tess.event)) { - if (!Mesh.__gl_meshSplice(eTopLeft.Sym.Lnext, eUp)) throw new RuntimeException(); - regUp = TopLeftRegion(regUp); - if (regUp == null) throw new RuntimeException(); - eTopLeft = RegionBelow(regUp).eUp; - FinishLeftRegions(tess, RegionBelow(regUp), regLo); - degenerate = true; - } - if (Geom.VertEq(eLo.Org, tess.event)) { - if (!Mesh.__gl_meshSplice(eBottomLeft, eLo.Sym.Lnext)) throw new RuntimeException(); - eBottomLeft = FinishLeftRegions(tess, regLo, null); - degenerate = true; - } - if (degenerate) { - AddRightEdges(tess, regUp, eBottomLeft.Onext, eTopLeft, eTopLeft, true); - return; - } - - /* - * Non-degenerate situation -- need to add a temporary, fixable edge. Connect to the closer of eLo.Org, eUp.Org. - */ - if (Geom.VertLeq(eLo.Org, eUp.Org)) { - eNew = eLo.Sym.Lnext; - } else { - eNew = eUp; - } - eNew = Mesh.__gl_meshConnect(eBottomLeft.Onext.Sym, eNew); - if (eNew == null) throw new RuntimeException(); - - /* - * Prevent cleanup, otherwise eNew might disappear before we've even had a chance to mark it as a temporary - * edge. - */ - AddRightEdges(tess, regUp, eNew, eNew.Onext, eNew.Onext, false); - eNew.Sym.activeRegion.fixUpperEdge = true; - WalkDirtyRegions(tess, regUp); - } - - /* - * Because vertices at exactly the same location are merged together before we process the sweep event, some - * degenerate cases can't occur. However if someone eventually makes the modifications required to merge features - * which are close together, the cases below marked TOLERANCE_NONZERO will be useful. They were debugged before the - * code to merge identical vertices in the main loop was added. - */ - private static final boolean TOLERANCE_NONZERO = false; - - static void ConnectLeftDegenerate(GLUtessellatorImpl tess, ActiveRegion regUp, - GLUvertex vEvent) /* - * The event vertex lies exacty on an already-processed edge or vertex. Adding the new - * vertex involves splicing it into the already-processed part of the mesh. - */ { - GLUhalfEdge e, eTopLeft, eTopRight, eLast; - ActiveRegion reg; - - e = regUp.eUp; - if (Geom.VertEq(e.Org, vEvent)) { - /* - * e.Org is an unprocessed vertex - just combine them, and wait for e.Org to be pulled from the queue - */ - assert (TOLERANCE_NONZERO); - SpliceMergeVertices(tess, e, vEvent.anEdge); - return; - } - - if (!Geom.VertEq(e.Sym.Org, vEvent)) { - /* General case -- splice vEvent into edge e which passes through it */ - if (Mesh.__gl_meshSplitEdge(e.Sym) == null) throw new RuntimeException(); - if (regUp.fixUpperEdge) { - /* This edge was fixable -- delete unused portion of original edge */ - if (!Mesh.__gl_meshDelete(e.Onext)) throw new RuntimeException(); - regUp.fixUpperEdge = false; - } - if (!Mesh.__gl_meshSplice(vEvent.anEdge, e)) throw new RuntimeException(); - SweepEvent(tess, vEvent); /* recurse */ - return; - } - - /* - * vEvent coincides with e.Sym.Org, which has already been processed. Splice in the additional right-going - * edges. - */ - assert (TOLERANCE_NONZERO); - regUp = TopRightRegion(regUp); - reg = RegionBelow(regUp); - eTopRight = reg.eUp.Sym; - eTopLeft = eLast = eTopRight.Onext; - if (reg.fixUpperEdge) { - /* - * Here e.Sym.Org has only a single fixable edge going right. We can delete it since now we have some real - * right-going edges. - */ - assert (eTopLeft != eTopRight); /* there are some left edges too */ - DeleteRegion(tess, reg); - if (!Mesh.__gl_meshDelete(eTopRight)) throw new RuntimeException(); - eTopRight = eTopLeft.Sym.Lnext; - } - if (!Mesh.__gl_meshSplice(vEvent.anEdge, eTopRight)) throw new RuntimeException(); - if (!Geom.EdgeGoesLeft(eTopLeft)) { - /* e.Sym.Org had no left-going edges -- indicate this to AddRightEdges() */ - eTopLeft = null; - } - AddRightEdges(tess, regUp, eTopRight.Onext, eLast, eTopLeft, true); - } - - static void ConnectLeftVertex(GLUtessellatorImpl tess, - GLUvertex vEvent) /* - * Purpose: connect a "left" vertex (one where both edges go right) to the processed - * portion of the mesh. Let R be the active region containing vEvent, and let U and L be - * the upper and lower edge chains of R. There are two possibilities: - the normal case: - * split R into two regions, by connecting vEvent to the rightmost vertex of U or L lying - * to the left of the sweep line - the degenerate case: if vEvent is close enough to U or - * L, we merge vEvent into that edge chain. The subcases are: - merging with the rightmost - * vertex of U or L - merging with the active edge of U or L - merging with an - * already-processed portion of U or L - */ { - ActiveRegion regUp, regLo, reg; - GLUhalfEdge eUp, eLo, eNew; - ActiveRegion tmp = new ActiveRegion(); - - /* assert ( vEvent.anEdge.Onext.Onext == vEvent.anEdge ); */ - - /* Get a pointer to the active region containing vEvent */ - tmp.eUp = vEvent.anEdge.Sym; - /* __GL_DICTLISTKEY */ - /* __gl_dictListSearch */ - regUp = (ActiveRegion) Dict.dictKey(Dict.dictSearch(tess.dict, tmp)); - regLo = RegionBelow(regUp); - eUp = regUp.eUp; - eLo = regLo.eUp; - - /* Try merging with U or L first */ - if (Geom.EdgeSign(eUp.Sym.Org, vEvent, eUp.Org) == 0) { - ConnectLeftDegenerate(tess, regUp, vEvent); - return; - } - - /* - * Connect vEvent to rightmost processed vertex of either chain. e.Sym.Org is the vertex that we will connect to - * vEvent. - */ - reg = Geom.VertLeq(eLo.Sym.Org, eUp.Sym.Org) ? regUp : regLo; - - if (regUp.inside || reg.fixUpperEdge) { - if (reg == regUp) { - eNew = Mesh.__gl_meshConnect(vEvent.anEdge.Sym, eUp.Lnext); - if (eNew == null) throw new RuntimeException(); - } else { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(eLo.Sym.Onext.Sym, vEvent.anEdge); - if (tempHalfEdge == null) throw new RuntimeException(); - - eNew = tempHalfEdge.Sym; - } - if (reg.fixUpperEdge) { - if (!FixUpperEdge(reg, eNew)) throw new RuntimeException(); - } else { - ComputeWinding(tess, AddRegionBelow(tess, regUp, eNew)); - } - SweepEvent(tess, vEvent); - } else { - /* - * The new vertex is in a region which does not belong to the polygon. We don''t need to connect this vertex - * to the rest of the mesh. - */ - AddRightEdges(tess, regUp, vEvent.anEdge, vEvent.anEdge, null, true); - } - } - - static void SweepEvent(GLUtessellatorImpl tess, - GLUvertex vEvent) /* - * Does everything necessary when the sweep line crosses a vertex. Updates the mesh and - * the edge dictionary. - */ { - ActiveRegion regUp, reg; - GLUhalfEdge e, eTopLeft, eBottomLeft; - - tess.event = vEvent; /* for access in EdgeLeq() */ - DebugEvent(tess); - - /* - * Check if this vertex is the right endpoint of an edge that is already in the dictionary. In this case we - * don't need to waste time searching for the location to insert new edges. - */ - e = vEvent.anEdge; - while (e.activeRegion == null) { - e = e.Onext; - if (e == vEvent.anEdge) { - /* All edges go right -- not incident to any processed edges */ - ConnectLeftVertex(tess, vEvent); - return; - } - } - - /* - * Processing consists of two phases: first we "finish" all the active regions where both the upper and lower - * edges terminate at vEvent (ie. vEvent is closing off these regions). We mark these faces "inside" or - * "outside" the polygon according to their winding number, and delete the edges from the dictionary. This takes - * care of all the left-going edges from vEvent. - */ - regUp = TopLeftRegion(e.activeRegion); - if (regUp == null) throw new RuntimeException(); - reg = RegionBelow(regUp); - eTopLeft = reg.eUp; - eBottomLeft = FinishLeftRegions(tess, reg, null); - - /* - * Next we process all the right-going edges from vEvent. This involves adding the edges to the dictionary, and - * creating the associated "active regions" which record information about the regions between adjacent - * dictionary edges. - */ - if (eBottomLeft.Onext == eTopLeft) { - /* No right-going edges -- add a temporary "fixable" edge */ - ConnectRightVertex(tess, regUp, eBottomLeft); - } else { - AddRightEdges(tess, regUp, eBottomLeft.Onext, eTopLeft, eTopLeft, true); - } - } - - /* - * Make the sentinel coordinates big enough that they will never be merged with real input features. (Even with the - * largest possible input contour and the maximum tolerance of 1.0, no merging will be done with coordinates larger - * than 3 * GLU_TESS_MAX_COORD). - */ - private static final double SENTINEL_COORD = (4.0 * GLU_TESS_MAX_COORD); - - static void AddSentinel(GLUtessellatorImpl tess, double t) /* - * We add two sentinel edges above and below all other - * edges, to avoid special cases at the top and bottom. - */ { - GLUhalfEdge e; - ActiveRegion reg = new ActiveRegion(); - // if (reg == null) throw new RuntimeException(); - - e = Mesh.__gl_meshMakeEdge(tess.mesh); - if (e == null) throw new RuntimeException(); - - e.Org.s = SENTINEL_COORD; - e.Org.t = t; - e.Sym.Org.s = -SENTINEL_COORD; - e.Sym.Org.t = t; - tess.event = e.Sym.Org; /* initialize it */ - - reg.eUp = e; - reg.windingNumber = 0; - reg.inside = false; - reg.fixUpperEdge = false; - reg.sentinel = true; - reg.dirty = false; - reg.nodeUp = Dict.dictInsert(tess.dict, reg); /* __gl_dictListInsertBefore */ - if (reg.nodeUp == null) throw new RuntimeException(); - } - - static void InitEdgeDict( - final GLUtessellatorImpl tess) /* - * We maintain an ordering of edge intersections with the sweep line. This - * order is maintained in a dynamic dictionary. - */ { - /* __gl_dictListNewDict */ - tess.dict = Dict - .dictNewDict(tess, (frame, key1, key2) -> EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2)); - if (tess.dict == null) throw new RuntimeException(); - - AddSentinel(tess, -SENTINEL_COORD); - AddSentinel(tess, SENTINEL_COORD); - } - - static void DoneEdgeDict(GLUtessellatorImpl tess) { - ActiveRegion reg; - int fixedEdges = 0; - - /* __GL_DICTLISTKEY */ - /* __GL_DICTLISTMIN */ - while ((reg = (ActiveRegion) Dict.dictKey(Dict.dictMin(tess.dict))) != null) { - /* - * At the end of all processing, the dictionary should contain only the two sentinel edges, plus at most one - * "fixable" edge created by ConnectRightVertex(). - */ - if (!reg.sentinel) { - assert (reg.fixUpperEdge); - assert (++fixedEdges == 1); - } - assert (reg.windingNumber == 0); - DeleteRegion(tess, reg); - /* __gl_meshDelete( reg.eUp ); */ - } - Dict.dictDeleteDict(tess.dict); /* __gl_dictListDeleteDict */ - } - - static void RemoveDegenerateEdges( - GLUtessellatorImpl tess) /* - * Remove zero-length edges, and contours with fewer than 3 vertices. - */ { - GLUhalfEdge e, eNext, eLnext; - GLUhalfEdge eHead = tess.mesh.eHead; - - /* LINTED */ - for (e = eHead.next; e != eHead; e = eNext) { - eNext = e.next; - eLnext = e.Lnext; - - if (Geom.VertEq(e.Org, e.Sym.Org) && e.Lnext.Lnext != e) { - /* Zero-length edge, contour has at least 3 edges */ - - SpliceMergeVertices(tess, eLnext, e); /* deletes e.Org */ - if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); /* e is a self-loop */ - e = eLnext; - eLnext = e.Lnext; - } - if (eLnext.Lnext == e) { - /* Degenerate contour (one or two edges) */ - - if (eLnext != e) { - if (eLnext == eNext || eLnext == eNext.Sym) { - eNext = eNext.next; - } - if (!Mesh.__gl_meshDelete(eLnext)) throw new RuntimeException(); - } - if (e == eNext || e == eNext.Sym) { - eNext = eNext.next; - } - if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); - } - } - } - - static boolean InitPriorityQ( - GLUtessellatorImpl tess) /* - * Insert all vertices into the priority queue which determines the order in which - * vertices cross the sweep line. - */ { - PriorityQ pq; - GLUvertex v, vHead; - - /* __gl_pqSortNewPriorityQ */ - pq = tess.pq = PriorityQ.pqNewPriorityQ((key1, key2) -> Geom.VertLeq(((GLUvertex) key1), (GLUvertex) key2)); - if (pq == null) return false; - - vHead = tess.mesh.vHead; - for (v = vHead.next; v != vHead; v = v.next) { - v.pqHandle = pq.pqInsert(v); /* __gl_pqSortInsert */ - if (v.pqHandle == Long.MAX_VALUE) break; - } - if (v != vHead || !pq.pqInit()) { - /* __gl_pqSortInit */ - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ - tess.pq = null; - return false; - } - - return true; - } - - static void DonePriorityQ(GLUtessellatorImpl tess) { - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ - } - - static boolean RemoveDegenerateFaces( - GLUmesh mesh) /* - * Delete any degenerate faces with only two edges. WalkDirtyRegions() will catch almost all - * of these, but it won't catch degenerate faces produced by splice operations on - * already-processed edges. The two places this can happen are in FinishLeftRegions(), when we - * splice in a "temporary" edge produced by ConnectRightVertex(), and in CheckForLeftSplice(), - * where we splice already-processed edges to ensure that our dictionary invariants are not - * violated by numerical errors. In both these cases it is *very* dangerous to delete the - * offending edge at the time, since one of the routines further up the stack will sometimes - * be keeping a pointer to that edge. - */ { - GLUface f, fNext; - GLUhalfEdge e; - - /* LINTED */ - for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { - fNext = f.next; - e = f.anEdge; - assert (e.Lnext != e); - - if (e.Lnext.Lnext == e) { - /* A face with only two edges */ - AddWinding(e.Onext, e); - if (!Mesh.__gl_meshDelete(e)) return false; - } - } - return true; - } - - public static boolean __gl_computeInterior( - GLUtessellatorImpl tess) /* - * __gl_computeInterior( tess ) computes the planar arrangement specified by the - * given contours, and further subdivides this arrangement into regions. Each - * region is marked "inside" if it belongs to the polygon, according to the rule - * given by tess.windingRule. Each interior region is guaranteed be monotone. - */ { - GLUvertex v, vNext; - - tess.fatalError = false; - - /* - * Each vertex defines an event for our sweep line. Start by inserting all the vertices in a priority queue. - * Events are processed in lexicographic order, ie. e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) - */ - RemoveDegenerateEdges(tess); - if (!InitPriorityQ(tess)) return false; /* if error */ - InitEdgeDict(tess); - - /* __gl_pqSortExtractMin */ - while ((v = (GLUvertex) tess.pq.pqExtractMin()) != null) { - for (;;) { - vNext = (GLUvertex) tess.pq.pqMinimum(); /* __gl_pqSortMinimum */ - if (vNext == null || !Geom.VertEq(vNext, v)) break; - - /* - * Merge together all vertices at exactly the same location. This is more efficient than processing them - * one at a time, simplifies the code (see ConnectLeftDegenerate), and is also important for correct - * handling of certain degenerate cases. For example, suppose there are two identical edges A and B that - * belong to different contours (so without this code they would be processed by separate sweep events). - * Suppose another edge C crosses A and B from above. When A is processed, we split it at its - * intersection point with C. However this also splits C, so when we insert B we may compute a slightly - * different intersection point. This might leave two edges with a small gap between them. This kind of - * error is especially obvious when using boundary extraction (GLU_TESS_BOUNDARY_ONLY). - */ - vNext = (GLUvertex) tess.pq.pqExtractMin(); /* __gl_pqSortExtractMin */ - SpliceMergeVertices(tess, v.anEdge, vNext.anEdge); - } - SweepEvent(tess, v); - } - - /* Set tess.event for debugging purposes */ - /* __GL_DICTLISTKEY */ - /* __GL_DICTLISTMIN */ - tess.event = ((ActiveRegion) Dict.dictKey(Dict.dictMin(tess.dict))).eUp.Org; - DebugEvent(tess); - DoneEdgeDict(tess); - DonePriorityQ(tess); - - if (!RemoveDegenerateFaces(tess.mesh)) return false; - Mesh.__gl_meshCheckMesh(tess.mesh); - - return true; - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/TessMono.java b/src/main/java/org/lwjgl/util/glu/tessellation/TessMono.java deleted file mode 100644 index 3560b50a2..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/TessMono.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class TessMono { - - /* - * __gl_meshTessellateMonoRegion( face ) tessellates a monotone region (what else would it do??) The region must - * consist of a single loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this case means that any vertical - * line intersects the interior of the region in a single interval. Tessellation consists of adding interior edges - * (actually pairs of half-edges), to split the region into non-overlapping triangles. The basic idea is explained - * in Preparata and Shamos (which I don''t have handy right now), although their implementation is more complicated - * than this one. The are two edge chains, an upper chain and a lower chain. We process all vertices from both - * chains in order, from right to left. The algorithm ensures that the following invariant holds after each vertex - * is processed: the untessellated region consists of two chains, where one chain (say the upper) is a single edge, - * and the other chain is concave. The left vertex of the single edge is always to the left of all vertices in the - * concave chain. Each step consists of adding the rightmost unprocessed vertex to one of the two chains, and - * forming a fan of triangles from the rightmost of two chain endpoints. Determining whether we can add each - * triangle to the fan is a simple orientation test. By making the fan as large as possible, we restore the - * invariant (check it yourself). - */ - static boolean __gl_meshTessellateMonoRegion(GLUface face) { - GLUhalfEdge up, lo; - - /* - * All edges are oriented CCW around the boundary of the region. First, find the half-edge whose origin vertex - * is rightmost. Since the sweep goes from left to right, face->anEdge should be close to the edge we want. - */ - up = face.anEdge; - assert (up.Lnext != up && up.Lnext.Lnext != up); - - for (; Geom.VertLeq(up.Sym.Org, up.Org); up = up.Onext.Sym); - for (; Geom.VertLeq(up.Org, up.Sym.Org); up = up.Lnext); - lo = up.Onext.Sym; - - while (up.Lnext != lo) { - if (Geom.VertLeq(up.Sym.Org, lo.Org)) { - /* - * up.Sym.Org is on the left. It is safe to form triangles from lo.Org. The EdgeGoesLeft test guarantees - * progress even when some triangles are CW, given that the upper and lower chains are truly monotone. - */ - while (lo.Lnext != up - && (Geom.EdgeGoesLeft(lo.Lnext) || Geom.EdgeSign(lo.Org, lo.Sym.Org, lo.Lnext.Sym.Org) <= 0)) { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo); - if (tempHalfEdge == null) return false; - lo = tempHalfEdge.Sym; - } - lo = lo.Onext.Sym; - } else { - /* lo.Org is on the left. We can make CCW triangles from up.Sym.Org. */ - while (lo.Lnext != up && (Geom.EdgeGoesRight(up.Onext.Sym) - || Geom.EdgeSign(up.Sym.Org, up.Org, up.Onext.Sym.Org) >= 0)) { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(up, up.Onext.Sym); - if (tempHalfEdge == null) return false; - up = tempHalfEdge.Sym; - } - up = up.Lnext; - } - } - - /* - * Now lo.Org == up.Sym.Org == the leftmost vertex. The remaining region can be tessellated in a fan from this - * leftmost vertex. - */ - assert (lo.Lnext != up); - while (lo.Lnext.Lnext != up) { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo); - if (tempHalfEdge == null) return false; - lo = tempHalfEdge.Sym; - } - - return true; - } - - /* - * __gl_meshTessellateInterior( mesh ) tessellates each region of the mesh which is marked "inside" the polygon. - * Each such region must be monotone. - */ - public static boolean __gl_meshTessellateInterior(GLUmesh mesh) { - GLUface f, next; - - /* LINTED */ - for (f = mesh.fHead.next; f != mesh.fHead; f = next) { - /* Make sure we don''t try to tessellate the new triangles. */ - next = f.next; - if (f.inside) { - if (!__gl_meshTessellateMonoRegion(f)) return false; - } - } - - return true; - } - - /* - * __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces which are not marked "inside" the polygon. - * Since further mesh operations on NULL faces are not allowed, the main purpose is to clean up the mesh so that - * exterior loops are not represented in the data structure. - */ - public static void __gl_meshDiscardExterior(GLUmesh mesh) { - GLUface f, next; - - /* LINTED */ - for (f = mesh.fHead.next; f != mesh.fHead; f = next) { - /* Since f will be destroyed, save its next pointer. */ - next = f.next; - if (!f.inside) { - Mesh.__gl_meshZapFace(f); - } - } - } - - // private static final int MARKED_FOR_DELETION = 0x7fffffff; - - /* - * __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the winding numbers on all edges so that - * regions marked "inside" the polygon have a winding number of "value", and regions outside have a winding number - * of 0. If keepOnlyBoundary is TRUE, it also deletes all edges which do not separate an interior region from an - * exterior one. - */ - public static boolean __gl_meshSetWindingNumber(GLUmesh mesh, int value, boolean keepOnlyBoundary) { - GLUhalfEdge e, eNext; - - for (e = mesh.eHead.next; e != mesh.eHead; e = eNext) { - eNext = e.next; - if (e.Sym.Lface.inside != e.Lface.inside) { - - /* This is a boundary edge (one side is interior, one is exterior). */ - e.winding = (e.Lface.inside) ? value : -value; - } else { - - /* Both regions are interior, or both are exterior. */ - if (!keepOnlyBoundary) { - e.winding = 0; - } else { - if (!Mesh.__gl_meshDelete(e)) return false; - } - } - } - return true; - } -} diff --git a/src/main/java/org/lwjgl/util/glu/tessellation/TessState.java b/src/main/java/org/lwjgl/util/glu/tessellation/TessState.java deleted file mode 100644 index 4b66084b8..000000000 --- a/src/main/java/org/lwjgl/util/glu/tessellation/TessState.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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. - */ - -/* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. - */ - -/* - ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as - * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only - * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a - * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA - * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is - * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, - * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant - * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license - * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that - * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered - * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, - * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon - * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights - * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with - * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The - * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version - * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the - * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java - * Port: Nathan Parker Burg, August 2003 - */ -package org.lwjgl.util.glu.tessellation; - -class TessState { - - public static final int T_DORMANT = 0; - public static final int T_IN_POLYGON = 1; - public static final int T_IN_CONTOUR = 2; -} diff --git a/src/main/java/org/lwjgl/util/vector/Matrix.java b/src/main/java/org/lwjgl/util/vector/Matrix.java deleted file mode 100644 index 50e9867eb..000000000 --- a/src/main/java/org/lwjgl/util/vector/Matrix.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Base class for matrices. When a matrix is constructed it will be the identity matrix unless otherwise stated. - * - * @author cix_foo - * @version $Revision: 3418 $ $Id: Matrix.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public abstract class Matrix implements Serializable { - - /** - * Constructor for Matrix. - */ - protected Matrix() { - super(); - } - - /** - * Set this matrix to be the identity matrix. - * - * @return this - */ - public abstract Matrix setIdentity(); - - /** - * Invert this matrix - * - * @return this - */ - public abstract Matrix invert(); - - /** - * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. - * - * @param buf A float buffer to read from - * @return this - */ - public abstract Matrix load(FloatBuffer buf); - - /** - * Load from a float buffer. The buffer stores the matrix in row major (mathematical) order. - * - * @param buf A float buffer to read from - * @return this - */ - public abstract Matrix loadTranspose(FloatBuffer buf); - - /** - * Negate this matrix - * - * @return this - */ - public abstract Matrix negate(); - - /** - * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. - * - * @param buf The buffer to store this matrix in - * @return this - */ - public abstract Matrix store(FloatBuffer buf); - - /** - * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. - * - * @param buf The buffer to store this matrix in - * @return this - */ - public abstract Matrix storeTranspose(FloatBuffer buf); - - /** - * Transpose this matrix - * - * @return this - */ - public abstract Matrix transpose(); - - /** - * Set this matrix to 0. - * - * @return this - */ - public abstract Matrix setZero(); - - /** - * @return the determinant of the matrix - */ - public abstract float determinant(); -} diff --git a/src/main/java/org/lwjgl/util/vector/Matrix2f.java b/src/main/java/org/lwjgl/util/vector/Matrix2f.java deleted file mode 100644 index 79065f4ff..000000000 --- a/src/main/java/org/lwjgl/util/vector/Matrix2f.java +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 2x2 matrix - * - * @author cix_foo - * @version $Revision: 3799 $ $Id: Matrix2f.java 3799 2012-09-12 11:29:40Z kappa1 $ - */ -public class Matrix2f extends Matrix implements Serializable { - - private static final long serialVersionUID = 1L; - - public float m00, m01, m10, m11; - - /** - * Constructor for Matrix2f. The matrix is initialised to the identity. - */ - public Matrix2f() { - setIdentity(); - } - - /** - * Constructor - */ - public Matrix2f(Matrix2f src) { - load(src); - } - - /** - * Load from another matrix - * - * @param src The source matrix - * @return this - */ - public Matrix2f load(Matrix2f src) { - return load(src, this); - } - - /** - * Copy the source matrix to the destination matrix. - * - * @param src The source matrix - * @param dest The destination matrix, or null if a new one should be created. - * @return The copied matrix - */ - public static Matrix2f load(Matrix2f src, Matrix2f dest) { - if (dest == null) dest = new Matrix2f(); - - dest.m00 = src.m00; - dest.m01 = src.m01; - dest.m10 = src.m10; - dest.m11 = src.m11; - - return dest; - } - - /** - * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. - * - * @param buf A float buffer to read from - * @return this - */ - public Matrix load(FloatBuffer buf) { - - m00 = buf.get(); - m01 = buf.get(); - m10 = buf.get(); - m11 = buf.get(); - - return this; - } - - /** - * Load from a float buffer. The buffer stores the matrix in row major (mathematical) order. - * - * @param buf A float buffer to read from - * @return this - */ - public Matrix loadTranspose(FloatBuffer buf) { - - m00 = buf.get(); - m10 = buf.get(); - m01 = buf.get(); - m11 = buf.get(); - - return this; - } - - /** - * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix store(FloatBuffer buf) { - buf.put(m00); - buf.put(m01); - buf.put(m10); - buf.put(m11); - return this; - } - - /** - * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix storeTranspose(FloatBuffer buf) { - buf.put(m00); - buf.put(m10); - buf.put(m01); - buf.put(m11); - return this; - } - - /** - * Add two matrices together and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix2f add(Matrix2f left, Matrix2f right, Matrix2f dest) { - if (dest == null) dest = new Matrix2f(); - - dest.m00 = left.m00 + right.m00; - dest.m01 = left.m01 + right.m01; - dest.m10 = left.m10 + right.m10; - dest.m11 = left.m11 + right.m11; - - return dest; - } - - /** - * Subtract the right matrix from the left and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix2f sub(Matrix2f left, Matrix2f right, Matrix2f dest) { - if (dest == null) dest = new Matrix2f(); - - dest.m00 = left.m00 - right.m00; - dest.m01 = left.m01 - right.m01; - dest.m10 = left.m10 - right.m10; - dest.m11 = left.m11 - right.m11; - - return dest; - } - - /** - * Multiply the right matrix by the left and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix2f mul(Matrix2f left, Matrix2f right, Matrix2f dest) { - if (dest == null) dest = new Matrix2f(); - - float m00 = left.m00 * right.m00 + left.m10 * right.m01; - float m01 = left.m01 * right.m00 + left.m11 * right.m01; - float m10 = left.m00 * right.m10 + left.m10 * right.m11; - float m11 = left.m01 * right.m10 + left.m11 * right.m11; - - dest.m00 = m00; - dest.m01 = m01; - dest.m10 = m10; - dest.m11 = m11; - - return dest; - } - - /** - * Transform a Vector by a matrix and return the result in a destination vector. - * - * @param left The left matrix - * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created - * @return the destination vector - */ - public static Vector2f transform(Matrix2f left, Vector2f right, Vector2f dest) { - if (dest == null) dest = new Vector2f(); - - float x = left.m00 * right.x + left.m10 * right.y; - float y = left.m01 * right.x + left.m11 * right.y; - - dest.x = x; - dest.y = y; - - return dest; - } - - /** - * Transpose this matrix - * - * @return this - */ - public Matrix transpose() { - return transpose(this); - } - - /** - * Transpose this matrix and place the result in another matrix. - * - * @param dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public Matrix2f transpose(Matrix2f dest) { - return transpose(this, dest); - } - - /** - * Transpose the source matrix and place the result in the destination matrix. - * - * @param src The source matrix or null if a new matrix is to be created - * @param dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public static Matrix2f transpose(Matrix2f src, Matrix2f dest) { - if (dest == null) dest = new Matrix2f(); - - float m01 = src.m10; - float m10 = src.m01; - - dest.m01 = m01; - dest.m10 = m10; - - return dest; - } - - /** - * Invert this matrix - * - * @return this if successful, null otherwise - */ - public Matrix invert() { - return invert(this, this); - } - - /** - * Invert the source matrix and place the result in the destination matrix. - * - * @param src The source matrix to be inverted - * @param dest The destination matrix or null if a new matrix is to be created - * @return The inverted matrix, or null if source can't be reverted. - */ - public static Matrix2f invert(Matrix2f src, Matrix2f dest) { - /* - * inv(A) = 1/det(A) * adj(A); - */ - - float determinant = src.determinant(); - if (determinant != 0) { - if (dest == null) dest = new Matrix2f(); - float determinant_inv = 1f / determinant; - float t00 = src.m11 * determinant_inv; - float t01 = -src.m01 * determinant_inv; - float t11 = src.m00 * determinant_inv; - float t10 = -src.m10 * determinant_inv; - - dest.m00 = t00; - dest.m01 = t01; - dest.m10 = t10; - dest.m11 = t11; - return dest; - } else return null; - } - - /** - * Returns a string representation of this matrix - */ - public String toString() { - StringBuilder buf = new StringBuilder(); - buf.append(m00).append(' ').append(m10).append(' ').append('\n'); - buf.append(m01).append(' ').append(m11).append(' ').append('\n'); - return buf.toString(); - } - - /** - * Negate this matrix - * - * @return this - */ - public Matrix negate() { - return negate(this); - } - - /** - * Negate this matrix and stash the result in another matrix. - * - * @param dest The destination matrix, or null if a new matrix is to be created - * @return the negated matrix - */ - public Matrix2f negate(Matrix2f dest) { - return negate(this, dest); - } - - /** - * Negate the source matrix and stash the result in the destination matrix. - * - * @param src The source matrix to be negated - * @param dest The destination matrix, or null if a new matrix is to be created - * @return the negated matrix - */ - public static Matrix2f negate(Matrix2f src, Matrix2f dest) { - if (dest == null) dest = new Matrix2f(); - - dest.m00 = -src.m00; - dest.m01 = -src.m01; - dest.m10 = -src.m10; - dest.m11 = -src.m11; - - return dest; - } - - /** - * Set this matrix to be the identity matrix. - * - * @return this - */ - public Matrix setIdentity() { - return setIdentity(this); - } - - /** - * Set the source matrix to be the identity matrix. - * - * @param src The matrix to set to the identity. - * @return The source matrix - */ - public static Matrix2f setIdentity(Matrix2f src) { - src.m00 = 1.0f; - src.m01 = 0.0f; - src.m10 = 0.0f; - src.m11 = 1.0f; - return src; - } - - /** - * Set this matrix to 0. - * - * @return this - */ - public Matrix setZero() { - return setZero(this); - } - - public static Matrix2f setZero(Matrix2f src) { - src.m00 = 0.0f; - src.m01 = 0.0f; - src.m10 = 0.0f; - src.m11 = 0.0f; - return src; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Matrix#determinant() - */ - public float determinant() { - return m00 * m11 - m01 * m10; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/Matrix3f.java b/src/main/java/org/lwjgl/util/vector/Matrix3f.java deleted file mode 100644 index 0e3ab4c83..000000000 --- a/src/main/java/org/lwjgl/util/vector/Matrix3f.java +++ /dev/null @@ -1,473 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 3x3 matrix. - * - * @author cix_foo - * @version $Revision: 3799 $ $Id: Matrix3f.java 3799 2012-09-12 11:29:40Z kappa1 $ - */ -public class Matrix3f extends Matrix implements Serializable { - - private static final long serialVersionUID = 1L; - - public float m00, m01, m02, m10, m11, m12, m20, m21, m22; - - /** - * Constructor for Matrix3f. Matrix is initialised to the identity. - */ - public Matrix3f() { - super(); - setIdentity(); - } - - /** - * Load from another matrix - * - * @param src The source matrix - * @return this - */ - public Matrix3f load(Matrix3f src) { - return load(src, this); - } - - /** - * Copy source matrix to destination matrix - * - * @param src The source matrix - * @param dest The destination matrix, or null of a new matrix is to be created - * @return The copied matrix - */ - public static Matrix3f load(Matrix3f src, Matrix3f dest) { - if (dest == null) dest = new Matrix3f(); - - dest.m00 = src.m00; - dest.m10 = src.m10; - dest.m20 = src.m20; - dest.m01 = src.m01; - dest.m11 = src.m11; - dest.m21 = src.m21; - dest.m02 = src.m02; - dest.m12 = src.m12; - dest.m22 = src.m22; - - return dest; - } - - /** - * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. - * - * @param buf A float buffer to read from - * @return this - */ - public Matrix load(FloatBuffer buf) { - - m00 = buf.get(); - m01 = buf.get(); - m02 = buf.get(); - m10 = buf.get(); - m11 = buf.get(); - m12 = buf.get(); - m20 = buf.get(); - m21 = buf.get(); - m22 = buf.get(); - - return this; - } - - /** - * Load from a float buffer. The buffer stores the matrix in row major (maths) order. - * - * @param buf A float buffer to read from - * @return this - */ - public Matrix loadTranspose(FloatBuffer buf) { - - m00 = buf.get(); - m10 = buf.get(); - m20 = buf.get(); - m01 = buf.get(); - m11 = buf.get(); - m21 = buf.get(); - m02 = buf.get(); - m12 = buf.get(); - m22 = buf.get(); - - return this; - } - - /** - * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix store(FloatBuffer buf) { - buf.put(m00); - buf.put(m01); - buf.put(m02); - buf.put(m10); - buf.put(m11); - buf.put(m12); - buf.put(m20); - buf.put(m21); - buf.put(m22); - return this; - } - - /** - * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix storeTranspose(FloatBuffer buf) { - buf.put(m00); - buf.put(m10); - buf.put(m20); - buf.put(m01); - buf.put(m11); - buf.put(m21); - buf.put(m02); - buf.put(m12); - buf.put(m22); - return this; - } - - /** - * Add two matrices together and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest) { - if (dest == null) dest = new Matrix3f(); - - dest.m00 = left.m00 + right.m00; - dest.m01 = left.m01 + right.m01; - dest.m02 = left.m02 + right.m02; - dest.m10 = left.m10 + right.m10; - dest.m11 = left.m11 + right.m11; - dest.m12 = left.m12 + right.m12; - dest.m20 = left.m20 + right.m20; - dest.m21 = left.m21 + right.m21; - dest.m22 = left.m22 + right.m22; - - return dest; - } - - /** - * Subtract the right matrix from the left and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest) { - if (dest == null) dest = new Matrix3f(); - - dest.m00 = left.m00 - right.m00; - dest.m01 = left.m01 - right.m01; - dest.m02 = left.m02 - right.m02; - dest.m10 = left.m10 - right.m10; - dest.m11 = left.m11 - right.m11; - dest.m12 = left.m12 - right.m12; - dest.m20 = left.m20 - right.m20; - dest.m21 = left.m21 - right.m21; - dest.m22 = left.m22 - right.m22; - - return dest; - } - - /** - * Multiply the right matrix by the left and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest) { - if (dest == null) dest = new Matrix3f(); - - float m00 = left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02; - float m01 = left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02; - float m02 = left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02; - float m10 = left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12; - float m11 = left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12; - float m12 = left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12; - float m20 = left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22; - float m21 = left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22; - float m22 = left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - - return dest; - } - - /** - * Transform a Vector by a matrix and return the result in a destination vector. - * - * @param left The left matrix - * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created - * @return the destination vector - */ - public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest) { - if (dest == null) dest = new Vector3f(); - - float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z; - float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z; - float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z; - - dest.x = x; - dest.y = y; - dest.z = z; - - return dest; - } - - /** - * Transpose this matrix - * - * @return this - */ - public Matrix transpose() { - return transpose(this, this); - } - - /** - * Transpose this matrix and place the result in another matrix - * - * @param dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public Matrix3f transpose(Matrix3f dest) { - return transpose(this, dest); - } - - /** - * Transpose the source matrix and place the result into the destination matrix - * - * @param src The source matrix to be transposed - * @param dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public static Matrix3f transpose(Matrix3f src, Matrix3f dest) { - if (dest == null) dest = new Matrix3f(); - float m00 = src.m00; - float m01 = src.m10; - float m02 = src.m20; - float m10 = src.m01; - float m11 = src.m11; - float m12 = src.m21; - float m20 = src.m02; - float m21 = src.m12; - float m22 = src.m22; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - return dest; - } - - /** - * @return the determinant of the matrix - */ - public float determinant() { - float f = m00 * (m11 * m22 - m12 * m21) + m01 * (m12 * m20 - m10 * m22) + m02 * (m10 * m21 - m11 * m20); - return f; - } - - /** - * Returns a string representation of this matrix - */ - public String toString() { - StringBuilder buf = new StringBuilder(); - buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append('\n'); - buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append('\n'); - buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append('\n'); - return buf.toString(); - } - - /** - * Invert this matrix - * - * @return this if successful, null otherwise - */ - public Matrix invert() { - return invert(this, this); - } - - /** - * Invert the source matrix and put the result into the destination matrix - * - * @param src The source matrix to be inverted - * @param dest The destination matrix, or null if a new one is to be created - * @return The inverted matrix if successful, null otherwise - */ - public static Matrix3f invert(Matrix3f src, Matrix3f dest) { - float determinant = src.determinant(); - - if (determinant != 0) { - if (dest == null) dest = new Matrix3f(); - /* - * do it the ordinary way inv(A) = 1/det(A) * adj(T), where adj(T) = transpose(Conjugate Matrix) m00 m01 m02 - * m10 m11 m12 m20 m21 m22 - */ - float determinant_inv = 1f / determinant; - - // get the conjugate matrix - float t00 = src.m11 * src.m22 - src.m12 * src.m21; - float t01 = -src.m10 * src.m22 + src.m12 * src.m20; - float t02 = src.m10 * src.m21 - src.m11 * src.m20; - float t10 = -src.m01 * src.m22 + src.m02 * src.m21; - float t11 = src.m00 * src.m22 - src.m02 * src.m20; - float t12 = -src.m00 * src.m21 + src.m01 * src.m20; - float t20 = src.m01 * src.m12 - src.m02 * src.m11; - float t21 = -src.m00 * src.m12 + src.m02 * src.m10; - float t22 = src.m00 * src.m11 - src.m01 * src.m10; - - dest.m00 = t00 * determinant_inv; - dest.m11 = t11 * determinant_inv; - dest.m22 = t22 * determinant_inv; - dest.m01 = t10 * determinant_inv; - dest.m10 = t01 * determinant_inv; - dest.m20 = t02 * determinant_inv; - dest.m02 = t20 * determinant_inv; - dest.m12 = t21 * determinant_inv; - dest.m21 = t12 * determinant_inv; - return dest; - } else return null; - } - - /** - * Negate this matrix - * - * @return this - */ - public Matrix negate() { - return negate(this); - } - - /** - * Negate this matrix and place the result in a destination matrix. - * - * @param dest The destination matrix, or null if a new matrix is to be created - * @return the negated matrix - */ - public Matrix3f negate(Matrix3f dest) { - return negate(this, dest); - } - - /** - * Negate the source matrix and place the result in the destination matrix. - * - * @param src The source matrix - * @param dest The destination matrix, or null if a new matrix is to be created - * @return the negated matrix - */ - public static Matrix3f negate(Matrix3f src, Matrix3f dest) { - if (dest == null) dest = new Matrix3f(); - - dest.m00 = -src.m00; - dest.m01 = -src.m02; - dest.m02 = -src.m01; - dest.m10 = -src.m10; - dest.m11 = -src.m12; - dest.m12 = -src.m11; - dest.m20 = -src.m20; - dest.m21 = -src.m22; - dest.m22 = -src.m21; - return dest; - } - - /** - * Set this matrix to be the identity matrix. - * - * @return this - */ - public Matrix setIdentity() { - return setIdentity(this); - } - - /** - * Set the matrix to be the identity matrix. - * - * @param m The matrix to be set to the identity - * @return m - */ - public static Matrix3f setIdentity(Matrix3f m) { - m.m00 = 1.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m10 = 0.0f; - m.m11 = 1.0f; - m.m12 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 1.0f; - return m; - } - - /** - * Set this matrix to 0. - * - * @return this - */ - public Matrix setZero() { - return setZero(this); - } - - /** - * Set the matrix matrix to 0. - * - * @param m The matrix to be set to 0 - * @return m - */ - public static Matrix3f setZero(Matrix3f m) { - m.m00 = 0.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m10 = 0.0f; - m.m11 = 0.0f; - m.m12 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 0.0f; - return m; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/Matrix4f.java b/src/main/java/org/lwjgl/util/vector/Matrix4f.java deleted file mode 100644 index 0bfddb108..000000000 --- a/src/main/java/org/lwjgl/util/vector/Matrix4f.java +++ /dev/null @@ -1,902 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * Holds a 4x4 float matrix. - * - * @author foo - */ -public class Matrix4f extends Matrix implements Serializable { - - private static final long serialVersionUID = 1L; - - public float m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33; - - /** - * Construct a new matrix, initialized to the identity. - */ - public Matrix4f() { - super(); - setIdentity(); - } - - public Matrix4f(final Matrix4f src) { - super(); - load(src); - } - - /** - * Returns a string representation of this matrix - */ - public String toString() { - StringBuilder buf = new StringBuilder(); - buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append(m30).append('\n'); - buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append(m31).append('\n'); - buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append(m32).append('\n'); - buf.append(m03).append(' ').append(m13).append(' ').append(m23).append(' ').append(m33).append('\n'); - return buf.toString(); - } - - /** - * Set this matrix to be the identity matrix. - * - * @return this - */ - public Matrix setIdentity() { - return setIdentity(this); - } - - /** - * Set the given matrix to be the identity matrix. - * - * @param m The matrix to set to the identity - * @return m - */ - public static Matrix4f setIdentity(Matrix4f m) { - m.m00 = 1.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m03 = 0.0f; - m.m10 = 0.0f; - m.m11 = 1.0f; - m.m12 = 0.0f; - m.m13 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 1.0f; - m.m23 = 0.0f; - m.m30 = 0.0f; - m.m31 = 0.0f; - m.m32 = 0.0f; - m.m33 = 1.0f; - - return m; - } - - /** - * Set this matrix to 0. - * - * @return this - */ - public Matrix setZero() { - return setZero(this); - } - - /** - * Set the given matrix to 0. - * - * @param m The matrix to set to 0 - * @return m - */ - public static Matrix4f setZero(Matrix4f m) { - m.m00 = 0.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m03 = 0.0f; - m.m10 = 0.0f; - m.m11 = 0.0f; - m.m12 = 0.0f; - m.m13 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 0.0f; - m.m23 = 0.0f; - m.m30 = 0.0f; - m.m31 = 0.0f; - m.m32 = 0.0f; - m.m33 = 0.0f; - - return m; - } - - /** - * Load from another matrix4f - * - * @param src The source matrix - * @return this - */ - public Matrix4f load(Matrix4f src) { - return load(src, this); - } - - /** - * Copy the source matrix to the destination matrix - * - * @param src The source matrix - * @param dest The destination matrix, or null of a new one is to be created - * @return The copied matrix - */ - public static Matrix4f load(Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - dest.m00 = src.m00; - dest.m01 = src.m01; - dest.m02 = src.m02; - dest.m03 = src.m03; - dest.m10 = src.m10; - dest.m11 = src.m11; - dest.m12 = src.m12; - dest.m13 = src.m13; - dest.m20 = src.m20; - dest.m21 = src.m21; - dest.m22 = src.m22; - dest.m23 = src.m23; - dest.m30 = src.m30; - dest.m31 = src.m31; - dest.m32 = src.m32; - dest.m33 = src.m33; - - return dest; - } - - /** - * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. - * - * @param buf A float buffer to read from - * @return this - */ - public Matrix load(FloatBuffer buf) { - - m00 = buf.get(); - m01 = buf.get(); - m02 = buf.get(); - m03 = buf.get(); - m10 = buf.get(); - m11 = buf.get(); - m12 = buf.get(); - m13 = buf.get(); - m20 = buf.get(); - m21 = buf.get(); - m22 = buf.get(); - m23 = buf.get(); - m30 = buf.get(); - m31 = buf.get(); - m32 = buf.get(); - m33 = buf.get(); - - return this; - } - - /** - * Load from a float buffer. The buffer stores the matrix in row major (maths) order. - * - * @param buf A float buffer to read from - * @return this - */ - public Matrix loadTranspose(FloatBuffer buf) { - - m00 = buf.get(); - m10 = buf.get(); - m20 = buf.get(); - m30 = buf.get(); - m01 = buf.get(); - m11 = buf.get(); - m21 = buf.get(); - m31 = buf.get(); - m02 = buf.get(); - m12 = buf.get(); - m22 = buf.get(); - m32 = buf.get(); - m03 = buf.get(); - m13 = buf.get(); - m23 = buf.get(); - m33 = buf.get(); - - return this; - } - - /** - * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix store(FloatBuffer buf) { - buf.put(m00); - buf.put(m01); - buf.put(m02); - buf.put(m03); - buf.put(m10); - buf.put(m11); - buf.put(m12); - buf.put(m13); - buf.put(m20); - buf.put(m21); - buf.put(m22); - buf.put(m23); - buf.put(m30); - buf.put(m31); - buf.put(m32); - buf.put(m33); - return this; - } - - /** - * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix storeTranspose(FloatBuffer buf) { - buf.put(m00); - buf.put(m10); - buf.put(m20); - buf.put(m30); - buf.put(m01); - buf.put(m11); - buf.put(m21); - buf.put(m31); - buf.put(m02); - buf.put(m12); - buf.put(m22); - buf.put(m32); - buf.put(m03); - buf.put(m13); - buf.put(m23); - buf.put(m33); - return this; - } - - /** - * Store the rotation portion of this matrix in a float buffer. The matrix is stored in column major (openGL) order. - * - * @param buf The buffer to store this matrix in - */ - public Matrix store3f(FloatBuffer buf) { - buf.put(m00); - buf.put(m01); - buf.put(m02); - buf.put(m10); - buf.put(m11); - buf.put(m12); - buf.put(m20); - buf.put(m21); - buf.put(m22); - return this; - } - - /** - * Add two matrices together and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - - dest.m00 = left.m00 + right.m00; - dest.m01 = left.m01 + right.m01; - dest.m02 = left.m02 + right.m02; - dest.m03 = left.m03 + right.m03; - dest.m10 = left.m10 + right.m10; - dest.m11 = left.m11 + right.m11; - dest.m12 = left.m12 + right.m12; - dest.m13 = left.m13 + right.m13; - dest.m20 = left.m20 + right.m20; - dest.m21 = left.m21 + right.m21; - dest.m22 = left.m22 + right.m22; - dest.m23 = left.m23 + right.m23; - dest.m30 = left.m30 + right.m30; - dest.m31 = left.m31 + right.m31; - dest.m32 = left.m32 + right.m32; - dest.m33 = left.m33 + right.m33; - - return dest; - } - - /** - * Subtract the right matrix from the left and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - - dest.m00 = left.m00 - right.m00; - dest.m01 = left.m01 - right.m01; - dest.m02 = left.m02 - right.m02; - dest.m03 = left.m03 - right.m03; - dest.m10 = left.m10 - right.m10; - dest.m11 = left.m11 - right.m11; - dest.m12 = left.m12 - right.m12; - dest.m13 = left.m13 - right.m13; - dest.m20 = left.m20 - right.m20; - dest.m21 = left.m21 - right.m21; - dest.m22 = left.m22 - right.m22; - dest.m23 = left.m23 - right.m23; - dest.m30 = left.m30 - right.m30; - dest.m31 = left.m31 - right.m31; - dest.m32 = left.m32 - right.m32; - dest.m33 = left.m33 - right.m33; - - return dest; - } - - /** - * Multiply the right matrix by the left and place the result in a third matrix. - * - * @param left The left source matrix - * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created - * @return the destination matrix - */ - public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - - float m00 = left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02 + left.m30 * right.m03; - float m01 = left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02 + left.m31 * right.m03; - float m02 = left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02 + left.m32 * right.m03; - float m03 = left.m03 * right.m00 + left.m13 * right.m01 + left.m23 * right.m02 + left.m33 * right.m03; - float m10 = left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12 + left.m30 * right.m13; - float m11 = left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12 + left.m31 * right.m13; - float m12 = left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12 + left.m32 * right.m13; - float m13 = left.m03 * right.m10 + left.m13 * right.m11 + left.m23 * right.m12 + left.m33 * right.m13; - float m20 = left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22 + left.m30 * right.m23; - float m21 = left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22 + left.m31 * right.m23; - float m22 = left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22 + left.m32 * right.m23; - float m23 = left.m03 * right.m20 + left.m13 * right.m21 + left.m23 * right.m22 + left.m33 * right.m23; - float m30 = left.m00 * right.m30 + left.m10 * right.m31 + left.m20 * right.m32 + left.m30 * right.m33; - float m31 = left.m01 * right.m30 + left.m11 * right.m31 + left.m21 * right.m32 + left.m31 * right.m33; - float m32 = left.m02 * right.m30 + left.m12 * right.m31 + left.m22 * right.m32 + left.m32 * right.m33; - float m33 = left.m03 * right.m30 + left.m13 * right.m31 + left.m23 * right.m32 + left.m33 * right.m33; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m03 = m03; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m13 = m13; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - dest.m23 = m23; - dest.m30 = m30; - dest.m31 = m31; - dest.m32 = m32; - dest.m33 = m33; - - return dest; - } - - /** - * Transform a Vector by a matrix and return the result in a destination vector. - * - * @param left The left matrix - * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created - * @return the destination vector - */ - public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) { - if (dest == null) dest = new Vector4f(); - - float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z + left.m30 * right.w; - float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z + left.m31 * right.w; - float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z + left.m32 * right.w; - float w = left.m03 * right.x + left.m13 * right.y + left.m23 * right.z + left.m33 * right.w; - - dest.x = x; - dest.y = y; - dest.z = z; - dest.w = w; - - return dest; - } - - /** - * Transpose this matrix - * - * @return this - */ - public Matrix transpose() { - return transpose(this); - } - - /** - * Translate this matrix - * - * @param vec The vector to translate by - * @return this - */ - public Matrix4f translate(Vector2f vec) { - return translate(vec, this); - } - - /** - * Translate this matrix - * - * @param vec The vector to translate by - * @return this - */ - public Matrix4f translate(Vector3f vec) { - return translate(vec, this); - } - - /** - * Scales this matrix - * - * @param vec The vector to scale by - * @return this - */ - public Matrix4f scale(Vector3f vec) { - return scale(vec, this, this); - } - - /** - * Scales the source matrix and put the result in the destination matrix - * - * @param vec The vector to scale by - * @param src The source matrix - * @param dest The destination matrix, or null if a new matrix is to be created - * @return The scaled matrix - */ - public static Matrix4f scale(Vector3f vec, Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - dest.m00 = src.m00 * vec.x; - dest.m01 = src.m01 * vec.x; - dest.m02 = src.m02 * vec.x; - dest.m03 = src.m03 * vec.x; - dest.m10 = src.m10 * vec.y; - dest.m11 = src.m11 * vec.y; - dest.m12 = src.m12 * vec.y; - dest.m13 = src.m13 * vec.y; - dest.m20 = src.m20 * vec.z; - dest.m21 = src.m21 * vec.z; - dest.m22 = src.m22 * vec.z; - dest.m23 = src.m23 * vec.z; - return dest; - } - - /** - * Rotates the matrix around the given axis the specified angle - * - * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @return this - */ - public Matrix4f rotate(float angle, Vector3f axis) { - return rotate(angle, axis, this); - } - - /** - * Rotates the matrix around the given axis the specified angle - * - * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @param dest The matrix to put the result, or null if a new matrix is to be created - * @return The rotated matrix - */ - public Matrix4f rotate(float angle, Vector3f axis, Matrix4f dest) { - return rotate(angle, axis, this, dest); - } - - /** - * Rotates the source matrix around the given axis the specified angle and put the result in the destination matrix. - * - * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @param src The matrix to rotate - * @param dest The matrix to put the result, or null if a new matrix is to be created - * @return The rotated matrix - */ - public static Matrix4f rotate(float angle, Vector3f axis, Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - float c = (float) Math.cos(angle); - float s = (float) Math.sin(angle); - float oneminusc = 1.0f - c; - float xy = axis.x * axis.y; - float yz = axis.y * axis.z; - float xz = axis.x * axis.z; - float xs = axis.x * s; - float ys = axis.y * s; - float zs = axis.z * s; - - float f00 = axis.x * axis.x * oneminusc + c; - float f01 = xy * oneminusc + zs; - float f02 = xz * oneminusc - ys; - // n[3] not used - float f10 = xy * oneminusc - zs; - float f11 = axis.y * axis.y * oneminusc + c; - float f12 = yz * oneminusc + xs; - // n[7] not used - float f20 = xz * oneminusc + ys; - float f21 = yz * oneminusc - xs; - float f22 = axis.z * axis.z * oneminusc + c; - - float t00 = src.m00 * f00 + src.m10 * f01 + src.m20 * f02; - float t01 = src.m01 * f00 + src.m11 * f01 + src.m21 * f02; - float t02 = src.m02 * f00 + src.m12 * f01 + src.m22 * f02; - float t03 = src.m03 * f00 + src.m13 * f01 + src.m23 * f02; - float t10 = src.m00 * f10 + src.m10 * f11 + src.m20 * f12; - float t11 = src.m01 * f10 + src.m11 * f11 + src.m21 * f12; - float t12 = src.m02 * f10 + src.m12 * f11 + src.m22 * f12; - float t13 = src.m03 * f10 + src.m13 * f11 + src.m23 * f12; - dest.m20 = src.m00 * f20 + src.m10 * f21 + src.m20 * f22; - dest.m21 = src.m01 * f20 + src.m11 * f21 + src.m21 * f22; - dest.m22 = src.m02 * f20 + src.m12 * f21 + src.m22 * f22; - dest.m23 = src.m03 * f20 + src.m13 * f21 + src.m23 * f22; - dest.m00 = t00; - dest.m01 = t01; - dest.m02 = t02; - dest.m03 = t03; - dest.m10 = t10; - dest.m11 = t11; - dest.m12 = t12; - dest.m13 = t13; - return dest; - } - - /** - * Translate this matrix and stash the result in another matrix - * - * @param vec The vector to translate by - * @param dest The destination matrix or null if a new matrix is to be created - * @return the translated matrix - */ - public Matrix4f translate(Vector3f vec, Matrix4f dest) { - return translate(vec, this, dest); - } - - /** - * Translate the source matrix and stash the result in the destination matrix - * - * @param vec The vector to translate by - * @param src The source matrix - * @param dest The destination matrix or null if a new matrix is to be created - * @return The translated matrix - */ - public static Matrix4f translate(Vector3f vec, Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - - dest.m30 += src.m00 * vec.x + src.m10 * vec.y + src.m20 * vec.z; - dest.m31 += src.m01 * vec.x + src.m11 * vec.y + src.m21 * vec.z; - dest.m32 += src.m02 * vec.x + src.m12 * vec.y + src.m22 * vec.z; - dest.m33 += src.m03 * vec.x + src.m13 * vec.y + src.m23 * vec.z; - - return dest; - } - - /** - * Translate this matrix and stash the result in another matrix - * - * @param vec The vector to translate by - * @param dest The destination matrix or null if a new matrix is to be created - * @return the translated matrix - */ - public Matrix4f translate(Vector2f vec, Matrix4f dest) { - return translate(vec, this, dest); - } - - /** - * Translate the source matrix and stash the result in the destination matrix - * - * @param vec The vector to translate by - * @param src The source matrix - * @param dest The destination matrix or null if a new matrix is to be created - * @return The translated matrix - */ - public static Matrix4f translate(Vector2f vec, Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - - dest.m30 += src.m00 * vec.x + src.m10 * vec.y; - dest.m31 += src.m01 * vec.x + src.m11 * vec.y; - dest.m32 += src.m02 * vec.x + src.m12 * vec.y; - dest.m33 += src.m03 * vec.x + src.m13 * vec.y; - - return dest; - } - - /** - * Transpose this matrix and place the result in another matrix - * - * @param dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public Matrix4f transpose(Matrix4f dest) { - return transpose(this, dest); - } - - /** - * Transpose the source matrix and place the result in the destination matrix - * - * @param src The source matrix - * @param dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public static Matrix4f transpose(Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - float m00 = src.m00; - float m01 = src.m10; - float m02 = src.m20; - float m03 = src.m30; - float m10 = src.m01; - float m11 = src.m11; - float m12 = src.m21; - float m13 = src.m31; - float m20 = src.m02; - float m21 = src.m12; - float m22 = src.m22; - float m23 = src.m32; - float m30 = src.m03; - float m31 = src.m13; - float m32 = src.m23; - float m33 = src.m33; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m03 = m03; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m13 = m13; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - dest.m23 = m23; - dest.m30 = m30; - dest.m31 = m31; - dest.m32 = m32; - dest.m33 = m33; - - return dest; - } - - /** - * @return the determinant of the matrix - */ - public float determinant() { - float f = m00 * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) - m13 * m22 * m31 - - m11 * m23 * m32 - - m12 * m21 * m33); - f -= m01 * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) - m13 * m22 * m30 - - m10 * m23 * m32 - - m12 * m20 * m33); - f += m02 * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) - m13 * m21 * m30 - - m10 * m23 * m31 - - m11 * m20 * m33); - f -= m03 * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) - m12 * m21 * m30 - - m10 * m22 * m31 - - m11 * m20 * m32); - return f; - } - - /** - * Calculate the determinant of a 3x3 matrix - * - * @return result - */ - private static float determinant3x3(float t00, float t01, float t02, float t10, float t11, float t12, float t20, - float t21, float t22) { - return t00 * (t11 * t22 - t12 * t21) + t01 * (t12 * t20 - t10 * t22) + t02 * (t10 * t21 - t11 * t20); - } - - /** - * Invert this matrix - * - * @return this if successful, null otherwise - */ - public Matrix invert() { - return invert(this, this); - } - - /** - * Invert the source matrix and put the result in the destination - * - * @param src The source matrix - * @param dest The destination matrix, or null if a new matrix is to be created - * @return The inverted matrix if successful, null otherwise - */ - public static Matrix4f invert(Matrix4f src, Matrix4f dest) { - float determinant = src.determinant(); - - if (determinant != 0) { - /* - * m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33 - */ - if (dest == null) dest = new Matrix4f(); - float determinant_inv = 1f / determinant; - - // first row - float t00 = determinant3x3(src.m11, src.m12, src.m13, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); - float t01 = -determinant3x3( - src.m10, - src.m12, - src.m13, - src.m20, - src.m22, - src.m23, - src.m30, - src.m32, - src.m33); - float t02 = determinant3x3(src.m10, src.m11, src.m13, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); - float t03 = -determinant3x3( - src.m10, - src.m11, - src.m12, - src.m20, - src.m21, - src.m22, - src.m30, - src.m31, - src.m32); - // second row - float t10 = -determinant3x3( - src.m01, - src.m02, - src.m03, - src.m21, - src.m22, - src.m23, - src.m31, - src.m32, - src.m33); - float t11 = determinant3x3(src.m00, src.m02, src.m03, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); - float t12 = -determinant3x3( - src.m00, - src.m01, - src.m03, - src.m20, - src.m21, - src.m23, - src.m30, - src.m31, - src.m33); - float t13 = determinant3x3(src.m00, src.m01, src.m02, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); - // third row - float t20 = determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m31, src.m32, src.m33); - float t21 = -determinant3x3( - src.m00, - src.m02, - src.m03, - src.m10, - src.m12, - src.m13, - src.m30, - src.m32, - src.m33); - float t22 = determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m30, src.m31, src.m33); - float t23 = -determinant3x3( - src.m00, - src.m01, - src.m02, - src.m10, - src.m11, - src.m12, - src.m30, - src.m31, - src.m32); - // fourth row - float t30 = -determinant3x3( - src.m01, - src.m02, - src.m03, - src.m11, - src.m12, - src.m13, - src.m21, - src.m22, - src.m23); - float t31 = determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m20, src.m22, src.m23); - float t32 = -determinant3x3( - src.m00, - src.m01, - src.m03, - src.m10, - src.m11, - src.m13, - src.m20, - src.m21, - src.m23); - float t33 = determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m20, src.m21, src.m22); - - // transpose and divide by the determinant - dest.m00 = t00 * determinant_inv; - dest.m11 = t11 * determinant_inv; - dest.m22 = t22 * determinant_inv; - dest.m33 = t33 * determinant_inv; - dest.m01 = t10 * determinant_inv; - dest.m10 = t01 * determinant_inv; - dest.m20 = t02 * determinant_inv; - dest.m02 = t20 * determinant_inv; - dest.m12 = t21 * determinant_inv; - dest.m21 = t12 * determinant_inv; - dest.m03 = t30 * determinant_inv; - dest.m30 = t03 * determinant_inv; - dest.m13 = t31 * determinant_inv; - dest.m31 = t13 * determinant_inv; - dest.m32 = t23 * determinant_inv; - dest.m23 = t32 * determinant_inv; - return dest; - } else return null; - } - - /** - * Negate this matrix - * - * @return this - */ - public Matrix negate() { - return negate(this); - } - - /** - * Negate this matrix and place the result in a destination matrix. - * - * @param dest The destination matrix, or null if a new matrix is to be created - * @return the negated matrix - */ - public Matrix4f negate(Matrix4f dest) { - return negate(this, dest); - } - - /** - * Negate this matrix and place the result in a destination matrix. - * - * @param src The source matrix - * @param dest The destination matrix, or null if a new matrix is to be created - * @return The negated matrix - */ - public static Matrix4f negate(Matrix4f src, Matrix4f dest) { - if (dest == null) dest = new Matrix4f(); - - dest.m00 = -src.m00; - dest.m01 = -src.m01; - dest.m02 = -src.m02; - dest.m03 = -src.m03; - dest.m10 = -src.m10; - dest.m11 = -src.m11; - dest.m12 = -src.m12; - dest.m13 = -src.m13; - dest.m20 = -src.m20; - dest.m21 = -src.m21; - dest.m22 = -src.m22; - dest.m23 = -src.m23; - dest.m30 = -src.m30; - dest.m31 = -src.m31; - dest.m32 = -src.m32; - dest.m33 = -src.m33; - - return dest; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/Quaternion.java b/src/main/java/org/lwjgl/util/vector/Quaternion.java deleted file mode 100644 index 61808d57c..000000000 --- a/src/main/java/org/lwjgl/util/vector/Quaternion.java +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * - * Quaternions for LWJGL! - * - * @author fbi - * @version $Revision: 3418 $ $Id: Quaternion.java 3418 2010-09-28 21:11:35Z spasi $ - */ -import java.nio.FloatBuffer; - -public class Quaternion extends Vector implements ReadableVector4f { - - private static final long serialVersionUID = 1L; - - public float x, y, z, w; - - /** - * C'tor. The quaternion will be initialized to the identity. - */ - public Quaternion() { - super(); - setIdentity(); - } - - /** - * C'tor - * - * @param src - */ - public Quaternion(ReadableVector4f src) { - set(src); - } - - /** - * C'tor - * - */ - public Quaternion(float x, float y, float z, float w) { - set(x, y, z, w); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector3f#set(float, float, float) - */ - public void set(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector4f#set(float, float, float, float) - */ - public void set(float x, float y, float z, float w) { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } - - /** - * Load from another Vector4f - * - * @param src The source vector - * @return this - */ - public Quaternion set(ReadableVector4f src) { - x = src.getX(); - y = src.getY(); - z = src.getZ(); - w = src.getW(); - return this; - } - - /** - * Set this quaternion to the multiplication identity. - * - * @return this - */ - public Quaternion setIdentity() { - return setIdentity(this); - } - - /** - * Set the given quaternion to the multiplication identity. - * - * @param q The quaternion - * @return q - */ - public static Quaternion setIdentity(Quaternion q) { - q.x = 0; - q.y = 0; - q.z = 0; - q.w = 1; - return q; - } - - /** - * @return the length squared of the quaternion - */ - public float lengthSquared() { - return x * x + y * y + z * z + w * w; - } - - /** - * Normalise the source quaternion and place the result in another quaternion. - * - * @param src The source quaternion - * @param dest The destination quaternion, or null if a new quaternion is to be created - * @return The normalised quaternion - */ - public static Quaternion normalise(Quaternion src, Quaternion dest) { - float inv_l = 1f / src.length(); - - if (dest == null) dest = new Quaternion(); - - dest.set(src.x * inv_l, src.y * inv_l, src.z * inv_l, src.w * inv_l); - - return dest; - } - - /** - * Normalise this quaternion and place the result in another quaternion. - * - * @param dest The destination quaternion, or null if a new quaternion is to be created - * @return the normalised quaternion - */ - public Quaternion normalise(Quaternion dest) { - return normalise(this, dest); - } - - /** - * The dot product of two quaternions - * - * @param left The LHS quat - * @param right The RHS quat - * @return left dot right - */ - public static float dot(Quaternion left, Quaternion right) { - return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; - } - - /** - * Calculate the conjugate of this quaternion and put it into the given one - * - * @param dest The quaternion which should be set to the conjugate of this quaternion - */ - public Quaternion negate(Quaternion dest) { - return negate(this, dest); - } - - /** - * Calculate the conjugate of this quaternion and put it into the given one - * - * @param src The source quaternion - * @param dest The quaternion which should be set to the conjugate of this quaternion - */ - public static Quaternion negate(Quaternion src, Quaternion dest) { - if (dest == null) dest = new Quaternion(); - - dest.x = -src.x; - dest.y = -src.y; - dest.z = -src.z; - dest.w = src.w; - - return dest; - } - - /** - * Calculate the conjugate of this quaternion - */ - public Vector negate() { - return negate(this, this); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.Vector#load(java.nio.FloatBuffer) - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - z = buf.get(); - w = buf.get(); - return this; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - return scale(scale, this, this); - } - - /** - * Scale the source quaternion by scale and put the result in the destination - * - * @param scale The amount to scale by - * @param src The source quaternion - * @param dest The destination quaternion, or null if a new quaternion is to be created - * @return The scaled quaternion - */ - public static Quaternion scale(float scale, Quaternion src, Quaternion dest) { - if (dest == null) dest = new Quaternion(); - dest.x = src.x * scale; - dest.y = src.y * scale; - dest.z = src.z * scale; - dest.w = src.w * scale; - return dest; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.ReadableVector#store(java.nio.FloatBuffer) - */ - public Vector store(FloatBuffer buf) { - buf.put(x); - buf.put(y); - buf.put(z); - buf.put(w); - - return this; - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - /** - * Set Z - * - * @param z - */ - public void setZ(float z) { - this.z = z; - } - - /* - * (Overrides) - * @see org.lwjgl3.vector.ReadableVector3f#getZ() - */ - public float getZ() { - return z; - } - - /** - * Set W - * - * @param w - */ - public void setW(float w) { - this.w = w; - } - - /* - * (Overrides) - * @see org.lwjgl3.vector.ReadableVector3f#getW() - */ - public float getW() { - return w; - } - - public String toString() { - return "Quaternion: " + x + " " + y + " " + z + " " + w; - } - - /** - * Sets the value of this quaternion to the quaternion product of quaternions left and right (this = left * right). - * Note that this is safe for aliasing (e.g. this can be left or right). - * - * @param left the first quaternion - * @param right the second quaternion - */ - public static Quaternion mul(Quaternion left, Quaternion right, Quaternion dest) { - if (dest == null) dest = new Quaternion(); - dest.set( - left.x * right.w + left.w * right.x + left.y * right.z - left.z * right.y, - left.y * right.w + left.w * right.y + left.z * right.x - left.x * right.z, - left.z * right.w + left.w * right.z + left.x * right.y - left.y * right.x, - left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z); - return dest; - } - - /** - * - * Multiplies quaternion left by the inverse of quaternion right and places the value into this quaternion. The - * value of both argument quaternions is preservered (this = left * right^-1). - * - * @param left the left quaternion - * @param right the right quaternion - */ - public static Quaternion mulInverse(Quaternion left, Quaternion right, Quaternion dest) { - float n = right.lengthSquared(); - // zero-div may occur. - n = (n == 0.0 ? n : 1 / n); - // store on stack once for aliasing-safty - if (dest == null) dest = new Quaternion(); - dest.set( - (left.x * right.w - left.w * right.x - left.y * right.z + left.z * right.y) * n, - (left.y * right.w - left.w * right.y - left.z * right.x + left.x * right.z) * n, - (left.z * right.w - left.w * right.z - left.x * right.y + left.y * right.x) * n, - (left.w * right.w + left.x * right.x + left.y * right.y + left.z * right.z) * n); - - return dest; - } - - /** - * Sets the value of this quaternion to the equivalent rotation of the Axis-Angle argument. - * - * @param a1 the axis-angle: (x,y,z) is the axis and w is the angle - */ - public final void setFromAxisAngle(Vector4f a1) { - x = a1.x; - y = a1.y; - z = a1.z; - float n = (float) Math.sqrt(x * x + y * y + z * z); - // zero-div may occur. - float s = (float) (Math.sin(0.5 * a1.w) / n); - x *= s; - y *= s; - z *= s; - w = (float) Math.cos(0.5 * a1.w); - } - - /** - * Sets the value of this quaternion using the rotational component of the passed matrix. - * - * @param m The matrix - * @return this - */ - public final Quaternion setFromMatrix(Matrix4f m) { - return setFromMatrix(m, this); - } - - /** - * Sets the value of the source quaternion using the rotational component of the passed matrix. - * - * @param m The source matrix - * @param q The destination quaternion, or null if a new quaternion is to be created - * @return q - */ - public static Quaternion setFromMatrix(Matrix4f m, Quaternion q) { - return q.setFromMat(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, m.m21, m.m22); - } - - /** - * Sets the value of this quaternion using the rotational component of the passed matrix. - * - * @param m The source matrix - */ - public final Quaternion setFromMatrix(Matrix3f m) { - return setFromMatrix(m, this); - } - - /** - * Sets the value of the source quaternion using the rotational component of the passed matrix. - * - * @param m The source matrix - * @param q The destination quaternion, or null if a new quaternion is to be created - * @return q - */ - public static Quaternion setFromMatrix(Matrix3f m, Quaternion q) { - return q.setFromMat(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, m.m21, m.m22); - } - - /** - * Private method to perform the matrix-to-quaternion conversion - */ - private Quaternion setFromMat(float m00, float m01, float m02, float m10, float m11, float m12, float m20, - float m21, float m22) { - - float s; - float tr = m00 + m11 + m22; - if (tr >= 0.0) { - s = (float) Math.sqrt(tr + 1.0); - w = s * 0.5f; - s = 0.5f / s; - x = (m21 - m12) * s; - y = (m02 - m20) * s; - z = (m10 - m01) * s; - } else { - float max = Math.max(Math.max(m00, m11), m22); - if (max == m00) { - s = (float) Math.sqrt(m00 - (m11 + m22) + 1.0); - x = s * 0.5f; - s = 0.5f / s; - y = (m01 + m10) * s; - z = (m20 + m02) * s; - w = (m21 - m12) * s; - } else if (max == m11) { - s = (float) Math.sqrt(m11 - (m22 + m00) + 1.0); - y = s * 0.5f; - s = 0.5f / s; - z = (m12 + m21) * s; - x = (m01 + m10) * s; - w = (m02 - m20) * s; - } else { - s = (float) Math.sqrt(m22 - (m00 + m11) + 1.0); - z = s * 0.5f; - s = 0.5f / s; - x = (m20 + m02) * s; - y = (m12 + m21) * s; - w = (m10 - m01) * s; - } - } - return this; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/ReadableVector.java b/src/main/java/org/lwjgl/util/vector/ReadableVector.java deleted file mode 100644 index 7c07051c6..000000000 --- a/src/main/java/org/lwjgl/util/vector/ReadableVector.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.nio.FloatBuffer; - -/** - * @author foo - */ -public interface ReadableVector { - - /** - * @return the length of the vector - */ - float length(); - - /** - * @return the length squared of the vector - */ - float lengthSquared(); - - /** - * Store this vector in a FloatBuffer - * - * @param buf The buffer to store it in, at the current position - * @return this - */ - Vector store(FloatBuffer buf); -} diff --git a/src/main/java/org/lwjgl/util/vector/ReadableVector2f.java b/src/main/java/org/lwjgl/util/vector/ReadableVector2f.java deleted file mode 100644 index 744fa0220..000000000 --- a/src/main/java/org/lwjgl/util/vector/ReadableVector2f.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * @author foo - */ -public interface ReadableVector2f extends ReadableVector { - - /** - * @return x - */ - float getX(); - - /** - * @return y - */ - float getY(); -} diff --git a/src/main/java/org/lwjgl/util/vector/ReadableVector3f.java b/src/main/java/org/lwjgl/util/vector/ReadableVector3f.java deleted file mode 100644 index 4a7599c30..000000000 --- a/src/main/java/org/lwjgl/util/vector/ReadableVector3f.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * @author foo - */ -public interface ReadableVector3f extends ReadableVector2f { - - /** - * @return z - */ - float getZ(); -} diff --git a/src/main/java/org/lwjgl/util/vector/ReadableVector4f.java b/src/main/java/org/lwjgl/util/vector/ReadableVector4f.java deleted file mode 100644 index 9f30643e6..000000000 --- a/src/main/java/org/lwjgl/util/vector/ReadableVector4f.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * @author foo - */ -public interface ReadableVector4f extends ReadableVector3f { - - /** - * @return w - */ - float getW(); -} diff --git a/src/main/java/org/lwjgl/util/vector/Vector.java b/src/main/java/org/lwjgl/util/vector/Vector.java deleted file mode 100644 index e04ecd258..000000000 --- a/src/main/java/org/lwjgl/util/vector/Vector.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Base class for vectors. - * - * @author cix_foo - * @version $Revision: 3418 $ $Id: Vector.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public abstract class Vector implements Serializable, ReadableVector { - - /** - * Constructor for Vector. - */ - protected Vector() { - super(); - } - - /** - * @return the length of the vector - */ - public final float length() { - return (float) Math.sqrt(lengthSquared()); - } - - /** - * @return the length squared of the vector - */ - public abstract float lengthSquared(); - - /** - * Load this vector from a FloatBuffer - * - * @param buf The buffer to load it from, at the current position - * @return this - */ - public abstract Vector load(FloatBuffer buf); - - /** - * Negate a vector - * - * @return this - */ - public abstract Vector negate(); - - /** - * Normalise this vector - * - * @return this - */ - public final Vector normalise() { - float len = length(); - if (len != 0.0f) { - float l = 1.0f / len; - return scale(l); - } else throw new IllegalStateException("Zero length vector"); - } - - /** - * Store this vector in a FloatBuffer - * - * @param buf The buffer to store it in, at the current position - * @return this - */ - public abstract Vector store(FloatBuffer buf); - - /** - * Scale this vector - * - * @param scale The scale factor - * @return this - */ - public abstract Vector scale(float scale); -} diff --git a/src/main/java/org/lwjgl/util/vector/Vector2f.java b/src/main/java/org/lwjgl/util/vector/Vector2f.java deleted file mode 100644 index 5880a5a4a..000000000 --- a/src/main/java/org/lwjgl/util/vector/Vector2f.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 2-tuple vector. - * - * @author cix_foo - * @version $Revision: 3418 $ $Id: Vector2f.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public class Vector2f extends Vector implements Serializable, ReadableVector2f, WritableVector2f { - - private static final long serialVersionUID = 1L; - - public float x, y; - - /** - * Constructor for Vector3f. - */ - public Vector2f() { - super(); - } - - /** - * Constructor - */ - public Vector2f(ReadableVector2f src) { - set(src); - } - - /** - * Constructor - */ - public Vector2f(float x, float y) { - set(x, y); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /** - * Load from another Vector2f - * - * @param src The source vector - * @return this - */ - public Vector2f set(ReadableVector2f src) { - x = src.getX(); - y = src.getY(); - return this; - } - - /** - * @return the length squared of the vector - */ - public float lengthSquared() { - return x * x + y * y; - } - - /** - * Translate a vector - * - * @param x The translation in x - * @param y the translation in y - * @return this - */ - public Vector2f translate(float x, float y) { - this.x += x; - this.y += y; - return this; - } - - /** - * Negate a vector - * - * @return this - */ - public Vector negate() { - x = -x; - y = -y; - return this; - } - - /** - * Negate a vector and place the result in a destination vector. - * - * @param dest The destination vector or null if a new vector is to be created - * @return the negated vector - */ - public Vector2f negate(Vector2f dest) { - if (dest == null) dest = new Vector2f(); - dest.x = -x; - dest.y = -y; - return dest; - } - - /** - * Normalise this vector and place the result in another vector. - * - * @param dest The destination vector, or null if a new vector is to be created - * @return the normalised vector - */ - public Vector2f normalise(Vector2f dest) { - float l = length(); - - if (dest == null) dest = new Vector2f(x / l, y / l); - else dest.set(x / l, y / l); - - return dest; - } - - /** - * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z - * - * @param left The LHS vector - * @param right The RHS vector - * @return left dot right - */ - public static float dot(Vector2f left, Vector2f right) { - return left.x * right.x + left.y * right.y; - } - - /** - * Calculate the angle between two vectors, in radians - * - * @param a A vector - * @param b The other vector - * @return the angle between the two vectors, in radians - */ - public static float angle(Vector2f a, Vector2f b) { - float dls = dot(a, b) / (a.length() * b.length()); - if (dls < -1f) dls = -1f; - else if (dls > 1.0f) dls = 1.0f; - return (float) Math.acos(dls); - } - - /** - * Add a vector to another vector and place the result in a destination vector. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created - * @return the sum of left and right in dest - */ - public static Vector2f add(Vector2f left, Vector2f right, Vector2f dest) { - if (dest == null) return new Vector2f(left.x + right.x, left.y + right.y); - else { - dest.set(left.x + right.x, left.y + right.y); - return dest; - } - } - - /** - * Subtract a vector from another vector and place the result in a destination vector. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created - * @return left minus right in dest - */ - public static Vector2f sub(Vector2f left, Vector2f right, Vector2f dest) { - if (dest == null) return new Vector2f(left.x - right.x, left.y - right.y); - else { - dest.set(left.x - right.x, left.y - right.y); - return dest; - } - } - - /** - * Store this vector in a FloatBuffer - * - * @param buf The buffer to store it in, at the current position - * @return this - */ - public Vector store(FloatBuffer buf) { - buf.put(x); - buf.put(y); - return this; - } - - /** - * Load this vector from a FloatBuffer - * - * @param buf The buffer to load it from, at the current position - * @return this - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - return this; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - - x *= scale; - y *= scale; - - return this; - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() { - StringBuilder sb = new StringBuilder(64); - - sb.append("Vector2f["); - sb.append(x); - sb.append(", "); - sb.append(y); - sb.append(']'); - return sb.toString(); - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * - * @param y - */ - public final void setY(float y) { - this.y = y; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/Vector3f.java b/src/main/java/org/lwjgl/util/vector/Vector3f.java deleted file mode 100644 index c10475536..000000000 --- a/src/main/java/org/lwjgl/util/vector/Vector3f.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 3-tuple vector. - * - * @author cix_foo - * @version $Revision: 3418 $ $Id: Vector3f.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public class Vector3f extends Vector implements Serializable, ReadableVector3f, WritableVector3f { - - private static final long serialVersionUID = 1L; - - public float x, y, z; - - /** - * Constructor for Vector3f. - */ - public Vector3f() { - super(); - } - - /** - * Constructor - */ - public Vector3f(ReadableVector3f src) { - set(src); - } - - /** - * Constructor - */ - public Vector3f(float x, float y, float z) { - set(x, y, z); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector3f#set(float, float, float) - */ - public void set(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - /** - * Load from another Vector3f - * - * @param src The source vector - * @return this - */ - public Vector3f set(ReadableVector3f src) { - x = src.getX(); - y = src.getY(); - z = src.getZ(); - return this; - } - - /** - * @return the length squared of the vector - */ - public float lengthSquared() { - return x * x + y * y + z * z; - } - - /** - * Translate a vector - * - * @param x The translation in x - * @param y the translation in y - * @return this - */ - public Vector3f translate(float x, float y, float z) { - this.x += x; - this.y += y; - this.z += z; - return this; - } - - /** - * Add a vector to another vector and place the result in a destination vector. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created - * @return the sum of left and right in dest - */ - public static Vector3f add(Vector3f left, Vector3f right, Vector3f dest) { - if (dest == null) return new Vector3f(left.x + right.x, left.y + right.y, left.z + right.z); - else { - dest.set(left.x + right.x, left.y + right.y, left.z + right.z); - return dest; - } - } - - /** - * Subtract a vector from another vector and place the result in a destination vector. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created - * @return left minus right in dest - */ - public static Vector3f sub(Vector3f left, Vector3f right, Vector3f dest) { - if (dest == null) return new Vector3f(left.x - right.x, left.y - right.y, left.z - right.z); - else { - dest.set(left.x - right.x, left.y - right.y, left.z - right.z); - return dest; - } - } - - /** - * The cross product of two vectors. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination result, or null if a new vector is to be created - * @return left cross right - */ - public static Vector3f cross(Vector3f left, Vector3f right, Vector3f dest) { - - if (dest == null) dest = new Vector3f(); - - dest.set( - left.y * right.z - left.z * right.y, - right.x * left.z - right.z * left.x, - left.x * right.y - left.y * right.x); - - return dest; - } - - /** - * Negate a vector - * - * @return this - */ - public Vector negate() { - x = -x; - y = -y; - z = -z; - return this; - } - - /** - * Negate a vector and place the result in a destination vector. - * - * @param dest The destination vector or null if a new vector is to be created - * @return the negated vector - */ - public Vector3f negate(Vector3f dest) { - if (dest == null) dest = new Vector3f(); - dest.x = -x; - dest.y = -y; - dest.z = -z; - return dest; - } - - /** - * Normalise this vector and place the result in another vector. - * - * @param dest The destination vector, or null if a new vector is to be created - * @return the normalised vector - */ - public Vector3f normalise(Vector3f dest) { - float l = length(); - - if (dest == null) dest = new Vector3f(x / l, y / l, z / l); - else dest.set(x / l, y / l, z / l); - - return dest; - } - - /** - * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z - * - * @param left The LHS vector - * @param right The RHS vector - * @return left dot right - */ - public static float dot(Vector3f left, Vector3f right) { - return left.x * right.x + left.y * right.y + left.z * right.z; - } - - /** - * Calculate the angle between two vectors, in radians - * - * @param a A vector - * @param b The other vector - * @return the angle between the two vectors, in radians - */ - public static float angle(Vector3f a, Vector3f b) { - float dls = dot(a, b) / (a.length() * b.length()); - if (dls < -1f) dls = -1f; - else if (dls > 1.0f) dls = 1.0f; - return (float) Math.acos(dls); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#load(FloatBuffer) - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - z = buf.get(); - return this; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - - x *= scale; - y *= scale; - z *= scale; - - return this; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#store(FloatBuffer) - */ - public Vector store(FloatBuffer buf) { - - buf.put(x); - buf.put(y); - buf.put(z); - - return this; - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() { - StringBuilder sb = new StringBuilder(64); - - sb.append("Vector3f["); - sb.append(x); - sb.append(", "); - sb.append(y); - sb.append(", "); - sb.append(z); - sb.append(']'); - return sb.toString(); - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - /** - * Set Z - * - * @param z - */ - public void setZ(float z) { - this.z = z; - } - - /* - * (Overrides) - * @see org.lwjgl3.vector.ReadableVector3f#getZ() - */ - public float getZ() { - return z; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/Vector4f.java b/src/main/java/org/lwjgl/util/vector/Vector4f.java deleted file mode 100644 index aa30cb48e..000000000 --- a/src/main/java/org/lwjgl/util/vector/Vector4f.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 4-tuple vector. - * - * @author cix_foo - * @version $Revision: 2983 $ $Id: Vector4f.java 2983 2008-04-07 18:36:09Z matzon $ - */ -public class Vector4f extends Vector implements Serializable, ReadableVector4f, WritableVector4f { - - private static final long serialVersionUID = 1L; - - public float x, y, z, w; - - /** - * Constructor for Vector4f. - */ - public Vector4f() { - super(); - } - - /** - * Constructor - */ - public Vector4f(ReadableVector4f src) { - set(src); - } - - /** - * Constructor - */ - public Vector4f(float x, float y, float z, float w) { - set(x, y, z, w); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector3f#set(float, float, float) - */ - public void set(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.util.vector.WritableVector4f#set(float, float, float, float) - */ - public void set(float x, float y, float z, float w) { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } - - /** - * Load from another Vector4f - * - * @param src The source vector - * @return this - */ - public Vector4f set(ReadableVector4f src) { - x = src.getX(); - y = src.getY(); - z = src.getZ(); - w = src.getW(); - return this; - } - - /** - * @return the length squared of the vector - */ - public float lengthSquared() { - return x * x + y * y + z * z + w * w; - } - - /** - * Translate a vector - * - * @param x The translation in x - * @param y the translation in y - * @return this - */ - public Vector4f translate(float x, float y, float z, float w) { - this.x += x; - this.y += y; - this.z += z; - this.w += w; - return this; - } - - /** - * Add a vector to another vector and place the result in a destination vector. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created - * @return the sum of left and right in dest - */ - public static Vector4f add(Vector4f left, Vector4f right, Vector4f dest) { - if (dest == null) return new Vector4f(left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w); - else { - dest.set(left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w); - return dest; - } - } - - /** - * Subtract a vector from another vector and place the result in a destination vector. - * - * @param left The LHS vector - * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created - * @return left minus right in dest - */ - public static Vector4f sub(Vector4f left, Vector4f right, Vector4f dest) { - if (dest == null) return new Vector4f(left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w); - else { - dest.set(left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w); - return dest; - } - } - - /** - * Negate a vector - * - * @return this - */ - public Vector negate() { - x = -x; - y = -y; - z = -z; - w = -w; - return this; - } - - /** - * Negate a vector and place the result in a destination vector. - * - * @param dest The destination vector or null if a new vector is to be created - * @return the negated vector - */ - public Vector4f negate(Vector4f dest) { - if (dest == null) dest = new Vector4f(); - dest.x = -x; - dest.y = -y; - dest.z = -z; - dest.w = -w; - return dest; - } - - /** - * Normalise this vector and place the result in another vector. - * - * @param dest The destination vector, or null if a new vector is to be created - * @return the normalised vector - */ - public Vector4f normalise(Vector4f dest) { - float l = length(); - - if (dest == null) dest = new Vector4f(x / l, y / l, z / l, w / l); - else dest.set(x / l, y / l, z / l, w / l); - - return dest; - } - - /** - * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w - * - * @param left The LHS vector - * @param right The RHS vector - * @return left dot right - */ - public static float dot(Vector4f left, Vector4f right) { - return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; - } - - /** - * Calculate the angle between two vectors, in radians - * - * @param a A vector - * @param b The other vector - * @return the angle between the two vectors, in radians - */ - public static float angle(Vector4f a, Vector4f b) { - float dls = dot(a, b) / (a.length() * b.length()); - if (dls < -1f) dls = -1f; - else if (dls > 1.0f) dls = 1.0f; - return (float) Math.acos(dls); - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#load(FloatBuffer) - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - z = buf.get(); - w = buf.get(); - return this; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - x *= scale; - y *= scale; - z *= scale; - w *= scale; - return this; - } - - /* - * (non-Javadoc) - * @see org.lwjgl3.vector.Vector#store(FloatBuffer) - */ - public Vector store(FloatBuffer buf) { - - buf.put(x); - buf.put(y); - buf.put(z); - buf.put(w); - - return this; - } - - public String toString() { - return "Vector4f: " + x + " " + y + " " + z + " " + w; - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - /** - * Set Z - * - * @param z - */ - public void setZ(float z) { - this.z = z; - } - - /* - * (Overrides) - * @see org.lwjgl3.vector.ReadableVector3f#getZ() - */ - public float getZ() { - return z; - } - - /** - * Set W - * - * @param w - */ - public void setW(float w) { - this.w = w; - } - - /* - * (Overrides) - * @see org.lwjgl3.vector.ReadableVector3f#getZ() - */ - public float getW() { - return w; - } -} diff --git a/src/main/java/org/lwjgl/util/vector/WritableVector2f.java b/src/main/java/org/lwjgl/util/vector/WritableVector2f.java deleted file mode 100644 index 9193bfdf2..000000000 --- a/src/main/java/org/lwjgl/util/vector/WritableVector2f.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * Writable interface to Vector2fs - * - * @author $author$ - * @version $revision$ $Id: WritableVector2f.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public interface WritableVector2f { - - /** - * Set the X value - * - * @param x - */ - void setX(float x); - - /** - * Set the Y value - * - * @param y - */ - void setY(float y); - - /** - * Set the X,Y values - * - * @param x - * @param y - */ - void set(float x, float y); -} diff --git a/src/main/java/org/lwjgl/util/vector/WritableVector3f.java b/src/main/java/org/lwjgl/util/vector/WritableVector3f.java deleted file mode 100644 index bb94f7e39..000000000 --- a/src/main/java/org/lwjgl/util/vector/WritableVector3f.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * Writable interface to Vector3fs - * - * @author $author$ - * @version $revision$ $Id: WritableVector3f.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public interface WritableVector3f extends WritableVector2f { - - /** - * Set the Z value - * - * @param z - */ - void setZ(float z); - - /** - * Set the X,Y,Z values - * - * @param x - * @param y - * @param z - */ - void set(float x, float y, float z); -} diff --git a/src/main/java/org/lwjgl/util/vector/WritableVector4f.java b/src/main/java/org/lwjgl/util/vector/WritableVector4f.java deleted file mode 100644 index d7289f18d..000000000 --- a/src/main/java/org/lwjgl/util/vector/WritableVector4f.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project 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. * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived from this software without specific prior written - * permission. 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 OWNER 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.lwjgl.util.vector; - -/** - * Writable interface to Vector4fs - * - * @author $author$ - * @version $revision$ $Id: WritableVector4f.java 3418 2010-09-28 21:11:35Z spasi $ - */ -public interface WritableVector4f extends WritableVector3f { - - /** - * Set the W value - * - * @param w - */ - void setW(float w); - - /** - * Set the X,Y,Z,W values - * - * @param x - * @param y - * @param z - * @param w - */ - void set(float x, float y, float z, float w); -} diff --git a/src/main/java/zone/rong/mixinbooter/Context.java b/src/main/java/zone/rong/mixinbooter/Context.java new file mode 100644 index 000000000..d1a9fa716 --- /dev/null +++ b/src/main/java/zone/rong/mixinbooter/Context.java @@ -0,0 +1,81 @@ +package zone.rong.mixinbooter; + +import net.minecraft.launchwrapper.Launch; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.FMLLaunchHandler; + +import java.util.Collection; + +/** + * This class contains loading context for callers + * + * + * @since 10.0 + * @deprecated We forked Mixin. + *
New approach: + * Check Fugue.
+ * Summary:
+ * If you are coremod, just call {@link org.spongepowered.asm.mixin.Mixins#addConfigurations(String...)} in loadingPluging or Tweaker, and handle shouldApply in IMixinConfigPlugin
+ * If you aren't coremod:
+ * Group mixins by phase, add target env in config, use @env(MOD) for mod mixins.
+ * Add {"MixinConfigs": "modid.mod.mixin.json,modid.default.mixin.json"} to your jar manifest.
+ * Handle shouldApply in IMixinConfigPlugin. You can call {@link net.minecraftforge.fml.common.Loader#isModLoaded(String)} for {@link org.spongepowered.asm.mixin.MixinEnvironment.Phase#MOD} mixin.
+ * Recommend to group target mod name by package name. You can also get config instance from {@link org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin#injectConfig(org.spongepowered.asm.mixin.transformer.Config)}. + */ +@Deprecated +public final class Context { + + public enum ModLoader { + FORGE, + CLEANROOM; + } + + private final String mixinConfig; + private final Collection presentMods; + + public Context(String mixinConfigIn, Collection presentModsIn) { + this.mixinConfig = mixinConfigIn; + this.presentMods = presentModsIn; + } + + public Context(String mixinConfigIn) { + this(mixinConfigIn, null); + } + + /** + * @return the current mod loader + */ + public ModLoader modLoader() { + return ModLoader.CLEANROOM; + } + + /** + * @return if the current environment is in-dev + */ + public boolean inDev() { + return FMLLaunchHandler.isDeobfuscatedEnvironment(); + } + + /** + * @return name of the mixin config that is currently being processed + */ + public String mixinConfig() { + return mixinConfig; + } + + /** + *

For early contexts, the list of mods are gathered from culling the classloader + * for any jars that has the mcmod.info file. The mod IDs are obtained from the mcmod.info file. + * This means mostly, if not only coremods are queryable here, + * make sure to test a normal mod's existence in your mixin plugin or in the mixin itself.

+ * + *

For late contexts, it comes from {@link net.minecraftforge.fml.common.Loader#getActiveModList} + * akin to {@link net.minecraftforge.fml.common.Loader#isModLoaded(String)}

+ * @param modId to check against the list of present mods in the context + * @return whether the mod is present + */ + public boolean isModPresent(String modId) { + return presentMods == null ? Loader.isModLoaded(modId) : presentMods.contains(modId); + } + +} \ No newline at end of file diff --git a/src/main/java/zone/rong/mixinbooter/IEarlyMixinLoader.java b/src/main/java/zone/rong/mixinbooter/IEarlyMixinLoader.java index 25f0502fc..34f49259b 100644 --- a/src/main/java/zone/rong/mixinbooter/IEarlyMixinLoader.java +++ b/src/main/java/zone/rong/mixinbooter/IEarlyMixinLoader.java @@ -1,10 +1,6 @@ package zone.rong.mixinbooter; import java.util.List; -import org.spongepowered.asm.mixin.MixinEnvironment.Phase; -import net.minecraftforge.fml.common.Loader; -import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; -import org.spongepowered.asm.mixin.transformer.Config; /** * @deprecated We forked Mixin. @@ -15,8 +11,8 @@ * If you aren't coremod:
* Group mixins by phase, add target env in config, use @env(MOD) for mod mixins.
* Add {"MixinConfigs": "modid.mod.mixin.json,modid.default.mixin.json"} to your jar manifest.
- * Handle shouldApply in IMixinConfigPlugin. You can call {@link Loader#isModLoaded(String)} for {@link Phase#MOD} mixin.
- * Recommend to group target mod name by package name. You can also get config instance from {@link IMixinConfigPlugin#injectConfig(Config)}. + * Handle shouldApply in IMixinConfigPlugin. You can call {@link net.minecraftforge.fml.common.Loader#isModLoaded(String)} for {@link org.spongepowered.asm.mixin.MixinEnvironment.Phase#MOD} mixin.
+ * Recommend to group target mod name by package name. You can also get config instance from {@link org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin#injectConfig(org.spongepowered.asm.mixin.transformer.Config)}. */ @Deprecated public interface IEarlyMixinLoader { @@ -26,6 +22,17 @@ public interface IEarlyMixinLoader { */ List getMixinConfigs(); + /** + * Runs when a mixin config is successfully queued and sent to Mixin library. + * + * @since 10.0 + * @param context current context of the loading process. + * @return true if the mixinConfig should be queued, false if it should not. + */ + default boolean shouldMixinConfigQueue(Context context) { + return this.shouldMixinConfigQueue(context.mixinConfig()); + } + /** * Runs when a mixin config is successfully queued and sent to Mixin library. * @@ -36,10 +43,18 @@ default boolean shouldMixinConfigQueue(String mixinConfig) { return true; } + /** + * Runs when a mixin config is successfully queued and sent to Mixin library. + * @since 10.0 + * @param context current context of the loading process. + */ + default void onMixinConfigQueued(Context context) { + this.onMixinConfigQueued(context.mixinConfig()); + } + /** * Runs when a mixin config is successfully queued and sent to Mixin library. * @param mixinConfig mixin config name, queried via {@link IEarlyMixinLoader#getMixinConfigs()}. */ default void onMixinConfigQueued(String mixinConfig) { } - } diff --git a/src/main/java/zone/rong/mixinbooter/ILateMixinLoader.java b/src/main/java/zone/rong/mixinbooter/ILateMixinLoader.java index a2f30b437..f774b2499 100644 --- a/src/main/java/zone/rong/mixinbooter/ILateMixinLoader.java +++ b/src/main/java/zone/rong/mixinbooter/ILateMixinLoader.java @@ -1,10 +1,5 @@ package zone.rong.mixinbooter; -import net.minecraftforge.fml.common.Loader; -import org.spongepowered.asm.mixin.MixinEnvironment; -import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; -import org.spongepowered.asm.mixin.transformer.Config; - import java.util.List; /** @@ -12,12 +7,12 @@ *
New approach: * Check Fugue.
* Summary:
- * If you are coremod, just call {@link org.spongepowered.asm.mixin.Mixins#addConfigurations(String...)} in loadingPluging or Tweaker, and handle shouldApply in IMixinConfigPlugin
+ * If you are coremod, just call {@link org.spongepowered.asm.mixin.Mixins#addConfigurations(String...)} in loadingPlugin or Tweaker, and handle shouldApply in IMixinConfigPlugin
* If you aren't coremod:
* Group mixins by phase, add target env in config, use @env(MOD) for mod mixins.
* Add {"MixinConfigs": "modid.mod.mixin.json,modid.default.mixin.json"} to your jar manifest.
- * Handle shouldApply in IMixinConfigPlugin. You can call {@link Loader#isModLoaded(String)} for {@link MixinEnvironment.Phase#MOD} mixin.
- * Recommend to group target mod name by package name. You can also get config instance from {@link IMixinConfigPlugin#injectConfig(Config)}. + * Handle shouldApply in IMixinConfigPlugin. You can call {@link net.minecraftforge.fml.common.Loader#isModLoaded(String)} for {@link org.spongepowered.asm.mixin.MixinEnvironment.Phase#MOD} mixin.
+ * Recommend to group target mod name by package name. You can also get config instance from {@link org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin#injectConfig(org.spongepowered.asm.mixin.transformer.Config)}. */ @Deprecated public interface ILateMixinLoader { @@ -30,7 +25,18 @@ public interface ILateMixinLoader { /** * Runs when a mixin config is successfully queued and sent to Mixin library. * - * @param mixinConfig mixin config name, queried via {@link ILateMixinLoader#getMixinConfigs()}. + * @since 10.0 + * @param context current context of the loading process. + * @return true if the mixinConfig should be queued, false if it should not. + */ + default boolean shouldMixinConfigQueue(Context context) { + return this.shouldMixinConfigQueue(context.mixinConfig()); + } + + /** + * Runs when a mixin config is successfully queued and sent to Mixin library. + * + * @param mixinConfig mixin config name, queried via {@link IEarlyMixinLoader#getMixinConfigs()}. * @return true if the mixinConfig should be queued, false if it should not. */ default boolean shouldMixinConfigQueue(String mixinConfig) { @@ -39,7 +45,16 @@ default boolean shouldMixinConfigQueue(String mixinConfig) { /** * Runs when a mixin config is successfully queued and sent to Mixin library. - * @param mixinConfig mixin config name, queried via {@link ILateMixinLoader#getMixinConfigs()}. + * @since 10.0 + * @param context current context of the loading process. + */ + default void onMixinConfigQueued(Context context) { + this.onMixinConfigQueued(context.mixinConfig()); + } + + /** + * Runs when a mixin config is successfully queued and sent to Mixin library. + * @param mixinConfig mixin config name, queried via {@link IEarlyMixinLoader#getMixinConfigs()}. */ default void onMixinConfigQueued(String mixinConfig) { } diff --git a/src/main/java/zone/rong/mixinbooter/IMixinConfigHijacker.java b/src/main/java/zone/rong/mixinbooter/IMixinConfigHijacker.java new file mode 100644 index 000000000..2b9293323 --- /dev/null +++ b/src/main/java/zone/rong/mixinbooter/IMixinConfigHijacker.java @@ -0,0 +1,45 @@ +package zone.rong.mixinbooter; + +import java.util.Set; + +/** + * Hijackers are used to stop certain mixin configurations from ever being applied. + * Usage is similar to {@link IEarlyMixinLoader}, implement it in your coremod class. + * Requested by: @Desoroxxx + * + * @since 9.0 + * @deprecated We forked Mixin. + *
New approach: + * Check Fugue.
+ * Summary:
+ * If you are coremod, just call {@link org.spongepowered.asm.mixin.Mixins#addConfigurations(String...)} in loadingPlugin or Tweaker, and handle shouldApply in IMixinConfigPlugin
+ * If you aren't coremod:
+ * Group mixins by phase, add target env in config, use @env(MOD) for mod mixins.
+ * Add {"MixinConfigs": "modid.mod.mixin.json,modid.default.mixin.json"} to your jar manifest.
+ * Handle shouldApply in IMixinConfigPlugin. You can call {@link net.minecraftforge.fml.common.Loader#isModLoaded(String)} for {@link org.spongepowered.asm.mixin.MixinEnvironment.Phase#MOD} mixin.
+ * Recommend to group target mod name by package name. You can also get config instance from {@link org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin#injectConfig(org.spongepowered.asm.mixin.transformer.Config)}. + * + * If you what to block a mixin config, {@code GlobalProperties.get(GlobalProperties.Keys.CLEANROOM_DISABLE_MIXIN_CONFIGS)#add(String)} + */ + +@Deprecated +public interface IMixinConfigHijacker { + + /** + * Return a set of mixin config names to not be loaded by the mixin environment. + * + * @since 9.0 + */ + Set getHijackedMixinConfigs(); + + /** + * Return a set of mixin config names to not be loaded by the mixin environment. + * + * @since 10.3 + * @param context current context of the loading process. Mixin config will be null as it is not applicable. + */ + default Set getHijackedMixinConfigs(Context context) { + return getHijackedMixinConfigs(); + } + +} \ No newline at end of file diff --git a/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat b/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat new file mode 100644 index 000000000..dfc04a4ad Binary files /dev/null and b/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat differ diff --git a/src/main/resources/assets/forge/lang/en_pt.lang b/src/main/resources/assets/forge/lang/en_pt.lang new file mode 100644 index 000000000..abd7caa99 --- /dev/null +++ b/src/main/resources/assets/forge/lang/en_pt.lang @@ -0,0 +1,114 @@ +commands.forge.usage=Use /forge , ye landlubber! +commands.forge.usage.tracking=Use /forge track , matey! Valid types be "te" (Tile Entities). Time in seconds must be <= 60 or face Davy Jones' locker. +commands.forge.usage.help=Arr! Use help [command] t' see the usages for that command, ye scallywag! +commands.forge.tps.summary=%s : Mean tick time: %d ms. Mean TPS: %d. Don’t be wastin’ me time! +commands.forge.tps.usage=Use /forge tps [dimension] or walk the plank! +commands.forge.gen.usage=Use /forge gen [dimension] [interval], ye bilge rat! +commands.forge.gen.dim_fail=Failed t' load world fer dimension %d. Task sent t’ the deep! +commands.forge.gen.progress=Yarrr! Progress: %d/%d chunks +commands.forge.gen.complete=Ye finished makin’ %d new chunks (outta %d) in dimension %d. Well done, ye salty dog! +commands.forge.gen.start=Startin’ t' generate %d chunks around %d, %d in dimension %d. Avast ye! +commands.forge.entity.usage=Use /forge entity help fer more details on subcommands, ye scurvy knave! +commands.forge.entity.list.usage=Use /forge entity list [filter] [dim] t’ see details on entities, ye swab! +commands.forge.entity.list.invalid=Ye be usin’ an invalid filter. No entities match! Use /forge entity list fer help, ye lubber. +commands.forge.entity.list.invalidworld=Could not load world fer dimension %d. Better pick another one, matey! +commands.forge.entity.list.none=Nay entities found here! +commands.forge.entity.list.single.header=Entity: %s Total: %d scallywags +commands.forge.entity.list.multiple.header=Total scallywags: %d +commands.forge.setdim.usage=Use /forge setdim [ ] or ye’ll be marooned! +commands.forge.setdim.invalid.entity=That entity (%s) ain’t valid, ye bilge-sucking swab. +commands.forge.setdim.invalid.dim=Dimension ID %d be not valid either! +commands.forge.setdim.invalid.nochange=That entity (%s) be already in dimension %d, ye fool! +commands.forge.dimensions.usage=Use /forge dimensions or be keelhauled! +commands.forge.dimensions.list=Dimensions registered be: + +commands.forge.tracking.te.enabled=Tile Entity trackin’ be on fer %d seconds. +commands.forge.tracking.entity.enabled=Entity trackin’ be on fer %d seconds, matey! +commands.forge.tracking.usage=Use /forge track help fer more info on the trackin’ subcommands, savvy? +commands.forge.tracking.start.usage=Use /forge track start , ye scallywag! +commands.forge.tracking.reset.usage=Use /forge track reset if ye need a fresh start. +commands.forge.tracking.reset=All me timin’s data be cleared! +commands.forge.tracking.te.usage=Use /forge track te t’ keep track o' them tile entities! + +commands.forge.tracking.timingEntry=%s - %s [%d, %d, %d]: %s, by thunder! +commands.forge.tracking.noData=Nay data recorded yet, ye lazy dog! +commands.tree_base.invalid_cmd=Invalid subcommand '%s', ye scurvy dog! +commands.tree_base.invalid_cmd.list_subcommands=Arr! Invalid subcommand '%s'! Subcommands ye can use: %s +commands.tree_base.available_subcommands=SubCommands ye can use be: %s +forge.texture.preload.warning=Beware! Texture %s ain’t preloaded, and will cause renderin’ glitches, ye swab! +forge.client.shutdown.internal=Shuttin’ down internal server... All hands abandon ship! +forge.update.newversion=A new Cleanroom version be waitin’: %s +forge.update.beta.1=%sArrr! %sCleanroom Beta +forge.update.beta.2=Issues may arise, so check afore reportin’, ye scallywag! + +forge.configgui.forgeConfigTitle=Minecraft Forge Captain's Log +forge.configgui.ctgy.forgeGeneralConfig.tooltip=This be where ye can edit the settings contained in forge.cfg, matey. +forge.configgui.ctgy.forgeGeneralConfig=General Settings, hoist the colors! +forge.configgui.ctgy.forgeClientConfig.tooltip=Settings in the forge.cfg that only concern the local client. Usually graphical settings, arrr! +forge.configgui.ctgy.forgeClientConfig=Client Settings, ye scallywag! +forge.configgui.ctgy.forgeChunkLoadingConfig.tooltip=This be where ye can edit the settings contained in forgeChunkLoading.cfg. +forge.configgui.ctgy.forgeChunkLoadingConfig=Forge Chunk Loader Default Settings, savvy? +forge.configgui.ctgy.forgeChunkLoadingModConfig.tooltip=This be where ye can define mod-specific override settings that will be used instead of the defaults, me hearty. +forge.configgui.ctgy.forgeChunkLoadingModConfig=Mod Overrides, yarrr! +forge.configgui.ctgy.forgeChunkLoadingAddModConfig.tooltip=Allows ye to define mod-specific settings that will override the defaults, arrr! A value of zero in either entry effectively disables any chunkloading capabilities fer that mod. +forge.configgui.ctgy.forgeChunkLoadingAddModConfig=+ Add New Mod Override, hoist the sails! +forge.configgui.ctgy.VersionCheckConfig=Version Check Settings, ye salty sea dog! + +forge.configgui.biomeSkyBlendRange.tooltip=Control the range of sky blending fer colored skies in biomes, savvy? +forge.configgui.biomeSkyBlendRange=Biome Sky Blend Range, ho ho! +forge.configgui.clumpingThreshold.tooltip=Controls the number threshold at which Packet51 be preferred over Packet52, aye! +forge.configgui.clumpingThreshold=Packet Clumping Threshold, yarrr! +forge.configgui.disableVersionCheck.tooltip=Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server fer version information. Fer more details see the ForgeVersion class in our github, savvy? +forge.configgui.disableVersionCheck=Disable Forge Version Check, blow the man down! +forge.configgui.dimensionUnloadQueueDelay=Delay when unloading dimension, arrr! +forge.configgui.dimensionUnloadQueueDelay.tooltip=The time in ticks the server will wait until unloading a dimension. This can be useful when rapidly loading and unloading dimensions, like e.g. throwing items through a nether portal a few times per second, ye landlubber! +forge.configgui.enableGlobalConfig=Enable Global Config, ho ho! +forge.configgui.forceDuplicateFluidBlockCrash.tooltip=Set this to true to force a crash if more than one block attempts to link back to the same Fluid, savvy? +forge.configgui.forceDuplicateFluidBlockCrash=Force Dupe Fluid Block Crash, shiver me timbers! +forge.configgui.fullBoundingBoxLadders.tooltip=Set this to true to check the entire entity's collision bounding box fer ladders instead of just the block they be in. Causes noticeable differences in mechanics so default be vanilla behavior, me hearty. +forge.configgui.fullBoundingBoxLadders=Full Bounding Box Ladders, aye! +forge.configgui.removeErroringEntities.tooltip=Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE BE NOT RESPONSIBLE FER DAMAGES, savvy? +forge.configgui.removeErroringEntities=Remove Erroring Entities, ho ho! +forge.configgui.removeErroringTileEntities.tooltip=Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE BE NOT RESPONSIBLE FER DAMAGES, arrr! +forge.configgui.removeErroringTileEntities=Remove Erroring Tile Entities, yarrr! +forge.configgui.sortRecipies.tooltip=Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipes. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI, hoist the sails! +forge.configgui.sortRecipies=Sort Recipes, savvy? +forge.configgui.zombieBabyChance.tooltip=Chance that a zombie (or subclass) be a baby. Allows changing the zombie spawning mechanic, aye! +forge.configgui.zombieBabyChance=Zombie Baby Chance, ho ho! +forge.configgui.zombieBaseSummonChance.tooltip=Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic, ye landlubber! +forge.configgui.zombieBaseSummonChance=Zombie Summon Chance, yarrr! +forge.configgui.stencilbits=Enable GL Stencil Bits, savvy? +forge.configgui.replaceBuckets=Use Forge's bucket model, ho ho! +forge.configgui.forgeCloudsEnabled=Use Forge's cloud renderer, ye scallywag! +forge.configgui.forgeCloudsEnabled.tooltip=Enable uploading cloud geometry t' the GPU fer faster rendering, arrr! +forge.configgui.forgeLightPipelineEnabled=Forge Light Pipeline Enabled, ho ho! +forge.configgui.disableStairSlabCulling=Disable Stair/Slab culling, savvy? +forge.configgui.zoomInMissingModelTextInGui=Zoom in Missing model text in the GUI, blow the man down! +forge.configgui.saveConfig=Save Config, hoist the colors! +forge.configgui.loadConfig=Load Config, arrr! + +forge.configgui.forgeEnabled=Forge be enabled, matey! +forge.configgui.forgeDisabled=Forge be disabled, ye landlubber! +forge.configgui.rainbowText=Enable Rainbow Text, ho ho! +forge.configgui.betterLighting=Enable Better Lighting, savvy? +forge.configgui.advapi=Enable Advanced API, yo ho! +forge.configgui.advapi.tooltip=This enables advanced API features fer modders t' use, arrr! +forge.configgui.cullingEnabled=Enable Culling, ye scallywag! +forge.configgui.cullingEnabled.tooltip=Set to true t' enable the removal of unneeded faces, savvy? +forge.configgui.cullingAmount=Amount of faces t' cull, ho ho! +forge.configgui.cullingAmount.tooltip=Amount of faces t' cull from each side of a block, blow the man down! +forge.configgui.cullingSpeed=Speed of culling, ye salty sea dog! +forge.configgui.cullingSpeed.tooltip=Speed of culling of unneeded faces, yarrr! +forge.configgui.cullingMinSize=Minimum size fer culling, savvy? +forge.configgui.cullingMinSize.tooltip=The minimum size that must be met fer culling t' occur, ye landlubber! +forge.configgui.enableDebugRender=Enable Debug Rendering, ho ho! +forge.configgui.enableDebugRender.tooltip=Enable rendering of debug information, arrr! + +commands.forge.entity.teleport.usage=Use /forge entity teleport , me hearty! +commands.forge.entity.teleport.success=Entity %s has been teleported to coordinates (%d, %d, %d), hoist the sails! +commands.forge.entity.teleport.failure=Could not teleport entity %s, shiver me timbers! +commands.forge.entity.list.spawner.list=Available spawners, me hearty! +commands.forge.entity.list.spawner.none=No spawners found, blow the man down! + +commands.forge.tracking.timingEntrySet=%s - %s [%d, %d, %d]: %s, a fine entry! +commands.forge.tracking.timingEntryNotSet=No data has been recorded yet, ye scallywag! diff --git a/src/main/resources/assets/forge/lang/en_us.lang b/src/main/resources/assets/forge/lang/en_us.lang index 0bd27ee8f..af2b057c6 100644 --- a/src/main/resources/assets/forge/lang/en_us.lang +++ b/src/main/resources/assets/forge/lang/en_us.lang @@ -91,6 +91,8 @@ forge.configgui.allowEmissiveItems=Allow Emissive Item Rendering forge.configgui.allowEmissiveItems.tooltip=Allow item rendering to detect emissive quads and draw them properly. This allows glowing blocks to look the same in item form, but incurs a very slight performance hit. forge.configgui.selectiveResourceReloadEnabled=Enable Selective Resource Loading forge.configgui.selectiveResourceReloadEnabled.tooltip=When enabled, makes specific reload tasks such as language changing quicker to run. +forge.configgui.inputMethodGuiWhiteList=Input Method Gui White List +forge.configgui.inputMethodGuiWhiteList.tooltip=Classes in this list will be considered as input method suitable and allows input through IME. forge.configgui.hud.category=HUD Settings forge.configgui.hud.category.tooltip=Controls rendering of various HUD elements. @@ -239,6 +241,8 @@ fml.menu.modoptions=Mod Options... item.forge.bucketFilled.name=%s Bucket + +fml.messages.load.problem.found=Forge Mod Loader has found a problem with your minecraft installation fml.messages.mod.missing.dependencies=%s is missing mods it depends on. fml.messages.mod.missing.dependencies.fix=Include the following mods or remove %s. fml.messages.mod.missing.dependencies.compatibility=You must include the right dependencies for %s: diff --git a/src/main/resources/assets/forge/lang/zh_cn.lang b/src/main/resources/assets/forge/lang/zh_cn.lang index f9c3956eb..55d639586 100644 --- a/src/main/resources/assets/forge/lang/zh_cn.lang +++ b/src/main/resources/assets/forge/lang/zh_cn.lang @@ -91,6 +91,8 @@ forge.configgui.allowEmissiveItems=允许物品渲染发光效果 forge.configgui.allowEmissiveItems.tooltip=允许物品在渲染时检测并正确绘制带发光效果的纹理。启用此选项允许发光的方块的物品形态有和方块类似的发光效果,但会略微影响性能。 forge.configgui.selectiveResourceReloadEnabled=启用选择性资源加载 forge.configgui.selectiveResourceReloadEnabled.tooltip=启用此选项可令某些资源重载过程(例如语言切换)速度更快。 +forge.configgui.inputMethodGuiWhiteList=输入法Gui白名单 +forge.configgui.inputMethodGuiWhiteList.tooltip=列表中的类会被游戏视作可开启输入法输入。 forge.configgui.modID.tooltip=你想要定义设置覆盖的Mod ID。 forge.configgui.modID=Mod ID diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 184a9775c..553e415f8 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/log4j2_server.xml b/src/main/resources/log4j2_server.xml index 05215b10c..8e89520bb 100644 --- a/src/main/resources/log4j2_server.xml +++ b/src/main/resources/log4j2_server.xml @@ -1,5 +1,5 @@ - +