Skip to content

Commit

Permalink
RT R3 A101 Hostkit for Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
REBOL Technologies authored and earl committed Aug 2, 2010
1 parent 183aeac commit d4d77b5
Show file tree
Hide file tree
Showing 55 changed files with 934 additions and 848 deletions.
26 changes: 13 additions & 13 deletions go.r
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
REBOL [Title: "Host-Kit Graphics: Basic GOB Compositing Test"]

view/no-wait main: make gob! [color: black offset: 0x0 size: 500x500]
;do
[
append main make gob! [
offset: 0x0
size: 500x500
draw: [pen 255.0.0 circle 200x200 200.0 200.0]
]
show main
wait 100
REBOL [
Title: "Host-Kit Graphics: Basic GOB Compositing Test"
Version: 1.0.1
Author: "Carl Sassenrath"
Notes: {
A101: PAIRs are now floating point, and commands like CIRCLE
can pass a pair for second argument.
}
]

win: view/no-wait main: make gob! [color: black offset: 0x0 size: 500x500]

to-draw: func [block] [bind reduce block import 'draw]

units: 32
Expand Down Expand Up @@ -39,7 +37,7 @@ loop 100 [
draw: to-draw [
'pen random 255.255.255
'fill-pen random 255.255.255.255
'circle sz sz/x * 98% sz/y * 98%
'circle sz sz * 98%
]
offset: random 300x300
size: sz * 2
Expand Down Expand Up @@ -79,3 +77,5 @@ loop 100 [
show main
wait pause
]

unview win
4 changes: 2 additions & 2 deletions info.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
REBOL 3 Host-Kit Source Distribution
From REBOL Technologies in Ukiah, California

Version: 2.100.100.0.0 (alpha)
Updated: 12-Jul-2010/13:33:45-7:00
Version: 2.100.101.0.0 (alpha)
Updated: 20-Jul-2010/16:04:58-7:00

The purpose of the R3 Host-Kit is to provide developers with a method of
building custom versions of REBOL, including built-in extension modules.
Expand Down
Binary file modified lib/r3lib.dll
Binary file not shown.
Binary file modified lib/r3lib.exp
Binary file not shown.
Binary file modified lib/r3lib.lib
Binary file not shown.
13 changes: 6 additions & 7 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#--- REBOL 3.0 Host Makefile - Build A100
#--- Note: this makefile was generated by make-build.r (12-Jul-2010/20:33:45)
#--- This file needs minimal make tool capabilities (works on all systems)
#--- You will need REBOL 2.6 or 2.7 in the local directory
#--- REBOL 3.0 Host Makefile - Build A101
#--- Note: this makefile was generated by make-build.r (20-Jul-2010/23:04:58)
#--- This file intentionally kept simple - to work on all platforms.
#--- You will need REBOL 2.6 or 2.7 in your work directory or environment path

C= gcc
CFLAGS= -c -O1 -DUNICODE -I src/include/
Expand All @@ -17,16 +17,15 @@ T= src/tools
INCS= \
$I/reb-config.h\
$I/reb-c.h\
$I/reb-defs.h\
$I/reb-ext.h\
$I/reb-args.h\
$I/reb-device.h\
$I/reb-file.h\
$I/reb-event.h\
$I/reb-evtypes.h\
$I/reb-net.h\
$I/reb-filereq.h\
$I/reb-gob.h\
$I/reb-ext.h
$I/reb-gob.h

OBJS= \
$O/host-main.o\
Expand Down
4 changes: 2 additions & 2 deletions src/agg/agg_compo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ namespace agg

void compositor::cp_alloc_buffer(REBGOB* winGob){
//setup and allocate window backbuffer
m_width = GOB_W(winGob);
m_height = GOB_H(winGob);
m_width = GOB_W_INT(winGob);
m_height = GOB_H_INT(winGob);
m_stride = 4 * m_width;

int buflen = m_width * m_height * 4;
Expand Down
4 changes: 0 additions & 4 deletions src/agg/agg_graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,10 @@
#include "agg_blur.h"

//REBOL stuff
//#define FULL_DEFS
#include "reb-config.h"
#include "reb-c.h"
#include "reb-defs.h"
//#include "reb-series.h"
#include "reb-gob.h"
//#include "reb-value.h"
//#include "reb-types.h"
#undef IS_ERROR

namespace agg
Expand Down
30 changes: 15 additions & 15 deletions src/agg/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,28 @@ extern "C" REBINT Draw_Gob(void *graphics, REBSER *block, REBSER *args);

namespace agg
{
extern "C" void agg_box(void* gr, REBPAR* p1, REBPAR* p2, REBDEC r)
extern "C" void agg_box(void* gr, REBXYF p1, REBXYF p2, REBDEC r)
{
if (r) {
((agg_graphics*)gr)->agg_rounded_rect(p1->x, p1->y, p2->x, p2->y, r);
((agg_graphics*)gr)->agg_rounded_rect(p1.x, p1.y, p2.x, p2.y, r);
} else {
((agg_graphics*)gr)->agg_box(p1->x, p1->y, p2->x, p2->y);
((agg_graphics*)gr)->agg_box(p1.x, p1.y, p2.x, p2.y);
}
}

extern "C" void agg_circle(void* gr, REBPAR* p1, REBDEC rx, REBDEC ry)
extern "C" void agg_circle(void* gr, REBXYF p, REBXYF r)
{
((agg_graphics*)gr)->agg_ellipse(p1->x, p1->y, rx, ry);
((agg_graphics*)gr)->agg_ellipse(p.x, p.y, r.x, r.y);
}

extern "C" void agg_begin_poly (void* gr, REBXYF p)
{
((agg_graphics*)gr)->agg_begin_poly(p.x, p.y);
}

extern "C" void agg_add_vertex (void* gr, REBXYF p)
{
((agg_graphics*)gr)->agg_add_vertex(p.x, p.y);
}

extern "C" void agg_pen(void* gr, REBYTE* col, REBSER* img)
Expand All @@ -48,16 +58,6 @@ namespace agg

}

extern "C" void agg_begin_poly (void* gr, REBDEC x, REBDEC y)
{
((agg_graphics*)gr)->agg_begin_poly(x, y);
}

extern "C" void agg_add_vertex (void* gr, REBDEC x, REBDEC y)
{
((agg_graphics*)gr)->agg_add_vertex(x, y);
}


#ifdef ndef
extern "C" REBINT Draw_Image(REBSER *image, REBSER *block)
Expand Down
3 changes: 1 addition & 2 deletions src/boot/draw.r
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ lines: command [
circle: command [
"Draw a circle or ellipse."
origin [pair!]
radius-x [decimal!]
radius-y [decimal!]
radius [pair!]
]

pen: command [
Expand Down
2 changes: 1 addition & 1 deletion src/boot/version.r
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.100.100.3.1
2.100.101.3.1
9 changes: 5 additions & 4 deletions src/include/agg-draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
extern REBINT Draw_Image(REBSER *image, REBSER *block);
extern void agg_get_size(void* gr, REBPAR* p);

extern void agg_add_vertex (void* gr, REBDEC x, REBDEC y);
extern void agg_begin_poly (void* gr, REBXYF p);
extern void agg_add_vertex (void* gr, REBXYF p);
extern void agg_box(void* gr, REBXYF p1, REBXYF p2, REBDEC r);
extern void agg_circle(void* gr, REBXYF p, REBXYF r);

extern void agg_anti_alias(void* gr, REBINT mode);
extern void agg_arc(void* gr, REBPAR* c, REBPAR* r, REBDEC ang1, REBDEC ang2, REBINT closed);
extern void agg_arrow(void* gr, REBCHR* c, REBPAR* ht);
extern void agg_begin_poly (void* gr, REBDEC x, REBDEC y);
extern void agg_box(void* gr, REBPAR* p1, REBPAR* p2, REBDEC r);
extern void agg_circle(void* gr, REBPAR* p1, REBDEC rx, REBDEC ry);
extern void agg_clip(void* gr, REBPAR* p1, REBPAR* p2);
extern void agg_curve3(void* gr, REBPAR* p1, REBPAR* p2, REBPAR* p3);
extern void agg_curve4(void* gr, REBPAR* p1, REBPAR* p2, REBPAR* p3, REBPAR* p4);
Expand Down
59 changes: 59 additions & 0 deletions src/include/ext-types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/***********************************************************************
**
** REBOL 3.0 "Invasion"
** Copyright 2010 REBOL Technologies
** All rights reserved.
**
************************************************************************
**
** Title: Extension Types (Isolators)
** Build: A101
** Date: 20-Jul-2010/16:01:51-7:00
** File: ext-types.h
**
** AUTO-GENERATED FILE - Do not modify. (From: make-boot.r)
**
***********************************************************************/


enum REBOL_Ext_Types
{
RXT_END = 0, // 0
RXT_UNSET, // 1
RXT_NONE, // 2
RXT_HANDLE, // 3
RXT_LOGIC = 4, // 4
RXT_INTEGER, // 5
RXT_DECIMAL, // 6
RXT_PERCENT, // 7
RXT_CHAR = 10, // 8
RXT_PAIR, // 9
RXT_TUPLE, // 10
RXT_TIME, // 11
RXT_DATE, // 12
RXT_WORD = 16, // 13
RXT_SET_WORD, // 14
RXT_GET_WORD, // 15
RXT_LIT_WORD, // 16
RXT_REFINEMENT, // 17
RXT_STRING = 24, // 18
RXT_FILE, // 19
RXT_EMAIL, // 20
RXT_URL, // 21
RXT_TAG, // 22
RXT_ISSUE, // 23
RXT_BLOCK = 32, // 24
RXT_PAREN, // 25
RXT_PATH, // 26
RXT_SET_PATH, // 27
RXT_GET_PATH, // 28
RXT_LIT_PATH, // 29
RXT_BINARY = 40, // 30
RXT_BITSET, // 31
RXT_IMAGE, // 32
RXT_VECTOR, // 33
RXT_GOB = 47, // 34
RXT_OBJECT = 48, // 35
RXT_MODULE, // 36
RXT_MAX
};
4 changes: 2 additions & 2 deletions src/include/host-ext-draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
************************************************************************
**
** Title: REBOL Draw Graphics
** Build: A100
** Date: 12-Jul-2010/13:29:57-7:00
** Build: A101
** Date: 20-Jul-2010/16:05:05-7:00
** File: host-ext-draw
**
** AUTO-GENERATED FILE - Do not modify. (From: make-host-ext.r)
Expand Down
4 changes: 2 additions & 2 deletions src/include/host-ext-graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
************************************************************************
**
** Title: REBOL Graphics
** Build: A100
** Date: 12-Jul-2010/13:29:57-7:00
** Build: A101
** Date: 20-Jul-2010/16:05:05-7:00
** File: host-ext-graphics
**
** AUTO-GENERATED FILE - Do not modify. (From: make-host-ext.r)
Expand Down
6 changes: 3 additions & 3 deletions src/include/host-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
************************************************************************
**
** Title: Host Access Library
** Build: A100
** Date: 12-Jul-2010/13:26:27-7:00
** Build: A101
** Date: 20-Jul-2010/16:01:51-7:00
** File: host-lib.h
**
** AUTO-GENERATED FILE - Do not modify. (From: make-os-ext.r)
**
***********************************************************************/


#define HOST_LIB_VER 100
#define HOST_LIB_VER 101
#define HOST_LIB_SUM 5782
#define HOST_LIB_SIZE 30

Expand Down
2 changes: 1 addition & 1 deletion src/include/reb-args.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***********************************************************************
**
** REBOL 3.0 "Invasion"
** Copyright 2009 REBOL Technologies
** Copyright 2010 REBOL Technologies
** All rights reserved.
**
************************************************************************
Expand Down
5 changes: 4 additions & 1 deletion src/include/reb-c.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***********************************************************************
**
** REBOL 3.0 "Invasion"
** Copyright 2009 REBOL Technologies
** Copyright 2010 REBOL Technologies
** All rights reserved.
**
************************************************************************
Expand Down Expand Up @@ -79,6 +79,7 @@ typedef i64 REBI64; // 64 bit integer
typedef u64 REBU64; // 64 bit unsigned integer
typedef char REBOOL; // 8 bit flag (for struct usage)
typedef unsigned int REBFLG; // 32 bit flag (for cpu efficiency)
typedef float REBD32; // 32 bit decimal
typedef double REBDEC; // 64 bit decimal

#ifdef HAS_LONG_DOUBLE
Expand Down Expand Up @@ -251,3 +252,5 @@ typedef void(*CFUNC)(void *);
#endif

#define MAKE_STR(n) (REBCHR*)(malloc((n) * sizeof(REBCHR))) // OS chars!

#define ROUND_TO_INT(d) (REBINT)(floor((d) + 0.5))
8 changes: 7 additions & 1 deletion src/include/reb-config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***********************************************************************
**
** REBOL 3.0 "Invasion"
** Copyright 2009 REBOL Technologies
** Copyright 2010 REBOL Technologies
** All rights reserved.
**
************************************************************************
Expand Down Expand Up @@ -103,6 +103,12 @@
#define HAS_LONG_DOUBLE
#endif

#ifdef TO_OPENBSD
#define ENDIAN_LITTLE
#define HAS_LL_CONSTS
#define HAS_ECVT
#endif

#ifdef TO_OBSD // OpenBSD
#define COPY_STR(d,s,m) strlcpy(d,s,m)
#define JOIN_STR(d,s,m) strlcat(d,s,m)
Expand Down
Loading

0 comments on commit d4d77b5

Please sign in to comment.