mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
osd_* -> global_* compilation fixes (nw)
This commit is contained in:
parent
6d34259612
commit
6bd1f0b658
@ -9,7 +9,7 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "osdcore.h"
|
||||
#include "corealloc.h"
|
||||
#include "textbuf.h"
|
||||
|
||||
|
||||
@ -87,12 +87,12 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
|
||||
text_buffer *text;
|
||||
|
||||
/* allocate memory for the text buffer object */
|
||||
text = (text_buffer *)global_alloc(sizeof(*text));
|
||||
text = (text_buffer *)global_alloc(text_buffer);
|
||||
if (!text)
|
||||
return NULL;
|
||||
|
||||
/* allocate memory for the buffer itself */
|
||||
text->buffer = (char *)global_alloc_array(bytes);
|
||||
text->buffer = (char *)global_alloc_array(char, bytes);
|
||||
if (!text->buffer)
|
||||
{
|
||||
global_free(text);
|
||||
@ -100,7 +100,7 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
|
||||
}
|
||||
|
||||
/* allocate memory for the lines array */
|
||||
text->lineoffs = (INT32 *)global_alloc_array(lines * sizeof(text->lineoffs[0]));
|
||||
text->lineoffs = (INT32 *)global_alloc_array(INT32, lines);
|
||||
if (!text->lineoffs)
|
||||
{
|
||||
global_free_array(text->buffer);
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "osdcore.h"
|
||||
#include "corealloc.h"
|
||||
#include "sound/wavwrite.h"
|
||||
|
||||
struct wav_file
|
||||
@ -16,7 +16,7 @@ wav_file *wav_open(const char *filename, int sample_rate, int channels)
|
||||
UINT16 align, temp16;
|
||||
|
||||
/* allocate memory for the wav struct */
|
||||
wav = (wav_file *) global_alloc(sizeof(wav_file));
|
||||
wav = (wav_file *) global_alloc(wav_file);
|
||||
if (!wav)
|
||||
return NULL;
|
||||
|
||||
@ -128,7 +128,7 @@ void wav_add_data_32(wav_file *wav, INT32 *data, int samples, int shift)
|
||||
if (!wav) return;
|
||||
|
||||
/* allocate temp memory */
|
||||
temp = (INT16 *)global_alloc_array(samples * sizeof(temp[0]));
|
||||
temp = (INT16 *)global_alloc_array(INT16, samples);
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
@ -156,7 +156,7 @@ void wav_add_data_16lr(wav_file *wav, INT16 *left, INT16 *right, int samples)
|
||||
if (!wav) return;
|
||||
|
||||
/* allocate temp memory */
|
||||
temp = (INT16 *)global_alloc_array(samples * 2 * sizeof(temp[0]));
|
||||
temp = (INT16 *)global_alloc_array(INT16, samples * 2);
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
@ -181,7 +181,7 @@ void wav_add_data_32lr(wav_file *wav, INT32 *left, INT32 *right, int samples, in
|
||||
if (!wav) return;
|
||||
|
||||
/* allocate temp memory */
|
||||
temp = (INT16 *)global_alloc_array(samples * 2 * sizeof(temp[0]));
|
||||
temp = (INT16 *)global_alloc_array(INT16, samples);
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "apridisk.h"
|
||||
#include "imageutl.h"
|
||||
#include "corealloc.h"
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
@ -176,7 +177,7 @@ FLOPPY_CONSTRUCT( apridisk_construct )
|
||||
}
|
||||
else if (compression == APR_COMPRESSED)
|
||||
{
|
||||
UINT8 *buffer = (UINT8 *)global_alloc(data_size * sizeof(UINT8));
|
||||
UINT8 *buffer = (UINT8 *)global_alloc_array(UINT8, data_size);
|
||||
UINT16 length;
|
||||
UINT8 value;
|
||||
|
||||
@ -185,7 +186,7 @@ FLOPPY_CONSTRUCT( apridisk_construct )
|
||||
length = pick_integer_le(buffer, 0, 2);
|
||||
value = pick_integer_le(buffer, 2, 1);
|
||||
|
||||
global_free(buffer);
|
||||
global_free_array(buffer);
|
||||
|
||||
/* not sure if this is possible */
|
||||
if (length != 512) {
|
||||
|
Loading…
Reference in New Issue
Block a user