[Scummvm-cvs-logs] CVS: scummvm/dc icon.h,1.2,1.3 icon.cpp,1.3,1.4 label.h,1.1,1.2 label.cpp,1.2,1.3

Marcus Comstedt marcus_c at users.sourceforge.net
Sun Feb 3 06:51:07 CET 2002


Update of /cvsroot/scummvm/scummvm/dc
In directory usw-pr-cvs1:/tmp/cvs-serv7963

Modified Files:
	icon.h icon.cpp label.h label.cpp 
Log Message:
More fine-grained rendering control.

Index: icon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/icon.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** icon.h	2002/02/02 23:34:21	1.2
--- icon.h	2002/02/03 14:50:04	1.3
***************
*** 16,20 ****
    void create_texture();
    void set_palette(int pal);
!   void draw(float x1, float y1, float x2, float y2, int pal);
    void create_vmicon(void *buffer);
  };
--- 16,21 ----
    void create_texture();
    void set_palette(int pal);
!   void draw(float x1, float y1, float x2, float y2, int pal,
! 	    unsigned argb = 0xffffffff);
    void create_vmicon(void *buffer);
  };

Index: icon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/icon.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** icon.cpp	2002/02/02 23:34:21	1.3
--- icon.cpp	2002/02/03 14:50:04	1.4
***************
*** 69,73 ****
  }
  
! void Icon::draw(float x1, float y1, float x2, float y2, int pal)
  {
    struct polygon_list mypoly;
--- 69,74 ----
  }
  
! void Icon::draw(float x1, float y1, float x2, float y2, int pal,
! 		unsigned int argb)
  {
    struct polygon_list mypoly;
***************
*** 81,85 ****
      TA_POLYMODE2_BLEND_SRC_ALPHA|TA_POLYMODE2_BLEND_DST_INVALPHA|
      TA_POLYMODE2_FOG_DISABLED|TA_POLYMODE2_ENABLE_ALPHA|
!     TA_POLYMODE2_TEXTURE_REPLACE|TA_POLYMODE2_U_SIZE_32|TA_POLYMODE2_V_SIZE_32;
    mypoly.texture = TA_TEXTUREMODE_CLUT4|TA_TEXTUREMODE_CLUTBANK4(pal)|
      TA_TEXTUREMODE_ADDRESS(texture);
--- 82,87 ----
      TA_POLYMODE2_BLEND_SRC_ALPHA|TA_POLYMODE2_BLEND_DST_INVALPHA|
      TA_POLYMODE2_FOG_DISABLED|TA_POLYMODE2_ENABLE_ALPHA|
!     TA_POLYMODE2_TEXTURE_MODULATE_ALPHA|TA_POLYMODE2_U_SIZE_32|
!     TA_POLYMODE2_V_SIZE_32;
    mypoly.texture = TA_TEXTUREMODE_CLUT4|TA_TEXTUREMODE_CLUTBANK4(pal)|
      TA_TEXTUREMODE_ADDRESS(texture);
***************
*** 91,95 ****
    myvertex.cmd = TA_CMD_VERTEX;
    myvertex.ocolour = 0;
!   myvertex.colour = 0;
    myvertex.z = 0.5;
    myvertex.u = 0.0;
--- 93,97 ----
    myvertex.cmd = TA_CMD_VERTEX;
    myvertex.ocolour = 0;
!   myvertex.colour = argb;
    myvertex.z = 0.5;
    myvertex.u = 0.0;

Index: label.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/label.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** label.h	2002/02/02 15:44:27	1.1
--- label.h	2002/02/03 14:50:04	1.2
***************
*** 7,10 ****
   public:
    void create_texture(const char *text);
!   void draw(float x, float y, unsigned int argb = 0xffffffff);
  };
--- 7,11 ----
   public:
    void create_texture(const char *text);
!   void draw(float x, float y, unsigned int argb = 0xffffffff,
! 	    float scale = 1.0);
  };

Index: label.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/label.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** label.cpp	2002/02/02 19:20:27	1.2
--- label.cpp	2002/02/03 14:50:04	1.3
***************
*** 83,87 ****
  }
  
! void Label::draw(float x, float y, unsigned int argb)
  {
    struct polygon_list mypoly;
--- 83,87 ----
  }
  
! void Label::draw(float x, float y, unsigned int argb, float scale)
  {
    struct polygon_list mypoly;
***************
*** 95,99 ****
      TA_POLYMODE2_BLEND_SRC_ALPHA|TA_POLYMODE2_BLEND_DST_INVALPHA|
      TA_POLYMODE2_FOG_DISABLED|TA_POLYMODE2_ENABLE_ALPHA|
!     TA_POLYMODE2_TEXTURE_MODULATE|TA_POLYMODE2_V_SIZE_32|tex_u;
    mypoly.texture = TA_TEXTUREMODE_ARGB1555|TA_TEXTUREMODE_NON_TWIDDLED|
      TA_TEXTUREMODE_ADDRESS(texture);
--- 95,99 ----
      TA_POLYMODE2_BLEND_SRC_ALPHA|TA_POLYMODE2_BLEND_DST_INVALPHA|
      TA_POLYMODE2_FOG_DISABLED|TA_POLYMODE2_ENABLE_ALPHA|
!     TA_POLYMODE2_TEXTURE_MODULATE_ALPHA|TA_POLYMODE2_V_SIZE_32|tex_u;
    mypoly.texture = TA_TEXTUREMODE_ARGB1555|TA_TEXTUREMODE_NON_TWIDDLED|
      TA_TEXTUREMODE_ADDRESS(texture);
***************
*** 114,128 ****
    ta_commit_list(&myvertex);
  
!   myvertex.x = x+u;
    myvertex.u = 1.0;
    ta_commit_list(&myvertex);
  
    myvertex.x = x;
!   myvertex.y = y+25.0;
    myvertex.u = 0.0;
    myvertex.v = 25.0/32.0;
    ta_commit_list(&myvertex);
  
!   myvertex.x = x+u;
    myvertex.u = 1.0;
    myvertex.cmd |= TA_CMD_VERTEX_EOS;
--- 114,128 ----
    ta_commit_list(&myvertex);
  
!   myvertex.x = x+u*scale;
    myvertex.u = 1.0;
    ta_commit_list(&myvertex);
  
    myvertex.x = x;
!   myvertex.y = y+25.0*scale;
    myvertex.u = 0.0;
    myvertex.v = 25.0/32.0;
    ta_commit_list(&myvertex);
  
!   myvertex.x = x+u*scale;
    myvertex.u = 1.0;
    myvertex.cmd |= TA_CMD_VERTEX_EOS;





More information about the Scummvm-git-logs mailing list