compmaniac Posted January 20, 2007 Share Posted January 20, 2007 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); } } Quote Link to comment Share on other sites More sharing options...
RaptorQuiz Posted January 20, 2007 Share Posted January 20, 2007 I mainly work in power houses, and sometimes car plants Actually sounds like a pretty interesting and high-challenge, high-reward job. Way better than what I'm currently wasting my life doing. (Managing a friggin' oil change). Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 Compmaniac you might like this program http://perso.orange.fr/pierre.g/xnview/en_nconvert.html Quote Link to comment Share on other sites More sharing options...
compmaniac Posted January 20, 2007 Share Posted January 20, 2007 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? Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 A void function is really just a subroutine. Specifying void as the return type means you dont include the final "return 0;" or whatever return value. Quote Link to comment Share on other sites More sharing options...
compmaniac Posted January 20, 2007 Share Posted January 20, 2007 Compmaniac you might like this program http://perso.orange.fr/pierre.g/xnview/en_nconvert.html Could I use it as a command-line program? Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 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 Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 Could I use it as a command-line program? Yes it is a command line image tool, I have not played with it much It converts & resizes I do not know what else it does. I just ran across it yesterday Quote Link to comment Share on other sites More sharing options...
compmaniac Posted January 20, 2007 Share Posted January 20, 2007 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? Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 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 Quote Link to comment Share on other sites More sharing options...
compmaniac Posted January 20, 2007 Share Posted January 20, 2007 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. Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 http://labmice.techtarget.com/articles/batchcmds.htm Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 I do not have any instant message program installed Quote Link to comment Share on other sites More sharing options...
BigRog Posted January 20, 2007 Share Posted January 20, 2007 is their a tutorial out explaining how to make overlays? can anyone explain how to do this or point me in the right dirrection sorry to repost its just i really would like this to get answered Quote Link to comment Share on other sites More sharing options...
compmaniac Posted January 20, 2007 Share Posted January 20, 2007 I do not have any instant message program installed 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");? Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 Trues is the overlay guy he started this tutorial but never had time to finish it http://www.mvpmods.com/faq/index.php?actio...d=10&artlang=en Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 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 ); Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 you will have to play around with it a little bit instead of %%F it may be just %F if not in a batch file or you could include the batch file and just run that from your program Quote Link to comment Share on other sites More sharing options...
compmaniac Posted January 20, 2007 Share Posted January 20, 2007 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? Quote Link to comment Share on other sites More sharing options...
felmlyd Posted January 20, 2007 Share Posted January 20, 2007 haha most peope who realy undertand programming take years worth of classes to really get it it aint taking you so long i mean this is the simpeest barebones of programming but still you arnt moving so slow Quote Link to comment Share on other sites More sharing options...
BigRog Posted January 20, 2007 Share Posted January 20, 2007 Trues is the overlay guy he started this tutorial but never had time to finish it http://www.mvpmods.com/faq/index.php?actio...d=10&artlang=en thanks Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 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 Quote Link to comment Share on other sites More sharing options...
felmlyd Posted January 20, 2007 Share Posted January 20, 2007 if you download microsoft visual C++ 2005 Express trial and register it you can access very good e books from microsoft that help you alot in learning the basics of making a windows program Quote Link to comment Share on other sites More sharing options...
midaz101 Posted January 20, 2007 Share Posted January 20, 2007 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? Quote Link to comment Share on other sites More sharing options...
krawhitham Posted January 20, 2007 Share Posted January 20, 2007 zip up the alpha and post it in the thread Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.