Skip to content

Commit

Permalink
fix some more
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Oct 9, 2024
1 parent 6b74ded commit 4e8b20b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libs/arcadeshield/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ basic.showNumber(present ? 1 : 0)
// set palette before creating screen, which initializes the display
__screenhelpers.setPalette(hex`000000ffffffff2121ff93c4ff8135fff609249ca378dc52003fad87f2ff8e2ec4a4839f5c406ce5cdc491463d000000`)

const screen = bitmap.create(
const screen = bitmaps.create(
__screenhelpers.displayWidth(),
__screenhelpers.displayHeight()
)
Expand Down
2 changes: 2 additions & 0 deletions libs/bitmap/bitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,9 @@ namespace bitmaps {
Bitmap_ ofBuffer(Buffer buf) {
return BitmapMethods::convertAndWrap(buf);
}
}

namespace bitmaps {
/**
* Create new empty (transparent) bitmap
*/
Expand Down
1 change: 0 additions & 1 deletion pxtarget.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
"dockerImage": "pext/yotta:gcc5"
},
"multiVariants": [
"mbdal",
"mbcodal"
],
"alwaysMultiVariant" : true,
Expand Down
11 changes: 5 additions & 6 deletions sim/state/bitmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,13 @@ namespace pxsim.BitmapMethods {

export function drawIcon(img: RefImage, icon: RefBuffer, x: number, y: number, color: number) {
const src: Uint8Array = icon.data
if (!bitmap.isValidImage(icon))
if (!bitmaps.isValidImage(icon))
return
if (src[1] != 1)
return // only mono
let width = bitmap.bufW(src)
let height = bitmap.bufH(src)
let byteH = bitmap.byteHeight(height, 1)
let width = bitmaps.bufW(src)
let height = bitmaps.bufH(src)
let byteH = bitmaps.byteHeight(height, 1)

x |= 0
y |= 0
Expand Down Expand Up @@ -940,7 +940,7 @@ namespace pxsim.BitmapMethods {
}


namespace pxsim.bitmap {
namespace pxsim.bitmaps {
export function byteHeight(h: number, bpp: number) {
if (bpp == 1)
return h * bpp + 7 >> 3
Expand Down Expand Up @@ -997,7 +997,6 @@ namespace pxsim.bitmap {
return new RefImage(w, h, 4)
}

// TODO: move to image namespace
export function ofBuffer(buf: RefBuffer): RefImage {
const src: Uint8Array = buf.data

Expand Down

0 comments on commit 4e8b20b

Please sign in to comment.