diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml deleted file mode 100644 index 110326e..0000000 --- a/.github/workflows/ant.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Java CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - shell: pwsh - working-directory: ${{ github.workspace }} - run: Get-ChildItem -Path .\ -Filter *.jar -Recurse -File -Name > jarfiles.txt - - shell: cmd - working-directory: ${{ github.workspace }} - run: ant -Dnb.internal.action.name=build jar - - shell: cmd - working-directory: ${{ github.workspace }} - run: | - mkdir dist\lib - for /F "tokens=*" %%A in (jarfiles.txt) do cp %%A dist\lib\%%~nxA - rm jarfiles.txt - - uses: actions/upload-artifact@v2.2.4 - with: - name: Build - path: | - ${{ github.workspace }}/dist - - if: github.ref == 'refs/heads/master' - shell: cmd - working-directory: ${{ github.workspace }}\dist - run: 7z a "${{ github.workspace }}\Whitehole.zip" *.* -r - - if: github.ref == 'refs/heads/master' - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "Auto" - prerelease: true - title: "Auto Build" - files: | - *.zip diff --git a/src/whitehole/editor/BcsvEditorForm.java b/src/whitehole/editor/BcsvEditorForm.java index 3031370..d73d7a5 100644 --- a/src/whitehole/editor/BcsvEditorForm.java +++ b/src/whitehole/editor/BcsvEditorForm.java @@ -40,25 +40,30 @@ public BcsvEditorForm() { } private void toggleShortcutVisibility() { - if (Whitehole.getCurrentGameType() == 1) { + boolean isSmg1 = Whitehole.getCurrentGameType() == 1; + + sep1.setVisible(!isSmg1); + mnuUseResource.setVisible(!isSmg1); + mnuAudio.setVisible(!isSmg1); + mnuSystem.setVisible(!isSmg1); + subGalaxyInfo.setVisible(!isSmg1); + subProductMapObjData.setVisible(!isSmg1); + subWorldMapCamera.setVisible(!isSmg1); + subKinopioBank.setVisible(!isSmg1); + subPeach.setVisible(!isSmg1); + subTicoFatCoin.setVisible(!isSmg1); + subTicoFatStarPiece.setVisible(!isSmg1); + subTicoShopDice.setVisible(!isSmg1); + mniObjectInfluenceTable.setVisible(!isSmg1); + mniRushInfluenceTable.setVisible(!isSmg1); + mniMorphConditionTable.setVisible(!isSmg1); + subAstroNamePlateData.setVisible(isSmg1); + + if (isSmg1) { tbArchiveName.setText("/StageData/CocoonExGalaxy/CocoonExGalaxyScenario.arc"); tbFileName.setText("/CocoonExGalaxyScenario/ScenarioData.bcsv"); - - sep1.setVisible(false); - mnuUseResource.setVisible(false); - mnuAudio.setVisible(false); - mnuSystem.setVisible(false); - - subGalaxyInfo.setVisible(false); - subProductMapObjData.setVisible(false); - subWorldMapCamera.setVisible(false); - subKinopioBank.setVisible(false); - subPeach.setVisible(false); - subTicoFatCoin.setVisible(false); - subTicoFatStarPiece.setVisible(false); - subTicoShopDice.setVisible(false); } - else if (Whitehole.getCurrentGameType() == 2) { + else if (isSmg1) { tbArchiveName.setText("/StageData/RedBlueExGalaxy/RedBlueExGalaxyScenario.arc"); tbFileName.setText("/RedBlueExGalaxyScenario/ScenarioData.bcsv"); diff --git a/src/whitehole/editor/GalaxyEditorForm.java b/src/whitehole/editor/GalaxyEditorForm.java index 03b2915..c510b7f 100644 --- a/src/whitehole/editor/GalaxyEditorForm.java +++ b/src/whitehole/editor/GalaxyEditorForm.java @@ -1387,10 +1387,11 @@ private void layerSelectChange(int index, boolean status) { private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing {//GEN-HEADEREND:event_formWindowClosing - if(isGalaxyMode) { + if (isGalaxyMode) { for(GalaxyEditorForm form : zoneEditors.values()) form.dispose(); } + if(!isGalaxyMode) return; diff --git a/src/whitehole/rendering/CubeRenderer.java b/src/whitehole/rendering/CubeRenderer.java index 7152e78..387e73e 100644 --- a/src/whitehole/rendering/CubeRenderer.java +++ b/src/whitehole/rendering/CubeRenderer.java @@ -84,14 +84,14 @@ public void render(RenderInfo info) throws GLException { GL2 gl = info.drawable.getGL().getGL2(); if (info.renderMode != RenderMode.PICKING) { - for (int i = 0; i < 8; i++) { - try { - if(gl.isFunctionAvailable("glActiveTexture")) { + if (gl.isFunctionAvailable("glActiveTexture")) { + for (int i = 0; i < 8; i++) { + try { gl.glActiveTexture(GL2.GL_TEXTURE0 + i); + gl.glDisable(GL2.GL_TEXTURE_2D); } - gl.glDisable(GL2.GL_TEXTURE_2D); + catch (GLException ex) {} } - catch (GLException ex) {} } gl.glDisable(GL2.GL_TEXTURE_2D); @@ -102,10 +102,7 @@ public void render(RenderInfo info) throws GLException { gl.glDisable(GL2.GL_BLEND); gl.glDisable(GL2.GL_COLOR_LOGIC_OP); gl.glDisable(GL2.GL_ALPHA_TEST); - try { - gl.glUseProgram(0); - } - catch (GLException ex) {} + gl.glUseProgram(0); } // Draw the actual cube