added main header and debug.c file Bruah
This commit is contained in:
		
							parent
							
								
									d26d7da1aa
								
							
						
					
					
						commit
						ca08ddda7c
					
				
					 7 changed files with 29 additions and 14 deletions
				
			
		
							
								
								
									
										2
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -2,7 +2,7 @@ | |||
| 
 | ||||
| #files to compile
 | ||||
| 
 | ||||
| OBJS = src/main.c src/Controls.c | ||||
| OBJS = src/main.c src/Controls.c src/Debug.c | ||||
| 
 | ||||
| #compiler to use
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| #include "raylib.h" | ||||
| #include "main.h" | ||||
| #include "Controls.h" | ||||
| // Tux Position Varaibles
 | ||||
| float TuxPos_x = 32.0f, TuxPos_y = 62.0f; | ||||
| 
 | ||||
| // Controls
 | ||||
| int Func_Controls() | ||||
| { | ||||
|  |  | |||
|  | @ -1,7 +1,5 @@ | |||
| #pragma once | ||||
| 
 | ||||
| // makes the Varaibles globle across c files
 | ||||
| extern float TuxPos_x; | ||||
| extern float TuxPos_y; | ||||
| 
 | ||||
| 
 | ||||
| int Func_Controls(); | ||||
|  |  | |||
							
								
								
									
										13
									
								
								src/Debug.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/Debug.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| #include <stdio.h> | ||||
| 
 | ||||
| #include "main.h" | ||||
| 
 | ||||
| #include "Controls.h" | ||||
| #include "Debug.h" | ||||
| 
 | ||||
| 
 | ||||
| int Func_ShowPos() | ||||
| { | ||||
|   // Ouput Position Infomation in the command line
 | ||||
|   printf("TuxPos_x = %f TuxPos_y = %f EnemyPos_x = %f EnemyPos_y = %f\n", TuxPos_x, TuxPos_y, EnemyPos_x, EnemyPos_y); | ||||
| } | ||||
							
								
								
									
										3
									
								
								src/Debug.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/Debug.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| #pragma once | ||||
| 
 | ||||
| int Func_ShowPos(); | ||||
							
								
								
									
										10
									
								
								src/main.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/main.c
									
										
									
									
									
								
							|  | @ -2,19 +2,13 @@ | |||
| #include <stdio.h> | ||||
| 
 | ||||
| #include "Controls.h" | ||||
| #include "Debug.h" | ||||
| 
 | ||||
| // Globles
 | ||||
| 
 | ||||
| // Position Varaibles
 | ||||
| float EnemyPos_x = 482.0f, EnemyPos_y = 62.0f; | ||||
| 
 | ||||
| 
 | ||||
| int Func_ShowPos() | ||||
| { | ||||
|   // Ouput Position Infomation in the command line
 | ||||
|   printf("TuxPos_x = %f TuxPos_y = %f EnemyPos_x = %f EnemyPos_y = %f\n", TuxPos_x, TuxPos_y, EnemyPos_x, EnemyPos_y); | ||||
| } | ||||
| 
 | ||||
| float TuxPos_x = 32.0f, TuxPos_y = 62.0f; | ||||
| 
 | ||||
| // Setup Code
 | ||||
| int Func_Setup() | ||||
|  |  | |||
							
								
								
									
										7
									
								
								src/main.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								src/main.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| #pragma once | ||||
| 
 | ||||
| // makes the Varaibles globle across c files
 | ||||
| extern float TuxPos_x; | ||||
| extern float TuxPos_y; | ||||
| extern float EnemyPos_x; | ||||
| extern float EnemyPos_y; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue