-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mise à jour vers une version plus récente de
base
(dont les pages s…
…ont quelque peu modifiées)
- Loading branch information
1 parent
e6c6dae
commit 9679868
Showing
129 changed files
with
866 additions
and
550 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
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
/bin | ||
/out | ||
/tmp | ||
/zip | ||
/.idea | ||
*.iml | ||
*.log | ||
*.zip | ||
/*.idea | ||
/*.iml | ||
.DS_Store | ||
Thumbs.db |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,55 @@ | ||
@echo off | ||
setlocal | ||
|
||
if "%1"=="" ( | ||
echo Autostart | ||
GOTO autostart | ||
) else ( | ||
echo Parsing | ||
GOTO loop | ||
) | ||
|
||
:autostart | ||
if not exist "bin" ( | ||
echo Build | ||
mkdir "bin" | ||
javac -d bin -cp src;res;lib\common\*;lib\x86\* src\Main.java | ||
) | ||
goto RUN | ||
|
||
:loop | ||
if x%1 equ x goto done | ||
goto checkParam | ||
|
||
:paramError | ||
echo %1 n'est pas une option valide | ||
echo Usage: make.bat [build^|run^|clean...] | ||
goto next | ||
|
||
:next | ||
shift /1 | ||
goto loop | ||
|
||
:checkParam | ||
if "%1" equ "build" goto BUILD | ||
if "%1" equ "clean" goto CLEAN | ||
if "%1" equ "run" goto RUN | ||
goto paramError | ||
|
||
:BUILD | ||
echo Build | ||
if not exist "bin" mkdir "bin" | ||
javac -d bin -cp src;res;lib\common\*;lib\x86\* src\Main.java | ||
GOTO next | ||
|
||
:CLEAN | ||
echo Clean | ||
rmdir /Q /S bin | ||
GOTO next | ||
|
||
:RUN | ||
echo Run | ||
java -Djava.library.path=sys\x86 -cp bin;res;lib\common\*;lib\x86\* Main | ||
GOTO next | ||
|
||
:done |
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 |
---|---|---|
@@ -1,26 +1,47 @@ | ||
build: | ||
mkdir -p bin | ||
javac -d bin -cp src:res:lib/* src/Main.java | ||
javac -d bin -cp src:res:lib/common/*:lib/x86/* src/Main.java | ||
|
||
run: | ||
java -cp bin:res:lib/* -Djava.library.path=res/natives Main | ||
java -Djava.library.path=sys/x86 -cp bin:res:lib/common/*:lib/x86/* Main | ||
|
||
run-arm: | ||
java -Djava.library.path=sys/arm -cp bin:res:lib/common/*:lib/arm/* Main | ||
|
||
archive: | ||
$(eval NAME := $(shell basename $(CURDIR))) | ||
mkdir -p tmp | ||
mkdir -p tmp/x86 | ||
mkdir -p tmp/arm | ||
jar cfm tmp/x86/$(NAME).jar .mf -C bin . -C res . | ||
cp tmp/x86/$(NAME).jar tmp/arm/$(NAME).jar | ||
cp sys/x86/* tmp/x86 | ||
cp sys/arm/* tmp/arm | ||
cp lib/common/* tmp/x86 | ||
cp lib/common/* tmp/arm | ||
cp lib/arm/* tmp/arm | ||
cp lib/x86/* tmp/x86 | ||
echo "#/bin/sh\njava -Djava.library.path=. -jar $(NAME).jar" > tmp/x86/$(NAME).sh | ||
cp tmp/x86/$(NAME).sh tmp/arm/$(NAME).sh | ||
echo "java -Djava.library.path=. -jar $(NAME).jar" > tmp/x86/$(NAME).bat | ||
chmod u+x tmp/x86/$(NAME).sh | ||
chmod u+x tmp/arm/$(NAME).sh | ||
chmod u+x tmp/x86/$(NAME).bat | ||
mkdir -p zip | ||
cp res/natives/* zip | ||
cp lib/* zip | ||
jar cfm zip/main.jar .mf -C bin . -C res . | ||
echo "#/bin/sh\njava -Djava.library.path=. -jar main.jar" > zip/main.sh | ||
echo "java -Djava.library.path=. -jar main.jar" > zip/main.bat | ||
chmod u+x zip/main.sh | ||
chmod u+x zip/main.bat | ||
zip main.zip zip/* | ||
cd tmp/x86; zip ../../zip/$(NAME)-x86.zip * | ||
cd tmp/arm; zip ../../zip/$(NAME)-arm.zip * | ||
|
||
exec: | ||
java -Djava.library.path=zip -jar zip/main.jar | ||
$(eval NAME := $(shell basename $(CURDIR))) | ||
java -Djava.library.path=tmp/x86 -jar tmp/x86/$(NAME).jar | ||
|
||
exec-arm: | ||
$(eval NAME := $(shell basename $(CURDIR))) | ||
java -Djava.library.path=tmp/arm -jar tmp/arm/$(NAME).jar | ||
|
||
clean: | ||
rm -r -f bin/* | ||
rm -r -f tmp/* | ||
rm -r -f zip/* | ||
|
||
.PHONY: build run archive exec clean | ||
.PHONY: build run run-arm archive exec exec-arm clean |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,62 +1,69 @@ | ||
import java.awt.DisplayMode; | ||
import java.awt.GraphicsEnvironment; | ||
|
||
import javax.swing.JFrame; | ||
import javax.swing.JOptionPane; | ||
|
||
import org.newdawn.slick.AppGameContainer; | ||
import org.newdawn.slick.GameContainer; | ||
import org.newdawn.slick.SlickException; | ||
import org.newdawn.slick.state.StateBasedGame; | ||
|
||
import app.AppLoader; | ||
|
||
public final class Main { | ||
|
||
public static final void main (String [] arguments) throws SlickException { | ||
String title = "CN-20-10"; | ||
public static final void main(String[] arguments) throws SlickException { | ||
String title = "Grave-ET"; | ||
int width = 1280; | ||
int height = 720; | ||
boolean fullscreen = false; | ||
String request = "Voulez-vous jouer en plein écran ?"; | ||
String [] options = { | ||
String[] options = new String[] { | ||
"Oui", | ||
"Non" | ||
}; | ||
int returnValue = JOptionPane.showOptionDialog ( | ||
null, | ||
JFrame frame = new JFrame(); | ||
frame.setIconImage(AppLoader.loadIcon("/images/icon.png").getImage()); | ||
int returnValue = JOptionPane.showOptionDialog( | ||
frame, | ||
request, | ||
title, | ||
JOptionPane.YES_NO_OPTION, | ||
JOptionPane.QUESTION_MESSAGE, | ||
null, | ||
options, | ||
options [0] | ||
options[0] | ||
); | ||
frame.dispose(); | ||
if (returnValue == -1) { | ||
return; | ||
} | ||
if (returnValue == 0) { | ||
DisplayMode display = GraphicsEnvironment.getLocalGraphicsEnvironment ().getDefaultScreenDevice ().getDisplayMode (); | ||
width = display.getWidth (); | ||
height = display.getHeight (); | ||
DisplayMode display = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode(); | ||
width = display.getWidth(); | ||
height = display.getHeight(); | ||
fullscreen = true; | ||
} | ||
StateBasedGame game = new StateBasedGame (title) { | ||
StateBasedGame game = new StateBasedGame(title) { | ||
|
||
@Override | ||
public void initStatesList (GameContainer container) { | ||
this.addState (new pages.Welcome (0)); | ||
this.addState (new pages.Choice (1)); | ||
this.addState (new pages.Pause (2)); | ||
this.addState (new graveEt.World (3)); | ||
this.addState (new pages.Death (4)); | ||
this.addState (new pages.Rules (5)); | ||
public void initStatesList(GameContainer container) { | ||
this.addState(new pages.Welcome(0)); | ||
this.addState(new pages.Choice(1)); | ||
this.addState(new pages.Pause(2)); | ||
this.addState(new pages.Rules(3)); | ||
this.addState(new pages.Death(4)); | ||
this.addState(new games.graveEt.World(5)); | ||
} | ||
|
||
}; | ||
AppGameContainer container = new AppGameContainer (game, width, height, fullscreen); | ||
container.setTargetFrameRate (60); | ||
container.setVSync (true); | ||
container.setShowFPS (false); | ||
container.start (); | ||
AppGameContainer container = new AppGameContainer(game, width, height, fullscreen); | ||
container.setTargetFrameRate(60); | ||
container.setVSync(true); | ||
container.setShowFPS(false); | ||
container.setIcon(AppLoader.resolve("/images/icon.png")); | ||
container.start(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.