Skip to content

Commit

Permalink
started on inspector for debugging uninvited
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkite committed Apr 4, 2011
1 parent 230d17b commit ce62cef
Show file tree
Hide file tree
Showing 7 changed files with 504 additions and 0 deletions.
93 changes: 93 additions & 0 deletions inspect.css
@@ -0,0 +1,93 @@
div.nav {
width: 100px;
float: left;
background: #cce;
}
div.nav div {
padding-left: 5px;
font-size: 12px;
font-family: sans-serif;
cursor: pointer;
border-bottom: 1px solid #eee;
}
div.view {
margin-left: 110px;
}

div.selector {
padding-top: 5px;
font-size: 14px;
font-family: sans-serif;
}
span.prev {
width: 40px;
border-top: 1px solid #444;
border-left: 1px solid #444;
border-bottom: 1px solid #444;
border-right: 1px solid #aae;
padding: 5px;
background: #448;
color: #eef;
cursor: pointer;
}
span.prev.disabled {
color: #aaa;
}
span.next {
width: 40px;
border-top: 1px solid #444;
border-right: 1px solid #444;
border-bottom: 1px solid #444;
border-left: 1px solid #aae;
padding: 5px;
background: #448;
color: #eef;
cursor: pointer;
}
span.next.disabled {
color: #aaa;
}
span.counter {
display: inline-block;
width: 150px;
padding: 5px;
background: #88c;
border-top: 1px solid #444;
border-bottom: 1px solid #444;
text-align: center;
}
table {
border: 1px solid #888;
border-collapse: collapse;
}
table tr {
border-bottom: 1px solid #aaa;
}
table th {
text-align: left;
height: 8em;
vertical-align: bottom;
padding-bottom: 10px;
}
table th.odd {
background: #ccc;
}
table th span {
position: absolute;
-webkit-transform: rotate(-90deg);
-webkit-transform-origin: 0 0;
-moz-transform: rotate(-90deg);
-moz-transform-origin: 0 0;
font-size: 14px;
font-family: sans-serif;
vertical-align: top;
}
table td {
font-size: 13px;
font-family: sans-serif;
width: 20px;
text-align: center;
}
table td.odd {
background: #ccc;
}
12 changes: 12 additions & 0 deletions inspect.html
@@ -0,0 +1,12 @@
<html>
<head>
<title>WebVenture Inspector</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
var gamename=document.location.hash.substring(1);
</script>
<script type="text/javascript" src="inspect.js"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions inspect.js
@@ -0,0 +1,19 @@
var desktop;
//initialize screen and determine platform
$(document).ready(function(){
desktop=$(document.createElement('div'));
desktop.addClass('screen');
$('script[src="inspect.js"]').after(desktop);

if (gamename.match(/\.dsk$/)) //macintosh
$.getScript("inspect_mac.js");
else if (gamename.match(/\.2mg$/)) //IIgs
$.getScript("inspect_gs.js");
else
fatal("Unknown disk type");
});
function fatal(err)
{
// desktop.html('<h3>'+err+'</h3>');
throw err;
}
21 changes: 21 additions & 0 deletions inspect_gs.js
@@ -0,0 +1,21 @@
var Modules=[
"gs/gs.js",
"gs/files.js",
"gs/graphics.js",
"gs/resources.js",
"gs/sound.js",
"files.js",
"graphics.js",
"sound.js",
"text.js",
"objects.js",
"inspect_main.js"
];
var loadedModules=0;
for (var i in Modules)
{
$.getScript(Modules[i],function() {
if (++loadedModules==Modules.length)
initialize();
});
}
21 changes: 21 additions & 0 deletions inspect_mac.js
@@ -0,0 +1,21 @@
var Modules=[
"mac/mac.js",
"mac/files.js",
"mac/graphics.js",
"mac/resources.js",
"mac/sound.js",
"files.js",
"graphics.js",
"sound.js",
"text.js",
"objects.js",
"inspect_main.js"
];
var loadedModules=0;
for (var i in Modules)
{
$.getScript(Modules[i],function() {
if (++loadedModules==Modules.length)
initialize();
});
}

0 comments on commit ce62cef

Please sign in to comment.