Merge lp:~alexwolf/stellarium/dso-marker into lp:stellarium

Proposed by Alexander Wolf
Status: Merged
Merged at revision: 4890
Proposed branch: lp:~alexwolf/stellarium/dso-marker
Merge into: lp:stellarium
Diff against target: 126 lines (+30/-3)
5 files modified
src/core/modules/Nebula.cpp (+17/-2)
src/core/modules/Nebula.hpp (+4/-0)
src/core/modules/NebulaMgr.cpp (+7/-0)
src/core/modules/NebulaMgr.hpp (+1/-0)
textures/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~alexwolf/stellarium/dso-marker
Reviewer Review Type Date Requested Status
Stellarium Pending
Review via email: mp+62670@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/core/modules/Nebula.cpp'
2--- src/core/modules/Nebula.cpp 2010-04-15 12:28:34 +0000
3+++ src/core/modules/Nebula.cpp 2011-05-27 13:25:47 +0000
4@@ -1,6 +1,7 @@
5 /*
6 * Stellarium
7 * Copyright (C) 2002 Fabien Chereau
8+ * Copyright (C) 2011 Alexander Wolf
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12@@ -36,6 +37,9 @@
13 #include <QBuffer>
14
15 StelTextureSP Nebula::texCircle;
16+StelTextureSP Nebula::texOpenCluster;
17+StelTextureSP Nebula::texGlobularCluster;
18+StelTextureSP Nebula::texPlanetNebula;
19 float Nebula::circleScale = 1.f;
20 float Nebula::hintsBrightness = 0;
21 Vec3f Nebula::labelColor = Vec3f(0.4,0.3,0.5);
22@@ -136,8 +140,19 @@
23 glBlendFunc(GL_ONE, GL_ONE);
24 float lum = 1.f;//qMin(1,4.f/getOnScreenSize(core))*0.8;
25 sPainter.setColor(circleColor[0]*lum*hintsBrightness, circleColor[1]*lum*hintsBrightness, circleColor[2]*lum*hintsBrightness, 1);
26- Nebula::texCircle->bind();
27- sPainter.drawSprite2dMode(XY[0], XY[1], 4);
28+ if (nType == 1)
29+ Nebula::texOpenCluster->bind();
30+
31+ if (nType == 2)
32+ Nebula::texGlobularCluster->bind();
33+
34+ if (nType == 4)
35+ Nebula::texPlanetNebula->bind();
36+
37+ if (nType != 1 && nType != 2 && nType != 4)
38+ Nebula::texCircle->bind();
39+
40+ sPainter.drawSprite2dMode(XY[0], XY[1], 6);
41 }
42
43 void Nebula::drawLabel(StelPainter& sPainter, float maxMagLabel)
44
45=== modified file 'src/core/modules/Nebula.hpp'
46--- src/core/modules/Nebula.hpp 2010-05-09 20:01:11 +0000
47+++ src/core/modules/Nebula.hpp 2011-05-27 13:25:47 +0000
48@@ -1,6 +1,7 @@
49 /*
50 * Stellarium
51 * Copyright (C) 2002 Fabien Chereau
52+ * Copyright (C) 2011 Alexander Wolf
53 *
54 * This program is free software; you can redistribute it and/or
55 * modify it under the terms of the GNU General Public License
56@@ -108,6 +109,9 @@
57 SphericalRegionP pointRegion;
58
59 static StelTextureSP texCircle; // The symbolic circle texture
60+ static StelTextureSP texOpenCluster;
61+ static StelTextureSP texGlobularCluster;
62+ static StelTextureSP texPlanetNebula;
63 static float hintsBrightness;
64
65 static Vec3f labelColor, circleColor;
66
67=== modified file 'src/core/modules/NebulaMgr.cpp'
68--- src/core/modules/NebulaMgr.cpp 2011-01-29 18:14:28 +0000
69+++ src/core/modules/NebulaMgr.cpp 2011-05-27 13:25:47 +0000
70@@ -1,6 +1,7 @@
71 /*
72 * Stellarium
73 * Copyright (C) 2002 Fabien Chereau
74+ * Copyright (C) 2011 Alexander Wolf
75 *
76 * This program is free software; you can redistribute it and/or
77 * modify it under the terms of the GNU General Public License
78@@ -60,6 +61,9 @@
79 NebulaMgr::~NebulaMgr()
80 {
81 Nebula::texCircle = StelTextureSP();
82+ Nebula::texOpenCluster = StelTextureSP();
83+ Nebula::texGlobularCluster = StelTextureSP();
84+ Nebula::texPlanetNebula = StelTextureSP();
85 }
86
87 /*************************************************************************
88@@ -89,6 +93,9 @@
89
90 nebulaFont.setPixelSize(13);
91 Nebula::texCircle = StelApp::getInstance().getTextureManager().createTexture("textures/neb.png"); // Load circle texture
92+ Nebula::texOpenCluster = StelApp::getInstance().getTextureManager().createTexture("textures/ocl.png"); // Load open clister marker texture
93+ Nebula::texGlobularCluster = StelApp::getInstance().getTextureManager().createTexture("textures/gcl.png"); // Load globular clister marker texture
94+ Nebula::texPlanetNebula = StelApp::getInstance().getTextureManager().createTexture("textures/pnb.png"); // Load planetary nebula marker texture
95 texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur5.png"); // Load pointer texture
96
97 setFlagShow(conf->value("astro/flag_nebula",true).toBool());
98
99=== modified file 'src/core/modules/NebulaMgr.hpp'
100--- src/core/modules/NebulaMgr.hpp 2011-01-29 18:14:28 +0000
101+++ src/core/modules/NebulaMgr.hpp 2011-05-27 13:25:47 +0000
102@@ -1,6 +1,7 @@
103 /*
104 * Stellarium
105 * Copyright (C) 2002 Fabien Chereau
106+ * Copyright (C) 2011 Alexander Wolf
107 *
108 * This program is free software; you can redistribute it and/or
109 * modify it under the terms of the GNU General Public License
110
111=== modified file 'textures/CMakeLists.txt'
112--- textures/CMakeLists.txt 2011-05-10 06:55:17 +0000
113+++ textures/CMakeLists.txt 2011-05-27 13:25:47 +0000
114@@ -1,4 +1,4 @@
115 ########### install files ###############
116
117-INSTALL(FILES amalthea.png proteus.png triton.png mercury.png venus.png earth-clouds.png earthmap.png mars.png jupiter.png saturn.png uranus.png neptune.png earth-shadow.png saturn_rings_radial.png lune.png phobos.png deimos.png io.png europa.png ganymede.png callisto.png mimas.png enceladus.png tethys.png dione.png rhea.png titan.png hyperion.png iapetus.png miranda.png ariel.png umbriel.png titania.png oberon.png fog.png milkyway.png fogridge.png neb.png halo.png pointeur2.png pointeur4.png pointeur5.png logo24bits.png star16x16.png sun.png nomap.png haloLune.png planet-indicator.png DESTINATION share/${PACKAGE}/textures)
118+INSTALL(FILES amalthea.png proteus.png triton.png mercury.png venus.png earth-clouds.png earthmap.png mars.png jupiter.png saturn.png uranus.png neptune.png earth-shadow.png saturn_rings_radial.png lune.png phobos.png deimos.png io.png europa.png ganymede.png callisto.png mimas.png enceladus.png tethys.png dione.png rhea.png titan.png hyperion.png iapetus.png miranda.png ariel.png umbriel.png titania.png oberon.png fog.png milkyway.png fogridge.png ocl.png gcl.png pnb.png neb.png halo.png pointeur2.png pointeur4.png pointeur5.png logo24bits.png star16x16.png sun.png nomap.png haloLune.png planet-indicator.png DESTINATION share/${PACKAGE}/textures)
119
120
121=== added file 'textures/gcl.png'
122Binary files textures/gcl.png 1970-01-01 00:00:00 +0000 and textures/gcl.png 2011-05-27 13:25:47 +0000 differ
123=== added file 'textures/ocl.png'
124Binary files textures/ocl.png 1970-01-01 00:00:00 +0000 and textures/ocl.png 2011-05-27 13:25:47 +0000 differ
125=== added file 'textures/pnb.png'
126Binary files textures/pnb.png 1970-01-01 00:00:00 +0000 and textures/pnb.png 2011-05-27 13:25:47 +0000 differ