Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mirex

Pages: 1 2 [3] 4 5 6 7 8 ... 43
51
I'll give you some small hints as well Halkun.

Dunno if it will work for you, but mine C++ compiler can compile this:

char name[] = "Something";

that means it does not need the array size definition if you define the string right after it. Makes it nicer. :)

Also array can be translated as a pointer to the array members ... that means that char name[ 8 ]; - name can be used as char* ... int data[ 8 ];  data is int* as well. But in some cases it won't work.

for your information all the char[] char* strings in C are required to have a zero byte ( or '\0' char ) on their end. That's what marks the end of string. If you create a string like   char  name[ 8 ];  its contents are undefined, it can contain 8x "A" which means that it is not ended anywhere - that means any operation on it would end up randomly, probably reading / writing in some invalid memory. You should allways fill up your variables, you can't expect them to reset automatically. Good way is to:

char name[ 8 ] = { 0 };
or
char name[ 8 ];
name[0] = 0;  <- sets the first byte to zero, which means start of string is also its end.

This means another complication which some people overlook. If you have char name[ 8 ]; and you use it as a string you can't fill it with 8 characters. Because there has to be space for the zero ending character. So it can contain max 7 chars + 1 zero character.
strcpy( name, "12345678" ); will copy 8 characters into the 'name' variable, and it will write the 9th zero character outside - somewhere to undefined memory. It can work, right, but it also can overwrite some important variable memory.

C++ overcomes all these problems with dynamic std::string<> which takes care about the space the string needs ... but it also brings another problems ;)


About the function ... I was reading the man page and I found:

TCL_LINK_STRING
    The C variable is of type char *. If its value is not null then it must be a pointer to a string allocated with Tcl_Alloc. Whenever the Tcl variable is modified the current C string will be freed and new memory will be allocated to hold a copy of the variable's new value. If the C variable contains a null pointer then the Tcl variable will read as ``NULL''.

which brings me to the conclusion that you have to alloc the variable in a special way as it could be changed / resized when some other string changes. So maybe you should use it this way:

Code: [Select]
Tcl_Interp  inter;  // returned error code
char varname[] = "Variable"; // variable name

char* newstring = Tcl_Alloc( default_size_of_your_string );
strcpy( newstring, "hello" );

Tcl_LinkVar( &inter, varname, newstring, TCL_LINK_STRING );
// check for return code
if ( inter == something )
 do something.

// and maybe somewhere at the end you should free the string
Tcl_Free( newstring );

Well this is just my guess from the man page ... dunno if its correct because I don't know the lib ... also some thing puzzle me ... why should be the varname changed and how ? Maybe it should be specially allocated as well ? Maybe if thou do not want to define the string you don't have to alloc it and you can use NULL parameter instead Tcl_LinkVar( &inter, varname, NULL, TCL_LINK_STRING ); ?

It'd be better if you would see for some examples used with this function to see the proper usage.

52
Completely Unrelated / Re: Art
« on: 2006-09-14 13:57:50 »
L. Spiro: nice drawing skillz !

( me not drawing, me programmer )

53
Archive / Re: Fuzzy Backround Graphics
« on: 2006-09-11 08:11:53 »
King Mod: maybe you should make an screenshot of your game screen and show us so we can see what you mean by 'fuzzy'.

54
Nope going through 3DS format is a wrong way to go. 3DS looses vertex colours and makes model look 'blocky. You have to convert model into .ASE format in Biturn, and get a plugin for 3DS MAX to load ASE format. Here is more on this topic: http://forums.qhimm.com/index.php?topic=2819

55
FF7 Tools / Re: Beta PCreator v0.85
« on: 2006-08-22 08:49:13 »
Looks very nice !

56
You can find a bunch of the programs / patches organized here in "Compilation of programs" thread http://forums.qhimm.com/index.php?topic=4351.0

Sadly user Elentor is no longer active so he's not maintaining the list in his first post anymore. But if you find a patch / program which is not in the list just add it to the thread.

57
General Discussion / Re: How'd you learn your stuff?
« on: 2006-08-14 08:35:13 »
You can fix your car without being a mechanic when you try really really hard, take it apart and keep trying for long time. You'll learn how to disassemble it and assemble it back to make it work. Its the same with this stuff.
You see we're still not best at it, because our car ( in this case FF7 ) is still not fully moddable and when we disassemble it and reassemble it back it sometimes does not work properly.

I recommend to first learn programming and find out how hex-editor works.

58
Completely Unrelated / Re: Smoking?!
« on: 2006-08-09 05:50:57 »
Similair law is prepared here in Slovakia too, and I expect that it will create a little more of fresh breathable air.
I got used to the smoke but I don't like to breathe it if I don't have to.

59
Scripting and Reverse Engineering / Re: Good Assembler?
« on: 2006-08-06 11:20:01 »
Please explain what "libraries" do you have in mind.

I was using the tasm which was packed to ooold Turbo Pascal / Turbo C++ and it worked for my needs.

60
Completely Unrelated / Re: So then, TV-Series.
« on: 2006-08-01 15:00:03 »
I Love:
Mash
Futurama (but I dont like simpsons)
Tropical Heat
Mc Gyver

I like to watch if there is time:

Stargate
StarTrek (some older ones and Voyager, but I like them all)
Step by step
Monk
Pimp my Ride
Sex and the City
Frasier
everything on old Cartoon Network, ranging from Powerpuffgirls, Dexter's laboratory, through Johnny bravo, to the Spaceghost (coast to coast), Birdman, Perils of penelope pitstop, Hong-kong phuey, Johnny Quest, Tobby Danger and such.

I dislike:
CSI-NY, CSI-Miami and all those new wave crimi-series where they solve everything quite fast and easily.
South Park

61
Completely Unrelated / Re: Logic Game
« on: 2006-07-20 07:02:04 »
It has 20 pages at least

Solutions for curious: http://nexus.signal2noise.co.uk/~eason/nnfshost_solution.html

62
Completely Unrelated / Re: Learn from my mistake...
« on: 2006-07-19 12:13:36 »
I heard about such trick. Also one of politicans in my country used this and his political imunity to get out of the car accident for free.
But I don't get it. How can one refuse such test, and why isn't such refusal taken as proof of being drunk ? ( I don't see any other circumstances when I would want to refuse )

63
Troubleshooting / Re: FF8 Battle & Field Model Viewer
« on: 2006-07-19 12:08:33 »
Hi. I don't think that model files differ in any way between language mutations.

Problem in global is that file was not analysed completely, I could not find out the proper model structure and it is where it has stopped. What is displayed by last version of Biturn is last and final status unless someone finds working model description somewhere on the internet. Qhimm said he has some ideas about model structure, but he hasn't released any specification or source so far.
I also tried to contact Kvaks for the specs but I got no response either.

There ARE some nice renders, as you probably seen in former FF8 threads or here: http://bin.mypage.sk/FILES/render01-1-ray.jpg but I don't know how they were archieved.

Also look here: http://ffab.mypage.sk/viewtopic.php?t=34 , that's another discussion about the 3D models from FF8.

64
Archive / Re: Cloud High Quality
« on: 2006-07-19 12:00:03 »
Moving from Programming feedback => game tweaking

65
Don't worry L.Spiro, it will get better eventually.

66
Archive / Re: Cloud wearing Daedric armor
« on: 2006-07-06 15:53:07 »
Wow like, you really can create P files from scratch ? Thats nice news ! :) congratz for that

67
http://www.ff7-universe.com/Downloads/FF7Movietweak.txt

That is an description how to play your movies off your hard drive, it could help. For more details use search button, this issue has been discussed few times already.

68
Scripting and Reverse Engineering / Re: Weird Texturing
« on: 2006-07-03 10:50:27 »
If they overleap as you say then there is something fishy going on.
Are there multiple textures for this model ? Then it could mean that coords 0.0 - 1.0 are mapped on first texture, 1.0 - 2.0 are mapped on 2nd texture,  and so on ...
Or try another way around ... find where are fingers on the texture and compare the position with the texcoords present on the fingers of the model, maybe you'll find some connection.

69
Completely Unrelated / Re: Learn from my mistake...
« on: 2006-07-02 08:10:07 »
MOT: thats just too irresponsible. You should not drink at all or use any other kind of mind-changing stuff when driving.

70
Archive / Re: QhimmLZS
« on: 2006-06-29 08:27:37 »
Yes try that. I tried to unpack it with WinRar 3.42 and it unpacked well. ( I haven't tried the DLL, but it has unpacked with no errors, and the .txt file was readable )
Here you can get latest WinRar: http://www.rarlabs.com/download.htm

71
rmco2003: you should continue on your program. I don't know how long will it take me untill its finished, I have only a little of free time.

72
Hi, I had no time to comment or look into the file format sooner. I see that you have decoded everything already.

For your information BMP has a possibility to store alpha transparency layer, it can be accomplished by storing 32bit BMP's. You can see these layers in Paint Shop Pro too. I use PSP6/7 and you can see the layer through menu / Mask / Load from alpha channel.

Tonberry: may I use your description and code SPR support into my program Biturn ? You will be credited of course.

rmco2003: I haven't seen the name of the game so far, please can you tell me what game is it ?

73
Archive / Re: QhimmLZS
« on: 2006-06-28 07:48:41 »
After little googling it has been found here: http://aaron-kelley.net/hosting/ficedula/
its on the bottom of the page.

74
Completely Unrelated / Re: Funniest Thing In A Long Time
« on: 2006-06-22 14:03:31 »
Doh I really don't like this kind of jokes.

75
Completely Unrelated / Re: Blu-Ray Launches Next Week!
« on: 2006-06-21 13:14:23 »
I'll be little off from flow of your posts but my 2 cents to the ads

First, I haven't seen the adds mentioned ... but:
Its just an add you say ... Yes it is a joke for us. But there are also minors which still cannot choose if this add is correct or not, because they just still don't know what are they talking about (they're talking about girlie stuff), but if they see the add frequently enough they could be thinking that this is normal, this is a normal behaviour, and I should be behaving in a similair way probably. It can alter their way of seeing girls and life as a whole.
Lots of kids get liking the McDonalds and other similair companies even before they tasted their food, just from the TV ad's.

Pages: 1 2 [3] 4 5 6 7 8 ... 43