init
148
dark_present.pde
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
import ddf.minim.*;
|
||||||
|
import ddf.minim.effects.*;
|
||||||
|
|
||||||
|
Minim minim;
|
||||||
|
AudioPlayer ltp;
|
||||||
|
|
||||||
|
final int img_count = 5;
|
||||||
|
|
||||||
|
final String[] txt_vals = {
|
||||||
|
"Welcome",
|
||||||
|
"(Don't look back)",
|
||||||
|
"Why haven't you read my letter yet?!!!"
|
||||||
|
};
|
||||||
|
|
||||||
|
PImage img;
|
||||||
|
|
||||||
|
String txt = "";
|
||||||
|
|
||||||
|
int img_num = 1;
|
||||||
|
long tmr = 0;
|
||||||
|
int brightness = -255;
|
||||||
|
|
||||||
|
int ti = 0;
|
||||||
|
|
||||||
|
void keyPressed() {
|
||||||
|
key = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
color[] push_array;
|
||||||
|
|
||||||
|
int ms = 0;
|
||||||
|
|
||||||
|
PImage screen = null;
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
fullScreen();
|
||||||
|
size(512, 200, P3D);
|
||||||
|
minim = new Minim(this);
|
||||||
|
ltp = minim.loadFile("music.wav", 2048);
|
||||||
|
noCursor();
|
||||||
|
ltp.loop();
|
||||||
|
img = loadImage("img" + img_num + ".bmp");
|
||||||
|
img.loadPixels();
|
||||||
|
push_array = new color[img.pixels.length];
|
||||||
|
arrayCopy(img.pixels, push_array);
|
||||||
|
img.updatePixels();
|
||||||
|
textFont(createFont("c64-pro-rus.otf", 16));
|
||||||
|
ms = int(random(4, 11));
|
||||||
|
}
|
||||||
|
|
||||||
|
String fparse(String text, int max) {
|
||||||
|
String out = "";
|
||||||
|
int il = 0;
|
||||||
|
for (int i = 0; i < text.length(); i ++) {
|
||||||
|
if (il > max) {
|
||||||
|
out += "\n";
|
||||||
|
il = 0;
|
||||||
|
}
|
||||||
|
out += text.charAt(i);
|
||||||
|
il ++;
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
int f = 0;
|
||||||
|
boolean lplay = true;
|
||||||
|
boolean rt = true;
|
||||||
|
long period = 2000;
|
||||||
|
|
||||||
|
long ltimer = 0;
|
||||||
|
|
||||||
|
void draw() {
|
||||||
|
background(0);
|
||||||
|
image(img, 0, 0, width, height);
|
||||||
|
if (millis() - tmr >= 8000) {
|
||||||
|
tmr = millis();
|
||||||
|
if (lplay) {
|
||||||
|
img_num ++;
|
||||||
|
if (img_num > img_count) img_num = 1;
|
||||||
|
img = loadImage("img" + img_num + ".bmp");
|
||||||
|
img.loadPixels();
|
||||||
|
push_array = new color[img.pixels.length];
|
||||||
|
brightness = -255;
|
||||||
|
arrayCopy(img.pixels, push_array);
|
||||||
|
img.updatePixels();
|
||||||
|
if (ti < txt_vals.length) {
|
||||||
|
txt += fparse(txt_vals[ti], 10) + "\n";
|
||||||
|
ti ++;
|
||||||
|
}
|
||||||
|
f ++;
|
||||||
|
}
|
||||||
|
if (f == ms && lplay) {
|
||||||
|
ltp.pause();
|
||||||
|
ltp = minim.loadFile("scrimer.wav", 2048);
|
||||||
|
ltp.play();
|
||||||
|
screen = loadImage("onload.png");
|
||||||
|
lplay = false;
|
||||||
|
ltimer = millis();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lplay) {
|
||||||
|
if (brightness < 0) {
|
||||||
|
brightness += 10;
|
||||||
|
img.loadPixels();
|
||||||
|
for (int i = 0; i < img.pixels.length; i++) {
|
||||||
|
|
||||||
|
float r = red(push_array[i]) + brightness;
|
||||||
|
float g = green(push_array[i]) + brightness;
|
||||||
|
float b = blue(push_array[i]) + brightness;
|
||||||
|
|
||||||
|
r = constrain(r, 0, 255);
|
||||||
|
g = constrain(g, 0, 255);
|
||||||
|
b = constrain(b, 0, 255);
|
||||||
|
|
||||||
|
img.pixels[i] = color(r, g, b);
|
||||||
|
}
|
||||||
|
img.updatePixels();
|
||||||
|
}
|
||||||
|
text(txt, 10, 26);
|
||||||
|
} else {
|
||||||
|
if (millis() - ltimer >= period) {
|
||||||
|
if (rt == false) {
|
||||||
|
String os = System.getProperty("os.name").toLowerCase();
|
||||||
|
os = os.startsWith("win") ? "Windows" : (os.contains("nix") || os.contains("nux") ? "Unix/Linux" : "Неопределённая ОС");
|
||||||
|
try {
|
||||||
|
String cmd = "";
|
||||||
|
if (os == "Windows") {
|
||||||
|
cmd = "shutdown /s";
|
||||||
|
} else {
|
||||||
|
cmd = "shutdown -h now";
|
||||||
|
}
|
||||||
|
Process process = Runtime.getRuntime().exec(cmd);
|
||||||
|
process.waitFor();
|
||||||
|
} catch (Exception e) {
|
||||||
|
println(e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rt = false;
|
||||||
|
period = 8000;
|
||||||
|
ltimer = millis();
|
||||||
|
ltp.pause();
|
||||||
|
ltp = minim.loadFile("clock.wav", 2048);
|
||||||
|
ltp.play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
image(screen, 0, 0, width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
data/c64-pro-rus.otf
Normal file
BIN
data/clock.wav
Normal file
BIN
data/img1.bmp
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
data/img2.bmp
Normal file
|
After Width: | Height: | Size: 664 KiB |
BIN
data/img3.bmp
Normal file
|
After Width: | Height: | Size: 3.0 MiB |
BIN
data/img4.bmp
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
data/img5.bmp
Normal file
|
After Width: | Height: | Size: 659 KiB |
BIN
data/music.wav
Normal file
BIN
data/onload.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
data/scrimer.wav
Normal file
BIN
windows-amd64/dark_present.exe
Normal file
BIN
windows-amd64/data/c64-pro-rus.otf
Normal file
BIN
windows-amd64/data/clock.wav
Normal file
BIN
windows-amd64/data/img1.bmp
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
windows-amd64/data/img2.bmp
Normal file
|
After Width: | Height: | Size: 664 KiB |
BIN
windows-amd64/data/img3.bmp
Normal file
|
After Width: | Height: | Size: 3.0 MiB |
BIN
windows-amd64/data/img4.bmp
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
windows-amd64/data/img5.bmp
Normal file
|
After Width: | Height: | Size: 659 KiB |
BIN
windows-amd64/data/music.wav
Normal file
BIN
windows-amd64/data/onload.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
windows-amd64/data/scrimer.wav
Normal file
63
windows-amd64/java/NOTICE
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Notices for Eclipse Temurin
|
||||||
|
|
||||||
|
This content is produced and maintained by the Eclipse Temurin project.
|
||||||
|
|
||||||
|
* Project home: https://projects.eclipse.org/projects/adoptium.temurin
|
||||||
|
|
||||||
|
## Trademarks
|
||||||
|
|
||||||
|
Eclipse Temurin is a trademark of the Eclipse Foundation. Eclipse, and the
|
||||||
|
Eclipse Logo are registered trademarks of the Eclipse Foundation.
|
||||||
|
|
||||||
|
Java and all Java-based trademarks are trademarks of Oracle Corporation in
|
||||||
|
the United States, other countries, or both.
|
||||||
|
|
||||||
|
## Copyright
|
||||||
|
|
||||||
|
All content is the property of the respective authors or their employers.
|
||||||
|
For more information regarding authorship of content, please consult the
|
||||||
|
listed source code repository logs.
|
||||||
|
|
||||||
|
## Declared Project Licenses
|
||||||
|
|
||||||
|
This program and the accompanying materials are made available under the terms
|
||||||
|
of the GNU General Public License, version 2, with the Classpath Exception.
|
||||||
|
|
||||||
|
Additional information relating to the program and accompanying materials
|
||||||
|
license and usage is available as follows.
|
||||||
|
* For Eclipse Temurin version 8 see the LICENSE and ASSEMBLY_EXCEPTION files
|
||||||
|
in the top level directory of the installation.
|
||||||
|
* For Eclipse Temurin version 9 or later see the files under the legal/
|
||||||
|
directory in the top level directory of the installation.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: GPL-2.0 WITH Classpath-exception-2.0
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
The project maintains the following source code repositories which may be
|
||||||
|
relevant to this content:
|
||||||
|
|
||||||
|
* https://github.com/adoptium/temurin-build
|
||||||
|
* https://github.com/adoptium/jdk
|
||||||
|
* https://github.com/adoptium/jdk8u
|
||||||
|
* https://github.com/adoptium/jdk11u
|
||||||
|
* https://github.com/adoptium/jdk17u
|
||||||
|
* https://github.com/adoptium/jdk20
|
||||||
|
* and so on
|
||||||
|
|
||||||
|
## Third-party Content
|
||||||
|
|
||||||
|
This program and accompanying materials contains third-party content.
|
||||||
|
* For Eclipse Temurin version 8 see the THIRD_PARTY_LICENSE file in the
|
||||||
|
top level directory of the installation.
|
||||||
|
* For Eclipse Temurin version 9 or later see the files under the legal/
|
||||||
|
directory in the top level directory of the installation.
|
||||||
|
|
||||||
|
## Cryptography
|
||||||
|
|
||||||
|
Content may contain encryption software. The country in which you are currently
|
||||||
|
may have restrictions on the import, possession, and use, and/or re-export to
|
||||||
|
another country, of encryption software. BEFORE using any encryption software,
|
||||||
|
please check the country's laws, regulations and policies concerning the import,
|
||||||
|
possession, or use, and re-export of encryption software, to see if this is
|
||||||
|
permitted.
|
||||||