Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatOneCalculator committed Nov 5, 2021
1 parent 7b2589c commit d3fd4b3
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion Among-Us-Dumpy-Gif-Maker
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Based off of: https://daveparrish.net/posts/2019-11-16-Better-AppImage-PKGBUILD-template.html

_pkgname="among-us-dumpy-gif-maker"
_pkgver="3.1.3"
_pkgver="3.2.0"
_jar="Among-Us-Dumpy-Gif-Maker-${_pkgver}-all.jar"

pkgname="${_pkgname}"
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Based off of: https://daveparrish.net/posts/2019-11-16-Better-AppImage-PKGBUILD-template.html

_pkgname="among-us-dumpy-gif-maker"
_pkgver="3.1.3"
_pkgver="3.2.0"
_jar="Among-Us-Dumpy-Gif-Maker-${_pkgver}-all.jar"

pkgname="${_pkgname}"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


### Please credit this repository when you use this program!
##### Current version: 3.1.3
##### Current version: 3.2.0

# Instructions

Expand All @@ -50,13 +50,13 @@

To everyone else:

### Make sure to [download the jar](https://github.com/ThatOneCalculator/Among-Us-Dumpy-Gif-Maker/releases/download/v3.1.3/Among-Us-Dumpy-Gif-Maker-3.1.3-all.jar)!
### Make sure to [download the jar](https://github.com/ThatOneCalculator/Among-Us-Dumpy-Gif-Maker/releases/download/v3.2.0/Among-Us-Dumpy-Gif-Maker-3.2.0-all.jar)!

### Basic usage:
Click and open the jar, select the file, and a file called "dumpy.gif" will be made in the same folder as the jar.

### CLI usage:
- `java -jar Among-Us-Dumpy-Gif-Maker-3.1.3-all.jar <flags>`
- `java -jar Among-Us-Dumpy-Gif-Maker-3.2.0-all.jar <flags>`
All flags are optional.
Flags:
```
Expand All @@ -75,5 +75,5 @@ git clone https://github.com/ThatOneCalculator/Among-Us-Dumpy-Gif-Maker
cd Among-Us-Dumpy-Gif-Maker
gradle wrapper
./gradlew shadowJar # .\gradelw.bat shadowJar if you're on Windows
java -jar ./build/libs/Among-Us-Dumpy-Gif-Maker-3.1.3-all.jar
java -jar ./build/libs/Among-Us-Dumpy-Gif-Maker-3.2.0-all.jar
```
2 changes: 1 addition & 1 deletion among-us-dumpy-gif-maker
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

/usr/bin/java -jar /usr/lib/Among-Us-Dumpy-Gif-Maker-3.1.3-all.jar $@
/usr/bin/java -jar /usr/lib/Among-Us-Dumpy-Gif-Maker-3.2.0-all.jar $@
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
statcordkey = lines[0].strip()

upsince = datetime.datetime.now()
version = "3.1.3"
version = "3.2.0"

intents = discord.Intents.default()
bot = commands.AutoShardedBot(command_prefix=commands.when_mentioned_or("!!"), intents=intents, chunk_guilds_at_startup=False)
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "dev.t1c.amogus"
version = "3.1.3"
version = "3.2.0"

repositories {
mavenCentral()
Expand All @@ -18,8 +18,8 @@ dependencies {
application {
mainClass.set("dev.t1c.dumpy.sus")
java {
sourceCompatibility = JavaVersion.VERSION_15
targetCompatibility = JavaVersion.VERSION_15
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
}

Expand Down
118 changes: 59 additions & 59 deletions src/main/java/dev/t1c/dumpy/sus.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,39 +162,39 @@ public static void main(String[] args) throws Exception {
count2Reset--;
modestring = "_twist";
}

// Actually makes the frames
BufferedImage[] frames = new BufferedImage[bufferedImageArraySize];

// these constants are now variables.
double fac = 1.00;
int mox = 74;
int moy = 63;
BufferedImage[] moguses = new BufferedImage[6];
for (int it = 0; it < 6; it++) {
var temp = main.getResource("dumpy/" + it + modestring + ".png");
moguses[it] = ImageIO.read(temp);
}
double fac = 1.00;
int mox = 74;
int moy = 63;
BufferedImage[] moguses = new BufferedImage[6];
for (int it = 0; it < 6; it++) {
var temp = main.getResource("dumpy/" + it + modestring + ".png");
moguses[it] = ImageIO.read(temp);
}

// dynamic resizer
if (ix > 1000 || iy > 1000) {
if (ix > iy) {
fac = 1000.0 / (double)ix;
} else {
fac = 1000.0 / (double)iy;
}
// Resizes crewmates
mox = (int)Math.round((double)mox * fac);
moy = (int)Math.round((double)moy * fac);
for (int itt = 0; itt < 6; itt++) {
moguses[itt] = toBufferedImage(moguses[itt].getScaledInstance(mox, moy, Image.SCALE_DEFAULT));
}
// Resizing for BG
pad = (int)((double)pad * fac);
ix = (mox * tx) + (pad * 2);
iy = (moy * ty) + (pad * 2);
}
if (ix > 1000 || iy > 1000) {
if (ix > iy) {
fac = 1000.0 / (double)ix;
} else {
fac = 1000.0 / (double)iy;
}
// Resizes crewmates
mox = (int)Math.round((double)mox * fac);
moy = (int)Math.round((double)moy * fac);
for (int itt = 0; itt < 6; itt++) {
moguses[itt] = toBufferedImage(moguses[itt].getScaledInstance(mox, moy, Image.SCALE_DEFAULT));
}
// Resizing for BG
pad = (int)((double)pad * fac);
ix = (mox * tx) + (pad * 2);
iy = (moy * ty) + (pad * 2);
}

// Plots crewmates
CountDownLatch l = new CountDownLatch(frames.length);
for (int index = 0; index < frames.length; index++) {
Expand All @@ -209,10 +209,10 @@ public static void main(String[] args) throws Exception {
final String F_dotSlash = dotSlash;
final String F_extraoutput = extraoutput;
final int ixF = ix; // new series of "modified" variables
final int iyF = iy;
final int moxF = mox;
final int moyF = moy;
final int padF = pad;
final int iyF = iy;
final int moxF = mox;
final int moyF = moy;
final int padF = pad;
// Start of new thread
new Thread(() -> {
try {
Expand Down Expand Up @@ -400,36 +400,36 @@ public static void runCmd(String cmd) throws Exception {

// New pixel shader
public static BufferedImage shader(BufferedImage t, int pRgb) {
Color entry = new Color(pRgb);
// alpha check
int WHY = (pRgb >> 24) & 0xFF;
long lim = Math.round(255.0 * 0.07);
if (WHY < lim) {
return null;
}
// brightness check. If the pixel is too dim, the brightness is floored to the standard "black" level.
Color entry = new Color(pRgb);
// alpha check
int WHY = (pRgb >> 24) & 0xFF;
long lim = Math.round(255.0 * 0.07);
if (WHY < lim) {
return null;
}
// brightness check. If the pixel is too dim, the brightness is floored to the standard "black" level.
float[] hsb = new float[3];
Color.RGBtoHSB(entry.getRed(), entry.getGreen(), entry.getBlue(), hsb);
float blackLevel = 0.200f;
float blackLevel = 0.200f;
if (hsb[2] < blackLevel) {
entry = new Color(Color.HSBtoRGB(hsb[0], hsb[1], blackLevel));
}
// "Blue's Clues" shadow fix: Fixes navy blue shadows.
shadeDefault = 0.66;
double factor = Math.abs(shadeDefault - (double)hsb[0]);
factor = (1.0 / 6.0) - factor;
if (factor > 0) {
factor = factor * 2;
//System.out.println(shadeDefault + ", " + factor);
shadeDefault = shadeDefault - factor;
}
// "Blue's Clues" shadow fix: Fixes navy blue shadows.
shadeDefault = 0.66;
double factor = Math.abs(shadeDefault - (double)hsb[0]);
factor = (1.0 / 6.0) - factor;
if (factor > 0) {
factor = factor * 2;
//System.out.println(shadeDefault + ", " + factor);
shadeDefault = shadeDefault - factor;
}
// shading.
Color shade = null;
try {
shade = new Color((int)((double)entry.getRed() * shadeDefault), (int)((double)entry.getGreen() * shadeDefault), (int)((double)entry.getBlue() * shadeDefault));
} catch (IllegalArgumentException iae) {
System.out.println("ERROR: " + shadeDefault + ", " + factor);
}
Color shade = null;
try {
shade = new Color((int)((double)entry.getRed() * shadeDefault), (int)((double)entry.getGreen() * shadeDefault), (int)((double)entry.getBlue() * shadeDefault));
} catch (IllegalArgumentException iae) {
System.out.println("ERROR: " + shadeDefault + ", " + factor);
}
Color.RGBtoHSB(shade.getRed(), shade.getGreen(), shade.getBlue(), hsb);
hsb[0] = hsb[0] - 0.0635f;
if (hsb[0] < 0.0f) {
Expand All @@ -442,8 +442,8 @@ public static BufferedImage shader(BufferedImage t, int pRgb) {
t = toARGB(t);
BufferedImage convertedImage = lookup.filter(t, null);
convertedImage = lookup2.filter(convertedImage, null);
return convertedImage;
}
return convertedImage;
}

// Indexed image error (https://stackoverflow.com/a/19594979)
public static BufferedImage toARGB(Image i) {
Expand Down

0 comments on commit d3fd4b3

Please sign in to comment.