This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!include "c64.asm" | |
; C64jasm example program | |
; | |
; see https://github.com/nurpax/c64jasm/tree/master/examples for more | |
!let SIN_LEN = 64 | |
!let zptmp0 = $20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!include "c64.asm" | |
+c64::basic_start(entry) | |
entry: { | |
lda #0 | |
} | |
; try includes | |
!include "other.asm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const urlParams = new URLSearchParams(window.location.search); | |
const myParam = urlParams.get('gist_id'); | |
console.log(myParam); | |
console.log(process.env.PUBLIC_URL); | |
fetch('https://api.github.com/gists/5cbb8438e12add2d8cd1723c7459e0ec') | |
.then(resp => resp.json()) | |
.then(json => console.log(json)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!include "c64.asm" | |
+c64::basic_start(entry) | |
!let zp = { | |
tmp0: $20, | |
tmp1: $22, | |
sprite_idx: $24 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _getExpensiveThing = () => { | |
const c: any = getExpensiveThing; | |
if (c.cache) { | |
return c.cache; | |
} | |
c.cache = expensiveThing(); | |
return c.cache; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loader for .64c font files | |
module.exports = ({readFileSync, resolveRelative}, filename) => { | |
const buf = readFileSync(resolveRelative(filename.lit)); | |
const numChars = (buf.length - 2) / 8; | |
const data = []; | |
let offs = 2; | |
for (let i = 0; i < numChars; i++) { | |
const c = []; | |
for (let bi = 0; bi < 8; bi++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Matrix3x3 { | |
v: number[]; | |
} | |
function c(a: Matrix3x3, col: number): number[] { | |
return [a.v[col], a.v[col + 3], a.v[col + 6]]; | |
} | |
function r(a: Matrix3x3, row: number): number[] { | |
return [a.v[row*3+0], a.v[row*3+1], a.v[row*3+2]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"dev": "yarn react-scripts start", | |
"build": "react-scripts build", | |
"start": "concurrently \"cross-env BROWSER=none yarn react-scripts start\" \"wait-on http://localhost:3000 && electron .\"", | |
"debug": "concurrently \"cross-env BROWSER=none yarn react-scripts start\" \"wait-on http://localhost:3000 && electron --remote-debugging-port=9223 .\"", | |
"package": "electron-builder --dir", | |
"dist": "npx build --x64 --macos --win --linux --c.extraMetadata.main=build/electron.js -p never", | |
"pets": "ts-node -O '{\"module\": \"commonjs\"}' ./src/utils/importers/png2petscii" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const actionCreators = { | |
load: (data: SettingsJson) => createAction(LOAD, fromJson(data)), | |
saveEditsAction: () => createAction(SAVE_EDITS), | |
cancelEdits: () => createAction(CANCEL_EDITS), | |
setPalette: (data: SetPaletteArgs) => createAction(SET_PALETTE, data), | |
setSelectedColorPaletteName: (data: SetSelectedColorPaletteNameArgs) => createAction(SET_SELECTED_COLOR_PALETTE, data), | |
setIntegerScale: (data: SetIntegerScaleArgs) => createAction(SET_INTEGER_SCALE, data) | |
}; | |
type Actions = ActionsUnion<typeof actionCreators> |