Ver código fonte

* Updated C++ bindings with Canvas::fillTriangleTextured()

tags/v0.99.beta17
Jean-Yves Lamoureux jylam 15 anos atrás
pai
commit
63ec8e0a1c
3 arquivos alterados com 20 adições e 0 exclusões
  1. +14
    -0
      XCode/libcacaXCode.xcodeproj/project.pbxproj
  2. +5
    -0
      cxx/caca++.cpp
  3. +1
    -0
      cxx/caca++.h

+ 14
- 0
XCode/libcacaXCode.xcodeproj/project.pbxproj Ver arquivo

@@ -7,6 +7,9 @@
objects = {

/* Begin PBXFileReference section */
E6A7681710B560BB008B6DEC /* caca++.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "caca++.cpp"; path = "../cxx/caca++.cpp"; sourceTree = SOURCE_ROOT; };
E6A7681810B560BB008B6DEC /* caca++.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca++.h"; path = "../cxx/caca++.h"; sourceTree = SOURCE_ROOT; };
E6A7681910B560BB008B6DEC /* cxxtest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cxxtest.cpp; path = ../cxx/cxxtest.cpp; sourceTree = SOURCE_ROOT; };
E6DB65F610AECC7800B6F924 /* attr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = attr.c; path = ../caca/attr.c; sourceTree = SOURCE_ROOT; };
E6DB65F710AECC7800B6F924 /* box.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = box.c; path = ../caca/box.c; sourceTree = SOURCE_ROOT; };
E6DB65F810AECC7800B6F924 /* caca_conio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = caca_conio.c; path = ../caca/caca_conio.c; sourceTree = SOURCE_ROOT; };
@@ -98,6 +101,7 @@
08FB7794FE84155DC02AAC07 /* XCode */ = {
isa = PBXGroup;
children = (
E6A7681510B560AE008B6DEC /* cxx */,
E6DB66FA10B176D100B6F924 /* configure.ac */,
E6DB663A10AECDC500B6F924 /* examples */,
E6DB662B10AECCBF00B6F924 /* src */,
@@ -106,6 +110,16 @@
name = XCode;
sourceTree = "<group>";
};
E6A7681510B560AE008B6DEC /* cxx */ = {
isa = PBXGroup;
children = (
E6A7681810B560BB008B6DEC /* caca++.h */,
E6A7681710B560BB008B6DEC /* caca++.cpp */,
E6A7681910B560BB008B6DEC /* cxxtest.cpp */,
);
name = cxx;
sourceTree = "<group>";
};
E6DB65F510AECC5800B6F924 /* caca */ = {
isa = PBXGroup;
children = (


+ 5
- 0
cxx/caca++.cpp Ver arquivo

@@ -243,6 +243,11 @@ void Canvas::fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, uint32
caca_fill_triangle(cv, x1, y1, x2, y2, x3, y3, ch);
}

void Canvas::fillTriangleTextured(int coords[6], Canvas *tex, float uv[6])
{
caca_fill_triangle_textured(cv, coords, tex->cv, uv);
}

int Canvas::Rand(int min, int max)
{
return caca_rand(min, max);


+ 1
- 0
cxx/caca++.h Ver arquivo

@@ -130,6 +130,7 @@ __class Canvas
void drawTriangle(int, int, int, int, int, int, uint32_t);
void drawThinTriangle(int, int, int, int, int, int);
void fillTriangle(int, int, int, int, int, int, uint32_t);
void fillTriangleTextured(int coords[6], Canvas *tex, float uv[6]);
int setBoundaries(caca_canvas_t *, int, int, unsigned int, unsigned int);
unsigned int getFrameCount();
int setFrame(unsigned int);


Carregando…
Cancelar
Salvar