From bcc59998deac0bf3bc308a31b8514b9ed9e1acb0 Mon Sep 17 00:00:00 2001 From: Johnny Jazeix Date: Thu, 21 Dec 2023 11:35:08 +0100 Subject: [PATCH 1/2] rename all files in English --- CMakeLists.txt | 16 ++++++++-------- android/app/src/main/jni/src/Android.mk | 8 ++++---- src/audio.cc | 6 +++--- src/audio.h | 6 +++--- src/{editeur.cc => editor.cc} | 12 ++++++------ src/{editeur.h => editor.h} | 10 +++++----- src/{jeux.cc => game.cc} | 12 ++++++------ src/{jeux.h => game.h} | 10 +++++----- src/{tableau.cc => level.cc} | 8 ++++---- src/{tableau.h => level.h} | 10 +++++----- src/loco.cc | 8 ++++---- src/loco.h | 6 +++--- src/main.cc | 14 +++++++------- src/menu.cc | 8 ++++---- src/menu.h | 6 +++--- src/mouse.cc | 8 ++++---- src/mouse.h | 10 +++++----- src/preference.h | 6 +++--- src/{ecran.cc => screen.cc} | 8 ++++---- src/{ecran.h => screen.h} | 10 +++++----- src/sprite.cc | 6 +++--- src/sprite.h | 6 +++--- src/utils.cc | 10 +++++----- src/utils.h | 8 ++++---- 24 files changed, 106 insertions(+), 106 deletions(-) rename src/{editeur.cc => editor.cc} (98%) rename src/{editeur.h => editor.h} (89%) rename src/{jeux.cc => game.cc} (98%) rename src/{jeux.h => game.h} (92%) rename src/{tableau.cc => level.cc} (97%) rename src/{tableau.h => level.h} (92%) rename src/{ecran.cc => screen.cc} (95%) rename src/{ecran.h => screen.h} (92%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4341704..402ff00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,12 +36,12 @@ set(CMAKE_CXX_EXTENSIONS OFF) add_executable(${LIRI_EXECUTABLE_NAME} WIN32 src/audio.cc src/audio.h - src/ecran.cc - src/ecran.h - src/editeur.cc - src/editeur.h - src/jeux.cc - src/jeux.h + src/screen.cc + src/screen.h + src/editor.cc + src/editor.h + src/game.cc + src/game.h src/loco.cc src/loco.h src/main.cc @@ -51,8 +51,8 @@ add_executable(${LIRI_EXECUTABLE_NAME} WIN32 src/mouse.h src/sprite.cc src/sprite.h - src/tableau.cc - src/tableau.h + src/level.cc + src/level.h src/utils.cc src/utils.h ) diff --git a/android/app/src/main/jni/src/Android.mk b/android/app/src/main/jni/src/Android.mk index 5b974cf..daca552 100644 --- a/android/app/src/main/jni/src/Android.mk +++ b/android/app/src/main/jni/src/Android.mk @@ -12,15 +12,15 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/ \ # Add your application source files here... LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ ../../../../../../src/audio.cc \ - ../../../../../../src/ecran.cc \ - ../../../../../../src/editeur.cc \ - ../../../../../../src/jeux.cc \ + ../../../../../../src/editor.cc \ + ../../../../../../src/game.cc \ + ../../../../../../src/level.cc \ ../../../../../../src/loco.cc \ ../../../../../../src/main.cc \ ../../../../../../src/menu.cc \ ../../../../../../src/mouse.cc \ + ../../../../../../src/screen.cc \ ../../../../../../src/sprite.cc \ - ../../../../../../src/tableau.cc \ ../../../../../../src/utils.cc \ LOCAL_SHARED_LIBRARIES := SDL2 SDL2_mixer diff --git a/src/audio.cc b/src/audio.cc index 53ae2fa..fdf4626 100644 --- a/src/audio.cc +++ b/src/audio.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Audio +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 27/05/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/audio.h b/src/audio.h index 206ab04..5c4ed5d 100644 --- a/src/audio.h +++ b/src/audio.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Audio +// ( ) Audio class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 27/05/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/editeur.cc b/src/editor.cc similarity index 98% rename from src/editeur.cc rename to src/editor.cc index 5bacc13..2f0d3a6 100644 --- a/src/editeur.cc +++ b/src/editor.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Editeur +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 04/04/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -25,10 +25,10 @@ #include #include -#include "editeur.h" +#include "editor.h" #include "menu.h" -#include "jeux.h" -#include "tableau.h" +#include "game.h" +#include "level.h" #include "mouse.h" /*** Variables globales ***/ diff --git a/src/editeur.h b/src/editor.h similarity index 89% rename from src/editeur.h rename to src/editor.h index e8f4067..20d2b4b 100644 --- a/src/editeur.h +++ b/src/editor.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Editeur +// ( ) Editor class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 04/04/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -#ifndef _EDITEUR_DOM_ -#define _EDITEUR_DOM_ +#ifndef _EDITOR_DOM_ +#define _EDITOR_DOM_ #include "preference.h" #include "sprite.h" diff --git a/src/jeux.cc b/src/game.cc similarity index 98% rename from src/jeux.cc rename to src/game.cc index ea031f2..44cb82f 100644 --- a/src/jeux.cc +++ b/src/game.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Jeux +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 01/02/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -25,11 +25,11 @@ #include #include -#include "jeux.h" -#include "ecran.h" +#include "game.h" +#include "screen.h" #include "menu.h" #include "sprite.h" -#include "tableau.h" +#include "level.h" #include "audio.h" /*** Variables globales ***/ diff --git a/src/jeux.h b/src/game.h similarity index 92% rename from src/jeux.h rename to src/game.h index 8326a7e..4fe2835 100644 --- a/src/jeux.h +++ b/src/game.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Jeux +// ( ) Game class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 01/02/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -#ifndef _JEUX_DOM_ -#define _JEUX_DOM_ +#ifndef _GAME_DOM_ +#define _GAME_DOM_ #include "preference.h" #include "loco.h" diff --git a/src/tableau.cc b/src/level.cc similarity index 97% rename from src/tableau.cc rename to src/level.cc index ea02082..9055cfa 100644 --- a/src/tableau.cc +++ b/src/level.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Sprite +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 3/04/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ #include #include "preference.h" #include "utils.h" -#include "tableau.h" +#include "level.h" /*** Constructeurs ***/ /*********************/ diff --git a/src/tableau.h b/src/level.h similarity index 92% rename from src/tableau.h rename to src/level.h index c803943..97bd7f1 100644 --- a/src/tableau.h +++ b/src/level.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Sprite +// ( ) Level class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 1/04/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -#ifndef _TABLEAU_DOM_ -#define _TABLEAU_DOM_ +#ifndef _LEVEL_DOM_ +#define _LEVEL_DOM_ #include "preference.h" diff --git a/src/loco.cc b/src/loco.cc index c2eccb1..e230155 100644 --- a/src/loco.cc +++ b/src/loco.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Loco +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 16/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ #include "preference.h" #include "loco.h" #include "audio.h" -#include "ecran.h" +#include "screen.h" #define PIQ (M_PI/2.0) #ifndef M_PI diff --git a/src/loco.h b/src/loco.h index 4c440b4..91c95ae 100644 --- a/src/loco.h +++ b/src/loco.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Loco (Gère la locomotive) +// ( ) Loco class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 16/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/main.cc b/src/main.cc index f1666b7..ede54e3 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Programme Principale +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 03/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -28,14 +28,14 @@ #include #include "preference.h" -#include "jeux.h" +#include "game.h" #include "audio.h" #include "sprite.h" -#include "ecran.h" +#include "screen.h" #include "mouse.h" #include "menu.h" -#include "tableau.h" -#include "editeur.h" +#include "level.h" +#include "editor.h" #include "utils.h" /*** Variables globales ***/ diff --git a/src/menu.cc b/src/menu.cc index 3c693c5..e476e19 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Menu +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 23/03/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ #include "preference.h" #include "menu.h" #include "sprite.h" -#include "ecran.h" +#include "screen.h" #include "mouse.h" #include "audio.h" diff --git a/src/menu.h b/src/menu.h index 5313321..d1a3c93 100644 --- a/src/menu.h +++ b/src/menu.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Menu +// ( ) Menu class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 23/03/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/mouse.cc b/src/mouse.cc index 3903268..f1c8867 100644 --- a/src/mouse.cc +++ b/src/mouse.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Class de la Sourie +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 23/03/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ #include #include "mouse.h" #include "preference.h" -#include "ecran.h" +#include "screen.h" #include "audio.h" /*** Variables Globales ***/ diff --git a/src/mouse.h b/src/mouse.h index e3a29e3..a8e10ac 100644 --- a/src/mouse.h +++ b/src/mouse.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Class de la Sourie +// ( ) Mouse class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 23/03/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -#ifndef _SOURIE_DOM_ -#define _SOURIE_DOM_ +#ifndef _MOUSE_DOM_ +#define _MOUSE_DOM_ #include diff --git a/src/preference.h b/src/preference.h index 41e7a13..1ab1498 100644 --- a/src/preference.h +++ b/src/preference.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Structure des Preferences +// ( ) Preferences data // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 14/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/ecran.cc b/src/screen.cc similarity index 95% rename from src/ecran.cc rename to src/screen.cc index 992e7d3..633a110 100644 --- a/src/ecran.cc +++ b/src/screen.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Ecran +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 12/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ #include "preference.h" #include "sprite.h" -#include "ecran.h" +#include "screen.h" /*** Variables globales ***/ /**************************/ diff --git a/src/ecran.h b/src/screen.h similarity index 92% rename from src/ecran.h rename to src/screen.h index 9cb121b..b66873d 100644 --- a/src/ecran.h +++ b/src/screen.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Ecran (Gère un buffet d'écran) +// ( ) Screen class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 12/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -#ifndef _ECRAN_DOM_ -#define _ECRAN_DOM_ +#ifndef _SCREEN_DOM_ +#define _SCREEN_DOM_ #include "sprite.h" #include "preference.h" diff --git a/src/sprite.cc b/src/sprite.cc index 8cb2e46..0b9bb4d 100644 --- a/src/sprite.cc +++ b/src/sprite.cc @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Sprite +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 11/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/sprite.h b/src/sprite.h index bf051d9..2f891fb 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -1,12 +1,12 @@ // (_||_/ -// ( ) Classe Sprite +// ( ) Sprite class // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 11/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/utils.cc b/src/utils.cc index babb06b..09f2557 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -1,12 +1,12 @@ -// (_||_/ Utils.cc -// ( ) Fonctions divers +// (_||_/ +// ( ) // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- -// Copyright (C) 2006 By Dominique Roux-Serret +// Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 03/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/utils.h b/src/utils.h index 22d8ab6..2e01aa3 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,12 +1,12 @@ -// (_||_/ Utils.h -// ( ) Fonctions divers pour les differents systèmes d'exploitation +// (_||_/ +// ( ) Utils functions // ( o 0 ) //-OOO°--(_)---°OOO--------------------------------------- // Copyright (C) 2006 By Dominique Roux-Serret // .OOOo oOOO. roux-serret@ifrance.com //-( )------( )--------------------------------------- -// ( ( ) / Le 03/01/2006 -// (_) (_/ +// ( ( ) / Copyright (C) 2023 By Johnny Jazeix +// (_) (_/ jazeix@gmail.com // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by From 7465fec1181b115f0035448bfcca970865315629 Mon Sep 17 00:00:00 2001 From: Johnny Jazeix Date: Thu, 21 Dec 2023 12:13:00 +0100 Subject: [PATCH 2/2] translate to English class names and some functions/variables --- src/editor.cc | 126 ++++++++++++++++----------------- src/editor.h | 6 +- src/game.cc | 76 ++++++++++---------- src/game.h | 6 +- src/level.cc | 20 +++--- src/level.h | 10 +-- src/loco.cc | 8 +-- src/loco.h | 4 +- src/main.cc | 36 +++++----- src/menu.cc | 180 +++++++++++++++++++++++------------------------ src/menu.h | 11 ++- src/mouse.cc | 8 +-- src/mouse.h | 8 +-- src/preference.h | 2 +- src/screen.cc | 16 ++--- src/screen.h | 22 +++--- src/sprite.cc | 12 ++-- src/utils.cc | 32 ++++----- src/utils.h | 12 ++-- 19 files changed, 297 insertions(+), 298 deletions(-) diff --git a/src/editor.cc b/src/editor.cc index 2f0d3a6..4dac345 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -41,23 +41,23 @@ extern sPreference Pref; extern int Horloge; extern int HorlogeAvant; -extern Tableau Niveau; -extern Mouse Sourie; -extern Jeux Jeu; +extern Level level; +extern Mouse mouse; +extern Game game; static int NumRail[]={ 10,10,10,0,10,1,2,3,10,4,5,6,7,8,9,10 }; /*** Constructeur et Destructeur ***/ /***********************************/ -Editeur::Editeur() : N(0), NumDeco(0) +Editor::Editor() : N(0), NumDeco(0) { } -Editeur::~Editeur() +Editor::~Editor() { } /*** SDL Main ***/ /****************/ -eMenu Editeur::SDLMain(int NumNiv) +eMenu Editor::SDLMain(int NumNiv) { int PyE; int cx=0,cy=0; @@ -75,13 +75,13 @@ eMenu Editeur::SDLMain(int NumNiv) Option=rail; // Initialise la sourie - Sourie.Init(NULL); + mouse.Init(NULL); // Prend les evenements do { SDL_Event event; while(SDL_PollEvent(&event)) { - Sourie.GetEvent(event,PyE); // Prend les evenements de la sourie + mouse.GetEvent(event,PyE); // Prend les evenements de la sourie switch(event.type) { case SDL_WINDOWEVENT: if(event.window.event==SDL_WINDOWEVENT_ENTER) Affiche(); @@ -101,7 +101,7 @@ eMenu Editeur::SDLMain(int NumNiv) case SDL_MOUSEBUTTONUP: Boutton=false; if(TypeB!=-1 && Option==deco && cx>=LT) { // Si doit effacer une décoration - Niveau.T[NumN].NDeco--; + level.T[NumN].NDeco--; } TypeB=-1; break; @@ -112,75 +112,75 @@ eMenu Editeur::SDLMain(int NumNiv) } // Gère l'appuis du boutton de la sourie - cx=Sourie.Px/D_Case; - cy=Sourie.Py/D_Case; + cx=mouse.Px/D_Case; + cy=mouse.Py/D_Case; if(Boutton && cx=680 && Py<=90) { - mRet=MenuPrincipale.SDLMain_InGame(); - if(mRet==mJeux) { + mRet=MainMenu.SDLMain_InGame(); + if(mRet==mGame) { DrawLevel(NumN); SDL_RenderPresent(sdlRenderer); Pause=true; @@ -125,8 +125,8 @@ eMenu Jeux::SDLMain(void) case SDL_KEYDOWN: if(event.key.state==SDL_PRESSED) { if(event.key.keysym.sym==SDLK_ESCAPE) { - mRet=MenuPrincipale.SDLMain_InGame(); - if(mRet==mJeux) { + mRet=MainMenu.SDLMain_InGame(); + if(mRet==mGame) { DrawLevel(NumN); SDL_RenderPresent(sdlRenderer); Pause=true; @@ -200,10 +200,10 @@ eMenu Jeux::SDLMain(void) if(Pref.NVie<0) return mScoreEdit; // Si mort fini if(Lo.Gagne) { #ifndef DCHILDREN - if(MenuPrincipale.SDLMain_HR()==mQuit) return mQuit; + if(MainMenu.SDLMain_HR()==mQuit) return mQuit; #endif NumN++; - if(Niveau.N==NumN) { + if(level.N==NumN) { Pref.Score+=Pref.NVie*100; return mScoreEdit; } @@ -223,14 +223,14 @@ eMenu Jeux::SDLMain(void) /*** Charge un tableau ***/ /*************************/ -bool Jeux::Load(int NivN) +bool Game::Load(int NivN) { int i; Pref.Niveau=NivN; // Recopie le tableau - for(i=0;iECARTWAGON_MOY) Ec.Affiche(pluslong,(DureeJeu*40/1000)%50,715,295); - if(Pref.VitesseMoy>Pref.Vitesse) Ec.Affiche(vitesse,(DureeJeu*40/1000+7)%50,765,295); + Ec.PrintOptions(Pref.NVie,Pref.Score); + if(Pref.EcartWagonECARTWAGON_MOY) Ec.PrintSprite(pluslong,(DureeJeu*40/1000)%50,715,295); + if(Pref.VitesseMoy>Pref.Vitesse) Ec.PrintSprite(vitesse,(DureeJeu*40/1000+7)%50,765,295); } diff --git a/src/game.h b/src/game.h index 4fe2835..1279045 100644 --- a/src/game.h +++ b/src/game.h @@ -29,10 +29,10 @@ /*** Définition de la class ***/ /******************************/ -class Jeux { +class Game { public: - Jeux(void); - ~Jeux(void); + Game(void); + ~Game(void); /*** Fonctions ***/ /*****************/ diff --git a/src/level.cc b/src/level.cc index 9055cfa..ebc0dae 100644 --- a/src/level.cc +++ b/src/level.cc @@ -28,19 +28,19 @@ /*** Constructeurs ***/ /*********************/ -Tableau::Tableau(void) : N(0) +Level::Level(void) : N(0) { int i; for(i=0;i0) { - if(PyE==3) Ec.Affiche(fleches,2,330,380); - else Ec.Affiche(fleches,1,330,380); + if(PyE==3) Ec.PrintSprite(fleches,2,330,380); + else Ec.PrintSprite(fleches,1,330,380); } - else Ec.Affiche(fleches,0,330,380); + else Ec.PrintSprite(fleches,0,330,380); if(Niv0) { memcpy((char*)&Pref,Provi,L); delete [] Provi; @@ -264,6 +264,6 @@ void Utils::SauvePref(void) sprintf(PathPref, "%sli-ri.pref", PrefFolder); SDL_free(PrefFolder); - Utils::SauveFichier(PathPref,(char*)&Pref,sizeof(sPreference)); + Utils::SaveFile(PathPref,(char*)&Pref,sizeof(sPreference)); } diff --git a/src/utils.h b/src/utils.h index 2e01aa3..7e57901 100644 --- a/src/utils.h +++ b/src/utils.h @@ -26,14 +26,14 @@ class Utils { public: - static bool FileExiste(const char *Path); // Si un fichier existe - static long ChargeFichier(const char *Path,unsigned char *&Buf); // Charge un ficher en mémoire - static bool SauveFichier(const char *Path,char *Buf,long L); // Sauve un Fichier + static bool FileExists(const char *Path); // Check if the file exists + static long LoadFile(const char *Path,unsigned char *&Buf); // Load a file in memory + static bool SaveFile(const char *Path,char *Buf,long L); // Save a file - static void GetPath(char *Name); // Rajoute le chemin au nom du fichier (sprites, levels) + static void GetPath(char *Name); // Add the path to the filename depending on the OS (sprites, levels) - static bool LoadPref(void); // Charger les préferences - static void SauvePref(void); // Sauve les preferences + static bool LoadPref(void); // Load preferences + static void SauvePref(void); // Save preferences }; #endif