Permalink
Browse files

Merge branches 'bugfixes' and 'widget'

Conflicts:
	src/ingameop.cpp
	src/intelmap.cpp
  • Loading branch information...
3 parents 2753aaa + 6092fe1 + 11b0464 commit 64c2fde0dd0e501604ea910308049612bcf37c4f @Cyp Cyp committed Mar 15, 2013
Showing with 3,533 additions and 8,997 deletions.
  1. +0 −42 data/mp/multiplay/maps/4c-pyramidal/feature.ini
  2. +4 −0 lib/framework/frame.h
  3. +3 −0 lib/framework/wzglobal.h
  4. +1 −0 lib/ivis_opengl/ivisdef.h
  5. +1 −3 lib/sdl/main_sdl.cpp
  6. +27 −2 lib/widget/Makefile.am
  7. +111 −148 lib/widget/bar.cpp
  8. +15 −16 lib/widget/bar.h
  9. +114 −229 lib/widget/button.cpp
  10. +30 −40 lib/widget/button.h
  11. +83 −99 lib/widget/editbox.cpp
  12. +18 −17 lib/widget/editbox.h
  13. +96 −1,505 lib/widget/form.cpp
  14. +27 −118 lib/widget/form.h
  15. +62 −67 lib/widget/label.cpp
  16. +23 −12 lib/widget/label.h
  17. +295 −0 lib/widget/listwidget.cpp
  18. +152 −0 lib/widget/listwidget.h
  19. +114 −217 lib/widget/slider.cpp
  20. +9 −16 lib/widget/slider.h
  21. +29 −48 lib/widget/tip.cpp
  22. +1 −2 lib/widget/tip.h
  23. +102 −20 lib/widget/widgbase.h
  24. +338 −1,073 lib/widget/widget.cpp
  25. +31 −114 lib/widget/widget.h
  26. +2 −0 lib/widget/widget.vcxproj
  27. +1 −13 lib/widget/widgint.h
  28. +4 −2 src/Makefile.am
  29. +23 −31 src/challenge.cpp
  30. +0 −9 src/console.cpp
  31. +123 −620 src/design.cpp
  32. +0 −4 src/design.h
  33. +10 −13 src/display3d.cpp
  34. +61 −132 src/frontend.cpp
  35. +1 −4 src/frontend.h
  36. +185 −896 src/hci.cpp
  37. +0 −21 src/hci.h
  38. +31 −88 src/ingameop.cpp
  39. +0 −1 src/ingameop.h
  40. +330 −989 src/intdisplay.cpp
  41. +112 −123 src/intdisplay.h
  42. +135 −383 src/intelmap.cpp
  43. +9 −25 src/intimage.cpp
  44. +6 −8 src/intimage.h
  45. +18 −43 src/intorder.cpp
  46. +6 −62 src/keybind.cpp
  47. +39 −129 src/keyedit.cpp
  48. +40 −67 src/loadsave.cpp
  49. +0 −2 src/loop.cpp
  50. +17 −45 src/mission.cpp
  51. +394 −645 src/multiint.cpp
  52. +49 −27 src/multiint.h
  53. +34 −115 src/multilimit.cpp
  54. +89 −232 src/multimenu.cpp
  55. +2 −3 src/multimenu.h
  56. +126 −477 src/transporter.cpp
@@ -755,36 +755,6 @@ position = 2940, 6204, 306
rotation = 16384, 0, 0
name = WreckedSuzukiJeep
-[feature_1395]
-id = 1395
-position = 13248, 9664, 6
-rotation = 0, 0, 0
-name = OilDrum
-
-[feature_1396]
-id = 1396
-position = 13180, 9548, 12
-rotation = 0, 0, 0
-name = OilDrum
-
-[feature_1397]
-id = 1397
-position = 13320, 9624, 0
-rotation = 0, 0, 0
-name = OilDrum
-
-[feature_1398]
-id = 1398
-position = 13356, 9748, 4
-rotation = 0, 0, 0
-name = OilDrum
-
-[feature_1399]
-id = 1399
-position = 13178, 9728, 13
-rotation = 0, 0, 0
-name = OilDrum
-
[feature_1400]
id = 1400
position = 13168, 9612, 15
@@ -935,18 +905,6 @@ position = 10944, 320, 63
rotation = 16384, 0, 0
name = Ruin3
-[feature_1465]
-id = 1465
-position = 9920, 576, 102
-rotation = 0, 0, 0
-name = OilDrum
-
-[feature_1466]
-id = 1466
-position = 10304, 576, 102
-rotation = 49152, 0, 0
-name = OilDrum
-
[feature_1497]
id = 1497
position = 16192, 9920, 510
View
@@ -31,6 +31,10 @@
# undef Status
#endif
+#ifndef WZ_CXX11
+# define nullptr NULL
+#endif
+
#include "types.h"
/**
* NOTE: the next two #include lines are needed by MSVC to override the default,
View
@@ -310,6 +310,9 @@
*/
#if defined(__cplusplus)
# define WZ_CXX98
+# if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define WZ_CXX11
+# endif
#endif /* WZ_CXXxx */
@@ -164,6 +164,7 @@ struct Image
{
Image(IMAGEFILE const *images = NULL, unsigned id = 0) : images(const_cast<IMAGEFILE *>(images)), id(id) {}
+ bool isNull() const { return images == nullptr; }
int width() const { return images->imageDefs[id].Width; }
int height() const { return images->imageDefs[id].Height; }
int xOffset() const { return images->imageDefs[id].XOffset; }
View
@@ -117,8 +117,6 @@ static InputKey *pStartBuffer, *pEndBuffer;
/*** Misc support ***/
/**************************/
-#define WIDG_MAXSTR 80 // HACK, from widget.h
-
/* Put a character into a text buffer overwriting any text under the cursor */
QString wzGetSelection()
{
@@ -127,7 +125,7 @@ QString wzGetSelection()
int scraplen;
get_scrap(T('T','E','X','T'), &scraplen, &scrap);
- if (scraplen > 0 && scraplen < WIDG_MAXSTR-2)
+ if (scraplen > 0)
{
retval = QString::fromUtf8(scrap);
}
View
@@ -2,25 +2,50 @@ AM_CPPFLAGS = $(SDL_CFLAGS) $(WZ_CPPFLAGS) $(QT4_CFLAGS)
AM_CFLAGS = $(WZ_CFLAGS)
AM_CXXFLAGS = $(WZ_CXXFLAGS) $(QT4_CFLAGS)
-noinst_LIBRARIES = libwidget.a
-noinst_HEADERS = \
+# Signals/slots
+MOCHEADER = \
bar.h \
button.h \
editbox.h \
form.h \
label.h \
+ listwidget.h \
slider.h \
tip.h \
widgbase.h \
widget.h \
widgint.h
+MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
+%_moc.cpp: %.h
+ $(MOC4) -o $@ $<
+CLEANFILES = \
+ $(MOCEDFILES)
+
+noinst_LIBRARIES = libwidget.a
+noinst_HEADERS = \
+ $(MOCHEADER)
+
+#"nodist_libwidget_a_SOURCES = $(MOCEDFILES)" doesn't work here (not sure why).
+nodist_libwidget_a_SOURCES = \
+ bar_moc.cpp \
+ button_moc.cpp \
+ editbox_moc.cpp \
+ form_moc.cpp \
+ label_moc.cpp \
+ listwidget_moc.cpp \
+ slider_moc.cpp \
+ tip_moc.cpp \
+ widgbase_moc.cpp \
+ widget_moc.cpp \
+ widgint_moc.cpp
libwidget_a_SOURCES = \
bar.cpp \
button.cpp \
editbox.cpp \
form.cpp \
label.cpp \
+ listwidget.cpp \
slider.cpp \
tip.cpp \
widget.cpp
Oops, something went wrong.

0 comments on commit 64c2fde

Please sign in to comment.