fr1kin

GetMaterials

Mar 18th, 2011
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. LUA_FUNCTION( GetMaterials )
  2. {
  3. // Materials
  4. int size = m_pMatSystem->GetNumMaterials();
  5. int list = m_pMatSystem->FirstMaterial();
  6.  
  7. ILuaObject* table = g_Lua->GetNewTable();
  8.  
  9. while ( ++list != size )
  10. {
  11. IMaterial* used_list = m_pMatSystem->GetMaterial(list);
  12.  
  13. table->SetMember(list + 1, used_list);
  14. }
  15. g_Lua->Push(table);
  16. return 1;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment