User Tools

Site Tools


notes:data:fall2023:projects:ttb0

This is an old revision of the document!


TTB0

Setting Up TTB0

Migrating Sprites Onto lab46 and PI

After creating your sprites, you will need to move them onto lab46 and possibly onto your PI. One way of doing this is using the scp command. To use the scp command use to following format:

scp FILENAME DESTINATION:PATH

Here is an example:

scp sprites.png username@lab46.g7n.org:~/src/fall2023/discrete/mpg0

If necessary, this is how you would get the desired file onto your PI:

scp sprites.png username@raspberrypi:~/src/fall2023/discrete/mpg0

Adding Sprites To Game

Once you have your sprites .png file on lab46 and on your PI it is now time to load them into the cartridge. To do this open your make.sh file.

Once in the make.sh file, add the following lines:

echo
echo Convert the PNG textures
echo --------------------------
png2vircon BreakoutTextures.png -o BreakoutTextures.vtex || abort_build

“BreakoutTextures.png” represents the name of your texture file.

After including the texture file in make.sh you also need to add it to your .xml file. To do so, open your .xml file and add the following:

    <textures>
        <texture path="BreakoutTextures.vtex" />
    </textures>

“BreakoutTextures” represents the name of your breakout texture file.

Once you have added your texture file to BOTH the make.sh and the .xml file your textures are loaded into the cartridge.

STRUCT

POINTERS

MALLOC

MALLOC’ED ARRAY

ACCESSING WITH POINTER ARITHMETIC

MALLOC’ED ARRAY OF STRUCTS

notes/data/fall2023/projects/ttb0.1694098613.txt.gz · Last modified: 2023/09/07 14:56 by wgates1