Merge remote-tracking branch 'origin/master' into LevelSystemAndSuch

This commit is contained in:
PlatinumSkink
2015-10-22 15:51:05 +02:00
30 changed files with 24928 additions and 1961 deletions
+12
View File
@@ -0,0 +1,12 @@
# Blender MTL File: 'Bricks.blend'
# Material Count: 1
newmtl Material.004
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd InkBrickTexture.png
+513
View File
@@ -0,0 +1,513 @@
# Blender v2.75 (sub 0) OBJ File: 'Bricks.blend'
# www.blender.org
mtllib InkBrick.mtl
o OriginalBrick.015_Cube.028
v 0.416882 0.151013 0.189181
v 0.383459 0.157800 0.197587
v 0.427922 0.161606 0.161784
v 0.383459 0.180000 0.161784
v 0.432779 0.125616 0.202365
v 0.383459 0.126000 0.215784
v 0.450000 0.126000 0.161784
v -0.416882 0.151013 0.189181
v 0.000000 0.157800 0.197587
v -0.383459 0.157800 0.197587
v -0.427922 0.161606 0.161784
v 0.000000 0.180000 0.161784
v -0.383459 0.180000 0.161784
v -0.432779 0.125616 0.202365
v 0.000000 0.126000 0.215784
v -0.383459 0.126000 0.215784
v -0.450000 0.126000 0.161784
v 0.427922 0.161606 0.000000
v 0.416882 0.151013 -0.189181
v 0.383459 0.180000 0.000000
v 0.383459 0.157800 -0.197587
v 0.427922 0.161606 -0.161784
v 0.383459 0.180000 -0.161784
v 0.450000 0.126000 0.000000
v 0.432779 0.125616 -0.202365
v 0.383459 0.126000 -0.215784
v 0.450000 0.126000 -0.161784
v 0.000000 0.180000 0.000000
v -0.427922 0.161606 0.000000
v -0.416882 0.151013 -0.189181
v 0.000000 0.157800 -0.197587
v -0.383459 0.180000 0.000000
v -0.383459 0.157800 -0.197587
v -0.427922 0.161606 -0.161784
v 0.000000 0.180000 -0.161784
v -0.383459 0.180000 -0.161784
v -0.450000 0.126000 0.000000
v -0.432779 0.125616 -0.202365
v 0.000000 0.126000 -0.215784
v -0.383459 0.126000 -0.215784
v -0.450000 0.126000 -0.161784
v 0.416882 -0.151013 0.189181
v 0.383459 -0.157800 0.197587
v 0.427922 -0.161606 0.161784
v 0.383459 -0.180000 0.161784
v 0.432779 -0.125616 0.202365
v 0.383459 -0.126000 0.215784
v 0.450000 -0.126000 0.161784
v 0.432723 0.000000 0.202132
v 0.383459 0.000000 0.215784
v 0.450000 0.000000 0.161784
v -0.416882 -0.151013 0.189181
v 0.000000 -0.157800 0.197587
v -0.383459 -0.157800 0.197587
v -0.427922 -0.161606 0.161784
v 0.000000 -0.180000 0.161784
v -0.383459 -0.180000 0.161784
v -0.432779 -0.125616 0.202365
v 0.000000 -0.126000 0.215784
v -0.383459 -0.126000 0.215784
v -0.450000 -0.126000 0.161784
v -0.432723 0.000000 0.202132
v 0.000000 0.000000 0.215784
v -0.383459 0.000000 0.215784
v -0.450000 0.000000 0.161784
v 0.427922 -0.161606 0.000000
v 0.416882 -0.151013 -0.189181
v 0.383459 -0.180000 0.000000
v 0.383459 -0.157800 -0.197587
v 0.427922 -0.161606 -0.161784
v 0.383459 -0.180000 -0.161784
v 0.450000 -0.126000 0.000000
v 0.432779 -0.125616 -0.202365
v 0.383459 -0.126000 -0.215784
v 0.450000 -0.126000 -0.161784
v 0.450000 0.000000 0.000000
v 0.432723 0.000000 -0.202132
v 0.383459 0.000000 -0.215784
v 0.450000 0.000000 -0.161784
v 0.000000 -0.180000 0.000000
v -0.427922 -0.161606 0.000000
v -0.416882 -0.151013 -0.189181
v 0.000000 -0.157800 -0.197587
v -0.383459 -0.180000 0.000000
v -0.383459 -0.157800 -0.197587
v -0.427922 -0.161606 -0.161784
v 0.000000 -0.180000 -0.161784
v -0.383459 -0.180000 -0.161784
v -0.450000 -0.126000 0.000000
v -0.432779 -0.125616 -0.202365
v 0.000000 -0.126000 -0.215784
v -0.383459 -0.126000 -0.215784
v -0.450000 -0.126000 -0.161784
v -0.450000 0.000000 0.000000
v -0.432723 0.000000 -0.202132
v 0.000000 0.000000 -0.215784
v -0.383459 0.000000 -0.215784
v -0.450000 0.000000 -0.161784
vt 0.736296 0.734058
vt 0.500643 0.743520
vt 0.500362 0.637947
vt 0.837408 0.612007
vt 0.834584 0.645864
vt 0.730556 0.620368
vt 0.734629 0.582637
vt 0.749262 0.590630
vt 0.500288 0.610193
vt 0.755018 0.568012
vt 0.839541 0.583855
vt 0.717484 0.591376
vt 0.712524 0.570102
vt 0.500224 0.586196
vt 0.735447 0.565260
vt 0.734762 0.501989
vt 0.756709 0.501913
vt 0.500002 0.502775
vt 0.708830 0.502077
vt 0.842604 0.501613
vt 0.264945 0.735621
vt 0.270081 0.621896
vt 0.166203 0.648090
vt 0.163195 0.614255
vt 0.265807 0.584195
vt 0.282998 0.592819
vt 0.160910 0.586119
vt 0.245341 0.569708
vt 0.251218 0.592286
vt 0.264896 0.566824
vt 0.287844 0.571513
vt 0.243294 0.503622
vt 0.265242 0.503551
vt 0.291174 0.503466
vt 0.157399 0.503902
vt 0.500934 0.853308
vt 0.941713 0.642142
vt 0.951578 0.604167
vt 0.968122 0.623010
vt 0.501012 0.882459
vt 0.738745 0.848046
vt 0.931097 0.581575
vt 0.932938 0.607778
vt 0.955207 0.583085
vt 0.985107 0.598851
vt 0.739681 0.902895
vt 0.501079 0.907860
vt 0.935388 0.501282
vt 0.963040 0.501182
vt 0.741078 0.990924
vt 0.501311 0.995378
vt 0.999949 0.501047
vt 0.059065 0.645100
vt 0.048991 0.607196
vt 0.067650 0.610678
vt 0.263101 0.849623
vt 0.069348 0.584464
vt 0.032552 0.626152
vt 0.015434 0.602112
vt 0.262456 0.904477
vt 0.045246 0.586140
vt 0.036960 0.504291
vt 0.064611 0.504202
vt 0.261526 0.992513
vt 0.000049 0.504410
vt 0.499642 0.367606
vt 0.499361 0.262038
vt 0.735045 0.269934
vt 0.729910 0.383652
vt 0.833769 0.357438
vt 0.836784 0.391268
vt 0.734188 0.421348
vt 0.716998 0.412727
vt 0.499716 0.395359
vt 0.839075 0.419400
vt 0.754653 0.435831
vt 0.748775 0.413256
vt 0.735100 0.438717
vt 0.712155 0.434032
vt 0.499780 0.419355
vt 0.263722 0.271498
vt 0.162621 0.393515
vt 0.165454 0.359662
vt 0.269461 0.385180
vt 0.265384 0.422906
vt 0.250754 0.414912
vt 0.244996 0.437526
vt 0.160482 0.421664
vt 0.282529 0.414171
vt 0.287486 0.435443
vt 0.264565 0.440282
vt 0.499070 0.152257
vt 0.940896 0.360393
vt 0.950979 0.398289
vt 0.932321 0.394814
vt 0.736888 0.155940
vt 0.498993 0.123107
vt 0.930630 0.421027
vt 0.967411 0.379329
vt 0.984535 0.403359
vt 0.498925 0.097707
vt 0.737533 0.101089
vt 0.954730 0.419342
vt 0.498693 0.010195
vt 0.738463 0.013059
vt 0.058336 0.363344
vt 0.048459 0.401312
vt 0.031922 0.382463
vt 0.261274 0.157517
vt 0.068933 0.423912
vt 0.067099 0.397709
vt 0.044823 0.422391
vt 0.014928 0.406612
vt 0.260338 0.102671
vt 0.258941 0.014648
vt 0.739249 0.877387
vt 0.262753 0.878967
vt 0.737237 0.126597
vt 0.260770 0.128177
vn 0.194900 0.980800 0.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 0.961700 0.273900
vn 0.647300 0.762200 0.000000
vn 0.178700 0.949500 0.257800
vn 0.457300 0.661600 0.594300
vn 0.631200 0.737600 0.239800
vn 0.000000 0.694500 0.719500
vn 0.939500 0.276000 0.202600
vn 0.961700 0.274000 0.000000
vn 0.151600 0.685100 0.712500
vn 0.135500 0.258500 0.956400
vn 0.000000 0.256900 0.966400
vn 0.632300 0.305000 0.712100
vn 0.658300 0.000000 0.752800
vn 0.979700 0.000000 0.200600
vn 0.000000 0.000000 1.000000
vn 0.134200 0.000000 0.990900
vn 1.000000 0.000000 0.000000
vn -0.194900 0.980800 0.000000
vn -0.178700 0.949500 0.257800
vn -0.647300 0.762200 0.000000
vn -0.457300 0.661600 0.594300
vn -0.151600 0.685100 0.712500
vn -0.961700 0.274000 0.000000
vn -0.939500 0.276000 0.202600
vn -0.631200 0.737600 0.239800
vn -0.632300 0.305000 0.712100
vn -0.135500 0.258500 0.956400
vn -0.979700 0.000000 0.200600
vn -0.658300 0.000000 0.752800
vn -0.134200 0.000000 0.990900
vn -1.000000 0.000000 0.000000
vn 0.000000 0.961700 -0.273900
vn 0.178700 0.949500 -0.257800
vn 0.457300 0.661600 -0.594300
vn 0.151600 0.685100 -0.712500
vn 0.000000 0.694500 -0.719500
vn 0.939500 0.276000 -0.202600
vn 0.631200 0.737600 -0.239800
vn 0.632300 0.305000 -0.712100
vn 0.135500 0.258500 -0.956400
vn 0.000000 0.256900 -0.966400
vn 0.979700 0.000000 -0.200600
vn 0.658300 0.000000 -0.752800
vn 0.134200 0.000000 -0.990900
vn 0.000000 0.000000 -1.000000
vn -0.178700 0.949500 -0.257800
vn -0.457300 0.661600 -0.594300
vn -0.631200 0.737600 -0.239800
vn -0.939500 0.276000 -0.202600
vn -0.151600 0.685100 -0.712500
vn -0.135500 0.258500 -0.956400
vn -0.632300 0.305000 -0.712100
vn -0.658300 0.000000 -0.752800
vn -0.979700 0.000000 -0.200600
vn -0.134200 0.000000 -0.990900
vn 0.000000 -0.961700 0.273900
vn 0.000000 -1.000000 0.000000
vn 0.194900 -0.980800 0.000000
vn 0.178700 -0.949500 0.257800
vn 0.647300 -0.762200 0.000000
vn 0.457300 -0.661600 0.594300
vn 0.151600 -0.685100 0.712500
vn 0.000000 -0.694500 0.719500
vn 0.961700 -0.274000 0.000000
vn 0.939500 -0.276000 0.202600
vn 0.631200 -0.737600 0.239800
vn 0.632300 -0.305000 0.712100
vn 0.135500 -0.258500 0.956400
vn 0.000000 -0.256900 0.966400
vn -0.194900 -0.980800 0.000000
vn -0.647300 -0.762200 0.000000
vn -0.178700 -0.949500 0.257800
vn -0.457300 -0.661600 0.594300
vn -0.631200 -0.737600 0.239800
vn -0.939500 -0.276000 0.202600
vn -0.961700 -0.274000 0.000000
vn -0.151600 -0.685100 0.712500
vn -0.135500 -0.258500 0.956400
vn -0.632300 -0.305000 0.712100
vn 0.000000 -0.961700 -0.273900
vn 0.178700 -0.949500 -0.257800
vn 0.457300 -0.661600 -0.594300
vn 0.631200 -0.737600 -0.239800
vn 0.000000 -0.694500 -0.719500
vn 0.939500 -0.276000 -0.202600
vn 0.151600 -0.685100 -0.712500
vn 0.135500 -0.258500 -0.956400
vn 0.000000 -0.256900 -0.966400
vn 0.632300 -0.305000 -0.712100
vn -0.178700 -0.949500 -0.257800
vn -0.457300 -0.661600 -0.594300
vn -0.151600 -0.685100 -0.712500
vn -0.939500 -0.276000 -0.202600
vn -0.631200 -0.737600 -0.239800
vn -0.632300 -0.305000 -0.712100
vn -0.135500 -0.258500 -0.956400
usemtl Material.004
s 1
f 20/1/1 28/2/2 12/3/3
f 18/4/4 20/5/1 4/6/5
f 1/7/6 3/8/7 4/6/5
f 4/6/5 12/3/3 9/9/8
f 3/8/7 7/10/9 24/11/10
f 1/7/6 2/12/11 6/13/12
f 9/9/8 15/14/13 6/13/12
f 1/7/6 5/15/14 7/10/9
f 5/15/14 49/16/15 51/17/16
f 15/14/13 63/18/17 50/19/18
f 5/15/14 6/13/12 50/19/18
f 7/10/9 51/17/16 76/20/19
f 12/3/3 28/2/2 32/21/20
f 13/22/21 32/23/20 29/24/22
f 8/25/23 10/26/24 13/22/21
f 9/9/8 12/3/3 13/22/21
f 37/27/25 17/28/26 11/29/27
f 8/25/23 14/30/28 16/31/29
f 16/31/29 15/14/13 9/9/8
f 17/28/26 14/30/28 8/25/23
f 65/32/30 62/33/31 14/30/28
f 64/34/32 63/18/17 15/14/13
f 14/30/28 62/33/31 64/34/32
f 94/35/33 65/32/30 17/28/26
f 35/36/34 28/2/2 20/1/1
f 23/37/35 20/5/1 18/4/4
f 19/38/36 21/39/37 23/37/35
f 31/40/38 35/36/34 23/41/35
f 24/11/10 27/42/39 22/43/40
f 19/38/36 25/44/41 26/45/42
f 26/46/42 39/47/43 31/40/38
f 27/42/39 25/44/41 19/38/36
f 79/48/44 77/49/45 25/44/41
f 78/50/46 96/51/47 39/47/43
f 25/44/41 77/49/45 78/52/46
f 76/20/19 79/48/44 27/42/39
f 32/21/20 28/2/2 35/36/34
f 29/24/22 32/23/20 36/53/48
f 30/54/49 34/55/50 36/53/48
f 36/56/48 35/36/34 31/40/38
f 34/55/50 41/57/51 37/27/25
f 30/54/49 33/58/52 40/59/53
f 31/40/38 39/47/43 40/60/53
f 30/54/49 38/61/54 41/57/51
f 38/61/54 95/62/55 98/63/56
f 39/47/43 96/51/47 97/64/57
f 38/61/54 40/59/53 97/65/57
f 41/57/51 98/63/56 94/35/33
f 56/66/58 80/67/59 68/68/60
f 45/69/61 68/70/60 66/71/62
f 42/72/63 43/73/64 45/69/61
f 53/74/65 56/66/58 45/69/61
f 72/75/66 48/76/67 44/77/68
f 42/72/63 46/78/69 47/79/70
f 47/79/70 59/80/71 53/74/65
f 48/76/67 46/78/69 42/72/63
f 51/17/16 49/16/15 46/78/69
f 50/19/18 63/18/17 59/80/71
f 46/78/69 49/16/15 50/19/18
f 76/20/19 51/17/16 48/76/67
f 84/81/72 80/67/59 56/66/58
f 81/82/73 84/83/72 57/84/74
f 52/85/75 55/86/76 57/84/74
f 57/84/74 56/66/58 53/74/65
f 55/86/76 61/87/77 89/88/78
f 52/85/75 54/89/79 60/90/80
f 53/74/65 59/80/71 60/90/80
f 52/85/75 58/91/81 61/87/77
f 58/91/81 62/33/31 65/32/30
f 59/80/71 63/18/17 64/34/32
f 58/91/81 60/90/80 64/34/32
f 61/87/77 65/32/30 94/35/33
f 68/68/60 80/67/59 87/92/82
f 66/71/62 68/70/60 71/93/83
f 67/94/84 70/95/85 71/93/83
f 71/96/83 87/92/82 83/97/86
f 70/95/85 75/98/87 72/75/66
f 67/94/84 69/99/88 74/100/89
f 83/97/86 91/101/90 74/102/89
f 67/94/84 73/103/91 75/98/87
f 73/103/91 77/49/45 79/48/44
f 91/101/90 96/104/47 78/105/46
f 73/103/91 74/100/89 78/52/46
f 75/98/87 79/48/44 76/20/19
f 87/92/82 80/67/59 84/81/72
f 88/106/92 84/83/72 81/82/73
f 82/107/93 85/108/94 88/106/92
f 83/97/86 87/92/82 88/109/92
f 89/88/78 93/110/95 86/111/96
f 82/107/93 90/112/97 92/113/98
f 92/114/98 91/101/90 83/97/86
f 93/110/95 90/112/97 82/107/93
f 98/63/56 95/62/55 90/112/97
f 97/115/57 96/104/47 91/101/90
f 90/112/97 95/62/55 97/65/57
f 94/35/33 98/63/56 93/110/95
f 4/6/5 20/1/1 12/3/3
f 3/8/7 18/4/4 4/6/5
f 2/12/11 1/7/6 4/6/5
f 2/12/11 4/6/5 9/9/8
f 18/4/4 3/8/7 24/11/10
f 5/15/14 1/7/6 6/13/12
f 2/12/11 9/9/8 6/13/12
f 3/8/7 1/7/6 7/10/9
f 7/10/9 5/15/14 51/17/16
f 6/13/12 15/14/13 50/19/18
f 49/16/15 5/15/14 50/19/18
f 24/11/10 7/10/9 76/20/19
f 13/22/21 12/3/3 32/21/20
f 11/29/27 13/22/21 29/24/22
f 11/29/27 8/25/23 13/22/21
f 10/26/24 9/9/8 13/22/21
f 29/24/22 37/27/25 11/29/27
f 10/26/24 8/25/23 16/31/29
f 10/26/24 16/31/29 9/9/8
f 11/29/27 17/28/26 8/25/23
f 17/28/26 65/32/30 14/30/28
f 16/31/29 64/34/32 15/14/13
f 16/31/29 14/30/28 64/34/32
f 37/27/25 94/35/33 17/28/26
f 23/41/35 35/36/34 20/1/1
f 22/43/40 23/37/35 18/4/4
f 22/43/40 19/38/36 23/37/35
f 21/116/37 31/40/38 23/41/35
f 18/4/4 24/11/10 22/43/40
f 21/39/37 19/38/36 26/45/42
f 21/116/37 26/46/42 31/40/38
f 22/43/40 27/42/39 19/38/36
f 27/42/39 79/48/44 25/44/41
f 26/46/42 78/50/46 39/47/43
f 26/45/42 25/44/41 78/52/46
f 24/11/10 76/20/19 27/42/39
f 36/56/48 32/21/20 35/36/34
f 34/55/50 29/24/22 36/53/48
f 33/58/52 30/54/49 36/53/48
f 33/117/52 36/56/48 31/40/38
f 29/24/22 34/55/50 37/27/25
f 38/61/54 30/54/49 40/59/53
f 33/117/52 31/40/38 40/60/53
f 34/55/50 30/54/49 41/57/51
f 41/57/51 38/61/54 98/63/56
f 40/60/53 39/47/43 97/64/57
f 95/62/55 38/61/54 97/65/57
f 37/27/25 41/57/51 94/35/33
f 45/69/61 56/66/58 68/68/60
f 44/77/68 45/69/61 66/71/62
f 44/77/68 42/72/63 45/69/61
f 43/73/64 53/74/65 45/69/61
f 66/71/62 72/75/66 44/77/68
f 43/73/64 42/72/63 47/79/70
f 43/73/64 47/79/70 53/74/65
f 44/77/68 48/76/67 42/72/63
f 48/76/67 51/17/16 46/78/69
f 47/79/70 50/19/18 59/80/71
f 47/79/70 46/78/69 50/19/18
f 72/75/66 76/20/19 48/76/67
f 57/84/74 84/81/72 56/66/58
f 55/86/76 81/82/73 57/84/74
f 54/89/79 52/85/75 57/84/74
f 54/89/79 57/84/74 53/74/65
f 81/82/73 55/86/76 89/88/78
f 58/91/81 52/85/75 60/90/80
f 54/89/79 53/74/65 60/90/80
f 55/86/76 52/85/75 61/87/77
f 61/87/77 58/91/81 65/32/30
f 60/90/80 59/80/71 64/34/32
f 62/33/31 58/91/81 64/34/32
f 89/88/78 61/87/77 94/35/33
f 71/96/83 68/68/60 87/92/82
f 70/95/85 66/71/62 71/93/83
f 69/99/88 67/94/84 71/93/83
f 69/118/88 71/96/83 83/97/86
f 66/71/62 70/95/85 72/75/66
f 73/103/91 67/94/84 74/100/89
f 69/118/88 83/97/86 74/102/89
f 70/95/85 67/94/84 75/98/87
f 75/98/87 73/103/91 79/48/44
f 74/102/89 91/101/90 78/105/46
f 77/49/45 73/103/91 78/52/46
f 72/75/66 75/98/87 76/20/19
f 88/109/92 87/92/82 84/81/72
f 86/111/96 88/106/92 81/82/73
f 86/111/96 82/107/93 88/106/92
f 85/119/94 83/97/86 88/109/92
f 81/82/73 89/88/78 86/111/96
f 85/108/94 82/107/93 92/113/98
f 85/119/94 92/114/98 83/97/86
f 86/111/96 93/110/95 82/107/93
f 93/110/95 98/63/56 90/112/97
f 92/114/98 97/115/57 91/101/90
f 92/113/98 90/112/97 97/65/57
f 89/88/78 94/35/33 93/110/95
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+22
View File
@@ -0,0 +1,22 @@
# Blender MTL File: 'Bricks.blend'
# Material Count: 2
newmtl Arm
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.250000 0.250000 0.250000
Ni 1.000000
d 1.000000
illum 2
map_Kd texture.png
newmtl Brick
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd White.png
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 839 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 KiB

+6 -6
View File
@@ -1,14 +1,14 @@
# Blender MTL File: 'None'
# Blender MTL File: 'Background.blend'
# Material Count: 1
newmtl Material.001
Ns 96.078431
Ns 92.156863
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Kd 0.512000 0.512000 0.512000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd Test/Brick_Diffuse.png
map_Bump Test/Brick_Normal.png
map_Ks Test/Brick_Specular.png
map_Kd Brunn_Diffuse.png
map_Bump Brunn_Normals.png
map_Ks Brunn_Specular.png
+90 -92
View File
@@ -1,11 +1,10 @@
# Blender v2.75 (sub 0) OBJ File: ''
# Blender v2.75 (sub 0) OBJ File: 'Background.blend'
# www.blender.org
mtllib Halfpipe.mtl
o Cylinder
v 0.000000 -2.908792 -1.000000
v 0.000000 2.908792 -1.000000
v 0.195090 -2.908792 -0.980785
v 0.195090 2.908792 -0.980785
v 0.000000 2.908792 -1.000000
v 0.382683 -2.908792 -0.923880
v 0.382683 2.908792 -0.923880
v 0.555570 -2.908792 -0.831470
@@ -19,11 +18,10 @@ v 0.923880 2.908792 -0.382683
v 0.980785 -2.908792 -0.195090
v 0.980785 2.908792 -0.195090
v 1.000000 -2.908792 -0.000000
v 1.000000 2.908792 -0.000000
v -1.000000 -2.908792 -0.000001
v -1.000000 2.908792 -0.000001
v 1.000000 2.908792 0.000000
v -0.980785 -2.908792 -0.195091
v -0.980785 2.908792 -0.195091
v -1.000000 2.908792 -0.000001
v -0.923879 -2.908792 -0.382684
v -0.923879 2.908792 -0.382684
v -0.831469 -2.908792 -0.555571
@@ -34,91 +32,91 @@ v -0.555569 -2.908792 -0.831470
v -0.555569 2.908792 -0.831470
v -0.382682 -2.908792 -0.923880
v -0.382682 2.908792 -0.923880
v -0.195089 -2.908792 -0.980786
v 0.000000 -2.908792 -1.000000
v -0.195089 2.908792 -0.980786
vt -1.156714 -1.419990
vt -1.158346 2.336063
vt -1.031779 2.336118
vt -1.283288 -1.420045
vt -1.284913 2.336008
vt -1.409862 -1.420100
vt -1.411480 2.335954
vt -1.536436 -1.420155
vt -1.538048 2.335899
vt 2.387354 -1.418355
vt 2.385534 2.337692
vt 2.512101 2.337753
vt 2.260782 -1.418416
vt 2.258967 2.337631
vt 2.134208 -1.418478
vt 2.132400 2.337570
vt 2.007634 -1.418538
vt 2.005832 2.337510
vt -0.144122 -1.419541
vt -0.145809 2.336510
vt -0.019241 2.336567
vt -0.270696 -1.419598
vt -0.272376 2.336454
vt -0.397270 -1.419654
vt -0.398943 2.336397
vt -0.523844 -1.419711
vt -0.525511 2.336341
vt -0.650418 -1.419767
vt -0.652078 2.336285
vt -0.776992 -1.419823
vt -0.778645 2.336229
vt -1.030140 -1.419935
vt -0.905212 2.336174
vt -0.903566 -1.419879
vt 2.513929 -1.418293
vt -0.017548 -1.419484
vn -0.098000 0.000000 0.995200
vn -0.290300 0.000000 0.956900
vn -0.471400 0.000000 0.881900
vn -0.634400 0.000000 0.773000
vn -0.773000 0.000000 0.634400
vn -0.881900 0.000000 0.471400
vn -0.956900 0.000000 0.290300
vn -0.995200 0.000000 0.098000
vn 0.995200 0.000000 0.098000
vn 0.956900 0.000000 0.290300
vn 0.881900 0.000000 0.471400
vn 0.773000 0.000000 0.634400
vn 0.634400 0.000000 0.773000
vn 0.471400 0.000000 0.881900
vn 0.098000 0.000000 0.995200
vn 0.290300 0.000000 0.956900
v -0.195089 -2.908792 -0.980787
v -1.000000 -2.908792 -0.000001
vt 0.572383 0.000045
vt 0.572387 1.000008
vt 0.515062 1.000008
vt 0.629704 0.000045
vt 0.629712 1.000008
vt 0.687026 0.000045
vt 0.687036 1.000008
vt 0.744348 0.000044
vt 0.744361 1.000008
vt 0.801670 0.000044
vt 0.801686 1.000007
vt 0.858992 0.000044
vt 0.859011 1.000007
vt 0.916314 0.000043
vt 0.916335 1.000006
vt 0.973636 0.000043
vt 0.973661 1.000006
vt 0.113808 0.000043
vt 0.113788 1.000007
vt 0.056463 1.000007
vt 0.171130 0.000044
vt 0.171113 1.000008
vt 0.228452 0.000044
vt 0.228437 1.000008
vt 0.285774 0.000044
vt 0.285762 1.000008
vt 0.343096 0.000045
vt 0.343087 1.000008
vt 0.400418 0.000045
vt 0.400412 1.000008
vt 0.515061 0.000045
vt 0.457737 1.000008
vt 0.457739 0.000045
vt 0.056486 0.000043
vn -0.098000 -0.000000 0.995200
vn -0.290300 -0.000000 0.956900
vn -0.471400 -0.000000 0.881900
vn -0.634400 -0.000000 0.773000
vn -0.773000 -0.000000 0.634400
vn -0.881900 -0.000000 0.471400
vn -0.956900 -0.000000 0.290300
vn -0.995200 -0.000000 0.098000
vn 0.995200 -0.000000 0.098000
vn 0.956900 -0.000000 0.290300
vn 0.881900 -0.000000 0.471400
vn 0.773000 -0.000000 0.634400
vn 0.634400 -0.000000 0.773000
vn 0.471400 -0.000000 0.881900
vn 0.098000 -0.000000 0.995200
vn 0.290300 -0.000000 0.956900
usemtl Material.001
s off
f 3/1/1 4/2/1 2/3/1
f 5/4/2 6/5/2 4/2/2
f 7/6/3 8/7/3 6/5/3
f 9/8/4 10/9/4 8/7/4
f 11/10/5 12/11/5 10/12/5
f 13/13/6 14/14/6 12/11/6
f 15/15/7 16/16/7 14/14/7
f 17/17/8 18/18/8 16/16/8
f 21/19/9 22/20/9 20/21/9
f 23/22/10 24/23/10 22/20/10
f 25/24/11 26/25/11 24/23/11
f 27/26/12 28/27/12 26/25/12
f 29/28/13 30/29/13 28/27/13
f 31/30/14 32/31/14 30/29/14
f 1/32/15 2/3/15 34/33/15
f 33/34/16 34/33/16 32/31/16
f 1/32/1 3/1/1 2/3/1
f 3/1/2 5/4/2 4/2/2
f 5/4/3 7/6/3 6/5/3
f 7/6/4 9/8/4 8/7/4
f 9/35/5 11/10/5 10/12/5
f 11/10/6 13/13/6 12/11/6
f 13/13/7 15/15/7 14/14/7
f 15/15/8 17/17/8 16/16/8
f 19/36/9 21/19/9 20/21/9
f 21/19/10 23/22/10 22/20/10
f 23/22/11 25/24/11 24/23/11
f 25/24/12 27/26/12 26/25/12
f 27/26/13 29/28/13 28/27/13
f 29/28/14 31/30/14 30/29/14
f 33/34/15 1/32/15 34/33/15
f 31/30/16 33/34/16 32/31/16
s 1
f 1/1/1 2/2/1 3/3/1
f 4/4/2 5/5/2 2/2/2
f 6/6/3 7/7/3 5/5/3
f 8/8/4 9/9/4 7/7/4
f 10/10/5 11/11/5 9/9/5
f 12/12/6 13/13/6 11/11/6
f 14/14/7 15/15/7 13/13/7
f 16/16/8 17/17/8 15/15/8
f 18/18/9 19/19/9 20/20/9
f 21/21/10 22/22/10 19/19/10
f 23/23/11 24/24/11 22/22/11
f 25/25/12 26/26/12 24/24/12
f 27/27/13 28/28/13 26/26/13
f 29/29/14 30/30/14 28/28/14
f 31/31/15 3/3/15 32/32/15
f 33/33/16 32/32/16 30/30/16
f 31/31/1 1/1/1 3/3/1
f 1/1/2 4/4/2 2/2/2
f 4/4/3 6/6/3 5/5/3
f 6/6/4 8/8/4 7/7/4
f 8/8/5 10/10/5 9/9/5
f 10/10/6 12/12/6 11/11/6
f 12/12/7 14/14/7 13/13/7
f 14/14/8 16/16/8 15/15/8
f 34/34/9 18/18/9 20/20/9
f 18/18/10 21/21/10 19/19/10
f 21/21/11 23/23/11 22/22/11
f 23/23/12 25/25/12 24/24/12
f 25/25/13 27/27/13 26/26/13
f 27/27/14 29/29/14 28/28/14
f 33/33/15 31/31/15 32/32/15
f 29/29/16 33/33/16 30/30/16
File diff suppressed because one or more lines are too long
+12
View File
@@ -0,0 +1,12 @@
# Blender MTL File: 'Sid.blend'
# Material Count: 1
newmtl Derp
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd SquidTexture.png
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.
+44 -14
View File
@@ -86,6 +86,8 @@
#include "GUI/Button.h"
#include "Game/GUI/MainMenu.h"
#include "Game/GUI/HUD.h"
#include "Game/GUI/ELoadingFrameComplete.h"
#include "Game/GUI/LoadingFrame.h"
namespace dd
{
@@ -94,9 +96,15 @@ class Engine
{
public:
Engine(int argc, char* argv[]) {
auto config = ResourceManager::Load<ConfigFile>("Config.ini");
Engine(int argc, char* argv[])
{
ResourceManager::RegisterType<Texture>("Texture");
ResourceManager::RegisterType<Model>("Model");
ResourceManager::RegisterType<Sound>("Sound");
ResourceManager::RegisterType<ConfigFile>("ConfigFile");
ResourceManager::LoadPreloadsFromFile();
auto config = ResourceManager::Load<ConfigFile>("Config.ini");
LOG_LEVEL = static_cast<_LOG_LEVEL>(config->GetValue<int>("Debug.LogLevel", 1));
m_EventBroker = std::make_shared<EventBroker>();
@@ -114,15 +122,11 @@ public:
m_FrameStack = new GUI::Frame(m_EventBroker.get());
m_FrameStack->Width = 675;
m_FrameStack->Height = 1080;
if (config->GetValue<bool>("Debug.SkipStory", false)) {
Events::GameStart e;
m_EventBroker->Publish(e);
auto hud = new GUI::HUD(m_FrameStack, "HUD");
}
else {
auto menu = new GUI::MainMenu(m_FrameStack, "MainMenu");
}
m_MainMenu = new GUI::MainMenu(m_FrameStack, "MainMenu");
m_MainMenu->Hide();
m_LoadingFrame = new GUI::LoadingFrame(m_FrameStack, "Loading");
m_LoadingFrame->SetTexture("Textures/GUI/Loading.png");
PreloadAllTheShit();
m_InputManager = std::make_shared<InputManager>(m_Renderer->Window(), m_EventBroker);
@@ -216,15 +220,28 @@ public:
//auto particleEmitter= m_World->AddComponent<Components::Emitter>(Pe);
//EVENT_SUBSCRIBE_MEMBER(m_EGameStart, &Engine::OnGameStart);
m_EGameStart = decltype(m_EGameStart)(std::bind(&Engine::OnGameStart, this, std::placeholders::_1));
m_EventBroker->Subscribe(m_EGameStart);
m_ELoadingFrameComplete = decltype(m_ELoadingFrameComplete)(std::bind(&Engine::OnLoadingFrameComplete, this, std::placeholders::_1));
m_EventBroker->Subscribe(m_ELoadingFrameComplete);
m_LastTime = glfwGetTime();
}
void PreloadAllTheShit()
{
if (ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<bool>("Debug.SkipPreload", false)) {
m_LoadingFrame->Hide();
m_MainMenu->Show();
return;
}
for (auto& pair : ResourceManager::GetPreloads()) {
m_LoadingFrame->AddResource(pair.first, pair.second);
}
m_LoadingFrame->Preload();
}
bool Running() const { return !glfwWindowShouldClose(m_Renderer->Window()); }
void Tick()
@@ -424,6 +441,8 @@ public:
private:
std::shared_ptr<EventBroker> m_EventBroker;
GUI::Frame* m_FrameStack = nullptr;
GUI::MainMenu* m_MainMenu = nullptr;
GUI::LoadingFrame* m_LoadingFrame = nullptr;
std::shared_ptr<Renderer> m_Renderer;
RenderQueueCollection m_RendererQueue;
std::shared_ptr<InputManager> m_InputManager;
@@ -453,6 +472,17 @@ private:
return true;
};
EventRelay<Engine, Events::LoadingFrameComplete> m_ELoadingFrameComplete;
bool OnLoadingFrameComplete(const Events::LoadingFrameComplete& event)
{
if (event.FrameName == "Loading") {
event.Frame->Hide();
m_MainMenu->Show();
}
return true;
}
double m_LastTime;
};
+25 -82
View File
@@ -22,7 +22,9 @@
#include <string>
#include <functional>
#include <vector>
#include <set>
#include <unordered_map>
#include <fstream>
#include "Util/UnorderedMapPair.h"
#include "Util/Factory.h"
@@ -70,13 +72,8 @@ public:
return s;
}*/
/** Registers the factory function of a resource type
@tparam T Resource type.
@param factoryFunction Lambda function that creates a new instance of the resource.
*/
template <typename T>
static void RegisterType(std::function<Resource*(std::string)> factoryFunction);
static void RegisterType(std::string typeName);
/** Preloads a resource and caches it for future use
@@ -85,6 +82,7 @@ public:
*/
template <typename T>
static void Preload(std::string resourceName);
static void Preload(std::string resourceType, std::string resourceName);
/** Checks if a resource is in cache
@@ -101,14 +99,7 @@ public:
*/
template <typename T>
static T* Load(std::string resourceName, Resource* parent = nullptr);
/** Fetches a loaded resource
@tparam T Resource type.
@param resourceName Fully qualified name of the resource to fetch.
*/
template <typename T>
static T* Fetch(std::string resourceName);
static Resource* Load(std::string resourceType, std::string resourceName, Resource* parent = nullptr);
/** Reloads an already loaded resource, keeping its resource ID intact.
@@ -116,14 +107,19 @@ public:
@param resourceName Fully qualified name of the resource to reload.
*/
static void Reload(std::string resourceName);
static void LoadPreloadsFromFile();
static const std::set<std::pair<std::string, std::string>>& GetPreloads() { return m_Preloads; }
static void Update();
private:
static std::unordered_map<std::string, std::string> m_CompilerTypenameToResourceType;
static std::unordered_map<std::string, std::function<Resource*(std::string)>> m_FactoryFunctions; // type -> factory function
static std::unordered_map<std::pair<std::string, std::string>, Resource*> m_ResourceCache; // (type, name) -> resource
static std::unordered_map<std::string, Resource*> m_ResourceFromName; // name -> resource
static std::unordered_map<Resource*, Resource*> m_ResourceParents; // resource -> parent resource
static std::set<std::pair<std::string, std::string>> m_Preloads; // (type, name)
// TODO: Getters for IDs
static unsigned int m_CurrentResourceTypeID;
@@ -140,93 +136,40 @@ private:
static unsigned int GetNewResourceID(unsigned int typeID);
// Internal: Create a resource and cache it
template <typename T>
static T* CreateResource(std::string resourceName, Resource* parent);
static Resource* CreateResource(std::string resourceType, std::string resourceName, Resource* parent);
};
template <typename T>
T* ResourceManager::Load(std::string resourceName, Resource* parent /* = nullptr */)
{
auto resourceType = typeid(T).name();
auto it = m_ResourceCache.find(std::make_pair(resourceType, resourceName));
if (it != m_ResourceCache.end())
return static_cast<T*>(it->second);
if (m_Preloading) {
LOG_INFO("Preloading resource \"%s\"", resourceName.c_str());
} else {
LOG_WARNING("Hot-loading resource \"%s\"", resourceName.c_str());
}
return CreateResource<T>(resourceName, parent);
}
template <typename T>
T* ResourceManager::Fetch(std::string resourceName)
{
auto resourceType = typeid(T).name();
auto it = m_ResourceCache.find(std::make_pair(resourceType, resourceName));
if (it == m_ResourceCache.end())
{
LOG_ERROR("Failed to fetch resource \"%s\": Resource not loaded!", resourceName.c_str());
auto resourceTypename = typeid(T).name();
auto it = m_CompilerTypenameToResourceType.find(resourceTypename);
if (it == m_CompilerTypenameToResourceType.end()) {
LOG_ERROR("Failed to load resource \"%s\" of type \"%s\": type not registered", resourceName.c_str(), resourceTypename);
return nullptr;
} else
{
return static_cast<T*>(it->second);
}
return static_cast<T*>(Load(it->second, resourceName, parent));
}
template <typename T>
void ResourceManager::RegisterType(std::function<Resource*(std::string)> factoryFunction)
void ResourceManager::RegisterType(std::string typeName)
{
m_FactoryFunctions[typeid(T).name()] = factoryFunction;
m_CompilerTypenameToResourceType[typeid(T).name()] = typeName;
m_FactoryFunctions[typeName] = [](std::string resourceName) { return new T(resourceName); };
}
template <typename T>
void ResourceManager::Preload(std::string resourceName)
{
auto resourceType = typeid(T).name();
if (IsResourceLoaded(resourceType, resourceName))
{
LOG_WARNING("Attempted to preload resource \"%s\" multiple times!", resourceName.c_str());
auto resourceTypename = typeid(T).name();
auto it = m_CompilerTypenameToResourceType.find(resourceTypename);
if (it == m_CompilerTypenameToResourceType.end()) {
LOG_ERROR("Failed to load resource \"%s\" of type \"%s\": type not registered", resourceName.c_str(), resourceTypename);
return;
}
m_Preloading = true;
LOG_INFO("Preloading resource \"%s\"", resourceName.c_str());
CreateResource<T>(resourceName, nullptr);
m_Preloading = false;
}
template <typename T>
T* ResourceManager::CreateResource(std::string resourceName, Resource* parent)
{
const char* resourceType = typeid(T).name();
/*auto facIt = m_FactoryFunctions.find(resourceType);
if (facIt == m_FactoryFunctions.end())
{
LOG_ERROR("Failed to load resource \"%s\" of type \"%s\": Type not registered", resourceName.c_str(), resourceType);
return nullptr;
}*/
// Call the factory function
T* resource = new T(resourceName);
// Store IDs
resource->TypeID = GetTypeID(resourceType);
resource->ResourceID = GetNewResourceID(resource->TypeID);
// Cache
m_ResourceCache[std::make_pair(resourceType, resourceName)] = resource;
m_ResourceFromName[resourceName] = resource;
if (parent != nullptr)
{
m_ResourceParents[resource] = parent;
}
if (!boost::filesystem::is_directory(resourceName))
{
LOG_DEBUG("Adding watch for %s", resourceName.c_str());
m_FileWatcher.AddWatch(resourceName, fileWatcherCallback);
}
return resource;
Preload(it->second, resourceName);
}
}
+6 -10
View File
@@ -5,7 +5,6 @@
#include "GUI/Slider.h"
#include "Core/ResourceManager.h"
#include "Game/GUI/ELoadingFrameComplete.h"
#include "Sound/EPlaySound.h"
namespace dd
{
@@ -29,9 +28,9 @@ public:
m_Slider->X = Width / 2.f - m_Slider->Width / 2.f;
}
void AddTexturePreload(std::string resourceName)
void AddResource(std::string resourceType, std::string resourceName)
{
m_Items.push_back(resourceName);
m_Preload.push_back(std::make_pair(resourceType, resourceName));
}
void Preload()
@@ -48,18 +47,15 @@ public:
void Update(double dt) override
{
if (m_Preloading) {
ResourceManager::Preload<dd::Texture>(m_Items[m_CurrentItem]);
m_Slider->SetPercentage((m_CurrentItem + 1) / (float)m_Items.size());
ResourceManager::Preload(m_Preload[m_CurrentItem].first, m_Preload[m_CurrentItem].second);
m_Slider->SetPercentage((m_CurrentItem + 1) / (float)m_Preload.size());
m_CurrentItem++;
if (m_CurrentItem >= m_Items.size()) {
if (m_CurrentItem >= m_Preload.size()) {
m_Preloading = false;
dd::Events::LoadingFrameComplete e;
e.FrameName = Name();
e.Frame = this;
EventBroker->Publish(e);
Events::PlaySound se;
se.FilePath = "Sounds/jap-story.wav";
EventBroker->Publish(se);
}
}
}
@@ -67,7 +63,7 @@ public:
private:
bool m_Preloading = false;
int m_CurrentItem = 0;
std::vector<std::string> m_Items;
std::vector<std::pair<std::string, std::string>> m_Preload;
GUI::Slider* m_Slider = nullptr;
};
+14
View File
@@ -2,9 +2,11 @@
#define GUI_MAINMENU_H__
#include "GUI/TextureFrame.h"
#include "Game/GUI/LoadingFrame.h"
#include "Game/GUI/MainMenuMain.h"
#include "Game/GUI/MainMenuOptions.h"
#include "Core/EKeyUp.h"
#include "Game/EGameStart.h"
namespace dd
{
@@ -37,6 +39,18 @@ public:
//EVENT_SUBSCRIBE_MEMBER(m_EKeyUp, &MainMenu::OnKeyUp);
}
void Show() override
{
if (ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<bool>("Debug.SkipMenu", false)) {
Events::GameStart e;
EventBroker->Publish(e);
Hide();
auto hud = new GUI::HUD(BaseFrame, "HUD");
} else {
TextureFrame::Show();
}
}
private:
TextureFrame* m_LeftBanner;
MainMenuMain* m_MainMenuMain;
+1
View File
@@ -58,6 +58,7 @@ private:
if (event.Button == m_SquidoutButton) {
m_Parent->Hide();
auto story = new GUI::Story1(BaseFrame, "Story1");
story->Play();
}
return true;
+13 -43
View File
@@ -3,11 +3,11 @@
#include "Core/ResourceManager.h"
#include "Game/GUI/StoryboardFrame.h"
#include "Game/GUI/ELoadingFrameComplete.h"
#include "Game/GUI/LoadingFrame.h"
#include "Game/EGameStart.h"
#include "Core/EKeyDown.h"
#include "Game/GUI/HUD.h"
#include "Sound/EPlaySound.h"
#include "Sound/EStopSound.h"
namespace dd
{
@@ -20,37 +20,8 @@ public:
Story1(Frame* parent, std::string name)
: StoryboardFrame(parent, name)
{
EVENT_SUBSCRIBE_MEMBER(m_ELoadingFrameComplete, &Story1::OnLoadingFrameComplete);
EVENT_SUBSCRIBE_MEMBER(m_EKeyDown, &Story1::OnKeyDown);
m_LoadingFrame = new GUI::LoadingFrame(this, "Story1LoadingFrame");
m_LoadingFrame->SetTexture("Textures/GUI/Loading.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/Brunn1.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/Brunn2.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/Brunn3.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/Brunn4.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/Brunn5.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene1.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene2.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene3.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene4.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene5.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene6.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene7.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene8.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene9.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene10.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene11.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene12.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene13.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene14.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene15.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene16.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene17.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene18.png");
m_LoadingFrame->AddTexturePreload("Textures/Story/SubScene19.png");
m_LoadingFrame->Preload();
m_Spacebar = new TextureFrame(this, "ZZZSpacebar");
m_Spacebar->SetTexture("Textures/GUI/SpacebarSkip.png");
m_Spacebar->SetRight(Right() - 10);
@@ -196,6 +167,14 @@ public:
AddTransition(t);
}
virtual void Play() override
{
StoryboardFrame::Play();
Events::PlaySound se;
se.FilePath = "Sounds/jap-story.wav";
EventBroker->Publish(se);
}
void Update(double dt) override
{
StoryboardFrame::Update(dt);
@@ -209,7 +188,6 @@ public:
}
private:
GUI::LoadingFrame* m_LoadingFrame = nullptr;
TextureFrame* m_Spacebar = nullptr;
EventRelay<Frame, Events::KeyDown> m_EKeyDown;
@@ -220,25 +198,17 @@ private:
}
if (event.KeyCode == GLFW_KEY_SPACE) {
m_LoadingFrame->CancelPreload();
Events::GameStart e;
EventBroker->Publish(e);
Events::StopSound se;
se.FilePath = "Sounds/jap-story.wav";
EventBroker->Publish(se);
Hide();
auto hud = new GUI::HUD(BaseFrame, "HUD");
}
return true;
}
EventRelay<Frame, Events::LoadingFrameComplete> m_ELoadingFrameComplete;
bool OnLoadingFrameComplete(const Events::LoadingFrameComplete& event)
{
if (event.FrameName == "Story1LoadingFrame") {
event.Frame->Hide();
m_Spacebar->Hide();
Play();
}
return true;
}
};
}
+2 -2
View File
@@ -33,12 +33,12 @@ public:
m_Timeline.push_back(transition);
}
void Play()
virtual void Play()
{
m_Playing = true;
}
void Skip()
virtual void Skip()
{
m_Playing = false;
OnComplete();
+2
View File
@@ -33,6 +33,8 @@
#include "Game/CBall.h"
#include "Game/CProjectile.h"
#include "Sound/CCollisionSound.h"
#include "Rendering/CAnimation.h"
#include "Rendering/CSprite.h"
//#include "Core/Camera.h" Camera Component
+84
View File
@@ -19,10 +19,12 @@
#include "PrecompiledHeader.h"
#include "Core/ResourceManager.h"
std::unordered_map<std::string, std::string> dd::ResourceManager::m_CompilerTypenameToResourceType;
std::unordered_map<std::string, std::function<dd::Resource*(std::string)>> dd::ResourceManager::m_FactoryFunctions;
std::unordered_map<std::pair<std::string, std::string>, dd::Resource*> dd::ResourceManager::m_ResourceCache;
std::unordered_map<std::string, dd::Resource*> dd::ResourceManager::m_ResourceFromName;
std::unordered_map<dd::Resource*, dd::Resource*> dd::ResourceManager::m_ResourceParents;
std::set<std::pair<std::string, std::string>> dd::ResourceManager::m_Preloads; // (type, name)
unsigned int dd::ResourceManager::m_CurrentResourceTypeID = 0;
std::unordered_map<std::string, unsigned int> dd::ResourceManager::m_ResourceTypeIDs;
std::unordered_map<unsigned int, unsigned int> dd::ResourceManager::m_ResourceCount;
@@ -82,4 +84,86 @@ void dd::ResourceManager::fileWatcherCallback(std::string path, FileWatcher::Fil
void dd::ResourceManager::Update()
{
m_FileWatcher.Check();
}
void dd::ResourceManager::LoadPreloadsFromFile()
{
std::ifstream f("PreloadResources");
while (f.good()) {
std::string resourceType;
std::string resourceName;
f >> resourceType >> resourceName;
if (!resourceType.empty() && !resourceType.empty()) {
m_Preloads.insert(std::make_pair(resourceType, resourceName));
}
}
f.close();
}
void dd::ResourceManager::Preload(std::string resourceType, std::string resourceName)
{
if (IsResourceLoaded(resourceType, resourceName))
{
//LOG_WARNING("Attempted to preload resource \"%s\" multiple times!", resourceName.c_str());
return;
}
m_Preloading = true;
LOG_INFO("Preloading resource \"%s\"", resourceName.c_str());
CreateResource(resourceType, resourceName, nullptr);
m_Preloading = false;
}
dd::Resource* dd::ResourceManager::Load(std::string resourceType, std::string resourceName, dd::Resource* parent /*= nullptr*/)
{
auto it = m_ResourceCache.find(std::make_pair(resourceType, resourceName));
if (it != m_ResourceCache.end())
return it->second;
if (m_Preloading) {
LOG_INFO("Preloading resource \"%s\"", resourceName.c_str());
} else {
LOG_WARNING("Hot-loading resource \"%s\"", resourceName.c_str());
if (!resourceType.empty() && !resourceName.empty()) {
std::replace(resourceName.begin(), resourceName.end(), '\\', '/');
if (m_Preloads.find(std::make_pair(resourceType, resourceName)) == m_Preloads.end()) {
std::ofstream f("PreloadResources", std::ofstream::app);
f << resourceType << " " << resourceName << std::endl;
f.close();
m_Preloads.insert(std::make_pair(resourceType, resourceName));
}
}
}
return CreateResource(resourceType, resourceName, parent);
}
dd::Resource* dd::ResourceManager::CreateResource(std::string resourceType, std::string resourceName, dd::Resource* parent)
{
auto facIt = m_FactoryFunctions.find(resourceType);
if (facIt == m_FactoryFunctions.end())
{
LOG_ERROR("Failed to load resource \"%s\" of type \"%s\": type not registered", resourceName.c_str(), resourceType.c_str());
return nullptr;
}
// Call the factory function
Resource* resource = facIt->second(resourceName);
// Store IDs
resource->TypeID = GetTypeID(resourceType);
resource->ResourceID = GetNewResourceID(resource->TypeID);
// Cache
m_ResourceCache[std::make_pair(resourceType, resourceName)] = resource;
m_ResourceFromName[resourceName] = resource;
if (parent != nullptr)
{
m_ResourceParents[resource] = parent;
}
if (!boost::filesystem::is_directory(resourceName))
{
LOG_DEBUG("Adding watch for %s", resourceName.c_str());
m_FileWatcher.AddWatch(resourceName, fileWatcherCallback);
}
return resource;
}
File diff suppressed because it is too large Load Diff
+16 -10
View File
@@ -20,31 +20,36 @@ void dd::Systems::KrakenSystem::Initialize()
EntityID ent = m_World->CreateEntity();
auto transform = m_World->AddComponent<Components::Transform>(ent);
transform->Position = glm::vec3(50, 50, -10);
auto model = m_World->AddComponent<Components::Model>(ent);
model->ModelFile = "Models/Kraken/Body.dae";
auto animationComponent = m_World->AddComponent<Components::Animation>(ent);
animationComponent->Speed = 0.6f;
auto kraken = m_World->AddComponent<Components::Kraken>(ent);
std::shared_ptr<Components::RectangleShape> cCircle = m_World->AddComponent<Components::RectangleShape>(ent);
cCircle->Dimensions = glm::vec2(2, 4);
std::shared_ptr<Components::RectangleShape> cRect = m_World->AddComponent<Components::RectangleShape>(ent);
cRect->Dimensions = glm::vec2(10.f, 4.f);
//cCircle->Radius = 2;
std::shared_ptr<Components::Physics> cPhys = m_World->AddComponent<Components::Physics>(ent);
std::shared_ptr<Components::Template> cTemplate = m_World->AddComponent<Components::Template>(ent);
auto travels = m_World->AddComponent<Components::Travels>(ent);
travels->CurrentlyTraveling = false;
cPhys->CollisionType = CollisionType::Type::Static;
cPhys->GravityScale = 0.f;
cPhys->Category = CollisionLayer::Type::Brick;
cPhys->Mask = static_cast<CollisionLayer::Type>(CollisionLayer::Type::Ball | CollisionLayer::Type::Projectile | CollisionLayer::Type::Wall | CollisionLayer::LifeBuoy);
model->ModelFile = "Models/Test/Ball/Sid.obj";
transform->Position = glm::vec3(50, 50, -10);
std::shared_ptr<Components::Template> cTemplate = m_World->AddComponent<Components::Template>(ent);
auto travels = m_World->AddComponent<Components::Travels>(ent);
travels->CurrentlyTraveling = false;
//sound
auto collisionSound = m_World->AddComponent<Components::CollisionSound>(ent);
collisionSound->FilePath = "Sounds/Brick/LTTP_Boss_Hit.wav";
m_World->CommitEntity(ent);
m_KrakenTemplate = ent;
InitializeObjects();
}
@@ -227,6 +232,7 @@ bool dd::Systems::KrakenSystem::OnKrakenAppear(const dd::Events::KrakenAppear &e
m_World->RemoveComponent<Components::Template>(ent);
auto transform = m_World->GetComponent<Components::Transform>(ent);
transform->Position = event.Position;
transform->Position.y += 3.f;
m_KrakenBattle = true;
return true;
}
+8 -7
View File
@@ -61,8 +61,8 @@ void dd::Systems::LevelSystem::Initialize()
auto travels = m_World->AddComponent<Components::Travels>(t_halfPipe);
travels->CurrentlyTraveling = false;
auto model = m_World->AddComponent<Components::Model>(t_halfPipe);
model->ModelFile = "Models/Test/halfpipe/Halfpipe.obj";
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 1.f);
model->ModelFile = "Models/Halfpipe.obj";
//model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 1.f);
m_World->CommitEntity(t_halfPipe);
auto t_halfPipe2 = m_World->CloneEntity(t_halfPipe);
@@ -453,12 +453,13 @@ EntityID dd::Systems::LevelSystem::CreateBrick(int row, int line, glm::vec2 spac
} else if (typeInt == InkBlasterBrick) {
cBrick->Type = InkBlasterBrick;
auto type = m_World->AddComponent<Components::InkBlasterBrick>(brick);
//model->ModelFile = "Models/Brick/InkBrick.obj";
model->Color = glm::vec4(0.1f, 0.1f, 0.1f, 1.0f);
model->ModelFile = "Models/Brick/InkBrick.obj";
model->Color = glm::vec4(0.7f, 0.7f, 0.7f, 1.f);
} else if (typeInt == KrakenAttackBrick) {
cBrick->Type = KrakenAttackBrick;
auto type = m_World->AddComponent<Components::KrakenAttackBrick>(brick);
model->Color = glm::vec4(0.f, 0.5f, 1.0f, 1.0f);
model->ModelFile = "Models/Brick/KrakenBrick.obj";
} else if (typeInt == Kraken) {
Events::KrakenAppear e;
e.Position = transform->Position;
@@ -1193,11 +1194,11 @@ void dd::Systems::LevelSystem::GetNextLevel()
else if (m_CurrentLevel == 6) {
level =
{0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 100, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0};
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 100, 0, 0, 0 };
color =
{w, w, w, w, w, w, w,
w, w, w, w, w, w, w,
File diff suppressed because it is too large Load Diff
+4
View File
@@ -21,6 +21,10 @@
void dd::Renderer::Initialize()
{
ResourceManager::RegisterType<ShaderProgram>("ShaderProgram");
ResourceManager::RegisterType<VertexShader>("VertexShader");
ResourceManager::RegisterType<FragmentShader>("FragmentShader");
// Initialize GLFW
if (!glfwInit()) {
LOG_ERROR("GLFW: Initialization failed");