quick question : copies or references?
BlitzMax Forums/BlitzMax Programming/quick question : copies or references?
| ||
Hello. Consider the following code: incbin "Tree01.bmp" global tree_im = loadimage("incbin::Tree01.bmp") type TreeType field id:int field im:Timage method CreateTree() local tree:Treetype = new treetype tree.id = 1 tree.im = tree_im end method end type Am I creating a new image or do I just have a reference to tree_im? Goodbye. |
| ||
It's a reference to tree_im. |
| ||
Hello. Ta, oh noodle of knowledge :o) Goodbye. |
| ||
You might need tree_im to be TImage as well. |