diff --git a/Faceball2030/Editor.cpp b/Faceball2030/Editor.cpp index e11ebe0..29658fb 100644 --- a/Faceball2030/Editor.cpp +++ b/Faceball2030/Editor.cpp @@ -295,7 +295,8 @@ void Editor::OnTextEntryComplete(const std::string& sText) { MAP_SIZE = { (int)map[0].size(),(int)map.size() }; } else { - reEnableTextEntry = true; + game->TextEntryEnable(false); + promptState = PromptState::NONE; } }break; case PromptState::ENTER_WIDTH: { diff --git a/Faceball2030/Editor.h b/Faceball2030/Editor.h index bee07d7..fda6bb0 100644 --- a/Faceball2030/Editor.h +++ b/Faceball2030/Editor.h @@ -28,6 +28,7 @@ enum EnemyID { ISHOOT2, SHOOTME_ARMOR, ISHOOT_MAP, + ISHOOT2_SPEED, SONAR, POWERUP_ARMOR = 56, POWERUP_SPEED = 57, diff --git a/Faceball2030/assets/enemies/IShoot.png b/Faceball2030/assets/enemies/IShoot.png index 7faa4e0..b06088d 100644 Binary files a/Faceball2030/assets/enemies/IShoot.png and b/Faceball2030/assets/enemies/IShoot.png differ diff --git a/Faceball2030/assets/enemies/IShoot2.mtl b/Faceball2030/assets/enemies/IShoot2.mtl new file mode 100644 index 0000000..26644d3 --- /dev/null +++ b/Faceball2030/assets/enemies/IShoot2.mtl @@ -0,0 +1,11 @@ +# Exported from Wings 3D 2.2.9 +newmtl sphere1_auv +Ns 19.999999999999996 +d 1.0 +illum 2 +Kd 1.0 1.0 1.0 +Ka 0.0 0.0 0.0 +Ks 0.19 0.19 0.19 +Ke 0.0 0.0 0.0 +map_Kd sphere1_auv.png + diff --git a/Faceball2030/assets/enemies/IShoot2.obj b/Faceball2030/assets/enemies/IShoot2.obj new file mode 100644 index 0000000..2f8b618 --- /dev/null +++ b/Faceball2030/assets/enemies/IShoot2.obj @@ -0,0 +1,1016 @@ +# Exported from Wings 3D 2.2.9 +mtllib ShootMe2.mtl +o sphere1 +#242 vertices, 480 faces +v 1.8635555e-2 0.54405877 1.8653699e-16 +v 1.7217008e-2 0.54405877 7.1315183e-3 +v 1.3177328e-2 0.54405877 1.3177328e-2 +v 7.1315183e-3 0.54405877 1.7217008e-2 +v -4.2225566e-17 0.54405877 1.8635555e-2 +v -7.1315183e-3 0.54405877 1.7217008e-2 +v -1.3177328e-2 0.54405877 1.3177328e-2 +v -1.7217008e-2 0.54405877 7.1315183e-3 +v -1.8635555e-2 0.54405877 -2.0962365e-16 +v -1.7217008e-2 0.54405877 -7.1315183e-3 +v -1.3177328e-2 0.54405877 -1.3177328e-2 +v -7.1315183e-3 0.54405877 -1.7217008e-2 +v -1.3840307e-16 0.54405877 -1.8635555e-2 +v 7.1315183e-3 0.54405877 -1.7217008e-2 +v 1.3177328e-2 0.54405877 -1.3177328e-2 +v 1.7217008e-2 0.54405877 -7.1315183e-3 +v 3.6619905e-2 0.53220421 -8.7117731e-17 +v 3.3832380e-2 0.53220421 1.4013831e-2 +v 2.5894183e-2 0.53220421 2.5894183e-2 +v 1.4013831e-2 0.53220421 3.3832380e-2 +v 1.4320481e-16 0.53220421 3.6619905e-2 +v -1.4013831e-2 0.53220421 3.3832380e-2 +v -2.5894183e-2 0.53220421 2.5894183e-2 +v -3.3832380e-2 0.53220421 1.4013831e-2 +v -3.6619905e-2 0.53220421 -1.0478249e-16 +v -3.3832380e-2 0.53220421 -1.4013831e-2 +v -2.5894183e-2 0.53220421 -2.5894183e-2 +v -1.4013831e-2 0.53220421 -3.3832380e-2 +v -2.2626862e-16 0.53220421 -3.6619905e-2 +v 1.4013831e-2 0.53220421 -3.3832380e-2 +v 2.5894183e-2 0.53220421 -2.5894183e-2 +v 3.3832380e-2 0.53220421 -1.4013831e-2 +v 5.3303870e-2 0.50669821 7.5857612e-17 +v 4.9246355e-2 0.50669821 2.0398508e-2 +v 3.7691528e-2 0.50669821 3.7691528e-2 +v 2.0398508e-2 0.50669821 4.9246355e-2 +v 4.1999421e-18 0.50669821 5.3303870e-2 +v -2.0398508e-2 0.50669821 4.9246355e-2 +v -3.7691528e-2 0.50669821 3.7691528e-2 +v -4.9246355e-2 0.50669821 2.0398508e-2 +v -5.3303870e-2 0.50669821 -1.1745499e-16 +v -4.9246355e-2 0.50669821 -2.0398508e-2 +v -3.7691528e-2 0.50669821 -3.7691528e-2 +v -2.0398508e-2 0.50669821 -4.9246355e-2 +v -6.5527541e-17 0.50669821 -5.3303870e-2 +v 2.0398508e-2 0.50669821 -4.9246355e-2 +v 3.7691528e-2 0.50669821 -3.7691528e-2 +v 4.9246355e-2 0.50669821 -2.0398508e-2 +v 7.4915769e-2 0.48045224 1.2570370e-16 +v 6.9213146e-2 0.48045224 2.8669024e-2 +v 5.2973448e-2 0.48045224 5.2973448e-2 +v 2.8669024e-2 0.48045224 6.9213146e-2 +v 9.9149901e-17 0.48045224 7.4915769e-2 +v -2.8669024e-2 0.48045224 6.9213146e-2 +v -5.2973448e-2 0.48045224 5.2973448e-2 +v -6.9213146e-2 0.48045224 2.8669024e-2 +v -7.4915769e-2 0.48045224 5.2924026e-17 +v -6.9213146e-2 0.48045224 -2.8669024e-2 +v -5.2973448e-2 0.48045224 -5.2973448e-2 +v -2.8669024e-2 0.48045224 -6.9213146e-2 +v 5.7642370e-17 0.48045224 -7.4915769e-2 +v 2.8669024e-2 0.48045224 -6.9213146e-2 +v 5.2973448e-2 0.48045224 -5.2973448e-2 +v 6.9213146e-2 0.48045224 -2.8669024e-2 +v 0.10382712 0.44566255 -6.6740242e-17 +v 9.5923752e-2 0.44566255 3.9732919e-2 +v 7.3416861e-2 0.44566255 7.3416861e-2 +v 3.9732919e-2 0.44566255 9.5923752e-2 +v -1.0699943e-16 0.44566255 0.10382712 +v -3.9732919e-2 0.44566255 9.5923752e-2 +v -7.3416861e-2 0.44566255 7.3416861e-2 +v -9.5923752e-2 0.44566255 3.9732919e-2 +v -0.10382712 0.44566255 1.5609546e-17 +v -9.5923752e-2 0.44566255 -3.9732919e-2 +v -7.3416861e-2 0.44566255 -7.3416861e-2 +v -3.9732919e-2 0.44566255 -9.5923752e-2 +v 5.9259244e-17 0.44566255 -0.10382712 +v 3.9732919e-2 0.44566255 -9.5923752e-2 +v 7.3416861e-2 0.44566255 -7.3416861e-2 +v 9.5923752e-2 0.44566255 -3.9732919e-2 +v 0.11924364 0.42958699 8.5987981e-17 +v 0.11016676 0.42958699 4.5632567e-2 +v 8.4317990e-2 0.42958699 8.4317990e-2 +v 4.5632567e-2 0.42958699 0.11016676 +v 4.0259022e-17 0.42958699 0.11924364 +v -4.5632567e-2 0.42958699 0.11016676 +v -8.4317990e-2 0.42958699 8.4317990e-2 +v -0.11016676 0.42958699 4.5632567e-2 +v -0.11924364 0.42958699 -2.8926809e-18 +v -0.11016676 0.42958699 -4.5632567e-2 +v -8.4317990e-2 0.42958699 -8.4317990e-2 +v -4.5632567e-2 0.42958699 -0.11016676 +v -1.2674556e-16 0.42958699 -0.11924364 +v 4.5632567e-2 0.42958699 -0.11016676 +v 8.4317990e-2 0.42958699 -8.4317990e-2 +v 0.11016676 0.42958699 -4.5632567e-2 +v 0.17984280 0.36906036 6.9490531e-17 +v 0.16615308 0.36906036 6.8822861e-2 +v 0.12716807 0.36906036 0.12716807 +v 6.8822861e-2 0.36906036 0.16615308 +v 1.0555376e-17 0.36906036 0.17984280 +v -6.8822861e-2 0.36906036 0.16615308 +v -0.12716807 0.36906036 0.12716807 +v -0.16615308 0.36906036 6.8822861e-2 +v -0.17984280 0.36906036 3.5829846e-17 +v -0.16615308 0.36906036 -6.8822861e-2 +v -0.12716807 0.36906036 -0.12716807 +v -6.8822861e-2 0.36906036 -0.16615308 +v -8.8025335e-17 0.36906036 -0.17984280 +v 6.8822861e-2 0.36906036 -0.16615308 +v 0.12716807 0.36906036 -0.12716807 +v 0.16615308 0.36906036 -6.8822861e-2 +v 0.24086855 0.31560524 2.2187442e-17 +v 0.22253352 0.31560524 9.2176402e-2 +v 0.17031978 0.31560524 0.17031978 +v 9.2176402e-2 0.31560524 0.22253352 +v 1.5977750e-17 0.31560524 0.24086855 +v -9.2176402e-2 0.31560524 0.22253352 +v -0.17031978 0.31560524 0.17031978 +v -0.22253352 0.31560524 9.2176402e-2 +v -0.24086855 0.31560524 3.4339062e-17 +v -0.22253352 0.31560524 -9.2176402e-2 +v -0.17031978 0.31560524 -0.17031978 +v -9.2176402e-2 0.31560524 -0.22253352 +v -6.0692733e-17 0.31560524 -0.24086855 +v 9.2176402e-2 0.31560524 -0.22253352 +v 0.17031978 0.31560524 -0.17031978 +v 0.22253352 0.31560524 -9.2176402e-2 +v 0.28976628 0.27650230 1.3400802e-17 +v 0.26770913 0.27650230 0.11088875 +v 0.20489570 0.27650230 0.20489570 +v 0.11088875 0.27650230 0.26770913 +v 1.5078453e-17 0.27650230 0.28976628 +v -0.11088875 0.27650230 0.26770913 +v -0.20489570 0.27650230 0.20489570 +v -0.26770913 0.27650230 0.11088875 +v -0.28976628 0.27650230 4.1880968e-17 +v -0.26770913 0.27650230 -0.11088875 +v -0.20489570 0.27650230 -0.20489570 +v -0.11088875 0.27650230 -0.26770913 +v -6.8473597e-17 0.27650230 -0.28976628 +v 0.11088875 0.27650230 -0.26770913 +v 0.20489570 0.27650230 -0.20489570 +v 0.26770913 0.27650230 -0.11088875 +v 0.34922646 0.23334566 1.0494360e-19 +v 0.32264318 0.23334566 0.13364318 +v 0.24694040 0.23334566 0.24694040 +v 0.13364318 0.23334566 0.32264318 +v 1.6178751e-17 0.23334566 0.34922646 +v -0.13364318 0.23334566 0.32264318 +v -0.24694040 0.23334566 0.24694040 +v -0.32264318 0.23334566 0.13364318 +v -0.34922646 0.23334566 4.2872851e-17 +v -0.32264318 0.23334566 -0.13364318 +v -0.24694040 0.23334566 -0.24694040 +v -0.13364318 0.23334566 -0.32264318 +v -6.9357063e-17 0.23334566 -0.34922646 +v 0.13364318 0.23334566 -0.32264318 +v 0.24694040 0.23334566 -0.24694040 +v 0.32264318 0.23334566 -0.13364318 +v 0.31429551 0.16799445 1.0494360e-19 +v 0.29037119 0.16799445 0.12027569 +v 0.22224049 0.16799445 0.22224049 +v 0.12027569 0.16799445 0.29037119 +v 1.4039847e-17 0.16799445 0.31429551 +v -0.12027569 0.16799445 0.29037119 +v -0.22224049 0.16799445 0.22224049 +v -0.29037119 0.16799445 0.12027569 +v -0.31429551 0.16799445 3.8595043e-17 +v -0.29037119 0.16799445 -0.12027569 +v -0.22224049 0.16799445 -0.22224049 +v -0.12027569 0.16799445 -0.29037119 +v -6.2940352e-17 0.16799445 -0.31429551 +v 0.12027569 0.16799445 -0.29037119 +v 0.22224049 0.16799445 -0.22224049 +v 0.29037119 0.16799445 -0.12027569 +v 0.26728636 0.11071364 1.0494360e-19 +v 0.24694040 0.11071364 0.10228606 +v 0.18900000 0.11071364 0.18900000 +v 0.10228606 0.11071364 0.24694040 +v 1.1161367e-17 0.11071364 0.26728636 +v -0.10228606 0.11071364 0.24694040 +v -0.18900000 0.11071364 0.18900000 +v -0.24694040 0.11071364 0.10228606 +v -0.26728636 0.11071364 3.2838083e-17 +v -0.24694040 0.11071364 -0.10228606 +v -0.18900000 0.11071364 -0.18900000 +v -0.10228606 0.11071364 -0.24694040 +v -5.4304911e-17 0.11071364 -0.26728636 +v 0.10228606 0.11071364 -0.24694040 +v 0.18900000 0.11071364 -0.18900000 +v 0.24694040 0.11071364 -0.10228606 +v 0.21000555 6.3704487e-2 1.0494360e-19 +v 0.19401983 6.3704487e-2 8.0365644e-2 +v 0.14849635 6.3704487e-2 0.14849635 +v 8.0365644e-2 6.3704487e-2 0.19401983 +v 7.6539285e-18 6.3704487e-2 0.21000555 +v -8.0365644e-2 6.3704487e-2 0.19401983 +v -0.14849635 6.3704487e-2 0.14849635 +v -0.19401983 6.3704487e-2 8.0365644e-2 +v -0.21000555 6.3704487e-2 2.5823206e-17 +v -0.19401983 6.3704487e-2 -8.0365644e-2 +v -0.14849635 6.3704487e-2 -0.14849635 +v -8.0365644e-2 6.3704487e-2 -0.19401983 +v -4.3782596e-17 6.3704487e-2 -0.21000555 +v 8.0365644e-2 6.3704487e-2 -0.19401983 +v 0.14849635 6.3704487e-2 -0.14849635 +v 0.19401983 6.3704487e-2 -8.0365644e-2 +v 0.14465434 2.8773537e-2 1.0494360e-19 +v 0.13364318 2.8773537e-2 5.5356818e-2 +v 0.10228606 2.8773537e-2 0.10228606 +v 5.5356818e-2 2.8773537e-2 0.13364318 +v 3.6523209e-18 2.8773537e-2 0.14465434 +v -5.5356818e-2 2.8773537e-2 0.13364318 +v -0.10228606 2.8773537e-2 0.10228606 +v -0.13364318 2.8773537e-2 5.5356818e-2 +v -0.14465434 2.8773537e-2 1.7819991e-17 +v -0.13364318 2.8773537e-2 -5.5356818e-2 +v -0.10228606 2.8773537e-2 -0.10228606 +v -5.5356818e-2 2.8773537e-2 -0.13364318 +v -3.1777773e-17 2.8773537e-2 -0.14465434 +v 5.5356818e-2 2.8773537e-2 -0.13364318 +v 0.10228606 2.8773537e-2 -0.10228606 +v 0.13364318 2.8773537e-2 -5.5356818e-2 +v 7.3744142e-2 7.2631640e-3 1.0494360e-19 +v 6.8130703e-2 7.2631640e-3 2.8220661e-2 +v 5.2144983e-2 7.2631640e-3 5.2144983e-2 +v 2.8220661e-2 7.2631640e-3 6.8130703e-2 +v -6.8967630e-19 7.2631640e-3 7.3744142e-2 +v -2.8220661e-2 7.2631640e-3 6.8130703e-2 +v -5.2144983e-2 7.2631640e-3 5.2144983e-2 +v -6.8130703e-2 7.2631640e-3 2.8220661e-2 +v -7.3744142e-2 7.2631640e-3 9.1359963e-18 +v -6.8130703e-2 7.2631640e-3 -2.8220661e-2 +v -5.2144983e-2 7.2631640e-3 -5.2144983e-2 +v -2.8220661e-2 7.2631640e-3 -6.8130703e-2 +v -1.8751782e-17 7.2631640e-3 -7.3744142e-2 +v 2.8220661e-2 7.2631640e-3 -6.8130703e-2 +v 5.2144983e-2 7.2631640e-3 -5.2144983e-2 +v 6.8130703e-2 7.2631640e-3 -2.8220661e-2 +v 1.2653444e-18 0.55914203 -5.6467517e-17 +v -5.2052027e-18 0.0000000e+0 1.0494360e-19 +vt 0.0000000e+0 0.68639835 +vt 0.0000000e+0 0.81574012 +vt 0.0000000e+0 0.90329934 +vt 2.0152368e-2 0.64007180 +vt 2.1316097e-2 0.77017090 +vt 2.5583665e-2 0.85985340 +vt 4.2254721e-2 0.59454346 +vt 4.4480288e-2 0.72543254 +vt 4.7997578e-2 0.30817383 +vt 7.4386190e-2 0.37910952 +vt 7.6587346e-2 0.93641440 +vt 8.7045180e-2 0.84706512 +vt 8.8235100e-2 0.71546441 +vt 8.9212726e-2 0.28835406 +vt 9.0715849e-2 0.88801544 +vt 9.8827821e-2 0.66646554 +vt 9.9024679e-2 0.79853795 +vt 0.10606977 0.20119636 +vt 0.10968875 0.61748084 +vt 0.11100111 0.75000358 +vt 0.11126214 0.44539911 +vt 0.11140677 0.36200441 +vt 0.13406309 0.28692737 +vt 0.14398723 0.42123815 +vt 0.14666535 0.34806402 +vt 0.14898239 0.21991616 +vt 0.15859202 0.12710926 +vt 0.15896506 0.94968690 +vt 0.15919792 1.00000000 +vt 0.16077001 0.89931665 +vt 0.16375623 0.50015780 +vt 0.17005957 0.28761127 +vt 0.17387066 0.39917519 +vt 0.17753651 0.33741386 +vt 0.17867692 0.85985340 +vt 0.18058660 0.62514872 +vt 0.18058660 0.67532442 +vt 0.18058660 0.72543254 +vt 0.18101922 0.80959431 +vt 0.18132791 0.75919268 +vt 0.18313098 0.23562398 +vt 0.19100293 0.46981434 +vt 0.19103421 0.16252383 +vt 0.19957691 0.38019624 +vt 0.21334353 0.29038807 +vt 0.21470640 0.44022300 +vt 0.21674730 0.19135534 +vt 0.21697933 0.32532150 +vt 0.22339493 0.25545907 +vt 0.22377822 0.54626195 +vt 0.23142025 0.89308446 +vt 0.23224654 0.35607623 +vt 0.23397371 0.41385588 +vt 0.23794024 7.9347307e-2 +vt 0.24135109 0.94207833 +vt 0.24674131 0.22625773 +vt 0.25128529 0.99106513 +vt 0.25148445 0.61748084 +vt 0.25179432 0.75083880 +vt 0.25372483 0.29450926 +vt 0.25388112 0.12574753 +vt 0.25485423 0.51270910 +vt 0.25525073 0.31466180 +vt 0.25714301 0.37972166 +vt 0.25997279 0.27491805 +vt 0.26207122 0.16352560 +vt 0.26234538 0.66646554 +vt 0.26318838 0.29561304 +vt 0.26388101 0.79978761 +vt 0.26395431 0.33266636 +vt 0.26433279 0.31222064 +vt 0.26843729 0.27957940 +vt 0.26942274 0.47026680 +vt 0.27148252 0.32710827 +vt 0.27293810 0.71546441 +vt 0.27344354 0.25890297 +vt 0.27611427 0.20833444 +vt 0.27859827 0.34628513 +vt 0.27936740 0.43566451 +vt 0.27954787 0.26656039 +vt 0.28025042 0.29778993 +vt 0.28084877 0.30789646 +vt 0.28354219 0.28812975 +vt 0.28360520 0.33832437 +vt 0.28517815 0.31699678 +vt 0.28945754 0.39348156 +vt 0.29032223 0.28037673 +vt 0.29096082 0.29924851 +vt 0.29128016 0.30521947 +vt 0.29231290 0.24916096 +vt 0.29260041 0.32381361 +vt 0.29294231 0.29357507 +vt 0.29383011 0.31060903 +vt 0.29499490 0.25870474 +vt 0.29695765 0.28905731 +vt 0.29740828 0.35367680 +vt 0.29823000 0.31463277 +vt 0.29844107 0.30031003 +vt 0.29859341 0.30336703 +vt 0.29891285 0.87132428 +vt 0.29913972 0.34430774 +vt 0.29946813 0.29741637 +vt 0.29962827 0.27576970 +vt 0.29989630 0.30613036 +vt 0.30152786 0.29512464 +vt 0.30208281 0.32736106 +vt 0.30215354 0.30818909 +vt 0.30242205 0.28640258 +vt 0.30277502 0.30093941 +vt 0.30283958 0.30229945 +vt 0.30323569 0.29965520 +vt 0.30341846 0.30352994 +vt 0.30384229 0.31669596 +vt 0.30415337 0.29864190 +vt 0.30431446 0.29378901 +vt 0.30442397 0.30444545 +vt 0.30503019 0.30923474 +vt 0.30538993 0.29805479 +vt 0.30570472 0.30490758 +vt 0.30623448 0.30145088 +vt 0.30675751 0.29798508 +vt 0.30706764 0.30484543 +vt 0.30740532 0.29362186 +vt 0.30804686 0.29844496 +vt 0.30809798 0.30910517 +vt 0.30830621 0.30426677 +vt 0.30850830 0.28604666 +vt 0.30905988 0.29936488 +vt 0.30923138 0.30325788 +vt 0.30964076 0.30060384 +vt 0.30970065 0.30197145 +vt 0.30984764 0.31647270 +vt 0.31005300 0.27509654 +vt 0.31032473 0.29465630 +vt 0.31089455 0.30781147 +vt 0.31228397 0.32705939 +vt 0.31243951 0.25742687 +vt 0.31261933 0.29673693 +vt 0.31299143 0.30554163 +vt 0.31371717 0.24748854 +vt 0.31393215 0.29954242 +vt 0.31406120 0.30263699 +vt 0.31427162 0.28806979 +vt 0.31473985 0.20468464 +vt 0.31534737 0.31396547 +vt 0.31600807 0.34401219 +vt 0.31797065 0.35347392 +vt 0.31805006 0.72543254 +vt 0.31880390 0.29217086 +vt 0.31891848 0.59454346 +vt 0.31949328 0.30952491 +vt 0.31975994 0.15716317 +vt 0.31995890 0.27852897 +vt 0.32018077 0.91699458 +vt 0.32138877 0.29770971 +vt 0.32162537 0.30381322 +vt 0.32168955 0.32286256 +vt 0.32579769 0.39415966 +vt 0.32764421 0.11676382 +vt 0.32775459 0.28556256 +vt 0.32883230 0.31532543 +vt 0.32909723 0.26309128 +vt 0.33164223 6.6784442e-2 +vt 0.33172124 0.33722721 +vt 0.33218117 0.29508356 +vt 0.33254491 0.30556097 +vt 0.33289888 0.43847883 +vt 0.33421287 0.25438223 +vt 0.33724198 0.34531549 +vt 0.33785626 0.47573854 +vt 0.33956738 0.96341752 +vt 0.34102083 0.64007180 +vt 0.34178952 0.76991301 +vt 0.34222108 0.27488194 +vt 0.34311177 0.52226062 +vt 0.34377667 0.32477777 +vt 0.34962513 0.29089553 +vt 0.35013402 0.30848263 +vt 0.35037322 0.26886320 +vt 0.35207944 0.21677085 +vt 0.35210777 0.33015082 +vt 0.35945432 0.28857080 +vt 0.36000800 0.31018769 +vt 0.36057842 0.38044571 +vt 0.36117320 0.68639835 +vt 0.37609885 0.17463212 +vt 0.38510277 0.41938634 +vt 0.38581092 0.24269952 +vt 0.38786477 0.35373361 +vt 0.40028405 0.13845589 +vt 0.40216832 0.27865173 +vt 0.40272511 0.31789471 +vt 0.40508575 0.45244839 +vt 0.42478898 9.3301238e-2 +vt 0.42517875 0.21363422 +vt 0.42655282 0.38034702 +vt 0.42937878 0.49387950 +vt 0.44951114 0.26810367 +vt 0.44961821 0.32708863 +vt 0.45873560 0.40321504 +vt 0.45878586 0.18882207 +vt 0.48903878 0.33536655 +vt 0.48969518 0.25955981 +vt 0.49838574 0.43211071 +vt 0.50133512 0.15740791 +vt 0.53797992 0.34626090 +vt 0.54006318 0.24943571 +vt 0.54979308 0.19722266 +vt 0.54979308 0.48485246 +vt 0.56443049 0.12244279 +vt 0.56468462 0.27208750 +vt 0.56994545 0.43852591 +vt 0.59204780 0.39299757 +vt 0.60207925 0.19710378 +vt 0.60635971 5.8817147e-2 +vt 0.60711150 0.33587730 +vt 0.61279397 0.14220905 +vt 0.61309186 0.25200788 +vt 0.63802818 0.51391852 +vt 0.64359523 9.5523735e-2 +vt 0.64429734 0.29865555 +vt 0.64862090 0.46491965 +vt 0.65144446 0.19693539 +vt 0.65846588 0.16087526 +vt 0.65872089 0.23296637 +vt 0.65948183 0.41593495 +vt 0.66942446 1.5813217e-2 +vt 0.67110688 0.37883593 +vt 0.67871127 0.13021979 +vt 0.67923839 0.26350670 +vt 0.68991074 6.4049755e-2 +vt 0.69113054 0.32984265 +vt 0.69897760 0.19672877 +vt 0.70245223 0.17885257 +vt 0.70259900 0.21457618 +vt 0.70914120 0.10959948 +vt 0.70992424 0.28385877 +vt 0.71249291 0.16365993 +vt 0.71277336 0.22968035 +vt 0.72757814 0.15345797 +vt 0.72795836 0.23973345 +vt 0.73037968 0.42360283 +vt 0.73037968 0.47377853 +vt 0.73037968 0.52388665 +vt 0.74438526 0.0000000e+0 +vt 0.74485585 5.2612016e-2 +vt 0.74517613 0.10217225 +vt 0.74541911 0.14980372 +vt 0.74562845 0.19649879 +vt 0.74583780 0.24319385 +vt 0.74608078 0.29082533 +vt 0.74640106 0.34038556 +vt 0.74687165 0.39299757 +vt 0.76329855 0.15326412 +vt 0.76367877 0.23953960 +vt 0.77848354 0.16331722 +vt 0.77876400 0.22933764 +vt 0.78133267 0.10913880 +vt 0.78211571 0.28339810 +vt 0.78865791 0.17842139 +vt 0.78880468 0.21414500 +vt 0.79227930 0.19626880 +vt 0.80012637 6.3154925e-2 +vt 0.80127753 0.41593495 +vt 0.80134617 0.32894782 +vt 0.81201851 0.12949087 +vt 0.81213846 0.46491965 +vt 0.81254564 0.26277778 +vt 0.82015003 1.4161644e-2 +vt 0.82183245 0.37718435 +vt 0.82273118 0.51391852 +vt 0.83253602 0.16003120 +vt 0.83279103 0.23212231 +vt 0.83981245 0.19606218 +vt 0.84695957 9.4342019e-2 +vt 0.84766168 0.29747384 +vt 0.86871156 0.39299757 +vt 0.87816505 0.14098969 +vt 0.87846294 0.25078852 +vt 0.88414541 5.7120266e-2 +vt 0.88489720 0.33418042 +vt 0.88917766 0.19589379 +vt 0.89081391 0.43852591 +vt 0.91096628 0.48485246 +vt 0.92657229 0.12091008 +vt 0.92682642 0.27055478 +vt 0.94146383 0.19577491 +g sphere1_sphere1_auv +usemtl sphere1_auv +s 1 +f 1/121/ 18/115/ 17/123/ +f 1/121/ 32/134/ 16/124/ +f 1/121/ 241/120/ 2/118/ +f 2/118/ 18/115/ 1/121/ +f 2/118/ 241/120/ 3/114/ +f 3/114/ 18/115/ 2/118/ +f 3/114/ 20/102/ 19/105/ +f 3/114/ 241/120/ 4/111/ +f 4/111/ 20/102/ 3/114/ +f 4/111/ 241/120/ 5/109/ +f 5/109/ 20/102/ 4/111/ +f 5/109/ 22/99/ 21/98/ +f 5/109/ 241/120/ 6/110/ +f 6/110/ 22/99/ 5/109/ +f 6/110/ 241/120/ 7/112/ +f 7/112/ 22/99/ 6/110/ +f 7/112/ 24/107/ 23/104/ +f 7/112/ 241/120/ 8/116/ +f 8/116/ 24/107/ 7/112/ +f 8/116/ 241/120/ 9/119/ +f 9/119/ 24/107/ 8/116/ +f 9/119/ 26/125/ 25/117/ +f 9/119/ 241/120/ 10/122/ +f 10/122/ 26/125/ 9/119/ +f 10/122/ 241/120/ 11/126/ +f 11/126/ 26/125/ 10/122/ +f 11/126/ 28/139/ 27/135/ +f 11/126/ 241/120/ 12/129/ +f 12/129/ 28/139/ 11/126/ +f 12/129/ 241/120/ 13/131/ +f 13/131/ 28/139/ 12/129/ +f 13/131/ 30/141/ 29/142/ +f 13/131/ 241/120/ 14/130/ +f 14/130/ 30/141/ 13/131/ +f 14/130/ 241/120/ 15/128/ +f 15/128/ 30/141/ 14/130/ +f 15/128/ 32/134/ 31/138/ +f 15/128/ 241/120/ 16/124/ +f 16/124/ 32/134/ 15/128/ +f 16/124/ 241/120/ 1/121/ +f 17/123/ 32/134/ 1/121/ +f 17/123/ 33/127/ 32/134/ +f 18/115/ 33/127/ 17/123/ +f 18/115/ 35/95/ 34/108/ +f 19/105/ 18/115/ 3/114/ +f 19/105/ 35/95/ 18/115/ +f 20/102/ 35/95/ 19/105/ +f 20/102/ 37/88/ 36/92/ +f 21/98/ 20/102/ 5/109/ +f 21/98/ 37/88/ 20/102/ +f 22/99/ 37/88/ 21/98/ +f 22/99/ 39/93/ 38/89/ +f 23/104/ 22/99/ 7/112/ +f 23/104/ 39/93/ 22/99/ +f 24/107/ 39/93/ 23/104/ +f 24/107/ 41/113/ 40/97/ +f 25/117/ 24/107/ 9/119/ +f 25/117/ 41/113/ 24/107/ +f 26/125/ 41/113/ 25/117/ +f 26/125/ 43/145/ 42/132/ +f 27/135/ 26/125/ 11/126/ +f 27/135/ 43/145/ 26/125/ +f 28/139/ 43/145/ 27/135/ +f 28/139/ 45/156/ 44/151/ +f 29/142/ 28/139/ 13/131/ +f 29/142/ 45/156/ 28/139/ +f 30/141/ 45/156/ 29/142/ +f 30/141/ 47/149/ 46/155/ +f 31/138/ 30/141/ 15/128/ +f 31/138/ 47/149/ 30/141/ +f 32/134/ 33/127/ 48/143/ +f 32/134/ 47/149/ 31/138/ +f 33/127/ 50/103/ 49/133/ +f 33/127/ 64/153/ 48/143/ +f 34/108/ 33/127/ 18/115/ +f 34/108/ 50/103/ 33/127/ +f 35/95/ 50/103/ 34/108/ +f 35/95/ 52/83/ 51/87/ +f 36/92/ 35/95/ 20/102/ +f 36/92/ 52/83/ 35/95/ +f 37/88/ 52/83/ 36/92/ +f 37/88/ 54/82/ 53/81/ +f 38/89/ 37/88/ 22/99/ +f 38/89/ 54/82/ 37/88/ +f 39/93/ 54/82/ 38/89/ +f 39/93/ 56/91/ 55/85/ +f 40/97/ 39/93/ 24/107/ +f 40/97/ 56/91/ 39/93/ +f 41/113/ 56/91/ 40/97/ +f 41/113/ 58/136/ 57/106/ +f 42/132/ 41/113/ 26/125/ +f 42/132/ 58/136/ 41/113/ +f 43/145/ 58/136/ 42/132/ +f 43/145/ 60/161/ 59/157/ +f 44/151/ 43/145/ 28/139/ +f 44/151/ 60/161/ 43/145/ +f 45/156/ 60/161/ 44/151/ +f 45/156/ 62/165/ 61/166/ +f 46/155/ 45/156/ 30/141/ +f 46/155/ 62/165/ 45/156/ +f 47/149/ 62/165/ 46/155/ +f 47/149/ 64/153/ 63/160/ +f 48/143/ 47/149/ 32/134/ +f 48/143/ 64/153/ 47/149/ +f 49/133/ 64/153/ 33/127/ +f 49/133/ 65/137/ 64/153/ +f 50/103/ 65/137/ 49/133/ +f 50/103/ 67/80/ 66/94/ +f 51/87/ 50/103/ 35/95/ +f 51/87/ 67/80/ 50/103/ +f 52/83/ 67/80/ 51/87/ +f 52/83/ 69/68/ 68/72/ +f 53/81/ 52/83/ 37/88/ +f 53/81/ 69/68/ 52/83/ +f 54/82/ 69/68/ 53/81/ +f 54/82/ 71/74/ 70/71/ +f 55/85/ 54/82/ 39/93/ +f 55/85/ 71/74/ 54/82/ +f 56/91/ 71/74/ 55/85/ +f 56/91/ 73/101/ 72/84/ +f 57/106/ 56/91/ 41/113/ +f 57/106/ 73/101/ 56/91/ +f 58/136/ 73/101/ 57/106/ +f 58/136/ 75/164/ 74/146/ +f 59/157/ 58/136/ 43/145/ +f 59/157/ 75/164/ 58/136/ +f 60/161/ 75/164/ 59/157/ +f 60/161/ 77/178/ 76/176/ +f 61/166/ 60/161/ 45/156/ +f 61/166/ 77/178/ 60/161/ +f 62/165/ 77/178/ 61/166/ +f 62/165/ 79/174/ 78/177/ +f 63/160/ 62/165/ 47/149/ +f 63/160/ 79/174/ 62/165/ +f 64/153/ 65/137/ 80/162/ +f 64/153/ 79/174/ 63/160/ +f 65/137/ 82/90/ 81/140/ +f 65/137/ 96/168/ 80/162/ +f 66/94/ 65/137/ 50/103/ +f 66/94/ 82/90/ 65/137/ +f 67/80/ 82/90/ 66/94/ +f 67/80/ 84/65/ 83/76/ +f 68/72/ 67/80/ 52/83/ +f 68/72/ 84/65/ 67/80/ +f 69/68/ 84/65/ 68/72/ +f 69/68/ 86/63/ 85/60/ +f 70/71/ 69/68/ 54/82/ +f 70/71/ 86/63/ 69/68/ +f 71/74/ 86/63/ 70/71/ +f 71/74/ 88/78/ 87/70/ +f 72/84/ 71/74/ 56/91/ +f 72/84/ 88/78/ 71/74/ +f 73/101/ 88/78/ 72/84/ +f 73/101/ 90/147/ 89/96/ +f 74/146/ 73/101/ 58/136/ +f 74/146/ 90/147/ 73/101/ +f 75/164/ 90/147/ 74/146/ +f 75/164/ 92/181/ 91/169/ +f 76/176/ 75/164/ 60/161/ +f 76/176/ 92/181/ 75/164/ +f 77/178/ 92/181/ 76/176/ +f 77/178/ 94/182/ 93/183/ +f 78/177/ 77/178/ 62/165/ +f 78/177/ 94/182/ 77/178/ +f 79/174/ 94/182/ 78/177/ +f 79/174/ 96/168/ 95/179/ +f 80/162/ 79/174/ 64/153/ +f 80/162/ 96/168/ 79/174/ +f 81/140/ 96/168/ 65/137/ +f 81/140/ 97/144/ 96/168/ +f 82/90/ 97/144/ 81/140/ +f 82/90/ 99/56/ 98/77/ +f 83/76/ 82/90/ 67/80/ +f 83/76/ 99/56/ 82/90/ +f 84/65/ 99/56/ 83/76/ +f 84/65/ 101/45/ 100/49/ +f 85/60/ 84/65/ 69/68/ +f 85/60/ 101/45/ 84/65/ +f 86/63/ 101/45/ 85/60/ +f 86/63/ 103/52/ 102/48/ +f 87/70/ 86/63/ 71/74/ +f 87/70/ 103/52/ 86/63/ +f 88/78/ 103/52/ 87/70/ +f 88/78/ 105/86/ 104/64/ +f 89/96/ 88/78/ 73/101/ +f 89/96/ 105/86/ 88/78/ +f 90/147/ 105/86/ 89/96/ +f 90/147/ 107/184/ 106/158/ +f 91/169/ 90/147/ 75/164/ +f 91/169/ 107/184/ 90/147/ +f 92/181/ 107/184/ 91/169/ +f 92/181/ 109/192/ 108/189/ +f 93/183/ 92/181/ 77/178/ +f 93/183/ 109/192/ 92/181/ +f 94/182/ 109/192/ 93/183/ +f 94/182/ 111/188/ 110/191/ +f 95/179/ 94/182/ 79/174/ +f 95/179/ 111/188/ 94/182/ +f 96/168/ 97/144/ 112/180/ +f 96/168/ 111/188/ 95/179/ +f 97/144/ 114/66/ 113/152/ +f 97/144/ 128/186/ 112/180/ +f 98/77/ 97/144/ 82/90/ +f 98/77/ 114/66/ 97/144/ +f 99/56/ 114/66/ 98/77/ +f 99/56/ 116/41/ 115/47/ +f 100/49/ 99/56/ 84/65/ +f 100/49/ 116/41/ 99/56/ +f 101/45/ 116/41/ 100/49/ +f 101/45/ 118/34/ 117/32/ +f 102/48/ 101/45/ 86/63/ +f 102/48/ 118/34/ 101/45/ +f 103/52/ 118/34/ 102/48/ +f 103/52/ 120/53/ 119/44/ +f 104/64/ 103/52/ 88/78/ +f 104/64/ 120/53/ 103/52/ +f 105/86/ 120/53/ 104/64/ +f 105/86/ 122/167/ 121/79/ +f 106/158/ 105/86/ 90/147/ +f 106/158/ 122/167/ 105/86/ +f 107/184/ 122/167/ 106/158/ +f 107/184/ 124/196/ 123/187/ +f 108/189/ 107/184/ 92/181/ +f 108/189/ 124/196/ 107/184/ +f 109/192/ 124/196/ 108/189/ +f 109/192/ 126/198/ 125/199/ +f 110/191/ 109/192/ 94/182/ +f 110/191/ 126/198/ 109/192/ +f 111/188/ 126/198/ 110/191/ +f 111/188/ 128/186/ 127/195/ +f 112/180/ 111/188/ 96/168/ +f 112/180/ 128/186/ 111/188/ +f 113/152/ 128/186/ 97/144/ +f 113/152/ 129/159/ 128/186/ +f 114/66/ 129/159/ 113/152/ +f 114/66/ 131/43/ 130/61/ +f 115/47/ 114/66/ 99/56/ +f 115/47/ 131/43/ 114/66/ +f 116/41/ 131/43/ 115/47/ +f 116/41/ 133/23/ 132/26/ +f 117/32/ 116/41/ 101/45/ +f 117/32/ 133/23/ 116/41/ +f 118/34/ 133/23/ 117/32/ +f 118/34/ 135/33/ 134/25/ +f 119/44/ 118/34/ 103/52/ +f 119/44/ 135/33/ 118/34/ +f 120/53/ 135/33/ 119/44/ +f 120/53/ 137/73/ 136/46/ +f 121/79/ 120/53/ 105/86/ +f 121/79/ 137/73/ 120/53/ +f 122/167/ 137/73/ 121/79/ +f 122/167/ 139/193/ 138/170/ +f 123/187/ 122/167/ 107/184/ +f 123/187/ 139/193/ 122/167/ +f 124/196/ 139/193/ 123/187/ +f 124/196/ 141/202/ 140/200/ +f 125/199/ 124/196/ 109/192/ +f 125/199/ 141/202/ 124/196/ +f 126/198/ 141/202/ 125/199/ +f 126/198/ 143/201/ 142/203/ +f 127/195/ 126/198/ 111/188/ +f 127/195/ 143/201/ 126/198/ +f 128/186/ 129/159/ 144/190/ +f 128/186/ 143/201/ 127/195/ +f 129/159/ 146/54/ 145/163/ +f 129/159/ 160/194/ 144/190/ +f 130/61/ 129/159/ 114/66/ +f 130/61/ 146/54/ 129/159/ +f 131/43/ 146/54/ 130/61/ +f 131/43/ 148/18/ 147/27/ +f 132/26/ 131/43/ 116/41/ +f 132/26/ 148/18/ 131/43/ +f 133/23/ 148/18/ 132/26/ +f 133/23/ 150/22/ 149/14/ +f 134/25/ 133/23/ 118/34/ +f 134/25/ 150/22/ 133/23/ +f 135/33/ 150/22/ 134/25/ +f 135/33/ 152/42/ 151/24/ +f 136/46/ 135/33/ 120/53/ +f 136/46/ 152/42/ 135/33/ +f 137/73/ 152/42/ 136/46/ +f 137/73/ 154/175/ 153/62/ +f 138/170/ 137/73/ 122/167/ +f 138/170/ 154/175/ 137/73/ +f 139/193/ 154/175/ 138/170/ +f 139/193/ 156/204/ 155/197/ +f 140/200/ 139/193/ 124/196/ +f 140/200/ 156/204/ 139/193/ +f 141/202/ 156/204/ 140/200/ +f 141/202/ 158/207/ 157/206/ +f 142/203/ 141/202/ 126/198/ +f 142/203/ 158/207/ 141/202/ +f 143/201/ 158/207/ 142/203/ +f 143/201/ 160/194/ 159/205/ +f 144/190/ 143/201/ 128/186/ +f 144/190/ 160/194/ 143/201/ +f 145/163/ 160/194/ 129/159/ +f 145/244/ 161/243/ 160/271/ +f 146/219/ 161/243/ 145/244/ +f 146/219/ 163/212/ 162/222/ +f 147/27/ 146/54/ 131/43/ +f 147/209/ 163/212/ 146/219/ +f 148/57/ 163/154/ 147/171/ +f 148/57/ 165/28/ 164/55/ +f 149/14/ 148/18/ 133/23/ +f 149/29/ 165/28/ 148/57/ +f 150/22/ 165/9/ 149/14/ +f 150/22/ 167/21/ 166/10/ +f 151/24/ 150/22/ 135/33/ +f 151/24/ 167/21/ 150/22/ +f 152/42/ 167/21/ 151/24/ +f 152/42/ 169/50/ 168/31/ +f 153/62/ 152/42/ 137/73/ +f 153/62/ 169/50/ 152/42/ +f 154/12/ 169/39/ 153/35/ +f 154/12/ 171/5/ 170/17/ +f 155/197/ 154/175/ 139/193/ +f 155/2/ 171/5/ 154/12/ +f 156/75/ 171/172/ 155/185/ +f 156/75/ 173/37/ 172/67/ +f 157/206/ 156/204/ 141/202/ +f 157/38/ 173/37/ 156/75/ +f 158/13/ 173/37/ 157/38/ +f 158/13/ 175/4/ 174/16/ +f 159/205/ 158/207/ 143/201/ +f 159/1/ 175/4/ 158/13/ +f 160/271/ 161/243/ 176/267/ +f 160/271/ 175/283/ 159/284/ +f 161/243/ 178/226/ 177/242/ +f 161/243/ 192/264/ 176/267/ +f 162/222/ 161/243/ 146/219/ +f 162/222/ 178/226/ 161/243/ +f 163/212/ 178/226/ 162/222/ +f 163/154/ 180/51/ 179/100/ +f 164/55/ 163/154/ 148/57/ +f 164/55/ 180/51/ 163/154/ +f 165/28/ 180/51/ 164/55/ +f 165/28/ 182/15/ 181/30/ +f 166/10/ 165/9/ 150/22/ +f 166/11/ 182/15/ 165/28/ +f 167/3/ 182/15/ 166/11/ +f 167/173/ 184/59/ 183/148/ +f 168/31/ 167/21/ 152/42/ +f 168/69/ 184/59/ 167/173/ +f 169/39/ 184/59/ 168/69/ +f 169/39/ 186/20/ 185/40/ +f 170/17/ 169/39/ 154/12/ +f 170/17/ 186/20/ 169/39/ +f 171/5/ 186/20/ 170/17/ +f 171/172/ 188/58/ 187/150/ +f 172/67/ 171/172/ 156/75/ +f 172/67/ 188/58/ 171/172/ +f 173/37/ 188/58/ 172/67/ +f 173/37/ 190/19/ 189/36/ +f 174/16/ 173/37/ 158/13/ +f 174/16/ 190/19/ 173/37/ +f 175/4/ 190/19/ 174/16/ +f 175/283/ 192/264/ 191/277/ +f 176/267/ 175/283/ 160/271/ +f 176/267/ 192/264/ 175/283/ +f 177/242/ 192/264/ 161/243/ +f 177/208/ 193/214/ 192/211/ +f 178/210/ 193/214/ 177/208/ +f 178/210/ 195/220/ 194/217/ +f 179/213/ 178/226/ 163/212/ +f 179/215/ 195/220/ 178/210/ +f 180/227/ 195/220/ 179/215/ +f 180/227/ 197/246/ 196/231/ +f 181/30/ 180/51/ 165/28/ +f 181/245/ 197/246/ 180/227/ +f 182/269/ 197/246/ 181/245/ +f 182/269/ 199/275/ 198/263/ +f 183/6/ 182/15/ 167/3/ +f 183/280/ 199/275/ 182/269/ +f 184/285/ 199/275/ 183/280/ +f 184/285/ 201/282/ 200/278/ +f 185/40/ 184/59/ 169/39/ +f 185/287/ 201/282/ 184/285/ +f 186/286/ 201/282/ 185/287/ +f 186/286/ 203/276/ 202/279/ +f 187/8/ 186/20/ 171/5/ +f 187/281/ 203/276/ 186/286/ +f 188/270/ 203/276/ 187/281/ +f 188/270/ 205/252/ 204/265/ +f 189/36/ 188/58/ 173/37/ +f 189/253/ 205/252/ 188/270/ +f 190/228/ 205/252/ 189/253/ +f 190/228/ 207/221/ 206/232/ +f 191/7/ 190/19/ 175/4/ +f 191/216/ 207/221/ 190/228/ +f 192/211/ 193/214/ 208/218/ +f 192/211/ 207/221/ 191/216/ +f 193/214/ 210/224/ 209/223/ +f 193/214/ 224/225/ 208/218/ +f 194/217/ 193/214/ 178/210/ +f 194/217/ 210/224/ 193/214/ +f 195/220/ 210/224/ 194/217/ +f 195/220/ 212/236/ 211/229/ +f 196/231/ 195/220/ 180/227/ +f 196/231/ 212/236/ 195/220/ +f 197/246/ 212/236/ 196/231/ +f 197/246/ 214/258/ 213/247/ +f 198/263/ 197/246/ 182/269/ +f 198/263/ 214/258/ 197/246/ +f 199/275/ 214/258/ 198/263/ +f 199/275/ 216/272/ 215/266/ +f 200/278/ 199/275/ 184/285/ +f 200/278/ 216/272/ 199/275/ +f 201/282/ 216/272/ 200/278/ +f 201/282/ 218/273/ 217/274/ +f 202/279/ 201/282/ 186/286/ +f 202/279/ 218/273/ 201/282/ +f 203/276/ 218/273/ 202/279/ +f 203/276/ 220/259/ 219/268/ +f 204/265/ 203/276/ 188/270/ +f 204/265/ 220/259/ 203/276/ +f 205/252/ 220/259/ 204/265/ +f 205/252/ 222/237/ 221/251/ +f 206/232/ 205/252/ 190/228/ +f 206/232/ 222/237/ 205/252/ +f 207/221/ 222/237/ 206/232/ +f 207/221/ 224/225/ 223/230/ +f 208/218/ 207/221/ 192/211/ +f 208/218/ 224/225/ 207/221/ +f 209/223/ 224/225/ 193/214/ +f 209/223/ 225/233/ 224/225/ +f 210/224/ 225/233/ 209/223/ +f 210/224/ 227/238/ 226/234/ +f 211/229/ 210/224/ 195/220/ +f 211/229/ 227/238/ 210/224/ +f 212/236/ 227/238/ 211/229/ +f 212/236/ 229/248/ 228/240/ +f 213/247/ 212/236/ 197/246/ +f 213/247/ 229/248/ 212/236/ +f 214/258/ 229/248/ 213/247/ +f 214/258/ 231/256/ 230/254/ +f 215/266/ 214/258/ 199/275/ +f 215/266/ 231/256/ 214/258/ +f 216/272/ 231/256/ 215/266/ +f 216/272/ 233/262/ 232/260/ +f 217/274/ 216/272/ 201/282/ +f 217/274/ 233/262/ 216/272/ +f 218/273/ 233/262/ 217/274/ +f 218/273/ 235/257/ 234/261/ +f 219/268/ 218/273/ 203/276/ +f 219/268/ 235/257/ 218/273/ +f 220/259/ 235/257/ 219/268/ +f 220/259/ 237/250/ 236/255/ +f 221/251/ 220/259/ 205/252/ +f 221/251/ 237/250/ 220/259/ +f 222/237/ 237/250/ 221/251/ +f 222/237/ 239/239/ 238/241/ +f 223/230/ 222/237/ 207/221/ +f 223/230/ 239/239/ 222/237/ +f 224/225/ 225/233/ 240/235/ +f 224/225/ 239/239/ 223/230/ +f 225/233/ 242/249/ 240/235/ +f 226/234/ 225/233/ 210/224/ +f 226/234/ 242/249/ 225/233/ +f 227/238/ 242/249/ 226/234/ +f 228/240/ 227/238/ 212/236/ +f 228/240/ 242/249/ 227/238/ +f 229/248/ 242/249/ 228/240/ +f 230/254/ 229/248/ 214/258/ +f 230/254/ 242/249/ 229/248/ +f 231/256/ 242/249/ 230/254/ +f 232/260/ 231/256/ 216/272/ +f 232/260/ 242/249/ 231/256/ +f 233/262/ 242/249/ 232/260/ +f 234/261/ 233/262/ 218/273/ +f 234/261/ 242/249/ 233/262/ +f 235/257/ 242/249/ 234/261/ +f 236/255/ 235/257/ 220/259/ +f 236/255/ 242/249/ 235/257/ +f 237/250/ 242/249/ 236/255/ +f 238/241/ 237/250/ 222/237/ +f 238/241/ 242/249/ 237/250/ +f 239/239/ 242/249/ 238/241/ +f 240/235/ 239/239/ 224/225/ +f 240/235/ 242/249/ 239/239/ diff --git a/Faceball2030/assets/enemies/IShoot2.png b/Faceball2030/assets/enemies/IShoot2.png new file mode 100644 index 0000000..8d9011e Binary files /dev/null and b/Faceball2030/assets/enemies/IShoot2.png differ diff --git a/Faceball2030/assets/enemies/IShoot2.wings b/Faceball2030/assets/enemies/IShoot2.wings new file mode 100644 index 0000000..6d2c0bb Binary files /dev/null and b/Faceball2030/assets/enemies/IShoot2.wings differ diff --git a/Faceball2030/assets/enemies/IShoot2.xcf b/Faceball2030/assets/enemies/IShoot2.xcf new file mode 100644 index 0000000..3921fff Binary files /dev/null and b/Faceball2030/assets/enemies/IShoot2.xcf differ diff --git a/Faceball2030/assets/enemies/sphere1_auv.png b/Faceball2030/assets/enemies/sphere1_auv.png new file mode 100644 index 0000000..02b942c Binary files /dev/null and b/Faceball2030/assets/enemies/sphere1_auv.png differ diff --git a/Faceball2030/assets/map/map1.map b/Faceball2030/assets/map/map1.map index 1c31d41..559d7d0 100644 --- a/Faceball2030/assets/map/map1.map +++ b/Faceball2030/assets/map/map1.map @@ -32,7 +32,7 @@ 8351 8197 8595 -8198 +7958 273 8196 8195 diff --git a/Faceball2030/assets/map/map3.map b/Faceball2030/assets/map/map3.map index b833b38..9a0240f 100644 --- a/Faceball2030/assets/map/map3.map +++ b/Faceball2030/assets/map/map3.map @@ -1,27 +1,51 @@ -5 -5 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 -8192 +7 +7 +17193 +8202 +24586 +424 +8202 +25370 +16924 +1221 +8201 +8204 +8597 +8201 +8204 +17221 +8197 +8195 +8198 +837 +24579 +8198 +837 +8721 +8202 +8202 +8192 +8202 +8202 +25444 +8197 +11 +8204 +24581 +9 +8204 +8197 +8197 +8351 +8199 +25381 +8195 +8198 +8197 +9027 +24986 +8202 +8194 +8746 +24586 +278 diff --git a/Faceball2030/assets/worldSkyBox.mtl b/Faceball2030/assets/worldSkyBox.mtl new file mode 100644 index 0000000..6df1add --- /dev/null +++ b/Faceball2030/assets/worldSkyBox.mtl @@ -0,0 +1,20 @@ +# Exported from Wings 3D 2.2.9 +newmtl Cylinder1_auv +Ns 19.999999999999996 +d 1.0 +illum 2 +Kd 1.0 1.0 1.0 +Ka 0.0 0.0 0.0 +Ks 0.19 0.19 0.19 +Ke 0.0 0.0 0.0 +map_Kd Cylinder1_auv.png + +newmtl default +Ns 19.999999999999996 +d 1.0 +illum 2 +Kd 0.7898538076923077 0.8133333333333334 0.6940444444444445 +Ka 0.0 0.0 0.0 +Ks 0.1689853807692308 0.17133333333333334 0.15940444444444446 +Ke 0.0 0.0 0.0 + diff --git a/Faceball2030/assets/worldSkyBox.obj b/Faceball2030/assets/worldSkyBox.obj new file mode 100644 index 0000000..187fe03 --- /dev/null +++ b/Faceball2030/assets/worldSkyBox.obj @@ -0,0 +1,207 @@ +# Exported from Wings 3D 2.2.9 +mtllib worldSkyBox.mtl +o Cylinder1 +#64 vertices, 64 faces +v 1.00000000 20.00000000 0.0000000e+0 +v 0.98078528 20.00000000 0.19509032 +v 0.92387953 20.00000000 0.38268343 +v 0.83146961 20.00000000 0.55557023 +v 0.70710678 20.00000000 0.70710678 +v 0.55557023 20.00000000 0.83146961 +v 0.38268343 20.00000000 0.92387953 +v 0.19509032 20.00000000 0.98078528 +v 6.1232340e-17 20.00000000 1.00000000 +v -0.19509032 20.00000000 0.98078528 +v -0.38268343 20.00000000 0.92387953 +v -0.55557023 20.00000000 0.83146961 +v -0.70710678 20.00000000 0.70710678 +v -0.83146961 20.00000000 0.55557023 +v -0.92387953 20.00000000 0.38268343 +v -0.98078528 20.00000000 0.19509032 +v -1.00000000 20.00000000 1.2246468e-16 +v -0.98078528 20.00000000 -0.19509032 +v -0.92387953 20.00000000 -0.38268343 +v -0.83146961 20.00000000 -0.55557023 +v -0.70710678 20.00000000 -0.70710678 +v -0.55557023 20.00000000 -0.83146961 +v -0.38268343 20.00000000 -0.92387953 +v -0.19509032 20.00000000 -0.98078528 +v -1.8369702e-16 20.00000000 -1.00000000 +v 0.19509032 20.00000000 -0.98078528 +v 0.38268343 20.00000000 -0.92387953 +v 0.55557023 20.00000000 -0.83146961 +v 0.70710678 20.00000000 -0.70710678 +v 0.83146961 20.00000000 -0.55557023 +v 0.92387953 20.00000000 -0.38268343 +v 0.98078528 20.00000000 -0.19509032 +v 1.00000000 0.0000000e+0 0.0000000e+0 +v 0.98078528 0.0000000e+0 0.19509032 +v 0.92387953 0.0000000e+0 0.38268343 +v 0.83146961 0.0000000e+0 0.55557023 +v 0.70710678 0.0000000e+0 0.70710678 +v 0.55557023 0.0000000e+0 0.83146961 +v 0.38268343 0.0000000e+0 0.92387953 +v 0.19509032 0.0000000e+0 0.98078528 +v 6.1232340e-17 0.0000000e+0 1.00000000 +v -0.19509032 0.0000000e+0 0.98078528 +v -0.38268343 0.0000000e+0 0.92387953 +v -0.55557023 0.0000000e+0 0.83146961 +v -0.70710678 0.0000000e+0 0.70710678 +v -0.83146961 0.0000000e+0 0.55557023 +v -0.92387953 0.0000000e+0 0.38268343 +v -0.98078528 0.0000000e+0 0.19509032 +v -1.00000000 0.0000000e+0 1.2246468e-16 +v -0.98078528 0.0000000e+0 -0.19509032 +v -0.92387953 0.0000000e+0 -0.38268343 +v -0.83146961 0.0000000e+0 -0.55557023 +v -0.70710678 0.0000000e+0 -0.70710678 +v -0.55557023 0.0000000e+0 -0.83146961 +v -0.38268343 0.0000000e+0 -0.92387953 +v -0.19509032 0.0000000e+0 -0.98078528 +v -1.8369702e-16 0.0000000e+0 -1.00000000 +v 0.19509032 0.0000000e+0 -0.98078528 +v 0.38268343 0.0000000e+0 -0.92387953 +v 0.55557023 0.0000000e+0 -0.83146961 +v 0.70710678 0.0000000e+0 -0.70710678 +v 0.83146961 0.0000000e+0 -0.55557023 +v 0.92387953 0.0000000e+0 -0.38268343 +v 0.98078528 0.0000000e+0 -0.19509032 +vt 0.0000000e+0 1.00000000 +vt 2.2648550e-14 1.1657342e-15 +vt 9.8017140e-3 1.00000000 +vt 9.8017140e-3 7.2164497e-16 +vt 1.9603428e-2 1.00000000 +vt 1.9603428e-2 4.4408921e-16 +vt 2.9405142e-2 1.00000000 +vt 2.9405142e-2 2.2204460e-16 +vt 3.9206856e-2 1.00000000 +vt 3.9206856e-2 0.0000000e+0 +vt 4.9008570e-2 1.00000000 +vt 4.9008570e-2 0.0000000e+0 +vt 5.8810284e-2 1.00000000 +vt 5.8810284e-2 0.0000000e+0 +vt 6.8611998e-2 1.00000000 +vt 6.8611998e-2 2.2204460e-16 +vt 7.8413712e-2 1.00000000 +vt 7.8413712e-2 1.00000000 +vt 7.8413712e-2 3.8857806e-16 +vt 7.8413712e-2 2.6645353e-15 +vt 8.8215426e-2 1.00000000 +vt 8.8215426e-2 2.0539126e-15 +vt 9.8017140e-2 1.00000000 +vt 9.8017140e-2 1.5543122e-15 +vt 0.10781885 1.00000000 +vt 0.10781885 9.9920072e-16 +vt 0.11762057 1.00000000 +vt 0.11762057 5.5511151e-16 +vt 0.12742228 1.00000000 +vt 0.12742228 3.8857806e-16 +vt 0.13722400 1.00000000 +vt 0.13722400 2.2204460e-16 +vt 0.14702571 1.00000000 +vt 0.14702571 0.0000000e+0 +vt 0.15682742 1.00000000 +vt 0.15682742 0.0000000e+0 +vt 0.15682742 1.00000000 +vt 0.15682742 1.6653345e-16 +vt 0.16662914 1.00000000 +vt 0.16662914 0.0000000e+0 +vt 0.17643085 1.00000000 +vt 0.17643085 0.0000000e+0 +vt 0.18623257 1.00000000 +vt 0.18623257 0.0000000e+0 +vt 0.19603428 1.00000000 +vt 0.19603428 0.0000000e+0 +vt 0.20583599 1.00000000 +vt 0.20583599 2.7755576e-16 +vt 0.21563771 1.00000000 +vt 0.21563771 5.5511151e-16 +vt 0.22543942 1.00000000 +vt 0.22543942 8.8817842e-16 +vt 0.23524114 1.00000000 +vt 0.23524114 1.4432899e-15 +vt 0.23524114 3.8857806e-16 +vt 0.23524114 1.00000000 +vt 0.24504285 2.2204460e-16 +vt 0.24504285 1.00000000 +vt 0.25484456 0.0000000e+0 +vt 0.25484456 1.00000000 +vt 0.26464628 0.0000000e+0 +vt 0.26464628 1.00000000 +vt 0.27444799 0.0000000e+0 +vt 0.27444799 1.00000000 +vt 0.28424971 2.2204460e-16 +vt 0.28424971 1.00000000 +vt 0.29405142 3.8857806e-16 +vt 0.29405142 1.00000000 +vt 0.30385314 7.2164497e-16 +vt 0.30385314 1.00000000 +vt 0.31365485 3.8857806e-16 +vt 0.31365485 1.00000000 +g Cylinder1_Cylinder1_auv +usemtl Cylinder1_auv +s 1 +f 1/64/ 33/63/ 32/66/ +f 2/62/ 33/63/ 1/64/ +f 2/62/ 35/59/ 34/61/ +f 3/60/ 35/59/ 2/62/ +f 4/58/ 35/59/ 3/60/ +f 4/58/ 37/55/ 36/57/ +f 5/56/ 37/55/ 4/58/ +f 6/33/ 37/36/ 5/35/ +f 6/33/ 39/32/ 38/34/ +f 7/31/ 39/32/ 6/33/ +f 8/29/ 39/32/ 7/31/ +f 8/29/ 41/28/ 40/30/ +f 9/27/ 41/28/ 8/29/ +f 10/25/ 41/28/ 9/27/ +f 10/25/ 43/24/ 42/26/ +f 11/23/ 43/24/ 10/25/ +f 12/21/ 43/24/ 11/23/ +f 12/21/ 45/20/ 44/22/ +f 13/18/ 45/20/ 12/21/ +f 14/51/ 45/54/ 13/53/ +f 14/51/ 47/50/ 46/52/ +f 15/49/ 47/50/ 14/51/ +f 16/47/ 47/50/ 15/49/ +f 16/47/ 49/46/ 48/48/ +f 17/45/ 49/46/ 16/47/ +f 18/43/ 49/46/ 17/45/ +f 18/43/ 51/42/ 50/44/ +f 19/41/ 51/42/ 18/43/ +f 20/39/ 51/42/ 19/41/ +f 20/39/ 53/38/ 52/40/ +f 21/37/ 53/38/ 20/39/ +f 22/15/ 53/19/ 21/17/ +f 22/15/ 55/14/ 54/16/ +f 23/13/ 55/14/ 22/15/ +f 24/11/ 55/14/ 23/13/ +f 24/11/ 57/10/ 56/12/ +f 25/9/ 57/10/ 24/11/ +f 26/7/ 57/10/ 25/9/ +f 26/7/ 59/6/ 58/8/ +f 27/5/ 59/6/ 26/7/ +f 28/3/ 59/6/ 27/5/ +f 28/3/ 61/2/ 60/4/ +f 29/1/ 61/2/ 28/3/ +f 30/70/ 61/71/ 29/72/ +f 30/70/ 63/67/ 62/69/ +f 31/68/ 63/67/ 30/70/ +f 32/66/ 33/63/ 64/65/ +f 32/66/ 63/67/ 31/68/ +f 34/61/ 33/63/ 2/62/ +f 36/57/ 35/59/ 4/58/ +f 38/34/ 37/36/ 6/33/ +f 40/30/ 39/32/ 8/29/ +f 42/26/ 41/28/ 10/25/ +f 44/22/ 43/24/ 12/21/ +f 46/52/ 45/54/ 14/51/ +f 48/48/ 47/50/ 16/47/ +f 50/44/ 49/46/ 18/43/ +f 52/40/ 51/42/ 20/39/ +f 54/16/ 53/19/ 22/15/ +f 56/12/ 55/14/ 24/11/ +f 58/8/ 57/10/ 26/7/ +f 60/4/ 59/6/ 28/3/ +f 62/69/ 61/71/ 30/70/ +f 64/65/ 63/67/ 32/66/ diff --git a/Faceball2030/assets/worldSkyBox.png b/Faceball2030/assets/worldSkyBox.png new file mode 100644 index 0000000..7b01807 Binary files /dev/null and b/Faceball2030/assets/worldSkyBox.png differ diff --git a/Faceball2030/main.cpp b/Faceball2030/main.cpp index 1f51dac..cf51b41 100644 --- a/Faceball2030/main.cpp +++ b/Faceball2030/main.cpp @@ -66,7 +66,7 @@ bool Enemy::CanShoot() { void Enemy::ShootBullet(int myIndex) { fireDelay = game->enemyData[GetID()].fireDelay; - game->bullets.push_back({ game->bullet, {pos.x,pos.y+0.15f,pos.z},rot,0.2f,{std::cosf(rot) * game->shotSpd,std::sinf(rot) * game->shotSpd }, YELLOW,false,GetID(),myIndex,blinking}); + game->bullets.push_back({ game->bullet, {pos.x,pos.y+0.15f,pos.z},rot,0.2f,1,true,{std::cosf(rot) * game->shotSpd,std::sinf(rot) * game->shotSpd }, YELLOW,false,GetID(),myIndex,blinking}); } void Enemy::ReloadBullet(float fElapsedTime) { @@ -94,6 +94,7 @@ bool Enemy::isExplosive() { void Enemy::setExploded(bool exploded) { this->exploded = exploded; + game->RegenerateMinimap(); } Enemy Enemy::freshCopy(bool randomizeLoc){ @@ -216,6 +217,11 @@ bool Enemy::Update(float fElapsedTime) { } } } + else + if (fElapsedTime > 3/120.f) { + mesh.tris.clear(); + return false; + } } return true; } @@ -237,6 +243,9 @@ void Enemy::OnDeathEvent() { if (game->enemyData[id].powerupDrop != PowerupType::NONE) { game->SpawnPowerup(game->enemyData[id].powerupDrop, pos); } + if (game->PlayerHasMapUpgrade()){ + game->RegenerateMinimap(); + } } vf2d FaceBall::GetPlayerPos() { @@ -254,8 +263,10 @@ void FaceBall::InitializeEnemyData() { enemyData[SHOOTME] = { "SHOOTME",enemy_ShootMe,YELLOW,1,1,0.5,2,1,0.2f,true }; enemyData[SHOOTME2] = { "SHOOTME2",enemy_ShootMe2,YELLOW,1,1,PI / 6,2,1,0.35f,true }; enemyData[ISHOOT] = { "ISHOOT",enemy_IShoot,YELLOW,1,1,0.5,2,3,0.4f,true }; + enemyData[ISHOOT2] = { "ISHOOT2",enemy_IShoot2,YELLOW,1,1,PI / 6,2,1,0.35f,true }; enemyData[SHOOTME_ARMOR] = { "SHOOTME",enemy_ShootMe,YELLOW,6,1,0.5,2,1,0.3f,true,PowerupType::ARMOR,true }; enemyData[ISHOOT_MAP] = { "ISHOOT",enemy_IShoot,YELLOW,7,1,0.5,2,2,0.3f,true,PowerupType::MAP,true }; + enemyData[ISHOOT2_SPEED] = { "ISHOOT2",enemy_IShoot2,YELLOW,6,1,PI / 6,2,1,0.35f,true,PowerupType::SPEED,true }; enemyData[SONAR] = { "Sonar",enemy_Sonar,RED,5,1,PI / 8,2,1 }; enemyData[COIN] = { "Coin",undefined,BLUE }; enemyData[POWERUP_ARMOR] = { "Armor",undefined,{96,0,96} }; @@ -424,8 +435,65 @@ void FaceBall::LoadLevel(int level) walls = { mapWalls }; MapWallsObjectIndex = objects.size()-1; objects.push_back({ mapFloor,{0,0,0},0,0 }); + objects.push_back({ worldSkyBox,{MAP_SIZE.x/2.f,0,MAP_SIZE.y/2.f},0,0,std::max(float(MAP_SIZE.x),float(MAP_SIZE.y))*2,false }); //objects.push_back({ game->mapExit,{(float)exitCoords.x+0.5f,0,(float)exitCoords.y+0.5f},0,0.4f }); exit = { game->mapExit,{(float)exitCoords.x + 0.5f,0.02f,(float)exitCoords.y + 0.5f},0,0.4f }; + RegenerateMinimap(); +} + +void FaceBall::RegenerateMinimap(){ + vf2d mapCenter = {float(ScreenWidth()-364),float(164)}; + vf2d mapSprSize = {float(mapSpr->width),float(mapSpr->height)}; + SetDrawTarget(mapSpr); + Clear(BLACK); + const int MAP_VISIBILITY=6; + for (int x=0;x0){ + vf2d squareLoc = vf2d{exitCoords.x*minimapGridSize.x,exitCoords.y*minimapGridSize.y}; + uint8_t transparency=uint8_t((1-(float(dist)/MAP_VISIBILITY))*255); + DrawLine(squareLoc,squareLoc+vf2d{1.f,0.f}*minimapGridSize,Pixel{DARK_RED.r,DARK_RED.g,DARK_RED.b,transparency}); + DrawLine(squareLoc+vf2d{0,1.f}*minimapGridSize,squareLoc+vf2d{1,1}*minimapGridSize,Pixel{DARK_RED.r,DARK_RED.g,DARK_RED.b,transparency}); + DrawLine(squareLoc+vf2d{1,0}*minimapGridSize,squareLoc+vf2d{1,1}*minimapGridSize,Pixel{DARK_RED.r,DARK_RED.g,DARK_RED.b,transparency}); + DrawLine(squareLoc,squareLoc+vf2d{0,1}*minimapGridSize,Pixel{DARK_RED.r,DARK_RED.g,DARK_RED.b,transparency}); + } + FillCircle(vi2d{int(exitCoords.x*minimapGridSize.x+0.5*minimapGridSize.x),int(exitCoords.y*minimapGridSize.x+0.5*minimapGridSize.y)},3,MAGENTA*(1-(float(dist)/MAP_VISIBILITY))); + SetDrawTarget(nullptr); + mapDecal->Update(); } bool FaceBall::CheckCollision(vec3d movementVector,vf2d pos,float radius){ @@ -850,23 +918,32 @@ void FaceBall::RenderBulletMesh(mat4x4& matView, std::vector& vecTrian void FaceBall::RenderMesh(mat4x4&matView,std::vector&vecTrianglesToRaster, Object&o,bool translucent) { for (auto& tri : o.mesh.tris) { if (translucent&&tri.tex != exit_wall_tex && tri.tex != bullet_tex ||!translucent&&(tri.tex==exit_wall_tex || tri.tex == bullet_tex)) { continue; } - Triangle triProjected, triTransformed, triViewed; + Triangle triScaled,triProjected, triTransformed, triViewed; mat4x4 localMat = Matrix_MakeIdentity(); mat4x4 rotMat = Matrix_MakeRotationY(o.rot); localMat = Matrix_MultiplyMatrix(localMat, rotMat); mat4x4 matTrans = Matrix_MakeTranslation(o.pos.x, o.pos.y, o.pos.z); localMat = Matrix_MultiplyMatrix(localMat, matTrans); - - triTransformed.p[0] = Matrix_MultiplyVector(localMat, tri.p[0]); - triTransformed.p[1] = Matrix_MultiplyVector(localMat, tri.p[1]); - triTransformed.p[2] = Matrix_MultiplyVector(localMat, tri.p[2]); - triTransformed.uv[0] = tri.uv[0]; - triTransformed.uv[1] = tri.uv[1]; - triTransformed.uv[2] = tri.uv[2]; - triTransformed.col[0] = tri.col[0]; - triTransformed.col[1] = tri.col[1]; - triTransformed.col[2] = tri.col[2]; - triTransformed.tex = tri.tex; + + for (int i = 0; i < 3; i++) { + triScaled.p[i].x = tri.p[i].x*o.scale; + triScaled.p[i].y = tri.p[i].y * o.scale; + triScaled.p[i].z = tri.p[i].z * o.scale; + triScaled.uv[i] = tri.uv[i]; + triScaled.col[i] = tri.col[i]; + } + triScaled.tex = tri.tex; + + triTransformed.p[0] = Matrix_MultiplyVector(localMat, triScaled.p[0]); + triTransformed.p[1] = Matrix_MultiplyVector(localMat, triScaled.p[1]); + triTransformed.p[2] = Matrix_MultiplyVector(localMat, triScaled.p[2]); + triTransformed.uv[0] = triScaled.uv[0]; + triTransformed.uv[1] = triScaled.uv[1]; + triTransformed.uv[2] = triScaled.uv[2]; + triTransformed.col[0] = triScaled.col[0]; + triTransformed.col[1] = triScaled.col[1]; + triTransformed.col[2] = triScaled.col[2]; + triTransformed.tex = triScaled.tex; vec3d normal, line1, line2; line1 = Vector_Sub(triTransformed.p[1], triTransformed.p[0]); @@ -877,7 +954,7 @@ void FaceBall::RenderMesh(mat4x4&matView,std::vector&vecTrianglesToRas vec3d vCameraRay = Vector_Sub(triTransformed.p[0], freeRoam ? freeRoamCamera : player.GetPos()); - if (Vector_DotProduct(normal, vCameraRay) < 0) { + if (Vector_DotProduct(normal, vCameraRay) < 0||!o.affectedByLighting) { vec3d light_dir = Vector_Mul(vLookDir, -1); light_dir = Vector_Normalise(light_dir); @@ -889,9 +966,11 @@ void FaceBall::RenderMesh(mat4x4&matView,std::vector&vecTrianglesToRas triViewed.uv[0] = triTransformed.uv[0]; triViewed.uv[1] = triTransformed.uv[1]; triViewed.uv[2] = triTransformed.uv[2]; - triViewed.col[0] = Pixel(triTransformed.col[0].r * dp * dp, triTransformed.col[0].g * dp * dp, triTransformed.col[0].b * dp * dp); - triViewed.col[1] = Pixel(triTransformed.col[1].r * dp * dp, triTransformed.col[1].g * dp * dp, triTransformed.col[1].b * dp * dp); - triViewed.col[2] = Pixel(triTransformed.col[2].r * dp * dp, triTransformed.col[2].g * dp * dp, triTransformed.col[2].b * dp * dp); + if (o.affectedByLighting) { + triViewed.col[0] = Pixel(triTransformed.col[0].r * dp * dp, triTransformed.col[0].g * dp * dp, triTransformed.col[0].b * dp * dp); + triViewed.col[1] = Pixel(triTransformed.col[1].r * dp * dp, triTransformed.col[1].g * dp * dp, triTransformed.col[1].b * dp * dp); + triViewed.col[2] = Pixel(triTransformed.col[2].r * dp * dp, triTransformed.col[2].g * dp * dp, triTransformed.col[2].b * dp * dp); + } Pixel originalCol[3] = { triViewed.col[0],triViewed.col[1],triViewed.col[2] }; float dist = std::sqrtf(std::powf((freeRoam ? freeRoamCamera : player.GetPos()).x - triTransformed.p[0].x, 2) + std::powf((freeRoam ? freeRoamCamera : player.GetPos()).y - triTransformed.p[0].y, 2) + std::powf((freeRoam ? freeRoamCamera : player.GetPos()).z - triTransformed.p[0].z, 2)); float dist2 = std::sqrtf(std::powf((freeRoam ? freeRoamCamera : player.GetPos()).x - triTransformed.p[1].x, 2) + std::powf((freeRoam ? freeRoamCamera : player.GetPos()).y - triTransformed.p[1].y, 2) + std::powf((freeRoam ? freeRoamCamera : player.GetPos()).z - triTransformed.p[1].z, 2)); @@ -899,22 +978,31 @@ void FaceBall::RenderMesh(mat4x4&matView,std::vector&vecTrianglesToRas float colorMult = dist > 5 * PI / 3 ? 0 : std::sinf(0.3 * dist + PI / 2); float colorMult2 = dist2 > 5 * PI / 3 ? 0 : std::sinf(0.3 * dist2 + PI / 2); float colorMult3 = dist3 > 5 * PI / 3 ? 0 : std::sinf(0.3 * dist3 + PI / 2); - triViewed.col[0] = Pixel(triViewed.col[0].r * colorMult, triViewed.col[0].g * colorMult, triViewed.col[0].b * colorMult); - triViewed.col[1] = Pixel(triViewed.col[1].r * colorMult2, triViewed.col[1].g * colorMult2, triViewed.col[1].b * colorMult2); - triViewed.col[2] = Pixel(triViewed.col[2].r * colorMult3, triViewed.col[2].g * colorMult3, triViewed.col[2].b * colorMult3); + if (o.affectedByLighting) { + triViewed.col[0] = Pixel(triViewed.col[0].r * colorMult, triViewed.col[0].g * colorMult, triViewed.col[0].b * colorMult); + triViewed.col[1] = Pixel(triViewed.col[1].r * colorMult2, triViewed.col[1].g * colorMult2, triViewed.col[1].b * colorMult2); + triViewed.col[2] = Pixel(triViewed.col[2].r * colorMult3, triViewed.col[2].g * colorMult3, triViewed.col[2].b * colorMult3); + } + if (!o.affectedByLighting) { + triViewed.col[0] = originalCol[0]; + triViewed.col[1] = originalCol[1]; + triViewed.col[2] = originalCol[2]; + } triViewed.tex = triTransformed.tex; - for (Bullet& b : bullets) { - float dist = std::sqrtf(std::powf(b.pos.x - triTransformed.p[0].x, 2) + std::powf(b.pos.y - triTransformed.p[0].y, 2) + std::powf(b.pos.z - triTransformed.p[0].z, 2)); - float dist2 = std::sqrtf(std::powf(b.pos.x - triTransformed.p[1].x, 2) + std::powf(b.pos.y - triTransformed.p[1].y, 2) + std::powf(b.pos.z - triTransformed.p[1].z, 2)); - float dist3 = std::sqrtf(std::powf(b.pos.x - triTransformed.p[2].x, 2) + std::powf(b.pos.y - triTransformed.p[2].y, 2) + std::powf(b.pos.z - triTransformed.p[2].z, 2)); - float colorMult = (dist < 2 ? std::sinf(0.75 * dist + PI / 2) * 4 :1); - float colorMult2 = (dist2 < 2 ? std::sinf(0.75 * dist2 + PI / 2) * 4 : 1); - float colorMult3 = (dist3 < 2 ? std::sinf(0.75 * dist3 + PI / 2) * 4 : 1); - Pixel lightCol = b.col / 2 + Pixel{ 128, 128, 128 }; - if (dist < 2) {triViewed.col[0] = Pixel(std::min(255, std::max((int)originalCol[0].r, (int)(originalCol[0].r * colorMult / float(255.f/lightCol.r)))), std::min(255, std::max((int)originalCol[0].g, (int)(originalCol[0].g * colorMult / float(255.f / lightCol.g)))), std::min(255, std::max((int)originalCol[0].b, (int)(originalCol[0].b * colorMult / float(255.f / lightCol.b)))));} - if (dist2 < 2) {triViewed.col[1] = Pixel(std::min(255, std::max((int)originalCol[1].r, (int)(originalCol[1].r * colorMult2 / float(255.f / lightCol.r)))), std::min(255, std::max((int)originalCol[1].g, (int)(originalCol[1].g * colorMult2 / float(255.f / lightCol.g)))), std::min(255, std::max((int)originalCol[1].b, (int)(originalCol[1].b * colorMult2 / float(255.f / lightCol.b)))));} - if (dist3 < 2) {triViewed.col[2] = Pixel(std::min(255, std::max((int)originalCol[2].r, (int)(originalCol[2].r * colorMult3 / float(255.f / lightCol.r)))), std::min(255, std::max((int)originalCol[2].g, (int)(originalCol[2].g * colorMult3 / float(255.f / lightCol.g)))), std::min(255, std::max((int)originalCol[2].b, (int)(originalCol[2].b * colorMult3 / float(255.f / lightCol.b)))));} + if (o.affectedByLighting) { + for (Bullet& b : bullets) { + float dist = std::sqrtf(std::powf(b.pos.x - triTransformed.p[0].x, 2) + std::powf(b.pos.y - triTransformed.p[0].y, 2) + std::powf(b.pos.z - triTransformed.p[0].z, 2)); + float dist2 = std::sqrtf(std::powf(b.pos.x - triTransformed.p[1].x, 2) + std::powf(b.pos.y - triTransformed.p[1].y, 2) + std::powf(b.pos.z - triTransformed.p[1].z, 2)); + float dist3 = std::sqrtf(std::powf(b.pos.x - triTransformed.p[2].x, 2) + std::powf(b.pos.y - triTransformed.p[2].y, 2) + std::powf(b.pos.z - triTransformed.p[2].z, 2)); + float colorMult = (dist < 2 ? std::sinf(0.75 * dist + PI / 2) * 4 : 1); + float colorMult2 = (dist2 < 2 ? std::sinf(0.75 * dist2 + PI / 2) * 4 : 1); + float colorMult3 = (dist3 < 2 ? std::sinf(0.75 * dist3 + PI / 2) * 4 : 1); + Pixel lightCol = b.col / 2 + Pixel{ 128, 128, 128 }; + if (dist < 2) { triViewed.col[0] = Pixel(std::min(255, std::max((int)originalCol[0].r, (int)(originalCol[0].r * colorMult / float(255.f / lightCol.r)))), std::min(255, std::max((int)originalCol[0].g, (int)(originalCol[0].g * colorMult / float(255.f / lightCol.g)))), std::min(255, std::max((int)originalCol[0].b, (int)(originalCol[0].b * colorMult / float(255.f / lightCol.b))))); } + if (dist2 < 2) { triViewed.col[1] = Pixel(std::min(255, std::max((int)originalCol[1].r, (int)(originalCol[1].r * colorMult2 / float(255.f / lightCol.r)))), std::min(255, std::max((int)originalCol[1].g, (int)(originalCol[1].g * colorMult2 / float(255.f / lightCol.g)))), std::min(255, std::max((int)originalCol[1].b, (int)(originalCol[1].b * colorMult2 / float(255.f / lightCol.b))))); } + if (dist3 < 2) { triViewed.col[2] = Pixel(std::min(255, std::max((int)originalCol[2].r, (int)(originalCol[2].r * colorMult3 / float(255.f / lightCol.r)))), std::min(255, std::max((int)originalCol[2].g, (int)(originalCol[2].g * colorMult3 / float(255.f / lightCol.g)))), std::min(255, std::max((int)originalCol[2].b, (int)(originalCol[2].b * colorMult3 / float(255.f / lightCol.b))))); } + } } //triViewed.col = triTransformed.col; @@ -1443,6 +1531,16 @@ void FaceBall::RenderWorld() { } } +int FaceBall::PlayerActiveShotCount(int playerNumb){ + int count=0; + for (Bullet&b:bullets){ + if (b.playerIndex==playerNumb){ + count++; + } + } + return count; +} + void FaceBall::HandleKeys(float fElapsedTime) { vec3d vForward = Vector_Mul(vLookDir, std::min(player.GetRadius()-0.00001f,moveSpd*fElapsedTime)); if (freeRoam) { @@ -1456,8 +1554,10 @@ void FaceBall::HandleKeys(float fElapsedTime) { else { pitch = 0; if (GetMouse(0).bPressed) { - if (bullets.size() < shotLimit) { - bullets.push_back({ bullet,{player.GetPos().x,player.GetPos().y - 0.15f, player.GetPos().z},fYaw,0.125f,{shotSpd * std::cosf(fYaw),shotSpd * std::sinf(fYaw)},GREEN,true }); + if (PlayerActiveShotCount(0) < shotLimit) { + Bullet newBullet={ bullet,{player.GetPos().x,player.GetPos().y - 0.15f, player.GetPos().z},fYaw,0.125f,1,true,{shotSpd * std::cosf(fYaw),shotSpd * std::sinf(fYaw)},GREEN,true }; + newBullet.playerIndex=0; + bullets.push_back(newBullet); } } } @@ -1638,6 +1738,10 @@ void FaceBall::HandleKeys(float fElapsedTime) { if (GetKey(olc::F1).bPressed) { freeRoam = !freeRoam; } + if (vi2d{int(player.GetPos().x),int(player.GetPos().z)}!=playerRoundedCoords){ + playerRoundedCoords = vi2d{int(player.GetPos().x),int(player.GetPos().z)}; + RegenerateMinimap(); + } } void FaceBall::AddWall(int dir, vi2d gridSquare) { @@ -1685,6 +1789,7 @@ bool FaceBall::OnUserCreate() exit_wall_tex = new Decal(new Sprite("assets/exitwall.png")); enemy_ShootMe2_tex = new Decal(new Sprite("assets/enemies/ShootMe2.png")); enemy_IShoot_tex = new Decal(new Sprite("assets/enemies/IShoot.png")); + enemy_IShoot2_tex = new Decal(new Sprite("assets/enemies/IShoot2.png")); life4 = new Decal(new Sprite("assets/life4.png")); life3 = new Decal(new Sprite("assets/life3.png")); life2 = new Decal(new Sprite("assets/life2.png")); @@ -1694,22 +1799,28 @@ bool FaceBall::OnUserCreate() powerup_tex = new Decal(new Sprite("assets/powerup.png")); powerup2_tex = new Decal(new Sprite("assets/powerup2.png")); powerups_tex = new Decal(new Sprite("assets/powerups.png")); + worldSkyBox_tex = new Decal(new Sprite("assets/worldSkyBox.png")); enemy_ShootMe = { "assets/enemies/ShootMe.obj", enemy_ShootMe_tex }; enemy_ShootMe2 = { "assets/enemies/ShootMe2.obj", enemy_ShootMe2_tex }; enemy_Sonar = { "assets/enemies/Sonar.obj", enemy_Sonar_tex }; enemy_IShoot = { "assets/enemies/IShoot.obj", enemy_IShoot_tex}; + enemy_IShoot2 = { "assets/enemies/IShoot2.obj", enemy_IShoot2_tex}; bullet = { "assets/enemies/bullet.obj",bullet_tex }; powerup = { "assets/Powerup.obj",powerup_tex}; powerup2 = { "assets/Powerup2.obj",powerup2_tex }; mapExit = { "assets/Exit.obj",dot }; + worldSkyBox = { "assets/worldSkyBox.obj",worldSkyBox_tex }; mapWalls.texture = wall_tex; mapFloor.texture = floor_tex; + mapSpr=new Sprite(minimapGridSize.x*20,minimapGridSize.y*20); + mapDecal=new Decal(mapSpr); + InitializeEnemyData(); InitializePowerupColors(); - LoadLevel(1); + LoadLevel(level); return true; } @@ -1812,20 +1923,23 @@ bool Bullet::Update(float fElapsedTime) { } void FaceBall::HurtPlayer(EnemyID id,int damage,bool blinking) { - if (shieldDuration >= 0) { - damage = 0; - } - hp = std::max(0, hp - damage); - if (hp <= 0) { - respawnTimer = 3.0f; - } - lastHitBy = id; - lastHitByBlinking = blinking; - if (shieldDuration < 0) { - screenCol = enemyData[lastHitBy].col; - } - else { - screenCol = WHITE; + if (respawnTimer<=0.0f){ + if (shieldDuration >= 0) { + damage = 0; + } + hp = std::max(0, hp - damage); + if (hp <= 0) { + RegenerateMinimap(); + respawnTimer = 3.0f; + } + lastHitBy = id; + lastHitByBlinking = blinking; + if (shieldDuration < 0) { + screenCol = enemyData[lastHitBy].col; + } + else { + screenCol = WHITE; + } } } @@ -1948,6 +2062,7 @@ void FaceBall::RenderHud(float fElapsedTime) { hudShakeAmt = std::sinf(40 * hudShakeTime); hudAdjustment.x += hudShakeAmt * 2; hudAdjustment.y += hudShakeAmt * 4; + hudOffset += hudShakeAmt * 2; } vf2d hudLoc = { hudAdjustment.x + (hp>0?hudOffset:0),hudAdjustment.y}; if (hp > 0) { @@ -1969,7 +2084,12 @@ void FaceBall::RenderHud(float fElapsedTime) { for (int x = -1; x <= 1; x++) { for (int y = -1; y <= 1; y++) { if (x != 0 && y != 0) { - DrawStringDecal(vf2d{ hudOffset + float(ScreenWidth() / 2 - GetTextSize(hudDisplayText).x / 2 * 4) + 32,float(ScreenHeight() - 128 - GetTextSize(hudDisplayText).y * 4) + 18 } + vf2d{ float(x),float(y) }, hudDisplayText, DARK_BLUE, { 4,4 }); + if (lookingAtText != "") { + DrawStringDecal(vf2d{ hudOffset + float(ScreenWidth() / 2 - GetTextSize(lookingAtText).x / 2 * 4) + 32,float(ScreenHeight() - 128 - GetTextSize(lookingAtText).y * 4) + 18 } + vf2d{ float(x),float(y) }, lookingAtText, DARK_BLUE, { 4,4 }); + } + else { + DrawStringDecal(vf2d{ hudOffset + float(ScreenWidth() / 2 - GetTextSize(hudDisplayText).x / 2 * 4) + 32,float(ScreenHeight() - 128 - GetTextSize(hudDisplayText).y * 4) + 18 } + vf2d{ float(x),float(y) }, hudDisplayText, DARK_BLUE, { 4,4 }); + } } } } @@ -1981,7 +2101,12 @@ void FaceBall::RenderHud(float fElapsedTime) { } } DrawStringPropDecal(vf2d{ hudOffset + (float)(ScreenWidth() / 2 - GetTextSizeProp(std::to_string(score)).x * 4 / 2) + 32,(float)(36 - GetTextSizeProp(std::to_string(score)).y * 4) + 18 } + hudAdjustment, std::to_string(score), { 192,96,96 }, { 4,4 }); - DrawStringDecal(vf2d{ hudOffset + float(ScreenWidth() / 2 - GetTextSize(hudDisplayText).x / 2 * 4) + 32,float(ScreenHeight() - 128 - GetTextSize(hudDisplayText).y * 4) + 18 }, hudDisplayText, { 192,192,255 }, { 4,4 }); + if (lookingAtText != "") { + DrawStringDecal(vf2d{ hudOffset + float(ScreenWidth() / 2 - GetTextSize(lookingAtText).x / 2 * 4) + 32,float(ScreenHeight() - 128 - GetTextSize(lookingAtText).y * 4) + 18 }, lookingAtText, { 192,192,255 }, { 4,4 }); + } + else { + DrawStringDecal(vf2d{ hudOffset + float(ScreenWidth() / 2 - GetTextSize(hudDisplayText).x / 2 * 4) + 32,float(ScreenHeight() - 128 - GetTextSize(hudDisplayText).y * 4) + 18 }, hudDisplayText, { 192,192,255 }, { 4,4 }); + } DrawStringDecal({float(ScreenWidth()-128),24},std::to_string(wave2Enemies.size())); SetDecalMode(DecalMode::ADDITIVE); DrawDecal({ float(ScreenWidth() / 2 - crosshair->sprite->width / 2),float(ScreenHeight() / 2 - crosshair->sprite->height / 2) }, crosshair, { 1,1 }, {255,255,255,128}); @@ -1994,6 +2119,10 @@ void FaceBall::RenderHud(float fElapsedTime) { if (camoDuration > 0) { DrawPartialDecal({ hudOffset + float(ScreenWidth() / 10 - 16), float(ScreenHeight() / 4 + ScreenHeight() / 4 * 2 - 16 * 4) }, vf2d{ 32,32 }*4, powerups_tex, { 5 * 32,0 }, { 32,32 },camoDuration>7?WHITE:camoDuration>2?std::abs(std::sin(10*camoDuration))>0.65?WHITE:BLACK: std::abs(std::sin(30 * camoDuration)) > 0.75 ? WHITE : BLACK); } + vf2d mapCenter = {float(ScreenWidth()-364),float(164)}; + SetDrawTarget(nullptr); + DrawDecal(vf2d{mapCenter.x+hudOffset/2,mapCenter.y}-vf2d{2.5f,2.5f},dot,{5,5},GREEN); + DrawRotatedDecal({mapCenter.x+hudOffset/2,mapCenter.y},mapDecal,-fYaw-PI/2,vf2d{int(player.GetPos().x)+0.5f,int(player.GetPos().z)+0.5f}*minimapGridSize,{1,1}); SetDecalMode(DecalMode::NORMAL); } GradientFillRectDecal({ 0,0 }, vf2d{ (float)ScreenWidth()/2,(float)ScreenHeight()/2 }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0) }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0) }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime > 0.2f ? 64 : 0) }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0) }); @@ -2118,14 +2247,15 @@ void FaceBall::RunEnemyAI(Enemy& e,float fElapsedTime,int myIndex) { }break; } }break; - case ISHOOT: + case ISHOOT: case ISHOOT_MAP: { e.rot += dat.rotSpd * fElapsedTime; if (e.CanShoot()) { e.ShootBullet(myIndex); } }break; - case ISHOOT2: { + case ISHOOT2: + case ISHOOT2_SPEED:{ switch (e.GetPhase()) { case Phase::DEFAULT: { vf2d movementVec = { std::cosf(e.rot) * dat.movSpd * fElapsedTime,std::sinf(e.rot) * dat.movSpd * fElapsedTime }; @@ -2162,12 +2292,22 @@ void FaceBall::RunEnemyAI(Enemy& e,float fElapsedTime,int myIndex) { } }break; } + if (e.roundedCoords!=vi2d{int(e.pos.x),int(e.pos.z)}){ + e.roundedCoords=vi2d{int(e.pos.x),int(e.pos.z)}; + if (hasMapUpgrade){ + RegenerateMinimap(); + } + } } } +bool FaceBall::PlayerHasMapUpgrade(){ + return hasMapUpgrade; +} + bool FaceBall::OnUserUpdate(float fElapsedTime) { - fElapsedTime = std::min(0.01667f, fElapsedTime); + fElapsedTime = std::min(2/60.f, fElapsedTime); gameTimer += fElapsedTime; switch (mode) { case GAME: { @@ -2191,6 +2331,7 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) !CheckPlayerCollision({0,0,0},{e.pos.x,e.pos.z},e.radius*6)){ enemies.push_back(e); wave2Enemies.erase(wave2Enemies.begin()+i); + RegenerateMinimap(); goto spawningDone; } } @@ -2202,6 +2343,7 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) !CheckPlayerCollision({0,0,0},{e.pos.x,e.pos.z},e.radius*6)){ enemies.push_back(e); wave3Enemies.erase(wave3Enemies.begin()+i); + RegenerateMinimap(); goto spawningDone; } } @@ -2217,6 +2359,7 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) !CheckPlayerCollision({0,0,0},{e.pos.x,e.pos.z},e.radius*6)){ enemies.push_back(e); wave2Enemies.erase(wave2Enemies.begin()+i); + RegenerateMinimap(); break; } } @@ -2231,14 +2374,21 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) it++; } } - for (int i = 0; i < enemies.size(); i++) { - Enemy& e = enemies[i]; - e.Update(fElapsedTime); - if (e.isLastHitTimerActive()) { - e.reduceLastHitTimer(fElapsedTime); + int counter = 0; + for (std::vector::iterator it = enemies.begin(); it != enemies.end();) { + Enemy& e = *it; + if (!e.Update(fElapsedTime)) { + it = enemies.erase(it); } - if (stopDuration < 0) { - RunEnemyAI(e, fElapsedTime, i); + else { + if (e.isLastHitTimerActive()) { + e.reduceLastHitTimer(fElapsedTime); + } + if (stopDuration < 0) { + RunEnemyAI(e, fElapsedTime, counter); + } + it++; + counter++; } } for (std::vector::iterator it = powerups.begin(); it != powerups.end();) { @@ -2283,6 +2433,7 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) }break; case PowerupType::MAP: { hasMapUpgrade = true; + RegenerateMinimap(); }break; case PowerupType::COIN: { AddScore(1000); @@ -2294,6 +2445,25 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) } } if (hp > 0) { + vf2d checkPos = {player.GetPos().x, player.GetPos().z}; + lookingAtText = ""; + while (true) { + if (checkPos.x<0 || checkPos.y<0 || checkPos.x>MAP_SIZE.x || checkPos.y>MAP_SIZE.y) break; + vf2d checkVec = { std::cosf(fYaw) * 0.1f,std::sinf(fYaw) * 0.1f }; + if (CheckCollision({ checkVec.x,0,checkVec.y }, checkPos, 0.05f)) break; + checkPos.x += checkVec.x; + checkPos.y += checkVec.y; + for (Enemy&e : enemies) { + if (!e.isDead()) { + float dist = std::sqrtf(std::powf(checkPos.x - e.pos.x, 2) + std::powf(checkPos.y - e.pos.z, 2)); + if (dist <= e.radius*2) { + lookingAtText = enemyData[e.GetID()].name; + goto afterPositionCheck; + } + } + } + } + afterPositionCheck: HandleKeys(fElapsedTime); RenderWorld(); } @@ -2408,7 +2578,7 @@ int FaceBall::EnemiesAlive(){ int main() { FaceBall demo; - if (demo.Construct(1280, 720, 2, 2)) + if (demo.Construct(1280, 720, 2, 2, false, true)) demo.Start(); return 0; } diff --git a/Faceball2030/main.h b/Faceball2030/main.h index 6df59fb..64fbf35 100644 --- a/Faceball2030/main.h +++ b/Faceball2030/main.h @@ -144,6 +144,8 @@ struct Object { vec3d pos = { 0,0 }; float rot = 0; float radius = 0.2f; + float scale = 1.f; + bool affectedByLighting = true; }; struct Bullet : Object{ @@ -153,6 +155,7 @@ struct Bullet : Object{ EnemyID shooterID; int shooterIndex = -1; bool shooterBlinking = false; + int playerIndex = -1; bool Update(float fElapsedTime); }; @@ -214,6 +217,7 @@ struct Enemy : public Object { bool flippedTriangles = false; bool finishedAnimation = false; float blinkingAmt = 1; //>0.5 the enemy is visible. + vi2d roundedCoords = vi2d{int(pos.x),int(pos.z)}; Enemy(EnemyID id, vec3d pos, float rot, float radius); EnemyID GetID(); //Can set the damage to 0 to cause just a visual hit. @@ -261,12 +265,17 @@ class FaceBall : public PixelGameEngine private: Mesh mapWalls,mapFloor,enemy_ShootMe,undefined, enemy_Sonar, mapExit,enemy_ShootMe2,powerup,powerup2, - enemy_IShoot; + enemy_IShoot,enemy_IShoot2,worldSkyBox; + + Sprite*mapSpr; + Decal*mapDecal; + + vf2d minimapGridSize={16,16}; Decal* dot, * enemy_ShootMe_tex,*bullet_tex,*wall_tex,*floor_tex, *enemy_Sonar_tex,*hud,*exit_wall_tex,*enemy_ShootMe2_tex,*enemy_IShoot_tex, *life4,*life3,*life2,*life1,*crosshair,*hudmeter,*powerup_tex,*powerup2_tex, - *powerups_tex; + *powerups_tex,*enemy_IShoot2_tex, *worldSkyBox_tex; vi2d exitCoords = { 0,0 }; std::vectorknownGoodPositions; std::vector>map; @@ -281,6 +290,7 @@ class FaceBall : public PixelGameEngine double gameTimer = 0; int lastPowerupCollidedWith = -1; std::string hudDisplayText = ""; + std::string lookingAtText = ""; float stopDuration = 0,shieldDuration=0,camoDuration=0; bool hasMapUpgrade = false; std::arraycolorCycle={ @@ -333,8 +343,9 @@ class FaceBall : public PixelGameEngine vf2d{1162,575}, vf2d{1163,525} }; - +public: Player player = { {3.7,0.3,0.7}, {{0.5,0.5},0.2} }; + vi2d playerRoundedCoords = {int(player.GetPos().x),int(player.GetPos().z)}; const int baseHP = 3; int hp = baseHP; int maxHP=hp; @@ -413,6 +424,7 @@ class FaceBall : public PixelGameEngine int CheckPowerupCollision(vec3d movementVector, vf2d pos, float radius); void ResetScore(); int EnemiesAlive(); + int PlayerActiveShotCount(int playerNumb); public: vi2d MAP_SIZE; float restingTriangleYDepth = 0.f; @@ -431,4 +443,6 @@ class FaceBall : public PixelGameEngine vf2d GetPlayerPos(); void AddScore(int score); vf2d GetRandomizedSpawnPosition(); + bool PlayerHasMapUpgrade(); + void RegenerateMinimap(); }; \ No newline at end of file diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..07736e2 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,5 @@ +- Minimap +- Skybox +- Levels have distinguishing elements (skybox, walls, floor, fog color) +- Main Menu +- Sounds & Music \ No newline at end of file