game_master
Pas grand chose mais le début
This commit is contained in:
parent
e1a5618aa3
commit
fdcf7c7179
9 changed files with 50292 additions and 50285 deletions
|
@ -1622,11 +1622,11 @@ void f_Joueur_1(void const * argument)
|
|||
BSP_LCD_SetTextColor(LCD_COLOR_BACKGROUND);
|
||||
BSP_LCD_FillRect(joueur.x, joueur.y, Width, Height);
|
||||
|
||||
//BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
|
||||
// while (HAL_ADC_PollForConversion(&hadc3, 100) != HAL_OK);
|
||||
// joystick_v = HAL_ADC_GetValue(&hadc3);
|
||||
// while (HAL_ADC_PollForConversion(&hadc1, 100) != HAL_OK);
|
||||
// joystick_h = HAL_ADC_GetValue(&hadc1);
|
||||
BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
|
||||
while (HAL_ADC_PollForConversion(&hadc3, 100) != HAL_OK);
|
||||
joystick_v = HAL_ADC_GetValue(&hadc3);
|
||||
while (HAL_ADC_PollForConversion(&hadc1, 100) != HAL_OK);
|
||||
joystick_h = HAL_ADC_GetValue(&hadc1);
|
||||
|
||||
if ((joueur.y < LCD_HEIGHT- Width - joueur.dy)&&(joystick_h < 1900)) joueur.y += joueur.dy;
|
||||
if ((joueur.y > Width + joueur.dy)&&(joystick_h > 2100)) joueur.y -= joueur.dy;
|
||||
|
@ -1685,14 +1685,14 @@ void f_projectile(void const * argument)
|
|||
const TickType_t xPeriodeTache = 5000;
|
||||
/* Infinite loop */
|
||||
struct Missile liste_missile[20];
|
||||
struct Missile missile = {70, 70, 0, 1, 0, LCD_COLOR_WHITE, 1,1};
|
||||
struct Missile missile = {70, 70, 1, 0, 0, LCD_COLOR_WHITE, 1,1};
|
||||
uint8_t indice = 1;
|
||||
liste_missile[0] = missile;
|
||||
|
||||
// Paramètre de l'écran pour la reprouductibilité
|
||||
|
||||
uint32_t LCD_HEIGHT = 200; //BSP_LCD_GetXSize();
|
||||
uint32_t LCD_WIDTH = 200; //BSP_LCD_GetYSize();
|
||||
uint32_t LCD_HEIGHT = BSP_LCD_GetXSize();
|
||||
uint32_t LCD_WIDTH = BSP_LCD_GetYSize();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -1712,8 +1712,8 @@ void f_projectile(void const * argument)
|
|||
if ((liste_missile[i].x > 1)&&(liste_missile[i].x < LCD_HEIGHT-1)&&(liste_missile[i].y < LCD_WIDTH-1)&&(liste_missile[i].y > 1))
|
||||
{
|
||||
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, LCD_COLOR_BACKGROUND);
|
||||
liste_missile[i].x = liste_missile[i].x - liste_missile[i].dx ;
|
||||
liste_missile[i].y = liste_missile[i].y - liste_missile[i].dy;
|
||||
liste_missile[i].x = liste_missile[i].x + liste_missile[i].dx ;
|
||||
liste_missile[i].y = liste_missile[i].y + liste_missile[i].dy;
|
||||
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, liste_missile[i].color);
|
||||
}
|
||||
//TODO test sur tous les ennemis
|
||||
|
|
|
@ -58,8 +58,7 @@ defined in linker script */
|
|||
.section .text.Reset_Handler
|
||||
.weak Reset_Handler
|
||||
.type Reset_Handler, %function
|
||||
Reset_Handler:
|
||||
ldr sp, =_estack /* set stack pointer */
|
||||
Reset_Handler: ldr sp, =_estack /* set stack pointer */
|
||||
|
||||
/* Copy the data segment initializers from flash to SRAM */
|
||||
movs r1, #0
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -11,3 +11,9 @@
|
|||
### Jsp pourquoi le read me est cassé
|
||||
|
||||
Pour indiquer le joueur, on utilise 1 et pour les méchants on utilise 0.
|
||||
|
||||
### Game_master
|
||||
|
||||
Si le game master reçoit un message via FHandle, une des deux entités est morte. Si la variable vaut 0, les méchants sont mort. Si elle vaut 1, le joueur est mort.
|
||||
|
||||
|
Loading…
Reference in a new issue