Page 2 of 2
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 5th, 2009, 9:16 pm
by DarnYak
If its a time critical loop, yes (and in real programming languages, the compiler will automatically convert it for you anyway - I dont know if vjass tries to do it or not). In this case, the clarity is more important then the extra calculation that nobody will ever notice.
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 5th, 2009, 10:24 pm
by Cokemonkey11
Interesting I didn't know real compilers did that.
I have a friend making what he calls j++, which will be a new precompiler, I'll have to suggest that to him.
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 5th, 2009, 10:46 pm
by DarnYak
Yea, good compilers can do some pretty amazing optimizations. If there's anything they're sure they can precalculate, they'll usually do it for you if its not too obscure. I believe even stuff like for loops (ie for(int i=0;i<4;n+=i++); will just get converted to n=6, assuming n starts at 0). They also change operators, such as x*=2 gets converted to x<<1 because its faster.
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 5th, 2009, 11:08 pm
by GeneralFunk
I've taken more kindly to preprocessor directives (#define most specifically). While Jasshelper supports constants, it's a complete shame it doesn't support at least #define.
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 6th, 2009, 12:00 am
by DarnYak
While #define is awesome, consts are usually better because they should automatically get replaced at compile time by their actual value, but if its not possible it still has other options. They also have a bit more error checking. While defines are great, don't look down on const.
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 6th, 2009, 12:06 am
by DarnYak
Update: Eliminated the rest except streak blurs (been interrupted a lot tonight, and i need to re-figure out what the hell i did to make streak work). Shouldn't takelong to fix. After that is general tweaks and bug fixes that won't take a significant amount of time, so c5 testing tomorrow looks pretty certain barring more interruptions.
If c5 will run at all is another issue entirely.
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 6th, 2009, 12:50 am
by Dekar
Wohoo!
I was refering to this:
Cokemonkey11 wrote:Unfortunately without using a struct stack this is going to look ugly unless you use GC
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 6th, 2009, 12:51 pm
by Cokemonkey11
He's using GC though... lol
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 9:39 am
by DarnYak
I've become completley confused what the hell the end of this thread is about.
EotA loads now. On to fixing up stuff in the bitch thread.
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 7:33 pm
by DarnYak
I FUCKING HATE YOU BLIZZARD WHY WOULD YOU DO THIS THERES NO FUCKING LGICAL REASON EXCEPT TO FUCK OVER PEOPLE LIKE ME
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 7:44 pm
by jamn455
LOL
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 8:05 pm
by Cokemonkey11

I guess there's a first for everyone.
What's the problem now?
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 8:06 pm
by GeneralFunk
Though weak competition, EotA is still competition to DotA! And DotA = $$$ for Blizzard.
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 9:12 pm
by DarnYak
So here's the fucking retarded problem i've been working on all day.
Blizzard added hashtables to use with handles instead of the gamecache. While they did it in a shitty way that made me rewrite a ton of code, that wasn't a problem. Except shit didn't work for no reason. Turns out, you can't override handles with a null. Why would they prohibit this? NO GOOD REASON. How much does this fuck things up? I dont know yet. Fixing it isn't really problem, assuming you went into it with that knowledge, bu tit makes coding it more annoying. Going back and figuring out where i need to fix shit..
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 9:22 pm
by Dark_Nemesis
So is this good or bad in terms of future versions?
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 9:27 pm
by Cokemonkey11
DarnYak wrote:So here's the fucking retarded problem i've been working on all day.
Blizzard added hashtables to use with handles instead of the gamecache. While they did it in a shitty way that made me rewrite a ton of code, that wasn't a problem. Except shit didn't work for no reason. Turns out, you can't override handles with a null. Why would they prohibit this? NO GOOD REASON. How much does this fuck things up? I dont know yet. Fixing it isn't really problem, assuming you went into it with that knowledge, bu tit makes coding it more annoying. Going back and figuring out where i need to fix shit..
DarnYak
Hashtables don't need to be cleaned of those indices then, just removed the parts where you set them null?
Also, it will pay off in the end. Hashtables are way faster than GC.
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 9:31 pm
by DarnYak
Well, searching the code it turns out there's only one spot (streak) where its a direct problem. All others go through the wrapper, so I just hade to change it from
to
Code: Select all
if (v!=null) then
SaveXXXHandle(HT,x,y,v)
else
DeleteHandle(HT,x,y)
endif
Its really not cool and unnecessary, it should be built into the SaveXXXHandle functionality when the default response of Load is to return null
c5 test in about 30m
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 10:05 pm
by Cokemonkey11
Re: H2I went bye bye... Warcraft III Patch in place.
Posted: August 7th, 2009, 10:16 pm
by DarnYak
I found 2 smaller bugs, last save in progress
DarnYak