Difference between revisions of "GetBlob"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) |
Shadlington (Talk | contribs) |
||
Line 2: | Line 2: | ||
Returns a reference to the [[CBlob]] with the given index in the list of blobs that currently exist. | Returns a reference to the [[CBlob]] with the given index in the list of blobs that currently exist. | ||
</onlyinclude> | </onlyinclude> | ||
− | <syntaxhighlight lang="cpp"> | + | <syntaxhighlight lang="cpp">CBlob@ getBlob(u32 index)</syntaxhighlight> |
Probably not required unless looping through all blobs for some reason, in which case something like this might work: | Probably not required unless looping through all blobs for some reason, in which case something like this might work: | ||
Line 9: | Line 9: | ||
for ( int i = 0; i < [[getBlobsSize]](); i++ ) | for ( int i = 0; i < [[getBlobsSize]](); i++ ) | ||
{ | { | ||
− | + | CBlob@ blob = getBlob(i); | |
// Do something to the blob | // Do something to the blob | ||
} | } |
Revision as of 15:49, 15 August 2012
Returns a reference to the CBlob with the given index in the list of blobs that currently exist.
CBlob@ getBlob(u32 index)
Probably not required unless looping through all blobs for some reason, in which case something like this might work:
for ( int i = 0; i < [[getBlobsSize]](); i++ ) { CBlob@ blob = getBlob(i); // Do something to the blob }