inputting my data
Displaying 1-12 of 12 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
geronimo

hey, it would be awesome if you added data input formats, like 10h and 10b, to the compiler.

Posted on 2004-06-07 03:19:02

geronimo

also, have you considered the requirements for some sort of array initialising such ( a={3,4,5,6}; )?

Posted on 2004-06-08 09:56:51

blues_zodiakos

Yeesh, I wish you could do that. It would make one particular thing I'm trying to do much much easier.

Posted on 2004-06-09 12:05:44

RageCage

I wish I knew what you guys were talking about =p

Posted on 2004-06-09 14:05:04

geronimo

I'm talking about this :P

void Startup()
{
instrlen[0]=1;
instrlen[1]=2;
instrlen[2]=0;
instrlen[3]=0;
instrlen[4]=0;
instrlen[5]=2;
instrlen[6]=2;
instrlen[7]=0;
instrlen[8]=1;
instrlen[9]=2;
instrlen[10]=1;
instrlen[11]=0;
instrlen[12]=0;
instrlen[13]=3;
instrlen[14]=0;
instrlen[15]=0;

instrlen[16]=2;
instrlen[17]=2;
instrlen[18]=0;
instrlen[19]=0;
instrlen[20]=0;
instrlen[21]=2;
instrlen[22]=2;
instrlen[23]=0;
instrlen[24]=1;
instrlen[25]=3;
instrlen[26]=0;
instrlen[27]=0;
instrlen[28]=0;
instrlen[29]=3;
instrlen[30]=3;
instrlen[31]=0;

instrlen[32]=3;
instrlen[33]=2;
instrlen[34]=0;
instrlen[35]=0;
instrlen[36]=2;
instrlen[37]=2;
instrlen[38]=2;
instrlen[39]=0;
instrlen[40]=1;
instrlen[41]=2;
instrlen[42]=1;
instrlen[43]=0;
instrlen[44]=3;
instrlen[45]=3;
instrlen[46]=3;
instrlen[47]=0;

instrlen[48]=2;
instrlen[49]=2;
instrlen[50]=0;
instrlen[51]=0;
instrlen[52]=0;
instrlen[53]=2;
instrlen[54]=2;
instrlen[55]=0;
instrlen[56]=1;
instrlen[57]=3;
instrlen[58]=0;
instrlen[59]=0;
instrlen[60]=0;
instrlen[61]=3;
instrlen[62]=3;
instrlen[63]=0;

instrlen[64]=1;
instrlen[65]=2;
instrlen[66]=0;
instrlen[67]=0;
instrlen[68]=0;
instrlen[69]=2;
instrlen[70]=2;
instrlen[71]=0;
instrlen[72]=1;
instrlen[73]=2;
instrlen[74]=1;
instrlen[75]=0;
instrlen[76]=3;
instrlen[77]=3;
instrlen[78]=3;
instrlen[79]=0;

instrlen[80]=2;
instrlen[81]=2;
instrlen[82]=0;
instrlen[83]=0;
instrlen[84]=0;
instrlen[85]=2;
instrlen[86]=2;
instrlen[87]=0;
instrlen[88]=1;
instrlen[89]=3;
instrlen[90]=0;
instrlen[91]=0;
instrlen[92]=0;
instrlen[93]=3;
instrlen[94]=3;
instrlen[95]=0;

instrlen[96]=1;
instrlen[97]=2;
instrlen[98]=0;
instrlen[99]=0;
instrlen[100]=0;
instrlen[101]=2;
instrlen[102]=2;
instrlen[103]=0;
instrlen[104]=1;
instrlen[105]=2;
instrlen[106]=1;
instrlen[107]=0;
instrlen[108]=3;
instrlen[109]=3;
instrlen[110]=3;
instrlen[111]=0;

instrlen[112]=2;
instrlen[113]=2;
instrlen[114]=0;
instrlen[115]=0;
instrlen[116]=0;
instrlen[117]=2;
instrlen[118]=2;
instrlen[119]=0;
instrlen[120]=1;
instrlen[121]=3;
instrlen[122]=0;
instrlen[123]=0;
instrlen[124]=0;
instrlen[125]=3;
instrlen[126]=3;
instrlen[127]=0;

instrlen[128]=0;
instrlen[129]=2;
instrlen[130]=0;
instrlen[131]=0;
instrlen[132]=2;
instrlen[133]=2;
instrlen[134]=2;
instrlen[135]=0;
instrlen[136]=1;
instrlen[137]=0;
instrlen[138]=1;
instrlen[139]=0;
instrlen[140]=3;
instrlen[141]=3;
instrlen[142]=3;
instrlen[143]=0;

instrlen[144]=2;
instrlen[145]=2;
instrlen[146]=0;
instrlen[147]=0;
instrlen[148]=2;
instrlen[149]=2;
instrlen[150]=2;
instrlen[151]=0;
instrlen[152]=1;
instrlen[153]=3;
instrlen[154]=1;
instrlen[155]=0;
instrlen[156]=0;
instrlen[157]=3;
instrlen[158]=0;
instrlen[159]=0;

instrlen[160]=2;
instrlen[161]=2;
instrlen[162]=2;
instrlen[163]=0;
instrlen[164]=2;
instrlen[165]=2;
instrlen[166]=2;
instrlen[167]=0;
instrlen[168]=1;
instrlen[169]=2;
instrlen[170]=1;
instrlen[171]=0;
instrlen[172]=3;
instrlen[173]=3;
instrlen[174]=3;
instrlen[175]=0;

instrlen[176]=2;
instrlen[177]=2;
instrlen[178]=0;
instrlen[179]=0;
instrlen[180]=2;
instrlen[181]=2;
instrlen[182]=2;
instrlen[183]=0;
instrlen[184]=1;
instrlen[185]=3;
instrlen[186]=1;
instrlen[187]=0;
instrlen[188]=3;
instrlen[189]=3;
instrlen[190]=3;
instrlen[191]=0;

instrlen[192]=2;
instrlen[193]=2;
instrlen[194]=0;
instrlen[195]=0;
instrlen[196]=2;
instrlen[197]=2;
instrlen[198]=2;
instrlen[199]=0;
instrlen[200]=1;
instrlen[201]=2;
instrlen[202]=1;
instrlen[203]=0;
instrlen[204]=3;
instrlen[205]=3;
instrlen[206]=3;
instrlen[207]=0;

instrlen[208]=2;
instrlen[209]=2;
instrlen[210]=0;
instrlen[211]=0;
instrlen[212]=0;
instrlen[213]=2;
instrlen[214]=2;
instrlen[215]=0;
instrlen[216]=1;
instrlen[217]=3;
instrlen[218]=0;
instrlen[219]=0;
instrlen[220]=0;
instrlen[221]=3;
instrlen[222]=3;
instrlen[223]=0;

instrlen[224]=2;
instrlen[225]=2;
instrlen[226]=0;
instrlen[227]=0;
instrlen[228]=2;
instrlen[229]=2;
instrlen[230]=2;
instrlen[231]=0;
instrlen[232]=1;
instrlen[233]=2;
instrlen[234]=1;
instrlen[235]=0;
instrlen[236]=3;
instrlen[237]=3;
instrlen[238]=3;
instrlen[239]=0;

instrlen[240]=2;
instrlen[241]=2;
instrlen[242]=0;
instrlen[243]=0;
instrlen[244]=0;
instrlen[245]=2;
instrlen[246]=2;
instrlen[247]=0;
instrlen[248]=1;
instrlen[249]=3;
instrlen[250]=0;
instrlen[251]=0;
instrlen[252]=0;
instrlen[253]=3;
instrlen[254]=3;
instrlen[255]=0;

}

Posted on 2004-06-09 15:00:13

Omni

That looks nasty. Initializing arrays would still require you to type out all those values. Can't you find a way to mathematically make them in some sort of loop?

Posted on 2004-06-09 15:10:42

geronimo

i'm sure the truth-table method would yeild a somewhat short formula for producing instruction length, but v3 being a high level script language i figure using a lookup table is much faster.

Posted on 2004-06-09 16:43:52

Omni

Couldn't you use Truth table method to generate the Lookup table for you?

Note: I have only now discovered truth table on Google. I don't quite know what it actually IS yet.

Posted on 2004-06-09 16:49:22

Zip

Stop being lazy guys - it takes about five minutes to write a quick read-data-from-txt-file-thingy:
int TerrainMap[15][25];


int TerrainData;
TerrainData = FileOpen("TerrainMap.txm", 1);
for (y = 0; y < 15; y++)
{
for (x = 0; x < 25; x++)
{
TerrainMap[y][x] = FileReadWord(TerrainData);
PrintString((25*x)+50,(10*y)+200,screen,0,str(TerrainMap[y][x]));
Temp = FileReadByte(TerrainData);
Wait(0);
}
Temp = FileReadWord(TerrainData);
}
FileClose(TerrainData);


TerrainMap.txm:
05,05,11,09,00,07,13,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,
05,05,17,02,03,00,04,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,
05,05,05,05,06,01,19,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,05,
05,05,05,05,06,07,08,13,05,05,05,05,05,05,05,05,05,05,05,05,11,08,13,05,05,
13,05,05,11,09,00,00,04,05,05,05,05,05,05,05,05,05,11,13,05,06,00,04,05,05,
07,08,08,09,00,00,00,04,05,05,05,05,05,05,05,05,05,06,07,08,09,01,19,05,05,
00,00,00,00,00,00,00,07,13,05,05,05,11,08,13,05,11,09,00,00,00,04,05,05,05,
00,00,00,00,00,00,00,00,07,08,13,05,06,00,07,08,09,00,00,00,01,19,05,05,05,
00,00,01,02,03,00,00,00,00,00,04,11,09,00,00,00,00,00,00,00,07,13,05,11,08,
00,00,04,05,06,00,00,00,00,00,07,09,00,00,00,00,00,00,00,00,00,07,08,09,00,
00,00,07,13,17,02,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
00,00,00,04,05,05,06,00,00,00,00,00,00,00,00,00,00,01,03,00,00,00,00,00,00,
00,00,00,07,13,05,06,00,00,00,00,00,00,00,01,02,02,19,17,03,00,00,00,00,00,
00,00,00,00,07,08,09,00,00,00,00,00,00,01,19,05,05,05,05,06,00,00,00,00,00,
00,00,00,00,00,00,00,00,00,00,00,00,00,04,05,05,05,05,05,17,03,00,00,00,00;


Render Test 0.0 btw

Rar

Posted on 2004-06-09 19:39:20

geronimo

also, how about &= and |=? wouldn't that speed shit up?

a|=0x0F;

um, <<= and >>=? :D

Posted on 2004-06-10 07:49:57 (last edited on 2004-06-10 07:51:25)

Zip

Hey, ain't good code, just easy. Hell doesn't even return the same number you typed in - as I couldn't be bothered to read in strings then convert to int. But it works. For something you run once, that's not to bad.

Rar

Posted on 2004-06-10 11:05:16

geronimo

silly, i didn't even think of *= and /=

Posted on 2004-06-13 16:15:31


Displaying 1-12 of 12 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.