Skip to content

Update VideoApi to use LuaBind

Cluedrew Kenfar Ink requested to merge Cluedrew/solarus:lua-bind into dev

The main part is the usual and uninteresting translation to complete #1579 for the VideoApi.

And as usual I have inserted a few bits of clean-up. This didn't change any behaviour, it just saved some lines of code and hopefully improved some names.

  • CheckArg is now CheckStack. With the addition of the error context these are no longer actually checking the arguments, but Lua stack values whose (as shown by context) may have a more complex relationship to the actual arguments.
  • Removed check_arg and inlined all calls to directly reference CheckStack. Because it was about the same amount of work as renaming it to check_stack and saves a bunch of text in the declarations.
  • Removed unneeded CheckStack specialization. I believe specializations don't have to be forward declared like that because the templates are only really checked later. Anyways, I tried removing it and everything seemed to work.
  • NumFieldContext is now IndexContext. There may be a use for a numeric field context, but I think ValueContext might already cover that and it is used in places were the fields will probably be thought of as indexes anyways.
  • Inlined some using declarations. There were some using M = Martialling<T>;s that were only used once, inlining them fits comfortably on one line and I don't think the intermediate name M is doing much either.
  • I went through and wrapped any overflowing comments.

Merge request reports

Loading