Log In  

If you keep increasing the Y value of the cursor, things get weeeeiiird. First, the CPU usage goes out the roof. Second, there's a weird area in the corner that obscures the text. Here's a bit of code that will reproduce the problem:

function _init()
    y=110
    f=0
end

function _draw()
    cls(1)

    f+=1
    if (f%20==0) y+=1
    cursor(0,y)
    print("hai")

    print("cursor_x:"..peek(0x5f26).."\ncursor_y:"..peek(0x5f27).."\ny:"..y.."\ncpu:"..stat(1),0,0,7)
end

And this is what happens:

P#90006 2021-04-05 10:00

The area that obscures the text isn't just in the corner. It's just obscuring the text itself, no matter the X coordinate. Like so:

P#90007 2021-04-05 10:05

Is it the scrolling thing, maybe? If printed text would go off the bottom of the screen, by default it copies the contents of the screen upwards the height of a line to make room, and that uses a lot of CPU.

I have no explanation for the letters disappearing - maybe zep didn't expect people to use the cursor() command this way?

P#90056 2021-04-06 03:34

Yeah, the scrolling of the screen memory is expected. That's just what happens when you print text without explicit coords and the cursor y position is just too low to show the text on-screen. But the CPU going through the roof and the weird text obscuring is definitely not expected. :D

P#90057 2021-04-06 03:42

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-19 08:09:36 | 0.006s | Q:13