[Toxic-general]At last...I can say "Work in progress"
Status: Pre-Alpha
Brought to you by:
tokugawa
|
From: Pawel R. <tok...@wp...> - 2001-11-19 18:29:03
|
After long break.........
Q: How to include media reference in SVM ?
A: Create a universal "Shared Resource Loader" (SRL)
So.. in current prototype SRL will manage graphics and sounds.
This is about 100 code lines.....and I like it.
Here we go...... (an example)
///////////////
SRL_drv* srl = SRL_Create(5,Load,Fre);
/* 5 - no. of slot resources, Load - function to load resource, Free - function to free resource*/
SRL_AssignResId(srl, 3, "B");
/* resource named "B" will be nr. 3 */
SRL_AssignResId(srl, 2, "A");
SRL_AssignResId(srl, 4, "W");
printf("pointer of res.3 is %u\n",(int)SRL_GetResById(srl, 3));
/* prints pointer of B in memory */
SRL_AssignResId(srl, 20, "B");
/* Here "B" will be NOT loaded... only "ref" will be changed form 3 to 20 */
printf("pointer of res.20 is %u\n",(int)SRL_GetResById(srl, 3));
/* also prints pointer of B in memory */
SRL_Free(srl);
///////////////
Now I have to implement keyword "resource" in SVM language
Tokugawa
/me is digging in code......
|