Re: Custom Set Editor - Sneak preview
ok, thanx for the heads up on it! 
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=25&t=2053
Mathy, you have a great designer's eye. It shows on all the graphics you work on.mathusalem wrote:Ok what do you think of that ?
I like it, but I'm concerned about the load time. The app already takes 30 seconds to loads; I'm not sure how much longer adding the images would take.mathusalem wrote::oops:t'ankiou !
I hope Jatill will like it as well
I don't know a ton about C, but doesn't a define lock in the value? player is dynamic, so would opp change every time player changes?DrJones wrote:I took a look at the code and I think you problems might arise with this editor and cards like Punishing Fire where the code expects the card to have a certain card ID. Usually hard coded numbers always cause problems, and the alternative of generating a cards.h file full of lines such as:
"#define CARD_PUNISHING_FIRE 1645"
to avoid magic numbers isn't great either, as it would require compiling afterwards. Now that I talk about code, how about adding a "#define Opp (1-player)" line at the start of the code? It would make the card functions more readable. I used Opp because it's shorter than Opponent.
it shouldn't take long actually.jatill wrote:I like it, but I'm concerned about the load time. The app already takes 30 seconds to loads; I'm not sure how much longer adding the images would take.mathusalem wrote::oops:t'ankiou !
I hope Jatill will like it as well
Define is used by the C preprocessor to change all instances of A for B before compiling. It's like using the replace text function in a text editor. So in this case it replaces "Opp" by the string "(1-player)", instead of the value player had at that point. Define itself has to be used with care because bad use generates bugs hard to spot, but in this case is totally safe. Using a function to get the ids works as long as the function is in an extern dll that is compiled by your editor, or reads the list from a file at the start of the game.jatill wrote:I don't know a ton about C, but doesn't a define lock in the value? player is dynamic, so would opp change every time player changes?
I'm aware of the hard-coded id issue, and I have plans to solve it. I wrote a function called get_id_by_name, so we can refer to cards by name instead, so it doesn't matter when the ids change.
Thanks for the tip on define. Good to know; I'm sure we'll take your suggestion.DrJones wrote:Using a function to get the ids works as long as the function is in an extern dll that is compiled by your editor, or reads the list from a file at the start of the game.
Oops, that was a bug. Here's the new exe with sweet new graphics.Gargaroz wrote: all the cards are disappeared from the columns. What can I do now ?