Skip to content

Commit

Permalink
Merge branch '6-feature-asset-import-pipeline'
Browse files Browse the repository at this point in the history
# Conflicts:
#	build/aseparse65/png65.js
#	includes/s65/start.s
#	png65examples.bat
  • Loading branch information
smnjameson committed Jul 25, 2022
2 parents 6df0b2d + a68ee6a commit 5845e2b
Show file tree
Hide file tree
Showing 50 changed files with 2,068 additions and 222 deletions.
391 changes: 303 additions & 88 deletions build/aseparse65/png65.js

Large diffs are not rendered by default.

107 changes: 63 additions & 44 deletions build/gendocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ let comments = {

let openCount = 0
let cssData = null

let completions = {
"scope": "source.assembly.kickassembler",
"completions": []
}

let keywords = []
let funcs=[]
let macs=[]
let vars=[]
let structkeys = []

//fetch css first
fs.readFile('./build/theme.css', {}, (err, data)=> {
cssData = data.toString()
Expand Down Expand Up @@ -105,7 +117,7 @@ function checkForLinks(category, param) {
}
}

function addParams(trim) {
function addParams(trim, structName) {
let type = trim.shift()
let name = trim.shift()
let support = ''
Expand All @@ -119,12 +131,24 @@ function addParams(trim) {
}
let description = trim.join(' ')


if(structName) {
structkeys.push(name)
completions.completions.push({
"trigger": name,
"annotation": `${structName}`,
"kind": "snippet"
})
}

currentComment.params.push({
type,
name,
description,
support
})
})


}

function addReturnVals(trim) {
Expand Down Expand Up @@ -224,52 +248,55 @@ function onLine(line) {
currentComment.category = trim
comments[currentComment.category] = comments[currentComment.category] || emptyCategory()

//Object macro params
} else if(trim.substr(0,8) == "* @param") {
trim = trim.substr(8).trim().split(" ")
addParams(trim)
//Object macro params
} else if(trim.substr(0,8) == "* @param") {
trim = trim.substr(8).trim().split(" ")
addParams(trim)

//Object macro params
} else if(trim.substr(0,7) == "* @item") {
trim = trim.substr(7).trim().split(" ")
addParams(trim)
//Object macro params
} else if(trim.substr(0,7) == "* @item") {
trim = trim.substr(7).trim().split(" ")
addParams(trim)

//Object hashtable keys
} else if(trim.substr(0,6) == "* @key") {
trim = trim.substr(6).trim().split(" ")
addParams(trim)
//Object hashtable keys
} else if(trim.substr(0,6) == "* @key") {
trim = trim.substr(6).trim().split(" ")
addParams(trim)

//Object data addr
} else if(trim.substr(0,7) == "* @addr") {
trim = trim.substr(7).trim().split(" ")
addParams(trim)
//Object data addr
} else if(trim.substr(0,7) == "* @addr") {
trim = trim.substr(7).trim().split(" ")
addParams(trim)


//Object register effects
} else if(trim.substr(0,12) == "* @registers") {
trim = trim.substr(12).trim()
currentComment.registers = trim.split('')

//Object register effects
} else if(trim.substr(0,12) == "* @registers") {
trim = trim.substr(12).trim()
currentComment.registers = trim.split('')
//Object flag effects
} else if(trim.substr(0,8) == "* @flags") {
trim = trim.substr(8).trim()
currentComment.flags = trim.split('')

//Object returns effects
} else if(trim.substr(0,9) == "* @setreg") {
trim = trim.substr(9).trim().split(" ")
addReturns(trim)

//Object flag effects
} else if(trim.substr(0,8) == "* @flags") {
trim = trim.substr(8).trim()
currentComment.flags = trim.split('')
//Object returns effects
} else if(trim.substr(0,10) == "* @returns") {
trim = trim.substr(10).trim().split(" ")
addReturnVals(trim)

//Object returns effects
} else if(trim.substr(0,9) == "* @setreg") {
trim = trim.substr(9).trim().split(" ")
addReturns(trim)
//Struct info
} else if(trim.substr(0,9) == "* @struct") {
trim = trim.substr(9).trim().split(" ")
addParams(trim, currentComment.category+"_"+currentComment.name)

//Object returns effects
} else if(trim.substr(0,10) == "* @returns") {
trim = trim.substr(10).trim().split(" ")
addReturnVals(trim)

//ignore unknown tags
} else if(trim.substr(0,3) == "* @") {


//Otherwise assume part of the description
} else {
currentComment.description += trim.substr(2) + " "
Expand Down Expand Up @@ -303,15 +330,7 @@ function onClose(line){
<body>
`;

let completions = {
"scope": "source.assembly.kickassembler",
"completions": []
}

let keywords = []
let funcs=[]
let macs=[]
let vars=[]

let lastCategory = ""
let sortedCategorys = Object.keys(comments).sort();
Expand Down
Binary file added build/mega65_ftp.exe
Binary file not shown.
197 changes: 180 additions & 17 deletions docs/S65.sublime-completions

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/S65.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ file_extensions:
scope: source.assembly.kickassembler
contexts:
main:
- match: \b(DMA_CopyJob|DMA_DisableTransparency|DMA_EnableTransparency|DMA_Execute|DMA_FillJob|DMA_Header|DMA_Step|Layer_AddText|Layer_AdvanceScreenPointers|Layer_ClearAllLayers|Layer_ClearLayer|Layer_Get|Layer_GetGotoX|Layer_SetGotoX|Layer_SetScreenPointersXY|Layer_Update|Layer_WriteToScreen|Palette_Assign|Palette_LoadFromMem|Palette_LoadFromSD|Palette_Set|SDCard_LoadToAtticRam|SDCard_LoadToChipRam|Sprite_Get|Sprite_GetColor|Sprite_GetDimensions|Sprite_GetEnabled|Sprite_GetFlags|Sprite_GetPointer|Sprite_GetPositionX|Sprite_GetPositionY|Sprite_SetColor|Sprite_SetDimensions|Sprite_SetEnabled|Sprite_SetFlags|Sprite_SetPointer|Sprite_SetPositionX|Sprite_SetPositionY|Sprite_Update|System_GetRandom16|System_GetRandom8)\b
- match: \b(DMA_CopyJob|DMA_DisableTransparency|DMA_EnableTransparency|DMA_Execute|DMA_FillJob|DMA_Header|DMA_Step|Layer_AddText|Layer_AdvanceScreenPointers|Layer_ClearAllLayers|Layer_ClearLayer|Layer_Get|Layer_GetGotoX|Layer_SetGotoX|Layer_SetScreenPointersXY|Layer_Update|Layer_WriteToScreen|Palette_Assign|Palette_LoadFromMem|Palette_LoadFromSD|Palette_Set|SDCard_LoadToAtticRam|SDCard_LoadToChipRam|Sprite_Get|Sprite_GetColor|Sprite_GetDimensions|Sprite_GetEnabled|Sprite_GetFlags|Sprite_GetPointer|Sprite_GetPositionX|Sprite_GetPositionY|Sprite_ResetFlags|Sprite_SetColor|Sprite_SetDimensions|Sprite_SetEnabled|Sprite_SetFlags|Sprite_SetPointer|Sprite_SetPositionX|Sprite_SetPositionY|Sprite_SetSpriteMeta|Sprite_Update|System_GetRandom16|System_GetRandom8)\b
scope: storage.type.macro
- match: \b(Layer_GetColorAddress|Layer_GetIO|Layer_GetLayerCount|Layer_GetScreenAddress|Sprite_GetIO)\b
- match: \b(Asset_GetCharset|Asset_GetSpriteset|Layer_GetColorAddress|Layer_GetIO|Layer_GetLayerCount|Layer_GetScreenAddress|Sprite_GetIO)\b
scope: constant.language.pseudocommand
- match: \b(S65_AddToMemoryReport|S65_MemoryReport|S65_RestoreBasePage|S65_RestoreRegisters|S65_SaveRegisters|S65_SetBasePage|S65_Text16|S65_Trace|Layer_DefineRRBSpriteLayer|Layer_DefineResolution|Layer_DefineScreenLayer|Layer_InitScreen|Sprite_GenerateLayerData|System_BasicUpstart65|System_BorderDebug|System_DisableC65ROM|System_Enable40Mhz|System_EnableFastRRB|System_EnableVIC4|System_WaitForRaster)\b
- match: \b(S65_AddToMemoryReport|S65_MemoryReport|S65_RestoreBasePage|S65_RestoreRegisters|S65_SaveRegisters|S65_SetBasePage|S65_Text16|S65_Trace|Asset_ImportCharset|Asset_ImportCharsetPalette|Asset_ImportSpriteset|Asset_ImportSpritesetPalette|Layer_DefineRRBSpriteLayer|Layer_DefineResolution|Layer_DefineScreenLayer|Layer_InitScreen|Sprite_GenerateLayerData|Sprite_GenerateMetaData|System_BasicUpstart65|System_BorderDebug|System_DisableC65ROM|System_Enable40Mhz|System_EnableFastRRB|System_EnableVIC4|System_WaitForRaster)\b
scope: support.function.3d
- match: \b(S65_COLOR_RAM|S65_ColorRamPointer|S65_LastLayerIOPointer|S65_LastSpriteIOPointer|S65_ReturnValue|S65_SCREEN_LOGICAL_ROW_WIDTH|S65_SCREEN_RAM|S65_SCREEN_ROW_WIDTH|S65_SCREEN_TERMINATOR_OFFSET|S65_ScreenRamPointer|S65_SpareBasePage|S65_VISIBLE_SCREEN_CHAR_HEIGHT|S65_VISIBLE_SCREEN_CHAR_WIDTH|Layer_AddrOffsets|Layer_DMAClear|Layer_DMAClearColor|Layer_DMAClearColorRRB|Layer_DynamicDataTable|Layer_IOgotoX|Layer_IOmaxCharsRRB|Layer_IOmaxSpritesRRB|Layer_IOrowCountTableRRB|Layer_IsRRBSprite|Layer_RowAddressBaseLSB|Layer_RowAddressBaseMSB|Layer_RowAddressLSB|Layer_RowAddressMSB|Layer_SpriteIOAddrLSB|Layer_SpriteIOAddrMSB|Palette_0|Palette_1|Palette_2|Palette_3|Sprite_IOcolor|Sprite_IOflagEnabled|Sprite_IOflagFlipH|Sprite_IOflagFlipV|Sprite_IOflagNCM|Sprite_IOflags|Sprite_IOflipHoffset|Sprite_IOflipVoffset|Sprite_IOheight|Sprite_IOptr|Sprite_IOwidth|Sprite_IOx|Sprite_IOy|Sprite_SpriteIOLength)\b
- match: \b(S65_COLOR_RAM|S65_ColorRamPointer|S65_LastImportPtr|S65_LastLayerIOPointer|S65_LastSpriteIOPointer|S65_ReturnValue|S65_SCREEN_LOGICAL_ROW_WIDTH|S65_SCREEN_RAM|S65_SCREEN_ROW_WIDTH|S65_SCREEN_TERMINATOR_OFFSET|S65_ScreenRamPointer|S65_SpareBasePage|S65_VISIBLE_SCREEN_CHAR_HEIGHT|S65_VISIBLE_SCREEN_CHAR_WIDTH|Asset_Asset_SpriteListMetaTable|Layer_AddrOffsets|Layer_DMAClear|Layer_DMAClearColor|Layer_DMAClearColorRRB|Layer_DynamicDataTable|Layer_IOgotoX|Layer_IOmaxCharsRRB|Layer_IOmaxSpritesRRB|Layer_IOrowCountTableRRB|Layer_IsRRBSprite|Layer_RowAddressBaseLSB|Layer_RowAddressBaseMSB|Layer_RowAddressLSB|Layer_RowAddressMSB|Layer_SpriteIOAddrLSB|Layer_SpriteIOAddrMSB|Palette_0|Palette_1|Palette_2|Palette_3|Sprite_IOcolor|Sprite_IOflagEnabled|Sprite_IOflagFlipH|Sprite_IOflagFlipV|Sprite_IOflagNCM|Sprite_IOflags|Sprite_IOflipHoffset|Sprite_IOflipVoffset|Sprite_IOheight|Sprite_IOptr|Sprite_IOwidth|Sprite_IOx|Sprite_IOy|Sprite_SpriteIOLength)\b
scope: constant.language.color
- match: '#TRUE'
scope: constant.language.pseudocommand
Expand Down
4 changes: 4 additions & 0 deletions docs/S65KickDoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ class CustomCompletionListener(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
return ([], sublime.INHIBIT_WORD_COMPLETIONS )

class DeployAssetsAndBuildCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().run_command('exec', {'cmd': ["make.bat", "DEPLOY"]})



class RunTestsCommand(sublime_plugin.TextCommand):
Expand Down
Loading

0 comments on commit 5845e2b

Please sign in to comment.