User Tag List

Results 1 to 4 of 4

Thread: Diagonal Screen Scrolling Crashes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,030
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.75%
    I don't think that's the problem.

    The data[] array has size 176; the upper four bits come from cy and the lower four from cx. (160 & 0xF0) is the same as (168 & 0xF0) so changing the bound from 160 to 168 won't make any difference.

    The best way to find the bug, if you are able to reproduce it, is to run ZC in a debugger and get a stack trace at the moment the out-of-bounds access occurs. I don't think the bug could be in either of the lookahead functions: it's easy to check that the maximum possible value of "combo" is

    (160 & 0xF0) + (240 >> 4) = 175 < 176

    as required, and clearly combo >= 0.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,765
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.72%
    Quote Originally Posted by DarkDragon View Post
    I don't think that's the problem.

    The data[] array has size 176; the upper four bits come from cy and the lower four from cx. (160 & 0xF0) is the same as (168 & 0xF0) so changing the bound from 160 to 168 won't make any difference.

    The best way to find the bug, if you are able to reproduce it, is to run ZC in a debugger and get a stack trace at the moment the out-of-bounds access occurs. I don't think the bug could be in either of the lookahead functions: it's easy to check that the maximum possible value of "combo" is

    (160 & 0xF0) + (240 >> 4) = 175 < 176

    as required, and clearly combo >= 0.


    It did in fact, actually fix it, and 168 is the maximum y value in a number of other functions throughout link.cpp. Compare to WalfFlagInfo(), blits of the playing field, and the pixel shift for red_shift(). Why did you try to bound it to 160?

    I still do not know what bugs you originally intended to fix with the clamp change:

    Fixed crashes when moving too fast.

    What crashes? How do I reproduce them?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social