SRL Archive - OSR Help

Organize referencing?


Le Jingle

2012-05-29 17:26:40

Hi, I'm curious as how I'd best go about organizing a list of DTMs.

I was considering going about the lists' formation, the same way SRL goes about it's bmp's. However I was curious if there's a more liked / better method then it (the srl_getbitmap func).

putonajonny

2012-05-29 17:34:32

From: Le Jingle
Hi, I'm curious as how I'd best go about organizing a list of DTMs.

I was considering going about the lists' formation, the same way SRL goes about it's bmp's. However I was curious if there's a more liked / better method then it (the srl_getbitmap func).


Probably a GetDTM function with constants:

Const
DTM_Swordfish = 1;
DTM_Bowl = 2;
DTM_Bucket = 3;

Function GetDTM(Item : integer) : integer;
begin

Case Item of
DTM_Swordfish : Result := DTMFromString...;
DTM_Bowl : Result := DTMFromString...;
DTM_Bucket : Result := DTMFromString...;
end;

end;

Edit:
So basically yes, just like srl_getbitmap

Le Jingle

2012-05-29 17:46:46

ah okay, I'll try to do that then, thanks alot!

Le Jingle

2012-05-29 17:51:11

E: Another question, if I had a lot of Constants/DTMs, should I make a separate file for the constants?