Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
First upload of current code.
- Loading branch information
0 parents
commit 6d5a1e0
Showing
9 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
[Desktop Entry] | ||
Name=Abbaye des Morts | ||
Name[ca]=Abbaye des Morts | ||
Name[en_GB]=Abbaye des Morts | ||
Name[es]=Abbaye des Morts | ||
Comment=Indie platform game by Locomalito | ||
Comment[ca]=Joc indie de plataformes de Locomalito | ||
Comment[en_GB]=Indie platform game by Locomalito | ||
Comment[es]=Juego indie de plataformas de Locomalito | ||
Exec=abbaye | ||
Icon=abbaye | ||
Terminal=false | ||
Type=Application | ||
Categories=Game;ActionGame; | ||
StartupNotify=false | ||
Version=1.0 | ||
X-Desktop-File-Install-Version=0.19 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* Abbaye des Morts */ | ||
/* Version 2.0 */ | ||
|
||
/* (c) 2010 - Locomalito & Gryzor87 */ | ||
/* 2013 - David "Nevat" Lara */ | ||
|
||
/* GPL v3 license */ | ||
|
||
main () { | ||
|
||
uint exit = 0; | ||
uint state = 0; /* 0-intro,1-introduction */ | ||
uint grapset = 0; /* 0-8bits, 1-16bits */ | ||
|
||
/* Creating window */ | ||
SDL_Window *screen = SDL_CreateWindow("Abbaye des Morts v2.0",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,512,384,SDL_WINDOW_OPENGL); | ||
/* Renderer (with VSync, nice !) */ | ||
SDL_Renderer *renderer = SDL_CreateRenderer(screen, -1, SDL_RENDERER_PRESENTVSYNC); | ||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); // make the scaled rendering look smoother. | ||
SDL_RenderSetLogicalSize(renderer, 256, 192); | ||
|
||
while (exit != 1) { | ||
switch (state) { | ||
case 0: startscreen(screen,renderer,&state,&grapset); | ||
break; | ||
case 1: exit = 1; | ||
break; | ||
} | ||
} | ||
|
||
/* Cleaning */ | ||
SDL_DestroyRenderer(renderer); | ||
SDL_DestroyWindow(screen); | ||
|
||
/* Exiting normally */ | ||
return 0; | ||
|
||
} | ||
|
||
void history(SDL_Renderer *renderer,uint *state,uint *grapset) { | ||
|
||
uint exit = 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* main.h */ | ||
|
||
# include <stdio.h> | ||
# include <stdlib.h> | ||
# include "SDL2/SDL.h" | ||
# include "SDL2/SDL_image.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* startscreen.c */ | ||
|
||
# include "startscreen.h"; | ||
|
||
void startscreen(SDL_Window *screen,SDL_Renderer *renderer,uint *state,uint *grapset) { | ||
|
||
int exit = 0; | ||
|
||
SDL_Rect srcintro = {0,0,256,192}; | ||
SDL_Rect desintro = {0,0,256,192}; | ||
|
||
SDL_Event keyp; | ||
|
||
/* Loading PNG */ | ||
SDL_Texture *intro = IMG_LoadTexture(renderer,"../graphics/intro.png"); | ||
SDL_Texture *intromd = IMG_LoadTexture(renderer,"../graphics/intromd.png"); | ||
|
||
while (exit != 1) { | ||
|
||
/* Cleaning the renderer */ | ||
SDL_RenderClear(renderer); | ||
|
||
/* Put image on renderer */ | ||
if (*grapset == 0) | ||
SDL_RenderCopy(renderer, intro, &srcintro, &desintro); | ||
else | ||
SDL_RenderCopy(renderer, intromd, &srcintro, &desintro); | ||
|
||
/* Flip ! */ | ||
SDL_RenderPresent(renderer); | ||
|
||
/* Check keyboard */ | ||
if ( SDL_PollEvent(&keyp) ) { | ||
if (keyp.type == SDL_KEYDOWN) { /* Key pressed */ | ||
if (keyp.key.keysym.sym == SDLK_c) { /* Change graphic set */ | ||
if (*grapset == 0) | ||
*grapset = 1; | ||
else | ||
*grapset = 0; | ||
} | ||
if (keyp.key.keysym.sym == SDLK_i) { /* Show instructions */ | ||
if (srcintro.y == 0) | ||
srcintro.y = 192; | ||
else | ||
srcintro.y = 0; | ||
} | ||
if (keyp.key.keysym.sym == SDLK_f) /* Switch to fullscreen */ | ||
SDL_SetWindowFullscreen(screen,SDL_WINDOW_FULLSCREEN); | ||
if (keyp.key.keysym.sym == SDLK_SPACE) { /* Start game */ | ||
*state = 1; | ||
exit = 1; | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
/* Cleaning */ | ||
SDL_DestroyTexture(intro); | ||
SDL_DestroyTexture(intromd); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* startscreen.h */ | ||
|
||
# include <stdio.h> | ||
# include <stdlib.h> | ||
# include "SDL2/SDL.h" | ||
# include "SDL2/SDL_image.h" |