H2I went bye bye... Warcraft III Patch in place.
Re: H2I went bye bye... Warcraft III Patch in place.
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
			
			
									
									
						DarnYak
- Cokemonkey11
 - Addict

 - Posts: 306
 - Joined: January 26th, 2008, 12:04 am
 - Realm: Lordaeron (U.S. West)
 - Battle.net name: Cokemonkey11
 
Re: H2I went bye bye... Warcraft III Patch in place.
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.
			
			
									
									I have a friend making what he calls j++, which will be a new precompiler, I'll have to suggest that to him.

I miss EotA
Re: H2I went bye bye... Warcraft III Patch in place.
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
			
			
									
									
						DarnYak
- GeneralFunk
 - 3/4s Weeaboo
 - Posts: 328
 - Joined: June 3rd, 2009, 11:56 pm
 - Realm: Azeroth (U.S. East)
 - Contact:
 
Re: H2I went bye bye... Warcraft III Patch in place.
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.
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
			
			
									
									
						DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
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
			
			
									
									
						If c5 will run at all is another issue entirely.
DarnYak
- Dekar
 - Jelly Doughnut
 - Posts: 1433
 - Joined: May 27th, 2006, 8:13 am
 - Realm: Northrend (Europe)
 - Battle.net name: Dekar
 - Location: Germany
 
Re: H2I went bye bye... Warcraft III Patch in place.
Wohoo!  
 
I was refering to this:
			
			
									
									I was refering to this:
Cokemonkey11 wrote:Unfortunately without using a struct stack this is going to look ugly unless you use GC
<EotA@Azeroth> YAKS GO MOOOOOOOOOOOOOOOOOOOOOOOO
Dekar: the ultimate ocean themed hero should buff and depend on spawn waves!
DarnYak: why is that
Dekar: WAVES
Dekar:
DarnYak: i was afraid that was the answer
						Dekar: the ultimate ocean themed hero should buff and depend on spawn waves!
DarnYak: why is that
Dekar: WAVES
Dekar:
DarnYak: i was afraid that was the answer
- Cokemonkey11
 - Addict

 - Posts: 306
 - Joined: January 26th, 2008, 12:04 am
 - Realm: Lordaeron (U.S. West)
 - Battle.net name: Cokemonkey11
 
Re: H2I went bye bye... Warcraft III Patch in place.
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
			
			
									
									
						EotA loads now. On to fixing up stuff in the bitch thread.
DarnYak
Re: H2I went bye bye... Warcraft III Patch in place.
I FUCKING HATE YOU BLIZZARD WHY WOULD YOU DO THIS THERES NO FUCKING LGICAL REASON EXCEPT TO FUCK OVER PEOPLE LIKE ME
			
			
									
									
						- 
				jamn455
 - Corpse

 - Posts: 1024
 - Joined: August 13th, 2006, 11:17 am
 - Realm: Azeroth (U.S. East)
 - Location: Trollville, FlAmerica
 
Re: H2I went bye bye... Warcraft III Patch in place.
LOL
			
			
									
									Line 'em up.
"Black people don't play Mega Man, they play with guns or some shit." - Ion
"If it takes two whole days for a giraffe, you know that giraffe is a tall one." - Wade Phillips
						"Black people don't play Mega Man, they play with guns or some shit." - Ion
"If it takes two whole days for a giraffe, you know that giraffe is a tall one." - Wade Phillips
- Cokemonkey11
 - Addict

 - Posts: 306
 - Joined: January 26th, 2008, 12:04 am
 - Realm: Lordaeron (U.S. West)
 - Battle.net name: Cokemonkey11
 
Re: H2I went bye bye... Warcraft III Patch in place.
What's the problem now?

I miss EotA
- GeneralFunk
 - 3/4s Weeaboo
 - Posts: 328
 - Joined: June 3rd, 2009, 11:56 pm
 - Realm: Azeroth (U.S. East)
 - Contact:
 
Re: H2I went bye bye... Warcraft III Patch in place.
Though weak competition, EotA is still competition to DotA! And DotA = $$$ for Blizzard.
			
			
									
									
Re: H2I went bye bye... Warcraft III Patch in place.
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
			
			
									
									
						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
- Dark_Nemesis
 - Addict

 - Posts: 480
 - Joined: July 13th, 2009, 11:36 am
 - Realm: Lordaeron (U.S. West)
 - Battle.net name: Dark_Nemesis
 - Location: Washington
 
Re: H2I went bye bye... Warcraft III Patch in place.
So is this good or bad in terms of future versions?
			
			
									
									
America!
- Cokemonkey11
 - Addict

 - Posts: 306
 - Joined: January 26th, 2008, 12:04 am
 - Realm: Lordaeron (U.S. West)
 - Battle.net name: Cokemonkey11
 
Re: H2I went bye bye... Warcraft III Patch in place.
Hashtables don't need to be cleaned of those indices then, just removed the parts where you set them null?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
Also, it will pay off in the end. Hashtables are way faster than GC.

I miss EotA
Re: H2I went bye bye... Warcraft III Patch in place.
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
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
			
			
									
									
						Code: Select all
SaveXXXHandle(HT,x,y,v)Code: Select all
if (v!=null) then
   SaveXXXHandle(HT,x,y,v)
else
   DeleteHandle(HT,x,y)
endif
c5 test in about 30m
DarnYak
- Cokemonkey11
 - Addict

 - Posts: 306
 - Joined: January 26th, 2008, 12:04 am
 - Realm: Lordaeron (U.S. West)
 - Battle.net name: Cokemonkey11
 
Re: H2I went bye bye... Warcraft III Patch in place.
I found 2 smaller bugs, last save in progress
DarnYak
			
			
									
									
						DarnYak
