[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > Resources > Graveyard


Graveyard Resources which were not approved are moved to this section.

 
 
Thread Tools
Old 04-06-2012, 03:44 PM   #16 (permalink)
Registered User LeP
lol, *****
 
Join Date: Feb 2008
Posts: 170
LeP is on a distinguished road (71)LeP is on a distinguished road (71)
Quote:
Originally Posted by Magtheridon96 View Post
Just for the record, my map went down by 600KB when I stopped extending structs.
That pretty much falls under premature optimization.
If, and only if, these 600kB stop your map from working it's perfectly fine to optimize it.
__________________
___________________________________________________
/!\ Don't call it Schnitzel /!\

Please excuse my english. I know that it's not that good, but i'm doing my best.
LeP is offline  
Old 04-06-2012, 03:52 PM   #17 (permalink)
Registered User Magtheridon96
~ Join The Daily Peon ~
 
Magtheridon96's Avatar
 
Join Date: Dec 2008
Posts: 6,299
Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)
Former Staff Member: This user used to be on the Hive Workshop staff. Merit Badge - Level 1: Great Assistant: Offers the best solution to other users, when all hope fades. Under the shell of assistance, lies a powerful knowledge in the fields. 
Well, honestly, you made some pretty good points here.
But come on, who would need to extend a Dialog struct? :/

I know you're being imaginative and thinking of all these scenarios in which you can actually do something pretty cool with it, but.. well, I don't know what to say.

Maybe he can include a textmacro and use delegates so you can have the results obtained from extending without actually extending ^.^
__________________
Are you good at 2D animation? You wanna make $ good money $?
PM me.
Magtheridon96 is offline  
Old 04-06-2012, 04:12 PM   #18 (permalink)
Registered User LeP
lol, *****
 
Join Date: Feb 2008
Posts: 170
LeP is on a distinguished road (71)LeP is on a distinguished road (71)
Quote:
Originally Posted by Magtheridon96 View Post
Well, honestly, you made some pretty good points here.
But come on, who would need to extend a Dialog struct? :/

I know you're being imaginative and thinking of all these scenarios in which you can actually do something pretty cool with it, but.. well, I don't know what to say.

Maybe he can include a textmacro and use delegates so you can have the results obtained from extending without actually extending ^.^
I already gave examples why you would extend this in particular.
But it's not only about a Dialog but about easy extendability in general.
Why restrict it without any good reason? And if you do, do it via extends array, so that i atleast get a compile-time error.

Textmacro + delegate is no real option.
Textmacros are for repetitive structures of code.
Delegates are cool, but too restricted in vJass. They are good for reusing but since they don't fulfill interface requirements you can't really use them in your polymorph code without giving up some of the good things you get from delegates. Modules work better in that regard under vJass (that is, reusing code which fulfills interface rules).

But both have there uses. They aren't exclusive.
__________________
___________________________________________________
/!\ Don't call it Schnitzel /!\

Please excuse my english. I know that it's not that good, but i'm doing my best.

Last edited by LeP; 04-06-2012 at 04:22 PM. Reason: e: rephrasing
LeP is offline  
Old 04-06-2012, 06:13 PM   #19 (permalink)
Registered User The_Witcher
#1 in Top 20 Spells!
 
The_Witcher's Avatar
 
Join Date: Dec 2008
Posts: 273
The_Witcher is just really nice (305)The_Witcher is just really nice (305)
Come on guys :D
I will go back to the onDestroy method to keep the structure simple!
There won't be spammings of dialog destroys i think,
So this should be a solution everybody can live with^^

@Bribe: what does jass precendence mean? Sorry i am from germany^^
and i didn't change any configuration for jasshelper... I simply updated to cohadars mod...
__________________
Need a well coded Spell or System?? PM me! My Resources
The_Witcher is offline  
Old 04-06-2012, 06:57 PM   #20 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,769
Bribe has a brilliant future (1283)Bribe has a brilliant future (1283)Bribe has a brilliant future (1283)Bribe has a brilliant future (1283)
PayPal Donor: This user has donated to The Hive. 
Precedence is when you can call function "foo" from above function "bar", but "bar" can't call "foo" because "bar" is below "foo".

Jass:
function foo...

function bar...
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline  
Old 04-06-2012, 10:46 PM   #21 (permalink)
Registered User overcold_ice
Overfrozen by vJASS
 
overcold_ice's Avatar
 
Join Date: Apr 2011
Posts: 356
overcold_ice is on a distinguished road (72)overcold_ice is on a distinguished road (72)
onDestroy is a really bad thing to have in a struct @.@
overcold_ice is offline  
Old 04-06-2012, 11:04 PM   #22 (permalink)
Registered User Adiktuz
Engr. Shana, ChE
 
Adiktuz's Avatar
 
Join Date: Oct 2008
Posts: 10,035
Adiktuz has a brilliant future (1351)Adiktuz has a brilliant future (1351)Adiktuz has a brilliant future (1351)
I was wondering why struct methods doesn't seem to follow precedence... I mean they still work no matter if the method was below or above and JH doesn't return an error...
Adiktuz is offline  
Old 04-07-2012, 12:39 AM   #23 (permalink)
Forum Moderator PurgeandFire
ʕ•͡ᴥ•ʔ
 
PurgeandFire's Avatar
Resource & Tutorial Moderator
 
Join Date: Nov 2006
Posts: 5,716
PurgeandFire has a reputation beyond repute (2094)PurgeandFire has a reputation beyond repute (2094)PurgeandFire has a reputation beyond repute (2094)PurgeandFire has a reputation beyond repute (2094)PurgeandFire has a reputation beyond repute (2094)PurgeandFire has a reputation beyond repute (2094)
Quote:
Originally Posted by Adiktuz View Post
I was wondering why struct methods doesn't seem to follow precedence... I mean they still work no matter if the method was below or above and JH doesn't return an error...
If it is below JH will usually either create an entire copy of the function(s) or it will create a trigger and evaluate it. (along with a few functions and variables) So precedence is still important if you care about the text compiled.
PurgeandFire is offline  
Old 04-07-2012, 12:46 AM   #24 (permalink)
Registered User Magtheridon96
~ Join The Daily Peon ~
 
Magtheridon96's Avatar
 
Join Date: Dec 2008
Posts: 6,299
Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)
Former Staff Member: This user used to be on the Hive Workshop staff. Merit Badge - Level 1: Great Assistant: Offers the best solution to other users, when all hope fades. Under the shell of assistance, lies a powerful knowledge in the fields. 
And the reason all of this matters:
It's not about the effects that one trigger evaluation will create, it's about the effects of all the trigger evaluations caused by the multitudes of systems in your maps.
__________________
Are you good at 2D animation? You wanna make $ good money $?
PM me.
Magtheridon96 is offline  
Old 04-07-2012, 06:41 AM   #26 (permalink)
Registered User The_Witcher
#1 in Top 20 Spells!
 
The_Witcher's Avatar
 
Join Date: Dec 2008
Posts: 273
The_Witcher is just really nice (305)The_Witcher is just really nice (305)
To get rid of onDestroy things I updated the Dialog struct.
It extends array now and uses a simple recycler!
__________________
Need a well coded Spell or System?? PM me! My Resources
The_Witcher is offline  
Old 11-21-2012, 06:54 PM   #27 (permalink)
Registered User Magtheridon96
~ Join The Daily Peon ~
 
Magtheridon96's Avatar
 
Join Date: Dec 2008
Posts: 6,299
Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)Magtheridon96 has a reputation beyond repute (2203)
Former Staff Member: This user used to be on the Hive Workshop staff. Merit Badge - Level 1: Great Assistant: Offers the best solution to other users, when all hope fades. Under the shell of assistance, lies a powerful knowledge in the fields. 
- The DialogButton should use a module initializer because in it's current state, the system will break if a DialogButton is managed by an external system using a module initializer :/

- The destroy method of the dialog struct should clean the DialogButtons properly. (Add a destroy method to your DialogButton struct)
__________________
Are you good at 2D animation? You wanna make $ good money $?
PM me.
Magtheridon96 is offline  
Old 11-21-2012, 07:57 PM   #28 (permalink)
Registered User The_Witcher
#1 in Top 20 Spells!
 
The_Witcher's Avatar
 
Join Date: Dec 2008
Posts: 273
The_Witcher is just really nice (305)The_Witcher is just really nice (305)
Quote:
Originally Posted by Magtheridon96 View Post
- The DialogButton should use a module initializer because in it's current state, the system will break if a DialogButton is managed by an external system using a module initializer :/

- The destroy method of the dialog struct should clean the DialogButtons properly. (Add a destroy method to your DialogButton struct)
Updated. But the destroy method DOES clean the dialog buttons properly!
__________________
Need a well coded Spell or System?? PM me! My Resources
The_Witcher is offline  
Old 11-21-2012, 11:01 PM   #29 (permalink)
Registered User Nestharus
Left
 
Join Date: Jul 2007
Posts: 5,860
Nestharus has disabled reputation
Yes, now it does, lol...

another thing, you forgot to call deallocate inside of your destroy method.
Nestharus is offline  
Old 03-16-2014, 02:55 AM   #30 (permalink)
Forum Moderator TriggerHappy
 
 
TriggerHappy's Avatar
JASS Moderator
 
Join Date: Jun 2007
Posts: 2,417
TriggerHappy has much of which to be proud (1101)TriggerHappy has much of which to be proud (1101)TriggerHappy has much of which to be proud (1101)TriggerHappy has much of which to be proud (1101)TriggerHappy has much of which to be proud (1101)
PayPal Donor: This user has donated at least $20 to The Hive. Zephyr Challenge #6 - Winner: Dune Worm 
I'm graveyarding this in favor of [Snippet] Dialog Wrapper
TriggerHappy is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 08:09 AM.




Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle