From 42d707f8a432afa001d58611fc960d6ce6021676 Mon Sep 17 00:00:00 2001 From: Bryan Hoyle Date: Tue, 14 Aug 2012 23:18:39 -0400 Subject: [PATCH] Very very basic wall rendering for opengl --- site_scons/site_tools/gch/__init__.pyc | Bin 3801 -> 3815 bytes site_scons/site_tools/mfprogram/__init__.pyc | Bin 7254 -> 7378 bytes src/graphics/Graphics.h | 2 +- src/graphics/OpenGLDrawMethods.inl | 8 ++++++-- src/graphics/Renderer.cpp | 12 ++++++++++-- src/graphics/Renderer.h | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/site_scons/site_tools/gch/__init__.pyc b/site_scons/site_tools/gch/__init__.pyc index b37f35fd4cee46592fd05abec81a4e53ef27b28f..827f6e7650a77f865ca013ed0c2f556e6720cbbe 100644 GIT binary patch delta 331 zcmca9`&^ct`7?}+w9t;c&`WgATsrp&PWjRG9`T<4x=|zdTxtV$C`p(+g z`XvP=n{}DKGZLk8vM!V6=6seTB&e=qn@WP}IF3`yM7v~iG0#-u6$kVFBVO?wK3f1| CaBI8( delta 317 zcmaDZdsCL3`7T0tlDChBSfohVVg>{+BA++%*44tcXA`oMBUtJqYU2gAID?UBQbU1P>m16Y(aZCv|qM9`q7n=WE}4zyEtP@9p@Tld|~P z>;B;xc`AP+nK=O2Yio^iwx+MIwvB9|y;f;2HyYJuB|9-Pk~OXyowV>(>dKR)g)FPe zx4U&7?c{q-beDvUe(Boj7M<<9a!39n>oMQVK$>5M%*O;D`f~}OBHBJsz?9IOVh?=h zyq94(p$XU`xJlSY-)T~1!~Rp`5xeTo5tVKG&yxlA-d`k7*l{J-w@auDDxof;y-V14 zpUUni3Ga|V6;KcA0@}0enKGE16Jsz@`=Tt6hwNe?LtZl@ zP*T0389{|-7KP>j6;OAgy}|YZsm&#^)C4pq%osL~ST;>YG{2aH$y13z>w&>TWQ!lx zB!qL^v2{x*Am#L_oMYmEYUDDuU+uGr1gOYK@*^=Z9+jRI=in6xj# zhb;l-0Gd}|kq+1e-jzmQ6!&Db@=CQ?)>DV{&fUc<>Z*M^dlxQt-Nej{#J#-#0JoF4#5{4a$C1LI!$}m95c)|_uy(4@OGFYA)5Km$ zT2MPmG)_FLJaGPuHC2D72WC@KF0}x delta 1019 zcma)*&ubG=5XZl7cav?>rb#v-o6V+aDODf(g!7EEv>6h z!<9~SD}5KkN}$iNH{q~W_b8qZt#&3kKRhB1K@~PD%=Hz3%W#t5fCyT%^eQ@e6enhM+oDcTZyPAl3N`$RihJr|e#Jnjlv z2J8s9gk}`Z1NxzjY~7OUEd+Diz}#{Qegt+DJOX`1LWj$K0k#TTLBjwq1YL5z3A+z| z5s$_KmK}pJx15JBq!(ewA@-n)1$tSObl%E!uEYK#zNpv(;2CfeJQq~+t$d)`Sc?ek z5WE5!CK@6yp)mwL)Z0}8I}-d7TFVGfnV$MJ#ZLW;Izbx#k2KsPrT>yL@Jetu6;BhF zqXpR9wgg_n!g!VzvkNg-5_fw3x?7-+SyMgb)-H&+dz_t=*a)4|H`oo@(|4(ouZ4SD zmBfYsARc8gd5%R%H>ymbmQi4t?i0gg{S7f&yB4@Ay)HZpN403z9AIDRrFm&kyaIT# eaPFon7~jnKD?R38ks23v!nxsoFYOg4*zMmB&>8; + int g = (pc&0x0000FF00)>>4; + int b = (pc&0x000000FF)>>0; + int a = 255; +#endif +#ifndef OGLR // standard wall patterns if (wtypes[wt].drawstyle==1) @@ -708,8 +714,10 @@ void Renderer::DrawWalls() fire_b[y][x] = cb; } - } +#else + this->drawrect(x*CELL,y*CELL,CELL,CELL,r,g,b,a,false); #endif + } } void Renderer::DrawSigns() diff --git a/src/graphics/Renderer.h b/src/graphics/Renderer.h index 6e814cccb..b4f730f41 100644 --- a/src/graphics/Renderer.h +++ b/src/graphics/Renderer.h @@ -105,7 +105,7 @@ public: void xor_bitmap(unsigned char * bitmap, int x, int y, int w, int h); void draw_line(int x, int y, int x2, int y2, int r, int g, int b, int a); - void drawrect(int x, int y, int width, int height, int r, int g, int b, int a); + void drawrect(int x, int y, int width, int height, int r, int g, int b, int a,bool hollow = true); void fillrect(int x, int y, int width, int height, int r, int g, int b, int a); void clearrect(int x, int y, int width, int height); void gradientrect(int x, int y, int width, int height, int r, int g, int b, int a, int r2, int g2, int b2, int a2);