Clarify API usage

IconAddress makes no sense, points to the start of the banner, with the icon directly following,
This commit is contained in:
2016-06-30 09:15:05 -07:00
parent 4d9bb795b9
commit 369d2cc23f
3 changed files with 16 additions and 16 deletions

View File

@@ -17,7 +17,6 @@ int main()
mc.setPublic(f, true);
mc.setCanCopy(f, true);
mc.setCanMove(f, true);
mc.setIconAddress(f, mc.commentAddress(f) + 64);
}
if (f)
@@ -26,16 +25,17 @@ int main()
mc.setIconFormat(f, 0, kabufuda::EImageFormat::C8);
mc.setIconSpeed(f, 0, kabufuda::EAnimationSpeed::Middle);
const char* test = "Metroid Prime B is Cool";
size_t len = strlen(test);
mc.seek(f, 0, kabufuda::SeekOrigin::Begin);
mc.write(f, test, len + 1);
uint16_t derp = 1234;
mc.seek(f, 1, kabufuda::SeekOrigin::End);
mc.write(f, &derp, 2);
mc.seek(f, -2, kabufuda::SeekOrigin::Current);
mc.read(f, &derp, 2);
std::cout << derp << std::endl;
mc.seek(f, 4, kabufuda::SeekOrigin::Begin);
mc.setCommentAddress(f, 4);
std::string comment("Metroid Prime PC Edition");
mc.write(f, comment.c_str(), comment.length());
mc.seek(f, 32 - comment.length(), kabufuda::SeekOrigin::Current);
comment = "Metroid Prime PC Is Cool";
mc.write(f, comment.c_str(), comment.length());
mc.seek(f, 32 - comment.length(), kabufuda::SeekOrigin::Current);
mc.setImageAddress(f, mc.tell(f));
if (mc.copyFileTo(f, mc2))
printf("Copy succeeded!\n");
else