diff options
Diffstat (limited to 'browse-slack')
-rw-r--r-- | browse-slack/environment.mu | 4 | ||||
-rw-r--r-- | browse-slack/main.mu | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu index 123e3803..9d2ca460 100644 --- a/browse-slack/environment.mu +++ b/browse-slack/environment.mu @@ -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-= diff --git a/browse-slack/main.mu b/browse-slack/main.mu index 8ceb117f..d0eb3ed8 100644 --- a/browse-slack/main.mu +++ b/browse-slack/main.mu @@ -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 } } |