Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NarrikSynthfox committed Apr 24, 2024
2 parents cec23bf + e80b848 commit b0c218c
Show file tree
Hide file tree
Showing 26 changed files with 151 additions and 60 deletions.
Binary file added Encore/Assets/block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/encore-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/encore_favicon-NEW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/encore_favicon-NEW.png~
Binary file not shown.
24 changes: 1 addition & 23 deletions Encore/Assets/highway/expert.obj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Blender 4.0.2
# www.blender.org
o Expert_Highway
o Expert_Highway.001
v 2.500000 -0.000000 0.000000
v 2.500000 -0.000000 20.000000
v -2.500000 -0.000000 0.000000
Expand All @@ -13,17 +13,7 @@ v -1.500000 -0.000000 0.000000
v -0.500000 -0.000000 0.000000
v 0.500000 -0.000000 0.000000
v 1.500000 -0.000000 0.000000
v -2.640000 -0.000000 0.000000
v -2.640000 -0.000000 20.000000
v 2.640000 -0.000000 0.000000
v 2.640000 -0.000000 20.000000
v 2.570000 0.100000 20.000000
v 2.570000 0.100000 0.000000
v -2.570000 0.100000 0.000000
v -2.570000 0.100000 20.000000
vn -0.0000 1.0000 -0.0000
vn -0.8192 0.5735 -0.0000
vn 0.8192 0.5735 -0.0000
vt 0.773311 0.000000
vt 0.955518 0.000000
vt 0.955518 1.000000
Expand All @@ -36,21 +26,9 @@ vt 0.408896 0.000000
vt 0.408897 1.000000
vt 0.591103 0.000000
vt 0.591103 1.000000
vt 0.977759 1.000000
vt 0.977759 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.022241 0.000000
vt 0.022241 1.000000
vt 0.000000 1.000000
vt -0.000000 0.000000
s 0
f 9/1/1 3/2/1 4/3/1 8/4/1
f 1/5/1 12/6/1 5/7/1 2/8/1
f 12/6/1 11/9/1 6/10/1 5/7/1
f 11/9/1 10/11/1 7/12/1 6/10/1
f 10/11/1 9/1/1 8/4/1 7/12/1
f 20/13/2 19/14/2 13/15/2 14/16/2
f 18/17/3 17/18/3 16/19/3 15/20/3
f 1/5/2 2/8/2 17/18/2 18/17/2
f 4/3/3 3/2/3 19/14/3 20/13/3
Binary file added Encore/Assets/highway/highway_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/highway/highwaysides_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions Encore/Assets/highway/lanes.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Blender 4.0.2
# www.blender.org
o Lane_Separators
v -1.510000 0.001000 20.500000
v -1.510000 0.001000 3.500000
v -0.510000 0.001000 20.500000
v -0.510000 0.001000 3.500000
v 0.462500 0.001000 20.500000
v 0.462500 0.001000 3.500000
v 1.490000 0.001000 20.500000
v 1.490000 0.001000 3.500000
v 1.510000 0.001000 20.500000
v 1.510000 0.001000 3.500000
v 0.537500 0.001000 20.500000
v 0.537500 0.001000 3.500000
v -0.490000 0.001000 20.500000
v -0.490000 0.001000 3.500000
v -1.490000 0.001000 20.500000
v -1.490000 0.001000 3.500000
vn -0.0000 -1.0000 -0.0000
vt 0.500000 1.000000
vt 0.500000 0.000000
vt -0.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 1.000000 -0.000000
s 0
f 7/1/1 8/2/1 10/3/1 9/4/1
f 5/5/1 6/6/1 12/2/1 11/1/1
f 3/1/1 4/2/1 14/3/1 13/4/1
f 1/1/1 2/2/1 16/3/1 15/4/1
Binary file added Encore/Assets/highway/lanes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions Encore/Assets/highway/new_board.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Blender 4.0.2
# www.blender.org
o Smasher_Board
v -2.570000 0.001000 3.000000
v 2.570000 0.001000 3.000000
v -2.570000 0.001000 1.900000
v 2.570000 0.001000 1.900000
vn -0.0000 1.0000 -0.0000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
s 0
f 1/1/1 2/2/1 4/3/1 3/4/1
28 changes: 28 additions & 0 deletions Encore/Assets/highway/sides.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Blender 4.0.2
# www.blender.org
o Expert_Highway
v 2.500000 -0.000000 0.000000
v 2.500000 -0.000000 20.000000
v 2.640000 -0.000000 0.000000
v 2.640000 -0.000000 20.000000
v 2.570000 0.100000 20.000000
v 2.570000 0.100000 0.000000
v -2.500000 -0.000000 0.000000
v -2.500000 -0.000000 20.000000
v -2.640000 -0.000000 0.000000
v -2.640000 -0.000000 20.000000
v -2.570000 0.100000 20.000000
v -2.570000 0.100000 0.000000
vn 0.8192 0.5735 -0.0000
vn -0.8192 0.5735 -0.0000
vt 0.499999 1.000000
vt 0.499997 0.000000
vt 0.999995 0.000000
vt 0.999997 1.000000
vt 0.000002 1.000000
vt -0.000002 -0.000000
s 0
f 6/1/1 5/2/1 4/3/1 3/4/1
f 1/5/2 2/6/2 5/2/2 6/1/2
f 12/1/2 9/4/2 10/3/2 11/2/2
f 7/5/1 12/1/1 11/2/1 8/6/1
Binary file added Encore/Assets/highway/smasher board.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/highway/smasher_board_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/notes/note-hopo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/notes/note-hopo_e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/notes/note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/notes/note_e_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/ui/empty-star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/ui/gold-star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Encore/Assets/ui/star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 35 additions & 11 deletions Encore/include/game/assets.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#pragma once
#include "raylib.h"
#include <filesystem>
#include "player.h"

player player;

class Assets {
private:
Texture2D LoadTextureFilter(std::filesystem::path texturePath) {
Expand All @@ -12,12 +16,17 @@ class Assets {
Model smasherReg;
Texture2D smasherRegTex;

Image icon;
Texture2D encoreWhiteLogo;
Texture2D songBackground;
Model smasherBoard;
Texture2D smasherBoardTex;

Model smasherPressed;
Texture2D smasherPressTex;

Model lanes;
Texture2D lanesTex;
Model odFrame;
Model odBar;
Model multFrame;
Expand All @@ -38,8 +47,10 @@ class Assets {
int uvOffsetXLoc;
int uvOffsetYLoc;

Model expertHighwaySides;
Model expertHighway;
Model emhHighway;
Texture2D highwaySidesTexture;
Texture2D highwayTexture;
Texture2D highwayTextureOD;
Model noteModel;
Expand All @@ -62,10 +73,15 @@ class Assets {
smasherReg.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = smasherRegTex;
smasherReg.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;

smasherBoard = LoadModel((directory / "Assets/highway/board.obj").string().c_str());
smasherBoardTex = LoadTextureFilter(directory / "Assets/highway/smasherBoard.png");
smasherBoard = LoadModel((directory / "Assets/highway/new_board.obj").string().c_str());
smasherBoardTex = LoadTextureFilter(directory / "Assets/highway/smasher_board_new.png");
smasherBoard.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = smasherBoardTex;
smasherBoard.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;
smasherBoard.materials[0].maps[MATERIAL_MAP_ALBEDO].color = player.accentColor;

lanes = LoadModel((directory / "Assets/highway/lanes.obj").string().c_str());
lanesTex = LoadTextureFilter(directory / "Assets/highway/lanes.png");
lanes.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = lanesTex;
lanes.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;

smasherPressed = LoadModel((directory / "Assets/highway/smasher.obj").string().c_str());
smasherPressTex = LoadTextureFilter(directory / "Assets/highway/smasher_press.png");
Expand Down Expand Up @@ -110,24 +126,28 @@ class Assets {
uvOffsetXLoc = GetShaderLocation(multNumberShader, "uvOffsetX");
uvOffsetYLoc = GetShaderLocation(multNumberShader, "uvOffsetY");

expertHighwaySides = LoadModel(((directory / "Assets/highway/sides.obj").string().c_str()));
expertHighway = LoadModel((directory / "Assets/highway/expert.obj").string().c_str());
emhHighway = LoadModel((directory / "Assets/highway/emh.obj").string().c_str());
highwayTexture = LoadTextureFilter(directory / "Assets/highway/highway.png");
highwayTexture = LoadTextureFilter(directory / "Assets/highway/highway_new.png");
highwayTextureOD = LoadTextureFilter(directory / "Assets/highway/highway_od.png");
highwaySidesTexture = LoadTextureFilter(directory/"Assets/highway/highwaysides_new.png");
expertHighwaySides.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = highwaySidesTexture;
expertHighwaySides.materials[0].maps[MATERIAL_MAP_ALBEDO].color = player.accentColor;
expertHighway.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = highwayTexture;
expertHighway.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;
expertHighway.materials[0].maps[MATERIAL_MAP_ALBEDO].color = player.accentColor;
emhHighway.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = highwayTexture;
emhHighway.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;
emhHighway.materials[0].maps[MATERIAL_MAP_ALBEDO].color = player.accentColor;
noteModel = LoadModel((directory / "Assets/notes/note.obj").string().c_str());
noteTexture = LoadTextureFilter(directory / "Assets/notes/note_d.png");
emitTexture = LoadTextureFilter(directory / "Assets/notes/note_e.png");
noteTexture = LoadTextureFilter(directory / "Assets/notes/note.png");
emitTexture = LoadTextureFilter(directory / "Assets/notes/note_e_new.png");
noteModel.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = noteTexture;
noteModel.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;
noteModel.materials[0].maps[MATERIAL_MAP_ALBEDO].color = player.accentColor;
noteModel.materials[0].maps[MATERIAL_MAP_EMISSION].texture = emitTexture;
noteModel.materials[0].maps[MATERIAL_MAP_EMISSION].color = WHITE;
noteModelOD = LoadModel((directory / "Assets/notes/note.obj").string().c_str());
noteTextureOD = LoadTextureFilter(directory / "Assets/notes/note_od_d.png");
emitTextureOD = LoadTextureFilter(directory / "Assets/notes/note_od_e.png");
noteTextureOD = LoadTextureFilter(directory / "Assets/notes/note.png");
emitTextureOD = LoadTextureFilter(directory / "Assets/notes/note_e_new.png");
noteModelOD.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = noteTextureOD;
noteModelOD.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE;
noteModelOD.materials[0].maps[MATERIAL_MAP_EMISSION].texture = emitTextureOD;
Expand All @@ -137,6 +157,10 @@ class Assets {
liftModelOD = LoadModel((directory / "Assets/notes/lift.obj").string().c_str());
liftModelOD.materials[0].maps[MATERIAL_MAP_ALBEDO].color = Color{ 217, 183, 82 ,127 };

icon = LoadImage((directory / "Assets/encore_favicon-NEW.png").string().c_str());
encoreWhiteLogo = LoadTexture((directory / "Assets/encore-white.png").string().c_str());
songBackground = LoadTexture((directory / "Assets/background.png").string().c_str());

rubik = LoadFontEx((directory / "Assets/fonts/Rubik-Regular.ttf").string().c_str(), 100, 0, 0);
//clapOD = LoadSound((directory / "Assets/highway/clap.ogg").string().c_str());
//SetSoundVolume(clapOD, 0.375);
Expand Down
7 changes: 6 additions & 1 deletion Encore/include/game/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ int notesHit = 0;
int notesMissed = 0;
int perfectHit = 0;



float selInstVolume = 0.5;
float otherInstVolume = 0.375;
float missVolume = 0.15;
Expand All @@ -30,7 +32,7 @@ bool lastNotePerfect = false;
float liftTimingMult = 1.25f;

float highwayLength = 11.5f;
float smasherPos = 2.7f;
float smasherPos = 2.4f; // used to be 2.7

bool extraGameplayStats = false;

Expand Down Expand Up @@ -134,6 +136,9 @@ float comboFillCalc(int instrument) {
class player {
public:


Color accentColor = Color{255,0,255,255};
Color highwayColor = Color{255-64, 0, 255-64,255};
static void resetPlayerStats() {
notesHit = 0;
notesMissed = 0;
Expand Down
Loading

0 comments on commit b0c218c

Please sign in to comment.