fixed typescript 'finally' error

This commit is contained in:
Steven Hugg 2019-12-27 10:27:29 -06:00
parent 7a7c3d7255
commit acc05564a1
3 changed files with 9 additions and 6 deletions

View File

@ -339,11 +339,13 @@ function reloadProject(id:string) {
gotoNewLocation();
}
function getSkeletonFile(fileid:string) : Promise<string> {
async function getSkeletonFile(fileid:string) : Promise<string> {
var ext = platform.getToolForFilename(fileid);
return $.get( "presets/"+getBasePlatform(platform_id)+"/skeleton."+ext, 'text').catch((e) => {
try {
return await $.get( "presets/"+getBasePlatform(platform_id)+"/skeleton."+ext, 'text');
} catch(e) {
alertError("Could not load skeleton for " + platform_id + "/" + ext + "; using blank file");
});
}
}
function checkEnteredFilename(fn : string) : boolean {

View File

@ -7,9 +7,12 @@ import { hex, rgb2bgr, lzgmini, stringToByteArray } from "../common/util";
// http://metopal.com/projects/ballybook/doku.php
// TODO: fix keys, more controllers, vibrato/noise, border color, debug info, rotate
// TODO: fix keys, more controllers, vibrato/noise, border color
// http://atariage.com/forums/topic/251416-programming-the-bally-arcadeastrocade/
// https://ballyalley.com/faqs/BPA%20Video%20Hardware%20FAQ/Bally_Professional_Arcade_Video_Hardware%20(2001)(Tony%20Miller).pdf
// https://atariage.com/forums/topic/290858-notes-from-a-2019-interview-with-jamie-fenton/ (http://www.fentonia.com/bio/)
// https://thehistoryofhowweplay.wordpress.com/2018/04/03/interview-tom-mchugh/
// https://ballyalley.com/faqs/Programmers%20of%20the%20Astrocade%20Built-In%20Programs.txt
const ASTROCADE_KEYCODE_MAP = makeKeycodeMap([
// player 1

View File

@ -74,14 +74,12 @@ function testPlatform(exports, platform_id, platform_name, numPresets) {
///
/*
testPlatform(this, 'vcs', 'Atari 2600', 35);
testPlatform(this, 'nes', 'NES', 30);
testPlatform(this, 'vicdual', 'VIC Dual', 7);
testPlatform(this, 'mw8080bw', 'Midway 8080', 3);
testPlatform(this, 'galaxian-scramble', 'Galaxian/Scramble', 3);
testPlatform(this, 'vector-z80color', 'Atari Color Vector (Z80)', 3);
*/
testPlatform(this, 'williams-z80', 'Williams (Z80)', 3);
// TODO testPlatform(this, 'sound_williams-z80', 'Williams Sound (Z80)', 1);
testPlatform(this, 'coleco', 'ColecoVision', 12);