|
Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2016-1-15. : 9:28 pm] jjf28 -- but arrays wouldn't be terrible, just hide the ugliness of removing or adding behind 2 functions[2016-1-15. : 9:28 pm] jjf28 -- mm a vector is probably inappropriate if you're going to leave slots empty; std::map would be cleanest since you can traverse it "for ( item& : myMap ) item.doStuff"[2016-1-15. : 9:18 pm] Moose -- CorboCorbo shouted: Mini Moose 2707 isn't that what we all do? information is never lost anyway ;o If you want to be technical, yes. Since we're talking about RAM here, it gets pretty impractical, particularily if power is lost (and the RAM isn't frozen) or memory is overwritten, etc.[2016-1-15. : 9:13 pm] Corbo -- Mini Moose 2707Mini Moose 2707 shouted: You could set it to some "hey this is deleted" value instead of actually deleting isn't that what we all do? information is never lost anyway ;o[2016-1-15. : 9:01 pm] Moose -- You could set it to some "hey this is deleted" value instead of actually deleting[2016-1-15. : 9:01 pm] O)FaRTy1billion[MM] -- I could like go through the rest of the list I guess and try to fix them ...[2016-1-15. : 8:59 pm] Moose -- I thought std::vector would resize as you passed capacity without breaking indices[2016-1-15. : 8:58 pm] O)FaRTy1billion[MM] -- unitNode unitNodes[1700]; spriteNode spriteNodes[2500]; imageNode imageNodes[5000];[2016-1-15. : 8:57 pm] O)FaRTy1billion[MM] -- I don't think SC uses a vector, should I just use a static array?[2016-1-15. : 8:57 pm] O)FaRTy1billion[MM] -- I'm trying to think of how to add/delete things without breaking the indexes :\[2016-1-15. : 8:56 pm] Moose -- "The standard doesn't specify what the initial capacity of a container should be, so you're relying on the implementation. A common implementation will start the capacity at zero, but there's no guarantee."[2016-1-15. : 8:39 pm] O)FaRTy1billion[MM] -- I can just do it in the basic places, and not worry about the rest ![]() [2016-1-15. : 8:33 pm] O)FaRTy1billion[MM] -- what about deleting units to get rid of it? Is there like removeunit?[2016-1-15. : 8:30 pm] O)FaRTy1billion[MM] -- I was thinking I could just abuse classinstance to point to it, I don't know what else it is for. xD[2016-1-15. : 8:29 pm] jjf28 -- from there you can do something like "if ( Scenario::AddUnit(params) ) { graphics.addSprite(); return true; } return false;"[2016-1-15. : 8:26 pm] O)FaRTy1billion[MM] -- How does it add units? I need to make unit data that's not in the unit struct.[2016-1-15. : 7:51 pm] Moose -- lil-Infernolil-Inferno shouted: le new meme XD lil-Infernolil-Inferno shouted: Mini Moose 2707 Le new meme: lmaowsmhimo C|X^ D Le new meme: LNW X^DDDDDDDD[2016-1-15. : 7:50 pm] lil-Inferno -- Mini Moose 2707Mini Moose 2707 shouted: lil-Inferno lil-Inferno Laughing my ass off while shaking my head, in my opinion. Le new meme: lmaowsmhimo C|X^ D[2016-1-15. : 7:49 pm] lil-Inferno -- lil-Infernolil-Inferno shouted: le new meme XD IMD IMO is still best meme smh lmao[2016-1-15. : 7:49 pm] Moose -- lil-Infernolil-Inferno shouted: Mini Moose 2707 In my defense -> IMD lil-Infernolil-Inferno shouted: le new meme XD Laughing my ass off while shaking my head, in my opinion.[2016-1-15. : 7:48 pm] O)FaRTy1billion[MM] -- jjf28jjf28 shouted: hmm, can prolly just copy SCs, i'll catch it during refactoring if it ends up messy K>[2016-1-15. : 7:41 pm] lil-Inferno -- Mini Moose 2707Mini Moose 2707 shouted: Mini Moose 2707 In my defense, he asked for it. In my defense -> IMD[2016-1-15. : 7:37 pm] Moose -- Mini Moose 2707Mini Moose 2707 shouted: NudeRaider ayyyyy lmao In my defense, he asked for it.[2016-1-15. : 7:36 pm] Moose -- NudeRaiderNudeRaider shouted: Mini Moose 2707 Not that I dislike Linux, but if I start to share my non-operations of things I tried with FreeBSD, CentOS and Debian, MS Windows would pale in comparision. ayyyyy lmao![]() [2016-1-15. : 7:11 pm] jjf28 -- hmm, can prolly just copy SCs, i'll catch it during refactoring if it ends up messy[2016-1-15. : 6:52 pm] O)FaRTy1billion[MM] -- I could just make it a vector, and have like next/previous index in the data, with [0] being the primary, or something.[2016-1-15. : 6:49 pm] O)FaRTy1billion[MM] -- I copied SC's setup in my code when I did it before, but I don't know if that's kosher.[2016-1-15. : 6:47 pm] O)FaRTy1billion[MM] -- ... or I could copy how SC does it where there is one big master array that is just the memory, and then adding/removing elements just creates separate lists within that array. xD[2016-1-15. : 6:46 pm] O)FaRTy1billion[MM] -- Instead of pointers to the list elements, should I just use indexes? It's not as direct, but the lists shouldn't ever be too huge.[2016-1-15. : 6:45 pm] O)FaRTy1billion[MM] -- jjf28jjf28 shouted: prolly, I do recommend vectors tho lists are better, images need to be inserted (imgol, imgul)[2016-1-15. : 6:44 pm] O)FaRTy1billion[MM] -- "Iterator validity No changes." Maybe htat's not necessary? I don't know how these work when not just making my own lists ;o[2016-1-15. : 6:43 pm] O)FaRTy1billion[MM] -- I'm trying to think of how to store images and stuff. I'm looking at std::list, but I don't know how to specify the primary image.. unless I just get a pointer to it and re-get the pointer any time I add/remove images ... |