website update; added bash scripts
@@ -0,0 +1,121 @@
|
||||
* {
|
||||
padding:25;
|
||||
margin:25;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:link {
|
||||
color: red;
|
||||
}
|
||||
a:visited {
|
||||
color: hotpink;
|
||||
}
|
||||
a:hover {
|
||||
color: green;
|
||||
}
|
||||
a:active {
|
||||
color: blue;
|
||||
}
|
||||
mark {
|
||||
background-color: #900C3F;
|
||||
color: hotpink;
|
||||
}
|
||||
ul { list-style-position: inside; }
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 800px auto;
|
||||
grid-template-rows: 25px 90px auto;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #e5c5d1;
|
||||
color: #900C3F;
|
||||
}
|
||||
|
||||
.whitespace { grid-area: 1 / 1 / 2 / 4; }
|
||||
.blessfrey-logo { grid-area: 1 / 2 / 2 / 3; }
|
||||
.body-row { grid-area: 3 / 1 / 4 / 4; }
|
||||
.content { grid-area: 3 / 2 / 4 / 3; }
|
||||
|
||||
.nav-row { grid-area: 2 / 1 / 3 / 4; }
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 3;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:flex-end;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
border: 1px solid #330532;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
padding-top: 5px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
* {
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul { list-style-position: inside; }
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 533px 267px auto;
|
||||
grid-template-rows: 25px 90px 40px auto 40px auto;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace {
|
||||
grid-area: 1 / 1 / 2 / 5;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items: center;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.blessfrey-logo {
|
||||
grid-area: 1 / 2 / 2 / 4;
|
||||
padding-top: 5px;
|
||||
color: #FBDAEC;
|
||||
}
|
||||
|
||||
/* navigation pane */
|
||||
|
||||
.nav-row {
|
||||
grid-area: 2 / 1 / 3 / 5;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 4;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:flex-end;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.dir-row {
|
||||
grid-area: 3 / 2 / 4 / 4;
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
}
|
||||
|
||||
.diary-dir {
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
font-size: 20px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.diary-dir a:link {
|
||||
color: #C9C2D6;
|
||||
}
|
||||
.diary-dir a:visited {
|
||||
color: #C9C2D6;
|
||||
}
|
||||
.diary-dir a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.diary-dir a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
.diary-dir.top {
|
||||
grid-area: 3 / 1 / 4 / 5;
|
||||
}
|
||||
|
||||
.body-row {
|
||||
grid-area: 4 / 1 / 5 / 5;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.diary-pages {
|
||||
grid-area: 4 / 2 / 5 / 3;
|
||||
}
|
||||
|
||||
.snippet {
|
||||
background-color: #C9C2D6;
|
||||
color: #080410;
|
||||
padding: 20px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.snippet a:link {
|
||||
color: #401231;
|
||||
}
|
||||
.snippet a:visited {
|
||||
color: #401231;
|
||||
}
|
||||
.snippet a:hover {
|
||||
color: #902771;
|
||||
}
|
||||
.snippet a:active {
|
||||
color: #900C3F;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
grid-area: 4 / 3 / 5 / 4;
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: repeat(4, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
align-content: start;
|
||||
padding-left: 7px;
|
||||
}
|
||||
.sidebar a:link {
|
||||
color: #C9C2D6;
|
||||
}
|
||||
.sidebar a:visited {
|
||||
color: #C9C2D6;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.sidebar a:active {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.about-box {
|
||||
grid-area: 4 / 3 / 5 / 4;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
margin-top: 0px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.twitter-box {
|
||||
grid-area: 5 / 3 / 6 / 4;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.latest {
|
||||
grid-area: 6 / 3 / 7 / 4;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
list-style-position: inside;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
.latest-text {
|
||||
text-align: left;
|
||||
list-style-position: inside;
|
||||
padding: 5px;
|
||||
}
|
||||
.disclosure {
|
||||
grid-area: 7 / 3 / 8 / 4;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.diary-dir.bottom {
|
||||
grid-area: 5 / 1 / 6 / 5;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
grid-area: 6 / 1 / 7 / 5;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
padding-top: 5px;
|
||||
padding-right: 25px;
|
||||
box-shadow: 0 100vh 0 100vh #581845;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
* {
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul { list-style-position: inside; }
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 533px 267px auto;
|
||||
grid-template-rows: 25px 90px repeat(3, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace {
|
||||
grid-area: 1 / 1 / 2 / 5;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items: center;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.blessfrey-logo {
|
||||
grid-area: 1 / 2 / 2 / 4;
|
||||
padding-top: 5px;
|
||||
color: #FBDAEC;
|
||||
}
|
||||
|
||||
/* navigation pane */
|
||||
|
||||
.nav-row {
|
||||
grid-area: 2 / 1 / 3 / 5;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 4;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:flex-end;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.body-row {
|
||||
grid-area: 3 / 1 / 5 / 5;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.diary-entry {
|
||||
grid-area: 3 / 2 / 4 / 3;
|
||||
background-color: #C9C2D6;
|
||||
color: #080410;
|
||||
padding: 20px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
grid-area: 3 / 3 / 5 / 4;
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: repeat(4, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
align-content: start;
|
||||
padding-left: 7px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.sidebar a:link {
|
||||
color: #C9C2D6;
|
||||
}
|
||||
.sidebar a:visited {
|
||||
color: #C9C2D6;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.sidebar a:active {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.about-box {
|
||||
grid-area: 1 / 1 / 2 / 2;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
margin-top: 0px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.twitter-box {
|
||||
grid-area: 2 / 1 / 3 / 2;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.latest {
|
||||
grid-area: 3 / 1 / 4 / 2;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
list-style-position: inside;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
.latest-text {
|
||||
text-align: left;
|
||||
list-style-position: inside;
|
||||
padding: 5px;
|
||||
}
|
||||
.disclosure {
|
||||
grid-area: 4 / 1 / 5 / 2;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.recommend {
|
||||
grid-area: 4 / 2 / 5 / 3;
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
grid-template-rows: auto auto;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
.more { grid-area: 1 / 1 / 2 / 4; }
|
||||
.rec-box { grid-area: 2 / 2 / 3 / 3; }
|
||||
|
||||
.snip {
|
||||
width: 100px;
|
||||
float: left;
|
||||
margin: 50px;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
grid-area: 5 / 1 / 6 / 5;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
padding-top: 5px;
|
||||
padding-right: 25px;
|
||||
box-shadow: 0 100vh 0 100vh #581845;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
* {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-family: trebuchet ms; arial; calibri; gill sans; helvetica neue; candara; geneva; verdana; sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
ul { list-style-position: inside; }
|
||||
|
||||
.textbox {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
background-color: #C9C2D6;
|
||||
color: #080410;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 800px auto;
|
||||
grid-template-rows: 25px 90px 1fr 100px;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace {
|
||||
grid-area: 1 / 1 / 2 / 4;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items: center;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.blessfrey-logo {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-top: 5px;
|
||||
color: #FBDAEC;
|
||||
}
|
||||
|
||||
/* navigation pane */
|
||||
|
||||
.nav-row {
|
||||
grid-area: 2 / 1 / 3 / 4;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 3;
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
justify-content:flex-end;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.body-row {
|
||||
grid-area: 3 / 1 / 4 / 4;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.pages {
|
||||
grid-area: 3 / 2 / 4 / 3;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: repeat(4, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
background-color: #080410;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.desc {
|
||||
grid-area: 1 / 1 / 2 / 2;
|
||||
background-color:;
|
||||
}
|
||||
.story {
|
||||
grid-area: 2 / 1 / 3 / 2;
|
||||
background-color:;
|
||||
}
|
||||
.system {
|
||||
grid-area: 3 / 1 / 4 / 2;
|
||||
background-color:;
|
||||
}
|
||||
.graphics {
|
||||
grid-area: 4 / 1 / 5 / 2;
|
||||
background-color:;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
grid-area: 4 / 1 / 5 / 4;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
background-color: #581845;
|
||||
padding-top: 5px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 100vh 0 100vh #581845;
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
* {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-family: trebuchet ms; arial; calibri; gill sans; helvetica neue; candara; geneva; verdana; sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 75px 400px 25px 225px 75px auto;
|
||||
grid-template-rows: 25px 90px 457px auto;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace {
|
||||
grid-area: 1 / 1 / 2 / 8;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items: center;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.blessfrey-logo {
|
||||
grid-area: 1 / 3 / 2 / 6;
|
||||
padding-top: 5px;
|
||||
color: #FBDAEC;
|
||||
}
|
||||
|
||||
/* navigation pane */
|
||||
|
||||
.nav-row {
|
||||
grid-area: 2 / 1 / 3 / 8;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 7;
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
justify-content:flex-end;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.body-row {
|
||||
grid-area: 3 / 1 / 4 / 8;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.social {
|
||||
grid-area: 3 / 6 / 4 / 7;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.bg {
|
||||
grid-area: 3 / 3 / 4 / 6;
|
||||
background-color:;
|
||||
background-image: url(../img/bg/homeBG.png);
|
||||
width: 650px;
|
||||
height: 457px;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
grid-area: 4 / 1 / 5 / 8;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.tweets {
|
||||
grid-area: 4 / 3 / 5 / 4;
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.news {
|
||||
grid-area: 4 / 5 / 5 / 6;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
height: 85px;
|
||||
overflow-y: scroll;
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 0px;
|
||||
padding-top: 5px;
|
||||
padding-right: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.news a:link {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.news a:visited {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.news a:hover {
|
||||
color: #f463ad;
|
||||
}
|
||||
.news a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
.headline {
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding-top: 3px;
|
||||
padding-right: 1px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
background-color: #581845;
|
||||
color: #F9B3D7;
|
||||
padding-top: 5px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 100vh 0 100vh #581845;
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
* {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-family: trebuchet ms; arial; calibri; gill sans; helvetica neue; candara; geneva; verdana; sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
ul { list-style-position: inside; }
|
||||
|
||||
.textbox {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
background-color: #C9C2D6;
|
||||
color: #080410;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 800px auto;
|
||||
grid-template-rows: 25px 90px 1fr 100px;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace {
|
||||
grid-area: 1 / 1 / 2 / 4;
|
||||
align-items: center;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.blessfrey-logo { grid-area: 1 / 2 / 2 / 3;
|
||||
padding-top: 5px;
|
||||
color: #FBDAEC;
|
||||
}
|
||||
|
||||
/* navigation pane */
|
||||
|
||||
.nav-row {
|
||||
grid-area: 2 / 1 / 3 / 4;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 3;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.body-row {
|
||||
grid-area: 3 / 1 / 4 / 4;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.pages {
|
||||
grid-area: 3 / 2 / 4 / 3;
|
||||
display: grid;
|
||||
grid-template-columns: 800px;
|
||||
grid-template-rows: repeat(9, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
background-color: #;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.fact {
|
||||
grid-area: 1 / 1 / 2 / 2;
|
||||
}
|
||||
.desc {
|
||||
grid-area: 2 / 1 / 3 / 2;
|
||||
}
|
||||
.features {
|
||||
grid-area: 3 / 1 / 4 / 2;
|
||||
}
|
||||
.dev {
|
||||
grid-area: 4 / 1 / 5 / 2;
|
||||
}
|
||||
.videos {
|
||||
grid-area: 5 / 1 / 6 / 2;
|
||||
}
|
||||
.graphics {
|
||||
grid-area: 6 / 1 / 7 / 2;
|
||||
justify-content:center;
|
||||
align-items: center;
|
||||
}
|
||||
.contact {
|
||||
grid-area: 7 / 1 / 8 / 2;
|
||||
}
|
||||
.credits {
|
||||
grid-area: 8 / 1 / 9 / 2;
|
||||
}
|
||||
.permissions {
|
||||
grid-area: 9 / 1 / 10 / 2;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
grid-area: 4 / 1 / 5 / 4;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
padding-top: 5px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 100vh 0 100vh #581845;
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
* {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-family: trebuchet ms; arial; calibri; gill sans; helvetica neue; candara; geneva; verdana; sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
ul { list-style-position: inside; }
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 800px auto;
|
||||
grid-template-rows: 25px 90px repeat(2, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace {
|
||||
grid-area: 1 / 1 / 2 / 4;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items: center;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.blessfrey-logo {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-top: 5px;
|
||||
color: #FBDAEC;
|
||||
}
|
||||
|
||||
/* navigation pane */
|
||||
|
||||
.nav-row {
|
||||
grid-area: 2 / 1 / 3 / 4;
|
||||
background-color: #900C3F;
|
||||
}
|
||||
|
||||
.nav-grid {
|
||||
grid-area: 2 / 2 / 3 / 3;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
justify-content:flex-end;
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, 70px) auto;
|
||||
grid-template-rows: 90px;
|
||||
grid-column-gap: 17px;
|
||||
grid-row-gap: 0px;
|
||||
align-items: end;
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
grid-area: 1 / 1 / 2 / 7;
|
||||
background-image: url(../img/ele/navbar.png);
|
||||
height: 86px;
|
||||
width: 800px;
|
||||
}
|
||||
.nav-index {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-game {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-diary {
|
||||
grid-area: 1 / 4 / 2 / 5;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-presskit {
|
||||
grid-area: 1 / 5 / 2 / 6;
|
||||
padding-bottom: 3px;
|
||||
position: relative;
|
||||
}
|
||||
.nav-link {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
.nav-link a {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.nav-link a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.nav-link a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.nav-link a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.nav-link a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.body-row {
|
||||
grid-area: 3 / 1 / 4 / 4;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.content {
|
||||
grid-area: 3 / 2 / 4 / 3;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 400px);
|
||||
grid-template-rows: 90px repeat(2, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.project-header {
|
||||
grid-area: 1 / 1 / 2 / 3;
|
||||
color: #F9B3D7;
|
||||
font-size: 15px;
|
||||
margin-top: 25px;
|
||||
padding-top: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.featured {
|
||||
grid-area: 2 / 1 / 3 / 3;
|
||||
}
|
||||
|
||||
.featured-box {
|
||||
}
|
||||
|
||||
.featured-desc {
|
||||
color: #F9B3D7;
|
||||
font-size: 25px;
|
||||
text-align: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.featured-desc a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.featured-desc a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.featured-desc a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.featured-desc a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
.more {
|
||||
grid-area: 3 / 1 / 4 / 3;
|
||||
width: 800px;
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
}
|
||||
|
||||
.more-box {
|
||||
}
|
||||
|
||||
.more-desc {
|
||||
color: #F9B3D7;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.more-desc a:link {
|
||||
color: #66C7F4;
|
||||
}
|
||||
.more-desc a:visited {
|
||||
color: #CB9CF2;
|
||||
}
|
||||
.more-desc a:hover {
|
||||
color: #F9B3D7;
|
||||
}
|
||||
.more-desc a:active {
|
||||
color: #f463ad;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
grid-area: 4 / 1 / 5 / 4;
|
||||
background-color: #080410;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
background-color: #080410;
|
||||
color: #F9B3D7;
|
||||
padding-top: 5px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 100vh 0 100vh #581845;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
.parent {
|
||||
display: grid;
|
||||
grid-template-columns: auto 800px auto;
|
||||
grid-template-rows: 25px 90px repeat(2, auto);
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.whitespace { grid-area: 1 / 1 / 2 / 4; }
|
||||
.logo { grid-area: 1 / 2 / 2 / 3; }
|
||||
.nav-row { grid-area: 2 / 1 / 3 / 4; }
|
||||
.nav-bar { grid-area: 2 / 2 / 3 / 3; }
|
||||
.body-row { grid-area: 3 / 1 / 4 / 4; }
|
||||
.content { grid-area: 3 / 2 / 4 / 3; }
|
||||
.footer-row { grid-area: 4 / 1 / 5 / 4; }
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
/******************************************************************************/
|
||||
// SIMPLE INPUT RECORD/PLAYBACK
|
||||
// (c) 2015 Brian Provinciano
|
||||
//
|
||||
// You are free to use this code for your own purposes, no strings attached.
|
||||
//
|
||||
// This is a very basic sample to record and playback button input.
|
||||
// It's most useful when activated on startup, deactivated on shutdown for
|
||||
// global button recording/playback.
|
||||
//
|
||||
// For details on more advanced implementations, see my GDC 2015 session:
|
||||
// -> Automated Testing and Instant Replays in Retro City Rampage
|
||||
// The slides and full video will be available on the GDC Vault at a later date.
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
// wrap it so it can be conditionally compiled in.
|
||||
// for example, set INPUTREPLAY_CAN_RECORD to 1 to play the game and record the input, set it to 0 when done
|
||||
// INPUTREPLAY_CAN_RECORD takes priority over INPUTREPLAY_CAN_PLAYBACK
|
||||
|
||||
#define INPUTREPLAY_CAN_PLAYBACK 1
|
||||
#define INPUTREPLAY_CAN_RECORD 1
|
||||
|
||||
#define INPUTREPLAY_INCLUDED (INPUTREPLAY_CAN_PLAYBACK || INPUTREPLAY_CAN_RECORD)
|
||||
/******************************************************************************/
|
||||
|
||||
#if INPUTREPLAY_INCLUDED
|
||||
|
||||
#define INPUT_BUTTONS_TOTAL 32 // up to 32
|
||||
#define MAX_REC_LEN 0x8000 // the buffer size for storing RLE compressed button input (x each button)
|
||||
|
||||
/******************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
unsigned short *rledata;
|
||||
unsigned short rlepos;
|
||||
unsigned short datalen;
|
||||
unsigned short currentrun;
|
||||
} ButtonRec;
|
||||
/******************************************************************************/
|
||||
|
||||
// if INPUTREPLAY_CAN_RECORD, as soon as this class is instanced, it will automatically record when instanced/created.
|
||||
// statically creating this as a global will blanket the entire play session
|
||||
//
|
||||
// if INPUTREPLAY_CAN_PLAYBACK, playback will begin as soon as LoadFile() is used
|
||||
//
|
||||
class SimpleInputRec
|
||||
{
|
||||
unsigned int m_buttonstate;
|
||||
ButtonRec m_buttons[INPUT_BUTTONS_TOTAL];
|
||||
bool m_bRecording;
|
||||
|
||||
unsigned char* m_data;
|
||||
|
||||
public:
|
||||
SimpleInputRec()
|
||||
: m_buttonstate(0)
|
||||
, m_data(NULL)
|
||||
, m_bRecording(true)
|
||||
{
|
||||
}
|
||||
|
||||
~SimpleInputRec()
|
||||
{
|
||||
if(m_data)
|
||||
{
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
WriteToFile();
|
||||
#endif
|
||||
delete[] m_data;
|
||||
}
|
||||
}
|
||||
|
||||
// run each frame before the game uses the live button input.
|
||||
// when recording, it saves the live input
|
||||
// during playback, it overwrites the live input
|
||||
void Update(bool bForce = false);
|
||||
|
||||
// to start a playback
|
||||
#if INPUTREPLAY_CAN_PLAYBACK
|
||||
bool LoadFile(KSTR szfilename);
|
||||
#endif
|
||||
|
||||
// to finish recording
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
void WriteToFile();
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void SimpleInputRec::Update(bool bForce)
|
||||
{
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
if(m_bRecording)
|
||||
{
|
||||
unsigned int newbuttons = nesinput.buttons;
|
||||
|
||||
// allocate and initialize
|
||||
if(!m_data)
|
||||
{
|
||||
m_data = new unsigned char[INPUT_BUTTONS_TOTAL * MAX_REC_LEN * 2];
|
||||
unsigned short* dataptr = (unsigned short*)m_data;
|
||||
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
btn.rledata = dataptr;
|
||||
dataptr += MAX_REC_LEN;
|
||||
|
||||
btn.rlepos = 0;
|
||||
btn.currentrun = 0;
|
||||
btn.datalen = MAX_REC_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
// write RLE button bit streams
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
if(bForce || (newbuttons&(1<<i)) != (m_buttonstate&(1<<i)) || btn.currentrun==0x7FFF)
|
||||
{
|
||||
if(btn.currentrun)
|
||||
{
|
||||
int bit = (m_buttonstate>>i)&1;
|
||||
btn.rledata[btn.rlepos++] = (bit<<15) | btn.currentrun;
|
||||
}
|
||||
btn.currentrun = bForce? 0 : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
++btn.currentrun;
|
||||
}
|
||||
}
|
||||
|
||||
m_buttonstate = newbuttons;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INPUTREPLAY_CAN_PLAYBACK
|
||||
if(!m_bRecording)
|
||||
{
|
||||
bool bIsRunning = false;
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
if(btn.rledata)
|
||||
{
|
||||
bIsRunning = true;
|
||||
if(!btn.currentrun && btn.rlepos<btn.datalen)
|
||||
{
|
||||
unsigned short value = btn.rledata[btn.rlepos++];
|
||||
btn.currentrun = value&0x7FFF;
|
||||
m_buttonstate &= ~(1<<i);
|
||||
m_buttonstate |= ((value>>15)&1)<<i;
|
||||
--btn.currentrun;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(btn.currentrun)
|
||||
{
|
||||
--btn.currentrun;
|
||||
}
|
||||
else if(btn.rlepos==btn.datalen)
|
||||
{
|
||||
btn.rledata = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(bIsRunning)
|
||||
{
|
||||
// TODO: this is where you can overwrite the live button state to the prerecorded one
|
||||
systeminput.buttons = m_buttonstate;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#if INPUTREPLAY_CAN_PLAYBACK
|
||||
bool SimpleInputRec::LoadFile(KSTR szfilename)
|
||||
{
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
btn.datalen = 0;
|
||||
btn.rledata = NULL;
|
||||
btn.rlepos = 0;
|
||||
btn.currentrun = 0;
|
||||
}
|
||||
|
||||
delete[] m_data;
|
||||
m_bRecording = false;
|
||||
|
||||
if(fcheckexists(szfilename))
|
||||
{
|
||||
FILE* f = fopen(szfilename, "wb");
|
||||
if(f)
|
||||
{
|
||||
// WARNING: You'll want to do more error checking, but just to keep it simple...
|
||||
|
||||
fseek(f,0,SEEK_END);
|
||||
unsigned long filelen = ftell(f);
|
||||
fseek(f,0,SEEK_SET);
|
||||
|
||||
m_data = new unsigned char[filelen];
|
||||
fread(m_data, 1, filelen, f);
|
||||
fclose(f);
|
||||
|
||||
unsigned char* bufptr = m_data;
|
||||
int numbuttons = bufptr[0] | (bufptr[1]<<8);
|
||||
bufptr += 2;
|
||||
if(numbuttons <= INPUT_BUTTONS_TOTAL)
|
||||
{
|
||||
for(int i=0; i<numbuttons; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
btn.datalen = bufptr[0] | (bufptr[1]<<8);
|
||||
bufptr += 2;
|
||||
}
|
||||
|
||||
for(int i=0; i<numbuttons; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
if(btn.datalen)
|
||||
{
|
||||
// WARNING: Endian dependent for simplcicity
|
||||
btn.rledata = (unsigned short*)bufptr;
|
||||
bufptr += btn.datalen*2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
void SimpleInputRec::WriteToFile()
|
||||
{
|
||||
if(m_data && m_bRecording)
|
||||
{
|
||||
Update(true);
|
||||
|
||||
FILE* f = fopen("_autorec.rec","wb");
|
||||
if(f)
|
||||
{
|
||||
fputc(INPUT_BUTTONS_TOTAL, f);
|
||||
fputc(0, f);
|
||||
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
fputc((unsigned char)btn.rlepos, f);
|
||||
fputc(btn.rlepos >> 8, f);
|
||||
}
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
// WARNING: Endian dependent for simplcicity
|
||||
fwrite(btn.rledata, 2, btn.rlepos, f);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#endif // INPUTREPLAY_INCLUDED
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
/******************************************************************************/
|
||||
// SIMPLE INPUT RECORD/PLAYBACK
|
||||
// (c) 2015 Brian Provinciano
|
||||
//
|
||||
// You are free to use this code for your own purposes, no strings <code>attached.
|
||||
//
|
||||
// This is a very basic sample to record and playback button input.
|
||||
// It's most useful when activated on startup, deactivated on shutdown for
|
||||
// global button recording/playback.
|
||||
//
|
||||
// For details on more advanced implementations, see my GDC 2015 session:
|
||||
// -> Automated Testing and Instant Replays in Retro City Rampage
|
||||
// The slides and full video will be available on the GDC Vault at a later date.
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
// wrap it so it can be conditionally compiled in.
|
||||
// for example, set INPUTREPLAY_CAN_RECORD to 1 to play the game and record the input, set it to 0 when done
|
||||
// INPUTREPLAY_CAN_RECORD takes priority over INPUTREPLAY_CAN_PLAYBACK
|
||||
|
||||
#define INPUTREPLAY_CAN_PLAYBACK 1
|
||||
#define INPUTREPLAY_CAN_RECORD 1
|
||||
|
||||
#define INPUTREPLAY_INCLUDED (INPUTREPLAY_CAN_PLAYBACK || INPUTREPLAY_CAN_RECORD)
|
||||
/******************************************************************************/
|
||||
|
||||
#if INPUTREPLAY_INCLUDED
|
||||
|
||||
#define INPUT_BUTTONS_TOTAL 32 // up to 32
|
||||
#define MAX_REC_LEN 0x8000 // the buffer size for storing RLE compressed button input (x each button)
|
||||
|
||||
/******************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
unsigned short *rledata;
|
||||
unsigned short rlepos;
|
||||
unsigned short datalen;
|
||||
unsigned short currentrun;
|
||||
} ButtonRec;
|
||||
/******************************************************************************/
|
||||
|
||||
// if INPUTREPLAY_CAN_RECORD, as soon as this class is instanced, it will automatically record when instanced/created.
|
||||
// statically creating this as a global will blanket the entire play session
|
||||
//
|
||||
// if INPUTREPLAY_CAN_PLAYBACK, playback will begin as soon as LoadFile() is used
|
||||
//
|
||||
class SimpleInputRec
|
||||
{
|
||||
unsigned int m_buttonstate;
|
||||
ButtonRec m_buttons[INPUT_BUTTONS_TOTAL];
|
||||
bool m_bRecording;
|
||||
|
||||
unsigned char* m_data;
|
||||
|
||||
public:
|
||||
SimpleInputRec()
|
||||
: m_buttonstate(0)
|
||||
, m_data(NULL)
|
||||
, m_bRecording(true)
|
||||
{
|
||||
}
|
||||
|
||||
~SimpleInputRec()
|
||||
{
|
||||
if(m_data)
|
||||
{
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
WriteToFile();
|
||||
#endif
|
||||
delete[] m_data;
|
||||
}
|
||||
}
|
||||
|
||||
// run each frame before the game uses the live button input.
|
||||
// when recording, it saves the live input
|
||||
// during playback, it overwrites the live input
|
||||
void Update(bool bForce = false);
|
||||
|
||||
// to start a playback
|
||||
#if INPUTREPLAY_CAN_PLAYBACK
|
||||
bool LoadFile(KSTR szfilename);
|
||||
#endif
|
||||
|
||||
// to finish recording
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
void WriteToFile();
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void SimpleInputRec::Update(bool bForce)
|
||||
{
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
if(m_bRecording)
|
||||
{
|
||||
unsigned int newbuttons = nesinput.buttons;
|
||||
|
||||
// allocate and initialize
|
||||
if(!m_data)
|
||||
{
|
||||
m_data = new unsigned char[INPUT_BUTTONS_TOTAL * MAX_REC_LEN * 2];
|
||||
unsigned short* dataptr = (unsigned short*)m_data;
|
||||
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
btn.rledata = dataptr;
|
||||
dataptr += MAX_REC_LEN;
|
||||
|
||||
btn.rlepos = 0;
|
||||
btn.currentrun = 0;
|
||||
btn.datalen = MAX_REC_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
// write RLE button bit streams
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
if(bForce || (newbuttons&(1<<i)) != (m_buttonstate&(1<<i)) || btn.currentrun==0x7FFF)
|
||||
{
|
||||
if(btn.currentrun)
|
||||
{
|
||||
int bit = (m_buttonstate>>i)&1;
|
||||
btn.rledata[btn.rlepos++] = (bit<<15) | btn.currentrun;
|
||||
}
|
||||
btn.currentrun = bForce? 0 : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
++btn.currentrun;
|
||||
}
|
||||
}
|
||||
|
||||
m_buttonstate = newbuttons;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INPUTREPLAY_CAN_PLAYBACK
|
||||
if(!m_bRecording)
|
||||
{
|
||||
bool bIsRunning = false;
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
if(btn.rledata)
|
||||
{
|
||||
bIsRunning = true;
|
||||
if(!btn.currentrun && btn.rlepos<btn.datalen)
|
||||
{
|
||||
unsigned short value = btn.rledata[btn.rlepos++];
|
||||
btn.currentrun = value&0x7FFF;
|
||||
m_buttonstate &= ~(1<<i);
|
||||
m_buttonstate |= ((value>>15)&1)<<i;
|
||||
--btn.currentrun;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(btn.currentrun)
|
||||
{
|
||||
--btn.currentrun;
|
||||
}
|
||||
else if(btn.rlepos==btn.datalen)
|
||||
{
|
||||
btn.rledata = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(bIsRunning)
|
||||
{
|
||||
// TODO: this is where you can overwrite the live button state to the prerecorded one
|
||||
systeminput.buttons = m_buttonstate;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#if INPUTREPLAY_CAN_PLAYBACK
|
||||
bool SimpleInputRec::LoadFile(KSTR szfilename)
|
||||
{
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
btn.datalen = 0;
|
||||
btn.rledata = NULL;
|
||||
btn.rlepos = 0;
|
||||
btn.currentrun = 0;
|
||||
}
|
||||
|
||||
delete[] m_data;
|
||||
m_bRecording = false;
|
||||
|
||||
if(fcheckexists(szfilename))
|
||||
{
|
||||
FILE* f = fopen(szfilename, "wb");
|
||||
if(f)
|
||||
{
|
||||
// WARNING: You'll want to do more error checking, but just to keep it simple...
|
||||
|
||||
fseek(f,0,SEEK_END);
|
||||
unsigned long filelen = ftell(f);
|
||||
fseek(f,0,SEEK_SET);
|
||||
|
||||
m_data = new unsigned char[filelen];
|
||||
fread(m_data, 1, filelen, f);
|
||||
fclose(f);
|
||||
|
||||
unsigned char* bufptr = m_data;
|
||||
int numbuttons = bufptr[0] | (bufptr[1]<<8);
|
||||
bufptr += 2;
|
||||
if(numbuttons <= INPUT_BUTTONS_TOTAL)
|
||||
{
|
||||
for(int i=0; i<numbuttons; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
btn.datalen = bufptr[0] | (bufptr[1]<<8);
|
||||
bufptr += 2;
|
||||
}
|
||||
|
||||
for(int i=0; i<numbuttons; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
if(btn.datalen)
|
||||
{
|
||||
// WARNING: Endian dependent for simplcicity
|
||||
btn.rledata = (unsigned short*)bufptr;
|
||||
bufptr += btn.datalen*2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#if INPUTREPLAY_CAN_RECORD
|
||||
void SimpleInputRec::WriteToFile()
|
||||
{
|
||||
if(m_data && m_bRecording)
|
||||
{
|
||||
Update(true);
|
||||
|
||||
FILE* f = fopen("_autorec.rec","wb");
|
||||
if(f)
|
||||
{
|
||||
fputc(INPUT_BUTTONS_TOTAL, f);
|
||||
fputc(0, f);
|
||||
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
fputc((unsigned char)btn.rlepos, f);
|
||||
fputc(btn.rlepos >> 8, f);
|
||||
}
|
||||
for(int i=0; i<INPUT_BUTTONS_TOTAL; ++i)
|
||||
{
|
||||
ButtonRec& btn = m_buttons[i];
|
||||
|
||||
// WARNING: Endian dependent for simplcicity
|
||||
fwrite(btn.rledata, 2, btn.rlepos, f);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#endif // INPUTREPLAY_INCLUDED
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 272 KiB |
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 860 B |
|
After Width: | Height: | Size: 861 B |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 657 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 281 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 123 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 16 KiB |