git: ignore bin/, feature: go to menu with escape

This commit is contained in:
huaqo-games
2025-03-18 17:09:04 +01:00
parent afaf0c70a3
commit a4d9b22c32
7 changed files with 9 additions and 28 deletions
+1
View File
@@ -0,0 +1 @@
bin/
BIN
View File
Binary file not shown.
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.game</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
@@ -1,5 +0,0 @@
---
triple: 'arm64-apple-darwin'
binary-path: 'bin/game'
relocations: []
...
+6 -1
View File
@@ -66,7 +66,7 @@ void InitGame(GameState* g){
g->target = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
}
void UpdateGame(GameState* g){
void UpdateGame(GameState* g, Screen *currentScreen){
UpdatePostFX(&g->postFX);
UpdateMusic(&g->ambient);
UpdateMouse(&g->mouse, &g->camera);
@@ -74,6 +74,11 @@ void UpdateGame(GameState* g){
UpdateFloor(&g->floor, &g->camera);
UpdatePlayer(&g->player);
UpdateBee(&g->bee1, &g->flowers, &g->hive);
if (IsKeyPressed(KEY_ESCAPE)){
*currentScreen = MENU;
}
}
void RenderComponents(GameState* g){
+2 -2
View File
@@ -27,7 +27,7 @@ int main(void)
InitMenu(&menu);
InitGame(&game);
while (!WindowShouldClose())
while (true)
{
switch (currentScreen)
{
@@ -43,7 +43,7 @@ int main(void)
}break;
case GAMEPLAY:
{
UpdateGame(&game);
UpdateGame(&game, &currentScreen);
RenderGame(&game);
}break;
default: break;