XTF Posted August 13, 2002 Share Posted August 13, 2002 TonyD, do you plan to release the source code? Others might be able to spot bugs, improve performance or add cool features. Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 13, 2002 Share Posted August 13, 2002 hmm I am considering it, Ill be able to host it on sourceforge too, Ill have a few days to think about it........ Quote Link to comment Share on other sites More sharing options...
stefanhendriks Posted August 13, 2002 Share Posted August 13, 2002 actually my experience is, even if you use any license like thingy , or sourceforge or whatever. Your source will always be ripped and claimed as someone elses work. I think its hard to fight it. Thats why my point of view is with several projects "I give it, and i dont give a damn if you use my code and claim as if its yours".Only do this if you code for your own fun and you REALLY dont give a damn ;) Quote Link to comment Share on other sites More sharing options...
XTF Posted August 14, 2002 Author Share Posted August 14, 2002 That's your experience with CS bots. I think the chance of that happening is less likely for a Dune 2 game.BTW, the XCC source code is also available on SF: http://sourceforge.net/projects/xccu/ Quote Link to comment Share on other sites More sharing options...
Cyborg Posted August 14, 2002 Share Posted August 14, 2002 One idea is when you release the sourcecode, you let one part out or something. Just so ppl not good at programming wont claim it as their own and use it ;) Quote Link to comment Share on other sites More sharing options...
stefanhendriks Posted August 14, 2002 Share Posted August 14, 2002 indeed that was my experience with bot programming. I saw every bot who was releasing their source being ripped. Thats why i never will release the code of mine.It wont happen that fast with Dune 2 Legacy ofcourse, but then again, its about the principle. You have to face it that there will be people ripping off code... Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 14, 2002 Share Posted August 14, 2002 some good points raised here.There are some parts of my code that I am quite proud of and wouldn't want any one ripping, but most of it I wouldn't really care what any one does with it... But if I released only part, how much use is a portion of the code, people wouldn't be able to compile it, let alone help with the game development.I am also not quite sure what I want to do with it as well, I have plans to add support for 3d objects and terrain much like newer similar games do, such as warcraft3, emperor and such, also networking, and good ai.Decisions, decisions.....BTW theres a patch out, which changes only a few significant things, although I have upped it to 0.15 because it seems very stable. Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 14, 2002 Share Posted August 14, 2002 Hey Olaf,theres a program on this page with source that manages to extract the icon files from the icon.icn file. If you adjust the palette file in the same way your mixer does for the app, some of the tiles come out looking almost correct, however I can't make sense of the src, it seems not to match the app. Do you think this could be any help for you in decoding the icn format?http://students.soros.karelia.ru/~xhacker/worktable.htm Quote Link to comment Share on other sites More sharing options...
vidiware Posted August 15, 2002 Share Posted August 15, 2002 well.. cyborg... it then u kloose the pintonly good programmers that can finish the poject will steal... other just look and try and be happy when their modifications work... Quote Link to comment Share on other sites More sharing options...
Cyborg Posted August 15, 2002 Share Posted August 15, 2002 Tony D:You wrote about 3D program...Do you want any models for your 3D program? ;D Quote Link to comment Share on other sites More sharing options...
vidiware Posted August 15, 2002 Share Posted August 15, 2002 Tony D:You wrote about 3D program...Do you want any models for your 3D program? ;DThis hasnt much to do with open source projects... Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 15, 2002 Share Posted August 15, 2002 yep that would be great, but don't expect any results for quite a looong time, Im gonna get this finished before I extend it to support 3d stuff Quote Link to comment Share on other sites More sharing options...
XTF Posted August 15, 2002 Author Share Posted August 15, 2002 What's your goal? My goal for XCC was to develop utilities so I could edit the game. That goal was met. Whether somebody else would release other utilities didn't matter.some good points raised here.There are some parts of my code that I am quite proud of and wouldn't want any one ripping, but most of it I wouldn't really care what any one does with it... But if I released only part, how much use is a portion of the code, people wouldn't be able to compile it, let alone help with the game development.If you use Visual C++ 6 too, you could release OBJs instead of Cs to protect part of the source code.Hey Olaf,theres a program on this page with source that manages to extract the icon files from the icon.icn file. If you adjust the palette file in the same way your mixer does for the app, some of the tiles come out looking almost correct, however I can't make sense of the src, it seems not to match the app. Do you think this could be any help for you in decoding the icn format?http://students.soros.karelia.ru/~xhacker/worktable.htmWhy do you think the source doesn't match the EXE? I guess it's a great help, but I can't find my Dune 2 files to test it now. Quote Link to comment Share on other sites More sharing options...
stefanhendriks Posted August 15, 2002 Share Posted August 15, 2002 i sent Olaf an IM about this btw ;)the source code of that icon extractor is not compiling to well on my MSVC6. It gives some warnings, but then it also does NOT create any good bmp's anymore. They are not even read as a good BMP format. I guess you really need a C compiler. (an older one?, other one? i dunno). Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 15, 2002 Share Posted August 15, 2002 i sent Olaf an IM about this btw ;)the source code of that icon extractor is not compiling to well on my MSVC6. It gives some warnings, but then it also does NOT create any good bmp's anymore. They are not even read as a good BMP format. I guess you really need a C compiler. (an older one?, other one? i dunno).I thought u may have, but wanted to be sure he knew about it....Anyways, I think the code is wrong because I had a look at some of the offset definitions, and some seem to be way beyond the length of the icon.icn file - it seems something is deffinately wrong with this unless I am not understanding the code in it correctly. Quote Link to comment Share on other sites More sharing options...
XTF Posted August 15, 2002 Author Share Posted August 15, 2002 iconconv.c(34) : warning C4013: 'exit' undefined; assuming extern returning inticonconv.c(46) : warning C4013: 'writebmp' undefined; assuming extern returning inticonconv.c(54) : warning C4101: 'z' : unreferenced local variableiconconv.c(111) : warning C4101: 'k' : unreferenced local variableiconconv.c(81) : warning C4716: 'decode' : must return a valueiconconv.c(165) : warning C4716: 'writebmp' : must return a valueThat's 'normal'. You probably need to add "#pragma pack(push, 1)" at the top. Quote Link to comment Share on other sites More sharing options...
XTF Posted August 15, 2002 Author Share Posted August 15, 2002 Working code:#include  <dos.h>#include  <io.h>#include  <stdio.h>#define  FNAME "c:/temp/icon.icn"char  palname[]="c:/temp/ibm.pal";#define  ICONNUM 0x18f#define  ICONOFFS 0x28#define  TABLEOFFS 0xc7b0#define  TABLESIZE 0xa90#define  INDEXOFFS 0xd248int  in;unsigned char  table[TABLESIZE];unsigned char  index[ICONNUM];unsigned char  inbuf[0x80];unsigned char  outbuf[0x100];#pragma pack(push, 1)struct{  unsigned __int16  ftype; // 'BM' - BMP  unsigned __int32  fsize; // Size of file  unsigned __int32  rez; // Reserved  unsigned __int32  bitoffs;  // Offset of bit image  unsigned __int32  ssize; // Size to rest of structure, includes this field  unsigned __int32  width; // Width of image  unsigned __int32  height; // Height of image  unsigned __int16  planes; // Count of bit planes = 1  unsigned __int16  bits; // Bit per pixel  unsigned __int32  compr; // Type of compression  unsigned __int32  imgsize;  // Size of image  unsigned __int32  sux1;  unsigned __int32  sux2;  unsigned __int32  clrused;  // Count of used colors  unsigned __int32  clrimp; // Count of impotant colors} bmphead;char  pal[768];char  destpal[1024];int  writebmp(char *name){  bmphead.ftype = 0x4D42;  bmphead.rez = 0;  bmphead.ssize = 0x28;  bmphead.width = 0x10;  bmphead.height = 0x10;  bmphead.planes = 1;  bmphead.bits = 8;  bmphead.compr = 0;  bmphead.sux1 = bmphead.sux1 = bmphead.clrused = bmphead.clrimp = 0;  bmphead.bitoffs = 0x36+0x400;  bmphead.imgsize = 0x100;  bmphead.fsize = 0x36+0x400+0x100;   int i = _open(palname,0);  if (i == -1)  { printf("%s open failedn",palname); return 1;  }   read(i,pal,768);  close(i);   int j;  for(i = 0, j = 0; i < 768;)  { destpal[j++] = pal[i++] * 255 / 63; destpal[j++] = pal[i++] * 255 / 63; destpal[j++] = pal[i++] * 255 / 63; destpal[j++] = 0;  }   i = _creat(name,0);  if (i == -1)  { printf("Unable to create "%s"n",name); return 1;  }    write(i, &bmphead, sizeof(bmphead));  write(i, destpal,1024);    for(j = 0xf0; j >= 0; j -= 0x10) write(i, outbuf + j, 0x10);  close(i);  return 0;}void decode(int n){  char  t[16];   lseek(in,ICONOFFS + 128 * n, SEEK_SET);  _read(in, inbuf, 0x80);   int k = 16 * index[n];  for (int i = 0; i < 16; i++)  { if (table[k + i] >= 0x90 && table[k + i] <= 0xa0)  t[i] = table[k + i] + 0x30; else  t[i] = table[k + i];  }   int j = 0;  for(i = 0; i < 0x80; i++)  { int l = inbuf[i]; outbuf[j++] = t[l >> 4]; outbuf[j++] = t[l & 0xf];  }}int  main(){  in = _open(FNAME,0);   if (in == -1)  { printf("Unable to open "FNAME"n"); return 1;  }   lseek(in, TABLEOFFS, SEEK_SET);  _read(in, table, TABLESIZE);  lseek(in, INDEXOFFS, SEEK_SET);  _read(in, index, ICONNUM);   for (int i = 0; i < ICONNUM; i ++)  { decode(i); char buff[100]; sprintf(buff,"icon %04d.bmp", i); writebmp(buff);  }  return 0;} Quote Link to comment Share on other sites More sharing options...
stefanhendriks Posted August 15, 2002 Share Posted August 15, 2002 I think you misunderstood my last post Olaf.The code did compile, yes, with these errors, indeed. But, the output of the program was totally garbage. No program would read the bmp files at all.thats all what i meant ;) Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 16, 2002 Share Posted August 16, 2002 see this:#define INDEXOFFS 0xd248the file is only 0xCE9D bytes long!BTW there is now a dedicated forum on my dune page, if anyone cares. Quote Link to comment Share on other sites More sharing options...
XTF Posted August 16, 2002 Author Share Posted August 16, 2002 It's 0xd3d7 (54231) bytes long. Quote Link to comment Share on other sites More sharing options...
XTF Posted August 16, 2002 Author Share Posted August 16, 2002 I think you misunderstood my last post Olaf.The code did compile, yes, with these errors, indeed. But, the output of the program was totally garbage. No program would read the bmp files at all.thats all what i meant ;)I know. And I fixed both the warnings and the garbarge creation. Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 16, 2002 Share Posted August 16, 2002 It's 0xd3d7 (54231) bytes long.Am I do something really stupid, both windows and my hex editor show it as being only 52,893 (0xCE9D) bytes long. Pehaps somehow I have gotten a wrong version or something,does your code create the tiles looking correctly as they should as well with your version of the icn file?I have version 1.07 of dune2, perhaps there is a difference.Ah ic yes, I had a look and it seems this has been the reason why I couldn't do this all along, stupid me, thanks Olaf. Quote Link to comment Share on other sites More sharing options...
XTF Posted August 16, 2002 Author Share Posted August 16, 2002 I downloaded SuperDune from this site and used that version. Yes, they look fine. Should I upload the BMPs? Quote Link to comment Share on other sites More sharing options...
TonyD Posted August 16, 2002 Share Posted August 16, 2002 [attachment archived by Gobalopper] Quote Link to comment Share on other sites More sharing options...
XTF Posted August 16, 2002 Author Share Posted August 16, 2002 Did you use the code I posted?http://xcc.tiberian.com/temp/icons.zip 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.