[PROG] Meta fixer 1.0(sorta like a meta checkpoint)

Utilities designed primarily for the xbox version of Halo 2.
tjc2k4




Construct Socialist Golden Age Magic Era
Pi Coagulator Eureka Pyre
Literarian 100

Posts: 150
Joined: Wed Nov 12, 2003 3:21 am

Post by tjc2k4 »

Well, I don't care much for his 'style' then, but there are other things that I think could be considered just plain bad coding, heh. For example, any time you know an array may be between 1-10,000 items and just declare the array as 10000 all the time instead of figuring out how many items you will really have and creating the array after, or use a different data type, i.e. vector or something, I'd consider that bad coding, as I think most programmers I've met would.
Also, although it may be a style thing, I feel (and I think it's a generally accepted practice) that variable names in programs should usually be descriptive of something they relate to, making the code easier to read, i.e. mapHeader.Read(mapStream); would be easier to read than fuckidy.shit(gay);

Not trying to bash poke or DarkMatter or anything, just saying that it doesn't follow most generally accepted programming rules/styles that I've been introduced to through out my career, therefore it's not of much use to me as something to learn from..
Blah blah blah
CLuis




Socialist Golden Age Revivalist Magic Era
Miner Droplet

Posts: 94
Joined: Sat Sep 13, 2003 6:36 am
Contact:

Post by CLuis »

S_halted wrote:I personally love pokes style of coding, I would never release the source to something if it had that many curses. It is a good read, if you dont know how some minor things work.

PS. Its not bad coding, just his style :wink:
Wow.
Image
Being goth is a disease.
Zigen




Miner Socialist Snitch! Coagulator

Posts: 1654
Joined: Thu Jun 02, 2005 8:37 pm
Contact:

Post by Zigen »

hmmmmmmmmmmm :shock:
coding is a bit complex..
User avatar
TheTyckoMan




Artisan Socialist Decryptor Droplet

Posts: 854
Joined: Fri Apr 02, 2004 11:22 am
Location: Tea co not Tie co...

Post by TheTyckoMan »

it's funny though =P but yes when you make something you should label it well, not something like "int killmatt" =P
Sweetness.......Visual Security: 9-block IP Identification
"Teenagers, plus anonymity, plus microphone = idiot."-Bungie
high6




Snitch!

Posts: 451
Joined: Sun Feb 13, 2005 6:09 am

Post by high6 »

wow for a second there i thought u guys where yelling at me lol and some how got my code...

btw tjc wats a good way to load the tagnames...

i do a loop until it finds a null byte but i was wondering if there was a faster way.
User avatar
MasterChief2829




Critic Blacksmith

Posts: 1184
Joined: Sun Dec 26, 2004 2:18 pm

Post by MasterChief2829 »

Great app, but this thread is getting annoying for being in the h2 downloads section lol Should be in Utilites.
Image
Shalted




Eureka Translator

Posts: 565
Joined: Wed Nov 17, 2004 8:41 am
Location: Vancouver, BC This is where people put their modding team because they feel important.
Contact:

Post by Shalted »

CLuis wrote:
Shalted wrote:I personally love pokes style of coding, I would never release the source to something if it had that many curses. It is a good read, if you dont know how some minor things work.

PS. Its not bad coding, just his style :wink:
Wow.
I really hope that wasnt meant as an insult, I wasnt implying I code like that. I code fairly well, it may just be a hobby, but I try to do it properly and the best I can. If you wanted me to point out the various flaws in DM's source I would:

Arrays Created with a large constant.
Ex. new int Meta[10000];
Used as a buffer for meta.
It should be
new int Meta[SizeOfMeta];
or in C:
int *Meta;
Meta=malloc(SizeOfMeta);
//Do some stuff
free(Meta);
Also arrays are not freed(deleted)
and alot of variables are named with curses

There are more, but I dont like pointing out flaws in other peoples hard work. It may sound like an after school special but, If you dont have something nice to say, dont say it at all.
Awaiting connection...
tjc2k4




Construct Socialist Golden Age Magic Era
Pi Coagulator Eureka Pyre
Literarian 100

Posts: 150
Joined: Wed Nov 12, 2003 3:21 am

Post by tjc2k4 »

high6 wrote:wow for a second there i thought u guys where yelling at me lol and some how got my code...

btw tjc wats a good way to load the tagnames...

i do a loop until it finds a null byte but i was wondering if there was a faster way.
The method you're using is the same way that most of the major editors I've seen do it, there are other methods if you want to do it differently though..

For example, you could go to the file table index, read the (relative) offsets of each string, then go there and read until null, or you could calculate the string size by reading the relative offset of a string and the next string and finding the difference, then go to the offset and read that number of characters...
The only reason I could see for doing this would be if you wanted to read the entire string table in at once then chop it up or if someone took out all the null spaces or something, I guess.
Really I don't really know what advantage you'd get here, but it'd be a different method.. also I suppose if you calculated lengths of strings & offsets and read that way, your program would have a better chance of opening messed up maps, but only assuming they mess up the file table and not the index, but if they messed up the string index, you'd be SOL.. :P
Blah blah blah
high6




Snitch!

Posts: 451
Joined: Sun Feb 13, 2005 6:09 am

Post by high6 »

i was just thinking about loading all the bytes and split them by the null byte but is there a way to tell how long it is?
Last edited by high6 on Thu Nov 17, 2005 5:47 pm, edited 1 time in total.
link_36p





Posts: 110
Joined: Wed Oct 27, 2004 6:50 pm
Contact:

Post by link_36p »

tjc2k4 wrote:
Anyway, if I had to take a guess, I'd assume it's the calculations being wrong (just a guess; unorganized codes makes it easier to make computational mistakes, and what I've seen of DarkMatter seemed rather messy), rather than halo interpreting specially, but I could be completely wrong.
I would imagine that halo 2 interpets them the same, but i know a little C# and after staring the the sbsp viewer soucre for about a hour it looks like it renders itemc with the exact same method (not programming type of method) as the other objects, which seem to be perfect. But as you said its pokes messy "style" and i probelly overlook something. Anyways ur apps dont really have bugs, exept i remember that insolence sometimes randomly froze, but all value editing, recursive tag moving, all other things nice and fast error free.
Post Reply