bitwise shift + REP
#2

Well, I have no idea why you need to hold relationships in that way.
You can't have >16 gangs at a time, the second enum (with shifts) is not necessary since you can use first with << 2 and, in general, it's a bad implementation of gang relation system.
I've read your code twice and can suggest next:
1. Make some stock function like "GetGangRelToGang(gangOne, gangTwo)" which you can perfectly debug and use in other places without bitwise operations and thinking how your system was made
2. Or rewrite this system. I have no idea why you should hold data in that way - if you make it with 2-dimentional array you should loose a few bytes of memory but save processor time (consumed on bitwise operations) and have more clear code.
Reply


Messages In This Thread
bitwise shift + REP - by kennydalglish - 07.08.2015, 16:45
Re: bitwise shift + REP - by prineside - 07.08.2015, 17:11
Re: bitwise shift + REP - by kennydalglish - 07.08.2015, 19:03
Re: bitwise shift + REP - by kennydalglish - 08.08.2015, 18:46
Re: bitwise shift + REP - by kennydalglish - 11.08.2015, 15:21
Re: bitwise shift + REP - by kennydalglish - 12.08.2015, 23:10
Re: bitwise shift + REP - by kennydalglish - 13.08.2015, 21:16
AW: bitwise shift + REP - by Nero_3D - 13.08.2015, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)