Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > First-Person Shooters > Battlefield Series > Battlefield 2

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Battlefield 2
hacks cheats tutorials source code
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

std::list & map in BF2?
Old 12-27-2009, 09:31 PM   #1
A Legend

Revolty's Avatar

Join Date: Nov 2008
Location: Sweden
Posts: 271
Reputation: 12592
Rep Power: 170
Revolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server space
Smack-n-Bash Champion
Points: 9,681, Level: 11
Points: 9,681, Level: 11 Points: 9,681, Level: 11 Points: 9,681, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
std::list & map in BF2?

Is the list of players at PlayerManager + 0x0010 an std::list?
when I try to use it as one game crashes, there's allso a type of map at ClassManager + 0x0034 (string, void*) but it allso crashes the game.

the list & map has iterators that works just like the ones in std namespace but the actuall list & map instance are different (size wice).
so do they use there own list & map or what?
Revolty is offline

Reply With Quote


Old 12-27-2009, 09:41 PM   #2
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
you cannot use visual studio 2008 std::list afaik,

i got it to work with std::list in visual studio 2005,
but it cannot be compiled in debug as the size is different then...
__________________
learn_more is offline

Reply With Quote

Old 12-27-2009, 09:57 PM   #3
A Legend

Revolty's Avatar

Threadstarter
Join Date: Nov 2008
Location: Sweden
Posts: 271
Reputation: 12592
Rep Power: 170
Revolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server space
Smack-n-Bash Champion
Points: 9,681, Level: 11
Points: 9,681, Level: 11 Points: 9,681, Level: 11 Points: 9,681, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
aha thougt it was wierd that they'd use there own..
however i won't change compiler for that beeing the only reason.

there's 3 iterators in a node, do you know what the third points to, andalso, how to grab the tail/end.

ty.
Code:
template<class T, class Y>
class MAP
{
public :
	class ITERATOR
	{
	public :
		ITERATOR* iteratorPrevious;
		ITERATOR* iteratorNext;
		ITERATOR* iteratorUnknown; // whats this
	public :
		T fist;
		Y secound;
	public :
		ITERATOR& operator--(int) { return iteratorPrevious; }
		ITERATOR& operator++(int) { return iteratorNext; }		
	};
public :
	inline ITERATOR* getHead(void) { return iterator->iteratorPrevious; }
	inline ITERATOR* getTail(void) { return iterator; } // wrong
protected :
	ITERATOR* iterator;
public :
	unsigned int size;
};
Revolty is offline

Reply With Quote

Old 12-27-2009, 10:12 PM   #4
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
if my memory serves me right the lists are double-linked, so u got a forward and backward?
pseudocode:

node* pEnd = mgr->players;
node* walk = mgr->players;
do {
drawstuff();
walk = walk->next;
} while( walk != pEnd );
__________________
learn_more is offline

Reply With Quote

Old 12-27-2009, 10:19 PM   #5
A Legend

Revolty's Avatar

Threadstarter
Join Date: Nov 2008
Location: Sweden
Posts: 271
Reputation: 12592
Rep Power: 170
Revolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server space
Smack-n-Bash Champion
Points: 9,681, Level: 11
Points: 9,681, Level: 11 Points: 9,681, Level: 11 Points: 9,681, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
ah sorry I ment the map, the list works like you describes but the map has 3 iterators and don't seem to work like the list (backward /forward//data) the 3:d in map points to a node but were it points make no sence to me.
Revolty is offline

Reply With Quote

Old 12-27-2009, 10:21 PM   #6
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
don't know, you could compile a quick application in visual studio, using a map (in debug) and step into some std::map functions to see the code

(wild guess: it's some sorta hash)
__________________
learn_more is offline

Reply With Quote

Old 12-28-2009, 04:25 AM   #7
Posting Well

dualamd's Avatar

Join Date: Jan 2008
Posts: 33
Reputation: 187
Rep Power: 52
dualamd is looking at C++ For dummiesdualamd is looking at C++ For dummies
Credit to Sparten:

In vs2k8:
#define _SECURE_SCL 0
Before any STL headers, then compile in release mode.
string, list, map will have the same size as in 2k5.
dualamd is offline

Reply With Quote

Old 12-28-2009, 03:39 PM   #8
A Legend

Revolty's Avatar

Threadstarter
Join Date: Nov 2008
Location: Sweden
Posts: 271
Reputation: 12592
Rep Power: 170
Revolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server spaceRevolty 's rep takes up 1 gig of server space
Smack-n-Bash Champion
Points: 9,681, Level: 11
Points: 9,681, Level: 11 Points: 9,681, Level: 11 Points: 9,681, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
ty, it's working now.
Checked Iterators

wacko, the size is over 90 but it wont irritate more then once..

Code:
std::map<string, void*>::iterator it;
  
for ( it = pClassManager->classList.begin(); 
      it!= pClassManager->classList.end(); 
      it++ ) {

      MessageBoxA(0, (*it).first.c_str(), "", MB_OK);
}

class CClassManager
{
public:
	virtual int addRef(); //
	virtual int getRef(); //
	virtual int dispose(); //
	virtual void* queryInterface(int id); //
	virtual void function4(); //
	virtual void function5(); //
	virtual void function6(); //
	virtual void function7(); //
	virtual void function8(); //
	virtual void function9(); //
	virtual void function10(); //
	virtual void function11(); //
	virtual void function12(); //
	virtual void function13(); //
	virtual void function14(); //
	virtual void function15(); //
	virtual void function16(); //
	virtual void function17(); //
	virtual void* getClassByName(const string* name); //
	__int32 refCount; //0x0004  
	char unknown8[40]; //0x0008
	map<string, void*> classList; //0x0030  
};//Size=0x004C(76)

Last edited by Revolty; 12-28-2009 at 09:10 PM.
Revolty is offline

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
bf2, map, stdlist
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 +1. The time now is 07:41 AM.