Commit 96e3b0bc authored by Sergio Costas's avatar Sergio Costas

Ported to SDL2

parent 5b475b52
# VERSIONS #
* Version 4.0.0 (2018-08-11)
* Ported to SDL2
* Version 3.9.1 (2018-05-01)
* Removed unused printfs
* Version 3.9.0 (2018-05-01)
......
CC=g++ -c -O2
CPP=g++ -c -O2
LN=g++ -O2
FLAGS = -O2
CC=g++ -c $(FLAGS)
CPP=g++ -c $(FLAGS)
LN=g++
CFLAGS += `pkg-config --cflags sdl2 libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
CPPFLAGS += `pkg-config --cflags sdl2 libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
......
CC=g++ -c -O2
CPP=g++ -c -O2
LN=g++ -O2
FLAGS = -O2
CC=g++ -c $(FLAGS)
CPP=g++ -c $(FLAGS)
LN=g++
CFLAGS += `pkg-config --cflags sdl2 libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
CPPFLAGS += `pkg-config --cflags sdl2 libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
......
......@@ -493,7 +493,6 @@ int main(int argc,char *argv[]) {
osd->set_message("Press F1 for help",4000);
printf("BPP: %d\n",llscreen->bpp);
debug_var = false;
while(salir) {
......
This diff is collapsed.
......@@ -31,32 +31,33 @@ using namespace std;
extern struct Charset charset;
#define MIN_WIDTH 4
#define MIN_WIDTH 4
class LLScreen {
uint8_t *memory;
uint32_t width;
uint32_t height;
uint8_t ulaplus_palete[64]; // contains the current palete
uint32_t colors[80];
uint8_t printchar(uint8_t character, int16_t x, int16_t y, uint8_t color, uint8_t back);
public:
uint32_t *memory;
bool joystick;
bool mustlock;
bool rotate;
uint32_t bpp;
SDL_Window *sdlwindow;
SDL_Renderer *sdlrenderer;
SDL_Texture *llscreen;
uint32_t cheight;
uint32_t lines_in_screen;
bool fullscreen;
LLScreen(int16_t resx, int16_t resy, uint8_t depth, bool fullscreen, bool dblbuffer, bool hwsurface);
~LLScreen();
ifstream *myfopen(string,ios_base::openmode);
ifstream *myfopen(string, ios_base::openmode);
void print_string(string message, int16_t x, float y, uint8_t ink, uint8_t paper);
void set_paletes(bool);
void paint_one_pixel(uint8_t value,unsigned char *address);
void paint_one_pixel(uint8_t value, uint32_t *address);
void fullscreen_switch();
void set_mouse();
void set_palete_entry(uint8_t entry, uint8_t Value, bool bw);
......
......@@ -56,7 +56,7 @@ void help_menu() {
llscreen->clear_screen();
llscreen->print_string("FBZX (3.9.1)",-1,1,15,0);
llscreen->print_string("FBZX (4.0.0)",-1,1,15,0);
llscreen->print_string("Available keys",-1,2,14,0);
llscreen->print_string("Shift:Caps Shift Ctrl:Symbol Shift",-1,4,11,0);
......
......@@ -105,17 +105,12 @@ Screen::Screen() {
this->ulaplus = false;
this->ulaplus_reg = 0;
this->next_line *= llscreen->bpp;
this->next_scanline *= llscreen->bpp;
this->init_line *= llscreen->bpp;
this->next_pixel *= llscreen->bpp;
this->jump_pixel *= llscreen->bpp;
this->int_counter = 0;
llscreen->set_paletes(ordenador->bw);
this->base_pixel = ((unsigned char *) (llscreen->llscreen->pixels));
this->max_pixel = this->base_pixel + ((height - 1) * width * llscreen->bpp);
this->base_pixel = llscreen->memory;
this->max_pixel = this->base_pixel + (height * width);
this->pixel = this->base_pixel + this->init_line;
}
......
......@@ -20,9 +20,9 @@ class Screen {
// screen private global variables
unsigned int translate[6144],translate2[6144];
unsigned int *p_translt,*p_translt2;
unsigned char *pixel; // current address
unsigned char *max_pixel; // max address
unsigned char *base_pixel;
uint32_t *pixel; // current address
uint32_t *max_pixel; // max address
uint32_t *base_pixel;
char flash;
int currline,currpix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment