loadCanvas This function currently takes a single parameter, which is the current canvas. The new version of this functi
Posted: Thu May 05, 2022 1:33 pm
loadCanvas This function currently takes a single parameter, which is the current canvas. The new version of this function will need an additional parameter: the name and path of the file to be read. This is because the new function will not read from the keyboard, and so it won't be getting the filename from the user. Instead, the filename will be formed in another function (either main, or loadClips), and passed as a parameter to the loadCanvas. The new function will need to return a Boolean value to indicate if the file was successfully loaded or not. This is because the new function cannot print error messages or success messages to the screen. Again, printing will be done either in main, or loadClips.
133 134 135 Ebool loadClips (List& clips, char filename[]) 136 { 137 // loads the clips from your desired animation 138 // if user loads "box", this function will also load box-1, box-2 and etc. // don't forget to update clipCount as well 139 140 // test this function with "walk" and "tunnel" animation 141 142 return true; 143 w**** }
133 134 135 Ebool loadClips (List& clips, char filename[]) 136 { 137 // loads the clips from your desired animation 138 // if user loads "box", this function will also load box-1, box-2 and etc. // don't forget to update clipCount as well 139 140 // test this function with "walk" and "tunnel" animation 141 142 return true; 143 w**** }