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

Function titleIndexArg

common/script/checkpoint_api.cpp:76–84  ·  view source on GitHub ↗

A catalog index (ScriptHost::titleCount: the Save list plus the extdata-only titles) — a script gets one from titles_count()/title_find().

Source from the content-addressed store, hash-verified

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

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