Sir R. M8gic1an
2009-06-14 18:50:12
I'll make this short as I am not in the mood to write atm :p
Many people have been using srl_GetBitmap(NumberHere) , which is not advisable and is subject to break in the near future.
instead of doing srl_GetBitmap(1) for iron, i'd advise you to use srl_GetBitmap(bmp_Ore_Iron) for several reasons.
It's easier for you to check if you are using the right one, it's easier for others to check, and by calling the constant rather than the number you are sure to always get the right one.
Why do I say this now? Because bitmaps are constantly being added to bitmaps.scar , which means that the numbers change around.
for those of you who usually do
Also, i am in the proccess of updating srl_GetBitmap to avoid future problems with indexes.
Just so you get an idea :)
So yeah… the faster you guys change your scripts around, the faster we can easily add new bitmaps without fear of breaking your scripts ;)
~RM
Many people have been using srl_GetBitmap(NumberHere) , which is not advisable and is subject to break in the near future.
const
bmp_Ore_Clay = 0;
bmp_Ore_Iron = 1;
bmp_Ore_Copper = 2;
bmp_Ore_Tin = 3;
bmp_Ore_Coal = 4;
bmp_Ore_Silver = 5;
bmp_Ore_Gold = 6;
bmp_Ore_Mithril = 7;
bmp_Ore_Adamant = 8;
bmp_Ore_Runite = 9;
instead of doing srl_GetBitmap(1) for iron, i'd advise you to use srl_GetBitmap(bmp_Ore_Iron) for several reasons.
It's easier for you to check if you are using the right one, it's easier for others to check, and by calling the constant rather than the number you are sure to always get the right one.
Why do I say this now? Because bitmaps are constantly being added to bitmaps.scar , which means that the numbers change around.
for those of you who usually do
for i:= 0 to 9 do
BMP[i] := srl_GetBitmap(i)
//don't do it. if new bitmaps get added, they get added with the last integer,
// so you may actually end up loading ALL (or nearly all) the bmps
BMP[0] := srl_GetBitmap(bmp_Ore_Clay);
BMP[1] := srl_GetBitmap(bmp_Ore_Copper);
//is it really that hard to copy paste, change the number and the last word?
Also, i am in the proccess of updating srl_GetBitmap to avoid future problems with indexes.
//WriteLn('Loading new bitmap: '+IntToStr(ID));
case ID of
bmp_Ore_Iron :
Result := BitmapFromString(7, 3, 'beNrTUzZTknTUkPPSU/YzUI' + //Iron_Ore [1-02-09]
'UgIBso4qqtABEMMlbHKQgAiK4Mlg==');
bmp_Ore_Copper:
Result := BitmapFromString(7, 3, 'beNorN50frbE1Q+90icn1' + //Copper_Ore [11-03-08]
'avObtSB0oth4bbLOvlyDC+Wm9xos79RZAAWBbKCywwVGQAZQBIiA6' +
'i8AALhDHow=');
bmp_Ore_Tin:
Result := BitmapFromString(7, 3, 'beNqrrEiMiirMzGwoL+uoq+t' + //Tin_Ore [11-03-08]
'sqAeiutKSnNTU8vz8psqK7qZGIAIKtlRVAZVVFhYCBYFcoCBQfRMA' +
'rDwd+Q==');
bmp_Ore_Coal:
Result := BitmapFromString(7, 3, 'beNqzUFNVlTTQVzAxUba0UI' + //Coal_Ore [11-03-08]
'MgIBsuYmujCUQQcWRlUEEAcXUL2Q==');
bmp_Ore_Silver :
Result := BitmapFromString(7, 3, 'beNqbt6qsrKGra+qsWcuW' + //Silver_Ore [11-03-08]
'LNmwdNmm5cs3z5y5tLm5d+LEOXPnrVq1etvKlVuA4vPnr+7pmT512' +
'kIgAygCRED1cwHOSCc3');
bmp_Ore_Gold:
Result := BitmapFromString(7, 3, 'beNpbLDm1Snhdn9jRhZIXVk' + //Gold_Ore [11-03-08]
'ldXgNCh+dLrOgU3TVD/PRSydubpK+ukwYKAtkbJ4rtnSUBZABFgAi' +
'o/gQA2BsfeA==');
Just so you get an idea :)
So yeah… the faster you guys change your scripts around, the faster we can easily add new bitmaps without fear of breaking your scripts ;)
~RM