[Add] Initialize nebulae and use it in menu.
This commit is contained in:
parent
fefc7e793c
commit
86b2ef3fe1
@ -139,9 +139,6 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
window_caption();
|
||||
|
||||
/* Time to try to load the nebulae. */
|
||||
nebu_init();
|
||||
|
||||
/* OpenAL sound. */
|
||||
if(nosound)
|
||||
LOG("Sound is disabled!");
|
||||
@ -175,6 +172,7 @@ int main(int argc, char** argv) {
|
||||
WARN("Error initializing AI");
|
||||
|
||||
/* Misc openGL init stuff. */
|
||||
nebu_init(); /* Init the nebulae. */
|
||||
gl_fontInit(NULL, NULL, FONT_SIZE); /* Init default font size. */
|
||||
gl_fontInit(&gl_smallFont, NULL, FONT_SIZE_SMALL); /* Small font. */
|
||||
gui_init(); /* Init the GUI crap. */
|
||||
|
11
src/menu.c
11
src/menu.c
@ -7,12 +7,12 @@
|
||||
#include "pilot.h"
|
||||
#include "space.h"
|
||||
#include "player.h"
|
||||
#include "perlin.h"
|
||||
#include "mission.h"
|
||||
#include "ltime.h"
|
||||
#include "save.h"
|
||||
#include "land.h"
|
||||
#include "rng.h"
|
||||
#include "nebulae.h"
|
||||
#include "menu.h"
|
||||
|
||||
#define MAIN_WIDTH 130
|
||||
@ -66,15 +66,12 @@ static void menu_generic_close(char* str);
|
||||
|
||||
void menu_main(void) {
|
||||
unsigned int bwid, wid;
|
||||
glTexture* tex;
|
||||
|
||||
tex = noise_genCloud(SCREEN_W, SCREEN_H, 5.);
|
||||
|
||||
/* Create background image window. */
|
||||
bwid = window_create("BG", -1, -1, SCREEN_W, SCREEN_H);
|
||||
window_addRect(bwid, 0, 0, SCREEN_W, SCREEN_H, "rctBG", &cBlack, 0);
|
||||
window_addImage(bwid, 0, 0, "imgBG", tex, 0);
|
||||
window_imgColour(bwid, "imgBG", &cPurple);
|
||||
/*window_addRect(bwid, 0, 0, SCREEN_W, SCREEN_H, "rctBG", &cBlack, 0);*/
|
||||
window_addCust(bwid, 0, 0, SCREEN_W, SCREEN_H, "cstBG", 0,
|
||||
(void(*)(double, double, double, double))nebu_render, NULL);
|
||||
|
||||
/* Create menu window. */
|
||||
wid = window_create("Main Menu", -1, -1, MAIN_WIDTH, MAIN_HEIGHT);
|
||||
|
Loading…
Reference in New Issue
Block a user