DS.c 800 B
/*
// Created by Lucile on 02/03/2021.
*/
/*!
* \file DS.c
* \brief Exam Source File
* \authors Lucile
* \version 1
* \date 02/03/2021
*
* Character function implementation.
*
*/
#include <stdio.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.
*/
int init_DS(DS * exam, int door_DS, char * path){
exam->door=door_DS;
exam->image_DS = malloc(strlen(path));
strcpy(exam->image_DS, path);
return 1;
}