mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-17 08:50:29 +02:00
GBuffer video mem now blit directly to the backbuffer cpu array.
This commit is contained in:
@@ -502,7 +502,7 @@ BOOL GraphicBufferClass::Lock(void)
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
Offset = (unsigned long)rawCpuBuffer; // 32bit to 64bit issue here.
|
||||
Offset = (unsigned long)backbuffer_data_raw; // 32bit to 64bit issue here.
|
||||
//Pitch = Width;
|
||||
|
||||
LockCount++; // increment count so we can track if
|
||||
@@ -528,7 +528,7 @@ BOOL GraphicBufferClass::Lock(void)
|
||||
|
||||
BOOL GraphicBufferClass::Unlock(void)
|
||||
{
|
||||
Video_Set_Data((unsigned char *)Get_Graphic_Buffer()->GetMemoryBuffer(), Width, Height);
|
||||
//Video_Set_Data((unsigned char *)Get_Graphic_Buffer()->GetMemoryBuffer(), Width, Height);
|
||||
|
||||
//
|
||||
// If there is no lock count or this is not a direct draw surface
|
||||
|
||||
@@ -137,6 +137,8 @@
|
||||
#include <assert.h>
|
||||
#include "iconcach.h"
|
||||
|
||||
extern unsigned char* backbuffer_data_raw;
|
||||
|
||||
#ifndef FUNCTION_H
|
||||
|
||||
__forceinline void Nearest_Fill(unsigned char source, unsigned char* dest, int destX, int destY, int destWidth, int width, int height, bool trans)
|
||||
@@ -414,13 +416,13 @@ class GraphicBufferClass : public GraphicViewPortClass, public BufferClass {
|
||||
if (!rawCpuBuffer)
|
||||
return (unsigned char* )Buffer;
|
||||
|
||||
return rawCpuBuffer;
|
||||
return backbuffer_data_raw;
|
||||
}
|
||||
// jmarshall
|
||||
void* GetMemoryBuffer(void) {
|
||||
if (!rawCpuBuffer)
|
||||
return Buffer;
|
||||
return rawCpuBuffer;
|
||||
return backbuffer_data_raw;
|
||||
}
|
||||
// jmarshall end
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
/*=========================================================================*/
|
||||
void Process_DD_Result(HRESULT result, int display_ok_msg);
|
||||
BOOL Set_Video_Mode(HWND hwnd, int w, int h, int bits_per_pixel);
|
||||
void Video_Set_Data(unsigned char* buffer, int width, int height);
|
||||
void Reset_Video_Mode(void);
|
||||
unsigned Get_Free_Video_Memory(void);
|
||||
void Wait_Blit(void);
|
||||
|
||||
Reference in New Issue
Block a user