-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.h
40 lines (25 loc) · 1.12 KB
/
render.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef RENDER_H_
#define RENDER_H_
#include <stdbool.h>
#include "mpi.h"
extern bool Graphical_Mode;
#ifdef NO_SDL
void mpi_render_board(board_t* board,
unsigned char neighbors[D_COL_NUM][D_ROW_NUM],
int rank, MPI_Datatype rowType, int neighborsRank[2],
int firstRow, int lastRow, int size, int iteration);
#else
void render_board(SDL_Renderer* renderer, board_t* board,
unsigned char neighbors[D_ROW_NUM][D_COL_NUM]);
void mpi_render_board(SDL_Renderer* renderer, board_t* board,
unsigned char neighbors[D_ROW_NUM][D_COL_NUM],
int rank, MPI_Datatype rowType, int neighborsRank[2],
int firstRow, int lastRow, int size, int iteration);
void render_running_state(SDL_Renderer *renderer, board_t *board);
void render_square(SDL_Renderer *renderer, int pos_x, int pos_y,
board_t* board);
void render_pause_state(SDL_Renderer *renderer, board_t *board);
void pause_square(SDL_Renderer *renderer, int pos_x, int pos_y,
board_t* board);
#endif // NO_SDL
#endif // RENDER_H_