HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TFormula <second try>

08-12-2009, 06:53 PM#1
Tot
After my first version was graveyarded (could only draw one shape at one time); I've tried to rework it, but....
now evreything is stored in a list (good), only thing is, that....
*bah* download the map and try to create more than one star....you will see

Expand Version 1.2:

I'm also happy about any criticism/help I get, cause I know the code is awfull

@Phlame:
any wishes for better compatibility to your 2d3s

thx




oh...I think I've to spread lots of rep+
Attached Files
File type: w3xTot4.w3x (68.9 KB)
08-13-2009, 09:18 AM#2
Flame_Phoenix
You are using a clever solution, coding your own list.
However, you struct TFormula has an arrays of projectiles, meaning you still can have more then 1 TFormula object without having problems.
When I mentioned Lists I was thinking about the following:
http://www.wc3c.net/showthread.php?t=106479
http://www.wc3c.net/showthread.php?t=103604
http://www.wc3c.net/showthread.php?t...highlight=List

You need to give this another try.

As for compatibility, 2D3S architecture is independent from any drawing system. I have the "core" and then all shapes are just lists of points, nothing else. If I want to draw something, I need to import a module.
So technically, 2d3s will not be dependant on xefx, neither anything else, and so far your system is.
08-13-2009, 09:23 AM#3
Tot
I've tried both LinkedList and Stack, but both made it lag, even if no unit is damaged --> not good

maybe I'll try grims ListModule, but first I've to fix the probleme with drawing more than one shape ... dunno why it makes stupid things
08-13-2009, 10:59 AM#4
Flame_Phoenix
Well, technically, you could separate all things - the maths, the draw, the spell.
In 2D3S, if I want to draw a Line, I import the core and Line lib. Line lib does not allow me to draw a line, it gives me the maths I need to do so. Further I would need to import xefxmodule.
Separating things like this is good, in many spells I will not need to make pictures of anything.

Perhaps you should follow a similar pattern.
08-13-2009, 02:53 PM#5
Anitarf
Quote:
Originally Posted by Tot
I've tried both LinkedList and Stack, but both made it lag, even if no unit is damaged --> not good

maybe I'll try grims ListModule, but first I've to fix the probleme with drawing more than one shape ... dunno why it makes stupid things
A list or a stack is precisely what would fix the problem with drawing more than one shape, since it would replace that fat-ass array you have in there currently that takes up all your struct space the moment you allocate one struct.
08-13-2009, 04:55 PM#6
Tot
Quote:
Originally Posted by Anitarf
A list or a stack is precisely what would fix the problem with drawing more than one shape, since it would replace that fat-ass array you have in there currently that takes up all your struct space the moment you allocate one struct.

ah... you're talking about the projectiles-array...

second ah... got an idea to improve my list-thingy...think i should make an own small lib for it....