Skip to content

Commit

Permalink
RegUpd 72
Browse files Browse the repository at this point in the history
// ✧ ShWHP
- Added a ⧉ "micro.wsf"  "program";
- Optimized CSS.

// ⧉ ShWMicro
- Project site terminated. Moved to ShWPH. Microns referencing (⧉◈) kept.

// ⧉◈ MineSweeper
- Changed the bombs' rendering to 'pixelated';
- Fixed an error related to the game incorrectly calculating total uncovered tiles when zeros become revealed.
  • Loading branch information
jakubekgranie committed Dec 10, 2023
1 parent ca184eb commit 9a05c01
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 61 deletions.
67 changes: 61 additions & 6 deletions CSS/cssdata-shatterwares2.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CSS/micro/css-minesweeper.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
}
.td-bomb{
background: url("../../RESOURCES/MICRO/MineSweeper/bomb.png"), url("../../RESOURCES/MICRO/MineSweeper/un.png");
image-rendering: pixelated;
background-size: 60%, cover;
background-repeat: no-repeat;
background-position: center center, center center;
Expand Down
18 changes: 18 additions & 0 deletions JS/animationutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,21 @@ function toggleUpdateScreenVisibility(){

anFrwdDoubleExec('updateScreen', 'updateNotes', 'skip', 'updateStar', animOShift, 100, 'anim-fadeInTL', 100);
}

function micro(){
const micro = document.getElementById("micro");
let cycle2;
if(micro.classList.contains("anim-micro"))
cycle2 = true;
micro.classList.toggle("dp-none");
micro.classList.toggle("anim-micro");
if(cycle2){
micro.classList.remove("bgc-white");
Array.from(micro.children).forEach((val) => {val.classList.add("op-0")}); // HTMLCollection
}
else{
setTimeout(() => {document.getElementById("micro-bar").classList.remove("op-0")}, 200);
setTimeout(() => {micro.classList.add("bgc-black")}, 210);
setTimeout(() => {document.getElementById("micro-cmd").classList.remove("op-0")}, 220);
}
}
Binary file removed RESOURCES/MICRO/logo.png
Binary file not shown.
Binary file removed RESOURCES/MICRO/logo.xcf
Binary file not shown.
Binary file added RESOURCES/SHWHP_RES/addr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RESOURCES/fonts/Perfect_DOS_VGA_437_Win.ttf
Binary file not shown.
Binary file added RESOURCES/unused/remnants/micro/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RESOURCES/unused/remnants/micro/logo.xcf
Binary file not shown.
63 changes: 44 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ <h1 class="nonstandard-draft-head grd-draft1 gradient-text"><b>DRAFT&nbsp;</b></
<div id="load" class="load z-5 pos-fxd w-100p h-100p fx fx-ai-c fx-jc-c fx-dir-c">
<img src="RESOURCES/PRIMARY/alternatepromise-min.png" class="w-20p anim-infRainbow" alt="logo">
<noscript>
<div id="jsError" class="pos-fxd error-javascript nav-button-image bs-bb fx fx-jc-c fx-ai-c">
<div class="bgc-white error-circle h-100p fx fx-ai-c fx-jc-c">
<div class="pos-fxd error-javascript nav-button-image bs-bb fx fx-jc-c fx-ai-c">
<div class="bgc-white error-circle bgc-white dp-none h-100p fx fx-ai-c fx-jc-c">
<img src="RESOURCES/SHWHP_RES/warning.png" class="error-image" alt="A warning sign">
</div>
<p class="mg-none c-white ff-belanosima">Error: JavaScript is required for<br>basic functionality.</p>
Expand Down Expand Up @@ -320,47 +320,72 @@ <h1 id="headermission" class="mg-none t-ss-heading op-0">The mission<span class=
<section id="ShWPH" class="c-white w-100p fx fx-jc-c fx-ai-c fx-dir-c min-padding bg-shwph bgs-full">
<div class="nest-subsection ff-belanosima fx fx-dir-c">
<div class="longer-subsection bs-bb fx fx-jc-c">
<div id="xp-1" class="shwph-tab w-100p op-0 pos-rel">
<div id="xp-1" class="shwph-tab op-0 pos-rel">

<!--New tab-->
<div id="new" class="pos-abs new-coords fx fx-ai-c fx-jc-c">
<div class="new-bg w-100p h-100p bs-bb">

</div>
<div class="new-bg w-100p h-100p bs-bb"></div>
<p class="new-title pos-abs mg-none"><b></b> New</p>
</div>

<div class="shwph-bar bs-bb fx">
<img src="RESOURCES/SHWHP_RES/promisenobg-slim.png" class="xp-icon" alt="Old ShatterWares icon">
<p class="xp-item-title xp-margin mg-none">Internet Explorer - www.shatterwares.com/shwph/index.html</p>
<div class="shwph-bar bs-bb fx fx-ai-c">
<img src="RESOURCES/SHWHP_RES/promisenobg-slim.png" class="h-100p" alt="Old ShatterWares icon">
<p class="xp-item-title tw-nowrap xp-margin mg-none">Internet Explorer - www.shatterwares.com/shwph/index.html</p>
</div>
<div class="shwph-content bgs-adjustable bgp-shwph render-pixel bs-bb fx fx-dir-c">
<div class="shwph-content bgs-adjustable bgp-shwph render-pixel bs-bb fx fx-dir-c pos-rel">
<div id="micro" class="pos-abs p-ab-center dp-none folder-border">
<div id="micro-bar" class="shwph-bar bs-bb fx fx-ai-c fx-jc-spb op-0">
<div class="fx h-100p">
<img src="RESOURCES/SHWHP_RES/promisenobg-slim.png" class="h-100p" alt="Old ShatterWares icon">
<p class="xp-item-title tw-nowrap xp-margin mg-none">Command prompt</p>
</div>
<div class="micro-close cur-sel h-100p" onclick="micro()"></div>
</div>
<div id="micro-cmd" class="micro-cmd bs-bb">
<div>

</div>
<div class="ff-micro-cmd">
<label for="micro-cmd-input" class="dp-inline-b mg-r-micro-cmd-pointer">&gt;</label><form action="javascript:console.log('1')" method="POST" class="dp-inline-b">
<input id="micro-cmd-input" type="text" autocomplete="off" spellcheck="false" class="micro-cmd-input c-white ff-micro-cmd"></input>
<button type="submit" hidden></button>
</form>
</div>
</div>
</div>

<div class="fx shwph-program-row-mg-b">
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c shwph-program-mg-r ff-monospace bs-bb" href="alergie/">
<img src="RESOURCES/SHWHP_RES/vbs.png" class="shwph-program-icon h-auto render-pixel" alt="Placeholder icon (Promise)">
<img src="RESOURCES/SHWHP_RES/vbs.png" class="shwph-program-icon h-auto render-pixel" alt="VBS icon">
<p class="shwph-flavor-text mg-none">Allergies_<br>full_compedium<br>.vbs</p>
</a>
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c shwph-program-mg-r ff-monospace bs-bb" href="wladyslawlokietek/">
<img src="RESOURCES/SHWHP_RES/rar.png" class="shwph-program-icon h-auto" alt="Placeholder icon (Promise)">
<img src="RESOURCES/SHWHP_RES/rar.png" class="shwph-program-icon h-auto" alt="RAR icon">
<p class="shwph-flavor-text mg-none">history_w_<br>lokietek.rar</p>
</a>
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c shwph-program-mg-r ff-monospace bs-bb" href="LEGACY/historia-kazimierz-wielki/Historia.html">
<img src="RESOURCES/SHWHP_RES/rtf.png" class="shwph-program-icon h-auto" alt="Placeholder icon (Promise)">
<img src="RESOURCES/SHWHP_RES/rtf.png" class="shwph-program-icon h-auto" alt="RTF icon">
<p class="shwph-flavor-text mg-none">legacy_casimir<br>_the_great.rtf</p>
</a>
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c shwph-program-mg-r ff-monospace bs-bb" href="https://github.com/jakubekgranie?tab=repositories">
<img src="RESOURCES/SHWHP_RES/computer.png" class="shwph-program-icon h-auto" alt="Placeholder icon (Promise)">
<img src="RESOURCES/SHWHP_RES/computer.png" class="shwph-program-icon h-auto" alt="Cogs icon">
<p class="shwph-flavor-text mg-none">datahub.exe</p>
</a>
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c shwph-program-mg-r ff-monospace bs-bb xp-item-title" href="#header">
<img src="RESOURCES/SHWHP_RES/lnk.png" class="shwph-program-icon h-auto" alt="Placeholder icon (Promise)">
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c shwph-program-mg-r ff-monospace bs-bb" href="#header">
<img src="RESOURCES/SHWHP_RES/lnk.png" class="shwph-program-icon h-auto" alt="LNK icon">
<p class="shwph-flavor-text mg-none">home.lnk</p>
</a>
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c ff-monospace bs-bb xp-item-title" href="micro/minesweeper/index.html">
<img src="RESOURCES/MICRO/MineSweeper/favicon.ico" class="shwph-program-icon h-auto" alt="Placeholder icon (Promise)">
<a class="shwph-program fx fx-dir-c fx-jc-c fx-ai-c ff-monospace bs-bb" href="micro/minesweeper/">
<img src="RESOURCES/MICRO/MineSweeper/favicon.ico" class="shwph-program-icon h-auto" alt="Mine icon">
<p class="shwph-flavor-text mg-none">mines.tmp</p>
</a>
</div>
<div class="fx temp-shwph-program-right">
<a class="shwph-program fx fx-dir-c fx-ai-c ff-monospace bs-bb cur-sel" onclick="micro()">
<img src="RESOURCES/SHWHP_RES/addr.png" class="shwph-program-icon h-auto" alt="Address book icon">
<p class="shwph-flavor-text mg-none">micro.wsf</p>
</a>
</div>
</div>
</div>
</div>
Expand All @@ -375,7 +400,7 @@ <h1 id="headermission" class="mg-none t-ss-heading op-0">The mission<span class=

<footer class="bgc-grey">
<div class="true-footer w-100p fx fx-ai-c fx-jc-c fx-dir-c">
<p class="footer-text mg-none ff-raleway"><a href="#header" title="My site"><b>© Jacob Namyslak.</b></a> All rights for foreign assets reserved by their respective authors.</p>
<p class="footer-text mg-none ff-raleway"><a href="#header" title="My site"><b>© Jacob Namyslak.</b></a> All rights reserved, for foreign assets by their respective authors.</p>
</div>
</footer>
</body>
Expand Down
27 changes: 0 additions & 27 deletions micro/index.html

This file was deleted.

26 changes: 17 additions & 9 deletions micro/minesweeper/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,23 @@
}
if(flagMode) element.classList.toggle("td-flag");
}
function checkUncovered(){
if(uncovered == max){
for(let i = 1; i < trueSize - 1; i++)
for(let j = 1; j < trueSize - 1; j++)
setTimeout(() => {document.getElementById("cell-" + i + "-" + j).classList.add("anim-rainbow")}, 10 * 2*i + 0.2*j);
revealAll(true);
return 1;
}
}
function revealDeadSpaces(i, j){
const cellkey = document.getElementById('cell-' + i + '-' + j);
uncovered++;
cellkey.innerHTML = sapper[i][j];
if(i == 0 || i == trueSize - 1 || j === 0 || j == trueSize - 1 || !cellkey.classList.contains("td-unclicked")){
cellkey.classList.remove("td-unclicked");
return;
}
uncovered++;
cellkey.classList.remove("td-unclicked");
for(let x = i - 1; x < i + 2; x++)
for(let y = j - 1; y < j + 2; y++){
Expand All @@ -59,6 +68,7 @@
parseInput(x, y);
}
}
checkUncovered();
}
function parseInput(i, j){
let element = document.getElementById("cell-" + i + "-" + j);
Expand All @@ -67,13 +77,8 @@
element.onclick = null;
uncovered++;
element.innerHTML = sapper[i][j];
if(uncovered == max){
for(let i = 1; i < trueSize - 1; i++)
for(let j = 1; j < trueSize - 1; j++)
setTimeout(() => {document.getElementById("cell-" + i + "-" + j).classList.add("anim-rainbow")}, 10 * 2*i + 0.2*j);
revealAll(true);
}
else if(sapper[i][j] == 0){
const winState = checkUncovered();
if(sapper[i][j] == 0 && !winState){
uncovered--;
revealDeadSpaces(i, j);
}
Expand Down Expand Up @@ -175,7 +180,10 @@
</script>
</head>
<body class="body fx fx-center">
<img class="dp-none" src="../../RESOURCES/MICRO/MineSweeper/flag2.png" alt="flaga 2">
<div class="dp-none">
<img src="../../RESOURCES/MICRO/MineSweeper/flag2.png" alt="flag 2">
<img src="../../RESOURCES/MICRO/MineSweeper/bomb.png" alt="bomb">
</div>
<table id="sapper-core" class="table"></table>
<div id="flag" class="table flag bg-full td-unclicked"></div>
</body>
Expand Down

0 comments on commit 9a05c01

Please sign in to comment.