Skip to content

Commit

Permalink
Update README for 2020, remove old files
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Dec 7, 2020
1 parent 1d2a13d commit fb1c712
Show file tree
Hide file tree
Showing 58 changed files with 57 additions and 3,404 deletions.
Binary file removed Final_Project_Rules.pdf
Binary file not shown.
Binary file removed Final_Project_Rules_Eng.pdf
Binary file not shown.
68 changes: 53 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Allegro 5 Template for I2P(1)_2019
# Allegro 5 Template for I2P(1)_2020

We will use Allegro 5 in the final project.

## Administrative

- 12/02 (二) Allegro5 簡介
- 12/08 (Tue.) Allegro5 Intro

希望在黑客松前大家可以先把 Allegro5 在自己電腦上裝好。
You should finish installing and setting up Allegro5 on your own computer and practice the exercises before Hackathon.

- 12/14 (六) 09:00-20:00 Prof. Yang 黑客松 (占總成績 2%)
- 12/15 (日) 09:00-20:00 Prof. Hu 黑客松 (占總成績 2%)
- 01/13 (一) Demo, 詳情一週前會公布 (占總成績 13%)
- 12/19 (Sat.) 09:00-20:00 Hackathon for Prof. Yang's Class (grading 2%)
- 12/20 (Sun.) 09:00-20:00 Hackathon for Prof. Hu's Class (grading 2%)
- 01/18 (Mon.) Final Project Demo, details will be announced one week before (grading 13%)

Tasks: [tasks](/tasks), [task video](https://youtu.be/Araij6j6QME)
<!--
Exercises: [exercises](/Exercises), [exercise step-by-step video](https://youtu.be/Araij6j6QME)
-->

<!--
PPT: [allegro5_tutorial.pdf](/allegro5_tutorial.pdf)
-->

## Installation

Expand Down Expand Up @@ -64,6 +68,8 @@ Follow the steps [here](docs/README.md).

It can be used like videos after putting the library under your project folder.

- If you want to load MP3 audio, you can try out streaming as mentioned [here](https://github.com/liballeg/allegro_wiki/wiki/Allegro-Vivace).

- If you play multiple BGMs or sound effects at the same time, the `al_play_sample` could fail.

You can either:
Expand Down Expand Up @@ -119,13 +125,37 @@ Follow the steps [here](docs/README.md).

- `fopen is not safe ...` in Visual Studio

Download template again, or add `#define _CRT_SECURE_NO_DEPRECATE` at the top of your file.
- Add `#define _CRT_SECURE_NO_DEPRECATE`/`#define _CRT_SECURE_NO_WARNINGS` at the top of your `main.c` file.

- Or you can set it in the Project Settings.

![](docs/imgs/crt-secure-no-warnings.png)

- Cannot compile on Visual Studio. (`unresolved external symbol`...)

- Remember to check `Support C++ Desktop` when installing.

![](docs/imgs/install-cpp-support.png)

- When setting the configuration of Allegro5 plugins, make sure to set in `All Configurations` and `All Platforms`.

![](docs/imgs/visual-studio-all.png)

- When Visual Studio complains the Windows SDK Version / Platform Toolset is not found, choose any downloaded `Windows SDK Version` and any `Platform Toolset`. (Make sure the options you chose are installed in your computer)

![](docs/imgs/windows-sdk-version.png)

- Visual Studio cannot compile
![](docs/imgs/platform-toolset.png)

When setting the configuration of Allegro5 plugins, make sure to set in `All Configurations` and `All Platforms`.
- Cannot compile on Code::Blocks.

![](docs/imgs/visual-studio-all.png)
For Code::Blocks you should create a project following the tutorial above, and set the project settings to allow C++11.

![](docs/imgs/faq-cb-cpp11.png)

The settings are almost the same in other IDEs.

For `'abs(float&)' is ambiguous` you can change `abs` to `fabs`.

- File `allegro-5.0.10-monolith-mt-debug.dll` is missing in Code::Blocks

Expand Down Expand Up @@ -182,17 +212,25 @@ Follow the steps [here](docs/README.md).

- I want to hide the console window.

For Code::Blocks:

Set the build target type to `GUI application`.
For Code::Blocks, set the build target type to `GUI application`.

![](docs/imgs/faq-cb-gui.png)

For Visual Studio, set the `Subsystem` to `Windows (/SUBSYSTEM:WINDOWS)`.

![](docs/imgs/subsystem-windows.png)

For other IDEs there are also such settings.

- In Visual Studio, how to swap between the start up project in Exercises?

Right-click a project and `Set as StartUp Project` and recompile.

![](docs/imgs/default-startup.png)

### Installation on Mac OS

- There are OpenGL related bugs in newer version of XCode make sure to use XCode versions prior or equal to 10.3.
- **(This issue should not occur now)** There are OpenGL related bugs in newer version of XCode make sure to use XCode versions prior or equal to 10.3.

Or you can use a custom Makefile.

Expand Down
Binary file removed allegro5_tutorial.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ After finish installing, type:
brew install allegro
```

Open `XCode`, Create a new `MacOS` project, choose `Cocoa App`.
Open `XCode`, Create a new `MacOS` project, choose `App`.

Product Name type `allegro-test`, and for Organization Identifier, you can type anything you want. For language, choose `Objective-C`, and uncheck all other checkboxes.

Expand All @@ -143,19 +143,19 @@ cd /usr/local/Cellar
open .
```

Navigate to `allegro/5.2.4.0/lib/`
Navigate to `allegro/5.2.6.0/lib/`

Sort by `Modified date` and select all files that is modified today. (don't need to select the `pkgconfig` folder)

![](imgs/mac-lib.png)

Go back to XCode and click `General`

Drag the selected files into the `Linked Frameworks and Libraries`.
Drag the selected files into the `Frameworks, Libraries, and Embedded Content`.

![](imgs/mac-link.png)

Create `main.c` (`File > New > File... > C file`), uncheck the header checkbox.
Create `main.c` (`File > New > File... > C file`), uncheck `Also create a header file`.

Paste the code below to the file.

Expand Down
Binary file added docs/imgs/crt-secure-no-warnings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/default-startup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/faq-cb-cpp11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/install-cpp-support.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/platform-toolset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/subsystem-windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/windows-sdk-version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/Template (advanced)/S31-Night Prowler.ogg
Binary file not shown.
Loading

0 comments on commit fb1c712

Please sign in to comment.