--- pink-pony/Pony.cc~ 2009-08-18 08:55:21.000000000 +0930 +++ pink-pony/Pony.cc 2009-08-29 00:49:03.086413822 +0930 @@ -14,7 +14,7 @@ int main(int argc, char** argv) { - string config_file = "pony.options"; + string config_file = "/etc/pink-pony.options"; bool running = true; Config config; @@ -84,7 +84,7 @@ // between braces, so that stack variables that need a GL context // are destructed, while the context still exists. { - Skydome skydome("textures/sky.png"); + Skydome skydome(PONY_HOME + "textures/sky.png"); Menu::MenuStatus menu_status; { --- pink-pony/lib/cinquo.hh~ 2009-08-18 08:43:41.000000000 +0930 +++ pink-pony/lib/cinquo.hh 2009-08-29 00:48:06.718390764 +0930 @@ -40,5 +40,6 @@ typedef Vec2 V2u; typedef Vec3 V3u; +#define PONY_HOME string("/usr/share/games/pink-pony/") #include "utilities.hh" --- pink-pony/lib/Config.cc~ 2009-08-16 04:57:06.000000000 +0930 +++ pink-pony/lib/Config.cc 2009-08-29 00:50:13.694413888 +0930 @@ -8,9 +8,9 @@ fsaa_samples(4), swap_interval(1), polygon_mode(GL_FILL), - levels_file("levels.xml"), + levels_file(PONY_HOME+"levels.xml"), selected_level(0), - heightmap_file("levels/heightmap-heart.exr"), + heightmap_file(PONY_HOME+"levels/heightmap-heart.exr"), level_size(V3f(-500, 0,-500), V3f( 500,60, 500)), water_level(15), @@ -18,9 +18,9 @@ heightmap_diffuse(1,1,1,1), heightmap_shininess(50.0), heightmap_velvet_coeff(1.5), - sand_texture("textures/sand.png"), - grass_texture("textures/grass.png"), - noise_texture("textures/noise.png"), + sand_texture(PONY_HOME+"textures/sand.png"), + grass_texture(PONY_HOME+"textures/grass.png"), + noise_texture(PONY_HOME+"textures/noise.png"), light_specular(1,1,1,1), light_diffuse(1,1,1,1), light_ambient(0.05,0.05,0.05,1), @@ -49,19 +49,19 @@ randomize_start_positions(false), min_start_distance(200), use_particles(true), - digit_one("textures/one.png"), - digit_two("textures/two.png"), - digit_three("textures/three.png"), - digit_four("textures/four.png"), - heart_mesh("models/Heart.pmesh"), + digit_one(PONY_HOME+"textures/one.png"), + digit_two(PONY_HOME+"textures/two.png"), + digit_three(PONY_HOME+"textures/three.png"), + digit_four(PONY_HOME+"textures/four.png"), + heart_mesh(PONY_HOME+"models/Heart.pmesh"), heart_explosion_particles(10000), - pony_shader("GLSL/pony"), + pony_shader(PONY_HOME+"GLSL/pony"), pony_velvet_coeff(2.0), - pony_texture("textures/pony.png"), - pony_mesh("models/Pony.pmesh"), + pony_texture(PONY_HOME+"textures/pony.png"), + pony_mesh(PONY_HOME+"models/Pony.pmesh"), pony_particle_rate(100.0), pony_explosion_particles(50000), - background_music("music/To be happy.mp3") + background_music(PONY_HOME+"music/To be happy.mp3") { pony_up[0] = GLFW_KEY_UP; pony_down[0] = GLFW_KEY_DOWN; --- pink-pony/pony.options~ 2009-08-19 23:08:12.000000000 +0930 +++ pink-pony/pony.options 2009-08-29 01:01:52.926414056 +0930 @@ -16,18 +16,18 @@ // Level properties -levels_file = "levels.xml"; +levels_file = "/usr/share/games/pink-pony/levels.xml"; selected_level = 1; -heightmap_file = "levels/heart.png"; +heightmap_file = "/usr/share/games/pink-pony/levels/heart.png"; level_size = (1500 90 1500); water_level = 30; heightmap_specular = (1 1 1 1); heightmap_diffuse = (0 0 0 0); heightmap_shininess = 50; heightmap_velvet_coeff = 1.5; -sand_texture = "textures/sand.png"; -grass_texture = "textures/grass.png"; -noise_texture = "textures/noise.png"; +sand_texture = "/usr/share/games/pink-pony/textures/sand.png"; +grass_texture = "/usr/share/games/pink-pony/textures/grass.png"; +noise_texture = "/usr/share/games/pink-pony/textures/noise.png"; pony_start[0] = (98.1826 -166.452); pony_start_angle[0] = 353.63; pony_start[1] = (360.84 228.471); @@ -91,18 +91,18 @@ // General appearance -digit_one = "textures/one.png"; -digit_two = "textures/two.png"; -digit_three = "textures/three.png"; -digit_four = "textures/four.png"; -heart_mesh = "models/Heart.pmesh"; +digit_one = "/usr/share/games/pink-pony/textures/one.png"; +digit_two = "/usr/share/games/pink-pony/textures/two.png"; +digit_three = "/usr/share/games/pink-pony/textures/three.png"; +digit_four = "/usr/share/games/pink-pony/textures/four.png"; +heart_mesh = "/usr/share/games/pink-pony/models/Heart.pmesh"; // Pony appearance -pony_shader = "GLSL/pony"; +pony_shader = "/usr/share/games/pink-pony/GLSL/pony"; pony_velvet_coeff = 2; -pony_texture = "textures/pony.png"; -pony_mesh = "models/Pony-animated.pmesh"; +pony_texture = "/usr/share/games/pink-pony/textures/pony.png"; +pony_mesh = "/usr/share/games/pink-pony/models/Pony-animated.pmesh"; pony_color[0] = (1 0.75 0.792968 1); pony_color[1] = (0.25 0.875 0.8125 1); pony_color[2] = (1 0.839844 0 1); @@ -110,4 +110,4 @@ // Sounds -background_music = "music/To be happy.mp3"; +background_music = "/usr/share/games/pink-pony/music/To be happy.mp3"; --- pink-pony/lib/Menu.cc~ 2009-08-19 23:04:57.000000000 +0930 +++ pink-pony/lib/Menu.cc 2009-08-29 01:07:42.606413273 +0930 @@ -87,39 +87,39 @@ skydome(skydome), music(music), heightmap(NULL), - logo_button("textures/logo.png"), + logo_button(PONY_HOME+"textures/logo.png"), start_button("Start"), - quit_button("textures/quit.png"), - options_button("textures/settings.png"), + quit_button(PONY_HOME+"textures/quit.png"), + options_button(PONY_HOME+"textures/settings.png"), level_name_text("Lagoon"), - next_level_button("textures/right.png"), - prev_level_button("textures/left.png"), + next_level_button(PONY_HOME+"textures/right.png"), + prev_level_button(PONY_HOME+"textures/left.png"), computer_no("0"), human_no("0"), - computer_text("textures/computer.png"), - human_text("textures/human.png"), + computer_text(PONY_HOME+"textures/computer.png"), + human_text(PONY_HOME+"textures/human.png"), computers(config->ai_count), humans(config->player_count - config->ai_count), settings_text("Settings"), - settings_done("textures/back.png"), + settings_done(PONY_HOME+"textures/back.png"), particles_text("Some particles", Color4f(1,1,1,0.5)), - prev_particles("textures/left.png"), - next_particles("textures/right.png"), + prev_particles(PONY_HOME+"textures/left.png"), + next_particles(PONY_HOME+"textures/right.png"), fullscreen_text("Some particles", Color4f(1,1,1,0.5)), - prev_fullscreen("textures/left.png"), - next_fullscreen("textures/right.png"), + prev_fullscreen(PONY_HOME+"textures/left.png"), + next_fullscreen(PONY_HOME+"textures/right.png"), minimap_text("Some particles", Color4f(1,1,1,0.5)), - prev_minimap("textures/left.png"), - next_minimap("textures/right.png"), + prev_minimap(PONY_HOME+"textures/left.png"), + next_minimap(PONY_HOME+"textures/right.png"), antialiasing_text("Some particles", Color4f(1,1,1,0.5)), - prev_antialiasing("textures/left.png"), - next_antialiasing("textures/right.png"), + prev_antialiasing(PONY_HOME+"textures/left.png"), + next_antialiasing(PONY_HOME+"textures/right.png"), hearts_text("Some particles", Color4f(1,1,1,0.5)), - prev_hearts("textures/left.png"), - next_hearts("textures/right.png"), + prev_hearts(PONY_HOME+"textures/left.png"), + next_hearts(PONY_HOME+"textures/right.png"), resolution_text("Some particles", Color4f(1,1,1,0.5)), - prev_resolution("textures/left.png"), - next_resolution("textures/right.png"), + prev_resolution(PONY_HOME+"textures/left.png"), + next_resolution(PONY_HOME+"textures/right.png"), needs_reset(false) { --- pink-pony/lib/PonyPoints.cc~ 2009-05-05 04:18:05.000000000 +0930 +++ pink-pony/lib/PonyPoints.cc 2009-08-29 01:08:36.574413582 +0930 @@ -68,10 +68,10 @@ PonyPoints::PonyPoints(int i) : points(i) { - digits.push_back(new Texture2D("textures/one.png")); - digits.push_back(new Texture2D("textures/two.png")); - digits.push_back(new Texture2D("textures/three.png")); - digits.push_back(new Texture2D("textures/four.png")); + digits.push_back(new Texture2D((PONY_HOME+"textures/one.png" ).c_str())); + digits.push_back(new Texture2D((PONY_HOME+"textures/two.png" ).c_str())); + digits.push_back(new Texture2D((PONY_HOME+"textures/three.png").c_str())); + digits.push_back(new Texture2D((PONY_HOME+"textures/four.png" ).c_str())); } PonyPoints::~PonyPoints() --- pink-pony/lib/Widget.cc~ 2009-08-19 06:28:54.000000000 +0930 +++ pink-pony/lib/Widget.cc 2009-08-29 01:18:08.302387895 +0930 @@ -88,7 +88,7 @@ { int face_size = 72; - font = new FTBufferFont("fonts/DaveDS_-_Sketchy.ttf"); + font = new FTBufferFont("/usr/share/games/pink-pony/fonts/DaveDS_-_Sketchy.ttf"); if (font->Error()) { cerr << "Something went wrong with loading the font." << endl; --- pink-pony/lib/ParticleSystem.cc~ 2009-08-03 04:39:29.000000000 +0930 +++ pink-pony/lib/ParticleSystem.cc 2009-08-29 01:31:26.270413606 +0930 @@ -45,8 +45,8 @@ CPUParticleSystem::CPUParticleSystem (GLuint max_particles, Config* config) : last_stat_print(glfwGetTime()), - draw_shader("GLSL/draw_particles_cpu"), - particle_tex("textures/heart-particle.png"), + draw_shader((PONY_HOME+"GLSL/draw_particles_cpu").c_str()), + particle_tex((PONY_HOME+"textures/heart-particle.png").c_str()), heightmap(config->heightmap_file.c_str()), level_size(config->level_size), water_level(config->water_level), @@ -253,18 +253,18 @@ TransformFeedbackParticleSystem::TransformFeedbackParticleSystem (GLuint max_particles, Config* config) : last_stat_print(glfwGetTime()), calculating(false), - step_shader("GLSL/step_particles", - "GLSL/step_particles", - "GLSL/step_particles", + step_shader((PONY_HOME+"GLSL/step_particles").c_str(), + (PONY_HOME+"GLSL/step_particles").c_str(), + (PONY_HOME+"GLSL/step_particles").c_str(), GL_POINTS, GL_POINTS, 1), - draw_shader("GLSL/draw_particles", - "GLSL/draw_particles", - "GLSL/draw_particles", + draw_shader((PONY_HOME+"GLSL/draw_particles").c_str(), + (PONY_HOME+"GLSL/draw_particles").c_str(), + (PONY_HOME+"GLSL/draw_particles").c_str(), GL_POINTS, GL_TRIANGLE_STRIP, 4), feedback(step_shader, GL_POINTS, "out_pos out_color out_vel out_life", max_particles, true), - particle_tex("textures/heart-particle.png"), + particle_tex((PONY_HOME+"textures/heart-particle.png").c_str()), heightmap(config->heightmap_file.c_str()) { heightmap.normalize(); --- pink-pony/lib/Pony.cc~ 2009-08-19 23:04:57.000000000 +0930 +++ pink-pony/lib/Pony.cc 2009-08-29 01:33:01.934413726 +0930 @@ -16,7 +16,7 @@ right(right), shader(config->pony_shader), mesh(), - animation("models/Pony-animated.pskeleton"), + animation((PONY_HOME+"models/Pony-animated.pskeleton").c_str()), mesh_drawer(&mesh), texture(config->pony_texture.c_str()), out(false), out_delay(false), particle_source(particle_system) --- pink-pony/lib/Heightmap.cc~ 2009-07-20 00:20:22.000000000 +0930 +++ pink-pony/lib/Heightmap.cc 2009-08-29 01:33:29.710413923 +0930 @@ -6,8 +6,8 @@ string sand, string grass, string noise) : mesh(), mesh_drawer(&mesh), - terrain_shader("GLSL/heightmap"), - water_shader("GLSL/water"), + terrain_shader((PONY_HOME+"GLSL/heightmap").c_str()), + water_shader((PONY_HOME+"GLSL/water").c_str()), heightmap(filename.c_str(), GL_CLAMP, GL_CLAMP, GL_LINEAR, GL_LINEAR), sand_texture(sand.c_str()), --- pink-pony/lib/PonyGame.cc~ 2009-08-18 08:57:19.000000000 +0930 +++ pink-pony/lib/PonyGame.cc 2009-08-29 01:33:43.998413518 +0930 @@ -17,7 +17,7 @@ music(music), heart(), heart_drawer(&heart), - heart_shader("GLSL/heart") + heart_shader((PONY_HOME+"GLSL/heart").c_str()) { int human_count = m_config->player_count - m_config->ai_count; if (human_count == 0) human_count = m_config->player_count; --- pink-pony/lib/Widget.cc~ 2009-08-29 01:58:24.000000000 +0930 +++ pink-pony/lib/Widget.cc 2009-08-29 02:00:26.542393092 +0930 @@ -246,8 +246,8 @@ Slider::Slider() : Widget(1.0), - up_button("textures/up.png"), - down_button("textures/down.png") + up_button((PONY_HOME+"textures/up.png").c_str()), + down_button((PONY_HOME+"textures/down.png").c_str()) { up_button.on_click() .connect(sigc::bind(sigc::mem_fun(this, &Slider::change), 1)); --- pink-pony/lib/Texture2D.cc~ 2009-07-31 11:10:50.000000000 +0930 +++ pink-pony/lib/Texture2D.cc 2009-08-29 02:01:46.446391703 +0930 @@ -52,7 +52,7 @@ bool success = ilLoadImage(path); if (!success) { - cerr << " Failed"; + cerr << " Failed texture (" << path << ")"; } size.x = ilGetInteger(IL_IMAGE_WIDTH); --- pink-pony/levels.xml~ 2009-08-17 00:33:52.000000000 +0930 +++ pink-pony/levels.xml 2009-08-29 02:06:51.166391308 +0930 @@ -1,8 +1,8 @@ - - - - - - + + + + + +