MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / titleIndexArg

Function titleIndexArg

common/script/checkpoint_api.cpp:75–83  ·  view source on GitHub ↗

A catalog index, the same index space as the Save list — a script gets one from titles_count()/title_find().

Source from the content-addressed store, hash-verified

73 // A catalog index, the same index space as the Save list — a script gets
74 // one from titles_count()/title_find().
75 int titleIndexArg(const ScriptArgs& args, int i)
76 {
77 const int idx = args.num(i);
78 const int count = host().titleCount();
79 if (idx < 0 || idx >= count) {
80 args.fail("argument %d is title index %d, out of range (%d titles)", i + 1, idx, count);
81 }
82 return idx;
83 }
84
85 HostTitle titleArg(const ScriptArgs& args, int i)
86 {

Callers 3

titleArgFunction · 0.85
ckpt_title_backup_pathFunction · 0.85
ckpt_sav_openFunction · 0.85

Calls 3

numMethod · 0.80
failMethod · 0.80
titleCountMethod · 0.45

Tested by

no test coverage detected