Starting work on disambiguating PCjs the emulator from PCjs the project/website; the emulator will become PCx86

This commit is contained in:
Jeff Parsons 2016-05-16 20:53:57 -07:00
commit 288f28055d
1519 changed files with 16242 additions and 6939 deletions

View file

@ -1,5 +1,5 @@
/**
* @fileoverview The Component class used by C1Pjs and PCjs.
* @fileoverview The Component class used by C1Pjs and PCx86.
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
* @version 1.0
* Created 2012-May-14

View file

@ -32,11 +32,6 @@
"use strict";
/**
* @define {string}
*/
var APPNAME = ""; // this @define is overridden by the Closure Compiler with either "PCjs" or "C1Pjs"
/**
* @define {string}
*/
@ -79,7 +74,6 @@ if (typeof module !== 'undefined') {
if (NODE) {
global.window = false; // provides an alternative "if (typeof window === 'undefined')" (ie, "if (window) ...")
global.APPNAME = APPNAME;
global.APPVERSION = APPVERSION;
global.XMLVERSION = XMLVERSION;
global.SITEHOST = SITEHOST;

View file

@ -373,7 +373,7 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms)
* *something* will have happened.
*
* Note that it is the HTMLOut module (in processMachines()) that ultimately decides which scripts to
* include and then generates the embedPC() and/or embedC1P() calls.
* include and then generates the embedXXX() call.
*/
var aeWarning = (eMachine && Component.getElementsByClass(eMachine, "machine-warning"));
eWarning = (aeWarning && aeWarning[0]) || eMachine;
@ -401,7 +401,7 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms)
head.appendChild(style);
}
var sAppClass = sName.toLowerCase(); // eg, "pcjs" or "c1pjs"
var sAppClass = sName.toLowerCase(); // eg, "pcx86" or "c1pjs"
if (!sXSLFile) {
/*
* Now that PCjs is an open-source project, we can make the following test more flexible,
@ -535,7 +535,7 @@ function embedC1P(idMachine, sXMLFile, sXSLFile)
}
/**
* embedPC(idMachine, sXMLFile, sXSLFile, sParms)
* embedPCx86(idMachine, sXMLFile, sXSLFile, sParms)
*
* @param {string} idMachine
* @param {string} sXMLFile
@ -543,10 +543,10 @@ function embedC1P(idMachine, sXMLFile, sXSLFile)
* @param {string} [sParms]
* @return {boolean} true if successful, false if error
*/
function embedPC(idMachine, sXMLFile, sXSLFile, sParms)
function embedPCx86(idMachine, sXMLFile, sXSLFile, sParms)
{
if (fAsync) web.enablePageEvents(false);
return embedMachine("PCjs", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms);
return embedMachine("PCx86", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms);
}
/**
@ -569,7 +569,7 @@ function embedPC8080(idMachine, sXMLFile, sXSLFile, sParms)
* by adding them as (named) properties of a global object.
*/
if (APPNAME == "C1Pjs") window['embedC1P'] = embedC1P;
if (APPNAME == "PCjs") window['embedPC'] = embedPC;
if (APPNAME == "PCx86") window['embedPCx86'] = embedPCx86;
if (APPNAME == "PC8080") window['embedPC8080'] = embedPC8080;
window['enableEvents'] = web.enablePageEvents;