Skip to content

Commit

Permalink
Release 2.0.0!
Browse files Browse the repository at this point in the history
Added input display, support for macOS and Linux, and cleaned up a few other things
  • Loading branch information
b3nd3r-ssbm committed Oct 23, 2020
1 parent ce31eb7 commit 183abe1
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
104 changes: 104 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
41 changes: 40 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Slippi Light v1.5.2</title>
<title>Slippi Light v2.0.0</title>
<meta charset='utf-8'>
<style>
body{background-color:#1d1a1a;color:white;font-family:Segoe UI;}
Expand Down Expand Up @@ -35,6 +35,17 @@
font-family:Segoe UI;
font-size:18px;
}
.circle {
height: 25px;
width: 25px;
border-radius: 50%;
}
.inputButton{
height: 10px;
width: 10px;
border-radius: 50%;
border:solid;
}
</style>
</head>
<body>
Expand Down Expand Up @@ -64,7 +75,9 @@
<button onclick="toggleHitbox()">Show/Hide "Hitboxes"</button>
<span class="noClickButton">Speed:</span>
<input type="number" id="speed" placeholder="1.0" step="0.25" onchange="updateSpeed()" min="0.25" max="4.0">
<button onclick="toggleInputDisplay()">Show/Hide Input Display</button>
<button onclick="togglePastAct()">Show/Hide Past Action States</button>
<button onclick="linkCsv()">Action State Meaning</button>
</div></div>
<div id="pastActions" style="display:none;flex-direction:row;background-color:#1d1a1a !important;">
<div id="p1Act" style="display:flex;flex-direction:column;height:100px;width:180px;border:1px solid #4e4e4e;overflow:auto;">P1 Actions:<br><span id="p1ActText"></span></div>
Expand Down Expand Up @@ -92,5 +105,31 @@
</div>
</div>
<div id="body"></div>
<div id="inputs" style="display:none">
<div id="p1Back" style="position:absolute;top:200px;left:1100px;">
<div id="p1In" style="position:relative">
<p style="position:absolute;top:-70px">P1 Inputs:</p>
<span class="circle" id="p1Stick" style="position: absolute; background-color: rgb(187, 187, 187); top: 20px; left: 20px;"></span>
<span class="circle" id="p1CStick" style="position:absolute;background-color:#ff0;top: 40px;left: 100px;"></span>
<span class="inputButton" id="p1YButton" style="position:absolute;color:#bbb;left:90px;top:-10px;"></span>
<span class="inputButton" id="p1XButton" style="position:absolute;color:#bbb;left:107px;"></span>
<span class="inputButton" id="p1AButton" style="position:absolute;color:#0fa;left:90px;top:7px"></span>
<span class="inputButton" id="p1BButton" style="position:absolute;color:#f0a;left:74px;top:13px"></span>
<span class="inputButton" id="p1ZButton" style="position:absolute;color:#60f;left:109px;top:-15px;height:5px;width:5px"></span>
</div>
</div>
<div id="p2Back" style="position:absolute;top:400px;left:1100px;">
<div id="p2In" style="position:relative">
<p style="position:absolute;top:-70px">P2 Inputs:</p>
<span class="circle" id="p2Stick" style="position: absolute; background-color: rgb(187, 187, 187); top: 20px; left: 20px;"></span>
<span class="circle" id="p2CStick" style="position:absolute;background-color:#ff0;top: 40px;left: 100px;"></span>
<span class="inputButton" id="p2YButton" style="position:absolute;color:#bbb;left:90px;top:-10px;"></span>
<span class="inputButton" id="p2XButton" style="position:absolute;color:#bbb;left:107px;"></span>
<span class="inputButton" id="p2AButton" style="position:absolute;color:#0fa;left:90px;top:7px"></span>
<span class="inputButton" id="p2BButton" style="position:absolute;color:#f0a;left:74px;top:13px"></span>
<span class="inputButton" id="p2ZButton" style="position:absolute;color: #60f;left:109px;top:-15px;height:5px;width:5px"></span>
</div>
</div>
</div>
</body>
</html>
81 changes: 81 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const {app, BrowserWindow} = require('electron');
const {default: SlippiGame} = require('@slippi/slippi-js');
const fs = require('fs');
const { shell }=require('electron');
// const Buffer=require('Buffer'); const { autoUpdater } =
// require('electron-updater');
var frames;
Expand Down Expand Up @@ -98,6 +99,9 @@ function options() {
pause();
}
}
function linkCsv(){
shell.openExternal("https://github.com/b3nd3r-ssbm/slippi-light/blob/master/actionStateReference.csv");
}
function togglePastAct() {
const hideActs = select('#pastActions');
if (pastActShow === true) {
Expand Down Expand Up @@ -689,6 +693,83 @@ function buttonLogic() {
.style
.background = "#1d1a1a";
}
buttonString = frames[currentFrame]
.players[1]
.pre
.physicalButtons
.toString(2);
while (buttonString.length < 13) {
buttonString = "0" + buttonString;
}
buttonString = buttonString.substring(4, 12);

if (buttonString.charAt(7) == '1') {
document
.getElementById("p2ZButton")
.style
.background = "#60f";
} else {
document
.getElementById("p2ZButton")
.style
.background = "#1d1a1a";
}
/*if(buttonString.charAt(6)=='1'){
document.getElementById("p2ZButton").style.background="#60f";
}
else{
document.getElementById("p2ZButton").style.background="#1d1a1a";
}
if(buttonString.charAt(5)=='1'){
document.getElementById("p2ZButton").style.background="#60f";
}
else{
document.getElementById("p2ZButton").style.background="#1d1a1a";
}*/
if (buttonString.charAt(3) == '1') {
document
.getElementById("p2AButton")
.style
.background = "#0fa";
} else {
document
.getElementById("p2AButton")
.style
.background = "#1d1a1a";
}
if (buttonString.charAt(2) == '1') {
document
.getElementById("p2BButton")
.style
.background = "#f0a";
} else {
document
.getElementById("p2BButton")
.style
.background = "#1d1a1a";
}
if (buttonString.charAt(1) == '1') {
document
.getElementById("p2XButton")
.style
.background = "#bbb";
} else {
document
.getElementById("p2XButton")
.style
.background = "#1d1a1a";
}
if (buttonString.charAt(0) == '1') {
document
.getElementById("p2YButton")
.style
.background = "#bbb";
} else {
document
.getElementById("p2YButton")
.style
.background = "#1d1a1a";
}
}
function processInputs() {
stickStuff();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slippi-light",
"version": "1.5.2",
"version": "2.0.0",
"main": "main.js",
"author": "b3nd3r_ssbm",
"description": "GPL-3.0-or-later",
Expand Down

0 comments on commit 183abe1

Please sign in to comment.