about summary refs log tree commit diff stats
path: root/data/maps/the_extravagant/rooms
Commit message (Collapse)AuthorAgeFilesLines
* Added keyholder sanityStar Rauchenberger2025-09-021-0/+1
|
* Changed how door location names are formattedStar Rauchenberger2025-08-3014-14/+0
| | | | | | | | | | | | | | | | | | STANDARD type doors with at most four panels in the same map area and no other trigger objects will have their location names generated from the names of the panels used to open the door, similar to Lingo 1. Other door types will use the door's name. In either case, the name can be overridden using the new location_name field. Rooms can also set a panel_display_name field, which will be used in location names for doors, and is used to group panels into areas. Panels themselves can set display names, which differentiates their locations from other panels in the same area. Many maps were updated for this, but note that the_symbolic and the_unyielding have validator failures because of duplicate panel names. This won't matter until panelsanity is implemented.
* Converted puzzle symbols to an enumStar Rauchenberger2025-08-2012-16/+16
|
* Added the_extravagantStar Rauchenberger2025-08-1214-0/+248
ef='/mazeoflife/commit/mazeoflife.cpp?h=emscripten&id=8c1f08f2133de108fd354dd07c65e0c24ecc1d38'>8c1f08f ^
10ccc82
ab18806 ^
10ccc82



7b92903 ^

10ccc82



10ccc82



024d098 ^



10ccc82










7104515 ^




















ab18806 ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

                     
                    
             

                                


                          








                                                                          

                                                



                                                                    
                                                                         




                                                                                                             
                                     
 
                                 



                          

                              



                                               



                                                



                                                                             










                                      




















                                                   




                               
#include "includes.h"

SDL_Surface *screen;
State* state;

int main(int argc, char *argv[])
{
	srand(time(NULL));

	/* Initialize defaults, Video and Audio */
	if((SDL_Init(SDL_INIT_VIDEO)==-1)) { 
		printf("Could not initialize SDL: %s.\n", SDL_GetError());
		exit(-1);
	}

	/* Clean up on exit */
	atexit(SDL_Quit);

	SDL_WM_SetCaption("Maze Of Life", NULL);

	/*
	* Initialize the display in a 640x480 8-bit palettized mode,
	* requesting a software surface
	*/
	screen = SDL_SetVideoMode(WIDTH*16, HEIGHT*16, 8, SDL_DOUBLEBUF);
	if ( screen == NULL ) {
		fprintf(stderr, "Couldn't set %dx%dx8 video mode: %s\n", WIDTH*16, WIDTH*16, SDL_GetError());
		exit(1);
	}

	SDL_EnableKeyRepeat(100, 50);

	state = new TitleState();

	SDL_Event anEvent;
	for (;;)
	{
		state->tick();

		while (SDL_PollEvent(&anEvent))
		{
			switch (anEvent.type)
			{
				case SDL_QUIT:
					exit(0);

					break;
				case SDL_KEYDOWN:
					state->input(anEvent.key.keysym.sym);

					break;
			}
		}

		state->render(screen);

		SDL_Flip(screen);
	}

	exit(0);
}

void wrap(int* x, int* y)
{
	if (*x < 0)
	{
		*x = WIDTH-(0-*x);
	} else if (*y < 0)
	{
		*y = HEIGHT-(0-*y);
	} else if (*x >= WIDTH)
	{
		*x = *x-WIDTH;
	} else if (*y >= HEIGHT)
	{
		*y = *y-HEIGHT;
	}
}

Uint32 getColor(int r, int g, int b)
{
	return SDL_MapRGB(screen->format, r, g, b);
}

void changeState(State* nState)
{
	state = nState;
}