Skip to content

Commit e46f53d

Browse files
authored
Add files via upload
1 parent 4210875 commit e46f53d

6 files changed

Lines changed: 132 additions & 112 deletions

File tree

src/ini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ ini_t *ini_open(const wchar_t *filename,const utf8_t *ascii_section)
358358

359359
// calculate new count
360360
// count can not be zero.
361-
count = (int)(kv_d - indexes);
361+
count = (uintptr_t)(kv_d - indexes);
362362
}
363363

364364
// init ini

src/render_gdi.c

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,9 @@
1818
//
1919
// GDI renderer
2020

21-
#if 0
22-
2321
#include "viv.h"
2422

25-
void render_software_blit(HDC dst_hdc,int dst_x,int dst_y,int dst_wide,int dst_high,DWORD *src_pixels,int src_pitch,int src_x,int src_y,int src_wide,int src_high)
23+
void render_gdi_blit(HDC dst_hdc,int dst_x,int dst_y,int dst_wide,int dst_high,DWORD *src_pixels,int src_pitch,int src_x,int src_y,int src_wide,int src_high)
2624
{
27-
if (dst_wide * dst_high)
28-
{
29-
DWORD *dst_pixels;
30-
BITMAPINFOHEADER bi;
31-
int x;
32-
int y;
33-
34-
dst_pixels = mem_alloc(dst_wide * dst_high);
35-
36-
os_zero_memory(&bi,sizeof(BITMAPINFOHEADER));
37-
bi.biSize = sizeof(BITMAPINFOHEADER);
38-
bi.biWidth = dst_wide;
39-
bi.biHeight = -dst_high;
40-
bi.biPlanes = 1;
41-
bi.biBitCount = 32;
42-
bi.biCompression = BI_RGB;
43-
44-
for(y=0;y<dst_high;y++)
45-
{
46-
for(x=0;x<dst_wide;x++)
47-
{
48-
dst_pixels[x + y * dst_wide] = 0;
49-
}
50-
}
51-
52-
StretchDIBits(dst_hdc,dst_x,dst_y,dst_wide,dst_high,0,0,dst_wide,dst_high,dst_pixels,(BITMAPINFO *)&bi,DIB_RGB_COLORS,SRCCOPY);
53-
}
25+
// StretchDib(dst_hdc,dst_x,dst_y,dst_wide,dst_high,0,0,dst_wide,dst_high,dst_pixels,(BITMAPINFO *)&bi,DIB_RGB_COLORS,SRCCOPY);
5426
}
55-
56-
#endif

src/render_gdi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
extern "C" {
2323
#endif
2424

25-
void render_software_blit(HDC dest_hdc,int dest_x,int dest_y,int dest_wide,int dest_high,HBITMAP src_hbitmap,int src_x,int src_y,int src_wide,int src_high);
25+
void render_gdi_blit(HDC dest_hdc,int dest_x,int dest_y,int dest_wide,int dest_high,HBITMAP src_hbitmap,int src_x,int src_y,int src_wide,int src_high);
2626

2727
#ifdef __cplusplus
2828
}

src/render_software.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
// You should have received a copy of the GNU General Public License
1616
// along with this program; if not, write to the Free Software
1717
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18-
19-
#if 0
18+
//
19+
// software renderer
2020

2121
#include "viv.h"
2222

2323
void render_software_blit(HDC dst_hdc,int dst_x,int dst_y,int dst_wide,int dst_high,DWORD *src_pixels,int src_pitch,int src_x,int src_y,int src_wide,int src_high)
24-
{
24+
{/*
2525
if (dst_wide * dst_high)
2626
{
2727
DWORD *dst_pixels;
@@ -48,7 +48,8 @@ void render_software_blit(HDC dst_hdc,int dst_x,int dst_y,int dst_wide,int dst_h
4848
}
4949
5050
StretchDIBits(dst_hdc,dst_x,dst_y,dst_wide,dst_high,0,0,dst_wide,dst_high,dst_pixels,(BITMAPINFO *)&bi,DIB_RGB_COLORS,SRCCOPY);
51-
}
51+
52+
mem_free(dst_pixels);
53+
}*/
5254
}
5355

54-
#endif

src/render_software.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// You should have received a copy of the GNU General Public License
1616
// along with this program; if not, write to the Free Software
1717
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18+
//
19+
// GDI renderer
1820

1921
#ifdef __cplusplus
2022
extern "C" {

0 commit comments

Comments
 (0)