Newer
Older
/*
// Created by Lucile on 02/03/2021.
*/
/*!
* \file DS.c
* \brief Exam Source File
* \authors Lucile, Tin
* \version 1
* \date 02/03/2021
*
* Character function implementation.
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "DS.h"
/*!
* \fn int init_DS(DS * exam, int door_DS, char * path)
* \brief This function initialize a DS : position (the door number) and the path to the DS's image.
*
* \param [in] exam a DS pointer
* \param [in] door_DS a door number corresponding to the DS location
* \param [in] path the DS image path
* \return 1 if the initialization went right.
*/
exam->door=door_DS;
exam->image_DS = malloc(strlen(path));
strcpy(exam->image_DS, path);
exam->x_DS = 144;
exam->y_DS= 48;
exam->larg_DS= 21;
exam->long_DS= 14;
exam->x_DS = 369;
exam->y_DS= 41;
exam->larg_DS= 21;
exam->long_DS= 10;
exam->x_DS = 564;
exam->y_DS= 38;
exam->larg_DS= 23;
exam->long_DS= 12;
exam->x_DS = 43;
exam->y_DS= 85;
exam->larg_DS= 24;
exam->long_DS= 14;
exam->x_DS = 237;
exam->y_DS= 98;
exam->larg_DS= 11;
exam->long_DS= 19;
exam->x_DS = 460;
exam->y_DS= 74;
exam->long_DS= 17;
exam->x_DS = 75;
exam->y_DS= 172;
exam->larg_DS= 19;
exam->long_DS= 11;
exam->x_DS = 316;
exam->y_DS= 162;
exam->larg_DS= 13;
exam->long_DS= 18;
exam->x_DS = 454;
exam->y_DS= 149;
exam->larg_DS= 20;
exam->long_DS= 10;
exam->x_DS = 191;
exam->y_DS= 203;
exam->larg_DS= 22;
exam->long_DS= 11;
exam->x_DS = 544;
exam->y_DS= 201;
exam->larg_DS= 14;
exam->long_DS= 24;
exam->x_DS = 632;
exam->y_DS= 181;
exam->larg_DS= 14;
exam->long_DS= 23;
exam->x_DS = 228;
exam->y_DS= 263;
exam->larg_DS= 14;
exam->long_DS= 20;
exam->x_DS = 314;
exam->y_DS= 261;
exam->larg_DS= 21;
exam->long_DS= 14;
exam->x_DS = 82;
exam->y_DS= 356;
exam->larg_DS= 16;
exam->long_DS= 24;
exam->x_DS = 493;
exam->y_DS= 319;
exam->larg_DS= 16;
exam->long_DS= 21;
exam->x_DS = 600;
exam->y_DS= 308;
exam->larg_DS= 13;
exam->long_DS= 20;
exam->x_DS = 194;
exam->y_DS= 414;
exam->larg_DS= 21;
exam->long_DS= 13;
exam->x_DS = 553;
exam->y_DS= 392;
exam->x_DS = 654;
exam->y_DS= 407;
exam->larg_DS= 20;
exam->long_DS= 12;
exam->x_DS = 349;
exam->y_DS= 434;
exam->larg_DS= 22;
exam->long_DS= 12;
exam->x_DS = 269;
exam->y_DS= 467;
exam->larg_DS= 16;
exam->long_DS= 20;
exam->x_DS = 461;
exam->y_DS= 507;
exam->larg_DS= 24;
exam->long_DS= 14;
exam->x_DS = 637;
exam->y_DS= 513;
exam->larg_DS= 13;
exam->long_DS= 24;
exam->x_DS = 32;
exam->y_DS= 556;
exam->larg_DS= 26;
exam->long_DS= 13;
exam->x_DS = 192;
exam->y_DS= 614;
exam->larg_DS= 18;
exam->long_DS= 24;
exam->x_DS = 238;
exam->y_DS= 653;
exam->larg_DS= 14;
exam->long_DS= 20;
exam->x_DS = 501;
exam->y_DS= 651;
exam->larg_DS= 14;
exam->long_DS= 21;
exam->x_DS = 553;
exam->y_DS= 662;
exam->larg_DS= 17;
exam->long_DS= 23;