This commit is contained in:
Kartik K. Agaram 2021-08-10 22:46:51 -07:00
parent 76eceb2ca3
commit 34d3cb48e9
2 changed files with 7 additions and 3 deletions

View File

@ -60,7 +60,9 @@ fn render-item screen: (addr screen), _item: (addr item), _users: (addr array us
var author-offset/ecx: (offset user) <- compute-offset users, author-index
var author/ecx: (addr user) <- index users, author-offset
# author avatar
var author-avatar/ebx: (addr image) <- get author, avatar
var author-avatar-ah/eax: (addr handle image) <- get author, avatar
var _author-avatar/eax: (addr image) <- lookup *author-avatar-ah
var author-avatar/ebx: (addr image) <- copy _author-avatar
{
compare author-avatar, 0
break-if-=

View File

@ -8,7 +8,7 @@ type user {
id: (handle array byte)
name: (handle array byte)
real-name: (handle array byte)
avatar: image
avatar: (handle image)
}
type item {
@ -234,7 +234,9 @@ fn parse-user record: (addr stream byte), _users: (addr array user), user-idx: i
{
compare c, 0x5d/close-bracket
break-if-=
var dest/eax: (addr image) <- get user, avatar
var dest-ah/eax: (addr handle image) <- get user, avatar
allocate dest-ah
var dest/eax: (addr image) <- lookup *dest-ah
initialize-image dest, record
}
}