├── .gitattributes ├── .gitignore ├── .idea ├── .idea.riiablo │ └── .idea │ │ └── icon.svg └── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── .run ├── AnimationTool.run.xml ├── BNCS.run.xml ├── BNLS.run.xml ├── BinGenerationTool.run.xml ├── COF_Finder.run.xml ├── D2GS.run.xml ├── D2_Finder.run.xml ├── ExcelGenerationTool.run.xml ├── desktop__d2gs_.run.xml ├── desktop__debug_.run.xml ├── desktop__debug___1280x720_.run.xml ├── desktop__debug___1920x1080_.run.xml ├── desktop__debug___640x480_.run.xml ├── desktop__debug___720x360_.run.xml ├── desktop__debug___800x600_.run.xml ├── desktop__debug___840x360_.run.xml ├── desktop__debug___853x480_.run.xml ├── desktop__debug___854x480_.run.xml ├── desktop__networking_.run.xml ├── desktop__resolution_.run.xml ├── riiablo_desktop.run.xml ├── riiablo_desktop__debug_.run.xml ├── riiablo_tools_camera__run_.run.xml ├── riiablo_tools_d2s_reader__run___args__Tirant__.run.xml ├── riiablo_tools_direction__run_.run.xml ├── riiablo_tools_font_metrics__run___args____font_font8__.run.xml ├── riiablo_tools_map_viewer__run___args____act_0___diff_0___seed_0__.run.xml └── riiablo_tools_mpq_viewer__run_.run.xml ├── AUTHORS ├── LICENSE ├── README.md ├── android ├── AndroidManifest.xml ├── build.gradle ├── ic_launcher-web.png ├── proguard-rules.pro ├── project.properties ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── drawable-xxxhdpi │ │ └── ic_launcher.png │ └── values │ │ ├── strings.xml │ │ └── styles.xml └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── AndroidLauncher.java ├── assets ├── (listfile) ├── (listfile).0 ├── (listfile).1 ├── consolas12.fnt ├── consolas12.png ├── consolas16.fnt ├── consolas16.png ├── consolas48.fnt ├── consolas48.png ├── consolas8.fnt ├── consolas8.png ├── data │ ├── ds1types.txt │ ├── obj.txt │ ├── quests.txt │ └── speech.txt ├── default.fnt ├── default.png ├── ds1edit.dt1 ├── ic_launcher_128.png ├── ic_launcher_16.png ├── ic_launcher_32.png ├── lang │ └── Client.properties ├── profiler │ ├── uiskin.atlas │ ├── uiskin.json │ └── uiskin.png ├── shaders │ ├── indexpalette.frag │ ├── indexpalette.vert │ ├── indexpalette2.frag │ ├── indexpalette2.vert │ ├── indexpalette3.frag │ └── indexpalette3.vert └── textures │ ├── touchBackground.png │ └── touchKnob.png ├── build.gradle ├── core ├── build.gradle ├── gen │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── net │ │ └── packet │ │ ├── bncs │ │ ├── BNCS.java │ │ ├── BNCSData.java │ │ ├── ChatEvent.java │ │ └── EID.java │ │ ├── bnls │ │ ├── BNLS.java │ │ ├── BNLSData.java │ │ ├── ConnectionAccepted.java │ │ ├── ConnectionClosed.java │ │ ├── LoginResponse.java │ │ ├── QueryRealms.java │ │ └── Realm.java │ │ ├── d2gs │ │ ├── AngleP.java │ │ ├── BeltToCursor.java │ │ ├── BodyToCursor.java │ │ ├── ClassP.java │ │ ├── CofAlphasP.java │ │ ├── CofComponentsP.java │ │ ├── CofTransformsP.java │ │ ├── ComponentP.java │ │ ├── Connection.java │ │ ├── CursorToBelt.java │ │ ├── CursorToBody.java │ │ ├── CursorToGround.java │ │ ├── CursorToStore.java │ │ ├── D2GS.java │ │ ├── D2GSData.java │ │ ├── DS1ObjectWrapperP.java │ │ ├── Disconnect.java │ │ ├── EntityFlags.java │ │ ├── EntitySync.java │ │ ├── GroundToCursor.java │ │ ├── ItemP.java │ │ ├── MonsterP.java │ │ ├── Ping.java │ │ ├── PlayerP.java │ │ ├── PositionP.java │ │ ├── RunToEntity.java │ │ ├── RunToLocation.java │ │ ├── StoreToCursor.java │ │ ├── SwapBeltItem.java │ │ ├── SwapBodyItem.java │ │ ├── SwapStoreItem.java │ │ ├── VelocityP.java │ │ ├── WalkToEntity.java │ │ ├── WalkToLocation.java │ │ └── WarpP.java │ │ ├── mcp │ │ ├── ConnectionAccepted.java │ │ ├── ConnectionClosed.java │ │ ├── CreateGame.java │ │ ├── GameSession.java │ │ ├── JoinGame.java │ │ ├── ListGames.java │ │ ├── MCP.java │ │ ├── MCPData.java │ │ └── Result.java │ │ ├── msi │ │ ├── MSI.java │ │ ├── MSIData.java │ │ ├── Result.java │ │ └── StartInstance.java │ │ └── netty │ │ ├── Connection.java │ │ ├── ConnectionState.java │ │ ├── Disconnect.java │ │ ├── Netty.java │ │ ├── NettyData.java │ │ └── Ping.java └── src │ ├── main │ ├── flatbuffers │ │ └── com │ │ │ └── riiablo │ │ │ └── net │ │ │ ├── bncs │ │ │ ├── BNCS.fbs │ │ │ └── ChatEvent.fbs │ │ │ ├── bnls │ │ │ ├── BNLS.fbs │ │ │ ├── ConnectionAccepted.fbs │ │ │ ├── ConnectionClosed.fbs │ │ │ ├── LoginResponse.fbs │ │ │ └── QueryRealms.fbs │ │ │ ├── d2gs │ │ │ ├── D2GS.fbs │ │ │ ├── ItemManagement.fbs │ │ │ ├── Networking.fbs │ │ │ ├── PlayerController.fbs │ │ │ └── Sync.fbs │ │ │ ├── mcp │ │ │ ├── ConnectionAccepted.fbs │ │ │ ├── ConnectionClosed.fbs │ │ │ ├── CreateGame.fbs │ │ │ ├── JoinGame.fbs │ │ │ ├── ListGames.fbs │ │ │ ├── MCP.fbs │ │ │ └── Result.fbs │ │ │ ├── msi │ │ │ ├── MSI.fbs │ │ │ └── StartInstance.fbs │ │ │ └── netty │ │ │ ├── Netty.fbs │ │ │ └── Packets.fbs │ └── java │ │ └── com │ │ └── riiablo │ │ ├── COFs.java │ │ ├── CharacterClass.java │ │ ├── Client.java │ │ ├── Colormaps.java │ │ ├── Colors.java │ │ ├── CommandProcessor.java │ │ ├── Commands.java │ │ ├── Cursor.java │ │ ├── Cvars.java │ │ ├── Files.java │ │ ├── Fonts.java │ │ ├── GdxCommandManager.java │ │ ├── GdxCvarManager.java │ │ ├── GdxFileHandleResolvers.java │ │ ├── GdxKeyMapper.java │ │ ├── GdxLoggerManager.java │ │ ├── HomeFileHandleResolver.java │ │ ├── Keys.java │ │ ├── Metrics.java │ │ ├── Palettes.java │ │ ├── Riiablo.java │ │ ├── Textures.java │ │ ├── ai │ │ ├── AI.java │ │ ├── Fallen.java │ │ ├── Idle.java │ │ ├── Npc.java │ │ ├── QuillRat.java │ │ └── Zombie.java │ │ ├── asset │ │ ├── Adapter.java │ │ ├── AdapterNotFound.java │ │ ├── AssetContainer.java │ │ ├── AssetDesc.java │ │ ├── AssetLoadException.java │ │ ├── AssetLoader.java │ │ ├── AssetManager.java │ │ ├── AssetParams.java │ │ ├── AssetPath.java │ │ ├── AssetUtils.java │ │ ├── EmptyArray.java │ │ ├── FileHandleResolver.java │ │ ├── InvalidDependency.java │ │ ├── InvalidParams.java │ │ ├── LoaderNotFound.java │ │ ├── ParamsNotFound.java │ │ ├── PriorityContainer.java │ │ ├── ResolverNotFound.java │ │ ├── SyncMessage.java │ │ ├── adapter │ │ │ ├── GdxFileHandleAdapter.java │ │ │ └── MpqFileHandleAdapter.java │ │ ├── loader │ │ │ ├── CofLoader.java │ │ │ ├── Dc6Loader.java │ │ │ ├── DccLoader.java │ │ │ ├── Ds1Loader.java │ │ │ ├── Dt1Loader.java │ │ │ ├── MusicLoader.java │ │ │ └── PaletteLoader.java │ │ ├── param │ │ │ ├── DcParams.java │ │ │ ├── Ds1Params.java │ │ │ ├── Dt1Params.java │ │ │ └── MpqParams.java │ │ └── resolver │ │ │ └── GdxFileHandleResolver.java │ │ ├── attributes │ │ ├── Attributes.java │ │ ├── AttributesUpdater.java │ │ ├── GemGenerator.java │ │ ├── PropertiesGenerator.java │ │ ├── Stat.java │ │ ├── StatFormatter.java │ │ ├── StatList.java │ │ ├── StatListFlags.java │ │ ├── StatListLabeler.java │ │ ├── StatListReader.java │ │ ├── StatListRef.java │ │ ├── StatListWriter.java │ │ ├── StatRef.java │ │ └── UpdateSequence.java │ │ ├── audio │ │ ├── Audio.java │ │ ├── MusicController.java │ │ ├── MusicVolumeController.java │ │ ├── ServerAudio.java │ │ ├── SoundVolumeController.java │ │ ├── VolumeControlled.java │ │ ├── VolumeControlledMusicLoader.java │ │ ├── VolumeControlledSoundLoader.java │ │ └── VolumeController.java │ │ ├── camera │ │ ├── IsometricCamera.java │ │ └── OrthographicCamera.java │ │ ├── codec │ │ ├── Animation.java │ │ ├── COF.java │ │ ├── COFD2.java │ │ ├── D2.java │ │ ├── DC.java │ │ ├── DC6.java │ │ ├── DCC.java │ │ ├── FontTBL.java │ │ ├── Index.java │ │ ├── PL2.java │ │ ├── Palette.java │ │ ├── StringTBL.java │ │ ├── StringTBLs.java │ │ ├── TXT.java │ │ ├── excel │ │ │ ├── Affix.java │ │ │ ├── ArmType.java │ │ │ ├── Armor.java │ │ │ ├── BodyLocs.java │ │ │ ├── CharStats.java │ │ │ ├── Colors.java │ │ │ ├── CompCode.java │ │ │ ├── Composit.java │ │ │ ├── DifficultyLevels.java │ │ │ ├── Excel.java │ │ │ ├── Gems.java │ │ │ ├── Inventory.java │ │ │ ├── ItemEntry.java │ │ │ ├── ItemStatCost.java │ │ │ ├── ItemTypes.java │ │ │ ├── Levels.java │ │ │ ├── LowQualityItems.java │ │ │ ├── LvlPrest.java │ │ │ ├── LvlTypes.java │ │ │ ├── LvlWarp.java │ │ │ ├── MagicAffix.java │ │ │ ├── MagicPrefix.java │ │ │ ├── MagicSuffix.java │ │ │ ├── Misc.java │ │ │ ├── Missiles.java │ │ │ ├── ModeEntry.java │ │ │ ├── MonAI.java │ │ │ ├── MonMode.java │ │ │ ├── MonPreset.java │ │ │ ├── MonStats.java │ │ │ ├── MonStats2.java │ │ │ ├── Obj.java │ │ │ ├── ObjMode.java │ │ │ ├── Objects.java │ │ │ ├── Overlay.java │ │ │ ├── PlayerClass.java │ │ │ ├── PlrMode.java │ │ │ ├── PlrType.java │ │ │ ├── Properties.java │ │ │ ├── QualityItems.java │ │ │ ├── Quests.java │ │ │ ├── RareAffix.java │ │ │ ├── RarePrefix.java │ │ │ ├── RareSuffix.java │ │ │ ├── Runes.java │ │ │ ├── SetItems.java │ │ │ ├── Sets.java │ │ │ ├── SkillDesc.java │ │ │ ├── Skills.java │ │ │ ├── Sounds.java │ │ │ ├── Speech.java │ │ │ ├── TxtParser.java │ │ │ ├── UniqueItems.java │ │ │ ├── UniquePrefix.java │ │ │ ├── UniqueSuffix.java │ │ │ ├── WeaponClass.java │ │ │ └── Weapons.java │ │ └── util │ │ │ ├── BBox.java │ │ │ ├── BitStream.java │ │ │ └── ReverseBitStream.java │ │ ├── command │ │ ├── Action.java │ │ ├── Command.java │ │ ├── CommandManager.java │ │ ├── OptionalParameter.java │ │ ├── Parameter.java │ │ └── ParameterException.java │ │ ├── concurrent │ │ └── PromiseCombiner.java │ │ ├── console │ │ ├── Console.java │ │ ├── ConsoleUtils.java │ │ └── RenderedConsole.java │ │ ├── cvar │ │ ├── Cvar.java │ │ ├── CvarManager.java │ │ ├── CvarStateAdapter.java │ │ ├── GdxFileSuggester.java │ │ ├── SaveableCvarManager.java │ │ └── SuggestionProvider.java │ │ ├── engine │ │ ├── Direction.java │ │ ├── Dirty.java │ │ ├── Engine.java │ │ ├── EngineConfig.java │ │ ├── EntityFactory.java │ │ ├── EntitySystemAdapter.java │ │ ├── IntervalBaseSystem.java │ │ ├── client │ │ │ ├── AnimationStepper.java │ │ │ ├── AutoInteracter.java │ │ │ ├── ClientEntityFactory.java │ │ │ ├── ClientItemManager.java │ │ │ ├── ClientNetworkReceiver.java │ │ │ ├── ClientNetworkSynchronizer.java │ │ │ ├── CofAlphaHandler.java │ │ │ ├── CofLayerCacher.java │ │ │ ├── CofLayerLoader.java │ │ │ ├── CofLayerUnloader.java │ │ │ ├── CofLoader.java │ │ │ ├── CofResolver.java │ │ │ ├── CofTransformHandler.java │ │ │ ├── CofUnloader.java │ │ │ ├── CursorMovementSystem.java │ │ │ ├── DamageHandler.java │ │ │ ├── DeathHandler.java │ │ │ ├── DialogManager.java │ │ │ ├── DirectionResolver.java │ │ │ ├── FootstepEmitter.java │ │ │ ├── HoveredManager.java │ │ │ ├── ItemEffectManager.java │ │ │ ├── ItemLoader.java │ │ │ ├── LabelManager.java │ │ │ ├── MenuManager.java │ │ │ ├── MissileLoader.java │ │ │ ├── MonsterLabelManager.java │ │ │ ├── NetworkIdManager.java │ │ │ ├── NetworkProfiler.java │ │ │ ├── NetworkedClientItemManager.java │ │ │ ├── OverlayManager.java │ │ │ ├── OverlayStepper.java │ │ │ ├── Pinger.java │ │ │ ├── SelectableManager.java │ │ │ ├── SkillCastHandler.java │ │ │ ├── SoundEmitterHandler.java │ │ │ ├── WarpSubstManager.java │ │ │ ├── ZoneChangeTracker.java │ │ │ ├── ZoneEntryDisplayer.java │ │ │ ├── component │ │ │ │ ├── AnimationWrapper.java │ │ │ │ ├── BBoxWrapper.java │ │ │ │ ├── CofComponentDescriptors.java │ │ │ │ ├── CofDescriptor.java │ │ │ │ ├── CofDirtyComponents.java │ │ │ │ ├── CofLoadingComponents.java │ │ │ │ ├── CofWrapper.java │ │ │ │ ├── Hovered.java │ │ │ │ ├── Label.java │ │ │ │ ├── Overlay.java │ │ │ │ └── Selectable.java │ │ │ ├── debug │ │ │ │ ├── Box2DDebugger.java │ │ │ │ ├── PathDebugger.java │ │ │ │ ├── PathfindDebugger.java │ │ │ │ └── RenderSystemDebugger.java │ │ │ └── event │ │ │ │ └── InteractEvent.java │ │ └── server │ │ │ ├── AIStepper.java │ │ │ ├── Actioneer.java │ │ │ ├── AngularVelocity.java │ │ │ ├── AnimDataResolver.java │ │ │ ├── AnimStepper.java │ │ │ ├── Box2DDisposer.java │ │ │ ├── Box2DSynchronizerPost.java │ │ │ ├── Box2DSynchronizerPre.java │ │ │ ├── CofManager.java │ │ │ ├── ItemInteractor.java │ │ │ ├── ItemManager.java │ │ │ ├── MissileHandler.java │ │ │ ├── ObjectCollisionUpdater.java │ │ │ ├── ObjectInitializer.java │ │ │ ├── ObjectInteractor.java │ │ │ ├── Pathfinder.java │ │ │ ├── PlayerItemHandler.java │ │ │ ├── SequenceHandler.java │ │ │ ├── SerializationManager.java │ │ │ ├── ServerEntityFactory.java │ │ │ ├── ServerItemManager.java │ │ │ ├── ServerNetworkIdManager.java │ │ │ ├── VelocityAdder.java │ │ │ ├── VelocityModeChanger.java │ │ │ ├── WarpInteractor.java │ │ │ ├── ZoneMovementModesChanger.java │ │ │ ├── component │ │ │ ├── AIWrapper.java │ │ │ ├── Angle.java │ │ │ ├── AnimData.java │ │ │ ├── AttributesWrapper.java │ │ │ ├── Box2DBody.java │ │ │ ├── Casting.java │ │ │ ├── Class.java │ │ │ ├── Classname.java │ │ │ ├── CofAlphas.java │ │ │ ├── CofComponents.java │ │ │ ├── CofReference.java │ │ │ ├── CofTransforms.java │ │ │ ├── DS1ObjectWrapper.java │ │ │ ├── Flags.java │ │ │ ├── Interactable.java │ │ │ ├── Item.java │ │ │ ├── MapWrapper.java │ │ │ ├── MenuWrapper.java │ │ │ ├── Missile.java │ │ │ ├── Monster.java │ │ │ ├── MovementModes.java │ │ │ ├── Networked.java │ │ │ ├── Object.java │ │ │ ├── PathWrapper.java │ │ │ ├── Pathfind.java │ │ │ ├── Player.java │ │ │ ├── Position.java │ │ │ ├── Running.java │ │ │ ├── Sequence.java │ │ │ ├── Size.java │ │ │ ├── SoundEmitter.java │ │ │ ├── Target.java │ │ │ ├── Velocity.java │ │ │ ├── Warp.java │ │ │ ├── ZoneAware.java │ │ │ └── serializer │ │ │ │ ├── AngleSerializer.java │ │ │ │ ├── ClassSerializer.java │ │ │ │ ├── CofAlphasSerializer.java │ │ │ │ ├── CofComponentsSerializer.java │ │ │ │ ├── CofTransformsSerializer.java │ │ │ │ ├── DS1ObjectWrapperSerializer.java │ │ │ │ ├── FlatBuffersSerializer.java │ │ │ │ ├── ItemSerializer.java │ │ │ │ ├── MonsterSerializer.java │ │ │ │ ├── PlayerSerializer.java │ │ │ │ ├── PositionSerializer.java │ │ │ │ ├── VelocitySerializer.java │ │ │ │ └── WarpSerializer.java │ │ │ └── event │ │ │ ├── AlphaChangeEvent.java │ │ │ ├── AnimDataFinishedEvent.java │ │ │ ├── AnimDataKeyframeEvent.java │ │ │ ├── CofChangeEvent.java │ │ │ ├── DamageEvent.java │ │ │ ├── DeathEvent.java │ │ │ ├── ModeChangeEvent.java │ │ │ ├── NpcInteractionEvent.java │ │ │ ├── SkillCastEvent.java │ │ │ ├── SkillDoEvent.java │ │ │ ├── SkillStartEvent.java │ │ │ ├── TransformChangeEvent.java │ │ │ ├── WClassChangeEvent.java │ │ │ └── ZoneChangeEvent.java │ │ ├── entity │ │ ├── CharacterPreview.java │ │ ├── Direction.java │ │ └── Entity.java │ │ ├── excel │ │ ├── BinGenerator.java │ │ ├── ColumnFormat.java │ │ ├── Entry.java │ │ ├── Excel.java │ │ ├── ForeignKey.java │ │ ├── Indexed.java │ │ ├── ParseException.java │ │ ├── PrimaryKey.java │ │ ├── SerializedWith.java │ │ ├── Serializer.java │ │ ├── SerializerGenerator.java │ │ ├── SerializerSourceGenerator.java │ │ ├── TxtParser.java │ │ ├── package-info.java │ │ └── txt │ │ │ └── MonStats.java │ │ ├── file │ │ ├── Animation.java │ │ ├── Cof.java │ │ ├── Dc.java │ │ ├── Dc6.java │ │ ├── Dc6Decoder.java │ │ ├── Dcc.java │ │ ├── DccDecoder.java │ │ └── Palette.java │ │ ├── graphics │ │ ├── BlendMode.java │ │ ├── BorderedPaletteIndexedDrawable.java │ │ ├── PaletteIndexedBatch.java │ │ ├── PaletteIndexedColorDrawable.java │ │ └── PaletteIndexedPixmap.java │ │ ├── io │ │ ├── BitConstants.java │ │ ├── BitConstraints.java │ │ ├── BitInput.java │ │ ├── BitOutput.java │ │ ├── BitUtils.java │ │ ├── ByteInput.java │ │ ├── ByteInputStream.java │ │ ├── ByteOutput.java │ │ ├── EndOfInput.java │ │ ├── InvalidFormat.java │ │ ├── SignatureMismatch.java │ │ └── UnsafeNarrowing.java │ │ ├── item │ │ ├── BodyLoc.java │ │ ├── Item.java │ │ ├── ItemCodes.java │ │ ├── ItemGenerator.java │ │ ├── ItemLabeler.java │ │ ├── ItemReader.java │ │ ├── ItemUtils.java │ │ ├── ItemWrapper.java │ │ ├── ItemWriter.java │ │ ├── Location.java │ │ ├── LowQuality.java │ │ ├── Quality.java │ │ ├── RareQualityData.java │ │ ├── RunewordData.java │ │ ├── StoreLoc.java │ │ ├── Type.java │ │ └── VendorGenerator.java │ │ ├── key │ │ ├── KeyMapper.java │ │ ├── MappedKey.java │ │ ├── MappedKeyStateAdapter.java │ │ └── SaveableKeyMapper.java │ │ ├── loader │ │ ├── BitmapFontLoader.java │ │ ├── COFLoader.java │ │ ├── DC6Loader.java │ │ ├── DCCLoader.java │ │ ├── IndexLoader.java │ │ ├── PaletteLoader.java │ │ └── TXTLoader.java │ │ ├── logger │ │ ├── Appender.java │ │ ├── AsyncOutputStreamAppender.java │ │ ├── Encoder.java │ │ ├── Level.java │ │ ├── LogEvent.java │ │ ├── LogManager.java │ │ ├── Logger.java │ │ ├── LoggerRegistry.java │ │ ├── MDC.java │ │ ├── OutputStreamAppender.java │ │ ├── RiiabloEncoder.java │ │ ├── SimpleEncoder.java │ │ ├── StringMap.java │ │ └── message │ │ │ ├── FormattedMessage.java │ │ │ ├── FormattedMessageFactory.java │ │ │ ├── Message.java │ │ │ ├── MessageFactory.java │ │ │ ├── ParameterFormatter.java │ │ │ ├── ParameterizedMessage.java │ │ │ ├── ParameterizedMessageFactory.java │ │ │ ├── PooledFormattedMessage.java │ │ │ ├── PooledFormattedMessageFactory.java │ │ │ ├── PooledParameterizedMessage.java │ │ │ └── PooledParameterizedMessageFactory.java │ │ ├── map │ │ ├── Act1MapBuilder.java │ │ ├── Act2MapBuilder.java │ │ ├── Act3MapBuilder.java │ │ ├── Act4MapBuilder.java │ │ ├── Act5MapBuilder.java │ │ ├── Box2DPhysics.java │ │ ├── ByteArrayPool.java │ │ ├── DS1.java │ │ ├── DS1Loader.java │ │ ├── DT1.java │ │ ├── DT1Loader.java │ │ ├── DT1s.java │ │ ├── Map.java │ │ ├── MapBuilder.java │ │ ├── MapGraph.java │ │ ├── MapManager.java │ │ ├── Material.java │ │ ├── Orientation.java │ │ ├── RenderSystem.java │ │ ├── TileArrayPool.java │ │ └── pfa │ │ │ ├── AStarPathFinder.java │ │ │ ├── GraphPath.java │ │ │ ├── JPSPathFinder.java │ │ │ ├── PathFinder.java │ │ │ ├── PathSmoother.java │ │ │ ├── Point2.java │ │ │ └── RaycastCollisionDetector.java │ │ ├── map2 │ │ ├── Chunk.java │ │ ├── DS1.java │ │ ├── DS1Reader.java │ │ ├── DT1.java │ │ ├── DT1Reader.java │ │ ├── IndexDefs.java │ │ ├── Map.java │ │ ├── MapGenerator.java │ │ ├── Orientation.java │ │ ├── Prefab.java │ │ ├── TileGenerator.java │ │ ├── TileRenderer.java │ │ ├── Zone.java │ │ ├── random │ │ │ ├── Random.java │ │ │ └── Seed.java │ │ └── util │ │ │ ├── ArrayPool.java │ │ │ ├── BucketPool.java │ │ │ ├── DebugMode.java │ │ │ └── ZoneGraph.java │ │ ├── map5 │ │ ├── Block.java │ │ ├── Ds1.java │ │ ├── Ds1Decoder.java │ │ ├── Dt1.java │ │ ├── Dt1Decoder.java │ │ ├── Dt1Decoder7.java │ │ ├── Tile.java │ │ ├── TileRenderer.java │ │ ├── TileType.java │ │ └── util │ │ │ ├── ArrayPool.java │ │ │ └── BucketPool.java │ │ ├── math │ │ └── Fixed.java │ │ ├── mpq │ │ ├── MPQ.java │ │ ├── MPQFileHandle.java │ │ ├── MPQFileHandleResolver.java │ │ ├── MPQInputStream.java │ │ └── util │ │ │ ├── ADPCM.java │ │ │ ├── Decompressor.java │ │ │ ├── Decryptor.java │ │ │ ├── Exploder.java │ │ │ ├── Huffman.java │ │ │ └── JZLib.java │ │ ├── mpq_bytebuf │ │ ├── Decoder.java │ │ ├── DecoderExecutorGroup.java │ │ ├── Decrypter.java │ │ ├── Mpq.java │ │ ├── MpqBufferStream.java │ │ ├── MpqFileHandle.java │ │ ├── MpqFileResolver.java │ │ ├── MpqStream.java │ │ ├── package-info.java │ │ └── util │ │ │ ├── ADPCM.java │ │ │ ├── Exploder.java │ │ │ └── Huffman.java │ │ ├── net │ │ ├── Account.java │ │ └── GameSession.java │ │ ├── profiler │ │ ├── GpuSystem.java │ │ ├── ProfilerInvocationStrategy.java │ │ ├── ProfilerManager.java │ │ ├── ProfilerPlugin.java │ │ ├── ProfilerSystem.java │ │ ├── SystemProfiler.java │ │ └── SystemProfilerGUI.java │ │ ├── save │ │ ├── CharData.java │ │ ├── D2S.java │ │ ├── D2SReader.java │ │ ├── D2SReader96.java │ │ ├── D2SWriter.java │ │ ├── D2SWriter96.java │ │ ├── D2SWriterStub.java │ │ ├── ItemController.java │ │ └── ItemData.java │ │ ├── screen │ │ ├── AudioUnpackerScreen.java │ │ ├── CreateCharacterScreen.java │ │ ├── GameLoadingScreen.java │ │ ├── GameScreen.java │ │ ├── LoadingScreen.java │ │ ├── LobbyScreen.java │ │ ├── LoginScreen.java │ │ ├── MenuScreen.java │ │ ├── MultiplayerScreen.java │ │ ├── NetworkedGameScreen.java │ │ ├── SelectCharacterScreen.java │ │ ├── SelectCharacterScreen2.java │ │ ├── SelectCharacterScreen3.java │ │ ├── SplashScreen.java │ │ ├── TCPIPScreen.java │ │ └── panel │ │ │ ├── BeltGrid.java │ │ │ ├── CharacterPanel.java │ │ │ ├── ControlPanel.java │ │ │ ├── CubePanel.java │ │ │ ├── EscapeController.java │ │ │ ├── EscapePanel.java │ │ │ ├── HirelingPanel.java │ │ │ ├── InventoryPanel.java │ │ │ ├── ItemGrid.java │ │ │ ├── MobileControls.java │ │ │ ├── MobilePanel.java │ │ │ ├── QuestsPanel.java │ │ │ ├── SpellsPanel.java │ │ │ ├── SpellsQuickPanel.java │ │ │ ├── StashPanel.java │ │ │ ├── VendorGrid.java │ │ │ ├── VendorPanel.java │ │ │ └── WaygatePanel.java │ │ ├── serializer │ │ ├── BooleanStringSerializer.java │ │ ├── ByteStringSerializer.java │ │ ├── CharacterStringSerializer.java │ │ ├── DoubleStringSerializer.java │ │ ├── FloatStringSerializer.java │ │ ├── IntArrayStringSerializer.java │ │ ├── IntegerStringSerializer.java │ │ ├── LocaleStringSerializer.java │ │ ├── LongStringSerializer.java │ │ ├── SerializeException.java │ │ ├── Serializer.java │ │ ├── ShortStringSerializer.java │ │ ├── StringSerializer.java │ │ └── StringStringSerializer.java │ │ ├── skill │ │ └── SkillCodes.java │ │ ├── suggester │ │ ├── CvarSuggester.java │ │ ├── CvarValueSuggester.java │ │ ├── KeySuggester.java │ │ ├── KeyValueSuggester.java │ │ ├── LoggerLevelSuggester.java │ │ └── LoggerSuggester.java │ │ ├── table │ │ ├── BinGenerator.java │ │ ├── Tables.java │ │ ├── TsvParser.java │ │ ├── TsvTranslators.java │ │ ├── package-info.java │ │ ├── parser │ │ │ └── RunesMapper.java │ │ ├── schema │ │ │ ├── Affix.java │ │ │ ├── ArmType.java │ │ │ ├── Armor.java │ │ │ ├── BodyLocs.java │ │ │ ├── CharStats.java │ │ │ ├── Colors.java │ │ │ ├── CompCode.java │ │ │ ├── Composit.java │ │ │ ├── DifficultyLevels.java │ │ │ ├── Gems.java │ │ │ ├── Inventory.java │ │ │ ├── ItemEntry.java │ │ │ ├── ItemStatCost.java │ │ │ ├── ItemTypes.java │ │ │ ├── Levels.java │ │ │ ├── LowQualityItems.java │ │ │ ├── LvlPrest.java │ │ │ ├── LvlTypes.java │ │ │ ├── LvlWarp.java │ │ │ ├── MagicAffix.java │ │ │ ├── MagicPrefix.java │ │ │ ├── MagicSuffix.java │ │ │ ├── Misc.java │ │ │ ├── Missiles.java │ │ │ ├── ModeEntry.java │ │ │ ├── MonAI.java │ │ │ ├── MonMode.java │ │ │ ├── MonPreset.java │ │ │ ├── MonStats.java │ │ │ ├── MonStats2.java │ │ │ ├── Obj.java │ │ │ ├── ObjMode.java │ │ │ ├── Objects.java │ │ │ ├── Overlay.java │ │ │ ├── PlayerClass.java │ │ │ ├── PlrMode.java │ │ │ ├── PlrType.java │ │ │ ├── Properties.java │ │ │ ├── QualityItems.java │ │ │ ├── Quests.java │ │ │ ├── RareAffix.java │ │ │ ├── RarePrefix.java │ │ │ ├── RareSuffix.java │ │ │ ├── Runes.java │ │ │ ├── SetItems.java │ │ │ ├── Sets.java │ │ │ ├── SkillDesc.java │ │ │ ├── Skills.java │ │ │ ├── Sounds.java │ │ │ ├── Speech.java │ │ │ ├── UniqueItems.java │ │ │ ├── UniquePrefix.java │ │ │ ├── UniqueSuffix.java │ │ │ ├── WeaponClass.java │ │ │ └── Weapons.java │ │ └── table │ │ │ ├── BodyLocsTable.java │ │ │ ├── ItemStatCostTable.java │ │ │ ├── MonPresetTable.java │ │ │ ├── ObjTable.java │ │ │ ├── RunesTable.java │ │ │ └── SoundsTable.java │ │ ├── util │ │ ├── ActorUtils.java │ │ ├── ArrayUtils.java │ │ ├── BitStream.java │ │ ├── BufferUtils.java │ │ ├── ClassUtils.java │ │ ├── DebugUtils.java │ │ ├── EngineUtils.java │ │ ├── EnumIntMap.java │ │ ├── EventUtils.java │ │ ├── ImplUtils.java │ │ ├── InstallationFinder.java │ │ ├── LittleEndianDataInputStream.java │ │ ├── LittleEndianDataOutputStream.java │ │ ├── Pool.java │ │ ├── PrimitiveUtils.java │ │ ├── StringUtils.java │ │ └── WinRegistry.java │ │ ├── validator │ │ ├── AcceptAllValidator.java │ │ ├── GdxFileValidator.java │ │ ├── NonNullNonEmptyStringValidator.java │ │ ├── NonNullSubclassValidator.java │ │ ├── NonNullValidator.java │ │ ├── NumberRangeValidator.java │ │ ├── RangeValidationException.java │ │ ├── RangeValidator.java │ │ ├── RejectAllValidator.java │ │ ├── SimpleValidator.java │ │ ├── Validatable.java │ │ ├── ValidationException.java │ │ └── Validator.java │ │ ├── video │ │ ├── AudioPacket.java │ │ ├── BIK.java │ │ ├── BinkAudio.java │ │ ├── BinkVideo.java │ │ ├── VideoPacket.java │ │ └── VideoPlayer.java │ │ └── widget │ │ ├── AnimationWrapper.java │ │ ├── Button.java │ │ ├── CharacterCreateButton.java │ │ ├── CharacterSelectButton.java │ │ ├── DCWrapper.java │ │ ├── DialogScroller.java │ │ ├── EntityWrapper.java │ │ ├── HotkeyButton.java │ │ ├── IconTextButton.java │ │ ├── Label.java │ │ ├── LabelButton.java │ │ ├── NpcDialogBox.java │ │ ├── NpcMenu.java │ │ ├── ScrollPane.java │ │ ├── StatLabel.java │ │ ├── TextArea.java │ │ ├── TextButton.java │ │ └── TextField.java │ └── test │ └── java │ └── com │ └── riiablo │ ├── RiiabloTest.java │ ├── asset │ ├── AssetDescTest.java │ ├── AssetManagerTest.java │ ├── AssetPathTest.java │ └── loader │ │ ├── Dc6LoaderTest.java │ │ └── DccLoaderTest.java │ ├── attributes │ ├── AttributesUpdaterTest.java │ ├── StatFormatterTest.java │ ├── StatListLabelerTest.java │ ├── StatListReaderTest.java │ └── StatListWriterTest.java │ ├── excel │ ├── BinGeneratorTest.java │ ├── ExcelTest.java │ ├── SerializerGeneratorTest.java │ ├── SerializerSourceGeneratorTest.java │ └── TxtParserTest.java │ ├── file │ ├── Dc6DecoderTest.java │ ├── Dc6Test.java │ ├── DccDecoderTest.java │ └── DccTest.java │ ├── io │ ├── BitInputTest.java │ ├── BitOutputTest.java │ └── IOTest.java │ ├── item │ └── ItemWriterTest.java │ ├── map2 │ ├── DS1Test.java │ ├── DT1Test.java │ ├── random │ │ └── SeedTest.java │ └── util │ │ └── BucketPoolTest.java │ ├── map5 │ ├── Ds1DecoderTest.java │ └── Dt1DecoderTest.java │ ├── mpq_bytebuf │ ├── DecoderTest.java │ ├── DecodingTest.java │ ├── DecrypterTest.java │ ├── MpqBufferStreamTest.java │ ├── MpqDiagnostics.java │ ├── MpqFileResolverTest.java │ ├── MpqStreamTest.java │ ├── MpqTest.java │ └── util │ │ ├── ADPCMTest.java │ │ ├── ExploderTest.java │ │ └── HuffmanTest.java │ ├── table │ ├── BinGeneratorTest.java │ ├── TablesTest.java │ └── TsvParserTest.java │ ├── util │ ├── BitStreamTest.java │ └── InstallationFinderTest.java │ └── video │ └── BIKTest.java ├── desktop ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── DesktopLauncher.java ├── excel ├── annotation-processor │ ├── build.gradle │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── riiablo │ │ │ └── excel │ │ │ ├── AnnotationEntry.java │ │ │ ├── ElementUtils.java │ │ │ ├── FieldElement.java │ │ │ ├── GenerationException.java │ │ │ ├── PrimaryKeyAnnotatedElement.java │ │ │ ├── SchemaAnnotatedElement.java │ │ │ ├── SchemaProcessor.java │ │ │ ├── SerializedWithAnnotatedElement.java │ │ │ ├── SerializerGenerator.java │ │ │ ├── TableAnnotatedClass.java │ │ │ ├── TableAnnotatedElement.java │ │ │ └── TableGenerator.java │ │ └── test │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── excel │ │ └── SerializerGeneratorTest.java ├── annotations │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── excel │ │ └── annotation │ │ ├── Format.java │ │ ├── PrimaryKey.java │ │ ├── Schema.java │ │ ├── SerializedWith.java │ │ └── Table.java ├── core │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── excel │ │ ├── DataInput.java │ │ ├── DataOutput.java │ │ ├── Serializer.java │ │ └── Table.java └── excel-test │ ├── build.gradle │ └── src │ ├── main │ └── java │ │ └── com │ │ └── riiablo │ │ └── excel │ │ └── txt │ │ ├── MonStats.java │ │ ├── MonStatsSerializerImpl.java │ │ └── MonStatsTableImpl.java │ └── test │ └── java │ └── com │ └── riiablo │ └── excel │ └── IntegrationTest.java ├── flatbuffers └── flatc.exe ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── resources └── icon-intellij-idea-128x128.png ├── screenshots ├── Android-1.png ├── Clipboard-1.png ├── Clipboard-2.png ├── Clipboard-3.png ├── Clipboard-4.png ├── Clipboard-5.png ├── multi_player.webp └── single_player.webp ├── server ├── bncs │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── server │ │ └── bncs │ │ └── Main.java ├── bnls │ ├── build.gradle │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── riiablo │ │ │ └── server │ │ │ └── bnls │ │ │ └── BNLS.java │ │ └── test │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── server │ │ └── bnls │ │ └── BNLSTest.java ├── build.gradle ├── d2gs │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── server │ │ └── d2gs │ │ ├── D2GS.java │ │ ├── NetworkSynchronizer.java │ │ └── Packet.java ├── mcp │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── server │ │ └── mcp │ │ ├── MCP.java │ │ └── MSI.java └── netty │ ├── build.gradle │ └── src │ └── main │ └── java │ └── com │ └── riiablo │ ├── net │ ├── Endpoint.java │ ├── InboundChannelHandler.java │ ├── IntResolver.java │ ├── MessageProcessor.java │ ├── OutboundChannelHandler.java │ └── tcp │ │ ├── D2GSInboundPacketFactory.java │ │ ├── D2GSOutboundPacketFactory.java │ │ ├── InboundPacket.java │ │ ├── OutboundPacket.java │ │ └── TcpEndpoint.java │ ├── nnet │ ├── Endpoint.java │ ├── Packet.java │ ├── PacketProcessor.java │ └── tcp │ │ └── TcpEndpoint.java │ ├── onet │ ├── Endpoint.java │ ├── EndpointedChannelHandler.java │ ├── PacketProcessor.java │ ├── PacketSender.java │ ├── UnicastEndpoint.java │ ├── reliable │ │ ├── Log.java │ │ ├── MessageChannel.java │ │ ├── Packet.java │ │ ├── QoS.java │ │ ├── ReliableChannelHandler.java │ │ ├── ReliableConfiguration.java │ │ ├── ReliableEndpoint.java │ │ ├── ReliablePacketController.java │ │ ├── ReliableUtils.java │ │ ├── SequenceBuffer.java │ │ ├── TestClient.java │ │ ├── TestServer.java │ │ ├── channel │ │ │ ├── ReliableMessageChannel.java │ │ │ ├── UnreliableMessageChannel.java │ │ │ └── UnreliableOrderedMessageChannel.java │ │ └── data │ │ │ ├── FragmentReassemblyData.java │ │ │ ├── ReceivedPacketData.java │ │ │ └── SentPacketData.java │ └── tcp │ │ ├── TcpEndpoint.java │ │ ├── TestClient.java │ │ └── TestServer.java │ └── server │ ├── d2gs │ ├── D2GSPacket.java │ ├── D2GSPacketProcessor.java │ ├── EndpointedChannelHandler.java │ ├── Main.java │ ├── NetworkSynchronizer.java │ ├── Server.java │ └── tcp │ │ └── ChannelIdResolver.java │ ├── d2gs_netty │ ├── D2GSMessageProcessor.java │ ├── Main.java │ ├── NetworkSynchronizer.java │ └── Server.java │ ├── d2gs_test │ ├── Main.java │ └── TestClient.java │ └── netty │ ├── Client.java │ ├── Main.java │ ├── Packet.java │ ├── PacketTuple.java │ ├── ReliableChannelHandler.java │ ├── ReliableUtil.java │ └── ReliableUtilTest.java ├── settings.gradle ├── table ├── annotation-processor │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── table │ │ └── annotation │ │ ├── AnnotationElement.java │ │ ├── CodeGenerator.java │ │ ├── Constants.java │ │ ├── Context.java │ │ ├── FieldElement.java │ │ ├── ForeignKeyElement.java │ │ ├── FormatElement.java │ │ ├── ManifestCodeGenerator.java │ │ ├── ParserCodeGenerator.java │ │ ├── ParserElement.java │ │ ├── PrimaryKeyElement.java │ │ ├── SchemaElement.java │ │ ├── SchemaProcessor.java │ │ ├── SchemaProcessorUtils.java │ │ ├── SerializerCodeGenerator.java │ │ ├── SerializerElement.java │ │ ├── TableCodeGenerator.java │ │ └── TableElement.java ├── annotations │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── table │ │ └── annotation │ │ ├── ForeignKey.java │ │ ├── Format.java │ │ ├── Parser.java │ │ ├── PrimaryKey.java │ │ ├── Schema.java │ │ ├── Serializer.java │ │ └── Table.java ├── core │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── table │ │ ├── DataInput.java │ │ ├── DataOutput.java │ │ ├── Manifest.java │ │ ├── Parser.java │ │ ├── ParserInput.java │ │ ├── ParserMapper.java │ │ ├── Serializer.java │ │ └── Table.java └── integration │ ├── build.gradle │ └── src │ ├── main │ └── java │ │ └── com │ │ └── riiablo │ │ └── table │ │ └── schema │ │ ├── ItemEntry.java │ │ ├── MonStats.java │ │ ├── MonStats2.java │ │ ├── MonStatsInjectorImpl.java │ │ ├── MonStatsParserImpl.java │ │ ├── MonStatsSerializerImpl.java │ │ ├── MonStatsTableImpl.java │ │ └── Weapons.java │ └── test │ └── java │ └── com │ └── riiablo │ └── table │ └── IntegrationTest.java ├── tester └── build.gradle └── tools ├── backends ├── backend-core │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── tool │ │ ├── AbstractTool.java │ │ └── Tool.java ├── backend-headless │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── riiablo │ │ └── tool │ │ └── HeadlessTool.java ├── backend-lwjgl │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── riiablo │ │ │ └── tool │ │ │ └── LwjglTool.java │ │ └── resources │ │ ├── ic_launcher_128.png │ │ ├── ic_launcher_16.png │ │ └── ic_launcher_32.png └── backend-lwjgl3 │ ├── build.gradle │ └── src │ └── main │ ├── java │ └── com │ │ └── riiablo │ │ └── tool │ │ └── Lwjgl3Tool.java │ └── resources │ ├── ic_launcher_128.png │ ├── ic_launcher_16.png │ └── ic_launcher_32.png ├── build.gradle ├── camera ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── camera │ └── CameraTool.java ├── d2s-reader ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── save │ └── D2SReaderTool.java ├── direction ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── engine │ └── DirectionTool.java ├── ds1-viewer ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── map │ ├── DS1Types.java │ └── DS1Viewer.java ├── excel-serializer-generator ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── excel │ └── SerializerGeneratorTool.java ├── font-metrics ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── FontMetricsTool.java ├── map-debugger ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── MapDebugger.java ├── map-viewer ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ └── map │ └── MapViewer.java ├── mpq-viewer ├── build.gradle └── src │ └── main │ ├── java │ └── com │ │ └── riiablo │ │ ├── asset │ │ ├── BlockLoader.java │ │ └── BlockParams.java │ │ ├── codec │ │ ├── CofInfo.java │ │ ├── Dc6Info.java │ │ └── DccInfo.java │ │ ├── file │ │ ├── CofInfo.java │ │ ├── Dc6Info.java │ │ └── DccInfo.java │ │ ├── map2 │ │ ├── Ds1Info.java │ │ └── Dt1Info.java │ │ ├── map5 │ │ ├── Ds1Info.java │ │ └── Dt1Info.java │ │ ├── mpq │ │ ├── MPQViewer.java │ │ └── widget │ │ │ ├── CollapsibleVisTable.java │ │ │ ├── DirectionActor.java │ │ │ └── TabbedPane.java │ │ └── tool │ │ └── mpqviewer │ │ ├── MpqViewer.java │ │ └── widget │ │ ├── BorderedVisImageButton.java │ │ ├── BorderedVisTextField.java │ │ ├── ButtonGroup.java │ │ ├── CollapsibleVisTable.java │ │ └── TabbedPane.java │ └── resources │ ├── (listfile) │ ├── lang │ └── MpqViewer.properties │ ├── palettes │ ├── ACT1 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── ACT2 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── ACT3 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── ACT4 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── ACT5 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── EndGame │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── Menu0 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── STATIC │ │ └── pal.dat │ ├── Sky │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── Trademark │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── Units │ │ └── pal.dat │ ├── fechar │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── loading │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── menu1 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── menu2 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── menu3 │ │ ├── Pal.PL2 │ │ └── pal.dat │ └── menu4 │ │ ├── Pal.PL2 │ │ └── pal.dat │ ├── shaders │ ├── indexpalette.frag │ ├── indexpalette.vert │ ├── indexpalette2.frag │ ├── indexpalette2.vert │ ├── indexpalette3.frag │ └── indexpalette3.vert │ └── skin │ └── x1 │ ├── default.fnt │ ├── font-small.fnt │ ├── uiskin.atlas │ ├── uiskin.json │ └── uiskin.png ├── old ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── riiablo │ ├── AnimationTool.java │ ├── BreakpointsTool.java │ ├── codec │ ├── CofFinder.java │ ├── D2Finder.java │ └── excel │ │ ├── BinGenerationTool.java │ │ └── ExcelGenerationTool.java │ ├── entity │ └── DirectionTool.java │ ├── item │ └── ItemGeneratorTool.java │ └── video │ └── VideoTool.java └── video-player ├── build.gradle └── src └── main └── java └── com └── riiablo └── video └── VideoPlayerTool.java /.gitattributes: -------------------------------------------------------------------------------- 1 | *.bat text eol=crlf 2 | assets/* linguist-vendored 3 | assets/data/**.txt text eol=crlf 4 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.run/AnimationTool.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/BNCS.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /.run/BNLS.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /.run/BinGenerationTool.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /.run/COF_Finder.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/D2GS.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/D2_Finder.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/ExcelGenerationTool.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__d2gs_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.run/desktop__debug_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | -------------------------------------------------------------------------------- /.run/desktop__debug___1280x720_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___1920x1080_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___640x480_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___720x360_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___800x600_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___840x360_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___853x480_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__debug___854x480_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.run/desktop__networking_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.run/desktop__resolution_.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of the AUTHORS of riiablo 2 | # for copyright purposes. 3 | # This file is distinct from the CONTRIBUTORS files. 4 | # See the latter for an explanation. 5 | 6 | # Names should be added to this file as 7 | # Name or Organization 8 | # The email address is not required for organizations. 9 | Collin Smith 10 | -------------------------------------------------------------------------------- /android/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/android/ic_launcher-web.png -------------------------------------------------------------------------------- /android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is used by the Eclipse ADT plugin. It is unnecessary for IDEA and Android Studio projects, which 2 | # configure Proguard and the Android target via the build.gradle file. 3 | 4 | # To enable ProGuard to work with Eclipse ADT, uncomment this (available properties: sdk.dir, user.home) 5 | # and ensure proguard.jar in the Android SDK is up to date (or alternately reduce the android target to 23 or lower): 6 | # proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-rules.pro 7 | 8 | # Project target. 9 | project.type=0 10 | target=android-28 11 | -------------------------------------------------------------------------------- /android/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/android/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/android/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/android/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/android/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/android/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Riiablo 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/consolas12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/consolas12.png -------------------------------------------------------------------------------- /assets/consolas16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/consolas16.png -------------------------------------------------------------------------------- /assets/consolas48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/consolas48.png -------------------------------------------------------------------------------- /assets/consolas8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/consolas8.png -------------------------------------------------------------------------------- /assets/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/default.png -------------------------------------------------------------------------------- /assets/ds1edit.dt1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/ds1edit.dt1 -------------------------------------------------------------------------------- /assets/ic_launcher_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/ic_launcher_128.png -------------------------------------------------------------------------------- /assets/ic_launcher_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/ic_launcher_16.png -------------------------------------------------------------------------------- /assets/ic_launcher_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/ic_launcher_32.png -------------------------------------------------------------------------------- /assets/lang/Client.properties: -------------------------------------------------------------------------------- 1 | riiablo=Riiablo 2 | version=V {0} 3 | 4 | press_any_key=Press any Key 5 | press_any_button=Press any Button 6 | touch_the_screen=Touch the Screen 7 | 8 | unpacking_audio_files=Unpacking audio files... 9 | unpacking_description=This should only take a few minutes 10 | unpacking_file={0} 11 | -------------------------------------------------------------------------------- /assets/profiler/uiskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/profiler/uiskin.png -------------------------------------------------------------------------------- /assets/shaders/indexpalette.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | 5 | uniform mat4 u_projTrans; 6 | 7 | varying vec2 v_texCoord; 8 | 9 | void main() { 10 | v_texCoord = a_texCoord0; 11 | gl_Position = u_projTrans * a_position; 12 | } -------------------------------------------------------------------------------- /assets/shaders/indexpalette2.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | 5 | uniform mat4 u_projTrans; 6 | 7 | varying vec2 v_texCoord; 8 | varying vec4 tint; 9 | 10 | void main() { 11 | tint = a_color; 12 | v_texCoord = a_texCoord0; 13 | gl_Position = u_projTrans * a_position; 14 | } -------------------------------------------------------------------------------- /assets/shaders/indexpalette3.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | 5 | uniform mat4 u_projTrans; 6 | 7 | varying vec2 v_texCoord; 8 | varying vec4 tint; 9 | 10 | void main() { 11 | tint = a_color; 12 | v_texCoord = a_texCoord0; 13 | gl_Position = u_projTrans * a_position; 14 | } -------------------------------------------------------------------------------- /assets/textures/touchBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/textures/touchBackground.png -------------------------------------------------------------------------------- /assets/textures/touchKnob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/assets/textures/touchKnob.png -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/bncs/BNCSData.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.bncs; 4 | 5 | public final class BNCSData { 6 | private BNCSData() { } 7 | public static final byte NONE = 0; 8 | public static final byte ChatEvent = 1; 9 | 10 | public static final String[] names = { "NONE", "ChatEvent", }; 11 | 12 | public static String name(int e) { return names[e]; } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/bnls/BNLSData.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.bnls; 4 | 5 | public final class BNLSData { 6 | private BNLSData() { } 7 | public static final byte NONE = 0; 8 | public static final byte ConnectionClosed = 1; 9 | public static final byte ConnectionAccepted = 2; 10 | public static final byte QueryRealms = 3; 11 | public static final byte LoginResponse = 4; 12 | 13 | public static final String[] names = { "NONE", "ConnectionClosed", "ConnectionAccepted", "QueryRealms", "LoginResponse", }; 14 | 15 | public static String name(int e) { return names[e]; } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/d2gs/EntityFlags.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.d2gs; 4 | 5 | public final class EntityFlags { 6 | private EntityFlags() { } 7 | public static final byte deleted = 1; 8 | 9 | public static final String[] names = { "deleted", }; 10 | 11 | public static String name(int e) { return names[e - deleted]; } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/mcp/MCPData.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.mcp; 4 | 5 | public final class MCPData { 6 | private MCPData() { } 7 | public static final byte NONE = 0; 8 | public static final byte ConnectionClosed = 1; 9 | public static final byte ConnectionAccepted = 2; 10 | public static final byte CreateGame = 3; 11 | public static final byte JoinGame = 4; 12 | public static final byte ListGames = 5; 13 | 14 | public static final String[] names = { "NONE", "ConnectionClosed", "ConnectionAccepted", "CreateGame", "JoinGame", "ListGames", }; 15 | 16 | public static String name(int e) { return names[e]; } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/msi/MSIData.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.msi; 4 | 5 | public final class MSIData { 6 | private MSIData() { } 7 | public static final byte NONE = 0; 8 | public static final byte StartInstance = 1; 9 | 10 | public static final String[] names = { "NONE", "StartInstance", }; 11 | 12 | public static String name(int e) { return names[e]; } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/msi/Result.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.msi; 4 | 5 | public final class Result { 6 | private Result() { } 7 | public static final byte SUCCESS = 0; 8 | public static final byte FAILURE = 1; 9 | 10 | public static final String[] names = { "SUCCESS", "FAILURE", }; 11 | 12 | public static String name(int e) { return names[e]; } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/netty/ConnectionState.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.netty; 4 | 5 | public final class ConnectionState { 6 | private ConnectionState() { } 7 | public static final byte request = 0; 8 | public static final byte waiting_for_challenge = 1; 9 | public static final byte answering_challenge = 2; 10 | public static final byte awaiting_connect = 3; 11 | public static final byte connection_payload = 4; 12 | 13 | public static final String[] names = { "request", "waiting_for_challenge", "answering_challenge", "awaiting_connect", "connection_payload", }; 14 | 15 | public static String name(int e) { return names[e]; } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /core/gen/main/java/com/riiablo/net/packet/netty/NettyData.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package com.riiablo.net.packet.netty; 4 | 5 | public final class NettyData { 6 | private NettyData() { } 7 | public static final byte NONE = 0; 8 | public static final byte Connection = 1; 9 | public static final byte Disconnect = 2; 10 | public static final byte Ping = 3; 11 | 12 | public static final String[] names = { "NONE", "Connection", "Disconnect", "Ping", }; 13 | 14 | public static String name(int e) { return names[e]; } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/bncs/BNCS.fbs: -------------------------------------------------------------------------------- 1 | include "ChatEvent.fbs"; 2 | 3 | namespace com.riiablo.net.packet.bncs; 4 | 5 | union BNCSData { 6 | ChatEvent, 7 | } 8 | 9 | table BNCS { 10 | data:BNCSData; 11 | } 12 | 13 | root_type BNCS; -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/bnls/BNLS.fbs: -------------------------------------------------------------------------------- 1 | include "ConnectionClosed.fbs"; 2 | include "ConnectionAccepted.fbs"; 3 | include "QueryRealms.fbs"; 4 | include "LoginResponse.fbs"; 5 | 6 | namespace com.riiablo.net.packet.bnls; 7 | 8 | union BNLSData { 9 | ConnectionClosed, 10 | ConnectionAccepted, 11 | QueryRealms, 12 | LoginResponse, 13 | } 14 | 15 | table BNLS { 16 | data:BNLSData; 17 | } 18 | 19 | root_type BNLS; -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/bnls/ConnectionAccepted.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.bnls; 2 | 3 | table ConnectionAccepted { 4 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/bnls/ConnectionClosed.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.bnls; 2 | 3 | table ConnectionClosed { 4 | reason:string; 5 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/bnls/LoginResponse.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.bnls; 2 | 3 | table LoginResponse { 4 | username:string; 5 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/bnls/QueryRealms.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.bnls; 2 | 3 | table QueryRealms { 4 | realms:[Realm]; 5 | } 6 | 7 | table Realm { 8 | name:string; 9 | desc:string; 10 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/d2gs/D2GS.fbs: -------------------------------------------------------------------------------- 1 | include "Networking.fbs"; 2 | include "PlayerController.fbs"; 3 | include "Sync.fbs"; 4 | include "ItemManagement.fbs"; 5 | 6 | namespace com.riiablo.net.packet.d2gs; 7 | 8 | union D2GSData { 9 | WalkToLocation, 10 | WalkToEntity, 11 | RunToLocation, 12 | RunToEntity, 13 | Connection, 14 | Disconnect, 15 | Ping, 16 | EntitySync, 17 | GroundToCursor, 18 | CursorToGround, 19 | StoreToCursor, 20 | CursorToStore, 21 | SwapStoreItem, 22 | BodyToCursor, 23 | CursorToBody, 24 | SwapBodyItem, 25 | BeltToCursor, 26 | CursorToBelt, 27 | SwapBeltItem, 28 | } 29 | 30 | table D2GS { 31 | data:D2GSData; 32 | } 33 | 34 | root_type D2GS; -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/d2gs/Networking.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.d2gs; 2 | 3 | table Connection { 4 | // request 5 | charClass:uint8; 6 | charName:string; 7 | cofComponents:[uint8]; 8 | cofTransforms:[uint8]; 9 | cofAlphas:[uint8]; 10 | d2s:[ubyte]; 11 | 12 | // response 13 | entityId:int32; 14 | } 15 | 16 | table Disconnect { 17 | // request 18 | entityId:int32; 19 | 20 | // response 21 | } 22 | 23 | table Ping { 24 | // request 25 | tickCount:int32; 26 | sendTime:int64; 27 | processTime:int64; 28 | 29 | // response 30 | ack:bool; 31 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/d2gs/PlayerController.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.d2gs; 2 | 3 | table WalkToLocation { 4 | // request 5 | x:int16; 6 | y:int16; 7 | 8 | // response 9 | } 10 | 11 | table WalkToEntity { 12 | // request 13 | type:uint8; 14 | entityId:int32; 15 | 16 | // response 17 | } 18 | 19 | table RunToLocation { 20 | // request 21 | x:int16; 22 | y:int16; 23 | 24 | // response 25 | } 26 | 27 | table RunToEntity { 28 | // request 29 | type:uint8; 30 | entityId:int32; 31 | 32 | // response 33 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/ConnectionAccepted.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.mcp; 2 | 3 | table ConnectionAccepted { 4 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/ConnectionClosed.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.mcp; 2 | 3 | table ConnectionClosed { 4 | reason:string; 5 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/CreateGame.fbs: -------------------------------------------------------------------------------- 1 | include "Result.fbs"; 2 | 3 | namespace com.riiablo.net.packet.mcp; 4 | 5 | //enum Result : int { 6 | // SUCCESS = 0x00, 7 | // INVALID_NAME = 0x1E, 8 | // ALREAD_EXISTS = 0x1F, 9 | // SERVER_DOWN = 0x20, 10 | // HARDCORE_DEAD = 0x6E, 11 | //} 12 | 13 | table CreateGame { 14 | // request 15 | diff:int; 16 | levelDifference:int; 17 | maxPlayers:int; 18 | gameName:string; 19 | password:string; 20 | description:string; 21 | 22 | // response 23 | gameToken:int; 24 | result:Result; 25 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/JoinGame.fbs: -------------------------------------------------------------------------------- 1 | include "Result.fbs"; 2 | 3 | namespace com.riiablo.net.packet.mcp; 4 | 5 | //enum Result : int { 6 | // SUCCESS = 0x00, 7 | // INVALID_PASSWORD = 0x29, 8 | // GAME_DOES_NOT_EXIST = 0x2A, 9 | // GAME_IS_FULL = 0x2B, 10 | // LEVEL_REQUIREMENTS = 0x2C, 11 | // HARDCORE_DEAD = 0x6E, 12 | // HARDCORE_SOFTCORE = 0x71, 13 | // UNABLE_NIGHTMARE = 0x73, 14 | // UNABLE_HELL = 0x74, 15 | // NONEXP_EXPANSION = 0x78, 16 | // EXPANSION_NONEXP = 0x79, 17 | // NONLADDER_LADDER = 0x7D, 18 | //} 19 | 20 | table JoinGame { 21 | // request 22 | gameName:string; 23 | password:string; 24 | 25 | // response 26 | ip:int32; 27 | port:int16; 28 | result:Result; 29 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/ListGames.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.mcp; 2 | 3 | table ListGames { 4 | // request 5 | flags:uint32; 6 | 7 | // response 8 | games:[GameSession]; 9 | } 10 | 11 | table GameSession { 12 | index:uint32; 13 | players:uint8; 14 | name:string; 15 | desc:string; 16 | flags:uint32; 17 | } -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/MCP.fbs: -------------------------------------------------------------------------------- 1 | include "Result.fbs"; 2 | include "ConnectionClosed.fbs"; 3 | include "ConnectionAccepted.fbs"; 4 | include "CreateGame.fbs"; 5 | include "JoinGame.fbs"; 6 | include "ListGames.fbs"; 7 | 8 | namespace com.riiablo.net.packet.mcp; 9 | 10 | union MCPData { 11 | ConnectionClosed, 12 | ConnectionAccepted, 13 | CreateGame, 14 | JoinGame, 15 | ListGames, 16 | } 17 | 18 | table MCP { 19 | data:MCPData; 20 | } 21 | 22 | root_type MCP; -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/mcp/Result.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.mcp; 2 | 3 | enum Result : int { 4 | SUCCESS = 0x00, 5 | INVALID_NAME = 0x1E, 6 | ALREADY_EXISTS = 0x1F, 7 | SERVER_DOWN = 0x20, 8 | INVALID_PASSWORD = 0x29, 9 | GAME_DOES_NOT_EXIST = 0x2A, 10 | GAME_IS_FULL = 0x2B, 11 | LEVEL_REQUIREMENTS = 0x2C, 12 | HARDCORE_DEAD = 0x6E, 13 | HARDCORE_SOFTCORE = 0x71, 14 | UNABLE_NIGHTMARE = 0x73, 15 | UNABLE_HELL = 0x74, 16 | NONEXP_EXPANSION = 0x78, 17 | EXPANSION_NONEXP = 0x79, 18 | NONLADDER_LADDER = 0x7D, 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/msi/MSI.fbs: -------------------------------------------------------------------------------- 1 | include "StartInstance.fbs"; 2 | 3 | namespace com.riiablo.net.packet.msi; 4 | 5 | union MSIData { 6 | StartInstance, 7 | } 8 | 9 | table MSI { 10 | data:MSIData; 11 | } 12 | 13 | root_type MSI; -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/msi/StartInstance.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.msi; 2 | 3 | enum Result : byte { 4 | SUCCESS = 0, 5 | FAILURE = 1, 6 | } 7 | 8 | table StartInstance { 9 | // request 10 | 11 | // response 12 | result:Result; 13 | ip:int32; 14 | port:int16; 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/netty/Netty.fbs: -------------------------------------------------------------------------------- 1 | include "Packets.fbs"; 2 | 3 | namespace com.riiablo.net.packet.netty; 4 | 5 | union NettyData { 6 | Connection, 7 | Disconnect, 8 | Ping, 9 | } 10 | 11 | table Netty { 12 | salt:int64; 13 | data:NettyData; 14 | } 15 | 16 | root_type Netty; -------------------------------------------------------------------------------- /core/src/main/flatbuffers/com/riiablo/net/netty/Packets.fbs: -------------------------------------------------------------------------------- 1 | namespace com.riiablo.net.packet.netty; 2 | 3 | enum ConnectionState:byte { 4 | request, 5 | waiting_for_challenge, 6 | answering_challenge, 7 | awaiting_connect, 8 | connection_payload 9 | } 10 | 11 | table Connection { 12 | // request 13 | 14 | // response 15 | salt:int64; 16 | } 17 | 18 | table Disconnect { 19 | // request 20 | 21 | // response 22 | } 23 | 24 | table Ping { 25 | // request 26 | 27 | // response 28 | } -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/GdxCommandManager.java: -------------------------------------------------------------------------------- 1 | package com.riiablo; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | 5 | import com.riiablo.command.Command; 6 | import com.riiablo.command.CommandManager; 7 | 8 | public class GdxCommandManager extends CommandManager { 9 | private static final String TAG = "GdxCommandManager"; 10 | 11 | public GdxCommandManager() {} 12 | 13 | @Override 14 | public void onAssigned(Command command, String alias) { 15 | super.onAssigned(command, alias); 16 | Gdx.app.debug(TAG, "assigning \"" + alias.toLowerCase() + "\" to " + command); 17 | } 18 | 19 | @Override 20 | public void onUnassigned(Command command, String alias) { 21 | super.onUnassigned(command, alias); 22 | Gdx.app.debug(TAG, "unassigning " + alias + " from " + command); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/HomeFileHandleResolver.java: -------------------------------------------------------------------------------- 1 | package com.riiablo; 2 | 3 | import com.badlogic.gdx.assets.loaders.FileHandleResolver; 4 | import com.badlogic.gdx.files.FileHandle; 5 | 6 | public class HomeFileHandleResolver implements FileHandleResolver { 7 | private final FileHandle home; 8 | public HomeFileHandleResolver(FileHandle home) { 9 | this.home = home; 10 | } 11 | 12 | @Override 13 | public FileHandle resolve(String fileName) { 14 | return home.child(fileName); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/Metrics.java: -------------------------------------------------------------------------------- 1 | package com.riiablo; 2 | 3 | public class Metrics { 4 | public float cpu; 5 | public float gpu; 6 | public long ping; 7 | public long rtt; 8 | 9 | public Metrics() {} 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/ai/Idle.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.ai; 2 | 3 | import com.riiablo.engine.Engine; 4 | 5 | public class Idle extends AI { 6 | public Idle() { 7 | super(Engine.INVALID_ENTITY); 8 | } 9 | 10 | @Override 11 | public void update(float delta) {} 12 | 13 | @Override 14 | public String getState() { 15 | return "IDLE"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/AdapterNotFound.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class AdapterNotFound extends RuntimeException { 4 | public final Class type; 5 | 6 | AdapterNotFound(Class type) { 7 | this(type, null); 8 | } 9 | 10 | AdapterNotFound(Class type, Throwable cause) { 11 | super("Adapter not found for " + type.getSimpleName(), cause); 12 | this.type = type; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/AssetLoadException.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class AssetLoadException extends RuntimeException { 4 | public final AssetDesc asset; 5 | 6 | public AssetLoadException(AssetDesc asset, String message) { 7 | super(message); 8 | this.asset = asset; 9 | } 10 | 11 | public AssetLoadException(AssetDesc asset, String message, Throwable cause) { 12 | super(message, cause); 13 | this.asset = asset; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/AssetParams.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class AssetParams { 4 | } 5 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/AssetUtils.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | import com.badlogic.gdx.utils.Disposable; 4 | import com.badlogic.gdx.utils.GdxRuntimeException; 5 | 6 | public final class AssetUtils { 7 | private AssetUtils() { } 8 | 9 | public static void dispose(Object o) { 10 | if (o instanceof Disposable) ((Disposable) o).dispose(); 11 | } 12 | 13 | public static void disposeQuietly(Object[] o) { 14 | disposeQuietly(o, 0, o.length); 15 | } 16 | 17 | public static void disposeQuietly(Object[] o, int off, int len) { 18 | for (; off < len; off++) { 19 | disposeQuietly(o[off]); 20 | o[off] = null; 21 | } 22 | } 23 | 24 | public static void disposeQuietly(Object o) { 25 | try { 26 | dispose(o); 27 | } catch (GdxRuntimeException ignored) { 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/FileHandleResolver.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | import com.badlogic.gdx.files.FileHandle; 4 | 5 | public interface FileHandleResolver { 6 | FileHandle resolve(AssetDesc asset); 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/InvalidDependency.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class InvalidDependency extends AssetLoadException { 4 | public InvalidDependency(AssetDesc asset, String message) { 5 | super(asset, message); 6 | } 7 | 8 | public InvalidDependency(AssetDesc asset, String message, Throwable cause) { 9 | super(asset, message, cause); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/InvalidParams.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class InvalidParams extends AssetLoadException { 4 | public InvalidParams(AssetDesc asset, String message) { 5 | super(asset, message); 6 | } 7 | 8 | public InvalidParams(AssetDesc asset, String message, Throwable cause) { 9 | super(asset, message, cause); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/LoaderNotFound.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class LoaderNotFound extends RuntimeException { 4 | public final Class type; 5 | 6 | LoaderNotFound(Class type) { 7 | this(type, null); 8 | } 9 | 10 | LoaderNotFound(Class type, Throwable cause) { 11 | super("Loader not found for " + type.getSimpleName(), cause); 12 | this.type = type; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/ParamsNotFound.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class ParamsNotFound extends RuntimeException { 4 | public final Class type; 5 | 6 | public ParamsNotFound(Class type) { 7 | this(type, null); 8 | } 9 | 10 | public ParamsNotFound(Class type, Throwable cause) { 11 | super("Default params not found for " + type.getSimpleName(), cause); 12 | this.type = type; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/asset/ResolverNotFound.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | public class ResolverNotFound extends RuntimeException { 4 | public final AssetDesc asset; 5 | 6 | ResolverNotFound(AssetDesc asset) { 7 | this(asset, null); 8 | } 9 | 10 | ResolverNotFound(AssetDesc asset, Throwable cause) { 11 | super("Resolver not found for " + asset, cause); 12 | this.asset = asset; 13 | } 14 | 15 | public AssetDesc asset() { 16 | return asset; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/audio/ServerAudio.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.audio; 2 | 3 | import com.badlogic.gdx.assets.AssetManager; 4 | import com.riiablo.codec.excel.Sounds; 5 | 6 | public class ServerAudio extends Audio { 7 | public ServerAudio(AssetManager assets) { 8 | super(assets); 9 | } 10 | 11 | @Override 12 | public Instance play(int id, boolean global) { 13 | return null; 14 | } 15 | 16 | @Override 17 | public Instance play(String id, boolean global) { 18 | return null; 19 | } 20 | 21 | @Override 22 | public synchronized Instance play(Sounds.Entry sound, boolean global) { 23 | return null; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/audio/VolumeControlled.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.audio; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | public interface VolumeControlled { 7 | 8 | void setVolumeController(@NonNull VolumeController controller); 9 | 10 | @Nullable 11 | VolumeController getVolumeController(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/audio/VolumeController.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.audio; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | import java.lang.ref.WeakReference; 7 | 8 | public interface VolumeController { 9 | 10 | boolean isEnabled(); 11 | void setEnabled(boolean enabled); 12 | 13 | float getVolume(); 14 | void setVolume(float volume); 15 | 16 | void manage(@NonNull WeakReference sound); 17 | boolean remove(@Nullable Object obj); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Affix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | public class Affix extends Excel.Entry { 4 | @Override 5 | public String toString() { 6 | return name; 7 | } 8 | 9 | @Key 10 | @Column public String name; 11 | @Column public int version; 12 | @Column public int add; 13 | @Column public int multiply; 14 | @Column public int divide; 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/ArmType.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class ArmType extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return Name; 9 | } 10 | 11 | @Column 12 | public String Name; 13 | 14 | @Column 15 | @Key 16 | public String Token; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Armor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class Armor extends Excel { 5 | public static class Entry extends ItemEntry { 6 | @Column public int Torso; 7 | @Column public int Legs; 8 | @Column public int rArm; 9 | @Column public int lArm; 10 | @Column public int lSPad; 11 | @Column public int rSPad; 12 | @Column public int reqstr; 13 | @Column public int durability; 14 | @Column public int block; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Colors.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class Colors extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return Transform_Color; 9 | } 10 | 11 | @Column(format = "Transform Color") 12 | public String Transform_Color; 13 | 14 | @Column 15 | @Key 16 | public String Code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/CompCode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class CompCode extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return component; 9 | } 10 | 11 | @Column 12 | public String component; 13 | 14 | @Column 15 | @Key 16 | public String code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Composit.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class Composit extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return Name; 9 | } 10 | 11 | @Column 12 | public String Name; 13 | 14 | @Column 15 | @Key 16 | public String Token; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/LowQualityItems.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class LowQualityItems extends Excel { 5 | @Excel.Index 6 | public static class Entry extends Excel.Entry { 7 | @Override 8 | public String toString() { 9 | return Name; 10 | } 11 | 12 | @Column 13 | public String Name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/LvlTypes.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class LvlTypes extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return Name; 9 | } 10 | 11 | @Column public String Name; 12 | @Column 13 | @Key 14 | public int Id; 15 | @Column(format = "File %d", startIndex = 1, endIndex = 33) 16 | public String File[]; 17 | @Column public boolean Beta; 18 | @Column public int Act; 19 | @Column public boolean Expansion; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/MagicAffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | public class MagicAffix extends Affix { 4 | @Column public boolean spawnable; 5 | @Column public boolean rare; 6 | @Column public int level; 7 | @Column public int maxlevel; 8 | @Column public int levelreq; 9 | @Column public String classspecific; 10 | @Column(format = "class") 11 | public String _class; 12 | @Column public int classlevelreq; 13 | @Column public int frequency; 14 | @Column public int group; 15 | @Column public boolean transform; 16 | @Column public String transformcolor; 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Misc.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class Misc extends Excel { 5 | public static class Entry extends ItemEntry { 6 | @Column public int pSpell; 7 | @Column public int spelldesc; 8 | @Column public String spelldescstr; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/ModeEntry.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | public class ModeEntry extends Excel.Entry { 4 | public String getCode() { 5 | return Token; 6 | } 7 | 8 | @Override 9 | public String toString() { 10 | return Name; 11 | } 12 | 13 | @Column 14 | public String Name; 15 | 16 | @Column 17 | @Key 18 | public String Token; 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/MonAI.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class MonAI extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | public String getCode() { 7 | return AI; 8 | } 9 | 10 | @Key 11 | @Column 12 | public String AI; 13 | @Column(format = "*aip%d", startIndex = 1, endIndex = 9) 14 | public String aip[]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/MonMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class MonMode extends Excel { 5 | public static class Entry extends ModeEntry { 6 | public String getCode() { 7 | return Code; 8 | } 9 | 10 | @Column 11 | @Key 12 | public String Code; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/ObjMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class ObjMode extends Excel { 5 | public static class Entry extends ModeEntry {} 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/PlayerClass.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class PlayerClass extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return PlayerClass; 9 | } 10 | 11 | @Column(format = "Player Class") 12 | public String PlayerClass; 13 | 14 | @Column 15 | @Key 16 | public String Code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/PlrMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class PlrMode extends Excel { 5 | public static class Entry extends ModeEntry { 6 | public String getCode() { 7 | return Code; 8 | } 9 | 10 | @Column 11 | @Key 12 | public String Code; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/PlrType.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class PlrType extends Excel { 5 | public static final int AM = 0; 6 | public static final int SO = 1; 7 | public static final int NE = 2; 8 | public static final int PA = 3; 9 | public static final int BA = 4; 10 | public static final int DZ = 5; 11 | public static final int AS = 6; 12 | 13 | public static class Entry extends Excel.Entry { 14 | @Override 15 | public String toString() { 16 | return Name; 17 | } 18 | 19 | @Column 20 | public String Name; 21 | 22 | @Column 23 | @Key 24 | public String Token; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Properties.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class Properties extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return code; 9 | } 10 | 11 | @Key 12 | @Column 13 | public String code; 14 | @Column(startIndex = 1, endIndex = 8) 15 | public int set[]; 16 | @Column(startIndex = 1, endIndex = 8) 17 | public int val[]; 18 | @Column(startIndex = 1, endIndex = 8) 19 | public int func[]; 20 | @Column(startIndex = 1, endIndex = 8) 21 | public String stat[]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/RareAffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | public class RareAffix extends Affix { 4 | } 5 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/RarePrefix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class RarePrefix extends Excel { 5 | @Override 6 | protected int offset() { 7 | // TODO: Should really point to RareSuffix.size() 8 | return 156; 9 | } 10 | 11 | public static class Entry extends RareAffix { 12 | @Column public String itype1; 13 | @Column public String itype2; 14 | @Column public String itype3; 15 | @Column public String itype4; 16 | @Column public String itype5; 17 | @Column public String itype6; 18 | @Column public String itype7; 19 | @Column public String etype1; 20 | @Column public String etype2; 21 | @Column public String etype3; 22 | @Column public String etype4; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/RareSuffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class RareSuffix extends Excel { 5 | @Override 6 | protected int offset() { 7 | return 1; 8 | } 9 | 10 | public static class Entry extends RareAffix { 11 | @Column public String itype1; 12 | @Column public String itype2; 13 | @Column public String itype3; 14 | @Column public String itype4; 15 | @Column public String itype5; 16 | @Column public String itype6; 17 | @Column public String itype7; 18 | @Column public String etype1; 19 | @Column public String etype2; 20 | @Column public String etype3; 21 | @Column public String etype4; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/Speech.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class Speech extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return sound; 9 | } 10 | 11 | @Column 12 | @Key 13 | public String sound; 14 | @Column public String soundstr; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/UniquePrefix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class UniquePrefix extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return Name; 9 | } 10 | 11 | @Key 12 | @Column 13 | public String Name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/UniqueSuffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class UniqueSuffix extends Excel { 5 | public static class Entry extends Excel.Entry { 6 | @Override 7 | public String toString() { 8 | return Name; 9 | } 10 | 11 | @Key 12 | @Column 13 | public String Name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/codec/excel/WeaponClass.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.codec.excel; 2 | 3 | @Excel.Binned 4 | public class WeaponClass extends Excel { 5 | public Entry get(ItemEntry entry) { 6 | return entry instanceof com.riiablo.codec.excel.Weapons.Entry ? get(((Weapons.Entry) entry).wclass) : null;//get("NONE"); 7 | } 8 | 9 | public static class Entry extends Excel.Entry { 10 | @Override 11 | public String toString() { 12 | return WeaponClass; 13 | } 14 | 15 | @Column(format = "Weapon Class") 16 | public String WeaponClass; 17 | 18 | @Column 19 | @Key 20 | public String Code; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/command/Action.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.command; 2 | 3 | public interface Action { 4 | Action DO_NOTHING = new Action() { 5 | @Override 6 | public void onExecuted(Command.Instance instance) {} 7 | }; 8 | 9 | void onExecuted(Command.Instance instance); 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/command/ParameterException.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.command; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | public class ParameterException extends RuntimeException { 7 | public ParameterException() { 8 | super(); 9 | } 10 | 11 | public ParameterException(@Nullable String message) { 12 | super(message); 13 | } 14 | 15 | public ParameterException(@NonNull String format, @Nullable Object... args) { 16 | super(String.format(format, args)); 17 | } 18 | } -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/cvar/CvarStateAdapter.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.cvar; 2 | 3 | public class CvarStateAdapter implements Cvar.StateListener { 4 | @Override 5 | public void onChanged(Cvar cvar, T from, T to) {} 6 | 7 | @Override 8 | public void onLoaded(Cvar cvar, T to) { 9 | onChanged(cvar, null, to); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/cvar/SuggestionProvider.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.cvar; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import java.util.Collection; 6 | 7 | public interface SuggestionProvider { 8 | Collection suggest(@NonNull String str); 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/EngineConfig.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine; 2 | 3 | public class EngineConfig { 4 | final int seed; 5 | final int diff; 6 | 7 | public EngineConfig(int seed, int diff) { 8 | this.seed = seed; 9 | this.diff = diff; 10 | } 11 | 12 | public int seed() { 13 | return seed; 14 | } 15 | 16 | public int diff() { 17 | return diff; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/EntitySystemAdapter.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine; 2 | 3 | import com.artemis.BaseEntitySystem; 4 | 5 | public class EntitySystemAdapter extends BaseEntitySystem { 6 | @Override protected void processSystem() {} 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/IntervalBaseSystem.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine; 2 | 3 | import com.artemis.BaseSystem; 4 | 5 | public abstract class IntervalBaseSystem extends BaseSystem { 6 | private final float interval; 7 | 8 | protected float acc; 9 | 10 | private float delta; 11 | 12 | public IntervalBaseSystem(float interval) { 13 | this.interval = interval; 14 | } 15 | 16 | protected float getIntervalDelta() { 17 | return interval + delta; 18 | } 19 | 20 | protected float getTimeDelta() { 21 | return world.getDelta(); 22 | } 23 | 24 | @Override 25 | protected boolean checkProcessing() { 26 | acc += getTimeDelta(); 27 | if (acc >= interval) { 28 | acc -= interval; 29 | delta = (acc - delta); 30 | return true; 31 | } 32 | 33 | return false; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/OverlayStepper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client; 2 | 3 | import com.artemis.ComponentMapper; 4 | import com.artemis.annotations.All; 5 | import com.artemis.systems.IntervalIteratingSystem; 6 | 7 | import com.riiablo.codec.Animation; 8 | import com.riiablo.engine.client.component.Overlay; 9 | 10 | @All(Overlay.class) 11 | public class OverlayStepper extends IntervalIteratingSystem { 12 | protected ComponentMapper mOverlay; 13 | 14 | public OverlayStepper() { 15 | super(null, Animation.FRAME_DURATION); 16 | } 17 | 18 | @Override 19 | protected void process(int entityId) { 20 | mOverlay.get(entityId).animation.update(Animation.FRAME_DURATION); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/WarpSubstManager.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client; 2 | 3 | import com.artemis.ComponentMapper; 4 | import com.artemis.annotations.All; 5 | import com.artemis.annotations.Wire; 6 | import com.artemis.systems.IteratingSystem; 7 | import com.riiablo.engine.client.component.Hovered; 8 | import com.riiablo.engine.server.component.Warp; 9 | import com.riiablo.map.Map; 10 | 11 | @All({Warp.class, Hovered.class}) 12 | public class WarpSubstManager extends IteratingSystem { 13 | protected ComponentMapper mWarp; 14 | 15 | @Wire(name = "map") 16 | protected Map map; 17 | 18 | @Override 19 | protected void begin() { 20 | map.clearWarpSubsts(); 21 | } 22 | 23 | @Override 24 | protected void process(int entityId) { 25 | map.addWarpSubsts(mWarp.get(entityId).substs); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/AnimationWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.codec.Animation; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class AnimationWrapper extends PooledComponent { 11 | public final Animation animation = Animation.newAnimation(); 12 | 13 | @Override 14 | protected void reset() { 15 | animation.reset(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/BBoxWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.codec.util.BBox; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class BBoxWrapper extends Component { 11 | public BBox box; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/CofComponentDescriptors.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.badlogic.gdx.assets.AssetDescriptor; 7 | import com.riiablo.codec.COF; 8 | import com.riiablo.codec.DC; 9 | 10 | import java.util.Arrays; 11 | 12 | @Transient 13 | @PooledWeaver 14 | public class CofComponentDescriptors extends PooledComponent { 15 | @SuppressWarnings("unchecked") 16 | public final AssetDescriptor[] descriptors = (AssetDescriptor[]) new AssetDescriptor[COF.Component.NUM_COMPONENTS]; 17 | 18 | @Override 19 | protected void reset() { 20 | Arrays.fill(descriptors, null); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/CofDescriptor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.badlogic.gdx.assets.AssetDescriptor; 7 | import com.riiablo.codec.COF; 8 | 9 | @Transient 10 | @PooledWeaver 11 | public class CofDescriptor extends Component { 12 | public AssetDescriptor descriptor; 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/CofDirtyComponents.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.riiablo.engine.Dirty; 6 | 7 | @PooledWeaver 8 | public class CofDirtyComponents extends Component { 9 | public int flags = Dirty.NONE; 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/CofLoadingComponents.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.riiablo.engine.Dirty; 6 | 7 | @PooledWeaver 8 | public class CofLoadingComponents extends Component { 9 | public int flags = Dirty.NONE; 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/CofWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.codec.COF; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class CofWrapper extends Component { 11 | public COF cof; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/Hovered.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class Hovered extends Component {} 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/Label.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.badlogic.gdx.math.Vector2; 7 | import com.badlogic.gdx.scenes.scene2d.Actor; 8 | 9 | @Transient 10 | @PooledWeaver 11 | public class Label extends PooledComponent { 12 | public Actor actor; 13 | public final Vector2 offset = new Vector2(); 14 | 15 | @Override 16 | protected void reset() { 17 | actor = null; 18 | offset.setZero(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/component/Selectable.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class Selectable extends Component {} 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/client/event/InteractEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.client.event; 2 | 3 | import net.mostlyoriginal.api.event.common.Event; 4 | 5 | public class InteractEvent implements Event { 6 | public static InteractEvent obtain() { 7 | InteractEvent event = new InteractEvent(); 8 | return event; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/Box2DDisposer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server; 2 | 3 | import com.artemis.ComponentMapper; 4 | import com.artemis.annotations.All; 5 | import com.badlogic.gdx.physics.box2d.Body; 6 | import com.riiablo.engine.EntitySystemAdapter; 7 | import com.riiablo.engine.server.component.Box2DBody; 8 | import com.riiablo.map.Box2DPhysics; 9 | 10 | @All(Box2DBody.class) 11 | public class Box2DDisposer extends EntitySystemAdapter { 12 | protected ComponentMapper mBox2DBody; 13 | 14 | protected Box2DPhysics box2d; 15 | 16 | @Override 17 | protected void removed(int entityId) { 18 | if (!mBox2DBody.has(entityId)) return; 19 | Body body = mBox2DBody.get(entityId).body; 20 | if (body != null) box2d.getPhysics().destroyBody(body); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/Box2DSynchronizerPost.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server; 2 | 3 | import com.artemis.ComponentMapper; 4 | import com.artemis.annotations.All; 5 | import com.artemis.systems.IteratingSystem; 6 | import com.badlogic.gdx.physics.box2d.Body; 7 | import com.riiablo.engine.server.component.Box2DBody; 8 | import com.riiablo.engine.server.component.Position; 9 | 10 | @All({Box2DBody.class, Position.class}) 11 | public class Box2DSynchronizerPost extends IteratingSystem { 12 | protected ComponentMapper mBox2DBody; 13 | protected ComponentMapper mPosition; 14 | 15 | @Override 16 | protected void process(int entityId) { 17 | Body body = mBox2DBody.get(entityId).body; 18 | mPosition.get(entityId).position.set(body.getPosition()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/ItemInteractor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server; 2 | 3 | import com.artemis.annotations.Wire; 4 | import com.riiablo.engine.server.component.Interactable; 5 | import com.riiablo.save.ItemController; 6 | 7 | import net.mostlyoriginal.api.system.core.PassiveSystem; 8 | 9 | public class ItemInteractor extends PassiveSystem implements Interactable.Interactor { 10 | private static final String TAG = "ItemInteractor"; 11 | 12 | protected ItemManager items; 13 | 14 | @Wire(name = "itemController", failOnNull = false) 15 | protected ItemController itemController; 16 | 17 | @Override 18 | public void interact(int src, int entity) { 19 | if (itemController != null) { 20 | itemController.groundToCursor(entity); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/ServerItemManager.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server; 2 | 3 | import com.badlogic.gdx.math.Vector2; 4 | import com.riiablo.save.CharData; 5 | 6 | public class ServerItemManager extends ItemManager { 7 | private static final String TAG = "ServerItemManager"; 8 | 9 | @Override 10 | public void groundToCursor(int entityId, int dst) { 11 | super.groundToCursor(entityId, dst); 12 | world.delete(dst); 13 | } 14 | 15 | @Override 16 | public void cursorToGround(int entityId) { 17 | CharData charData = mPlayer.get(entityId).data; 18 | com.riiablo.item.Item item = charData.getItems().getCursor(); 19 | super.cursorToGround(entityId); 20 | 21 | Vector2 position = mPosition.get(entityId).position; 22 | factory.createItem(item, position); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/ServerNetworkIdManager.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server; 2 | 3 | import com.artemis.BaseEntitySystem; 4 | import com.artemis.ComponentMapper; 5 | import com.artemis.annotations.All; 6 | import com.riiablo.engine.server.component.Networked; 7 | 8 | @All(Networked.class) 9 | public class ServerNetworkIdManager extends BaseEntitySystem { 10 | protected ComponentMapper mNetworked; 11 | 12 | @Override 13 | protected void processSystem() {} 14 | 15 | @Override 16 | protected void inserted(int entityId) { 17 | mNetworked.get(entityId).serverId = entityId; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/VelocityAdder.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server; 2 | 3 | import com.artemis.ComponentMapper; 4 | import com.artemis.annotations.All; 5 | import com.artemis.systems.IteratingSystem; 6 | import com.riiablo.engine.server.component.Position; 7 | import com.riiablo.engine.server.component.Velocity; 8 | 9 | @All({Position.class, Velocity.class}) 10 | public class VelocityAdder extends IteratingSystem { 11 | protected ComponentMapper mPosition; 12 | protected ComponentMapper mVelocity; 13 | 14 | @Override 15 | protected void process(int entityId) { 16 | mPosition.get(entityId).position.mulAdd(mVelocity.get(entityId).velocity, world.delta); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/AIWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.ai.AI; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class AIWrapper extends PooledComponent { 11 | public AI ai = AI.IDLE; 12 | 13 | @Override 14 | protected void reset() { 15 | ai = AI.IDLE; 16 | } 17 | 18 | public AIWrapper findAI(int entityId, String ai) { 19 | this.ai = AI.findAI(entityId, ai); 20 | return this; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/AnimData.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class AnimData extends Component { 8 | public int speed; // fixed point 24.8 9 | public int frame; // fixed point 24.8 10 | public int numFrames; // fixed point 24.8 11 | public byte keyframes[]; 12 | public int override = -1; 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/AttributesWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | 7 | import com.riiablo.attributes.Attributes; 8 | 9 | @Transient 10 | @PooledWeaver 11 | public class AttributesWrapper extends Component { 12 | public Attributes attrs; // TODO: make final and call attrs.base().reset() and attrs.reset() 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Box2DBody.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.badlogic.gdx.physics.box2d.Body; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class Box2DBody extends Component { 11 | public Body body; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Classname.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class Classname extends Component { 8 | public String classname; 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/CofAlphas.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.riiablo.codec.COF; 6 | 7 | import java.util.Arrays; 8 | 9 | @PooledWeaver 10 | public class CofAlphas extends PooledComponent { 11 | public static final float ALPHA_NULL = 1.0f; 12 | public static final float[] DEFAULT_ALPHA; 13 | static { 14 | DEFAULT_ALPHA = new float[COF.Component.NUM_COMPONENTS]; 15 | Arrays.fill(DEFAULT_ALPHA, ALPHA_NULL); 16 | } 17 | 18 | public final float[] alpha = new float[COF.Component.NUM_COMPONENTS]; { 19 | reset(); 20 | } 21 | 22 | @Override 23 | protected void reset() { 24 | System.arraycopy(DEFAULT_ALPHA, 0, alpha, 0, COF.Component.NUM_COMPONENTS); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/CofReference.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.riiablo.engine.Engine; 6 | 7 | @PooledWeaver 8 | public class CofReference extends Component { 9 | public String token; 10 | public byte mode; 11 | public byte wclass = Engine.WEAPON_HTH; 12 | 13 | public CofReference set(String token, byte mode) { 14 | this.token = token; 15 | this.mode = mode; 16 | return this; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/DS1ObjectWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.map.DS1; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class DS1ObjectWrapper extends Component { 11 | public DS1 ds1; 12 | public DS1.Object object; 13 | 14 | public DS1ObjectWrapper set(DS1 ds1, DS1.Object object) { 15 | this.ds1 = ds1; 16 | this.object = object; 17 | return this; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Flags.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class Flags extends Component { 8 | /** 9 | * @see com.riiablo.net.packet.d2gs.EntityFlags 10 | */ 11 | public int flags = 0; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Item.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.badlogic.gdx.assets.AssetDescriptor; 7 | import com.riiablo.codec.DC6; 8 | 9 | @Transient 10 | @PooledWeaver 11 | public class Item extends Component { 12 | public com.riiablo.item.Item item; 13 | public AssetDescriptor flippyDescriptor; 14 | 15 | public Item set(com.riiablo.item.Item item) { 16 | this.item = item; 17 | this.flippyDescriptor = new AssetDescriptor<>(Class.Type.ITM.PATH + '\\' + item.getFlippyFile() + ".dc6", DC6.class); 18 | return this; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/MapWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.map.Map; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class MapWrapper extends Component { 11 | public Map map; 12 | public Map.Zone zone; 13 | 14 | public MapWrapper set(Map map, Map.Zone zone) { 15 | this.map = map; 16 | this.zone = zone; 17 | return this; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/MenuWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.widget.NpcMenu; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class MenuWrapper extends Component { 11 | public NpcMenu menu; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Monster.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.codec.excel.MonStats; 7 | import com.riiablo.codec.excel.MonStats2; 8 | 9 | @Transient 10 | @PooledWeaver 11 | public class Monster extends Component { 12 | public MonStats.Entry monstats; 13 | public MonStats2.Entry monstats2; 14 | 15 | public Monster set(MonStats.Entry monstats, MonStats2.Entry monstats2) { 16 | this.monstats = monstats; 17 | this.monstats2 = monstats2; 18 | return this; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/MovementModes.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | 7 | @Transient 8 | @PooledWeaver 9 | public class MovementModes extends Component { 10 | public byte NU; 11 | public byte WL; 12 | public byte RN; 13 | 14 | public MovementModes set(byte NU, byte WL, byte RN) { 15 | this.NU = NU; 16 | this.WL = WL; 17 | this.RN = RN; 18 | return this; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Networked.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.EntityId; 5 | import com.riiablo.engine.Engine; 6 | 7 | public class Networked extends Component { 8 | @EntityId 9 | public int serverId = Engine.INVALID_ENTITY; 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Object.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.codec.excel.Objects; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class Object extends Component { 11 | public Objects.Entry base; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/PathWrapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.map.DS1; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class PathWrapper extends Component { 11 | public DS1.Path path; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Player.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | import com.riiablo.save.CharData; 7 | 8 | @Transient 9 | @PooledWeaver 10 | public class Player extends Component { 11 | public CharData data; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Position.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.badlogic.gdx.math.Vector2; 6 | 7 | @PooledWeaver 8 | public class Position extends PooledComponent { 9 | public final Vector2 position = new Vector2(); 10 | 11 | @Override 12 | protected void reset() { 13 | position.setZero(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Running.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class Running extends Component {} 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Sequence.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | 7 | @Transient 8 | @PooledWeaver 9 | public class Sequence extends Component { 10 | public byte mode1; 11 | public byte mode2; 12 | 13 | public Sequence sequence(byte mode1, byte mode2) { 14 | this.mode1 = mode1; 15 | this.mode2 = mode2; 16 | return this; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Size.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.artemis.annotations.Transient; 6 | 7 | @Transient 8 | @PooledWeaver 9 | public class Size extends Component { 10 | public static final int INSIGNIFICANT = 0; 11 | public static final int SMALL = 1; 12 | public static final int MEDIUM = 2; 13 | public static final int LARGE = 3; 14 | 15 | public int size = INSIGNIFICANT; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Target.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.EntityId; 5 | import com.artemis.annotations.PooledWeaver; 6 | import com.riiablo.engine.Engine; 7 | 8 | @PooledWeaver 9 | public class Target extends Component { 10 | // assert target has Position AND Interactable 11 | @EntityId public int target = Engine.INVALID_ENTITY; 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/Velocity.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.PooledComponent; 4 | import com.artemis.annotations.PooledWeaver; 5 | import com.badlogic.gdx.math.Vector2; 6 | 7 | @PooledWeaver 8 | public class Velocity extends PooledComponent { 9 | public final Vector2 velocity = new Vector2(); 10 | public float walkSpeed; 11 | public float runSpeed; 12 | 13 | @Override 14 | protected void reset() { 15 | velocity.setZero(); 16 | walkSpeed = 0; 17 | runSpeed = 0; 18 | } 19 | 20 | public Velocity set(float walkSpeed, float runSpeed) { 21 | this.walkSpeed = walkSpeed; 22 | this.runSpeed = runSpeed; 23 | return this; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/ZoneAware.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component; 2 | 3 | import com.artemis.Component; 4 | import com.artemis.annotations.PooledWeaver; 5 | 6 | @PooledWeaver 7 | public class ZoneAware extends Component {} -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/component/serializer/FlatBuffersSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.component.serializer; 2 | 3 | import com.google.flatbuffers.FlatBufferBuilder; 4 | import com.google.flatbuffers.Table; 5 | 6 | import com.artemis.Component; 7 | import com.riiablo.net.packet.d2gs.EntitySync; 8 | 9 | public interface FlatBuffersSerializer { 10 | byte getDataType(); 11 | int putData(FlatBufferBuilder builder, T c); 12 | S getTable(EntitySync sync, int j); 13 | T getData(EntitySync sync, int j, T c); 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/AlphaChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | 5 | import net.mostlyoriginal.api.event.common.Event; 6 | 7 | public class AlphaChangeEvent implements Event { 8 | @EntityId public int entityId; 9 | public int flags; 10 | 11 | public static AlphaChangeEvent obtain(int entityId, int flags) { 12 | AlphaChangeEvent event = new AlphaChangeEvent(); 13 | event.entityId = entityId; 14 | event.flags = flags; 15 | return event; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/AnimDataFinishedEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | 5 | import net.mostlyoriginal.api.event.common.Event; 6 | 7 | public class AnimDataFinishedEvent implements Event { 8 | @EntityId 9 | public int entityId; 10 | 11 | public static AnimDataFinishedEvent obtain(int entityId) { 12 | AnimDataFinishedEvent event = new AnimDataFinishedEvent(); 13 | event.entityId = entityId; 14 | return event; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/AnimDataKeyframeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | import net.mostlyoriginal.api.event.common.Event; 5 | 6 | public class AnimDataKeyframeEvent implements Event { 7 | @EntityId 8 | public int entityId; 9 | 10 | public byte keyframe; 11 | 12 | public static AnimDataKeyframeEvent obtain(int entityId, byte keyframe) { 13 | AnimDataKeyframeEvent event = new AnimDataKeyframeEvent(); 14 | event.entityId = entityId; 15 | event.keyframe = keyframe; 16 | return event; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/CofChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | import com.riiablo.engine.Engine; 5 | 6 | import net.mostlyoriginal.api.event.common.Event; 7 | 8 | public class CofChangeEvent implements Event { 9 | @EntityId public int entityId = Engine.INVALID_ENTITY; 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/DamageEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | import net.mostlyoriginal.api.event.common.Event; 5 | 6 | public class DamageEvent implements Event { 7 | @EntityId 8 | public int attacker; 9 | @EntityId 10 | public int victim; 11 | public float damage; 12 | 13 | public static DamageEvent obtain(int attacker, int victim, float damage) { 14 | DamageEvent event = new DamageEvent(); 15 | event.attacker = attacker; 16 | event.victim = victim; 17 | event.damage = damage; 18 | return event; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/DeathEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | import net.mostlyoriginal.api.event.common.Event; 5 | 6 | public class DeathEvent implements Event { 7 | @EntityId 8 | public int killer; 9 | @EntityId 10 | public int victim; 11 | 12 | public static DeathEvent obtain(int killer, int victim) { 13 | DeathEvent event = new DeathEvent(); 14 | event.killer = killer; 15 | event.victim = victim; 16 | return event; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/ModeChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | public class ModeChangeEvent extends CofChangeEvent { 4 | public byte mode; 5 | 6 | public static ModeChangeEvent obtain(int entityId, byte mode) { 7 | ModeChangeEvent event = new ModeChangeEvent(); 8 | event.entityId = entityId; 9 | event.mode = mode; 10 | return event; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/NpcInteractionEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | 5 | import net.mostlyoriginal.api.event.common.Event; 6 | 7 | public class NpcInteractionEvent implements Event { 8 | @EntityId 9 | public int entityId; 10 | 11 | @EntityId 12 | public int npcId; 13 | 14 | public static NpcInteractionEvent obatin(int entityId, int npcId) { 15 | NpcInteractionEvent event = new NpcInteractionEvent(); 16 | event.entityId = entityId; 17 | event.npcId = npcId; 18 | return event; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/SkillCastEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | import net.mostlyoriginal.api.event.common.Event; 5 | 6 | import com.badlogic.gdx.math.Vector2; 7 | 8 | public class SkillCastEvent implements Event { 9 | @EntityId 10 | public int entityId; 11 | public int skillId; 12 | @EntityId 13 | public int targetId; 14 | public Vector2 targetVec; 15 | 16 | public static SkillCastEvent obtain(int entityId, int skillId, int targetId, Vector2 targetVec) { 17 | SkillCastEvent event = new SkillCastEvent(); 18 | event.entityId = entityId; 19 | event.skillId = skillId; 20 | event.targetId = targetId; 21 | event.targetVec = targetVec; 22 | return event; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/TransformChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | 5 | import net.mostlyoriginal.api.event.common.Event; 6 | 7 | public class TransformChangeEvent implements Event { 8 | @EntityId public int entityId; 9 | public int flags; 10 | 11 | public static TransformChangeEvent obtain(int entityId, int flags) { 12 | TransformChangeEvent event = new TransformChangeEvent(); 13 | event.entityId = entityId; 14 | event.flags = flags; 15 | return event; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/WClassChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | public class WClassChangeEvent extends CofChangeEvent { 4 | public byte wclass; 5 | 6 | public static WClassChangeEvent obtain(int entityId, byte wclass) { 7 | WClassChangeEvent event = new WClassChangeEvent(); 8 | event.entityId = entityId; 9 | event.wclass = wclass; 10 | return event; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/engine/server/event/ZoneChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.engine.server.event; 2 | 3 | import com.artemis.annotations.EntityId; 4 | import com.riiablo.map.Map; 5 | 6 | import net.mostlyoriginal.api.event.common.Event; 7 | 8 | public class ZoneChangeEvent implements Event { 9 | @EntityId 10 | public int entityId; 11 | public Map.Zone zone; 12 | 13 | public static ZoneChangeEvent obtain(int entityId, Map.Zone zone) { 14 | ZoneChangeEvent event = new ZoneChangeEvent(); 15 | event.entityId = entityId; 16 | event.zone = zone; 17 | return event; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/ColumnFormat.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | public class ColumnFormat extends RuntimeException { 4 | final String columnText; 5 | final int columnIndex; 6 | 7 | ColumnFormat(NumberFormatException t, CharSequence columnText, int columnIndex) { 8 | this(t.getMessage(), columnText, columnIndex); 9 | initCause(t); 10 | } 11 | 12 | ColumnFormat(CharSequence message, CharSequence columnText, int columnIndex) { 13 | super(message == null ? null : message.toString()); 14 | this.columnText = columnText.toString(); 15 | this.columnIndex = columnIndex; 16 | } 17 | 18 | public String columnText() { 19 | return columnText; 20 | } 21 | 22 | public int columnIndex() { 23 | return columnIndex; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/Entry.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Tags this class as an {@link Excel} class and defines the 10 | * {@link Excel.Entry} row schema. 11 | */ 12 | @Target(ElementType.TYPE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Entry { 15 | Class value(); 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/ForeignKey.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Tags an {@link Excel.Entry} field as a reference to another entry in the 10 | * specified {@link Excel} class. 11 | */ 12 | @Target(ElementType.FIELD) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface ForeignKey { 15 | Class value(); 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/Indexed.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Tags an {@link Excel} to use row indexes as its {@link PrimaryKey}. Used in 10 | * the case where the excel does not include a primary key column. 11 | */ 12 | @Target(ElementType.TYPE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Indexed {} 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/PrimaryKey.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Tags an {@link Excel.Entry} field as the primary way to reference itself. 10 | * Field must be an {@code int}, {@link Integer}, or {@link String}. 11 | * 12 | * @see #SUPPORTED_TYPES 13 | */ 14 | @Target(ElementType.FIELD) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface PrimaryKey { 17 | Class[] SUPPORTED_TYPES = { int.class, Integer.class, String.class }; 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/SerializedWith.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface SerializedWith { 11 | Class value(); 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/Serializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import com.riiablo.io.ByteInput; 4 | import com.riiablo.io.ByteOutput; 5 | 6 | public interface Serializer { 7 | void readBin(T entry, ByteInput in); 8 | void writeBin(T entry, ByteOutput out); 9 | boolean equals(T e1, T e2); 10 | void logErrors(T e1, T e2); 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/excel/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Second iteration of excel class hierarchy design. Kept for posterity until 3 | * third iteration is complete. 4 | * 5 | * @see com.riiablo.codec.excel.Excel 6 | * @see com.riiablo.table 7 | */ 8 | package com.riiablo.excel; 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/graphics/BlendMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.graphics; 2 | 3 | public interface BlendMode { 4 | //int NONE = 0; 5 | //int ALPHA = 1; 6 | //int TRANSPARENCY = 2; 7 | //int SHADOW = 3; 8 | 9 | int NONE = 0; 10 | int ID = 1; 11 | int LUMINOSITY = 2; 12 | int LUMINOSITY_TINT = 3; 13 | int SOLID = 4; 14 | int TINT_BLACKS = 5; 15 | int TINT_WHITES = 6; 16 | int TINT_ID = 7; 17 | int BRIGHTEN = 8; 18 | int TINT_ID_RED = 9; 19 | int DARKEN = 10; 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/graphics/PaletteIndexedPixmap.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.graphics; 2 | 3 | import com.badlogic.gdx.graphics.Pixmap; 4 | import com.badlogic.gdx.utils.BufferUtils; 5 | 6 | public class PaletteIndexedPixmap extends Pixmap { 7 | public static final Pixmap.Format INDEXED = Format.Intensity; 8 | 9 | public PaletteIndexedPixmap(int width, int height) { 10 | super(width, height, INDEXED); 11 | setBlending(Blending.None); 12 | setFilter(Filter.NearestNeighbour); 13 | } 14 | 15 | public PaletteIndexedPixmap(int width, int height, byte[] data) { 16 | this(width, height, data, data.length); 17 | } 18 | 19 | public PaletteIndexedPixmap(int width, int height, byte[] data, int length) { 20 | this(width, height); 21 | BufferUtils.copy(data, 0, getPixels(), length); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/io/EndOfInput.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.io; 2 | 3 | public class EndOfInput extends RuntimeException { 4 | private static final String DEFAULT_MESSAGE = "The end of the input has been reached!"; 5 | 6 | EndOfInput() { 7 | super(DEFAULT_MESSAGE); 8 | } 9 | 10 | EndOfInput(Throwable cause) { 11 | super(DEFAULT_MESSAGE, cause); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/io/SignatureMismatch.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.io; 2 | 3 | import io.netty.buffer.ByteBufUtil; 4 | 5 | public class SignatureMismatch extends InvalidFormat { 6 | public final byte[] actual; 7 | public final byte[] expected; 8 | 9 | public SignatureMismatch(ByteInput in, byte[] actual, byte[] expected) { 10 | super( 11 | in, 12 | String.format("Signatures do not match: %s, expected %s", 13 | ByteBufUtil.hexDump(actual), 14 | ByteBufUtil.hexDump(expected))); 15 | this.actual = actual; 16 | this.expected = expected; 17 | } 18 | 19 | public byte[] actual() { 20 | return actual; 21 | } 22 | 23 | public byte[] expected() { 24 | return expected; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/item/Location.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.item; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | 5 | public enum Location { 6 | STORED, 7 | EQUIPPED, 8 | BELT, 9 | GROUND, 10 | CURSOR, 11 | UNK5, 12 | SOCKET; 13 | 14 | public static Location valueOf(int i) { 15 | switch (i) { 16 | case 0: return STORED; 17 | case 1: return EQUIPPED; 18 | case 2: return BELT; 19 | case 3: return GROUND; 20 | case 4: return CURSOR; 21 | case 5: return UNK5; 22 | case 6: return SOCKET; 23 | default: 24 | Gdx.app.error("Location", "Unknown location: " + i); 25 | return null; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/item/LowQuality.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.item; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | 5 | public enum LowQuality { 6 | CRUDE (1726), 7 | CRACKED (1725), 8 | DAMAGED (1724), 9 | LOW_QUALITY(1723); 10 | 11 | public int stringId; 12 | 13 | LowQuality(int stringId) { 14 | this.stringId = stringId; 15 | } 16 | 17 | public static LowQuality valueOf(int i) { 18 | switch (i) { 19 | case 0: return CRUDE; 20 | case 1: return CRACKED; 21 | case 2: return DAMAGED; 22 | case 3: return LOW_QUALITY; 23 | default: 24 | Gdx.app.error("LowQuality", "Unknown low quality: " + i); 25 | return null; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/item/Quality.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.item; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | 5 | public enum Quality { 6 | NONE, 7 | LOW, 8 | NORMAL, 9 | HIGH, 10 | MAGIC, 11 | SET, 12 | RARE, 13 | UNIQUE, 14 | CRAFTED; 15 | 16 | public static Quality valueOf(int i) { 17 | switch (i) { 18 | case 0: return NONE; 19 | case 1: return LOW; 20 | case 2: return NORMAL; 21 | case 3: return HIGH; 22 | case 4: return MAGIC; 23 | case 5: return SET; 24 | case 6: return RARE; 25 | case 7: return UNIQUE; 26 | case 8: return CRAFTED; 27 | default: 28 | Gdx.app.error("Quality", "Unknown quality: " + i); 29 | return null; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/item/RunewordData.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.item; 2 | 3 | class RunewordData { 4 | static final int RUNEWORD_ID_SHIFT = 0; 5 | static final int RUNEWORD_ID_MASK = 0xFFF << RUNEWORD_ID_SHIFT; 6 | static final int RUNEWORD_EXTRA_SHIFT = 12; 7 | static final int RUNEWORD_EXTRA_MASK = 0xF << RUNEWORD_EXTRA_SHIFT; 8 | 9 | static int id(int pack) { 10 | return (pack & RUNEWORD_ID_MASK) >>> RUNEWORD_ID_SHIFT; 11 | } 12 | 13 | static int extra(int pack) { 14 | return (pack & RUNEWORD_EXTRA_MASK) >>> RUNEWORD_EXTRA_SHIFT; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/item/StoreLoc.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.item; 2 | 3 | import com.badlogic.gdx.Gdx; 4 | 5 | public enum StoreLoc { 6 | NONE, 7 | INVENTORY, 8 | UNK2, 9 | UNK3, 10 | CUBE, 11 | STASH; 12 | 13 | public static StoreLoc valueOf(int i) { 14 | switch (i) { 15 | case 0: return NONE; 16 | case 1: return INVENTORY; 17 | case 2: return UNK2; 18 | case 3: return UNK3; 19 | case 4: return CUBE; 20 | case 5: return STASH; 21 | default: 22 | Gdx.app.error("BodyLoc", "Unknown store location: " + i); 23 | return null; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/key/MappedKeyStateAdapter.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.key; 2 | 3 | public class MappedKeyStateAdapter implements MappedKey.StateListener { 4 | @Override public void onPressed (MappedKey key, @MappedKey.Keycode int keycode) {} 5 | @Override public void onDepressed(MappedKey key, @MappedKey.Keycode int keycode) {} 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/logger/Appender.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.logger; 2 | 3 | public interface Appender { 4 | void append(LogEvent event); 5 | Encoder encoder(); 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/logger/Encoder.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.logger; 2 | 3 | import java.io.OutputStream; 4 | 5 | public interface Encoder { 6 | void encode(LogEvent event, OutputStream out); 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/logger/OutputStreamAppender.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.logger; 2 | 3 | import java.io.OutputStream; 4 | 5 | public class OutputStreamAppender implements Appender { 6 | private final OutputStream out; 7 | private final Encoder encoder = new RiiabloEncoder(); 8 | 9 | public OutputStreamAppender(OutputStream out) { 10 | this.out = out; 11 | } 12 | 13 | @Override 14 | public Encoder encoder() { 15 | return encoder; 16 | } 17 | 18 | @Override 19 | public void append(LogEvent event) { 20 | encoder.encode(event, out); 21 | event.release(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/logger/message/Message.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.logger.message; 2 | 3 | public interface Message { 4 | void release(); 5 | String format(); 6 | String pattern(); 7 | Object[] parameters(); 8 | int numParameters(); 9 | Throwable throwable(); 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/map/ByteArrayPool.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map; 2 | 3 | import com.badlogic.gdx.utils.Pool; 4 | 5 | public class ByteArrayPool extends Pool { 6 | final int size; 7 | 8 | public ByteArrayPool(int size) { 9 | this.size = size; 10 | } 11 | 12 | @Override 13 | protected byte[] newObject() { 14 | return new byte[size]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/map/MapBuilder.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map; 2 | 3 | public interface MapBuilder { 4 | void generate(Map map, int seed, int diff); 5 | } 6 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/map/TileArrayPool.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map; 2 | 3 | import com.badlogic.gdx.utils.Pool; 4 | 5 | public class TileArrayPool extends Pool { 6 | final int size; 7 | 8 | public TileArrayPool(int size) { 9 | this.size = size; 10 | } 11 | 12 | @Override 13 | protected DT1.Tile[] newObject() { 14 | return new DT1.Tile[size]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/map/pfa/PathFinder.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map.pfa; 2 | 3 | import com.badlogic.gdx.ai.pfa.GraphPath; 4 | 5 | public interface PathFinder { 6 | boolean search(Point2 startNode, Point2 endNode, int flags, int size, GraphPath outPath); 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/map2/random/Random.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map2.random; 2 | 3 | import com.badlogic.gdx.math.RandomXS128; 4 | 5 | public class Random extends RandomXS128 { 6 | public Seed seed() { 7 | long seed0 = getState(0); 8 | long seed1 = getState(1); 9 | return Seed.from(seed0, seed1); 10 | } 11 | 12 | public void seed(Seed seed) { 13 | super.setState(seed.seed0, seed.seed1); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/map2/util/DebugMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map2.util; 2 | 3 | public enum DebugMode { 4 | UNSET, 5 | CHUNK, 6 | PREFAB, 7 | TILE, 8 | SUBTILE, 9 | ; 10 | 11 | public DebugMode next; 12 | 13 | static { 14 | UNSET.next = CHUNK; 15 | CHUNK.next = PREFAB; 16 | PREFAB.next = TILE; 17 | TILE.next = SUBTILE; 18 | SUBTILE.next = CHUNK; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/math/Fixed.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.math; 2 | 3 | public final class Fixed { 4 | private static final int[] DIVISOR = new int[Integer.SIZE]; 5 | static { 6 | for (int i = 0; i < Integer.SIZE; i++) { 7 | DIVISOR[i] = 1 << i; 8 | } 9 | } 10 | 11 | public static int floatToIntBits(final float value, final int precision) { 12 | return (int) (value * DIVISOR[precision]); 13 | } 14 | 15 | public static float intBitsToFloat(final int value, final int precision) { 16 | final int pow2 = DIVISOR[precision]; 17 | final int mask = pow2 - 1; 18 | return ((value >> precision) + ((value & mask) / (float) pow2)); 19 | } 20 | 21 | public static int intBitsToFloatFloor(final int value, final int precision) { 22 | return value >> precision; 23 | } 24 | 25 | private Fixed() {} 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/mpq_bytebuf/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Intended successor to com.riiablo.mpq 3 | * 4 | * Implementation of MPQ archive decoding backed by netty ByteBuf and wrapping a 5 | * mapped byte buffer. Significantly faster than original implementation using 6 | * java nio ByteBuffer and byte[], but mainly ByteBuf provides more seamless 7 | * decoding for certain raw files and a much easier interface to work with for 8 | * file decoding. 9 | * 10 | * Allows files to be lazily decoded, s.t., once the header is loaded, other 11 | * contents of the file can be buffered and decoded as-needed, this allows for 12 | * significantly faster decoding times for files which only require immediate 13 | * access to a subset of their data at any given time. 14 | */ 15 | package com.riiablo.mpq_bytebuf; 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/net/Account.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.net; 2 | 3 | import com.riiablo.net.packet.bnls.LoginResponse; 4 | 5 | public class Account { 6 | public String username; 7 | 8 | public Account() {} 9 | 10 | public Account(LoginResponse loginResponse) { 11 | username = loginResponse.username(); 12 | } 13 | 14 | @Override 15 | public String toString() { 16 | return username; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/profiler/GpuSystem.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.profiler; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface GpuSystem {} 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/save/ItemController.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.save; 2 | 3 | import com.riiablo.item.BodyLoc; 4 | import com.riiablo.item.StoreLoc; 5 | 6 | public interface ItemController { 7 | void groundToCursor(int entityId); 8 | void cursorToGround(); 9 | void storeToCursor(int i); 10 | void cursorToStore(StoreLoc storeLoc, int x, int y); 11 | void swapStoreItem(int i, StoreLoc storeLoc, int x, int y); 12 | void bodyToCursor(BodyLoc bodyLoc, boolean merc); 13 | void cursorToBody(BodyLoc bodyLoc, boolean merc); 14 | void swapBodyItem(BodyLoc bodyLoc, boolean merc); 15 | void beltToCursor(int i); 16 | void cursorToBelt(int x, int y); 17 | void swapBeltItem(int i); 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/screen/panel/EscapeController.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.screen.panel; 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor; 4 | 5 | public interface EscapeController { 6 | Actor getEscapeButton(); 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/ByteStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum ByteStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Byte obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Byte deserialize(@NonNull String string) { 17 | try { 18 | return Byte.parseByte(string); 19 | } catch (Throwable t) { 20 | throw new SerializeException(t); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/CharacterStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum CharacterStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Character obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Character deserialize(@NonNull String string) { 17 | if (string.length() != 1) { 18 | throw new SerializeException("character serializations should have a length of 1"); 19 | } 20 | 21 | return string.charAt(0); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/DoubleStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum DoubleStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Double obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Double deserialize(@NonNull String string) { 17 | try { 18 | return Double.parseDouble(string); 19 | } catch (Throwable t) { 20 | throw new SerializeException(t); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/FloatStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum FloatStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Float obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Float deserialize(@NonNull String string) { 17 | try { 18 | return Float.parseFloat(string); 19 | } catch (Throwable t) { 20 | throw new SerializeException(t); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/IntegerStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum IntegerStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Integer obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Integer deserialize(@NonNull String obj) { 17 | try { 18 | return Integer.parseInt(obj); 19 | } catch (Throwable t) { 20 | throw new SerializeException(t); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/LocaleStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import org.apache.commons.lang3.LocaleUtils; 6 | 7 | import java.util.Locale; 8 | 9 | public enum LocaleStringSerializer implements StringSerializer { 10 | INSTANCE; 11 | 12 | @Override 13 | @NonNull 14 | public String serialize(@NonNull Locale locale) { 15 | return locale.toString(); 16 | } 17 | 18 | @Override 19 | @NonNull 20 | public Locale deserialize(@NonNull String string) { 21 | try { 22 | return LocaleUtils.toLocale(string); 23 | } catch (Throwable t) { 24 | throw new SerializeException(t); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/LongStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum LongStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Long obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Long deserialize(@NonNull String string) { 17 | try { 18 | return Long.parseLong(string); 19 | } catch (Throwable t) { 20 | throw new SerializeException(t); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/SerializeException.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | public class SerializeException extends RuntimeException { 7 | public SerializeException() { 8 | super(); 9 | } 10 | 11 | public SerializeException(@Nullable String message) { 12 | super(message); 13 | } 14 | 15 | public SerializeException(@NonNull Throwable cause) { 16 | super(cause); 17 | } 18 | 19 | public SerializeException(@Nullable String message, @NonNull Throwable cause) { 20 | super(message, cause); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/Serializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | public interface Serializer { 7 | @Nullable 8 | T2 serialize(@NonNull T1 obj); 9 | @Nullable 10 | T1 deserialize(@NonNull T2 obj); 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/ShortStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum ShortStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @Override 9 | @NonNull 10 | public String serialize(@NonNull Short obj) { 11 | return obj.toString(); 12 | } 13 | 14 | @Override 15 | @NonNull 16 | public Short deserialize(@NonNull String string) { 17 | try { 18 | return Short.parseShort(string); 19 | } catch (Throwable t) { 20 | throw new SerializeException(t); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/StringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public interface StringSerializer extends Serializer { 6 | @NonNull 7 | String serialize(@NonNull T obj); 8 | @NonNull 9 | T deserialize(@NonNull String str); 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/serializer/StringStringSerializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.serializer; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public enum StringStringSerializer implements StringSerializer { 6 | INSTANCE; 7 | 8 | @NonNull 9 | @Override 10 | public String serialize(@NonNull String obj) { 11 | return obj; 12 | } 13 | 14 | @NonNull 15 | @Override 16 | public String deserialize(@NonNull String str) { 17 | return str; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Third iteration of excel class hierarchy design. Incomplete, not used in 3 | * production yet. 4 | * 5 | * @see com.riiablo.codec.excel.Excel 6 | * @see com.riiablo.excel 7 | */ 8 | package com.riiablo.table; 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Affix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | 5 | @SuppressWarnings("unused") 6 | public class Affix { 7 | @Override 8 | public String toString() { 9 | return name; 10 | } 11 | 12 | @PrimaryKey 13 | public String name; 14 | 15 | public int version; 16 | public int add; 17 | public int multiply; 18 | public int divide; 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/ArmType.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class ArmType { 9 | @Override 10 | public String toString() { 11 | return Name; 12 | } 13 | 14 | @PrimaryKey 15 | public String Token; 16 | public String Name; 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Armor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | 5 | @Schema 6 | @SuppressWarnings("unused") 7 | public class Armor extends ItemEntry { 8 | public int Torso; 9 | public int Legs; 10 | public int rArm; 11 | public int lArm; 12 | public int lSPad; 13 | public int rSPad; 14 | public int reqstr; 15 | public int durability; 16 | public int block; 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Colors.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.PrimaryKey; 5 | import com.riiablo.table.annotation.Schema; 6 | 7 | @Schema 8 | @SuppressWarnings("unused") 9 | public class Colors { 10 | @Override 11 | public String toString() { 12 | return Transform_Color; 13 | } 14 | 15 | @Format(format = "Transform Color") 16 | public String Transform_Color; 17 | 18 | @PrimaryKey 19 | public String Code; 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/CompCode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class CompCode { 9 | @Override 10 | public String toString() { 11 | return component; 12 | } 13 | 14 | public String component; 15 | 16 | @PrimaryKey 17 | public String code; 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Composit.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class Composit { 9 | @Override 10 | public String toString() { 11 | return Name; 12 | } 13 | 14 | public String Name; 15 | 16 | @PrimaryKey 17 | public String Token; 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/LowQualityItems.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema(indexed = true) 7 | @SuppressWarnings("unused") 8 | public class LowQualityItems { 9 | @Override 10 | public String toString() { 11 | return Name; 12 | } 13 | 14 | @PrimaryKey 15 | public String Name; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/LvlTypes.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.PrimaryKey; 5 | import com.riiablo.table.annotation.Schema; 6 | 7 | @Schema 8 | @SuppressWarnings("unused") 9 | public class LvlTypes { 10 | @Override 11 | public String toString() { 12 | return Name; 13 | } 14 | 15 | public String Name; 16 | 17 | @PrimaryKey 18 | public int Id; 19 | 20 | @Format( 21 | format = "File %d", 22 | startIndex = 1, 23 | endIndex = 33) 24 | public String File[]; 25 | 26 | public boolean Beta; 27 | public int Act; 28 | public boolean Expansion; 29 | } 30 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/LvlWarp.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class LvlWarp { 9 | @Override 10 | public String toString() { 11 | return Name; 12 | } 13 | 14 | public String Name; 15 | 16 | @PrimaryKey 17 | public int Id; 18 | 19 | public int SelectX; 20 | public int SelectY; 21 | public int SelectDX; 22 | public int SelectDY; 23 | public int ExitWalkX; 24 | public int ExitWalkY; 25 | public int OffsetX; 26 | public int OffsetY; 27 | public boolean LitVersion; 28 | public int Tiles; 29 | public String Direction; 30 | public boolean Beta; 31 | } 32 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/MagicAffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | 5 | @SuppressWarnings("unused") 6 | public class MagicAffix extends Affix { 7 | public boolean spawnable; 8 | public boolean rare; 9 | public int level; 10 | public int maxlevel; 11 | public int levelreq; 12 | public String classspecific; 13 | 14 | @Format(format = "class") 15 | public String _class; 16 | 17 | public int classlevelreq; 18 | public int frequency; 19 | public int group; 20 | public boolean transform; 21 | public String transformcolor; 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Misc.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | 5 | @Schema 6 | @SuppressWarnings("unused") 7 | public class Misc extends ItemEntry { 8 | public int pSpell; 9 | public int spelldesc; 10 | public String spelldescstr; 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/ModeEntry.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | 5 | @SuppressWarnings("unused") 6 | public class ModeEntry { 7 | public String getCode() { 8 | return Token; 9 | } 10 | 11 | @Override 12 | public String toString() { 13 | return Name; 14 | } 15 | 16 | public String Name; 17 | 18 | @PrimaryKey 19 | public String Token; 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/MonAI.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.PrimaryKey; 5 | import com.riiablo.table.annotation.Schema; 6 | 7 | @Schema 8 | @SuppressWarnings("unused") 9 | public class MonAI { 10 | public String getCode() { 11 | return AI; 12 | } 13 | 14 | @PrimaryKey 15 | public String AI; 16 | 17 | @Format( 18 | format = "*aip%d", 19 | startIndex = 1, 20 | endIndex = 9) 21 | public String aip[]; 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/MonMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class MonMode extends ModeEntry { 9 | @Override 10 | public String getCode() { 11 | return Code; 12 | } 13 | 14 | @PrimaryKey 15 | public String Code; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/MonPreset.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | import com.riiablo.table.annotation.Table; 5 | import com.riiablo.table.table.MonPresetTable; 6 | 7 | @Schema( 8 | indexed = true, 9 | preload = true 10 | ) 11 | @Table(MonPresetTable.class) 12 | @SuppressWarnings("unused") 13 | public class MonPreset { 14 | @Override 15 | public String toString() { 16 | return Place; 17 | } 18 | 19 | public int Act; 20 | public String Place; 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Obj.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | import com.riiablo.table.annotation.Table; 5 | import com.riiablo.table.table.ObjTable; 6 | 7 | @Schema( 8 | indexed = true 9 | ) 10 | @Table(ObjTable.class) 11 | @SuppressWarnings("unused") 12 | public class Obj { 13 | @Override 14 | public String toString() { 15 | return Description; 16 | } 17 | 18 | public int Act; 19 | public int Id; 20 | public String Description; 21 | public int ObjectId; 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/ObjMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | 5 | @Schema 6 | @SuppressWarnings("unused") 7 | public class ObjMode extends ModeEntry { 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/PlayerClass.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.PrimaryKey; 5 | import com.riiablo.table.annotation.Schema; 6 | 7 | @Schema 8 | @SuppressWarnings("unused") 9 | public class PlayerClass { 10 | @Override 11 | public String toString() { 12 | return PlayerClass; 13 | } 14 | 15 | @Format(format = "Player Class") 16 | public String PlayerClass; 17 | 18 | @PrimaryKey 19 | public String Code; 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/PlrMode.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class PlrMode extends ModeEntry { 9 | @Override 10 | public String getCode() { 11 | return Code; 12 | } 13 | 14 | @PrimaryKey 15 | public String Code; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/PlrType.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class PlrType { 9 | public static final int AM = 0; 10 | public static final int SO = 1; 11 | public static final int NE = 2; 12 | public static final int PA = 3; 13 | public static final int BA = 4; 14 | public static final int DZ = 5; 15 | public static final int AS = 6; 16 | 17 | @Override 18 | public String toString() { 19 | return Name; 20 | } 21 | 22 | public String Name; 23 | 24 | @PrimaryKey 25 | public String Token; 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/RareAffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | @SuppressWarnings("unused") 4 | public class RareAffix extends Affix { 5 | } 6 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/RarePrefix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | 5 | @Schema( 6 | offset = 156 // number of entries within RareSuffix 7 | ) 8 | @SuppressWarnings("unused") 9 | public class RarePrefix extends RareAffix { 10 | public String itype1; 11 | public String itype2; 12 | public String itype3; 13 | public String itype4; 14 | public String itype5; 15 | public String itype6; 16 | public String itype7; 17 | public String etype1; 18 | public String etype2; 19 | public String etype3; 20 | public String etype4; 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/RareSuffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Schema; 4 | 5 | @Schema( 6 | offset = 1 7 | ) 8 | @SuppressWarnings("unused") 9 | public class RareSuffix extends RareAffix { 10 | public String itype1; 11 | public String itype2; 12 | public String itype3; 13 | public String itype4; 14 | public String itype5; 15 | public String itype6; 16 | public String itype7; 17 | public String etype1; 18 | public String etype2; 19 | public String etype3; 20 | public String etype4; 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Speech.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class Speech { 9 | @Override 10 | public String toString() { 11 | return sound; 12 | } 13 | 14 | @PrimaryKey 15 | public String sound; 16 | 17 | public String soundstr; 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/UniquePrefix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class UniquePrefix { 9 | @Override 10 | public String toString() { 11 | return Name; 12 | } 13 | 14 | @PrimaryKey 15 | public String Name; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/UniqueSuffix.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.PrimaryKey; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class UniqueSuffix { 9 | @Override 10 | public String toString() { 11 | return Name; 12 | } 13 | 14 | @PrimaryKey 15 | public String Name; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/WeaponClass.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.PrimaryKey; 5 | import com.riiablo.table.annotation.Schema; 6 | 7 | @Schema 8 | @SuppressWarnings("unused") 9 | public class WeaponClass { 10 | // TODO: 11 | // public WeaponClass get(ItemEntry entry) { 12 | // return entry instanceof Weapons ? get(((Weapons) entry).wclass) : null;//get("NONE"); 13 | // } 14 | 15 | @Override 16 | public String toString() { 17 | return WeaponClass; 18 | } 19 | 20 | @Format(format = "Weapon Class") 21 | public String WeaponClass; 22 | 23 | @PrimaryKey 24 | public String Code; 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/table/schema/Weapons.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | @SuppressWarnings("unused") 8 | public class Weapons extends ItemEntry { 9 | public String wclass; 10 | 11 | @Format(format = "2handedwclass") 12 | public String _2handedwclass; 13 | 14 | @Format(format = "1or2handed") 15 | public boolean _1or2handed; 16 | 17 | @Format(format = "2handed") 18 | public boolean _2handed; 19 | 20 | @Format(format = "2handmindam") 21 | public int _2handmindam; 22 | 23 | @Format(format = "2handmaxdam") 24 | public int _2handmaxdam; 25 | 26 | public int minmisdam; 27 | public int maxmisdam; 28 | public int reqstr; 29 | public int reqdex; 30 | public int durability; 31 | } 32 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/util/ActorUtils.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.util; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import com.badlogic.gdx.scenes.scene2d.Actor; 6 | 7 | public class ActorUtils { 8 | private ActorUtils() {} 9 | 10 | public static void centerAt(@NonNull Actor a, float x, float y) { 11 | a.setPosition(x - a.getWidth() / 2, y - a.getHeight() / 2); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/util/ImplUtils.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.util; 2 | 3 | public final class ImplUtils { 4 | private ImplUtils() {} 5 | 6 | public static T todo() { 7 | throw new RuntimeException("not yet implemented"); 8 | } 9 | 10 | public static T unimplemented() { 11 | throw new RuntimeException("not implemented"); 12 | } 13 | 14 | public static T unsupported(String message) { 15 | throw new UnsupportedOperationException(message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/util/PrimitiveUtils.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.util; 2 | 3 | public final class PrimitiveUtils { 4 | public static final int INT_BYTES = Integer.SIZE / Byte.SIZE; 5 | 6 | private PrimitiveUtils() {} 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/AcceptAllValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public final class AcceptAllValidator extends SimpleValidator { 6 | @Override 7 | public void validate(@Nullable Object obj) {} 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/NonNullNonEmptyStringValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public class NonNullNonEmptyStringValidator extends NonNullValidator { 6 | @Override 7 | public void validate(@Nullable Object obj) { 8 | super.validate(obj); 9 | if (obj.getClass() != String.class) { 10 | throw new ValidationException("obj is not a string"); 11 | } 12 | 13 | String str = (String) obj; 14 | if (str.isEmpty()) { 15 | throw new ValidationException("passed string is empty"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/NonNullSubclassValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public class NonNullSubclassValidator extends NonNullValidator { 6 | 7 | private final Class TYPE; 8 | 9 | public NonNullSubclassValidator(Class type) { 10 | TYPE = type; 11 | } 12 | 13 | public Class getType() { 14 | return TYPE; 15 | } 16 | 17 | @Override 18 | public void validate(@Nullable Object obj) { 19 | super.validate(obj); 20 | if (!TYPE.isAssignableFrom(obj.getClass())) { 21 | throw new ValidationException(obj.toString() + " is not a subclass of " + TYPE.getName()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/NonNullValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public class NonNullValidator extends SimpleValidator { 6 | @Override 7 | public void validate(@Nullable Object obj) { 8 | if (obj == null) { 9 | throw new ValidationException("obj cannot be null"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/RangeValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public interface RangeValidator> extends Validator { 6 | @Nullable T getMin(); 7 | @Nullable T getMax(); 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/RejectAllValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public final class RejectAllValidator extends SimpleValidator { 6 | @Override 7 | public void validate(@Nullable Object obj) { 8 | throw new ValidationException(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/SimpleValidator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public abstract class SimpleValidator implements Validator { 6 | @Override 7 | public boolean isValid(@Nullable Object obj) { 8 | try { 9 | validate(obj); 10 | return true; 11 | } catch (ValidationException e) { 12 | return false; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/Validatable.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public interface Validatable { 6 | boolean isValid(@Nullable Object obj); 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/ValidationException.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | public class ValidationException extends RuntimeException { 7 | public ValidationException() { 8 | super(); 9 | } 10 | 11 | public ValidationException(@Nullable String message) { 12 | super(message); 13 | } 14 | 15 | public ValidationException(@NonNull Throwable cause) { 16 | super(cause); 17 | } 18 | 19 | public ValidationException(@Nullable String message, @NonNull Throwable cause) { 20 | super(message, cause); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/validator/Validator.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.validator; 2 | 3 | import android.support.annotation.Nullable; 4 | 5 | public interface Validator extends Validatable { 6 | Validator ACCEPT_ALL = new AcceptAllValidator(); 7 | Validator REJECT_ALL = new RejectAllValidator(); 8 | Validator ACCEPT_NON_NULL = new NonNullValidator(); 9 | Validator ACCEPT_NON_NULL_NON_EMPTY_STRING = new NonNullNonEmptyStringValidator(); 10 | 11 | void validate(@Nullable Object obj); 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/video/BinkVideo.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.video; 2 | 3 | import com.riiablo.io.ByteInput; 4 | 5 | public class BinkVideo { 6 | 7 | final BIK bik; 8 | 9 | BinkVideo(BIK bik, ByteInput in) { 10 | this.bik = bik; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/widget/TextArea.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.widget; 2 | 3 | import com.badlogic.gdx.utils.Disposable; 4 | 5 | public class TextArea extends com.badlogic.gdx.scenes.scene2d.ui.TextArea implements Disposable { 6 | 7 | public TextArea(TextFieldStyle style) { 8 | this("", style); 9 | } 10 | 11 | public TextArea(String text, TextFieldStyle style) { 12 | super(text, style); 13 | } 14 | 15 | @Override 16 | public void dispose() { 17 | 18 | } 19 | 20 | public static class TextFieldStyle extends com.badlogic.gdx.scenes.scene2d.ui.TextArea.TextFieldStyle { 21 | public TextFieldStyle() { 22 | 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/riiablo/widget/TextField.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.widget; 2 | 3 | import com.badlogic.gdx.utils.Disposable; 4 | 5 | public class TextField extends com.badlogic.gdx.scenes.scene2d.ui.TextField implements Disposable { 6 | 7 | public TextField(TextFieldStyle style) { 8 | this("", style); 9 | } 10 | 11 | public TextField(String text, TextFieldStyle style) { 12 | super(text, style); 13 | } 14 | 15 | @Override 16 | public void dispose() { 17 | 18 | } 19 | 20 | public static class TextFieldStyle extends com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle { 21 | public TextFieldStyle() { 22 | 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /core/src/test/java/com/riiablo/asset/AssetPathTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.asset; 2 | 3 | import org.junit.jupiter.params.*; 4 | import org.junit.jupiter.params.provider.*; 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | public class AssetPathTest { 8 | @ParameterizedTest 9 | @CsvSource(value = { 10 | "a,a", 11 | "a,A", 12 | "A,a", 13 | "a/a,a/a", 14 | "a/a,a\\a", 15 | "a\\a,a/a", 16 | "a\\a,a\\a", 17 | }, delimiter = ',') 18 | void test(String s1, String s2) { 19 | AssetPath p1 = AssetPath.of(s1); 20 | AssetPath p2 = AssetPath.of(s2); 21 | assertEquals(p1, p2); 22 | assertEquals(p1.hashCode(), p2.hashCode()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/src/test/java/com/riiablo/excel/ExcelTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import org.junit.jupiter.api.*; 4 | 5 | import java.io.IOException; 6 | 7 | import com.badlogic.gdx.Gdx; 8 | import com.badlogic.gdx.files.FileHandle; 9 | 10 | import com.riiablo.RiiabloTest; 11 | import com.riiablo.excel.txt.MonStats; 12 | import com.riiablo.logger.Level; 13 | import com.riiablo.logger.LogManager; 14 | 15 | public class ExcelTest extends RiiabloTest { 16 | @BeforeAll 17 | public static void before() { 18 | LogManager.setLevel("com.riiablo.excel.Excel", Level.TRACE); 19 | } 20 | 21 | @Test 22 | public void parse_monstats_columns() throws IOException { 23 | FileHandle handle = Gdx.files.internal("test/monstats.txt"); 24 | Excel.loadTxt(new MonStats(), handle); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/test/java/com/riiablo/map2/random/SeedTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map2.random; 2 | 3 | import org.junit.jupiter.api.*; 4 | import static org.junit.jupiter.api.Assertions.*; 5 | 6 | import com.badlogic.gdx.math.MathUtils; 7 | 8 | class SeedTest { 9 | @RepeatedTest(10) 10 | void encode() { 11 | long seed0 = MathUtils.random.nextLong(); 12 | long seed1 = MathUtils.random.nextLong(); 13 | String encoding = Seed.encode(seed0, seed1); 14 | Seed seed = Seed.decode(encoding); 15 | assertEquals(seed0, seed.seed0); 16 | assertEquals(seed1, seed.seed1); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/src/test/java/com/riiablo/mpq_bytebuf/MpqFileResolverTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.mpq_bytebuf; 2 | 3 | import org.junit.jupiter.api.*; 4 | 5 | import com.riiablo.RiiabloTest; 6 | import com.riiablo.logger.Level; 7 | import com.riiablo.logger.LogManager; 8 | 9 | class MpqFileResolverTest extends RiiabloTest { 10 | @BeforeAll 11 | public static void before() { 12 | LogManager.setLevel("com.riiablo.mpq_bytebuf", Level.WARN); 13 | LogManager.setLevel("com.riiablo.mpq_bytebuf.MpqFileResolver", Level.TRACE); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/test/java/com/riiablo/table/BinGeneratorTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | import org.junit.BeforeClass; 4 | import org.junit.Test; 5 | 6 | import com.badlogic.gdx.Gdx; 7 | import com.badlogic.gdx.files.FileHandle; 8 | 9 | import com.riiablo.RiiabloTest; 10 | import com.riiablo.logger.Level; 11 | import com.riiablo.logger.LogManager; 12 | 13 | public class BinGeneratorTest extends RiiabloTest { 14 | @BeforeClass 15 | public static void before() { 16 | LogManager.setLevel("com.riiablo.table.BinGenerator", Level.TRACE); 17 | } 18 | 19 | @Test 20 | public void generate() { 21 | FileHandle dstDir = Gdx.files.absolute("C:\\Users\\csmith\\projects\\libgdx\\riiablo\\assets"); 22 | new BinGenerator().generate(dstDir); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /excel/annotation-processor/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | apply plugin: 'java-library' 3 | 4 | dependencies { 5 | annotationProcessor "com.google.auto.service:auto-service:1.0-rc7" 6 | implementation "com.google.auto.service:auto-service-annotations:1.0-rc7" 7 | 8 | api project(':excel:annotations') 9 | implementation "com.squareup:javapoet:1.13.0" 10 | 11 | api "org.apache.commons:commons-lang3:3.9" 12 | implementation "org.apache.commons:commons-collections4:4.1" 13 | } 14 | 15 | dependencies { 16 | testImplementation project(':excel:excel-test') 17 | testImplementation "junit:junit:4.12" 18 | } 19 | -------------------------------------------------------------------------------- /excel/annotation-processor/src/main/java/com/riiablo/excel/AnnotationEntry.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import javax.lang.model.element.AnnotationValue; 4 | import javax.lang.model.element.ExecutableElement; 5 | 6 | public class AnnotationEntry { 7 | final ExecutableElement element; 8 | final AnnotationValue value; 9 | 10 | AnnotationEntry(ExecutableElement element, AnnotationValue value) { 11 | this.element = element; 12 | this.value = value; 13 | } 14 | 15 | ExecutableElement element() { 16 | return element; 17 | } 18 | 19 | AnnotationValue value() { 20 | return value; 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return element.toString(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /excel/annotation-processor/src/test/java/com/riiablo/excel/SerializerGeneratorTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import org.junit.Test; 4 | 5 | public class SerializerGeneratorTest { 6 | @Test 7 | public void test() { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /excel/annotations/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':excel:core') 3 | } 4 | -------------------------------------------------------------------------------- /excel/annotations/src/main/java/com/riiablo/excel/annotation/PrimaryKey.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Indicates that a field should be used as the primary key in a 11 | * {@link Schema schema}. 12 | */ 13 | @Documented 14 | @Retention(RetentionPolicy.SOURCE) 15 | @Target(ElementType.FIELD) 16 | public @interface PrimaryKey {} 17 | -------------------------------------------------------------------------------- /excel/annotations/src/main/java/com/riiablo/excel/annotation/Schema.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Indicates that the specified type is a record schema. 11 | */ 12 | @Documented 13 | @Retention(RetentionPolicy.SOURCE) 14 | @Target(ElementType.TYPE) 15 | public @interface Schema { 16 | /** 17 | * Offset of the first record. 18 | */ 19 | int offset() default 0; 20 | 21 | /** 22 | * Whether or not records are indexed in their natural ordering. Setting this 23 | * will override any set {@link PrimaryKey primary key}. 24 | */ 25 | boolean indexed() default false; 26 | } 27 | -------------------------------------------------------------------------------- /excel/core/src/main/java/com/riiablo/excel/DataInput.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | public interface DataInput { 4 | byte read8(); 5 | short read16(); 6 | int read32(); 7 | long read64(); 8 | boolean readBoolean(); 9 | String readString(); 10 | } 11 | -------------------------------------------------------------------------------- /excel/core/src/main/java/com/riiablo/excel/DataOutput.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | public interface DataOutput { 4 | void write8(int value); 5 | void write16(int value); 6 | void write32(int value); 7 | void write64(long value); 8 | void writeBoolean(boolean value); 9 | void writeString(CharSequence chars); 10 | } 11 | -------------------------------------------------------------------------------- /excel/core/src/main/java/com/riiablo/excel/Serializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | public interface Serializer { 4 | void readRecord(T record, DataInput in); 5 | void writeRecord(T record, DataOutput out); 6 | boolean equals(T e1, T e2); 7 | Iterable compare(T e1, T e2); 8 | } 9 | -------------------------------------------------------------------------------- /excel/excel-test/build.gradle: -------------------------------------------------------------------------------- 1 | sourceSets.main.java.srcDirs += compileJava.options.generatedSourceOutputDirectory.getAsFile().get() 2 | idea.module.generatedSourceDirs += compileJava.options.generatedSourceOutputDirectory.getAsFile().get() 3 | 4 | dependencies { 5 | annotationProcessor project(':excel:annotation-processor') 6 | implementation project(':excel:annotation-processor') 7 | implementation project(':excel:annotations') 8 | } 9 | 10 | dependencies { 11 | testImplementation "junit:junit:4.12" 12 | } 13 | -------------------------------------------------------------------------------- /excel/excel-test/src/main/java/com/riiablo/excel/txt/MonStatsSerializerImpl.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel.txt; 2 | 3 | import com.riiablo.excel.Serializer; 4 | 5 | public abstract class MonStatsSerializerImpl implements Serializer { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /excel/excel-test/src/main/java/com/riiablo/excel/txt/MonStatsTableImpl.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel.txt; 2 | 3 | import com.riiablo.excel.Table; 4 | 5 | public class MonStatsTableImpl extends Table { 6 | private MonStatsTableImpl() { 7 | super(MonStats.class); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /excel/excel-test/src/test/java/com/riiablo/excel/IntegrationTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.excel; 2 | 3 | import org.junit.Test; 4 | 5 | public class IntegrationTest { 6 | @Test 7 | public void test() {} 8 | } 9 | -------------------------------------------------------------------------------- /flatbuffers/flatc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/flatbuffers/flatc.exe -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | org.gradle.jvmargs=-Xms512M -Xmx1G -XX:MaxMetaspaceSize=256M 3 | org.gradle.configureondemand=false 4 | 5 | androidBuildToolsPluginVersion=7.0.1 6 | flatbuffersPluginVersion=1.0.7 7 | gdxVersion=1.10.0 8 | gdxControllersVersion=2.2.1 9 | artemisOdbVersion=2.3.0 10 | artemisContribVersion=2.4.0 11 | gdxAiVersion=1.8.2 12 | nettyVersion=4.1.50.Final 13 | flatbuffersVersion=1.12.0 14 | cliVersion=1.4 15 | box2DLightsVersion=1.5 16 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/gradlew -------------------------------------------------------------------------------- /resources/icon-intellij-idea-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/resources/icon-intellij-idea-128x128.png -------------------------------------------------------------------------------- /screenshots/Android-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/Android-1.png -------------------------------------------------------------------------------- /screenshots/Clipboard-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/Clipboard-1.png -------------------------------------------------------------------------------- /screenshots/Clipboard-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/Clipboard-2.png -------------------------------------------------------------------------------- /screenshots/Clipboard-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/Clipboard-3.png -------------------------------------------------------------------------------- /screenshots/Clipboard-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/Clipboard-4.png -------------------------------------------------------------------------------- /screenshots/Clipboard-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/Clipboard-5.png -------------------------------------------------------------------------------- /screenshots/multi_player.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/multi_player.webp -------------------------------------------------------------------------------- /screenshots/single_player.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/screenshots/single_player.webp -------------------------------------------------------------------------------- /server/build.gradle: -------------------------------------------------------------------------------- 1 | subprojects { 2 | apply plugin: 'java' 3 | 4 | dependencies { 5 | implementation project(':core') 6 | implementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" 7 | implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 8 | 9 | implementation "commons-cli:commons-cli:$cliVersion" 10 | } 11 | 12 | dependencies { 13 | testImplementation 'junit:junit:4.12' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /server/d2gs/src/main/java/com/riiablo/server/d2gs/Packet.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.server.d2gs; 2 | 3 | import com.google.flatbuffers.ByteBufferUtil; 4 | import java.nio.ByteBuffer; 5 | 6 | import com.badlogic.gdx.utils.TimeUtils; 7 | 8 | import com.riiablo.net.packet.d2gs.D2GS; 9 | 10 | public class Packet { 11 | public int id; 12 | public long time; 13 | public ByteBuffer buffer; 14 | public D2GS data; 15 | 16 | public static Packet obtain(int id, ByteBuffer buffer) { 17 | Packet packet = new Packet(); 18 | packet.id = id; 19 | packet.time = TimeUtils.millis(); 20 | packet.buffer = buffer; 21 | packet.data = D2GS.getRootAsD2GS(ByteBufferUtil.removeSizePrefix(buffer)); 22 | return packet; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/net/Endpoint.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.net; 2 | 3 | import io.netty.channel.ChannelHandlerContext; 4 | import java.net.SocketAddress; 5 | import java.nio.ByteBuffer; 6 | 7 | public interface Endpoint { 8 | void sendMessage(int id, ByteBuffer buffer, int qos); 9 | void processMessage(ChannelHandlerContext ctx, SocketAddress from, T msg); 10 | SocketAddress getSender(ChannelHandlerContext ctx, T msg); 11 | } 12 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/net/IntResolver.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.net; 2 | 3 | public interface IntResolver { 4 | V get(int key); 5 | } 6 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/net/MessageProcessor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.net; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | import io.netty.channel.ChannelHandlerContext; 5 | import java.net.SocketAddress; 6 | 7 | public interface MessageProcessor { 8 | void processMessage(ChannelHandlerContext ctx, SocketAddress from, ByteBuf msg); 9 | } 10 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/net/tcp/D2GSOutboundPacketFactory.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.net.tcp; 2 | 3 | import java.nio.ByteBuffer; 4 | 5 | import com.riiablo.net.packet.d2gs.D2GSData; 6 | 7 | public class D2GSOutboundPacketFactory { 8 | public static D2GSOutboundPacket obtain(int id, byte dataType, ByteBuffer buffer) { 9 | return new D2GSOutboundPacket(id, dataType, buffer); 10 | } 11 | 12 | static class D2GSOutboundPacket extends OutboundPacket { 13 | D2GSOutboundPacket(int id, byte dataType, ByteBuffer buffer) { 14 | super(id, dataType, buffer); 15 | } 16 | 17 | @Override 18 | public String dataTypeName() { 19 | return D2GSData.name(dataType()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/nnet/Endpoint.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.nnet; 2 | 3 | import io.netty.channel.ChannelHandlerContext; 4 | import java.net.SocketAddress; 5 | import java.nio.ByteBuffer; 6 | 7 | public interface Endpoint { 8 | void sendMessage(int id, ByteBuffer bb, int qos); 9 | void messageReceived(ChannelHandlerContext ctx, SocketAddress from, T msg); 10 | SocketAddress getSender(ChannelHandlerContext ctx, T msg); 11 | 12 | interface IdResolver { 13 | R get(int id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/nnet/Packet.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.nnet; 2 | 3 | import com.google.flatbuffers.Table; 4 | import java.nio.ByteBuffer; 5 | 6 | import com.badlogic.gdx.utils.TimeUtils; 7 | 8 | public class Packet { 9 | public int id; 10 | public long time; 11 | public ByteBuffer buffer; 12 | public T data; 13 | 14 | public static Packet obtain(int id, T fb) { 15 | Packet packet = new Packet<>(); 16 | packet.id = id; 17 | packet.time = TimeUtils.millis(); 18 | packet.buffer = fb.getByteBuffer(); 19 | packet.data = fb; 20 | return packet; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/nnet/PacketProcessor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.nnet; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | import io.netty.channel.ChannelHandlerContext; 5 | import java.net.SocketAddress; 6 | 7 | public interface PacketProcessor { 8 | void processPacket(ChannelHandlerContext ctx, SocketAddress from, ByteBuf bb); 9 | } 10 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/Endpoint.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet; 2 | 3 | import io.netty.channel.ChannelHandlerContext; 4 | import java.net.SocketAddress; 5 | 6 | public interface Endpoint extends PacketSender { 7 | void reset(); 8 | void update(float delta); 9 | void messageReceived(ChannelHandlerContext ctx, SocketAddress from, T msg); 10 | SocketAddress getRemoteAddress(ChannelHandlerContext ctx, T msg); 11 | } 12 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/PacketProcessor.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | import io.netty.channel.ChannelHandlerContext; 5 | import java.net.SocketAddress; 6 | 7 | public interface PacketProcessor { 8 | void processPacket(ChannelHandlerContext ctx, SocketAddress from, ByteBuf bb); 9 | } 10 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/PacketSender.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet; 2 | 3 | import io.netty.channel.Channel; 4 | import java.net.InetSocketAddress; 5 | import java.nio.ByteBuffer; 6 | 7 | public interface PacketSender { 8 | Channel channel(); 9 | void sendMessage(InetSocketAddress to, ByteBuffer bb); 10 | void sendMessage(InetSocketAddress to, T qos, ByteBuffer bb); 11 | } 12 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/UnicastEndpoint.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet; 2 | 3 | import java.nio.ByteBuffer; 4 | 5 | public interface UnicastEndpoint extends Endpoint { 6 | void sendMessage(ByteBuffer bb); 7 | void sendMessage(Object qos, ByteBuffer bb); 8 | } 9 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/reliable/QoS.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet.reliable; 2 | 3 | public enum QoS { 4 | /** 5 | * Message is guaranteed to arrive and in order. 6 | */ 7 | Reliable, 8 | 9 | /** 10 | * Message is not guaranteed delivery nor order. 11 | */ 12 | Unreliable, 13 | 14 | /** 15 | * Message is not guaranteed delivery, but will be in order 16 | */ 17 | UnreliableOrdered; 18 | 19 | public static QoS valueOf(int i) { 20 | switch (i) { 21 | case 0: return Reliable; 22 | case 1: return Unreliable; 23 | case 2: return UnreliableOrdered; 24 | default: return null; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/reliable/ReliableConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet.reliable; 2 | 3 | public class ReliableConfiguration { 4 | public int maxPacketSize = 16384; 5 | public int fragmentThreshold = 1024; 6 | public int maxFragments = 16; 7 | public int fragmentSize = 1024; 8 | public int sentPacketBufferSize = 256; 9 | public int receivedPacketBufferSize = 256; 10 | public int fragmentReassemblyBufferSize = 64; 11 | public float rttSmoothingFactor = 0.25f; 12 | public float packetLossSmoothingFactor = 0.1f; 13 | public float bandwidthSmoothingFactor = 0.1f; 14 | public int packetHeaderSize = 28; 15 | } 16 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/reliable/ReliableUtils.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet.reliable; 2 | 3 | public class ReliableUtils { 4 | private ReliableUtils() {} 5 | 6 | public static boolean sequenceGreaterThan(int s1, int s2) { 7 | return ((s1 > s2) && (s1 - s2 <= Short.MAX_VALUE)) 8 | || ((s1 < s2) && (s2 - s1 > Short.MAX_VALUE)); 9 | } 10 | 11 | public static boolean sequenceLessThan(int s1, int s2) { 12 | return sequenceGreaterThan(s2, s1); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/reliable/data/FragmentReassemblyData.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet.reliable.data; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | 5 | import com.artemis.utils.BitVector; 6 | 7 | public class FragmentReassemblyData { 8 | public int sequence; 9 | public int ack; 10 | public int ackBits; 11 | public int numFragmentsReceived; 12 | public int numFragmentsTotal; 13 | public ByteBuf dataBuffer; 14 | public int packetBytes; 15 | public int headerOffset; 16 | 17 | public final BitVector fragmentReceived = new BitVector(256); 18 | } 19 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/reliable/data/ReceivedPacketData.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet.reliable.data; 2 | 3 | public class ReceivedPacketData { 4 | public float time; 5 | public int packetSize; 6 | } 7 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/onet/reliable/data/SentPacketData.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.onet.reliable.data; 2 | 3 | public class SentPacketData { 4 | public float time; 5 | public boolean acked; 6 | public int packetSize; 7 | } 8 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/server/d2gs/tcp/ChannelIdResolver.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.server.d2gs.tcp; 2 | 3 | import io.netty.channel.Channel; 4 | 5 | import com.riiablo.nnet.Endpoint; 6 | 7 | /** 8 | * Not used anymore -- prefer to use anonymous implementations of {@link Endpoint.IdResolver} which 9 | * wrap preexisting data structures. 10 | */ 11 | @Deprecated 12 | public class ChannelIdResolver implements Endpoint.IdResolver { 13 | private final Channel[] channels; 14 | 15 | public ChannelIdResolver(int maxClients) { 16 | channels = new Channel[maxClients]; 17 | } 18 | 19 | @Override 20 | public Channel get(int id) { 21 | return channels[id]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /server/netty/src/main/java/com/riiablo/server/netty/PacketTuple.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.server.netty; 2 | 3 | import java.nio.ByteBuffer; 4 | 5 | import com.badlogic.gdx.utils.TimeUtils; 6 | 7 | import com.riiablo.net.packet.netty.Netty; 8 | 9 | public class PacketTuple { 10 | public int id; 11 | public long time; 12 | public ByteBuffer buffer; 13 | public Netty data; 14 | 15 | public static PacketTuple obtain(int id, ByteBuffer buffer) { 16 | PacketTuple packet = new PacketTuple(); 17 | packet.id = id; 18 | packet.time = TimeUtils.millis(); 19 | packet.buffer = buffer; 20 | packet.data = Netty.getRootAsNetty(buffer); 21 | return packet; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /table/annotation-processor/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | annotationProcessor "com.google.auto.service:auto-service:1.0-rc7" 3 | implementation "com.google.auto.service:auto-service-annotations:1.0-rc7" 4 | implementation "com.squareup:javapoet:1.13.0" 5 | 6 | api project(':table:annotations') 7 | api project(':table:core') 8 | 9 | implementation "org.apache.commons:commons-text:1.8" 10 | implementation "org.apache.commons:commons-collections4:4.1" 11 | } 12 | -------------------------------------------------------------------------------- /table/annotation-processor/src/main/java/com/riiablo/table/annotation/SchemaProcessorUtils.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.annotation; 2 | 3 | final class SchemaProcessorUtils { 4 | private SchemaProcessorUtils() {} 5 | } 6 | -------------------------------------------------------------------------------- /table/annotations/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':table:core') 3 | } 4 | -------------------------------------------------------------------------------- /table/annotations/src/main/java/com/riiablo/table/annotation/ForeignKey.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Indicates that the field is a reference to a record in another 11 | * {@link Schema schema} of field's type using the field in this schema 12 | * specified by {@link #value() value} as the foreign key. 13 | */ 14 | @Documented 15 | @Retention(RetentionPolicy.SOURCE) 16 | @Target(ElementType.FIELD) 17 | public @interface ForeignKey { 18 | String value(); 19 | } 20 | -------------------------------------------------------------------------------- /table/annotations/src/main/java/com/riiablo/table/annotation/PrimaryKey.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Indicates that a field should be used as the primary key in a 11 | * {@link Schema schema}. 12 | */ 13 | @Documented 14 | @Retention(RetentionPolicy.SOURCE) 15 | @Target(ElementType.FIELD) 16 | public @interface PrimaryKey {} 17 | -------------------------------------------------------------------------------- /table/core/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api "com.badlogicgames.gdx:gdx:$gdxVersion" 3 | } 4 | -------------------------------------------------------------------------------- /table/core/src/main/java/com/riiablo/table/DataInput.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | public interface DataInput { 4 | byte read8(); 5 | short read16(); 6 | int read32(); 7 | long read64(); 8 | boolean readBoolean(); 9 | String readString(); 10 | } 11 | -------------------------------------------------------------------------------- /table/core/src/main/java/com/riiablo/table/DataOutput.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | public interface DataOutput { 4 | DataOutput write8(int value); 5 | DataOutput write16(int value); 6 | DataOutput write32(int value); 7 | DataOutput write64(long value); 8 | DataOutput writeBoolean(boolean value); 9 | DataOutput writeString(CharSequence chars); 10 | } 11 | -------------------------------------------------------------------------------- /table/core/src/main/java/com/riiablo/table/Manifest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | /** 4 | * Defines behaviors necessary to manage a collection of tables. 5 | */ 6 | public interface Manifest { 7 | Table inject(Table table, R record); 8 | } 9 | -------------------------------------------------------------------------------- /table/core/src/main/java/com/riiablo/table/ParserInput.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | public interface ParserInput { 4 | int fieldId(String fieldName); 5 | int numFields(); 6 | 7 | int recordId(String recordName); 8 | int numRecords(); 9 | 10 | String recordName(int recordId); 11 | int primaryKey(String fieldName); 12 | int primaryKey(); 13 | 14 | CharSequence token(int recordId, int fieldId); 15 | 16 | byte parseByte(int recordId, int fieldId); 17 | short parseShort(int recordId, int fieldId); 18 | int parseInt(int recordId, int fieldId); 19 | long parseLong(int recordId, int fieldId); 20 | boolean parseBoolean(int recordId, int fieldId); 21 | float parseFloat(int recordId, int fieldId); 22 | double parseDouble(int recordId, int fieldId); 23 | String parseString(int recordId, int fieldId); 24 | } 25 | -------------------------------------------------------------------------------- /table/core/src/main/java/com/riiablo/table/ParserMapper.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | /** 4 | * @deprecated unused -- attempt to create automatic mapping of txt parser records to indexes 5 | */ 6 | @Deprecated 7 | public interface ParserMapper

> { 8 | int map(P parser, String recordName); 9 | } 10 | -------------------------------------------------------------------------------- /table/core/src/main/java/com/riiablo/table/Serializer.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | /** 4 | * Defines behaviors necessary to serialize a record to and from a binary 5 | * format. 6 | * 7 | * @param record type 8 | */ 9 | public interface Serializer { 10 | void readRecord(R record, DataInput in); 11 | void writeRecord(R record, DataOutput out); 12 | boolean equals(R e1, R e2); 13 | Iterable compare(R e1, R e2); 14 | } 15 | -------------------------------------------------------------------------------- /table/integration/build.gradle: -------------------------------------------------------------------------------- 1 | sourceSets.main.java.srcDirs += compileJava.options.generatedSourceOutputDirectory.getAsFile().get() 2 | idea.module.generatedSourceDirs += compileJava.options.generatedSourceOutputDirectory.getAsFile().get() 3 | 4 | dependencies { 5 | annotationProcessor project(':table:annotation-processor') 6 | implementation project(':table:core') 7 | implementation project(':table:annotations') 8 | } 9 | 10 | dependencies { 11 | testImplementation "junit:junit:4.12" 12 | } 13 | -------------------------------------------------------------------------------- /table/integration/src/main/java/com/riiablo/table/schema/MonStatsInjectorImpl.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.Injector; 4 | 5 | public class MonStatsInjectorImpl implements Injector { 6 | @Override 7 | public MonStats inject(Object manifest, MonStats record) { 8 | throw new UnsupportedOperationException(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /table/integration/src/main/java/com/riiablo/table/schema/MonStatsTableImpl.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.Parser; 4 | import com.riiablo.table.ParserInput; 5 | import com.riiablo.table.Serializer; 6 | import com.riiablo.table.Table; 7 | 8 | public class MonStatsTableImpl extends Table { 9 | public MonStatsTableImpl() { 10 | super(MonStats.class); 11 | } 12 | 13 | @Override 14 | protected MonStats newRecord() { 15 | return new MonStats(); 16 | } 17 | 18 | @Override 19 | protected Parser newParser(ParserInput parser) { 20 | return new MonStatsParserImpl(parser); 21 | } 22 | 23 | @Override 24 | protected Serializer newSerializer() { 25 | return new MonStatsSerializerImpl(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /table/integration/src/main/java/com/riiablo/table/schema/Weapons.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table.schema; 2 | 3 | import com.riiablo.table.annotation.Format; 4 | import com.riiablo.table.annotation.Schema; 5 | 6 | @Schema 7 | public class Weapons extends ItemEntry { 8 | public String wclass; 9 | public int minmisdam; 10 | public int maxmisdam; 11 | public int reqstr; 12 | public int reqdex; 13 | public int durability; 14 | 15 | @Format(format = "2handedwclass") 16 | public String _2handedwclass; 17 | 18 | @Format(format = "1or2handed") 19 | public boolean _1or2handed; 20 | 21 | @Format(format = "2handed") 22 | public boolean _2handed; 23 | 24 | @Format(format = "2handmindam") 25 | public int _2handmindam; 26 | 27 | @Format(format = "2handmaxdam") 28 | public int _2handmaxdam; 29 | } 30 | -------------------------------------------------------------------------------- /table/integration/src/test/java/com/riiablo/table/IntegrationTest.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.table; 2 | 3 | import org.junit.Test; 4 | 5 | public class IntegrationTest { 6 | @Test 7 | public void test() {} 8 | } 9 | -------------------------------------------------------------------------------- /tester/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | project.ext.visuiVersion = '1.4.0' 4 | 5 | dependencies { 6 | implementation project(':core') 7 | implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" 8 | implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 9 | implementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" 10 | 11 | implementation "commons-cli:commons-cli:$cliVersion" 12 | implementation "com.kotcrab.vis:vis-ui:$visuiVersion" 13 | } 14 | -------------------------------------------------------------------------------- /tools/backends/backend-core/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'application' 2 | 3 | java { 4 | sourceCompatibility = JavaVersion.VERSION_1_8 5 | targetCompatibility = JavaVersion.VERSION_1_8 6 | } 7 | 8 | dependencies { 9 | api project(':core') 10 | api "commons-cli:commons-cli:$cliVersion" 11 | } 12 | -------------------------------------------------------------------------------- /tools/backends/backend-headless/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':tools:backends:backend-core') 3 | api "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" 4 | api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 5 | } 6 | -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':tools:backends:backend-core') 3 | api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" 4 | api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 5 | api "com.kotcrab.vis:vis-ui:$visuiVersion" 6 | } 7 | -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl/src/main/resources/ic_launcher_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/backends/backend-lwjgl/src/main/resources/ic_launcher_128.png -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl/src/main/resources/ic_launcher_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/backends/backend-lwjgl/src/main/resources/ic_launcher_16.png -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl/src/main/resources/ic_launcher_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/backends/backend-lwjgl/src/main/resources/ic_launcher_32.png -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl3/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':tools:backends:backend-core') 3 | api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion" 4 | api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 5 | api "com.kotcrab.vis:vis-ui:$visuiVersion" 6 | } 7 | -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl3/src/main/resources/ic_launcher_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/backends/backend-lwjgl3/src/main/resources/ic_launcher_128.png -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl3/src/main/resources/ic_launcher_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/backends/backend-lwjgl3/src/main/resources/ic_launcher_16.png -------------------------------------------------------------------------------- /tools/backends/backend-lwjgl3/src/main/resources/ic_launcher_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/backends/backend-lwjgl3/src/main/resources/ic_launcher_32.png -------------------------------------------------------------------------------- /tools/camera/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl') } 2 | description = 'Debugs isometric camera functionality.' 3 | application.mainClass = 'com.riiablo.camera.CameraTool' 4 | -------------------------------------------------------------------------------- /tools/d2s-reader/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-headless') } 2 | description = 'Deserializes and debugs D2S files.' 3 | application.mainClass = 'com.riiablo.save.D2SReaderTool' 4 | -------------------------------------------------------------------------------- /tools/direction/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl') } 2 | description = 'Debugs entity direction controls.' 3 | application.mainClass = 'com.riiablo.engine.DirectionTool' 4 | -------------------------------------------------------------------------------- /tools/ds1-viewer/src/main/java/com/riiablo/map/DS1Types.java: -------------------------------------------------------------------------------- 1 | package com.riiablo.map; 2 | 3 | import com.riiablo.codec.excel.Excel; 4 | 5 | public class DS1Types extends Excel { 6 | public static class Entry extends Excel.Entry { 7 | @Override 8 | public String toString() { 9 | return Name; 10 | } 11 | 12 | @Column public String Name; 13 | 14 | @Column @Key 15 | public int Def; 16 | 17 | @Column public int LevelType; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tools/font-metrics/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl') } 2 | description = 'Configures font metrics for D2 font files.' 3 | application.mainClass = 'com.riiablo.FontMetricsTool' 4 | -------------------------------------------------------------------------------- /tools/map-debugger/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl') } 2 | description = 'Debugs map generation.' 3 | application.mainClass = 'com.riiablo.MapDebugger' 4 | -------------------------------------------------------------------------------- /tools/map-viewer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl') } 2 | description = 'View and generate maps.' 3 | application.mainClass = 'com.riiablo.map.MapViewer' 4 | -------------------------------------------------------------------------------- /tools/mpq-viewer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl3') } 2 | dependencies { implementation ("com.kotcrab.vis:vis-ui") { version { require '1.5.0' } } } 3 | description = 'View and debug MPQ archive contents.' 4 | application.mainClass = 'com.riiablo.mpq.MPQViewer' 5 | -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT1/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT1/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT1/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT1/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT2/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT2/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT2/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT2/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT3/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT3/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT3/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT3/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT4/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT4/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT4/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT4/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT5/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT5/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/ACT5/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/ACT5/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/EndGame/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/EndGame/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/EndGame/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/EndGame/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Menu0/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Menu0/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Menu0/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Menu0/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/STATIC/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/STATIC/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Sky/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Sky/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Sky/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Sky/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Trademark/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Trademark/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Trademark/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Trademark/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/Units/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/Units/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/fechar/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/fechar/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/fechar/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/fechar/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/loading/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/loading/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/loading/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/loading/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu1/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu1/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu1/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu1/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu2/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu2/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu2/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu2/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu3/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu3/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu3/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu3/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu4/Pal.PL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu4/Pal.PL2 -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/palettes/menu4/pal.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/palettes/menu4/pal.dat -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/shaders/indexpalette.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | 5 | uniform mat4 u_projTrans; 6 | 7 | varying vec2 v_texCoord; 8 | 9 | void main() { 10 | v_texCoord = a_texCoord0; 11 | gl_Position = u_projTrans * a_position; 12 | } -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/shaders/indexpalette2.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | 5 | uniform mat4 u_projTrans; 6 | 7 | varying vec2 v_texCoord; 8 | varying vec4 tint; 9 | 10 | void main() { 11 | tint = a_color; 12 | v_texCoord = a_texCoord0; 13 | gl_Position = u_projTrans * a_position; 14 | } -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/shaders/indexpalette3.vert: -------------------------------------------------------------------------------- 1 | attribute vec4 a_position; 2 | attribute vec4 a_color; 3 | attribute vec2 a_texCoord0; 4 | 5 | uniform mat4 u_projTrans; 6 | 7 | varying vec2 v_texCoord; 8 | varying vec4 tint; 9 | 10 | void main() { 11 | tint = a_color; 12 | v_texCoord = a_texCoord0; 13 | gl_Position = u_projTrans * a_position; 14 | } -------------------------------------------------------------------------------- /tools/mpq-viewer/src/main/resources/skin/x1/uiskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/collinsmith/riiablo/59aa8d5021c457e8d2891bb23c9e3a0ef724c6b3/tools/mpq-viewer/src/main/resources/skin/x1/uiskin.png -------------------------------------------------------------------------------- /tools/old/build.gradle: -------------------------------------------------------------------------------- 1 | project.ext.visuiVersion = '1.4.2' 2 | 3 | dependencies { 4 | implementation project(':core') 5 | implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" 6 | implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 7 | implementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" 8 | 9 | implementation "commons-cli:commons-cli:$cliVersion" 10 | implementation "com.kotcrab.vis:vis-ui:$visuiVersion" 11 | } 12 | 13 | dependencies { 14 | implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" 15 | implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" 16 | implementation "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion" 17 | } 18 | -------------------------------------------------------------------------------- /tools/video-player/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { implementation project(':tools:backends:backend-lwjgl3') } 2 | description = 'Play videos from MPQ archives.' 3 | application.mainClass = 'com.riiablo.video.VideoPlayerTool' 4 | 5 | dependencies { 6 | implementation "com.badlogicgames.gdx-video:gdx-video:1.3.2-SNAPSHOT" 7 | implementation "com.badlogicgames.gdx-video:gdx-video-lwjgl3:1.3.2-SNAPSHOT" 8 | } 9 | --------------------------------------------------------------------------------