39 Commits
Author SHA1 Message Date
BeatAroundTheBuscherandGitHub ed00830202 Fixes Upper/Lower Casing for include paths (#487)
* Fixing upper/lower case for includes

types.h, zconf.h and zlib.h were renamed so that global includes like Types.h
are not used.
2025-08-16 22:01:12 -03:00
AsdowandGitHub 49a119e6b9 Convert INVTYPE boolean fields to flagmask (#325)
Rearranged fields from largest to smallest to remove alignment padding
2024-08-22 08:48:29 +03:00
Marco Antonio Jaguaribe CostaandAsdow 8b1c4effa0 nuke all the #if 0's
scripted commit:

find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'

https://coan2.sourceforge.net/coan_man_1.html
2023-01-19 00:13:08 +02:00
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* 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
2023-01-03 15:51:48 +02:00
Asdow 06065bb62f Update EditorItems.cpp
Removed unused clippingRect
2022-11-07 19:53:40 +02:00
Asdow f4e729ee80 Update EditorItems.cpp
Improve readability
2022-11-07 19:42:08 +02:00
Asdow af9e221578 Removed remnants of editoritems buffer as it is no longer used 2022-11-07 19:12:53 +02:00
Asdow 9919531f56 Fix INT16 buffer overflow when displaying items in items tab
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
2022-11-07 18:03:45 +02:00
Wanne 05fdcb5d2e Merged from revision: 7363
- 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
2014-07-26 13:07:32 +00:00
Wanne c9a9acec5c Merged from revision: 7163
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
2014-04-24 18:35:30 +00:00
Kriplo a665154a62 Brief: //dnl ch86
- 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
2014-03-02 11:25:11 +00:00
Flugente f3b4b46751 Merged revision(s) 6879 from branches/ja2_source_official_2014:
Editor fixes (by Buggler):
- fixed incorrect item display after deleting map-placed item in stack
- revert r5949 code for item deletion from item pool


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6880 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-02-04 18:47:07 +00:00
Wanne d4aa35a66e Merged from revision: 6824
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
2014-01-26 08:15:40 +00:00
Kriplo b2dbc3123b Brief: //dnl ch80
- 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
2013-12-01 22:27:03 +00:00
Kriplo f0c6b73e24 Brief: //dnl ch78
- Some mapeditor cosmetic and CTD fixes.
Details:
- Fix sticky tooltip if perform scroll or go to 'Sector Summary' window.
- Fix accidental mercid delete from textbox if press any key while in 'Profile ID mode'.
- Fix CTD from release if several time swap from RND to any other item button.
- Disable some enabled buttons and mouse area from taskbar when 'Sector Summary' windows is active.
- Checkbox toggles from Mercs bar now remember their state after switching to another taskbar option.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6657 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-27 21:05:12 +00:00
Kriplo 614a56fe54 - addon to ch77, fix CTD when swap between random item with less then 12 items and any other item tab.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6653 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-25 23:01:48 +00:00
Kriplo f008316275 Brief: //dnl ch74
- Couple map editor fixes.
Details:
- Map loading not properly set Vanilla global variable switch.
- Loading AIMNAS maps of version 28 cause CTD due to incorrect StackedObjectData loading sizeof.
- Only in editor mode and if NAS setting is on inseparable and default attachments will be always add, but default attachments will not, so older maps should be converted from mapeditor to new version.
- Fix CTD if try to place items from tab selection which contains no items.
- There was missing part from ch4 for mouse wheel support in mapeditor.
- There was conflict between keyboard and mouse events creating problems when try to select taskbar options by mouse.
- Fix annoying message of using improper attachment during item place if item consist of default or inseparable attachments.
- Remove hints to display if loading map from editor.
- Fix CTD if have previously selected merc and loading another (smaller) map.
- Saving map as Vanilla will check if attachment is valid for 1.12, that means you will lost some stuff from NIV if save in Vanilla mode, so you should always save map in newest format if want play map in 1.13.
- Add correct weight recalculation when saving in Vanilla format using old OBJECTTYPE.
- Remove entry points check during map save as Scheinworld reported problem with basement levels and similar maps which doesn't need entry points.
- Fix displaying wrong map version in summary window because MapInfo is incorrectly saved in all previous mapeditors.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6530 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-25 18:48:37 +00:00
Wanne 772e99924a Improvements (by Buggler)
- Externalized BR shipping destination
- Externalized Drassen item dropoff grid no
- Used profile name instead of hardcoded value on message prompt for marrying Daryl, sparing Krott and finding queen's POW sector
- Hid names on message prompt when attempt to talk to out of LOS hidden NPC

Mapeditor (by Buggler)
- Show index no within usItemClass on item selection screen for another easy reference
- Lighten quantity and selected tiles color in tile selection screen 

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6500 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-15 19:51:53 +00:00
Wanne 95e93c225d Editor Feature (by Buggler)
- Hotkey 'Ctrl+/' & '/' to place item under mouse cursor when in item mode

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5953 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-24 19:27:43 +00:00
Wanne 05600adf33 Fixes / Improvements (by Buggler)
- Display Item Index No in Map Editor
- Hotkey for squad 11-20 in tactical set the same as strategic screen
- Hotkey previous/next page in save screen changed to PgUp/PgDn

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5924 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-16 14:26:51 +00:00
Wanne 49cf4a73dc - Fixed item picture not displayed in map editor selection area for those items beyond the old limit range (by Buggler)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5883 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-02-28 23:13:52 +00:00
Wanne 834aa1eb13 - Recommit Kaiden's class item cap fix r1790 (lost during meager of Big Maps Project code) & other related variables from INT16 to INT32; increased the class item limit in mapeditor (by Buggler)
- Map Editor: Items - Hotkeys (by Buggler)
o Hotkeys ',': Left Scroll
o Hotkeys '.': Right Scroll
o ('Shift': Jump 1 page; 'Ctrl': Jump 10 pages; 'Ctrl + Shift': Jump to first/last page)
- Changed saveloadscreen previous/next hotkey to ','/'.' due to interference with input_box navigation using arrow keys (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5877 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-02-27 19:06:52 +00:00
Flugente e762c6b0f4 - new <usItemClass>: IC_RANDOMITEM (0x40000000 or 1073741824) is used for random items exclusively.
- increased ma number of Random Items to 1000
- fix: A certain key combination no longer spawns random NATO ARs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5618 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-10-10 20:10:49 +00:00
Flugente 8275a1231b New feature: advanced repair/dirt system
- items now have an internal repair value that can be lowered through damage taken. They can only be repaired up to that value by your mercs, onyl smiths can fully restore it to 100%
- guns get dirty over time, especially when shooting. Thsi can cause them to jam. Use cleaning kits (item #1576) to clean them by pressing 'Alt' + '.'
- more on this feature in http://www.bears-pit.com/board/ubbthreads.php/topics/308926/New_feature_advanced_repair_di.html#Post308926
- this requires GameDir revision 1496 or higher

WARING! THIS BREAKS SAVEGAME COMPATIBIITY!

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5480 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-08-18 00:03:40 +00:00
Wanne 6e2bdd557c ****************************************************************************
** Merged Source Code from Development trunk, for the Spring 2011 Release **
****************************************************************************
o Development Trunk (Revision: 4444):  https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
o This trunk (the official 1.13 source trunk) will only be used for fixing bugs. No new features will be added here.
  New Features are only included in the Development trunk
o !!! After we have fixed a bug here in this trunk, we should MANUALLY merge the bugfix in the development trunk !!!

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4446 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2011-05-26 11:04:47 +00:00
Wanne 91087ca8c0 ************************************************************
* Merged Source Code from Development Trunk: Revision 4063 *
************************************************************
- Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- This will be the Source for the Beta 2011 Test

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2011-01-18 09:11:09 +00:00
Wanne 14750c6903 **********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 **
**********************************************************
- Merged Big Maps Project code from BMP+MP trunk (Revision: 3340)
o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- Before THIS merge, I made a branch of the existing 1.13 source
o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src
- Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago
- I will add VS 2010 projects and solution file in the next few days

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2010-02-28 18:38:52 +00:00
Wanne 46cd01e366 - Merged Source Code from MP branch Revision 3021
. clip surface coordinates before blitting
. track surface data pointer, to identify the surface's clip rectangle
. editor : test if item index is smaller than the number of items 
. other minor updates
. update png loader to work with new appdata.xml structure
. VFS updates
. fix radar maps : write to <userprofile>\RADARMAPS

* New Map Editor Release (Build: 3023)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3023 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2009-06-19 15:19:49 +00:00
Wanne e240037535 - Bugfix: Fixed CTD when item could not be rendered in the Editor Toolbar
- Fixed compilation error while compiling with disabled #define USE_VFS

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2997 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2009-06-10 15:12:58 +00:00
ChrisL 5a57354297 Fixed item "beaming" bugs that allowed items to be grabbed from a sector your merc wasn't currently in.
Fixed the map editor so that "Nada" items don't appear in the item lists.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2088 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2008-04-29 17:33:49 +00:00
ChrisL bdcc920c63 Build1936
Minor adjustments to some of the rendering functions to grant a bit more control to the code.
Adjusted the mouse areas for key and item popup windows.
Added the pocket capacity indicator to sector inventory when using NewInv mode.
Added the right click option to sector inventory so you can view/manipulate stacks and view item descriptions without first equiping an item.
Updated sector inventory so that capacity values appear in all pockets.  Not just currently filled one.
Updated sector inventory so that newly placed items could be right-clicked on for details.
Increased the mouse region for the various stack popups so there is always room to close the popup without activating the description box.
Fixed a bug in the sector inventory description panel that caused a crash when trying to remove an attachment.
Fixed sector inventory so you can add attachments to weapons.
Fixed some weight issues.
Fixed a crash resulting from right-clicking in sector inventory while Item Desc window was already open.
Fixed the "Active Squad" message so it displays the squad that is actually activated.
Fixed a bug that allowed you to start a new game in NewInv mode while in 640x480 resolution.
Updated the Item Description windows so you can load a gun as well as unload.
Added new CTRL+SHIFT+D hotkey to delete all items in sector.
Added new CTRL+SHIFT+S hotkey to sell all items in sector, assuming you have the ALT+LMB option turned on in your INI file.
Fixed a problem with sector inventory item description where the status did not appear for items that couldn't stack.
Fixed a problem with Nails so he always starts with his leather jacket, even if you don't buy his gear.
Incorporated a failsafe so that NewInv mode can't be selected, nor NIV saves loaded, when no custom data path is set.
Add new IC_BELTCLIP item class.
Update pocket definition restrictions to use bitwise compare.
Add failsafe so that you can't merge LBENODEs.
Reset VC2005 so it doesn't point to a specific drive.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1936 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2008-03-29 20:35:03 +00:00
lalien 43ca24dda8 Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2008-03-08 15:15:25 +00:00
Overhaul fccef1faea Fix for AI seeking climb point in toxic gas
Fix for civilians trying to climb the roof to seek noise
Fix for punching and stabbing
Transparent change: Gave names to anonymous structs in OBJECTTYPE


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-18 19:03:20 +00:00
Overhaul 6ec2c5da7d Initialized many variables
Fix for enemy invasions and reinforcements


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1192 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-13 03:39:54 +00:00
Wanne ce31084ae7 Removed most of my thousands "WANNE" comments which goes back 2 years when I changed to higher resolutions. These were only internal comments for me, so they didn't include any useful meaning for others.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1172 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-08-07 21:39:23 +00:00
lalien 0530b53b9c bug fixes from Overhaul:
- Data type changes 
- Templates removed

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2007-05-09 13:16:37 +00:00
Wanne 1a1af6b52a - updated some editor files for the high resolution
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@601 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-10-12 15:59:33 +00:00
Wanne 10817d380e - updated most of the editor screens to the high resolution. Editor should now work with high resolution.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@600 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-10-12 10:26:25 +00:00
lalien e54aeb96aa Original Source for 1.13 Mod High Resolution version from 12/06/05
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@21 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2006-04-19 11:32:51 +00:00