├── src ├── main │ ├── resources │ │ ├── credits.txt │ │ ├── bumpy.png │ │ ├── RedPlus.png │ │ ├── StarsA.png │ │ ├── StarsB.png │ │ ├── BlueMinus.png │ │ ├── BluePlus.png │ │ ├── CyanMinus.png │ │ ├── CyanPlus.png │ │ ├── RedMinus.png │ │ ├── TrclLogo.png │ │ ├── YellowPlus.png │ │ ├── fonts │ │ │ ├── OCRA.zip │ │ │ └── crillee.zip │ │ ├── ProgramIcon.png │ │ ├── YellowMinus.png │ │ ├── testTexture.png │ │ ├── dqTestTexture.png │ │ ├── fallbackTexture.png │ │ ├── grayNoise32x32.png │ │ ├── BlueBlackGradient.png │ │ ├── BlueWhiteGradient.png │ │ ├── GreenGreenGradient.png │ │ ├── OrangeOrangeGradient.png │ │ ├── doc │ │ │ └── featuresSettingsInstructions.html │ │ └── shader │ │ │ ├── opaqueFragShader.glsl │ │ │ ├── skyCubeFragShader.glsl │ │ │ ├── objectFragShader.glsl │ │ │ ├── fullScreenTextureFragShader.glsl │ │ │ ├── soundFragShader.glsl │ │ │ ├── depthQueueFragShader.glsl │ │ │ └── fullScreenTriangleVertexShader.glsl │ ├── properties │ │ └── buildNumber.properties │ └── java │ │ └── org │ │ └── jtrfp │ │ └── trcl │ │ ├── snd │ │ ├── package-info.java │ │ ├── AudioProcessor.java │ │ ├── Silence.java │ │ ├── AudioOutput.java │ │ ├── AudioDevice.java │ │ ├── AudioDriver.java │ │ └── SoundTexture.java │ │ ├── shell │ │ └── package-info.java │ │ ├── math │ │ ├── Normalized.java │ │ ├── AbstractNormalizedAngle.java │ │ ├── RotationMatrixFactory.java │ │ ├── IntRandomTransferFunction.java │ │ ├── Angle.java │ │ ├── AngularVelocity.java │ │ ├── IntLayeredRandomTransferFunction.java │ │ └── ColumnMajorTranslationMatrixFactory.java │ │ ├── Tickable.java │ │ ├── ViewMode.java │ │ ├── beh │ │ ├── ui │ │ │ ├── ControlBehavior.java │ │ │ ├── GUIUpdateBehavior.java │ │ │ └── PlayerControlBehavior.java │ │ ├── DeathListener.java │ │ ├── RequestsMentionOnBriefing.java │ │ ├── NAVTargetableBehavior.java │ │ ├── PlayerCollisionListener.java │ │ ├── CollisionBehavior.java │ │ ├── tun │ │ │ └── TunnelEntryListener.java │ │ ├── DEFObjectCollisionListener.java │ │ ├── SurfaceImpactListener.java │ │ ├── phy │ │ │ ├── Velocible.java │ │ │ └── PulledDownByGravityBehavior.java │ │ ├── HasQuantifiableSupply.java │ │ ├── CustomDeathBehavior.java │ │ ├── BehaviorNotFoundException.java │ │ ├── ReportsCollisionsToStdout.java │ │ ├── HasDescription.java │ │ ├── CustomNAVTargetableBehavior.java │ │ ├── LimitedLifeSpan.java │ │ ├── RemovesNAVObjectiveOnDeath.java │ │ ├── HeadingXAlwaysPositiveBehavior.java │ │ └── SpawnsRandomSmoke.java │ │ ├── obj │ │ ├── RelevantEverywhere.java │ │ ├── PositionedRenderable.java │ │ ├── PositionListener.java │ │ ├── Rotatable.java │ │ ├── NAVRadarBlipFactoryListener.java │ │ ├── PositionListenable.java │ │ ├── WorldObject2DRelevantEverywhere.java │ │ ├── Projectile.java │ │ ├── Propelled.java │ │ ├── ObjectPlacer.java │ │ ├── Positionable.java │ │ ├── Renderable.java │ │ ├── EnemyIntro.java │ │ └── WorldObject2D.java │ │ ├── Settable.java │ │ ├── file │ │ ├── DirectionVector.java │ │ ├── CLRFile.java │ │ ├── NotSquareException.java │ │ └── Location3D.java │ │ ├── flow │ │ └── GameVersion.java │ │ ├── coll │ │ ├── Decorator.java │ │ ├── RangeClearable.java │ │ ├── BulkRemovable.java │ │ ├── Repopulatable.java │ │ ├── UnityAdapter.java │ │ ├── DummyAdapter.java │ │ └── PropertyListenable.java │ │ ├── DoubleTransferFunction.java │ │ ├── dbg │ │ ├── package-info.java │ │ ├── GLSanityChecker.java │ │ └── PropertyChangeQueue.java │ │ ├── mem │ │ ├── Resizeable.java │ │ ├── ModulusAddress.java │ │ ├── Address.java │ │ └── ByteAddress.java │ │ ├── core │ │ ├── Feature.java │ │ ├── FlatDoubleWindow.java │ │ ├── TRFuture.java │ │ ├── SetModelListener.java │ │ ├── ShowstopperHandler.java │ │ ├── LoadOrderAware.java │ │ ├── FeatureFactory.java │ │ ├── PODRegistry.java │ │ ├── NotReadyException.java │ │ ├── DefaultUncaughtExceptionHandler.java │ │ ├── GLExecutorThread.java │ │ ├── PackedTreeNode.java │ │ ├── KeyedExecutor.java │ │ ├── GraphStabilizationListener.java │ │ ├── FeatureNotApplicableException.java │ │ └── FeatureLoadOrderComparator.java │ │ ├── gpu │ │ ├── TransparentModifierContext.java │ │ ├── TriangleModifierContext.java │ │ ├── ModelModifierContext.java │ │ ├── OpaqueModifierContext.java │ │ ├── UVModifierContext.java │ │ ├── TexturedModifierContext.java │ │ ├── VertexModifierContext.java │ │ ├── GLAutoDrawableProvider.java │ │ ├── TranslationMatrixFactory.java │ │ ├── gl3 │ │ │ ├── GL33Executor.java │ │ │ └── GL33OpaqueTriangleModifierContext.java │ │ ├── VertexNormalModifierContext.java │ │ ├── BasicModelSource.java │ │ ├── GLVertexShader.java │ │ ├── GLFragmentShader.java │ │ ├── RequiresGLThread.java │ │ ├── RequiresGPUMemAccess.java │ │ ├── ProvidesGLThread.java │ │ ├── ProvidesGPUMemAccess.java │ │ ├── ReallocatableGLMemory.java │ │ ├── Model.java │ │ ├── GLMemory.java │ │ ├── GLExecutor.java │ │ ├── MemoryUsageHint.java │ │ ├── Texture.java │ │ └── GLRenderBuffer.java │ │ ├── Controller.java │ │ ├── RendererConfigurator.java │ │ ├── conf │ │ └── ui │ │ │ ├── UIProvider.java │ │ │ ├── FeatureConfigurationUI.java │ │ │ ├── NoApplicablePropertiesException.java │ │ │ ├── ConfigByUI.java │ │ │ ├── ToolTip.java │ │ │ ├── ObjectEditorUI.java │ │ │ └── IntegerFormat.java │ │ ├── ctl │ │ ├── MappingListener.java │ │ ├── InputDevice.java │ │ ├── ControllerSource.java │ │ ├── InputDeviceService.java │ │ └── ControllerSink.java │ │ ├── Submitter.java │ │ ├── PrimitiveRenderMode.java │ │ ├── IndirectDouble.java │ │ ├── gui │ │ ├── GLExecutable.java │ │ ├── BriefingLayout.java │ │ ├── DefaultControllerConfiguration.java │ │ ├── CockpitLayoutF3.java │ │ ├── CockpitLayoutTV.java │ │ └── LabelPropertyBinding.java │ │ ├── miss │ │ └── MissionCompletionHandler.java │ │ ├── prop │ │ ├── package-info.java │ │ ├── SkyCubeGen.java │ │ └── VetoableChangeListenable.java │ │ ├── IntTransferFunction.java │ │ ├── RenderMode.java │ │ ├── FloatTransferFunction.java │ │ ├── ShortTransferFunction.java │ │ ├── AbstractSubmitter.java │ │ ├── ext │ │ ├── lvl │ │ │ └── Enhancement.java │ │ └── tr │ │ │ └── ThreadManagerFactory.java │ │ ├── ByteTransferFunction.java │ │ ├── RootGrid.java │ │ ├── img │ │ ├── vq │ │ │ ├── VectorList.java │ │ │ ├── VectorListND.java │ │ │ └── RAWVectorList.java │ │ └── TextureSource.java │ │ ├── NonPowerOfTwoException.java │ │ ├── IndirectObject.java │ │ ├── TextureMesh.java │ │ ├── TypeRunStateHandler.java │ │ ├── SelectableTexture.java │ │ ├── TransparentTriangleList.java │ │ ├── RenderableSpacePartitioningGrid.java │ │ ├── BuildInformation.java │ │ ├── ObjectListWindow.java │ │ ├── ManuallySetController.java │ │ ├── SatelliteDashboard.java │ │ ├── MatrixWindow.java │ │ ├── ScalingAltitudeMap.java │ │ ├── Selector.java │ │ ├── AltitudeMap.java │ │ └── RawTextureMeshWrapper.java └── test │ ├── resources │ ├── test_pod.ini │ ├── org.jtrfp.trcl.core.TRIT.TestTRCL.TITLE_SCREENSHOT_REF.png │ └── test.LVL │ └── java │ └── org │ └── jtrfp │ └── trcl │ └── snd │ └── JavaSoundSystemAudioOutputTest.java ├── .settings ├── org.eclipse.m2e.core.prefs ├── com.springsource.sts.maven.prefs ├── org.eclipse.ltk.core.refactoring.prefs ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs ├── .travis.yml ├── print_surefire_reports.sh ├── .gitignore └── .github └── workflows ├── maven.yml └── maven-publish.yml /src/main/resources/credits.txt: -------------------------------------------------------------------------------- 1 | ../../../CREDITS -------------------------------------------------------------------------------- /src/test/resources/test_pod.ini: -------------------------------------------------------------------------------- 1 | 3 2 | furyse.pod 3 | fury.pod 4 | startup.pod 5 | -------------------------------------------------------------------------------- /src/main/properties/buildNumber.properties: -------------------------------------------------------------------------------- 1 | git-sha-1=${buildNumber} 2 | branch=${scmBranch} -------------------------------------------------------------------------------- /src/main/resources/bumpy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/bumpy.png -------------------------------------------------------------------------------- /src/main/resources/RedPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/RedPlus.png -------------------------------------------------------------------------------- /src/main/resources/StarsA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/StarsA.png -------------------------------------------------------------------------------- /src/main/resources/StarsB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/StarsB.png -------------------------------------------------------------------------------- /src/main/resources/BlueMinus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/BlueMinus.png -------------------------------------------------------------------------------- /src/main/resources/BluePlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/BluePlus.png -------------------------------------------------------------------------------- /src/main/resources/CyanMinus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/CyanMinus.png -------------------------------------------------------------------------------- /src/main/resources/CyanPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/CyanPlus.png -------------------------------------------------------------------------------- /src/main/resources/RedMinus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/RedMinus.png -------------------------------------------------------------------------------- /src/main/resources/TrclLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/TrclLogo.png -------------------------------------------------------------------------------- /src/main/resources/YellowPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/YellowPlus.png -------------------------------------------------------------------------------- /src/main/resources/fonts/OCRA.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/fonts/OCRA.zip -------------------------------------------------------------------------------- /src/main/resources/ProgramIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/ProgramIcon.png -------------------------------------------------------------------------------- /src/main/resources/YellowMinus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/YellowMinus.png -------------------------------------------------------------------------------- /src/main/resources/testTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/testTexture.png -------------------------------------------------------------------------------- /src/main/resources/dqTestTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/dqTestTexture.png -------------------------------------------------------------------------------- /src/main/resources/fallbackTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/fallbackTexture.png -------------------------------------------------------------------------------- /src/main/resources/fonts/crillee.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/fonts/crillee.zip -------------------------------------------------------------------------------- /src/main/resources/grayNoise32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/grayNoise32x32.png -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /src/main/resources/BlueBlackGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/BlueBlackGradient.png -------------------------------------------------------------------------------- /src/main/resources/BlueWhiteGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/BlueWhiteGradient.png -------------------------------------------------------------------------------- /.settings/com.springsource.sts.maven.prefs: -------------------------------------------------------------------------------- 1 | com.springsource.sts.maven.maven.automatically.update=true 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /src/main/resources/GreenGreenGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/GreenGreenGradient.png -------------------------------------------------------------------------------- /src/main/resources/OrangeOrangeGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/main/resources/OrangeOrangeGradient.png -------------------------------------------------------------------------------- /.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | notifications: 3 | email: 4 | - cjritola@gmail.com 5 | after_failure: /home/travis/build/jtrfp/terminal-recall/./print_surefire_reports.sh 6 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author Chuck Ritola 4 | */ 5 | /** 6 | * @author Chuck Ritola 7 | * 8 | */ 9 | package org.jtrfp.trcl.snd; -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/shell/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author Chuck Ritola 4 | */ 5 | /** 6 | * @author Chuck Ritola 7 | * 8 | */ 9 | package org.jtrfp.trcl.shell; -------------------------------------------------------------------------------- /src/test/resources/org.jtrfp.trcl.core.TRIT.TestTRCL.TITLE_SCREENSHOT_REF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtrfp/terminal-recall/HEAD/src/test/resources/org.jtrfp.trcl.core.TRIT.TestTRCL.TITLE_SCREENSHOT_REF.png -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/properties=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /print_surefire_reports.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | echo "DEBUG: Current directory is $(pwd)" 3 | echo "\n========================" 4 | echo "\n=== SUREFIRE REPORTS ===\n" 5 | 6 | for F in target/surefire-reports/*.txt 7 | do 8 | echo $F 9 | cat $F 10 | echo 11 | done 12 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/Normalized.java: -------------------------------------------------------------------------------- 1 | package org.jtrfp.trcl.math; 2 | 3 | public interface Normalized { 4 | /** 5 | * Property for the normalized value of this angle, as represented by toNormalized() 6 | */ 7 | public static final String NORMALIZED = "NORMALIZED"; 8 | 9 | /** 10 | * Returns this object's normalized value in the range of [-Integer.MIN_VALUE,Integer.MAX_VALUE]. 11 | * @return 12 | * @since Jan 23, 2015 13 | */ 14 | public int toNormalized(); 15 | } 16 | -------------------------------------------------------------------------------- /src/test/resources/test.LVL: -------------------------------------------------------------------------------- 1 | 4 2 | briefing.txt 3 | heightmap.raw 4 | groundtiles.clr 5 | globalpalette.act 6 | texturelist.tex 7 | qkefile.qke 8 | pupfile.pup 9 | anifile.ani 10 | tunneldef.tdf 11 | skytexture.raw 12 | skypalette.act 13 | deffile.def 14 | navfile.nav 15 | musicfile.mod 16 | fogfile.fog 17 | ltefile.lte 18 | 1,2,3 19 | 1000 20 | -4,-5,-6 21 | 2000 22 | 100 23 | ;New story stuff 24 | introvideo.tvi 25 | leavingvideo.tvi 26 | transitionvideo.tvi 27 | missionstarttext.mic 28 | missionendtext.mic 29 | -------------------------------------------------------------------------------- /src/main/resources/doc/featuresSettingsInstructions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Feature Settings Editor

5 | A 'Feature' is a modular component which adds itself to the program to 6 | provide functionality. Features may have Features, creating a tree. 7 | Select a feature from the tree in the left pane to edit its settings or 8 | view Feature information. 9 |
10 |
Items in 11 | bold have their own extra settings which may be adjusted. 12 | 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 9 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 10 | org.eclipse.jdt.core.compiler.release=disabled 11 | org.eclipse.jdt.core.compiler.source=11 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | 3 | # Compiled source # 4 | ################### 5 | *.com 6 | *.class 7 | *.dll 8 | *.exe 9 | *.o 10 | *.so 11 | 12 | # Packages # 13 | ############ 14 | # it's better to unpack these files and commit the raw source 15 | # git has its own built in compression methods 16 | *.7z 17 | *.dmg 18 | *.gz 19 | *.iso 20 | *.jar 21 | *.rar 22 | *.tar 23 | 24 | # Logs and databases # 25 | ###################### 26 | *.log 27 | *.sql 28 | *.sqlite 29 | gpuMemDump.bin 30 | debugCodePage*.png 31 | log.html 32 | .classpath 33 | .project 34 | 35 | # OS generated files # 36 | ###################### 37 | .DS_Store 38 | .DS_Store? 39 | ._* 40 | .Spotlight-V100 41 | .Trashes 42 | ehthumbs.db 43 | Thumbs.db 44 | /target 45 | /bin 46 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/Tickable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface Tickable { 16 | public void tick(); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ViewMode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public enum ViewMode { 16 | wIDE_HUD, COCKPIT_HUD, CHASE 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/ui/ControlBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh.ui; 14 | 15 | public interface ControlBehavior { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/RelevantEverywhere.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | public interface RelevantEverywhere { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/Settable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface Settable { 16 | public void set(double value); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/ui/GUIUpdateBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh.ui; 14 | 15 | public interface GUIUpdateBehavior { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/DeathListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | public interface DeathListener { 16 | public void notifyDeath(); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/file/DirectionVector.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.file; 14 | 15 | public class DirectionVector extends AbstractTriplet { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/flow/GameVersion.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.flow; 14 | 15 | public enum GameVersion { 16 | F3, 17 | TV, 18 | FURYSE; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/AudioProcessor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.snd; 15 | 16 | public interface AudioProcessor { 17 | public float get(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/Decorator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.coll; 14 | 15 | public interface Decorator { 16 | public DELEGATE getDelegate(); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/PositionedRenderable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | public interface PositionedRenderable extends Renderable, Positionable { 16 | } 17 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven 3 | 4 | name: Java CI with Maven 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Set up JDK 11 20 | uses: actions/setup-java@v2 21 | with: 22 | java-version: '11' 23 | distribution: 'adopt' 24 | cache: maven 25 | - name: Build with Maven 26 | run: mvn -B package --file pom.xml 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/DoubleTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface DoubleTransferFunction { 16 | public int transfer(int input); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/ui/PlayerControlBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh.ui; 14 | 15 | public interface PlayerControlBehavior extends ControlBehavior { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/RangeClearable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.coll; 14 | 15 | public interface RangeClearable { 16 | public void clearRange(int startIndex, int endIndex); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/dbg/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | /** 15 | * 16 | * @author Chuck Ritola 17 | */ 18 | /** 19 | * @author Chuck Ritola 20 | * 21 | */ 22 | package org.jtrfp.trcl.dbg; -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/mem/Resizeable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.mem; 14 | 15 | public interface Resizeable { 16 | public void resize(int newSizeInBytes); 17 | }//end Resizeable 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/Feature.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | public interface Feature { 17 | void apply(T target); 18 | void destruct(T target); 19 | }//end Feature 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/TransparentModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | 15 | package org.jtrfp.trcl.gpu; 16 | 17 | public interface TransparentModifierContext extends ModelModifierContext { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/TriangleModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | 15 | package org.jtrfp.trcl.gpu; 16 | 17 | public interface TriangleModifierContext extends VertexModifierContext { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/ModelModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu; 15 | 16 | 17 | public interface ModelModifierContext { 18 | public void flush(); 19 | }//end ModelModifierKit 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/Controller.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface Controller { 16 | public double getCurrentFrame(); 17 | public void setDebugMode(boolean b); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/RequestsMentionOnBriefing.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.beh; 15 | 16 | public class RequestsMentionOnBriefing extends Behavior { 17 | 18 | }//end RequestsMentionOnBriefing 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/OpaqueModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | 15 | package org.jtrfp.trcl.gpu; 16 | 17 | public interface OpaqueModifierContext extends ModelModifierContext { 18 | 19 | }//end OpaqueModifierKit 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/FlatDoubleWindow.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.core; 14 | 15 | public interface FlatDoubleWindow { 16 | public void set(int index, double val); 17 | public void flush(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/BulkRemovable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.coll; 14 | 15 | import java.util.Collection; 16 | 17 | public interface BulkRemovable { 18 | public void bulkRemove(Collection items); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/TRFuture.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.core; 14 | 15 | public interface TRFuture { 16 | public V get(); 17 | public V getRealtime() throws NotReadyException; 18 | }//end TRFuture 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/UVModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu; 15 | 16 | public interface UVModifierContext extends ModelModifierContext{ 17 | public void setUV(int vertexID, double u, double v); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/RendererConfigurator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2021 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl; 15 | 16 | import org.jtrfp.trcl.gpu.Renderer; 17 | 18 | public interface RendererConfigurator { 19 | public void applyToRenderer(Renderer target); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/NAVTargetableBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | public interface NAVTargetableBehavior { 16 | public abstract void notifyBecomingCurrentTarget(); 17 | }//end NAVTargetableBehavior 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/UIProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | import javax.swing.JComponent; 17 | 18 | public interface UIProvider { 19 | public JComponent getUIComponent(); 20 | }//end UIProvider 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ctl/MappingListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.ctl; 15 | 16 | public interface MappingListener { 17 | public void mapped(K key, V value); 18 | public void unmapped(K key); 19 | }//end MappingListener 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/PlayerCollisionListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.obj.Player; 16 | 17 | public interface PlayerCollisionListener { 18 | void collidedWithPlayer(Player player); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/Repopulatable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.coll; 15 | 16 | import java.util.Collection; 17 | 18 | public interface Repopulatable { 19 | 20 | public void repopulate(Collection c); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/AbstractNormalizedAngle.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.math; 14 | 15 | public abstract class AbstractNormalizedAngle extends AbstractNormalizedObject implements 16 | Angle { 17 | }//end AbstractNormalizedAngle 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/CollisionBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.obj.WorldObject; 16 | 17 | public interface CollisionBehavior { 18 | public void proposeCollision(WorldObject other); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/tun/TunnelEntryListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh.tun; 14 | 15 | import org.jtrfp.trcl.Tunnel; 16 | 17 | public interface TunnelEntryListener { 18 | public void notifyTunnelEntered(Tunnel tunnel); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/SetModelListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | public interface SetModelListener { 17 | 18 | public void added(E item); 19 | 20 | public void removed(E item); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/TexturedModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu; 15 | 16 | public interface TexturedModifierContext extends ModelModifierContext { 17 | public void setTexture(int primitiveID, Texture newTexture); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/Silence.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.snd; 15 | 16 | public class Silence implements AudioProcessor { 17 | 18 | @Override 19 | public float get() { 20 | return 0; 21 | } 22 | 23 | }//end Silence 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/Submitter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import java.util.Collection; 16 | 17 | public interface Submitter { 18 | public void submit(T item); 19 | 20 | public void submit(Collection items); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/VertexModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | 15 | package org.jtrfp.trcl.gpu; 16 | 17 | public interface VertexModifierContext extends ModelModifierContext { 18 | public void setVertex(int id, double x, double y, double z); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/PositionListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | public interface PositionListener { 16 | public void positionChanged(PositionListenable objectWithPosition, double [] oldPos, double [] newPos); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/PrimitiveRenderMode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public final class PrimitiveRenderMode { 16 | public static final byte RENDER_MODE_TRIANGLES = 0; 17 | public static final byte RENDER_MODE_LINES = 1; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/dbg/GLSanityChecker.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.dbg; 15 | 16 | public interface GLSanityChecker { 17 | 18 | void applyTo(GLStateBean glStateBean); 19 | 20 | void stripFrom(GLStateBean glStateBean); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/GLAutoDrawableProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import com.jogamp.opengl.GLAutoDrawable; 16 | 17 | public interface GLAutoDrawableProvider { 18 | public GLAutoDrawable getAutoDrawable(); 19 | }//end CanvasProvider -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/TranslationMatrixFactory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu; 15 | 16 | public interface TranslationMatrixFactory { 17 | public void applyTranslationMatrix(double [] pos, double [] dest); 18 | }//end TranslationMatrixFactory 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/gl3/GL33Executor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu.gl3; 15 | 16 | import com.jogamp.opengl.GL3; 17 | 18 | import org.jtrfp.trcl.gpu.GLExecutor; 19 | 20 | public interface GL33Executor extends GLExecutor { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/VertexNormalModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | 15 | package org.jtrfp.trcl.gpu; 16 | 17 | public interface VertexNormalModifierContext extends ModelModifierContext { 18 | public void setNormal(int id, double x, double y, double z); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/RotationMatrixFactory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.math; 15 | 16 | public interface RotationMatrixFactory { 17 | public void applyRotationMatrix(double [] heading, double [] top, double [] dest); 18 | }//end RotationMatrixFactory 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/Rotatable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 16 | 17 | public interface Rotatable { 18 | public Vector3D getTop(); 19 | public Vector3D getHeading(); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/DEFObjectCollisionListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.obj.DEFObject; 16 | 17 | public interface DEFObjectCollisionListener { 18 | 19 | void collidedWithDEFObject(DEFObject other); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/FeatureConfigurationUI.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | import org.jtrfp.trcl.core.Feature; 17 | 18 | public interface FeatureConfigurationUI extends Feature, ObjectEditorUI { 19 | }//end FeatureConfigurationUI 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/IndirectDouble.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public class IndirectDouble extends IndirectObject implements Settable { 16 | @Override 17 | public void set(double value) { 18 | super.set(value); 19 | } 20 | }// end SettableObject 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/SurfaceImpactListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.obj.WorldObject; 16 | 17 | public interface SurfaceImpactListener { 18 | 19 | public void collidedWithSurface(WorldObject seg, double[] surfaceNormal); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/phy/Velocible.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh.phy; 14 | 15 | 16 | public interface Velocible { 17 | public void setVelocity(double [] vel); 18 | 19 | public double [] getVelocity(); 20 | 21 | public void accellerate(double [] amount); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gui/GLExecutable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016-2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gui; 15 | 16 | import com.jogamp.opengl.GL; 17 | 18 | public interface GLExecutable { 19 | public RETURN_TYPE execute(GL_TYPE gl) throws Exception; 20 | }//end GLExecutable 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/NAVRadarBlipFactoryListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.obj; 15 | 16 | import java.util.Collection; 17 | 18 | public interface NAVRadarBlipFactoryListener { 19 | public void refreshBlips(Collection newBlipObjects); 20 | }//end NAVRadarBlipFactory -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/ShowstopperHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2017 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | /** 17 | * Identifier interface to indicate a given FeatureFactory is meant to catch showstoppers. 18 | * @author Chuck Ritola 19 | * 20 | */ 21 | 22 | public interface ShowstopperHandler { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/NoApplicablePropertiesException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2021 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | public class NoApplicablePropertiesException extends IllegalArgumentException { 17 | private static final long serialVersionUID = 3518848851150572934L; 18 | }//end NoApplicablePropertiesException 19 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/miss/MissionCompletionHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.miss; 15 | 16 | import org.jtrfp.trcl.obj.WorldObject; 17 | 18 | public interface MissionCompletionHandler { 19 | 20 | public void missionComplete(WorldObject optionalJumpzone); 21 | 22 | }//end MissionCompleteHandler 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/PositionListenable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | public interface PositionListenable extends Positionable { 16 | public void addPositionListener(PositionListener listenerToAdd); 17 | 18 | public void removePositionListener(PositionListener listenerToAdd); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/prop/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola and contributors. 4 | * See Github project's commit log for contribution details. 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | * See the COPYING and CREDITS files for more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | package org.jtrfp.trcl.prop; -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/UnityAdapter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.coll; 14 | 15 | import com.ochafik.util.listenable.Adapter; 16 | 17 | public class UnityAdapter implements Adapter { 18 | 19 | @Override 20 | public U adapt(U value) { 21 | return value; 22 | } 23 | 24 | }//end UnityAdapter 25 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/IntTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface IntTransferFunction { 16 | public int transfer(int input); 17 | 18 | public static final class Zero implements IntTransferFunction{ 19 | @Override 20 | public int transfer(int input) { 21 | return 0; 22 | }} 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/HasQuantifiableSupply.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.beh.DamageableBehavior.SupplyNotNeededException; 16 | 17 | public interface HasQuantifiableSupply { 18 | public void addSupply(double amount) throws SupplyNotNeededException; 19 | public double getSupply(); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/RenderMode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public enum RenderMode { 16 | /** 17 | * Nexer changes traits 18 | */ 19 | STATIC, 20 | /** 21 | * Always changing traits 22 | */ 23 | STREAM, 24 | /** 25 | * Sometimes changing traits 26 | */ 27 | DYNAMIC 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/FloatTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface FloatTransferFunction { 16 | public float transfer(int input); 17 | 18 | public static final class Zero implements FloatTransferFunction{ 19 | @Override 20 | public float transfer(int input) { 21 | return 0; 22 | }} 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ShortTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface ShortTransferFunction { 16 | public short transfer(int input); 17 | 18 | public static final class Zero implements ShortTransferFunction{ 19 | @Override 20 | public short transfer(int input) { 21 | return 0; 22 | }} 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/DummyAdapter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.coll; 14 | 15 | import com.ochafik.util.listenable.Adapter; 16 | 17 | public class DummyAdapter implements Adapter { 18 | 19 | @Override 20 | public V adapt(U value) { 21 | throw new UnsupportedOperationException(); 22 | } 23 | 24 | }//end DummyAdapter 25 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/file/CLRFile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.file; 14 | 15 | import java.io.IOException; 16 | import java.io.InputStream; 17 | 18 | public class CLRFile extends RAWFile { 19 | 20 | public CLRFile(InputStream inputStream) throws IllegalAccessException, 21 | IOException { 22 | super(inputStream); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/jtrfp/trcl/snd/JavaSoundSystemAudioOutputTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2018 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.snd; 15 | 16 | public class JavaSoundSystemAudioOutputTest extends AudioDriverTest { 17 | 18 | @Override 19 | protected AudioDriver getSubject() { 20 | return new JavaSoundSystemAudioOutput(); 21 | } 22 | 23 | }//end JavaSoundSystemAudioOutputIT 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/LoadOrderAware.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | public interface LoadOrderAware { 17 | public static final int FIRST = 0; 18 | public static final int LAST = 65535; 19 | public static final int DEFAULT = (FIRST + LAST) / 2; 20 | public int getFeatureLoadPriority(); 21 | }//end LoadOrderAware 22 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/AbstractSubmitter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import java.util.Collection; 16 | 17 | public abstract class AbstractSubmitter implements Submitter { 18 | @Override 19 | public void submit(Collection items){ 20 | synchronized(items){ 21 | for(T item:items){submit(item);}}} 22 | }//end AbstractSubmitter 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ext/lvl/Enhancement.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2021 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.ext.lvl; 14 | 15 | public interface Enhancement { 16 | public String getDescription(); 17 | public void setDescription(String desc); 18 | public boolean isEnabled(); 19 | public void setEnabled(boolean enabled); 20 | public String getHook(); 21 | public void setHook(String hook); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/WorldObject2DRelevantEverywhere.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | 16 | public abstract class WorldObject2DRelevantEverywhere extends WorldObject2D implements 17 | RelevantEverywhere { 18 | 19 | public WorldObject2DRelevantEverywhere() { 20 | super(); 21 | } 22 | 23 | }//end WorldOBject2DVisibleEverywhere 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ByteTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface ByteTransferFunction { 16 | public byte transfer(int input); 17 | 18 | public static final class Zero implements ByteTransferFunction{ 19 | @Override 20 | public byte transfer(int input) { 21 | return 0; 22 | }} 23 | }//end ByteTransferFunction 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/FeatureFactory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | public interface FeatureFactory { 17 | public Feature newInstance(T target) throws FeatureNotApplicableException; 18 | public Class getTargetClass(); 19 | public Class> getFeatureClass(); 20 | }//end FeatureFactory 21 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/BasicModelSource.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import org.jtrfp.trcl.gpu.BasicModelTarget.PrimitiveType; 16 | 17 | public interface BasicModelSource { 18 | public double [] getVertex (int index); 19 | public int [] getPrimitiveVertexIDs(int index); 20 | public PrimitiveType getPrimitiveType (int index); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/file/NotSquareException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.file; 14 | 15 | public class NotSquareException extends Exception { 16 | private static final long serialVersionUID = 1368071971974407211L; 17 | 18 | public NotSquareException(String imageName) { 19 | super("Image not square: " + imageName); 20 | } 21 | }// end NotSquareException 22 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/PODRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016-2017 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | import org.jtrfp.jtrfp.pod.IPodData; 17 | import org.jtrfp.trcl.coll.CollectionActionDispatcher; 18 | 19 | 20 | public interface PODRegistry { 21 | public CollectionActionDispatcher getPodCollection(); 22 | public IPodData getPodData(String path); 23 | }//end PODRegistry 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/RootGrid.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl; 15 | 16 | public class RootGrid extends RenderableSpacePartitioningGrid { 17 | 18 | RootGrid(double sizeX, double sizeY, double sizeZ, 19 | double gridBlockSize, double viewDepth) { 20 | super(sizeX, sizeY, sizeZ, gridBlockSize, viewDepth); 21 | }//end constructor(...) 22 | 23 | }//end RootGrid 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/Projectile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 16 | 17 | public interface Projectile { 18 | 19 | void destroy(); 20 | 21 | void reset(double[] ds, Vector3D scalarMultiply, WorldObject objectOfOrigin); 22 | 23 | WorldObject getObjectOfOrigin(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/CustomDeathBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | 16 | public class CustomDeathBehavior extends Behavior implements DeathListener { 17 | private final Runnable r; 18 | public CustomDeathBehavior(final Runnable r){ 19 | this.r=r; 20 | } 21 | @Override 22 | public void notifyDeath() { 23 | r.run(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/NotReadyException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | public class NotReadyException extends Exception { 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = -3968251093605098038L; 21 | 22 | public NotReadyException(){ 23 | super(); 24 | }//end constructor 25 | 26 | }//end NotReadyException 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/GLVertexShader.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import com.jogamp.opengl.GL3; 16 | 17 | public class GLVertexShader extends GLShader { 18 | public GLVertexShader(GPU gpu) { 19 | super(gpu); 20 | } 21 | 22 | @Override 23 | protected int getShaderType() { 24 | return GL3.GL_VERTEX_SHADER; 25 | } 26 | 27 | }//end GLVertexShader 28 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/img/vq/VectorList.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.img.vq; 14 | 15 | public interface VectorList { 16 | public int getNumVectors(); 17 | 18 | public int getNumComponentsPerVector(); 19 | 20 | public double componentAt(int vectorIndex, int componentIndex); 21 | 22 | public void setComponentAt(int vectorIndex, int componentIndex, double value); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/GLFragmentShader.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import com.jogamp.opengl.GL3; 16 | 17 | public class GLFragmentShader extends GLShader { 18 | public GLFragmentShader(GPU gpu) { 19 | super(gpu); 20 | } 21 | 22 | @Override 23 | protected int getShaderType() { 24 | return GL3.GL_FRAGMENT_SHADER; 25 | } 26 | }// end GLFragmentShader 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/RequiresGLThread.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Target; 17 | 18 | /** 19 | * Provides hint that the given method should be called from within a GL thread. 20 | * @author Chuck Ritola 21 | * 22 | */ 23 | @Target({ElementType.METHOD}) 24 | public @interface RequiresGLThread { 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/RequiresGPUMemAccess.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Target; 17 | 18 | /** 19 | * Provides hint that the given method requires GPU mapped memory access. 20 | * @author Chuck Ritola 21 | * 22 | */ 23 | 24 | @Target({ElementType.METHOD}) 25 | public @interface RequiresGPUMemAccess { 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/ProvidesGLThread.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Target; 17 | 18 | /** 19 | * Provides hint that all methods invoked by this method are from within a GL thread. 20 | * @author Chuck Ritola 21 | * 22 | */ 23 | @Target({ElementType.METHOD}) 24 | public @interface ProvidesGLThread { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/ProvidesGPUMemAccess.java: -------------------------------------------------------------------------------- 1 | 2 | /******************************************************************************* 3 | * This file is part of TERMINAL RECALL 4 | * Copyright (c) 2015 Chuck Ritola 5 | * Part of the jTRFP.org project 6 | * All rights reserved. This program and the accompanying materials 7 | * are made available under the terms of the GNU Public License v3.0 8 | * which accompanies this distribution, and is available at 9 | * http://www.gnu.org/licenses/gpl.html 10 | * 11 | * Contributors: 12 | * chuck - initial API and implementation 13 | ******************************************************************************/ 14 | package org.jtrfp.trcl.gpu; 15 | 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Target; 18 | 19 | /** 20 | * Hints that this method provides GPU memory access to methods it calls. 21 | * @author Chuck Ritola 22 | * 23 | */ 24 | @Target({ElementType.METHOD}) 25 | public @interface ProvidesGPUMemAccess { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/ReallocatableGLMemory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.nio.ByteBuffer; 16 | 17 | public interface ReallocatableGLMemory extends GLMemory 18 | { 19 | public void reallocate(ByteBuffer newData); 20 | public void reallocate(int sizeInBytes); 21 | public void putShort(int byteOffset, short val); 22 | public void putFloat(int byteOffset, float val); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/NonPowerOfTwoException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public class NonPowerOfTwoException extends Exception { 16 | private static final long serialVersionUID = -3279647254036178260L; 17 | 18 | public NonPowerOfTwoException(String name) { 19 | super("Entity of name `" + name 20 | + " has a non-power of two side length."); 21 | } 22 | }// end NonPowerOfTwoException 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/AudioOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.snd; 15 | 16 | import javax.sound.sampled.AudioFormat; 17 | 18 | public interface AudioOutput { 19 | public String getUniqueName(); 20 | public AudioFormat []getFormats(); 21 | public AudioFormat getFormatFromUniqueName(String name); 22 | public AudioDevice getDevice(); 23 | public AudioFormat getDefaultFormat(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ctl/InputDevice.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.ctl; 14 | 15 | import java.util.Collection; 16 | 17 | public interface InputDevice { 18 | public Collection getControllerSources(); 19 | public String getName(); 20 | public String getVendor(); 21 | public String getDetailedDescription(); 22 | public ControllerSource getSourceByName(String name); 23 | }//end InputDevice 24 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/BehaviorNotFoundException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | public class BehaviorNotFoundException extends RuntimeException{ 16 | /** 17 | * 18 | */ 19 | private static final long serialVersionUID = -9178140816092558936L; 20 | public BehaviorNotFoundException(){super();} 21 | public BehaviorNotFoundException(String msg){super(msg);} 22 | }//end BehaviorNotfoundException 23 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/AudioDevice.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.snd; 15 | 16 | import java.util.Collection; 17 | 18 | public interface AudioDevice { 19 | 20 | Collection getOutputs(); 21 | 22 | AudioOutput getOutputByName(String uniqueName); 23 | 24 | String getUniqueName(); 25 | 26 | AudioDriver getDriver(); 27 | 28 | AudioOutput getDefaultOutput(); 29 | 30 | }//end AudioDevice 31 | -------------------------------------------------------------------------------- /src/main/resources/shader/opaqueFragShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | 17 | #version 330 18 | 19 | // INPUTS 20 | flat in float flatPrimitiveID; 21 | 22 | // OUTPUTS 23 | 24 | void main(){ 25 | gl_FragColor.r = flatPrimitiveID; 26 | }//end main() 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/ReportsCollisionsToStdout.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.obj.WorldObject; 16 | 17 | public class ReportsCollisionsToStdout extends Behavior implements SurfaceImpactListener{ 18 | 19 | @Override 20 | public void collidedWithSurface(WorldObject wo, double [] surfaceNormal) { 21 | if(isEnabled())System.out.println("Object "+getParent()+" collided with "+wo); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/gl3/GL33OpaqueTriangleModifierContext.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu.gl3; 15 | 16 | import org.jtrfp.trcl.gpu.OpaqueModifierContext; 17 | 18 | public class GL33OpaqueTriangleModifierContext extends 19 | GL33TriangleModelModifierContext implements OpaqueModifierContext { 20 | 21 | @Override 22 | public void flush(){ 23 | //TODO 24 | super.flush(); 25 | } 26 | 27 | }//end GL33OpaqueTriangleModifierContext 28 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/IndirectObject.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public class IndirectObject { 16 | TYPE object; 17 | 18 | /** 19 | * @return the object 20 | */ 21 | public TYPE get() { 22 | return object; 23 | } 24 | 25 | /** 26 | * @param object 27 | * the object to set 28 | */ 29 | public void set(TYPE object) { 30 | this.object = object; 31 | } 32 | }// end IndirectObject 33 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/img/vq/VectorListND.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.img.vq; 15 | 16 | public interface VectorListND { 17 | public int getNumVectors(); 18 | 19 | public int getNumComponentsPerVector(); 20 | 21 | public int [] getDimensions(); 22 | 23 | public double componentAt(int [] coordinates, int componentIndex); 24 | 25 | public void setComponentAt(int [] coordinates, int componentIndex, double value); 26 | }//end VectorListND 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ctl/ControllerSource.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.ctl; 14 | 15 | import java.beans.PropertyChangeListener; 16 | 17 | public interface ControllerSource { 18 | public static final String STATE = "State"; 19 | public void addPropertyChangeListener(PropertyChangeListener l); 20 | public void removePropertyChangeListener(PropertyChangeListener l); 21 | public String getName(); 22 | public InputDevice getInputDevice(); 23 | }//end ControllerSource 24 | -------------------------------------------------------------------------------- /src/main/resources/shader/skyCubeFragShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola and contributors. 4 | * See Github project's commit log for contribution details. 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | * See the COPYING and CREDITS files for more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | // Sky Cube 17 | 18 | #version 330 19 | 20 | // INPUTS 21 | uniform samplerCube cubeTexture; 22 | smooth in vec3 norm; 23 | 24 | void main(){ 25 | gl_FragColor = texture(cubeTexture,norm); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/TextureMesh.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.jtrfp.trcl.gpu.Texture; 16 | 17 | public interface TextureMesh { 18 | /** 19 | * Get the Texture at the mesh coordinates 20 | * 21 | * @param x 22 | * x-Cell coordinate to query 23 | * @param z 24 | * z-Cell coordinate to query 25 | * @return 26 | * @since Oct 14, 2012 27 | */ 28 | public Texture textureAt(double x, double z); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/TypeRunStateHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2018 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl; 15 | 16 | public abstract class TypeRunStateHandler extends RunStateHandler { 17 | private Class clazz; 18 | 19 | public TypeRunStateHandler(Class type) { 20 | this.clazz = type; 21 | } 22 | 23 | @Override 24 | public boolean isValidRunState(Object oldRunSatte, Object newRunState) { 25 | return clazz.isAssignableFrom(newRunState.getClass()); 26 | } 27 | 28 | }//end TypeRunStateHandler 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/Propelled.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | public interface Propelled { 16 | public Propelled setPropulsion(double magnitude); 17 | 18 | public double getPropulsion(); 19 | 20 | public Propelled setMaxPropulsion(double max); 21 | 22 | public double getMaxPropulsion(); 23 | 24 | public Propelled setMinPropulsion(double min); 25 | 26 | public double getMinPropulsion(); 27 | 28 | public Propelled deltaPropulsion(double delta); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/SelectableTexture.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.jtrfp.trcl.gpu.VQTexture; 16 | 17 | public class SelectableTexture extends AnimatedTexture{ 18 | public SelectableTexture(VQTexture[] frames) 19 | {super(new Selector(), frames);} 20 | 21 | public void setFrame(int frame){((Selector)getTextureSequencer()).set(frame);} 22 | 23 | public int getCurrentFrameNumber() { 24 | return (int)((Selector)getTextureSequencer()).getCurrentFrame(); 25 | } 26 | }//end SelectableTexture 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/HasDescription.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.beh; 15 | 16 | public class HasDescription extends Behavior { 17 | private String humanReadableDescription; 18 | 19 | public String getHumanReadableDescription() { 20 | return humanReadableDescription; 21 | } 22 | 23 | public HasDescription setHumanReadableDescription(String humanReadableDescription) { 24 | this.humanReadableDescription = humanReadableDescription; 25 | return this; 26 | } 27 | 28 | }//end HasDescription 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/img/TextureSource.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.img; 14 | 15 | import java.nio.ByteBuffer; 16 | 17 | public interface TextureSource { 18 | /** 19 | * Get derasterized texture data as Red, Green, Blue, Alpha, Caustic, 20 | * Emissiveness and two unknowns, each in 4-bit format. 21 | * 22 | * @return 23 | * @since Apr 6, 2014 24 | */ 25 | public ByteBuffer getAsRGBACEnn4b(); 26 | 27 | public int getWidth(); 28 | 29 | public int getHeight(); 30 | }// end TextureSource 31 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/phy/PulledDownByGravityBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh.phy; 14 | 15 | import org.jtrfp.trcl.beh.Behavior; 16 | import org.jtrfp.trcl.obj.WorldObject; 17 | 18 | public class PulledDownByGravityBehavior extends Behavior { 19 | private static final double [] G = new double[]{0,-1400,0}; 20 | @Override 21 | public void tick(long tickTimeMillis){ 22 | final WorldObject p = getParent(); 23 | p.probeForBehavior(Velocible.class).accellerate(G); 24 | } 25 | }//end PulledDownByGravityBehavior 26 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/CustomNAVTargetableBehavior.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | public class CustomNAVTargetableBehavior extends Behavior implements NAVTargetableBehavior { 16 | private boolean notYetTargeted=true; 17 | private final Runnable r; 18 | public CustomNAVTargetableBehavior(Runnable r){ 19 | this.r=r; 20 | } 21 | @Override 22 | public void notifyBecomingCurrentTarget() { 23 | if(notYetTargeted) 24 | r.run(); 25 | notYetTargeted=false; 26 | } 27 | }//end CustomNAVTargetableBehavior 28 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/ObjectPlacer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 16 | import org.jtrfp.trcl.RenderableSpacePartitioningGrid; 17 | 18 | 19 | public interface ObjectPlacer { 20 | public void placeObjects(); 21 | public void setPositionOffset(Vector3D offset); 22 | public Vector3D getPositionOffset(); 23 | public void setTargetGrid(RenderableSpacePartitioningGrid target); 24 | public RenderableSpacePartitioningGrid getTargetGrid(); 25 | } 26 | -------------------------------------------------------------------------------- /.github/workflows/maven-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created 2 | # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path 3 | 4 | name: Maven Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | permissions: 15 | contents: read 16 | packages: write 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | - name: Set up JDK 11 21 | uses: actions/setup-java@v3 22 | with: 23 | java-version: '11' 24 | distribution: 'temurin' 25 | server-id: github # Value of the distributionManagement/repository/id field of the pom.xml 26 | settings-path: ${{ github.workspace }} # location for the settings.xml file 27 | 28 | - name: Build with Maven 29 | run: mvn -B package --file pom.xml 30 | 31 | - name: Publish to GitHub Packages Apache Maven 32 | run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml 33 | env: 34 | GITHUB_TOKEN: ${{ github.token }} 35 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/Model.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu; 15 | 16 | public interface Model { 17 | /** 18 | * Returns a ModelModifierContext whose implementation includes all of the specified classes. 19 | * @param classRequirements 20 | * @return null if context not found matching the requirements, else a compatible context. 21 | * @since Aug 23, 2016 22 | */ 23 | public ModelModifierContext getModifierContext(@SuppressWarnings("unchecked") Class ... classRequirements); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/mem/ModulusAddress.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.mem; 14 | 15 | public abstract class ModulusAddress extends Address { 16 | protected int modulus; 17 | 18 | /** 19 | * 20 | */ 21 | private static final long serialVersionUID = 2421428816041864744L; 22 | 23 | protected ModulusAddress(){ 24 | super(); 25 | } 26 | 27 | protected void setModulus(int modulus){ 28 | this.modulus=modulus; 29 | } 30 | public int getModulus(){ 31 | return modulus; 32 | } 33 | }//end ModulusAddress 34 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/DefaultUncaughtExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.core; 14 | 15 | import java.lang.Thread.UncaughtExceptionHandler; 16 | 17 | import org.springframework.stereotype.Component; 18 | 19 | @Component 20 | public class DefaultUncaughtExceptionHandler implements 21 | UncaughtExceptionHandler { 22 | 23 | public DefaultUncaughtExceptionHandler(){} 24 | 25 | @Override 26 | public void uncaughtException(Thread t, Throwable e) { 27 | e.printStackTrace(); 28 | } 29 | 30 | }//end DefaultUncaughtExceptionHandler 31 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/ConfigByUI.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | import static java.lang.annotation.ElementType.METHOD; 17 | import static java.lang.annotation.ElementType.TYPE; 18 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 19 | 20 | import java.lang.annotation.Documented; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.Target; 23 | 24 | @Documented 25 | @Retention(RUNTIME) 26 | @Target({ TYPE, METHOD }) 27 | public @interface ConfigByUI { 28 | Class> editorClass(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/Positionable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | import org.jtrfp.trcl.SpacePartitioningGrid; 16 | import org.jtrfp.trcl.coll.PropertyListenable; 17 | 18 | public interface Positionable extends PropertyListenable { 19 | //BEAN PROPERTIES 20 | public static final String POSITION = "position"; 21 | 22 | public double[] getPosition(); 23 | 24 | public void setContainingGrid(SpacePartitioningGrid grid); 25 | public SpacePartitioningGrid getContainingGrid(); 26 | }//end Positionable 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/GLExecutorThread.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.core; 14 | 15 | import com.jogamp.opengl.GLContext; 16 | 17 | public class GLExecutorThread extends Thread { 18 | private final GLContext context; 19 | public GLExecutorThread(GLContext context, Runnable runnable) { 20 | super(runnable); 21 | setName("glThreadPool"); 22 | //setPriority(ThreadManager.RENDERING_PRIORITY); 23 | this.context=context; 24 | } 25 | /** 26 | * @return the context 27 | */ 28 | public GLContext getContext() { 29 | return context; 30 | } 31 | 32 | }//end GLExecutorThread 33 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/ToolTip.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | import static java.lang.annotation.ElementType.METHOD; 17 | import static java.lang.annotation.ElementType.TYPE; 18 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 19 | 20 | import java.lang.annotation.Documented; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.Target; 23 | 24 | @Documented 25 | @Retention(RUNTIME) 26 | @Target({ TYPE, METHOD }) 27 | public @interface ToolTip { 28 | String text() default "Developer specified a ToolTip but never set the text. Please file a bug."; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ext/tr/ThreadManagerFactory.java: -------------------------------------------------------------------------------- 1 | package org.jtrfp.trcl.ext.tr; 2 | 3 | import org.jtrfp.trcl.core.Feature; 4 | import org.jtrfp.trcl.core.FeatureFactory; 5 | import org.jtrfp.trcl.core.TRFactory.TR; 6 | import org.jtrfp.trcl.core.ThreadManager; 7 | import org.springframework.stereotype.Component; 8 | 9 | @Component 10 | public class ThreadManagerFactory implements FeatureFactory { 11 | public static final class ThreadManagerFeature extends ThreadManager implements Feature{ 12 | 13 | ThreadManagerFeature(TR tr) { 14 | super(); 15 | } 16 | 17 | @Override 18 | public void apply(TR target) { 19 | setTr(target); 20 | start(); 21 | } 22 | 23 | @Override 24 | public void destruct(TR target) { 25 | // TODO Auto-generated method stub 26 | 27 | } 28 | 29 | }//end ThreadManagerFeature 30 | 31 | @Override 32 | public Feature newInstance(TR target) { 33 | return new ThreadManagerFeature(target); 34 | } 35 | 36 | @Override 37 | public Class getTargetClass() { 38 | return TR.class; 39 | } 40 | 41 | @Override 42 | public Class getFeatureClass() { 43 | return ThreadManagerFeature.class; 44 | } 45 | }//end ThreadManagerFactory 46 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/ObjectEditorUI.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | import java.lang.annotation.Annotation; 17 | import java.util.Set; 18 | import java.util.function.Consumer; 19 | import java.util.function.Supplier; 20 | 21 | public interface ObjectEditorUI extends UIProvider { 22 | public boolean isNeedingRestart(); 23 | public void proposeApplySettings(); 24 | public void proposeRevertSettings(long revertTimeMillis); 25 | public void configure(Consumer propertySetter, Supplier propertyGetter, Set annotations, String humanReadablePropertyName); 26 | }//end ObjectEditor 27 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/Renderable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | import org.jtrfp.trcl.MatrixWindow; 16 | import org.jtrfp.trcl.coll.CollectionActionDispatcher; 17 | import org.jtrfp.trcl.core.NotReadyException; 18 | import org.jtrfp.trcl.gpu.Renderer; 19 | import org.jtrfp.trcl.mem.VEC4Address; 20 | 21 | public interface Renderable { 22 | CollectionActionDispatcher getOpaqueObjectDefinitionAddresses(); 23 | 24 | CollectionActionDispatcher getTransparentObjectDefinitionAddresses(); 25 | 26 | void updateStateToGPU(Renderer renderer, MatrixWindow mwContext) throws NotReadyException; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/shader/objectFragShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | 17 | #version 330 18 | 19 | //INPUTS 20 | flat in mat4 camMatrix; 21 | flat in mat4 noCamMatrix; 22 | 23 | //OUTPUTS 24 | layout(location = 0) out vec4 camMatrixOutput; 25 | layout(location = 1) out vec4 noCamMatrixOutput; 26 | 27 | void main(){ 28 | camMatrixOutput = camMatrix[uint(gl_FragCoord.x)%4u]; 29 | noCamMatrixOutput= noCamMatrix[uint(gl_FragCoord.x)%4u]; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ctl/InputDeviceService.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.ctl; 15 | 16 | import java.util.Collection; 17 | 18 | import org.jtrfp.trcl.gui.ControllerInputDevicePanel.ControllerConfiguration; 19 | import org.jtrfp.trcl.gui.DefaultControllerConfiguration; 20 | 21 | public interface InputDeviceService { 22 | public String getAuthor(); 23 | public String getDescription(); 24 | public Collection getInputDevices(); 25 | public void registerFallbackConfiguration(ControllerConfiguration conf); 26 | public void registerDefaultConfiguration (DefaultControllerConfiguration conf); 27 | }//end InputDeviceService() -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/GLMemory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.nio.ByteBuffer; 16 | 17 | public interface GLMemory { 18 | public ByteBuffer map(); 19 | 20 | public void unmap(); 21 | 22 | public void bind(); 23 | 24 | public void unbind(); 25 | 26 | public int getSizeInBytes(); 27 | 28 | public void setUsageHint(MemoryUsageHint hint); 29 | 30 | public MemoryUsageHint getUsageHint(); 31 | 32 | public ByteBuffer getDuplicateReferenceOfUnderlyingBuffer(); 33 | 34 | public void bindToUniform(int textureUnit, GLProgram program, 35 | GLUniform uniform); 36 | }//end GLMemory 37 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gui/BriefingLayout.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gui; 14 | 15 | import java.awt.geom.Point2D; 16 | import java.util.Collection; 17 | 18 | import org.apache.commons.math3.geometry.euclidean.threed.Rotation; 19 | 20 | public interface BriefingLayout { 21 | public Point2D.Double getTextPosition(); 22 | public int getNumCharsPerLine(); 23 | public int getNumLines(); 24 | public double getFontSizeGL(); 25 | public Rotation cameraHeadingAdjust(); 26 | public Collection getNameTokens(); 27 | public double getScrollIncrement(); 28 | }//end BriefingLayout 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/IntRandomTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.math; 14 | 15 | import org.jtrfp.trcl.IntTransferFunction; 16 | 17 | public class IntRandomTransferFunction implements IntTransferFunction { 18 | static final int ORDER_SIZE=256; 19 | static final int [] lookupTable = new int[ORDER_SIZE]; 20 | static{ 21 | for(int i=0; i.5?1:-1));} 23 | }//end static 24 | 25 | @Override 26 | public int transfer(int input) { 27 | return lookupTable[input%256]; 28 | }//end transfer(...) 29 | }//end IntRandomTransferFunction 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/AudioDriver.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.snd; 15 | 16 | import java.util.Collection; 17 | 18 | import javax.sound.sampled.AudioFormat; 19 | 20 | public interface AudioDriver { 21 | public void setFormat(AudioFormat format); 22 | public void setSource(AudioProcessor processor); 23 | public void flush(); 24 | public Collection getDevices(); 25 | public AudioDevice getDeviceByName(String outputName); 26 | public void setOutput(AudioOutput o); 27 | public void release(); 28 | public void setBufferSizeFrames(int numFrames); 29 | public AudioDevice getDefaultDevice(); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/shader/fullScreenTextureFragShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | 17 | // Fills the screen with a texture. 18 | 19 | #version 330 20 | 21 | // INPUTS 22 | noperspective in vec2 screenLoc; 23 | uniform sampler2D textureToUse; 24 | uniform vec4 scalar; 25 | uniform vec4 offset; 26 | 27 | // OUTPUTS 28 | layout (location = 0) out vec4 color; 29 | 30 | void main(){ 31 | color = clamp(texture(textureToUse,screenLoc)*scalar+offset,0,1); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/prop/SkyCubeGen.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola and contributors. 4 | * See Github project's commit log for contribution details. 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | * See the COPYING and CREDITS files for more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | package org.jtrfp.trcl.prop; 17 | 18 | import java.nio.ByteBuffer; 19 | 20 | public interface SkyCubeGen { 21 | public ByteBuffer getTop(); 22 | public ByteBuffer getBottom(); 23 | public ByteBuffer getNorth(); 24 | public ByteBuffer getSouth(); 25 | public ByteBuffer getWest(); 26 | public ByteBuffer getEast(); 27 | public int getSideWidth(); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/conf/ui/IntegerFormat.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.conf.ui; 15 | 16 | import static java.lang.annotation.ElementType.METHOD; 17 | import static java.lang.annotation.ElementType.TYPE; 18 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 19 | 20 | import java.lang.annotation.Documented; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.Target; 23 | 24 | @Documented 25 | @Retention(RUNTIME) 26 | @Target({ TYPE, METHOD }) 27 | public @interface IntegerFormat { 28 | int min() default Integer.MIN_VALUE; 29 | int max() default Integer.MAX_VALUE; 30 | int stepSize() default 1; 31 | }//end IntegerFormat 32 | -------------------------------------------------------------------------------- /src/main/resources/shader/soundFragShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | #version 330 17 | 18 | // INPUTS 19 | uniform sampler2D soundTexture; 20 | noperspective in float fragTexPos; 21 | noperspective in float fragRow; 22 | flat in vec2 panLR; 23 | 24 | // OUTPUTS 25 | layout (location = 0) out vec2 leftRightOut; 26 | 27 | void main(){ 28 | leftRightOut.rg = panLR * texture(soundTexture,vec2(fragTexPos,fragRow),0).r /** .0000000001 + vec2(fragTexPos*2-1,fragRow*2-1)*/; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/TransparentTriangleList.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.jtrfp.trcl.core.TRFactory.TR; 16 | import org.jtrfp.trcl.gpu.GL33Model; 17 | 18 | public class TransparentTriangleList extends TriangleList { 19 | public TransparentTriangleList(Triangle[][] triangles, 20 | int timeBetweenFramesMsec, String debugName, boolean animateUV, 21 | Controller controller, TR tr, GL33Model m) { 22 | super(triangles, timeBetweenFramesMsec, debugName, animateUV, 23 | controller, tr, m); 24 | } 25 | 26 | @Override 27 | public RenderStyle getRenderStyle() { 28 | return RenderStyle.TRANSPARENT; 29 | } 30 | }// end TransparentTriangleList 31 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/RenderableSpacePartitioningGrid.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 16 | import org.jtrfp.trcl.obj.PositionedRenderable; 17 | 18 | public class RenderableSpacePartitioningGrid extends 19 | SpacePartitioningGrid { 20 | 21 | public RenderableSpacePartitioningGrid(double sizeX, double sizeY, 22 | double sizeZ, double gridBlockSize, double viewDepth) { 23 | super(new Vector3D(sizeX, sizeY, sizeZ), gridBlockSize, viewDepth * 1.2); 24 | } 25 | 26 | public RenderableSpacePartitioningGrid() { 27 | super(); 28 | } 29 | }//end RenderableSpacePartitioningGrid 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/file/Location3D.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.file; 14 | 15 | import org.jtrfp.jfdt.Parser; 16 | import org.jtrfp.jfdt.UnrecognizedFormatException; 17 | 18 | public class Location3D extends AbstractTriplet { 19 | public static class EndingWithComma extends Location3D { 20 | @Override 21 | public void describeFormat(Parser prs) 22 | throws UnrecognizedFormatException { 23 | prs.stringEndingWith(",", prs.property("x", Integer.class), false); 24 | prs.stringEndingWith(",", prs.property("y", Integer.class), false); 25 | prs.stringEndingWith(",", prs.property("z", Integer.class), false); 26 | } 27 | }// end EndingWithComma 28 | }// end Location3D 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/GLExecutor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gpu; 15 | 16 | import java.util.concurrent.Future; 17 | 18 | import org.jtrfp.trcl.gui.GLExecutable; 19 | 20 | import com.jogamp.opengl.GL; 21 | 22 | public interface GLExecutor { 23 | //public Future submitToGL(Callable c); 24 | public Future submitToGL(GLExecutable executable); 25 | public void executeOnEachRefresh(GLExecutable executable, double orderPriority); 26 | public void executeOnResize(GLExecutable executable); 27 | public void executeOnDispose(GLExecutable executable); 28 | }//end GLExecutor 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/Angle.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.math; 15 | 16 | import org.jtrfp.trcl.flow.PropertyChangeListenable; 17 | 18 | 19 | /** 20 | * Representation of an angle. Underlying implementation may change values if state-dependent. 21 | * Just-in-time querying is recommended. 22 | * @author Chuck Ritola 23 | * 24 | */ 25 | 26 | public interface Angle extends Normalized, PropertyChangeListenable { 27 | /** 28 | * Returns this object's normalized angle in the range of [-Integer.MIN_VALUE,Integer.MAX_VALUE] 29 | * scaling to the range [-pi,pi]. 30 | * @return 31 | * @since Jan 23, 2015 32 | */ 33 | public int toNormalized(); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/BuildInformation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2017 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl; 15 | 16 | public interface BuildInformation { 17 | /** 18 | * Returns the SCM unique ID of this build. This may be a git checkout SHA, or something completely different. 19 | * @return SCM Unique ID String as defined by the backing implementation, or null if none available. 20 | * @since Nov 16, 2017 21 | */ 22 | public String getUniqueBuildId(); 23 | /** 24 | * Returns a String describing the branch of this build, if applicable. 25 | * @return Branch description String, or null if none available. 26 | * @since Nov 16, 2017 27 | */ 28 | public String getBranch(); 29 | }//end BuildInformation 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/mem/Address.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.mem; 15 | 16 | 17 | public abstract class Address extends Number { 18 | 19 | /** 20 | * 21 | */ 22 | private static final long serialVersionUID = -2924146452695795547L; 23 | 24 | public abstract ByteAddress asByteAddress(); 25 | 26 | protected Address(){} 27 | 28 | public VEC4Address asVEC4Address(){ 29 | return new VEC4Address(asByteAddress()); 30 | } 31 | 32 | public PageAddress asPageAddress(){ 33 | return new PageAddress(asByteAddress()); 34 | } 35 | 36 | @Override 37 | public int hashCode(){ 38 | return asByteAddress().intValue(); 39 | } 40 | 41 | }//end Address 42 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/EnemyIntro.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.obj; 15 | 16 | public class EnemyIntro { 17 | private final WorldObject worldObject; 18 | private final String descriptionString; 19 | 20 | public EnemyIntro(WorldObject wo, String descriptionString){ 21 | this.worldObject=wo; 22 | this.descriptionString=descriptionString; 23 | } 24 | 25 | /** 26 | * @return the worldObject 27 | */ 28 | public WorldObject getWorldObject() { 29 | return worldObject; 30 | } 31 | /** 32 | * @return the descriptionString 33 | */ 34 | public String getDescriptionString() { 35 | return descriptionString; 36 | } 37 | }//end EnemyIntro 38 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gui/DefaultControllerConfiguration.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gui; 15 | 16 | import org.jtrfp.trcl.core.Feature; 17 | import org.jtrfp.trcl.ctl.InputDeviceService; 18 | import org.jtrfp.trcl.gui.ControllerInputDevicePanel.ControllerConfiguration; 19 | 20 | public abstract class DefaultControllerConfiguration extends 21 | ControllerConfiguration implements Feature{ 22 | public DefaultControllerConfiguration(){ 23 | super(); 24 | }//end constructor 25 | 26 | @Override 27 | public void apply(InputDeviceService target){ 28 | target.registerFallbackConfiguration(this); 29 | }//end apply() 30 | }//end DefaultControllerConfiguration 31 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/PackedTreeNode.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2017-2022 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | import javax.swing.tree.DefaultMutableTreeNode; 17 | 18 | import lombok.Getter; 19 | import lombok.Setter; 20 | 21 | /** 22 | * Makes DefaultMutableTreeNodes more XMLEncoder-friendly by packing the whole tree with it. 23 | * @author Chuck Ritola 24 | * 25 | */ 26 | 27 | @Getter @Setter 28 | public class PackedTreeNode { 29 | private DefaultMutableTreeNode node; 30 | private DefaultMutableTreeNode root; 31 | 32 | public PackedTreeNode() {} 33 | 34 | public PackedTreeNode(DefaultMutableTreeNode node) { 35 | this.node = node; 36 | this.root = (DefaultMutableTreeNode)(node.getRoot()); 37 | } 38 | }//end PackedTreeNode 39 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/MemoryUsageHint.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import com.jogamp.opengl.GL3; 16 | 17 | public enum MemoryUsageHint { 18 | DymamicDraw(GL3.GL_DYNAMIC_DRAW), StaticDraw(GL3.GL_STATIC_DRAW), StreamDraw( 19 | GL3.GL_STREAM_DRAW), StreamRead(GL3.GL_STREAM_READ), StaticRead( 20 | GL3.GL_STATIC_READ), DynamicRead(GL3.GL_DYNAMIC_READ), DynamicCopy( 21 | GL3.GL_DYNAMIC_COPY), StaticCopy(GL3.GL_STATIC_COPY), StreamCopy( 22 | GL3.GL_STREAM_COPY); 23 | 24 | private final int glEnum; 25 | 26 | private MemoryUsageHint(int glEnum) { 27 | this.glEnum = glEnum; 28 | } 29 | 30 | public int getGLEnumInt() { 31 | return glEnum; 32 | } 33 | }//end MemoryUsageHint 34 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/obj/WorldObject2D.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.obj; 14 | 15 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 16 | 17 | 18 | /** 19 | * A WorldObject which exists flat on the screen, immune to camera position or perspective effects. 20 | * Typically used for GUIs, messages, and HUDs. 21 | * @author Chuck Ritola 22 | * 23 | */ 24 | public class WorldObject2D extends WorldObject{ 25 | 26 | public WorldObject2D(){ 27 | super(); 28 | setTop(Vector3D.PLUS_J); 29 | setHeading(Vector3D.PLUS_K); 30 | setRenderFlag(RenderFlags.IgnoreCamera); 31 | }//end constructor 32 | 33 | @Override 34 | public boolean supportsLoop(){ 35 | return false; 36 | } 37 | }//end WorldObject2D 38 | -------------------------------------------------------------------------------- /src/main/resources/shader/depthQueueFragShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | 17 | // Blended fragment rendering for float-shift queue. 18 | #version 330 19 | 20 | // UNIFORMS 21 | //uniform sampler2D depthTexture; 22 | 23 | // INPUTS 24 | flat in vec4 flatDQPrimID0; 25 | flat in vec4 flatDQPrimID1; 26 | 27 | // OUTPUTS 28 | layout(location=0) out vec4 pushToDepthQueue0; 29 | layout(location=1) out vec4 pushToDepthQueue1; 30 | 31 | void main(){ 32 | pushToDepthQueue0 = flatDQPrimID0; 33 | pushToDepthQueue1 = flatDQPrimID1; 34 | }//end main() 35 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/KeyedExecutor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2017 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | import java.util.List; 17 | import java.util.concurrent.Executor; 18 | 19 | public interface KeyedExecutor extends Executor { 20 | public void execute(Runnable r, K key); 21 | public void execute(Runnable r); 22 | 23 | public void executeAllFromThisThread(); 24 | public void executeFromThisThread(K key); 25 | public List getNullRunnables(); 26 | public Runnable getRunnable(K key); 27 | public void clearAll(); 28 | public void clearAllNulls(); 29 | public void clear(K key); 30 | public void clearAllKeyed(); 31 | public void awaitNextRunnable() throws InterruptedException; 32 | }//end KeyedExecutor 33 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gui/CockpitLayoutF3.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gui; 15 | 16 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 17 | 18 | public class CockpitLayoutF3 implements CockpitLayout { 19 | 20 | @Override 21 | public Vector3D getMiniMapPosition() { 22 | return new Vector3D(0, -1450, 8800); 23 | } 24 | 25 | @Override 26 | public double getMiniMapRadius() { 27 | return 1700; 28 | } 29 | 30 | @Override 31 | public Vector3D getMiniMapNormal() { 32 | return new Vector3D(0, 0.6706855765, 0.7417417727); 33 | } 34 | 35 | @Override 36 | public Vector3D getMiniMapTopOrigin() { 37 | return new Vector3D(0, 0.7417417727, -0.6706855765); 38 | } 39 | }//end CockpitLayoutTV -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/LimitedLifeSpan.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.jtrfp.trcl.obj.WorldObject; 16 | 17 | public class LimitedLifeSpan extends Behavior { 18 | private long timeRemainingMillis=Long.MAX_VALUE; 19 | @Override 20 | public void tick(long tickTimeInMillis){ 21 | final WorldObject p = getParent(); 22 | timeRemainingMillis-=p.getTr().getThreadManager().getElapsedTimeInMillisSinceLastGameTick(); 23 | if(timeRemainingMillis<=0){ 24 | p.probeForBehavior(DeathBehavior.class).die(); 25 | }//end if(remainign) 26 | } 27 | 28 | public LimitedLifeSpan reset(long millisUntilDestroyed){ 29 | timeRemainingMillis=millisUntilDestroyed; 30 | return this; 31 | } 32 | }//end LimitedLifeSpan 33 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gui/CockpitLayoutTV.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gui; 15 | 16 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 17 | 18 | public class CockpitLayoutTV implements CockpitLayout { 19 | 20 | @Override 21 | public Vector3D getMiniMapPosition() { 22 | return new Vector3D(0, -1450, 8800); 23 | } 24 | 25 | @Override 26 | public double getMiniMapRadius() { 27 | return 1200; 28 | } 29 | 30 | @Override 31 | public Vector3D getMiniMapNormal() { 32 | return new Vector3D(0, 0.6706855765, 0.7417417727); 33 | } 34 | 35 | @Override 36 | public Vector3D getMiniMapTopOrigin() { 37 | return new Vector3D(0, 0.7417417727, -0.6706855765); 38 | } 39 | }//end CockpitLayoutTV 40 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ObjectListWindow.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.jtrfp.trcl.gpu.GPU; 16 | import org.jtrfp.trcl.gpu.Renderer; 17 | import org.jtrfp.trcl.mem.MemoryWindow; 18 | 19 | public class ObjectListWindow extends MemoryWindow { 20 | public ObjectListWindow(GPU gpu) { 21 | init(gpu,"ObjectListWindow"); 22 | }// end constructor 23 | 24 | public ObjectListWindow(){} 25 | 26 | public final IntArrayVariable opaqueIDs = new IntArrayVariable( 27 | Renderer.NUM_BLOCKS_PER_PASS); 28 | 29 | public final ByteArrayVariable pageFiller = new ByteArrayVariable(2048); 30 | 31 | public static final int OBJECT_LIST_SIZE_BYTES_PER_PASS = Renderer.NUM_BLOCKS_PER_PASS * 4; 32 | }// end GlobalObjectList 33 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ManuallySetController.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public class ManuallySetController implements Controller { 16 | private double frame=0; 17 | //private boolean stale=true; 18 | private boolean debug=false; 19 | @Override 20 | public double getCurrentFrame() { 21 | if(debug)System.out.println("getCurrentFrame()"); 22 | return frame; 23 | } 24 | 25 | public void setFrame(double f){frame=f;} 26 | /* 27 | @Override 28 | public void unstale() { 29 | stale=false; 30 | } 31 | 32 | @Override 33 | public boolean isStale() { 34 | return stale; 35 | } 36 | */ 37 | @Override 38 | public void setDebugMode(boolean b) { 39 | debug=b; 40 | } 41 | 42 | }//end MenaullySetController 43 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/coll/PropertyListenable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.coll; 14 | 15 | import java.beans.PropertyChangeListener; 16 | 17 | public interface PropertyListenable { 18 | public void addPropertyChangeListener (PropertyChangeListener toAdd); 19 | public void addPropertyChangeListener (String propertyName, PropertyChangeListener toAdd); 20 | public void removePropertyChangeListener(PropertyChangeListener toRemove); 21 | public void removePropertyChangeListener(String propertyName,PropertyChangeListener listener); 22 | public PropertyChangeListener [] getPropertyChangeListeners(); 23 | public PropertyChangeListener [] getPropertyChangeListeners(String propertyName); 24 | public boolean hasListeners(String propertyName); 25 | }//end PropertyListenable 26 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/SatelliteDashboard.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola and contributors. See CREDITS for details. 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import java.io.IOException; 16 | 17 | import org.jtrfp.jtrfp.FileLoadException; 18 | import org.jtrfp.trcl.core.Features; 19 | import org.jtrfp.trcl.core.TRFactory.TR; 20 | import org.jtrfp.trcl.ext.tr.GPUFactory.GPUFeature; 21 | import org.jtrfp.trcl.obj.Sprite2D; 22 | 23 | public class SatelliteDashboard extends Sprite2D { 24 | public SatelliteDashboard(TR tr) throws IllegalAccessException, FileLoadException, IOException{ 25 | super(tr, .000000001, 2, 2, tr.getResourceManager().getSpecialRAWAsTextures("MAPBACK.RAW", tr.getGlobalPalette(), Features.get(tr, GPUFeature.class).getGl(), 0, false, false), true, "SatelliteDashboard"); 26 | } 27 | }//end MapDashboard 28 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/RemovesNAVObjectiveOnDeath.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import java.lang.ref.WeakReference; 16 | 17 | import org.jtrfp.trcl.miss.Mission; 18 | import org.jtrfp.trcl.miss.NAVObjective; 19 | 20 | public class RemovesNAVObjectiveOnDeath extends Behavior implements 21 | DeathListener { 22 | private final WeakReference objective; 23 | private final WeakReference m; 24 | public RemovesNAVObjectiveOnDeath(NAVObjective objective, Mission m) { 25 | this.objective=new WeakReference(objective); 26 | this.m=new WeakReference(m); 27 | } 28 | 29 | @Override 30 | public void notifyDeath() { 31 | m.get().removeNAVObjective(objective.get()); 32 | } 33 | 34 | }//ebd RemovesNAVObjectiveOnDeath 35 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/prop/VetoableChangeListenable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 22016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.prop; 15 | 16 | import java.beans.VetoableChangeListener; 17 | 18 | public interface VetoableChangeListenable { 19 | public void removeVetoableChangeListener(VetoableChangeListener listener); 20 | public void removeVetoableChangeListener(String propertyName, 21 | VetoableChangeListener listener); 22 | public VetoableChangeListener[] getVetoableChangeListeners( 23 | String propertyName); 24 | public VetoableChangeListener[] getVetoableChangeListeners(); 25 | public void addVetoableChangeListener(VetoableChangeListener listener); 26 | public void addVetoableChangeListener(String propertyName, 27 | VetoableChangeListener listener); 28 | 29 | }//end VetoableChangeListenable 30 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/snd/SoundTexture.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | 17 | package org.jtrfp.trcl.snd; 18 | 19 | import org.jtrfp.trcl.gpu.GLTexture; 20 | 21 | public interface SoundTexture { 22 | 23 | public static final int ROW_LENGTH_SAMPLES = 1024; 24 | 25 | double getLengthInRealtimeSeconds(); 26 | 27 | GLTexture getGLTexture(); 28 | 29 | /** 30 | * Effectively the height of the texture. 31 | * @return 32 | * @since Oct 28, 2014 33 | */ 34 | int getNumRows(); 35 | 36 | double getLengthPerRowSeconds(); 37 | 38 | }//end SoundTexture 39 | -------------------------------------------------------------------------------- /src/main/resources/shader/fullScreenTriangleVertexShader.glsl: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola. 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the GNU Public License v3.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.gnu.org/licenses/gpl.html 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | * See the COPYING and CREDITS files for more details. 12 | * 13 | * Contributors: 14 | * chuck - initial API and implementation 15 | ******************************************************************************/ 16 | 17 | // Fills the screen with an attributeless 1-triangle pseudo-quad 18 | // http://image.slidesharecdn.com/vertexshadertricks-billbilodeau-140403092257-phpapp01/95/vertex-shader-tricks-by-bill-bilodeau-amd-at-gdc14-12-638.jpg?cb=1407856474 19 | 20 | #version 330 21 | 22 | // INPUTS 23 | 24 | // OUTPUTS 25 | noperspective out vec2 screenLoc; 26 | 27 | void main(){ 28 | vec2 pos = vec2((gl_VertexID%2),gl_VertexID/2)*3; 29 | gl_Position.xy = pos*2-1; 30 | gl_Position.w = 1; 31 | screenLoc = pos; 32 | }//end main() -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/Texture.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.awt.Color; 16 | import java.awt.geom.Point2D; 17 | 18 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 19 | import org.jtrfp.trcl.TextureBehavior; 20 | import org.jtrfp.trcl.Triangle; 21 | import org.jtrfp.trcl.TriangleList; 22 | import org.jtrfp.trcl.core.TriangleVertexWindow; 23 | 24 | public interface Texture { 25 | public Color getAverageColor(); 26 | 27 | public void apply(TriangleList triangleList, int gpuTVIndex, int numFrames, Triangle thisTriangle, Vector3D pos, TriangleVertexWindow vw); 28 | public void addBehavior(TextureBehavior beh); 29 | public void removeBehavior(TextureBehavior beh); 30 | public Point2D.Double getSize(); 31 | }//end TextureDescription 32 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/AngularVelocity.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.math; 15 | 16 | import org.jtrfp.trcl.flow.PropertyChangeListenable; 17 | 18 | /** 19 | * Representation of angular velocity. Underlying implementation may change values 20 | * if state-dependent. Just-in-time querying is recommended. 21 | * @author Chuck Ritola 22 | * 23 | */ 24 | public interface AngularVelocity extends Normalized, PropertyChangeListenable { 25 | /** 26 | * Returns this object's angular delta per millisecond, negative values supported for 27 | * counter-clockwise rotation. 28 | * @return 29 | * @since Jan 23, 2015 30 | */ 31 | public int toNormalized(); 32 | 33 | public Angle getAngleDeltaNormalizedInTimeDelta(int timeInMillis); 34 | }//end AngularVelocity 35 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/GraphStabilizationListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2021 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | /** 17 | * If a Feature probes for other Features without knowing exactly what it is looking 18 | * for, such as getAllFeaturesOf(...), it may not get all available Features if called early. 19 | * GraphStabilizationListeners are notified when the Feature graph in which they are 20 | * present becomes stabilized, i.e. when all Features are present in the tree.

21 | * Calling Features.get() only assures that the subfeatures of the specified feature are 22 | * present in the graph, but not its peer features. 23 | * @author Chuck Ritola 24 | * 25 | */ 26 | public interface GraphStabilizationListener { 27 | public void graphStabilized(Object target); 28 | }//end GraphStabilizationListener 29 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/MatrixWindow.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.jtrfp.trcl.gpu.GPU; 16 | import org.jtrfp.trcl.mem.MemoryWindow; 17 | 18 | public final class MatrixWindow extends MemoryWindow { 19 | public static final int BYTES_PER_MATRIX = 4 * 16; // 16 floats 20 | public final Double2FloatArrayVariable matrix = new Double2FloatArrayVariable( 21 | 16); 22 | 23 | public MatrixWindow(){} 24 | 25 | public MatrixWindow(GPU gpu) { 26 | init(gpu, "MatrixWindow"); 27 | } 28 | public final void setTransposed(double[] vals, int id, double [] workArray) { 29 | for (int index = 0; index < 16; index++) { 30 | workArray[index] = (float) vals[(index / 4) + (index % 4) * 4]; 31 | }// end for(16) 32 | matrix.set(id, workArray); 33 | } 34 | }// end Matrix 35 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/IntLayeredRandomTransferFunction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.math; 14 | 15 | import org.jtrfp.trcl.IntTransferFunction; 16 | 17 | public class IntLayeredRandomTransferFunction implements IntTransferFunction { 18 | //private static final int ORDER_SIZE=256; 19 | //private static final int [] lookupTable = new int[ORDER_SIZE]; 20 | 21 | private final int layers; 22 | public IntLayeredRandomTransferFunction(int layers){ 23 | this.layers=layers; 24 | } 25 | @Override 26 | public int transfer(int input) { 27 | int result=0; 28 | for(int o=0; o 27 | implements PropertyChangeListener { 28 | 29 | /** 30 | * 31 | */ 32 | private static final long serialVersionUID = 4488917795740229165L; 33 | 34 | @Override 35 | public void propertyChange(PropertyChangeEvent evt) { 36 | add(evt); 37 | } 38 | 39 | }//end PropertyChangeQueue 40 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/FeatureNotApplicableException.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | /** 15 | * Thrown when a Feature is cannot be applied to a specific target instance upon 16 | * further checking. Used when the state of a target is relevant to the applicability 17 | * of this Feature, such as a CanvasProvider which can only provide GL ES 2 when a 18 | * GLExecutor needs a GL3 capable provider. 19 | */ 20 | 21 | package org.jtrfp.trcl.core; 22 | 23 | public class FeatureNotApplicableException extends Exception { 24 | /** 25 | * 26 | */ 27 | private static final long serialVersionUID = -4444133268671396201L; 28 | public FeatureNotApplicableException() {super();} 29 | public FeatureNotApplicableException(String msg) {super(msg);} 30 | public FeatureNotApplicableException(Throwable cause){super(cause);} 31 | }//end FeatureNotApplicableException 32 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/ctl/ControllerSink.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.ctl; 14 | 15 | import java.beans.PropertyChangeListener; 16 | 17 | 18 | public interface ControllerSink { 19 | public static String STATE = "State"; 20 | /** 21 | * One-dimensional value. Buttons are 0 or 1. A joystick axis is [-1,1] where zero is center. 22 | * Triggers are [0,1] where 0 is relaxed. 23 | * @return 24 | * @throws IllegalStateException 25 | * @since Nov 12, 2015 26 | */ 27 | public double getState(); 28 | /** 29 | * Gets the controller name of this input. 30 | * @return 31 | * @since Nov 12, 2015 32 | */ 33 | public void setState(double newState); 34 | public String getName(); 35 | public void addPropertyChangeListener (PropertyChangeListener ls); 36 | public void removePropertyChangeListener(PropertyChangeListener l); 37 | }//end ControllerInput 38 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/AltitudeMap.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | public interface AltitudeMap { 16 | /** 17 | * Returns a height between 0 and 1 18 | * 19 | * @param x 20 | * The x-cell coordinate. Decimals are supported for interpolated 21 | * values 22 | * @param z 23 | * The z-cell coordinate. Decimals are supported for interpolated 24 | * values 25 | * @return 26 | * @since Oct 3, 2012 27 | */ 28 | public double heightAt(double x, double z); 29 | 30 | /** 31 | * Returns width in height cells. 32 | * @return 33 | * @since Sep 23, 2014 34 | */ 35 | public double getWidth(); 36 | 37 | /** 38 | * Returns map height in height cells. 39 | * @return 40 | * @since Sep 23, 2014 41 | */ 42 | public double getHeight(); 43 | }//end AltitudeMap 44 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/beh/SpawnsRandomSmoke.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.beh; 14 | 15 | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; 16 | import org.jtrfp.trcl.core.TRFactory.TR; 17 | import org.jtrfp.trcl.obj.Smoke.SmokeType; 18 | import org.jtrfp.trcl.obj.SmokeSystem; 19 | 20 | public class SpawnsRandomSmoke extends Behavior { 21 | private final SmokeSystem smokeSystem; 22 | public SpawnsRandomSmoke(TR tr){ 23 | this.smokeSystem=tr.getResourceManager().getSmokeSystem(); 24 | } 25 | @Override 26 | public void tick(long timeMillis){ 27 | if(Math.random()<.2){ 28 | Vector3D pos = new Vector3D(getParent().getPositionWithOffset()); 29 | smokeSystem.triggerSmoke( 30 | pos.add(new Vector3D(Math.random()*2000-1000, 31 | 0, 32 | Math.random()*2000-1000)), 33 | SmokeType.Puff);} 34 | }//end _tick(...) 35 | }//end SpawnsRandomSmoke 36 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/math/ColumnMajorTranslationMatrixFactory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.math; 15 | 16 | import org.jtrfp.trcl.gpu.TranslationMatrixFactory; 17 | 18 | public class ColumnMajorTranslationMatrixFactory implements 19 | TranslationMatrixFactory { 20 | 21 | @Override 22 | public void applyTranslationMatrix(double[] pos, double[] dest) { 23 | final double x=pos[0], y=pos[1], z=pos[2]; 24 | final double x3 = dest[3]; 25 | dest[0]+=x3*x; 26 | dest[1]+=x3*y; 27 | dest[2]+=x3*z; 28 | 29 | final double y3 = dest[7]; 30 | dest[4]+=y3*x; 31 | dest[5]+=y3*y; 32 | dest[6]+=y3*z; 33 | 34 | final double z3 = dest[11]; 35 | dest[8] +=z3*x; 36 | dest[9] +=z3*y; 37 | dest[10]+=z3*z; 38 | 39 | final double w3 = dest[15]; 40 | dest[12]+=w3*x; 41 | dest[13]+=w3*y; 42 | dest[14]+=w3*z; 43 | }//end applyTranslationMatrix(...) 44 | 45 | }//end ColumnMajorTranslationMatrixFactory 46 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/mem/ByteAddress.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2015 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.mem; 14 | 15 | 16 | public class ByteAddress extends Address { 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 8005927090195192255L; 21 | private final long addressInBytes; 22 | 23 | public ByteAddress(long addressInBytes){ 24 | super(); 25 | this.addressInBytes=addressInBytes; 26 | } 27 | 28 | @Override 29 | public double doubleValue() { 30 | return addressInBytes; 31 | } 32 | 33 | @Override 34 | public float floatValue() { 35 | return addressInBytes; 36 | } 37 | 38 | @Override 39 | public int intValue() { 40 | return (int)addressInBytes; 41 | } 42 | 43 | @Override 44 | public long longValue() { 45 | return addressInBytes; 46 | } 47 | 48 | @Override 49 | public ByteAddress asByteAddress() { 50 | return this; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gpu/GLRenderBuffer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl.gpu; 14 | 15 | import java.nio.IntBuffer; 16 | 17 | import com.jogamp.opengl.GL3; 18 | 19 | public class GLRenderBuffer { 20 | private GL3 gl; 21 | private int id; 22 | GLRenderBuffer(GL3 gl){ 23 | this.gl=gl; 24 | IntBuffer result = IntBuffer.wrap(new int[1]); 25 | gl.glGenRenderbuffers(1, result); 26 | id = result.get(0); 27 | }//end constructor 28 | public GLRenderBuffer bind() { 29 | gl.glBindRenderbuffer(GL3.GL_RENDERBUFFER, id); 30 | return this; 31 | } 32 | public GLRenderBuffer setStorage(int internalFormat, int width, int height) { 33 | gl.glRenderbufferStorage(GL3.GL_RENDERBUFFER, internalFormat, width, height); 34 | return this; 35 | } 36 | public GLRenderBuffer setGl(GL3 gl){ 37 | this.gl=gl; 38 | return this; 39 | } 40 | public int getId() { 41 | return id; 42 | } 43 | }//end GLRenderBuffer 44 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/gui/LabelPropertyBinding.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2017 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.gui; 15 | 16 | import javax.swing.JLabel; 17 | import javax.swing.SwingUtilities; 18 | 19 | import org.jtrfp.trcl.flow.AbstractPropertyBinding; 20 | 21 | public class LabelPropertyBinding 22 | extends AbstractPropertyBinding { 23 | private final JLabel label; 24 | public LabelPropertyBinding(String propertyName, Object bindingBean, JLabel label, Class propertyType){ 25 | super(propertyName, bindingBean, propertyType); 26 | this.label = label; 27 | }//end constructor 28 | 29 | @Override 30 | protected void setUIValue(final PROPERTY_TYPE newValue) { 31 | SwingUtilities.invokeLater(new Runnable(){ 32 | @Override 33 | public void run() { 34 | if(label != null) 35 | label.setText(newValue.toString()); 36 | }}); 37 | }//end setUIValue 38 | }//end LabelPropertyBinding 39 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/RawTextureMeshWrapper.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | package org.jtrfp.trcl; 14 | 15 | import org.jtrfp.trcl.file.CLRFile; 16 | import org.jtrfp.trcl.gpu.Texture; 17 | 18 | public class RawTextureMeshWrapper implements TextureMesh { 19 | private static final int WIDTH = 256; 20 | CLRFile file; 21 | Texture[] palette; 22 | 23 | // Texture [][] textures = new Texture[WIDTH][WIDTH]; 24 | 25 | public RawTextureMeshWrapper(CLRFile f, 26 | Texture[] texturePalette) { 27 | file = f; 28 | palette = texturePalette; 29 | } 30 | 31 | @Override 32 | public Texture textureAt(double x, double z) { 33 | if (x < 0) 34 | x += WIDTH; 35 | if (z < 0) 36 | z += WIDTH; 37 | try { 38 | return palette[file.valueAt((int) z % WIDTH, (int) x % WIDTH)]; 39 | } catch (Exception e) { 40 | e.printStackTrace(); 41 | return null; 42 | } 43 | }//end textureAt(...) 44 | 45 | }//end RawTextureMeshWrapper 46 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/core/FeatureLoadOrderComparator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2016 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.core; 15 | 16 | import java.util.Comparator; 17 | 18 | public class FeatureLoadOrderComparator implements Comparator { 19 | 20 | @Override 21 | public int compare(Object left, Object right) { 22 | if( left.equals(right) ) 23 | return 0; 24 | int leftOrder = LoadOrderAware.DEFAULT, rightOrder = LoadOrderAware.DEFAULT; 25 | if(left instanceof LoadOrderAware) 26 | leftOrder = ((LoadOrderAware)left).getFeatureLoadPriority(); 27 | if(right instanceof LoadOrderAware) 28 | rightOrder = ((LoadOrderAware)right).getFeatureLoadPriority(); 29 | 30 | final int result = leftOrder - rightOrder; 31 | if(result == 0)//Sets will mistake this as equivalence! 32 | return left.hashCode() - right.hashCode();//Use hashcode instead to break the tie. 33 | else return result; 34 | }//end compare(...) 35 | 36 | }//end FeatureLoadOrderComparator 37 | -------------------------------------------------------------------------------- /src/main/java/org/jtrfp/trcl/img/vq/RAWVectorList.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is part of TERMINAL RECALL 3 | * Copyright (c) 2012-2014 Chuck Ritola 4 | * Part of the jTRFP.org project 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the GNU Public License v3.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Contributors: 11 | * chuck - initial API and implementation 12 | ******************************************************************************/ 13 | 14 | package org.jtrfp.trcl.img.vq; 15 | 16 | import org.jtrfp.trcl.file.RAWFile; 17 | 18 | public final class RAWVectorList implements VectorList { 19 | private final RAWFile raw; 20 | private final byte [] rawBytes; 21 | 22 | public RAWVectorList(RAWFile raw){ 23 | this.raw =raw; 24 | this.rawBytes =raw.getRawBytes(); 25 | } 26 | 27 | @Override 28 | public int getNumVectors() { 29 | return raw.getRawBytes().length; 30 | } 31 | 32 | @Override 33 | public int getNumComponentsPerVector() { 34 | return 1; 35 | } 36 | 37 | @Override 38 | public double componentAt(int vectorIndex, int componentIndex) { 39 | return (rawBytes[vectorIndex]&0xFF); 40 | } 41 | 42 | @Override 43 | public void setComponentAt(int vectorIndex, int componentIndex, double value) { 44 | rawBytes[vectorIndex]=(byte)(value*255.); 45 | } 46 | 47 | }//end RAWVectorList 48 | --------------------------------------------------------------------------------