Add DC::buffer()

master
Alec Murphy 1 week ago
parent ee0988d48c
commit f001a3fb6d
  1. 11
      Lib/DC.HC
  2. 4
      dc.jakt
  3. 1
      include/dc.h
  4. 2
      libtemple/libtemple.cpp

@ -16,6 +16,17 @@ U0 _Z7dc_blotmmmm() {
POP_SYSV_REGS
}
U8 *@dc_buffer(CDC *dc) { return dc->body; }
U0 _Z9dc_bufferm() {
// dc_buffer(unsigned long)
PUSH_SYSV_REGS
GET_SYSV_ARGS
debug_print("called: dc_buffer(0x%08x)\n", p0);
@dc_buffer(p0);
POP_SYSV_REGS
}
I64 @dc_color(CDC *dc) { return dc->color; }
U0 _Z8dc_colorm() {

@ -2,6 +2,7 @@ import extern c "dc.h" {
extern function dc_width(anon context: usize) -> i64
extern function dc_width_internal(anon context: usize) -> i64
extern function dc_height(anon context: usize) -> i64
extern function dc_buffer(anon context: usize) -> usize
extern function dc_color(anon context: usize) -> i64
extern function dc_thickness(anon context: usize) -> i64
extern function dc_alias(anon context: usize) -> usize
@ -34,6 +35,9 @@ class DC {
public function height(this) -> i64 {
return dc_height(.context)
}
public function buffer(this) {
return dc_buffer(.context)
}
public function color(this) -> i64 {
return dc_color(.context)
}

@ -1,5 +1,6 @@
unsigned long dc_alias(unsigned long context);
void dc_blot(unsigned long dest, unsigned long x, unsigned long y, unsigned long src);
unsigned long dc_buffer(unsigned long context);
long dc_color(unsigned long context);
void dc_copy(unsigned long dest, unsigned long x, unsigned long y, unsigned long src);
void dc_destroy(unsigned long context);

@ -2,6 +2,8 @@ unsigned long dc_alias(unsigned long context) { return 0; }
void dc_blot(unsigned long dest, unsigned long x, unsigned long y, unsigned long src) {}
unsigned long dc_buffer(unsigned long context) { return 0; }
void dc_copy(unsigned long dest, unsigned long x, unsigned long y, unsigned long src) {}
long dc_color(unsigned long context) { return 0; }

Loading…
Cancel
Save