exercise #3 instructions

24
Slide 1 Exercise #3 instructions Download & unzip CosmicProtector Slide 2 Create a new Code::Blocks project Slide 3 Remove main.cpp from project Slide 4 Add source files Slide 5 Add include files Slides 7-10 Add liballegro, libogg, libvorbis libraries Slides 11-16 Open cosmic_protector.cpp source file Slide 17 Make the application as a GUI app Slide 18-19 Build the game Slide 20 Copy the data folder Slide 21-22 Run the game Slide 23-24

Upload: others

Post on 22-Mar-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Slide 1

Exercise #3 instructionsDownload & unzip CosmicProtector Slide 2

Create a new Code::Blocks project Slide 3

Remove main.cpp from project Slide 4

Add source files Slide 5

Add include files Slides 7-10

Add liballegro, libogg, libvorbis libraries Slides 11-16

Open cosmic_protector.cpp source file Slide 17

Make the application as a GUI app Slide 18-19

Build the game Slide 20

Copy the data folder Slide 21-22

Run the game Slide 23-24

Slide 2 Download CosmicProtector zipped archivefrom the class web site.Extract into its own folder

Create a new Code::Blocks Console C++ project in the target folder withthe exact same name as the unzipped folder

Slide 3

Slide 4

Remove main.cpp file from theproject

Slide 5

Add src files from inside the

cosmic_protector folder

1 Enter the cosmic_protector folder2 Enter the src folder

3 Ctrl-A – select all files in src folder4 Click 'Open' button to add all src files

5 Confirm under Projects Tab

Slide 6

Right click on the CosmicProtector project

Select 'Build options'

see the following pages

Slide 7

1 Project build options 2 Compiler Settings

3 Check box for:Target x86 (32 bit) [-m32]

Slide 8

1 Project build options

2 Compiler Search directories tab

3 Add folder

4 in the Cosmic Protector folder

5 Add include folder

...next slide

Slide 9

Add the include folder 'No' as a relative path

Confirm proper addition as a Compiler search pathfor project 'include' files

Slide 10

1 Right click CosmicProtector project again2 Select project build options,3 Select the 'Linker settings' tab4 this time add the libraries for allegro ...see next slide

Slide 11

1 Browse to the C:\TDM-GCC-64\lib folder2 Highlight all the liballegro libraries

3 click 'Open' button

Slide 12

'No' as a relative path for all the libraries

Confirm the correct addition of all the libraries

Slide 13

Same steps to add the libogglibraries

1 Linker settings 'Add' button

2 C:\TDM-GCC-64\lib folder

3 highlight libogg libraries click 'Open' button

4 – No as a relative path

Slide 14

1 Linker settings 'Add' button

2 C:\TDM-GCC-64\lib folder

3 highlight all the libvorbis libraries click 'Open' button

4 – No as a relative path

Same steps to add the libvorbis libraries

Slide 15

Slide 16

All the added link libraries should show in the Linker settings tab

Open cosmic_protector.cpp source file'main' is located on line #50

Slide 17

Make the application a GUI application

1 right click CosmicProtector project

2 select 'Properties'

Slide 18

Project optionsBuild targets tab

select GUI applicatioin

click 'OK' button

Slide 19

Build the project

Slide 20

Use 'Windows explorer' to copy the data folderfrom the project folderinto the 'bin/Release/ folder with theprogram .exe …. next slide

Slide 21

Slide 22

Now run the game,

make a screen copy

and submit as

Exercise 3

Slide 23

This is the expected screen shot to turn in. Include Code::Blocks and source tree in the image

Slide 24