Jump to content

Modding Questions? Ask Them Here.


giantjeff

Recommended Posts

I am pretty good at it

Me too.

you would have to prompt for new stadium name or have a drop down list of all names

I know of no command line loc editor

and simple search and replace would work for the roster files but again you would have to prompt for the new names, and store all the info for the 124 teams and have the user select which team to switch out

Would that be difficult?

Also, how does the program work? (How does it retrieve the file name?).

So I can just use the variables later in any command?

Sorry for my stupidity, but I'm just not that C++ literate...what does the argument (void) in a function do?

How would I call the function and/or use it?

use something like this TWICE

one for orl

one for ord

the have the program run of the two files they selected

Orl

VOID DIALOG_FileOpen(VOID)


{


	OPENFILENAME openfilename;




	WCHAR szPath[MAX_PATH];


	WCHAR szDir[MAX_PATH];


	static const WCHAR szDefaultExt[] = { 'o','r','l',0 };


	static const WCHAR txt_files[] = { '*','.','o','r','l',0 };


	ZeroMemory(&openfilename, sizeof(openfilename));


	GetCurrentDirectory(SIZEOF(szDir), szDir);


	lstrcpy(szPath, txt_files);


	openfilename.lStructSize	   = sizeof(openfilename);


	openfilename.hwndOwner		 = Globals.hMainWnd;


	openfilename.hInstance		 = Globals.hInstance;


	openfilename.lpstrFilter	   = Globals.szFilter;


	openfilename.lpstrFile		 = szPath;


	openfilename.nMaxFile		  = SIZEOF(szPath);


	openfilename.lpstrInitialDir   = szDir;






	openfilename.Flags			 = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST |


		OFN_HIDEREADONLY;


	openfilename.lpstrDefExt	   = szDefaultExt;


	if (GetOpenFileName(&openfilename)) {


		if (FileExists(openfilename.lpstrFile))


			DoOpenFile(openfilename.lpstrFile);


		else


			AlertFileNotFound(openfilename.lpstrFile);


	}


}
ORD
VOID DIALOG_FileOpen(VOID)


{


	OPENFILENAME openfilename;




	WCHAR szPath[MAX_PATH];


	WCHAR szDir[MAX_PATH];


	static const WCHAR szDefaultExt[] = { 'o','r','d',0 };


	static const WCHAR txt_files[] = { '*','.','o','r','d',0 };


	ZeroMemory(&openfilename, sizeof(openfilename));


	GetCurrentDirectory(SIZEOF(szDir), szDir);


	lstrcpy(szPath, txt_files);


	openfilename.lStructSize	   = sizeof(openfilename);


	openfilename.hwndOwner		 = Globals.hMainWnd;


	openfilename.hInstance		 = Globals.hInstance;


	openfilename.lpstrFilter	   = Globals.szFilter;


	openfilename.lpstrFile		 = szPath;


	openfilename.nMaxFile		  = SIZEOF(szPath);


	openfilename.lpstrInitialDir   = szDir;






	openfilename.Flags			 = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST |


		OFN_HIDEREADONLY;


	openfilename.lpstrDefExt	   = szDefaultExt;


	if (GetOpenFileName(&openfilename)) {


		if (FileExists(openfilename.lpstrFile))


			DoOpenFile(openfilename.lpstrFile);


		else


			AlertFileNotFound(openfilename.lpstrFile);


	}


}

Link to comment
Share on other sites

  • Replies 614
  • Created
  • Last Reply

Top Posters In This Topic

Might be hard to follow but is this what you want

BTW using tga files allow the alpha to be part of the main image it is the 5th channel (1st four being RBG, Red, Blue, & Green)

need directory layout


main/


main/big folder/


main/big folder/.o folder/


main/big folder/o original/


main/big folder/o updated/


main/big folder/cram32 folder/


main/big folder/cram32/tga folder/


main/big folder/cram32/updated dds folder/




step one


select stadium file


copy file to main folder


create big folder


depack stadium into big folder


rename stadium.big to stadium.bak


decompress stadium files


convert all orl & ord files to .o files and move to the main/big folder/o original/ folder


export cram32.fsh to the main/big folder/cram32 folder/ 


convert all dds file to tga to the main/big folder/cram32/tga folder/




between steps 1 & 2 the modder mods the files he wants changed




step 2 & 3


allow user to select tga to convert to dds (type and mips settings, read index to set default info) and put them in the main/big folder/cram32/updated dds folder/


allow user to select image and change size info in index file




step 4, 5 & 6


move main/big folder/cram32/updated dds folder/ files to main/big folder/cram32


delete main/big folder/cram32/updated dds folder/ & main/big folder/cram32/tga folder/


rebuld cram32.fsh and move to main/big folder/




delete all orl & ord files in main/big folder/


move main/big folder/o original/ to main/big folder/


main/big folder/o updated/ to main/big folder


covert all .o to .orl & .ord


del main/big folder/o updated/, main/big folder/o original/, and all .o files


compress correct files in main/big folder/


rebuild stadium.big and place in main/

what do tgas do?

and what about the ord to o? will you explain that?

Link to comment
Share on other sites

what do tgas do?

and what about the ord to o? will you explain that?

TGA is just another image format, but it allows alpha to be a channel instead of a separate image

delete all orl & ord files in main/big folder/

move main/big folder/o original/ to main/big folder/

main/big folder/o updated/ to main/big folder

covert all .o to .orl & .ord

del main/big folder/o updated/, main/big folder/o original/, and all .o files

compress correct files in main/big folder/

rebuild stadium.big and place in main/

o2ord %%F %%~nF.ord %%~nF.orl

Link to comment
Share on other sites

TGA is just another image format, but it allows alpha to be a channel instead of a separate image

o2ord %%F %%~nF.ord %%~nF.orl

What are the &&'s and ~'s? They're the variables? Why are they declared like that? Also, is that the exact code I would type?

I'm just clueless when it comes to C++...if it were possible (I know that it's annoying and takes too much time), could you explain the code line by line?

Also, is the image tool better than imagemagick, in your opinion?

Link to comment
Share on other sites

o2ord %%F %%~nF.ord %%~nF.orl

That is a simple DOS string

%%F stands for the file name (8.3)

%%~nF stands for the file name (8.0)

so it is taking the file name, the cuting off the extension and adding either .ord (%%~nF.ord) or .orl (%%~nF.orl)

new image tool works fine it convert and resizes with one program but I do not know it it allows for overlaying one image on another

Link to comment
Share on other sites

o2ord %%F %%~nF.ord %%~nF.orl

That is a simple DOS string

%%F stands for the file name (8.3)

%%~nF stands for the file name (8.0)

so it is taking the file name, the cuting off the extension and adding either .ord (%%~nF.ord) or .orl (%%~nF.orl)

new image tool works fine it convert and resizes with one program but I do not know it it allows for overlaying one image on another

You said %%F stands for the filename...how does it know which filename...I'm really confused...if you ever have time, do you use AOL Instant Messenger or something like that? I think it would be easier to communicate there, because I'm like flooding the thread, and I still don't get what you're talking about...could you PM me your IM sn? I'm in school right now, so I can't talk on AIM, and I can't talk for the next like 14 hours either.

Link to comment
Share on other sites

Why don't you get one, please?

I find this a bad place to converse back and forth so frequently.

Also, can I use those batch file commands in C++?

Do I use the system("text you want to type");?

you run them the way you were the other command line programs just but this in front of the command

cmd /c

here is TY's example

#include <windows.h>




STARTUPINFO si;


PROCESS_INFORMATION pi;


ZeroMemory( &si, sizeof(si) );


si.cb = sizeof(si);


ZeroMemory( &pi, sizeof(pi) );




string commandstring = "cmd /c eazip.exe +a "" + modelspath + "" "tempc*"";




CreateProcess(NULL,LPSTR(newtextstring.c_str()),NULL,NULL,0,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi);


WaitForSingleObject( pi.hProcess, INFINITE );


CloseHandle( pi.hProcess );


CloseHandle( pi.hThread );

Link to comment
Share on other sites

you run them the way you were the other command line programs just but this in front of the command

cmd /c

here is TY's example

#include <windows.h>




STARTUPINFO si;


PROCESS_INFORMATION pi;


ZeroMemory( &si, sizeof(si) );


si.cb = sizeof(si);


ZeroMemory( &pi, sizeof(pi) );




string commandstring = "cmd /c eazip.exe +a "" + modelspath + "" "tempc*"";




CreateProcess(NULL,LPSTR(newtextstring.c_str()),NULL,NULL,0,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi);


WaitForSingleObject( pi.hProcess, INFINITE );


CloseHandle( pi.hProcess );


CloseHandle( pi.hThread );

I kind of understand it, though the code is confusing...

Also, why can't I just use system("")? Doesn't it do the same thing?

And kraw, could u get IM, or something like it?

And truthfully, kraw, do you think that my constant question barraging is getting annoying? Truthfully, do you think I should work on something else instead of programming, because I just can't understand it this quickly?

Link to comment
Share on other sites

I kind of understand it, though the code is confusing...

Also, why can't I just use system("")? Doesn't it do the same thing?

And kraw, could u get IM, or something like it?

And truthfully, kraw, do you think that my constant question barraging is getting annoying? Truthfully, do you think I should work on something else instead of programming, because I just can't understand it this quickly?

I think and I'm really not sure but I think TY's uses multi threads

with system("") your program waits until it finished that command before going any farther, with TY's he is doing that in the background.

since your program has nothing to do until the command finished you can do it your way.

Like I said I think, I could be way off base. I just got back in to c++ a couple weeks ago after a 10 year layoff

anyway I can not install any program that adds DLL files to the system (IM client) on this computer, company rules

Truthfully I think you are trying to jump to far into the middle without learning the fundamentals. A book like Sam's learns C++ in 21 days would do you wonders

Link to comment
Share on other sites

I need a bit of help, i am swapping a logo using MVP Studio 2006 and when i try to put my alpha images the program gives me this error:

You Have not selected a proper alpha file FILE.

I don't understant what is going on my alphas are all the proper size and they are all 8 bit, is there something i am missing or doing wrong?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...