Skip to content

Commit 5215916

Browse files
committed
Refactoring.
1 parent da04a3e commit 5215916

File tree

13 files changed

+26
-25
lines changed

13 files changed

+26
-25
lines changed

Makefile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ $(TARGET): src/raylib.f90 src/raylib_util.f90
2121
$(FC) $(FFLAGS) -c src/raylib_util.f90
2222
$(AR) $(ARFLAGS) $(TARGET) raylib.o raylib_camera.o raylib_math.o raylib_util.o
2323

24-
examples: camera castle cubes flags fly font keys map truck window
24+
examples: camera castle cubes flags camera3d font keys map truck window
2525

2626
camera: $(TARGET) examples/camera.f90
2727
$(FC) $(FFLAGS) $(LDFLAGS) -o camera examples/camera.f90 $(TARGET) $(LDLIBS)
2828

29+
camera3d: $(TARGET) examples/camera3d.f90
30+
$(FC) $(FFLAGS) $(LDFLAGS) -o camera3d examples/camera3d.f90 $(TARGET) $(LDLIBS)
31+
2932
castle: $(TARGET) examples/castle.f90
3033
$(FC) $(FFLAGS) $(LDFLAGS) -o castle examples/castle.f90 $(TARGET) $(LDLIBS)
3134

@@ -35,9 +38,6 @@ cubes: $(TARGET) examples/cubes.f90
3538
flags: $(TARGET) examples/flags.f90
3639
$(FC) $(FFLAGS) $(LDFLAGS) -o flags examples/flags.f90 $(TARGET) $(LDLIBS)
3740

38-
fly: $(TARGET) examples/fly.f90
39-
$(FC) $(FFLAGS) $(LDFLAGS) -o fly examples/fly.f90 $(TARGET) $(LDLIBS)
40-
4141
font: $(TARGET) examples/font.f90
4242
$(FC) $(FFLAGS) $(LDFLAGS) -o font examples/font.f90 $(TARGET) $(LDLIBS)
4343

@@ -58,11 +58,12 @@ clean:
5858
if [ `ls -1 *.o 2>/dev/null | wc -l` -gt 0 ]; then rm *.o; fi
5959
if [ -e $(TARGET) ]; then rm $(TARGET); fi
6060
if [ -e camera ]; then rm camera; fi
61+
if [ -e camera3d ]; then rm camera3d; fi
6162
if [ -e castle ]; then rm castle; fi
62-
if [ -e cubes ]; then rm cubes; fi
63-
if [ -e flags ]; then rm flags; fi
64-
if [ -e fly ]; then rm fly; fi
65-
if [ -e keys ]; then rm keys; fi
66-
if [ -e map ]; then rm map; fi
67-
if [ -e truck ]; then rm truck; fi
63+
if [ -e cubes ]; then rm cubes; fi
64+
if [ -e flags ]; then rm flags; fi
65+
if [ -e font ]; then rm font; fi
66+
if [ -e keys ]; then rm keys; fi
67+
if [ -e map ]; then rm map; fi
68+
if [ -e truck ]; then rm truck; fi
6869
if [ -e window ]; then rm window; fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ $ ./example
9494
More examples can be found in `examples/`:
9595

9696
* **camera** renders a cube in 3-D.
97+
* **camera3d** renders a 3-D scene, with keyboard and mouse controls.
9798
* **castle** renders a 3-D model loaded from file.
9899
* **cubes** renders waving cubes.
99100
* **flags** shows window flags.
100-
* **fly** renders a 3-D scene, with keyboard and mouse controls.
101101
* **font** displays text using bitmap fonts.
102102
* **keys** demonstrates keyboard input.
103103
* **map** renders a height map.

examples/fly.f90 renamed to examples/camera3d.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! fly.f90
1+
! camera3d.f90
22
!
33
! Example program that shows a 3-D scene from first-person. Based on the raylib
44
! example `core_3d_camera_first_person.c`.

examples/font.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ program main
2626
call set_target_fps(60)
2727

2828
fonts = [ &
29-
load_font('share/alagard.png' // c_null_char), &
30-
load_font('share/pixelplay.png' // c_null_char), &
31-
load_font('share/mecha.png' // c_null_char), &
32-
load_font('share/setback.png' // c_null_char), &
33-
load_font('share/romulus.png' // c_null_char), &
34-
load_font('share/pixantiqua.png' // c_null_char), &
35-
load_font('share/alpha_beta.png' // c_null_char), &
36-
load_font('share/jupiter_crash.png' // c_null_char) &
29+
load_font('share/fonts/alagard.png' // c_null_char), &
30+
load_font('share/fonts/pixelplay.png' // c_null_char), &
31+
load_font('share/fonts/mecha.png' // c_null_char), &
32+
load_font('share/fonts/setback.png' // c_null_char), &
33+
load_font('share/fonts/romulus.png' // c_null_char), &
34+
load_font('share/fonts/pixantiqua.png' // c_null_char), &
35+
load_font('share/fonts/alpha_beta.png' // c_null_char), &
36+
load_font('share/fonts/jupiter_crash.png' // c_null_char) &
3737
]
3838

3939
messages = [ character(len=72) :: &

fpm.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ name = "camera"
2121
source-dir = "examples"
2222
main = "camera.f90"
2323

24+
[[executable]]
25+
name = "camera3d"
26+
source-dir = "examples"
27+
main = "camera3d.f90"
28+
2429
[[executable]]
2530
name = "castle"
2631
source-dir = "examples"
@@ -36,11 +41,6 @@ name = "flags"
3641
source-dir = "examples"
3742
main = "flags.f90"
3843

39-
[[executable]]
40-
name = "fly"
41-
source-dir = "examples"
42-
main = "fly.f90"
43-
4444
[[executable]]
4545
name = "font"
4646
source-dir = "examples"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)