.editorconfig already enforces it but it's getting changed piecemeal in
every commit. just get it done with.
the script:
```
find . -type f -not -path "./.git/*" -not -path "./.vs/*" | while read -r file; do
isFile=$(file -0 "$file" | cut -d $'\0' -f2)
case "$isFile" in
(*text*)
echo "$file is text"
if [[ $(tail -c 1 "$file" | wc -l) -ne 1 ]]; then
echo "" >> "$file"
fi
;;
(*)
echo "file isn't text"
;;
esac
done
```
Additional music can be added by placing sound files into Dataa/Music folder following this naming convention
musicmode_runningNumber.fileformat, so for example:
Mainmenu_001.mp3
Mainmenu_002.ogg
Laptop_002.ogg
Tactical_003.wav
*****************************************************************
Different musicmodes are
Mainmenu_ <-- Mainmenu music
Laptop_ <-- Laptop music
Tactical_ <-- Tactical with nothing special going on
Enemy_ <-- Tactical, enemy present
Battle_ <-- Tactical, enemy present and visible
Victory_ <-- Tactical, battle victory
Death_ <-- Tactical, battle defeat
Creepy_ <-- Tactical, creatures present
CreepyBattle_ <-- Tactical, creatures present and visible
Music files can be .mp3, .ogg or .wav formats and 100 songs in each category is supported.
The running numbering starts from 000
*****************************************************************
A few filenames are treated in a special way to facilitate easy replacement of original music.
To replace original music, insert the following named files into this folder
"menumix1" <-- Mainmenu music
"marimbad 2" <-- Laptop music
"nothing A" <-- Tactical with nothing special going on
"nothing B"
"nothing C"
"nothing D"
"tensor A" <-- Tactical, enemy present
"tensor B"
"tensor C"
"triumph"
"death"
"battle A" <-- Tactical, enemy present and visible
"tensor B" <-- This file is also used as battle music
"creepy" <-- Tactical, creatures present
"creature battle" <-- Tactical, creatures present and visible
now that CI is using cmake, we can be clean up the tree quite a bit
btw, cmake can still configure for the msbuild generator for those so inclined:
create the folder, cmd to it, run `cmake [project_root_dir] -G"Visual Studio 17 2022" -A Win32 -DLanguages=ENGLISH -DApplications=JA2` once, then open the solution file using Visual Studio 2022
* Add include guard to EditorMercs.h
* bring CivGroup related symbols from Tactical over to Editor
and adjust #includes accordingly
* remove redundant #ifdef
Tried to stay as close as possible to ja2_2019.sln
On Visual Studio 2022 just Project -> CMake Settings for Ja2, add
the x86 configurations you want and press F7.
Below shows how the -DLanguages -DApplications switches work, If you don't
set them, the CMakeCache.txt of them will be set to ENGLISH and JA2,
respectively:
cmake [...] // nothing set, configure just JA2_ENGLISH.exe by default
cmake [...] -DApplications="JA2UB" // configures just Unfinished Business
cmake [...] build -DApplications="JA2UB;JA2UBMAPEDITOR" // Unfinished Business and UB Map Editor
cmake [...] build -DApplications="JA2UB;JA2MAPEDITOR;ALL" // ALL is in the list, configures every application
cmake [...] build -DApplications="JA2MAPEDITOR;DeathStranding" // fatal error: DeathStranding not an application
cmake [...] -DLanguages="GERMAN" // configures just German targets
cmake [...] build -DLanguages="GERMAN;ENGLISH" // German and English
cmake [...] build -DLanguages="GERMAN;ENGLISH;ALL" // ALL is in the list, configures every language
cmake [...] build -DLanguages="ENGLISH;ESPERANTO" // fatal error: ESPERANTO not supported
* More unused stuff removal
delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers
* remove mentions from vc proj files too
* remove preprocessor conditionals for unused definitions
find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'
then manually fixed a couple files the tool errored out on
* yes, the comments too
as title
Original implementation initializes a ridiculously wide buffer where item graphics and names are then copied to and is then shown in parts depending on what items should be visible in item tab. When item counts go over ~32k in x-direction in pixel coordinates, the very low level drawing functions int16 variables overflow and item graphics are then drawn over each other.
It's now changed to blit item graphics and names by on demand depending on the item indices, which does not require a huge buffer and works regardless of the amount of items, since only 11 are visible at any one time and the x-coordinate stays well within INT16 limits
Features (by anv)
- new Ja2_Options.ini setting - HIDE_EXPLORED_ROOM_ROOF_STRUCTURES (e.g. sandbags) at ground level view
- Hold CTRL hotkey in mapeditor to place any object on roof
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7677 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Map Editor now properly handles all available items without empty placeholders in between (by anv)
- Added item compare popup help text (by Buggler)
- Enemy icons will not be shown as 10x icons in 640x480 due to visibility issues (the rest remains as it is) (by Buggler)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7364 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Fixes (by Buggler)
- Allows sector inventory item deletion feature to delete inaccessible and not-in-sector items. Hold 'Delete' hotkey and click the item
- Hot key Ctrl+Tab can now switch to the second page of General tab in EDB for weapons
- Fixed hardcoded mine icons and spawning pool sector in AI Viewer
Editor
- Hotkey for finding previous merc changed to 'Ctrl+Space' to avoid out-of-map boundary display
- Added editor command line options in popup help text
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7268 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Externalized keys and locks to xml (by anv)
- Locks (TableData/Items/Locks.xml): Originally 64 locks were kept in BinaryData/LOCKS.BIN. Now up to 255 locks can be specified in TableData/Locks.xml. If it isn't found, LOCKS.BIN will be loaded normally.
- Keys (TableData/Items/Keys.xml): Originally 10 keys were hardcoded in KeyTable[]. Now up to 255 keys can be specified in TableData/Keys.xml. If it isn't found, hardcoded array will be used normally.
see: http://www.bears-pit.com/board/ubbthreads.php/topics/331900.html
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7164 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Fixing mapeditor move building and improving some related mapeditor stuff.
Details:
- Change the way exit grids are add, remove, save and load through editor, also add undo option for exit grids and you can place unlimited number of them.
- Fix incorrect gridno save in temporary map file for bigmap exit grids.
- Increase maximum number of light sprite from 256 to 4096 per map.
- Using DEL key for QuickEraseMapTile will now erase ItemPool too, and with improved function DeleteStuffFromMapTile will erase light sprites, exit grids and door locks.
- Cliff hang tiles used for middle cliffs are now possible to erase with when erase button is on.
- Add support for undo door locks, also you can now erase them if erase button is on.
- Move building function is completely rewrite and will properly move exit grids, door locks, lights and items too.
- Removing unnecessary tiles during copy building is improved too.
- Fix undo function for light sprites which now will also store all three types and undo them properly.
- Fix CTD situation if tile elements are deleted and after that items too, then undo will crash mapeditor.
- Fix spawning of item pool cursors during when adding items.
- Fix text glitches over door locks form.
- Fix sticky tooltip when loadsave screen or door locks form is active.
- High ground marking cursors will not be drawn in invisible map tiles anymore to increase speed and maybe fix some render problems but I doubt it.
- Move GLOCK_17_ForUseWithLOS item generation from init.cpp to los.cpp to avoid potential problems if global world items array not set.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7004 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Some fixing and adding position in overhead map to be in center of big map.
Details:
- Calculate overhead map cords from your current position on big maps.
- Fix incorrect placing room numbers in maps with cliffs.
- Fix CTD during deletion of sector items using CTRL+D or CTRL+Del.
- Remove light, door and item cursor and item tiles after coping building.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6888 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Solve issues related to my recent editor fixes.
Details:
- Fix missing condition when using keyboard for load any map from listed profiles in CTRL+L list box.
- Fix CTD during gWorldItems resize after adding certain amount of items.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6867 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Map Editor Fixes/Improvements (by Buggler)
- Better UI feedback after last item deleted from item stack in editor item mode
- Improved editor room number increment code. 'Shift + LMB' when drawing room numbers will reuse same room number on next input
- externalized hardcoded button tooltip text in editor tile selection window
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6825 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Fix BigMaps cliff-prone problem.
Details:
- Bug which prevent merc to go prone and crawl in big maps with cliffs was reported by Buggler who already find source of problem which lies in DB_STRUCTURE_TILE struct variable sPosRelToBase. This variable contains relative position to base tile which and cannot simply be change to INT32 as data from JSD files are loaded into it. However reason for problem is because sPosRelToBase is not updated for quite bunch of structures when map size is changed so add macro which in real time perform conversion and update sPosRelToBase value.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Fix several problems with summary windows and improve map loading to any map for mapeditor.
Details:
- Add option from CTRL+L list box to load any map from any listed profiles.
- Fix incorrect loading of items option in summary window for non vanilla maps.
- Fix improper popup of radio boxes for when items is selected in summary window and summary file or map not exist.
- Summary items information is now show for non sector custom map files too.
- Fix glitches when switching from overhead map to sector summary windows.
- Fix improper opening of exit screen text box during exit from overhead map.
- Change size to fixed macro of all temporary buffers for map filename.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6687 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Polishing and fixing mapeditor.
Details:
- Add scroll map editor items for mouse wheel.
- Fix selection of mapinfo light and smoothing buttons when switching between taskbars.
- UpdateRoofsView now will hide/show onroof tiles and back roof walls too.
- Fix fake light toggle which now will remain after switching to another taskbar also fix incorrect ambient light saving during toggling fake light with HOME key.
- Finish work on HandleMouseClicksInGameScreen function so most draw functions now are single clicked on same tile element instead rapid burst of events which in some situation create stacking tiles problem during save game.
- Fix incorrect value for exit grids if right click on map element without exit grid, also if changing same exit grid then will update same instead to define next available slot from exit grid array.
- Restricted scroll will now disable scrolling when enter in textbox at mapinfo taskbar for basement levels and for proper radar map creation.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6673 3b4a5df2-a311-0410-b5c6-a8a6f20db521