From c919c6680b0baa6bb8f42881c34818999f97c10b Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Thu, 15 Jan 2009 20:55:25 -0600 Subject: [PATCH] Fixed a bug in the overlay renderer, fixed window icon --- ART.txt | 4 ++++ data/menu/bg.png | Bin 991 -> 0 bytes data/ne/ne_icon.png | Bin 0 -> 1903 bytes ne.svg | 15 +++++++++++++++ ne.xcf | Bin 138724 -> 153477 bytes src/backend/video.c | 36 ++++++++++++++++++++++++++++------- src/backend/video.h | 4 +++- src/main.cpp | 20 ++++++++++++++----- src/ui/menu.cpp | 54 +++++++++++++++++++++++++++++++++------------------- 9 files changed, 100 insertions(+), 33 deletions(-) create mode 100644 ART.txt delete mode 100644 data/menu/bg.png create mode 100644 data/ne/ne_icon.png create mode 100644 ne.svg diff --git a/ART.txt b/ART.txt new file mode 100644 index 0000000..dce8203 --- /dev/null +++ b/ART.txt @@ -0,0 +1,4 @@ +ne.xcf (c) Matthew Thompson, 2009 +ne.svg (c) Nicholas Thompson, 2009 + +All icons free for any use in any NE powered project. diff --git a/data/menu/bg.png b/data/menu/bg.png deleted file mode 100644 index 624ebb5791b126ab5874e4bc8bf884fda13cf59e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 991 zcwUu~TTD^`7{@=7Jep~CTUMAh9$K~4S`uZNX^_!EU6YIzO*1kwgam~wq^*lq4s{{(I7;S8!*WbLCZ|&`J~kh|+yD1}`o8acN>XC*tR=Gm zAXv0Rup3|o)575ZeRmZio`;s z8(B6pJo1-uJHueHR=8KYO{G-IbF{E6SDvAjABxl|v_~QnMdFmS;*doEe!E11_*DIu zA?Nbk1yT;)*K58|7O#d=p#dq`xo0@VT*2VYl7RBdT=ki-1#{ej8aqY`y)i)OnjXAJ<=Z9R+f-xom_D}G z5L@JJ>ximKb=w`}n|c;ek(VahnggLRE@CF74AEfJ8Lt`W%xm@#k%?t zNbbz@=3i`>%s~i5=QHpO=ZKL)&{H|)>b{Awjw~>4rdOB60cSt^#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wwe@F$&8>Bk%GM~09vtI$TQrv>G>9bxuzqDdg$)yAx%?`eC;XX z)RCl)xammJEH`c~w$UU`GmpZW`%p-Z^?QTDYTTyv> zMLG~OkU<@oKWrQp=2~#DXg`G5ctUp$NACm?-N46drt_V zXddtLcb@zqmoA*+!5ur%imfdGOShWn{7;f3gb2!NqyY#aot3)={di!&=L82R^}-y5;I(J}=%KY;f^bgG+O^!#Kdk z4Qna>PPQ{}3Sr0;la}^X1g35^ioEW)|EW>lc=F@a<2q;mHBEW#I+DZ^g6Dc{xo|7t zX45efXI!f{nT=DVa0-=sdVk+LQ90YEmKhLE2>E@!1i)I`qG>+KI6o6}`i3Ricpo;g z{PYVSztd3nW?9=go`Za-R=FGkpMwB(S8gk1e^*m^x*cK z)+AZpD+OMJ**InHi6ev%XxfCc7q7HHUazNIn2EW*nBsg`UMrm-HW~wh114GkMh8_a z!ng{s>s@_VYiTqZ%gCkO3q|$a135EC4lW09kWRYWZ<}Ime}5m5S11@CD|BP)F7U!J z0lK`xdyj~8Fwp+Q`=86#xa{_8tsU%&=h1E3A%GK(ttv={Ycd*XhL3J3y1()3&OL1N zXw5H=Qa}6ZUCZ!i{vl&Ww=C<#4m~h7s76FMd7D?OFj0T(nR_V%PPQ9gRgw+YWFXR< zK-0Tm0?+?qq9cl1LA63g-AQ3?>bs9m?RW^|ne~C)qbtOzx`PzoX%rI}decbw!Hd7c zHnUEH>h=g<`Lz!{vWKA!8&Hl}AJ{wk--yxEfr%itKo8J>;_2bq4rT+dt z9^JM*m*zf~<)e2a%U7u6yf7&WlGF%)pPA><`E%Tuna4I#-nwxeZ|{2t+c$4!qcKEY zL7oc6R_^&dm1e^=8PJMD8V)FxCrnYrVg*YlRstY61>;UQcBf+Go{Q73)}*R)C9_+r p<>FL|; + + + diff --git a/ne.xcf b/ne.xcf index 214e9ff2b44513ad589e649a8d2657722540959f..0085abc818e7c096a9b6afbe4f311d1787719310 100644 GIT binary patch delta 24964 zcwVi236P~%b>2DW{=F~Ld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gk?h_0oM3ykRC8h0l#)6}Y6xhqlpuWEAnbQ-pZkfm-4qqKDMaNo zS_F{;Rl;!!qY1?n(y-50{6*&zg|$D?r3k_e+&BtB`{ZCXn9Jl)0mBGEeG{X#c{iI` zk6>Yh1Mmd1C-bgHvOqAnR&1F3>=T1?ZW=#0SC}wDMt@i`LU4^*0<=#Eri~DweTCp^ zwMGEiCj`?*3DCYma8fM++9w3l3P%Y+`}*Lk)RUkkUZ}Q&1nnyXSE?mJ`-EWH7zx@} z2(C~|g7yi)w50@SUq>mSmH_P&f@#YL(2{--B!z3}Nzgtim^My=_Lb=3YDv&Oi7q~T z1qju;vGSsQ*$Vb`!hcsmq;N6X+uFjlNd~`U%lGBA?~r%BU0(3EudE7|u3=MtuQhBb zDCa)KS8f(k;|59gDL%QGHbLh0m77b|619ACGi?Q#+gEOmsU>qux>9W=ncG)vE>TP7 z_GK!pQeQ>r_7$9q)e^dWk~3|R%$*`RN5xeWxqXsz&K<>Url4emXupBk<9RoW*^%-C z93j}RW41Bxrn^)?a1M*DC35=;&Y`TG!cU%{u8zpr*;$=p7Lw#x+$lT%to7EAy&e*j zMB0hDb(A?G9faFj%HblNgxgV+86sVT+ZxJLk+Fo^Y7xS%;_&?{0=GdHi0@J%+$s^@ zszSIW5)0fa84KJd3fBSee_IEnf_FhITSWF2 z!v%+9)5{yrO5o>&lca$OPm5G7_H0ZG+c)p432LHhu;$@!P #include #include +#include #include static struct video_info vinfo; +void (*resize_cb)() = NULL; + void set_vinfo(int width, int height, int bpp, int flags, int fullscreen) { vinfo.width = width; @@ -50,6 +53,8 @@ void apply_resize() int w = vinfo.width, h = vinfo.height; SDL_SetVideoMode(w, h, vinfo.bpp, vinfo.flags); glViewport(0, 0, w, h); + if (resize_cb) + resize_cb(); } int event_filter(const SDL_Event *e) @@ -73,15 +78,22 @@ int event_filter(const SDL_Event *e) void v_init() { - if (SDL_Init(SDL_INIT_VIDEO) < 0) - { - fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); - exit(1); - } + if (SDL_Init(SDL_INIT_VIDEO) < 0) + { + fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); + exit(1); + } - atexit(SDL_Quit); + atexit(SDL_Quit); + + SDL_SetEventFilter(event_filter); + + SDL_Surface *icon = IMG_Load("data/ne/ne_icon.png"); + if (icon) { + SDL_WM_SetIcon(icon, NULL); + } - SDL_SetEventFilter(event_filter); + v_title("NE Development Build", "NE Dev"); } void v_setup(int width, int height, int fullscreen) @@ -130,6 +142,11 @@ void v_setup(int width, int height, int fullscreen) first_setup = 0; } +void v_resizecb(void (*cb)()) +{ + resize_cb = cb; +} + void v_fullscreen(int changeres) { /* @@ -153,6 +170,11 @@ void v_fullscreen(int changeres) apply_resize(); } +void v_title(const char *longname, const char *shortname) +{ + SDL_WM_SetCaption(longname, shortname); +} + void v_flip() { SDL_GL_SwapBuffers(); diff --git a/src/backend/video.h b/src/backend/video.h index bce655b..4894abf 100644 --- a/src/backend/video.h +++ b/src/backend/video.h @@ -37,9 +37,11 @@ void v_closable(int isclosable); void v_setup(int width, int height, int fullscreen); // use 0 for width and height for native +void v_resizecb(void (*cb)()); // called on a resize event (perspective stuff usually) + void v_fullscreen(int changeres); // toggle fullscreen on/off, optionally changing res to native -void v_title(const char *name); +void v_title(const char *longname, const char *shortname); void v_flip(); diff --git a/src/main.cpp b/src/main.cpp index 58fe46d..0339dfe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,8 +29,10 @@ #include #include +#define NOOVERLAY 0xDEADBEEF + int exit_func(void*) { - return 1; + return -1; } int print_toggle(void *data) @@ -41,13 +43,13 @@ int print_toggle(void *data) << t->getValue() << std::endl; } - return 0; + return NOOVERLAY; } int fullscreen_toggle(void *data) { v_fullscreen(1); - return 0; + return NOOVERLAY; } int main(int argc, char **argv) @@ -107,11 +109,13 @@ int main(int argc, char **argv) Toggle *t = new Toggle("Test Toggle"); t->setCallback(print_toggle, t); t->setSize(button_size); + t->setColor(0.6, 1.0, 0.6); main_menu.addChild(t); t = new Toggle("Fullscreen", full); t->setCallback(fullscreen_toggle); t->setSize(button_size); + t->setColor(0.6, 1.0, 0.6); main_menu.addChild(t); Label *l = new Label("Quit"); @@ -122,8 +126,14 @@ int main(int argc, char **argv) std::cout << "Counted " << mod_count << " mods" << std::endl; - while (main_menu.run() == 0) { - //main_menu.setMode(Menu::OVERLAY); + int returned = NOOVERLAY; + while (returned != -1) { + if (returned == NOOVERLAY) + main_menu.setMode(Menu::BACKGROUND); + else + main_menu.setMode(Menu::OVERLAY); + + returned = main_menu.run(); } std::cout << "Exiting normally" << std::endl; diff --git a/src/ui/menu.cpp b/src/ui/menu.cpp index 4c7215a..1c8ccbb 100644 --- a/src/ui/menu.cpp +++ b/src/ui/menu.cpp @@ -25,11 +25,34 @@ #include #include +static void gl_perspective() +{ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + double w = v_info()->width, h = v_info()->height; + double aspect = w/h; + + gluPerspective(45,aspect,1,1001); + + glEnable(GL_DEPTH_TEST); + glClearDepth(1); + + glEnable(GL_CULL_FACE); + glFrontFace(GL_CCW); + + glShadeModel(GL_SMOOTH); + + glEnable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); +} + Menu::Menu(std::string name, Menu::MENU_MODE m) : Element(name), m_background(0), m_selected(0) { m_keyrep.setDelay(150); - m_keyrep.setTime(500); + m_keyrep.setTime(300); setMode(m); setDefaults(); } @@ -58,6 +81,9 @@ void Menu::addChild(Element *e) int Menu::run() { + v_title(m_name.c_str(), m_name.c_str()); + v_resizecb(gl_perspective); + if (m_mode == OVERLAY) { // take snapshot of background to render later if (m_background) @@ -80,6 +106,9 @@ int Menu::run() done = true; } else if (result == 1) { + v_resizecb(NULL); + const char *name = m_children[m_selected]->getName().c_str(); + v_title(name, name); ret = m_children[m_selected]->run(); i_clear(); break; @@ -157,11 +186,14 @@ void Menu::draw() if (m_mode == OVERLAY) { // draw snapshot glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glEnable(GL_TEXTURE_2D); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); + glColor3f(1.0, 1.0, 1.0); m_background->apply(); glScalef(2.0, 2.0, 1.0); draw_quad(); @@ -214,24 +246,6 @@ void Menu::simulate() void Menu::init_perspective() { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - double w = v_info()->width, h = v_info()->height; - double aspect = w/h; - - gluPerspective(45,aspect,1,1001); - - glEnable(GL_DEPTH_TEST); - glClearDepth(1); - - glEnable(GL_CULL_FACE); - glFrontFace(GL_CCW); - - glShadeModel(GL_SMOOTH); - - glEnable(GL_TEXTURE_2D); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + gl_perspective(); } -- 2.11.4.GIT