mirror of
https://git.code.sf.net/p/fuse-emulator/fuse
synced 2026-01-28 14:20:54 +03:00
Fix up the Xlib UI (and the widget code) to use libspectrum_byte etc.
Legacy-ID: 1468
This commit is contained in:
@@ -51,6 +51,8 @@
|
||||
#include <X11/extensions/XShm.h>
|
||||
#endif /* #ifdef X_USE_SHM */
|
||||
|
||||
#include <libspectrum.h>
|
||||
|
||||
#include "display.h"
|
||||
#include "fuse.h"
|
||||
#include "keyboard.h"
|
||||
@@ -77,9 +79,10 @@ int image_scale;
|
||||
int image_width, image_height;
|
||||
|
||||
/* A scaled copy of the image displayed on the Spectrum's screen */
|
||||
static WORD scaled_image[2*DISPLAY_SCREEN_HEIGHT][2*DISPLAY_SCREEN_WIDTH];
|
||||
static libspectrum_word
|
||||
scaled_image[ 2 * DISPLAY_SCREEN_HEIGHT ][ 2 * DISPLAY_SCREEN_WIDTH ];
|
||||
static const ptrdiff_t scaled_pitch =
|
||||
2 * DISPLAY_SCREEN_WIDTH * sizeof( WORD );
|
||||
2 * DISPLAY_SCREEN_WIDTH * sizeof( libspectrum_word );
|
||||
|
||||
static unsigned long colours[16];
|
||||
|
||||
@@ -417,9 +420,9 @@ uidisplay_area( int x, int y, int w, int h )
|
||||
scaled_x = scale * x; scaled_y = scale * y;
|
||||
|
||||
/* Create scaled image */
|
||||
scaler_proc16( (BYTE*)&display_image[y][x], display_pitch,
|
||||
(BYTE*)&scaled_image[scaled_y][scaled_x], scaled_pitch,
|
||||
w, h );
|
||||
scaler_proc16( (libspectrum_byte*)&display_image[y][x], display_pitch,
|
||||
(libspectrum_byte*)&scaled_image[scaled_y][scaled_x],
|
||||
scaled_pitch, w, h );
|
||||
|
||||
w *= scale; h *= scale;
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <libspectrum.h>
|
||||
|
||||
#include "debugger/debugger.h"
|
||||
#include "widget_internals.h"
|
||||
#include "z80/z80.h"
|
||||
@@ -56,12 +58,12 @@ widget_debugger_draw( void *data GCC_UNUSED )
|
||||
"DE", "DE'",
|
||||
"HL", "HL'",
|
||||
};
|
||||
WORD *register_values[] = { &PC, &SP,
|
||||
&AF, &AF_,
|
||||
&BC, &BC_,
|
||||
&DE, &DE_,
|
||||
&HL, &HL_,
|
||||
};
|
||||
libspectrum_word *register_values[] = { &PC, &SP,
|
||||
&AF, &AF_,
|
||||
&BC, &BC_,
|
||||
&DE, &DE_,
|
||||
&HL, &HL_,
|
||||
};
|
||||
|
||||
size_t i; char buffer[40];
|
||||
|
||||
@@ -116,7 +118,7 @@ widget_debugger_keyhandler( keyboard_key_name key, keyboard_key_name key2 )
|
||||
}
|
||||
}
|
||||
|
||||
int ui_debugger_disassemble( WORD address GCC_UNUSED )
|
||||
int ui_debugger_disassemble( libspectrum_word address GCC_UNUSED )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* widget_internals.h: Functions internal to the widget code
|
||||
Copyright (c) 2001,2002 Matan Ziv-Av, Philip Kendall
|
||||
Copyright (c) 2001-2003 Matan Ziv-Av, Philip Kendall
|
||||
|
||||
$Id$
|
||||
|
||||
@@ -27,14 +27,11 @@
|
||||
#ifndef FUSE_WIDGET_INTERNALS_H
|
||||
#define FUSE_WIDGET_INTERNALS_H
|
||||
|
||||
#ifndef _DIRENT_H
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#endif /* #ifndef _DIRENT_H */
|
||||
|
||||
#ifndef _STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif /* #ifndef _STDLIB_H */
|
||||
|
||||
#include <libspectrum.h>
|
||||
|
||||
#ifndef FUSE_SETTINGS_H
|
||||
#include "settings.h"
|
||||
@@ -117,7 +114,7 @@ void widget_machine_keyhandler( keyboard_key_name key,
|
||||
|
||||
typedef struct widget_picture_data {
|
||||
const char *filename;
|
||||
BYTE *screen;
|
||||
libspectrum_byte *screen;
|
||||
int border;
|
||||
} widget_picture_data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user