Jump to content

Location info for functions on API tables

4 replies to this topic

#1 Lupus590

  • Members
  • 1,982 posts
  • LocationUK

Posted 26 July 2015 - 10:17 PM

Basically a column in the table which tells you the file path in the CC jar for the lua file which declares the function or if the function is declared in java.

I can start modifying the wiki pages myself (I've had a wiki account for a while now) but as this is a big thing I want a go ahead before doing it.

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 26 July 2015 - 11:59 PM

If I were going to do such a thing, I'd do it in the form of a link to file within one of the repos tracking the changes between builds. Eg.

#3 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 27 July 2015 - 04:31 AM

I don't think this is needed. Most of the APIs are easy to find anyway, s they are saved under the same name as themselves.

#4 Lupus590

  • Members
  • 1,982 posts
  • LocationUK

Posted 27 July 2015 - 07:54 AM

True, MKlegoman, but the OS API is a big exception. In my opinion, knowing a function is implemented java side will be useful. (My plan is an OS which overwrites rom files (with backup) - it will be distributed via a resource pack - this is why I want this information)

Edited by Lupus590, 27 July 2015 - 07:54 AM.

#5 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 27 July 2015 - 09:58 AM

Well, then someone would have to be tracking all of the functions and whether they were changed or not, because a change were a function is implemented Lua side (before it being Java side) might happen pretty silently and I'm pretty sure that that has happened before. Also, it depends on what you're classifying as a Java or Lua side function. If by Java you mean implemented in Java side then it would mean os.clock is not a Java function, but a Lua function. But if you mean Java function is a function which isn't defined in the rom files (nor bios.lua) then os.clock is a Java function and not a Lua function.

You can find which functions are pure-Java by tostring'ing them. In LuaJ, all pure-Java functions when converted to a string don't output something like 'function: 467aB86c', but rather their actual name. Try typing 'error' into Lua program.

Oh, looks like the CC's APIs just behave as if they were Lua-side APIs.

Edited by MKlegoman357, 27 July 2015 - 10:22 AM.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users