-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlatform.cpp
More file actions
77 lines (52 loc) · 1.35 KB
/
Copy pathPlatform.cpp
File metadata and controls
77 lines (52 loc) · 1.35 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "Platform.h"
#include <iostream>
#include <Windows.h>
#include <mmsystem.h>
#include <vector>
#include <string>
#include "SDL_image.h"
#include <conio.h>
#include <thread>
#include <chrono>
#include "SDL.h"
#include "Menu.h"
#include "Global.h"
#undef main
#pragma comment(lib, "winmm.lib")
#include "Player.h"
int Platform::width = 150;
int Platform::height = 5;
float Platform::pozx;
float Platform::pozy;
float Platform::colt_stg_sus_x = pozx;
float Platform::colt_stg_sus_y = pozy;
float Platform::colt_dr_jos_x = pozx + width;
float Platform::colt_dr_jos_y = pozy + height;
float Platform::pozitiix[10];
float Platform::pozitiiy[10];
int i=0;
void Platform::Set_poz(float x, float y, int index) {
Platform::pozx = x;
Platform::pozitiix[index] = x;
Platform::pozy = y;
Platform::pozitiiy[index] = y;
}
void Platform::setRender(SDL_Renderer* renderer)
{
ren = renderer;
}
void Platform::platform_apar()
{
SDL_Rect rct;
rct.x = pozx;
rct.y = pozy;
rct.w = width;
rct.h = height;
SDL_Texture* pl = IMG_LoadTexture(ren, "Imagini/pl.bmp");
SDL_RenderCopy(ren, pl, NULL, &rct);
SDL_DestroyTexture(pl);
/*
SDL_SetRenderDrawColor(ren, 110, 106, 105, 255);
SDL_RenderFillRect(ren, &rct);
*/
}