Skip to content

Commit

Permalink
move code into sim directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Aug 21, 2024
1 parent 3ff0da9 commit 1c21657
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 54 deletions.
2 changes: 0 additions & 2 deletions libs/arcadeshield/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ namespace screen {
namespace _screen_internal {
//% shim=pxt::updateScreen
function updateScreen(img: Bitmap): void { }
//% shim=pxt::updateStats
function updateStats(msg: string): void { }

export function createScreen() {
const img = bitmap.create(
Expand Down
49 changes: 0 additions & 49 deletions libs/arcadeshield/sim/arcadegamepad.h

This file was deleted.

12 changes: 9 additions & 3 deletions libs/arcadeshield/sim/state.ts → sim/state/arcadeshield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ namespace pxsim {
runId: this.runId,
value: b
}
control.simmessages.send("arcadeshield", Buffer.fromUTF8(JSON.stringify(msg)), false)
Runtime.postMessage(<SimulatorSerialMessage>{
type: 'serial',
data: "TODO", // this.serialOutBuffer
id: runtime.id,
sim: true
})
// control.simmessages.send("arcadeshield", Buffer.fromUTF8(JSON.stringify(msg)), false)
}

setPalette(buf: RefBuffer) {
Expand All @@ -60,7 +66,7 @@ namespace pxsim {
runId: this.runId,
data: buf.data.toString()
}
control.simmessages.send("arcadeshield", Buffer.fromUTF8(JSON.stringify(msg)), false)
// TODO control.simmessages.send("arcadeshield", Buffer.fromUTF8(JSON.stringify(msg)), false)
}

updateStats(s: string) {
Expand All @@ -74,7 +80,7 @@ namespace pxsim {
runId: this.runId,
data: img.data.toString()
}
control.simmessages.send("arcadeshield", Buffer.fromUTF8(JSON.stringify(msg)), false)
// TODO control.simmessages.send("arcadeshield", Buffer.fromUTF8(JSON.stringify(msg)), false)
}
}

Expand Down
File renamed without changes.

0 comments on commit 1c21657

Please sign in to comment.