Jump to content

Photo

ZC 2.50 RC3


  • Please log in to reply
590 replies to this topic

#31 blue_knight

blue_knight

    Adept

  • Members

Posted 27 February 2012 - 03:44 AM

QUOTE(Gleeok @ Feb 27 2012, 12:04 AM) View Post

Does the RotatePointXY() do what you want?
No because it doesn't tell me how you (i.e. Zelda Classic) compute the pivot point when calling DrawBitmap() with a destination rectangle. I know how to rotate a point around a pivot given an angle already, what I need to know is what is that center point when calling DrawBitmap()? I originally thought it was in the center of the destination rectangle (i.e. centerX = dstX + dstWidth*0.5; centerY = dstY + dstHeight*0.5;), but that didn't work with thin rectangles. It actually looks like it is something like centerX = dstX + dstWidth*0.5; centerY = dstY + dstWidth*0.5 or something like that. I could try a few more examples and figure it out but I was hoping for a definitive answer. Sorry if I'm not being clear. icon_frown.gif

Edited by blue_knight, 27 February 2012 - 03:45 AM.


#32 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 27 February 2012 - 04:27 AM

QUOTE(Saffith @ Feb 27 2012, 04:58 AM) View Post

Hm. The launcher should create ag.cfg, even if the game doesn't run. Do you have write permission in that directory? You may need to set the programs to run as administrator.



I just unzipped the downloaded RC3 again and tryed it and it runs and creates ag.cfg and allegro.log
so i really dont know what it was before but it works fine now icon_smile.gif

Edited by judasrising, 27 February 2012 - 10:44 AM.


#33 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Location:Australia

Posted 27 February 2012 - 06:32 AM

I would like to report what appears to be a bug that has possibly been around for quite a long time (this is in RC2) - Setting an enemy's Damage and WeaponDamage variables in a script doesn't do anything. I was trying to use it for my LttP Mail script, as I recall that Saffith did this for his Iflyte script back in the Ghost.zh demo and it worked.

Script


I ran Traces through the code to confirm that all of the conditionals are working, but it just won't modify the amount of damage that the enemy causes. After that and what I said above, I assume that's a bug.



#34 Saffith

Saffith

    IPv7 user

  • Members

Posted 27 February 2012 - 10:16 AM

Your code doesn't actually do anything.
CODE
                    if(LttP_Tunic_Defense*4 >= nme->Damage/LttP_Tunic_DMG_Reduction_Factor){ //Reduce the enemy's physical attack.
                        nme->Damage/LttP_Tunic_DMG_Reduction_Factor;
                    }
                    else{
                        nme->Damage - LttP_Tunic_Defense*4;
                    }

Those should be /= and -=

#35 aaa2

aaa2

    Wizard

  • Banned

Posted 27 February 2012 - 10:26 AM

Ok i made a testquest showing the problem i have with draw screen. First of all this is the script i use:

CODE

bool new_screen_is_to_the_left(int new_screen, int old_screen){//check which direction Link walked in
    if(new_screen-old_screen==-1) return true;
    else return false;
}
bool new_screen_is_to_the_right(int new_screen, int old_screen){
    if(new_screen-old_screen==1) return true;
    else return false;
}
bool new_screen_is_up(int new_screen, int old_screen){
    if(new_screen-old_screen==-16) return true;
    else return false;
}
bool new_screen_is_down(int new_screen, int old_screen){
    if(new_screen-old_screen==16) return true;
    else return false;
}

void Smoothscrolling(int old_screen, int new_screen, int old_map, int new_map){ //the scrolling function

itself
    if(old_map==new_map){
        if(new_screen_is_to_the_left(new_screen,old_screen)){
            for(int i=0;i<60;i++){
                NoAction();
                Screen->Rectangle(0, 0, 0, 512, 512, 0, 1.0, 0, 0, 0, true, 128);
                Screen->DrawScreen(0, Game->GetCurMap()-1, Game->GetCurScreen(), -256+4*i, 55,

0); //this should draw both screen 0 and 1
                Screen->DrawScreen(0, Game->GetCurMap()-1, Game->GetCurScreen()+1, 4*i, 55,

0);
                Waitframe();
            }
        }
    }
}


global script onstart { //the main scrolling script
   void run() {
    int old_screen=-10;
    int new_screen=1;
    int old_map=-2;
    int new_map=-1;
    while(true) {
        new_screen=Game->GetCurScreen();
        new_map=Game->GetCurMap();
        if(old_screen!=new_screen){
            Smoothscrolling(old_screen, new_screen, old_map,new_map);
        old_screen=new_screen;
        old_map=new_map;
        }
          Waitframe();
    }
   }
  
}

The testquest i made with this can be found here:
http://www.mediafire...gj429gyugpwpva7

My problem is DrawScreen only draws Layer0 all other layers seem to get cut.(yes there is a bug in the demo because i draw on layer 0 and so you see some residue from upper layers while scrolling but thats not the problem) Why doesnt DrawScreen draw all other layers like it is supposed to?

#36 Xenix

Xenix

    Well excuse me princess.

  • Members
  • Real Name:Chris
  • Location:Newport News, VA

Posted 27 February 2012 - 12:48 PM

Ok, so I was trying to get Game->PlayEnhancedMusic() to work, but I don't think I am understanding the (int [] filename, int track) part in zscript.txt. How do I set those values?

#37 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 27 February 2012 - 12:59 PM

int [] filename, I'm assuming, is referring to a string with the path and filename of the file. Track is the track number to be played.

CODE

int filename[] = "thefile";
Game->PlayEnhancedMusic(filename, 0);


#38 Saffith

Saffith

    IPv7 user

  • Members

Posted 27 February 2012 - 01:30 PM

That's correct. And remember that filenames are case-sensitive on Linux, so be sure to match it exactly.

#39 Xenix

Xenix

    Well excuse me princess.

  • Members
  • Real Name:Chris
  • Location:Newport News, VA

Posted 27 February 2012 - 03:04 PM

Sweetness! I was able to finally fix up the boss/miniboss battle room music script to be able to play enhanced music. It works like a dream! Thank you both!

#40 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 27 February 2012 - 06:06 PM

Is there any way to turn off the blue outlines that show the warp return points? It's seriously bugging me, more than it should.

#41 Saffith

Saffith

    IPv7 user

  • Members

Posted 27 February 2012 - 06:21 PM

View->Show Squares

#42 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 27 February 2012 - 08:03 PM

QUOTE(Jared @ Feb 26 2012, 06:40 PM) View Post

Found a first little bug.

IPB Image

Notice how in RC3, the "DoR.qst" doesn't go all the way down. In RC2, it does. Not just because of the scroll bar.
Thought I should point it out. icon_smile.gif


Was this missed? No one commented on it.

#43 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 27 February 2012 - 08:18 PM

QUOTE(Jared @ Feb 27 2012, 08:03 PM) View Post

Was this missed? No one commented on it.

I don't quite understand what the bug is...sounds pretty minor. Might even have been an intended change...

#44 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 27 February 2012 - 08:19 PM

Try this: drop this version into your rc3 directory (Note**You cannot use the ZCLauncher to start zc unless you rename it) and set win_proc_fix = 1 in the config file before you run it.

Download: http://www.mediafire...gq5xx/rc3.1.zip


Side Note: The only changes from this build are extra debugging info, fixed scanlines, and a modified DrawLayer() . This is not a replacement for rc3 so use the download link in the first post if you haven't downloaded it yet. This will not run without it.


[edit] ...Sorry, I accidentally deleted my last post so here it is again. lol.

#45 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 27 February 2012 - 08:39 PM

QUOTE(Jared @ Feb 27 2012, 07:03 PM) View Post

Was this missed? No one commented on it.

I'm pretty certain Saffith replied to you.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users