-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphics.h
More file actions
31 lines (26 loc) · 987 Bytes
/
graphics.h
File metadata and controls
31 lines (26 loc) · 987 Bytes
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
#ifndef GRAPHICS_H
#define GRAPHICS_H
#include <pspdisplay.h>
// Renk tanımlamaları (ABGR8888 formatı)
#define COLOR_BLACK 0xFF000000
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_GREEN 0xFF1DB954 // Spotify yeşili
#define COLOR_DARK_GRAY 0xFF282828
#define COLOR_LIGHT_GRAY 0xFFB3B3B3
#define COLOR_RED 0xFF0000FF
#define COLOR_BLUE 0xFFFF0000
// Ekran boyutları
#define SCREEN_WIDTH 480
#define SCREEN_HEIGHT 272
#define PIXEL_SIZE 4 // 32-bit
#define FRAME_SIZE (SCREEN_WIDTH * SCREEN_HEIGHT * PIXEL_SIZE)
#define VRAM_SIZE 0x200000
// Grafik fonksiyonları
void initGraphics(void);
void clearScreen(unsigned int color);
void drawPixel(int x, int y, unsigned int color);
void drawRect(int x, int y, int width, int height, unsigned int color);
void drawText(const char *text, int x, int y, unsigned int color);
void drawImage(int x, int y, int w, int h, const unsigned int *pixels);
void flipScreen(void);
#endif // GRAPHICS_H