diff options
| author | 2020-05-03 21:06:38 +0100 | |
|---|---|---|
| committer | 2020-05-03 21:06:38 +0100 | |
| commit | 854f4d49407e45d67dd5754afd21a7e59970ca5b (patch) | |
| tree | 582e3245786f9723b5895b0c8d41087b0e6bb416 /src/main/java/cuchaz/enigma/EnigmaProject.java | |
| parent | Rewrite search dialog (#233) (diff) | |
| download | enigma-fork-854f4d49407e45d67dd5754afd21a7e59970ca5b.tar.gz enigma-fork-854f4d49407e45d67dd5754afd21a7e59970ca5b.tar.xz enigma-fork-854f4d49407e45d67dd5754afd21a7e59970ca5b.zip | |
Multiplayer support (#221)
* First pass on multiplayer
* Apply review suggestions
* Dedicated Enigma server
* Don't jump to references when other users do stuff
* Better UI + translations
* french translation
* Apply review suggestions
* Document the protocol
* Fix most issues with scrolling.
* Apply review suggestions
* Fix zip hash issues + add a bit more logging
* Optimize zip hash
* Fix a couple of login bugs
* Add message log and user list
* Make Message an abstract class
* Make status bar work, add chat box
* Hide message log/users list when not connected
* Fix status bar not resetting entirely
* Run stop server task on server thread to prevent multithreading race conditions
* Add c2s message to packet id list
* Fix message scroll bar not scrolling to the end
* Formatting
* User list size -> ushort
* Combine contains and remove check
* Check removal before sending packet
* Add password to login packet
* Fix the GUI closing the rename text field when someone else renames something
* Update fr_fr.json
* oups
* Make connection/server create dialogs not useless if it fails once
* Refactor UI state updating
* Fix imports
* Fix Collab menu
* Fix NPE when rename not allowed
* Make the log file a configurable option
* Don't use modified UTF
* Update fr_fr.json
* Bump version to 0.15.4
* Apparently I can't spell neither words nor semantic versions
Co-authored-by: Yanis48 <doublecraft.official@gmail.com>
Co-authored-by: 2xsaiko <git@dblsaiko.net>
Diffstat (limited to 'src/main/java/cuchaz/enigma/EnigmaProject.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/EnigmaProject.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/EnigmaProject.java b/src/main/java/cuchaz/enigma/EnigmaProject.java index 852bfc4..b345fb3 100644 --- a/src/main/java/cuchaz/enigma/EnigmaProject.java +++ b/src/main/java/cuchaz/enigma/EnigmaProject.java | |||
| @@ -1,12 +1,14 @@ | |||
| 1 | package cuchaz.enigma; | 1 | package cuchaz.enigma; |
| 2 | 2 | ||
| 3 | import com.google.common.base.Functions; | 3 | import com.google.common.base.Functions; |
| 4 | import com.google.common.base.Preconditions; | ||
| 4 | import cuchaz.enigma.analysis.ClassCache; | 5 | import cuchaz.enigma.analysis.ClassCache; |
| 5 | import cuchaz.enigma.analysis.EntryReference; | 6 | import cuchaz.enigma.analysis.EntryReference; |
| 6 | import cuchaz.enigma.analysis.index.JarIndex; | 7 | import cuchaz.enigma.analysis.index.JarIndex; |
| 7 | import cuchaz.enigma.api.service.NameProposalService; | 8 | import cuchaz.enigma.api.service.NameProposalService; |
| 8 | import cuchaz.enigma.bytecode.translators.SourceFixVisitor; | 9 | import cuchaz.enigma.bytecode.translators.SourceFixVisitor; |
| 9 | import cuchaz.enigma.bytecode.translators.TranslationClassVisitor; | 10 | import cuchaz.enigma.bytecode.translators.TranslationClassVisitor; |
| 11 | import cuchaz.enigma.network.EnigmaServer; | ||
| 10 | import cuchaz.enigma.source.*; | 12 | import cuchaz.enigma.source.*; |
| 11 | import cuchaz.enigma.translation.Translator; | 13 | import cuchaz.enigma.translation.Translator; |
| 12 | import cuchaz.enigma.translation.mapping.*; | 14 | import cuchaz.enigma.translation.mapping.*; |
| @@ -39,13 +41,16 @@ public class EnigmaProject { | |||
| 39 | 41 | ||
| 40 | private final ClassCache classCache; | 42 | private final ClassCache classCache; |
| 41 | private final JarIndex jarIndex; | 43 | private final JarIndex jarIndex; |
| 44 | private final byte[] jarChecksum; | ||
| 42 | 45 | ||
| 43 | private EntryRemapper mapper; | 46 | private EntryRemapper mapper; |
| 44 | 47 | ||
| 45 | public EnigmaProject(Enigma enigma, ClassCache classCache, JarIndex jarIndex) { | 48 | public EnigmaProject(Enigma enigma, ClassCache classCache, JarIndex jarIndex, byte[] jarChecksum) { |
| 49 | Preconditions.checkArgument(jarChecksum.length == EnigmaServer.CHECKSUM_SIZE); | ||
| 46 | this.enigma = enigma; | 50 | this.enigma = enigma; |
| 47 | this.classCache = classCache; | 51 | this.classCache = classCache; |
| 48 | this.jarIndex = jarIndex; | 52 | this.jarIndex = jarIndex; |
| 53 | this.jarChecksum = jarChecksum; | ||
| 49 | 54 | ||
| 50 | this.mapper = EntryRemapper.empty(jarIndex); | 55 | this.mapper = EntryRemapper.empty(jarIndex); |
| 51 | } | 56 | } |
| @@ -70,6 +75,10 @@ public class EnigmaProject { | |||
| 70 | return jarIndex; | 75 | return jarIndex; |
| 71 | } | 76 | } |
| 72 | 77 | ||
| 78 | public byte[] getJarChecksum() { | ||
| 79 | return jarChecksum; | ||
| 80 | } | ||
| 81 | |||
| 73 | public EntryRemapper getMapper() { | 82 | public EntryRemapper getMapper() { |
| 74 | return mapper; | 83 | return mapper; |
| 75 | } | 84 | } |