updated readme (5)

This commit is contained in:
Alexandre 2025-02-24 17:02:26 +01:00
parent b5e7357f66
commit 7bb62ba808
5 changed files with 25 additions and 9 deletions

View File

@ -1,8 +1,11 @@
# --| Syntax for level files |-- # --| Syntax for level files |--
1) **General rule** 1) **General rules**
each file must be named "room_k" where k is a positive integer . each file must be named "room_k" where k is a positive integer
if "room_k" exists then all "room_u" where 0 <= u < k exists if "room_k" exists then all "room_u" where 0 <= u < k exists
. you can add text at the end of each line as comments
but *do not use caps*, *this might confuse the parser*
2) **Data structure** 2) **Data structure**
below is a detailled list for all block types ; below is a detailled list for all block types ;

BIN
bin/back

Binary file not shown.

View File

@ -1,17 +1,27 @@
Blocks : Blocks :
[-16.0, -1.0, -16.0, 32.0, 1.0, 32.0, 0.0, 0.0, 128, 128, 128] [-16.0, -1.0, -16.0, 32.0, 1.0, 32.0, 0.0, 0.0, 128, 128, 128]
[-4.0, 10.0, 0.0, 2.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192] [-4.0, 10.0, 0.0, 2.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192] // cp1
[-4.0, 20.0, 0.0, 2.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192] // cp2
Entities: Entities:
[-2.0, 1.0 , -2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 128, 1, 0, 8, 100, 1, 128, 128, 128] [-2.0, 1.0 , -2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 128, 1, 0, 8, 100, 1, 128, 128, 128]
[-1.5, 1.5 , -1.5, 1.0, 1.0, 1.0, 0.0, 0.0, 192, 192, 192, 1, 0, 7, levels/level_01/, 7, great, 192, 192, 192] [-1.5, 1.5 , -1.5, 1.0, 1.0, 1.0, 0.0, 0.0, 192, 192, 192, 1, 0, 7, levels/level_01/, 7, great, 192, 192, 192]
[-8.0, 0.0, -8.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1]
[-3.5, 13.0, 0.5, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 10, 0, 0] // cp1 coin
[-3.5, 23.0, 0.5, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 10, 0, 0] // cp2 coin
[-8.0, 0.0, -8.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1] // section 1 (beat)
[-6.0, 2.0, -8.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1] [-6.0, 2.0, -8.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1]
[-4.0, 4.0, -8.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 0] [-4.0, 4.0, -8.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 0]
[-4.0, 6.0, -6.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 0] [-4.0, 6.0, -6.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 0]
[-4.0, 8.0, -4.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1] [-4.0, 8.0, -4.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1]
[-4.0, 10.0, -2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1] [-4.0, 10.0, -2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 2.0, 2.0, 1]
[-4.0, 11.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, 5.0]
[-4.0, 11.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, 5.0] // section 2 (lines)
[ 1.0, 11.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 5.0, 0.0, 0.0, -5.0, 0.0, 0.0]
[ 8.0, 16.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 5.0, 0.0, 0.0, 5.0, 4.0]
[-4.0, 21.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, -5.0]
[ 1.0, 21.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 5.0, 0.0, 0.0, 5.0, 0.0, 0.0]
Weight : Weight :
0 0

Binary file not shown.

View File

@ -120,6 +120,9 @@ void reset_everything(GLFWwindow *window, int count, char* folder) {
player_chy = oldchy; player_chy = oldchy;
generate_nearby_chunks(1); generate_nearby_chunks(1);
current_room = hashtbl_find_opt(visited, player_chx, player_chy); current_room = hashtbl_find_opt(visited, player_chx, player_chy);
if(current_room == NULL) {
current_room = hashtbl_find_opt(visited, 0, 0);
}
} }
} }