Changeset 2403
- Timestamp:
- Feb 13, 2013, 2:26:04 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r2401 r2403 379 379 dnl How to use the Lol Engine inside this tree 380 380 AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/src" 381 AM_CPPFLAGS="${AM_CPPFLAGS} -DLOL_ SOURCE_SUBDIR=\\\"\$(subdir)\\\""381 AM_CPPFLAGS="${AM_CPPFLAGS} -DLOL_CONFIG_SOURCESUBDIR=\\\"\$(subdir)\\\"" 382 382 AM_CPPFLAGS="${AM_CPPFLAGS} ${LOL_CFLAGS}" 383 383 AM_LDFLAGS="${AM_LDFLAGS} ${LOL_DEPENDENCIES}" -
trunk/src/debug/fps.cpp
r2216 r2403 45 45 for (int i = 0; i < 5; i ++) 46 46 { 47 data->lines[i] = new Text(NULL, " src/data/font/ascii.png");47 data->lines[i] = new Text(NULL, "data/font/ascii.png"); 48 48 data->lines[i]->SetPos(ivec3(x, y + (i ? 8 : 0) + 16 * i, 0)); 49 49 Ticker::Ref(data->lines[i]); 50 50 } 51 51 #else 52 data->lines[0] = new Text(NULL, " src/data/font/ascii.png");52 data->lines[0] = new Text(NULL, "data/font/ascii.png"); 53 53 data->lines[0]->SetPos(ivec3(x, y, 100)); 54 54 Ticker::Ref(data->lines[0]); -
trunk/src/lol/sys/init.h
r2381 r2403 35 35 #endif 36 36 37 #if !defined LOL_CONFIG_SOURCESUBDIR 38 # define LOL_CONFIG_SOURCESUBDIR "" 39 #endif 40 37 41 /* 38 42 * System namespace. The platform-specific stuff in there makes the API … … 45 49 extern void Init(int argc, char *argv[], 46 50 String const &projectdir = LOL_CONFIG_PROJECTDIR, 47 String const &solutiondir = LOL_CONFIG_SOLUTIONDIR); 51 String const &solutiondir = LOL_CONFIG_SOLUTIONDIR, 52 String const &sourcesubdir = LOL_CONFIG_SOURCESUBDIR); 48 53 49 54 extern void AddDataDir(String const &dir); -
trunk/src/sys/init.cpp
r2381 r2403 39 39 40 40 void Init(int argc, char *argv[], 41 String const &projectdir, String const &solutiondir) 41 String const &projectdir, 42 String const &solutiondir, 43 String const &sourcesubdir) 42 44 { 43 45 using namespace std; … … 77 79 if (i) 78 80 { 79 String rootdir = projectdir; 81 String rootdir = solutiondir; 82 if (rootdir.Last() != SEPARATOR) 83 rootdir += SEPARATOR; 84 rootdir += "../../src/"; /* FIXME: use SEPARATOR? */ 85 AddDataDir(rootdir); 86 87 rootdir = projectdir; 80 88 if (rootdir.Last() != SEPARATOR) 81 89 rootdir += SEPARATOR; 82 90 AddDataDir(rootdir); 91 83 92 got_rootdir = true; 84 93 } … … 90 99 if (!got_rootdir) 91 100 { 92 AddDataDir(binarydir); 101 String rootdir = binarydir; 102 if (rootdir.Last() != SEPARATOR) 103 rootdir += SEPARATOR; 104 for (int i = 1; i < sourcesubdir.Count(); ++i) 105 { 106 if ((sourcesubdir[i] == SEPARATOR 107 && sourcesubdir[i - 1] != SEPARATOR) 108 || i == sourcesubdir.Count() - 1) 109 rootdir += "../"; 110 } 111 rootdir += "src/"; 112 AddDataDir(rootdir); 113 114 rootdir = binarydir; 115 AddDataDir(rootdir); 116 93 117 got_rootdir = true; 94 118 } … … 114 138 115 139 for (int i = 0; i < data_dir.Count(); ++i) 116 ret << data_dir[ 0] + file;140 ret << data_dir[i] + file; 117 141 118 142 if (ret.Count() == 0) -
trunk/tutorial/11_fractal.cpp
r2317 r2403 105 105 106 106 #if !defined __native_client__ 107 m_centertext = new Text(NULL, " src/data/font/ascii.png");107 m_centertext = new Text(NULL, "data/font/ascii.png"); 108 108 m_centertext->SetPos(ivec3(5, m_window_size.y - 15, 1)); 109 109 Ticker::Ref(m_centertext); 110 110 111 m_mousetext = new Text(NULL, " src/data/font/ascii.png");111 m_mousetext = new Text(NULL, "data/font/ascii.png"); 112 112 m_mousetext->SetPos(ivec3(5, m_window_size.y - 29, 1)); 113 113 Ticker::Ref(m_mousetext); 114 114 115 m_zoomtext = new Text(NULL, " src/data/font/ascii.png");115 m_zoomtext = new Text(NULL, "data/font/ascii.png"); 116 116 m_zoomtext->SetPos(ivec3(5, m_window_size.y - 43, 1)); 117 117 Ticker::Ref(m_zoomtext);
Note: See TracChangeset
for help on using the changeset viewer.