User Tag List

Results 1 to 3 of 3

Thread: How to set the warp return point?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    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.7%
    Quote Originally Posted by Saffith View Post
    warpreturnc is return index 0-3 for all 8 warps. Each one gets two bits.
    0-1: Tile warp A
    2-3: Tile warp B
    ...
    14-15: Side warp D

    There's no reason to deal with that. You would just need
    Code:
     x = tmpscr->warpreturnx[warpretsq]; 
     y = tmpscr->warpreturny[warpretsq];
    Aye, that certainly worked, and did the job.


    Why not make the return an optional third argument to Link->Warp() instead of a separate function?

    My reasons...

    Gleeok expressly told me that it would be better to add new functions, than to modify or overload existing ones.

    Replacing Link->Warp(int, int) with Link->Warp(int, int, int, ...) would break existing scripts, and probably quests.

    Overloading a ZASM instruction and making redirects is a bloody pain...

    What I did, is add in Link->WarpReturnSquare, int Link->WarpEffect, int Link->WarpSound, bool Link->PlayWarpSound

    int WarpEffect allows setting an effect for a Link->Warp, or Link->PitWarp. This is andled with a switch-case, so only valid types do things differently.
    int WarpSound, if set to > 0 allows playing a sound when warping. I expressly forbid this during sidewarps, and I probably need to vbound it.
    bool PlayWarpSound is a flag that the user may toggle to allow a warp sound during a sidewarp. I need to rename it to SideWarpSound.

    While I was at it, I plugged in Screen->ZapIn(), Screen->ZapOut, Screen->WavyIn(), Screen->WavyOut, and Screen->OpeningWipe
    These allow replicating the in-build warp animations on demand, without warping. Could be useful. I know that I wanted to do that in the past for an effect, as did one of the other scripters.

    Meanwhile, @Dimentio added SCC warp codes for Link, that also use these variables, so it isn't only for one thing.

    Thankfully, all of these new ZScript things work, and I've been doing bug testing. Thus far, the only bugs that I was unable to kill, are caused by the SCC warp. I also patched in an SCC for setting Screen->D, while I was working with Dimentio. This felt natural, given that there is one to read it.

    Anyway...thank you @Saffith for clarifying this.

    P.S. Don't fret.I used intermediate handlers for allof this, rather than directly tying anything to a class variable.

    Edit:

    If you want to look at, or try out anything:
    Sources | Windows Binaries

    LinkClass::dowarp() is such a mess that I may just rewrite some parts of it to segregate normal, pit, and other warping.

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