[C++] Text in *.dat - Datei schreiben & abspeichern

Also Gott sei Dank hab ich's nicht abgebrochen :]. Das Programm ist fast fertig, ich werde den Source mal noch überarbeiten und dann entweder am Freitag oder am Wochenende in diesem Thread bekannt geben! Ihr seid dann quasi meine Beta-Tester 8). Es ist aber nicht zwingend erforderlich Call of Duty zu besitzen, dann wird eben dort wo das Programm liegt eine *.dat Datei mit dem Serial angelegt.
 
tztztz da kommt mir doch noch ein Problem entgegen:

Code:
/*Switch-Case Funktion*/

int serial;
cin >> serial;

cout<<" "<<endl;

switch (serial)
{
 case 1:  ofstream out("codkey");
   
out<<"HTEEX84WEGDSH4HXF8A2"<<endl;
out<<"// generated by CoD, do not modify"<<endl;
out<<"// Do not give this file to ANYONE."<<endl;
out<<"// Infinity Ward and Activision will NOT ask you to send this file to them."<<endl;
          
          cout<<"The new Serial is: HTEE-X84W-EGDS-H4HX-F8A2"<<endl;
          cout<<"...Press any key to close this programm..."<<endl;           
          break;

 case 2:  ofstream out("codkey");
   
out<<"2SUKYT4KDP2UDH2Y06E0"<<endl;
out<<"// generated by CoD, do not modify"<<endl;
out<<"// Do not give this file to ANYONE."<<endl;
out<<"// Infinity Ward and Activision will NOT ask you to send this file to them."<<endl;
          
          cout<<"The new Serial is: 2SUK-YT4K-DP2U-DH2Y-06E0"<<endl;
          cout<<"...Press any key to close this programm..."<<endl;           
          break;

default: cout<<"Please enter a number !"<<endl;
}

ich darf ofstream out nicht zweimal verwenden, sonst meckert er rum X(, ich muss es aber sehr oft verwenden da ich mit switch-Anweisung arbeiten wollte.

@pacman
mit deinen Arrays scheint das auch net ganz hinzuhauen :(
 
jo, es ist ja klar, dass du nur eine instanz mit dem namen 'out' erzeugen darfst. das wäre so ähnlich, wie wenn du versuchen würdest 2 mal eine variable mit dem gleichen namen anzulegen. aber es ist überhaupt nicht nötig, das objekt 2mal zu erzeugen. schreib einfach die zeile
Code:
ofstream out ("codkey");
über den switch block. also erst dass objekt anlegen und dann überprüfen, was mit dem objekt gemacht werden soll.

mit deinen Arrays scheint das auch net ganz hinzuhauen
hmm, kannste des mal etwas erklären. ich sehe da eigentlich auf den 1. blick kein problem, das mit nem array zu machen.

mfg,
pacman
 
hmm, kannste des mal etwas erklären. ich sehe da eigentlich auf den 1. blick kein problem, das mit nem array zu machen.

Naja, wir arbeiten ja alle "meist" mit unterschiedlichen Versionen von IDE's und Compilern (ich z.b mit Digital Mars andere mit dem Borland 5.5 Compiler oder so). Auf jeden Fall werd ich's mit switch machen (zwar nicht die eleganteste Lösung), geht aber besser als mit Arrays, da mein Compiler da rumspackt.
 
Aber noch geiler wäre es ein kleines Programm zu schreiben, dass außerhalb von CoD checkt ob der gerade eingetragene Serial bereits in use ist.

@pacman
hast du sowas schon mal gecodet?
 
hmmm, ich glaub ich weiß nicht genau, was du machen willst. aber wenn's nur darum geht, zu überprüfen, ob in einer datei eine bestimmte serial steht (bzw. welche serial), is das kein problem.

EDIT: kaum ne sekunde länger drüber nachgedacht und schon glaube ich dich verstanden zu haben ;). also du willst prüfen, ob die serial bereits online genutzt wird, oder? wenn ja, wird das wohl etwas kniffliger sein.

mfg,
pacman
 
Also das Game gibt ja (wenn ich auf nen Server connecte) ne Message aus, falls der CDkey bereits verwendet ist. Nun will ich erreichen, dass ich außerhalb von CoD prüfe(mit dem Prog), ob der CDkey bereits in use ist.
 
aha, ich hab CoD noch nie gespielt und wusste daher nicht gleich was du meinst. aber so ne nachricht abzufangen is wohl schon recht aufwendig. eine möglichkeit sehe ich da, wenn es irgendwo eine veränderung in einer datei gibt. bei cs wird z.b. der doppelte key aus der registry gelöscht. das könnte man evt. mit einem prog feststellen und dann noch während das spiel läuft einen neuen key einfügen um den neuen dann sofort zu testen. auch eine veränderung in einer ini datei oder so, kann ich mir vorstellen.

wenn ich da zuweit gehe (in bezug auf die forumregeln), möge mir das bitte jemand mitteilen

mfg,
pacman
 
Ein groses Problem ist ja auch, dass niemand das Protokoll der CoD programmierer so genau kennt. Wenn man es hereusfinden könnte, könntest du selbst mit connect und socket eine connection zum server aufbaun. Aber das zu machen ist wirklich ziemlich schwer. Ich denke auch, dass man dann Teile vom Gamestate korrekt fälschen müsste, um diese dann übertragen zu können!
 
@Riskman:

Der Grund warum bei dir die Zeile using namespace std; einen Fehler erzeugt, ist das du die Headerdateien "falsch" einbindest. Du schreibst
Code:
#include <iostream.h>
das kommt noch aus der Anfangszeit von C++. Allerdings wurde die Sprache standartisiert. Seit dieser Zeit sollte man nur noch
Code:
#include <iostream>
schreiben. Dann geht das auch mit dem Namespace :-)
 
@typecast:
ich nehme immer noch gerne die .h version weil man sich dann das ganze using getippe sparen kann :P
was bei mir in der iostreams.h steht? das hier (die kommentare habe ich mal wegelassen):
Code:
#ifndef _CPP_BACKWARD_IOSTREAM_H
#define _CPP_BACKWARD_IOSTREAM_H 1
 
#include "backward_warning.h"
#include <iostream>
 
using std::iostream;
using std::ostream;
using std::istream;
using std::ios;
using std::streambuf;
 
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
#ifdef _GLIBCPP_USE_WCHAR_T
using std::wcout;
using std::wcin;
using std::wcerr;
using std::wclog;
#endif
 
using std::ws;
using std::endl;
using std::ends;
using std::flush;
 
#endif

Was das CoD Protokoll angeht:
Teoretisch kann man mal mit einem richtigen Key und einem Falschen key kurz online gehen und den ganzen traffic mal sniffen, dann könnte man vieleicht rückschlüsse darauf machen :)
 
Nagut, wenn ihr es als "ziemlich schwierig" betrachtet, dann lassn wir's mal lieber bleiben oder ? Also ich hab da auch keine richtige Idee, wie man den SerialCheck durchführen könnte. Vielleicht wird's irgendwo geloggt oder so, ich kann ja mal nachschauen. Aber was das Programm kann muss ich doch auch irgendwie können? Gamespy oder TheallseeingEye können's ja auch teilweise...
 
@typecast
Nun das ist wirklich von Compiler zu Compiler unterschiedlich, manche kommen mit

Code:
#include <iostream>

einfach nicht klar. In der Schule haben wir es mit

Code:
#include <iostream.h>

gelernt ?(...
 
also ich muss typecast absolut recht geben, *.h datein sollte man nicht mehr verwenden. das führt nur zu unerklärbaren problemen, wenn mal etwas komplexere programme zu entwickeln sind.

@Riskman:

also, wenn das so zutrifft, was du sagst, würde ich mir an deiner stelle mal einen neuen compiler suchen (aber ich vermute, dass der fehler eher bei dir liegt ;). wenn der nicht mal mit namespaces und STANDARTISIERTEM C++ klar kommt, taugt er wohl nicht viel. und was die schule betrifft: leider sind dort die meisten lehrkörper nicht auf dem stand der dinge und interessieren sich sonst auch nicht sonderlich für's code. da wird oft nur gelehrt, was vor 5 jahren mal in nem uni-script stand. fortbildung ist da mangelware. so genug OT :D

mfg,
pacman
 
Naja unser Lehrer bringts einem auch mehr auf "altmodisch" mit. Viele Lehrkörper sind ja bekanntermaßen wenn's ums Thema "Computer" geht nicht auf der höhe der Zeit aber lassen wir das mal gut sein.
 
Ich hab mich trotzdem noch einmal auf die Suche begeben & bin fündig in der gepackten "localized_german_pak0.pak" geworden. Es existiert eine Datei Namens "cdkey.menu" und eine Headerdatei Namens "menudef.h".

Code der cdkey.menu :

Code:
#include "ui_mp/menudef.h"

{
\\ SETUP MENU \\

	menuDef 
	{
		name "cdkey_menu"
		fullscreen 0
		rect 100 125 443 340
		focusColor UI_FOCUS_COLOR
		style 1
		border 1
		popup
		onClose 
		{
			uiScript verifyCDKey
		}
		onOpen 
		{ 
			setitemcolor fadebox backcolor 0 0 0 1 ; 
			fadeout fadebox ; 
			hide grpfinish ;
			hide f_close;
			uiScript getCDKey
		}
		onEsc 
		{ 
			close cdkey_menu; 
//			close options_menu; 
//			open options_menu;
			open options_multi;
		}
		itemDef 
		{
			name backimage2fade
			style WINDOW_STYLE_SHADER
			rect -105 -130 646 486
	 		background "ui/assets/fadebox.tga"
			forecolor 0 0 0 0.7
			backcolor 0 0 0 0.7
			visible 1
			decoration
		}
		itemDef 
		{
			name window
			group grpSystembutton
			rect 0 2 443 300	
			style WINDOW_STYLE_FILLED
			border 1
			bordercolor .5 .5 .5 .5
			forecolor 1 1 1 1
			backcolor 0 0 0 .8
			visible 1
			decoration
		}

		itemDef 
		{
			name default
			text "@MENU_CDKEY"
			type 1
			style 0	
			textstyle 6
			rect 221 15 64 14 
			textalign ITEM_ALIGN_CENTER
			textfont UI_FONT_NORMAL
			textscale .3		
			textalignx 2
			textaligny 12
			forecolor .9 .9 .9 1
			visible 1 
			decoration
		}

/*
//	DEMO ONLY OPTION	//

	itemDef {
		name demo_only
		group grpcdkey
		rect 0 145 454 30
		text"This Option is Not Available in Demo."
		textalign 1
		textstyle 1
		textscale .333
		textalignx 217
		textaligny 23
		forecolor 1 1 1 1
		visible 1
		decoration
		}
*/

		itemDef 
		{
			name data
			group grpcdkey
			rect 0 50 454 12
			text"@MENU_ENTER_YOUR_ENCRYPTION_KEY_IN_THE_FIELD_BELOW"
			textalign 1
			textfont UI_FONT_NORMAL
			textscale .25
			textalignx 240
			textaligny 10
			forecolor 1 1 1 1
			visible 1
			decoration
		}	
		itemDef 
		{
			name datafield
			group grpcdkey
			style 0
			text "@MENU_KEY"
			maxchars 4
			rect 30 75 50 12	
			textalign ITEM_ALIGN_LEFT		
			textalignx 2
			textaligny 10
			textfont UI_FONT_NORMAL
			textscale .25
			decoration
			backcolor .1 .1 .1 .25
			forecolor 1 1 1 1
			visible 1 
		}

		itemDef 
		{
			name datafield
			group grpcdkey
			type ITEM_TYPE_UPREDITFIELD
			style 1
			text ""
			cvar "cdkey1"
			maxchars 4
			maxCharsGotoNext
			rect 80 69 60 20	
			textalign ITEM_ALIGN_CENTER2	
			textalignx 2
			textaligny 14
			textfont UI_FONT_NORMAL
//			textscale .255
			textscale .3
			border 1
			bordercolor .5 .5 .5 1
			backcolor .1 0.1 0.1 .25
			forecolor 1 1 1 1
			visible 1
			//mouseenter { setcolor bordercolor 1 .75 0 1 }
			//mouseexit { setcolor bordercolor .5 .5 .5 1 }		
		}
		itemDef 
		{
			name datafield
			group grpcdkey
			type ITEM_TYPE_UPREDITFIELD
			style 1
			text ""
			cvar "cdkey2"
			maxchars 4
			maxCharsGotoNext
			rect 145 69 60 20
			textalign ITEM_ALIGN_LEFT		
			textalignx 2
			textaligny 14
			textfont UI_FONT_NORMAL
//			textscale .255
			textscale .3
			border 1
			bordercolor .5 .5 .5 1
			backcolor .1 .10 .10 .25
			forecolor 1 1 1 1
			visible 1
			//mouseenter { setcolor bordercolor 1 .75 0 1 }
			//mouseexit { setcolor bordercolor .5 .5 .5 1 }
		}
		itemDef 
		{
			name datafield
			group grpcdkey
			type ITEM_TYPE_UPREDITFIELD
			style 1
			text ""
			cvar "cdkey3"
			maxchars 4
			maxCharsGotoNext
			rect 210 69 60 20
			textalign ITEM_ALIGN_LEFT		
			textalignx 2
			textaligny 14
			textfont UI_FONT_NORMAL
//			textscale .255
			textscale .3
			border 1
			bordercolor .5 .5 .5 1
			backcolor .1 .10 .10 .25
			forecolor 1 1 1 1
			visible 1
			//mouseenter { setcolor bordercolor 1 .75 0 1 }
			//mouseexit { setcolor bordercolor .5 .5 .5 1 }
		}
		itemDef 
		{
			name datafield
			group grpcdkey
			type ITEM_TYPE_UPREDITFIELD
			style 1
			text""
			cvar "cdkey4"
			maxchars 4
			maxCharsGotoNext
			rect 275 69 60 20
			textalign ITEM_ALIGN_LEFT		
			textalignx 2
			textaligny 14
			textfont UI_FONT_NORMAL
//			textscale .255
			textscale .3
			border 1
			bordercolor .5 .5 .5 1
			backcolor .1 .10 .10 .25
			forecolor 1 1 1 1
			visible 1
			//mouseenter { setcolor bordercolor 1 .75 0 1 }
			//mouseexit { setcolor bordercolor .5 .5 .5 1 }		
		}
		itemDef 
		{
			name datafield
			group grpcdkey
			style 0
			text "-"
			maxchars 2
			rect 328 69 60 20
			textalign ITEM_ALIGN_LEFT		
			textalignx 10
			textaligny 14
			textfont UI_FONT_NORMAL
			textscale .255
			backcolor 0 0 0 0
			decoration
			forecolor 1 1 1 1
			visible 1		
		}
		itemDef 
		{
			name datafield
			group grpcdkey
			type ITEM_TYPE_UPREDITFIELD
			style 1
			text ""
			cvar "cdkey5"
			maxchars 4
			rect 345 69 50 20
			textalign ITEM_ALIGN_LEFT		
			textalignx 2
			textaligny 14
			textfont UI_FONT_NORMAL
//			textscale .255
			textscale .3
			border 1
			bordercolor .5 .5 .5 1
			forecolor 1 1 1 1
			backcolor .1 .1 .1 .25
			visible 1
			//mouseenter { setcolor bordercolor 1 .75 0 1 }
			//mouseexit { setcolor bordercolor .5 .5 .5 1 }
		}
		itemDef 
		{
			name		cancel
			text		"@MENU_CANCEL"
			type		1
			group		grpcdkey
			textscale	.3
			style		UI_BUTTON_STYLE
			textstyle	UI_BUTTON_TEXT_STYLE
			rect		120 115 100 20
			textalign	1
			textalignx	48
			textaligny	14
			forecolor	UI_BUTTON_TEXT_COLOR
			backcolor	UI_BUTTON_BACK_COLOR
			border		UI_BUTTON_BORDER
			bordercolor	UI_BUTTON_BORDER_COLOR
			visible		1
			mouseEnter		{ setitemcolor cancel backcolor UI_BUTTON_BACK_COLOR_HOVER;play "mouse_over"; }
			mouseExit		{ setitemcolor cancel backcolor UI_BUTTON_BACK_COLOR }
			action 
			{ 
			play "mouse_click";
			close cdkey_menu; 
//			close options_menu; 
//			open options_menu;
			open options_multi;
			}		

		}
		itemDef 
		{
			name		verify
			text		"@MENU_VERIFY"
			type		1
			group		grpcdkey
			textscale	.3
			style		UI_BUTTON_STYLE
			textstyle	UI_BUTTON_TEXT_STYLE
			rect		250 115 100 20
			textalign	1
			textalignx	48
			textaligny	14
			forecolor	UI_BUTTON_TEXT_COLOR
			backcolor	UI_BUTTON_BACK_COLOR
			border		UI_BUTTON_BORDER
			bordercolor	UI_BUTTON_BORDER_COLOR
			visible		1
			mouseEnter		{ setitemcolor verify backcolor UI_BUTTON_BACK_COLOR_HOVER;play "mouse_over"; }
			mouseExit		{ setitemcolor verify backcolor UI_BUTTON_BACK_COLOR }
			action 
			{ 
				play "mouse_click";
				uiScript verifyCDKey ; 
				show finish_message ;
				show f_close ;
			}		
//			mouseexit { hide finish_message } 
		}

		itemDef 
		{
			name finish_message 
			group grpfinish
			style 0
			type ITEM_TYPE_EDITFIELD
			text ""
			cvar ui_cdkeyvalid
			rect 0 140 443 20
			textalign ITEM_ALIGN_CENTER
			textalignx 231
			textaligny 20
			textfont UI_FONT_NORMAL
			textscale .25
			forecolor 1 1 1 1
			visible 1 
			decoration
		}
		itemDef 
		{
			name		f_close
			text		"@MENU_CLOSE"
			type		1
			group		grpcdkey
			textscale	.3
			style		UI_BUTTON_STYLE
			textstyle	UI_BUTTON_TEXT_STYLE
			rect		180 170 100 20
			textalign	1
			textalignx	48
			textaligny	14
			forecolor	UI_BUTTON_TEXT_COLOR
			backcolor	UI_BUTTON_BACK_COLOR
			border		UI_BUTTON_BORDER
			bordercolor	UI_BUTTON_BORDER_COLOR
			visible			0
			mouseEnter		{ setitemcolor f_close backcolor UI_BUTTON_BACK_COLOR_HOVER;play "mouse_over"; }
			mouseExit		{ setitemcolor f_close backcolor UI_BUTTON_BACK_COLOR }

			action 
			{ 
			play "mouse_click";
			close cdkey_menu; 
//			close options_menu; 
//			open options_menu;
			open options_multi;
			}		

		}
		itemDef 
		{
			name fadebox
			style WINDOW_STYLE_FILLED
			background "ui/assets/fadebox.tga"
			forecolor 0 0 0 1
			backcolor 0 0 0 1
			rect 0 0 640 480
			visible 1 
			decoration
		}
	}
}


code der menudef.h


Code:
#define ITEM_TYPE_TEXT			0	// simple text
#define ITEM_TYPE_BUTTON		1	// button, basically text with a border 
#define ITEM_TYPE_RADIOBUTTON		2	// toggle button, may be grouped 
#define ITEM_TYPE_CHECKBOX		3	// check box
#define ITEM_TYPE_EDITFIELD 		4	// editable text, associated with a cvar
#define ITEM_TYPE_COMBO 		5	// drop down list
#define ITEM_TYPE_LISTBOX		6	// scrollable list	
#define ITEM_TYPE_MODEL 		7	// model
#define ITEM_TYPE_OWNERDRAW 		8	// owner draw, name specs what it is
#define ITEM_TYPE_NUMERICFIELD		9	// editable text, associated with a cvar
#define ITEM_TYPE_SLIDER		10	// mouse speed, volume, etc.
#define ITEM_TYPE_YESNO 		11	// yes no cvar setting
#define ITEM_TYPE_MULTI 		12	// multiple list setting, enumerated
#define ITEM_TYPE_BIND			13	// multiple list setting, enumerated
#define ITEM_TYPE_MENUMODEL 		14	// special menu model
#define ITEM_TYPE_UPREDITFIELD		15	// editable text, associated with a cvar

#define ITEM_ALIGN_LEFT 		0	// left alignment
#define ITEM_ALIGN_CENTER		1	// center alignment
#define ITEM_ALIGN_RIGHT		2	// right alignment
#define ITEM_ALIGN_CENTER2		3	// center alignment

#define ITEM_TEXTSTYLE_NORMAL		0	// normal text
#define ITEM_TEXTSTYLE_BLINK		1	// fast blinking
#define ITEM_TEXTSTYLE_PULSE		2	// slow pulsing
#define ITEM_TEXTSTYLE_SHADOWED 	3	// drop shadow ( need a color for this )
#define ITEM_TEXTSTYLE_OUTLINED 	4	// drop shadow ( need a color for this )
#define ITEM_TEXTSTYLE_OUTLINESHADOWED	5	// drop shadow ( need a color for this )
#define ITEM_TEXTSTYLE_SHADOWEDMORE 	6	// drop shadow ( need a color for this )
						  
#define WINDOW_BORDER_NONE		0	// no border
#define WINDOW_BORDER_FULL		1	// full border based on border color ( single pixel )
#define WINDOW_BORDER_HORZ		2	// horizontal borders only
#define WINDOW_BORDER_VERT		3	// vertical borders only 
#define WINDOW_BORDER_KCGRADIENT	4	// horizontal border using the gradient bars
  
#define WINDOW_STYLE_EMPTY		0	// no background
#define WINDOW_STYLE_FILLED 		1	// filled with background color
#define WINDOW_STYLE_GRADIENT		2	// gradient bar based on background color 
#define WINDOW_STYLE_SHADER 		3	// gradient bar based on background color 
#define WINDOW_STYLE_TEAMCOLOR		4	// team color
#define WINDOW_STYLE_CINEMATIC		5	// cinematic
#define WINDOW_STYLE_CVAR_SHADER	6	// draws the shader specified by the cvar

#define MENU_TRUE			1	// uh.. true
#define MENU_FALSE			0	// and false

#define HUD_VERTICAL			0x00
#define HUD_HORIZONTAL			0x01

#define RANGETYPE_ABSOLUTE		0
#define RANGETYPE_RELATIVE		1

// list box element types
#define LISTBOX_TEXT			0x00
#define LISTBOX_IMAGE			0x01

// list feeders
#define FEEDER_HEADS			0x00	// model heads
#define FEEDER_MAPS 			0x01	// text maps based on game type
#define FEEDER_SERVERS			0x02	// servers
#define FEEDER_CLANS			0x03	// clan names
#define FEEDER_ALLMAPS			0x04	// all maps available, in graphic format
#define FEEDER_REDTEAM_LIST 		0x05	// red team members
#define FEEDER_BLUETEAM_LIST		0x06	// blue team members
#define FEEDER_PLAYER_LIST		0x07	// players
#define FEEDER_TEAM_LIST		0x08	// team members for team voting
#define FEEDER_MODS 			0x09	// team members for team voting
#define FEEDER_DEMOS			0x0a	// team members for team voting
#define FEEDER_SCOREBOARD		0x0b	// team members for team voting
#define FEEDER_SERVERSTATUS 		0x0d	// server status
#define FEEDER_FINDPLAYER		0x0e	// find player
#define FEEDER_CINEMATICS		0x0f	// cinematics

// display flags
#define CG_SHOW_BLUE_TEAM_HAS_REDFLAG	0x00000001
#define CG_SHOW_RED_TEAM_HAS_BLUEFLAG	0x00000002
#define CG_SHOW_ANYTEAMGAME 		0x00000004
#define CG_SHOW_CTF 			0x00000020
#define CG_SHOW_HEALTHCRITICAL		0x00000080
#define CG_SHOW_SINGLEPLAYER		0x00000100
#define CG_SHOW_TOURNAMENT		0x00000200
#define CG_SHOW_DURINGINCOMINGVOICE 	0x00000400
#define CG_SHOW_IF_PLAYER_HAS_FLAG	0x00000800
#define CG_SHOW_LANPLAYONLY 		0x00001000
#define CG_SHOW_MINED			0x00002000
#define CG_SHOW_HEALTHOK		0x00004000
#define CG_SHOW_TEAMINFO		0x00008000
#define CG_SHOW_NOTEAMINFO		0x00010000
#define CG_SHOW_OTHERTEAMHASFLAG	0x00020000
#define CG_SHOW_YOURTEAMHASENEMYFLAG	0x00040000
#define CG_SHOW_ANYNONTEAMGAME		0x00080000
//(SA)
#define CG_SHOW_TEXTASINT		0x00200000
#define CG_SHOW_HIGHLIGHTED		0x00100000

#define CG_SHOW_NOT_V_CLEAR		0x02000000	//----(SA)	added	// hide on normal, full-view huds

#define CG_SHOW_2DONLY			0x10000000


#define UI_SHOW_LEADER			0x00000001
#define UI_SHOW_NOTLEADER		0x00000002
#define UI_SHOW_FAVORITESERVERS 	0x00000004
#define UI_SHOW_ANYNONTEAMGAME		0x00000008
#define UI_SHOW_ANYTEAMGAME 		0x00000010
#define UI_SHOW_NEWHIGHSCORE		0x00000020
#define UI_SHOW_DEMOAVAILABLE		0x00000040
#define UI_SHOW_NEWBESTTIME 		0x00000080
#define UI_SHOW_FFA 			0x00000100
#define UI_SHOW_NOTFFA			0x00000200
#define UI_SHOW_NETANYNONTEAMGAME	0x00000400
#define UI_SHOW_NETANYTEAMGAME		0x00000800
#define UI_SHOW_NOTFAVORITESERVERS	0x00001000



// owner draw types
// ideally these should be done outside of this file but
// this makes it much easier for the macro expansion to 
// convert them for the designers ( from the .menu files )
#define CG_OWNERDRAW_BASE		1
#define CG_PLAYER_HEAD			3
#define CG_PLAYER_HEALTH		4
#define CG_PLAYER_AMMO_VALUE		5
#define CG_PLAYER_AMMO_BACKDROP		6
#define CG_SELECTEDPLAYER_NAME		8
#define CG_SELECTEDPLAYER_LOCATION	9
#define CG_SELECTEDPLAYER_STATUS	10
#define CG_SELECTEDPLAYER_WEAPON	11
#define CG_SELECTEDPLAYER_POWERUP	12

#define CG_FLAGCARRIER_NAME 		14
#define CG_FLAGCARRIER_LOCATION 	15
#define CG_FLAGCARRIER_STATUS		16
#define CG_FLAGCARRIER_WEAPON		17
#define CG_FLAGCARRIER_POWERUP		18

#define CG_PLAYER_ITEM			19
#define CG_PLAYER_STANCE		20
#define CG_PLAYER_SCORE 		21

#define CG_BLUE_FLAGSTATUS		22
#define CG_BLUE_FLAGNAME		23
#define CG_RED_FLAGSTATUS		25
#define CG_RED_FLAGNAME 		26

#define CG_BLUE_SCORE			27
#define CG_RED_SCORE			28
#define CG_RED_NAME 			29
#define CG_BLUE_NAME			30
#define CG_PLAYER_LOCATION		33
#define CG_TEAM_COLOR			34
#define CG_CTF_POWERUP			35
										
#define CG_AREA_POWERUP 		36
#define CG_AREA_LAGOMETER		37	// painted with old system
#define CG_PLAYER_HASFLAG		38			  
#define CG_GAME_TYPE			39	// not done

#define CG_SELECTEDPLAYER_HEALTH	41
#define CG_PLAYER_STATUS		42
#define CG_FRAGGED_MSG			43	// painted with old system
#define CG_AREA_FPSINFO 		45	// painted with old system
#define CG_AREA_SYSTEMCHAT		46	// painted with old system
#define CG_AREA_TEAMCHAT		47	// painted with old system
#define CG_AREA_CHAT			48	// painted with old system
#define CG_GAME_STATUS			49
#define CG_KILLER			50
#define CG_ACCURACY 			53
#define CG_ASSISTS			54
#define CG_DEFEND			55
#define CG_EXCELLENT			56
#define CG_IMPRESSIVE			57
#define CG_PERFECT			58
#define CG_GAUNTLET 			59
#define CG_SPECTATORS			60
#define CG_TEAMINFO 			61
#define CG_VOICE_HEAD			62
#define CG_VOICE_NAME			63
#define CG_CAPFRAGLIMIT 		66	 
#define CG_1STPLACE 			67
#define CG_2NDPLACE 			68
#define CG_CAPTURES 			69

// (SA) adding
#define CG_PLAYER_AMMOCLIP_VALUE	70	
#define CG_CURSORHINT			72
#define CG_PLAYER_POWERUP		75
#define CG_PLAYER_HOLDABLE		76
#define CG_PLAYER_INVENTORY		77
#define CG_AREA_WEAPON			78	// draw weapons here
#define CG_AREA_HOLDABLE		79	
#define CG_CURSORHINT_STATUS	80

#define CG_PLAYER_WEAPON_NAME		81
#define CG_PLAYER_WEAPON_NAME_BACK	82
#define CG_PLAYER_WEAPON_MODE_ICON	83

#define CG_PLAYER_COMPASS			84
#define CG_PLAYER_COMPASS_BACK		85
#define CG_PLAYER_COMPASS_POINTERS	86
#define CG_PLAYER_COMPASS_FRIENDS	88

#define CG_PLAYER_BAR_HEALTH		89
#define CG_PLAYER_BAR_HEALTH_TITLE	90

#define CG_DRAW_SHADER				91

#define UI_OWNERDRAW_BASE		200
#define UI_HANDICAP 			200
#define UI_GAMETYPE 			205
#define UI_MAPPREVIEW			206
#define UI_NETSOURCE			220
#define UI_NETMAPPREVIEW		221
#define UI_NETFILTER			222
#define UI_VOTE_KICK			238
#define UI_MAPCINEMATIC 		244
#define UI_NETGAMETYPE			245
#define UI_NETMAPCINEMATIC		246
#define UI_SERVERREFRESHDATE		247
#define UI_SERVERMOTD			248
#define UI_GLINFO			249
#define UI_KEYBINDSTATUS		250
#define UI_JOINGAMETYPE 		253
#define UI_PREVIEWCINEMATIC 		254
#define UI_STARTMAPCINEMATIC		255

//----(SA)	added
#define UI_MENUMODEL			257
//----(SA)	end

#define VOICECHAT_GETFLAG		"getflag"		// command someone to get the flag
#define VOICECHAT_OFFENSE		"offense"		// command someone to go on offense
#define VOICECHAT_DEFEND		"defend"		// command someone to go on defense
#define VOICECHAT_DEFENDFLAG		"defendflag"		// command someone to defend the flag
#define VOICECHAT_PATROL		"patrol"		// command someone to go on patrol (roam)
#define VOICECHAT_CAMP			"camp"			// command someone to camp (we don't have sounds for this one)
#define VOICECHAT_FOLLOWME		"followme"		// command someone to follow you
#define VOICECHAT_RETURNFLAG		"returnflag"		// command someone to return our flag
#define VOICECHAT_FOLLOWFLAGCARRIER	"followflagcarrier" 	// command someone to follow the flag carrier
#define VOICECHAT_YES			"yes"			// yes, affirmative, etc.
#define VOICECHAT_NO			"no"			// no, negative, etc.
#define VOICECHAT_ONGETFLAG 		"ongetflag" 		// I'm getting the flag
#define VOICECHAT_ONOFFENSE 		"onoffense" 		// I'm on offense
#define VOICECHAT_ONDEFENSE 		"ondefense" 		// I'm on defense
#define VOICECHAT_ONPATROL		"onpatrol"		// I'm on patrol (roaming)
#define VOICECHAT_ONCAMPING 		"oncamp"		// I'm camping somewhere
#define VOICECHAT_ONFOLLOW		"onfollow"		// I'm following
#define VOICECHAT_ONFOLLOWCARRIER	"onfollowcarrier"	// I'm following the flag carrier
#define VOICECHAT_ONRETURNFLAG		"onreturnflag"		// I'm returning our flag
#define VOICECHAT_INPOSITION		"inposition"		// I'm in position
#define VOICECHAT_IHAVEFLAG 		"ihaveflag" 		// I have the flag
#define VOICECHAT_BASEATTACK		"baseattack"		// the base is under attack
#define VOICECHAT_ENEMYHASFLAG		"enemyhasflag"		// the enemy has our flag (CTF)
#define VOICECHAT_STARTLEADER		"startleader"		// I'm the leader
#define VOICECHAT_STOPLEADER		"stopleader"		// I resign leadership
#define VOICECHAT_WHOISLEADER		"whoisleader"		// who is the team leader
#define VOICECHAT_WANTONDEFENSE 	"wantondefense" 	// I want to be on defense
#define VOICECHAT_WANTONOFFENSE 	"wantonoffense" 	// I want to be on offense
#define VOICECHAT_KILLINSULT		"kill_insult"		// I just killed you
#define VOICECHAT_TAUNT 		"taunt" 		// I want to taunt you
#define VOICECHAT_DEATHINSULT		"death_insult"		// you just killed me
#define VOICECHAT_KILLGAUNTLET		"kill_gauntlet" 	// I just killed you with the gauntlet
#define VOICECHAT_PRAISE		"praise"		// you did something good

#define UI_FONT_DEFAULT			0
#define UI_FONT_NORMAL			1
#define UI_FONT_BIG			2
#define UI_FONT_SMALL			3
#define UI_FONT_BOLD			4
#define UI_FONT_CONSOLE			5

#define WEAPON_NAME_OFS			28	// This defined the amount of space to leave for the weapon mode icon
#define WEAPON_NAME_EDGE_SPACE		8	// space to leave on the left side of the weapon name

// size defines for the hud compass
// These are used for both the dynamic & non-dynamic compass drawing
// If these are changed, the cgame should be recompiled
//#define COMPASS_X			6
//#define COMPASS_Y			367
//#define COMPASS_SIZE			106

//#define COMPASS_HEALTH_OFF		25
//#define COMPASS_HEALTH_SIZE		56

//#define COMPASS_NEEDLE_XOFF		46
//#define COMPASS_NEEDLE_YOFF		29
//#define COMPASS_NEEDLE_WIDTH		14
//#define COMPASS_NEEDLE_HEIGHT		28

//#define COMPASS_POINTER_RADIUS	50
//#define COMPASS_POINTER_WIDTH		8
//#define COMPASS_POINTER_HEIGHT	16

#define PRONE_BLOCK_X 320
#define PRONE_BLOCK_Y 270

#define COMPASS_X			-25	// -40
#define COMPASS_Y			345	// 552
#define COMPASS_SIZE			160	// 256

#define COMPASS_HEALTH_OFF		54.375	// 87
#define COMPASS_HEALTH_SIZE		51.25	// 82

#define COMPASS_NEEDLE_XOFF		60	// 96
#define COMPASS_NEEDLE_YOFF		50	// 80
#define COMPASS_NEEDLE_WIDTH		40	// 64
#define COMPASS_NEEDLE_HEIGHT		40	// 64

#define COMPASS_POINTER_RADIUS		43.75	// 70
#define COMPASS_POINTER_WIDTH		20	// 32
#define COMPASS_POINTER_HEIGHT		20	// 32

#define COMPASS_FRIENDLY_WIDTH		10	// 16
#define COMPASS_FRIENDLY_HEIGHT		10	// 16

#define OPTIONS_CONTROL_SIZE		350 12
//#define OPTIONS_WINDOW		10 75 360 325
#define OPTIONS_WINDOW_POS		5 75
#define	OPTIONS_WINDOW_SIZE		360 325
#define	OPTIONS_WINDOW_BACKCOLOR	0 0 0 .7
#define OPTIONS_CONTROL_XALIGN		165
#define OPTIONS_CONTROL_YALIGN		11
#define OPTIONS_CONTROL_TXTSCALE	.225
#define OPTIONS_CONTROL_BACKCOLOR	0	0	.25	.3
#define OPTIONS_CONTROL_FORECOLOR	.9 .9 .9 1

//menu backgrounds, 1024x768 image split to 1024x512 & 1024x256 images
#define UI_MAIN_BACKGROUND_TOP		main_back_top
#define UI_MAIN_BACKGROUND_BOTTOM	main_back_bottom

#define UI_BUTTON_STYLE				1
//#define UI_BUTTON_BACK_COLOR		.84 .82 .45 .8
//#define UI_BUTTON_BACK_COLOR		.26 .3 .28 .8
#define UI_BUTTON_BACK_COLOR		.1747 .1903 .2335 .8
#define UI_BUTTON_BACK_COLOR_HOVER	.50 .45 0 .8
#define UI_BUTTON_BORDER			1
//#define UI_BUTTON_BORDER_COLOR		.64 .92 .48 .2
#define UI_BUTTON_BORDER_COLOR		0 0 0 .4
#define UI_BUTTON_TEXT_COLOR		.9 .9 .95 1
#define UI_BUTTON_TEXT_STYLE		3

//#define UI_FOCUS_COLOR				1 .75 0 1
#define UI_FOCUS_COLOR				.98 .96 .39 1

vielleicht kann man ja irgendwie nachvollziehen, was dort im einzelnen geschieht.
 
Das hat ziemlich wenig mit dem C++ code 4 die CD-Key abfrage zu tun.
Das sieht mir auch mehr nach einer config-datei aus als nach einer log-datei

So etwas wie eine eigene script sprache haben die programmierer von CoD da wohl gemacht ;)
 
Also ob der eingestellte Key gerade verwendet wird oder nicht wird weder in der Registry gespeichert noch in irgend einer *.ini - Datei.
 
Zurück
Oben