dMZX Forums: How do I transfer the "keyz_lol.mzx" test program to work with - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How do I transfer the "keyz_lol.mzx" test program to work with tried it myself to get it working, nothing but trouble.

#1 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 349
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 04 August 2019 - 02:29 AM

EDIT: The Title got partially erased by the forums itself, I meant something along the lines of: "How do I transfer the "keyz_lol.mzx" test program to work with the sprite layer instead of overlay"
I was going to transfer the KEYZ_LOL.MZX demonstration somebody sent me a long bit ago, but it uses overlay, and I want to transfer to the sprite system for my status bar,

I just want to display some numbers using the VLAYER operations, but it only lets me set characters, tried everything. it is a big nope.

This post has been edited by smilymzx: 04 August 2019 - 02:34 AM

SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

I am at:

Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)

Other interests:

Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
0

#2 User is offline   Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 04 August 2019 - 06:22 AM

Hi, can you be more specific about the problem or paste the affected code here? I'm assuming you're referring to the world linked in this issue, which doesn't use the overlay at all as far as I can tell.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
0

#3 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 349
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 04 August 2019 - 05:49 PM

View PostLachesis, on 03 August 2019 - 11:22 PM, said:

Hi, can you be more specific about the problem or paste the affected code here? I'm assuming you're referring to the world linked in this issue, which doesn't use the overlay at all as far as I can tell.


You are right, I though Overlay when it was a "Message Row" based thing
I really want each the 15 colored Key's Numberic values (0-15) to show in VLAYER instead of a MESG command, in this particular instance. If I do it myself, It shows nothing or shows CHARs
SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

I am at:

Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)

Other interests:

Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
0

#4 User is offline   Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 04 August 2019 - 06:23 PM

Here, I've created a modified version of this that draws the numbers to the vlayer. This would be a lot easier if there was a write vlayer command but there isn't right now. Here's the important code I've added to the global:

Before the loop:
set "spr0_width" to 5
set "spr0_height" to 18
set "spr0_static" to 1
set "spr0_vlayer" to 1


During the loop (replaces everything between 'goto #k' and 'cycle 1'):
loop start
set "vch2,('loopcount'+1)" to "('num_keys_&LOOPCOUNT&'>=10 ? 'num_keys_&LOOPCOUNT&'/10+48 : 0)"
set "vch3,('loopcount'+1)" to "('num_keys_&LOOPCOUNT&'%10+48)"
loop for 15
put c?? Sprite p00 at 75 0


The rest of the vlayer UI is predrawn on the vlayer (if you haven't been keeping up with MZX releases recently, this particular feature was added in 2.91).

edit: actually attached it this time, whoops.
Attached File  keyz_lol_vlayer.mzx (6.28K)
Number of downloads: 1

This post has been edited by Lachesis: 04 August 2019 - 06:24 PM

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
1

#5 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 349
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 04 August 2019 - 11:15 PM

Thanks Lachesis, It really works!!!
SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

I am at:

Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)

Other interests:

Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users